billboard.js 4.1.0-next.2 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +268 -107
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +16 -16
  5. package/dist/billboard.pkgd.js +3198 -1755
  6. package/dist/billboard.pkgd.min.js +23 -23
  7. package/dist/billboard.react.js +28 -49
  8. package/dist/billboard.react.min.js +2 -2
  9. package/dist/billboard.worker.js +1 -1
  10. package/dist/plugin/billboardjs-plugin-bubblecompare.js +14 -31
  11. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-sparkline.js +14 -31
  13. package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
  14. package/dist/plugin/billboardjs-plugin-stanford.js +21 -35
  15. package/dist/plugin/billboardjs-plugin-stanford.min.js +7 -7
  16. package/dist/plugin/billboardjs-plugin-tableview.js +15 -30
  17. package/dist/plugin/billboardjs-plugin-tableview.min.js +5 -5
  18. package/dist/plugin/billboardjs-plugin-textoverlap.js +15 -30
  19. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  20. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2959 -1684
  21. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +8 -8
  22. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2960 -1685
  23. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +10 -10
  24. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2961 -1686
  25. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +18 -18
  26. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2962 -1687
  27. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +11 -11
  28. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2963 -1688
  29. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +8 -8
  30. package/dist/theme/dark.css +1 -1
  31. package/dist/theme/dark.min.css +1 -1
  32. package/dist/theme/datalab.css +1 -1
  33. package/dist/theme/datalab.min.css +1 -1
  34. package/dist/theme/graph.css +1 -1
  35. package/dist/theme/graph.min.css +1 -1
  36. package/dist/theme/insight.css +1 -1
  37. package/dist/theme/insight.min.css +1 -1
  38. package/dist/theme/modern.css +1 -1
  39. package/dist/theme/modern.min.css +1 -1
  40. package/dist-esm/Chart/Chart.js +1 -1
  41. package/dist-esm/Chart/api/axis.js +1 -1
  42. package/dist-esm/Chart/api/category.js +1 -1
  43. package/dist-esm/Chart/api/chart.js +9 -7
  44. package/dist-esm/Chart/api/color.js +1 -1
  45. package/dist-esm/Chart/api/data.js +3 -3
  46. package/dist-esm/Chart/api/export.js +1 -1
  47. package/dist-esm/Chart/api/flow.js +1 -1
  48. package/dist-esm/Chart/api/focus.js +1 -1
  49. package/dist-esm/Chart/api/grid.js +1 -1
  50. package/dist-esm/Chart/api/group.js +1 -1
  51. package/dist-esm/Chart/api/legend.js +1 -1
  52. package/dist-esm/Chart/api/load.js +1 -1
  53. package/dist-esm/Chart/api/regions.js +1 -1
  54. package/dist-esm/Chart/api/selection.js +1 -1
  55. package/dist-esm/Chart/api/show.js +1 -1
  56. package/dist-esm/Chart/api/stubs.js +1 -1
  57. package/dist-esm/Chart/api/subchart.js +1 -1
  58. package/dist-esm/Chart/api/tooltip.js +1 -1
  59. package/dist-esm/Chart/api/x.js +11 -9
  60. package/dist-esm/Chart/api/zoom.js +8 -7
  61. package/dist-esm/ChartInternal/Axis/Axis.js +7 -6
  62. package/dist-esm/ChartInternal/Axis/AxisRenderer.js +1 -1
  63. package/dist-esm/ChartInternal/Axis/AxisRendererHelper.js +1 -1
  64. package/dist-esm/ChartInternal/ChartInternal.js +32 -8
  65. package/dist-esm/ChartInternal/data/convert.helper.js +7 -5
  66. package/dist-esm/ChartInternal/data/convert.js +1 -1
  67. package/dist-esm/ChartInternal/data/data.js +64 -33
  68. package/dist-esm/ChartInternal/data/load.js +1 -1
  69. package/dist-esm/ChartInternal/interactions/drag.js +1 -1
  70. package/dist-esm/ChartInternal/interactions/eventrect.js +1 -1
  71. package/dist-esm/ChartInternal/interactions/flow.js +17 -15
  72. package/dist-esm/ChartInternal/interactions/interaction.js +1 -1
  73. package/dist-esm/ChartInternal/interactions/subchart.js +8 -6
  74. package/dist-esm/ChartInternal/interactions/zoom.js +8 -6
  75. package/dist-esm/ChartInternal/internals/category.js +1 -1
  76. package/dist-esm/ChartInternal/internals/class.js +1 -1
  77. package/dist-esm/ChartInternal/internals/clip.js +1 -1
  78. package/dist-esm/ChartInternal/internals/color.js +1 -1
  79. package/dist-esm/ChartInternal/internals/domain.js +13 -9
  80. package/dist-esm/ChartInternal/internals/format.js +5 -3
  81. package/dist-esm/ChartInternal/internals/grid.js +5 -4
  82. package/dist-esm/ChartInternal/internals/legend.js +8 -7
  83. package/dist-esm/ChartInternal/internals/redraw.js +2 -2
  84. package/dist-esm/ChartInternal/internals/region.js +1 -1
  85. package/dist-esm/ChartInternal/internals/scale.js +1 -1
  86. package/dist-esm/ChartInternal/internals/selection.js +1 -1
  87. package/dist-esm/ChartInternal/internals/size.axis.js +1 -1
  88. package/dist-esm/ChartInternal/internals/size.js +56 -10
  89. package/dist-esm/ChartInternal/internals/style.js +1 -1
  90. package/dist-esm/ChartInternal/internals/subchart.util.js +1 -1
  91. package/dist-esm/ChartInternal/internals/text.arc.js +1 -1
  92. package/dist-esm/ChartInternal/internals/text.js +12 -9
  93. package/dist-esm/ChartInternal/internals/text.util.js +4 -4
  94. package/dist-esm/ChartInternal/internals/title.js +3 -2
  95. package/dist-esm/ChartInternal/internals/tooltip.js +25 -20
  96. package/dist-esm/ChartInternal/internals/transform.js +1 -1
  97. package/dist-esm/ChartInternal/internals/type.js +1 -1
  98. package/dist-esm/ChartInternal/shape/arc.js +3 -2
  99. package/dist-esm/ChartInternal/shape/area.js +3 -2
  100. package/dist-esm/ChartInternal/shape/bar.js +1 -1
  101. package/dist-esm/ChartInternal/shape/bubble.js +1 -1
  102. package/dist-esm/ChartInternal/shape/candlestick.js +1 -1
  103. package/dist-esm/ChartInternal/shape/core/barRadius.js +1 -1
  104. package/dist-esm/ChartInternal/shape/core/bubble.js +1 -1
  105. package/dist-esm/ChartInternal/shape/core/candlestick.js +1 -1
  106. package/dist-esm/ChartInternal/shape/core/dataRegion.js +1 -1
  107. package/dist-esm/ChartInternal/shape/core/geometry.js +1 -1
  108. package/dist-esm/ChartInternal/shape/core/path.js +1 -1
  109. package/dist-esm/ChartInternal/shape/core/point.js +1 -1
  110. package/dist-esm/ChartInternal/shape/core/treemap.js +3 -2
  111. package/dist-esm/ChartInternal/shape/funnel.js +1 -1
  112. package/dist-esm/ChartInternal/shape/gauge.js +1 -1
  113. package/dist-esm/ChartInternal/shape/line.js +3 -2
  114. package/dist-esm/ChartInternal/shape/point.js +1 -1
  115. package/dist-esm/ChartInternal/shape/polar.js +1 -1
  116. package/dist-esm/ChartInternal/shape/radar.js +1 -1
  117. package/dist-esm/ChartInternal/shape/shape.js +3 -2
  118. package/dist-esm/ChartInternal/shape/treemap.js +1 -1
  119. package/dist-esm/canvas/CanvasAxisRenderer.js +27 -21
  120. package/dist-esm/canvas/CanvasEngine.js +1 -1
  121. package/dist-esm/canvas/CanvasPainter.js +1 -1
  122. package/dist-esm/canvas/CanvasRenderer.js +1 -1
  123. package/dist-esm/canvas/CanvasTheme.js +7 -8
  124. package/dist-esm/canvas/HitDetector.js +1 -1
  125. package/dist-esm/canvas/axisTicks.js +3 -2
  126. package/dist-esm/canvas/classes.js +1 -1
  127. package/dist-esm/canvas/color.js +1 -1
  128. package/dist-esm/canvas/geometry.js +1 -1
  129. package/dist-esm/canvas/labels.js +4 -4
  130. package/dist-esm/canvas/pointPattern.js +1 -1
  131. package/dist-esm/canvas/util.js +1 -1
  132. package/dist-esm/config/Options/Options.js +1 -1
  133. package/dist-esm/config/Options/axis/axis.js +1 -1
  134. package/dist-esm/config/Options/axis/x.js +1 -1
  135. package/dist-esm/config/Options/axis/y.js +1 -1
  136. package/dist-esm/config/Options/axis/y2.js +1 -13
  137. package/dist-esm/config/Options/common/boost.js +1 -1
  138. package/dist-esm/config/Options/common/color.js +1 -1
  139. package/dist-esm/config/Options/common/grid.js +1 -1
  140. package/dist-esm/config/Options/common/legend.js +1 -1
  141. package/dist-esm/config/Options/common/main.js +44 -2
  142. package/dist-esm/config/Options/common/point.js +1 -1
  143. package/dist-esm/config/Options/common/title.js +1 -1
  144. package/dist-esm/config/Options/common/tooltip.js +1 -1
  145. package/dist-esm/config/Options/data/axis.js +1 -1
  146. package/dist-esm/config/Options/data/data.js +1 -1
  147. package/dist-esm/config/Options/data/selection.js +1 -1
  148. package/dist-esm/config/Options/interaction/interaction.js +1 -1
  149. package/dist-esm/config/Options/interaction/subchart.js +1 -1
  150. package/dist-esm/config/Options/interaction/zoom.js +1 -1
  151. package/dist-esm/config/Options/shape/arc.js +1 -1
  152. package/dist-esm/config/Options/shape/area.js +1 -1
  153. package/dist-esm/config/Options/shape/bar.js +1 -1
  154. package/dist-esm/config/Options/shape/bubble.js +1 -1
  155. package/dist-esm/config/Options/shape/candlestick.js +1 -1
  156. package/dist-esm/config/Options/shape/donut.js +1 -1
  157. package/dist-esm/config/Options/shape/funnel.js +1 -1
  158. package/dist-esm/config/Options/shape/gauge.js +1 -1
  159. package/dist-esm/config/Options/shape/line.js +1 -1
  160. package/dist-esm/config/Options/shape/pie.js +1 -1
  161. package/dist-esm/config/Options/shape/polar.js +1 -1
  162. package/dist-esm/config/Options/shape/radar.js +1 -1
  163. package/dist-esm/config/Options/shape/scatter.js +1 -1
  164. package/dist-esm/config/Options/shape/spline.js +1 -1
  165. package/dist-esm/config/Options/shape/treemap.js +1 -1
  166. package/dist-esm/config/Store/Element.js +1 -1
  167. package/dist-esm/config/Store/State.js +4 -1
  168. package/dist-esm/config/Store/Store.js +1 -1
  169. package/dist-esm/config/classes.js +1 -1
  170. package/dist-esm/config/config.js +1 -1
  171. package/dist-esm/config/const.js +1 -1
  172. package/dist-esm/config/resolver/axis.core.js +1 -1
  173. package/dist-esm/config/resolver/axis.js +1 -1
  174. package/dist-esm/config/resolver/canvas.js +17 -12
  175. package/dist-esm/config/resolver/canvasShape.js +1 -1
  176. package/dist-esm/config/resolver/category.js +1 -1
  177. package/dist-esm/config/resolver/export.js +1 -1
  178. package/dist-esm/config/resolver/flow.js +1 -1
  179. package/dist-esm/config/resolver/grid.js +1 -1
  180. package/dist-esm/config/resolver/interaction/selection.js +1 -1
  181. package/dist-esm/config/resolver/interaction/subchart.js +1 -1
  182. package/dist-esm/config/resolver/interaction/zoom.js +1 -1
  183. package/dist-esm/config/resolver/regions.js +1 -1
  184. package/dist-esm/config/resolver/shape/arc.helpers.js +1 -1
  185. package/dist-esm/config/resolver/shape/area.js +1 -1
  186. package/dist-esm/config/resolver/shape/axis.helpers.js +1 -1
  187. package/dist-esm/config/resolver/shape/bar.js +1 -1
  188. package/dist-esm/config/resolver/shape/bubble.js +1 -1
  189. package/dist-esm/config/resolver/shape/candlestick.js +1 -1
  190. package/dist-esm/config/resolver/shape/donut.js +1 -1
  191. package/dist-esm/config/resolver/shape/funnel.js +1 -1
  192. package/dist-esm/config/resolver/shape/gauge.js +1 -1
  193. package/dist-esm/config/resolver/shape/line.js +1 -1
  194. package/dist-esm/config/resolver/shape/pie.js +1 -1
  195. package/dist-esm/config/resolver/shape/polar.js +1 -1
  196. package/dist-esm/config/resolver/shape/radar.js +1 -1
  197. package/dist-esm/config/resolver/shape/scatter.js +1 -1
  198. package/dist-esm/config/resolver/shape/treemap.js +1 -1
  199. package/dist-esm/core.js +5 -4
  200. package/dist-esm/index.canvas.js +1 -1
  201. package/dist-esm/index.esm.js +1 -1
  202. package/dist-esm/module/Cache.js +2 -2
  203. package/dist-esm/module/browser.js +2 -2
  204. package/dist-esm/module/dsv.js +1 -1
  205. package/dist-esm/module/error.js +1 -1
  206. package/dist-esm/module/generator.js +16 -3
  207. package/dist-esm/module/sanitize.js +1 -1
  208. package/dist-esm/module/util/brush.js +1 -1
  209. package/dist-esm/module/util/dom.js +9 -7
  210. package/dist-esm/module/util/object.js +1 -1
  211. package/dist-esm/module/util/type-checks.js +1 -1
  212. package/dist-esm/module/worker.js +1 -1
  213. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  214. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -40
  215. package/dist-esm/plugin/billboardjs-plugin-stanford.js +4 -41
  216. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  217. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  218. package/dist-esm/react/index.js +1 -1
  219. package/package.json +36 -36
  220. package/src/Chart/api/chart.ts +1 -0
  221. package/src/Chart/api/data.ts +5 -3
  222. package/src/ChartInternal/ChartInternal.ts +72 -25
  223. package/src/ChartInternal/data/data.ts +68 -34
  224. package/src/ChartInternal/internals/redraw.ts +8 -1
  225. package/src/ChartInternal/internals/size.ts +99 -2
  226. package/src/config/Options/axis/y2.ts +0 -13
  227. package/src/config/Options/common/main.ts +43 -1
  228. package/src/config/Store/State.ts +4 -0
  229. package/src/config/const.ts +4 -0
  230. package/src/config/resolver/canvas.ts +3 -0
  231. package/src/module/Cache.ts +1 -1
  232. package/src/module/generator.ts +27 -2
  233. package/types/options.d.ts +38 -0
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.1.0-next.2
8
+ * @version 4.1.0
9
9
  *
10
10
  * All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
11
11
  * - @types/d3-selection ^3.0.11
@@ -21,41 +21,41 @@
21
21
  * - d3-time-format ^4.1.0
22
22
  * - d3-transition ^3.0.1
23
23
  * - d3-zoom ^3.0.0
24
- */(function(bo,rr){if(typeof exports=="object"&&typeof module=="object")module.exports=rr();else if(typeof define=="function"&&define.amd)define([],rr);else{var So=rr();for(var T in So)(typeof exports=="object"?exports:bo)[T]=So[T]}})(this,function(){return(function(){"use strict";var wu=[(function(T,P,a){a(1),a(100),a(101),a(102),a(103),a(104),a(105),a(106),a(107),a(108),a(109),a(110),a(111),a(112),a(113),a(114),a(115),a(116),a(129),a(130),a(132),a(142),a(143),a(144),a(146),a(150),a(153),a(155),a(157),a(158),a(159),a(160),a(162),a(163),a(165),a(166),a(168),a(172),a(173),a(174),a(175),a(180),a(181),a(183),a(184),a(185),a(186),a(190),a(191),a(192),a(193),a(194),a(199),a(201),a(202),a(203),a(206),a(207),a(208),a(209),a(210),a(211),a(222),a(224),a(225),a(227),a(228),a(231),a(234),a(240),a(241),a(242),a(243),a(244),a(245),a(249),a(250),a(252),a(253),a(255),a(256),a(258),a(259),a(260),a(261),a(262),a(265),a(266),a(272),a(273),a(274),a(275),a(277),a(278),a(279),a(280),a(281),a(282),a(283),a(284),a(285),a(286),a(94),a(288),a(289),a(296),a(298),a(299),a(300),a(302),a(303),a(304),a(305),a(306),a(308),a(309),a(310),a(311),a(312),a(313),a(315),a(316),a(317),a(318),a(319),a(320),a(321),a(322),a(323),a(327),a(328),a(330),a(332),a(333),a(334),a(335),a(336),a(338),a(340),a(341),a(342),a(343),a(345),a(346),a(348),a(349),a(350),a(351),a(353),a(354),a(355),a(356),a(357),a(358),a(359),a(360),a(361),a(363),a(364),a(365),a(366),a(367),a(368),a(369),a(370),a(371),a(372),a(373),a(375),a(376),a(377),a(378),a(402),a(403),a(404),a(405),a(406),a(407),a(414),a(415),a(416),a(417),a(418),a(419),a(420),a(422),a(423),a(424),a(425),a(426),a(427),a(428),a(429),a(430),a(431),a(439),a(441),a(442),a(444),a(445),a(446),a(447),a(448),a(450),a(460),a(462),a(464),a(466),a(468),a(471),a(473),a(474),a(476),a(479),a(480),a(481),a(482),a(483),a(487),a(488),a(490),a(491),a(492),a(493),a(495),a(496),a(497),a(498),a(499),a(500),a(501),a(503),a(506),a(509),a(512),a(513),a(514),a(515),a(516),a(517),a(518),a(519),a(520),a(521),a(522),a(523),a(524),a(532),a(533),a(534),a(535),a(536),a(537),a(538),a(539),a(540),a(541),a(542),a(543),a(544),a(546),a(547),a(548),a(549),a(550),a(551),a(552),a(553),a(554),a(555),a(556),a(557),a(558),a(559),a(560),a(561),a(562),a(563),a(564),a(565),a(566),a(567),a(568),a(569),a(570),a(571),a(572),a(577),a(579),a(581),a(582),a(583),a(584),a(585),a(588),a(590),a(593),a(595),a(596),a(597),a(600),a(601),a(603),a(604),a(605),a(609),a(610),a(611),a(612),a(615),a(620),a(621),a(622),a(623),a(624),a(625),a(626),a(80)}),(function(T,P,a){a(2),a(91),a(93),a(94),a(99)}),(function(T,P,a){var g=a(3),v=a(4),p=a(8),x=a(14),y=a(36),b=a(6),A=a(26),I=a(7),R=a(38),O=a(24),M=a(46),D=a(12),L=a(18),B=a(68),F=a(11),k=a(71),W=a(73),U=a(57),X=a(75),j=a(66),H=a(5),Y=a(44),Z=a(72),_=a(10),K=a(47),tt=a(77),nt=a(34),at=a(53),it=a(54),ot=a(40),ut=a(33),ht=a(78),gt=a(79),yt=a(81),Et=a(82),bt=a(51),Ft=a(83).forEach,Lt=at("hidden"),Pt="Symbol",mt="prototype",xt=bt.set,wt=bt.getterFor(Pt),Bt=Object[mt],Jt=v.Symbol,Ot=Jt&&Jt[mt],jt=v.RangeError,ie=v.TypeError,me=v.QObject,se=H.f,he=Y.f,Oe=X.f,Me=_.f,Re=x([].push),ge=nt("symbols"),Te=nt("op-symbols"),Ve=nt("wks"),Ht=!me||!me[mt]||!me[mt].findChild,ne=function(Xt,Mt,$t){var _t=se(Bt,Mt);return _t&&delete Bt[Mt],he(Xt,Mt,$t),_t&&Xt!==Bt&&he(Bt,Mt,_t),Xt},ae=b&&I(function(){return k(he({},"a",{get:function(){return he(this,"a",{value:7}).a}})).a!==7})?ne:he,rn=function(Xt,Mt){var $t=ge[Xt]=k(Ot);return xt($t,{type:Pt,tag:Xt,description:Mt}),b||($t.description=Mt),$t},Yt=function(Mt,$t,_t){Mt===Bt&&Yt(Te,$t,_t),M(Mt);var Nt=L($t);return M(_t),R(ge,Nt)?(("enumerable"in _t?!_t.enumerable:!R(Mt,Nt)||R(Mt,Lt)&&Mt[Lt][Nt])?(R(Mt,Lt)||he(Mt,Lt,F(1,k(null))),Mt[Lt][Nt]=!0):(R(Mt,Lt)&&Mt[Lt][Nt]&&(Mt[Lt][Nt]=!1),_t=k(_t,{enumerable:F(0,!1)})),ae(Mt,Nt,_t)):he(Mt,Nt,_t)},ee=function(Mt,$t){M(Mt);var _t=D($t),Nt=W(_t).concat(It(_t));return Ft(Nt,function(Se){(!b||p(ce,_t,Se))&&Yt(Mt,Se,_t[Se])}),Mt},pe=function(Mt,$t){return $t===void 0?k(Mt):ee(k(Mt),$t)},ce=function(Mt){var $t=L(Mt),_t=p(Me,this,$t);return this===Bt&&R(ge,$t)&&!R(Te,$t)?!1:_t||!R(this,$t)||!R(ge,$t)||R(this,Lt)&&this[Lt][$t]?_t:!0},Pe=function(Mt,$t){var _t=D(Mt),Nt=L($t);if(!(_t===Bt&&R(ge,Nt)&&!R(Te,Nt))){var Se=se(_t,Nt);return Se&&R(ge,Nt)&&!(R(_t,Lt)&&_t[Lt][Nt])&&(Se.enumerable=!0),Se}},ln=function(Mt){var $t=Oe(D(Mt)),_t=[];return Ft($t,function(Nt){!R(ge,Nt)&&!R(it,Nt)&&Re(_t,Nt)}),_t},It=function(Xt){var Mt=Xt===Bt,$t=Oe(Mt?Te:D(Xt)),_t=[];return Ft($t,function(Nt){R(ge,Nt)&&(!Mt||R(Bt,Nt))&&Re(_t,ge[Nt])}),_t};A||(Jt=function(){if(O(Ot,this))throw new ie("Symbol is not a constructor");var Mt=!arguments.length||arguments[0]===void 0?void 0:B(arguments[0]),$t=ot(Mt),_t=function(Nt){var Se=this===void 0?v:this;Se===Bt&&p(_t,Te,Nt),R(Se,Lt)&&R(Se[Lt],$t)&&(Se[Lt][$t]=!1);var He=F(1,Nt);try{ae(Se,$t,He)}catch(Wt){if(!(Wt instanceof jt))throw Wt;ne(Se,$t,He)}};return b&&Ht&&ae(Bt,$t,{configurable:!0,set:_t}),rn($t,Mt)},Ot=Jt[mt],K(Ot,"toString",function(){return wt(this).tag}),K(Jt,"withoutSetter",function(Xt){return rn(ot(Xt),Xt)}),_.f=ce,Y.f=Yt,Z.f=ee,H.f=Pe,U.f=X.f=ln,j.f=It,ht.f=function(Xt){return rn(ut(Xt),Xt)},b&&(tt(Ot,"description",{configurable:!0,get:function(){return wt(this).description}}),y||K(Bt,"propertyIsEnumerable",ce,{unsafe:!0}))),g({global:!0,constructor:!0,wrap:!0,forced:!A,sham:!A},{Symbol:Jt}),Ft(W(Ve),function(Xt){gt(Xt)}),g({target:Pt,stat:!0,forced:!A},{useSetter:function(){Ht=!0},useSimple:function(){Ht=!1}}),g({target:"Object",stat:!0,forced:!A,sham:!b},{create:pe,defineProperty:Yt,defineProperties:ee,getOwnPropertyDescriptor:Pe}),g({target:"Object",stat:!0,forced:!A},{getOwnPropertyNames:ln}),yt(),Et(Jt,Pt),it[Lt]=!0}),(function(T,P,a){var g=a(4),v=a(5).f,p=a(43),x=a(47),y=a(37),b=a(55),A=a(67);T.exports=function(I,R){var O=I.target,M=I.global,D=I.stat,L,B,F,k,W,U;if(M?B=g:D?B=g[O]||y(O,{}):B=g[O]&&g[O].prototype,B)for(F in R){if(W=R[F],I.dontCallGetSet?(U=v(B,F),k=U&&U.value):k=B[F],L=A(M?F:O+(D?".":"#")+F,I.forced),!L&&k!==void 0){if(typeof W==typeof k)continue;b(W,k)}(I.sham||k&&k.sham)&&p(W,"sham",!0),x(B,F,W,I)}}}),(function(T){var P=function(a){return a&&a.Math===Math&&a};T.exports=P(typeof globalThis=="object"&&globalThis)||P(typeof window=="object"&&window)||P(typeof self=="object"&&self)||P(typeof global=="object"&&global)||P(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()}),(function(T,P,a){var g=a(6),v=a(8),p=a(10),x=a(11),y=a(12),b=a(18),A=a(38),I=a(41),R=Object.getOwnPropertyDescriptor;P.f=g?R:function(M,D){if(M=y(M),D=b(D),I)try{return R(M,D)}catch(L){}if(A(M,D))return x(!v(p.f,M,D),M[D])}}),(function(T,P,a){var g=a(7);T.exports=!g(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}),(function(T){T.exports=function(P){try{return!!P()}catch(a){return!0}}}),(function(T,P,a){var g=a(9),v=Function.prototype.call;T.exports=g?v.bind(v):function(){return v.apply(v,arguments)}}),(function(T,P,a){var g=a(7);T.exports=!g(function(){var v=function(){}.bind();return typeof v!="function"||v.hasOwnProperty("prototype")})}),(function(T,P){var a={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,v=g&&!a.call({1:2},1);P.f=v?function(x){var y=g(this,x);return!!y&&y.enumerable}:a}),(function(T){T.exports=function(P,a){return{enumerable:!(P&1),configurable:!(P&2),writable:!(P&4),value:a}}}),(function(T,P,a){var g=a(13),v=a(16);T.exports=function(p){return g(v(p))}}),(function(T,P,a){var g=a(14),v=a(7),p=a(15),x=Object,y=g("".split);T.exports=v(function(){return!x("z").propertyIsEnumerable(0)})?function(b){return p(b)==="String"?y(b,""):x(b)}:x}),(function(T,P,a){var g=a(9),v=Function.prototype,p=v.call,x=g&&v.bind.bind(p,p);T.exports=g?x:function(y){return function(){return p.apply(y,arguments)}}}),(function(T,P,a){var g=a(14),v=g({}.toString),p=g("".slice);T.exports=function(x){return p(v(x),8,-1)}}),(function(T,P,a){var g=a(17),v=TypeError;T.exports=function(p){if(g(p))throw new v("Can't call method on "+p);return p}}),(function(T){T.exports=function(P){return P==null}}),(function(T,P,a){var g=a(19),v=a(22);T.exports=function(p){var x=g(p,"string");return v(x)?x:x+""}}),(function(T,P,a){var g=a(8),v=a(20),p=a(22),x=a(29),y=a(32),b=a(33),A=TypeError,I=b("toPrimitive");T.exports=function(R,O){if(!v(R)||p(R))return R;var M=x(R,I),D;if(M){if(O===void 0&&(O="default"),D=g(M,R,O),!v(D)||p(D))return D;throw new A("Can't convert object to primitive value")}return O===void 0&&(O="number"),y(R,O)}}),(function(T,P,a){var g=a(21);T.exports=function(v){return typeof v=="object"?v!==null:g(v)}}),(function(T){var P=typeof document=="object"&&document.all;T.exports=typeof P=="undefined"&&P!==void 0?function(a){return typeof a=="function"||a===P}:function(a){return typeof a=="function"}}),(function(T,P,a){var g=a(23),v=a(21),p=a(24),x=a(25),y=Object;T.exports=x?function(b){return typeof b=="symbol"}:function(b){var A=g("Symbol");return v(A)&&p(A.prototype,y(b))}}),(function(T,P,a){var g=a(4),v=a(21),p=function(x){return v(x)?x:void 0};T.exports=function(x,y){return arguments.length<2?p(g[x]):g[x]&&g[x][y]}}),(function(T,P,a){var g=a(14);T.exports=g({}.isPrototypeOf)}),(function(T,P,a){var g=a(26);T.exports=g&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}),(function(T,P,a){var g=a(27),v=a(7),p=a(4),x=p.String;T.exports=!!Object.getOwnPropertySymbols&&!v(function(){var y=Symbol("symbol detection");return!x(y)||!(Object(y)instanceof Symbol)||!Symbol.sham&&g&&g<41})}),(function(T,P,a){var g=a(4),v=a(28),p=g.process,x=g.Deno,y=p&&p.versions||x&&x.version,b=y&&y.v8,A,I;b&&(A=b.split("."),I=A[0]>0&&A[0]<4?1:+(A[0]+A[1])),!I&&v&&(A=v.match(/Edge\/(\d+)/),(!A||A[1]>=74)&&(A=v.match(/Chrome\/(\d+)/),A&&(I=+A[1]))),T.exports=I}),(function(T,P,a){var g=a(4),v=g.navigator,p=v&&v.userAgent;T.exports=p?String(p):""}),(function(T,P,a){var g=a(30),v=a(17);T.exports=function(p,x){var y=p[x];return v(y)?void 0:g(y)}}),(function(T,P,a){var g=a(21),v=a(31),p=TypeError;T.exports=function(x){if(g(x))return x;throw new p(v(x)+" is not a function")}}),(function(T){var P=String;T.exports=function(a){try{return P(a)}catch(g){return"Object"}}}),(function(T,P,a){var g=a(8),v=a(21),p=a(20),x=TypeError;T.exports=function(y,b){var A,I;if(b==="string"&&v(A=y.toString)&&!p(I=g(A,y))||v(A=y.valueOf)&&!p(I=g(A,y))||b!=="string"&&v(A=y.toString)&&!p(I=g(A,y)))return I;throw new x("Can't convert object to primitive value")}}),(function(T,P,a){var g=a(4),v=a(34),p=a(38),x=a(40),y=a(26),b=a(25),A=g.Symbol,I=v("wks"),R=b?A.for||A:A&&A.withoutSetter||x;T.exports=function(O){return p(I,O)||(I[O]=y&&p(A,O)?A[O]:R("Symbol."+O)),I[O]}}),(function(T,P,a){var g=a(35);T.exports=function(v,p){return g[v]||(g[v]=p||{})}}),(function(T,P,a){var g=a(36),v=a(4),p=a(37),x="__core-js_shared__",y=T.exports=v[x]||p(x,{});(y.versions||(y.versions=[])).push({version:"3.49.0",mode:g?"pure":"global",copyright:"\xA9 2013\u20132025 Denis Pushkarev (zloirock.ru), 2025\u20132026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),(function(T){T.exports=!1}),(function(T,P,a){var g=a(4),v=Object.defineProperty;T.exports=function(p,x){try{v(g,p,{value:x,configurable:!0,writable:!0})}catch(y){g[p]=x}return x}}),(function(T,P,a){var g=a(14),v=a(39),p=g({}.hasOwnProperty);T.exports=Object.hasOwn||function(y,b){return p(v(y),b)}}),(function(T,P,a){var g=a(16),v=Object;T.exports=function(p){return v(g(p))}}),(function(T,P,a){var g=a(14),v=0,p=Math.random(),x=g(1.1.toString);T.exports=function(y){return"Symbol("+(y===void 0?"":y)+")_"+x(++v+p,36)}}),(function(T,P,a){var g=a(6),v=a(7),p=a(42);T.exports=!g&&!v(function(){return Object.defineProperty(p("div"),"a",{get:function(){return 7}}).a!==7})}),(function(T,P,a){var g=a(4),v=a(20),p=g.document,x=v(p)&&v(p.createElement);T.exports=function(y){return x?p.createElement(y):{}}}),(function(T,P,a){var g=a(6),v=a(44),p=a(11);T.exports=g?function(x,y,b){return v.f(x,y,p(1,b))}:function(x,y,b){return x[y]=b,x}}),(function(T,P,a){var g=a(6),v=a(41),p=a(45),x=a(46),y=a(18),b=TypeError,A=Object.defineProperty,I=Object.getOwnPropertyDescriptor,R="enumerable",O="configurable",M="writable";P.f=g?p?function(L,B,F){if(x(L),B=y(B),x(F),typeof L=="function"&&B==="prototype"&&"value"in F&&M in F&&!F[M]){var k=I(L,B);k&&k[M]&&(L[B]=F.value,F={configurable:O in F?F[O]:k[O],enumerable:R in F?F[R]:k[R],writable:!1})}return A(L,B,F)}:A:function(L,B,F){if(x(L),B=y(B),x(F),v)try{return A(L,B,F)}catch(k){}if("get"in F||"set"in F)throw new b("Accessors not supported");return"value"in F&&(L[B]=F.value),L}}),(function(T,P,a){var g=a(6),v=a(7);T.exports=g&&v(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})}),(function(T,P,a){var g=a(20),v=String,p=TypeError;T.exports=function(x){if(g(x))return x;throw new p(v(x)+" is not an object")}}),(function(T,P,a){var g=a(21),v=a(44),p=a(48),x=a(37);T.exports=function(y,b,A,I){I||(I={});var R=I.enumerable,O=I.name!==void 0?I.name:b;if(g(A)&&p(A,O,I),I.global)R?y[b]=A:x(b,A);else{try{I.unsafe?y[b]&&(R=!0):delete y[b]}catch(M){}R?y[b]=A:v.f(y,b,{value:A,enumerable:!1,configurable:!I.nonConfigurable,writable:!I.nonWritable})}return y}}),(function(T,P,a){var g=a(14),v=a(7),p=a(21),x=a(38),y=a(6),b=a(49).CONFIGURABLE,A=a(50),I=a(51),R=I.enforce,O=I.get,M=String,D=Object.defineProperty,L=g("".slice),B=g("".replace),F=g([].join),k=y&&!v(function(){return D(function(){},"length",{value:8}).length!==8}),W=String(String).split("String"),U=T.exports=function(X,j,H){L(M(j),0,7)==="Symbol("&&(j="["+B(M(j),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),H&&H.getter&&(j="get "+j),H&&H.setter&&(j="set "+j),(!x(X,"name")||b&&X.name!==j)&&(y?D(X,"name",{value:j,configurable:!0}):X.name=j),k&&H&&x(H,"arity")&&X.length!==H.arity&&D(X,"length",{value:H.arity});try{H&&x(H,"constructor")&&H.constructor?y&&D(X,"prototype",{writable:!1}):X.prototype&&(X.prototype=void 0)}catch(Z){}var Y=R(X);return x(Y,"source")||(Y.source=F(W,typeof j=="string"?j:"")),X};Function.prototype.toString=U(function(){return p(this)&&O(this).source||A(this)},"toString")}),(function(T,P,a){var g=a(6),v=a(38),p=Function.prototype,x=g&&Object.getOwnPropertyDescriptor,y=v(p,"name"),b=y&&function(){}.name==="something",A=y&&(!g||g&&x(p,"name").configurable);T.exports={EXISTS:y,PROPER:b,CONFIGURABLE:A}}),(function(T,P,a){var g=a(14),v=a(21),p=a(35),x=g(Function.toString);v(p.inspectSource)||(p.inspectSource=function(y){return x(y)}),T.exports=p.inspectSource}),(function(T,P,a){var g=a(52),v=a(4),p=a(20),x=a(43),y=a(38),b=a(35),A=a(53),I=a(54),R="Object already initialized",O=v.TypeError,M=v.WeakMap,D,L,B,F=function(X){return B(X)?L(X):D(X,{})},k=function(X){return function(j){var H;if(!p(j)||(H=L(j)).type!==X)throw new O("Incompatible receiver, "+X+" required");return H}};if(g||b.state){var W=b.state||(b.state=new M);W.get=W.get,W.has=W.has,W.set=W.set,D=function(X,j){if(W.has(X))throw new O(R);return j.facade=X,W.set(X,j),j},L=function(X){return W.get(X)||{}},B=function(X){return W.has(X)}}else{var U=A("state");I[U]=!0,D=function(X,j){if(y(X,U))throw new O(R);return j.facade=X,x(X,U,j),j},L=function(X){return y(X,U)?X[U]:{}},B=function(X){return y(X,U)}}T.exports={set:D,get:L,has:B,enforce:F,getterFor:k}}),(function(T,P,a){var g=a(4),v=a(21),p=g.WeakMap;T.exports=v(p)&&/native code/.test(String(p))}),(function(T,P,a){var g=a(34),v=a(40),p=g("keys");T.exports=function(x){return p[x]||(p[x]=v(x))}}),(function(T){T.exports={}}),(function(T,P,a){var g=a(38),v=a(56),p=a(5),x=a(44);T.exports=function(y,b,A){for(var I=v(b),R=x.f,O=p.f,M=0;M<I.length;M++){var D=I[M];!g(y,D)&&!(A&&g(A,D))&&R(y,D,O(b,D))}}}),(function(T,P,a){var g=a(23),v=a(14),p=a(57),x=a(66),y=a(46),b=v([].concat);T.exports=g("Reflect","ownKeys")||function(I){var R=p.f(y(I)),O=x.f;return O?b(R,O(I)):R}}),(function(T,P,a){var g=a(58),v=a(65),p=v.concat("length","prototype");P.f=Object.getOwnPropertyNames||function(y){return g(y,p)}}),(function(T,P,a){var g=a(14),v=a(38),p=a(12),x=a(59).indexOf,y=a(54),b=g([].push);T.exports=function(A,I){var R=p(A),O=0,M=[],D;for(D in R)!v(y,D)&&v(R,D)&&b(M,D);for(;I.length>O;)v(R,D=I[O++])&&(~x(M,D)||b(M,D));return M}}),(function(T,P,a){var g=a(12),v=a(60),p=a(63),x=function(y){return function(b,A,I){var R=g(b),O=p(R);if(O===0)return!y&&-1;var M=v(I,O),D;if(y&&A!==A){for(;O>M;)if(D=R[M++],D!==D)return!0}else for(;O>M;M++)if((y||M in R)&&R[M]===A)return y||M||0;return!y&&-1}};T.exports={includes:x(!0),indexOf:x(!1)}}),(function(T,P,a){var g=a(61),v=Math.max,p=Math.min;T.exports=function(x,y){var b=g(x);return b<0?v(b+y,0):p(b,y)}}),(function(T,P,a){var g=a(62);T.exports=function(v){var p=+v;return p!==p||p===0?0:g(p)}}),(function(T){var P=Math.ceil,a=Math.floor;T.exports=Math.trunc||function(v){var p=+v;return(p>0?a:P)(p)}}),(function(T,P,a){var g=a(64);T.exports=function(v){return g(v.length)}}),(function(T,P,a){var g=a(61),v=Math.min;T.exports=function(p){var x=g(p);return x>0?v(x,9007199254740991):0}}),(function(T){T.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),(function(T,P){P.f=Object.getOwnPropertySymbols}),(function(T,P,a){var g=a(7),v=a(21),p=/#|\.prototype\./,x=function(R,O){var M=b[y(R)];return M===I?!0:M===A?!1:v(O)?g(O):!!O},y=x.normalize=function(R){return String(R).replace(p,".").toLowerCase()},b=x.data={},A=x.NATIVE="N",I=x.POLYFILL="P";T.exports=x}),(function(T,P,a){var g=a(69),v=String;T.exports=function(p){if(g(p)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return v(p)}}),(function(T,P,a){var g=a(70),v=a(21),p=a(15),x=a(33),y=x("toStringTag"),b=Object,A=p((function(){return arguments})())==="Arguments",I=function(R,O){try{return R[O]}catch(M){}};T.exports=g?p:function(R){var O,M,D;return R===void 0?"Undefined":R===null?"Null":typeof(M=I(O=b(R),y))=="string"?M:A?p(O):(D=p(O))==="Object"&&v(O.callee)?"Arguments":D}}),(function(T,P,a){var g=a(33),v=g("toStringTag"),p={};p[v]="z",T.exports=String(p)==="[object z]"}),(function(T,P,a){var g=a(46),v=a(72),p=a(65),x=a(54),y=a(74),b=a(42),A=a(53),I=">",R="<",O="prototype",M="script",D=A("IE_PROTO"),L=function(){},B=function(X){return R+M+I+X+R+"/"+M+I},F=function(X){X.write(B("")),X.close();var j=X.parentWindow.Object;return X=null,j},k=function(){var X=b("iframe"),j="java"+M+":",H;return X.style.display="none",y.appendChild(X),X.src=String(j),H=X.contentWindow.document,H.open(),H.write(B("document.F=Object")),H.close(),H.F},W,U=function(){try{W=new ActiveXObject("htmlfile")}catch(j){}U=typeof document!="undefined"?document.domain&&W?F(W):k():F(W);for(var X=p.length;X--;)delete U[O][p[X]];return U()};x[D]=!0,T.exports=Object.create||function(j,H){var Y;return j!==null?(L[O]=g(j),Y=new L,L[O]=null,Y[D]=j):Y=U(),H===void 0?Y:v.f(Y,H)}}),(function(T,P,a){var g=a(6),v=a(45),p=a(44),x=a(46),y=a(12),b=a(73);P.f=g&&!v?Object.defineProperties:function(I,R){x(I);for(var O=y(R),M=b(R),D=M.length,L=0,B;D>L;)p.f(I,B=M[L++],O[B]);return I}}),(function(T,P,a){var g=a(58),v=a(65);T.exports=Object.keys||function(x){return g(x,v)}}),(function(T,P,a){var g=a(23);T.exports=g("document","documentElement")}),(function(T,P,a){var g=a(15),v=a(12),p=a(57).f,x=a(76),y=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],b=function(A){try{return p(A)}catch(I){return x(y)}};T.exports.f=function(I){return y&&g(I)==="Window"?b(I):p(v(I))}}),(function(T,P,a){var g=a(14);T.exports=g([].slice)}),(function(T,P,a){var g=a(48),v=a(44);T.exports=function(p,x,y){return y.get&&g(y.get,x,{getter:!0}),y.set&&g(y.set,x,{setter:!0}),v.f(p,x,y)}}),(function(T,P,a){var g=a(33);P.f=g}),(function(T,P,a){var g=a(80),v=a(38),p=a(78),x=a(44).f;T.exports=function(y){var b=g.Symbol||(g.Symbol={});v(b,y)||x(b,y,{value:p.f(y)})}}),(function(T,P,a){var g=a(4);T.exports=g}),(function(T,P,a){var g=a(8),v=a(23),p=a(33),x=a(47);T.exports=function(){var y=v("Symbol"),b=y&&y.prototype,A=b&&b.valueOf,I=p("toPrimitive");b&&!b[I]&&x(b,I,function(R){return g(A,this)},{arity:1})}}),(function(T,P,a){var g=a(44).f,v=a(38),p=a(33),x=p("toStringTag");T.exports=function(y,b,A){y&&!A&&(y=y.prototype),y&&!v(y,x)&&g(y,x,{configurable:!0,value:b})}}),(function(T,P,a){var g=a(84),v=a(13),p=a(39),x=a(63),y=a(86),b=a(90),A=function(I){var R=I===1,O=I===2,M=I===3,D=I===4,L=I===6,B=I===7,F=I===5||L;return function(k,W,U){for(var X=p(k),j=v(X),H=x(j),Y=g(W,U),Z=0,_=0,K=R?y(k,H):O||B?y(k,0):void 0,tt,nt;H>Z;Z++)if((F||Z in j)&&(tt=j[Z],nt=Y(tt,Z,X),I))if(R)b(K,Z,nt);else if(nt)switch(I){case 3:return!0;case 5:return tt;case 6:return Z;case 2:b(K,_++,tt)}else switch(I){case 4:return!1;case 7:b(K,_++,tt)}return L?-1:M||D?D:K}};T.exports={forEach:A(0),map:A(1),filter:A(2),some:A(3),every:A(4),find:A(5),findIndex:A(6),filterReject:A(7)}}),(function(T,P,a){var g=a(85),v=a(30),p=a(9),x=g(g.bind);T.exports=function(y,b){return v(y),b===void 0?y:p?x(y,b):function(){return y.apply(b,arguments)}}}),(function(T,P,a){var g=a(15),v=a(14);T.exports=function(p){if(g(p)==="Function")return v(p)}}),(function(T,P,a){var g=a(87);T.exports=function(v,p){return new(g(v))(p===0?0:p)}}),(function(T,P,a){var g=a(88),v=a(89),p=a(20),x=a(33),y=x("species"),b=Array;T.exports=function(A){var I;return g(A)&&(I=A.constructor,v(I)&&(I===b||g(I.prototype))?I=void 0:p(I)&&(I=I[y],I===null&&(I=void 0))),I===void 0?b:I}}),(function(T,P,a){var g=a(15);T.exports=Array.isArray||function(p){return g(p)==="Array"}}),(function(T,P,a){var g=a(14),v=a(7),p=a(21),x=a(69),y=a(23),b=a(50),A=function(){},I=y("Reflect","construct"),R=/^\s*(?:class|function)\b/,O=g(R.exec),M=!R.test(A),D=function(F){if(!p(F))return!1;try{return I(A,[],F),!0}catch(k){return!1}},L=function(F){if(!p(F))return!1;switch(x(F)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return M||!!O(R,b(F))}catch(k){return!0}};L.sham=!0,T.exports=!I||v(function(){var B;return D(D.call)||!D(Object)||!D(function(){B=!0})||B})?L:D}),(function(T,P,a){var g=a(6),v=a(44),p=a(11);T.exports=function(x,y,b){g?v.f(x,y,p(0,b)):x[y]=b}}),(function(T,P,a){var g=a(3),v=a(23),p=a(38),x=a(68),y=a(34),b=a(92),A=y("string-to-symbol-registry"),I=y("symbol-to-string-registry");g({target:"Symbol",stat:!0,forced:!b},{for:function(R){var O=x(R);if(p(A,O))return A[O];var M=v("Symbol")(O);return A[O]=M,I[M]=O,M}})}),(function(T,P,a){var g=a(26);T.exports=g&&!!Symbol.for&&!!Symbol.keyFor}),(function(T,P,a){var g=a(3),v=a(38),p=a(22),x=a(31),y=a(34),b=a(92),A=y("symbol-to-string-registry");g({target:"Symbol",stat:!0,forced:!b},{keyFor:function(R){if(!p(R))throw new TypeError(x(R)+" is not a symbol");if(v(A,R))return A[R]}})}),(function(T,P,a){var g=a(3),v=a(23),p=a(95),x=a(8),y=a(14),b=a(7),A=a(88),I=a(21),R=a(96),O=a(22),M=a(15),D=a(68),L=a(76),B=a(97),F=a(40),k=a(26),W=a(98),U=String,X=v("JSON","stringify"),j=y(/./.exec),H=y("".charAt),Y=y("".charCodeAt),Z=y("".replace),_=y("".slice),K=y([].push),tt=y(1.1.toString),nt=/[\uD800-\uDFFF]/g,at=/^[\uD800-\uDBFF]$/,it=/^[\uDC00-\uDFFF]$/,ot=F(),ut=ot.length,ht=!k||b(function(){var Ft=v("Symbol")("stringify detection");return X([Ft])!=="[null]"||X({a:Ft})!=="{}"||X(Object(Ft))!=="{}"}),gt=b(function(){return X("\uDF06\uD834")!=='"\\udf06\\ud834"'||X("\uDEAD")!=='"\\udead"'}),yt=ht?function(Ft,Lt){var Pt=L(arguments),mt=bt(Lt);if(!(!I(mt)&&(Ft===void 0||O(Ft))))return Pt[1]=function(xt,wt){if(I(mt)&&(wt=x(mt,this,U(xt),wt)),!O(wt))return wt},p(X,null,Pt)}:X,Et=function(Ft,Lt,Pt){var mt=H(Pt,Lt-1),xt=H(Pt,Lt+1);return j(at,Ft)&&!j(it,xt)||j(it,Ft)&&!j(at,mt)?"\\u"+tt(Y(Ft,0),16):Ft},bt=function(Ft){if(I(Ft))return Ft;if(A(Ft)){for(var Lt=Ft.length,Pt=[],mt=0;mt<Lt;mt++){var xt=Ft[mt];typeof xt=="string"?K(Pt,xt):(typeof xt=="number"||M(xt)==="Number"||M(xt)==="String")&&K(Pt,D(xt))}var wt=Pt.length,Bt=!0;return function(Jt,Ot){if(Bt)return Bt=!1,Ot;if(A(this))return Ot;for(var jt=0;jt<wt;jt++)if(Pt[jt]===Jt)return Ot}}};X&&g({target:"JSON",stat:!0,arity:3,forced:ht||gt||!W},{stringify:function(Lt,Pt,mt){var xt=bt(Pt),wt=[],Bt=yt(Lt,function(he,Oe){var Me=I(xt)?x(xt,this,U(he),Oe):Oe;return!W&&R(Me)?ot+(K(wt,Me.rawJSON)-1):Me},mt);if(typeof Bt!="string"||(gt&&(Bt=Z(Bt,nt,Et)),W))return Bt;for(var Jt="",Ot=Bt.length,jt=0;jt<Ot;jt++){var ie=H(Bt,jt);if(ie==='"'){var me=B(Bt,++jt).end-1,se=_(Bt,jt,me);Jt+=_(se,0,ut)===ot?wt[_(se,ut)]:'"'+se+'"',jt=me}else Jt+=ie}return Jt}})}),(function(T,P,a){var g=a(9),v=Function.prototype,p=v.apply,x=v.call;T.exports=typeof Reflect=="object"&&Reflect.apply||(g?x.bind(p):function(){return x.apply(p,arguments)})}),(function(T,P,a){var g=a(20),v=a(51).get;T.exports=function(x){if(!g(x))return!1;var y=v(x);return!!y&&y.type==="RawJSON"}}),(function(T,P,a){var g=a(14),v=a(38),p=SyntaxError,x=parseInt,y=String.fromCharCode,b=g("".charAt),A=g("".slice),I=g(/./.exec),R={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":`
25
- `,"\\r":"\r","\\t":" "},O=/^[\da-f]{4}$/i,M=/^[\u0000-\u001F]$/;T.exports=function(D,L){for(var B=!0,F="";L<D.length;){var k=b(D,L);if(k==="\\"){var W=A(D,L,L+2);if(v(R,W))F+=R[W],L+=2;else if(W==="\\u"){L+=2;var U=A(D,L,L+4);if(!I(O,U))throw new p("Bad Unicode escape at: "+L);F+=y(x(U,16)),L+=4}else throw new p('Unknown escape sequence: "'+W+'"')}else if(k==='"'){B=!1,L++;break}else{if(I(M,k))throw new p("Bad control character in string literal at: "+L);F+=k,L++}}if(B)throw new p("Unterminated string at: "+L);return{value:F,end:L}}}),(function(T,P,a){var g=a(7);T.exports=!g(function(){var v="9007199254740993",p=JSON.rawJSON(v);return!JSON.isRawJSON(p)||JSON.stringify(p)!==v})}),(function(T,P,a){var g=a(3),v=a(26),p=a(7),x=a(66),y=a(39),b=!v||p(function(){x.f(1)});g({target:"Object",stat:!0,forced:b},{getOwnPropertySymbols:function(I){var R=x.f;return R?R(y(I)):[]}})}),(function(T,P,a){var g=a(3),v=a(6),p=a(4),x=a(8),y=a(14),b=a(38),A=a(21),I=a(24),R=a(68),O=a(77),M=a(55),D=p.Symbol,L=D&&D.prototype;if(v&&A(D)&&(!("description"in L)||D().description!==void 0)){var B={},F=function(){var _=arguments.length<1||arguments[0]===void 0?void 0:R(arguments[0]),K=I(L,this)?new D(_):_===void 0?D():D(_);return _===""&&(B[K]=!0),K};M(F,D);var k=F.for;F.for=function(Z){var _=R(Z),K=x(k,this,_);return _===""&&(B[K]=!0),K},F.prototype=L,L.constructor=F;var W=String(D("description detection"))==="Symbol(description detection)",U=y(L.valueOf),X=y(L.toString),j=/^Symbol\((.*)\)[^)]+$/,H=y("".replace),Y=y("".slice);O(L,"description",{configurable:!0,get:function(){var _=U(this);if(b(B,_))return"";var K=X(_),tt=W?Y(K,7,-1):H(K,j,"$1");return tt===""?void 0:tt}}),g({global:!0,constructor:!0,forced:!0},{Symbol:F})}}),(function(T,P,a){var g=a(4),v=a(79),p=a(44).f,x=a(5).f,y=g.Symbol;if(v("asyncDispose"),y){var b=x(y,"asyncDispose");b.enumerable&&b.configurable&&b.writable&&p(y,"asyncDispose",{value:b.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(T,P,a){var g=a(79);g("asyncIterator")}),(function(T,P,a){var g=a(4),v=a(79),p=a(44).f,x=a(5).f,y=g.Symbol;if(v("dispose"),y){var b=x(y,"dispose");b.enumerable&&b.configurable&&b.writable&&p(y,"dispose",{value:b.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(T,P,a){var g=a(79);g("hasInstance")}),(function(T,P,a){var g=a(79);g("isConcatSpreadable")}),(function(T,P,a){var g=a(79);g("iterator")}),(function(T,P,a){var g=a(79);g("match")}),(function(T,P,a){var g=a(79);g("matchAll")}),(function(T,P,a){var g=a(79);g("replace")}),(function(T,P,a){var g=a(79);g("search")}),(function(T,P,a){var g=a(79);g("species")}),(function(T,P,a){var g=a(79);g("split")}),(function(T,P,a){var g=a(79),v=a(81);g("toPrimitive"),v()}),(function(T,P,a){var g=a(23),v=a(79),p=a(82);v("toStringTag"),p(g("Symbol"),"Symbol")}),(function(T,P,a){var g=a(79);g("unscopables")}),(function(T,P,a){var g=a(3),v=a(4),p=a(95),x=a(117),y="WebAssembly",b=v[y],A=new Error("e",{cause:7}).cause!==7,I=function(O,M){var D={};D[O]=x(O,M,A),g({global:!0,constructor:!0,arity:1,forced:A},D)},R=function(O,M){if(b&&b[O]){var D={};D[O]=x(y+"."+O,M,A),g({target:y,stat:!0,constructor:!0,arity:1,forced:A},D)}};I("Error",function(O){return function(D){return p(O,this,arguments)}}),I("EvalError",function(O){return function(D){return p(O,this,arguments)}}),I("RangeError",function(O){return function(D){return p(O,this,arguments)}}),I("ReferenceError",function(O){return function(D){return p(O,this,arguments)}}),I("SyntaxError",function(O){return function(D){return p(O,this,arguments)}}),I("TypeError",function(O){return function(D){return p(O,this,arguments)}}),I("URIError",function(O){return function(D){return p(O,this,arguments)}}),R("CompileError",function(O){return function(D){return p(O,this,arguments)}}),R("LinkError",function(O){return function(D){return p(O,this,arguments)}}),R("RuntimeError",function(O){return function(D){return p(O,this,arguments)}})}),(function(T,P,a){var g=a(23),v=a(38),p=a(43),x=a(24),y=a(118),b=a(55),A=a(122),I=a(123),R=a(124),O=a(125),M=a(126),D=a(6),L=a(36);T.exports=function(B,F,k,W){var U="stackTraceLimit",X=W?2:1,j=B.split("."),H=j[j.length-1],Y=g.apply(null,j);if(Y){var Z=Y.prototype;if(!L&&v(Z,"cause")&&delete Z.cause,!k)return Y;var _=g("Error"),K=F(function(tt,nt){var at=R(W?nt:tt,void 0),it=W?new Y(tt):new Y;return at!==void 0&&p(it,"message",at),M(it,K,it.stack,2),this&&x(Z,this)&&I(it,this,K),arguments.length>X&&O(it,arguments[X]),it});if(K.prototype=Z,H!=="Error"?y?y(K,_):b(K,_,{name:!0}):D&&U in Y&&(A(K,Y,U),A(K,Y,"prepareStackTrace")),b(K,Y),!L)try{Z.name!==H&&p(Z,"name",H),Z.constructor=K}catch(tt){}return K}}}),(function(T,P,a){var g=a(119),v=a(20),p=a(16),x=a(120);T.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var y=!1,b={},A;try{A=g(Object.prototype,"__proto__","set"),A(b,[]),y=b instanceof Array}catch(I){}return function(R,O){return p(R),x(O),v(R)&&(y?A(R,O):R.__proto__=O),R}})():void 0)}),(function(T,P,a){var g=a(14),v=a(30);T.exports=function(p,x,y){try{return g(v(Object.getOwnPropertyDescriptor(p,x)[y]))}catch(b){}}}),(function(T,P,a){var g=a(121),v=String,p=TypeError;T.exports=function(x){if(g(x))return x;throw new p("Can't set "+v(x)+" as a prototype")}}),(function(T,P,a){var g=a(20);T.exports=function(v){return g(v)||v===null}}),(function(T,P,a){var g=a(44).f;T.exports=function(v,p,x){x in v||g(v,x,{configurable:!0,get:function(){return p[x]},set:function(y){p[x]=y}})}}),(function(T,P,a){var g=a(21),v=a(20),p=a(118);T.exports=function(x,y,b){var A,I;return p&&g(A=y.constructor)&&A!==b&&v(I=A.prototype)&&I!==b.prototype&&p(x,I),x}}),(function(T,P,a){var g=a(68);T.exports=function(v,p){return v===void 0?arguments.length<2?"":p:g(v)}}),(function(T,P,a){var g=a(20),v=a(43);T.exports=function(p,x){g(x)&&"cause"in x&&v(p,"cause",x.cause)}}),(function(T,P,a){var g=a(43),v=a(127),p=a(128),x=Error.captureStackTrace;T.exports=function(y,b,A,I){p&&(x?x(y,b):g(y,"stack",v(A,I)))}}),(function(T,P,a){var g=a(14),v=Error,p=g("".replace),x=(function(A){return String(new v(A).stack)})("zxcasd"),y=/\n\s*at [^:]*:[^\n]*/,b=y.test(x);T.exports=function(A,I){if(b&&typeof A=="string"&&!v.prepareStackTrace)for(;I--;)A=p(A,y,"");return A}}),(function(T,P,a){var g=a(7),v=a(11);T.exports=!g(function(){var p=new Error("a");return"stack"in p?(Object.defineProperty(p,"stack",v(1,7)),p.stack!==7):!0})}),(function(T,P,a){var g=a(3),v=a(23),p=a(20),x=a(69),y=a(7),b="Error",A="DOMException",I=Object.setPrototypeOf||{}.__proto__,R=v(A),O=Error,M=O.isError,D=!M||!I||y(function(){return R&&!M(new R(A))||!M(new O(b,{cause:function(){}}))||M(v("Object","create")(O.prototype))});g({target:"Error",stat:!0,sham:!0,forced:D},{isError:function(B){if(!p(B))return!1;var F=x(B);return F===b||F===A}})}),(function(T,P,a){var g=a(47),v=a(131),p=Error.prototype;p.toString!==v&&g(p,"toString",v)}),(function(T,P,a){var g=a(6),v=a(7),p=a(46),x=a(124),y=Error.prototype.toString,b=v(function(){if(g){var A=Object.create(Object.defineProperty({},"name",{get:function(){return this===A}}));if(y.call(A)!=="true")return!0}return y.call({message:1,name:2})!=="2: 1"||y.call({})!=="Error"});T.exports=b?function(){var I=p(this),R=x(I.name,"Error"),O=x(I.message);return R?O?R+": "+O:R:O}:y}),(function(T,P,a){a(133)}),(function(T,P,a){var g=a(3),v=a(24),p=a(134),x=a(118),y=a(55),b=a(71),A=a(43),I=a(11),R=a(125),O=a(126),M=a(136),D=a(124),L=a(33),B=L("toStringTag"),F=Error,k=[].push,W=function(j,H){var Y=v(U,this),Z;x?Z=x(new F,Y?p(this):U):(Z=Y?this:b(U),A(Z,B,"Error")),H!==void 0&&A(Z,"message",D(H)),O(Z,W,Z.stack,1),arguments.length>2&&R(Z,arguments[2]);var _=[];return M(j,k,{that:_}),A(Z,"errors",_),Z};x?x(W,F):y(W,F,{name:!0});var U=W.prototype=b(F.prototype,{constructor:I(1,W),message:I(1,""),name:I(1,"AggregateError")});g({global:!0,constructor:!0,arity:2},{AggregateError:W})}),(function(T,P,a){var g=a(38),v=a(21),p=a(39),x=a(53),y=a(135),b=x("IE_PROTO"),A=Object,I=A.prototype;T.exports=y?A.getPrototypeOf:function(R){var O=p(R);if(g(O,b))return O[b];var M=O.constructor;return v(M)&&O instanceof M?M.prototype:O instanceof A?I:null}}),(function(T,P,a){var g=a(7);T.exports=!g(function(){function v(){}return v.prototype.constructor=null,Object.getPrototypeOf(new v)!==v.prototype})}),(function(T,P,a){var g=a(84),v=a(8),p=a(46),x=a(31),y=a(137),b=a(63),A=a(24),I=a(139),R=a(140),O=a(141),M=TypeError,D=function(B,F){this.stopped=B,this.result=F},L=D.prototype;T.exports=function(B,F,k){var W=k&&k.that,U=!!(k&&k.AS_ENTRIES),X=!!(k&&k.IS_RECORD),j=!!(k&&k.IS_ITERATOR),H=!!(k&&k.INTERRUPTED),Y=g(F,W),Z,_,K,tt,nt,at,it,ot=function(gt){var yt=Z;return Z=void 0,yt&&O(yt,"normal"),new D(!0,gt)},ut=function(gt){return U?(p(gt),H?Y(gt[0],gt[1],ot):Y(gt[0],gt[1])):H?Y(gt,ot):Y(gt)};if(X)Z=B.iterator;else if(j)Z=B;else{if(_=R(B),!_)throw new M(x(B)+" is not iterable");if(y(_)){for(K=0,tt=b(B);tt>K;K++)if(nt=ut(B[K]),nt&&A(L,nt))return nt;return new D(!1)}Z=I(B,_)}for(at=X?B.next:Z.next;!(it=v(at,Z)).done;){var ht=it.value;try{nt=ut(ht)}catch(gt){if(Z)O(Z,"throw",gt);else throw gt}if(typeof nt=="object"&&nt&&A(L,nt))return nt}return new D(!1)}}),(function(T,P,a){var g=a(33),v=a(138),p=g("iterator"),x=Array.prototype;T.exports=function(y){return y!==void 0&&(v.Array===y||x[p]===y)}}),(function(T){T.exports={}}),(function(T,P,a){var g=a(8),v=a(30),p=a(46),x=a(31),y=a(140),b=TypeError;T.exports=function(A,I){var R=arguments.length<2?y(A):I;if(v(R))return p(g(R,A));throw new b(x(A)+" is not iterable")}}),(function(T,P,a){var g=a(69),v=a(29),p=a(17),x=a(138),y=a(33),b=y("iterator");T.exports=function(A){if(!p(A))return v(A,b)||v(A,"@@iterator")||x[g(A)]}}),(function(T,P,a){var g=a(8),v=a(46),p=a(29);T.exports=function(x,y,b){var A,I;v(x);try{if(A=p(x,"return"),!A){if(y==="throw")throw b;return b}A=g(A,x)}catch(R){I=!0,A=R}if(y==="throw")throw b;if(I)throw A;return v(A),b}}),(function(T,P,a){var g=a(3),v=a(23),p=a(95),x=a(7),y=a(117),b="AggregateError",A=v(b),I=!x(function(){return A([1]).errors[0]!==1})&&x(function(){return A([1],b,{cause:7}).cause!==7});g({global:!0,constructor:!0,arity:2,forced:I},{AggregateError:y(b,function(R){return function(M,D){return p(R,this,arguments)}},I,!0)})}),(function(T,P,a){var g=a(3),v=a(4),p=a(24),x=a(134),y=a(118),b=a(55),A=a(71),I=a(43),R=a(11),O=a(126),M=a(124),D=a(33),L=a(7),B=a(36),F=v.SuppressedError,k=D("toStringTag"),W=Error,U=!!F&&F.length!==3,X=!!F&&L(function(){return new F(1,2,3,{cause:4}).cause===4}),j=U||X,H=function(_,K,tt){var nt=p(Y,this),at;return y?at=j&&(!nt||x(this)===Y)?new F:y(new W,nt?x(this):Y):(at=nt?this:A(Y),I(at,k,"Error")),tt!==void 0&&I(at,"message",M(tt)),O(at,H,at.stack,1),I(at,"error",_),I(at,"suppressed",K),at};y?y(H,W):b(H,W,{name:!0});var Y=H.prototype=j?F.prototype:A(W.prototype,{constructor:R(1,H),message:R(1,""),name:R(1,"SuppressedError")});j&&!B&&(Y.constructor=H),g({global:!0,constructor:!0,arity:3,forced:j},{SuppressedError:H})}),(function(T,P,a){var g=a(3),v=a(39),p=a(63),x=a(61),y=a(145);g({target:"Array",proto:!0},{at:function(A){var I=v(this),R=p(I),O=x(A),M=O>=0?O:R+O;return M<0||M>=R?void 0:I[M]}}),y("at")}),(function(T,P,a){var g=a(33),v=a(71),p=a(44).f,x=g("unscopables"),y=Array.prototype;y[x]===void 0&&p(y,x,{configurable:!0,value:v(null)}),T.exports=function(b){y[x][b]=!0}}),(function(T,P,a){var g=a(3),v=a(7),p=a(88),x=a(20),y=a(39),b=a(63),A=a(147),I=a(90),R=a(148),O=a(86),M=a(149),D=a(33),L=a(27),B=D("isConcatSpreadable"),F=L>=51||!v(function(){var U=[];return U[B]=!1,U.concat()[0]!==U}),k=function(U){if(!x(U))return!1;var X=U[B];return X!==void 0?!!X:p(U)},W=!F||!M("concat");g({target:"Array",proto:!0,arity:1,forced:W},{concat:function(X){var j=y(this),H=O(j,0),Y=0,Z,_,K,tt,nt;for(Z=-1,K=arguments.length;Z<K;Z++)if(nt=Z===-1?j:arguments[Z],k(nt))for(tt=b(nt),A(Y+tt),_=0;_<tt;_++,Y++)_ in nt&&I(H,Y,nt[_]);else A(Y+1),I(H,Y++,nt);return R(H,Y),H}})}),(function(T){var P=TypeError,a=9007199254740991;T.exports=function(g){if(g>a)throw new P("Maximum allowed index exceeded");return g}}),(function(T,P,a){var g=a(6),v=a(88),p=TypeError,x=Object.getOwnPropertyDescriptor,y=g&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(b){return b instanceof TypeError}})();T.exports=y?function(b,A){if(v(b)&&!x(b,"length").writable)throw new p("Cannot set read only .length");return b.length=A}:function(b,A){return b.length=A}}),(function(T,P,a){var g=a(7),v=a(33),p=a(27),x=v("species");T.exports=function(y){return p>=51||!g(function(){var b=[],A=b.constructor={};return A[x]=function(){return{foo:1}},b[y](Boolean).foo!==1})}}),(function(T,P,a){var g=a(3),v=a(151),p=a(145);g({target:"Array",proto:!0},{copyWithin:v}),p("copyWithin")}),(function(T,P,a){var g=a(39),v=a(60),p=a(63),x=a(152),y=Math.min;T.exports=[].copyWithin||function(A,I){var R=g(this),O=p(R),M=v(A,O),D=v(I,O),L=arguments.length>2?arguments[2]:void 0,B=y((L===void 0?O:v(L,O))-D,O-M),F=1;for(D<M&&M<D+B&&(F=-1,D+=B-1,M+=B-1);B-- >0;)D in R?R[M]=R[D]:x(R,M),M+=F,D+=F;return R}}),(function(T,P,a){var g=a(31),v=TypeError;T.exports=function(p,x){if(!delete p[x])throw new v("Cannot delete property "+g(x)+" of "+g(p))}}),(function(T,P,a){var g=a(3),v=a(83).every,p=a(154),x=p("every");g({target:"Array",proto:!0,forced:!x},{every:function(b){return v(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(7);T.exports=function(v,p){var x=[][v];return!!x&&g(function(){x.call(null,p||function(){return 1},1)})}}),(function(T,P,a){var g=a(3),v=a(156),p=a(145);g({target:"Array",proto:!0},{fill:v}),p("fill")}),(function(T,P,a){var g=a(39),v=a(60),p=a(63);T.exports=function(y){for(var b=g(this),A=p(b),I=arguments.length,R=v(I>1?arguments[1]:void 0,A),O=I>2?arguments[2]:void 0,M=O===void 0?A:v(O,A);M>R;)b[R++]=y;return b}}),(function(T,P,a){var g=a(3),v=a(83).filter,p=a(149),x=p("filter");g({target:"Array",proto:!0,forced:!x},{filter:function(b){return v(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(3),v=a(83).find,p=a(145),x="find",y=!0;x in[]&&Array(1)[x](function(){y=!1}),g({target:"Array",proto:!0,forced:y},{find:function(A){return v(this,A,arguments.length>1?arguments[1]:void 0)}}),p(x)}),(function(T,P,a){var g=a(3),v=a(83).findIndex,p=a(145),x="findIndex",y=!0;x in[]&&Array(1)[x](function(){y=!1}),g({target:"Array",proto:!0,forced:y},{findIndex:function(A){return v(this,A,arguments.length>1?arguments[1]:void 0)}}),p(x)}),(function(T,P,a){var g=a(3),v=a(161).findLast,p=a(145);g({target:"Array",proto:!0},{findLast:function(y){return v(this,y,arguments.length>1?arguments[1]:void 0)}}),p("findLast")}),(function(T,P,a){var g=a(84),v=a(13),p=a(39),x=a(63),y=function(b){var A=b===1;return function(I,R,O){for(var M=p(I),D=v(M),L=x(D),B=g(R,O),F,k;L-- >0;)if(F=D[L],k=B(F,L,M),k)switch(b){case 0:return F;case 1:return L}return A?-1:void 0}};T.exports={findLast:y(0),findLastIndex:y(1)}}),(function(T,P,a){var g=a(3),v=a(161).findLastIndex,p=a(145);g({target:"Array",proto:!0},{findLastIndex:function(y){return v(this,y,arguments.length>1?arguments[1]:void 0)}}),p("findLastIndex")}),(function(T,P,a){var g=a(3),v=a(164),p=a(39),x=a(63),y=a(61),b=a(86);g({target:"Array",proto:!0},{flat:function(){var I=arguments.length?arguments[0]:void 0,R=p(this),O=x(R),M=I===void 0?1:y(I),D=b(R,0);return v(D,R,R,O,0,M),D}})}),(function(T,P,a){var g=a(88),v=a(63),p=a(147),x=a(84),y=a(90),b=function(A,I,R,O,M,D,L,B){for(var F=M,k=0,W=L?x(L,B):!1,U,X;k<O;)k in R&&(U=W?W(R[k],k,I):R[k],D>0&&g(U)?(X=v(U),F=b(A,I,U,X,F,D-1)-1):(p(F+1),y(A,F,U)),F++),k++;return F};T.exports=b}),(function(T,P,a){var g=a(3),v=a(164),p=a(30),x=a(39),y=a(63),b=a(86);g({target:"Array",proto:!0},{flatMap:function(I){var R=x(this),O=y(R),M;return p(I),M=b(R,0),v(M,R,R,O,0,1,I,arguments.length>1?arguments[1]:void 0),M}})}),(function(T,P,a){var g=a(3),v=a(167);g({target:"Array",proto:!0,forced:[].forEach!==v},{forEach:v})}),(function(T,P,a){var g=a(83).forEach,v=a(154),p=v("forEach");T.exports=p?[].forEach:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}}),(function(T,P,a){var g=a(3),v=a(169),p=a(171),x=!p(function(y){Array.from(y)});g({target:"Array",stat:!0,forced:x},{from:v})}),(function(T,P,a){var g=a(84),v=a(8),p=a(39),x=a(170),y=a(137),b=a(89),A=a(63),I=a(90),R=a(148),O=a(139),M=a(140),D=a(141),L=Array;T.exports=function(F){var k=b(this),W=arguments.length,U=W>1?arguments[1]:void 0,X=U!==void 0;X&&(U=g(U,W>2?arguments[2]:void 0));var j=p(F),H=M(j),Y=0,Z,_,K,tt,nt,at;if(H&&!(this===L&&y(H)))for(_=k?new this:[],tt=O(j,H),nt=tt.next;!(K=v(nt,tt)).done;Y++){at=X?x(tt,U,[K.value,Y],!0):K.value;try{I(_,Y,at)}catch(it){D(tt,"throw",it)}}else for(Z=A(j),_=k?new this(Z):L(Z);Z>Y;Y++)at=X?U(j[Y],Y):j[Y],I(_,Y,at);return R(_,Y),_}}),(function(T,P,a){var g=a(46),v=a(141);T.exports=function(p,x,y,b){try{return b?x(g(y)[0],y[1]):x(y)}catch(A){v(p,"throw",A)}}}),(function(T,P,a){var g=a(33),v=g("iterator"),p=!1;try{var x=0,y={next:function(){return{done:!!x++}},return:function(){p=!0}};y[v]=function(){return this},Array.from(y,function(){throw 2})}catch(b){}T.exports=function(b,A){try{if(!A&&!p)return!1}catch(O){return!1}var I=!1;try{var R={};R[v]=function(){return{next:function(){return{done:I=!0}}}},b(R)}catch(O){}return I}}),(function(T,P,a){var g=a(3),v=a(59).includes,p=a(7),x=a(145),y=p(function(){return!Array(1).includes()}),b=p(function(){return[,1].includes(void 0,1)});g({target:"Array",proto:!0,forced:y||b},{includes:function(I){return v(this,I,arguments.length>1?arguments[1]:void 0)}}),x("includes")}),(function(T,P,a){var g=a(3),v=a(85),p=a(59).indexOf,x=a(154),y=v([].indexOf),b=!!y&&1/y([1],1,-0)<0,A=b||!x("indexOf");g({target:"Array",proto:!0,forced:A},{indexOf:function(R){var O=arguments.length>1?arguments[1]:void 0;return b?y(this,R,O)||0:p(this,R,O)}})}),(function(T,P,a){var g=a(3),v=a(88);g({target:"Array",stat:!0},{isArray:v})}),(function(T,P,a){var g=a(12),v=a(145),p=a(138),x=a(51),y=a(44).f,b=a(176),A=a(179),I=a(36),R=a(6),O="Array Iterator",M=x.set,D=x.getterFor(O);T.exports=b(Array,"Array",function(B,F){M(this,{type:O,target:g(B),index:0,kind:F})},function(){var B=D(this),F=B.target,k=B.index++;if(!F||k>=F.length)return B.target=null,A(void 0,!0);switch(B.kind){case"keys":return A(k,!1);case"values":return A(F[k],!1)}return A([k,F[k]],!1)},"values");var L=p.Arguments=p.Array;if(v("keys"),v("values"),v("entries"),!I&&R&&L.name!=="values")try{y(L,"name",{value:"values"})}catch(B){}}),(function(T,P,a){var g=a(3),v=a(8),p=a(36),x=a(49),y=a(21),b=a(177),A=a(134),I=a(118),R=a(82),O=a(43),M=a(47),D=a(33),L=a(138),B=a(178),F=x.PROPER,k=x.CONFIGURABLE,W=B.IteratorPrototype,U=B.BUGGY_SAFARI_ITERATORS,X=D("iterator"),j="keys",H="values",Y="entries",Z=function(){return this};T.exports=function(_,K,tt,nt,at,it,ot){b(tt,K,nt);var ut=function(xt){if(xt===at&&bt)return bt;if(!U&&xt&&xt in yt)return yt[xt];switch(xt){case j:return function(){return new tt(this,xt)};case H:return function(){return new tt(this,xt)};case Y:return function(){return new tt(this,xt)}}return function(){return new tt(this)}},ht=K+" Iterator",gt=!1,yt=_.prototype,Et=yt[X]||yt["@@iterator"]||at&&yt[at],bt=!U&&Et||ut(at),Ft=K==="Array"&&yt.entries||Et,Lt,Pt,mt;if(Ft&&(Lt=A(Ft.call(new _)),Lt!==Object.prototype&&Lt.next&&(!p&&A(Lt)!==W&&(I?I(Lt,W):y(Lt[X])||M(Lt,X,Z)),R(Lt,ht,!0,!0),p&&(L[ht]=Z))),F&&at===H&&Et&&Et.name!==H&&(!p&&k?O(yt,"name",H):(gt=!0,bt=function(){return v(Et,this)})),at)if(Pt={values:ut(H),keys:it?bt:ut(j),entries:ut(Y)},ot)for(mt in Pt)(U||gt||!(mt in yt))&&M(yt,mt,Pt[mt]);else g({target:K,proto:!0,forced:U||gt},Pt);return(!p||ot)&&yt[X]!==bt&&M(yt,X,bt,{name:at}),L[K]=bt,Pt}}),(function(T,P,a){var g=a(178).IteratorPrototype,v=a(71),p=a(11),x=a(82),y=a(138),b=function(){return this};T.exports=function(A,I,R,O){var M=I+" Iterator";return A.prototype=v(g,{next:p(+!O,R)}),x(A,M,!1,!0),y[M]=b,A}}),(function(T,P,a){var g=a(7),v=a(21),p=a(20),x=a(71),y=a(134),b=a(47),A=a(33),I=a(36),R=A("iterator"),O=!1,M,D,L;[].keys&&(L=[].keys(),"next"in L?(D=y(y(L)),D!==Object.prototype&&(M=D)):O=!0);var B=!p(M)||g(function(){var F={};return M[R].call(F)!==F});B?M={}:I&&(M=x(M)),v(M[R])||b(M,R,function(){return this}),T.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:O}}),(function(T){T.exports=function(P,a){return{value:P,done:a}}}),(function(T,P,a){var g=a(3),v=a(14),p=a(13),x=a(12),y=a(154),b=v([].join),A=p!==Object,I=A||!y("join",",");g({target:"Array",proto:!0,forced:I},{join:function(O){return b(x(this),O===void 0?",":O)}})}),(function(T,P,a){var g=a(3),v=a(182);g({target:"Array",proto:!0,forced:v!==[].lastIndexOf},{lastIndexOf:v})}),(function(T,P,a){var g=a(95),v=a(12),p=a(61),x=a(63),y=a(154),b=Math.min,A=[].lastIndexOf,I=!!A&&1/[1].lastIndexOf(1,-0)<0,R=y("lastIndexOf"),O=I||!R;T.exports=O?function(D){if(I)return g(A,this,arguments)||0;var L=v(this),B=x(L);if(B===0)return-1;var F=B-1;for(arguments.length>1&&(F=b(F,p(arguments[1]))),F<0&&(F=B+F);F>=0;F--)if(F in L&&L[F]===D)return F||0;return-1}:A}),(function(T,P,a){var g=a(3),v=a(83).map,p=a(149),x=p("map");g({target:"Array",proto:!0,forced:!x},{map:function(b){return v(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(3),v=a(7),p=a(89),x=a(90),y=a(148),b=Array,A=v(function(){function I(){}return!(b.of.call(I)instanceof I)});g({target:"Array",stat:!0,forced:A},{of:function(){for(var R=0,O=arguments.length,M=new(p(this)?this:b)(O);O>R;)x(M,R,arguments[R++]);return y(M,O),M}})}),(function(T,P,a){var g=a(3),v=a(39),p=a(63),x=a(148),y=a(147),b=a(7),A=b(function(){return[].push.call({length:4294967296},1)!==4294967297}),I=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(O){return O instanceof TypeError}},R=A||!I();g({target:"Array",proto:!0,arity:1,forced:R},{push:function(M){var D=v(this),L=p(D),B=arguments.length;y(L+B);for(var F=0;F<B;F++)D[L]=arguments[F],L++;return x(D,L),L}})}),(function(T,P,a){var g=a(3),v=a(187).left,p=a(154),x=a(27),y=a(188),b=!y&&x>79&&x<83,A=b||!p("reduce");g({target:"Array",proto:!0,forced:A},{reduce:function(R){var O=arguments.length;return v(this,R,O,O>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(30),v=a(39),p=a(13),x=a(63),y=TypeError,b="Reduce of empty array with no initial value",A=function(I){return function(R,O,M,D){var L=v(R),B=p(L),F=x(L);if(g(O),F===0&&M<2)throw new y(b);var k=I?F-1:0,W=I?-1:1;if(M<2)for(;;){if(k in B){D=B[k],k+=W;break}if(k+=W,I?k<0:F<=k)throw new y(b)}for(;I?k>=0:F>k;k+=W)k in B&&(D=O(D,B[k],k,L));return D}};T.exports={left:A(!1),right:A(!0)}}),(function(T,P,a){var g=a(189);T.exports=g==="NODE"}),(function(T,P,a){var g=a(4),v=a(28),p=a(15),x=function(y){return v.slice(0,y.length)===y};T.exports=(function(){return x("Bun/")?"BUN":x("Cloudflare-Workers")?"CLOUDFLARE":x("Deno/")?"DENO":x("Node.js/")?"NODE":g.Bun&&typeof Bun.version=="string"?"BUN":g.Deno&&typeof Deno.version=="object"?"DENO":p(g.process)==="process"?"NODE":g.window&&g.document?"BROWSER":"REST"})()}),(function(T,P,a){var g=a(3),v=a(187).right,p=a(154),x=a(27),y=a(188),b=!y&&x>79&&x<83,A=b||!p("reduceRight");g({target:"Array",proto:!0,forced:A},{reduceRight:function(R){return v(this,R,arguments.length,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(88),x=v([].reverse),y=[1,2];g({target:"Array",proto:!0,forced:String(y)===String(y.reverse())},{reverse:function(){return p(this)&&(this.length=this.length),x(this)}})}),(function(T,P,a){var g=a(3),v=a(88),p=a(89),x=a(20),y=a(60),b=a(63),A=a(12),I=a(90),R=a(148),O=a(33),M=a(149),D=a(76),L=M("slice"),B=O("species"),F=Array,k=Math.max;g({target:"Array",proto:!0,forced:!L},{slice:function(U,X){var j=A(this),H=b(j),Y=y(U,H),Z=y(X===void 0?H:X,H),_,K,tt;if(v(j)&&(_=j.constructor,p(_)&&(_===F||v(_.prototype))?_=void 0:x(_)&&(_=_[B],_===null&&(_=void 0)),_===F||_===void 0))return D(j,Y,Z);for(K=new(_===void 0?F:_)(k(Z-Y,0)),tt=0;Y<Z;Y++,tt++)Y in j&&I(K,tt,j[Y]);return R(K,tt),K}})}),(function(T,P,a){var g=a(3),v=a(83).some,p=a(154),x=p("some");g({target:"Array",proto:!0,forced:!x},{some:function(b){return v(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(30),x=a(39),y=a(63),b=a(152),A=a(68),I=a(7),R=a(195),O=a(154),M=a(196),D=a(197),L=a(27),B=a(198),F=[],k=v(F.sort),W=v(F.push),U=I(function(){F.sort(void 0)}),X=I(function(){F.sort(null)}),j=O("sort"),H=!I(function(){if(L)return L<70;if(!(M&&M>3)){if(D)return!0;if(B)return B<603;var _="",K,tt,nt,at;for(K=65;K<76;K++){switch(tt=String.fromCharCode(K),K){case 66:case 69:case 70:case 72:nt=3;break;case 68:case 71:nt=4;break;default:nt=2}for(at=0;at<47;at++)F.push({k:tt+at,v:nt})}for(F.sort(function(it,ot){return ot.v-it.v}),at=0;at<F.length;at++)tt=F[at].k.charAt(0),_.charAt(_.length-1)!==tt&&(_+=tt);return _!=="DGBEFHACIJK"}}),Y=U||!X||!j||!H,Z=function(_){return function(K,tt){if(tt===void 0)return-1;if(K===void 0)return 1;if(_!==void 0)return+_(K,tt)||0;var nt=A(K),at=A(tt);return nt===at?0:nt>at?1:-1}};g({target:"Array",proto:!0,forced:Y},{sort:function(K){K!==void 0&&p(K);var tt=x(this);if(H)return K===void 0?k(tt):k(tt,K);var nt=[],at=y(tt),it,ot;for(ot=0;ot<at;ot++)ot in tt&&W(nt,tt[ot]);for(R(nt,Z(K)),it=y(nt),ot=0;ot<it;)tt[ot]=nt[ot++];for(;ot<at;)b(tt,ot++);return tt}})}),(function(T,P,a){var g=a(76),v=Math.floor,p=function(x,y){var b=x.length;if(b<8)for(var A=1,I,R;A<b;){for(R=A,I=x[A];R&&y(x[R-1],I)>0;)x[R]=x[--R];R!==A++&&(x[R]=I)}else for(var O=v(b/2),M=p(g(x,0,O),y),D=p(g(x,O),y),L=M.length,B=D.length,F=0,k=0;F<L||k<B;)x[F+k]=F<L&&k<B?y(M[F],D[k])<=0?M[F++]:D[k++]:F<L?M[F++]:D[k++];return x};T.exports=p}),(function(T,P,a){var g=a(28),v=g.match(/firefox\/(\d+)/i);T.exports=!!v&&+v[1]}),(function(T,P,a){var g=a(28);T.exports=/MSIE|Trident/.test(g)}),(function(T,P,a){var g=a(28),v=g.match(/AppleWebKit\/(\d+)\./);T.exports=!!v&&+v[1]}),(function(T,P,a){var g=a(200);g("Array")}),(function(T,P,a){var g=a(23),v=a(77),p=a(33),x=a(6),y=p("species");T.exports=function(b){var A=g(b);x&&A&&!A[y]&&v(A,y,{configurable:!0,get:function(){return this}})}}),(function(T,P,a){var g=a(3),v=a(39),p=a(60),x=a(61),y=a(63),b=a(148),A=a(147),I=a(86),R=a(90),O=a(152),M=a(149),D=M("splice"),L=Math.max,B=Math.min;g({target:"Array",proto:!0,forced:!D},{splice:function(k,W){var U=v(this),X=y(U),j=p(k,X),H=arguments.length,Y,Z,_,K,tt,nt;for(H===0?Y=Z=0:H===1?(Y=0,Z=X-j):(Y=H-2,Z=B(L(x(W),0),X-j)),A(X+Y-Z),_=I(U,Z),K=0;K<Z;K++)tt=j+K,tt in U&&R(_,K,U[tt]);if(b(_,Z),Y<Z){for(K=j;K<X-Z;K++)tt=K+Z,nt=K+Y,tt in U?U[nt]=U[tt]:O(U,nt);for(K=X;K>X-Z+Y;K--)O(U,K-1)}else if(Y>Z)for(K=X-Z;K>j;K--)tt=K+Z-1,nt=K+Y-1,tt in U?U[nt]=U[tt]:O(U,nt);for(K=0;K<Y;K++)U[K+j]=arguments[K+2];return b(U,X-Z+Y),_}})}),(function(T,P,a){var g=a(3),v=a(63),p=a(12),x=a(90),y=a(145),b=Array;g({target:"Array",proto:!0},{toReversed:function(){for(var I=p(this),R=v(I),O=new b(R),M=0;M<R;M++)x(O,M,I[R-M-1]);return O}}),y("toReversed")}),(function(T,P,a){var g=a(3),v=a(14),p=a(30),x=a(12),y=a(204),b=a(205),A=a(145),I=Array,R=v(b("Array","sort"));g({target:"Array",proto:!0},{toSorted:function(M){M!==void 0&&p(M);var D=x(this),L=y(I,D);return R(L,M)}}),A("toSorted")}),(function(T,P,a){var g=a(63);T.exports=function(v,p,x){for(var y=0,b=arguments.length>2?x:g(p),A=new v(b);b>y;)A[y]=p[y++];return A}}),(function(T,P,a){var g=a(4);T.exports=function(v,p){var x=g[v],y=x&&x.prototype;return y&&y[p]}}),(function(T,P,a){var g=a(3),v=a(145),p=a(147),x=a(63),y=a(60),b=a(12),A=a(61),I=a(90),R=Array,O=Math.max,M=Math.min;g({target:"Array",proto:!0},{toSpliced:function(L,B){var F=b(this),k=x(F),W=y(L,k),U=arguments.length,X=0,j,H,Y,Z;for(U===0?j=H=0:U===1?(j=0,H=k-W):(j=U-2,H=M(O(A(B),0),k-W)),Y=p(k+j-H),Z=R(Y);X<W;X++)I(Z,X,F[X]);for(;X<W+j;X++)I(Z,X,arguments[X-W+2]);for(;X<Y;X++)I(Z,X,F[X+H-j]);return Z}}),v("toSpliced")}),(function(T,P,a){var g=a(145);g("flat")}),(function(T,P,a){var g=a(145);g("flatMap")}),(function(T,P,a){var g=a(3),v=a(39),p=a(63),x=a(148),y=a(152),b=a(147),A=[].unshift(0)!==1,I=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(O){return O instanceof TypeError}},R=A||!I();g({target:"Array",proto:!0,arity:1,forced:R},{unshift:function(M){var D=v(this),L=p(D),B=arguments.length;if(B){b(L+B);for(var F=L;F--;){var k=F+B;F in D?D[k]=D[F]:y(D,k)}for(var W=0;W<B;W++)D[W]=arguments[W]}return x(D,L+B)}})}),(function(T,P,a){var g=a(3),v=a(63),p=a(61),x=a(12),y=a(90),b=Array,A=RangeError,I=(function(){try{[].with({valueOf:function(){throw 4}},null)}catch(R){return R!==4}})();g({target:"Array",proto:!0,forced:I},{with:function(R,O){var M=x(this),D=v(M),L=p(R),B=L<0?D+L:L;if(B>=D||B<0)throw new A("Incorrect index");for(var F=new b(D),k=0;k<D;k++)y(F,k,k===B?O:M[k]);return F}})}),(function(T,P,a){var g=a(3),v=a(4),p=a(212),x=a(200),y="ArrayBuffer",b=p[y],A=v[y];g({global:!0,constructor:!0,forced:A!==b},{ArrayBuffer:b}),x(y)}),(function(T,P,a){var g=a(4),v=a(14),p=a(6),x=a(213),y=a(49),b=a(43),A=a(77),I=a(214),R=a(7),O=a(215),M=a(61),D=a(216),L=a(217),B=a(221),F=a(134),k=a(118),W=a(156),U=a(76),X=a(123),j=a(55),H=a(82),Y=a(51),Z=y.PROPER,_=y.CONFIGURABLE,K="ArrayBuffer",tt="DataView",nt="prototype",at="Wrong length",it="Wrong index",ot=Y.getterFor(K),ut=Y.getterFor(tt),ht=Y.set,gt=g[K],yt=gt,Et=yt&&yt[nt],bt=g[tt],Ft=bt&&bt[nt],Lt=Object.prototype,Pt=g.Array,mt=g.RangeError,xt=v(W),wt=v([].reverse),Bt=B.pack,Jt=B.unpack,Ot=function(Ht){return[Ht&255]},jt=function(Ht){return[Ht&255,Ht>>8&255]},ie=function(Ht){return[Ht&255,Ht>>8&255,Ht>>16&255,Ht>>24&255]},me=function(Ht){return Ht[3]<<24|Ht[2]<<16|Ht[1]<<8|Ht[0]},se=function(Ht){return Bt(L(Ht),23,4)},he=function(Ht){return Bt(Ht,52,8)},Oe=function(Ht,ne,ae){A(Ht[nt],ne,{configurable:!0,get:function(){return ae(this)[ne]}})},Me=function(Ht,ne,ae,rn){var Yt=ut(Ht),ee=D(ae),pe=!!rn;if(ee+ne>Yt.byteLength)throw new mt(it);var ce=Yt.bytes,Pe=ee+Yt.byteOffset,ln=U(ce,Pe,Pe+ne);return pe?ln:wt(ln)},Re=function(Ht,ne,ae,rn,Yt,ee){var pe=ut(Ht),ce=D(ae),Pe=rn(+Yt),ln=!!ee;if(ce+ne>pe.byteLength)throw new mt(it);for(var It=pe.bytes,Xt=ce+pe.byteOffset,Mt=0;Mt<ne;Mt++)It[Xt+Mt]=Pe[ln?Mt:ne-Mt-1]};if(!x)yt=function(ne){O(this,Et);var ae=D(ne);ht(this,{type:K,bytes:xt(Pt(ae),0),byteLength:ae}),p||(this.byteLength=ae,this.detached=!1)},Et=yt[nt],bt=function(ne,ae,rn){O(this,Ft),O(ne,Et);var Yt=ot(ne),ee=Yt.byteLength,pe=M(ae);if(pe<0||pe>ee)throw new mt("Wrong offset");if(rn=rn===void 0?ee-pe:D(rn),pe+rn>ee)throw new mt(at);ht(this,{type:tt,buffer:ne,byteLength:rn,byteOffset:pe,bytes:Yt.bytes}),p||(this.buffer=ne,this.byteLength=rn,this.byteOffset=pe)},Ft=bt[nt],p&&(Oe(yt,"byteLength",ot),Oe(bt,"buffer",ut),Oe(bt,"byteLength",ut),Oe(bt,"byteOffset",ut)),I(Ft,{getInt8:function(ne){return Me(this,1,ne)[0]<<24>>24},getUint8:function(ne){return Me(this,1,ne)[0]},getInt16:function(ne){var ae=Me(this,2,ne,arguments.length>1?arguments[1]:!1);return(ae[1]<<8|ae[0])<<16>>16},getUint16:function(ne){var ae=Me(this,2,ne,arguments.length>1?arguments[1]:!1);return ae[1]<<8|ae[0]},getInt32:function(ne){return me(Me(this,4,ne,arguments.length>1?arguments[1]:!1))},getUint32:function(ne){return me(Me(this,4,ne,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function(ne){return Jt(Me(this,4,ne,arguments.length>1?arguments[1]:!1),23)},getFloat64:function(ne){return Jt(Me(this,8,ne,arguments.length>1?arguments[1]:!1),52)},setInt8:function(ne,ae){Re(this,1,ne,Ot,ae)},setUint8:function(ne,ae){Re(this,1,ne,Ot,ae)},setInt16:function(ne,ae){Re(this,2,ne,jt,ae,arguments.length>2?arguments[2]:!1)},setUint16:function(ne,ae){Re(this,2,ne,jt,ae,arguments.length>2?arguments[2]:!1)},setInt32:function(ne,ae){Re(this,4,ne,ie,ae,arguments.length>2?arguments[2]:!1)},setUint32:function(ne,ae){Re(this,4,ne,ie,ae,arguments.length>2?arguments[2]:!1)},setFloat32:function(ne,ae){Re(this,4,ne,se,ae,arguments.length>2?arguments[2]:!1)},setFloat64:function(ne,ae){Re(this,8,ne,he,ae,arguments.length>2?arguments[2]:!1)}});else{var ge=Z&&gt.name!==K;!R(function(){gt(1)})||!R(function(){new gt(-1)})||R(function(){return new gt,new gt(1.5),new gt(NaN),gt.length!==1||ge&&!_})?(yt=function(ne){return O(this,Et),X(new gt(D(ne)),this,yt)},yt[nt]=Et,Et.constructor=yt,j(yt,gt)):ge&&_&&b(gt,"name",K),k&&F(Ft)!==Lt&&k(Ft,Lt);var Te=new bt(new yt(2)),Ve=v(Ft.setInt8);Te.setInt8(0,2147483648),Te.setInt8(1,2147483649),(Te.getInt8(0)||!Te.getInt8(1))&&I(Ft,{setInt8:function(ne,ae){Ve(this,ne,ae<<24>>24)},setUint8:function(ne,ae){Ve(this,ne,ae<<24>>24)}},{unsafe:!0})}H(yt,K),H(bt,tt),T.exports={ArrayBuffer:yt,DataView:bt}}),(function(T){T.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"}),(function(T,P,a){var g=a(47);T.exports=function(v,p,x){for(var y in p)g(v,y,p[y],x);return v}}),(function(T,P,a){var g=a(24),v=TypeError;T.exports=function(p,x){if(g(x,p))return p;throw new v("Incorrect invocation")}}),(function(T,P,a){var g=a(61),v=a(64),p=RangeError;T.exports=function(x){if(x===void 0)return 0;var y=g(x),b=v(y);if(y!==b)throw new p("Wrong length or index");return b}}),(function(T,P,a){var g=a(218),v=11920928955078125e-23,p=34028234663852886e22,x=11754943508222875e-54;T.exports=Math.fround||function(b){return g(b,v,p,x)}}),(function(T,P,a){var g=a(219),v=a(220),p=Math.abs,x=2220446049250313e-31;T.exports=function(y,b,A,I){var R=+y,O=p(R),M=g(R);if(O<I)return M*v(O/I/b)*I*b;var D=(1+b/x)*O,L=D-(D-O);return L>A||L!==L?M*(1/0):M*L}}),(function(T){T.exports=Math.sign||function(a){var g=+a;return g===0||g!==g?g:g<0?-1:1}}),(function(T){var P=2220446049250313e-31,a=1/P;T.exports=function(g){return g+a-a}}),(function(T){var P=Array,a=Math.abs,g=Math.pow,v=Math.floor,p=Math.log,x=Math.LN2,y=function(A,I,R){var O=P(R),M=R*8-I-1,D=(1<<M)-1,L=D>>1,B=I===23?g(2,-24)-g(2,-77):0,F=A<0||A===0&&1/A<0?1:0,k=0,W,U,X;for(A=a(A),A!==A||A===1/0?(U=A!==A?1:0,W=D):(W=v(p(A)/x),X=g(2,-W),A*X<1&&(W--,X*=2),W+L>=1?A+=B/X:A+=B*g(2,1-L),A*X>=2&&(W++,X/=2),W+L>=D?(U=0,W=D):W+L>=1?(U=(A*X-1)*g(2,I),W+=L):(U=A*g(2,L-1)*g(2,I),W=0));I>=8;)O[k++]=U&255,U/=256,I-=8;for(W=W<<I|U,M+=I;M>0;)O[k++]=W&255,W/=256,M-=8;return O[k-1]|=F*128,O},b=function(A,I){var R=A.length,O=R*8-I-1,M=(1<<O)-1,D=M>>1,L=O-7,B=R-1,F=A[B--],k=F&127,W;for(F>>=7;L>0;)k=k*256+A[B--],L-=8;for(W=k&(1<<-L)-1,k>>=-L,L+=I;L>0;)W=W*256+A[B--],L-=8;if(k===0)k=1-D;else{if(k===M)return W?NaN:F?-1/0:1/0;W+=g(2,I),k-=D}return(F?-1:1)*W*g(2,k-I)};T.exports={pack:y,unpack:b}}),(function(T,P,a){var g=a(3),v=a(223),p=v.NATIVE_ARRAY_BUFFER_VIEWS;g({target:"ArrayBuffer",stat:!0,forced:!p},{isView:v.isView})}),(function(T,P,a){var g=a(213),v=a(6),p=a(4),x=a(21),y=a(20),b=a(38),A=a(69),I=a(31),R=a(43),O=a(47),M=a(77),D=a(24),L=a(134),B=a(118),F=a(33),k=a(40),W=a(51),U=W.enforce,X=W.get,j=p.Int8Array,H=j&&j.prototype,Y=p.Uint8ClampedArray,Z=Y&&Y.prototype,_=j&&L(j),K=H&&L(H),tt=Object.prototype,nt=p.TypeError,at=F("toStringTag"),it=k("TYPED_ARRAY_TAG"),ot="TypedArrayConstructor",ut=g&&!!B&&A(p.opera)!=="Opera",ht=!1,gt,yt,Et,bt={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Ft={BigInt64Array:8,BigUint64Array:8},Lt=function(jt){if(!y(jt))return!1;var ie=A(jt);return ie==="DataView"||b(bt,ie)||b(Ft,ie)},Pt=function(Ot){var jt=L(Ot);if(y(jt)){var ie=X(jt);return ie&&b(ie,ot)?ie[ot]:Pt(jt)}},mt=function(Ot){if(!y(Ot))return!1;var jt=A(Ot);return b(bt,jt)||b(Ft,jt)},xt=function(Ot){if(mt(Ot))return Ot;throw new nt("Target is not a typed array")},wt=function(Ot){if(x(Ot)&&(!B||D(_,Ot)))return Ot;throw new nt(I(Ot)+" is not a typed array constructor")},Bt=function(Ot,jt,ie,me){if(v){if(ie)for(var se in bt){var he=p[se];if(he&&b(he.prototype,Ot))try{delete he.prototype[Ot]}catch(Oe){try{he.prototype[Ot]=jt}catch(Me){}}}(!K[Ot]||ie)&&O(K,Ot,ie?jt:ut&&H[Ot]||jt,me)}},Jt=function(Ot,jt,ie){var me,se;if(v){if(B){if(ie){for(me in bt)if(se=p[me],se&&b(se,Ot))try{delete se[Ot]}catch(he){}}if(!_[Ot]||ie)try{return O(_,Ot,ie?jt:ut&&_[Ot]||jt)}catch(he){}else return}for(me in bt)se=p[me],se&&(!se[Ot]||ie)&&O(se,Ot,jt)}};for(gt in bt)yt=p[gt],Et=yt&&yt.prototype,Et?U(Et)[ot]=yt:ut=!1;for(gt in Ft)yt=p[gt],Et=yt&&yt.prototype,Et&&(U(Et)[ot]=yt);if((!ut||!x(_)||_===Function.prototype)&&(_=function(){throw new nt("Incorrect invocation")},ut))for(gt in bt)p[gt]&&B(p[gt],_);if((!ut||!K||K===tt)&&(K=_.prototype,ut))for(gt in bt)p[gt]&&B(p[gt].prototype,K);if(ut&&L(Z)!==K&&B(Z,K),v&&!b(K,at)){ht=!0,M(K,at,{configurable:!0,get:function(){return y(this)?this[it]:void 0}});for(gt in bt)p[gt]&&R(p[gt].prototype,it,gt)}T.exports={NATIVE_ARRAY_BUFFER_VIEWS:ut,TYPED_ARRAY_TAG:ht&&it,aTypedArray:xt,aTypedArrayConstructor:wt,exportTypedArrayMethod:Bt,exportTypedArrayStaticMethod:Jt,getTypedArrayConstructor:Pt,isView:Lt,isTypedArray:mt,TypedArray:_,TypedArrayPrototype:K}}),(function(T,P,a){var g=a(3),v=a(85),p=a(7),x=a(212),y=a(46),b=a(60),A=a(64),I=x.ArrayBuffer,R=x.DataView,O=R.prototype,M=v(I.prototype.slice),D=v(O.getUint8),L=v(O.setUint8),B=p(function(){return!new I(2).slice(1,void 0).byteLength});g({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:B},{slice:function(k,W){if(M&&W===void 0)return M(y(this),k);for(var U=y(this).byteLength,X=b(k,U),j=b(W===void 0?U:W,U),H=new I(A(j-X)),Y=new R(this),Z=new R(H),_=0;X<j;)L(Z,_++,D(Y,X++));return H}})}),(function(T,P,a){a(226)}),(function(T,P,a){var g=a(3),v=a(212),p=a(213);g({global:!0,constructor:!0,forced:!p},{DataView:v.DataView})}),(function(T,P,a){var g=a(3),v=a(14),p=Math.pow,x=31,y=1023,b=p(2,-24),A=.0009765625,I=function(O){var M=O>>>15,D=O>>>10&x,L=O&y;return D===x?L===0?M===0?1/0:-1/0:NaN:D===0?L*(M===0?b:-b):p(2,D-15)*(M===0?1+L*A:-1-L*A)},R=v(DataView.prototype.getUint16);g({target:"DataView",proto:!0},{getFloat16:function(M){return I(R(this,M,arguments.length>1?arguments[1]:!1))}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(229),x=a(216),y=a(230),b=a(220),A=Math.floor,I=Math.pow,R=65520,O=61005353927612305e-21,M=16777216,D=1024,L=function(F){if(F!==F)return 32256;if(F===0)return(1/F===-1/0)<<15;var k=F<0;if(k&&(F=-F),F>=R)return k<<15|31744;if(F<O)return k<<15|b(F*M);var W=A(y(F));if(W===-15)return k<<15|D;var U=b((F*I(2,-W)-1)*D);return U===D?k<<15|W+16<<10:k<<15|W+15<<10|U},B=v(DataView.prototype.setUint16);g({target:"DataView",proto:!0},{setFloat16:function(k,W){B(p(this),x(k),L(+W),arguments.length>2?arguments[2]:!1)}})}),(function(T,P,a){var g=a(69),v=TypeError;T.exports=function(p){if(g(p)==="DataView")return p;throw new v("Argument is not a DataView")}}),(function(T){var P=Math.log,a=Math.LN2;T.exports=Math.log2||function(v){return P(v)/a}}),(function(T,P,a){var g=a(6),v=a(77),p=a(232),x=ArrayBuffer.prototype;g&&!("detached"in x)&&v(x,"detached",{configurable:!0,get:function(){return p(this)}})}),(function(T,P,a){var g=a(4),v=a(213),p=a(233),x=g.DataView;T.exports=function(y){if(!v||p(y)!==0)return!1;try{return new x(y),!1}catch(b){return!0}}}),(function(T,P,a){var g=a(4),v=a(119),p=a(15),x=g.ArrayBuffer,y=g.TypeError;T.exports=x&&v(x.prototype,"byteLength","get")||function(b){if(p(b)!=="ArrayBuffer")throw new y("ArrayBuffer expected");return b.byteLength}}),(function(T,P,a){var g=a(3),v=a(235);v&&g({target:"ArrayBuffer",proto:!0},{transfer:function(){return v(this,arguments.length?arguments[0]:void 0,!0)}})}),(function(T,P,a){var g=a(4),v=a(14),p=a(119),x=a(216),y=a(236),b=a(233),A=a(237),I=a(239),R=g.structuredClone,O=g.ArrayBuffer,M=g.DataView,D=Math.max,L=Math.min,B=O.prototype,F=M.prototype,k=v(B.slice),W=p(B,"resizable","get"),U=p(B,"maxByteLength","get"),X=v(F.getInt8),j=v(F.setInt8);T.exports=(I||A)&&function(H,Y,Z){var _=b(H),K=Y===void 0?_:x(Y),tt=!W||!W(H),nt;if(y(H),I&&(H=R(H,{transfer:[H]}),_===K&&(Z||tt)))return H;if(_>=K&&(!Z||tt))nt=k(H,0,K);else{var at=Z&&!tt&&U?{maxByteLength:D(K,U(H))}:void 0;nt=new O(K,at);for(var it=new M(H),ot=new M(nt),ut=L(K,_),ht=0;ht<ut;ht++)j(ot,ht,X(it,ht))}return I||A(H),nt}}),(function(T,P,a){var g=a(232),v=TypeError;T.exports=function(p){if(g(p))throw new v("ArrayBuffer is detached");return p}}),(function(T,P,a){var g=a(4),v=a(238),p=a(239),x=g.structuredClone,y=g.ArrayBuffer,b=g.MessageChannel,A=!1,I,R,O,M;if(p)A=function(D){x(D,{transfer:[D]})};else if(y)try{b||(I=v("worker_threads"),I&&(b=I.MessageChannel)),b&&(R=new b,O=new y(2),M=function(D){R.port1.postMessage(null,[D])},O.byteLength===2&&(M(O),O.byteLength===0&&(A=M)))}catch(D){}T.exports=A}),(function(T,P,a){var g=a(4),v=a(188);T.exports=function(p){if(v){try{return g.process.getBuiltinModule(p)}catch(x){}try{return Function('return require("'+p+'")')()}catch(x){}}}}),(function(T,P,a){var g=a(4),v=a(7),p=a(27),x=a(189),y=g.structuredClone;T.exports=!!y&&!v(function(){if(x==="DENO"&&p>92||x==="NODE"&&p>94||x==="BROWSER"&&p>97)return!1;var b=new ArrayBuffer(8),A=y(b,{transfer:[b]});return b.byteLength!==0||A.byteLength!==8})}),(function(T,P,a){var g=a(3),v=a(235);v&&g({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return v(this,arguments.length?arguments[0]:void 0,!1)}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(7),x=p(function(){return new Date(16e11).getYear()!==120}),y=v(Date.prototype.getFullYear);g({target:"Date",proto:!0,forced:x},{getYear:function(){return y(this)-1900}})}),(function(T,P,a){var g=a(3),v=a(14),p=Date,x=v(p.prototype.getTime);g({target:"Date",stat:!0},{now:function(){return x(new p)}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(61),x=Date.prototype,y=v(x.getTime),b=v(x.setFullYear);g({target:"Date",proto:!0},{setYear:function(I){y(this);var R=+I;if(R!==R)return b(this,R);var O=p(R),M=O>=0&&O<=99?O+1900:O;return b(this,M)}})}),(function(T,P,a){var g=a(3);g({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})}),(function(T,P,a){var g=a(3),v=a(246);g({target:"Date",proto:!0,forced:Date.prototype.toISOString!==v},{toISOString:v})}),(function(T,P,a){var g=a(14),v=a(7),p=a(247).start,x=RangeError,y=isFinite,b=Math.abs,A=Date.prototype,I=A.toISOString,R=g(A.getTime),O=g(A.getUTCDate),M=g(A.getUTCFullYear),D=g(A.getUTCHours),L=g(A.getUTCMilliseconds),B=g(A.getUTCMinutes),F=g(A.getUTCMonth),k=g(A.getUTCSeconds);T.exports=v(function(){return I.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"})||!v(function(){I.call(new Date(NaN))})?function(){if(!y(R(this)))throw new x("Invalid time value");var U=this,X=M(U),j=L(U),H=X<0?"-":X>9999?"+":"";return H+p(b(X),H?6:4,0)+"-"+p(F(U)+1,2,0)+"-"+p(O(U),2,0)+"T"+p(D(U),2,0)+":"+p(B(U),2,0)+":"+p(k(U),2,0)+"."+p(j,3,0)+"Z"}:I}),(function(T,P,a){var g=a(14),v=a(64),p=a(68),x=a(248),y=a(16),b=g(x),A=g("".slice),I=Math.ceil,R=function(O){return function(M,D,L){var B=p(y(M)),F=v(D),k=B.length;if(F<=k)return B;var W=L===void 0?" ":p(L),U,X;return W===""?B:(U=F-k,X=b(W,I(U/W.length)),X.length>U&&(X=A(X,0,U)),O?B+X:X+B)}};T.exports={start:R(!1),end:R(!0)}}),(function(T,P,a){var g=a(61),v=a(68),p=a(16),x=RangeError,y=Math.floor;T.exports=function(A){var I=v(p(this)),R="",O=g(A);if(O<0||O===1/0)throw new x("Wrong number of repetitions");for(;O>0;(O=y(O/2))&&(I+=I))O%2&&(R+=I);return R}}),(function(T,P,a){var g=a(3),v=a(7),p=a(39),x=a(19),y=v(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});g({target:"Date",proto:!0,arity:1,forced:y},{toJSON:function(A){var I=p(this),R=x(I,"number");return typeof R=="number"&&!isFinite(R)?null:I.toISOString()}})}),(function(T,P,a){var g=a(38),v=a(47),p=a(251),x=a(33),y=x("toPrimitive"),b=Date.prototype;g(b,y)||v(b,y,p)}),(function(T,P,a){var g=a(46),v=a(32),p=TypeError;T.exports=function(x){if(g(this),x==="string"||x==="default")x="string";else if(x!=="number")throw new p("Incorrect hint");return v(this,x)}}),(function(T,P,a){var g=a(14),v=a(47),p=Date.prototype,x="Invalid Date",y="toString",b=g(p[y]),A=g(p.getTime);String(new Date(NaN))!==x&&v(p,y,function(){var R=A(this);return R===R?b(this):x})}),(function(T,P,a){var g=a(3),v=a(6),p=a(23),x=a(30),y=a(215),b=a(47),A=a(214),I=a(77),R=a(33),O=a(51),M=a(254),D=p("SuppressedError"),L=ReferenceError,B=R("dispose"),F=R("toStringTag"),k="DisposableStack",W=O.set,U=O.getterFor(k),X="sync-dispose",j="disposed",H="pending",Y=function(K){var tt=U(K);if(tt.state===j)throw new L(k+" already disposed");return tt},Z=function(){W(y(this,_),{type:k,state:H,stack:[]}),v||(this.disposed=!1)},_=Z.prototype;A(_,{dispose:function(){var tt=U(this);if(tt.state!==j){tt.state=j,v||(this.disposed=!0);for(var nt=tt.stack,at=nt.length,it=!1,ot;at;){var ut=nt[--at];nt[at]=null;try{ut()}catch(ht){it?ot=new D(ht,ot):(it=!0,ot=ht)}}if(tt.stack=null,it)throw ot}},use:function(tt){return M(Y(this),tt,X),tt},adopt:function(tt,nt){var at=Y(this);return x(nt),M(at,void 0,X,function(){nt(tt)}),tt},defer:function(tt){var nt=Y(this);x(tt),M(nt,void 0,X,tt)},move:function(){var tt=Y(this),nt=new Z;return U(nt).stack=tt.stack,tt.stack=[],tt.state=j,v||(this.disposed=!0),nt}}),v&&I(_,"disposed",{configurable:!0,get:function(){return U(this).state===j}}),b(_,B,_.dispose,{name:"dispose"}),b(_,F,k,{nonWritable:!0}),g({global:!0,constructor:!0},{DisposableStack:Z})}),(function(T,P,a){var g=a(23),v=a(8),p=a(14),x=a(84),y=a(46),b=a(30),A=a(17),I=a(29),R=a(33),O=R("asyncDispose"),M=R("dispose"),D=p([].push),L=function(F,k){if(k==="async-dispose"){var W=I(F,O);return W!==void 0||(W=I(F,M),W===void 0)?W:function(){var U=this,X=g("Promise");return new X(function(j){v(W,U),j(void 0)})}}return I(F,M)},B=function(F,k,W){return arguments.length<3&&!A(F)&&(W=b(L(y(F),k))),W===void 0?function(){}:x(W,F)};T.exports=function(F,k,W,U){var X;if(arguments.length<4){if(A(k)&&W==="sync-dispose")return;X=B(k,W)}else X=B(void 0,W,U);D(F.stack,X)}}),(function(T,P,a){var g=a(3),v=a(14),p=a(68),x=v("".charAt),y=v("".charCodeAt),b=v(/./.exec),A=v(1.1.toString),I=v("".toUpperCase),R=/[\w*+\-./@]/,O=function(M,D){for(var L=A(M,16);L.length<D;)L="0"+L;return L};g({global:!0},{escape:function(D){for(var L=p(D),B="",F=L.length,k=0,W,U;k<F;)W=x(L,k++),b(R,W)?B+=W:(U=y(W,0),U<256?B+="%"+I(O(U,2)):B+="%u"+I(O(U,4)));return B}})}),(function(T,P,a){var g=a(3),v=a(257);g({target:"Function",proto:!0,forced:Function.bind!==v},{bind:v})}),(function(T,P,a){var g=a(14),v=a(30),p=a(20),x=a(38),y=a(76),b=a(9),A=Function,I=g([].concat),R=g([].join),O={},M=function(D,L,B){if(!x(O,L)){for(var F=[],k=0;k<L;k++)F[k]="a["+k+"]";O[L]=A("C,a","return new C("+R(F,",")+")")}return O[L](D,B)};T.exports=b?A.bind:function(L){var B=v(this),F=B.prototype,k=y(arguments,1),W=function(){var X=I(k,y(arguments));return this instanceof W?M(B,X.length,X):B.apply(L,X)};return p(F)&&(W.prototype=F),W}}),(function(T,P,a){var g=a(21),v=a(20),p=a(44),x=a(24),y=a(33),b=a(48),A=y("hasInstance"),I=Function.prototype;A in I||p.f(I,A,{value:b(function(R){if(!g(this)||!v(R))return!1;var O=this.prototype;return v(O)?x(O,R):R instanceof this},A)})}),(function(T,P,a){var g=a(6),v=a(49).EXISTS,p=a(14),x=a(77),y=Function.prototype,b=p(y.toString),A=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,I=p(A.exec),R="name";g&&!v&&x(y,R,{configurable:!0,get:function(){try{return I(A,b(this))[1]}catch(O){return""}}})}),(function(T,P,a){var g=a(3),v=a(4);g({global:!0,forced:v.globalThis!==v},{globalThis:v})}),(function(T,P,a){var g=a(3),v=a(4),p=a(215),x=a(46),y=a(21),b=a(134),A=a(77),I=a(90),R=a(7),O=a(38),M=a(33),D=a(178).IteratorPrototype,L=a(6),B=a(36),F="constructor",k="Iterator",W=M("toStringTag"),U=TypeError,X=v[k],j=B||!y(X)||X.prototype!==D||!R(function(){X({})}),H=function(){if(p(this,D),b(this)===D)throw new U("Abstract class Iterator not directly constructable")},Y=function(Z,_){L?A(D,Z,{configurable:!0,get:function(){return _},set:function(K){if(x(this),this===D)throw new U("You can't redefine this property");O(this,Z)?this[Z]=K:I(this,Z,K)}}):D[Z]=_};O(D,W)||Y(W,k),(j||!O(D,F)||D[F]===Object)&&Y(F,H),H.prototype=D,g({global:!0,constructor:!0,forced:j},{Iterator:H})}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(140),b=a(263),A=a(36),I=Array,R=b(function(){for(;;){var O=this.iterator;if(!O){var M=this.nextIterableIndex++,D=this.iterables;if(M>=D.length){this.done=!0;return}var L=D[M];this.iterables[M]=null,O=this.iterator=x(v(L.method,L.iterable)),this.next=O.next}var B=x(v(this.next,O));if(B.done){this.iterator=null,this.next=null;continue}return B.value}});g({target:"Iterator",stat:!0,forced:A},{concat:function(){for(var M=arguments.length,D=I(M),L=0;L<M;L++){var B=x(arguments[L]);D[L]={iterable:B,method:p(y(B))}}return new R({iterables:D,nextIterableIndex:0,iterator:null,next:null})}})}),(function(T,P,a){var g=a(8),v=a(71),p=a(43),x=a(214),y=a(33),b=a(51),A=a(29),I=a(178).IteratorPrototype,R=a(179),O=a(141),M=a(264),D=y("toStringTag"),L="IteratorHelper",B="WrapForValidIterator",F="normal",k="throw",W=b.set,U=function(H){var Y=b.getterFor(H?B:L);return x(v(I),{next:function(){var _=Y(this);if(H)return _.nextHandler();if(_.done)return R(void 0,!0);try{var K=_.nextHandler();return _.returnHandlerResult?K:R(K,_.done)}catch(tt){throw _.done=!0,tt}},return:function(){var Z=Y(this),_=Z.iterator,K=Z.done;if(Z.done=!0,H){var tt=A(_,"return");return tt?g(tt,_):R(void 0,!0)}if(K)return R(void 0,!0);if(Z.inner)try{O(Z.inner.iterator,F)}catch(nt){return O(_,k,nt)}if(Z.openIters)try{M(Z.openIters,F)}catch(nt){if(_)return O(_,k,nt);throw nt}return _&&O(_,F),R(void 0,!0)}})},X=U(!0),j=U(!1);p(j,D,"Iterator Helper"),T.exports=function(H,Y,Z){var _=function(tt,nt){nt?(nt.iterator=tt.iterator,nt.next=tt.next):nt=tt,nt.type=Y?B:L,nt.returnHandlerResult=!!Z,nt.nextHandler=H,nt.counter=0,nt.done=!1,W(this,nt)};return _.prototype=Y?X:j,_}}),(function(T,P,a){var g=a(141);T.exports=function(v,p,x){for(var y=v.length-1;y>=0;y--)if(v[y]!==void 0)try{x=g(v[y].iterator,p,x)}catch(b){p="throw",x=b}if(p==="throw")throw x;return x}}),(function(T,P,a){var g=a(8),v=a(47),p=a(29),x=a(38),y=a(33),b=a(178).IteratorPrototype,A=y("dispose");x(b,A)||v(b,A,function(){var I=p(this,"return");I&&g(I,this)})}),(function(T,P,a){var g=a(3),v=a(8),p=a(46),x=a(267),y=a(268),b=a(269),A=a(141),I=a(263),R=a(270),O=a(271),M=a(36),D=!M&&!R("drop",0),L=!M&&!D&&O("drop",RangeError),B=M||D||L,F=I(function(){for(var k=this.iterator,W=this.next,U,X;this.remaining;)if(this.remaining--,U=p(v(W,k)),X=this.done=!!U.done,X)return;if(U=p(v(W,k)),X=this.done=!!U.done,!X)return U.value});g({target:"Iterator",proto:!0,real:!0,forced:B},{drop:function(W){p(this);var U;try{U=b(y(+W))}catch(X){A(this,"throw",X)}return L?v(L,this,U):new F(x(this),{remaining:U})}})}),(function(T){T.exports=function(P){return{iterator:P,next:P.next,done:!1}}}),(function(T){var P=RangeError;T.exports=function(a){if(a===a)return a;throw new P("NaN is not allowed")}}),(function(T,P,a){var g=a(61),v=RangeError;T.exports=function(p){var x=g(p);if(x<0)throw new v("The argument can't be less than 0");return x}}),(function(T){T.exports=function(P,a){var g=typeof Iterator=="function"&&Iterator.prototype[P];if(g)try{g.call({next:null},a).next()}catch(v){return!0}}}),(function(T,P,a){var g=a(4);T.exports=function(v,p){var x=g.Iterator,y=x&&x.prototype,b=y&&y[v],A=!1;if(b)try{b.call({next:function(){return{done:!0}},return:function(){A=!0}},-1)}catch(I){I instanceof p||(A=!1)}if(!A)return b}}),(function(T,P,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),b=a(267),A=a(141),I=a(271),R=I("every",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{every:function(M){y(this);try{x(M)}catch(B){A(this,"throw",B)}if(R)return v(R,this,M);var D=b(this),L=0;return!p(D,function(B,F){if(!M(B,L++))return F()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(267),b=a(263),A=a(170),I=a(36),R=a(141),O=a(270),M=a(271),D=!I&&!O("filter",function(){}),L=!I&&!D&&M("filter",TypeError),B=I||D||L,F=b(function(){for(var k=this.iterator,W=this.predicate,U=this.next,X,j,H;;){if(X=x(v(U,k)),j=this.done=!!X.done,j)return;if(H=X.value,A(k,W,[H,this.counter++],!0))return H}});g({target:"Iterator",proto:!0,real:!0,forced:B},{filter:function(W){x(this);try{p(W)}catch(U){R(this,"throw",U)}return L?v(L,this,W):new F(y(this),{predicate:W})}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),b=a(267),A=a(141),I=a(271),R=I("find",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{find:function(M){y(this);try{x(M)}catch(B){A(this,"throw",B)}if(R)return v(R,this,M);var D=b(this),L=0;return p(D,function(B,F){if(M(B,L++))return F(B)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(267),b=a(276),A=a(263),I=a(141),R=a(36),O=a(270),M=a(271);function D(){try{var W=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(U){return U});W.next(),W.return()}catch(U){return!0}}var L=!R&&!O("flatMap",function(){}),B=!R&&!L&&M("flatMap",TypeError),F=R||L||B||D(),k=A(function(){for(var W=this.iterator,U=this.mapper,X,j;;){if(j=this.inner)try{if(X=x(v(j.next,j.iterator)),!X.done)return X.value;this.inner=null}catch(H){I(W,"throw",H)}if(X=x(v(this.next,W)),this.done=!!X.done)return;try{this.inner=b(U(X.value,this.counter++),!1)}catch(H){I(W,"throw",H)}}});g({target:"Iterator",proto:!0,real:!0,forced:F},{flatMap:function(U){x(this);try{p(U)}catch(X){I(this,"throw",X)}return B?v(B,this,U):new k(y(this),{mapper:U,inner:null})}})}),(function(T,P,a){var g=a(8),v=a(46),p=a(267),x=a(140);T.exports=function(y,b){(!b||typeof y!="string")&&v(y);var A=x(y);return p(v(A!==void 0?g(A,y):y))}}),(function(T,P,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),b=a(267),A=a(141),I=a(271),R=I("forEach",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{forEach:function(M){y(this);try{x(M)}catch(B){A(this,"throw",B)}if(R)return v(R,this,M);var D=b(this),L=0;p(D,function(B){M(B,L++)},{IS_RECORD:!0})}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(39),x=a(24),y=a(178).IteratorPrototype,b=a(263),A=a(276),I=a(36),R=I||(function(){try{Iterator.from({return:null}).return()}catch(M){return!0}})(),O=b(function(){return v(this.next,this.iterator)},!0);g({target:"Iterator",stat:!0,forced:R},{from:function(D){var L=A(typeof D=="string"?p(D):D,!0);return x(y,L.iterator)?L.iterator:new O(L)}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(267),b=a(263),A=a(170),I=a(141),R=a(270),O=a(271),M=a(36),D=!M&&!R("map",function(){}),L=!M&&!D&&O("map",TypeError),B=M||D||L,F=b(function(){var k=this.iterator,W=x(v(this.next,k)),U=this.done=!!W.done;if(!U)return A(k,this.mapper,[W.value,this.counter++],!0)});g({target:"Iterator",proto:!0,real:!0,forced:B},{map:function(W){x(this);try{p(W)}catch(U){I(this,"throw",U)}return L?v(L,this,W):new F(y(this),{mapper:W})}})}),(function(T,P,a){var g=a(3),v=a(136),p=a(30),x=a(46),y=a(267),b=a(141),A=a(271),I=a(95),R=a(7),O=TypeError,M=R(function(){[].keys().reduce(function(){},void 0)}),D=!M&&A("reduce",O);g({target:"Iterator",proto:!0,real:!0,forced:M||D},{reduce:function(B){x(this);try{p(B)}catch(X){b(this,"throw",X)}var F=arguments.length<2,k=F?void 0:arguments[1];if(D)return I(D,this,F?[B]:[B,k]);var W=y(this),U=0;if(v(W,function(X){F?(F=!1,k=X):k=B(k,X,U),U++},{IS_RECORD:!0}),F)throw new O("Reduce of empty iterator with no initial value");return k}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),b=a(267),A=a(141),I=a(271),R=I("some",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{some:function(M){y(this);try{x(M)}catch(B){A(this,"throw",B)}if(R)return v(R,this,M);var D=b(this),L=0;return p(D,function(B,F){if(M(B,L++))return F()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(46),x=a(267),y=a(268),b=a(269),A=a(263),I=a(141),R=a(270),O=a(271),M=a(36),D=!M&&!R("take",1),L=!M&&!D&&O("take",RangeError),B=M||D||L,F=A(function(){var k=this.iterator;if(!this.remaining--)return this.done=!0,I(k,"normal",void 0);var W=p(v(this.next,k)),U=this.done=!!W.done;if(!U)return W.value});g({target:"Iterator",proto:!0,real:!0,forced:B},{take:function(W){p(this);var U;try{U=b(y(+W))}catch(X){I(this,"throw",X)}return L?v(L,this,U):new F(x(this),{remaining:U})}})}),(function(T,P,a){var g=a(3),v=a(46),p=a(90),x=a(136),y=a(267);g({target:"Iterator",proto:!0,real:!0},{toArray:function(){var A=[],I=0;return x(y(v(this)),function(R){p(A,I++,R)},{IS_RECORD:!0}),A}})}),(function(T,P,a){var g=a(3),v=a(98),p=a(96);g({target:"JSON",stat:!0,forced:!v},{isRawJSON:p})}),(function(T,P,a){var g=a(3),v=a(6),p=a(4),x=a(23),y=a(14),b=a(8),A=a(21),I=a(20),R=a(88),O=a(38),M=a(68),D=a(63),L=a(90),B=a(7),F=a(97),k=a(26),W=p.JSON,U=p.Number,X=p.SyntaxError,j=W&&W.parse,H=x("Object","keys"),Y=Object.getOwnPropertyDescriptor,Z=y("".charAt),_=y("".slice),K=y(/./.exec),tt=y([].push),nt=/^\d$/,at=/^[1-9]$/,it=/^[\d-]$/,ot=/^[\t\n\r ]$/,ut=0,ht=1,gt=function(mt,xt){mt=M(mt);var wt=new Ft(mt,0,""),Bt=wt.parse(),Jt=Bt.value,Ot=wt.skip(ot,Bt.end);if(Ot<mt.length)throw new X('Unexpected extra character: "'+Z(mt,Ot)+'" after the parsed data at: '+Ot);return A(xt)?yt({"":Jt},"",xt,Bt):Jt},yt=function(mt,xt,wt,Bt){var Jt=mt[xt],Ot=Bt&&Jt===Bt.value,jt=Ot&&typeof Bt.source=="string"?{source:Bt.source}:{},ie,me,se,he,Oe;if(I(Jt)){var Me=R(Jt),Re=Ot?Bt.nodes:Me?[]:{};if(Me)for(ie=Re.length,se=D(Jt),he=0;he<se;he++)Et(Jt,he,yt(Jt,""+he,wt,he<ie?Re[he]:void 0));else for(me=H(Jt),se=D(me),he=0;he<se;he++)Oe=me[he],Et(Jt,Oe,yt(Jt,Oe,wt,O(Re,Oe)?Re[Oe]:void 0))}return b(wt,mt,xt,Jt,jt)},Et=function(mt,xt,wt){if(v){var Bt=Y(mt,xt);if(Bt&&!Bt.configurable)return}wt===void 0?delete mt[xt]:L(mt,xt,wt)},bt=function(mt,xt,wt,Bt){this.value=mt,this.end=xt,this.source=wt,this.nodes=Bt},Ft=function(mt,xt){this.source=mt,this.index=xt};Ft.prototype={fork:function(mt){return new Ft(this.source,mt)},parse:function(){var mt=this.source,xt=this.skip(ot,this.index),wt=this.fork(xt),Bt=Z(mt,xt);if(K(it,Bt))return wt.number();switch(Bt){case"{":return wt.object();case"[":return wt.array();case'"':return wt.string();case"t":return wt.keyword(!0);case"f":return wt.keyword(!1);case"n":return wt.keyword(null)}throw new X('Unexpected character: "'+Bt+'" at: '+xt)},node:function(mt,xt,wt,Bt,Jt){return new bt(xt,Bt,mt?null:_(this.source,wt,Bt),Jt)},object:function(){for(var mt=this.source,xt=this.index+1,wt=!1,Bt={},Jt={},Ot=!1;xt<mt.length;){if(xt=this.until(['"',"}"],xt),Z(mt,xt)==="}"&&!wt){xt++,Ot=!0;break}var jt=this.fork(xt).string(),ie=jt.value;xt=jt.end,xt=this.until([":"],xt)+1,xt=this.skip(ot,xt),jt=this.fork(xt).parse(),L(Jt,ie,jt),L(Bt,ie,jt.value),xt=this.until([",","}"],jt.end);var me=Z(mt,xt);if(me===",")wt=!0,xt++;else if(me==="}"){xt++,Ot=!0;break}}if(!Ot)throw new X("Unterminated object at: "+xt);return this.node(ht,Bt,this.index,xt,Jt)},array:function(){for(var mt=this.source,xt=this.index+1,wt=!1,Bt=[],Jt=[],Ot=!1;xt<mt.length;){if(xt=this.skip(ot,xt),Z(mt,xt)==="]"&&!wt){xt++,Ot=!0;break}var jt=this.fork(xt).parse();if(tt(Jt,jt),tt(Bt,jt.value),xt=this.until([",","]"],jt.end),Z(mt,xt)===",")wt=!0,xt++;else if(Z(mt,xt)==="]"){xt++,Ot=!0;break}}if(!Ot)throw new X("Unterminated array at: "+xt);return this.node(ht,Bt,this.index,xt,Jt)},string:function(){var mt=this.index,xt=F(this.source,this.index+1);return this.node(ut,xt.value,mt,xt.end)},number:function(){var mt=this.source,xt=this.index,wt=xt;if(Z(mt,wt)==="-"&&wt++,Z(mt,wt)==="0")wt++;else if(K(at,Z(mt,wt)))wt=this.skip(nt,wt+1);else throw new X("Failed to parse number at: "+wt);if(Z(mt,wt)==="."){var Bt=wt+1;if(wt=this.skip(nt,Bt),Bt===wt)throw new X("Failed to parse number's fraction at: "+wt)}if(Z(mt,wt)==="e"||Z(mt,wt)==="E"){wt++,(Z(mt,wt)==="+"||Z(mt,wt)==="-")&&wt++;var Jt=wt;if(wt=this.skip(nt,wt),Jt===wt)throw new X("Failed to parse number's exponent value at: "+wt)}return this.node(ut,U(_(mt,xt,wt)),xt,wt)},keyword:function(mt){var xt=""+mt,wt=this.index,Bt=wt+xt.length;if(_(this.source,wt,Bt)!==xt)throw new X("Failed to parse value at: "+wt);return this.node(ut,mt,wt,Bt)},skip:function(mt,xt){for(var wt=this.source;xt<wt.length&&K(mt,Z(wt,xt));xt++);return xt},until:function(mt,xt){xt=this.skip(ot,xt);for(var wt=Z(this.source,xt),Bt=0;Bt<mt.length;Bt++)if(mt[Bt]===wt)return xt;throw new X('Unexpected character: "'+wt+'" at: '+xt)}};var Lt=B(function(){var mt="9007199254740993",xt;return j(mt,function(wt,Bt,Jt){xt=Jt.source}),xt!==mt}),Pt=k&&!B(function(){return 1/j("-0 ")!==-1/0});g({target:"JSON",stat:!0,forced:Lt},{parse:function(xt,wt){return Pt&&!A(wt)?j(xt):gt(xt,wt)}})}),(function(T,P,a){var g=a(3),v=a(287),p=a(98),x=a(23),y=a(14),b=a(68),A=a(90),I=a(51).set,R=SyntaxError,O=x("JSON","parse"),M=x("Object","create"),D=x("Object","freeze"),L=y("".charAt),B="Unacceptable as raw JSON",F=function(k){return k===" "||k===" "||k===`
26
- `||k==="\r"};g({target:"JSON",stat:!0,forced:!p},{rawJSON:function(W){var U=b(W);if(U===""||F(L(U,0))||F(L(U,U.length-1)))throw new R(B);var X=O(U);if(typeof X=="object"&&X!==null)throw new R(B);var j=M(null);return I(j,{type:"RawJSON"}),A(j,"rawJSON",U),v?D(j):j}})}),(function(T,P,a){var g=a(7);T.exports=!g(function(){return Object.isExtensible(Object.preventExtensions({}))})}),(function(T,P,a){var g=a(4),v=a(82);v(g.JSON,"JSON",!0)}),(function(T,P,a){a(290)}),(function(T,P,a){var g=a(291),v=a(295);g("Map",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},v)}),(function(T,P,a){var g=a(3),v=a(4),p=a(14),x=a(67),y=a(47),b=a(292),A=a(136),I=a(215),R=a(21),O=a(17),M=a(20),D=a(7),L=a(171),B=a(82),F=a(123);T.exports=function(k,W,U){var X=k.indexOf("Map")!==-1,j=k.indexOf("Weak")!==-1,H=X?"set":"add",Y=v[k],Z=Y&&Y.prototype,_=Y,K={},tt=function(gt){var yt=p(Z[gt]);y(Z,gt,gt==="add"?function(bt){return yt(this,bt===0?0:bt),this}:gt==="delete"?function(Et){return j&&!M(Et)?!1:yt(this,Et===0?0:Et)}:gt==="get"?function(bt){return j&&!M(bt)?void 0:yt(this,bt===0?0:bt)}:gt==="has"?function(bt){return j&&!M(bt)?!1:yt(this,bt===0?0:bt)}:function(bt,Ft){return yt(this,bt===0?0:bt,Ft),this})},nt=x(k,!R(Y)||!(j||Z.forEach&&!D(function(){new Y().entries().next()})));if(nt)_=U.getConstructor(W,k,X,H),b.enable();else if(x(k,!0)){var at=new _,it=at[H](j?{}:-0,1)!==at,ot=D(function(){at.has(1)}),ut=L(function(gt){new Y(gt)}),ht=!j&&D(function(){for(var gt=new Y,yt=5;yt--;)gt[H](yt,yt);return!gt.has(-0)});ut||(_=W(function(gt,yt){I(gt,Z);var Et=F(new Y,gt,_);return O(yt)||A(yt,Et[H],{that:Et,AS_ENTRIES:X}),Et}),_.prototype=Z,Z.constructor=_),(ot||ht)&&(tt("delete"),tt("has"),X&&tt("get")),(ht||it)&&tt(H),j&&Z.clear&&delete Z.clear}return K[k]=_,g({global:!0,constructor:!0,forced:_!==Y},K),B(_,k),j||U.setStrong(_,k,X),_}}),(function(T,P,a){var g=a(3),v=a(14),p=a(54),x=a(20),y=a(38),b=a(44).f,A=a(57),I=a(75),R=a(293),O=a(40),M=a(287),D=!1,L=O("meta"),B=0,F=function(H){b(H,L,{value:{objectID:"O"+B++,weakData:{}}})},k=function(H,Y){if(!x(H))return typeof H=="symbol"?H:(typeof H=="string"?"S":"P")+H;if(!y(H,L)){if(!R(H))return"F";if(!Y)return"E";F(H)}return H[L].objectID},W=function(H,Y){if(!y(H,L)){if(!R(H))return!0;if(!Y)return!1;F(H)}return H[L].weakData},U=function(H){return M&&D&&R(H)&&!y(H,L)&&F(H),H},X=function(){j.enable=function(){},D=!0;var H=A.f,Y=v([].splice),Z={};Z[L]=1,H(Z).length&&(A.f=function(_){for(var K=H(_),tt=0,nt=K.length;tt<nt;tt++)if(K[tt]===L){Y(K,tt,1);break}return K},g({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:I.f}))},j=T.exports={enable:X,fastKey:k,getWeakData:W,onFreeze:U};p[L]=!0}),(function(T,P,a){var g=a(7),v=a(20),p=a(15),x=a(294),y=Object.isExtensible,b=g(function(){y(1)});T.exports=b||x?function(I){return!v(I)||x&&p(I)==="ArrayBuffer"?!1:y?y(I):!0}:y}),(function(T,P,a){var g=a(7);T.exports=g(function(){if(typeof ArrayBuffer=="function"){var v=new ArrayBuffer(8);Object.isExtensible(v)&&Object.defineProperty(v,"a",{value:8})}})}),(function(T,P,a){var g=a(71),v=a(77),p=a(214),x=a(84),y=a(215),b=a(17),A=a(136),I=a(176),R=a(179),O=a(200),M=a(6),D=a(292).fastKey,L=a(51),B=L.set,F=L.getterFor;T.exports={getConstructor:function(k,W,U,X){var j=k(function(K,tt){y(K,H),B(K,{type:W,index:g(null),first:null,last:null,size:0}),M||(K.size=0),b(tt)||A(tt,K[X],{that:K,AS_ENTRIES:U})}),H=j.prototype,Y=F(W),Z=function(K,tt,nt){var at=Y(K),it=_(K,tt),ot,ut;return it?it.value=nt:(at.last=it={index:ut=D(tt,!0),key:tt,value:nt,previous:ot=at.last,next:null,removed:!1},at.first||(at.first=it),ot&&(ot.next=it),M?at.size++:K.size++,ut!=="F"&&(at.index[ut]=it)),K},_=function(K,tt){var nt=Y(K),at=D(tt),it;if(at!=="F")return nt.index[at];for(it=nt.first;it;it=it.next)if(it.key===tt)return it};return p(H,{clear:function(){for(var tt=this,nt=Y(tt),at=nt.first;at;)at.removed=!0,at.previous&&(at.previous=at.previous.next=null),at=at.next;nt.first=nt.last=null,nt.index=g(null),M?nt.size=0:tt.size=0},delete:function(K){var tt=this,nt=Y(tt),at=_(tt,K);if(at){var it=at.next,ot=at.previous;delete nt.index[at.index],at.removed=!0,ot&&(ot.next=it),it&&(it.previous=ot),nt.first===at&&(nt.first=it),nt.last===at&&(nt.last=ot),M?nt.size--:tt.size--}return!!at},forEach:function(tt){for(var nt=Y(this),at=x(tt,arguments.length>1?arguments[1]:void 0),it;it=it?it.next:nt.first;)for(at(it.value,it.key,this);it&&it.removed;)it=it.previous},has:function(tt){return!!_(this,tt)}}),p(H,U?{get:function(tt){var nt=_(this,tt);return nt&&nt.value},set:function(tt,nt){return Z(this,tt===0?0:tt,nt)}}:{add:function(tt){return Z(this,tt=tt===0?0:tt,tt)}}),M&&v(H,"size",{configurable:!0,get:function(){return Y(this).size}}),j},setStrong:function(k,W,U){var X=W+" Iterator",j=F(W),H=F(X);I(k,W,function(Y,Z){B(this,{type:X,target:Y,state:j(Y),kind:Z,last:null})},function(){for(var Y=H(this),Z=Y.kind,_=Y.last;_&&_.removed;)_=_.previous;return!Y.target||!(Y.last=_=_?_.next:Y.state.first)?(Y.target=null,R(void 0,!0)):R(Z==="keys"?_.key:Z==="values"?_.value:[_.key,_.value],!1)},U?"entries":"values",!U,!0),O(W)}}}),(function(T,P,a){var g=a(3),v=a(14),p=a(30),x=a(16),y=a(136),b=a(297),A=a(36),I=a(7),R=b.Map,O=b.has,M=b.get,D=b.set,L=v([].push),B=A||I(function(){return R.groupBy("ab",function(F){return F}).get("a").length!==1});g({target:"Map",stat:!0,forced:A||B},{groupBy:function(k,W){x(k),p(W);var U=new R,X=0;return y(k,function(j){var H=W(j,X++);O(U,H)?L(M(U,H),j):D(U,H,[j])}),U}})}),(function(T,P,a){var g=a(14),v=Map.prototype;T.exports={Map,set:g(v.set),get:g(v.get),has:g(v.has),remove:g(v.delete),proto:v}}),(function(T,P,a){var g=a(3),v=a(297),p=a(36),x=v.get,y=v.has,b=v.set;g({target:"Map",proto:!0,real:!0,forced:p},{getOrInsert:function(I,R){return y(this,I)?x(this,I):(b(this,I,R),R)}})}),(function(T,P,a){var g=a(3),v=a(30),p=a(297),x=a(36),y=p.get,b=p.has,A=p.set;g({target:"Map",proto:!0,real:!0,forced:x},{getOrInsertComputed:function(R,O){var M=b(this,R);if(v(O),M)return y(this,R);R===0&&1/R===-1/0&&(R=0);var D=O(R);return A(this,R,D),D}})}),(function(T,P,a){var g=a(3),v=a(301),p=Math.acosh,x=Math.log,y=Math.sqrt,b=Math.LN2,A=!p||Math.floor(p(Number.MAX_VALUE))!==710||p(1/0)!==1/0;g({target:"Math",stat:!0,forced:A},{acosh:function(R){var O=+R;return O<1?NaN:O>9490626562425156e-8?x(O)+b:v(O-1+y(O-1)*y(O+1))}})}),(function(T){var P=Math.log;T.exports=Math.log1p||function(g){var v=+g;return v>-1e-8&&v<1e-8?v-v*v/2:P(1+v)}}),(function(T,P,a){var g=a(3),v=Math.asinh,p=Math.log,x=Math.sqrt,y=Math.LN2,b=9490626562425156e-8;function A(R){var O=+R;return!isFinite(O)||O===0?O:O<0?-A(-O):O>b?p(O)+y:p(O+x(O*O+1))}var I=!(v&&1/v(0)>0);g({target:"Math",stat:!0,forced:I},{asinh:A})}),(function(T,P,a){var g=a(3),v=a(301),p=Math.atanh,x=!(p&&1/p(-0)<0);g({target:"Math",stat:!0,forced:x},{atanh:function(b){var A=+b;return A===0?A:v(2*A/(1-A))/2}})}),(function(T,P,a){var g=a(3),v=a(219),p=Math.abs,x=Math.pow;g({target:"Math",stat:!0},{cbrt:function(b){var A=+b;return v(A)*x(p(A),.3333333333333333)}})}),(function(T,P,a){var g=a(3),v=Math.floor,p=Math.log,x=Math.LOG2E;g({target:"Math",stat:!0},{clz32:function(b){var A=b>>>0;return A?31-v(p(A+.5)*x):32}})}),(function(T,P,a){var g=a(3),v=a(307),p=Math.cosh,x=Math.abs,y=Math.E,b=!p||p(710)===1/0;g({target:"Math",stat:!0,forced:b},{cosh:function(I){var R=v(x(I)-1)+1;return(R+1/(R*y*y))*(y/2)}})}),(function(T){var P=Math.expm1,a=Math.exp;T.exports=!P||P(10)>22025.465794806718||P(10)<22025.465794806718||P(-2e-17)!==-2e-17?function(v){var p=+v;return p===0?p:p>-1e-6&&p<1e-6?p+p*p/2:a(p)-1}:P}),(function(T,P,a){var g=a(3),v=a(307);g({target:"Math",stat:!0,forced:v!==Math.expm1},{expm1:v})}),(function(T,P,a){var g=a(3),v=a(217);g({target:"Math",stat:!0},{fround:v})}),(function(T,P,a){var g=a(3),v=a(218),p=.0009765625,x=65504,y=6103515625e-14;g({target:"Math",stat:!0},{f16round:function(A){return v(A,p,x,y)}})}),(function(T,P,a){var g=a(3),v=Math.hypot,p=Math.abs,x=Math.sqrt,y=!!v&&v(1/0,NaN)!==1/0;g({target:"Math",stat:!0,arity:2,forced:y},{hypot:function(A,I){for(var R=0,O=0,M=arguments.length,D=0,L,B;O<M;)L=p(arguments[O++]),D<L?(B=D/L,R=R*B*B+1,D=L):L>0?(B=L/D,R+=B*B):R+=L;return D===1/0?1/0:D*x(R)}})}),(function(T,P,a){var g=a(3),v=a(7),p=Math.imul,x=v(function(){return p(4294967295,5)!==-5||p.length!==2});g({target:"Math",stat:!0,forced:x},{imul:function(b,A){var I=65535,R=+b,O=+A,M=I&R,D=I&O;return 0|M*D+((I&R>>>16)*D+M*(I&O>>>16)<<16>>>0)}})}),(function(T,P,a){var g=a(3),v=a(314);g({target:"Math",stat:!0},{log10:v})}),(function(T){var P=Math.log,a=Math.LOG10E;T.exports=Math.log10||function(v){return P(v)*a}}),(function(T,P,a){var g=a(3),v=a(301);g({target:"Math",stat:!0},{log1p:v})}),(function(T,P,a){var g=a(3),v=a(230);g({target:"Math",stat:!0},{log2:v})}),(function(T,P,a){var g=a(3),v=a(219);g({target:"Math",stat:!0},{sign:v})}),(function(T,P,a){var g=a(3),v=a(7),p=a(307),x=Math.abs,y=Math.exp,b=Math.E,A=v(function(){return Math.sinh(-2e-17)!==-2e-17});g({target:"Math",stat:!0,forced:A},{sinh:function(R){var O=+R;return x(O)<1?(p(O)-p(-O))/2:(y(O-1)-y(-O-1))*(b/2)}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(136),x=RangeError,y=TypeError,b=1/0,A=NaN,I=Math.abs,R=Math.pow,O=v([].push),M=R(2,1023),D=R(2,53)-1,L=Number.MAX_VALUE,B=R(2,971),F={},k={},W={},U={},X={},j=function(H,Y){var Z=H+Y,_=Y-(Z-H);return{hi:Z,lo:_}};g({target:"Math",stat:!0},{sumPrecise:function(Y){var Z=[],_=0,K=U;switch(p(Y,function(mt){if(++_>D)throw new x("Maximum allowed index exceeded");if(typeof mt!="number")throw new y("Value is not a number");K!==F&&(mt!==mt?K=F:mt===b?K=K===k?F:W:mt===-b?K=K===W?F:k:(mt!==0||1/mt===b)&&(K===U||K===X)&&(K=X,O(Z,mt)))}),K){case F:return A;case k:return-b;case W:return b;case U:return-0}for(var tt=[],nt=0,at,it,ot,ut,ht,gt,yt=0;yt<Z.length;yt++){at=Z[yt];for(var Et=0,bt=0;bt<tt.length;bt++){if(it=tt[bt],I(at)<I(it)&&(gt=at,at=it,it=gt),ot=j(at,it),ut=ot.hi,ht=ot.lo,I(ut)===b){var Ft=ut===b?1:-1;nt+=Ft,at=at-Ft*M-Ft*M,I(at)<I(it)&&(gt=at,at=it,it=gt),ot=j(at,it),ut=ot.hi,ht=ot.lo}ht!==0&&(tt[Et++]=ht),at=ut}tt.length=Et,at!==0&&O(tt,at)}var Lt=tt.length-1;if(ut=0,ht=0,nt!==0){var Pt=Lt>=0?tt[Lt]:0;if(Lt--,I(nt)>1||nt>0&&Pt>0||nt<0&&Pt<0)return nt>0?b:-b;if(ot=j(nt*M,Pt/2),ut=ot.hi,ht=ot.lo,ht*=2,I(2*ut)===b)return ut>0?ut===M&&ht===-(B/2)&&Lt>=0&&tt[Lt]<0?L:b:ut===-M&&ht===B/2&&Lt>=0&&tt[Lt]>0?-L:-b;ht!==0&&(tt[++Lt]=ht,ht=0),ut*=2}for(;Lt>=0&&(ot=j(ut,tt[Lt--]),ut=ot.hi,ht=ot.lo,ht===0););return Lt>=0&&(ht<0&&tt[Lt]<0||ht>0&&tt[Lt]>0)&&(it=ht*2,at=ut+it,it===at-ut&&(ut=at)),ut}})}),(function(T,P,a){var g=a(3),v=a(307),p=Math.exp;g({target:"Math",stat:!0},{tanh:function(y){var b=+y,A=v(b),I=v(-b);return A===1/0?1:I===1/0?-1:(A-I)/(p(b)+p(-b))}})}),(function(T,P,a){var g=a(82);g(Math,"Math",!0)}),(function(T,P,a){var g=a(3),v=a(62);g({target:"Math",stat:!0},{trunc:v})}),(function(T,P,a){var g=a(3),v=a(36),p=a(6),x=a(4),y=a(80),b=a(14),A=a(67),I=a(38),R=a(123),O=a(24),M=a(22),D=a(19),L=a(7),B=a(57).f,F=a(5).f,k=a(44).f,W=a(324),U=a(325).trim,X="Number",j=x[X],H=y[X],Y=j.prototype,Z=x.TypeError,_=b("".slice),K=b("".charCodeAt),tt=function(ht){var gt=D(ht,"number");return typeof gt=="bigint"?gt:nt(gt)},nt=function(ht){var gt=D(ht,"number"),yt,Et,bt,Ft,Lt,Pt,mt,xt;if(M(gt))throw new Z("Cannot convert a Symbol value to a number");if(typeof gt=="string"&&gt.length>2){if(gt=U(gt),yt=K(gt,0),yt===43||yt===45){if(Et=K(gt,2),Et===88||Et===120)return NaN}else if(yt===48){switch(K(gt,1)){case 66:case 98:bt=2,Ft=49;break;case 79:case 111:bt=8,Ft=55;break;default:return+gt}for(Lt=_(gt,2),Pt=Lt.length,mt=0;mt<Pt;mt++)if(xt=K(Lt,mt),xt<48||xt>Ft)return NaN;return parseInt(Lt,bt)}}return+gt},at=A(X,!j(" 0o1")||!j("0b1")||j("+0x1")),it=function(ht){return O(Y,ht)&&L(function(){W(ht)})},ot=function(gt){var yt=arguments.length<1?0:j(tt(gt));return it(this)?R(Object(yt),this,ot):yt};ot.prototype=Y,at&&!v&&(Y.constructor=ot),g({global:!0,constructor:!0,wrap:!0,forced:at},{Number:ot});var ut=function(ht,gt){for(var yt=p?B(gt):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Et=0,bt;yt.length>Et;Et++)I(gt,bt=yt[Et])&&!I(ht,bt)&&k(ht,bt,F(gt,bt))};v&&H&&ut(y[X],H),(at||v)&&ut(y[X],j)}),(function(T,P,a){var g=a(14);T.exports=g(1.1.valueOf)}),(function(T,P,a){var g=a(14),v=a(16),p=a(68),x=a(326),y=g("".replace),b=RegExp("^["+x+"]+"),A=RegExp("(^|[^"+x+"])["+x+"]+$"),I=function(R){return function(O){var M=p(v(O));return R&1&&(M=y(M,b,"")),R&2&&(M=y(M,A,"$1")),M}};T.exports={start:I(1),end:I(2),trim:I(3)}}),(function(T){T.exports=`
27
- \v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`}),(function(T,P,a){var g=a(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})}),(function(T,P,a){var g=a(3),v=a(329);g({target:"Number",stat:!0},{isFinite:v})}),(function(T,P,a){var g=a(4),v=g.isFinite;T.exports=Number.isFinite||function(x){return typeof x=="number"&&v(x)}}),(function(T,P,a){var g=a(3),v=a(331);g({target:"Number",stat:!0},{isInteger:v})}),(function(T,P,a){var g=a(20),v=Math.floor;T.exports=Number.isInteger||function(x){return!g(x)&&isFinite(x)&&v(x)===x}}),(function(T,P,a){var g=a(3);g({target:"Number",stat:!0},{isNaN:function(p){return p!==p}})}),(function(T,P,a){var g=a(3),v=a(331),p=Math.abs;g({target:"Number",stat:!0},{isSafeInteger:function(y){return v(y)&&p(y)<=9007199254740991}})}),(function(T,P,a){var g=a(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})}),(function(T,P,a){var g=a(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})}),(function(T,P,a){var g=a(3),v=a(337);g({target:"Number",stat:!0,forced:Number.parseFloat!==v},{parseFloat:v})}),(function(T,P,a){var g=a(4),v=a(7),p=a(14),x=a(68),y=a(325).trim,b=a(326),A=p("".charAt),I=g.parseFloat,R=g.Symbol,O=R&&R.iterator,M=1/I(b+"-0")!==-1/0||O&&!v(function(){I(Object(O))});T.exports=M?function(L){var B=y(x(L)),F=I(B);return F===0&&A(B,0)==="-"?-0:F}:I}),(function(T,P,a){var g=a(3),v=a(339);g({target:"Number",stat:!0,forced:Number.parseInt!==v},{parseInt:v})}),(function(T,P,a){var g=a(4),v=a(7),p=a(14),x=a(68),y=a(325).trim,b=a(326),A=g.parseInt,I=g.Symbol,R=I&&I.iterator,O=/^[+-]?0x/i,M=p(O.exec),D=A(b+"08")!==8||A(b+"0x16")!==22||R&&!v(function(){A(Object(R))});T.exports=D?function(B,F){var k=y(x(B));return A(k,F>>>0||(M(O,k)?16:10))}:A}),(function(T,P,a){var g=a(3),v=a(14),p=a(61),x=a(324),y=a(248),b=a(314),A=a(7),I=RangeError,R=String,O=isFinite,M=Math.abs,D=Math.floor,L=Math.pow,B=Math.round,F=v(1.1.toExponential),k=v(y),W=v("".slice),U=L(10,308),X=F(-69e-12,4)==="-6.9000e-11"&&F(1.255,2)==="1.25e+0"&&F(12345,3)==="1.235e+4"&&F(25,0)==="3e+1",j=function(){return A(function(){F(1,1/0)})&&A(function(){F(1,-1/0)})},H=function(){return!A(function(){F(1/0,1/0),F(NaN,1/0)})},Y=!X||!j()||!H();g({target:"Number",proto:!0,forced:Y},{toExponential:function(_){var K=x(this);if(_===void 0)return F(K);var tt=p(_);if(!O(K))return String(K);if(tt<0||tt>20)throw new I("Incorrect fraction digits");if(X)return F(K,tt);var nt="",at,it,ot,ut,ht,gt,yt;return K<0&&(nt="-",K=-K),K===0?(it=0,at=k("0",tt+1)):(ht=b(K),it=D(ht),tt-it>=308?yt=K*U*L(10,tt-it-308):yt=K/L(10,it-tt),gt=B(yt),yt-gt>=.5&&(gt+=1),gt>=L(10,tt+1)&&(gt/=10,it+=1),at=R(gt)),tt!==0&&(at=W(at,0,1)+"."+W(at,1)),it===0?(ot="+",ut="0"):(ot=it>0?"+":"-",ut=R(M(it))),at+="e"+ot+ut,nt+at}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(61),x=a(324),y=a(248),b=a(7),A=RangeError,I=String,R=Math.floor,O=v(y),M=v("".slice),D=v(1.1.toFixed),L=function(X,j,H){return j===0?H:j%2===1?L(X,j-1,H*X):L(X*X,j/2,H)},B=function(X){for(var j=0,H=X;H>=4096;)j+=12,H/=4096;for(;H>=2;)j+=1,H/=2;return j},F=function(X,j,H){for(var Y=-1,Z=H;++Y<6;)Z+=j*X[Y],X[Y]=Z%1e7,Z=R(Z/1e7)},k=function(X,j){for(var H=6,Y=0;--H>=0;)Y+=X[H],X[H]=R(Y/j),Y=Y%j*1e7},W=function(X){for(var j=6,H="";--j>=0;)if(H!==""||j===0||X[j]!==0){var Y=I(X[j]);H=H===""?Y:H+O("0",7-Y.length)+Y}return H},U=b(function(){return D(8e-5,3)!=="0.000"||D(.9,0)!=="1"||D(1.255,2)!=="1.25"||D(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!b(function(){D({})});g({target:"Number",proto:!0,forced:U},{toFixed:function(j){var H=x(this),Y=p(j),Z=[0,0,0,0,0,0],_="",K="0",tt,nt,at,it;if(Y<0||Y>20)throw new A("Incorrect fraction digits");if(H!==H)return"NaN";if(H<=-1e21||H>=1e21)return I(H);if(H<0&&(_="-",H=-H),H>1e-21)if(tt=B(H*L(2,69,1))-69,nt=tt<0?H*L(2,-tt,1):H/L(2,tt,1),nt*=4503599627370496,tt=52-tt,tt>0){for(F(Z,0,nt),at=Y;at>=7;)F(Z,1e7,0),at-=7;for(F(Z,L(10,at,1),0),at=tt-1;at>=23;)k(Z,8388608),at-=23;k(Z,1<<at),F(Z,1,1),k(Z,2),K=W(Z)}else F(Z,0,nt),F(Z,1<<-tt,0),K=W(Z)+O("0",Y);return Y>0?(it=K.length,K=_+(it<=Y?"0."+O("0",Y-it)+K:M(K,0,it-Y)+"."+M(K,it-Y))):K=_+K,K}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(7),x=a(324),y=v(1.1.toPrecision),b=p(function(){return y(1,void 0)!=="1"})||!p(function(){y({})});g({target:"Number",proto:!0,forced:b},{toPrecision:function(I){return I===void 0?y(x(this)):y(x(this),I)}})}),(function(T,P,a){var g=a(3),v=a(344);g({target:"Object",stat:!0,arity:2,forced:Object.assign!==v},{assign:v})}),(function(T,P,a){var g=a(6),v=a(14),p=a(8),x=a(7),y=a(73),b=a(66),A=a(10),I=a(39),R=a(13),O=Object.assign,M=Object.defineProperty,D=v([].concat);T.exports=!O||x(function(){if(g&&O({b:1},O(M({},"a",{enumerable:!0,get:function(){M(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var L={},B={},F=Symbol("assign detection"),k="abcdefghijklmnopqrst";return L[F]=7,k.split("").forEach(function(W){B[W]=W}),O({},L)[F]!==7||y(O({},B)).join("")!==k})?function(B,F){for(var k=I(B),W=arguments.length,U=1,X=b.f,j=A.f;W>U;)for(var H=R(arguments[U++]),Y=X?D(y(H),X(H)):y(H),Z=Y.length,_=0,K;Z>_;)K=Y[_++],(!g||p(j,H,K))&&(k[K]=H[K]);return k}:O}),(function(T,P,a){var g=a(3),v=a(6),p=a(71);g({target:"Object",stat:!0,sham:!v},{create:p})}),(function(T,P,a){var g=a(3),v=a(6),p=a(347),x=a(30),y=a(39),b=a(44);v&&g({target:"Object",proto:!0,forced:p},{__defineGetter__:function(I,R){b.f(y(this),I,{get:x(R),enumerable:!0,configurable:!0})}})}),(function(T,P,a){var g=a(36),v=a(4),p=a(7),x=a(198);T.exports=g||!p(function(){if(!(x&&x<535)){var y=Math.random();__defineSetter__.call(null,y,function(){}),delete v[y]}})}),(function(T,P,a){var g=a(3),v=a(6),p=a(72).f;g({target:"Object",stat:!0,forced:Object.defineProperties!==p,sham:!v},{defineProperties:p})}),(function(T,P,a){var g=a(3),v=a(6),p=a(44).f;g({target:"Object",stat:!0,forced:Object.defineProperty!==p,sham:!v},{defineProperty:p})}),(function(T,P,a){var g=a(3),v=a(6),p=a(347),x=a(30),y=a(39),b=a(44);v&&g({target:"Object",proto:!0,forced:p},{__defineSetter__:function(I,R){b.f(y(this),I,{set:x(R),enumerable:!0,configurable:!0})}})}),(function(T,P,a){var g=a(3),v=a(352).entries;g({target:"Object",stat:!0},{entries:function(x){return v(x)}})}),(function(T,P,a){var g=a(6),v=a(7),p=a(14),x=a(134),y=a(73),b=a(12),A=a(10).f,I=p(A),R=p([].push),O=g&&v(function(){var D=Object.create(null);return D[2]=2,!I(D,2)}),M=function(D){return function(L){for(var B=b(L),F=y(B),k=O&&x(B)===null,W=F.length,U=0,X=[],j;W>U;)j=F[U++],(!g||(k?j in B:I(B,j)))&&R(X,D?[j,B[j]]:B[j]);return X}};T.exports={entries:M(!0),values:M(!1)}}),(function(T,P,a){var g=a(3),v=a(287),p=a(7),x=a(20),y=a(292).onFreeze,b=Object.freeze,A=p(function(){b(1)});g({target:"Object",stat:!0,forced:A,sham:!v},{freeze:function(R){return b&&x(R)?b(y(R)):R}})}),(function(T,P,a){var g=a(3),v=a(136),p=a(90);g({target:"Object",stat:!0},{fromEntries:function(y){var b={};return v(y,function(A,I){p(b,A,I)},{AS_ENTRIES:!0}),b}})}),(function(T,P,a){var g=a(3),v=a(7),p=a(12),x=a(5).f,y=a(6),b=!y||v(function(){x(1)});g({target:"Object",stat:!0,forced:b,sham:!y},{getOwnPropertyDescriptor:function(I,R){return x(p(I),R)}})}),(function(T,P,a){var g=a(3),v=a(6),p=a(56),x=a(12),y=a(5),b=a(90);g({target:"Object",stat:!0,sham:!v},{getOwnPropertyDescriptors:function(I){for(var R=x(I),O=y.f,M=p(R),D={},L=0,B,F;M.length>L;)F=O(R,B=M[L++]),F!==void 0&&b(D,B,F);return D}})}),(function(T,P,a){var g=a(3),v=a(7),p=a(75).f,x=v(function(){return!Object.getOwnPropertyNames(1)});g({target:"Object",stat:!0,forced:x},{getOwnPropertyNames:p})}),(function(T,P,a){var g=a(3),v=a(7),p=a(39),x=a(134),y=a(135),b=v(function(){x(1)});g({target:"Object",stat:!0,forced:b,sham:!y},{getPrototypeOf:function(I){return x(p(I))}})}),(function(T,P,a){var g=a(3),v=a(90),p=a(23),x=a(14),y=a(30),b=a(16),A=a(18),I=a(136),R=a(7),O=Object.groupBy,M=p("Object","create"),D=x([].push),L=!O||R(function(){return O("ab",function(B){return B}).a.length!==1});g({target:"Object",stat:!0,forced:L},{groupBy:function(F,k){b(F),y(k);var W=M(null),U=0;return I(F,function(X){var j=A(k(X,U++));j in W?D(W[j],X):v(W,j,[X])}),W}})}),(function(T,P,a){var g=a(3),v=a(38);g({target:"Object",stat:!0},{hasOwn:v})}),(function(T,P,a){var g=a(3),v=a(362);g({target:"Object",stat:!0},{is:v})}),(function(T){T.exports=Object.is||function(a,g){return a===g?a!==0||1/a===1/g:a!==a&&g!==g}}),(function(T,P,a){var g=a(3),v=a(293);g({target:"Object",stat:!0,forced:Object.isExtensible!==v},{isExtensible:v})}),(function(T,P,a){var g=a(3),v=a(7),p=a(20),x=a(15),y=a(294),b=Object.isFrozen,A=y||v(function(){b(1)});g({target:"Object",stat:!0,forced:A},{isFrozen:function(R){return!p(R)||y&&x(R)==="ArrayBuffer"?!0:b?b(R):!1}})}),(function(T,P,a){var g=a(3),v=a(7),p=a(20),x=a(15),y=a(294),b=Object.isSealed,A=y||v(function(){b(1)});g({target:"Object",stat:!0,forced:A},{isSealed:function(R){return!p(R)||y&&x(R)==="ArrayBuffer"?!0:b?b(R):!1}})}),(function(T,P,a){var g=a(3),v=a(39),p=a(73),x=a(7),y=x(function(){p(1)});g({target:"Object",stat:!0,forced:y},{keys:function(A){return p(v(A))}})}),(function(T,P,a){var g=a(3),v=a(6),p=a(347),x=a(39),y=a(18),b=a(134),A=a(5).f;v&&g({target:"Object",proto:!0,forced:p},{__lookupGetter__:function(R){var O=x(this),M=y(R),D;do if(D=A(O,M))return D.get;while(O=b(O))}})}),(function(T,P,a){var g=a(3),v=a(6),p=a(347),x=a(39),y=a(18),b=a(134),A=a(5).f;v&&g({target:"Object",proto:!0,forced:p},{__lookupSetter__:function(R){var O=x(this),M=y(R),D;do if(D=A(O,M))return D.set;while(O=b(O))}})}),(function(T,P,a){var g=a(3),v=a(20),p=a(292).onFreeze,x=a(287),y=a(7),b=Object.preventExtensions,A=y(function(){b(1)});g({target:"Object",stat:!0,forced:A,sham:!x},{preventExtensions:function(R){return b&&v(R)?b(p(R)):R}})}),(function(T,P,a){var g=a(6),v=a(77),p=a(20),x=a(121),y=a(39),b=a(16),A=Object.getPrototypeOf,I=Object.setPrototypeOf,R=Object.prototype,O="__proto__";if(g&&A&&I&&!(O in R))try{v(R,O,{configurable:!0,get:function(){return A(y(this))},set:function(D){var L=b(this);x(D)&&p(L)&&I(L,D)}})}catch(M){}}),(function(T,P,a){var g=a(3),v=a(20),p=a(292).onFreeze,x=a(287),y=a(7),b=Object.seal,A=y(function(){b(1)});g({target:"Object",stat:!0,forced:A,sham:!x},{seal:function(R){return b&&v(R)?b(p(R)):R}})}),(function(T,P,a){var g=a(3),v=a(118);g({target:"Object",stat:!0},{setPrototypeOf:v})}),(function(T,P,a){var g=a(70),v=a(47),p=a(374);g||v(Object.prototype,"toString",p,{unsafe:!0})}),(function(T,P,a){var g=a(70),v=a(69);T.exports=g?{}.toString:function(){return"[object "+v(this)+"]"}}),(function(T,P,a){var g=a(3),v=a(352).values;g({target:"Object",stat:!0},{values:function(x){return v(x)}})}),(function(T,P,a){var g=a(3),v=a(337);g({global:!0,forced:parseFloat!==v},{parseFloat:v})}),(function(T,P,a){var g=a(3),v=a(339);g({global:!0,forced:parseInt!==v},{parseInt:v})}),(function(T,P,a){a(379),a(395),a(397),a(398),a(399),a(400)}),(function(T,P,a){var g=a(3),v=a(36),p=a(188),x=a(4),y=a(80),b=a(8),A=a(47),I=a(118),R=a(82),O=a(200),M=a(30),D=a(21),L=a(20),B=a(215),F=a(380),k=a(382).set,W=a(385),U=a(390),X=a(391),j=a(387),H=a(51),Y=a(392),Z=a(393),_=a(394),K="Promise",tt=Z.CONSTRUCTOR,nt=Z.REJECTION_EVENT,at=Z.SUBCLASSING,it=H.getterFor(K),ot=H.set,ut=Y&&Y.prototype,ht=Y,gt=ut,yt=x.TypeError,Et=x.document,bt=x.process,Ft=_.f,Lt=Ft,Pt=!!(Et&&Et.createEvent&&x.dispatchEvent),mt="unhandledrejection",xt="rejectionhandled",wt=0,Bt=1,Jt=2,Ot=1,jt=2,ie,me,se,he,Oe=function(Yt){var ee;return L(Yt)&&D(ee=Yt.then)?ee:!1},Me=function(Yt,ee){var pe=ee.value,ce=ee.state===Bt,Pe=ce?Yt.ok:Yt.fail,ln=Yt.resolve,It=Yt.reject,Xt=Yt.domain,Mt,$t,_t;try{Pe?(ce||(ee.rejection===jt&&Ht(ee),ee.rejection=Ot),Pe===!0?Mt=pe:(Xt&&Xt.enter(),Mt=Pe(pe),Xt&&(Xt.exit(),_t=!0)),Mt===Yt.promise?It(new yt("Promise-chain cycle")):($t=Oe(Mt))?b($t,Mt,ln,It):ln(Mt)):It(pe)}catch(Nt){Xt&&!_t&&Xt.exit(),It(Nt)}},Re=function(Yt,ee){Yt.notified||(Yt.notified=!0,W(function(){for(var pe=Yt.reactions,ce;ce=pe.get();)Me(ce,Yt);Yt.notified=!1,ee&&!Yt.rejection&&Te(Yt)}))},ge=function(Yt,ee,pe){var ce,Pe;Pt?(ce=Et.createEvent("Event"),ce.promise=ee,ce.reason=pe,ce.initEvent(Yt,!1,!0),x.dispatchEvent(ce)):ce={promise:ee,reason:pe},!nt&&(Pe=x["on"+Yt])?Pe(ce):Yt===mt&&U("Unhandled promise rejection",pe)},Te=function(Yt){b(k,x,function(){var ee=Yt.facade,pe=Yt.value,ce=Ve(Yt),Pe;if(ce&&(Pe=X(function(){p?bt.emit("unhandledRejection",pe,ee):ge(mt,ee,pe)}),Yt.rejection=p||Ve(Yt)?jt:Ot,Pe.error))throw Pe.value})},Ve=function(Yt){return Yt.rejection!==Ot&&!Yt.parent},Ht=function(Yt){b(k,x,function(){var ee=Yt.facade;p?bt.emit("rejectionHandled",ee):ge(xt,ee,Yt.value)})},ne=function(Yt,ee,pe){return function(ce){Yt(ee,ce,pe)}},ae=function(Yt,ee,pe){Yt.done||(Yt.done=!0,pe&&(Yt=pe),Yt.value=ee,Yt.state=Jt,Re(Yt,!0))},rn=function(Yt,ee,pe){if(!Yt.done){Yt.done=!0,pe&&(Yt=pe);try{if(Yt.facade===ee)throw new yt("Promise can't be resolved itself");var ce=Oe(ee);ce?W(function(){var Pe={done:!1};try{b(ce,ee,ne(rn,Pe,Yt),ne(ae,Pe,Yt))}catch(ln){ae(Pe,ln,Yt)}}):(Yt.value=ee,Yt.state=Bt,Re(Yt,!1))}catch(Pe){ae({done:!1},Pe,Yt)}}};if(tt&&(ht=function(ee){B(this,gt),M(ee),b(ie,this);var pe=it(this);try{ee(ne(rn,pe),ne(ae,pe))}catch(ce){ae(pe,ce)}},gt=ht.prototype,ie=function(ee){ot(this,{type:K,done:!1,notified:!1,parent:!1,reactions:new j,rejection:!1,state:wt,value:null})},ie.prototype=A(gt,"then",function(ee,pe){var ce=it(this),Pe=Ft(F(this,ht));return ce.parent=!0,Pe.ok=D(ee)?ee:!0,Pe.fail=D(pe)&&pe,Pe.domain=p?bt.domain:void 0,ce.state===wt?ce.reactions.add(Pe):W(function(){Me(Pe,ce)}),Pe.promise}),me=function(){var Yt=new ie,ee=it(Yt);this.promise=Yt,this.resolve=ne(rn,ee),this.reject=ne(ae,ee)},_.f=Ft=function(Yt){return Yt===ht||Yt===se?new me(Yt):Lt(Yt)},!v&&D(Y)&&ut!==Object.prototype)){he=ut.then,at||A(ut,"then",function(ee,pe){var ce=this;return new ht(function(Pe,ln){b(he,ce,Pe,ln)}).then(ee,pe)},{unsafe:!0});try{delete ut.constructor}catch(Yt){}I&&I(ut,gt)}g({global:!0,constructor:!0,wrap:!0,forced:tt},{Promise:ht}),se=y.Promise,R(ht,K,!1,!0),O(K)}),(function(T,P,a){var g=a(46),v=a(381),p=a(17),x=a(33),y=x("species");T.exports=function(b,A){var I=g(b).constructor,R;return I===void 0||p(R=g(I)[y])?A:v(R)}}),(function(T,P,a){var g=a(89),v=a(31),p=TypeError;T.exports=function(x){if(g(x))return x;throw new p(v(x)+" is not a constructor")}}),(function(T,P,a){var g=a(4),v=a(95),p=a(84),x=a(21),y=a(38),b=a(7),A=a(74),I=a(76),R=a(42),O=a(383),M=a(384),D=a(188),L=g.setImmediate,B=g.clearImmediate,F=g.process,k=g.Dispatch,W=g.Function,U=g.MessageChannel,X=g.String,j=0,H={},Y="onreadystatechange",Z,_,K,tt;b(function(){Z=g.location});var nt=function(ut){if(y(H,ut)){var ht=H[ut];delete H[ut],ht()}},at=function(ut){return function(){nt(ut)}},it=function(ut){nt(ut.data)},ot=function(ut){g.postMessage(X(ut),Z.protocol+"//"+Z.host)};(!L||!B)&&(L=function(ht){O(arguments.length,1);var gt=x(ht)?ht:W(ht),yt=I(arguments,1);return H[++j]=function(){v(gt,void 0,yt)},_(j),j},B=function(ht){delete H[ht]},D?_=function(ut){F.nextTick(at(ut))}:k&&k.now?_=function(ut){k.now(at(ut))}:U&&!M?(K=new U,tt=K.port2,K.port1.onmessage=it,_=p(tt.postMessage,tt)):g.addEventListener&&x(g.postMessage)&&!g.importScripts&&Z&&Z.protocol!=="file:"&&!b(ot)?(_=ot,g.addEventListener("message",it,!1)):Y in R("script")?_=function(ut){A.appendChild(R("script"))[Y]=function(){A.removeChild(this),nt(ut)}}:_=function(ut){setTimeout(at(ut),0)}),T.exports={set:L,clear:B}}),(function(T){var P=TypeError;T.exports=function(a,g){if(a<g)throw new P("Not enough arguments");return a}}),(function(T,P,a){var g=a(28);T.exports=/ipad|iphone|ipod/i.test(g)&&/applewebkit/i.test(g)}),(function(T,P,a){var g=a(4),v=a(386),p=a(84),x=a(382).set,y=a(387),b=a(384),A=a(388),I=a(389),R=a(188),O=g.MutationObserver||g.WebKitMutationObserver,M=g.document,D=g.process,L=g.Promise,B=v("queueMicrotask"),F,k,W,U,X;if(!B){var j=new y,H=function(){var Y,Z;for(R&&(Y=D.domain)&&Y.exit();Z=j.get();)try{Z()}catch(_){throw j.head&&F(),_}Y&&Y.enter()};!b&&!R&&!I&&O&&M?(k=!0,W=M.createTextNode(""),new O(H).observe(W,{characterData:!0}),F=function(){W.data=k=!k}):!A&&L&&L.resolve?(U=L.resolve(void 0),U.constructor=L,X=p(U.then,U),F=function(){X(H)}):R?F=function(){D.nextTick(H)}:(x=p(x,g),F=function(){x(H)}),B=function(Y){j.head||F(),j.add(Y)}}T.exports=B}),(function(T,P,a){var g=a(4),v=a(6),p=Object.getOwnPropertyDescriptor;T.exports=function(x){if(!v)return g[x];var y=p(g,x);return y&&y.value}}),(function(T){var P=function(){this.head=null,this.tail=null};P.prototype={add:function(a){var g={item:a,next:null},v=this.tail;v?v.next=g:this.head=g,this.tail=g},get:function(){var a=this.head;if(a){var g=this.head=a.next;return g===null&&(this.tail=null),a.item}}},T.exports=P}),(function(T,P,a){var g=a(28);T.exports=/ipad|iphone|ipod/i.test(g)&&typeof Pebble!="undefined"}),(function(T,P,a){var g=a(28);T.exports=/web0s(?!.*chrome)/i.test(g)}),(function(T){T.exports=function(P,a){try{arguments.length===1?console.error(P):console.error(P,a)}catch(g){}}}),(function(T){T.exports=function(P){try{return{error:!1,value:P()}}catch(a){return{error:!0,value:a}}}}),(function(T,P,a){var g=a(4);T.exports=g.Promise}),(function(T,P,a){var g=a(4),v=a(392),p=a(21),x=a(67),y=a(50),b=a(33),A=a(189),I=a(36),R=a(27),O=v&&v.prototype,M=b("species"),D=!1,L=p(g.PromiseRejectionEvent),B=x("Promise",function(){var F=y(v),k=F!==String(v);if(!k&&R===66||I&&!(O.catch&&O.finally))return!0;if(!R||R<51||!/native code/.test(F)){var W=new v(function(j){j(1)}),U=function(j){j(function(){},function(){})},X=W.constructor={};if(X[M]=U,D=W.then(function(){})instanceof U,!D)return!0}return!k&&(A==="BROWSER"||A==="DENO")&&!L});T.exports={CONSTRUCTOR:B,REJECTION_EVENT:L,SUBCLASSING:D}}),(function(T,P,a){var g=a(30),v=TypeError,p=function(x){var y,b;this.promise=new x(function(A,I){if(y!==void 0||b!==void 0)throw new v("Bad Promise constructor");y=A,b=I}),this.resolve=g(y),this.reject=g(b)};T.exports.f=function(x){return new p(x)}}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(394),y=a(391),b=a(136),A=a(396);g({target:"Promise",stat:!0,forced:A},{all:function(R){var O=this,M=x.f(O),D=M.resolve,L=M.reject,B=y(function(){var F=p(O.resolve),k=[],W=0,U=1;b(R,function(X){var j=W++,H=!1;U++,v(F,O,X).then(function(Y){H||(H=!0,k[j]=Y,--U||D(k))},L)}),--U||D(k)});return B.error&&L(B.value),M.promise}})}),(function(T,P,a){var g=a(392),v=a(171),p=a(393).CONSTRUCTOR;T.exports=p||!v(function(x){g.all(x).then(void 0,function(){})})}),(function(T,P,a){var g=a(3),v=a(36),p=a(393).CONSTRUCTOR,x=a(392),y=a(23),b=a(21),A=a(47),I=x&&x.prototype;if(g({target:"Promise",proto:!0,forced:p,real:!0},{catch:function(O){return this.then(void 0,O)}}),!v&&b(x)){var R=y("Promise").prototype.catch;I.catch!==R&&A(I,"catch",R,{unsafe:!0})}}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(394),y=a(391),b=a(136),A=a(396);g({target:"Promise",stat:!0,forced:A},{race:function(R){var O=this,M=x.f(O),D=M.reject,L=y(function(){var B=p(O.resolve);b(R,function(F){v(B,O,F).then(M.resolve,D)})});return L.error&&D(L.value),M.promise}})}),(function(T,P,a){var g=a(3),v=a(394),p=a(393).CONSTRUCTOR;g({target:"Promise",stat:!0,forced:p},{reject:function(y){var b=v.f(this),A=b.reject;return A(y),b.promise}})}),(function(T,P,a){var g=a(3),v=a(23),p=a(36),x=a(392),y=a(393).CONSTRUCTOR,b=a(401),A=v("Promise"),I=p&&!y;g({target:"Promise",stat:!0,forced:p||y},{resolve:function(O){return b(I&&this===A?x:this,O)}})}),(function(T,P,a){var g=a(46),v=a(20),p=a(394);T.exports=function(x,y){if(g(x),v(y)&&y.constructor===x)return y;var b=p.f(x),A=b.resolve;return A(y),b.promise}}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(394),y=a(391),b=a(136),A=a(396);g({target:"Promise",stat:!0,forced:A},{allSettled:function(R){var O=this,M=x.f(O),D=M.resolve,L=M.reject,B=y(function(){var F=p(O.resolve),k=[],W=0,U=1;b(R,function(X){var j=W++,H=!1;U++,v(F,O,X).then(function(Y){H||(H=!0,k[j]={status:"fulfilled",value:Y},--U||D(k))},function(Y){H||(H=!0,k[j]={status:"rejected",reason:Y},--U||D(k))})}),--U||D(k)});return B.error&&L(B.value),M.promise}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(23),y=a(394),b=a(391),A=a(136),I=a(396),R="No one promise resolved";g({target:"Promise",stat:!0,forced:I},{any:function(M){var D=this,L=x("AggregateError"),B=y.f(D),F=B.resolve,k=B.reject,W=b(function(){var U=p(D.resolve),X=[],j=0,H=1,Y=!1;A(M,function(Z){var _=j++,K=!1;H++,v(U,D,Z).then(function(tt){K||Y||(Y=!0,F(tt))},function(tt){K||Y||(K=!0,X[_]=tt,--H||k(new L(X,R)))})}),--H||k(new L(X,R))});return W.error&&k(W.value),B.promise}})}),(function(T,P,a){var g=a(3),v=a(36),p=a(392),x=a(7),y=a(23),b=a(21),A=a(380),I=a(401),R=a(47),O=p&&p.prototype,M=!!p&&x(function(){O.finally.call({then:function(){}},function(){})});if(g({target:"Promise",proto:!0,real:!0,forced:M},{finally:function(L){var B=A(this,y("Promise")),F=b(L);return this.then(F?function(k){return I(B,L()).then(function(){return k})}:L,F?function(k){return I(B,L()).then(function(){throw k})}:L)}}),!v&&b(p)){var D=y("Promise").prototype.finally;O.finally!==D&&R(O,"finally",D,{unsafe:!0})}}),(function(T,P,a){var g=a(3),v=a(4),p=a(95),x=a(76),y=a(394),b=a(30),A=a(391),I=v.Promise,R=!1,O=!I||!I.try||A(function(){I.try(function(M){R=M===8},8)}).error||!R;g({target:"Promise",stat:!0,forced:O},{try:function(M){var D=arguments.length>1?x(arguments,1):[],L=y.f(this),B=A(function(){return p(b(M),void 0,D)});return(B.error?L.reject:L.resolve)(B.value),L.promise}})}),(function(T,P,a){var g=a(3),v=a(394);g({target:"Promise",stat:!0},{withResolvers:function(){var x=v.f(this);return{promise:x.promise,resolve:x.resolve,reject:x.reject}}})}),(function(T,P,a){var g=a(3),v=a(408),p=a(7),x=Array.fromAsync,y=!x||p(function(){var b=0;return x.call(function(){return b++,[]},{length:0}),b!==1});g({target:"Array",stat:!0,forced:y},{fromAsync:v})}),(function(T,P,a){var g=a(84),v=a(14),p=a(89),x=a(409),y=a(139),b=a(267),A=a(140),I=a(29),R=a(23),O=a(205),M=a(33),D=a(410),L=a(412).toArray,B=M("asyncIterator"),F=v(O("Array","values")),k=v(F([]).next),W=function(){return new U(this)},U=function(X){this.iterator=F(X)};U.prototype.next=function(){return k(this.iterator)},T.exports=function(j){var H=this,Y=arguments.length,Z=Y>1?arguments[1]:void 0,_=Y>2?arguments[2]:void 0;return new(R("Promise"))(function(K){Z!==void 0&&(Z=g(Z,_));var tt=I(j,B),nt=tt?void 0:A(j)||W,at=p(H)?new H:[],it=tt?x(j,tt):new D(b(y(j,nt)));K(L(it,Z,at))})}}),(function(T,P,a){var g=a(8),v=a(410),p=a(46),x=a(139),y=a(267),b=a(29),A=a(33),I=A("asyncIterator");T.exports=function(R,O){var M=arguments.length<2?b(R,I):O;return M?p(g(M,R)):new v(y(x(R)))}}),(function(T,P,a){var g=a(8),v=a(46),p=a(71),x=a(29),y=a(214),b=a(51),A=a(141),I=a(23),R=a(411),O=a(179),M=I("Promise"),D="AsyncFromSyncIterator",L=b.set,B=b.getterFor(D),F=function(W,U,X,j,H){var Y=W.done;M.resolve(W.value).then(function(Z){U(O(Z,Y))},function(Z){if(!Y&&H)try{A(j,"throw",Z)}catch(_){Z=_}X(Z)})},k=function(U){U.type=D,L(this,U)};k.prototype=y(p(R),{next:function(){var U=B(this),X=arguments.length>0,j=X?arguments[0]:void 0;return new M(function(H,Y){var Z=v(X?g(U.next,U.iterator,j):g(U.next,U.iterator));F(Z,H,Y,U.iterator,!0)})},return:function(){var W=B(this),U=W.iterator,X=arguments.length>0,j=X?arguments[0]:void 0;return new M(function(H,Y){var Z=x(U,"return");if(Z===void 0)return H(O(j,!0));var _=v(X?g(Z,U,j):g(Z,U));F(_,H,Y,U)})},throw:function(){var W=B(this),U=W.iterator,X=arguments.length>0,j=X?arguments[0]:void 0;return new M(function(H,Y){var Z=x(U,"throw");if(Z===void 0){try{A(U,"normal")}catch(K){return Y(K)}return Y(new TypeError("The iterator does not provide a throw method"))}var _=v(X?g(Z,U,j):g(Z,U));F(_,H,Y,U,!0)})}}),T.exports=k}),(function(T,P,a){var g=a(4),v=a(35),p=a(21),x=a(71),y=a(134),b=a(47),A=a(33),I=a(36),R="USE_FUNCTION_CONSTRUCTOR",O=A("asyncIterator"),M=g.AsyncIterator,D=v.AsyncIteratorPrototype,L,B;if(D)L=D;else if(p(M))L=M.prototype;else if(v[R]||g[R])try{B=y(y(y(Function("return async function*(){}()")()))),y(B)===Object.prototype&&(L=B)}catch(F){}L?I&&(L=x(L)):L={},p(L[O])||b(L,O,function(){return this}),T.exports=L}),(function(T,P,a){var g=a(8),v=a(30),p=a(46),x=a(20),y=a(147),b=a(23),A=a(90),I=a(148),R=a(267),O=a(413),M=function(D){var L=D===0,B=D===1,F=D===2,k=D===3;return function(W,U,X){p(W);var j=U!==void 0;(j||!L)&&v(U);var H=R(W),Y=b("Promise"),Z=H.iterator,_=H.next,K=0;return new Y(function(tt,nt){var at=function(ot){O(Z,nt,ot,nt)},it=function(){try{try{y(K)}catch(ot){return at(ot)}Y.resolve(p(g(_,Z))).then(function(ot){try{if(p(ot).done)L?(I(X,K),tt(X)):tt(k?!1:F||void 0);else{var ut=ot.value;try{if(j){var ht=K++,gt=U(ut,ht),yt=function(Et){if(B)it();else if(F)Et?it():O(Z,tt,!1,nt);else if(L)try{A(X,ht,Et),it()}catch(bt){at(bt)}else Et?O(Z,tt,k||ut,nt):it()};x(gt)?Y.resolve(gt).then(yt,at):yt(gt)}else A(X,K++,ut),it()}catch(Et){at(Et)}}}catch(Et){nt(Et)}},nt)}catch(ot){nt(ot)}};it()})}};T.exports={toArray:M(0),forEach:M(1),every:M(2),some:M(3),find:M(4)}}),(function(T,P,a){var g=a(8),v=a(46),p=a(23),x=a(29);T.exports=function(y,b,A,I){try{var R=x(y,"return");if(R)return p("Promise").resolve(g(R,y)).then(function(O){try{b!==I&&v(O)}catch(M){I(M);return}b(A)},function(O){b===I?b(A):I(O)})}catch(O){return I(b===I?A:O)}b(A)}}),(function(T,P,a){var g=a(3),v=a(6),p=a(23),x=a(30),y=a(215),b=a(47),A=a(214),I=a(77),R=a(33),O=a(51),M=a(254),D=a(27),L=p("Promise"),B=p("SuppressedError"),F=ReferenceError,k=R("asyncDispose"),W=R("toStringTag"),U="AsyncDisposableStack",X=O.set,j=O.getterFor(U),H="async-dispose",Y="disposed",Z="pending",_=function(at){var it=j(at);if(it.state===Y)throw new F(U+" already disposed");return it},K=function(){X(y(this,tt),{type:U,state:Z,stack:[]}),v||(this.disposed=!1)},tt=K.prototype;A(tt,{disposeAsync:function(){var it=this;return new L(function(ot,ut){var ht=j(it);if(ht.state===Y)return ot(void 0);ht.state=Y,v||(it.disposed=!0);var gt=ht.stack,yt=gt.length,Et=!1,bt,Ft=function(Pt){Et?bt=new B(Pt,bt):(Et=!0,bt=Pt),Lt()},Lt=function(){if(yt){var Pt=gt[--yt];gt[yt]=null;try{L.resolve(Pt()).then(Lt,Ft)}catch(mt){Ft(mt)}}else ht.stack=null,Et?ut(bt):ot(void 0)};Lt()})},use:function(it){return M(_(this),it,H),it},adopt:function(it,ot){var ut=_(this);return x(ot),M(ut,void 0,H,function(){return ot(it)}),it},defer:function(it){var ot=_(this);x(it),M(ot,void 0,H,it)},move:function(){var it=_(this),ot=new K;return j(ot).stack=it.stack,it.stack=[],it.state=Y,v||(this.disposed=!0),ot}}),v&&I(tt,"disposed",{configurable:!0,get:function(){return j(this).state===Y}}),b(tt,k,tt.disposeAsync,{name:"disposeAsync"}),b(tt,W,U,{nonWritable:!0});var nt=D&&D<136;g({global:!0,constructor:!0,forced:nt},{AsyncDisposableStack:K})}),(function(T,P,a){var g=a(8),v=a(47),p=a(23),x=a(29),y=a(38),b=a(33),A=a(411),I=b("asyncDispose"),R=p("Promise");y(A,I)||v(A,I,function(){var O=this;return new R(function(M,D){var L=x(O,"return");L?R.resolve(g(L,O)).then(function(){M(void 0)},D):M(void 0)})})}),(function(T,P,a){var g=a(3),v=a(95),p=a(30),x=a(46),y=a(7),b=!y(function(){Reflect.apply(function(){})});g({target:"Reflect",stat:!0,forced:b},{apply:function(I,R,O){return v(p(I),R,x(O))}})}),(function(T,P,a){var g=a(3),v=a(23),p=a(95),x=a(257),y=a(381),b=a(46),A=a(20),I=a(71),R=a(7),O=v("Reflect","construct"),M=Object.prototype,D=[].push,L=R(function(){function k(){}return!(O(function(){},[],k)instanceof k)}),B=!R(function(){O(function(){})}),F=L||B;g({target:"Reflect",stat:!0,forced:F,sham:F},{construct:function(W,U){y(W);var X=arguments.length<3?W:y(arguments[2]);if(b(U),B&&!L)return O(W,U,X);if(W===X){switch(U.length){case 0:return new W;case 1:return new W(U[0]);case 2:return new W(U[0],U[1]);case 3:return new W(U[0],U[1],U[2]);case 4:return new W(U[0],U[1],U[2],U[3])}var j=[null];return p(D,j,U),new(p(x,W,j))}var H=X.prototype,Y=I(A(H)?H:M),Z=p(W,Y,U);return A(Z)?Z:Y}})}),(function(T,P,a){var g=a(3),v=a(6),p=a(46),x=a(18),y=a(44),b=a(21),A=a(7),I=TypeError,R=A(function(){Reflect.defineProperty(y.f({},1,{value:1}),1,{value:2})});g({target:"Reflect",stat:!0,forced:R,sham:!v},{defineProperty:function(M,D,L){p(M);var B=x(D),F,k;if(p(L),("get"in L||"set"in L)&&("get"in L&&!b(F=L.get)&&F!==void 0||"set"in L&&!b(k=L.set)&&k!==void 0||"value"in L||"writable"in L))throw new I("Invalid property descriptor");try{return y.f(M,B,L),!0}catch(W){return!1}}})}),(function(T,P,a){var g=a(3),v=a(46),p=a(5).f,x=a(18);g({target:"Reflect",stat:!0},{deleteProperty:function(b,A){v(b);var I=x(A),R=p(b,I);return R&&!R.configurable?!1:delete b[I]}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(20),x=a(46),y=a(421),b=a(5),A=a(134),I=a(18),R=function(O,M,D){if(x(O)===D)return O[M];var L=b.f(O,M);if(L)return y(L)?L.value:L.get===void 0?void 0:v(L.get,D);var B=A(O);if(p(B))return R(B,M,D)};g({target:"Reflect",stat:!0},{get:function(M,D){return R(x(M),I(D),arguments.length<3?M:arguments[2])}})}),(function(T,P,a){var g=a(38);T.exports=function(v){return v!==void 0&&(g(v,"value")||g(v,"writable"))}}),(function(T,P,a){var g=a(3),v=a(6),p=a(46),x=a(5);g({target:"Reflect",stat:!0,sham:!v},{getOwnPropertyDescriptor:function(b,A){return x.f(p(b),A)}})}),(function(T,P,a){var g=a(3),v=a(46),p=a(134),x=a(135);g({target:"Reflect",stat:!0,sham:!x},{getPrototypeOf:function(b){return p(v(b))}})}),(function(T,P,a){var g=a(3);g({target:"Reflect",stat:!0},{has:function(p,x){return x in p}})}),(function(T,P,a){var g=a(3),v=a(46),p=a(293);g({target:"Reflect",stat:!0},{isExtensible:function(y){return v(y),p(y)}})}),(function(T,P,a){var g=a(3),v=a(56);g({target:"Reflect",stat:!0},{ownKeys:v})}),(function(T,P,a){var g=a(3),v=a(23),p=a(46),x=a(287);g({target:"Reflect",stat:!0,sham:!x},{preventExtensions:function(b){p(b);try{var A=v("Object","preventExtensions");return A&&A(b),!0}catch(I){return!1}}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(46),x=a(20),y=a(421),b=a(7),A=a(44),I=a(5),R=a(134),O=a(11),M=a(18),D=function(B,F,k,W){var U=I.f(p(B),F),X,j,H;if(!U){if(x(j=R(B)))return D(j,F,k,W);U=O(0)}if(y(U)){if(U.writable===!1||!x(W))return!1;if(X=I.f(W,F)){if(!y(X)||X.writable===!1)return!1;A.f(W,F,{value:k})}else try{A.f(W,F,O(0,k))}catch(Y){return!1}}else{if(H=U.set,H===void 0)return!1;v(H,W,k)}return!0},L=b(function(){var B=function(){},F=A.f(new B,"a",{configurable:!0});return Reflect.set(B.prototype,"a",1,F)!==!1});g({target:"Reflect",stat:!0,forced:L},{set:function(F,k,W){return D(p(F),M(k),W,arguments.length<4?F:arguments[3])}})}),(function(T,P,a){var g=a(3),v=a(46),p=a(120),x=a(118);x&&g({target:"Reflect",stat:!0},{setPrototypeOf:function(b,A){v(b),p(A);try{return x(b,A),!0}catch(I){return!1}}})}),(function(T,P,a){var g=a(3),v=a(4),p=a(82);g({global:!0},{Reflect:{}}),p(v.Reflect,"Reflect",!0)}),(function(T,P,a){var g=a(6),v=a(4),p=a(14),x=a(67),y=a(123),b=a(43),A=a(71),I=a(57).f,R=a(24),O=a(432),M=a(68),D=a(433),L=a(436),B=a(122),F=a(47),k=a(7),W=a(38),U=a(51).enforce,X=a(200),j=a(33),H=a(437),Y=a(438),Z=j("match"),_=v.RegExp,K=_.prototype,tt=v.SyntaxError,nt=p(K.exec),at=p("".charAt),it=p("".replace),ot=p("".indexOf),ut=p("".slice),ht=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,gt=/a/g,yt=/a/g,Et=new _(gt)!==gt,bt=L.MISSED_STICKY,Ft=L.UNSUPPORTED_Y,Lt=g&&(!Et||bt||H||Y||k(function(){return yt[Z]=!1,_(gt)!==gt||_(yt)===yt||String(_(gt,"i"))!=="/a/i"})),Pt=function(Jt){for(var Ot=Jt.length,jt=0,ie="",me=!1,se;jt<Ot;jt++){if(se=at(Jt,jt),se==="\\"){ie+=se+at(Jt,++jt);continue}!me&&se==="."?ie+="[\\s\\S]":(se==="["?me=!0:se==="]"&&(me=!1),ie+=se)}return ie},mt=function(Jt){for(var Ot=Jt.length,jt=0,ie="",me=[],se=A(null),he=!1,Oe=!1,Me=0,Re="",ge;jt<Ot;jt++){if(ge=at(Jt,jt),ge==="\\"){if(ge+=at(Jt,++jt),!Oe&&at(ge,1)==="\\"){ie+="\\x5c";continue}}else if(ge==="]")he=!1;else if(!he)switch(!0){case ge==="[":he=!0;break;case ge==="(":ie+=ge,nt(ht,ut(Jt,jt+1))?(jt+=2,Oe=!0,Me++):at(Jt,jt+1)!=="?"&&Me++;continue;case(ge===">"&&Oe):if(Re===""||W(se,Re))throw new tt("Invalid capture group name");se[Re]=!0,me[me.length]=[Re,Me],Oe=!1,Re="";continue}Oe?Re+=ge:ie+=ge}for(var Te=0;Te<me.length;Te++)for(var Ve="\\k<"+me[Te][0]+">",Ht="\\"+me[Te][1];ot(ie,Ve)>-1;)ie=it(ie,Ve,Ht);return[ie,me]};if(x("RegExp",Lt)){for(var xt=function(Ot,jt){var ie=R(K,this),me=O(Ot),se=jt===void 0,he=[],Oe=Ot,Me,Re,ge,Te,Ve,Ht;if(!ie&&me&&se&&Ot.constructor===xt)return Ot;if((me||R(K,Ot))&&(Ot=Ot.source,se&&(jt=D(Oe))),Ot=Ot===void 0?"":M(Ot),jt=jt===void 0?"":M(jt),Oe=Ot,H&&"dotAll"in gt&&(Re=!!jt&&ot(jt,"s")>-1,Re&&(jt=it(jt,/s/g,""))),Me=jt,bt&&"sticky"in gt&&(ge=!!jt&&ot(jt,"y")>-1,ge&&Ft&&(jt=it(jt,/y/g,""))),Y&&(Te=mt(Ot),Ot=Te[0],he=Te[1]),Ve=y(_(Ot,jt),ie?this:K,xt),(Re||ge||he.length)&&(Ht=U(Ve),Re&&(Ht.dotAll=!0,Ht.raw=xt(Pt(Ot),Me)),ge&&(Ht.sticky=!0),he.length&&(Ht.groups=he)),Ot!==Oe)try{b(Ve,"source",Oe===""?"(?:)":Oe)}catch(ne){}return Ve},wt=I(_),Bt=0;wt.length>Bt;)B(xt,_,wt[Bt++]);K.constructor=xt,xt.prototype=K,F(v,"RegExp",xt,{constructor:!0})}X("RegExp")}),(function(T,P,a){var g=a(20),v=a(15),p=a(33),x=p("match");T.exports=function(y){var b;return g(y)&&((b=y[x])!==void 0?!!b:v(y)==="RegExp")}}),(function(T,P,a){var g=a(8),v=a(38),p=a(24),x=a(434),y=a(435),b=RegExp.prototype;T.exports=x.correct?function(A){return A.flags}:function(A){return!x.correct&&p(b,A)&&!v(A,"flags")?g(y,A):A.flags}}),(function(T,P,a){var g=a(4),v=a(7),p=g.RegExp,x=!v(function(){var y=!0;try{p(".","d")}catch(L){y=!1}var b={},A="",I=y?"dgimsy":"gimsy",R=function(L,B){Object.defineProperty(b,L,{get:function(){return A+=B,!0}})},O={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};y&&(O.hasIndices="d");for(var M in O)R(M,O[M]);var D=Object.getOwnPropertyDescriptor(p.prototype,"flags").get.call(b);return D!==I||A!==I});T.exports={correct:x}}),(function(T,P,a){var g=a(46);T.exports=function(){var v=g(this),p="";return v.hasIndices&&(p+="d"),v.global&&(p+="g"),v.ignoreCase&&(p+="i"),v.multiline&&(p+="m"),v.dotAll&&(p+="s"),v.unicode&&(p+="u"),v.unicodeSets&&(p+="v"),v.sticky&&(p+="y"),p}}),(function(T,P,a){var g=a(7),v=a(4),p=v.RegExp,x=g(function(){var A=p("a","y");return A.lastIndex=2,A.exec("abcd")!==null}),y=x||g(function(){return!p("a","y").sticky}),b=x||g(function(){var A=p("^r","gy");return A.lastIndex=2,A.exec("str")!==null});T.exports={BROKEN_CARET:b,MISSED_STICKY:y,UNSUPPORTED_Y:x}}),(function(T,P,a){var g=a(7),v=a(4),p=v.RegExp;T.exports=g(function(){var x=p(".","s");return!(x.dotAll&&x.test(`
28
- `)&&x.flags==="s")})}),(function(T,P,a){var g=a(7),v=a(4),p=v.RegExp;T.exports=g(function(){var x=p("(?<a>b)","g");return x.exec("b").groups.a!=="b"||"b".replace(x,"$<a>c")!=="bc"})}),(function(T,P,a){var g=a(3),v=a(14),p=a(440),x=a(38),y=a(247).start,b=a(326),A=Array,I=RegExp.escape,R=v("".charAt),O=v("".charCodeAt),M=v(1.1.toString),D=v([].join),L=/^[0-9a-z]/i,B=/^[$()*+./?[\\\]^{|}]/,F=RegExp("^[!\"#%&',\\-:;<=>@`~"+b+"]"),k=v(L.exec),W={" ":"t","\n":"n","\v":"v","\f":"f","\r":"r"},U=function(j){var H=M(O(j,0),16);return H.length<3?"\\x"+y(H,2,"0"):"\\u"+y(H,4,"0")},X=!I||I("ab")!=="\\x61b";g({target:"RegExp",stat:!0,forced:X},{escape:function(H){p(H);for(var Y=H.length,Z=A(Y),_=0;_<Y;_++){var K=R(H,_);if(_===0&&k(L,K))Z[_]=U(K);else if(x(W,K))Z[_]="\\"+W[K];else if(k(B,K))Z[_]="\\"+K;else if(k(F,K))Z[_]=U(K);else{var tt=O(K,0);(tt&63488)!==55296?Z[_]=K:tt>=56320||_+1>=Y||(O(H,_+1)&64512)!==56320?Z[_]=U(K):(Z[_]=K,Z[++_]=R(H,_))}}return D(Z,"")}})}),(function(T){var P=TypeError;T.exports=function(a){if(typeof a=="string")return a;throw new P("Argument is not a string")}}),(function(T,P,a){var g=a(6),v=a(437),p=a(15),x=a(77),y=a(51).get,b=RegExp.prototype,A=TypeError;g&&v&&x(b,"dotAll",{configurable:!0,get:function(){if(this!==b){if(p(this)==="RegExp")return!!y(this).dotAll;throw new A("Incompatible receiver, RegExp required")}}})}),(function(T,P,a){var g=a(3),v=a(443);g({target:"RegExp",proto:!0,forced:/./.exec!==v},{exec:v})}),(function(T,P,a){var g=a(8),v=a(14),p=a(68),x=a(435),y=a(436),b=a(34),A=a(71),I=a(51).get,R=a(437),O=a(438),M=b("native-string-replace",String.prototype.replace),D=RegExp.prototype.exec,L=D,B=v("".charAt),F=v("".indexOf),k=v("".replace),W=v("".slice),U=(function(){var Z=/a/,_=/b*/g;return g(D,Z,"a"),g(D,_,"a"),Z.lastIndex!==0||_.lastIndex!==0})(),X=y.BROKEN_CARET,j=/()??/.exec("")[1]!==void 0,H=U||j||X||R||O,Y=function(Z,_){for(var K=Z.groups=A(null),tt=0;tt<_.length;tt++){var nt=_[tt];K[nt[0]]=Z[nt[1]]}};H&&(L=function(_){var K=this,tt=I(K),nt=p(_),at=tt.raw,it,ot,ut;if(at)return at.lastIndex=K.lastIndex,it=g(L,at,nt),K.lastIndex=at.lastIndex,it&&tt.groups&&Y(it,tt.groups),it;var ht=tt.groups,gt=X&&K.sticky,yt=g(x,K),Et=K.source,bt=0,Ft=nt;if(gt){yt=k(yt,"y",""),F(yt,"g")===-1&&(yt+="g"),Ft=W(nt,K.lastIndex);var Lt=K.lastIndex>0&&B(nt,K.lastIndex-1);K.lastIndex>0&&(!K.multiline||K.multiline&&Lt!==`
29
- `&&Lt!=="\r"&&Lt!=="\u2028"&&Lt!=="\u2029")&&(Et="(?: (?:"+Et+"))",Ft=" "+Ft,bt++),ot=new RegExp("^(?:"+Et+")",yt)}j&&(ot=new RegExp("^"+Et+"$(?!\\s)",yt)),U&&(ut=K.lastIndex);var Pt=g(D,gt?ot:K,Ft);return gt?Pt?(Pt.input=nt,Pt[0]=W(Pt[0],bt),Pt.index=K.lastIndex,K.lastIndex+=Pt[0].length):K.lastIndex=0:U&&Pt&&(K.lastIndex=K.global?Pt.index+Pt[0].length:ut),j&&Pt&&Pt.length>1&&g(M,Pt[0],ot,function(){for(var mt=1;mt<arguments.length-2;mt++)arguments[mt]===void 0&&(Pt[mt]=void 0)}),Pt&&ht&&Y(Pt,ht),Pt}),T.exports=L}),(function(T,P,a){var g=a(6),v=a(77),p=a(434),x=a(435);g&&!p.correct&&(v(RegExp.prototype,"flags",{configurable:!0,get:x}),p.correct=!0)}),(function(T,P,a){var g=a(6),v=a(436).MISSED_STICKY,p=a(15),x=a(77),y=a(51).get,b=RegExp.prototype,A=TypeError;g&&v&&x(b,"sticky",{configurable:!0,get:function(){if(this!==b){if(p(this)==="RegExp")return!!y(this).sticky;throw new A("Incompatible receiver, RegExp required")}}})}),(function(T,P,a){a(442);var g=a(3),v=a(8),p=a(21),x=a(46),y=a(68),b=(function(){var I=!1,R=/[ac]/;return R.exec=function(){return I=!0,/./.exec.apply(this,arguments)},R.test("abc")===!0&&I})(),A=/./.test;g({target:"RegExp",proto:!0,forced:!b},{test:function(I){var R=x(this),O=y(I),M=R.exec;if(!p(M))return v(A,R,O);var D=v(M,R,O);return D===null?!1:(x(D),!0)}})}),(function(T,P,a){var g=a(49).PROPER,v=a(47),p=a(46),x=a(68),y=a(7),b=a(433),A="toString",I=RegExp.prototype,R=I[A],O=y(function(){return R.call({source:"a",flags:"b"})!=="/a/b"}),M=g&&R.name!==A;(O||M)&&v(I,A,function(){var L=p(this),B=x(L.source),F=x(b(L));return"/"+B+"/"+F},{unsafe:!0})}),(function(T,P,a){a(449)}),(function(T,P,a){var g=a(291),v=a(295);g("Set",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},v)}),(function(T,P,a){var g=a(3),v=a(451),p=a(7),x=a(459),y=!x("difference",function(A){return A.size===0}),b=y||p(function(){var A={size:1,has:function(){return!0},keys:function(){var R=0;return{next:function(){var O=R++>1;return I.has(1)&&I.clear(),{done:O,value:2}}}}},I=new Set([1,2,3,4]);return I.difference(A).size!==3});g({target:"Set",proto:!0,real:!0,forced:b},{difference:v})}),(function(T,P,a){var g=a(452),v=a(453),p=a(454),x=a(457),y=a(458),b=a(455),A=a(456),I=v.has,R=v.remove;T.exports=function(M){var D=g(this),L=y(M),B=p(D);return x(B)<=L.size?b(B,function(F){L.includes(F)&&R(B,F)}):A(L.getIterator(),function(F){I(B,F)&&R(B,F)}),B}}),(function(T,P,a){var g=a(453).has;T.exports=function(v){return g(v),v}}),(function(T,P,a){var g=a(14),v=Set.prototype;T.exports={Set,add:g(v.add),has:g(v.has),remove:g(v.delete),proto:v}}),(function(T,P,a){var g=a(453),v=a(455),p=g.Set,x=g.add;T.exports=function(y){var b=new p;return v(y,function(A){x(b,A)}),b}}),(function(T,P,a){var g=a(14),v=a(456),p=a(453),x=p.Set,y=p.proto,b=g(y.forEach),A=g(y.keys),I=A(new x).next;T.exports=function(R,O,M){return M?v({iterator:A(R),next:I},O):b(R,O)}}),(function(T,P,a){var g=a(8);T.exports=function(v,p,x){for(var y=x?v:v.iterator,b=v.next,A,I;!(A=g(b,y)).done;)if(I=p(A.value),I!==void 0)return I}}),(function(T,P,a){var g=a(119),v=a(453);T.exports=g(v.proto,"size","get")||function(p){return p.size}}),(function(T,P,a){var g=a(30),v=a(46),p=a(8),x=a(61),y=a(267),b="Invalid size",A=RangeError,I=TypeError,R=Math.max,O=function(M,D){this.set=M,this.size=R(D,0),this.has=g(M.has),this.keys=g(M.keys)};O.prototype={getIterator:function(){return y(v(p(this.keys,this.set)))},includes:function(M){return p(this.has,this.set,M)}},T.exports=function(M){v(M);var D=+M.size;if(D!==D)throw new I(b);var L=x(D);if(L<0)throw new A(b);return new O(M,L)}}),(function(T,P,a){var g=a(23),v=function(x){return{size:x,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},p=function(x){return{size:x,has:function(){return!0},keys:function(){throw new Error("e")}}};T.exports=function(x,y){var b=g("Set");try{new b()[x](v(0));try{return new b()[x](v(-1)),!1}catch(I){if(!y)return!0;try{return new b()[x](p(-1/0)),!1}catch(R){var A=new b([1,2]);return y(A[x](p(1/0)))}}}catch(I){return!1}}}),(function(T,P,a){var g=a(3),v=a(7),p=a(461),x=a(459),y=!x("intersection",function(b){return b.size===2&&b.has(1)&&b.has(2)})||v(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});g({target:"Set",proto:!0,real:!0,forced:y},{intersection:p})}),(function(T,P,a){var g=a(452),v=a(453),p=a(457),x=a(458),y=a(455),b=a(456),A=v.Set,I=v.add,R=v.has;T.exports=function(M){var D=g(this),L=x(M),B=new A;return p(D)>L.size?b(L.getIterator(),function(F){R(D,F)&&I(B,F)}):y(D,function(F){L.includes(F)&&I(B,F)}),B}}),(function(T,P,a){var g=a(3),v=a(463),p=a(459),x=!p("isDisjointFrom",function(y){return!y});g({target:"Set",proto:!0,real:!0,forced:x},{isDisjointFrom:v})}),(function(T,P,a){var g=a(452),v=a(453).has,p=a(457),x=a(458),y=a(455),b=a(456),A=a(141);T.exports=function(R){var O=g(this),M=x(R);if(p(O)<=M.size)return y(O,function(L){if(M.includes(L))return!1},!0)!==!1;var D=M.getIterator();return b(D,function(L){if(v(O,L))return A(D.iterator,"normal",!1)})!==!1}}),(function(T,P,a){var g=a(3),v=a(465),p=a(459),x=!p("isSubsetOf",function(y){return y});g({target:"Set",proto:!0,real:!0,forced:x},{isSubsetOf:v})}),(function(T,P,a){var g=a(452),v=a(457),p=a(455),x=a(458);T.exports=function(b){var A=g(this),I=x(b);return v(A)>I.size?!1:p(A,function(R){if(!I.includes(R))return!1},!0)!==!1}}),(function(T,P,a){var g=a(3),v=a(467),p=a(459),x=!p("isSupersetOf",function(y){return!y});g({target:"Set",proto:!0,real:!0,forced:x},{isSupersetOf:v})}),(function(T,P,a){var g=a(452),v=a(453).has,p=a(457),x=a(458),y=a(456),b=a(141);T.exports=function(I){var R=g(this),O=x(I);if(p(R)<O.size)return!1;var M=O.getIterator();return y(M,function(D){if(!v(R,D))return b(M.iterator,"normal",!1)})!==!1}}),(function(T,P,a){var g=a(3),v=a(469),p=a(470),x=a(459),y=!x("symmetricDifference")||!p("symmetricDifference");g({target:"Set",proto:!0,real:!0,forced:y},{symmetricDifference:v})}),(function(T,P,a){var g=a(452),v=a(453),p=a(454),x=a(458),y=a(456),b=v.add,A=v.has,I=v.remove;T.exports=function(O){var M=g(this),D=x(O).getIterator(),L=p(M);return y(D,function(B){A(M,B)?I(L,B):b(L,B)}),L}}),(function(T){T.exports=function(P){try{var a=new Set,g={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return a.clear(),a.add(4),function(){return{done:!0}}}})}},v=a[P](g);return v.size===1&&v.values().next().value===4}catch(p){return!1}}}),(function(T,P,a){var g=a(3),v=a(472),p=a(470),x=a(459),y=!x("union")||!p("union");g({target:"Set",proto:!0,real:!0,forced:y},{union:v})}),(function(T,P,a){var g=a(452),v=a(453).add,p=a(454),x=a(458),y=a(456);T.exports=function(A){var I=g(this),R=x(A).getIterator(),O=p(I);return y(R,function(M){v(O,M)}),O}}),(function(T,P,a){var g=a(3),v=a(14),p=a(16),x=a(61),y=a(68),b=a(7),A=v("".charAt),I=b(function(){return"\u{20BB7}".at(-2)!=="\uD842"});g({target:"String",proto:!0,forced:I},{at:function(O){var M=y(p(this)),D=M.length,L=x(O),B=L>=0?L:D+L;return B<0||B>=D?void 0:A(M,B)}})}),(function(T,P,a){var g=a(3),v=a(475).codeAt;g({target:"String",proto:!0},{codePointAt:function(x){return v(this,x)}})}),(function(T,P,a){var g=a(14),v=a(61),p=a(68),x=a(16),y=g("".charAt),b=g("".charCodeAt),A=g("".slice),I=function(R){return function(O,M){var D=p(x(O)),L=v(M),B=D.length,F,k;return L<0||L>=B?R?"":void 0:(F=b(D,L),F<55296||F>56319||L+1===B||(k=b(D,L+1))<56320||k>57343?R?y(D,L):F:R?A(D,L,L+2):(F-55296<<10)+(k-56320)+65536)}};T.exports={codeAt:I(!1),charAt:I(!0)}}),(function(T,P,a){var g=a(3),v=a(85),p=a(5).f,x=a(64),y=a(68),b=a(477),A=a(16),I=a(478),R=a(36),O=v("".slice),M=Math.min,D=I("endsWith"),L=!R&&!D&&!!(function(){var B=p(String.prototype,"endsWith");return B&&!B.writable})();g({target:"String",proto:!0,forced:!L&&!D},{endsWith:function(F){var k=y(A(this));b(F);var W=y(F),U=arguments.length>1?arguments[1]:void 0,X=k.length,j=U===void 0?X:M(x(U),X);return O(k,j-W.length,j)===W}})}),(function(T,P,a){var g=a(432),v=TypeError;T.exports=function(p){if(g(p))throw new v("The method doesn't accept regular expressions");return p}}),(function(T,P,a){var g=a(33),v=g("match");T.exports=function(p){var x=/./;try{"/./"[p](x)}catch(y){try{return x[v]=!1,"/./"[p](x)}catch(b){}}return!1}}),(function(T,P,a){var g=a(3),v=a(14),p=a(60),x=RangeError,y=String.fromCharCode,b=String.fromCodePoint,A=v([].join),I=!!b&&b.length!==1;g({target:"String",stat:!0,arity:1,forced:I},{fromCodePoint:function(O){for(var M=[],D=arguments.length,L=0,B;D>L;){if(B=+arguments[L],p(B,1114111)!==B)throw new x(B+" is not a valid code point");M[L++]=B<65536?y(B):y(((B-=65536)>>10)+55296,B%1024+56320)}return A(M,"")}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(477),x=a(16),y=a(68),b=a(478),A=v("".indexOf);g({target:"String",proto:!0,forced:!b("includes")},{includes:function(R){return!!~A(y(x(this)),y(p(R)),arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(16),x=a(68),y=v("".charCodeAt);g({target:"String",proto:!0},{isWellFormed:function(){for(var A=x(p(this)),I=A.length,R=0;R<I;R++){var O=y(A,R);if((O&63488)===55296&&(O>=56320||++R>=I||(y(A,R)&64512)!==56320))return!1}return!0}})}),(function(T,P,a){var g=a(475).charAt,v=a(68),p=a(51),x=a(176),y=a(179),b="String Iterator",A=p.set,I=p.getterFor(b);x(String,"String",function(R){A(this,{type:b,string:v(R),index:0})},function(){var O=I(this),M=O.string,D=O.index,L;return D>=M.length?y(void 0,!0):(L=g(M,D),O.index+=L.length,y(L,!1))})}),(function(T,P,a){var g=a(8),v=a(14),p=a(484),x=a(46),y=a(20),b=a(64),A=a(68),I=a(16),R=a(29),O=a(485),M=a(433),D=a(486),L=v("".indexOf);p("match",function(B,F,k){return[function(U){var X=I(this),j=y(U)?R(U,B):void 0;return j?g(j,U,X):new RegExp(U)[B](A(X))},function(W){var U=x(this),X=A(W),j=k(F,U,X);if(j.done)return j.value;var H=A(M(U));if(!~L(H,"g"))return D(U,X);var Y=!!~L(H,"u")||!!~L(H,"v");U.lastIndex=0;for(var Z=[],_=0,K;(K=D(U,X))!==null;){var tt=A(K[0]);Z[_]=tt,tt===""&&(U.lastIndex=O(X,b(U.lastIndex),Y)),_++}return _===0?null:Z}]})}),(function(T,P,a){a(442);var g=a(8),v=a(47),p=a(443),x=a(7),y=a(33),b=a(43),A=y("species"),I=RegExp.prototype;T.exports=function(R,O,M,D){var L=y(R),B=!x(function(){var U={};return U[L]=function(){return 7},""[R](U)!==7}),F=B&&!x(function(){var U=!1,X=/a/;if(R==="split"){var j={};j[A]=function(){return X},X={constructor:j,flags:""},X[L]=/./[L]}return X.exec=function(){return U=!0,null},X[L](""),!U});if(!B||!F||M){var k=/./[L],W=O(L,""[R],function(U,X,j,H,Y){var Z=X.exec;return Z===p||Z===I.exec?B&&!Y?{done:!0,value:g(k,X,j,H)}:{done:!0,value:g(U,j,X,H)}:{done:!1}});v(String.prototype,R,W[0]),v(I,L,W[1])}D&&b(I[L],"sham",!0)}}),(function(T,P,a){var g=a(475).charAt;T.exports=function(v,p,x){return p+(x&&g(v,p).length||1)}}),(function(T,P,a){var g=a(8),v=a(46),p=a(21),x=a(15),y=a(443),b=TypeError;T.exports=function(A,I){var R=A.exec;if(p(R)){var O=g(R,A,I);return O!==null&&v(O),O}if(x(A)==="RegExp")return g(y,A,I);throw new b("RegExp#exec called on incompatible receiver")}}),(function(T,P,a){var g=a(3),v=a(8),p=a(85),x=a(177),y=a(179),b=a(16),A=a(64),I=a(68),R=a(46),O=a(20),M=a(15),D=a(432),L=a(433),B=a(29),F=a(47),k=a(7),W=a(33),U=a(380),X=a(485),j=a(486),H=a(51),Y=a(36),Z=W("matchAll"),_="RegExp String",K=_+" Iterator",tt=H.set,nt=H.getterFor(K),at=RegExp.prototype,it=TypeError,ot=p("".indexOf),ut=p("".matchAll),ht=!!ut&&!k(function(){ut("a",/./)}),gt=x(function(bt,Ft,Lt,Pt){tt(this,{type:K,regexp:bt,string:Ft,global:Lt,unicode:Pt,done:!1})},_,function(){var bt=nt(this);if(bt.done)return y(void 0,!0);var Ft=bt.regexp,Lt=bt.string,Pt=j(Ft,Lt);return Pt===null?(bt.done=!0,y(void 0,!0)):bt.global?(I(Pt[0])===""&&(Ft.lastIndex=X(Lt,A(Ft.lastIndex),bt.unicode)),y(Pt,!1)):(bt.done=!0,y(Pt,!1))}),yt=function(Et){var bt=R(this),Ft=I(Et),Lt=U(bt,RegExp),Pt=I(L(bt)),mt,xt,wt;return mt=new Lt(Lt===RegExp?bt.source:bt,Pt),xt=!!~ot(Pt,"g"),wt=!!~ot(Pt,"u")||!!~ot(Pt,"v"),mt.lastIndex=A(bt.lastIndex),new gt(mt,Ft,xt,wt)};g({target:"String",proto:!0,forced:ht},{matchAll:function(bt){var Ft=b(this),Lt,Pt,mt,xt;if(O(bt)){if(D(bt)&&(Lt=I(b(L(bt))),!~ot(Lt,"g")))throw new it("`.matchAll` does not allow non-global regexes");if(ht)return ut(Ft,bt);if(mt=B(bt,Z),mt===void 0&&Y&&M(bt)==="RegExp"&&(mt=yt),mt)return v(mt,bt,Ft)}else if(ht)return ut(Ft,bt);return Pt=I(Ft),xt=new RegExp(bt,"g"),Y?v(yt,xt,Pt):xt[Z](Pt)}}),Y||Z in at||F(at,Z,yt)}),(function(T,P,a){var g=a(3),v=a(247).end,p=a(489);g({target:"String",proto:!0,forced:p},{padEnd:function(y){return v(this,y,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(28);T.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(g)}),(function(T,P,a){var g=a(3),v=a(247).start,p=a(489);g({target:"String",proto:!0,forced:p},{padStart:function(y){return v(this,y,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(12),x=a(39),y=a(68),b=a(63),A=v([].push),I=v([].join);g({target:"String",stat:!0},{raw:function(O){var M=p(x(O).raw),D=b(M);if(!D)return"";for(var L=arguments.length,B=[],F=0;;){if(A(B,y(M[F++])),F===D)return I(B,"");F<L&&A(B,y(arguments[F]))}}})}),(function(T,P,a){var g=a(3),v=a(248);g({target:"String",proto:!0},{repeat:v})}),(function(T,P,a){var g=a(95),v=a(8),p=a(14),x=a(484),y=a(7),b=a(46),A=a(21),I=a(20),R=a(61),O=a(64),M=a(68),D=a(16),L=a(485),B=a(29),F=a(494),k=a(433),W=a(486),U=a(33),X=U("replace"),j=Math.max,H=Math.min,Y=p([].concat),Z=p([].push),_=p("".indexOf),K=p("".slice),tt=function(ot){return ot===void 0?ot:String(ot)},nt=(function(){return"a".replace(/./,"$0")==="$0"})(),at=(function(){return/./[X]?/./[X]("a","$0")==="":!1})(),it=!y(function(){var ot=/./;return ot.exec=function(){var ut=[];return ut.groups={a:"7"},ut},"".replace(ot,"$<a>")!=="7"});x("replace",function(ot,ut,ht){var gt=at?"$":"$0";return[function(Et,bt){var Ft=D(this),Lt=I(Et)?B(Et,X):void 0;return Lt?v(Lt,Et,Ft,bt):v(ut,M(Ft),Et,bt)},function(yt,Et){var bt=b(this),Ft=M(yt),Lt=A(Et);Lt||(Et=M(Et));var Pt=M(k(bt));if(typeof Et=="string"&&!~_(Et,gt)&&!~_(Et,"$<")&&!~_(Pt,"y")){var mt=ht(ut,bt,Ft,Et);if(mt.done)return mt.value}var xt=!!~_(Pt,"g"),wt;xt&&(wt=!!~_(Pt,"u")||!!~_(Pt,"v"),bt.lastIndex=0);for(var Bt=[],Jt;Jt=W(bt,Ft),!(Jt===null||(Z(Bt,Jt),!xt));){var Ot=M(Jt[0]);Ot===""&&(bt.lastIndex=L(Ft,O(bt.lastIndex),wt))}for(var jt="",ie=0,me=0;me<Bt.length;me++){Jt=Bt[me];for(var se=M(Jt[0]),he=j(H(R(Jt.index),Ft.length),0),Oe=[],Me,Re=1;Re<Jt.length;Re++)Z(Oe,tt(Jt[Re]));var ge=Jt.groups;if(Lt){var Te=Y([se],Oe,he,Ft);ge!==void 0&&Z(Te,ge),Me=M(g(Et,void 0,Te))}else Me=F(se,Ft,he,Oe,ge,Et);he>=ie&&(jt+=K(Ft,ie,he)+Me,ie=he+se.length)}return jt+K(Ft,ie)}]},!it||!nt||at)}),(function(T,P,a){var g=a(14),v=a(39),p=Math.floor,x=g("".charAt),y=g("".replace),b=g("".slice),A=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,I=/\$([$&'`]|\d{1,2})/g;T.exports=function(R,O,M,D,L,B){var F=M+R.length,k=D.length,W=I;return L!==void 0&&(L=v(L),W=A),y(B,W,function(U,X){var j;switch(x(X,0)){case"$":return"$";case"&":return R;case"`":return b(O,0,M);case"'":return b(O,F);case"<":j=L[b(X,1,-1)];break;default:var H=+X;if(H===0)return U;if(H>k){var Y=p(H/10);return Y===0?U:Y<=k?D[Y-1]===void 0?x(X,1):D[Y-1]+x(X,1):U}j=D[H-1]}return j===void 0?"":j})}}),(function(T,P,a){var g=a(3),v=a(8),p=a(14),x=a(16),y=a(21),b=a(20),A=a(432),I=a(68),R=a(29),O=a(433),M=a(494),D=a(33),L=a(36),B=D("replace"),F=TypeError,k=p("".indexOf),W=p("".replace),U=p("".slice),X=Math.max;g({target:"String",proto:!0},{replaceAll:function(H,Y){var Z=x(this),_,K,tt,nt,at,it,ot,ut,ht,gt,yt=0,Et="";if(b(H)){if(_=A(H),_&&(K=I(x(O(H))),!~k(K,"g")))throw new F("`.replaceAll` does not allow non-global regexes");if(tt=R(H,B),tt)return v(tt,H,Z,Y);if(L&&_)return W(I(Z),H,Y)}for(nt=I(Z),at=I(H),it=y(Y),it||(Y=I(Y)),ot=at.length,ut=X(1,ot),ht=k(nt,at);ht!==-1;)gt=it?I(Y(at,ht,nt)):M(at,nt,ht,[],void 0,Y),Et+=U(nt,yt,ht)+gt,yt=ht+ot,ht=ht+ut>nt.length?-1:k(nt,at,ht+ut);return yt<nt.length&&(Et+=U(nt,yt)),Et}})}),(function(T,P,a){var g=a(8),v=a(484),p=a(46),x=a(20),y=a(16),b=a(362),A=a(68),I=a(29),R=a(486);v("search",function(O,M,D){return[function(B){var F=y(this),k=x(B)?I(B,O):void 0;return k?g(k,B,F):new RegExp(B)[O](A(F))},function(L){var B=p(this),F=A(L),k=D(M,B,F);if(k.done)return k.value;var W=B.lastIndex;b(W,0)||(B.lastIndex=0);var U=R(B,F);return b(B.lastIndex,W)||(B.lastIndex=W),U===null?-1:U.index}]})}),(function(T,P,a){var g=a(8),v=a(14),p=a(484),x=a(46),y=a(20),b=a(16),A=a(380),I=a(485),R=a(64),O=a(68),M=a(29),D=a(433),L=a(486),B=a(436),F=a(7),k=B.UNSUPPORTED_Y,W=4294967295,U=Math.min,X=v([].push),j=v("".slice),H=v("".indexOf),Y=!F(function(){var _=/(?:)/,K=_.exec;_.exec=function(){return K.apply(this,arguments)};var tt="ab".split(_);return tt.length!==2||tt[0]!=="a"||tt[1]!=="b"}),Z="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;p("split",function(_,K,tt){var nt="0".split(void 0,0).length?function(at,it){return at===void 0&&it===0?[]:g(K,this,at,it)}:K;return[function(it,ot){var ut=b(this),ht=y(it)?M(it,_):void 0;return ht?g(ht,it,ut,ot):g(nt,O(ut),it,ot)},function(at,it){var ot=x(this),ut=O(at);if(!Z){var ht=tt(nt,ot,ut,it,nt!==K);if(ht.done)return ht.value}var gt=A(ot,RegExp),yt=O(D(ot)),Et=!!~H(yt,"u")||!!~H(yt,"v");k?~H(yt,"g")||(yt+="g"):~H(yt,"y")||(yt+="y");var bt=new gt(k?"^(?:"+ot.source+")":ot,yt),Ft=it===void 0?W:it>>>0;if(Ft===0)return[];if(ut.length===0)return L(bt,ut)===null?[ut]:[];for(var Lt=0,Pt=0,mt=[];Pt<ut.length;){bt.lastIndex=k?0:Pt;var xt=L(bt,k?j(ut,Pt):ut),wt;if(xt===null||(wt=U(R(bt.lastIndex+(k?Pt:0)),ut.length))===Lt)Pt=I(ut,Pt,Et);else{if(X(mt,j(ut,Lt,Pt)),mt.length===Ft)return mt;for(var Bt=1;Bt<=xt.length-1;Bt++)if(X(mt,xt[Bt]),mt.length===Ft)return mt;Pt=Lt=wt}}return X(mt,j(ut,Lt)),mt}]},Z||!Y,k)}),(function(T,P,a){var g=a(3),v=a(85),p=a(5).f,x=a(64),y=a(68),b=a(477),A=a(16),I=a(478),R=a(36),O=v("".slice),M=Math.min,D=I("startsWith"),L=!R&&!D&&!!(function(){var B=p(String.prototype,"startsWith");return B&&!B.writable})();g({target:"String",proto:!0,forced:!L&&!D},{startsWith:function(F){var k=y(A(this));b(F);var W=y(F),U=x(M(arguments.length>1?arguments[1]:void 0,k.length));return O(k,U,U+W.length)===W}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(16),x=a(61),y=a(68),b=v("".slice),A=Math.max,I=Math.min,R=!"".substr||"ab".substr(-1)!=="b";g({target:"String",proto:!0,forced:R},{substr:function(M,D){var L=y(p(this)),B=L.length,F=x(M),k=F<0?A(B+F,0):I(F,B),W=D===void 0?B:x(D);if(W<=0)return"";var U=I(k+W,B);return k>=U?"":b(L,k,U)}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(14),x=a(16),y=a(68),b=a(7),A=Array,I=p("".charAt),R=p("".charCodeAt),O=p([].join),M="".toWellFormed,D="\uFFFD",L=M&&b(function(){return v(M,1)!=="1"});g({target:"String",proto:!0,forced:L},{toWellFormed:function(){var F=y(x(this));if(L)return v(M,F);for(var k=F.length,W=A(k),U=0;U<k;U++){var X=R(F,U);(X&63488)!==55296?W[U]=I(F,U):X>=56320||U+1>=k||(R(F,U+1)&64512)!==56320?W[U]=D:(W[U]=I(F,U),W[++U]=I(F,U))}return O(W,"")}})}),(function(T,P,a){var g=a(3),v=a(325).trim,p=a(502);g({target:"String",proto:!0,forced:p("trim")},{trim:function(){return v(this)}})}),(function(T,P,a){var g=a(49).PROPER,v=a(7),p=a(326),x="\u200B\x85\u180E";T.exports=function(y){return v(function(){return!!p[y]()||x[y]()!==x||g&&p[y].name!==y})}}),(function(T,P,a){a(504);var g=a(3),v=a(505);g({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==v},{trimEnd:v})}),(function(T,P,a){var g=a(3),v=a(505);g({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==v},{trimRight:v})}),(function(T,P,a){var g=a(325).end,v=a(502);T.exports=v("trimEnd")?function(){return g(this)}:"".trimEnd}),(function(T,P,a){a(507);var g=a(3),v=a(508);g({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==v},{trimStart:v})}),(function(T,P,a){var g=a(3),v=a(508);g({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==v},{trimLeft:v})}),(function(T,P,a){var g=a(325).start,v=a(502);T.exports=v("trimStart")?function(){return g(this)}:"".trimStart}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("anchor")},{anchor:function(y){return v(this,"a","name",y)}})}),(function(T,P,a){var g=a(14),v=a(16),p=a(68),x=/"/g,y=g("".replace);T.exports=function(b,A,I,R){var O=p(v(b)),M="<"+A;return I!==""&&(M+=" "+I+'="'+y(p(R),x,"&quot;")+'"'),M+">"+O+"</"+A+">"}}),(function(T,P,a){var g=a(7);T.exports=function(v){return g(function(){var p=""[v]('"');return p!==p.toLowerCase()||p.split('"').length>3})}}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("big")},{big:function(){return v(this,"big","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("blink")},{blink:function(){return v(this,"blink","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("bold")},{bold:function(){return v(this,"b","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("fixed")},{fixed:function(){return v(this,"tt","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("fontcolor")},{fontcolor:function(y){return v(this,"font","color",y)}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("fontsize")},{fontsize:function(y){return v(this,"font","size",y)}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("italics")},{italics:function(){return v(this,"i","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("link")},{link:function(y){return v(this,"a","href",y)}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("small")},{small:function(){return v(this,"small","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("strike")},{strike:function(){return v(this,"strike","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("sub")},{sub:function(){return v(this,"sub","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("sup")},{sup:function(){return v(this,"sup","","")}})}),(function(T,P,a){var g=a(525);g("Float32",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(3),v=a(4),p=a(8),x=a(6),y=a(526),b=a(223),A=a(212),I=a(215),R=a(11),O=a(43),M=a(331),D=a(216),L=a(527),B=a(528),F=a(18),k=a(38),W=a(69),U=a(20),X=a(22),j=a(71),H=a(24),Y=a(118),Z=a(57).f,_=a(529),K=a(83).forEach,tt=a(200),nt=a(77),at=a(44),it=a(5),ot=a(204),ut=a(51),ht=a(123),gt=ut.get,yt=ut.set,Et=ut.enforce,bt=at.f,Ft=it.f,Lt=v.RangeError,Pt=A.ArrayBuffer,mt=Pt.prototype,xt=A.DataView,wt=b.NATIVE_ARRAY_BUFFER_VIEWS,Bt=b.TYPED_ARRAY_TAG,Jt=b.TypedArray,Ot=b.TypedArrayPrototype,jt=b.isTypedArray,ie="BYTES_PER_ELEMENT",me="Wrong length",se=function(ge,Te){nt(ge,Te,{configurable:!0,get:function(){return gt(this)[Te]}})},he=function(ge){var Te;return H(mt,ge)||(Te=W(ge))==="ArrayBuffer"||Te==="SharedArrayBuffer"},Oe=function(ge,Te){return jt(ge)&&!X(Te)&&Te in ge&&M(+Te)&&Te>=0},Me=function(Te,Ve){return Ve=F(Ve),Oe(Te,Ve)?R(2,Te[Ve]):Ft(Te,Ve)},Re=function(Te,Ve,Ht){return Ve=F(Ve),Oe(Te,Ve)&&U(Ht)&&k(Ht,"value")&&!k(Ht,"get")&&!k(Ht,"set")&&!Ht.configurable&&(!k(Ht,"writable")||Ht.writable)&&(!k(Ht,"enumerable")||Ht.enumerable)?(Te[Ve]=Ht.value,Te):bt(Te,Ve,Ht)};x?(wt||(it.f=Me,at.f=Re,se(Ot,"buffer"),se(Ot,"byteOffset"),se(Ot,"byteLength"),se(Ot,"length")),g({target:"Object",stat:!0,forced:!wt},{getOwnPropertyDescriptor:Me,defineProperty:Re}),T.exports=function(ge,Te,Ve){var Ht=ge.match(/\d+/)[0]/8,ne=ge+(Ve?"Clamped":"")+"Array",ae="get"+ge,rn="set"+ge,Yt=v[ne],ee=Yt,pe=ee&&ee.prototype,ce={},Pe=function(Mt,$t){var _t=gt(Mt);return _t.view[ae]($t*Ht+_t.byteOffset,!0)},ln=function(Mt,$t,_t){var Nt=gt(Mt);Nt.view[rn]($t*Ht+Nt.byteOffset,Ve?B(_t):_t,!0)},It=function(Mt,$t){bt(Mt,$t,{get:function(){return Pe(this,$t)},set:function(_t){return ln(this,$t,_t)},enumerable:!0})};wt?y&&(ee=Te(function(Mt,$t,_t,Nt){return I(Mt,pe),ht((function(){return U($t)?he($t)?Nt!==void 0?new Yt($t,L(_t,Ht),Nt):_t!==void 0?new Yt($t,L(_t,Ht)):new Yt($t):jt($t)?ot(ee,$t):p(_,ee,$t):new Yt(D($t))})(),Mt,ee)}),Y&&Y(ee,Jt),K(Z(Yt),function(Mt){Mt in ee||O(ee,Mt,Yt[Mt])}),ee.prototype=pe):(ee=Te(function(Mt,$t,_t,Nt){I(Mt,pe);var Se=0,He=0,Wt,Qt,te;if(!U($t))te=D($t),Qt=te*Ht,Wt=new Pt(Qt);else if(he($t)){Wt=$t,He=L(_t,Ht);var oe=$t.byteLength;if(Nt===void 0){if(oe%Ht)throw new Lt(me);if(Qt=oe-He,Qt<0)throw new Lt(me)}else if(Qt=D(Nt)*Ht,Qt+He>oe)throw new Lt(me);te=Qt/Ht}else return jt($t)?ot(ee,$t):p(_,ee,$t);for(yt(Mt,{buffer:Wt,byteOffset:He,byteLength:Qt,length:te,view:new xt(Wt)});Se<te;)It(Mt,Se++)}),Y&&Y(ee,Jt),pe=ee.prototype=j(Ot)),pe.constructor!==ee&&O(pe,"constructor",ee),Et(pe).TypedArrayConstructor=ee,Bt&&O(pe,Bt,ne);var Xt=ee!==Yt;ce[ne]=ee,g({global:!0,constructor:!0,forced:Xt,sham:!wt},ce),ie in ee||O(ee,ie,Ht),ie in pe||O(pe,ie,Ht),tt(ne)}):T.exports=function(){}}),(function(T,P,a){var g=a(4),v=a(7),p=a(171),x=a(223).NATIVE_ARRAY_BUFFER_VIEWS,y=g.ArrayBuffer,b=g.Int8Array;T.exports=!x||!v(function(){b(1)})||!v(function(){new b(-1)})||!p(function(A){new b,new b(null),new b(1.5),new b(A)},!0)||v(function(){return new b(new y(2),1,void 0).length!==1})}),(function(T,P,a){var g=a(269),v=RangeError;T.exports=function(p,x){var y=g(p);if(y%x)throw new v("Wrong offset");return y}}),(function(T){var P=Math.floor;T.exports=function(a){var g=+a;if(g!==g||g<=0)return 0;if(g>=255)return 255;var v=P(g);return v+.5<g?v+1:g<v+.5||v%2===0?v:v+1}}),(function(T,P,a){var g=a(84),v=a(8),p=a(30),x=a(381),y=a(39),b=a(63),A=a(139),I=a(140),R=a(137),O=a(530),M=a(223).aTypedArrayConstructor,D=a(531);T.exports=function(B){var F=x(this),k=arguments.length,W=k>1?arguments[1]:void 0,U=W!==void 0;U&&p(W);var X=y(B),j=I(X),H,Y,Z,_,K,tt,nt,at;if(j&&!R(j))for(nt=A(X,j),at=nt.next,X=[];!(tt=v(at,nt)).done;)X.push(tt.value);for(U&&k>2&&(W=g(W,arguments[2])),Y=b(X),Z=new(M(F))(Y),_=O(Z),H=0;Y>H;H++)K=U?W(X[H],H):X[H],Z[H]=_?D(K):+K;return Z}}),(function(T,P,a){var g=a(69);T.exports=function(v){var p=g(v);return p==="BigInt64Array"||p==="BigUint64Array"}}),(function(T,P,a){var g=a(19),v=TypeError;T.exports=function(p){var x=g(p,"number");if(typeof x=="number")throw new v("Can't convert number to bigint");return BigInt(x)}}),(function(T,P,a){var g=a(525);g("Float64",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(525);g("Int8",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(525);g("Int16",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(525);g("Int32",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(525);g("Uint8",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(525);g("Uint8",function(v){return function(x,y,b){return v(this,x,y,b)}},!0)}),(function(T,P,a){var g=a(525);g("Uint16",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(525);g("Uint32",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(223),v=a(63),p=a(61),x=g.aTypedArray,y=g.exportTypedArrayMethod;y("at",function(A){var I=x(this),R=v(I),O=p(A),M=O>=0?O:R+O;return M<0||M>=R?void 0:I[M]})}),(function(T,P,a){var g=a(14),v=a(223),p=a(151),x=g(p),y=v.aTypedArray,b=v.exportTypedArrayMethod;b("copyWithin",function(I,R){return x(y(this),I,R,arguments.length>2?arguments[2]:void 0)})}),(function(T,P,a){var g=a(223),v=a(83).every,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("every",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=a(156),p=a(531),x=a(69),y=a(8),b=a(14),A=a(7),I=g.aTypedArray,R=g.exportTypedArrayMethod,O=b("".slice),M=A(function(){var D=0;return new Int8Array(2).fill({valueOf:function(){return D++}}),D!==1});R("fill",function(L){var B=arguments.length;I(this);var F=O(x(this),0,3)==="Big"?p(L):+L;return y(v,this,F,B>1?arguments[1]:void 0,B>2?arguments[2]:void 0)},M)}),(function(T,P,a){var g=a(223),v=a(83).filter,p=a(545),x=g.aTypedArray,y=g.exportTypedArrayMethod;y("filter",function(A){var I=v(x(this),A,arguments.length>1?arguments[1]:void 0);return p(this,I)})}),(function(T,P,a){var g=a(204),v=a(223).getTypedArrayConstructor;T.exports=function(p,x){return g(v(p),x)}}),(function(T,P,a){var g=a(223),v=a(83).find,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("find",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=a(83).findIndex,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("findIndex",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=a(161).findLast,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("findLast",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=a(161).findLastIndex,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("findLastIndex",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=a(83).forEach,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("forEach",function(b){v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(526),v=a(223).exportTypedArrayStaticMethod,p=a(529);v("from",p,g)}),(function(T,P,a){var g=a(223),v=a(59).includes,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("includes",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=a(59).indexOf,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("indexOf",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(4),v=a(7),p=a(14),x=a(223),y=a(175),b=a(33),A=b("iterator"),I=g.Uint8Array,R=p(y.values),O=p(y.keys),M=p(y.entries),D=x.aTypedArray,L=x.exportTypedArrayMethod,B=I&&I.prototype,F=!v(function(){B[A].call([1])}),k=!!B&&B.values&&B[A]===B.values&&B.values.name==="values",W=function(){return R(D(this))};L("entries",function(){return M(D(this))},F),L("keys",function(){return O(D(this))},F),L("values",W,F||!k,{name:"values"}),L(A,W,F||!k,{name:"values"})}),(function(T,P,a){var g=a(223),v=a(14),p=g.aTypedArray,x=g.exportTypedArrayMethod,y=v([].join);x("join",function(A){return y(p(this),A)})}),(function(T,P,a){var g=a(223),v=a(95),p=a(182),x=g.aTypedArray,y=g.exportTypedArrayMethod;y("lastIndexOf",function(A){var I=arguments.length;return v(p,x(this),I>1?[A,arguments[1]]:[A])})}),(function(T,P,a){var g=a(223),v=a(83).map,p=a(545),x=g.aTypedArray,y=g.exportTypedArrayMethod;y("map",function(A){var I=v(x(this),A,arguments.length>1?arguments[1]:void 0);return p(this,I)})}),(function(T,P,a){var g=a(223),v=a(526),p=g.aTypedArrayConstructor,x=g.exportTypedArrayStaticMethod;x("of",function(){for(var b=0,A=arguments.length,I=new(p(this))(A);A>b;)I[b]=arguments[b++];return I},v)}),(function(T,P,a){var g=a(223),v=a(187).left,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("reduce",function(b){var A=arguments.length;return v(p(this),b,A,A>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=a(187).right,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("reduceRight",function(b){var A=arguments.length;return v(p(this),b,A,A>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=g.aTypedArray,p=g.exportTypedArrayMethod,x=Math.floor;p("reverse",function(){for(var b=this,A=v(b).length,I=x(A/2),R=0,O;R<I;)O=b[R],b[R++]=b[--A],b[A]=O;return b})}),(function(T,P,a){var g=a(4),v=a(8),p=a(223),x=a(63),y=a(527),b=a(39),A=a(7),I=g.RangeError,R=g.Int8Array,O=R&&R.prototype,M=O&&O.set,D=p.aTypedArray,L=p.exportTypedArrayMethod,B=!A(function(){var k=new Uint8ClampedArray(2);return v(M,k,{length:1,0:3},1),k[1]!==3}),F=B&&p.NATIVE_ARRAY_BUFFER_VIEWS&&A(function(){var k=new R(2);return k.set(1),k.set("2",1),k[0]!==0||k[1]!==2});L("set",function(W){D(this);var U=y(arguments.length>1?arguments[1]:void 0,1),X=b(W);if(B)return v(M,this,X,U);var j=this.length,H=x(X),Y=0;if(H+U>j)throw new I("Wrong length");for(;Y<H;)this[U+Y]=X[Y++]},!B||F)}),(function(T,P,a){var g=a(223),v=a(7),p=a(76),x=g.aTypedArray,y=g.getTypedArrayConstructor,b=g.exportTypedArrayMethod,A=v(function(){new Int8Array(1).slice()});b("slice",function(R,O){for(var M=p(x(this),R,O),D=y(this),L=0,B=M.length,F=new D(B);B>L;)F[L]=M[L++];return F},A)}),(function(T,P,a){var g=a(223),v=a(83).some,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("some",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(4),v=a(85),p=a(7),x=a(30),y=a(195),b=a(223),A=a(196),I=a(197),R=a(27),O=a(198),M=b.aTypedArray,D=b.exportTypedArrayMethod,L=g.Uint16Array,B=L&&v(L.prototype.sort),F=!!B&&!(p(function(){B(new L(2),null)})&&p(function(){B(new L(2),{})})),k=!!B&&!p(function(){if(R)return R<74;if(A)return A<67;if(I)return!0;if(O)return O<602;var U=new L(516),X=Array(516),j,H;for(j=0;j<516;j++)H=j%4,U[j]=515-j,X[j]=j-2*H+3;for(B(U,function(Y,Z){return(Y/4|0)-(Z/4|0)}),j=0;j<516;j++)if(U[j]!==X[j])return!0}),W=function(U){return function(X,j){return U!==void 0?+U(X,j)||0:j!==j?X!==X?0:-1:X!==X?1:X===0&&j===0?1/X>0?1/j>0?0:1:1/j>0?-1:0:X>j?1:X<j?-1:0}};D("sort",function(X){return X!==void 0&&x(X),k?B(this,X):y(M(this),W(X))},!k||F)}),(function(T,P,a){var g=a(223),v=a(64),p=a(60),x=g.aTypedArray,y=g.getTypedArrayConstructor,b=g.exportTypedArrayMethod;b("subarray",function(I,R){var O=x(this),M=O.length,D=p(I,M),L=y(O);return new L(O.buffer,O.byteOffset+D*O.BYTES_PER_ELEMENT,v((R===void 0?M:p(R,M))-D))})}),(function(T,P,a){var g=a(4),v=a(95),p=a(223),x=a(7),y=a(76),b=g.Int8Array,A=p.aTypedArray,I=p.exportTypedArrayMethod,R=[].toLocaleString,O=!!b&&x(function(){R.call(new b(1))}),M=x(function(){return[1,2].toLocaleString()!==new b([1,2]).toLocaleString()})||!x(function(){b.prototype.toLocaleString.call([1,2])});I("toLocaleString",function(){return v(R,O?y(A(this)):A(this),y(arguments))},M)}),(function(T,P,a){var g=a(63),v=a(223),p=v.aTypedArray,x=v.exportTypedArrayMethod,y=v.getTypedArrayConstructor;x("toReversed",function(){for(var A=p(this),I=g(A),R=new(y(A))(I),O=0;O<I;O++)R[O]=A[I-O-1];return R})}),(function(T,P,a){var g=a(223),v=a(14),p=a(30),x=a(204),y=g.aTypedArray,b=g.getTypedArrayConstructor,A=g.exportTypedArrayMethod,I=v(g.TypedArrayPrototype.sort);A("toSorted",function(O){O!==void 0&&p(O);var M=y(this),D=x(b(M),M);return I(D,O)})}),(function(T,P,a){var g=a(223).exportTypedArrayMethod,v=a(7),p=a(4),x=a(14),y=p.Uint8Array,b=y&&y.prototype||{},A=[].toString,I=x([].join);v(function(){A.call({})})&&(A=function(){return I(this)});var R=b.toString!==A;g("toString",A,R)}),(function(T,P,a){var g=a(223),v=a(530),p=a(63),x=a(61),y=a(531),b=g.aTypedArray,A=g.getTypedArrayConstructor,I=g.exportTypedArrayMethod,R=RangeError,O=(function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(D){return D===8}})(),M=O&&(function(){try{new Int8Array(1).with(-.5,1)}catch(D){return!0}})();I("with",function(D,L){var B=b(this),F=p(B),k=x(D),W=k<0?F+k:k,U=v(B)?y(L):+L;if(W>=F||W<0)throw new R("Incorrect index");for(var X=new(A(B))(F),j=0;j<F;j++)X[j]=j===W?U:B[j];return X},!O||M)}),(function(T,P,a){var g=a(3),v=a(4),p=a(204),x=a(573),y=v.Uint8Array,b=!y||!y.fromBase64||!(function(){try{y.fromBase64("a");return}catch(A){}try{y.fromBase64("",null)}catch(A){return!0}})();y&&g({target:"Uint8Array",stat:!0,forced:b},{fromBase64:function(I){var R=x(I,arguments.length>1?arguments[1]:void 0,null,9007199254740991);return p(y,R.bytes)}})}),(function(T,P,a){var g=a(4),v=a(14),p=a(574),x=a(440),y=a(38),b=a(575),A=a(576),I=a(236),R=b.c2i,O=b.c2iUrl,M=g.SyntaxError,D=g.TypeError,L=v("".charAt),B=function(W,U){for(var X=W.length;U<X;U++){var j=L(W,U);if(j!==" "&&j!==" "&&j!==`
30
- `&&j!=="\f"&&j!=="\r")break}return U},F=function(W,U,X){var j=W.length;j<4&&(W+=j===2?"AA":"A");var H=(U[L(W,0)]<<18)+(U[L(W,1)]<<12)+(U[L(W,2)]<<6)+U[L(W,3)],Y=[H>>16&255,H>>8&255,H&255];if(j===2){if(X&&Y[1]!==0)throw new M("Extra bits");return[Y[0]]}if(j===3){if(X&&Y[2]!==0)throw new M("Extra bits");return[Y[0],Y[1]]}return Y},k=function(W,U,X){for(var j=U.length,H=0;H<j;H++)W[X+H]=U[H];return X+j};T.exports=function(W,U,X,j){x(W),p(U);var H=A(U)==="base64"?R:O,Y=U?U.lastChunkHandling:void 0;if(Y===void 0&&(Y="loose"),Y!=="loose"&&Y!=="strict"&&Y!=="stop-before-partial")throw new D("Incorrect `lastChunkHandling` option");X&&I(X.buffer);var Z=W.length,_=X||[],K=0,tt=0,nt="",at=0;if(j)for(;;){if(at=B(W,at),at===Z){if(nt.length>0){if(Y==="stop-before-partial")break;if(Y==="loose"){if(nt.length===1)throw new M("Malformed padding: exactly one additional character");K=k(_,F(nt,H,!1),K)}else throw new M("Missing padding")}tt=Z;break}var it=L(W,at);if(++at,it==="="){if(nt.length<2)throw new M("Padding is too early");if(at=B(W,at),nt.length===2){if(at===Z){if(Y==="stop-before-partial")break;throw new M("Malformed padding: only one =")}L(W,at)==="="&&(++at,at=B(W,at))}if(at<Z)throw new M("Unexpected character after padding");K=k(_,F(nt,H,Y==="strict"),K),tt=Z;break}if(!y(H,it))throw new M("Unexpected character");var ot=j-K;if(ot===1&&nt.length===2||ot===2&&nt.length===3||(nt+=it,nt.length===4&&(K=k(_,F(nt,H,!1),K),nt="",tt=at,K===j)))break}return{bytes:_,read:tt,written:K}}}),(function(T,P,a){var g=a(20),v=String,p=TypeError;T.exports=function(x){if(x===void 0||g(x))return x;throw new p(v(x)+" is not an object or undefined")}}),(function(T){var P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=P+"+/",g=P+"-_",v=function(p){for(var x={},y=0;y<64;y++)x[p.charAt(y)]=y;return x};T.exports={i2c:a,c2i:v(a),i2cUrl:g,c2iUrl:v(g)}}),(function(T){var P=TypeError;T.exports=function(a){var g=a&&a.alphabet;if(g===void 0||g==="base64"||g==="base64url")return g||"base64";throw new P("Incorrect `alphabet` option")}}),(function(T,P,a){var g=a(3),v=a(4),p=a(440),x=a(578);v.Uint8Array&&g({target:"Uint8Array",stat:!0},{fromHex:function(b){return x(p(b)).bytes}})}),(function(T,P,a){var g=a(4),v=a(14),p=g.Uint8Array,x=g.SyntaxError,y=Math.min,b=v("".match);T.exports=function(A,I){var R=A.length;if(R%2!==0)throw new x("String should be an even number of characters");for(var O=I?y(I.length,R/2):R/2,M=I||new p(O),D=b(A,/.{2}/g),L=0;L<O;L++){var B=+("0x"+D[L]+"0");if(B!==B)throw new x("String should only contain hex characters");M[L]=B>>4}return{bytes:M,read:L<<1}}}),(function(T,P,a){var g=a(3),v=a(4),p=a(573),x=a(580),y=v.Uint8Array,b=!y||!y.prototype.setFromBase64||!(function(){var A=new y([255,255,255,255,255]);try{A.setFromBase64("",null);return}catch(I){}try{A.setFromBase64("a");return}catch(I){}try{A.setFromBase64("MjYyZg===")}catch(I){return A[0]===50&&A[1]===54&&A[2]===50&&A[3]===255&&A[4]===255}})();y&&g({target:"Uint8Array",proto:!0,forced:b},{setFromBase64:function(I){x(this);var R=p(I,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:R.read,written:R.written}}})}),(function(T,P,a){var g=a(69),v=TypeError;T.exports=function(p){if(g(p)==="Uint8Array")return p;throw new v("Argument is not an Uint8Array")}}),(function(T,P,a){var g=a(3),v=a(4),p=a(440),x=a(580),y=a(236),b=a(578);function A(){try{var I=new ArrayBuffer(16,{maxByteLength:1024});new Uint8Array(I).setFromHex("cafed00d")}catch(R){return!0}}v.Uint8Array&&g({target:"Uint8Array",proto:!0,forced:A()},{setFromHex:function(R){x(this),p(R),y(this.buffer);var O=b(R,this).read;return{read:O,written:O/2}}})}),(function(T,P,a){var g=a(3),v=a(4),p=a(14),x=a(574),y=a(580),b=a(236),A=a(575),I=a(576),R=A.i2c,O=A.i2cUrl,M=p("".charAt),D=v.Uint8Array,L=!D||!D.prototype.toBase64||!(function(){try{var B=new D;B.toBase64(null)}catch(F){return!0}})();D&&g({target:"Uint8Array",proto:!0,forced:L},{toBase64:function(){var F=y(this),k=arguments.length?x(arguments[0]):void 0,W=I(k)==="base64"?R:O,U=!!k&&!!k.omitPadding;b(this.buffer);for(var X="",j=0,H=F.length,Y,Z=function(_){return M(W,Y>>6*_&63)};j+2<H;j+=3)Y=(F[j]<<16)+(F[j+1]<<8)+F[j+2],X+=Z(3)+Z(2)+Z(1)+Z(0);return j+2===H?(Y=(F[j]<<16)+(F[j+1]<<8),X+=Z(3)+Z(2)+Z(1)+(U?"":"=")):j+1===H&&(Y=F[j]<<16,X+=Z(3)+Z(2)+(U?"":"==")),X}})}),(function(T,P,a){var g=a(3),v=a(4),p=a(14),x=a(580),y=a(236),b=p(1.1.toString),A=p([].join),I=Array,R=v.Uint8Array,O=!R||!R.prototype.toHex||!(function(){try{var M=new R([255,255,255,255,255,255,255,255]);return M.toHex()==="ffffffffffffffff"}catch(D){return!1}})();R&&g({target:"Uint8Array",proto:!0,forced:O},{toHex:function(){x(this),y(this.buffer);for(var D=I(this.length),L=0,B=this.length;L<B;L++){var F=b(this[L],16);D[L]=F.length===1?"0"+F:F}return A(D,"")}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(68),x=String.fromCharCode,y=v("".charAt),b=v(/./.exec),A=v("".slice),I=/^[\da-f]{2}$/i,R=/^[\da-f]{4}$/i;g({global:!0},{unescape:function(M){for(var D=p(M),L="",B=D.length,F=0,k,W;F<B;){if(k=y(D,F++),k==="%"){if(y(D,F)==="u"){if(W=A(D,F+1,F+5),b(R,W)){L+=x(parseInt(W,16)),F+=5;continue}}else if(W=A(D,F,F+2),b(I,W)){L+=x(parseInt(W,16)),F+=2;continue}}L+=k}return L}})}),(function(T,P,a){a(586)}),(function(T,P,a){var g=a(287),v=a(4),p=a(14),x=a(214),y=a(292),b=a(291),A=a(587),I=a(20),R=a(51).enforce,O=a(7),M=a(52),D=Object,L=Array.isArray,B=D.isExtensible,F=D.isFrozen,k=D.isSealed,W=D.freeze,U=D.seal,X=!v.ActiveXObject&&"ActiveXObject"in v,j,H=function(it){return function(){return it(this,arguments.length?arguments[0]:void 0)}},Y=b("WeakMap",H,A),Z=Y.prototype,_=p(Z.set),K=function(){return g&&O(function(){var it=W([]);return _(new Y,it,1),!F(it)})};if(M)if(X){j=A.getConstructor(H,"WeakMap",!0),y.enable();var tt=p(Z.delete),nt=p(Z.has),at=p(Z.get);x(Z,{delete:function(it){if(I(it)&&!B(it)){var ot=R(this);return ot.frozen||(ot.frozen=new j),tt(this,it)||ot.frozen.delete(it)}return tt(this,it)},has:function(ot){if(I(ot)&&!B(ot)){var ut=R(this);return ut.frozen||(ut.frozen=new j),nt(this,ot)||ut.frozen.has(ot)}return nt(this,ot)},get:function(ot){if(I(ot)&&!B(ot)){var ut=R(this);return ut.frozen||(ut.frozen=new j),nt(this,ot)?at(this,ot):ut.frozen.get(ot)}return at(this,ot)},set:function(ot,ut){if(I(ot)&&!B(ot)){var ht=R(this);ht.frozen||(ht.frozen=new j),nt(this,ot)?_(this,ot,ut):ht.frozen.set(ot,ut)}else _(this,ot,ut);return this}})}else K()&&x(Z,{set:function(ot,ut){var ht;return L(ot)&&(F(ot)?ht=W:k(ot)&&(ht=U)),_(this,ot,ut),ht&&ht(ot),this}})}),(function(T,P,a){var g=a(14),v=a(214),p=a(292).getWeakData,x=a(215),y=a(46),b=a(17),A=a(20),I=a(136),R=a(83),O=a(38),M=a(51),D=M.set,L=M.getterFor,B=R.find,F=R.findIndex,k=g([].splice),W=0,U=function(H){return H.frozen||(H.frozen=new X)},X=function(){this.entries=[]},j=function(H,Y){return B(H.entries,function(Z){return Z[0]===Y})};X.prototype={get:function(H){var Y=j(this,H);if(Y)return Y[1]},has:function(H){return!!j(this,H)},set:function(H,Y){var Z=j(this,H);Z?Z[1]=Y:this.entries.push([H,Y])},delete:function(H){var Y=F(this.entries,function(Z){return Z[0]===H});return~Y&&k(this.entries,Y,1),!!~Y}},T.exports={getConstructor:function(H,Y,Z,_){var K=H(function(it,ot){x(it,tt),D(it,{type:Y,id:W++,frozen:null}),b(ot)||I(ot,it[_],{that:it,AS_ENTRIES:Z})}),tt=K.prototype,nt=L(Y),at=function(it,ot,ut){var ht=nt(it),gt=p(y(ot),!0);return gt===!0?U(ht).set(ot,ut):gt[ht.id]=ut,it};return v(tt,{delete:function(it){var ot=nt(this);if(!A(it))return!1;var ut=p(it);return ut===!0?U(ot).delete(it):ut&&O(ut,ot.id)&&delete ut[ot.id]},has:function(ot){var ut=nt(this);if(!A(ot))return!1;var ht=p(ot);return ht===!0?U(ut).has(ot):ht&&O(ht,ut.id)}}),v(tt,Z?{get:function(ot){var ut=nt(this);if(A(ot)){var ht=p(ot);if(ht===!0)return U(ut).get(ot);if(ht)return ht[ut.id]}},set:function(ot,ut){return at(this,ot,ut)}}:{add:function(ot){return at(this,ot,!0)}}),K}}}),(function(T,P,a){var g=a(3),v=a(589),p=a(36),x=v.get,y=v.has,b=v.set;g({target:"WeakMap",proto:!0,real:!0,forced:p},{getOrInsert:function(I,R){return y(this,I)?x(this,I):(b(this,I,R),R)}})}),(function(T,P,a){var g=a(14),v=WeakMap.prototype;T.exports={WeakMap,set:g(v.set),get:g(v.get),has:g(v.has),remove:g(v.delete)}}),(function(T,P,a){var g=a(3),v=a(30),p=a(591),x=a(592),y=a(589),b=a(36),A=y.get,I=y.has,R=y.set,O=b||!(function(){try{WeakMap.prototype.getOrInsertComputed&&new WeakMap().getOrInsertComputed(1,function(){throw 1})}catch(M){return M instanceof TypeError}})();g({target:"WeakMap",proto:!0,real:!0,forced:O},{getOrInsertComputed:function(D,L){if(b||p(this),x(D),v(L),I(this,D))return A(this,D);var B=L(D);return R(this,D,B),B}})}),(function(T,P,a){var g=a(589).has;T.exports=function(v){return g(v),v}}),(function(T,P,a){var g=a(589),v=new g.WeakMap,p=g.set,x=g.remove;T.exports=function(y){return p(v,y,1),x(v,y),y}}),(function(T,P,a){a(594)}),(function(T,P,a){var g=a(291),v=a(587);g("WeakSet",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},v)}),(function(T,P,a){var g=a(3),v=a(4),p=a(23),x=a(14),y=a(8),b=a(7),A=a(68),I=a(383),R=a(575).c2i,O=/[^\d+/a-z]/i,M=/[\t\n\f\r ]+/g,D=/[=]{1,2}$/,L=p("atob"),B=Array,F=String.fromCharCode,k=x("".charAt),W=x("".replace),U=x([].join),X=x(O.exec),j=!!L&&!b(function(){return L("aGk=")!=="hi"}),H=j&&b(function(){return L(" ")!==""}),Y=j&&!b(function(){L("a")}),Z=j&&!b(function(){L()}),_=j&&L.length!==1,K=!j||H||Y||Z||_;g({global:!0,bind:!0,enumerable:!0,forced:K},{atob:function(nt){if(I(arguments.length,1),j&&!H&&!Y)return y(L,v,nt);var at=W(A(nt),M,""),it=0,ot=0,ut,ht,gt;at.length&3||(at=W(at,D,"")),ut=at.length;var yt=ut&3;if(yt===1||X(O,at))throw new(p("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(var Et=new B((ut>>2)*3+(yt?yt-1:0)),bt=0;it<ut;)ht=k(at,it++),gt=ot&3?(gt<<6)+R[ht]:R[ht],ot++&3&&(Et[bt++]=F(255&gt>>(-2*ot&6)));return U(Et,"")}})}),(function(T,P,a){var g=a(3),v=a(4),p=a(23),x=a(14),y=a(8),b=a(7),A=a(68),I=a(383),R=a(575).i2c,O=p("btoa"),M=Array,D=x([].join),L=x("".charAt),B=x("".charCodeAt),F=!!O&&!b(function(){return O("hi")!=="aGk="}),k=F&&!b(function(){O()}),W=F&&b(function(){return O(null)!=="bnVsbA=="}),U=F&&O.length!==1;g({global:!0,bind:!0,enumerable:!0,forced:!F||k||W||U},{btoa:function(j){if(I(arguments.length,1),F)return y(O,v,A(j));for(var H=A(j),Y=new M((H.length+2)/3<<2),Z=0,_=0,K=R,tt,nt;L(H,_)||(K="=",_%1);){if(nt=B(H,_+=.75),nt>255)throw new(p("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");tt=tt<<8|nt,Y[Z++]=L(K,63&tt>>8-_%1*8)}return D(Y,"")}})}),(function(T,P,a){var g=a(4),v=a(598),p=a(599),x=a(167),y=a(43),b=function(I){if(I&&I.forEach!==x)try{y(I,"forEach",x)}catch(R){I.forEach=x}};for(var A in v)v[A]&&b(g[A]&&g[A].prototype);b(p)}),(function(T){T.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),(function(T,P,a){var g=a(42),v=g("span").classList,p=v&&v.constructor&&v.constructor.prototype;T.exports=p===Object.prototype?void 0:p}),(function(T,P,a){var g=a(4),v=a(598),p=a(599),x=a(175),y=a(43),b=a(82),A=a(33),I=A("iterator"),R=x.values,O=function(D,L){if(D){if(D[I]!==R)try{y(D,I,R)}catch(F){D[I]=R}if(b(D,L,!0),v[L]){for(var B in x)if(D[B]!==x[B])try{y(D,B,x[B])}catch(F){D[B]=x[B]}}}};for(var M in v)O(g[M]&&g[M].prototype,M);O(p,"DOMTokenList")}),(function(T,P,a){var g=a(3),v=a(23),p=a(238),x=a(7),y=a(71),b=a(11),A=a(44).f,I=a(47),R=a(77),O=a(38),M=a(215),D=a(46),L=a(131),B=a(124),F=a(602),k=a(127),W=a(51),U=a(6),X=a(36),j="DOMException",H="DATA_CLONE_ERR",Y=v("Error"),Z=v(j)||(function(){try{var Ot=v("MessageChannel")||p("worker_threads").MessageChannel;new Ot().port1.postMessage(new WeakMap)}catch(jt){if(jt.name===H&&jt.code===25)return jt.constructor}})(),_=Z&&Z.prototype,K=Y.prototype,tt=W.set,nt=W.getterFor(j),at="stack"in new Y(j),it=function(Ot){return O(F,Ot)&&F[Ot].m?F[Ot].c:0},ot=function(){M(this,ut);var jt=arguments.length,ie=B(jt<1?void 0:arguments[0]),me=B(jt<2?void 0:arguments[1],"Error"),se=it(me);if(tt(this,{type:j,name:me,message:ie,code:se}),U||(this.name=me,this.message=ie,this.code=se),at){var he=new Y(ie);he.name=j,A(this,"stack",b(1,k(he.stack,1)))}},ut=ot.prototype=y(K),ht=function(Ot){return{enumerable:!0,configurable:!0,get:Ot}},gt=function(Ot){return ht(function(){return nt(this)[Ot]})};U&&(R(ut,"code",gt("code")),R(ut,"message",gt("message")),R(ut,"name",gt("name"))),A(ut,"constructor",b(1,ot));var yt=x(function(){return!(new Z instanceof Y)}),Et=yt||x(function(){return K.toString!==L||String(new Z(1,2))!=="2: 1"}),bt=yt||x(function(){return new Z(1,"DataCloneError").code!==25}),Ft=yt||Z[H]!==25||_[H]!==25,Lt=X?Et||bt||Ft:yt;g({global:!0,constructor:!0,forced:Lt},{DOMException:Lt?ot:Z});var Pt=v(j),mt=Pt.prototype;Et&&(X||Z===Pt)&&I(mt,"toString",L),bt&&U&&Z===Pt&&R(mt,"code",ht(function(){return it(D(this).name)}));for(var xt in F)if(O(F,xt)){var wt=F[xt],Bt=wt.s,Jt=b(6,wt.c);O(Pt,Bt)||A(Pt,Bt,Jt),O(mt,Bt)||A(mt,Bt,Jt)}}),(function(T){T.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}}),(function(T,P,a){var g=a(3),v=a(4),p=a(23),x=a(11),y=a(44).f,b=a(38),A=a(215),I=a(123),R=a(124),O=a(602),M=a(127),D=a(6),L=a(36),B="DOMException",F=p("Error"),k=p(B),W=function(){A(this,U);var ot=arguments.length,ut=R(ot<1?void 0:arguments[0]),ht=R(ot<2?void 0:arguments[1],"Error"),gt=new k(ut,ht),yt=new F(ut);return yt.name=B,y(gt,"stack",x(1,M(yt.stack,1))),I(gt,this,W),gt},U=W.prototype=k.prototype,X="stack"in new F(B),j="stack"in new k(1,2),H=k&&D&&Object.getOwnPropertyDescriptor(v,B),Y=!!H&&!(H.writable&&H.configurable),Z=X&&!Y&&!j;g({global:!0,constructor:!0,forced:L||Z},{DOMException:Z?W:k});var _=p(B),K=_.prototype;if(K.constructor!==_){L||y(K,"constructor",x(1,_));for(var tt in O)if(b(O,tt)){var nt=O[tt],at=nt.s;b(_,at)||y(_,at,x(6,nt.c))}}}),(function(T,P,a){var g=a(23),v=a(82),p="DOMException";v(g(p),p)}),(function(T,P,a){a(606),a(607)}),(function(T,P,a){var g=a(3),v=a(4),p=a(382).clear;g({global:!0,bind:!0,enumerable:!0,forced:v.clearImmediate!==p},{clearImmediate:p})}),(function(T,P,a){var g=a(3),v=a(4),p=a(382).set,x=a(608),y=v.setImmediate?x(p,!1):p;g({global:!0,bind:!0,enumerable:!0,forced:v.setImmediate!==y},{setImmediate:y})}),(function(T,P,a){var g=a(4),v=a(95),p=a(21),x=a(189),y=a(28),b=a(76),A=a(383),I=g.Function,R=/MSIE .\./.test(y)||x==="BUN"&&(function(){var O=g.Bun.version.split(".");return O.length<3||O[0]==="0"&&(O[1]<3||O[1]==="3"&&O[2]==="0")})();T.exports=function(O,M){var D=M?2:1;return R?function(L,B){var F=A(arguments.length,1)>D,k=p(L)?L:I(L),W=F?b(arguments,D):[],U=F?function(){v(k,this,W)}:k;return M?O(U,B):O(U)}:O}}),(function(T,P,a){var g=a(3),v=a(4),p=a(385),x=a(30),y=a(383),b=a(7),A=a(6),I=b(function(){return A&&Object.getOwnPropertyDescriptor(v,"queueMicrotask").value.length!==1});g({global:!0,enumerable:!0,dontCallGetSet:!0,forced:I},{queueMicrotask:function(O){y(arguments.length,1),p(x(O))}})}),(function(T,P,a){var g=a(3),v=a(4),p=a(77),x=a(6),y=TypeError,b=Object.defineProperty,A=v.self!==v;try{if(x){var I=Object.getOwnPropertyDescriptor(v,"self");(A||!I||!I.get||!I.enumerable)&&p(v,"self",{get:function(){return v},set:function(O){if(this!==v)throw new y("Illegal invocation");b(v,"self",{value:O,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else g({global:!0,simple:!0,forced:A},{self:v})}catch(R){}}),(function(T,P,a){var g=a(36),v=a(3),p=a(4),x=a(23),y=a(14),b=a(7),A=a(40),I=a(21),R=a(89),O=a(17),M=a(20),D=a(22),L=a(136),B=a(46),F=a(69),k=a(38),W=a(90),U=a(43),X=a(63),j=a(383),H=a(433),Y=a(297),Z=a(453),_=a(455),K=a(237),tt=a(128),nt=a(239),at=p.Object,it=p.Array,ot=p.Date,ut=p.Error,ht=p.TypeError,gt=p.PerformanceMark,yt=x("DOMException"),Et=Y.Map,bt=Y.has,Ft=Y.get,Lt=Y.set,Pt=Z.Set,mt=Z.add,xt=Z.has,wt=x("Object","keys"),Bt=y([].push),Jt=y((!0).valueOf),Ot=y(1.1.valueOf),jt=y("".valueOf),ie=y(ot.prototype.getTime),me=A("structuredClone"),se="DataCloneError",he="Transferring",Oe=function(It){return!b(function(){var Xt=new p.Set([7]),Mt=It(Xt),$t=It(at(7));return Mt===Xt||!Mt.has(7)||!M($t)||+$t!=7})&&It},Me=function(It,Xt){return!b(function(){var Mt=new Xt,$t=It({a:Mt,b:Mt});return!($t&&$t.a===$t.b&&$t.a instanceof Xt&&$t.a.stack===Mt.stack)})},Re=function(It){return!b(function(){var Xt=It(new p.AggregateError([1],me,{cause:3}));return Xt.name!=="AggregateError"||Xt.errors[0]!==1||Xt.message!==me||Xt.cause!==3})},ge=p.structuredClone,Te=g||!Me(ge,ut)||!Me(ge,yt)||!Re(ge),Ve=!ge&&Oe(function(It){return new gt(me,{detail:It}).detail}),Ht=Oe(ge)||Ve,ne=function(It){throw new yt("Uncloneable type: "+It,se)},ae=function(It,Xt){throw new yt((Xt||"Cloning")+" of "+It+" cannot be properly polyfilled in this engine",se)},rn=function(It,Xt){return Ht||ae(Xt),Ht(It)},Yt=function(){var It;try{It=new p.DataTransfer}catch(Xt){try{It=new p.ClipboardEvent("").clipboardData}catch(Mt){}}return It&&It.items&&It.files?It:null},ee=function(It,Xt,Mt){if(bt(Xt,It))return Ft(Xt,It);var $t=Mt||F(It),_t,Nt,Se,He,Wt,Qt;if($t==="SharedArrayBuffer")Ht?_t=Ht(It):_t=It;else{var te=p.DataView;!te&&!I(It.slice)&&ae("ArrayBuffer");try{if(I(It.slice)&&!It.resizable)_t=It.slice(0);else for(Nt=It.byteLength,Se=("maxByteLength"in It)?{maxByteLength:It.maxByteLength}:void 0,_t=new ArrayBuffer(Nt,Se),He=new te(It),Wt=new te(_t),Qt=0;Qt<Nt;Qt++)Wt.setUint8(Qt,He.getUint8(Qt))}catch(oe){throw new yt("ArrayBuffer is detached",se)}}return Lt(Xt,It,_t),_t},pe=function(It,Xt,Mt,$t,_t){var Nt=p[Xt];return M(Nt)||ae(Xt),new Nt(ee(It.buffer,_t),Mt,$t)},ce=function(It,Xt){if(D(It)&&ne("Symbol"),!M(It))return It;if(Xt){if(bt(Xt,It))return Ft(Xt,It)}else Xt=new Et;var Mt=F(It),$t,_t,Nt,Se,He,Wt,Qt,te;switch(Mt){case"Array":Nt=it(X(It));break;case"Object":Nt={};break;case"Map":Nt=new Et;break;case"Set":Nt=new Pt;break;case"RegExp":Nt=new RegExp(It.source,H(It));break;case"Error":switch(_t=It.name,_t){case"AggregateError":Nt=new(x(_t))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":Nt=new(x(_t));break;case"CompileError":case"LinkError":case"RuntimeError":Nt=new(x("WebAssembly",_t));break;default:Nt=new ut}break;case"DOMException":Nt=new yt(It.message,It.name);break;case"ArrayBuffer":case"SharedArrayBuffer":Nt=ee(It,Xt,Mt);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":Wt=Mt==="DataView"?It.byteLength:It.length,Nt=pe(It,Mt,It.byteOffset,Wt,Xt);break;case"DOMQuad":try{Nt=new DOMQuad(ce(It.p1,Xt),ce(It.p2,Xt),ce(It.p3,Xt),ce(It.p4,Xt))}catch(oe){Nt=rn(It,Mt)}break;case"File":if(Ht)try{Nt=Ht(It),F(Nt)!==Mt&&(Nt=void 0)}catch(oe){}if(!Nt)try{Nt=new File([It],It.name,It)}catch(oe){}Nt||ae(Mt);break;case"FileList":if(Se=Yt(),Se){for(He=0,Wt=X(It);He<Wt;He++)Se.items.add(ce(It[He],Xt));Nt=Se.files}else Nt=rn(It,Mt);break;case"ImageData":try{Nt=new ImageData(ce(It.data,Xt),It.width,It.height,{colorSpace:It.colorSpace})}catch(oe){Nt=rn(It,Mt)}break;default:if(Ht)Nt=Ht(It);else switch(Mt){case"BigInt":Nt=at(It.valueOf());break;case"Boolean":Nt=at(Jt(It));break;case"Number":Nt=at(Ot(It));break;case"String":Nt=at(jt(It));break;case"Date":Nt=new ot(ie(It));break;case"Blob":try{Nt=It.slice(0,It.size,It.type)}catch(oe){ae(Mt)}break;case"DOMPoint":case"DOMPointReadOnly":$t=p[Mt];try{Nt=$t.fromPoint?$t.fromPoint(It):new $t(It.x,It.y,It.z,It.w)}catch(oe){ae(Mt)}break;case"DOMRect":case"DOMRectReadOnly":$t=p[Mt];try{Nt=$t.fromRect?$t.fromRect(It):new $t(It.x,It.y,It.width,It.height)}catch(oe){ae(Mt)}break;case"DOMMatrix":case"DOMMatrixReadOnly":$t=p[Mt];try{Nt=$t.fromMatrix?$t.fromMatrix(It):new $t(It)}catch(oe){ae(Mt)}break;case"AudioData":case"VideoFrame":I(It.clone)||ae(Mt);try{Nt=It.clone()}catch(oe){ne(Mt)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":ae(Mt);default:ne(Mt)}}switch(Lt(Xt,It,Nt),Mt){case"Array":case"Object":for(Qt=wt(It),He=0,Wt=X(Qt);He<Wt;He++)te=Qt[He],W(Nt,te,ce(It[te],Xt));break;case"Map":It.forEach(function(oe,we){Lt(Nt,ce(we,Xt),ce(oe,Xt))});break;case"Set":It.forEach(function(oe){mt(Nt,ce(oe,Xt))});break;case"Error":U(Nt,"message",ce(It.message,Xt)),k(It,"cause")&&U(Nt,"cause",ce(It.cause,Xt)),_t==="AggregateError"?Nt.errors=ce(It.errors,Xt):_t==="SuppressedError"&&(Nt.error=ce(It.error,Xt),Nt.suppressed=ce(It.suppressed,Xt));case"DOMException":tt&&U(Nt,"stack",ce(It.stack,Xt))}return Nt},Pe=function(It,Xt){if(!M(It))throw new ht("Transfer option cannot be converted to a sequence");var Mt=[];L(It,function(we){Bt(Mt,B(we))});for(var $t=0,_t=X(Mt),Nt=new Pt,Se,He,Wt,Qt,te,oe;$t<_t;){if(Se=Mt[$t++],He=F(Se),Qt=void 0,He==="ArrayBuffer"?xt(Nt,Se):bt(Xt,Se))throw new yt("Duplicate transferable",se);if(He==="ArrayBuffer"){mt(Nt,Se);continue}if(nt)Qt=ge(Se,{transfer:[Se]});else switch(He){case"ImageBitmap":Wt=p.OffscreenCanvas,R(Wt)||ae(He,he);try{te=new Wt(Se.width,Se.height),oe=te.getContext("bitmaprenderer"),oe.transferFromImageBitmap(Se),Qt=te.transferToImageBitmap()}catch(we){}break;case"AudioData":case"VideoFrame":(!I(Se.clone)||!I(Se.close))&&ae(He,he);try{Qt=Se.clone(),Se.close()}catch(we){}break;case"MediaSourceHandle":case"MessagePort":case"MIDIAccess":case"OffscreenCanvas":case"ReadableStream":case"RTCDataChannel":case"TransformStream":case"WebTransportReceiveStream":case"WebTransportSendStream":case"WritableStream":ae(He,he)}if(Qt===void 0)throw new yt("This object cannot be transferred: "+He,se);Lt(Xt,Se,Qt)}return Nt},ln=function(It){_(It,function(Xt){nt?ge(Xt,{transfer:[Xt]}):I(Xt.transfer)?Xt.transfer():K?K(Xt):ae("ArrayBuffer",he)})};v({global:!0,enumerable:!0,sham:!nt,forced:Te},{structuredClone:function(Xt){var Mt=j(arguments.length,1)>1&&!O(arguments[1])?B(arguments[1]):void 0,$t=Mt?Mt.transfer:void 0,_t,Nt;$t!==void 0&&(_t=new Et,Nt=Pe($t,_t));var Se=ce(Xt,_t);return Nt&&ln(Nt),Se}})}),(function(T,P,a){a(613),a(614)}),(function(T,P,a){var g=a(3),v=a(4),p=a(608),x=p(v.setInterval,!0);g({global:!0,bind:!0,forced:v.setInterval!==x},{setInterval:x})}),(function(T,P,a){var g=a(3),v=a(4),p=a(608),x=p(v.setTimeout,!0);g({global:!0,bind:!0,forced:v.setTimeout!==x},{setTimeout:x})}),(function(T,P,a){a(616)}),(function(T,P,a){a(482);var g=a(3),v=a(6),p=a(617),x=a(4),y=a(84),b=a(14),A=a(47),I=a(77),R=a(215),O=a(38),M=a(344),D=a(169),L=a(76),B=a(475).codeAt,F=a(618),k=a(68),W=a(82),U=a(383),X=a(619),j=a(51),H=j.set,Y=j.getterFor("URL"),Z=X.URLSearchParams,_=X.getState,K=x.URL,tt=x.TypeError,nt=x.encodeURIComponent,at=x.parseInt,it=Math.floor,ot=Math.pow,ut=b("".charAt),ht=b(/./.exec),gt=b([].join),yt=b(1.1.toString),Et=b([].pop),bt=b([].push),Ft=b("".replace),Lt=b([].shift),Pt=b("".split),mt=b("".slice),xt=b("".toLowerCase),wt=b([].unshift),Bt="Invalid authority",Jt="Invalid scheme",Ot="Invalid host",jt="Invalid port",ie=/[a-z]/i,me=/[\d+\-.a-z]/i,se=/\d/,he=/^0x/i,Oe=/^[0-7]+$/,Me=/^\d+$/,Re=/^[\da-f]+$/i,ge=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Te=/[\0\t\n\r #/:<>?@[\\\]^|]/,Ve=/^[\u0000-\u0020]+/,Ht=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ne=/[\t\n\r]/g,ae,rn=function(St){var Gt=Pt(St,"."),At,vt;if(Gt[Gt.length-1]===""){if(Gt.length===1)return!1;Gt.length--}return At=Gt[Gt.length-1],ht(Me,At)?!0:ht(he,At)?(vt=mt(At,2),vt===""||!!ht(Re,vt)):!1},Yt=function(St){var Gt=Pt(St,"."),At,vt,zt,Le,de,Ut,kt;if(Gt.length&&Gt[Gt.length-1]===""&&Gt.length--,At=Gt.length,At>4)return null;for(vt=[],zt=0;zt<At;zt++){if(Le=Gt[zt],Le==="")return null;if(de=10,Le.length>1&&ut(Le,0)==="0"&&(de=ht(he,Le)?16:8,Le=mt(Le,de===8?1:2)),Le==="")Ut=0;else{if(!ht(de===10?Me:de===8?Oe:Re,Le))return null;Ut=at(Le,de)}bt(vt,Ut)}for(zt=0;zt<At;zt++)if(Ut=vt[zt],zt===At-1){if(Ut>=ot(256,5-At))return null}else if(Ut>255)return null;for(kt=Et(vt),zt=0;zt<vt.length;zt++)kt+=vt[zt]*ot(256,3-zt);return kt},ee=function(St){var Gt=[0,0,0,0,0,0,0,0],At=0,vt=null,zt=0,Le,de,Ut,kt,Cn,vn,Dt,fn=function(){return ut(St,zt)};if(fn()===":"){if(ut(St,1)!==":")return;zt+=2,At++,vt=At}for(;fn();){if(At===8)return;if(fn()===":"){if(vt!==null)return;zt++,At++,vt=At;continue}for(Le=de=0;de<4&&ht(Re,fn());)Le=Le*16+at(fn(),16),zt++,de++;if(fn()==="."){if(de===0||(zt-=de,At>6))return;for(Ut=0;fn();){if(kt=null,Ut>0)if(fn()==="."&&Ut<4)zt++;else return;if(!ht(se,fn()))return;for(;ht(se,fn());){if(Cn=at(fn(),10),kt===null)kt=Cn;else{if(kt===0)return;kt=kt*10+Cn}if(kt>255)return;zt++}Gt[At]=Gt[At]*256+kt,Ut++,(Ut===2||Ut===4)&&At++}if(Ut!==4)return;break}else if(fn()===":"){if(zt++,!fn())return}else if(fn())return;Gt[At++]=Le}if(vt!==null)for(vn=At-vt,At=7;At!==0&&vn>0;)Dt=Gt[At],Gt[At--]=Gt[vt+vn-1],Gt[vt+--vn]=Dt;else if(At!==8)return;return Gt},pe=function(St){for(var Gt=null,At=1,vt=null,zt=0,Le=0;Le<8;Le++)St[Le]!==0?(zt>At&&(Gt=vt,At=zt),vt=null,zt=0):(vt===null&&(vt=Le),++zt);return zt>At?vt:Gt},ce=function(St){var Gt,At,vt,zt;if(typeof St=="number"){for(Gt=[],At=0;At<4;At++)wt(Gt,St%256),St=it(St/256);return gt(Gt,".")}if(typeof St=="object"){for(Gt="",vt=pe(St),At=0;At<8;At++)zt&&St[At]===0||(zt&&(zt=!1),vt===At?(Gt+=At?":":"::",zt=!0):(Gt+=yt(St[At],16),At<7&&(Gt+=":")));return"["+Gt+"]"}return St},Pe={},ln=M({},Pe,{" ":1,'"':1,"#":1,"<":1,">":1}),It=M({},ln,{"'":1}),Xt=M({},Pe,{" ":1,'"':1,"<":1,">":1,"`":1}),Mt=M({},Xt,{"#":1,"?":1,"{":1,"}":1,"^":1}),$t=M({},Mt,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),_t=function(St,Gt){var At=B(St,0);return At>=32&&At<127&&!O(Gt,St)?St:St==="'"&&O(Gt,St)?"%27":nt(St)},Nt={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Se=function(St,Gt){var At;return St.length===2&&ht(ie,ut(St,0))&&((At=ut(St,1))===":"||!Gt&&At==="|")},He=function(St){var Gt;return St.length>1&&Se(mt(St,0,2))&&(St.length===2||(Gt=ut(St,2))==="/"||Gt==="\\"||Gt==="?"||Gt==="#")},Wt=function(St){return St==="."||xt(St)==="%2e"},Qt=function(St){return St=xt(St),St===".."||St==="%2e."||St===".%2e"||St==="%2e%2e"},te={},oe={},we={},ze={},un={},gn={},yn={},En={},ar={},wr={},Ci={},Ii={},Ri={},wi={},Ao={},Oi={},ca={},ur={},Eo={},Gr={},mr={},Pi=function(St,Gt,At){var vt=k(St),zt,Le,de;if(Gt){if(Le=this.parse(vt),Le)throw new tt(Le);this.searchParams=null}else{if(At!==void 0&&(zt=new Pi(At,!0)),Le=this.parse(vt,null,zt),Le)throw new tt(Le);de=_(new Z),de.bindURL(this),this.searchParams=de}};Pi.prototype={type:"URL",parse:function(St,Gt,At){var vt=this,zt=Gt||te,Le=0,de="",Ut=!1,kt=!1,Cn=!1,vn,Dt,fn,xr;for(St=k(St),Gt||(vt.scheme="",vt.username="",vt.password="",vt.host=null,vt.port=null,vt.path=[],vt.query=null,vt.fragment=null,vt.cannotBeABaseURL=!1,St=Ft(St,Ve,""),St=Ft(St,Ht,"$1")),St=Ft(St,ne,""),vn=D(St);Le<=vn.length;){switch(Dt=vn[Le],zt){case te:if(Dt&&ht(ie,Dt))de+=xt(Dt),zt=oe;else{if(Gt)return Jt;zt=we;continue}break;case oe:if(Dt&&ht(me,Dt))de+=xt(Dt);else if(Dt===":"){if(Gt&&(vt.isSpecial()!==O(Nt,de)||de==="file"&&(vt.includesCredentials()||vt.port!==null)||vt.scheme==="file"&&vt.host===""))return;if(vt.scheme=de,Gt){vt.isSpecial()&&Nt[vt.scheme]===vt.port&&(vt.port=null);return}de="",vt.scheme==="file"?zt=wi:vt.isSpecial()&&At&&At.scheme===vt.scheme?zt=ze:vt.isSpecial()?zt=En:vn[Le+1]==="/"?(zt=un,Le++):(vt.cannotBeABaseURL=!0,bt(vt.path,""),zt=Eo)}else{if(Gt)return Jt;de="",zt=we,Le=0;continue}break;case we:if(!At||At.cannotBeABaseURL&&Dt!=="#")return Jt;if(At.cannotBeABaseURL&&Dt==="#"){vt.scheme=At.scheme,vt.path=L(At.path),vt.query=At.query,vt.fragment="",vt.cannotBeABaseURL=!0,zt=mr;break}zt=At.scheme==="file"?wi:gn;continue;case ze:if(Dt==="/"&&vn[Le+1]==="/")zt=ar,Le++;else{zt=gn;continue}break;case un:if(Dt==="/"){zt=wr;break}else{zt=ur;continue}case gn:if(vt.scheme=At.scheme,Dt===ae)vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,vt.path=L(At.path),vt.query=At.query;else if(Dt==="/"||Dt==="\\"&&vt.isSpecial())zt=yn;else if(Dt==="?")vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,vt.path=L(At.path),vt.query="",zt=Gr;else if(Dt==="#")vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,vt.path=L(At.path),vt.query=At.query,vt.fragment="",zt=mr;else{vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,vt.path=L(At.path),vt.path.length&&vt.path.length--,zt=ur;continue}break;case yn:if(vt.isSpecial()&&(Dt==="/"||Dt==="\\"))zt=ar;else if(Dt==="/")zt=wr;else{vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,zt=ur;continue}break;case En:if(zt=ar,Dt!=="/"||vn[Le+1]!=="/")continue;Le++;break;case ar:if(Dt!=="/"&&Dt!=="\\"){zt=wr;continue}break;case wr:if(Dt==="@"){Ut&&(de="%40"+de),Ut=!0,fn=D(de);for(var Va=0;Va<fn.length;Va++){var Mi=fn[Va];if(Mi===":"&&!Cn){Cn=!0;continue}var ja=_t(Mi,$t);Cn?vt.password+=ja:vt.username+=ja}de=""}else if(Dt===ae||Dt==="/"||Dt==="?"||Dt==="#"||Dt==="\\"&&vt.isSpecial()){if(Ut&&de==="")return Bt;Le-=D(de).length+1,de="",zt=Ci}else de+=Dt;break;case Ci:case Ii:if(Gt&&vt.scheme==="file"){zt=Oi;continue}else if(Dt===":"&&!kt){if(de==="")return Ot;if(Gt===Ii)return;if(xr=vt.parseHost(de),xr)return xr;de="",zt=Ri}else if(Dt===ae||Dt==="/"||Dt==="?"||Dt==="#"||Dt==="\\"&&vt.isSpecial()){if(vt.isSpecial()&&de==="")return Ot;if(Gt&&de===""&&(vt.includesCredentials()||vt.port!==null))return;if(xr=vt.parseHost(de),xr)return xr;if(de="",zt=ca,Gt)return;continue}else Dt==="["?kt=!0:Dt==="]"&&(kt=!1),de+=Dt;break;case Ri:if(ht(se,Dt))de+=Dt;else if(Dt===ae||Dt==="/"||Dt==="?"||Dt==="#"||Dt==="\\"&&vt.isSpecial()||Gt){if(de!==""){var Yn=at(de,10);if(Yn>65535)return jt;vt.port=vt.isSpecial()&&Yn===Nt[vt.scheme]?null:Yn,de=""}if(Gt)return;zt=ca;continue}else return jt;break;case wi:if(vt.scheme="file",vt.host="",Dt==="/"||Dt==="\\")zt=Ao;else if(At&&At.scheme==="file")switch(Dt){case ae:vt.host=At.host,vt.path=L(At.path),vt.query=At.query;break;case"?":vt.host=At.host,vt.path=L(At.path),vt.query="",zt=Gr;break;case"#":vt.host=At.host,vt.path=L(At.path),vt.query=At.query,vt.fragment="",zt=mr;break;default:vt.host=At.host,He(gt(L(vn,Le),""))||(vt.path=L(At.path),vt.shortenPath()),zt=ur;continue}else{zt=ur;continue}break;case Ao:if(Dt==="/"||Dt==="\\"){zt=Oi;break}At&&At.scheme==="file"&&(vt.host=At.host,!He(gt(L(vn,Le),""))&&Se(At.path[0],!0)&&bt(vt.path,At.path[0])),zt=ur;continue;case Oi:if(Dt===ae||Dt==="/"||Dt==="\\"||Dt==="?"||Dt==="#"){if(!Gt&&Se(de))zt=ur;else if(de===""){if(vt.host="",Gt)return;zt=ca}else{if(xr=vt.parseHost(de),xr)return xr;if(vt.host==="localhost"&&(vt.host=""),Gt)return;de="",zt=ca}continue}else de+=Dt;break;case ca:if(vt.isSpecial()){if(zt=ur,Dt!=="/"&&Dt!=="\\")continue}else if(!Gt&&Dt==="?")vt.query="",zt=Gr;else if(!Gt&&Dt==="#")vt.fragment="",zt=mr;else if(Dt!==ae&&(zt=ur,Dt!=="/"))continue;break;case ur:if(Dt===ae||Dt==="/"||Dt==="\\"&&vt.isSpecial()||!Gt&&(Dt==="?"||Dt==="#")){if(Qt(de)?(vt.shortenPath(),Dt!=="/"&&!(Dt==="\\"&&vt.isSpecial())&&bt(vt.path,"")):Wt(de)?Dt!=="/"&&!(Dt==="\\"&&vt.isSpecial())&&bt(vt.path,""):(vt.scheme==="file"&&!vt.path.length&&Se(de)&&(vt.host!==null&&vt.host!==""&&(vt.host=""),de=ut(de,0)+":"),bt(vt.path,de)),de="",vt.scheme==="file"&&(Dt===ae||Dt==="?"||Dt==="#"))for(;vt.path.length>1&&vt.path[0]==="";)Lt(vt.path);Dt==="?"?(vt.query="",zt=Gr):Dt==="#"&&(vt.fragment="",zt=mr)}else de+=_t(Dt,Mt);break;case Eo:Dt==="?"?(vt.query="",zt=Gr):Dt==="#"?(vt.fragment="",zt=mr):Dt!==ae&&(vt.path[0]+=_t(Dt,Pe));break;case Gr:!Gt&&Dt==="#"?(vt.fragment="",zt=mr):Dt!==ae&&(vt.query+=_t(Dt,vt.isSpecial()?It:ln));break;case mr:Dt!==ae&&(vt.fragment+=_t(Dt,Xt));break}Le++}},parseHost:function(St){var Gt,At,vt;if(ut(St,0)==="["){if(ut(St,St.length-1)!=="]"||(Gt=ee(mt(St,1,-1)),!Gt))return Ot;this.host=Gt}else if(this.isSpecial()){if(St=F(St),ht(ge,St))return Ot;if(rn(St)){if(Gt=Yt(St),Gt===null)return Ot;this.host=Gt}else this.host=St}else{if(ht(Te,St))return Ot;for(Gt="",At=D(St),vt=0;vt<At.length;vt++)Gt+=_t(At[vt],Pe);this.host=Gt}},cannotHaveUsernamePasswordPort:function(){return this.host===null||this.host===""||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return O(Nt,this.scheme)},shortenPath:function(){var St=this.path,Gt=St.length;Gt&&(this.scheme!=="file"||Gt!==1||!Se(St[0],!0))&&St.length--},serialize:function(){var St=this,Gt=St.scheme,At=St.username,vt=St.password,zt=St.host,Le=St.port,de=St.path,Ut=St.query,kt=St.fragment,Cn=Gt+":";return zt!==null?(Cn+="//",St.includesCredentials()&&(Cn+=At+(vt?":"+vt:"")+"@"),Cn+=ce(zt),Le!==null&&(Cn+=":"+Le)):Gt==="file"&&(Cn+="//"),zt===null&&!St.cannotBeABaseURL&&de.length>1&&de[0]===""&&(Cn+="/."),Cn+=St.cannotBeABaseURL?de[0]:de.length?"/"+gt(de,"/"):"",Ut!==null&&(Cn+="?"+Ut),kt!==null&&(Cn+="#"+kt),Cn},setHref:function(St){var Gt=this.parse(St);if(Gt)throw new tt(Gt);this.searchParams.update()},getOrigin:function(){var St=this.scheme,Gt=this.port;if(St==="blob")try{return new ua(this.path[0]).origin}catch(At){return"null"}return St==="file"||!this.isSpecial()?"null":St+"://"+ce(this.host)+(Gt!==null?":"+Gt:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(St){this.parse(k(St)+":",te)},getUsername:function(){return this.username},setUsername:function(St){var Gt=D(k(St));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var At=0;At<Gt.length;At++)this.username+=_t(Gt[At],$t)}},getPassword:function(){return this.password},setPassword:function(St){var Gt=D(k(St));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var At=0;At<Gt.length;At++)this.password+=_t(Gt[At],$t)}},getHost:function(){var St=this.host,Gt=this.port;return St===null?"":Gt===null?ce(St):ce(St)+":"+Gt},setHost:function(St){this.cannotBeABaseURL||this.parse(St,Ci)},getHostname:function(){var St=this.host;return St===null?"":ce(St)},setHostname:function(St){this.cannotBeABaseURL||this.parse(St,Ii)},getPort:function(){var St=this.port;return St===null?"":k(St)},setPort:function(St){this.cannotHaveUsernamePasswordPort()||(St=k(St),St===""?this.port=null:this.parse(St,Ri))},getPathname:function(){var St=this.path;return this.cannotBeABaseURL?St[0]:St.length?"/"+gt(St,"/"):""},setPathname:function(St){this.cannotBeABaseURL||(this.path=[],this.parse(St,ca))},getSearch:function(){var St=this.query;return St?"?"+St:""},setSearch:function(St){St=k(St),St===""?this.query=null:(ut(St,0)==="?"&&(St=mt(St,1)),this.query="",this.parse(St,Gr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var St=this.fragment;return St?"#"+St:""},setHash:function(St){if(St=k(St),St===""){this.fragment=null;return}ut(St,0)==="#"&&(St=mt(St,1)),this.fragment="",this.parse(St,mr)},update:function(){this.query=this.searchParams.serialize()||null}};var ua=function(Gt){var At=R(this,Fn),vt=U(arguments.length,1)>1?arguments[1]:void 0,zt=H(At,new Pi(Gt,!1,vt));v||(At.href=zt.serialize(),At.origin=zt.getOrigin(),At.protocol=zt.getProtocol(),At.username=zt.getUsername(),At.password=zt.getPassword(),At.host=zt.getHost(),At.hostname=zt.getHostname(),At.port=zt.getPort(),At.pathname=zt.getPathname(),At.search=zt.getSearch(),At.searchParams=zt.getSearchParams(),At.hash=zt.getHash())},Fn=ua.prototype,Hn=function(St,Gt){return{get:function(){return Y(this)[St]()},set:Gt&&function(At){return Y(this)[Gt](At)},configurable:!0,enumerable:!0}};if(v&&(I(Fn,"href",Hn("serialize","setHref")),I(Fn,"origin",Hn("getOrigin")),I(Fn,"protocol",Hn("getProtocol","setProtocol")),I(Fn,"username",Hn("getUsername","setUsername")),I(Fn,"password",Hn("getPassword","setPassword")),I(Fn,"host",Hn("getHost","setHost")),I(Fn,"hostname",Hn("getHostname","setHostname")),I(Fn,"port",Hn("getPort","setPort")),I(Fn,"pathname",Hn("getPathname","setPathname")),I(Fn,"search",Hn("getSearch","setSearch")),I(Fn,"searchParams",Hn("getSearchParams")),I(Fn,"hash",Hn("getHash","setHash"))),A(Fn,"toJSON",function(){return Y(this).serialize()},{enumerable:!0}),A(Fn,"toString",function(){return Y(this).serialize()},{enumerable:!0}),K){var Co=K.createObjectURL,Io=K.revokeObjectURL;Co&&A(ua,"createObjectURL",y(Co,K)),Io&&A(ua,"revokeObjectURL",y(Io,K))}W(ua,"URL"),g({global:!0,constructor:!0,forced:!p,sham:!v},{URL:ua})}),(function(T,P,a){var g=a(7),v=a(33),p=a(6),x=a(36),y=v("iterator");T.exports=!g(function(){var b=new URL("b?a=1&b=2&c=3","https://a"),A=b.searchParams,I=new URLSearchParams("a=1&a=2&b=3"),R="";return b.pathname="c%20d",A.forEach(function(O,M){A.delete("b"),R+=M+O}),I.delete("a",2),I.delete("b",void 0),x&&(!b.toJSON||!I.has("a",1)||I.has("a",2)||!I.has("a",void 0)||I.has("b"))||!A.size&&(x||!p)||!A.sort||b.href!=="https://a/c%20d?a=1&c=3"||A.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!A[y]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("https://a#\u0431").hash!=="#%D0%B1"||R!=="a1c3"||new URL("https://x",void 0).host!=="x"})}),(function(T,P,a){var g=a(14),v=2147483647,p=36,x=1,y=26,b=38,A=700,I=72,R=128,O="-",M=/[^\0-\u007E]/,D=/[.\u3002\uFF0E\uFF61]/g,L="Overflow: input needs wider integers to process",B=p-x,F=RangeError,k=g(D.exec),W=Math.floor,U=String.fromCharCode,X=g("".charCodeAt),j=g([].join),H=g([].push),Y=g("".replace),Z=g("".split),_=g("".toLowerCase),K=function(it){for(var ot=[],ut=0,ht=it.length;ut<ht;){var gt=X(it,ut++);if(gt>=55296&&gt<=56319&&ut<ht){var yt=X(it,ut++);(yt&64512)===56320?H(ot,((gt&1023)<<10)+(yt&1023)+65536):(H(ot,gt),ut--)}else H(ot,gt)}return ot},tt=function(it){return it+22+75*(it<26)},nt=function(it,ot,ut){var ht=0;for(it=ut?W(it/A):it>>1,it+=W(it/ot);it>B*y>>1;)it=W(it/B),ht+=p;return W(ht+(B+1)*it/(it+b))},at=function(it){var ot=[];it=K(it);var ut=it.length,ht=R,gt=0,yt=I,Et,bt;for(Et=0;Et<it.length;Et++)bt=it[Et],bt<128&&H(ot,U(bt));var Ft=ot.length,Lt=Ft;for(Ft&&H(ot,O);Lt<ut;){var Pt=v;for(Et=0;Et<it.length;Et++)bt=it[Et],bt>=ht&&bt<Pt&&(Pt=bt);var mt=Lt+1;if(Pt-ht>W((v-gt)/mt))throw new F(L);for(gt+=(Pt-ht)*mt,ht=Pt,Et=0;Et<it.length;Et++){if(bt=it[Et],bt<ht&&++gt>v)throw new F(L);if(bt===ht){for(var xt=gt,wt=p;;){var Bt=wt<=yt?x:wt>=yt+y?y:wt-yt;if(xt<Bt)break;var Jt=xt-Bt,Ot=p-Bt;H(ot,U(tt(Bt+Jt%Ot))),xt=W(Jt/Ot),wt+=p}H(ot,U(tt(xt))),yt=nt(gt,mt,Lt===Ft),gt=0,Lt++}}gt++,ht++}return j(ot,"")};T.exports=function(it){var ot=[],ut=Z(Y(_(it),D,"."),"."),ht,gt;for(ht=0;ht<ut.length;ht++)gt=ut[ht],H(ot,k(M,gt)?"xn--"+at(gt):gt);return j(ot,".")}}),(function(T,P,a){a(175),a(479);var g=a(3),v=a(4),p=a(386),x=a(23),y=a(8),b=a(14),A=a(6),I=a(617),R=a(47),O=a(77),M=a(214),D=a(82),L=a(177),B=a(51),F=a(215),k=a(21),W=a(38),U=a(84),X=a(69),j=a(46),H=a(20),Y=a(68),Z=a(71),_=a(11),K=a(139),tt=a(140),nt=a(179),at=a(383),it=a(33),ot=a(195),ut=it("iterator"),ht="URLSearchParams",gt=ht+"Iterator",yt=B.set,Et=B.getterFor(ht),bt=B.getterFor(gt),Ft=p("fetch"),Lt=p("Request"),Pt=p("Headers"),mt=Lt&&Lt.prototype,xt=Pt&&Pt.prototype,wt=v.TypeError,Bt=v.encodeURIComponent,Jt=String.fromCharCode,Ot=x("String","fromCodePoint"),jt=parseInt,ie=b("".charAt),me=b([].join),se=b([].push),he=b("".replace),Oe=b([].shift),Me=b([].splice),Re=b("".split),ge=b("".slice),Te=b(/./.exec),Ve=/\+/g,Ht="\uFFFD",ne=/^[0-9a-f]+$/i,ae=function(Wt,Qt){var te=ge(Wt,Qt,Qt+2);return Te(ne,te)?jt(te,16):NaN},rn=function(Wt){for(var Qt=0,te=128;te>0&&(Wt&te)!==0;te>>=1)Qt++;return Qt},Yt=function(Wt){var Qt=null,te=Wt.length;switch(te){case 1:Qt=Wt[0];break;case 2:Qt=(Wt[0]&31)<<6|Wt[1]&63;break;case 3:Qt=(Wt[0]&15)<<12|(Wt[1]&63)<<6|Wt[2]&63;break;case 4:Qt=(Wt[0]&7)<<18|(Wt[1]&63)<<12|(Wt[2]&63)<<6|Wt[3]&63;break}return Qt===null||Qt>1114111||Qt>=55296&&Qt<=57343||Qt<(te>3?65536:te>2?2048:te>1?128:0)?null:Qt},ee=function(Wt){Wt=he(Wt,Ve," ");for(var Qt=Wt.length,te="",oe=0;oe<Qt;){var we=ie(Wt,oe);if(we==="%"){if(ie(Wt,oe+1)==="%"||oe+3>Qt){te+="%",oe++;continue}var ze=ae(Wt,oe+1);if(ze!==ze){te+=we,oe++;continue}oe+=2;var un=rn(ze);if(un===0)we=Jt(ze);else{if(un===1||un>4){te+=Ht,oe++;continue}for(var gn=[ze],yn=1;yn<un&&(oe++,!(oe+3>Qt||ie(Wt,oe)!=="%"));){var En=ae(Wt,oe+1);if(En!==En||En>191||En<128||yn===1&&(ze===224&&En<160||ze===237&&En>159||ze===240&&En<144||ze===244&&En>143))break;se(gn,En),oe+=2,yn++}if(gn.length!==un){te+=Ht;continue}var ar=Yt(gn);if(ar===null){for(var wr=0;wr<un;wr++)te+=Ht;oe++;continue}else we=Ot(ar)}}te+=we,oe++}return te},pe=/[!'()~]|%20/g,ce={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Pe=function(Wt){return ce[Wt]},ln=function(Wt){return he(Bt(Wt),pe,Pe)},It=L(function(Qt,te){yt(this,{type:gt,target:Et(Qt).entries,index:0,kind:te})},ht,function(){var Qt=bt(this),te=Qt.target,oe=Qt.index++;if(!te||oe>=te.length)return Qt.target=null,nt(void 0,!0);var we=te[oe];switch(Qt.kind){case"keys":return nt(we.key,!1);case"values":return nt(we.value,!1)}return nt([we.key,we.value],!1)},!0),Xt=function(Wt){this.entries=[],this.url=null,Wt!==void 0&&(H(Wt)?this.parseObject(Wt):this.parseQuery(typeof Wt=="string"?ie(Wt,0)==="?"?ge(Wt,1):Wt:Y(Wt)))};Xt.prototype={type:ht,bindURL:function(Wt){this.url=Wt,this.update()},parseObject:function(Wt){var Qt=this.entries,te=tt(Wt),oe,we,ze,un,gn,yn,En;if(te)for(oe=K(Wt,te),we=oe.next;!(ze=y(we,oe)).done;){if(un=K(j(ze.value)),gn=un.next,(yn=y(gn,un)).done||(En=y(gn,un)).done||!y(gn,un).done)throw new wt("Expected sequence with length 2");se(Qt,{key:Y(yn.value),value:Y(En.value)})}else for(var ar in Wt)W(Wt,ar)&&se(Qt,{key:ar,value:Y(Wt[ar])})},parseQuery:function(Wt){if(Wt)for(var Qt=this.entries,te=Re(Wt,"&"),oe=0,we,ze;oe<te.length;)we=te[oe++],we.length&&(ze=Re(we,"="),se(Qt,{key:ee(Oe(ze)),value:ee(me(ze,"="))}))},serialize:function(){for(var Wt=this.entries,Qt=[],te=0,oe;te<Wt.length;)oe=Wt[te++],se(Qt,ln(oe.key)+"="+ln(oe.value));return me(Qt,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Mt=function(){F(this,$t);var Qt=arguments.length>0?arguments[0]:void 0,te=yt(this,new Xt(Qt));A||(this.size=te.entries.length)},$t=Mt.prototype;if(M($t,{append:function(Qt,te){var oe=Et(this);at(arguments.length,2),se(oe.entries,{key:Y(Qt),value:Y(te)}),A||this.size++,oe.updateURL()},delete:function(Wt){for(var Qt=Et(this),te=at(arguments.length,1),oe=Qt.entries,we=Y(Wt),ze=te<2?void 0:arguments[1],un=ze===void 0?ze:Y(ze),gn=0;gn<oe.length;){var yn=oe[gn];yn.key===we&&(un===void 0||yn.value===un)?Me(oe,gn,1):gn++}A||(this.size=oe.length),Qt.updateURL()},get:function(Qt){var te=Et(this).entries;at(arguments.length,1);for(var oe=Y(Qt),we=0;we<te.length;we++)if(te[we].key===oe)return te[we].value;return null},getAll:function(Qt){var te=Et(this).entries;at(arguments.length,1);for(var oe=Y(Qt),we=[],ze=0;ze<te.length;ze++)te[ze].key===oe&&se(we,te[ze].value);return we},has:function(Qt){for(var te=Et(this).entries,oe=at(arguments.length,1),we=Y(Qt),ze=oe<2?void 0:arguments[1],un=ze===void 0?ze:Y(ze),gn=0;gn<te.length;){var yn=te[gn++];if(yn.key===we&&(un===void 0||yn.value===un))return!0}return!1},set:function(Qt,te){var oe=Et(this);at(arguments.length,2);for(var we=oe.entries,ze=!1,un=Y(Qt),gn=Y(te),yn=0,En;yn<we.length;yn++)En=we[yn],En.key===un&&(ze?Me(we,yn--,1):(ze=!0,En.value=gn));ze||se(we,{key:un,value:gn}),A||(this.size=we.length),oe.updateURL()},sort:function(){var Qt=Et(this);ot(Qt.entries,function(te,oe){return te.key>oe.key?1:-1}),Qt.updateURL()},forEach:function(Qt){for(var te=Et(this).entries,oe=U(Qt,arguments.length>1?arguments[1]:void 0),we=0,ze;we<te.length;)ze=te[we++],oe(ze.value,ze.key,this)},keys:function(){return new It(this,"keys")},values:function(){return new It(this,"values")},entries:function(){return new It(this,"entries")}},{enumerable:!0}),R($t,ut,$t.entries,{name:"entries"}),R($t,"toString",function(){return Et(this).serialize()},{enumerable:!0}),A&&O($t,"size",{get:function(){return Et(this).entries.length},configurable:!0,enumerable:!0}),D(Mt,ht),g({global:!0,constructor:!0,forced:!I},{URLSearchParams:Mt}),!I&&k(Pt)){var _t=b(xt.has),Nt=b(xt.set),Se=function(Wt){if(H(Wt)){var Qt=Wt.body,te;if(X(Qt)===ht)return te=Wt.headers?new Pt(Wt.headers):new Pt,_t(te,"content-type")||Nt(te,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Z(Wt,{body:_(0,Y(Qt)),headers:_(0,te)})}return Wt};if(k(Ft)&&g({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(Qt){return Ft(Qt,arguments.length>1?Se(arguments[1]):{})}}),k(Lt)){var He=function(Qt){return F(this,mt),new Lt(Qt,arguments.length>1?Se(arguments[1]):{})};mt.constructor=He,He.prototype=mt,g({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:He})}}T.exports={URLSearchParams:Mt,getState:Et}}),(function(T,P,a){var g=a(3),v=a(23),p=a(7),x=a(383),y=a(68),b=a(617),A=v("URL"),I=b&&p(function(){A.canParse()}),R=p(function(){return A.canParse.length!==1});g({target:"URL",stat:!0,forced:!I||R},{canParse:function(M){var D=x(arguments.length,1),L=y(M),B=D<2||arguments[1]===void 0?void 0:y(arguments[1]);try{return!!new A(L,B)}catch(F){return!1}}})}),(function(T,P,a){var g=a(3),v=a(23),p=a(383),x=a(68),y=a(617),b=v("URL");g({target:"URL",stat:!0,forced:!y},{parse:function(I){var R=p(arguments.length,1),O=x(I),M=R<2||arguments[1]===void 0?void 0:x(arguments[1]);try{return new b(O,M)}catch(D){return null}}})}),(function(T,P,a){var g=a(3),v=a(8);g({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return v(URL.prototype.toString,this)}})}),(function(T,P,a){a(619)}),(function(T,P,a){var g=a(47),v=a(14),p=a(68),x=a(383),y=URLSearchParams,b=y.prototype,A=v(b.append),I=v(b.delete),R=v(b.forEach),O=v([].push),M=new y("a=1&a=2&b=3");M.delete("a",1),M.delete("b",void 0),M+""!="a=2"&&g(b,"delete",function(D){var L=arguments.length,B=L<2?void 0:arguments[1];if(L&&B===void 0)return I(this,D);var F=[];R(this,function(H,Y){O(F,{key:Y,value:H})}),x(L,1);for(var k=p(D),W=p(B),U=0,X=F.length,j;U<X;)j=F[U],I(this,j.key),U++;for(U=0;U<X;)j=F[U++],j.key===k&&j.value===W||A(this,j.key,j.value)},{enumerable:!0,unsafe:!0})}),(function(T,P,a){var g=a(47),v=a(14),p=a(68),x=a(383),y=URLSearchParams,b=y.prototype,A=v(b.getAll),I=v(b.has),R=new y("a=1");(R.has("a",2)||!R.has("a",void 0))&&g(b,"has",function(M){var D=arguments.length,L=D<2?void 0:arguments[1];if(D&&L===void 0)return I(this,M);var B=A(this,M);x(D,1);for(var F=p(L),k=0;k<B.length;)if(B[k++]===F)return!0;return!1},{enumerable:!0,unsafe:!0})}),(function(T,P,a){var g=a(6),v=a(14),p=a(77),x=URLSearchParams.prototype,y=v(x.forEach);g&&!("size"in x)&&p(x,"size",{get:function(){var A=0;return y(this,function(){A++}),A},configurable:!0,enumerable:!0})}),(function(T,P,a){a.r(P),a.d(P,{bb:function(){return Zp},default:function(){return Zp}});var g={};a.r(g),a.d(g,{selection:function(){return Rv},subchart:function(){return Mv},zoom:function(){return zv}});var v={};a.r(v),a.d(v,{area:function(){return ap},areaLineRange:function(){return ip},areaSpline:function(){return sp},areaSplineRange:function(){return lp},areaStep:function(){return cp},areaStepRange:function(){return op},bar:function(){return up},bubble:function(){return fp},candlestick:function(){return pp},donut:function(){return Cp},funnel:function(){return Pp},gauge:function(){return Mp},line:function(){return Lp},pie:function(){return Np},polar:function(){return Bp},radar:function(){return Up},scatter:function(){return kp},spline:function(){return Dp},step:function(){return Fp},treemap:function(){return Kp}});function p(){}function x(t){return t==null?p:function(){return this.querySelector(t)}}function y(t){typeof t!="function"&&(t=x(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,l=r[i]=new Array(s),c,u,f=0;f<s;++f)(c=o[f])&&(u=t.call(c,c.__data__,f,o))&&("__data__"in c&&(u.__data__=c.__data__),l[f]=u);return new vt(r,this._parents)}function b(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function A(){return[]}function I(t){return t==null?A:function(){return this.querySelectorAll(t)}}function R(t){return function(){return b(t.apply(this,arguments))}}function O(t){typeof t=="function"?t=R(t):t=I(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var s=e[o],l=s.length,c,u=0;u<l;++u)(c=s[u])&&(r.push(t.call(c,c.__data__,u,s)),i.push(c));return new vt(r,i)}function M(t){return function(){return this.matches(t)}}function D(t){return function(e){return e.matches(t)}}var L=Array.prototype.find;function B(t){return function(){return L.call(this.children,t)}}function F(){return this.firstElementChild}function k(t){return this.select(t==null?F:B(typeof t=="function"?t:D(t)))}var W=Array.prototype.filter;function U(){return Array.from(this.children)}function X(t){return function(){return W.call(this.children,t)}}function j(t){return this.selectAll(t==null?U:X(typeof t=="function"?t:D(t)))}function H(t){typeof t!="function"&&(t=M(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,l=r[i]=[],c,u=0;u<s;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&l.push(c);return new vt(r,this._parents)}function Y(t){return new Array(t.length)}function Z(){return new vt(this._enter||this._groups.map(Y),this._parents)}function _(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}_.prototype={constructor:_,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function K(t){return function(){return t}}function tt(t,e,n,r,i,o){for(var s=0,l,c=e.length,u=o.length;s<u;++s)(l=e[s])?(l.__data__=o[s],r[s]=l):n[s]=new _(t,o[s]);for(;s<c;++s)(l=e[s])&&(i[s]=l)}function nt(t,e,n,r,i,o,s){var l,c,u=new Map,f=e.length,d=o.length,h=new Array(f),m;for(l=0;l<f;++l)(c=e[l])&&(h[l]=m=s.call(c,c.__data__,l,e)+"",u.has(m)?i[l]=c:u.set(m,c));for(l=0;l<d;++l)m=s.call(t,o[l],l,o)+"",(c=u.get(m))?(r[l]=c,c.__data__=o[l],u.delete(m)):n[l]=new _(t,o[l]);for(l=0;l<f;++l)(c=e[l])&&u.get(h[l])===c&&(i[l]=c)}function at(t){return t.__data__}function it(t,e){if(!arguments.length)return Array.from(this,at);var n=e?nt:tt,r=this._parents,i=this._groups;typeof t!="function"&&(t=K(t));for(var o=i.length,s=new Array(o),l=new Array(o),c=new Array(o),u=0;u<o;++u){var f=r[u],d=i[u],h=d.length,m=ot(t.call(f,f&&f.__data__,u,r)),S=m.length,E=l[u]=new Array(S),C=s[u]=new Array(S),w=c[u]=new Array(h);n(f,d,E,C,w,m,e);for(var N=0,z=0,$,G;N<S;++N)if($=E[N]){for(N>=z&&(z=N+1);!(G=C[z])&&++z<S;);$._next=G||null}}return s=new vt(s,r),s._enter=l,s._exit=c,s}function ot(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function ut(){return new vt(this._exit||this._groups.map(Y),this._parents)}function ht(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function gt(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,s=Math.min(i,o),l=new Array(i),c=0;c<s;++c)for(var u=n[c],f=r[c],d=u.length,h=l[c]=new Array(d),m,S=0;S<d;++S)(m=u[S]||f[S])&&(h[S]=m);for(;c<i;++c)l[c]=n[c];return new vt(l,this._parents)}function yt(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function Et(t){t||(t=bt);function e(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],l=s.length,c=i[o]=new Array(l),u,f=0;f<l;++f)(u=s[f])&&(c[f]=u);c.sort(e)}return new vt(i,this._parents).order()}function bt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ft(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Lt(){return Array.from(this)}function Pt(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function mt(){let t=0;for(const e of this)++t;return t}function xt(){return!this.node()}function wt(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,s=i.length,l;o<s;++o)(l=i[o])&&t.call(l,l.__data__,o,i);return this}var Bt="http://www.w3.org/1999/xhtml",Jt={svg:"http://www.w3.org/2000/svg",xhtml:Bt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ot(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Jt.hasOwnProperty(e)?{space:Jt[e],local:t}:t}function jt(t){return function(){this.removeAttribute(t)}}function ie(t){return function(){this.removeAttributeNS(t.space,t.local)}}function me(t,e){return function(){this.setAttribute(t,e)}}function se(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function he(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Oe(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Me(t,e){var n=Ot(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?ie:jt:typeof e=="function"?n.local?Oe:he:n.local?se:me)(n,e))}function Re(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ge(t){return function(){this.style.removeProperty(t)}}function Te(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ve(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ht(t,e,n){return arguments.length>1?this.each((e==null?ge:typeof e=="function"?Ve:Te)(t,e,n==null?"":n)):ne(this.node(),t)}function ne(t,e){return t.style.getPropertyValue(e)||Re(t).getComputedStyle(t,null).getPropertyValue(e)}function ae(t){return function(){delete this[t]}}function rn(t,e){return function(){this[t]=e}}function Yt(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function ee(t,e){return arguments.length>1?this.each((e==null?ae:typeof e=="function"?Yt:rn)(t,e)):this.node()[t]}function pe(t){return t.trim().split(/^|\s+/)}function ce(t){return t.classList||new Pe(t)}function Pe(t){this._node=t,this._names=pe(t.getAttribute("class")||"")}Pe.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ln(t,e){for(var n=ce(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function It(t,e){for(var n=ce(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Xt(t){return function(){ln(this,t)}}function Mt(t){return function(){It(this,t)}}function $t(t,e){return function(){(e.apply(this,arguments)?ln:It)(this,t)}}function _t(t,e){var n=pe(t+"");if(arguments.length<2){for(var r=ce(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?$t:e?Xt:Mt)(n,e))}function Nt(){this.textContent=""}function Se(t){return function(){this.textContent=t}}function He(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function Wt(t){return arguments.length?this.each(t==null?Nt:(typeof t=="function"?He:Se)(t)):this.node().textContent}function Qt(){this.innerHTML=""}function te(t){return function(){this.innerHTML=t}}function oe(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function we(t){return arguments.length?this.each(t==null?Qt:(typeof t=="function"?oe:te)(t)):this.node().innerHTML}function ze(){this.nextSibling&&this.parentNode.appendChild(this)}function un(){return this.each(ze)}function gn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function yn(){return this.each(gn)}function En(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Bt&&e.documentElement.namespaceURI===Bt?e.createElement(t):e.createElementNS(n,t)}}function ar(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function wr(t){var e=Ot(t);return(e.local?ar:En)(e)}function Ci(t){var e=typeof t=="function"?t:wr(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Ii(){return null}function Ri(t,e){var n=typeof t=="function"?t:wr(t),r=e==null?Ii:typeof e=="function"?e:x(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function wi(){var t=this.parentNode;t&&t.removeChild(this)}function Ao(){return this.each(wi)}function Oi(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ca(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ur(t){return this.select(t?ca:Oi)}function Eo(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Gr(t){return function(e){t.call(this,e,this.__data__)}}function mr(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Pi(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function ua(t,e,n){return function(){var r=this.__on,i,o=Gr(e);if(r){for(var s=0,l=r.length;s<l;++s)if((i=r[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Fn(t,e,n){var r=mr(t+""),i,o=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,f;c<u;++c)for(i=0,f=l[c];i<o;++i)if((s=r[i]).type===f.type&&s.name===f.name)return f.value}return}for(l=e?ua:Pi,i=0;i<o;++i)this.each(l(r[i],e,n));return this}function Hn(t,e,n){var r=Re(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Co(t,e){return function(){return Hn(this,t,e)}}function Io(t,e){return function(){return Hn(this,t,e.apply(this,arguments))}}function St(t,e){return this.each((typeof e=="function"?Io:Co)(t,e))}function*Gt(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var At=[null];function vt(t,e){this._groups=t,this._parents=e}function zt(){return new vt([[document.documentElement]],At)}function Le(){return this}vt.prototype=zt.prototype={constructor:vt,select:y,selectAll:O,selectChild:k,selectChildren:j,filter:H,data:it,enter:Z,exit:ut,join:ht,merge:gt,selection:Le,order:yt,sort:Et,call:Ft,nodes:Lt,node:Pt,size:mt,empty:xt,each:wt,attr:Me,style:Ht,property:ee,classed:_t,text:Wt,html:we,raise:un,lower:yn,append:Ci,insert:Ri,remove:Ao,clone:ur,datum:Eo,on:Fn,dispatch:St,[Symbol.iterator]:Gt};var de=zt;function Ut(t){return typeof t=="string"?new vt([[document.querySelector(t)]],[document.documentElement]):new vt([[t]],At)}const kt={AREA:"area",AREA_LINE_RANGE:"area-line-range",AREA_SPLINE:"area-spline",AREA_SPLINE_RANGE:"area-spline-range",AREA_STEP:"area-step",AREA_STEP_RANGE:"area-step-range",BAR:"bar",BUBBLE:"bubble",CANDLESTICK:"candlestick",DONUT:"donut",FUNNEL:"funnel",GAUGE:"gauge",LINE:"line",PIE:"pie",POLAR:"polar",RADAR:"radar",SCATTER:"scatter",SPLINE:"spline",STEP:"step",TREEMAP:"treemap"},Cn={export:"exportApi",flow:"flow",xgrids:"grid",ygrids:"grid",regions:"regions",category:"category",categories:"category"},vn=10,Dt=6,fn=3,xr=Dt+fn,Va=1,Mi={x:{start:"M0 -8.5 A6 6 0 0 0 -6.5 -3.5 V2.5 A6 6 0 0 0 0 8.5 Z M-2 -3.5 V3.5 M-4 -3.5 V3.5z",end:"M0 -8.5 A6 6 0 0 1 6.5 -3.5 V2.5 A6 6 0 0 1 0 8.5 Z M2 -3.5 V3.5 M4 -3.5 V3.5z"},y:{start:"M8.5 0 a6 6 0 0 0 -6 -6.5 H-2.5 a 6 6 0 0 0 -6 6.5 z m-5 -2 H-3.5 m7 -2 H-3.5z",end:"M8.5 0 a6 -6 0 0 1 -6 6.5 H-2.5 a 6 -6 0 0 1 -6 -6.5z m-5 2 H-3.5 m7 2 H-3.5z"}},ja={AREA:"initArea",AREA_LINE_RANGE:"initArea",AREA_SPLINE:"initArea",AREA_SPLINE_RANGE:"initArea",AREA_STEP:"initArea",AREA_STEP_RANGE:"initArea",BAR:"initBar",BUBBLE:"initCircle",CANDLESTICK:"initCandlestick",DONUT:"initArc",FUNNEL:"initFunnel",GAUGE:"initArc",LINE:"initLine",PIE:"initArc",POLAR:"initPolar",RADAR:"initCircle",SCATTER:"initCircle",SPLINE:"initLine",STEP:"initLine",TREEMAP:"initTreemap"},Yn={Area:[kt.AREA,kt.AREA_SPLINE,kt.AREA_SPLINE_RANGE,kt.AREA_LINE_RANGE,kt.AREA_STEP,kt.AREA_STEP_RANGE],AreaRange:[kt.AREA_SPLINE_RANGE,kt.AREA_LINE_RANGE,kt.AREA_STEP_RANGE],Arc:[kt.PIE,kt.DONUT,kt.GAUGE,kt.POLAR,kt.RADAR],Line:[kt.LINE,kt.SPLINE,kt.AREA,kt.AREA_SPLINE,kt.AREA_SPLINE_RANGE,kt.AREA_LINE_RANGE,kt.STEP,kt.AREA_STEP,kt.AREA_STEP_RANGE],Step:[kt.STEP,kt.AREA_STEP,kt.AREA_STEP_RANGE],Spline:[kt.SPLINE,kt.AREA_SPLINE,kt.AREA_SPLINE_RANGE]},Qp=Math.sqrt(50),_p=Math.sqrt(10),qp=Math.sqrt(2);function Ro(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=Qp?10:o>=_p?5:o>=qp?2:1;let l,c,u;return i<0?(u=Math.pow(10,-i)/s,l=Math.round(t*u),c=Math.round(e*u),l/u<t&&++l,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*s,l=Math.round(t/u),c=Math.round(e/u),l*u<t&&++l,c*u>e&&--c),c<l&&.5<=n&&n<2?Ro(t,e,n*2):[l,c,u]}function al(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,s]=r?Ro(e,t,n):Ro(t,e,n);if(!(o>=i))return[];const l=o-i+1,c=new Array(l);if(r)if(s<0)for(let u=0;u<l;++u)c[u]=(o-u)/-s;else for(let u=0;u<l;++u)c[u]=(o-u)*s;else if(s<0)for(let u=0;u<l;++u)c[u]=(i+u)/-s;else for(let u=0;u<l;++u)c[u]=(i+u)*s;return c}function il(t,e,n){return e=+e,t=+t,n=+n,Ro(t,e,n)[2]}function ol(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?il(e,t,n):il(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function wo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tm(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function sl(t){let e,n,r;t.length!==2?(e=wo,n=(l,c)=>wo(t(l),c),r=(l,c)=>t(l)-c):(e=t===wo||t===tm?t:em,n=t,r=t);function i(l,c,u=0,f=l.length){if(u<f){if(e(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<0?u=d+1:f=d}while(u<f)}return u}function o(l,c,u=0,f=l.length){if(u<f){if(e(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function s(l,c,u=0,f=l.length){const d=i(l,c,u,f-1);return d>u&&r(l[d-1],c)>-r(l[d],c)?d-1:d}return{left:i,center:s,right:o}}function em(){return 0}function nm(t){return t===null?NaN:+t}function*zR(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const Ou=sl(wo),rm=Ou.right,UR=Ou.left,kR=sl(nm).center;var am=rm;function ll(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Pu(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Li(){}var Di=.7,Oo=1/Di,Ha="\\s*([+-]?\\d+)\\s*",Fi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Or="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",im=/^#([0-9a-f]{3,8})$/,om=new RegExp(`^rgb\\(${Ha},${Ha},${Ha}\\)$`),sm=new RegExp(`^rgb\\(${Or},${Or},${Or}\\)$`),lm=new RegExp(`^rgba\\(${Ha},${Ha},${Ha},${Fi}\\)$`),cm=new RegExp(`^rgba\\(${Or},${Or},${Or},${Fi}\\)$`),um=new RegExp(`^hsl\\(${Fi},${Or},${Or}\\)$`),fm=new RegExp(`^hsla\\(${Fi},${Or},${Or},${Fi}\\)$`),Mu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ll(Li,Ea,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Lu,formatHex:Lu,formatHex8:dm,formatHsl:hm,formatRgb:Du,toString:Du});function Lu(){return this.rgb().formatHex()}function dm(){return this.rgb().formatHex8()}function hm(){return zu(this).formatHsl()}function Du(){return this.rgb().formatRgb()}function Ea(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=im.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Fu(e):n===3?new _n(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Po(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Po(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=om.exec(t))?new _n(e[1],e[2],e[3],1):(e=sm.exec(t))?new _n(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=lm.exec(t))?Po(e[1],e[2],e[3],e[4]):(e=cm.exec(t))?Po(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=um.exec(t))?Bu(e[1],e[2]/100,e[3]/100,1):(e=fm.exec(t))?Bu(e[1],e[2]/100,e[3]/100,e[4]):Mu.hasOwnProperty(t)?Fu(Mu[t]):t==="transparent"?new _n(NaN,NaN,NaN,0):null}function Fu(t){return new _n(t>>16&255,t>>8&255,t&255,1)}function Po(t,e,n,r){return r<=0&&(t=e=n=NaN),new _n(t,e,n,r)}function gm(t){return t instanceof Li||(t=Ea(t)),t?(t=t.rgb(),new _n(t.r,t.g,t.b,t.opacity)):new _n}function Mo(t,e,n,r){return arguments.length===1?gm(t):new _n(t,e,n,r==null?1:r)}function _n(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}ll(_n,Mo,Pu(Li,{brighter(t){return t=t==null?Oo:Math.pow(Oo,t),new _n(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Di:Math.pow(Di,t),new _n(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new _n(Ca(this.r),Ca(this.g),Ca(this.b),Lo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Nu,formatHex:Nu,formatHex8:vm,formatRgb:$u,toString:$u}));function Nu(){return`#${Ia(this.r)}${Ia(this.g)}${Ia(this.b)}`}function vm(){return`#${Ia(this.r)}${Ia(this.g)}${Ia(this.b)}${Ia((isNaN(this.opacity)?1:this.opacity)*255)}`}function $u(){const t=Lo(this.opacity);return`${t===1?"rgb(":"rgba("}${Ca(this.r)}, ${Ca(this.g)}, ${Ca(this.b)}${t===1?")":`, ${t})`}`}function Lo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ca(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ia(t){return t=Ca(t),(t<16?"0":"")+t.toString(16)}function Bu(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new yr(t,e,n,r)}function zu(t){if(t instanceof yr)return new yr(t.h,t.s,t.l,t.opacity);if(t instanceof Li||(t=Ea(t)),!t)return new yr;if(t instanceof yr)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,l=o-i,c=(o+i)/2;return l?(e===o?s=(n-r)/l+(n<r)*6:n===o?s=(r-e)/l+2:s=(e-n)/l+4,l/=c<.5?o+i:2-o-i,s*=60):l=c>0&&c<1?0:s,new yr(s,l,c,t.opacity)}function pm(t,e,n,r){return arguments.length===1?zu(t):new yr(t,e,n,r==null?1:r)}function yr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ll(yr,pm,Pu(Li,{brighter(t){return t=t==null?Oo:Math.pow(Oo,t),new yr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Di:Math.pow(Di,t),new yr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new _n(cl(t>=240?t-240:t+120,i,r),cl(t,i,r),cl(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new yr(Uu(this.h),Do(this.s),Do(this.l),Lo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Lo(this.opacity);return`${t===1?"hsl(":"hsla("}${Uu(this.h)}, ${Do(this.s)*100}%, ${Do(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Uu(t){return t=(t||0)%360,t<0?t+360:t}function Do(t){return Math.max(0,Math.min(1,t||0))}function cl(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function ku(t,e,n,r,i){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*n+(1+3*t+3*o-3*s)*r+s*i)/6}function mm(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],s=r>0?t[r-1]:2*i-o,l=r<e-1?t[r+2]:2*o-i;return ku((n-r/e)*e,s,i,o,l)}}function xm(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],s=t[(r+1)%e],l=t[(r+2)%e];return ku((n-r/e)*e,i,o,s,l)}}var Fo=(t=>()=>t);function Gu(t,e){return function(n){return t+n*e}}function ym(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function GR(t,e){var n=e-t;return n?Gu(t,n>180||n<-180?n-360*Math.round(n/360):n):Fo(isNaN(t)?e:t)}function Tm(t){return(t=+t)==1?Xu:function(e,n){return n-e?ym(e,n,t):Fo(isNaN(e)?n:e)}}function Xu(t,e){var n=e-t;return n?Gu(t,n):Fo(isNaN(t)?e:t)}var No=(function t(e){var n=Tm(e);function r(i,o){var s=n((i=Mo(i)).r,(o=Mo(o)).r),l=n(i.g,o.g),c=n(i.b,o.b),u=Xu(i.opacity,o.opacity);return function(f){return i.r=s(f),i.g=l(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=t,r})(1);function Wu(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),s,l;for(s=0;s<n;++s)l=Mo(e[s]),r[s]=l.r||0,i[s]=l.g||0,o[s]=l.b||0;return r=t(r),i=t(i),o=t(o),l.opacity=1,function(c){return l.r=r(c),l.g=i(c),l.b=o(c),l+""}}}var XR=Wu(mm),WR=Wu(xm);function Vu(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function ju(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function VR(t,e){return(ju(e)?Vu:Hu)(t,e)}function Hu(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=Ya(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(l){for(s=0;s<r;++s)o[s]=i[s](l);return o}}function bm(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Tr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Sm(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Ya(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var ul=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fl=new RegExp(ul.source,"g");function Am(t){return function(){return t}}function Em(t){return function(e){return t(e)+""}}function Yu(t,e){var n=ul.lastIndex=fl.lastIndex=0,r,i,o,s=-1,l=[],c=[];for(t=t+"",e=e+"";(r=ul.exec(t))&&(i=fl.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(r=r[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:Tr(r,i)})),n=fl.lastIndex;return n<e.length&&(o=e.slice(n),l[s]?l[s]+=o:l[++s]=o),l.length<2?c[0]?Em(c[0].x):Am(e):(e=c.length,function(u){for(var f=0,d;f<e;++f)l[(d=c[f]).i]=d.x(u);return l.join("")})}function Ya(t,e){var n=typeof e,r;return e==null||n==="boolean"?Fo(e):(n==="number"?Tr:n==="string"?(r=Ea(e))?(e=r,No):Yu:e instanceof Ea?No:e instanceof Date?bm:ju(e)?Vu:Array.isArray(e)?Hu:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Sm:Tr)(t,e)}function Cm(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Im(t){return function(){return t}}function Rm(t){return+t}var Ku=[0,1];function Ka(t){return t}function dl(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Im(isNaN(e)?NaN:.5)}function wm(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Om(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i<r?(r=dl(i,r),o=n(s,o)):(r=dl(r,i),o=n(o,s)),function(l){return o(r(l))}}function Pm(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),s=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<r;)i[s]=dl(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(l){var c=am(t,l,1,r)-1;return o[c](i[c](l))}}function $o(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function hl(){var t=Ku,e=Ku,n=Ya,r,i,o,s=Ka,l,c,u;function f(){var h=Math.min(t.length,e.length);return s!==Ka&&(s=wm(t[0],t[h-1])),l=h>2?Pm:Om,c=u=null,d}function d(h){return h==null||isNaN(h=+h)?o:(c||(c=l(t.map(r),e,n)))(r(s(h)))}return d.invert=function(h){return s(i((u||(u=l(e,t.map(r),Tr)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,Rm),f()):t.slice()},d.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},d.rangeRound=function(h){return e=Array.from(h),n=Cm,f()},d.clamp=function(h){return arguments.length?(s=h?!0:Ka,f()):s!==Ka},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,m){return r=h,i=m,f()}}function Zu(){return hl()(Ka,Ka)}function Ni(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function jR(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}var Mm=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $i(t){if(!(e=Mm.exec(t)))throw new Error("invalid format: "+t);var e;return new gl({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}$i.prototype=gl.prototype;function gl(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}gl.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Lm(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Bo(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Za(t){return t=Bo(Math.abs(t)),t?t[1]:NaN}function Dm(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Za(e)/3)))*3-Za(Math.abs(t)))}function Fm(t,e){return function(n,r){for(var i=n.length,o=[],s=0,l=t[0],c=0;i>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),o.push(n.substring(i-=l,i+l)),!((c+=l+1)>r));)l=t[s=(s+1)%t.length];return o.reverse().join(e)}}function Nm(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}function $m(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var zo;function Bm(t,e){var n=Bo(t,e);if(!n)return zo=void 0,t.toPrecision(e);var r=n[0],i=n[1],o=i-(zo=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Bo(t,Math.max(0,e+o-1))[0]}function Ju(t,e){var n=Bo(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}var Qu={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Lm,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Ju(t*100,e),r:Ju,s:Bm,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function _u(t){return t}var qu=Array.prototype.map,tf=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function zm(t){var e=t.grouping===void 0||t.thousands===void 0?_u:Fm(qu.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?_u:Nm(qu.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",l=t.minus===void 0?"\u2212":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function u(d,h){d=$i(d);var m=d.fill,S=d.align,E=d.sign,C=d.symbol,w=d.zero,N=d.width,z=d.comma,$=d.precision,G=d.trim,V=d.type;V==="n"?(z=!0,V="g"):Qu[V]||($===void 0&&($=12),G=!0,V="g"),(w||m==="0"&&S==="=")&&(w=!0,m="0",S="=");var J=(h&&h.prefix!==void 0?h.prefix:"")+(C==="$"?n:C==="#"&&/[boxX]/.test(V)?"0"+V.toLowerCase():""),Q=(C==="$"?r:/[%p]/.test(V)?s:"")+(h&&h.suffix!==void 0?h.suffix:""),rt=Qu[V],et=/[defgprs%]/.test(V);$=$===void 0?6:/[gprs]/.test(V)?Math.max(1,Math.min(21,$)):Math.max(0,Math.min(20,$));function st(ct){var dt=J,q=Q,ft,lt,pt;if(V==="c")q=rt(ct)+q,ct="";else{ct=+ct;var Tt=ct<0||1/ct<0;if(ct=isNaN(ct)?c:rt(Math.abs(ct),$),G&&(ct=$m(ct)),Tt&&+ct==0&&E!=="+"&&(Tt=!1),dt=(Tt?E==="("?E:l:E==="-"||E==="("?"":E)+dt,q=(V==="s"&&!isNaN(ct)&&zo!==void 0?tf[8+zo/3]:"")+q+(Tt&&E==="("?")":""),et){for(ft=-1,lt=ct.length;++ft<lt;)if(pt=ct.charCodeAt(ft),48>pt||pt>57){q=(pt===46?i+ct.slice(ft+1):ct.slice(ft))+q,ct=ct.slice(0,ft);break}}}z&&!w&&(ct=e(ct,1/0));var Rt=dt.length+ct.length+q.length,Ct=Rt<N?new Array(N-Rt+1).join(m):"";switch(z&&w&&(ct=e(Ct+ct,Ct.length?N-q.length:1/0),Ct=""),S){case"<":ct=dt+ct+q+Ct;break;case"=":ct=dt+Ct+ct+q;break;case"^":ct=Ct.slice(0,Rt=Ct.length>>1)+dt+ct+q+Ct.slice(Rt);break;default:ct=Ct+dt+ct+q;break}return o(ct)}return st.toString=function(){return d+""},st}function f(d,h){var m=Math.max(-8,Math.min(8,Math.floor(Za(h)/3)))*3,S=Math.pow(10,-m),E=u((d=$i(d),d.type="f",d),{suffix:tf[8+m/3]});return function(C){return E(S*C)}}return{format:u,formatPrefix:f}}var Uo,vl,ef;Um({thousands:",",grouping:[3],currency:["$",""]});function Um(t){return Uo=zm(t),vl=Uo.format,ef=Uo.formatPrefix,Uo}function km(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Za(e)-Za(t))+1}function Gm(t){return Math.max(0,-Za(Math.abs(t)))}function Xm(t,e,n,r){var i=ol(t,e,n),o;switch(r=$i(r==null?",f":r),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Dm(i,s))&&(r.precision=o),ef(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=km(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Gm(i))&&(r.precision=o-(r.type==="%")*2);break}}return vl(r)}function nf(t){var e=t.domain;return t.ticks=function(n){var r=e();return al(r[0],r[r.length-1],n==null?10:n)},t.tickFormat=function(n,r){var i=e();return Xm(i[0],i[i.length-1],n==null?10:n,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,s=r[i],l=r[o],c,u,f=10;for(l<s&&(u=s,s=l,l=u,u=i,i=o,o=u);f-- >0;){if(u=il(s,l,n),u===c)return r[i]=s,r[o]=l,e(r);if(u>0)s=Math.floor(s/u)*u,l=Math.ceil(l/u)*u;else if(u<0)s=Math.ceil(s*u)/u,l=Math.floor(l*u)/u;else break;c=u}return t},t}function ko(){var t=Zu();return t.copy=function(){return $o(t,ko())},Ni.apply(t,arguments),nf(t)}function rf(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function af(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Wm(t){var e=1,n=t(rf(e),af(e));return n.constant=function(r){return arguments.length?t(rf(e=+r),af(e)):e},nf(n)}function of(){var t=Wm(hl());return t.copy=function(){return $o(t,of()).constant(t.constant())},Ni.apply(t,arguments)}function sf(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],s;return o<i&&(s=n,n=r,r=s,s=i,i=o,o=s),t[n]=e.floor(i),t[r]=e.ceil(o),t}function lf(t){return Math.log(t)}function cf(t){return Math.exp(t)}function Vm(t){return-Math.log(-t)}function jm(t){return-Math.exp(-t)}function Hm(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Ym(t){return t===10?Hm:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Km(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function uf(t){return(e,n)=>-t(-e,n)}function Zm(t){const e=t(lf,cf),n=e.domain;let r=10,i,o;function s(){return i=Km(r),o=Ym(r),n()[0]<0?(i=uf(i),o=uf(o),t(Vm,jm)):t(lf,cf),e}return e.base=function(l){return arguments.length?(r=+l,s()):r},e.domain=function(l){return arguments.length?(n(l),s()):n()},e.ticks=l=>{const c=n();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=i(u),m=i(f),S,E;const C=l==null?10:+l;let w=[];if(!(r%1)&&m-h<C){if(h=Math.floor(h),m=Math.ceil(m),u>0){for(;h<=m;++h)for(S=1;S<r;++S)if(E=h<0?S/o(-h):S*o(h),!(E<u)){if(E>f)break;w.push(E)}}else for(;h<=m;++h)for(S=r-1;S>=1;--S)if(E=h>0?S/o(-h):S*o(h),!(E<u)){if(E>f)break;w.push(E)}w.length*2<C&&(w=al(u,f,C))}else w=al(h,m,Math.min(m-h,C)).map(o);return d?w.reverse():w},e.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=$i(c)).precision==null&&(c.trim=!0),c=vl(c)),l===1/0)return c;const u=Math.max(1,r*l/e.ticks().length);return f=>{let d=f/o(Math.round(i(f)));return d*r<r-.5&&(d*=r),d<=u?c(f):""}},e.nice=()=>n(sf(n(),{floor:l=>o(Math.floor(i(l))),ceil:l=>o(Math.ceil(i(l)))})),e}function ff(){const t=Zm(hl()).domain([1,10]);return t.copy=()=>$o(t,ff()).base(t.base()),Ni.apply(t,arguments),t}const Xr=1e3,fr=Xr*60,Wr=fr*60,Vr=Wr*24,pl=Vr*7,df=Vr*30,ml=Vr*365,xl=new Date,yl=new Date;function On(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const s=i(o),l=i.ceil(o);return o-s<l-o?s:l},i.offset=(o,s)=>(e(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,l)=>{const c=[];if(o=i.ceil(o),l=l==null?1:Math.floor(l),!(o<s)||!(l>0))return c;let u;do c.push(u=new Date(+o)),e(o,l),t(o);while(u<o&&o<s);return c},i.filter=o=>On(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;e(s,-1),!o(s););else for(;--l>=0;)for(;e(s,1),!o(s););}),n&&(i.count=(o,s)=>(xl.setTime(+o),yl.setTime(+s),t(xl),t(yl),Math.floor(n(xl,yl))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?s=>r(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const Go=On(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Go.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?On(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Go);const HR=Go.range,Ra=On(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Xr)},(t,e)=>(e-t)/Xr,t=>t.getUTCSeconds()),YR=Ra.range,Tl=On(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xr)},(t,e)=>{t.setTime(+t+e*fr)},(t,e)=>(e-t)/fr,t=>t.getMinutes()),KR=Tl.range,bl=On(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*fr)},(t,e)=>(e-t)/fr,t=>t.getUTCMinutes()),ZR=bl.range,Sl=On(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xr-t.getMinutes()*fr)},(t,e)=>{t.setTime(+t+e*Wr)},(t,e)=>(e-t)/Wr,t=>t.getHours()),JR=Sl.range,Al=On(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Wr)},(t,e)=>(e-t)/Wr,t=>t.getUTCHours()),QR=Al.range,Bi=On(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*fr)/Vr,t=>t.getDate()-1),_R=Bi.range,Xo=On(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Vr,t=>t.getUTCDate()-1),qR=Xo.range,hf=On(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Vr,t=>Math.floor(t/Vr)),tw=hf.range;function wa(t){return On(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*fr)/pl)}const Wo=wa(0),Vo=wa(1),Jm=wa(2),Qm=wa(3),Ja=wa(4),_m=wa(5),qm=wa(6),ew=Wo.range,nw=Vo.range,rw=Jm.range,aw=Qm.range,iw=Ja.range,ow=_m.range,sw=qm.range;function Oa(t){return On(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/pl)}const jo=Oa(0),Ho=Oa(1),tx=Oa(2),ex=Oa(3),Qa=Oa(4),nx=Oa(5),rx=Oa(6),lw=jo.range,cw=Ho.range,uw=tx.range,fw=ex.range,dw=Qa.range,hw=nx.range,gw=rx.range,El=On(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),vw=El.range,Cl=On(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),pw=Cl.range,jr=On(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());jr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:On(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const mw=jr.range,Hr=On(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Hr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:On(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const xw=Hr.range;function gf(t,e,n,r,i,o){const s=[[Ra,1,Xr],[Ra,5,5*Xr],[Ra,15,15*Xr],[Ra,30,30*Xr],[o,1,fr],[o,5,5*fr],[o,15,15*fr],[o,30,30*fr],[i,1,Wr],[i,3,3*Wr],[i,6,6*Wr],[i,12,12*Wr],[r,1,Vr],[r,2,2*Vr],[n,1,pl],[e,1,df],[e,3,3*df],[t,1,ml]];function l(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const m=d&&typeof d.range=="function"?d:c(u,f,d),S=m?m.range(u,+f+1):[];return h?S.reverse():S}function c(u,f,d){const h=Math.abs(f-u)/d,m=sl(([,,C])=>C).right(s,h);if(m===s.length)return t.every(ol(u/ml,f/ml,d));if(m===0)return Go.every(Math.max(ol(u,f,d),1));const[S,E]=s[h/s[m-1][2]<s[m][2]/h?m-1:m];return S.every(E)}return[l,c]}const[ax,ix]=gf(Hr,Cl,jo,hf,Al,bl),[ox,sx]=gf(jr,El,Wo,Bi,Sl,Tl);function Il(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Rl(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function zi(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function lx(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,s=t.shortDays,l=t.months,c=t.shortMonths,u=Ui(i),f=ki(i),d=Ui(o),h=ki(o),m=Ui(s),S=ki(s),E=Ui(l),C=ki(l),w=Ui(c),N=ki(c),z={a:pt,A:Tt,b:Rt,B:Ct,c:null,d:Tf,e:Tf,f:Mx,g:Gx,G:Wx,H:wx,I:Ox,j:Px,L:bf,m:Lx,M:Dx,p:Kt,q:re,Q:Rf,s:wf,S:Fx,u:Nx,U:$x,V:Bx,w:zx,W:Ux,x:null,X:null,y:kx,Y:Xx,Z:Vx,"%":If},$={a:Ee,A:Ce,b:be,B:Ne,c:null,d:Af,e:Af,f:Kx,g:ay,G:oy,H:jx,I:Hx,j:Yx,L:Ef,m:Zx,M:Jx,p:ye,q:De,Q:Rf,s:wf,S:Qx,u:_x,U:qx,V:ty,w:ey,W:ny,x:null,X:null,y:ry,Y:iy,Z:sy,"%":If},G={a:et,A:st,b:ct,B:dt,c:q,d:xf,e:xf,f:Ex,g:mf,G:pf,H:yf,I:yf,j:Tx,L:Ax,m:yx,M:bx,p:rt,q:xx,Q:Ix,s:Rx,S:Sx,u:hx,U:gx,V:vx,w:dx,W:px,x:ft,X:lt,y:mf,Y:pf,Z:mx,"%":Cx};z.x=V(n,z),z.X=V(r,z),z.c=V(e,z),$.x=V(n,$),$.X=V(r,$),$.c=V(e,$);function V(Zt,ve){return function(xe){var Vt=[],je=-1,We=0,xn=Zt.length,wn,Ae,hn;for(xe instanceof Date||(xe=new Date(+xe));++je<xn;)Zt.charCodeAt(je)===37&&(Vt.push(Zt.slice(We,je)),(Ae=vf[wn=Zt.charAt(++je)])!=null?wn=Zt.charAt(++je):Ae=wn==="e"?" ":"0",(hn=ve[wn])&&(wn=hn(xe,Ae)),Vt.push(wn),We=je+1);return Vt.push(Zt.slice(We,je)),Vt.join("")}}function J(Zt,ve){return function(xe){var Vt=zi(1900,void 0,1),je=Q(Vt,Zt,xe+="",0),We,xn;if(je!=xe.length)return null;if("Q"in Vt)return new Date(Vt.Q);if("s"in Vt)return new Date(Vt.s*1e3+("L"in Vt?Vt.L:0));if(ve&&!("Z"in Vt)&&(Vt.Z=0),"p"in Vt&&(Vt.H=Vt.H%12+Vt.p*12),Vt.m===void 0&&(Vt.m="q"in Vt?Vt.q:0),"V"in Vt){if(Vt.V<1||Vt.V>53)return null;"w"in Vt||(Vt.w=1),"Z"in Vt?(We=Rl(zi(Vt.y,0,1)),xn=We.getUTCDay(),We=xn>4||xn===0?Ho.ceil(We):Ho(We),We=Xo.offset(We,(Vt.V-1)*7),Vt.y=We.getUTCFullYear(),Vt.m=We.getUTCMonth(),Vt.d=We.getUTCDate()+(Vt.w+6)%7):(We=Il(zi(Vt.y,0,1)),xn=We.getDay(),We=xn>4||xn===0?Vo.ceil(We):Vo(We),We=Bi.offset(We,(Vt.V-1)*7),Vt.y=We.getFullYear(),Vt.m=We.getMonth(),Vt.d=We.getDate()+(Vt.w+6)%7)}else("W"in Vt||"U"in Vt)&&("w"in Vt||(Vt.w="u"in Vt?Vt.u%7:"W"in Vt?1:0),xn="Z"in Vt?Rl(zi(Vt.y,0,1)).getUTCDay():Il(zi(Vt.y,0,1)).getDay(),Vt.m=0,Vt.d="W"in Vt?(Vt.w+6)%7+Vt.W*7-(xn+5)%7:Vt.w+Vt.U*7-(xn+6)%7);return"Z"in Vt?(Vt.H+=Vt.Z/100|0,Vt.M+=Vt.Z%100,Rl(Vt)):Il(Vt)}}function Q(Zt,ve,xe,Vt){for(var je=0,We=ve.length,xn=xe.length,wn,Ae;je<We;){if(Vt>=xn)return-1;if(wn=ve.charCodeAt(je++),wn===37){if(wn=ve.charAt(je++),Ae=G[wn in vf?ve.charAt(je++):wn],!Ae||(Vt=Ae(Zt,xe,Vt))<0)return-1}else if(wn!=xe.charCodeAt(Vt++))return-1}return Vt}function rt(Zt,ve,xe){var Vt=u.exec(ve.slice(xe));return Vt?(Zt.p=f.get(Vt[0].toLowerCase()),xe+Vt[0].length):-1}function et(Zt,ve,xe){var Vt=m.exec(ve.slice(xe));return Vt?(Zt.w=S.get(Vt[0].toLowerCase()),xe+Vt[0].length):-1}function st(Zt,ve,xe){var Vt=d.exec(ve.slice(xe));return Vt?(Zt.w=h.get(Vt[0].toLowerCase()),xe+Vt[0].length):-1}function ct(Zt,ve,xe){var Vt=w.exec(ve.slice(xe));return Vt?(Zt.m=N.get(Vt[0].toLowerCase()),xe+Vt[0].length):-1}function dt(Zt,ve,xe){var Vt=E.exec(ve.slice(xe));return Vt?(Zt.m=C.get(Vt[0].toLowerCase()),xe+Vt[0].length):-1}function q(Zt,ve,xe){return Q(Zt,e,ve,xe)}function ft(Zt,ve,xe){return Q(Zt,n,ve,xe)}function lt(Zt,ve,xe){return Q(Zt,r,ve,xe)}function pt(Zt){return s[Zt.getDay()]}function Tt(Zt){return o[Zt.getDay()]}function Rt(Zt){return c[Zt.getMonth()]}function Ct(Zt){return l[Zt.getMonth()]}function Kt(Zt){return i[+(Zt.getHours()>=12)]}function re(Zt){return 1+~~(Zt.getMonth()/3)}function Ee(Zt){return s[Zt.getUTCDay()]}function Ce(Zt){return o[Zt.getUTCDay()]}function be(Zt){return c[Zt.getUTCMonth()]}function Ne(Zt){return l[Zt.getUTCMonth()]}function ye(Zt){return i[+(Zt.getUTCHours()>=12)]}function De(Zt){return 1+~~(Zt.getUTCMonth()/3)}return{format:function(Zt){var ve=V(Zt+="",z);return ve.toString=function(){return Zt},ve},parse:function(Zt){var ve=J(Zt+="",!1);return ve.toString=function(){return Zt},ve},utcFormat:function(Zt){var ve=V(Zt+="",$);return ve.toString=function(){return Zt},ve},utcParse:function(Zt){var ve=J(Zt+="",!0);return ve.toString=function(){return Zt},ve}}}var vf={"-":"",_:" ",0:"0"},Ln=/^\s*\d+/,cx=/^%/,ux=/[\\^$*+?|[\]().{}]/g;function tn(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function fx(t){return t.replace(ux,"\\$&")}function Ui(t){return new RegExp("^(?:"+t.map(fx).join("|")+")","i")}function ki(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function dx(t,e,n){var r=Ln.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function hx(t,e,n){var r=Ln.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function gx(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function vx(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function px(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function pf(t,e,n){var r=Ln.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function mf(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function mx(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function xx(t,e,n){var r=Ln.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function yx(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function xf(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Tx(t,e,n){var r=Ln.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function yf(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function bx(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Sx(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Ax(t,e,n){var r=Ln.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ex(t,e,n){var r=Ln.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Cx(t,e,n){var r=cx.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ix(t,e,n){var r=Ln.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Rx(t,e,n){var r=Ln.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Tf(t,e){return tn(t.getDate(),e,2)}function wx(t,e){return tn(t.getHours(),e,2)}function Ox(t,e){return tn(t.getHours()%12||12,e,2)}function Px(t,e){return tn(1+Bi.count(jr(t),t),e,3)}function bf(t,e){return tn(t.getMilliseconds(),e,3)}function Mx(t,e){return bf(t,e)+"000"}function Lx(t,e){return tn(t.getMonth()+1,e,2)}function Dx(t,e){return tn(t.getMinutes(),e,2)}function Fx(t,e){return tn(t.getSeconds(),e,2)}function Nx(t){var e=t.getDay();return e===0?7:e}function $x(t,e){return tn(Wo.count(jr(t)-1,t),e,2)}function Sf(t){var e=t.getDay();return e>=4||e===0?Ja(t):Ja.ceil(t)}function Bx(t,e){return t=Sf(t),tn(Ja.count(jr(t),t)+(jr(t).getDay()===4),e,2)}function zx(t){return t.getDay()}function Ux(t,e){return tn(Vo.count(jr(t)-1,t),e,2)}function kx(t,e){return tn(t.getFullYear()%100,e,2)}function Gx(t,e){return t=Sf(t),tn(t.getFullYear()%100,e,2)}function Xx(t,e){return tn(t.getFullYear()%1e4,e,4)}function Wx(t,e){var n=t.getDay();return t=n>=4||n===0?Ja(t):Ja.ceil(t),tn(t.getFullYear()%1e4,e,4)}function Vx(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+tn(e/60|0,"0",2)+tn(e%60,"0",2)}function Af(t,e){return tn(t.getUTCDate(),e,2)}function jx(t,e){return tn(t.getUTCHours(),e,2)}function Hx(t,e){return tn(t.getUTCHours()%12||12,e,2)}function Yx(t,e){return tn(1+Xo.count(Hr(t),t),e,3)}function Ef(t,e){return tn(t.getUTCMilliseconds(),e,3)}function Kx(t,e){return Ef(t,e)+"000"}function Zx(t,e){return tn(t.getUTCMonth()+1,e,2)}function Jx(t,e){return tn(t.getUTCMinutes(),e,2)}function Qx(t,e){return tn(t.getUTCSeconds(),e,2)}function _x(t){var e=t.getUTCDay();return e===0?7:e}function qx(t,e){return tn(jo.count(Hr(t)-1,t),e,2)}function Cf(t){var e=t.getUTCDay();return e>=4||e===0?Qa(t):Qa.ceil(t)}function ty(t,e){return t=Cf(t),tn(Qa.count(Hr(t),t)+(Hr(t).getUTCDay()===4),e,2)}function ey(t){return t.getUTCDay()}function ny(t,e){return tn(Ho.count(Hr(t)-1,t),e,2)}function ry(t,e){return tn(t.getUTCFullYear()%100,e,2)}function ay(t,e){return t=Cf(t),tn(t.getUTCFullYear()%100,e,2)}function iy(t,e){return tn(t.getUTCFullYear()%1e4,e,4)}function oy(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Qa(t):Qa.ceil(t),tn(t.getUTCFullYear()%1e4,e,4)}function sy(){return"+0000"}function If(){return"%"}function Rf(t){return+t}function wf(t){return Math.floor(+t/1e3)}var _a,wl,Of,Ol,Pf;ly({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function ly(t){return _a=lx(t),wl=_a.format,Of=_a.parse,Ol=_a.utcFormat,Pf=_a.utcParse,_a}function cy(t){return new Date(t)}function uy(t){return t instanceof Date?+t:+new Date(+t)}function Pl(t,e,n,r,i,o,s,l,c,u){var f=Zu(),d=f.invert,h=f.domain,m=u(".%L"),S=u(":%S"),E=u("%I:%M"),C=u("%I %p"),w=u("%a %d"),N=u("%b %d"),z=u("%B"),$=u("%Y");function G(V){return(c(V)<V?m:l(V)<V?S:s(V)<V?E:o(V)<V?C:r(V)<V?i(V)<V?w:N:n(V)<V?z:$)(V)}return f.invert=function(V){return new Date(d(V))},f.domain=function(V){return arguments.length?h(Array.from(V,uy)):h().map(cy)},f.ticks=function(V){var J=h();return t(J[0],J[J.length-1],V==null?10:V)},f.tickFormat=function(V,J){return J==null?G:u(J)},f.nice=function(V){var J=h();return(!V||typeof V.range!="function")&&(V=e(J[0],J[J.length-1],V==null?10:V)),V?h(sf(J,V)):f},f.copy=function(){return $o(f,Pl(t,e,n,r,i,o,s,l,c,u))},f}function fy(){return Ni.apply(Pl(ox,sx,jr,El,Wo,Bi,Sl,Tl,Ra,wl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function dy(){return Ni.apply(Pl(ax,ix,Hr,Cl,jo,Xo,Al,bl,Ra,Ol).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const Xe=t=>t||t===0,ue=t=>typeof t=="function",Ye=t=>typeof t=="string",le=t=>typeof t=="number",Tn=t=>typeof t=="undefined",on=t=>typeof t!="undefined",Pa=t=>typeof t=="boolean",hy=t=>Math.ceil(t/10)*10,qa=t=>Math.ceil(t)+.5,Ma=t=>t[1]-t[0],qn=t=>typeof t=="object",gy=t=>{for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0},dr=t=>Tn(t)||t===null||Ye(t)&&t.length===0||qn(t)&&!(t instanceof Date)&&gy(t)||le(t)&&isNaN(t),pn=t=>!dr(t),en=t=>Array.isArray(t),Ke=t=>t&&!(t!=null&&t.nodeType)&&qn(t)&&!en(t);function vy(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function py(t){const e=typeof(t==null?void 0:t.requestAnimationFrame)=="function"&&typeof(t==null?void 0:t.cancelAnimationFrame)=="function",n=typeof(t==null?void 0:t.requestIdleCallback)=="function"&&typeof(t==null?void 0:t.cancelIdleCallback)=="function",r=o=>setTimeout(o,1),i=o=>clearTimeout(o);return[e?t.requestAnimationFrame:r,e?t.cancelAnimationFrame:i,n?t.requestIdleCallback:r,n?t.cancelIdleCallback:i]}const fe=vy(),Ze=fe==null?void 0:fe.document,[my,yw,Mf,xy]=py(fe),yy=new Set(["span","div","p","br","b","i","em","small","strong","mark","u","s","sub","sup","h1","h2","h3","h4","h5","h6","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","hr","pre","code","blockquote","abbr","ins","del","a","img","figure","figcaption","svg","g","path","circle","ellipse","rect","line","polyline","polygon","text","tspan","textPath","use","defs","symbol","clipPath","mask","linearGradient","radialGradient","stop","pattern","marker","title","desc"]),Ty=new Set(["class","id","style","title","lang","dir","href","src","alt","width","height","colspan","rowspan","scope","headers","d","points","x","y","x1","x2","y1","y2","cx","cy","r","rx","ry","dx","dy","viewBox","preserveAspectRatio","transform","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","opacity","clip-path","clip-rule","mask","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternTransform","marker-start","marker-mid","marker-end","markerWidth","markerHeight","refX","refY","xlink:href"]),Yo=new Map;yy.forEach(t=>Yo.set(t.toLowerCase(),t));const Ko=new Map;Ty.forEach(t=>Ko.set(t.toLowerCase(),t));const by=new Set(["http:","https:","mailto:"]),Sy=new Set(["href","src","xlink:href"]),Ay=/^<\/?([a-zA-Z][a-zA-Z0-9]*)/,Ey=/^<\/([a-zA-Z][a-zA-Z0-9]*)\s*>$/,Cy=/^<([a-zA-Z][a-zA-Z0-9]*)([\s\S]*?)(\/?)>$/,Lf=/([a-zA-Z][\w:-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,Df=/url\s*\(\s*["']?([^"')]+)["']?\s*\)/gi,Iy=["expression(","behavior:","binding:","@import","@charset","-moz-binding:"];function Ml(t){return t.replace(/&colon;/gi,":").replace(/&newline;/gi,`
31
- `).replace(/&tab;/gi," ").replace(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&amp;/gi,"&").replace(/&quot;/gi,'"').replace(/&apos;/gi,"'").replace(/&#(\d+);?/gi,(e,n)=>String.fromCharCode(parseInt(n,10))).replace(/&#x([0-9a-f]+);?/gi,(e,n)=>String.fromCharCode(parseInt(n,16)))}function Ff(t){const n=Ml(t).trim().replace(/[\s\u0000-\u001f]/g,"").toLowerCase();if(!n||n.startsWith("#"))return!0;const r=n.match(/^[^/?#]*:/);return r?by.has(r[0]):!0}function Ry(t){const n=Ml(t).replace(/[\u0000-\u001f]/g,"");Df.lastIndex=0;let r;for(;(r=Df.exec(n))!==null;)if(!Ff(r[1]))return null;const i=n.toLowerCase().replace(/\s/g,"");for(const o of Iy)if(i.includes(o))return null;return t}const wy={'"':"&quot;","'":"&#39;","`":"&#96;"},Oy=/["'`]/g;function Ll(t){return t.replace(Oy,e=>wy[e])}function Py(t,e,n=!1){if(Sy.has(t))return Ff(e)?n?Ll(e):e:null;if(t==="style"){const i=Ry(e);return i===null?null:n?Ll(i):i}const r=Ml(e).toLowerCase().replace(/\s/g,"");return/\bon\w+=/.test(r)?null:n?Ll(e):e}function My(t){const e=t.match(Ay);return e?e[1].toLowerCase():null}function Ly(t){const e=My(t);return e!==null&&Yo.has(e)}function Dy(t){var e,n,r;const i=t.match(Ey);if(i){const E=i[1].toLowerCase();return`</${(e=Yo.get(E))!=null?e:E}>`}const o=t.match(Cy);if(!o)return"";const[,s,l,c]=o,u=s.toLowerCase(),f=(n=Yo.get(u))!=null?n:u,d=[];Lf.lastIndex=0;let h;for(;(h=Lf.exec(l))!==null;){const E=h[1].toLowerCase(),C=h[2],w=h[3],N=h[4];if(E.startsWith("on"))continue;const z=(r=Ko.get(E))!=null?r:E;let $,G;if(C!==void 0)$=C,G='"';else if(w!==void 0)$=w,G="'";else if(N!==void 0)$=N,G='"';else{Ko.has(E)&&d.push(z);continue}if(Ko.has(E)){const J=Py(E,$,N!==void 0);J!==null&&d.push(`${z}=${G}${J}${G}`)}}const m=d.length>0?` ${d.join(" ")}`:"";return`<${f}${m}${c?"/>":">"}`}function Yr(t){return typeof t!="string"||!t||t.indexOf("<")===-1?t:t.replace(/<\/?[^>]*>|[^<>\s]+>/g,e=>e.startsWith("<!--")?"":e.startsWith("<")?Ly(e)?Dy(e):e.replace(/</g,"&lt;"):e.slice(0,-1)+"&gt;")}var Fy=Object.defineProperty,Nf=Object.getOwnPropertySymbols,Ny=Object.prototype.hasOwnProperty,$y=Object.prototype.propertyIsEnumerable,$f=(t,e,n)=>e in t?Fy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bf=(t,e)=>{for(var n in e||(e={}))Ny.call(e,n)&&$f(t,n,e[n]);if(Nf)for(var n of Nf(e))$y.call(e,n)&&$f(t,n,e[n]);return t};function zf(t,e){for(let n=0;n<t.length;n++){const r=t[n];r!==null&&on(r)&&e(r,n)}}function fa(t,e,n){return on(t[e])?t[e]:n}function By(t,e){for(const n in t)if(t[n]===e)return!0;return!1}function $e(t,e,...n){const r=ue(t);return r&&t.call(e,...n),r}function Zo(t,e){let n=0;const r=function(...i){!--n&&e.apply(this,i)};"duration"in t?t.each(()=>++n).on("end",r):(++n,t.call(r))}const Nn=t=>t.charAt(0).toUpperCase()+t.slice(1);function zy(t,e="-"){return t.split(e).map((n,r)=>r?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()).join("")}const La=t=>[].slice.call(t);function Uy(...t){const e=n=>{if(en(n))return n.map(e);if(Ke(n)&&n.constructor){const r=new n.constructor;for(const i in n)r[i]=e(n[i]);return r}return n};return t.map(n=>e(n)).reduce((n,r)=>Bf(Bf({},n),r))}function bn(t={},e){en(e)&&e.forEach(n=>bn(t,n));for(const n in e)/^\d+$/.test(n)||n in t||(t[n]=e[n]);return t}function Dl(t){const e=t[0]instanceof Date,n=Array.from(new Set(e?t.map(Number):t));return e?n.map(r=>new Date(r)):n}function ky(t){return t&&t.length?t.reduce((e,n)=>e.concat(n)):[]}function Kr(t,...e){if(!e.length||e.length===1&&!e[0])return t;const n=e.shift();return Ke(t)&&Ke(n)&&Object.keys(n).forEach(r=>{if(!/^(__proto__|constructor|prototype)$/i.test(r)){const i=n[r];i instanceof Date?t[r]=new Date(i.getTime()):Ke(i)?(!t[r]&&(t[r]={}),t[r]=Kr(t[r],i)):t[r]=en(i)?i.concat():i}}),Kr(t,...e)}function ti(t,e=!0){let n;return t[0]instanceof Date?n=e?(r,i)=>r-i:(r,i)=>i-r:e&&!t.every(isNaN)?n=(r,i)=>r-i:e||(n=(r,i)=>r>i&&-1||r<i&&1||r===i&&0),t.concat().sort(n)}function br(t,e){let n=e.filter(r=>pn(r));if(n.length)if(le(n[0])){let r=t==="min"?1/0:-1/0;for(const i of n)(t==="min"?i<r:i>r)&&(r=i);n=r}else n[0]instanceof Date&&(n=ti(n,t==="min")[0]);else n=void 0;return n}const Jo=(t,e,n=1)=>{const r=[],i=Math.max(0,Math.ceil((e-t)/n))|0;for(let o=0;o<i;o++)r.push(t+o*n);return r};let Gy=0;function Pr(t=!0){const e=++Gy;return t?String(e):e}function Fl(t,e,n,r,i){if(n>r)return-1;const o=Math.floor((n+r)/2);let{x:s,w:l=0}=t[o];return i&&(s=t[o].y,l=t[o].h),e>=s&&e<=s+l?o:e<s?Fl(t,e,n,o-1,i):Fl(t,e,o+1,r,i)}function Da(t,e){return Yr(t.replace(/\{=([^}]+)\}/g,(n,r)=>{var i;return(i=e[r])!=null?i:""}))}function Kn(t){var e;let n;if(t instanceof Date)n=t;else if(Ye(t)){const{config:r,format:i}=this;n=(e=i.dataTime(r.data_xFormat)(t))!=null?e:new Date(t)}else le(t)&&!isNaN(t)&&(n=new Date(+t));return(!n||isNaN(+n))&&console&&console.error&&console.error(`Failed to parse x '${t}' to Date object`),n}function Uf(t){if(Ke(t)&&!Ye(t)){const s=t;return{top:s.top||0,right:s.right||0,bottom:s.bottom||0,left:s.left||0}}const e=(Ye(t)?t.trim().split(/\s+/):[t]).map(s=>+s||0),[n,r=n,i=n,o=r]=e;return{top:n,right:r,bottom:i,left:o}}function kf(t,e){e()===!1?my(()=>kf(t,e)):t()}function Gf(t,e=(n=>n)){const n=new Set;return zf(t,(r,i)=>{n.add(e(r,i))}),n}function Xf(t,e,n=(r=>r)){const r=new Map;return zf(t,(i,o)=>{r.set(e(i,o),n(i,o))}),r}function da(t="linear",e,n){const r={linear:ko,log:of,_log:ff,time:fy,utc:dy}[t]();return r.type=t,/_?log/.test(t)&&r.clamp(!0),r.range([e!=null?e:0,n!=null?n:1])}var Xy={getXScale(t,e,n,r){const i=this,o=i.state.loading!=="append"&&i.scale.zoom||da(i.axis.getAxisType("x"),t,e);return i.getCustomizedXScale(n?o.domain(n):o,r)},getYScale(t,e,n,r,i){const s=this.axis.getAxisType(t);if(i&&i.type===s)return i.range([e,n]),r&&i.domain(r),i;const l=da(s,e,n);return r&&l.domain(r),l},getYScaleById(t,e=!1){var n;const r=((n=this.axis)==null?void 0:n.getId(t))==="y2",i=e?r?"subY2":"subY":r?"y2":"y";return this.scale[i]},getCustomizedXScale(t,e){const n=this,r=()=>(e?e():n.axis.x.tickOffset())||(n.axis.isCategorized()?(t(1)-t(0))/2:0),i=n.config.axis_x_inverted,o=function(s){return t(s)+r()};for(const s in t)o[s]=t[s];return o.orgDomain=()=>t.domain(),o.orgScale=()=>t,n.axis.isCategorized()&&(o.domain=function(s){let l=s;return arguments.length?(t.domain(l),o):(l=this.orgDomain(),i?[l[0]+1,l[1]]:[l[0],l[1]+1])}),o},updateScales(t,e=!0){var n,r,i,o,s,l,c,u,f;const d=this,{axis:h,config:m,format:S,org:E,scale:C,state:{current:w,width:N,height:z,width2:$,height2:G,hasAxis:V,hasTreemap:J}}=d;if(V){const Q=m.axis_rotated,rt=d.getResettedPadding(1),et={x:Q?rt:0,y:Q?0:z,subX:Q?1:0,subY:Q?0:G},st={x:Q?z:N,y:Q?N:rt,subX:Q?z:N,subY:Q?$:1},ct=e?(n=C.x)==null?void 0:n.orgDomain():C.zoom||(i=(r=C.x)==null?void 0:r.domain)==null?void 0:i.call(r),dt=e?E.xDomain:C.zoom||(s=(o=C.subX)==null?void 0:o.domain)==null?void 0:s.call(o);C.x=d.getXScale(et.x,st.x,ct,()=>h.x.tickOffset()),C.subX=d.getXScale(et.x,st.x,dt,q=>{var ft;return q%1?0:((ft=h.subX)!=null?ft:h.x).tickOffset()}),S.xAxisTick=h.getXAxisTickFormat(),S.subXAxisTick=h.getXAxisTickFormat(!0),h.setAxis("x",C.x,m.axis_x_tick_outer,t),m.subchart_show&&h.setAxis("subX",C.subX,(l=m.subchart_axis_x_tick_outer)!=null?l:m.axis_x_tick_outer,t),C.y=d.getYScale("y",et.y,st.y,C.y?C.y.domain():m.axis_y_default,C.y),C.subY=d.getYScale("y",et.subY,st.subY,C.subY?C.subY.domain():m.axis_y_default,C.subY),h.setAxis("y",C.y,m.axis_y_tick_outer,t),m.subchart_show&&m.subchart_axis_y_show&&h.setAxis("subY",C.subY,(c=m.subchart_axis_y_tick_outer)!=null?c:m.axis_y_tick_outer,t),(m.axis_y2_show||m.subchart_axis_y2_show)&&(C.y2=d.getYScale("y2",et.y,st.y,C.y2?C.y2.domain():m.axis_y2_default,C.y2),C.subY2=d.getYScale("y2",et.subY,st.subY,C.subY2?C.subY2.domain():m.axis_y2_default,C.subY2),h.setAxis("y2",C.y2,m.axis_y2_tick_outer,t),m.subchart_show&&m.subchart_axis_y2_show&&h.setAxis("subY2",C.subY2,(u=m.subchart_axis_y2_tick_outer)!=null?u:m.axis_y2_tick_outer,t))}else if(J){const Q=d.getCurrentPadding();C.x=ko().rangeRound([Q.left,w.width-Q.right]),C.y=ko().rangeRound([Q.top,w.height-Q.bottom])}else(f=d.updateArc)==null||f.call(d)},xx(t){const e=this,{config:n,scale:{x:r,zoom:i}}=e,o=n.zoom_enabled&&i?i:r;return t?o(Xe(t.x)?t.x:t):null},xv(t){const e=this,{axis:n,config:r,scale:{x:i,zoom:o}}=e,s=r.zoom_enabled&&o?o:i;let l=e.getBaseValue(t);return n.isTimeSeries()?l=Kn.call(e,l):n.isCategorized()&&Ye(l)&&(l=r.axis_x_categories.indexOf(l)),s(l)},yv(t){const e=this,{scale:{y:n,y2:r}}=e;return(t.axis&&t.axis==="y2"?r:n)(e.getBaseValue(t))},subxx(t){return t?this.scale.subX(t.x):null}};const Wf=1e5;function Sr(t){const e=/(\d+(?:\.\d+)?)px/.exec(t),n=parseFloat(e?e[1]:t);return Number.isFinite(n)?n:12}function ir(t,e,n,r){return e.indices[n]||t.getShapeIndices(r)}function ei(t,e,n=[]){var r;const i=typeof e=="string"?e:e==null?void 0:e.id;return!((r=t.isGrouped)!=null&&r.call(t,i))||n.some(o=>o(t,e))}function ha(t,e){var n;const r=typeof e=="string"?e:e==null?void 0:e.id;return r&&((n=t.data_types)==null?void 0:n[r])||t.data_type||kt.LINE}function Qo(t){const e=+t;return Number.isFinite(e)?e:null}function Vf(t){var e,n;const r=(n=(e=t.scale.zoom||t.scale.x)==null?void 0:e.domain)==null?void 0:n.call(e),i=Qo(r==null?void 0:r[0]),o=Qo(r==null?void 0:r[1]);return i===null||o===null?null:[Math.min(i,o),Math.max(i,o)]}function _o(t){return Qo(t==null?void 0:t.x)}function Wy(t,e,n){let r=0,i=t.length;for(;r<i;){const o=r+i>>1,s=_o(t[o]);if(s===null)return 0;(n?s<e:s>e)?r=o+1:i=o}return r}function Vy(t,e,n){let r=0,i=t.length;for(;r<i;){const o=r+i>>1,s=_o(t[o]);if(s===null)return t.length;(n?s<=e:s>=e)?r=o+1:i=o}return r}function Zr(t,e,n=1){const r=(e==null?void 0:e.values)||[],i={start:0,end:r.length},o=Vf(t);if(!r.length||!o)return i;const s=t.state,l=s._canvasVisibleRangeCache||(s._canvasVisibleRangeCache=new Map),c=[e.id,r.length,s.dataGeneration,o[0],o[1],n].join(":"),u=l.get(e.id);if((u==null?void 0:u.key)===c)return u.range;const f=_o(r[0]),d=_o(r[r.length-1]);if(f===null||d===null)return i;const h=f<=d,m=Wy(r,o[0],h),S=Vy(r,o[1],h),E={start:Math.max(0,Math.min(m,S)-n),end:Math.min(r.length,Math.max(m,S)+n)};return l.set(e.id,{key:c,range:E}),E}function or(t,e){return ha(t.config,e)===kt.BAR}function Gi(t,e){return Yn.Area.indexOf(ha(t.config,e))>-1}function ni(t,e){const n=ha(t.config,e);return Yn.Line.indexOf(n)>-1}function ga(t,e){return ha(t.config,e)===kt.SCATTER}function va(t,e){return ha(t.config,e)===kt.BUBBLE}function Ar(t,e){return ni(t,e)||ga(t,e)||va(t,e)}function Zn(t,e){return ha(t.config,e)===kt.CANDLESTICK}function Nl(t,e){return ha(t.config,e)===kt.TREEMAP}function Tw(t,e){const n=ha(t,e);return n===kt.BAR||Yn.Area.indexOf(n)>-1}function In(t,e){const n=t.getBaseValue(e);return n!=null}function mn(t,e){return Number.isFinite(t)&&Number.isFinite(e)}function jf(t,e,n){const r=Math.ceil(n)+1,i=Math.max(1,Math.ceil(t)+r*2+1),o=Math.max(1,Math.ceil(e)+r*2+1);return{data:new Uint8Array(i*o),height:o,offset:r,width:i}}function Hf(t,e,n){const r=Math.round(e)+t.offset,i=Math.round(n)+t.offset;if(r<0||r>=t.width||i<0||i>=t.height)return!1;const o=i*t.width+r;return t.data[o]?!1:(t.data[o]=1,!0)}function zn(t,e,n,r=`axis_${e}`){const i=t[`${r}_tick_${n}`];return i!==void 0?i:t[`axis_${e}_tick_${n}`]}function qo(t,e){const n=typeof t=="function"?t.call(e):t;return n!=null&&n.length?n:void 0}function Yf(t,e,n){var r,i,o,s,l,c;if((i=(r=t.axis)==null?void 0:r.isTimeSeries)!=null&&i.call(r,n))return e instanceof Date?e:Kn.call(t,e);if(n==="x"&&((s=(o=t.axis)==null?void 0:o.isCategorized)!=null&&s.call(o))&&typeof e=="string"){const u=t.config.axis_x_categories.indexOf(e);return u>=0?u:e}return(c=(l=t.axis)==null?void 0:l.isLog)!=null&&c.call(l,n)&&e!==null&&e!==void 0?+e:e}function Jr(t,e){return Yf(t,e,"x")}function Xi(t,e,n="y"){return Yf(t,e,n)}function Kf(t,e,n="y"){return e.map(r=>Xi(t,r,n))}function $l(t,e){return e.map(n=>Jr(t,n)).filter(n=>{var r,i;return!(typeof n=="string"&&((i=(r=t.axis)==null?void 0:r.isCategorized)!=null&&i.call(r)))})}function Fa(t,e){const n=typeof e=="function"?e():e;return t.ticks?t.ticks(n):t.domain()}function Zf(t,e){const[n,r]=t.domain(),i=+n,o=+r;if(e||!Number.isFinite(i)||!Number.isFinite(o)||o<=0)return Fa(t,e);const s=da("_log").domain([i>0?i:1,o]).range(t.range());let l=s.ticks();for(let c=o.toFixed().length;l.length>15;c--)l=s.ticks(c);return l.length&&(l.splice(0,1,n),l.splice(l.length-1,1,r)),l}function Wi(t,e){const n=+t,r=+e;return Number.isFinite(n)&&Number.isFinite(r)?Math.abs(n-r)<1e-6:t===e}function jy(t,e){const[n,r]=e,i=t.slice();return n!==void 0&&!i.some(o=>Wi(o,n))&&i.unshift(n),r!==void 0&&!i.some(o=>Wi(o,r))&&i.push(r),i}function Jf(t,e){const n=Jr(t,e);return Qo(n)}function Bl(t){var e,n,r,i,o,s,l,c;const{scale:u}=t,f=(n=(e=u.zoom)==null?void 0:e.domain)==null?void 0:n.call(e),d=((i=(r=u.subX)==null?void 0:r.domain)==null?void 0:i.call(r))||((s=(o=u.x)==null?void 0:o.orgDomain)==null?void 0:s.call(o))||((c=(l=u.x)==null?void 0:l.domain)==null?void 0:c.call(l));return!(f!=null&&f.length)||!(d!=null&&d.length)?!1:!Wi(f[0],d[0])||!Wi(f[1],d[1])}function tr(t){return Bl(t)?t.scale.zoom:t.scale.x}function Hy(t,e,n=0){var r,i;const o=(i=(r=tr(t)).domain)==null?void 0:i.call(r);if(!(o!=null&&o.length))return!0;const s=Jf(t,e),l=+o[0],c=+o[1];return s===null||!Number.isFinite(l)||!Number.isFinite(c)?!0:s>=Math.min(l,c)-n&&s<=Math.max(l,c)+n}function Yy(t,e){const n=[e>0?Math.abs(t[e]-t[e-1]):1/0,e<t.length-1?Math.abs(t[e+1]-t[e]):1/0].filter(Number.isFinite),r=Math.min(...n);return Number.isFinite(r)?r/2:0}function Qf(t,e){let n=0,r=t.length;for(;n<r;){const i=n+r>>1;t[i]<e?n=i+1:r=i}return n}function Ky(t,e){let n=0,r=t.length;for(;n<r;){const i=n+r>>1;t[i]<=e?n=i+1:r=i}return n}function Zy(t,e){var n;const{axis:r,state:i}=t,o=[i.dataGeneration,(n=r==null?void 0:r.isTimeSeries)!=null&&n.call(r)?1:0,e.map(u=>`${u.id}:${u.values.length}`).join(",")].join("|"),s=i._canvasXDataTickCache;if((s==null?void 0:s.key)===o)return s;const l=t.mapTargetsToUniqueXs(e),c={key:o,values:l,comparable:l.map(u=>{var f;return(f=Jf(t,u))!=null?f:NaN})};return i._canvasXDataTickCache=c,c}function Jy(t,e){const{values:n,comparable:r}=e;if(!Bl(t))return n;const i=Vf(t);if(!i||r.length!==n.length||!Number.isFinite(r[0]))return n.filter(f=>Hy(t,f));const[o,s]=i;let l=Qf(r,o),c=Ky(r,s);const u=f=>{const d=Qf(r,f);let h=-1,m=1/0;for(const S of[d-1,d]){const E=r[S],C=Math.abs(E-f);C<m&&(m=C,h=S)}h>-1&&h<r.length&&m<=Yy(r,h)+1e-6&&(l=Math.min(l,h),c=Math.max(c,h+1))};return u(o),u(s),n.slice(Math.max(0,l),Math.min(n.length,c))}function Qy(t,e){return typeof t=="function"?`fn:${e}`:Array.isArray(t)?t.map(n=>n instanceof Date?+n:String(n)).join(","):""}function _y(t,e){var n,r,i;const{config:o,state:s}=t,c=(((r=(n=tr(t)).domain)==null?void 0:r.call(n))||[]).map(f=>f instanceof Date?+f:String(f)).join(","),u=o.axis_rotated?s.height:s.width;return[e?1:0,s.dataGeneration,c,u,o.axis_x_tick_fit?1:0,o.axis_x_tick_count||"",o.axis_x_tick_culling,o.axis_x_tick_culling_max||"",o.axis_x_tick_culling_reverse?1:0,((i=o.axis_x_categories)==null?void 0:i.length)||0,Qy(o.axis_x_tick_values,s.redrawGeneration)].join("|")}function zl(t,e,n,r=!1){var i;return(i=t.axis)!=null&&i.generateTickValues?t.axis.generateTickValues(e,n,r):e}function qy(t,e){const[n,r]=t,i=[];if(!e||!Number.isFinite(e))return i;for(let o=Math.round(n);o<=r;o+=e)i.push(o);return i}function ts(t,e=!0){var n,r,i,o,s,l,c;const{axis:u,config:f}=t,d=tr(t),h=((n=t.getTargetsToShow)==null?void 0:n.call(t))||t.filterTargetsToShow(),m=t.state._canvasXTickValuesCache||(t.state._canvasXTickValuesCache=new Map),S=_y(t,e),E=m.get(S);if(E)return E;const C=z=>(m.set(S,z),z);if(!(h!=null&&h.length))return C([]);const w=qo(f.axis_x_tick_values,t.api);if(w){const z=$l(t,w);return C(e?kl(t,z):z)}if(f.axis_x_tick_fit&&(h!=null&&h.length)&&t.mapTargetsToUniqueXs){const z=Zy(t,h),$=Jy(t,z),G=zl(t,$,f.axis_x_tick_count,(r=u==null?void 0:u.isTimeSeries)==null?void 0:r.call(u));return C(e?kl(t,G,!0):G)}if(Bl(t)&&!((i=u==null?void 0:u.isCategorized)!=null&&i.call(u))){const z=((s=(o=t.zoom)==null?void 0:o.getDomain)==null?void 0:s.call(o))||d.domain(),$=jy(Fa(d,f.axis_x_tick_count||vn),z);return C(e?ns($,Gl(t)):$)}if((l=u==null?void 0:u.isCategorized)!=null&&l.call(u)&&((c=f.axis_x_categories)!=null&&c.length)){const z=f.axis_x_categories.map(($,G)=>G);return C(e?ns(z,Gl(t)):z)}const N=Fa(d,f.axis_x_tick_count||vn);return C(e?ns(N,Gl(t)):N)}function t0(t){const{config:e,state:{height2:n,width2:r}}=t,i=e.axis_rotated?n:r,o=zn(e,"x","count","subchart_axis_x"),s=zn(e,"x","culling","subchart_axis_x"),l=zn(e,"x","culling_max","subchart_axis_x");if(o)return o;if(s!==!1)return Math.min(l||vn,Math.max(2,Math.floor(i/70)))}function _f(t,e=!0){var n,r,i,o;const{axis:s,config:l,scale:c}=t,u=c.subX,f=((n=t.getTargetsToShow)==null?void 0:n.call(t))||t.filterTargetsToShow(),d=zn(l,"x","count","subchart_axis_x"),h=t0(t),m=(C,w=!1)=>e?kl(t,C,w,"subchart_axis_x",h):C;if(!u||!(f!=null&&f.length))return[];const S=qo(zn(l,"x","values","subchart_axis_x"),t.api);if(S)return m($l(t,S));if(l.axis_x_tick_fit&&t.mapTargetsToUniqueXs){const C=zl(t,t.mapTargetsToUniqueXs(f),d,(r=s==null?void 0:s.isTimeSeries)==null?void 0:r.call(s));return m(C,!0)}if((i=s==null?void 0:s.isCategorized)!=null&&i.call(s)&&((o=l.axis_x_categories)!=null&&o.length))return m(l.axis_x_categories.map((C,w)=>w),!0);const E=Fa(u,d||vn);return m(E,!0)}function qf(t,e=tr(t),n=t.config.axis_x_tick_outer){var r,i;const o=e,s=((r=o.orgDomain)==null?void 0:r.call(o))||((i=o.domain)==null?void 0:i.call(o));if(!(s!=null&&s.length))return[];const l=+s[0],c=+s[s.length-1];if(!Number.isFinite(l)||!Number.isFinite(c))return[];const u=Math.ceil(Math.min(l,c)),f=Math.floor(Math.max(l,c)),d=Array.from({length:Math.max(0,f-u+1)},(h,m)=>u+m);return n?d.slice(1,-1):d}function Ul(t,e,n=tr(t)){var r,i,o,s,l;const c=n,u=Jr(t,e);if((i=(r=t.axis)==null?void 0:r.isCategorized)!=null&&i.call(r)){const f=(o=c.orgScale)==null?void 0:o.call(c);if(f)return f(u);const d=((l=(s=t.axis.x)==null?void 0:s.tickOffset)==null?void 0:l.call(s))||(c(1)-c(0))/2;return c(u)-d}return c(u)}function td(t,e,n,r=tr(t)){if(e.length<2)return!1;const i=Math.max(1,n)/2,o=e.map(l=>Ul(t,l,r)).filter(Number.isFinite).sort((l,c)=>l-c);if(o.length<2)return!1;let s=o[0]+i;for(let l=1;l<o.length;l++){const c=o[l]-i,u=o[l]+i;if(c<=s+Va)return!0;s=Math.max(s,u)}return!1}function es(t,e,n=tr(t)){const r=new Set;return e.filter(i=>{const o=Ul(t,i,n),s=Math.round(o);return!Number.isFinite(o)||r.has(s)?!1:(r.add(s),!0)})}function e0(t,e,n=1){var r;const{axis:i,config:o}=t;if((r=i==null?void 0:i.isCategorized)!=null&&r.call(i)){const l=qf(t);return es(t,l)}if(o.axis_x_tick_culling===!1||o.axis_x_tick_culling_lines===!1)return e;const s=ts(t,!1);return td(t,s,n)?e:es(t,s)}function n0(t,e,n=1){var r;const{axis:i,config:o,scale:s}=t,l=s.subX,c=zn(o,"x","culling","subchart_axis_x"),u=zn(o,"x","culling_lines","subchart_axis_x"),f=zn(o,"x","outer","subchart_axis_x");if(!l)return[];if((r=i==null?void 0:i.isCategorized)!=null&&r.call(i)){const h=qf(t,l,f);return es(t,h,l)}if(c===!1||u===!1)return e;const d=_f(t,!1);return td(t,d,n,l)?e:es(t,d,l)}function Vi(t,e="y",n,r=!0,i=t.scale[e],o=`axis_${e}`){var s,l,c;const{axis:u,config:f}=t,d=`axis_${e}`,h=qo(zn(f,e,"values",o),t.api),m=C=>r?o0(t,e,C,o):C;if(h)return m(Kf(t,h,e));const S=qy(i.domain(),f[`${d}_tick_stepSize`]);if(S.length)return m(S);const E=n!=null?n:zn(f,e,"count",o);if((s=u==null?void 0:u.isTimeSeries)!=null&&s.call(u,e)&&f[`${d}_tick_time_value`])return m(Fa(i,f[`${d}_tick_time_value`]));if((l=u==null?void 0:u.isLog)!=null&&l.call(u,e))return m(Zf(i,E));if(E){const C=i.domain();return m(zl(t,C,C.every(w=>w===0)?1:E,(c=u==null?void 0:u.isTimeSeries)==null?void 0:c.call(u,e)))}return m(Fa(i,vn))}function r0(t,e,n){const r=e==="x"?tr(t):t.scale[e],i=r!=null&&r.copy?r.copy():r;return n.domain&&(i!=null&&i.domain)&&i.domain(n.domain),i}function a0(t,e,n,r){var i,o,s;const l=r.tick||{},c=qo(l.values,t.api);return c?e==="x"?$l(t,c):Kf(t,c,e):e!=="x"&&((o=(i=t.axis)==null?void 0:i.isLog)!=null&&o.call(i,e))?Zf(n,l.count):Fa(n,(s=l.count)!=null?s:vn)}function i0(t,e){var n;const r=(n=e.tick)==null?void 0:n.format;return typeof r=="function"?r.bind(t.api):(i=>i)}function ns(t,e){const n=t.length-1;if(e&&n>e){const r=t.length-1;return e<=1?[t[0]]:Array.from({length:e},(i,o)=>t[Math.round(o*r/(e-1))])}return t}function o0(t,e,n,r=`axis_${e}`){const{config:i}=t;if(!zn(i,e,"culling",r))return n;const s=zn(i,e,"culling_max",r)||vn,l=zn(i,e,"culling_reverse",r),c=n.slice().sort((h,m)=>{const S=+h,E=+m,C=Number.isFinite(S)&&Number.isFinite(E)?S-E:String(h).localeCompare(String(m));return l?-C:C}),u=c.length;let f=0;for(let h=1;h<u;h++)if(u/h<s){f=h;break}if(!f)return n;const d=new Set(c.filter((h,m)=>m%f===0));return n.filter(h=>d.has(h))}function kl(t,e,n=!1,r="axis_x",i){const{config:o}=t;if(zn(o,"x","culling",r)===!1)return e;const l=i||zn(o,"x","culling_max",r)||vn,c=zn(o,"x","culling_reverse",r),u=n?e:e.slice().sort((m,S)=>{const E=+m,C=+S;return Number.isFinite(E)&&Number.isFinite(C)?c?C-E:E-C:c?String(S).localeCompare(String(m)):String(m).localeCompare(String(S))}),f=u.length;let d=0;for(let m=1;m<f;m++)if(f/m<l){d=m;break}if(!d)return e;if(n)return e.filter((m,S)=>c?(f-1-S)%d===0:S%d===0);const h=new Set(u.filter((m,S)=>S%d===0));return e.filter(m=>h.has(m))}function Gl(t){const{config:e,state:{height:n,width:r}}=t,i=e.axis_rotated?n:r;if(e.axis_x_tick_count)return e.axis_x_tick_count;if(e.axis_x_tick_culling!==!1)return Math.min(e.axis_x_tick_culling_max||vn,Math.max(2,Math.floor(i/70)))}function s0(t){var e,n;const{axis:r,config:i}=t,o=(n=(e=r==null?void 0:r.y)==null?void 0:e.getGeneratedTicks)==null?void 0:n.call(e,i.grid_y_ticks);return o!=null&&o.length?o:i.grid_y_ticks?ns(Vi(t,"y",void 0,!1),i.grid_y_ticks):Vi(t,"y",void 0,!1)}var l0=Object.defineProperty,c0=(t,e,n)=>e in t?l0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,u0=(t,e,n)=>c0(t,typeof e!="symbol"?e+"":e,n);class ed{constructor(e){u0(this,"ctx",e)}get context(){return this.ctx}withContext(e,n){const r=this.ctx;this.ctx=e;try{n()}finally{this.ctx=r}}withState(e){const{ctx:n}=this;n.save();try{e(n)}finally{n.restore()}}withTranslation(e,n,r){this.withState(i=>{i.translate(e,n),r(i)})}clipRect(e,n){this.withState(r=>{r.beginPath(),r.rect(e.x,e.y,e.w,e.h),r.clip(),n(r)})}measureText(e){return this.ctx.measureText(e)}traceLine(e,n,r,i){const{ctx:o}=this;o.moveTo(e,n),o.lineTo(r,i)}traceCrispLine(e,n,r,i,o){this.traceLine(this.crisp(e,o),this.crisp(n,o),this.crisp(r,o),this.crisp(i,o))}traceCircle(e,n,r){this.ctx.moveTo(e+r,n),this.ctx.arc(e,n,r,0,Math.PI*2)}strokePath(e,n){this.withStyle(n,r=>{r.beginPath(),e(r),r.stroke()})}fillPath(e,n){this.withStyle(n,r=>{r.beginPath(),e(r),r.fill()})}fillRect(e,n){this.withStyle(n,r=>{r.fillRect(e.x,e.y,e.w,e.h)})}fillRoundRect(e,n=0,r){const i=this.normalizeRect(e),o=this.getRectRadii(i,n);if(!o.tl&&!o.tr&&!o.br&&!o.bl){this.fillRect(i,r);return}this.fillPath(s=>{this.traceRoundRect(s,i,o)},r)}strokeRoundRect(e,n=0,r){const i=this.normalizeRect(e),o=this.getRectRadii(i,n);if(!o.tl&&!o.tr&&!o.br&&!o.bl){this.strokeRect(i,r);return}this.strokePath(s=>{this.traceRoundRect(s,i,o)},r)}strokeRect(e,n){this.withStyle(n,r=>{r.strokeRect(e.x,e.y,e.w,e.h)})}text(e,n,r,i){const o=(l,c,u)=>{(i==null?void 0:i.maxWidth)===void 0?l.fillText(e,c,u):l.fillText(e,c,u,i.maxWidth)},s=l=>{i!=null&&i.angle?(l.translate(n,r),l.rotate(i.angle*Math.PI/180),o(l,0,0)):o(l,n,r)};i!=null&&i.angle?this.withState(l=>{this.applyStyle(i),s(l)}):this.withStyle(i,s)}textLines(e,n,r,i){this.withState(o=>{const s=e.split(`
32
- `),l=Sr((i==null?void 0:i.font)||o.font),c=s.length>1?-((s.length-1)*l):0;this.applyStyle(i),o.translate(n,r),i!=null&&i.angle&&o.rotate(i.angle*Math.PI/180),s.forEach((u,f)=>{const d=c+f*l;(i==null?void 0:i.maxWidth)===void 0?o.fillText(u,0,d):o.fillText(u,0,d,i.maxWidth)})})}point(e,n,r,i,o){this.withStyle(o,s=>{const l=!(o!=null&&o.stroke)||o.fill!==void 0,c=(o==null?void 0:o.stroke)!==void 0;if(e==="rectangle"){const u=i*2,f={x:n-i,y:r-i,w:u,h:u};l&&s.fillRect(f.x,f.y,f.w,f.h),c&&s.strokeRect(f.x,f.y,f.w,f.h)}else s.beginPath(),s.arc(n,r,i,0,Math.PI*2),l&&s.fill(),c&&s.stroke()})}getRectRadii(e,n){const r=typeof n=="number"?{tl:n,tr:n,br:n,bl:n}:{tl:n.tl||0,tr:n.tr||0,br:n.br||0,bl:n.bl||0},i=Math.max(0,Math.min(Math.abs(e.w),Math.abs(e.h))/2);return{tl:Math.max(0,Math.min(r.tl,i)),tr:Math.max(0,Math.min(r.tr,i)),br:Math.max(0,Math.min(r.br,i)),bl:Math.max(0,Math.min(r.bl,i))}}traceRoundRect(e,n,r){const{x:i,y:o,w:s,h:l}=n,c=i+s,u=o+l;e.moveTo(i+r.tl,o),e.lineTo(c-r.tr,o),r.tr?e.quadraticCurveTo(c,o,c,o+r.tr):e.lineTo(c,o),e.lineTo(c,u-r.br),r.br?e.quadraticCurveTo(c,u,c-r.br,u):e.lineTo(c,u),e.lineTo(i+r.bl,u),r.bl?e.quadraticCurveTo(i,u,i,u-r.bl):e.lineTo(i,u),e.lineTo(i,o+r.tl),r.tl?e.quadraticCurveTo(i,o,i+r.tl,o):e.lineTo(i,o),e.closePath()}normalizeRect(e){const n=e.w<0?e.x+e.w:e.x,r=e.h<0?e.y+e.h:e.y;return{x:n,y:r,w:Math.abs(e.w),h:Math.abs(e.h)}}applyStyle(e){if(!e)return;const{ctx:n}=this;e.fill!==void 0&&(n.fillStyle=e.fill),e.stroke!==void 0&&(n.strokeStyle=e.stroke),e.lineWidth!==void 0&&(n.lineWidth=e.lineWidth),e.alpha!==void 0&&(n.globalAlpha=e.alpha),e.font!==void 0&&(n.font=e.font),e.textAlign!==void 0&&(n.textAlign=e.textAlign),e.textBaseline!==void 0&&(n.textBaseline=e.textBaseline),e.lineDash!==void 0&&n.setLineDash(e.lineDash)}withStyle(e,n){e?this.withState(r=>{this.applyStyle(e),n(r)}):n(this.ctx)}crisp(e,n){return n%2?Math.round(e)+.5:Math.round(e)}}var f0=Object.defineProperty,d0=Object.defineProperties,h0=Object.getOwnPropertyDescriptors,nd=Object.getOwnPropertySymbols,g0=Object.prototype.hasOwnProperty,v0=Object.prototype.propertyIsEnumerable,Xl=(t,e,n)=>e in t?f0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rd=(t,e)=>{for(var n in e||(e={}))g0.call(e,n)&&Xl(t,n,e[n]);if(nd)for(var n of nd(e))v0.call(e,n)&&Xl(t,n,e[n]);return t},ad=(t,e)=>d0(t,h0(e)),Wl=(t,e,n)=>Xl(t,typeof e!="symbol"?e+"":e,n);const id=20,od=15;function Vl(t){return t?-1:1}function p0(t,e){return t?e?-1:1:e?1:-1}function m0(t,e){var n,r,i;const o=e==="y2"?"subY2":"subY",s=(i=(r=(n=t.axis)==null?void 0:n[o])==null?void 0:r.tickFormat)==null?void 0:i.call(r),l=t.config[`subchart_axis_${e}_tick_format`]||t.config[`axis_${e}_tick_format`];return s||(typeof l=="function"?l.bind(t.api):(c=>c))}function x0(t){return t?{stroke:t.lineColor,lineWidth:t.lineWidth,lineDash:t.dashArray}:void 0}function y0(t){return t?{fill:t.labelColor,font:t.labelFont}:void 0}function jl(t,e,n){return{x:t.left-id,y:0,w:e+id*2,h:n}}function Hl(t,e,n){return{x:0,y:t.top-od,w:e,h:n+od*2}}function T0(t,e){var n,r;const i=(r=(n=t.config.axis_tooltip)==null?void 0:n.backgroundColor)!=null?r:"black";return typeof i=="string"?i:(i==null?void 0:i[e])||null}function b0(t,e,n){var r,i;const o=t.scale[e];if(!(o!=null&&o.invert))return null;const s=o.invert(n);if(s==null)return null;if(e==="x"&&((i=(r=t.axis)==null?void 0:r.isTimeSeries)!=null&&i.call(r)))return t.format.xAxisTick(s);const l=Number(s);return Number.isFinite(l)?l.toFixed(2):`${s}`}function S0(t,e){const{config:n,state:{height:r,margin:i,width:o}}=t,s=n.axis_rotated,l={x:i.left,y:i.top};return e==="x"?!s&&(l.y+=r):e==="y"?s&&(l.y+=r):s?l.y-=1:l.x+=o,l}function A0(t,e,n,r){return r?{x:t.x+n,y:t.y-e}:{x:t.x+e,y:t.y+n}}function sd(t,e){const n=t?t(e):e;return n==null?"":String(n)}function ji(t,e){return t[`${e}TickFont`]||t.labelFont}function Yl(t,e){const n=t.measureText("0"),r=(n.fontBoundingBoxAscent||0)+(n.fontBoundingBoxDescent||0),i=(n.actualBoundingBoxAscent||0)+(n.actualBoundingBoxDescent||0),o=(e||10)*(11.5/10);return Math.max(e,r,i,o)}function E0(t){return 11.5-2.5*(t/15)*(t>0?1:-1)}function C0(t){return 8*Math.sin(Math.PI*(t/180))}function Kl(t,e){if(typeof t=="number")return t;if(typeof t=="string"){const n=parseFloat(t);return Number.isFinite(n)?/em$/.test(t.trim())?n*e:n:0}return 0}function I0(t,e,n){if(!e)return[t];const r=n.measureText("0").width||5.5;function i(o,s){let l;for(let c=1;c<s.length;c++)if(s.charAt(c)===" "&&(l=c),e<r*(c+1)){const u=l||c;return i(o.concat(s.slice(0,u)),s.slice(l?l+1:c))}return o.concat(s)}return i([],t)}function Zl(t,e,n,r){var i,o;const s=t.config.axis_x_tick_width;if(s&&s>0)return s;if(n)return 95;if((o=(i=t.axis)==null?void 0:i.isCategorized)!=null&&o.call(i)&&e.length>1){const l=r(Jr(t,e[0])),c=r(Jr(t,e[1]));return Math.max(0,Math.abs(c-l)-12)}return 110}function ld(t,e,n,r,i=[],o=!1,s=tr(t),l){const c=n?n(r):r;if(c==null)return[""];if(Array.isArray(c))return c.map(f=>String(f));const u=String(c);return u.indexOf(`
24
+ */(function(Es,ir){if(typeof exports=="object"&&typeof module=="object")module.exports=ir();else if(typeof define=="function"&&define.amd)define([],ir);else{var Cs=ir();for(var T in Cs)(typeof exports=="object"?exports:Es)[T]=Cs[T]}})(this,function(){return(function(){var Du=[(function(T,P,a){"use strict";a(1),a(100),a(101),a(102),a(103),a(104),a(105),a(106),a(107),a(108),a(109),a(110),a(111),a(112),a(113),a(114),a(115),a(116),a(130),a(131),a(133),a(143),a(144),a(145),a(147),a(151),a(154),a(156),a(158),a(159),a(160),a(161),a(163),a(164),a(166),a(167),a(169),a(173),a(174),a(175),a(176),a(181),a(182),a(184),a(185),a(186),a(187),a(191),a(192),a(193),a(194),a(195),a(200),a(202),a(203),a(204),a(207),a(208),a(209),a(210),a(211),a(212),a(223),a(225),a(226),a(228),a(229),a(232),a(235),a(241),a(242),a(243),a(244),a(245),a(246),a(250),a(251),a(253),a(254),a(256),a(257),a(259),a(260),a(261),a(262),a(263),a(267),a(268),a(274),a(275),a(276),a(277),a(279),a(280),a(281),a(282),a(283),a(284),a(285),a(286),a(291),a(292),a(293),a(294),a(94),a(296),a(297),a(304),a(306),a(307),a(308),a(310),a(311),a(312),a(313),a(314),a(316),a(317),a(318),a(319),a(320),a(321),a(323),a(324),a(325),a(326),a(327),a(328),a(329),a(330),a(331),a(334),a(335),a(337),a(339),a(340),a(341),a(342),a(343),a(345),a(347),a(348),a(349),a(350),a(352),a(353),a(355),a(356),a(357),a(358),a(360),a(361),a(362),a(363),a(364),a(365),a(366),a(367),a(368),a(370),a(371),a(372),a(373),a(374),a(375),a(376),a(377),a(378),a(379),a(380),a(382),a(383),a(384),a(385),a(409),a(410),a(411),a(412),a(413),a(414),a(421),a(422),a(423),a(424),a(425),a(426),a(427),a(429),a(430),a(431),a(432),a(433),a(434),a(435),a(436),a(437),a(438),a(446),a(448),a(449),a(451),a(452),a(453),a(454),a(455),a(457),a(467),a(469),a(471),a(473),a(475),a(478),a(480),a(481),a(483),a(486),a(487),a(488),a(489),a(490),a(494),a(495),a(497),a(498),a(499),a(500),a(502),a(503),a(504),a(505),a(506),a(507),a(508),a(510),a(513),a(516),a(519),a(520),a(521),a(522),a(523),a(524),a(525),a(526),a(527),a(528),a(529),a(530),a(531),a(539),a(540),a(541),a(542),a(543),a(544),a(545),a(546),a(547),a(548),a(549),a(550),a(551),a(553),a(554),a(555),a(556),a(557),a(558),a(559),a(560),a(561),a(562),a(563),a(564),a(565),a(566),a(567),a(568),a(569),a(570),a(571),a(572),a(573),a(574),a(575),a(576),a(577),a(578),a(579),a(583),a(585),a(587),a(588),a(589),a(590),a(591),a(594),a(596),a(599),a(601),a(602),a(603),a(606),a(607),a(609),a(610),a(611),a(615),a(616),a(617),a(618),a(621),a(627),a(628),a(629),a(630),a(631),a(632),a(633),a(80)}),(function(T,P,a){"use strict";a(2),a(91),a(93),a(94),a(99)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(8),x=a(14),y=a(36),b=a(6),A=a(26),I=a(7),R=a(38),O=a(24),M=a(46),L=a(12),D=a(18),N=a(68),F=a(11),G=a(71),j=a(73),X=a(57),U=a(75),V=a(66),k=a(5),Y=a(44),K=a(72),J=a(10),Z=a(47),Q=a(77),at=a(34),et=a(53),rt=a(54),nt=a(40),ut=a(33),ht=a(78),pt=a(79),yt=a(81),At=a(82),Et=a(51),Ht=a(83).forEach,Ut=et("hidden"),kt="Symbol",Ct="prototype",It=Et.set,Dt=Et.getterFor(kt),Vt=Object[Ct],_t=g.Symbol,Nt=_t&&_t[Ct],Jt=g.RangeError,ne=g.TypeError,ve=g.QObject,le=k.f,fe=Y.f,Ce=U.f,Be=J.f,Ie=x([].push),ce=at("symbols"),xe=at("op-symbols"),Ue=at("wks"),Pt=!ve||!ve[Ct]||!ve[Ct].findChild,zt=function(Rt,Tt,wt){var Ft=le(Vt,Tt);return Ft&&delete Vt[Tt],fe(Rt,Tt,wt),Ft&&Rt!==Vt&&fe(Vt,Tt,Ft),Rt},jt=b&&I(function(){return G(fe({},"a",{get:function(){return fe(this,"a",{value:7}).a}})).a!==7})?zt:fe,we=function(Rt,Tt){var wt=ce[Rt]=G(Nt);return It(wt,{type:kt,tag:Rt,description:Tt}),b||(wt.description=Tt),wt},$t=function(Tt,wt,Ft){Tt===Vt&&$t(xe,wt,Ft),M(Tt);var Lt=D(wt);return M(Ft),R(ce,Lt)?(("enumerable"in Ft?!Ft.enumerable:!R(Tt,Lt)||R(Tt,Ut)&&Tt[Ut][Lt])?(R(Tt,Ut)||fe(Tt,Ut,F(1,G(null))),Tt[Ut][Lt]=!0):(R(Tt,Ut)&&Tt[Ut][Lt]&&(Tt[Ut][Lt]=!1),Ft=G(Ft,{enumerable:F(0,!1)})),jt(Tt,Lt,Ft)):fe(Tt,Lt,Ft)},Xt=function(Tt,wt){M(Tt);var Ft=L(wt),Lt=j(Ft).concat(vt(Ft));return Ht(Lt,function(ue){(!b||p(oe,Ft,ue))&&$t(Tt,ue,Ft[ue])}),Tt},re=function(Tt,wt){return wt===void 0?G(Tt):Xt(G(Tt),wt)},oe=function(Tt){var wt=D(Tt),Ft=p(Be,this,wt);return this===Vt&&R(ce,wt)&&!R(xe,wt)?!1:Ft||!R(this,wt)||!R(ce,wt)||R(this,Ut)&&this[Ut][wt]?Ft:!0},pe=function(Tt,wt){var Ft=L(Tt),Lt=D(wt);if(!(Ft===Vt&&R(ce,Lt)&&!R(xe,Lt))){var ue=le(Ft,Lt);return ue&&R(ce,Lt)&&!(R(Ft,Ut)&&Ft[Ut][Lt])&&(ue.enumerable=!0),ue}},rn=function(Tt){var wt=Ce(L(Tt)),Ft=[];return Ht(wt,function(Lt){!R(ce,Lt)&&!R(rt,Lt)&&Ie(Ft,Lt)}),Ft},vt=function(Rt){var Tt=Rt===Vt,wt=Ce(Tt?xe:L(Rt)),Ft=[];return Ht(wt,function(Lt){R(ce,Lt)&&(!Tt||R(Vt,Lt))&&Ie(Ft,ce[Lt])}),Ft};A||(_t=function(){if(O(Nt,this))throw new ne("Symbol is not a constructor");var Tt=!arguments.length||arguments[0]===void 0?void 0:N(arguments[0]),wt=nt(Tt),Ft=function(Lt){var ue=this===void 0?g:this;ue===Vt&&p(Ft,xe,Lt),R(ue,Ut)&&R(ue[Ut],wt)&&(ue[Ut][wt]=!1);var ye=F(1,Lt);try{jt(ue,wt,ye)}catch(Me){if(!(Me instanceof Jt))throw Me;zt(ue,wt,ye)}};return b&&Pt&&jt(Vt,wt,{configurable:!0,set:Ft}),we(wt,Tt)},Nt=_t[Ct],Z(Nt,"toString",function(){return Dt(this).tag}),Z(_t,"withoutSetter",function(Rt){return we(nt(Rt),Rt)}),J.f=oe,Y.f=$t,K.f=Xt,k.f=pe,X.f=U.f=rn,V.f=vt,ht.f=function(Rt){return we(ut(Rt),Rt)},b&&(Q(Nt,"description",{configurable:!0,get:function(){return Dt(this).description}}),y||Z(Vt,"propertyIsEnumerable",oe,{unsafe:!0}))),v({global:!0,constructor:!0,wrap:!0,forced:!A,sham:!A},{Symbol:_t}),Ht(j(Ue),function(Rt){pt(Rt)}),v({target:kt,stat:!0,forced:!A},{useSetter:function(){Pt=!0},useSimple:function(){Pt=!1}}),v({target:"Object",stat:!0,forced:!A,sham:!b},{create:re,defineProperty:$t,defineProperties:Xt,getOwnPropertyDescriptor:pe}),v({target:"Object",stat:!0,forced:!A},{getOwnPropertyNames:rn}),yt(),At(_t,kt),rt[Ut]=!0}),(function(T,P,a){"use strict";var v=a(4),g=a(5).f,p=a(43),x=a(47),y=a(37),b=a(55),A=a(67);T.exports=function(I,R){var O=I.target,M=I.global,L=I.stat,D,N,F,G,j,X;if(M?N=v:L?N=v[O]||y(O,{}):N=v[O]&&v[O].prototype,N)for(F in R){if(j=R[F],I.dontCallGetSet?(X=g(N,F),G=X&&X.value):G=N[F],D=A(M?F:O+(L?".":"#")+F,I.forced),!D&&G!==void 0){if(typeof j==typeof G)continue;b(j,G)}(I.sham||G&&G.sham)&&p(j,"sham",!0),x(N,F,j,I)}}}),(function(T){"use strict";var P=function(a){return a&&a.Math===Math&&a};T.exports=P(typeof globalThis=="object"&&globalThis)||P(typeof window=="object"&&window)||P(typeof self=="object"&&self)||P(typeof global=="object"&&global)||P(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()}),(function(T,P,a){"use strict";var v=a(6),g=a(8),p=a(10),x=a(11),y=a(12),b=a(18),A=a(38),I=a(41),R=Object.getOwnPropertyDescriptor;P.f=v?R:function(M,L){if(M=y(M),L=b(L),I)try{return R(M,L)}catch(D){}if(A(M,L))return x(!g(p.f,M,L),M[L])}}),(function(T,P,a){"use strict";var v=a(7);T.exports=!v(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}),(function(T){"use strict";T.exports=function(P){try{return!!P()}catch(a){return!0}}}),(function(T,P,a){"use strict";var v=a(9),g=Function.prototype.call;T.exports=v?g.bind(g):function(){return g.apply(g,arguments)}}),(function(T,P,a){"use strict";var v=a(7);T.exports=!v(function(){var g=function(){}.bind();return typeof g!="function"||g.hasOwnProperty("prototype")})}),(function(T,P){"use strict";var a={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,g=v&&!a.call({1:2},1);P.f=g?function(x){var y=v(this,x);return!!y&&y.enumerable}:a}),(function(T){"use strict";T.exports=function(P,a){return{enumerable:!(P&1),configurable:!(P&2),writable:!(P&4),value:a}}}),(function(T,P,a){"use strict";var v=a(13),g=a(16);T.exports=function(p){return v(g(p))}}),(function(T,P,a){"use strict";var v=a(14),g=a(7),p=a(15),x=Object,y=v("".split);T.exports=g(function(){return!x("z").propertyIsEnumerable(0)})?function(b){return p(b)==="String"?y(b,""):x(b)}:x}),(function(T,P,a){"use strict";var v=a(9),g=Function.prototype,p=g.call,x=v&&g.bind.bind(p,p);T.exports=v?x:function(y){return function(){return p.apply(y,arguments)}}}),(function(T,P,a){"use strict";var v=a(14),g=v({}.toString),p=v("".slice);T.exports=function(x){return p(g(x),8,-1)}}),(function(T,P,a){"use strict";var v=a(17),g=TypeError;T.exports=function(p){if(v(p))throw new g("Can't call method on "+p);return p}}),(function(T){"use strict";T.exports=function(P){return P==null}}),(function(T,P,a){"use strict";var v=a(19),g=a(22);T.exports=function(p){var x=v(p,"string");return g(x)?x:x+""}}),(function(T,P,a){"use strict";var v=a(8),g=a(20),p=a(22),x=a(29),y=a(32),b=a(33),A=TypeError,I=b("toPrimitive");T.exports=function(R,O){if(!g(R)||p(R))return R;var M=x(R,I),L;if(M){if(O===void 0&&(O="default"),L=v(M,R,O),!g(L)||p(L))return L;throw new A("Can't convert object to primitive value")}return O===void 0&&(O="number"),y(R,O)}}),(function(T,P,a){"use strict";var v=a(21);T.exports=function(g){return typeof g=="object"?g!==null:v(g)}}),(function(T){"use strict";var P=typeof document=="object"&&document.all;T.exports=typeof P=="undefined"&&P!==void 0?function(a){return typeof a=="function"||a===P}:function(a){return typeof a=="function"}}),(function(T,P,a){"use strict";var v=a(23),g=a(21),p=a(24),x=a(25),y=Object;T.exports=x?function(b){return typeof b=="symbol"}:function(b){var A=v("Symbol");return g(A)&&p(A.prototype,y(b))}}),(function(T,P,a){"use strict";var v=a(4),g=a(21),p=function(x){return g(x)?x:void 0};T.exports=function(x,y){return arguments.length<2?p(v[x]):v[x]&&v[x][y]}}),(function(T,P,a){"use strict";var v=a(14);T.exports=v({}.isPrototypeOf)}),(function(T,P,a){"use strict";var v=a(26);T.exports=v&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}),(function(T,P,a){"use strict";var v=a(27),g=a(7),p=a(4),x=p.String;T.exports=!!Object.getOwnPropertySymbols&&!g(function(){var y=Symbol("symbol detection");return!x(y)||!(Object(y)instanceof Symbol)||!Symbol.sham&&v&&v<41})}),(function(T,P,a){"use strict";var v=a(4),g=a(28),p=v.process,x=v.Deno,y=p&&p.versions||x&&x.version,b=y&&y.v8,A,I;b&&(A=b.split("."),I=A[0]>0&&A[0]<4?1:+(A[0]+A[1])),!I&&g&&(A=g.match(/Edge\/(\d+)/),(!A||A[1]>=74)&&(A=g.match(/Chrome\/(\d+)/),A&&(I=+A[1]))),T.exports=I}),(function(T,P,a){"use strict";var v=a(4),g=v.navigator,p=g&&g.userAgent;T.exports=p?String(p):""}),(function(T,P,a){"use strict";var v=a(30),g=a(17);T.exports=function(p,x){var y=p[x];return g(y)?void 0:v(y)}}),(function(T,P,a){"use strict";var v=a(21),g=a(31),p=TypeError;T.exports=function(x){if(v(x))return x;throw new p(g(x)+" is not a function")}}),(function(T){"use strict";var P=String;T.exports=function(a){try{return P(a)}catch(v){return"Object"}}}),(function(T,P,a){"use strict";var v=a(8),g=a(21),p=a(20),x=TypeError;T.exports=function(y,b){var A,I;if(b==="string"&&g(A=y.toString)&&!p(I=v(A,y))||g(A=y.valueOf)&&!p(I=v(A,y))||b!=="string"&&g(A=y.toString)&&!p(I=v(A,y)))return I;throw new x("Can't convert object to primitive value")}}),(function(T,P,a){"use strict";var v=a(4),g=a(34),p=a(38),x=a(40),y=a(26),b=a(25),A=v.Symbol,I=g("wks"),R=b?A.for||A:A&&A.withoutSetter||x;T.exports=function(O){return p(I,O)||(I[O]=y&&p(A,O)?A[O]:R("Symbol."+O)),I[O]}}),(function(T,P,a){"use strict";var v=a(35),g=Object.create||Object;T.exports=function(p,x){return v[p]||(v[p]=x||g(null))}}),(function(T,P,a){"use strict";var v=a(36),g=a(4),p=a(37),x="__core-js_shared__",y=T.exports=g[x]||p(x,{});(y.versions||(y.versions=[])).push({version:"3.50.0",mode:v?"pure":"global",copyright:"\xA9 2013\u20132025 Denis Pushkarev (zloirock.ru), 2025\u20132026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),(function(T){"use strict";T.exports=!1}),(function(T,P,a){"use strict";var v=a(4),g=Object.defineProperty;T.exports=function(p,x){try{g(v,p,{value:x,configurable:!0,writable:!0})}catch(y){v[p]=x}return x}}),(function(T,P,a){"use strict";var v=a(14),g=a(39),p=v({}.hasOwnProperty);T.exports=Object.hasOwn||function(y,b){return p(g(y),b)}}),(function(T,P,a){"use strict";var v=a(16),g=Object;T.exports=function(p){return g(v(p))}}),(function(T,P,a){"use strict";var v=a(14),g=0,p=Math.random(),x=v(1.1.toString);T.exports=function(y){return"Symbol("+(y===void 0?"":y)+")_"+x(++g+p,36)}}),(function(T,P,a){"use strict";var v=a(6),g=a(7),p=a(42);T.exports=!v&&!g(function(){return Object.defineProperty(p("div"),"a",{get:function(){return 7}}).a!==7})}),(function(T,P,a){"use strict";var v=a(4),g=a(20),p=v.document,x=g(p)&&g(p.createElement);T.exports=function(y){return x?p.createElement(y):{}}}),(function(T,P,a){"use strict";var v=a(6),g=a(44),p=a(11);T.exports=v?function(x,y,b){return g.f(x,y,p(1,b))}:function(x,y,b){return x[y]=b,x}}),(function(T,P,a){"use strict";var v=a(6),g=a(41),p=a(45),x=a(46),y=a(18),b=TypeError,A=Object.defineProperty,I=Object.getOwnPropertyDescriptor,R="enumerable",O="configurable",M="writable";P.f=v?p?function(D,N,F){if(x(D),N=y(N),x(F),typeof D=="function"&&N==="prototype"&&"value"in F&&M in F&&!F[M]){var G=I(D,N);G&&G[M]&&(D[N]=F.value,F={configurable:O in F?F[O]:G[O],enumerable:R in F?F[R]:G[R],writable:!1})}return A(D,N,F)}:A:function(D,N,F){if(x(D),N=y(N),x(F),g)try{return A(D,N,F)}catch(G){}if("get"in F||"set"in F)throw new b("Accessors not supported");return"value"in F&&(D[N]=F.value),D}}),(function(T,P,a){"use strict";var v=a(6),g=a(7);T.exports=v&&g(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})}),(function(T,P,a){"use strict";var v=a(20),g=String,p=TypeError;T.exports=function(x){if(v(x))return x;throw new p(g(x)+" is not an object")}}),(function(T,P,a){"use strict";var v=a(21),g=a(44),p=a(48),x=a(37);T.exports=function(y,b,A,I){I||(I={});var R=I.enumerable,O=I.name!==void 0?I.name:b;if(v(A)&&p(A,O,I),I.global)R?y[b]=A:x(b,A);else{try{I.unsafe?y[b]&&(R=!0):delete y[b]}catch(M){}R?y[b]=A:g.f(y,b,{value:A,enumerable:!1,configurable:!I.nonConfigurable,writable:!I.nonWritable})}return y}}),(function(T,P,a){"use strict";var v=a(14),g=a(7),p=a(21),x=a(38),y=a(6),b=a(49).CONFIGURABLE,A=a(50),I=a(51),R=I.enforce,O=I.get,M=String,L=Object.defineProperty,D=v("".slice),N=v("".replace),F=v([].join),G=y&&!g(function(){return L(function(){},"length",{value:8}).length!==8}),j=String(String).split("String"),X=T.exports=function(U,V,k){D(M(V),0,7)==="Symbol("&&(V="["+N(M(V),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),k&&k.getter&&(V="get "+V),k&&k.setter&&(V="set "+V),(!x(U,"name")||b&&U.name!==V)&&(y?L(U,"name",{value:V,configurable:!0}):U.name=V),G&&k&&x(k,"arity")&&U.length!==k.arity&&L(U,"length",{value:k.arity});try{k&&x(k,"constructor")&&k.constructor?y&&L(U,"prototype",{writable:!1}):U.prototype&&(U.prototype=void 0)}catch(K){}var Y=R(U);return x(Y,"source")||(Y.source=F(j,typeof V=="string"?V:"")),U};Function.prototype.toString=X(function(){return p(this)&&O(this).source||A(this)},"toString")}),(function(T,P,a){"use strict";var v=a(6),g=a(38),p=Function.prototype,x=v&&Object.getOwnPropertyDescriptor,y=g(p,"name"),b=y&&function(){}.name==="something",A=y&&(!v||v&&x(p,"name").configurable);T.exports={EXISTS:y,PROPER:b,CONFIGURABLE:A}}),(function(T,P,a){"use strict";var v=a(14),g=a(21),p=a(35),x=v(Function.toString);g(p.inspectSource)||(p.inspectSource=function(y){return x(y)}),T.exports=p.inspectSource}),(function(T,P,a){"use strict";var v=a(52),g=a(4),p=a(20),x=a(43),y=a(38),b=a(35),A=a(53),I=a(54),R="Object already initialized",O=g.TypeError,M=g.WeakMap,L,D,N,F=function(U){return N(U)?D(U):L(U,{})},G=function(U){return function(V){var k;if(!p(V)||(k=D(V)).type!==U)throw new O("Incompatible receiver, "+U+" required");return k}};if(v||b.state){var j=b.state||(b.state=new M);j.get=j.get,j.has=j.has,j.set=j.set,L=function(U,V){if(j.has(U))throw new O(R);return V.facade=U,j.set(U,V),V},D=function(U){return j.get(U)||{}},N=function(U){return j.has(U)}}else{var X=A("state");I[X]=!0,L=function(U,V){if(y(U,X))throw new O(R);return V.facade=U,x(U,X,V),V},D=function(U){return y(U,X)?U[X]:{}},N=function(U){return y(U,X)}}T.exports={set:L,get:D,has:N,enforce:F,getterFor:G}}),(function(T,P,a){"use strict";var v=a(4),g=a(21),p=v.WeakMap;T.exports=g(p)&&/native code/.test(String(p))}),(function(T,P,a){"use strict";var v=a(34),g=a(40),p=v("keys");T.exports=function(x){return p[x]||(p[x]=g(x))}}),(function(T){"use strict";T.exports={}}),(function(T,P,a){"use strict";var v=a(38),g=a(56),p=a(5),x=a(44);T.exports=function(y,b,A){for(var I=g(b),R=x.f,O=p.f,M=0;M<I.length;M++){var L=I[M];!v(y,L)&&!(A&&v(A,L))&&R(y,L,O(b,L))}}}),(function(T,P,a){"use strict";var v=a(23),g=a(14),p=a(57),x=a(66),y=a(46),b=g([].concat);T.exports=v("Reflect","ownKeys")||function(I){var R=p.f(y(I)),O=x.f;return O?b(R,O(I)):R}}),(function(T,P,a){"use strict";var v=a(58),g=a(65),p=g.concat("length","prototype");P.f=Object.getOwnPropertyNames||function(y){return v(y,p)}}),(function(T,P,a){"use strict";var v=a(14),g=a(38),p=a(12),x=a(59).indexOf,y=a(54),b=v([].push);T.exports=function(A,I){var R=p(A),O=0,M=[],L;for(L in R)!g(y,L)&&g(R,L)&&b(M,L);for(;I.length>O;)g(R,L=I[O++])&&(~x(M,L)||b(M,L));return M}}),(function(T,P,a){"use strict";var v=a(12),g=a(60),p=a(63),x=function(y){return function(b,A,I){var R=v(b),O=p(R);if(O===0)return!y&&-1;var M=g(I,O),L;if(y&&A!==A){for(;O>M;)if(L=R[M++],L!==L)return!0}else for(;O>M;M++)if((y||M in R)&&R[M]===A)return y||M||0;return!y&&-1}};T.exports={includes:x(!0),indexOf:x(!1)}}),(function(T,P,a){"use strict";var v=a(61),g=Math.max,p=Math.min;T.exports=function(x,y){var b=v(x);return b<0?g(b+y,0):p(b,y)}}),(function(T,P,a){"use strict";var v=a(62);T.exports=function(g){var p=+g;return p!==p||p===0?0:v(p)}}),(function(T){"use strict";var P=Math.ceil,a=Math.floor;T.exports=Math.trunc||function(g){var p=+g;return(p>0?a:P)(p)}}),(function(T,P,a){"use strict";var v=a(64);T.exports=function(g){return v(g.length)}}),(function(T,P,a){"use strict";var v=a(61),g=Math.min;T.exports=function(p){var x=v(p);return x>0?g(x,9007199254740991):0}}),(function(T){"use strict";T.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),(function(T,P){"use strict";P.f=Object.getOwnPropertySymbols}),(function(T,P,a){"use strict";var v=a(7),g=a(21),p=/#|\.prototype\./,x=function(R,O){var M=b[y(R)];return M===I?!0:M===A?!1:g(O)?v(O):!!O},y=x.normalize=function(R){return String(R).replace(p,".").toLowerCase()},b=x.data={},A=x.NATIVE="N",I=x.POLYFILL="P";T.exports=x}),(function(T,P,a){"use strict";var v=a(69),g=String;T.exports=function(p){if(v(p)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return g(p)}}),(function(T,P,a){"use strict";var v=a(70),g=a(21),p=a(15),x=a(33),y=x("toStringTag"),b=Object,A=p((function(){return arguments})())==="Arguments",I=function(R,O){try{return R[O]}catch(M){}};T.exports=v?p:function(R){var O,M,L;return R===void 0?"Undefined":R===null?"Null":typeof(M=I(O=b(R),y))=="string"?M:A?p(O):(L=p(O))==="Object"&&g(O.callee)?"Arguments":L}}),(function(T,P,a){"use strict";var v=a(33),g=v("toStringTag"),p={};p[g]="z",T.exports=String(p)==="[object z]"}),(function(T,P,a){"use strict";var v=a(46),g=a(72),p=a(65),x=a(54),y=a(74),b=a(42),A=a(53),I=">",R="<",O="prototype",M="script",L=A("IE_PROTO"),D=function(){},N=function(U){return R+M+I+U+R+"/"+M+I},F=function(U){U.write(N("")),U.close();var V=U.parentWindow.Object;return U=null,V},G=function(){var U=b("iframe"),V="java"+M+":",k;return U.style.display="none",y.appendChild(U),U.src=String(V),k=U.contentWindow.document,k.open(),k.write(N("document.F=Object")),k.close(),k.F},j,X=function(){try{j=new ActiveXObject("htmlfile")}catch(V){}X=typeof document!="undefined"?document.domain&&j?F(j):G():F(j);for(var U=p.length;U--;)delete X[O][p[U]];return X()};x[L]=!0,T.exports=Object.create||function(V,k){var Y;return V!==null?(D[O]=v(V),Y=new D,D[O]=null,Y[L]=V):Y=X(),k===void 0?Y:g.f(Y,k)}}),(function(T,P,a){"use strict";var v=a(6),g=a(45),p=a(44),x=a(46),y=a(12),b=a(73);P.f=v&&!g?Object.defineProperties:function(I,R){x(I);for(var O=y(R),M=b(R),L=M.length,D=0,N;L>D;)p.f(I,N=M[D++],O[N]);return I}}),(function(T,P,a){"use strict";var v=a(58),g=a(65);T.exports=Object.keys||function(x){return v(x,g)}}),(function(T,P,a){"use strict";var v=a(23);T.exports=v("document","documentElement")}),(function(T,P,a){"use strict";var v=a(15),g=a(12),p=a(57).f,x=a(76),y=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],b=function(A){try{return p(A)}catch(I){return x(y)}};T.exports.f=function(I){return y&&v(I)==="Window"?b(I):p(g(I))}}),(function(T,P,a){"use strict";var v=a(14);T.exports=v([].slice)}),(function(T,P,a){"use strict";var v=a(48),g=a(44);T.exports=function(p,x,y){return y.get&&v(y.get,x,{getter:!0}),y.set&&v(y.set,x,{setter:!0}),g.f(p,x,y)}}),(function(T,P,a){"use strict";var v=a(33);P.f=v}),(function(T,P,a){"use strict";var v=a(80),g=a(38),p=a(78),x=a(44).f;T.exports=function(y){var b=v.Symbol||(v.Symbol={});g(b,y)||x(b,y,{value:p.f(y)})}}),(function(T,P,a){"use strict";var v=a(4);T.exports=v}),(function(T,P,a){"use strict";var v=a(8),g=a(23),p=a(33),x=a(47);T.exports=function(){var y=g("Symbol"),b=y&&y.prototype,A=b&&b.valueOf,I=p("toPrimitive");b&&!b[I]&&x(b,I,function(R){return v(A,this)},{arity:1})}}),(function(T,P,a){"use strict";var v=a(44).f,g=a(38),p=a(33),x=p("toStringTag");T.exports=function(y,b,A){y&&!A&&(y=y.prototype),y&&!g(y,x)&&v(y,x,{configurable:!0,value:b})}}),(function(T,P,a){"use strict";var v=a(84),g=a(13),p=a(39),x=a(63),y=a(86),b=a(90),A=function(I){var R=I===1,O=I===2,M=I===3,L=I===4,D=I===6,N=I===7,F=I===5||D;return function(G,j,X){for(var U=p(G),V=g(U),k=x(V),Y=v(j,X),K=0,J=0,Z=R?y(G,k):O||N?y(G,0):void 0,Q,at;k>K;K++)if((F||K in V)&&(Q=V[K],at=Y(Q,K,U),I))if(R)b(Z,K,at);else if(at)switch(I){case 3:return!0;case 5:return Q;case 6:return K;case 2:b(Z,J++,Q)}else switch(I){case 4:return!1;case 7:b(Z,J++,Q)}return D?-1:M||L?L:Z}};T.exports={forEach:A(0),map:A(1),filter:A(2),some:A(3),every:A(4),find:A(5),findIndex:A(6),filterReject:A(7)}}),(function(T,P,a){"use strict";var v=a(85),g=a(30),p=a(9),x=v(v.bind);T.exports=function(y,b){return g(y),b===void 0?y:p?x(y,b):function(){return y.apply(b,arguments)}}}),(function(T,P,a){"use strict";var v=a(15),g=a(14);T.exports=function(p){if(v(p)==="Function")return g(p)}}),(function(T,P,a){"use strict";var v=a(87);T.exports=function(g,p){return new(v(g))(p===0?0:p)}}),(function(T,P,a){"use strict";var v=a(88),g=a(89),p=a(20),x=a(33),y=x("species"),b=Array;T.exports=function(A){var I;return v(A)&&(I=A.constructor,g(I)&&(I===b||v(I.prototype))?I=void 0:p(I)&&(I=I[y],I===null&&(I=void 0))),I===void 0?b:I}}),(function(T,P,a){"use strict";var v=a(15);T.exports=Array.isArray||function(p){return v(p)==="Array"}}),(function(T,P,a){"use strict";var v=a(14),g=a(7),p=a(21),x=a(69),y=a(23),b=a(50),A=function(){},I=y("Reflect","construct"),R=/^\s*(?:class|function)\b/,O=v(R.exec),M=!R.test(A),L=function(F){if(!p(F))return!1;try{return I(A,[],F),!0}catch(G){return!1}},D=function(F){if(!p(F))return!1;switch(x(F)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return M||!!O(R,b(F))}catch(G){return!0}};D.sham=!0,T.exports=!I||g(function(){var N;return L(L.call)||!L(Object)||!L(function(){N=!0})||N})?D:L}),(function(T,P,a){"use strict";var v=a(6),g=a(44),p=a(11);T.exports=function(x,y,b){v?g.f(x,y,p(0,b)):x[y]=b}}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(38),x=a(68),y=a(34),b=a(92),A=y("string-to-symbol-registry"),I=y("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!b},{for:function(R){var O=x(R);if(p(A,O))return A[O];var M=g("Symbol")(O);return A[O]=M,I[M]=O,M}})}),(function(T,P,a){"use strict";var v=a(26);T.exports=v&&!!Symbol.for&&!!Symbol.keyFor}),(function(T,P,a){"use strict";var v=a(3),g=a(38),p=a(22),x=a(31),y=a(34),b=a(92),A=y("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!b},{keyFor:function(R){if(!p(R))throw new TypeError(x(R)+" is not a symbol");if(g(A,R))return A[R]}})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(8),x=a(14),y=a(7),b=a(88),A=a(21),I=a(20),R=a(71),O=a(95),M=a(22),L=a(15),D=a(96),N=a(59).includes,F=a(38),G=a(68),j=a(97),X=a(40),U=a(26),V=a(98),k=String,Y=TypeError,K=g("JSON","stringify"),J=g("BigInt"),Z=x("".valueOf),Q=x((!0).valueOf),at=J&&x(J.prototype.valueOf),et=x(/./.exec),rt=x("".charAt),nt=x("".charCodeAt),ut=x("".replace),ht=x("".slice),pt=x([].push),yt=x([].pop),At=x(1.1.toString),Et=/[\uD800-\uDFFF]/g,Ht=/^[\uD800-\uDBFF]$/,Ut=/^[\uDC00-\uDFFF]$/,kt=/^\d+$/,Ct=X(),It=X(),Dt=X(),Vt=Ct.length,_t=It.length,Nt=!U||y(function(){var Pt=g("Symbol")("stringify detection");return K([Pt])!=="[null]"||K({a:Pt})!=="{}"||K(Object(Pt))!=="{}"}),Jt=y(function(){return K("\uDF06\uD834")!=='"\\udf06\\ud834"'||K("\uDEAD")!=='"\\udead"'}),ne=V?g("JSON","isRawJSON"):O,ve=Nt?function(Pt,zt,jt){return K(Pt,function(we,$t){var Xt=p(zt,this,we,$t);if(!M(Xt))return Xt},jt)}:K,le=function(Pt,zt,jt){var we=rt(jt,zt-1),$t=rt(jt,zt+1);return et(Ht,Pt)&&!et(Ut,$t)||et(Ut,Pt)&&!et(Ht,we)?"\\u"+At(nt(Pt,0),16):Pt},fe=function(Pt){if(b(Pt)){for(var zt=Pt.length,jt=[],we=R(null),$t=0;$t<zt;$t++){var Xt=Pt[$t],re;if(typeof Xt=="string")re=Xt;else if(typeof Xt=="number"||L(Xt)==="Number"||L(Xt)==="String")re=G(Xt);else continue;F(we,re)||(we[re]=!0,pt(jt,re))}return jt}},Ce=function(Pt,zt){try{return Pt(zt),!0}catch(jt){return!1}},Be=function(Pt){var zt=L(Pt);return zt==="Number"&&Ce(D,Pt)||zt==="String"&&Ce(Z,Pt)||zt==="Boolean"&&Ce(Q,Pt)||!!at&&zt==="BigInt"&&Ce(at,Pt)},Ie=function(Pt){if(!I(Pt)||A(Pt)||b(Pt))return!1;try{return!Be(Pt)}catch(zt){return!0}},ce=function(Pt,zt){return{toJSON:function(){var jt=Pt[zt];if(I(jt)||typeof jt=="bigint"){var we=jt.toJSON;A(we)&&(jt=p(we,jt,zt))}return jt}}},xe=function(Pt){for(var zt=0,jt=Pt.length;zt<jt;zt++)if(et(kt,Pt[zt]))return It;return""},Ue=function(Pt,zt,jt){for(var we=R(null),$t=0,Xt=zt.length;$t<Xt;$t++){var re=zt[$t];we[jt+re]=ce(Pt,re)}return we[Dt]=null,we};K&&v({target:"JSON",stat:!0,arity:3,forced:Nt||Jt||!V},{stringify:function(zt,jt,we){var $t=A(jt)?jt:void 0,Xt=$t?void 0:fe(jt),re=Xt&&xe(Xt),oe=[],pe=[],rn=[],vt,Rt=!1,Tt=!0,wt=ve(zt,function(tn,Ve){if(tn=k(tn),Xt){if(tn===Dt){yt(pe),vt=yt(rn);return}if(Tt)Tt=!1;else if(this!==vt&&!b(this)&&!N(Xt,tn))return}else $t&&(Ve=p($t,this,tn,Ve));if(ne(Ve))return V?Ve:(Rt=!0,Ct+(pt(oe,Ve.rawJSON)-1));if(Xt&&Ie(Ve)){if(N(pe,Ve))throw new Y("Converting circular structure to JSON");var _n=Ue(Ve,Xt,re);return pt(pe,Ve),pt(rn,vt),vt=_n,re&&(Rt=!0),_n}return Ve},we);if(typeof wt!="string"||(Jt&&(wt=ut(wt,Et,le)),!Rt))return wt;for(var Ft="",Lt=wt.length,ue=0;ue<Lt;ue++){var ye=rt(wt,ue);if(ye==='"'){var Me=j(wt,++ue).end-1,Fe=ht(wt,ue,Me);ht(Fe,0,Vt)===Ct?Ft+=oe[ht(Fe,Vt)]:ht(Fe,0,_t)===It?Ft+='"'+ht(Fe,_t)+'"':Ft+='"'+Fe+'"',ue=Me}else Ft+=ye}return Ft}})}),(function(T,P,a){"use strict";var v=a(20),g=a(51).get;T.exports=function(x){if(!v(x))return!1;var y=g(x);return!!y&&y.type==="RawJSON"}}),(function(T,P,a){"use strict";var v=a(14);T.exports=v(1.1.valueOf)}),(function(T,P,a){"use strict";var v=a(14),g=a(38),p=SyntaxError,x=parseInt,y=String.fromCharCode,b=v("".charAt),A=v("".slice),I=v(/./.exec),R={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":`
25
+ `,"\\r":"\r","\\t":" "},O=/^[\da-f]{4}$/i,M=/^[\u0000-\u001F]$/;T.exports=function(L,D){for(var N=!0,F="";D<L.length;){var G=b(L,D);if(G==="\\"){var j=A(L,D,D+2);if(g(R,j))F+=R[j],D+=2;else if(j==="\\u"){D+=2;var X=A(L,D,D+4);if(!I(O,X))throw new p("Bad Unicode escape at: "+D);F+=y(x(X,16)),D+=4}else throw new p('Unknown escape sequence: "'+j+'"')}else if(G==='"'){N=!1,D++;break}else{if(I(M,G))throw new p("Bad control character in string literal at: "+D);F+=G,D++}}if(N)throw new p("Unterminated string at: "+D);return{value:F,end:D}}}),(function(T,P,a){"use strict";var v=a(7);T.exports=!v(function(){var g="9007199254740993",p=JSON.rawJSON(g);return!JSON.isRawJSON(p)||JSON.stringify(p)!==g})}),(function(T,P,a){"use strict";var v=a(3),g=a(26),p=a(7),x=a(66),y=a(39),b=!g||p(function(){x.f(1)});v({target:"Object",stat:!0,forced:b},{getOwnPropertySymbols:function(I){var R=x.f;return R?R(y(I)):[]}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(4),x=a(8),y=a(14),b=a(38),A=a(21),I=a(24),R=a(68),O=a(77),M=a(55),L=p.Symbol,D=L&&L.prototype;if(g&&A(L)&&(!("description"in D)||L().description!==void 0)){var N={},F=function(){var J=arguments.length<1||arguments[0]===void 0?void 0:R(arguments[0]),Z=I(D,this)?new L(J):J===void 0?L():L(J);return J===""&&(N[Z]=!0),Z};M(F,L);var G=F.for;F.for=function(K){var J=R(K),Z=x(G,this,J);return J===""&&(N[Z]=!0),Z},F.prototype=D,D.constructor=F;var j=String(L("description detection"))==="Symbol(description detection)",X=y(D.valueOf),U=y(D.toString),V=/^Symbol\((.*)\)[^)]+$/,k=y("".replace),Y=y("".slice);O(D,"description",{configurable:!0,get:function(){var J=X(this);if(b(N,J))return"";var Z=U(J),Q=j?Y(Z,7,-1):k(Z,V,"$1");return Q===""?void 0:Q}}),v({global:!0,constructor:!0,forced:!0},{Symbol:F})}}),(function(T,P,a){"use strict";var v=a(4),g=a(79),p=a(44).f,x=a(5).f,y=v.Symbol;if(g("asyncDispose"),y){var b=x(y,"asyncDispose");b.enumerable&&b.configurable&&b.writable&&p(y,"asyncDispose",{value:b.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(T,P,a){"use strict";var v=a(79);v("asyncIterator")}),(function(T,P,a){"use strict";var v=a(4),g=a(79),p=a(44).f,x=a(5).f,y=v.Symbol;if(g("dispose"),y){var b=x(y,"dispose");b.enumerable&&b.configurable&&b.writable&&p(y,"dispose",{value:b.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(T,P,a){"use strict";var v=a(79);v("hasInstance")}),(function(T,P,a){"use strict";var v=a(79);v("isConcatSpreadable")}),(function(T,P,a){"use strict";var v=a(79);v("iterator")}),(function(T,P,a){"use strict";var v=a(79);v("match")}),(function(T,P,a){"use strict";var v=a(79);v("matchAll")}),(function(T,P,a){"use strict";var v=a(79);v("replace")}),(function(T,P,a){"use strict";var v=a(79);v("search")}),(function(T,P,a){"use strict";var v=a(79);v("species")}),(function(T,P,a){"use strict";var v=a(79);v("split")}),(function(T,P,a){"use strict";var v=a(79),g=a(81);v("toPrimitive"),g()}),(function(T,P,a){"use strict";var v=a(23),g=a(79),p=a(82);g("toStringTag"),p(v("Symbol"),"Symbol")}),(function(T,P,a){"use strict";var v=a(79);v("unscopables")}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(117),x=a(118),y="WebAssembly",b=g[y],A=new Error("e",{cause:7}).cause!==7,I=function(O,M){var L={};L[O]=x(O,M,A),v({global:!0,constructor:!0,arity:1,forced:A},L)},R=function(O,M){if(b&&b[O]){var L={};L[O]=x(y+"."+O,M,A),v({target:y,stat:!0,constructor:!0,arity:1,forced:A},L)}};I("Error",function(O){return function(L){return p(O,this,arguments)}}),I("EvalError",function(O){return function(L){return p(O,this,arguments)}}),I("RangeError",function(O){return function(L){return p(O,this,arguments)}}),I("ReferenceError",function(O){return function(L){return p(O,this,arguments)}}),I("SyntaxError",function(O){return function(L){return p(O,this,arguments)}}),I("TypeError",function(O){return function(L){return p(O,this,arguments)}}),I("URIError",function(O){return function(L){return p(O,this,arguments)}}),R("CompileError",function(O){return function(L){return p(O,this,arguments)}}),R("LinkError",function(O){return function(L){return p(O,this,arguments)}}),R("RuntimeError",function(O){return function(L){return p(O,this,arguments)}})}),(function(T,P,a){"use strict";var v=a(9),g=Function.prototype,p=g.apply,x=g.call;T.exports=typeof Reflect=="object"&&Reflect.apply||(v?x.bind(p):function(){return x.apply(p,arguments)})}),(function(T,P,a){"use strict";var v=a(23),g=a(38),p=a(43),x=a(24),y=a(119),b=a(55),A=a(123),I=a(124),R=a(125),O=a(126),M=a(127),L=a(6),D=a(36);T.exports=function(N,F,G,j){var X="stackTraceLimit",U=j?2:1,V=N.split("."),k=V[V.length-1],Y=v.apply(null,V);if(Y){var K=Y.prototype;if(!D&&g(K,"cause")&&delete K.cause,!G)return Y;var J=v("Error"),Z=F(function(Q,at){var et=R(j?at:Q,void 0),rt=j?new Y(Q):new Y;return et!==void 0&&p(rt,"message",et),M(rt,Z,rt.stack,2),this&&x(K,this)&&I(rt,this,Z),arguments.length>U&&O(rt,arguments[U]),rt});if(Z.prototype=K,k!=="Error"?y?y(Z,J):b(Z,J,{name:!0}):L&&X in Y&&(A(Z,Y,X),A(Z,Y,"prepareStackTrace")),b(Z,Y),!D)try{K.name!==k&&p(K,"name",k),K.constructor=Z}catch(Q){}return Z}}}),(function(T,P,a){"use strict";var v=a(120),g=a(20),p=a(16),x=a(121);T.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var y=!1,b={},A;try{A=v(Object.prototype,"__proto__","set"),A(b,[]),y=b instanceof Array}catch(I){}return function(R,O){return p(R),x(O),g(R)&&(y?A(R,O):R.__proto__=O),R}})():void 0)}),(function(T,P,a){"use strict";var v=a(14),g=a(30);T.exports=function(p,x,y){try{return v(g(Object.getOwnPropertyDescriptor(p,x)[y]))}catch(b){}}}),(function(T,P,a){"use strict";var v=a(122),g=String,p=TypeError;T.exports=function(x){if(v(x))return x;throw new p("Can't set "+g(x)+" as a prototype")}}),(function(T,P,a){"use strict";var v=a(20);T.exports=function(g){return v(g)||g===null}}),(function(T,P,a){"use strict";var v=a(44).f;T.exports=function(g,p,x){x in g||v(g,x,{configurable:!0,get:function(){return p[x]},set:function(y){p[x]=y}})}}),(function(T,P,a){"use strict";var v=a(21),g=a(20),p=a(119);T.exports=function(x,y,b){var A,I;return p&&v(A=y.constructor)&&A!==b&&g(I=A.prototype)&&I!==b.prototype&&p(x,I),x}}),(function(T,P,a){"use strict";var v=a(68);T.exports=function(g,p){return g===void 0?arguments.length<2?"":p:v(g)}}),(function(T,P,a){"use strict";var v=a(20),g=a(43);T.exports=function(p,x){v(x)&&"cause"in x&&g(p,"cause",x.cause)}}),(function(T,P,a){"use strict";var v=a(43),g=a(128),p=a(129),x=Error.captureStackTrace;T.exports=function(y,b,A,I){p&&(x?x(y,b):v(y,"stack",g(A,I)))}}),(function(T,P,a){"use strict";var v=a(14),g=Error,p=v("".replace),x=(function(A){return String(new g(A).stack)})("zxcasd"),y=/\n\s*at [^:]*:[^\n]*/,b=y.test(x);T.exports=function(A,I){if(b&&typeof A=="string"&&!g.prepareStackTrace)for(;I--;)A=p(A,y,"");return A}}),(function(T,P,a){"use strict";var v=a(7),g=a(11);T.exports=!v(function(){var p=new Error("a");return"stack"in p?(Object.defineProperty(p,"stack",g(1,7)),p.stack!==7):!0})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(20),x=a(69),y=a(7),b="Error",A="DOMException",I=Object.setPrototypeOf||{}.__proto__,R=g(A),O=Error,M=O.isError,L=!M||!I||y(function(){return R&&!M(new R(A))||!M(new O(b,{cause:function(){}}))||M(g("Object","create")(O.prototype))});v({target:"Error",stat:!0,sham:!0,forced:L},{isError:function(N){if(!p(N))return!1;var F=x(N);return F===b||F===A}})}),(function(T,P,a){"use strict";var v=a(47),g=a(132),p=Error.prototype;p.toString!==g&&v(p,"toString",g)}),(function(T,P,a){"use strict";var v=a(6),g=a(7),p=a(46),x=a(125),y=Error.prototype.toString,b=g(function(){if(v){var A=Object.create(Object.defineProperty({},"name",{get:function(){return this===A}}));if(y.call(A)!=="true")return!0}return y.call({message:1,name:2})!=="2: 1"||y.call({})!=="Error"});T.exports=b?function(){var I=p(this),R=x(I.name,"Error"),O=x(I.message);return R?O?R+": "+O:R:O}:y}),(function(T,P,a){"use strict";a(134)}),(function(T,P,a){"use strict";var v=a(3),g=a(24),p=a(135),x=a(119),y=a(55),b=a(71),A=a(43),I=a(11),R=a(126),O=a(127),M=a(137),L=a(125),D=a(33),N=D("toStringTag"),F=Error,G=[].push,j=function(V,k){var Y=g(X,this),K;x?K=x(new F,Y?p(this):X):(K=Y?this:b(X),A(K,N,"Error")),k!==void 0&&A(K,"message",L(k)),O(K,j,K.stack,1),arguments.length>2&&R(K,arguments[2]);var J=[];return M(V,G,{that:J}),A(K,"errors",J),K};x?x(j,F):y(j,F,{name:!0});var X=j.prototype=b(F.prototype,{constructor:I(1,j),message:I(1,""),name:I(1,"AggregateError")});v({global:!0,constructor:!0,arity:2},{AggregateError:j})}),(function(T,P,a){"use strict";var v=a(38),g=a(21),p=a(39),x=a(53),y=a(136),b=x("IE_PROTO"),A=Object,I=A.prototype;T.exports=y?A.getPrototypeOf:function(R){var O=p(R);if(v(O,b))return O[b];var M=O.constructor;return g(M)&&O instanceof M?M.prototype:O instanceof A?I:null}}),(function(T,P,a){"use strict";var v=a(7);T.exports=!v(function(){function g(){}return g.prototype.constructor=null,Object.getPrototypeOf(new g)!==g.prototype})}),(function(T,P,a){"use strict";var v=a(84),g=a(8),p=a(46),x=a(31),y=a(138),b=a(63),A=a(24),I=a(140),R=a(141),O=a(142),M=TypeError,L=function(N,F){this.stopped=N,this.result=F},D=L.prototype;T.exports=function(N,F,G){var j=G&&G.that,X=!!(G&&G.AS_ENTRIES),U=!!(G&&G.IS_RECORD),V=!!(G&&G.IS_ITERATOR),k=!!(G&&G.INTERRUPTED),Y=v(F,j),K,J,Z,Q,at,et,rt,nt=function(pt){var yt=K;return K=void 0,yt&&O(yt,"normal"),new L(!0,pt)},ut=function(pt){return X?(p(pt),k?Y(pt[0],pt[1],nt):Y(pt[0],pt[1])):k?Y(pt,nt):Y(pt)};if(U)K=N.iterator;else if(V)K=N;else{if(J=R(N),!J)throw new M(x(N)+" is not iterable");if(y(J)){for(Z=0,Q=b(N);Q>Z;Z++)if(at=ut(N[Z]),at&&A(D,at))return at;return new L(!1)}K=I(N,J)}for(et=U?N.next:K.next;!(rt=g(et,K)).done;){var ht=rt.value;try{at=ut(ht)}catch(pt){if(K)O(K,"throw",pt);else throw pt}if(typeof at=="object"&&at&&A(D,at))return at}return new L(!1)}}),(function(T,P,a){"use strict";var v=a(33),g=a(139),p=v("iterator"),x=Array.prototype;T.exports=function(y){return y!==void 0&&(g.Array===y||x[p]===y)}}),(function(T){"use strict";T.exports=Object.create?Object.create(null):{}}),(function(T,P,a){"use strict";var v=a(8),g=a(21),p=a(46),x=a(31),y=a(141),b=TypeError;T.exports=function(A,I){var R=arguments.length<2?y(A):I;if(g(R))return p(v(R,A));throw new b(x(A)+" is not iterable")}}),(function(T,P,a){"use strict";var v=a(15),g=a(17),p=a(29),x=a(33),y=x("iterator"),b=Array.prototype;T.exports=function(A){if(!g(A))return p(A,y)||p(A,"@@iterator")||(v(A)==="Arguments"?b[y]:void 0)}}),(function(T,P,a){"use strict";var v=a(8),g=a(46),p=a(29);T.exports=function(x,y,b){var A,I;g(x);try{if(A=p(x,"return"),!A){if(y==="throw")throw b;return b}A=v(A,x)}catch(R){I=!0,A=R}if(y==="throw")throw b;if(I)throw A;return g(A),b}}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(117),x=a(7),y=a(118),b="AggregateError",A=g(b),I=!x(function(){return A([1]).errors[0]!==1})&&x(function(){return A([1],b,{cause:7}).cause!==7});v({global:!0,constructor:!0,arity:2,forced:I},{AggregateError:y(b,function(R){return function(M,L){return p(R,this,arguments)}},I,!0)})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(24),x=a(135),y=a(119),b=a(55),A=a(71),I=a(43),R=a(11),O=a(127),M=a(125),L=a(33),D=a(7),N=a(36),F=g.SuppressedError,G=L("toStringTag"),j=Error,X=!!F&&F.length!==3,U=!!F&&D(function(){return new F(1,2,3,{cause:4}).cause===4}),V=X||U,k=function(J,Z,Q){var at=p(Y,this),et;return y?et=V&&(!at||x(this)===Y)?new F:y(new j,at?x(this):Y):(et=at?this:A(Y),I(et,G,"Error")),Q!==void 0&&I(et,"message",M(Q)),O(et,k,et.stack,1),I(et,"error",J),I(et,"suppressed",Z),et};y?y(k,j):b(k,j,{name:!0});var Y=k.prototype=V?F.prototype:A(j.prototype,{constructor:R(1,k),message:R(1,""),name:R(1,"SuppressedError")});V&&!N&&(Y.constructor=k),v({global:!0,constructor:!0,arity:3,forced:V},{SuppressedError:k})}),(function(T,P,a){"use strict";var v=a(3),g=a(39),p=a(63),x=a(61),y=a(146);v({target:"Array",proto:!0},{at:function(A){var I=g(this),R=p(I),O=x(A),M=O>=0?O:R+O;return M<0||M>=R?void 0:I[M]}}),y("at")}),(function(T,P,a){"use strict";var v=a(33),g=a(71),p=a(44).f,x=v("unscopables"),y=Array.prototype;y[x]===void 0&&p(y,x,{configurable:!0,value:g(null)}),T.exports=function(b){y[x][b]=!0}}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(88),x=a(20),y=a(39),b=a(63),A=a(148),I=a(90),R=a(149),O=a(86),M=a(150),L=a(33),D=a(27),N=L("isConcatSpreadable"),F=D>=51||!g(function(){var X=[];return X[N]=!1,X.concat()[0]!==X}),G=function(X){if(!x(X))return!1;var U=X[N];return U!==void 0?!!U:p(X)},j=!F||!M("concat");v({target:"Array",proto:!0,arity:1,forced:j},{concat:function(U){var V=y(this),k=O(V,0),Y=0,K,J,Z,Q,at;for(K=-1,Z=arguments.length;K<Z;K++)if(at=K===-1?V:arguments[K],G(at))for(Q=b(at),A(Y+Q),J=0;J<Q;J++,Y++)J in at&&I(k,Y,at[J]);else A(Y+1),I(k,Y++,at);return R(k,Y),k}})}),(function(T){"use strict";var P=TypeError,a=9007199254740991;T.exports=function(v){if(v>a)throw new P("Maximum allowed index exceeded");return v}}),(function(T,P,a){"use strict";var v=a(6),g=a(88),p=TypeError,x=Object.getOwnPropertyDescriptor,y=v&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(b){return b instanceof TypeError}})();T.exports=y?function(b,A){if(g(b)&&!x(b,"length").writable)throw new p("Cannot set read only .length");return b.length=A}:function(b,A){return b.length=A}}),(function(T,P,a){"use strict";var v=a(7),g=a(33),p=a(27),x=g("species");T.exports=function(y){return p>=51||!v(function(){var b=[],A=b.constructor={};return A[x]=function(){return{foo:1}},b[y](Boolean).foo!==1})}}),(function(T,P,a){"use strict";var v=a(3),g=a(152),p=a(146);v({target:"Array",proto:!0},{copyWithin:g}),p("copyWithin")}),(function(T,P,a){"use strict";var v=a(39),g=a(60),p=a(63),x=a(153),y=Math.min;T.exports=[].copyWithin||function(A,I){var R=v(this),O=p(R),M=g(A,O),L=g(I,O),D=arguments.length>2?arguments[2]:void 0,N=y((D===void 0?O:g(D,O))-L,O-M),F=1;for(L<M&&M<L+N&&(F=-1,L+=N-1,M+=N-1);N-- >0;)L in R?R[M]=R[L]:x(R,M),M+=F,L+=F;return R}}),(function(T,P,a){"use strict";var v=a(31),g=TypeError;T.exports=function(p,x){if(!delete p[x])throw new g("Cannot delete property "+v(x)+" of "+v(p))}}),(function(T,P,a){"use strict";var v=a(3),g=a(83).every,p=a(155),x=p("every");v({target:"Array",proto:!0,forced:!x},{every:function(b){return g(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(7);T.exports=function(g,p){var x=[][g];return!!x&&v(function(){x.call(null,p||function(){return 1},1)})}}),(function(T,P,a){"use strict";var v=a(3),g=a(157),p=a(146);v({target:"Array",proto:!0},{fill:g}),p("fill")}),(function(T,P,a){"use strict";var v=a(39),g=a(60),p=a(63);T.exports=[].fill||function(y){for(var b=v(this),A=p(b),I=arguments.length,R=g(I>1?arguments[1]:void 0,A),O=I>2?arguments[2]:void 0,M=O===void 0?A:g(O,A);M>R;)b[R++]=y;return b}}),(function(T,P,a){"use strict";var v=a(3),g=a(83).filter,p=a(150),x=p("filter");v({target:"Array",proto:!0,forced:!x},{filter:function(b){return g(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(83).find,p=a(146),x="find",y=!0;x in[]&&Array(1)[x](function(){y=!1}),v({target:"Array",proto:!0,forced:y},{find:function(A){return g(this,A,arguments.length>1?arguments[1]:void 0)}}),p(x)}),(function(T,P,a){"use strict";var v=a(3),g=a(83).findIndex,p=a(146),x="findIndex",y=!0;x in[]&&Array(1)[x](function(){y=!1}),v({target:"Array",proto:!0,forced:y},{findIndex:function(A){return g(this,A,arguments.length>1?arguments[1]:void 0)}}),p(x)}),(function(T,P,a){"use strict";var v=a(3),g=a(162).findLast,p=a(146);v({target:"Array",proto:!0},{findLast:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}}),p("findLast")}),(function(T,P,a){"use strict";var v=a(84),g=a(13),p=a(39),x=a(63),y=function(b){var A=b===1;return function(I,R,O){for(var M=p(I),L=g(M),D=x(L),N=v(R,O),F,G;D-- >0;)if(F=L[D],G=N(F,D,M),G)switch(b){case 0:return F;case 1:return D}return A?-1:void 0}};T.exports={findLast:y(0),findLastIndex:y(1)}}),(function(T,P,a){"use strict";var v=a(3),g=a(162).findLastIndex,p=a(146);v({target:"Array",proto:!0},{findLastIndex:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}}),p("findLastIndex")}),(function(T,P,a){"use strict";var v=a(3),g=a(165),p=a(39),x=a(63),y=a(61),b=a(86);v({target:"Array",proto:!0},{flat:function(){var I=arguments.length?arguments[0]:void 0,R=p(this),O=x(R),M=I===void 0?1:y(I),L=b(R,0);return g(L,R,R,O,0,M),L}})}),(function(T,P,a){"use strict";var v=a(88),g=a(63),p=a(148),x=a(84),y=a(90),b=function(A,I,R,O,M,L,D,N){for(var F=M,G=0,j=D?x(D,N):!1,X,U;G<O;)G in R&&(X=j?j(R[G],G,I):R[G],L>0&&v(X)?(U=g(X),F=b(A,I,X,U,F,L-1)-1):(p(F+1),y(A,F,X)),F++),G++;return F};T.exports=b}),(function(T,P,a){"use strict";var v=a(3),g=a(165),p=a(30),x=a(39),y=a(63),b=a(86);v({target:"Array",proto:!0},{flatMap:function(I){var R=x(this),O=y(R),M;return p(I),M=b(R,0),g(M,R,R,O,0,1,I,arguments.length>1?arguments[1]:void 0),M}})}),(function(T,P,a){"use strict";var v=a(3),g=a(168);v({target:"Array",proto:!0,forced:[].forEach!==g},{forEach:g})}),(function(T,P,a){"use strict";var v=a(83).forEach,g=a(155),p=g("forEach");T.exports=p?[].forEach:function(y){return v(this,y,arguments.length>1?arguments[1]:void 0)}}),(function(T,P,a){"use strict";var v=a(3),g=a(170),p=a(172),x=!p(function(y){Array.from(y)});v({target:"Array",stat:!0,forced:x},{from:g})}),(function(T,P,a){"use strict";var v=a(84),g=a(8),p=a(39),x=a(171),y=a(138),b=a(89),A=a(63),I=a(90),R=a(149),O=a(140),M=a(141),L=a(142),D=a(148),N=Array;T.exports=function(G){var j=b(this),X=arguments.length,U=X>1?arguments[1]:void 0,V=U!==void 0;V&&(U=v(U,X>2?arguments[2]:void 0));var k=p(G),Y=M(k),K=0,J,Z,Q,at,et,rt;if(Y&&!(this===N&&y(Y)))for(Z=j?new this:[],at=O(k,Y),et=at.next;!(Q=g(et,at)).done;K++){try{D(K)}catch(nt){L(at,"throw",nt)}rt=V?x(at,U,[Q.value,K],!0):Q.value;try{I(Z,K,rt)}catch(nt){L(at,"throw",nt)}}else for(J=A(k),Z=j?new this(J):N(J);J>K;K++)rt=V?U(k[K],K):k[K],I(Z,K,rt);return R(Z,K),Z}}),(function(T,P,a){"use strict";var v=a(46),g=a(142);T.exports=function(p,x,y,b){try{return b?x(v(y)[0],y[1]):x(y)}catch(A){g(p,"throw",A)}}}),(function(T,P,a){"use strict";var v=a(33),g=v("iterator"),p=!1;try{var x=0,y={next:function(){return{done:!!x++}},return:function(){p=!0}};y[g]=function(){return this},Array.from(y,function(){throw 2})}catch(b){}T.exports=function(b,A){try{if(!A&&!p)return!1}catch(O){return!1}var I=!1;try{var R={};R[g]=function(){return{next:function(){return{done:I=!0}}}},b(R)}catch(O){}return I}}),(function(T,P,a){"use strict";var v=a(3),g=a(59).includes,p=a(7),x=a(146),y=p(function(){return!Array(1).includes()}),b=p(function(){return[,1].includes(void 0,1)});v({target:"Array",proto:!0,forced:y||b},{includes:function(I){return g(this,I,arguments.length>1?arguments[1]:void 0)}}),x("includes")}),(function(T,P,a){"use strict";var v=a(3),g=a(85),p=a(59).indexOf,x=a(155),y=g([].indexOf),b=!!y&&1/y([1],1,-0)<0,A=b||!x("indexOf");v({target:"Array",proto:!0,forced:A},{indexOf:function(R){var O=arguments.length>1?arguments[1]:void 0;return b?y(this,R,O)||0:p(this,R,O)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(88);v({target:"Array",stat:!0},{isArray:g})}),(function(T,P,a){"use strict";var v=a(12),g=a(146),p=a(139),x=a(51),y=a(44).f,b=a(177),A=a(180),I=a(36),R=a(6),O="Array Iterator",M=x.set,L=x.getterFor(O);T.exports=b(Array,"Array",function(N,F){M(this,{type:O,target:v(N),index:0,kind:F})},function(){var N=L(this),F=N.target,G=N.index++;if(!F||G>=F.length)return N.target=null,A(void 0,!0);switch(N.kind){case"keys":return A(G,!1);case"values":return A(F[G],!1)}return A([G,F[G]],!1)},"values");var D=p.Arguments=p.Array;if(g("keys"),g("values"),g("entries"),!I&&R&&D.name!=="values")try{y(D,"name",{value:"values"})}catch(N){}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(36),x=a(49),y=a(21),b=a(178),A=a(135),I=a(119),R=a(82),O=a(43),M=a(47),L=a(33),D=a(139),N=a(179),F=x.PROPER,G=x.CONFIGURABLE,j=N.IteratorPrototype,X=N.BUGGY_SAFARI_ITERATORS,U=L("iterator"),V="keys",k="values",Y="entries",K=function(){return this};T.exports=function(J,Z,Q,at,et,rt,nt){b(Q,Z,at);var ut=function(It){if(It===et&&Et)return Et;if(!X&&It&&It in yt)return yt[It];switch(It){case V:return function(){return new Q(this,It)};case k:return function(){return new Q(this,It)};case Y:return function(){return new Q(this,It)}}return function(){return new Q(this)}},ht=Z+" Iterator",pt=!1,yt=J.prototype,At=yt[U]||yt["@@iterator"]||et&&yt[et],Et=!X&&At||ut(et),Ht=Z==="Array"&&yt.entries||At,Ut,kt,Ct;if(Ht&&(Ut=A(Ht.call(new J)),Ut!==Object.prototype&&Ut.next&&(!p&&A(Ut)!==j&&(I?I(Ut,j):y(Ut[U])||M(Ut,U,K)),R(Ut,ht,!0,!0),p&&(D[ht]=K))),F&&et===k&&At&&At.name!==k&&(!p&&G?O(yt,"name",k):(pt=!0,Et=function(){return g(At,this)})),et)if(kt={values:ut(k),keys:rt?Et:ut(V),entries:ut(Y)},nt)for(Ct in kt)(X||pt||!(Ct in yt))&&M(yt,Ct,kt[Ct]);else v({target:Z,proto:!0,forced:X||pt},kt);return(!p||nt)&&yt[U]!==Et&&M(yt,U,Et,{name:et}),D[Z]=Et,kt}}),(function(T,P,a){"use strict";var v=a(179).IteratorPrototype,g=a(71),p=a(11),x=a(82),y=a(139),b=function(){return this};T.exports=function(A,I,R,O){var M=I+" Iterator";return A.prototype=g(v,{next:p(+!O,R)}),x(A,M,!1,!0),y[M]=b,A}}),(function(T,P,a){"use strict";var v=a(7),g=a(21),p=a(20),x=a(71),y=a(135),b=a(47),A=a(33),I=a(36),R=A("iterator"),O=!1,M,L,D;[].keys&&(D=[].keys(),"next"in D?(L=y(y(D)),L!==Object.prototype&&(M=L)):O=!0);var N=!p(M)||v(function(){var F={};return M[R].call(F)!==F});N?M={}:I&&(M=x(M)),g(M[R])||b(M,R,function(){return this}),T.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:O}}),(function(T){"use strict";T.exports=function(P,a){return{value:P,done:a}}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(13),x=a(12),y=a(155),b=g([].join),A=p!==Object,I=A||!y("join",",");v({target:"Array",proto:!0,forced:I},{join:function(O){return b(x(this),O===void 0?",":O)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(183);v({target:"Array",proto:!0,forced:g!==[].lastIndexOf},{lastIndexOf:g})}),(function(T,P,a){"use strict";var v=a(117),g=a(12),p=a(61),x=a(63),y=a(155),b=Math.min,A=[].lastIndexOf,I=!!A&&1/[1].lastIndexOf(1,-0)<0,R=y("lastIndexOf"),O=I||!R;T.exports=O?function(L){if(I)return v(A,this,arguments)||0;var D=g(this),N=x(D);if(N===0)return-1;var F=N-1;for(arguments.length>1&&(F=b(F,p(arguments[1]))),F<0&&(F=N+F);F>=0;F--)if(F in D&&D[F]===L)return F||0;return-1}:A}),(function(T,P,a){"use strict";var v=a(3),g=a(83).map,p=a(150),x=p("map");v({target:"Array",proto:!0,forced:!x},{map:function(b){return g(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(89),x=a(90),y=a(149),b=Array,A=g(function(){function I(){}return!(b.of.call(I)instanceof I)});v({target:"Array",stat:!0,forced:A},{of:function(){for(var R=0,O=arguments.length,M=new(p(this)?this:b)(O);O>R;)x(M,R,arguments[R++]);return y(M,O),M}})}),(function(T,P,a){"use strict";var v=a(3),g=a(39),p=a(63),x=a(149),y=a(148),b=a(7),A=b(function(){return[].push.call({length:4294967296},1)!==4294967297}),I=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(O){return O instanceof TypeError}},R=A||!I();v({target:"Array",proto:!0,arity:1,forced:R},{push:function(M){var L=g(this),D=p(L),N=arguments.length;y(D+N);for(var F=0;F<N;F++)L[D]=arguments[F],D++;return x(L,D),D}})}),(function(T,P,a){"use strict";var v=a(3),g=a(188).left,p=a(155),x=a(27),y=a(189),b=!y&&x>79&&x<83,A=b||!p("reduce");v({target:"Array",proto:!0,forced:A},{reduce:function(R){var O=arguments.length;return g(this,R,O,O>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(30),g=a(39),p=a(13),x=a(63),y=TypeError,b="Reduce of empty array with no initial value",A=function(I){return function(R,O,M,L){var D=g(R),N=p(D),F=x(D);if(v(O),F===0&&M<2)throw new y(b);var G=I?F-1:0,j=I?-1:1;if(M<2)for(;;){if(G in N){L=N[G],G+=j;break}if(G+=j,I?G<0:F<=G)throw new y(b)}for(;I?G>=0:F>G;G+=j)G in N&&(L=O(L,N[G],G,D));return L}};T.exports={left:A(!1),right:A(!0)}}),(function(T,P,a){"use strict";var v=a(190);T.exports=v==="NODE"}),(function(T,P,a){"use strict";var v=a(4),g=a(28),p=a(15),x=function(y){return g.slice(0,y.length)===y};T.exports=(function(){return x("Bun/")?"BUN":x("Cloudflare-Workers")?"CLOUDFLARE":x("Deno/")?"DENO":x("Node.js/")?"NODE":v.Bun&&typeof Bun.version=="string"?"BUN":v.Deno&&typeof Deno.version=="object"?"DENO":p(v.process)==="process"?"NODE":v.window&&v.document?"BROWSER":"REST"})()}),(function(T,P,a){"use strict";var v=a(3),g=a(188).right,p=a(155),x=a(27),y=a(189),b=!y&&x>79&&x<83,A=b||!p("reduceRight");v({target:"Array",proto:!0,forced:A},{reduceRight:function(R){return g(this,R,arguments.length,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(88),x=g([].reverse),y=[1,2];v({target:"Array",proto:!0,forced:String(y)===String(y.reverse())},{reverse:function(){return p(this)&&(this.length=this.length),x(this)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(88),p=a(89),x=a(20),y=a(60),b=a(63),A=a(12),I=a(90),R=a(149),O=a(33),M=a(150),L=a(76),D=M("slice"),N=O("species"),F=Array,G=Math.max;v({target:"Array",proto:!0,forced:!D},{slice:function(X,U){var V=A(this),k=b(V),Y=y(X,k),K=y(U===void 0?k:U,k),J,Z,Q;if(g(V)&&(J=V.constructor,p(J)&&(J===F||g(J.prototype))?J=void 0:x(J)&&(J=J[N],J===null&&(J=void 0)),J===F||J===void 0))return L(V,Y,K);for(Z=new(J===void 0?F:J)(G(K-Y,0)),Q=0;Y<K;Y++,Q++)Y in V&&I(Z,Q,V[Y]);return R(Z,Q),Z}})}),(function(T,P,a){"use strict";var v=a(3),g=a(83).some,p=a(155),x=p("some");v({target:"Array",proto:!0,forced:!x},{some:function(b){return g(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(30),x=a(39),y=a(63),b=a(153),A=a(68),I=a(7),R=a(196),O=a(155),M=a(197),L=a(198),D=a(27),N=a(199),F=[],G=g(F.sort),j=g(F.push),X=I(function(){F.sort(void 0)}),U=I(function(){F.sort(null)}),V=O("sort"),k=!I(function(){if(D)return D<70;if(!(M&&M>3)){if(L)return!0;if(N)return N<603;var J="",Z,Q,at,et;for(Z=65;Z<76;Z++){switch(Q=String.fromCharCode(Z),Z){case 66:case 69:case 70:case 72:at=3;break;case 68:case 71:at=4;break;default:at=2}for(et=0;et<47;et++)F.push({k:Q+et,v:at})}for(F.sort(function(rt,nt){return nt.v-rt.v}),et=0;et<F.length;et++)Q=F[et].k.charAt(0),J.charAt(J.length-1)!==Q&&(J+=Q);return J!=="DGBEFHACIJK"}}),Y=X||!U||!V||!k,K=function(J){return function(Z,Q){if(Q===void 0)return-1;if(Z===void 0)return 1;if(J!==void 0)return+J(Z,Q)||0;var at=A(Z),et=A(Q);return at===et?0:at>et?1:-1}};v({target:"Array",proto:!0,forced:Y},{sort:function(Z){Z!==void 0&&p(Z);var Q=x(this);if(k)return Z===void 0?G(Q):G(Q,Z);var at=[],et=y(Q),rt,nt;for(nt=0;nt<et;nt++)nt in Q&&j(at,Q[nt]);for(R(at,K(Z)),rt=y(at),nt=0;nt<rt;)Q[nt]=at[nt++];for(;nt<et;)b(Q,nt++);return Q}})}),(function(T,P,a){"use strict";var v=a(76),g=Math.floor,p=function(x,y){var b=x.length;if(b<8)for(var A=1,I,R;A<b;){for(R=A,I=x[A];R&&y(x[R-1],I)>0;)x[R]=x[--R];R!==A++&&(x[R]=I)}else for(var O=g(b/2),M=p(v(x,0,O),y),L=p(v(x,O),y),D=M.length,N=L.length,F=0,G=0;F<D||G<N;)x[F+G]=F<D&&G<N?y(M[F],L[G])<=0?M[F++]:L[G++]:F<D?M[F++]:L[G++];return x};T.exports=p}),(function(T,P,a){"use strict";var v=a(28),g=v.match(/firefox\/(\d+)/i);T.exports=!!g&&+g[1]}),(function(T,P,a){"use strict";var v=a(28);T.exports=/MSIE|Trident/.test(v)}),(function(T,P,a){"use strict";var v=a(28),g=v.match(/AppleWebKit\/(\d+)\./);T.exports=!!g&&+g[1]}),(function(T,P,a){"use strict";var v=a(201);v("Array")}),(function(T,P,a){"use strict";var v=a(23),g=a(77),p=a(33),x=a(6),y=p("species");T.exports=function(b){var A=v(b);x&&A&&!A[y]&&g(A,y,{configurable:!0,get:function(){return this}})}}),(function(T,P,a){"use strict";var v=a(3),g=a(39),p=a(60),x=a(61),y=a(63),b=a(149),A=a(148),I=a(86),R=a(90),O=a(153),M=a(150),L=M("splice"),D=Math.max,N=Math.min;v({target:"Array",proto:!0,forced:!L},{splice:function(G,j){var X=g(this),U=y(X),V=p(G,U),k=arguments.length,Y,K,J,Z,Q,at;for(k===0?Y=K=0:k===1?(Y=0,K=U-V):(Y=k-2,K=N(D(x(j),0),U-V)),A(U+Y-K),J=I(X,K),Z=0;Z<K;Z++)Q=V+Z,Q in X&&R(J,Z,X[Q]);if(b(J,K),Y<K){for(Z=V;Z<U-K;Z++)Q=Z+K,at=Z+Y,Q in X?X[at]=X[Q]:O(X,at);for(Z=U;Z>U-K+Y;Z--)O(X,Z-1)}else if(Y>K)for(Z=U-K;Z>V;Z--)Q=Z+K-1,at=Z+Y-1,Q in X?X[at]=X[Q]:O(X,at);for(Z=0;Z<Y;Z++)X[Z+V]=arguments[Z+2];return b(X,U-K+Y),J}})}),(function(T,P,a){"use strict";var v=a(3),g=a(63),p=a(12),x=a(90),y=a(146),b=Array;v({target:"Array",proto:!0},{toReversed:function(){for(var I=p(this),R=g(I),O=new b(R),M=0;M<R;M++)x(O,M,I[R-M-1]);return O}}),y("toReversed")}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(30),x=a(12),y=a(205),b=a(206),A=a(146),I=Array,R=g(b("Array","sort"));v({target:"Array",proto:!0},{toSorted:function(M){M!==void 0&&p(M);var L=x(this),D=y(I,L);return R(D,M)}}),A("toSorted")}),(function(T,P,a){"use strict";var v=a(63);T.exports=function(g,p,x){for(var y=0,b=arguments.length>2?x:v(p),A=new g(b);b>y;)A[y]=p[y++];return A}}),(function(T,P,a){"use strict";var v=a(4);T.exports=function(g,p){var x=v[g],y=x&&x.prototype;return y&&y[p]}}),(function(T,P,a){"use strict";var v=a(3),g=a(146),p=a(148),x=a(63),y=a(60),b=a(12),A=a(61),I=a(90),R=Array,O=Math.max,M=Math.min;v({target:"Array",proto:!0},{toSpliced:function(D,N){var F=b(this),G=x(F),j=y(D,G),X=arguments.length,U=0,V,k,Y,K;for(X===0?V=k=0:X===1?(V=0,k=G-j):(V=X-2,k=M(O(A(N),0),G-j)),Y=p(G+V-k),K=R(Y);U<j;U++)I(K,U,F[U]);for(;U<j+V;U++)I(K,U,arguments[U-j+2]);for(;U<Y;U++)I(K,U,F[U+k-V]);return K}}),g("toSpliced")}),(function(T,P,a){"use strict";var v=a(146);v("flat")}),(function(T,P,a){"use strict";var v=a(146);v("flatMap")}),(function(T,P,a){"use strict";var v=a(3),g=a(39),p=a(63),x=a(149),y=a(153),b=a(148),A=[].unshift(0)!==1,I=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(O){return O instanceof TypeError}},R=A||!I();v({target:"Array",proto:!0,arity:1,forced:R},{unshift:function(M){var L=g(this),D=p(L),N=arguments.length;if(N){b(D+N);for(var F=D;F--;){var G=F+N;F in L?L[G]=L[F]:y(L,G)}for(var j=0;j<N;j++)L[j]=arguments[j]}return x(L,D+N)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(63),p=a(61),x=a(12),y=a(90),b=Array,A=RangeError,I=(function(){try{[].with({valueOf:function(){throw 4}},null)}catch(R){return R!==4}})();v({target:"Array",proto:!0,forced:I},{with:function(R,O){var M=x(this),L=g(M),D=p(R),N=D<0?L+D:D;if(N>=L||N<0)throw new A("Incorrect index");for(var F=new b(L),G=0;G<L;G++)y(F,G,G===N?O:M[G]);return F}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(213),x=a(201),y="ArrayBuffer",b=p[y],A=g[y];v({global:!0,constructor:!0,forced:A!==b},{ArrayBuffer:b}),x(y)}),(function(T,P,a){"use strict";var v=a(4),g=a(14),p=a(6),x=a(214),y=a(49),b=a(43),A=a(77),I=a(215),R=a(7),O=a(216),M=a(61),L=a(217),D=a(218),N=a(222),F=a(135),G=a(119),j=a(157),X=a(76),U=a(124),V=a(55),k=a(82),Y=a(51),K=y.PROPER,J=y.CONFIGURABLE,Z="ArrayBuffer",Q="DataView",at="prototype",et="Wrong length",rt="Wrong index",nt=Y.getterFor(Z),ut=Y.getterFor(Q),ht=Y.set,pt=v[Z],yt=pt,At=yt&&yt[at],Et=v[Q],Ht=Et&&Et[at],Ut=Object.prototype,kt=v.Array,Ct=v.RangeError,It=g(j),Dt=g([].reverse),Vt=N.pack,_t=N.unpack,Nt=function(Pt){return[Pt&255]},Jt=function(Pt){return[Pt&255,Pt>>8&255]},ne=function(Pt){return[Pt&255,Pt>>8&255,Pt>>16&255,Pt>>24&255]},ve=function(Pt){return Pt[3]<<24|Pt[2]<<16|Pt[1]<<8|Pt[0]},le=function(Pt){return Vt(D(Pt),23,4)},fe=function(Pt){return Vt(Pt,52,8)},Ce=function(Pt,zt,jt){A(Pt[at],zt,{configurable:!0,get:function(){return jt(this)[zt]}})},Be=function(Pt,zt,jt,we){var $t=ut(Pt),Xt=L(jt),re=!!we;if(Xt+zt>$t.byteLength)throw new Ct(rt);var oe=$t.bytes,pe=Xt+$t.byteOffset,rn=X(oe,pe,pe+zt);return re?rn:Dt(rn)},Ie=function(Pt,zt,jt,we,$t,Xt){var re=ut(Pt),oe=L(jt),pe=we(+$t),rn=!!Xt;if(oe+zt>re.byteLength)throw new Ct(rt);for(var vt=re.bytes,Rt=oe+re.byteOffset,Tt=0;Tt<zt;Tt++)vt[Rt+Tt]=pe[rn?Tt:zt-Tt-1]};if(!x)yt=function(zt){O(this,At);var jt=L(zt);ht(this,{type:Z,bytes:It(kt(jt),0),byteLength:jt}),p||(this.byteLength=jt,this.detached=!1)},At=yt[at],Et=function(zt,jt,we){O(this,Ht),O(zt,At);var $t=nt(zt),Xt=$t.byteLength,re=M(jt);if(re<0||re>Xt)throw new Ct("Wrong offset");if(we=we===void 0?Xt-re:L(we),re+we>Xt)throw new Ct(et);ht(this,{type:Q,buffer:zt,byteLength:we,byteOffset:re,bytes:$t.bytes}),p||(this.buffer=zt,this.byteLength=we,this.byteOffset=re)},Ht=Et[at],p&&(Ce(yt,"byteLength",nt),Ce(Et,"buffer",ut),Ce(Et,"byteLength",ut),Ce(Et,"byteOffset",ut)),I(Ht,{getInt8:function(zt){return Be(this,1,zt)[0]<<24>>24},getUint8:function(zt){return Be(this,1,zt)[0]},getInt16:function(zt){var jt=Be(this,2,zt,arguments.length>1?arguments[1]:!1);return(jt[1]<<8|jt[0])<<16>>16},getUint16:function(zt){var jt=Be(this,2,zt,arguments.length>1?arguments[1]:!1);return jt[1]<<8|jt[0]},getInt32:function(zt){return ve(Be(this,4,zt,arguments.length>1?arguments[1]:!1))},getUint32:function(zt){return ve(Be(this,4,zt,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function(zt){return _t(Be(this,4,zt,arguments.length>1?arguments[1]:!1),23)},getFloat64:function(zt){return _t(Be(this,8,zt,arguments.length>1?arguments[1]:!1),52)},setInt8:function(zt,jt){Ie(this,1,zt,Nt,jt)},setUint8:function(zt,jt){Ie(this,1,zt,Nt,jt)},setInt16:function(zt,jt){Ie(this,2,zt,Jt,jt,arguments.length>2?arguments[2]:!1)},setUint16:function(zt,jt){Ie(this,2,zt,Jt,jt,arguments.length>2?arguments[2]:!1)},setInt32:function(zt,jt){Ie(this,4,zt,ne,jt,arguments.length>2?arguments[2]:!1)},setUint32:function(zt,jt){Ie(this,4,zt,ne,jt,arguments.length>2?arguments[2]:!1)},setFloat32:function(zt,jt){Ie(this,4,zt,le,jt,arguments.length>2?arguments[2]:!1)},setFloat64:function(zt,jt){Ie(this,8,zt,fe,jt,arguments.length>2?arguments[2]:!1)}});else{var ce=K&&pt.name!==Z;!R(function(){pt(1)})||!R(function(){new pt(-1)})||R(function(){return new pt,new pt(1.5),new pt(NaN),pt.length!==1||ce&&!J})?(yt=function(zt){return O(this,At),U(new pt(L(zt)),this,yt)},yt[at]=At,At.constructor=yt,V(yt,pt)):ce&&J&&b(pt,"name",Z),G&&F(Ht)!==Ut&&G(Ht,Ut);var xe=new Et(new yt(2)),Ue=g(Ht.setInt8);xe.setInt8(0,2147483648),xe.setInt8(1,2147483649),(xe.getInt8(0)||!xe.getInt8(1))&&I(Ht,{setInt8:function(zt,jt){Ue(this,zt,jt<<24>>24)},setUint8:function(zt,jt){Ue(this,zt,jt<<24>>24)}},{unsafe:!0})}k(yt,Z),k(Et,Q),T.exports={ArrayBuffer:yt,DataView:Et}}),(function(T){"use strict";T.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"}),(function(T,P,a){"use strict";var v=a(47);T.exports=function(g,p,x){for(var y in p)v(g,y,p[y],x);return g}}),(function(T,P,a){"use strict";var v=a(24),g=TypeError;T.exports=function(p,x){if(v(x,p))return p;throw new g("Incorrect invocation")}}),(function(T,P,a){"use strict";var v=a(61),g=a(64),p=RangeError;T.exports=function(x){if(x===void 0)return 0;var y=v(x),b=g(y);if(y!==b)throw new p("Wrong length or index");return b}}),(function(T,P,a){"use strict";var v=a(219),g=11920928955078125e-23,p=34028234663852886e22,x=11754943508222875e-54;T.exports=Math.fround||function(b){return v(b,g,p,x)}}),(function(T,P,a){"use strict";var v=a(220),g=a(221),p=Math.abs,x=2220446049250313e-31;T.exports=function(y,b,A,I){var R=+y,O=p(R),M=v(R);if(O<I)return M*g(O/I/b)*I*b;var L=(1+b/x)*O,D=L-(L-O);return D>A||D!==D?M*(1/0):M*D}}),(function(T){"use strict";T.exports=Math.sign||function(a){var v=+a;return v===0||v!==v?v:v<0?-1:1}}),(function(T){"use strict";var P=2220446049250313e-31,a=1/P;T.exports=function(v){return v+a-a}}),(function(T){"use strict";var P=Array,a=Math.abs,v=Math.pow,g=Math.floor,p=Math.log,x=Math.LN2,y=function(A,I,R){var O=P(R),M=R*8-I-1,L=(1<<M)-1,D=L>>1,N=I===23?v(2,-24)-v(2,-77):0,F=A<0||A===0&&1/A<0?1:0,G=0,j,X,U;for(A=a(A),A!==A||A===1/0?(X=A!==A?1:0,j=L):(j=g(p(A)/x),U=v(2,-j),A*U<1&&(j--,U*=2),j+D>=1?A+=N/U:A+=N*v(2,1-D),A*U>=2&&(j++,U/=2),j+D>=L?(X=0,j=L):j+D>=1?(X=(A*U-1)*v(2,I),j+=D):(X=A*v(2,D-1)*v(2,I),j=0));I>=8;)O[G++]=X&255,X/=256,I-=8;for(j=j<<I|X,M+=I;M>0;)O[G++]=j&255,j/=256,M-=8;return O[G-1]|=F*128,O},b=function(A,I){var R=A.length,O=R*8-I-1,M=(1<<O)-1,L=M>>1,D=O-7,N=R-1,F=A[N--],G=F&127,j;for(F>>=7;D>0;)G=G*256+A[N--],D-=8;for(j=G&(1<<-D)-1,G>>=-D,D+=I;D>0;)j=j*256+A[N--],D-=8;if(G===0)G=1-L;else{if(G===M)return j?NaN:F?-1/0:1/0;j+=v(2,I),G-=L}return(F?-1:1)*j*v(2,G-I)};T.exports={pack:y,unpack:b}}),(function(T,P,a){"use strict";var v=a(3),g=a(224),p=g.NATIVE_ARRAY_BUFFER_VIEWS;v({target:"ArrayBuffer",stat:!0,forced:!p},{isView:g.isView})}),(function(T,P,a){"use strict";var v=a(214),g=a(6),p=a(4),x=a(21),y=a(20),b=a(38),A=a(69),I=a(31),R=a(43),O=a(47),M=a(77),L=a(24),D=a(135),N=a(119),F=a(33),G=a(40),j=a(51),X=j.enforce,U=j.get,V=p.Int8Array,k=V&&V.prototype,Y=p.Uint8ClampedArray,K=Y&&Y.prototype,J=V&&D(V),Z=k&&D(k),Q=Object.prototype,at=p.TypeError,et=F("toStringTag"),rt=G("TYPED_ARRAY_TAG"),nt="TypedArrayConstructor",ut=v&&!!N&&A(p.opera)!=="Opera",ht=!1,pt,yt,At,Et={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Ht={BigInt64Array:8,BigUint64Array:8},Ut=function(Jt){if(!y(Jt))return!1;var ne=A(Jt);return ne==="DataView"||b(Et,ne)||b(Ht,ne)},kt=function(Nt){var Jt=D(Nt);if(y(Jt)){var ne=U(Jt);return ne&&b(ne,nt)?ne[nt]:kt(Jt)}},Ct=function(Nt){if(!y(Nt))return!1;var Jt=A(Nt);return b(Et,Jt)||b(Ht,Jt)},It=function(Nt){if(Ct(Nt))return Nt;throw new at("Target is not a typed array")},Dt=function(Nt){if(x(Nt)&&(!N||L(J,Nt)))return Nt;throw new at(I(Nt)+" is not a typed array constructor")},Vt=function(Nt,Jt,ne,ve){if(g){if(ne)for(var le in Et){var fe=p[le];if(fe&&b(fe.prototype,Nt))try{delete fe.prototype[Nt]}catch(Ce){try{fe.prototype[Nt]=Jt}catch(Be){}}}(!Z[Nt]||ne)&&O(Z,Nt,ne?Jt:ut&&k[Nt]||Jt,ve)}},_t=function(Nt,Jt,ne){var ve,le;if(g){if(N){if(ne){for(ve in Et)if(le=p[ve],le&&b(le,Nt))try{delete le[Nt]}catch(fe){}}if(!J[Nt]||ne)try{return O(J,Nt,ne?Jt:ut&&J[Nt]||Jt)}catch(fe){}else return}for(ve in Et)le=p[ve],le&&(!le[Nt]||ne)&&O(le,Nt,Jt)}};for(pt in Et)yt=p[pt],At=yt&&yt.prototype,At?X(At)[nt]=yt:ut=!1;for(pt in Ht)yt=p[pt],At=yt&&yt.prototype,At&&(X(At)[nt]=yt);if((!ut||!x(J)||J===Function.prototype)&&(J=function(){throw new at("Incorrect invocation")},ut))for(pt in Et)p[pt]&&N(p[pt],J);if((!ut||!Z||Z===Q)&&(Z=J.prototype,ut))for(pt in Et)p[pt]&&N(p[pt].prototype,Z);if(ut&&D(K)!==Z&&N(K,Z),g&&!b(Z,et)){ht=!0,M(Z,et,{configurable:!0,get:function(){return y(this)?this[rt]:void 0}});for(pt in Et)p[pt]&&R(p[pt].prototype,rt,pt)}T.exports={NATIVE_ARRAY_BUFFER_VIEWS:ut,TYPED_ARRAY_TAG:ht&&rt,aTypedArray:It,aTypedArrayConstructor:Dt,exportTypedArrayMethod:Vt,exportTypedArrayStaticMethod:_t,getTypedArrayConstructor:kt,isView:Ut,isTypedArray:Ct,TypedArray:J,TypedArrayPrototype:Z}}),(function(T,P,a){"use strict";var v=a(3),g=a(85),p=a(7),x=a(213),y=a(46),b=a(60),A=a(64),I=x.ArrayBuffer,R=x.DataView,O=R.prototype,M=g(I.prototype.slice),L=g(O.getUint8),D=g(O.setUint8),N=p(function(){return!new I(2).slice(1,void 0).byteLength});v({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:N},{slice:function(G,j){if(M&&j===void 0)return M(y(this),G);for(var X=y(this).byteLength,U=b(G,X),V=b(j===void 0?X:j,X),k=new I(A(V-U)),Y=new R(this),K=new R(k),J=0;U<V;)D(K,J++,L(Y,U++));return k}})}),(function(T,P,a){"use strict";a(227)}),(function(T,P,a){"use strict";var v=a(3),g=a(213),p=a(214);v({global:!0,constructor:!0,forced:!p},{DataView:g.DataView})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=Math.pow,x=31,y=1023,b=p(2,-24),A=.0009765625,I=function(O){var M=O>>>15,L=O>>>10&x,D=O&y;return L===x?D===0?M===0?1/0:-1/0:NaN:L===0?D*(M===0?b:-b):p(2,L-15)*(M===0?1+D*A:-1-D*A)},R=g(DataView.prototype.getUint16);v({target:"DataView",proto:!0},{getFloat16:function(M){return I(R(this,M,arguments.length>1?arguments[1]:!1))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(230),x=a(217),y=a(231),b=a(221),A=Math.floor,I=Math.pow,R=65520,O=61005353927612305e-21,M=16777216,L=1024,D=function(F){if(F!==F)return 32256;if(F===0)return(1/F===-1/0)<<15;var G=F<0;if(G&&(F=-F),F>=R)return G<<15|31744;if(F<O)return G<<15|b(F*M);var j=A(y(F));if(j===-15)return G<<15|L;var X=b((F*I(2,-j)-1)*L);return X===L?G<<15|j+16<<10:G<<15|j+15<<10|X},N=g(DataView.prototype.setUint16);v({target:"DataView",proto:!0},{setFloat16:function(G,j){N(p(this),x(G),D(+j),arguments.length>2?arguments[2]:!1)}})}),(function(T,P,a){"use strict";var v=a(69),g=TypeError;T.exports=function(p){if(v(p)==="DataView")return p;throw new g("Argument is not a DataView")}}),(function(T){"use strict";var P=Math.log,a=Math.LN2;T.exports=Math.log2||function(g){return P(g)/a}}),(function(T,P,a){"use strict";var v=a(6),g=a(77),p=a(233),x=ArrayBuffer.prototype;v&&!("detached"in x)&&g(x,"detached",{configurable:!0,get:function(){return p(this)}})}),(function(T,P,a){"use strict";var v=a(4),g=a(214),p=a(234),x=v.DataView;T.exports=function(y){if(!g||p(y)!==0)return!1;try{return new x(y),!1}catch(b){return!0}}}),(function(T,P,a){"use strict";var v=a(4),g=a(120),p=a(15),x=v.ArrayBuffer,y=v.TypeError;T.exports=x&&g(x.prototype,"byteLength","get")||function(b){if(p(b)!=="ArrayBuffer")throw new y("ArrayBuffer expected");return b.byteLength}}),(function(T,P,a){"use strict";var v=a(3),g=a(236);g&&v({target:"ArrayBuffer",proto:!0},{transfer:function(){return g(this,arguments.length?arguments[0]:void 0,!0)}})}),(function(T,P,a){"use strict";var v=a(4),g=a(14),p=a(120),x=a(217),y=a(237),b=a(234),A=a(238),I=a(240),R=v.structuredClone,O=v.ArrayBuffer,M=v.DataView,L=Math.max,D=Math.min,N=O.prototype,F=M.prototype,G=g(N.slice),j=p(N,"resizable","get"),X=p(N,"maxByteLength","get"),U=g(F.getInt8),V=g(F.setInt8);T.exports=(I||A)&&function(k,Y,K){var J=b(k),Z=Y===void 0?J:x(Y),Q=!j||!j(k),at;if(y(k),I&&(k=R(k,{transfer:[k]}),J===Z&&(K||Q)))return k;if(J>=Z&&(!K||Q))at=G(k,0,Z);else{var et=K&&!Q&&X?{maxByteLength:L(Z,X(k))}:void 0;at=new O(Z,et);for(var rt=new M(k),nt=new M(at),ut=D(Z,J),ht=0;ht<ut;ht++)V(nt,ht,U(rt,ht))}return I||A(k),at}}),(function(T,P,a){"use strict";var v=a(233),g=TypeError;T.exports=function(p){if(v(p))throw new g("ArrayBuffer is detached");return p}}),(function(T,P,a){"use strict";var v=a(4),g=a(239),p=a(240),x=v.structuredClone,y=v.ArrayBuffer,b=v.MessageChannel,A=!1,I,R,O,M;if(p)A=function(L){x(L,{transfer:[L]})};else if(y)try{b||(I=g("worker_threads"),I&&(b=I.MessageChannel)),b&&(R=new b,O=new y(2),M=function(L){R.port1.postMessage(null,[L])},O.byteLength===2&&(M(O),O.byteLength===0&&(A=M)))}catch(L){}T.exports=A}),(function(T,P,a){"use strict";var v=a(4),g=a(189);T.exports=function(p){if(g){try{return v.process.getBuiltinModule(p)}catch(x){}try{return Function('return require("'+p+'")')()}catch(x){}}}}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=a(27),x=a(190),y=v.structuredClone;T.exports=!!y&&!g(function(){if(x==="DENO"&&p>92||x==="NODE"&&p>94||x==="BROWSER"&&p>97)return!1;var b=new ArrayBuffer(8),A=y(b,{transfer:[b]});return b.byteLength!==0||A.byteLength!==8})}),(function(T,P,a){"use strict";var v=a(3),g=a(236);g&&v({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return g(this,arguments.length?arguments[0]:void 0,!1)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(7),x=p(function(){return new Date(16e11).getYear()!==120}),y=g(Date.prototype.getFullYear);v({target:"Date",proto:!0,forced:x},{getYear:function(){return y(this)-1900}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=Date,x=g(p.prototype.getTime);v({target:"Date",stat:!0},{now:function(){return x(new p)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(61),x=Date.prototype,y=g(x.getTime),b=g(x.setFullYear);v({target:"Date",proto:!0},{setYear:function(I){y(this);var R=+I;if(R!==R)return b(this,R);var O=p(R),M=O>=0&&O<=99?O+1900:O;return b(this,M)}})}),(function(T,P,a){"use strict";var v=a(3);v({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})}),(function(T,P,a){"use strict";var v=a(3),g=a(247);v({target:"Date",proto:!0,forced:Date.prototype.toISOString!==g},{toISOString:g})}),(function(T,P,a){"use strict";var v=a(14),g=a(7),p=a(248).start,x=RangeError,y=isFinite,b=Math.abs,A=Date.prototype,I=A.toISOString,R=v(A.getTime),O=v(A.getUTCDate),M=v(A.getUTCFullYear),L=v(A.getUTCHours),D=v(A.getUTCMilliseconds),N=v(A.getUTCMinutes),F=v(A.getUTCMonth),G=v(A.getUTCSeconds);T.exports=g(function(){return I.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"})||!g(function(){I.call(new Date(NaN))})?function(){if(!y(R(this)))throw new x("Invalid time value");var X=this,U=M(X),V=D(X),k=U<0?"-":U>9999?"+":"";return k+p(b(U),k?6:4,0)+"-"+p(F(X)+1,2,0)+"-"+p(O(X),2,0)+"T"+p(L(X),2,0)+":"+p(N(X),2,0)+":"+p(G(X),2,0)+"."+p(V,3,0)+"Z"}:I}),(function(T,P,a){"use strict";var v=a(14),g=a(64),p=a(68),x=a(249),y=a(16),b=v(x),A=v("".slice),I=Math.ceil,R=function(O){return function(M,L,D){var N=p(y(M)),F=g(L),G=N.length;if(F<=G)return N;var j=D===void 0?" ":p(D),X,U;return j===""?N:(X=F-G,U=b(j,I(X/j.length)),U.length>X&&(U=A(U,0,X)),O?N+U:U+N)}};T.exports={start:R(!1),end:R(!0)}}),(function(T,P,a){"use strict";var v=a(61),g=a(68),p=a(16),x=RangeError,y=Math.floor;T.exports=function(A){var I=g(p(this)),R="",O=v(A);if(O<0||O===1/0)throw new x("Wrong number of repetitions");for(;O>0;(O=y(O/2))&&(I+=I))O%2&&(R+=I);return R}}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(39),x=a(19),y=g(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});v({target:"Date",proto:!0,forced:y},{toJSON:function(A){var I=p(this),R=x(I,"number");return typeof R=="number"&&!isFinite(R)?null:I.toISOString()}})}),(function(T,P,a){"use strict";var v=a(38),g=a(47),p=a(252),x=a(33),y=x("toPrimitive"),b=Date.prototype;v(b,y)||g(b,y,p)}),(function(T,P,a){"use strict";var v=a(46),g=a(32),p=TypeError;T.exports=function(x){if(v(this),x==="string"||x==="default")x="string";else if(x!=="number")throw new p("Incorrect hint");return g(this,x)}}),(function(T,P,a){"use strict";var v=a(14),g=a(47),p=Date.prototype,x="Invalid Date",y="toString",b=v(p[y]),A=v(p.getTime);String(new Date(NaN))!==x&&g(p,y,function(){var R=A(this);return R===R?b(this):x})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(23),x=a(30),y=a(216),b=a(47),A=a(215),I=a(77),R=a(33),O=a(51),M=a(255),L=p("SuppressedError"),D=ReferenceError,N=R("dispose"),F=R("toStringTag"),G="DisposableStack",j=O.set,X=O.getterFor(G),U="sync-dispose",V="disposed",k="pending",Y=function(Z){var Q=X(Z);if(Q.state===V)throw new D(G+" already disposed");return Q},K=function(){j(y(this,J),{type:G,state:k,stack:[]}),g||(this.disposed=!1)},J=K.prototype;A(J,{dispose:function(){var Q=X(this);if(Q.state!==V){Q.state=V,g||(this.disposed=!0);for(var at=Q.stack,et=at.length,rt=!1,nt;et;){var ut=at[--et];at[et]=null;try{ut()}catch(ht){rt?nt=new L(ht,nt):(rt=!0,nt=ht)}}if(Q.stack=null,rt)throw nt}},use:function(Q){return M(Y(this),Q,U),Q},adopt:function(Q,at){var et=Y(this);return x(at),M(et,void 0,U,function(){at(Q)}),Q},defer:function(Q){var at=Y(this);x(Q),M(at,void 0,U,Q)},move:function(){var Q=Y(this),at=new K;return X(at).stack=Q.stack,Q.stack=[],Q.state=V,g||(this.disposed=!0),at}}),g&&I(J,"disposed",{configurable:!0,get:function(){return X(this).state===V}}),b(J,N,J.dispose,{name:"dispose"}),b(J,F,G,{nonWritable:!0}),v({global:!0,constructor:!0},{DisposableStack:K})}),(function(T,P,a){"use strict";var v=a(23),g=a(8),p=a(14),x=a(84),y=a(46),b=a(30),A=a(17),I=a(29),R=a(33),O=R("asyncDispose"),M=R("dispose"),L=p([].push),D=function(F,G){if(G==="async-dispose"){var j=I(F,O);return j!==void 0||(j=I(F,M),j===void 0)?j:function(){var X=this,U=v("Promise");return new U(function(V){g(j,X),V(void 0)})}}return I(F,M)},N=function(F,G,j){return arguments.length<3&&!A(F)&&(j=b(D(y(F),G))),j===void 0?function(){}:x(j,F)};T.exports=function(F,G,j,X){var U;if(arguments.length<4){if(A(G)&&j==="sync-dispose")return;U=N(G,j)}else U=N(void 0,j,X);L(F.stack,U)}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(68),x=g("".charAt),y=g("".charCodeAt),b=g(/./.exec),A=g(1.1.toString),I=g("".toUpperCase),R=g([].join),O=Array,M=/[\w*+\-./@]/,L=function(D,N){for(var F=A(D,16);F.length<N;)F="0"+F;return F};v({global:!0},{escape:function(N){var F=p(N),G=F.length,j=O(G),X,U,V;for(X=0;X<G;X++)U=x(F,X),b(M,U)?j[X]=U:(V=y(U,0),V<256?j[X]="%"+I(L(V,2)):j[X]="%u"+I(L(V,4)));return R(j,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(258);v({target:"Function",proto:!0,forced:Function.bind!==g},{bind:g})}),(function(T,P,a){"use strict";var v=a(14),g=a(30),p=a(20),x=a(38),y=a(76),b=a(9),A=Function,I=v([].concat),R=v([].join),O={},M=function(L,D,N){if(!x(O,D)){for(var F=[],G=0;G<D;G++)F[G]="a["+G+"]";O[D]=A("C,a","return new C("+R(F,",")+")")}return O[D](L,N)};T.exports=b?A.bind:function(D){var N=g(this),F=N.prototype,G=y(arguments,1),j=function(){var U=I(G,y(arguments));return this instanceof j?M(N,U.length,U):N.apply(D,U)};return p(F)&&(j.prototype=F),j}}),(function(T,P,a){"use strict";var v=a(21),g=a(20),p=a(44),x=a(24),y=a(33),b=a(48),A=y("hasInstance"),I=Function.prototype;A in I||p.f(I,A,{value:b(function(R){if(!v(this)||!g(R))return!1;var O=this.prototype;return g(O)?x(O,R):R instanceof this},A)})}),(function(T,P,a){"use strict";var v=a(6),g=a(49).EXISTS,p=a(14),x=a(77),y=Function.prototype,b=p(y.toString),A=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,I=p(A.exec),R="name";v&&!g&&x(y,R,{configurable:!0,get:function(){try{return I(A,b(this))[1]}catch(O){return""}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4);v({global:!0,forced:g.globalThis!==g},{globalThis:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(216),x=a(46),y=a(21),b=a(135),A=a(77),I=a(90),R=a(7),O=a(38),M=a(33),L=a(179).IteratorPrototype,D=a(6),N=a(36),F="constructor",G="Iterator",j=M("toStringTag"),X=TypeError,U=g[G],V=N||!y(U)||U.prototype!==L||!R(function(){U({})}),k=function(){if(p(this,L),b(this)===L)throw new X("Abstract class Iterator not directly constructable")},Y=function(K,J){D?A(L,K,{configurable:!0,get:function(){return J},set:function(Z){if(x(this),this===L)throw new X("You can't redefine this property");O(this,K)?this[K]=Z:I(this,K,Z)}}):L[K]=J};O(L,j)||Y(j,G),(V||!O(L,F)||L[F]===Object)&&Y(F,k),k.prototype=L,v({global:!0,constructor:!0,forced:V},{Iterator:k})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(46),y=a(141),b=a(264),A=a(36),I=Array,R=b(function(){for(;;){var O=this.iterator;if(!O){var M=this.nextIterableIndex++,L=this.iterables;if(M>=L.length){this.done=!0;return}var D=L[M];this.iterables[M]=null,O=this.iterator=x(g(D.method,D.iterable)),this.next=O.next}var N=x(g(this.next,O));if(N.done){this.iterator=null,this.next=null;continue}return N.value}});v({target:"Iterator",stat:!0,forced:A},{concat:function(){for(var M=arguments.length,L=I(M),D=0;D<M;D++){var N=x(arguments[D]);L[D]={iterable:N,method:p(y(N))}}return new R({iterables:L,nextIterableIndex:0,iterator:null,next:null})}})}),(function(T,P,a){"use strict";var v=a(8),g=a(71),p=a(43),x=a(215),y=a(33),b=a(51),A=a(29),I=a(179).IteratorPrototype,R=a(180),O=a(142),M=a(265),L=a(266),D=y("toStringTag"),N="IteratorHelper",F="WrapForValidIterator",G="normal",j="throw",X=b.set,U=function(Y){var K=b.getterFor(Y?F:N);return x(g(I),{next:function(){var Z=K(this);if(Y)return Z.nextHandler();if(Z.done)return R(void 0,!0);try{var Q=Z.nextHandler();return Z.done&&L(Z),Z.returnHandlerResult?Q:R(Q,Z.done)}catch(at){throw Z.done=!0,L(Z),at}},return:function(){var J=K(this),Z=J.iterator,Q=J.inner,at=J.openIters,et=J.done;if(J.done=!0,Y){var rt=A(Z,"return");return rt?v(rt,Z):R(void 0,!0)}if(L(J),et)return R(void 0,!0);if(Q)try{O(Q.iterator,G)}catch(nt){return O(Z,j,nt)}if(at)try{M(at,G)}catch(nt){if(Z)return O(Z,j,nt);throw nt}return Z&&O(Z,G),R(void 0,!0)}})},V=U(!0),k=U(!1);p(k,D,"Iterator Helper"),T.exports=function(Y,K,J){var Z=function(at,et){et?(et.iterator=at.iterator,et.next=at.next):et=at,et.type=K?F:N,et.returnHandlerResult=!!J,et.nextHandler=Y,et.counter=0,et.done=!1,X(this,et)};return Z.prototype=K?V:k,Z}}),(function(T,P,a){"use strict";var v=a(142);T.exports=function(g,p,x){for(var y=g.length-1;y>=0;y--)if(g[y]!==void 0)try{x=v(g[y].iterator,p,x)}catch(b){p="throw",x=b}if(p==="throw")throw x;return x}}),(function(T){"use strict";T.exports=function(P){P.iterator=P.next=P.nextHandler=P.mapper=P.predicate=P.inner=P.iterables=P.iters=P.openIters=P.padding=P.finishResults=P.buffer=null}}),(function(T,P,a){"use strict";var v=a(8),g=a(47),p=a(29),x=a(38),y=a(33),b=a(179).IteratorPrototype,A=y("dispose");x(b,A)||g(b,A,function(){var I=p(this,"return");I&&v(I,this)})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(46),x=a(269),y=a(270),b=a(271),A=a(142),I=a(264),R=a(272),O=a(273),M=a(36),L=RangeError,D=1/0,N=!M&&!R("drop",0),F=!M&&!N&&O("drop",RangeError),G=M||N||F||!(function(){try{Iterator.prototype.drop.call({next:function(){return{done:!0}}},9007199254740992)}catch(X){return X instanceof L}})(),j=I(function(){for(var X=this.iterator,U=this.next,V,k;this.remaining;)if(this.remaining--,V=p(g(U,X)),k=this.done=!!V.done,k)return;if(V=p(g(U,X)),k=this.done=!!V.done,!k)return V.value});v({target:"Iterator",proto:!0,real:!0,forced:G},{drop:function(U){p(this);var V;try{if(V=b(y(+U)),V>9007199254740991&&V!==D)throw new L("The argument should be a safe integer")}catch(k){A(this,"throw",k)}return F?g(F,this,V):new j(x(this),{remaining:V})}})}),(function(T){"use strict";T.exports=function(P){return{iterator:P,next:P.next,done:!1}}}),(function(T){"use strict";var P=RangeError;T.exports=function(a){if(a===a)return a;throw new P("NaN is not allowed")}}),(function(T,P,a){"use strict";var v=a(61),g=RangeError;T.exports=function(p){var x=v(p);if(x<0)throw new g("The argument can't be less than 0");return x}}),(function(T){"use strict";T.exports=function(P,a){var v=typeof Iterator=="function"&&Iterator.prototype[P];if(v)try{v.call({next:null},a).next()}catch(g){return!0}}}),(function(T,P,a){"use strict";var v=a(4);T.exports=function(g,p){var x=v.Iterator,y=x&&x.prototype,b=y&&y[g],A=!1;if(b)try{b.call({next:function(){return{done:!0}},return:function(){A=!0}},-1)}catch(I){I instanceof p||(A=!1)}if(!A)return b}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(137),x=a(30),y=a(46),b=a(269),A=a(142),I=a(273),R=I("every",TypeError);v({target:"Iterator",proto:!0,real:!0,forced:R},{every:function(M){y(this);try{x(M)}catch(N){A(this,"throw",N)}if(R)return g(R,this,M);var L=b(this),D=0;return!p(L,function(N,F){if(!M(N,D++))return F()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(46),y=a(269),b=a(264),A=a(171),I=a(36),R=a(142),O=a(272),M=a(273),L=!I&&!O("filter",function(){}),D=!I&&!L&&M("filter",TypeError),N=I||L||D,F=b(function(){for(var G=this.iterator,j=this.predicate,X=this.next,U,V,k;;){if(U=x(g(X,G)),V=this.done=!!U.done,V)return;if(k=U.value,A(G,j,[k,this.counter++],!0))return k}});v({target:"Iterator",proto:!0,real:!0,forced:N},{filter:function(j){x(this);try{p(j)}catch(X){R(this,"throw",X)}return D?g(D,this,j):new F(y(this),{predicate:j})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(137),x=a(30),y=a(46),b=a(269),A=a(142),I=a(273),R=I("find",TypeError);v({target:"Iterator",proto:!0,real:!0,forced:R},{find:function(M){y(this);try{x(M)}catch(N){A(this,"throw",N)}if(R)return g(R,this,M);var L=b(this),D=0;return p(L,function(N,F){if(M(N,D++))return F(N)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(46),y=a(269),b=a(278),A=a(264),I=a(142),R=a(7),O=a(36),M=a(272),L=a(273),D=!O&&R(function(){return[1].values().flatMap(function(){return[1]}).find(function(){return!0})!==1}),N=!O&&!D&&!M("flatMap",function(){}),F=!O&&!D&&!N&&L("flatMap",TypeError),G=O||D||N||F,j=A(function(){for(var X=this.iterator,U=this.mapper,V,k;;){if(k=this.inner)try{if(V=x(g(k.next,k.iterator)),!V.done)return V.value;this.inner=null}catch(Y){I(X,"throw",Y)}if(V=x(g(this.next,X)),this.done=!!V.done)return;try{this.inner=b(U(V.value,this.counter++),!1)}catch(Y){I(X,"throw",Y)}}});v({target:"Iterator",proto:!0,real:!0,forced:G},{flatMap:function(U){x(this);try{p(U)}catch(V){I(this,"throw",V)}return F?g(F,this,U):new j(y(this),{mapper:U,inner:null})}})}),(function(T,P,a){"use strict";var v=a(8),g=a(46),p=a(269),x=a(141);T.exports=function(y,b){(!b||typeof y!="string")&&g(y);var A=x(y);return p(g(A!==void 0?v(A,y):y))}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(137),x=a(30),y=a(46),b=a(269),A=a(142),I=a(273),R=I("forEach",TypeError);v({target:"Iterator",proto:!0,real:!0,forced:R},{forEach:function(M){y(this);try{x(M)}catch(N){A(this,"throw",N)}if(R)return g(R,this,M);var L=b(this),D=0;p(L,function(N){M(N,D++)},{IS_RECORD:!0})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(39),x=a(24),y=a(179).IteratorPrototype,b=a(264),A=a(278),I=a(36),R=I||(function(){try{Iterator.from({return:null}).return()}catch(M){return!0}})(),O=b(function(){return g(this.next,this.iterator)},!0);v({target:"Iterator",stat:!0,forced:R},{from:function(L){var D=A(typeof L=="string"?p(L):L,!0);return x(y,D.iterator)?D.iterator:new O(D)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(46),y=a(269),b=a(264),A=a(171),I=a(142),R=a(272),O=a(273),M=a(36),L=!M&&!R("map",function(){}),D=!M&&!L&&O("map",TypeError),N=M||L||D,F=b(function(){var G=this.iterator,j=x(g(this.next,G)),X=this.done=!!j.done;if(!X)return A(G,this.mapper,[j.value,this.counter++],!0)});v({target:"Iterator",proto:!0,real:!0,forced:N},{map:function(j){x(this);try{p(j)}catch(X){I(this,"throw",X)}return D?g(D,this,j):new F(y(this),{mapper:j})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(137),p=a(30),x=a(46),y=a(269),b=a(142),A=a(273),I=a(117),R=a(7),O=TypeError,M=R(function(){[].keys().reduce(function(){},void 0)}),L=!M&&A("reduce",O);v({target:"Iterator",proto:!0,real:!0,forced:M||L},{reduce:function(N){x(this);try{p(N)}catch(U){b(this,"throw",U)}var F=arguments.length<2,G=F?void 0:arguments[1];if(L)return I(L,this,F?[N]:[N,G]);var j=y(this),X=0;if(g(j,function(U){F?(F=!1,G=U):G=N(G,U,X),X++},{IS_RECORD:!0}),F)throw new O("Reduce of empty iterator with no initial value");return G}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(137),x=a(30),y=a(46),b=a(269),A=a(142),I=a(273),R=I("some",TypeError);v({target:"Iterator",proto:!0,real:!0,forced:R},{some:function(M){y(this);try{x(M)}catch(N){A(this,"throw",N)}if(R)return g(R,this,M);var L=b(this),D=0;return p(L,function(N,F){if(M(N,D++))return F()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(46),x=a(269),y=a(270),b=a(271),A=a(264),I=a(142),R=a(272),O=a(273),M=a(36),L=RangeError,D=1/0,N=!M&&!R("take",1),F=!M&&!N&&O("take",RangeError),G=M||N||F||!(function(){try{Iterator.prototype.take.call({next:function(){return{done:!0}}},9007199254740992)}catch(X){return X instanceof L}})(),j=A(function(){var X=this.iterator;if(!this.remaining--)return this.done=!0,I(X,"normal",void 0);var U=p(g(this.next,X)),V=this.done=!!U.done;if(!V)return U.value});v({target:"Iterator",proto:!0,real:!0,forced:G},{take:function(U){p(this);var V;try{if(V=b(y(+U)),V>9007199254740991&&V!==D)throw new L("The argument should be a safe integer")}catch(k){I(this,"throw",k)}return F?g(F,this,V):new j(x(this),{remaining:V})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(90),x=a(137),y=a(269);v({target:"Iterator",proto:!0,real:!0},{toArray:function(){var A=[],I=0;return x(y(g(this)),function(R){p(A,I++,R)},{IS_RECORD:!0}),A}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(287),x=a(8),y=a(14),b=a(288),A=a(278),I=a(289),R=a(142),O=a(265),M=a(290),L=a(36),D=y([].concat),N=y([].push),F="throw";v({target:"Iterator",stat:!0,forced:L},{zip:function(j){g(j);for(var X=arguments.length>1?p(arguments[1]):void 0,U=I(X),V=U==="longest"?p(X&&X.padding):void 0,k=[],Y=[],K=b(j),J,Z,Q;!Z;){try{Q=g(x(K.next,K.iterator)),Z=Q.done}catch(ht){return O(k,F,ht)}if(!Z){try{J=A(Q.value,!1)}catch(ht){return O(D([K],k),F,ht)}N(k,J)}}var at=k.length,et,rt,nt;if(U==="longest")if(V===void 0)for(et=0;et<at;et++)N(Y,void 0);else{try{nt=b(V)}catch(ht){return O(k,F,ht)}var ut=!0;for(et=0;et<at;et++)if(ut){try{Q=g(x(nt.next,nt.iterator)),rt=Q.done,Q=Q.value}catch(ht){return O(k,F,ht)}rt?ut=!1:N(Y,Q)}else N(Y,void 0);if(ut)try{R(nt.iterator,"normal")}catch(ht){return O(k,F,ht)}}return M(k,U,Y)}})}),(function(T,P,a){"use strict";var v=a(20),g=String,p=TypeError;T.exports=function(x){if(x===void 0||v(x))return x;throw new p(g(x)+" is not an object or undefined")}}),(function(T,P,a){"use strict";var v=a(140),g=a(269);T.exports=function(p){return g(v(p))}}),(function(T){"use strict";var P=TypeError;T.exports=function(a){var v=a&&a.mode;if(v===void 0||v==="shortest"||v==="longest"||v==="strict")return v||"shortest";throw new P("Incorrect `mode` option")}}),(function(T,P,a){"use strict";var v=a(8),g=a(14),p=a(46),x=a(264),y=a(265),b=TypeError,A=g([].slice),I=g([].push),R="Iterator is exhausted",O="throw",M=x(function(){var L=this.iterCount;if(!L){this.done=!0;return}for(var D=this.openIters,N=this.iters,F=this.padding,G=this.mode,j=this.finishResults,X=[],U,V,k=0;k<L;k++){var Y=N[k];if(Y===null)U=F[k];else{try{U=p(v(Y.next,Y.iterator)),V=U.done,U=U.value}catch(Q){return D[k]=void 0,y(D,O,Q)}if(V){if(D[k]=void 0,this.openItersCount--,G==="shortest")return this.done=!0,y(D,"normal",void 0);if(G==="strict"){if(k)return y(D,O,new b(R));for(var K,J,Z=1;Z<L;Z++){try{K=p(v(N[Z].next,N[Z].iterator)),J=K.done,K=K.value}catch(Q){return D[Z]=void 0,y(D,O,Q)}if(J)D[Z]=void 0,this.openItersCount--;else return y(D,O,new b(R))}this.done=!0;return}if(!this.openItersCount){this.done=!0;return}N[k]=null,U=F[k]}}I(X,U)}return j?j(X):X});T.exports=function(L,D,N,F){var G=L.length;return new M({iters:L,iterCount:G,openIters:A(L,0),openItersCount:G,mode:D,padding:N,finishResults:F})}}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(287),x=a(90),y=a(8),b=a(14),A=a(23),I=a(10),R=a(278),O=a(289),M=a(265),L=a(290),D=a(36),N=b([].push),F="throw";v({target:"Iterator",stat:!0,forced:D},{zipKeyed:function(j){g(j);var X=arguments.length>1?p(arguments[1]):void 0,U=O(X),V=U==="longest"?p(X&&X.padding):void 0,k=[],Y=[],K=A("Reflect","ownKeys")(j),J=[],Z=I.f,Q,at,et;for(Q=0;Q<K.length;Q++)try{if(at=K[Q],!y(Z,j,at))continue;et=j[at],et!==void 0&&(N(J,at),N(k,R(et,!1)))}catch(nt){return M(k,F,nt)}var rt=k.length;if(U==="longest")if(V===void 0)for(Q=0;Q<rt;Q++)N(Y,void 0);else for(Q=0;Q<J.length;Q++){try{et=V[J[Q]]}catch(nt){return M(k,F,nt)}N(Y,et)}return L(k,U,Y,function(nt){for(var ut=A("Object","create")(null),ht=0;ht<rt;ht++)x(ut,J[ht],nt[ht]);return ut})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(98),p=a(95);v({target:"JSON",stat:!0,forced:!g},{isRawJSON:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(4),x=a(23),y=a(14),b=a(8),A=a(21),I=a(20),R=a(88),O=a(38),M=a(68),L=a(63),D=a(90),N=a(7),F=a(97),G=a(26),j=p.JSON,X=p.Number,U=p.SyntaxError,V=j&&j.parse,k=x("Object","keys"),Y=Object.getOwnPropertyDescriptor,K=y("".charAt),J=y("".slice),Z=y(/./.exec),Q=y([].push),at=/^\d$/,et=/^[1-9]$/,rt=/^[\d-]$/,nt=/^[\t\n\r ]$/,ut=0,ht=1,pt=function(Ct,It){Ct=M(Ct);var Dt=new Ht(Ct,0),Vt=Dt.parse(),_t=Vt.value,Nt=Dt.skip(nt,Vt.end);if(Nt<Ct.length)throw new U('Unexpected extra character: "'+K(Ct,Nt)+'" after the parsed data at: '+Nt);return A(It)?yt({"":_t},"",It,Vt):_t},yt=function(Ct,It,Dt,Vt){var _t=Ct[It],Nt=Vt&&_t===Vt.value,Jt=Nt&&typeof Vt.source=="string"?{source:Vt.source}:{},ne,ve,le,fe,Ce;if(I(_t)){var Be=R(_t),Ie=Nt?Vt.nodes:Be?[]:{};if(Be)for(ne=Ie.length,le=L(_t),fe=0;fe<le;fe++)At(_t,fe,yt(_t,""+fe,Dt,fe<ne?Ie[fe]:void 0));else for(ve=k(_t),le=L(ve),fe=0;fe<le;fe++)Ce=ve[fe],At(_t,Ce,yt(_t,Ce,Dt,O(Ie,Ce)?Ie[Ce]:void 0))}return b(Dt,Ct,It,_t,Jt)},At=function(Ct,It,Dt){if(g){var Vt=Y(Ct,It);if(Vt&&!Vt.configurable)return}Dt===void 0?delete Ct[It]:D(Ct,It,Dt)},Et=function(Ct,It,Dt,Vt){this.value=Ct,this.end=It,this.source=Dt,this.nodes=Vt},Ht=function(Ct,It){this.source=Ct,this.index=It};Ht.prototype={fork:function(Ct){return new Ht(this.source,Ct)},parse:function(){var Ct=this.source,It=this.skip(nt,this.index),Dt=this.fork(It),Vt=K(Ct,It);if(Z(rt,Vt))return Dt.number();switch(Vt){case"{":return Dt.object();case"[":return Dt.array();case'"':return Dt.string();case"t":return Dt.keyword(!0);case"f":return Dt.keyword(!1);case"n":return Dt.keyword(null)}throw new U('Unexpected character: "'+Vt+'" at: '+It)},node:function(Ct,It,Dt,Vt,_t){return new Et(It,Vt,Ct?null:J(this.source,Dt,Vt),_t)},object:function(){for(var Ct=this.source,It=this.index+1,Dt=!1,Vt={},_t={},Nt=!1;It<Ct.length;){if(It=this.until(['"',"}"],It),K(Ct,It)==="}"&&!Dt){It++,Nt=!0;break}var Jt=this.fork(It).string(),ne=Jt.value;It=Jt.end,It=this.until([":"],It)+1,It=this.skip(nt,It),Jt=this.fork(It).parse(),D(_t,ne,Jt),D(Vt,ne,Jt.value),It=this.until([",","}"],Jt.end);var ve=K(Ct,It);if(ve===",")Dt=!0,It++;else if(ve==="}"){It++,Nt=!0;break}}if(!Nt)throw new U("Unterminated object at: "+It);return this.node(ht,Vt,this.index,It,_t)},array:function(){for(var Ct=this.source,It=this.index+1,Dt=!1,Vt=[],_t=[],Nt=!1;It<Ct.length;){if(It=this.skip(nt,It),K(Ct,It)==="]"&&!Dt){It++,Nt=!0;break}var Jt=this.fork(It).parse();if(Q(_t,Jt),Q(Vt,Jt.value),It=this.until([",","]"],Jt.end),K(Ct,It)===",")Dt=!0,It++;else if(K(Ct,It)==="]"){It++,Nt=!0;break}}if(!Nt)throw new U("Unterminated array at: "+It);return this.node(ht,Vt,this.index,It,_t)},string:function(){var Ct=this.index,It=F(this.source,this.index+1);return this.node(ut,It.value,Ct,It.end)},number:function(){var Ct=this.source,It=this.index,Dt=It;if(K(Ct,Dt)==="-"&&Dt++,K(Ct,Dt)==="0")Dt++;else if(Z(et,K(Ct,Dt)))Dt=this.skip(at,Dt+1);else throw new U("Failed to parse number at: "+Dt);if(K(Ct,Dt)==="."){var Vt=Dt+1;if(Dt=this.skip(at,Vt),Vt===Dt)throw new U("Failed to parse number's fraction at: "+Dt)}if(K(Ct,Dt)==="e"||K(Ct,Dt)==="E"){Dt++,(K(Ct,Dt)==="+"||K(Ct,Dt)==="-")&&Dt++;var _t=Dt;if(Dt=this.skip(at,Dt),_t===Dt)throw new U("Failed to parse number's exponent value at: "+Dt)}return this.node(ut,X(J(Ct,It,Dt)),It,Dt)},keyword:function(Ct){var It=""+Ct,Dt=this.index,Vt=Dt+It.length;if(J(this.source,Dt,Vt)!==It)throw new U("Failed to parse value at: "+Dt);return this.node(ut,Ct,Dt,Vt)},skip:function(Ct,It){for(var Dt=this.source;It<Dt.length&&Z(Ct,K(Dt,It));It++);return It},until:function(Ct,It){It=this.skip(nt,It);for(var Dt=K(this.source,It),Vt=0;Vt<Ct.length;Vt++)if(Ct[Vt]===Dt)return It;throw new U('Unexpected character: "'+Dt+'" at: '+It)}};var Ut=N(function(){var Ct="9007199254740993",It;return V(Ct,function(Dt,Vt,_t){It=_t.source}),It!==Ct}),kt=G&&!N(function(){return 1/V("-0 ")!==-1/0});v({target:"JSON",stat:!0,forced:Ut},{parse:function(It,Dt){return kt&&!A(Dt)?V(It):pt(It,Dt)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(295),p=a(98),x=a(23),y=a(14),b=a(68),A=a(90),I=a(51).set,R=SyntaxError,O=x("JSON","parse"),M=x("Object","create"),L=x("Object","freeze"),D=y("".charAt),N="Unacceptable as raw JSON",F=function(G){return G===" "||G===" "||G===`
26
+ `||G==="\r"};v({target:"JSON",stat:!0,forced:!p},{rawJSON:function(j){var X=b(j);if(X===""||F(D(X,0))||F(D(X,X.length-1)))throw new R(N);var U=O(X);if(typeof U=="object"&&U!==null)throw new R(N);var V=M(null);return I(V,{type:"RawJSON"}),A(V,"rawJSON",X),g?L(V):V}})}),(function(T,P,a){"use strict";var v=a(7);T.exports=!v(function(){return Object.isExtensible(Object.preventExtensions({}))})}),(function(T,P,a){"use strict";var v=a(4),g=a(82);g(v.JSON,"JSON",!0)}),(function(T,P,a){"use strict";a(298)}),(function(T,P,a){"use strict";var v=a(299),g=a(303);v("Map",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},g)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(14),x=a(67),y=a(47),b=a(300),A=a(137),I=a(216),R=a(21),O=a(17),M=a(20),L=a(7),D=a(172),N=a(82),F=a(124);T.exports=function(G,j,X){var U=G.indexOf("Map")!==-1,V=G.indexOf("Weak")!==-1,k=U?"set":"add",Y=g[G],K=Y&&Y.prototype,J=Y,Z={},Q=function(pt){var yt=p(K[pt]);y(K,pt,pt==="add"?function(Et){return yt(this,Et===0?0:Et),this}:pt==="delete"?function(At){return V&&!M(At)?!1:yt(this,At===0?0:At)}:pt==="get"?function(Et){return V&&!M(Et)?void 0:yt(this,Et===0?0:Et)}:pt==="has"?function(Et){return V&&!M(Et)?!1:yt(this,Et===0?0:Et)}:function(Et,Ht){return yt(this,Et===0?0:Et,Ht),this})},at=x(G,!R(Y)||!(V||K.forEach&&!L(function(){new Y().entries().next()})));if(at)J=X.getConstructor(j,G,U,k),b.enable();else if(x(G,!0)){var et=new J,rt=et[k](V?{}:-0,1)!==et,nt=L(function(){et.has(1)}),ut=D(function(pt){new Y(pt)}),ht=!V&&L(function(){for(var pt=new Y,yt=5;yt--;)pt[k](yt,yt);return!pt.has(-0)});ut||(J=j(function(pt,yt){I(pt,K);var At=F(new Y,pt,J);return O(yt)||A(yt,At[k],{that:At,AS_ENTRIES:U}),At}),J.prototype=K,K.constructor=J),(nt||ht)&&(Q("delete"),Q("has"),U&&Q("get")),(ht||rt)&&Q(k),V&&K.clear&&delete K.clear}return Z[G]=J,v({global:!0,constructor:!0,forced:J!==Y},Z),N(J,G),V||X.setStrong(J,G,U),J}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(54),x=a(20),y=a(38),b=a(44).f,A=a(57),I=a(75),R=a(301),O=a(40),M=a(295),L=!1,D=O("meta"),N=0,F=function(k){b(k,D,{value:{objectID:"O"+N++,weakData:{}}})},G=function(k,Y){if(!x(k))return typeof k=="symbol"?k:(typeof k=="string"?"S":"P")+k;if(!y(k,D)){if(!R(k))return"F";if(!Y)return"E";F(k)}return k[D].objectID},j=function(k,Y){if(!y(k,D)){if(!R(k))return!0;if(!Y)return!1;F(k)}return k[D].weakData},X=function(k){return M&&L&&R(k)&&!y(k,D)&&F(k),k},U=function(){V.enable=function(){},L=!0;var k=A.f,Y=g([].splice),K={};K[D]=1,k(K).length&&(A.f=function(J){for(var Z=k(J),Q=0,at=Z.length;Q<at;Q++)if(Z[Q]===D){Y(Z,Q,1);break}return Z},v({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:I.f}))},V=T.exports={enable:U,fastKey:G,getWeakData:j,onFreeze:X};p[D]=!0}),(function(T,P,a){"use strict";var v=a(7),g=a(20),p=a(15),x=a(302),y=Object.isExtensible,b=v(function(){y(1)});T.exports=b||x?function(I){return!g(I)||x&&p(I)==="ArrayBuffer"?!1:y?y(I):!0}:y}),(function(T,P,a){"use strict";var v=a(7);T.exports=v(function(){if(typeof ArrayBuffer=="function"){var g=new ArrayBuffer(8);Object.isExtensible(g)&&Object.defineProperty(g,"a",{value:8})}})}),(function(T,P,a){"use strict";var v=a(71),g=a(77),p=a(215),x=a(84),y=a(216),b=a(17),A=a(137),I=a(177),R=a(180),O=a(201),M=a(6),L=a(300).fastKey,D=a(51),N=D.set,F=D.getterFor;T.exports={getConstructor:function(G,j,X,U){var V=G(function(Z,Q){y(Z,k),N(Z,{type:j,index:v(null),first:null,last:null,size:0}),M||(Z.size=0),b(Q)||A(Q,Z[U],{that:Z,AS_ENTRIES:X})}),k=V.prototype,Y=F(j),K=function(Z,Q,at){var et=Y(Z),rt=J(Z,Q),nt,ut;return rt?rt.value=at:(et.last=rt={index:ut=L(Q,!0),key:Q,value:at,previous:nt=et.last,next:null,removed:!1},et.first||(et.first=rt),nt&&(nt.next=rt),M?et.size++:Z.size++,ut!=="F"&&(et.index[ut]=rt)),Z},J=function(Z,Q){var at=Y(Z),et=L(Q),rt;if(et!=="F")return at.index[et];for(rt=at.first;rt;rt=rt.next)if(rt.key===Q)return rt};return p(k,{clear:function(){for(var Q=this,at=Y(Q),et=at.first;et;)et.removed=!0,et.previous&&(et.previous=et.previous.next=null),et=et.next;at.first=at.last=null,at.index=v(null),M?at.size=0:Q.size=0},delete:function(Z){var Q=this,at=Y(Q),et=J(Q,Z);if(et){var rt=et.next,nt=et.previous;delete at.index[et.index],et.removed=!0,nt&&(nt.next=rt),rt&&(rt.previous=nt),at.first===et&&(at.first=rt),at.last===et&&(at.last=nt),M?at.size--:Q.size--}return!!et},forEach:function(Q){for(var at=Y(this),et=x(Q,arguments.length>1?arguments[1]:void 0),rt;rt=rt?rt.next:at.first;)for(et(rt.value,rt.key,this);rt&&rt.removed;)rt=rt.previous},has:function(Q){return!!J(this,Q)}}),p(k,X?{get:function(Q){var at=J(this,Q);return at&&at.value},set:function(Q,at){return K(this,Q===0?0:Q,at)}}:{add:function(Q){return K(this,Q=Q===0?0:Q,Q)}}),M&&g(k,"size",{configurable:!0,get:function(){return Y(this).size}}),V},setStrong:function(G,j,X){var U=j+" Iterator",V=F(j),k=F(U);I(G,j,function(Y,K){N(this,{type:U,target:Y,state:V(Y),kind:K,last:null})},function(){for(var Y=k(this),K=Y.kind,J=Y.last;J&&J.removed;)J=J.previous;return!Y.target||!(Y.last=J=J?J.next:Y.state.first)?(Y.target=null,R(void 0,!0)):R(K==="keys"?J.key:K==="values"?J.value:[J.key,J.value],!1)},X?"entries":"values",!X,!0),O(j)}}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(30),x=a(16),y=a(137),b=a(148),A=a(305),I=a(36),R=a(7),O=A.Map,M=A.has,L=A.get,D=A.set,N=g([].push),F=I||R(function(){return O.groupBy("ab",function(G){return G}).get("a").length!==1});v({target:"Map",stat:!0,forced:I||F},{groupBy:function(j,X){x(j),p(X);var U=new O,V=0;return y(j,function(k){b(V);var Y=X(k,V++);M(U,Y)?N(L(U,Y),k):D(U,Y,[k])}),U}})}),(function(T,P,a){"use strict";var v=a(14),g=Map.prototype;T.exports={Map,set:v(g.set),get:v(g.get),has:v(g.has),remove:v(g.delete),proto:g}}),(function(T,P,a){"use strict";var v=a(3),g=a(305),p=a(36),x=g.get,y=g.has,b=g.set;v({target:"Map",proto:!0,real:!0,forced:p},{getOrInsert:function(I,R){return y(this,I)?x(this,I):(b(this,I,R),R)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(30),p=a(305),x=a(36),y=p.get,b=p.has,A=p.set;v({target:"Map",proto:!0,real:!0,forced:x},{getOrInsertComputed:function(R,O){var M=b(this,R);if(g(O),M)return y(this,R);R===0&&1/R===-1/0&&(R=0);var L=O(R);return A(this,R,L),L}})}),(function(T,P,a){"use strict";var v=a(3),g=a(309),p=Math.acosh,x=Math.log,y=Math.sqrt,b=Math.LN2,A=!p||Math.floor(p(Number.MAX_VALUE))!==710||p(1/0)!==1/0;v({target:"Math",stat:!0,forced:A},{acosh:function(R){var O=+R;return O<1?NaN:O>9490626562425156e-8?x(O)+b:g(O-1+y(O-1)*y(O+1))}})}),(function(T){"use strict";var P=Math.log;T.exports=Math.log1p||function(v){var g=+v;if(g>-1e-8&&g<1e-8)return g-g*g/2;var p=1+g;return p===1?g:g===p-1?P(p):g*P(p)/(p-1)}}),(function(T,P,a){"use strict";var v=a(3),g=a(309),p=Math.asinh,x=Math.log,y=Math.sqrt,b=Math.LN2,A=9490626562425156e-8;function I(O){var M=+O;return!isFinite(M)||M===0?M:M<0?-I(-M):M>A?x(M)+b:M<1e-8?M:g(M+M*M/(1+y(M*M+1)))}var R=!(p&&1/p(0)>0);v({target:"Math",stat:!0,forced:R},{asinh:I})}),(function(T,P,a){"use strict";var v=a(3),g=a(309),p=Math.atanh,x=!(p&&1/p(-0)<0);v({target:"Math",stat:!0,forced:x},{atanh:function(b){var A=+b;return A===0?A:g(2*A/(1-A))/2}})}),(function(T,P,a){"use strict";var v=a(3),g=a(220),p=Math.abs,x=Math.pow;v({target:"Math",stat:!0},{cbrt:function(b){var A=+b,I=g(A)*x(p(A),1/3);return A!==0&&isFinite(A)?(2*I+A/(I*I))/3:I}})}),(function(T,P,a){"use strict";var v=a(3),g=Math.floor,p=Math.log,x=Math.LOG2E;v({target:"Math",stat:!0},{clz32:function(b){var A=b>>>0;return A?31-g(p(A+.5)*x):32}})}),(function(T,P,a){"use strict";var v=a(3),g=a(315),p=Math.cosh,x=Math.abs,y=Math.E,b=!p||p(710)===1/0;v({target:"Math",stat:!0,forced:b},{cosh:function(I){var R=g(x(I)-1)+1;return(R+1/(R*y*y))*(y/2)}})}),(function(T){"use strict";var P=Math.expm1,a=Math.exp;T.exports=!P||P(10)>22025.465794806718||P(10)<22025.465794806718||P(-2e-17)!==-2e-17?function(g){var p=+g;return p===0?p:p>-1e-6&&p<1e-6?p+p*p/2:a(p)-1}:P}),(function(T,P,a){"use strict";var v=a(3),g=a(315);v({target:"Math",stat:!0,forced:g!==Math.expm1},{expm1:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(218);v({target:"Math",stat:!0},{fround:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(219),p=.0009765625,x=65504,y=6103515625e-14;v({target:"Math",stat:!0},{f16round:function(A){return g(A,p,x,y)}})}),(function(T,P,a){"use strict";var v=a(3),g=Math.hypot,p=Math.abs,x=Math.sqrt,y=!!g&&g(1/0,NaN)!==1/0;v({target:"Math",stat:!0,arity:2,forced:y},{hypot:function(A,I){for(var R=0,O=0,M=arguments.length,L=0,D,N;O<M;)D=p(arguments[O++]),L<D?(N=L/D,R=R*N*N+1,L=D):D>0?(N=D/L,R+=N*N):R+=D;return L===1/0?1/0:L*x(R)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=Math.imul,x=g(function(){return p(4294967295,5)!==-5||p.length!==2});v({target:"Math",stat:!0,forced:x},{imul:function(b,A){var I=65535,R=+b,O=+A,M=I&R,L=I&O;return 0|M*L+((I&R>>>16)*L+M*(I&O>>>16)<<16>>>0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(322);v({target:"Math",stat:!0},{log10:g})}),(function(T){"use strict";var P=Math.log,a=Math.LOG10E;T.exports=Math.log10||function(g){return P(g)*a}}),(function(T,P,a){"use strict";var v=a(3),g=a(309);v({target:"Math",stat:!0},{log1p:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(231);v({target:"Math",stat:!0},{log2:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(220);v({target:"Math",stat:!0},{sign:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(315),x=Math.abs,y=Math.exp,b=Math.E,A=g(function(){return Math.sinh(-2e-17)!==-2e-17});v({target:"Math",stat:!0,forced:A},{sinh:function(R){var O=+R;return x(O)<1?(p(O)-p(-O))/2:(y(O-1)-y(-O-1))*(b/2)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(137),x=RangeError,y=TypeError,b=1/0,A=NaN,I=Math.abs,R=Math.pow,O=g([].push),M=R(2,1023),L=R(2,53)-1,D=Number.MAX_VALUE,N=R(2,971),F={},G={},j={},X={},U={},V=function(k,Y){var K=k+Y,J=Y-(K-k);return{hi:K,lo:J}};v({target:"Math",stat:!0},{sumPrecise:function(Y){var K=[],J=0,Z=X;switch(p(Y,function(Ct){if(++J>L)throw new x("Maximum allowed index exceeded");if(typeof Ct!="number")throw new y("Value is not a number");Z!==F&&(Ct!==Ct?Z=F:Ct===b?Z=Z===G?F:j:Ct===-b?Z=Z===j?F:G:(Ct!==0||1/Ct===b)&&(Z===X||Z===U)&&(Z=U,O(K,Ct)))}),Z){case F:return A;case G:return-b;case j:return b;case X:return-0}for(var Q=[],at=0,et,rt,nt,ut,ht,pt,yt=0;yt<K.length;yt++){et=K[yt];for(var At=0,Et=0;Et<Q.length;Et++){if(rt=Q[Et],I(et)<I(rt)&&(pt=et,et=rt,rt=pt),nt=V(et,rt),ut=nt.hi,ht=nt.lo,I(ut)===b){var Ht=ut===b?1:-1;at+=Ht,et=et-Ht*M-Ht*M,I(et)<I(rt)&&(pt=et,et=rt,rt=pt),nt=V(et,rt),ut=nt.hi,ht=nt.lo}ht!==0&&(Q[At++]=ht),et=ut}Q.length=At,et!==0&&O(Q,et)}var Ut=Q.length-1;if(ut=0,ht=0,at!==0){var kt=Ut>=0?Q[Ut]:0;if(Ut--,I(at)>1||at>0&&kt>0||at<0&&kt<0)return at>0?b:-b;if(nt=V(at*M,kt/2),ut=nt.hi,ht=nt.lo,ht*=2,I(2*ut)===b)return ut>0?ut===M&&ht===-(N/2)&&Ut>=0&&Q[Ut]<0?D:b:ut===-M&&ht===N/2&&Ut>=0&&Q[Ut]>0?-D:-b;ht!==0&&(Q[++Ut]=ht,ht=0),ut*=2}for(;Ut>=0&&(nt=V(ut,Q[Ut--]),ut=nt.hi,ht=nt.lo,ht===0););return Ut>=0&&(ht<0&&Q[Ut]<0||ht>0&&Q[Ut]>0)&&(rt=ht*2,et=ut+rt,rt===et-ut&&(ut=et)),ut}})}),(function(T,P,a){"use strict";var v=a(3),g=a(315),p=Math.exp;v({target:"Math",stat:!0},{tanh:function(y){var b=+y,A=g(b),I=g(-b);return A===1/0?1:I===1/0?-1:(A-I)/(p(b)+p(-b))}})}),(function(T,P,a){"use strict";var v=a(82);v(Math,"Math",!0)}),(function(T,P,a){"use strict";var v=a(3),g=a(62);v({target:"Math",stat:!0},{trunc:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(36),p=a(6),x=a(4),y=a(80),b=a(14),A=a(67),I=a(38),R=a(124),O=a(24),M=a(22),L=a(19),D=a(7),N=a(57).f,F=a(5).f,G=a(44).f,j=a(96),X=a(332).trim,U="Number",V=x[U],k=y[U],Y=V.prototype,K=x.TypeError,J=b("".slice),Z=b("".charCodeAt),Q=function(ht){var pt=L(ht,"number");return typeof pt=="bigint"?pt:at(pt)},at=function(ht){var pt=L(ht,"number"),yt,At,Et,Ht,Ut,kt,Ct,It;if(M(pt))throw new K("Cannot convert a Symbol value to a number");if(typeof pt=="string"&&pt.length>2){if(pt=X(pt),yt=Z(pt,0),yt===43||yt===45){if(At=Z(pt,2),At===88||At===120)return NaN}else if(yt===48){switch(Z(pt,1)){case 66:case 98:Et=2,Ht=49;break;case 79:case 111:Et=8,Ht=55;break;default:return+pt}for(Ut=J(pt,2),kt=Ut.length,Ct=0;Ct<kt;Ct++)if(It=Z(Ut,Ct),It<48||It>Ht)return NaN;return parseInt(Ut,Et)}}return+pt},et=A(U,!V(" 0o1")||!V("0b1")||V("+0x1")),rt=function(ht){return O(Y,ht)&&D(function(){j(ht)})},nt=function(pt){var yt=arguments.length<1?0:V(Q(pt));return rt(this)?R(Object(yt),this,nt):yt};nt.prototype=Y,et&&!g&&(Y.constructor=nt),v({global:!0,constructor:!0,wrap:!0,forced:et},{Number:nt});var ut=function(ht,pt){for(var yt=p?N(pt):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),At=0,Et;yt.length>At;At++)I(pt,Et=yt[At])&&!I(ht,Et)&&G(ht,Et,F(pt,Et))};g&&k&&ut(y[U],k),(et||g)&&ut(y[U],V)}),(function(T,P,a){"use strict";var v=a(14),g=a(16),p=a(68),x=a(333),y=v("".replace),b=RegExp("^["+x+"]+"),A=RegExp("(^|[^"+x+"])["+x+"]+$"),I=function(R){return function(O){var M=p(g(O));return R&1&&(M=y(M,b,"")),R&2&&(M=y(M,A,"$1")),M}};T.exports={start:I(1),end:I(2),trim:I(3)}}),(function(T){"use strict";T.exports=`
27
+ \v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`}),(function(T,P,a){"use strict";var v=a(3);v({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})}),(function(T,P,a){"use strict";var v=a(3),g=a(336);v({target:"Number",stat:!0},{isFinite:g})}),(function(T,P,a){"use strict";var v=a(4),g=v.isFinite;T.exports=Number.isFinite||function(x){return typeof x=="number"&&g(x)}}),(function(T,P,a){"use strict";var v=a(3),g=a(338);v({target:"Number",stat:!0},{isInteger:g})}),(function(T,P,a){"use strict";var v=a(20),g=Math.floor;T.exports=Number.isInteger||function(x){return!v(x)&&isFinite(x)&&g(x)===x}}),(function(T,P,a){"use strict";var v=a(3);v({target:"Number",stat:!0},{isNaN:function(p){return p!==p}})}),(function(T,P,a){"use strict";var v=a(3),g=a(338),p=Math.abs;v({target:"Number",stat:!0},{isSafeInteger:function(y){return g(y)&&p(y)<=9007199254740991}})}),(function(T,P,a){"use strict";var v=a(3);v({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})}),(function(T,P,a){"use strict";var v=a(3);v({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})}),(function(T,P,a){"use strict";var v=a(3),g=a(344);v({target:"Number",stat:!0,forced:Number.parseFloat!==g},{parseFloat:g})}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=a(14),x=a(68),y=a(332).trim,b=a(333),A=p("".charAt),I=v.parseFloat,R=v.Symbol,O=R&&R.iterator,M=1/I(b+"-0")!==-1/0||O&&!g(function(){I(Object(O))});T.exports=M?function(D){var N=y(x(D)),F=I(N);return F===0&&A(N,0)==="-"?-0:F}:I}),(function(T,P,a){"use strict";var v=a(3),g=a(346);v({target:"Number",stat:!0,forced:Number.parseInt!==g},{parseInt:g})}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=a(14),x=a(68),y=a(332).trim,b=a(333),A=v.parseInt,I=v.Symbol,R=I&&I.iterator,O=/^[+-]?0x/i,M=p(O.exec),L=A(b+"08")!==8||A(b+"0x16")!==22||R&&!g(function(){A(Object(R))});T.exports=L?function(N,F){var G=y(x(N));return A(G,F>>>0||(M(O,G)?16:10))}:A}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(61),x=a(96),y=a(249),b=a(322),A=a(7),I=RangeError,R=String,O=isFinite,M=Math.abs,L=Math.floor,D=Math.pow,N=Math.round,F=g(1.1.toExponential),G=g(y),j=g("".slice),X=D(10,308),U=F(-69e-12,4)==="-6.9000e-11"&&F(1.255,2)==="1.25e+0"&&F(12345,3)==="1.235e+4"&&F(25,0)==="3e+1",V=function(){return A(function(){F(1,1/0)})&&A(function(){F(1,-1/0)})},k=function(){return!A(function(){F(1/0,1/0),F(NaN,1/0)})},Y=!U||!V()||!k();v({target:"Number",proto:!0,forced:Y},{toExponential:function(J){var Z=x(this);if(J===void 0)return F(Z);var Q=p(J);if(!O(Z))return String(Z);if(Q<0||Q>20)throw new I("Incorrect fraction digits");if(U)return F(Z,Q);var at="",et,rt,nt,ut,ht,pt,yt;return Z<0&&(at="-",Z=-Z),Z===0?(rt=0,et=G("0",Q+1)):(ht=b(Z),rt=L(ht),Q-rt>=308?yt=Z*X*D(10,Q-rt-308):yt=Z/D(10,rt-Q),pt=N(yt),yt-pt>=.5&&(pt+=1),pt>=D(10,Q+1)&&(pt/=10,rt+=1),et=R(pt)),Q!==0&&(et=j(et,0,1)+"."+j(et,1)),rt===0?(nt="+",ut="0"):(nt=rt>0?"+":"-",ut=R(M(rt))),et+="e"+nt+ut,at+et}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(61),x=a(96),y=a(249),b=a(7),A=RangeError,I=String,R=Math.floor,O=g(y),M=g("".slice),L=g(1.1.toFixed),D=function(U,V,k){return V===0?k:V%2===1?D(U,V-1,k*U):D(U*U,V/2,k)},N=function(U){for(var V=0,k=U;k>=4096;)V+=12,k/=4096;for(;k>=2;)V+=1,k/=2;return V},F=function(U,V,k){for(var Y=-1,K=k;++Y<6;)K+=V*U[Y],U[Y]=K%1e7,K=R(K/1e7)},G=function(U,V){for(var k=6,Y=0;--k>=0;)Y+=U[k],U[k]=R(Y/V),Y=Y%V*1e7},j=function(U){for(var V=6,k="";--V>=0;)if(k!==""||V===0||U[V]!==0){var Y=I(U[V]);k=k===""?Y:k+O("0",7-Y.length)+Y}return k},X=b(function(){return L(8e-5,3)!=="0.000"||L(.9,0)!=="1"||L(1.255,2)!=="1.25"||L(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!b(function(){L({})});v({target:"Number",proto:!0,forced:X},{toFixed:function(V){var k=x(this),Y=p(V),K=[0,0,0,0,0,0],J="",Z="0",Q,at,et,rt;if(Y<0||Y>20)throw new A("Incorrect fraction digits");if(k!==k)return"NaN";if(k<=-1e21||k>=1e21)return I(k);if(k<0&&(J="-",k=-k),k>1e-21)if(Q=N(k*D(2,69,1))-69,at=Q<0?k*D(2,-Q,1):k/D(2,Q,1),at*=4503599627370496,Q=52-Q,Q>0){for(F(K,0,at),et=Y;et>=7;)F(K,1e7,0),et-=7;for(F(K,D(10,et,1),0),et=Q-1;et>=23;)G(K,8388608),et-=23;G(K,1<<et),F(K,1,1),G(K,2),Z=j(K)}else F(K,0,at),F(K,1<<-Q,0),Z=j(K)+O("0",Y);return Y>0?(rt=Z.length,Z=J+(rt<=Y?"0."+O("0",Y-rt)+Z:M(Z,0,rt-Y)+"."+M(Z,rt-Y))):Z=J+Z,Z}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(7),x=a(96),y=g(1.1.toPrecision),b=p(function(){return y(1,void 0)!=="1"})||!p(function(){y({})});v({target:"Number",proto:!0,forced:b},{toPrecision:function(I){return I===void 0?y(x(this)):y(x(this),I)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(351);v({target:"Object",stat:!0,arity:2,forced:Object.assign!==g},{assign:g})}),(function(T,P,a){"use strict";var v=a(6),g=a(14),p=a(8),x=a(7),y=a(73),b=a(66),A=a(10),I=a(39),R=a(13),O=Object.assign,M=Object.defineProperty,L=g([].concat);T.exports=!O||x(function(){if(v&&O({b:1},O(M({},"a",{enumerable:!0,get:function(){M(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var D={},N={},F=Symbol("assign detection"),G="abcdefghijklmnopqrst";return D[F]=7,G.split("").forEach(function(j){N[j]=j}),O({},D)[F]!==7||y(O({},N)).join("")!==G})?function(N,F){for(var G=I(N),j=arguments.length,X=1,U=b.f,V=A.f;j>X;)for(var k=R(arguments[X++]),Y=U?L(y(k),U(k)):y(k),K=Y.length,J=0,Z;K>J;)Z=Y[J++],(!v||p(V,k,Z))&&(G[Z]=k[Z]);return G}:O}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(71);v({target:"Object",stat:!0,sham:!g},{create:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(354),x=a(30),y=a(39),b=a(44);g&&v({target:"Object",proto:!0,forced:p},{__defineGetter__:function(I,R){b.f(y(this),I,{get:x(R),enumerable:!0,configurable:!0})}})}),(function(T,P,a){"use strict";var v=a(36),g=a(4),p=a(7),x=a(199);T.exports=v||!p(function(){if(!(x&&x<535)){var y=Math.random();__defineSetter__.call(null,y,function(){}),delete g[y]}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(72).f;v({target:"Object",stat:!0,forced:Object.defineProperties!==p,sham:!g},{defineProperties:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(44).f;v({target:"Object",stat:!0,forced:Object.defineProperty!==p,sham:!g},{defineProperty:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(354),x=a(30),y=a(39),b=a(44);g&&v({target:"Object",proto:!0,forced:p},{__defineSetter__:function(I,R){b.f(y(this),I,{set:x(R),enumerable:!0,configurable:!0})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(359).entries;v({target:"Object",stat:!0},{entries:function(x){return g(x)}})}),(function(T,P,a){"use strict";var v=a(6),g=a(7),p=a(14),x=a(135),y=a(73),b=a(12),A=a(10).f,I=p(A),R=p([].push),O=v&&g(function(){var L=Object.create(null);return L[2]=2,!I(L,2)}),M=function(L){return function(D){for(var N=b(D),F=y(N),G=O&&x(N)===null,j=F.length,X=0,U=[],V;j>X;)V=F[X++],(!v||(G?V in N:I(N,V)))&&R(U,L?[V,N[V]]:N[V]);return U}};T.exports={entries:M(!0),values:M(!1)}}),(function(T,P,a){"use strict";var v=a(3),g=a(295),p=a(7),x=a(20),y=a(300).onFreeze,b=Object.freeze,A=p(function(){b(1)});v({target:"Object",stat:!0,forced:A,sham:!g},{freeze:function(R){return b&&x(R)?b(y(R)):R}})}),(function(T,P,a){"use strict";var v=a(3),g=a(137),p=a(90);v({target:"Object",stat:!0},{fromEntries:function(y){var b={};return g(y,function(A,I){p(b,A,I)},{AS_ENTRIES:!0}),b}})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(12),x=a(5).f,y=a(6),b=!y||g(function(){x(1)});v({target:"Object",stat:!0,forced:b,sham:!y},{getOwnPropertyDescriptor:function(I,R){return x(p(I),R)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(56),x=a(12),y=a(5),b=a(90);v({target:"Object",stat:!0,sham:!g},{getOwnPropertyDescriptors:function(I){for(var R=x(I),O=y.f,M=p(R),L={},D=0,N,F;M.length>D;)F=O(R,N=M[D++]),F!==void 0&&b(L,N,F);return L}})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(75).f,x=g(function(){return!Object.getOwnPropertyNames(1)});v({target:"Object",stat:!0,forced:x},{getOwnPropertyNames:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(39),x=a(135),y=a(136),b=g(function(){x(1)});v({target:"Object",stat:!0,forced:b,sham:!y},{getPrototypeOf:function(I){return x(p(I))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(90),p=a(23),x=a(14),y=a(30),b=a(16),A=a(18),I=a(137),R=a(148),O=a(7),M=Object.groupBy,L=p("Object","create"),D=x([].push),N=!M||O(function(){return M("ab",function(F){return F}).a.length!==1});v({target:"Object",stat:!0,forced:N},{groupBy:function(G,j){b(G),y(j);var X=L(null),U=0;return I(G,function(V){R(U);var k=A(j(V,U++));k in X?D(X[k],V):g(X,k,[V])}),X}})}),(function(T,P,a){"use strict";var v=a(3),g=a(38);v({target:"Object",stat:!0},{hasOwn:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(369);v({target:"Object",stat:!0},{is:g})}),(function(T){"use strict";T.exports=Object.is||function(a,v){return a===v?a!==0||1/a===1/v:a!==a&&v!==v}}),(function(T,P,a){"use strict";var v=a(3),g=a(301);v({target:"Object",stat:!0,forced:Object.isExtensible!==g},{isExtensible:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(20),x=a(15),y=a(302),b=Object.isFrozen,A=y||g(function(){b(1)});v({target:"Object",stat:!0,forced:A},{isFrozen:function(R){return!p(R)||y&&x(R)==="ArrayBuffer"?!0:b?b(R):!1}})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(20),x=a(15),y=a(302),b=Object.isSealed,A=y||g(function(){b(1)});v({target:"Object",stat:!0,forced:A},{isSealed:function(R){return!p(R)||y&&x(R)==="ArrayBuffer"?!0:b?b(R):!1}})}),(function(T,P,a){"use strict";var v=a(3),g=a(39),p=a(73),x=a(7),y=x(function(){p(1)});v({target:"Object",stat:!0,forced:y},{keys:function(A){return p(g(A))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(354),x=a(39),y=a(18),b=a(135),A=a(5).f;g&&v({target:"Object",proto:!0,forced:p},{__lookupGetter__:function(R){var O=x(this),M=y(R),L;do if(L=A(O,M))return L.get;while(O=b(O))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(354),x=a(39),y=a(18),b=a(135),A=a(5).f;g&&v({target:"Object",proto:!0,forced:p},{__lookupSetter__:function(R){var O=x(this),M=y(R),L;do if(L=A(O,M))return L.set;while(O=b(O))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(20),p=a(300).onFreeze,x=a(295),y=a(7),b=Object.preventExtensions,A=y(function(){b(1)});v({target:"Object",stat:!0,forced:A,sham:!x},{preventExtensions:function(R){return b&&g(R)?b(p(R)):R}})}),(function(T,P,a){"use strict";var v=a(6),g=a(77),p=a(20),x=a(122),y=a(39),b=a(16),A=Object.getPrototypeOf,I=Object.setPrototypeOf,R=Object.prototype,O="__proto__";if(v&&A&&I&&{}[O]!==R)try{g(R,O,{configurable:!0,get:function(){return A(y(this))},set:function(L){var D=b(this);x(L)&&p(D)&&I(D,L)}})}catch(M){}}),(function(T,P,a){"use strict";var v=a(3),g=a(20),p=a(300).onFreeze,x=a(295),y=a(7),b=Object.seal,A=y(function(){b(1)});v({target:"Object",stat:!0,forced:A,sham:!x},{seal:function(R){return b&&g(R)?b(p(R)):R}})}),(function(T,P,a){"use strict";var v=a(3),g=a(119);v({target:"Object",stat:!0},{setPrototypeOf:g})}),(function(T,P,a){"use strict";var v=a(70),g=a(47),p=a(381);v||g(Object.prototype,"toString",p,{unsafe:!0})}),(function(T,P,a){"use strict";var v=a(70),g=a(69);T.exports=v?{}.toString:function(){return"[object "+g(this)+"]"}}),(function(T,P,a){"use strict";var v=a(3),g=a(359).values;v({target:"Object",stat:!0},{values:function(x){return g(x)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(344);v({global:!0,forced:parseFloat!==g},{parseFloat:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(346);v({global:!0,forced:parseInt!==g},{parseInt:g})}),(function(T,P,a){"use strict";a(386),a(402),a(404),a(405),a(406),a(407)}),(function(T,P,a){"use strict";var v=a(3),g=a(36),p=a(189),x=a(4),y=a(80),b=a(8),A=a(47),I=a(119),R=a(82),O=a(201),M=a(30),L=a(21),D=a(20),N=a(216),F=a(387),G=a(389).set,j=a(392),X=a(397),U=a(398),V=a(394),k=a(51),Y=a(399),K=a(400),J=a(401),Z="Promise",Q=K.CONSTRUCTOR,at=K.REJECTION_EVENT,et=K.SUBCLASSING,rt=k.getterFor(Z),nt=k.set,ut=Y&&Y.prototype,ht=Y,pt=ut,yt=x.TypeError,At=x.document,Et=x.process,Ht=J.f,Ut=Ht,kt=!!(At&&At.createEvent&&x.dispatchEvent),Ct="unhandledrejection",It="rejectionhandled",Dt=0,Vt=1,_t=2,Nt=1,Jt=2,ne,ve,le,fe,Ce=function($t){var Xt;return D($t)&&L(Xt=$t.then)?Xt:!1},Be=function($t,Xt){var re=Xt.value,oe=Xt.state===Vt,pe=oe?$t.ok:$t.fail,rn=$t.resolve,vt=$t.reject,Rt=$t.domain,Tt,wt,Ft;try{pe?(oe||(Xt.rejection===Jt&&Pt(Xt),Xt.rejection=Nt),pe===!0?Tt=re:(Rt&&Rt.enter(),Tt=pe(re),Rt&&(Rt.exit(),Ft=!0)),Tt===$t.promise?vt(new yt("Promise-chain cycle")):(wt=Ce(Tt))?b(wt,Tt,rn,vt):rn(Tt)):vt(re)}catch(Lt){Rt&&!Ft&&Rt.exit(),vt(Lt)}},Ie=function($t,Xt){$t.notified||($t.notified=!0,j(function(){for(var re=$t.reactions,oe;oe=re.get();)Be(oe,$t);$t.notified=!1,Xt&&!$t.rejection&&xe($t)}))},ce=function($t,Xt,re){var oe,pe;kt?(oe=At.createEvent("Event"),oe.promise=Xt,oe.reason=re,oe.initEvent($t,!1,!0),x.dispatchEvent(oe)):oe={promise:Xt,reason:re},!at&&(pe=x["on"+$t])?pe(oe):$t===Ct&&X("Unhandled promise rejection",re)},xe=function($t){b(G,x,function(){var Xt=$t.facade,re=$t.value,oe=Ue($t),pe;if(oe&&(pe=U(function(){p?Et.emit("unhandledRejection",re,Xt):ce(Ct,Xt,re)}),$t.rejection=p||Ue($t)?Jt:Nt,pe.error))throw pe.value})},Ue=function($t){return $t.rejection!==Nt&&!$t.parent},Pt=function($t){b(G,x,function(){var Xt=$t.facade;p?Et.emit("rejectionHandled",Xt):ce(It,Xt,$t.value)})},zt=function($t,Xt,re){return function(oe){$t(Xt,oe,re)}},jt=function($t,Xt,re){$t.done||($t.done=!0,re&&($t=re),$t.value=Xt,$t.state=_t,Ie($t,!0))},we=function($t,Xt,re){if(!$t.done){$t.done=!0,re&&($t=re);try{if($t.facade===Xt)throw new yt("Promise can't be resolved itself");var oe=Ce(Xt);oe?j(function(){var pe={done:!1};try{b(oe,Xt,zt(we,pe,$t),zt(jt,pe,$t))}catch(rn){jt(pe,rn,$t)}}):($t.value=Xt,$t.state=Vt,Ie($t,!1))}catch(pe){jt({done:!1},pe,$t)}}};if(Q&&(ht=function(Xt){N(this,pt),M(Xt),b(ne,this);var re=rt(this);try{Xt(zt(we,re),zt(jt,re))}catch(oe){jt(re,oe)}},pt=ht.prototype,ne=function(Xt){nt(this,{type:Z,done:!1,notified:!1,parent:!1,reactions:new V,rejection:!1,state:Dt,value:null})},ne.prototype=A(pt,"then",function(Xt,re){var oe=rt(this),pe=Ht(F(this,ht));return oe.parent=!0,pe.ok=L(Xt)?Xt:!0,pe.fail=L(re)&&re,pe.domain=p?Et.domain:void 0,oe.state===Dt?oe.reactions.add(pe):j(function(){Be(pe,oe)}),pe.promise}),ve=function(){var $t=new ne,Xt=rt($t);this.promise=$t,this.resolve=zt(we,Xt),this.reject=zt(jt,Xt)},J.f=Ht=function($t){return $t===ht||$t===le?new ve($t):Ut($t)},!g&&L(Y)&&ut!==Object.prototype)){fe=ut.then,et||A(ut,"then",function(Xt,re){var oe=this;return new ht(function(pe,rn){b(fe,oe,pe,rn)}).then(Xt,re)},{unsafe:!0});try{delete ut.constructor}catch($t){}I&&I(ut,pt)}v({global:!0,constructor:!0,wrap:!0,forced:Q},{Promise:ht}),le=y.Promise,R(ht,Z,!1,!0),O(Z)}),(function(T,P,a){"use strict";var v=a(46),g=a(388),p=a(17),x=a(33),y=x("species");T.exports=function(b,A){var I=v(b).constructor,R;return I===void 0||p(R=v(I)[y])?A:g(R)}}),(function(T,P,a){"use strict";var v=a(89),g=a(31),p=TypeError;T.exports=function(x){if(v(x))return x;throw new p(g(x)+" is not a constructor")}}),(function(T,P,a){"use strict";var v=a(4),g=a(117),p=a(84),x=a(21),y=a(38),b=a(7),A=a(74),I=a(76),R=a(42),O=a(390),M=a(391),L=a(189),D=v.setImmediate,N=v.clearImmediate,F=v.process,G=v.Dispatch,j=v.Function,X=v.MessageChannel,U=v.String,V=0,k={},Y="onreadystatechange",K,J,Z,Q;b(function(){K=v.location});var at=function(ut){if(y(k,ut)){var ht=k[ut];delete k[ut],ht()}},et=function(ut){return function(){at(ut)}},rt=function(ut){at(ut.data)},nt=function(ut){v.postMessage(U(ut),K.protocol+"//"+K.host)};(!D||!N)&&(D=function(ht){O(arguments.length,1);var pt=x(ht)?ht:j(ht),yt=I(arguments,1);return k[++V]=function(){g(pt,void 0,yt)},J(V),V},N=function(ht){delete k[ht]},L?J=function(ut){F.nextTick(et(ut))}:G&&G.now?J=function(ut){G.now(et(ut))}:X&&!M?(Z=new X,Q=Z.port2,Z.port1.onmessage=rt,J=p(Q.postMessage,Q)):v.addEventListener&&x(v.postMessage)&&!v.importScripts&&K&&K.protocol!=="file:"&&!b(nt)?(J=nt,v.addEventListener("message",rt,!1)):Y in R("script")?J=function(ut){A.appendChild(R("script"))[Y]=function(){A.removeChild(this),at(ut)}}:J=function(ut){setTimeout(et(ut),0)}),T.exports={set:D,clear:N}}),(function(T){"use strict";var P=TypeError;T.exports=function(a,v){if(a<v)throw new P("Not enough arguments");return a}}),(function(T,P,a){"use strict";var v=a(28);T.exports=/ipad|iphone|ipod/i.test(v)&&/applewebkit/i.test(v)}),(function(T,P,a){"use strict";var v=a(4),g=a(393),p=a(84),x=a(389).set,y=a(394),b=a(391),A=a(395),I=a(396),R=a(189),O=v.MutationObserver||v.WebKitMutationObserver,M=v.document,L=v.process,D=v.Promise,N=g("queueMicrotask"),F,G,j,X,U;if(!N){var V=new y,k=function(){var Y,K;for(R&&(Y=L.domain)&&Y.exit();K=V.get();)try{K()}catch(J){throw V.head&&F(),J}Y&&Y.enter()};!b&&!R&&!I&&O&&M?(G=!0,j=M.createTextNode(""),new O(k).observe(j,{characterData:!0}),F=function(){j.data=G=!G}):!A&&D&&D.resolve?(X=D.resolve(void 0),X.constructor=D,U=p(X.then,X),F=function(){U(k)}):R?F=function(){L.nextTick(k)}:(x=p(x,v),F=function(){x(k)}),N=function(Y){V.head||F(),V.add(Y)}}T.exports=N}),(function(T,P,a){"use strict";var v=a(4),g=a(6),p=Object.getOwnPropertyDescriptor;T.exports=function(x){if(!g)return v[x];var y=p(v,x);return y&&y.value}}),(function(T){"use strict";var P=function(){this.head=null,this.tail=null};P.prototype={add:function(a){var v={item:a,next:null},g=this.tail;g?g.next=v:this.head=v,this.tail=v},get:function(){var a=this.head;if(a){var v=this.head=a.next;return v===null&&(this.tail=null),a.item}}},T.exports=P}),(function(T,P,a){"use strict";var v=a(28);T.exports=/ipad|iphone|ipod/i.test(v)&&typeof Pebble!="undefined"}),(function(T,P,a){"use strict";var v=a(28);T.exports=/web0s(?!.*chrome)/i.test(v)}),(function(T){"use strict";T.exports=function(P,a){try{arguments.length===1?console.error(P):console.error(P,a)}catch(v){}}}),(function(T){"use strict";T.exports=function(P){try{return{error:!1,value:P()}}catch(a){return{error:!0,value:a}}}}),(function(T,P,a){"use strict";var v=a(4);T.exports=v.Promise}),(function(T,P,a){"use strict";var v=a(4),g=a(399),p=a(21),x=a(67),y=a(50),b=a(33),A=a(190),I=a(36),R=a(27),O=g&&g.prototype,M=b("species"),L=!1,D=p(v.PromiseRejectionEvent),N=x("Promise",function(){var F=y(g),G=F!==String(g);if(!G&&R===66||I&&!(O.catch&&O.finally))return!0;if(!R||R<51||!/native code/.test(F)){var j=new g(function(V){V(1)}),X=function(V){V(function(){},function(){})},U=j.constructor={};if(U[M]=X,L=j.then(function(){})instanceof X,!L)return!0}return!G&&(A==="BROWSER"||A==="DENO")&&!D});T.exports={CONSTRUCTOR:N,REJECTION_EVENT:D,SUBCLASSING:L}}),(function(T,P,a){"use strict";var v=a(30),g=TypeError,p=function(x){var y,b;this.promise=new x(function(A,I){if(y!==void 0||b!==void 0)throw new g("Bad Promise constructor");y=A,b=I}),this.resolve=v(y),this.reject=v(b)};T.exports.f=function(x){return new p(x)}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(401),y=a(398),b=a(137),A=a(403);v({target:"Promise",stat:!0,forced:A},{all:function(R){var O=this,M=x.f(O),L=M.resolve,D=M.reject,N=y(function(){var F=p(O.resolve),G=[],j=0,X=1;b(R,function(U){var V=j++,k=!1;X++,g(F,O,U).then(function(Y){k||(k=!0,G[V]=Y,--X||L(G))},D)}),--X||L(G)});return N.error&&D(N.value),M.promise}})}),(function(T,P,a){"use strict";var v=a(399),g=a(172),p=a(400).CONSTRUCTOR;T.exports=p||!g(function(x){v.all(x).then(void 0,function(){})})}),(function(T,P,a){"use strict";var v=a(3),g=a(36),p=a(400).CONSTRUCTOR,x=a(399),y=a(23),b=a(21),A=a(47),I=x&&x.prototype;if(v({target:"Promise",proto:!0,forced:p,real:!0},{catch:function(O){return this.then(void 0,O)}}),!g&&b(x)){var R=y("Promise").prototype.catch;I.catch!==R&&A(I,"catch",R,{unsafe:!0})}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(401),y=a(398),b=a(137),A=a(403);v({target:"Promise",stat:!0,forced:A},{race:function(R){var O=this,M=x.f(O),L=M.reject,D=y(function(){var N=p(O.resolve);b(R,function(F){g(N,O,F).then(M.resolve,L)})});return D.error&&L(D.value),M.promise}})}),(function(T,P,a){"use strict";var v=a(3),g=a(401),p=a(400).CONSTRUCTOR;v({target:"Promise",stat:!0,forced:p},{reject:function(y){var b=g.f(this),A=b.reject;return A(y),b.promise}})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(36),x=a(399),y=a(400).CONSTRUCTOR,b=a(408),A=g("Promise"),I=p&&!y;v({target:"Promise",stat:!0,forced:p||y},{resolve:function(O){return b(I&&this===A?x:this,O)}})}),(function(T,P,a){"use strict";var v=a(46),g=a(20),p=a(401);T.exports=function(x,y){if(v(x),g(y)&&y.constructor===x)return y;var b=p.f(x),A=b.resolve;return A(y),b.promise}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(401),y=a(398),b=a(137),A=a(403);v({target:"Promise",stat:!0,forced:A},{allSettled:function(R){var O=this,M=x.f(O),L=M.resolve,D=M.reject,N=y(function(){var F=p(O.resolve),G=[],j=0,X=1;b(R,function(U){var V=j++,k=!1;X++,g(F,O,U).then(function(Y){k||(k=!0,G[V]={status:"fulfilled",value:Y},--X||L(G))},function(Y){k||(k=!0,G[V]={status:"rejected",reason:Y},--X||L(G))})}),--X||L(G)});return N.error&&D(N.value),M.promise}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(23),y=a(401),b=a(398),A=a(137),I=a(403),R="No one promise resolved";v({target:"Promise",stat:!0,forced:I},{any:function(M){var L=this,D=x("AggregateError"),N=y.f(L),F=N.resolve,G=N.reject,j=b(function(){var X=p(L.resolve),U=[],V=0,k=1,Y=!1;A(M,function(K){var J=V++,Z=!1;k++,g(X,L,K).then(function(Q){Z||Y||(Y=!0,F(Q))},function(Q){Z||Y||(Z=!0,U[J]=Q,--k||G(new D(U,R)))})}),--k||G(new D(U,R))});return j.error&&G(j.value),N.promise}})}),(function(T,P,a){"use strict";var v=a(3),g=a(36),p=a(399),x=a(7),y=a(23),b=a(21),A=a(387),I=a(408),R=a(47),O=p&&p.prototype,M=!!p&&x(function(){O.finally.call({then:function(){}},function(){})});if(v({target:"Promise",proto:!0,real:!0,forced:M},{finally:function(D){var N=A(this,y("Promise")),F=b(D);return this.then(F?function(G){return I(N,D()).then(function(){return G})}:D,F?function(G){return I(N,D()).then(function(){throw G})}:D)}}),!g&&b(p)){var L=y("Promise").prototype.finally;O.finally!==L&&R(O,"finally",L,{unsafe:!0})}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(117),x=a(76),y=a(408),b=a(401),A=a(30),I=a(398),R=a(7),O=g.Promise,M=!1,L=!O||!O.try||R(function(){var D=O.resolve();return O.try(function(N){return M=N===8,D},8)!==D})||!M;v({target:"Promise",stat:!0,forced:L},{try:function(D){var N=arguments.length>1?x(arguments,1):[],F=I(function(){return p(A(D),void 0,N)});if(!F.error)return y(this,F.value);var G=b.f(this),j=G.reject;return j(F.value),G.promise}})}),(function(T,P,a){"use strict";var v=a(3),g=a(401);v({target:"Promise",stat:!0},{withResolvers:function(){var x=g.f(this);return{promise:x.promise,resolve:x.resolve,reject:x.reject}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(415),p=a(7),x=Array.fromAsync,y=!x||p(function(){var b=0;return x.call(function(){return b++,[]},{length:0}),b!==1});v({target:"Array",stat:!0,forced:y},{fromAsync:g})}),(function(T,P,a){"use strict";var v=a(84),g=a(14),p=a(89),x=a(416),y=a(140),b=a(269),A=a(141),I=a(29),R=a(23),O=a(206),M=a(33),L=a(417),D=a(419).toArray,N=M("asyncIterator"),F=g(O("Array","values")),G=g(F([]).next),j=function(){return new X(this)},X=function(U){this.iterator=F(U)};X.prototype.next=function(){return G(this.iterator)},T.exports=function(V){var k=this,Y=arguments.length,K=Y>1?arguments[1]:void 0,J=Y>2?arguments[2]:void 0;return new(R("Promise"))(function(Z){K!==void 0&&(K=v(K,J));var Q=I(V,N),at=Q?void 0:A(V)||j,et=p(k)?new k:[],rt=Q?x(V,Q):new L(b(y(V,at)));Z(D(rt,K,et))})}}),(function(T,P,a){"use strict";var v=a(8),g=a(417),p=a(46),x=a(140),y=a(269),b=a(29),A=a(33),I=A("asyncIterator");T.exports=function(R,O){var M=arguments.length<2?b(R,I):O;return M?p(v(M,R)):new g(y(x(R)))}}),(function(T,P,a){"use strict";var v=a(8),g=a(46),p=a(71),x=a(29),y=a(215),b=a(51),A=a(142),I=a(23),R=a(418),O=a(180),M=I("Promise"),L="AsyncFromSyncIterator",D=b.set,N=b.getterFor(L),F=function(j,X,U,V,k){var Y=j.done;M.resolve(j.value).then(function(K){X(O(K,Y))},function(K){if(!Y&&k)try{A(V,"throw",K)}catch(J){K=J}U(K)})},G=function(X){X.type=L,D(this,X)};G.prototype=y(p(R),{next:function(){var X=N(this),U=arguments.length>0,V=U?arguments[0]:void 0;return new M(function(k,Y){var K=g(U?v(X.next,X.iterator,V):v(X.next,X.iterator));F(K,k,Y,X.iterator,!0)})},return:function(){var j=N(this),X=j.iterator,U=arguments.length>0,V=U?arguments[0]:void 0;return new M(function(k,Y){var K=x(X,"return");if(K===void 0)return k(O(V,!0));var J=g(U?v(K,X,V):v(K,X));F(J,k,Y,X)})},throw:function(){var j=N(this),X=j.iterator,U=arguments.length>0,V=U?arguments[0]:void 0;return new M(function(k,Y){var K=x(X,"throw");if(K===void 0){try{A(X,"normal")}catch(Z){return Y(Z)}return Y(new TypeError("The iterator does not provide a throw method"))}var J=g(U?v(K,X,V):v(K,X));F(J,k,Y,X,!0)})}}),T.exports=G}),(function(T,P,a){"use strict";var v=a(4),g=a(35),p=a(21),x=a(71),y=a(135),b=a(47),A=a(33),I=a(36),R="USE_FUNCTION_CONSTRUCTOR",O=A("asyncIterator"),M=v.AsyncIterator,L=g.AsyncIteratorPrototype,D,N;if(L)D=L;else if(p(M))D=M.prototype;else if(g[R]||v[R])try{N=y(y(y(Function("return async function*(){}()")()))),y(N)===Object.prototype&&(D=N)}catch(F){}D?I&&(D=x(D)):D={},p(D[O])||b(D,O,function(){return this}),T.exports=D}),(function(T,P,a){"use strict";var v=a(8),g=a(30),p=a(46),x=a(20),y=a(148),b=a(23),A=a(90),I=a(149),R=a(269),O=a(420),M=function(L){var D=L===0,N=L===1,F=L===2,G=L===3;return function(j,X,U){p(j);var V=X!==void 0;(V||!D)&&g(X);var k=R(j),Y=b("Promise"),K=k.iterator,J=k.next,Z=0;return new Y(function(Q,at){var et=function(nt){O(K,at,nt,at)},rt=function(){try{try{y(Z)}catch(nt){return et(nt)}Y.resolve(p(v(J,K))).then(function(nt){try{if(p(nt).done)D?(I(U,Z),Q(U)):Q(G?!1:F||void 0);else{var ut=nt.value;try{if(V){var ht=Z++,pt=X(ut,ht),yt=function(At){if(N)rt();else if(F)At?rt():O(K,Q,!1,at);else if(D)try{A(U,ht,At),rt()}catch(Et){et(Et)}else At?O(K,Q,G||ut,at):rt()};x(pt)?Y.resolve(pt).then(yt,et):yt(pt)}else A(U,Z++,ut),rt()}catch(At){et(At)}}}catch(At){at(At)}},at)}catch(nt){at(nt)}};rt()})}};T.exports={toArray:M(0),forEach:M(1),every:M(2),some:M(3),find:M(4)}}),(function(T,P,a){"use strict";var v=a(8),g=a(46),p=a(23),x=a(29);T.exports=function(y,b,A,I){try{var R=x(y,"return");if(R)return p("Promise").resolve(v(R,y)).then(function(O){try{b!==I&&g(O)}catch(M){I(M);return}b(A)},function(O){b===I?b(A):I(O)})}catch(O){return I(b===I?A:O)}b(A)}}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(23),x=a(30),y=a(216),b=a(47),A=a(215),I=a(77),R=a(33),O=a(51),M=a(255),L=a(27),D=p("Promise"),N=p("SuppressedError"),F=ReferenceError,G=R("asyncDispose"),j=R("toStringTag"),X="AsyncDisposableStack",U=O.set,V=O.getterFor(X),k="async-dispose",Y="disposed",K="pending",J=function(et){var rt=V(et);if(rt.state===Y)throw new F(X+" already disposed");return rt},Z=function(){U(y(this,Q),{type:X,state:K,stack:[]}),g||(this.disposed=!1)},Q=Z.prototype;A(Q,{disposeAsync:function(){var rt=this;return new D(function(nt,ut){var ht=V(rt);if(ht.state===Y)return nt(void 0);ht.state=Y,g||(rt.disposed=!0);var pt=ht.stack,yt=pt.length,At=!1,Et,Ht=function(kt){At?Et=new N(kt,Et):(At=!0,Et=kt),Ut()},Ut=function(){if(yt){var kt=pt[--yt];pt[yt]=null;try{D.resolve(kt()).then(Ut,Ht)}catch(Ct){Ht(Ct)}}else ht.stack=null,At?ut(Et):nt(void 0)};Ut()})},use:function(rt){return M(J(this),rt,k),rt},adopt:function(rt,nt){var ut=J(this);return x(nt),M(ut,void 0,k,function(){return nt(rt)}),rt},defer:function(rt){var nt=J(this);x(rt),M(nt,void 0,k,rt)},move:function(){var rt=J(this),nt=new Z;return V(nt).stack=rt.stack,rt.stack=[],rt.state=Y,g||(this.disposed=!0),nt}}),g&&I(Q,"disposed",{configurable:!0,get:function(){return V(this).state===Y}}),b(Q,G,Q.disposeAsync,{name:"disposeAsync"}),b(Q,j,X,{nonWritable:!0});var at=L&&L<136;v({global:!0,constructor:!0,forced:at},{AsyncDisposableStack:Z})}),(function(T,P,a){"use strict";var v=a(8),g=a(47),p=a(23),x=a(29),y=a(38),b=a(33),A=a(418),I=b("asyncDispose"),R=p("Promise");y(A,I)||g(A,I,function(){var O=this;return new R(function(M,L){var D=x(O,"return");D?R.resolve(v(D,O)).then(function(){M(void 0)},L):M(void 0)})})}),(function(T,P,a){"use strict";var v=a(3),g=a(117),p=a(30),x=a(46),y=a(7),b=!y(function(){Reflect.apply(function(){})});v({target:"Reflect",stat:!0,forced:b},{apply:function(I,R,O){return g(p(I),R,x(O))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(117),x=a(258),y=a(388),b=a(46),A=a(20),I=a(71),R=a(7),O=g("Reflect","construct"),M=Object.prototype,L=[].push,D=R(function(){function G(){}return!(O(function(){},[],G)instanceof G)}),N=!R(function(){O(function(){})}),F=D||N;v({target:"Reflect",stat:!0,forced:F,sham:F},{construct:function(j,X){y(j);var U=arguments.length<3?j:y(arguments[2]);if(b(X),N&&!D)return O(j,X,U);if(j===U){switch(X.length){case 0:return new j;case 1:return new j(X[0]);case 2:return new j(X[0],X[1]);case 3:return new j(X[0],X[1],X[2]);case 4:return new j(X[0],X[1],X[2],X[3])}var V=[null];return p(L,V,X),new(p(x,j,V))}var k=U.prototype,Y=I(A(k)?k:M),K=p(j,Y,X);return A(K)?K:Y}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(46),x=a(18),y=a(44),b=a(21),A=a(7),I=TypeError,R=A(function(){Reflect.defineProperty(y.f({},1,{value:1}),1,{value:2})});v({target:"Reflect",stat:!0,forced:R,sham:!g},{defineProperty:function(M,L,D){p(M);var N=x(L),F,G;if(p(D),("get"in D||"set"in D)&&("get"in D&&!b(F=D.get)&&F!==void 0||"set"in D&&!b(G=D.set)&&G!==void 0||"value"in D||"writable"in D))throw new I("Invalid property descriptor");try{return y.f(M,N,D),!0}catch(j){return!1}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(5).f,x=a(18);v({target:"Reflect",stat:!0},{deleteProperty:function(b,A){g(b);var I=x(A),R=p(b,I);return R&&!R.configurable?!1:delete b[I]}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(20),x=a(46),y=a(428),b=a(5),A=a(135),I=a(18),R=function(O,M,L){if(x(O)===L)return O[M];var D=b.f(O,M);if(D)return y(D)?D.value:D.get===void 0?void 0:g(D.get,L);var N=A(O);if(p(N))return R(N,M,L)};v({target:"Reflect",stat:!0},{get:function(M,L){return R(x(M),I(L),arguments.length<3?M:arguments[2])}})}),(function(T,P,a){"use strict";var v=a(38);T.exports=function(g){return g!==void 0&&(v(g,"value")||v(g,"writable"))}}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(46),x=a(5);v({target:"Reflect",stat:!0,sham:!g},{getOwnPropertyDescriptor:function(b,A){return x.f(p(b),A)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(135),x=a(136);v({target:"Reflect",stat:!0,sham:!x},{getPrototypeOf:function(b){return p(g(b))}})}),(function(T,P,a){"use strict";var v=a(3);v({target:"Reflect",stat:!0},{has:function(p,x){return x in p}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(301);v({target:"Reflect",stat:!0},{isExtensible:function(y){return g(y),p(y)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(56);v({target:"Reflect",stat:!0},{ownKeys:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(46),x=a(295);v({target:"Reflect",stat:!0,sham:!x},{preventExtensions:function(b){p(b);try{var A=g("Object","preventExtensions");return A&&A(b),!0}catch(I){return!1}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(46),x=a(20),y=a(428),b=a(7),A=a(44),I=a(5),R=a(135),O=a(11),M=a(18),L=function(N,F,G,j){var X=I.f(p(N),F),U,V,k;if(!X){if(x(V=R(N)))return L(V,F,G,j);X=O(0)}if(y(X)){if(X.writable===!1||!x(j))return!1;if(U=I.f(j,F)){if(!y(U)||U.writable===!1)return!1;A.f(j,F,{value:G})}else try{A.f(j,F,O(0,G))}catch(Y){return!1}}else{if(k=X.set,k===void 0)return!1;g(k,j,G)}return!0},D=b(function(){var N=function(){},F=A.f(new N,"a",{configurable:!0});return Reflect.set(N.prototype,"a",1,F)!==!1});v({target:"Reflect",stat:!0,forced:D},{set:function(F,G,j){return L(p(F),M(G),j,arguments.length<4?F:arguments[3])}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(121),x=a(119);x&&v({target:"Reflect",stat:!0},{setPrototypeOf:function(b,A){g(b),p(A);try{return x(b,A),!0}catch(I){return!1}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(82);v({global:!0},{Reflect:{}}),p(g.Reflect,"Reflect",!0)}),(function(T,P,a){"use strict";var v=a(6),g=a(4),p=a(14),x=a(67),y=a(124),b=a(43),A=a(71),I=a(57).f,R=a(24),O=a(439),M=a(68),L=a(440),D=a(443),N=a(123),F=a(47),G=a(7),j=a(38),X=a(51).enforce,U=a(201),V=a(33),k=a(444),Y=a(445),K=V("match"),J=g.RegExp,Z=J.prototype,Q=g.SyntaxError,at=p(Z.exec),et=p("".charAt),rt=p("".replace),nt=p("".indexOf),ut=p("".slice),ht=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,pt=/a/g,yt=/a/g,At=new J(pt)!==pt,Et=D.MISSED_STICKY,Ht=D.UNSUPPORTED_Y,Ut=v&&(!At||Et||k||Y||G(function(){return yt[K]=!1,J(pt)!==pt||J(yt)===yt||String(J(pt,"i"))!=="/a/i"})),kt=function(_t){for(var Nt=_t.length,Jt=0,ne="",ve=!1,le;Jt<Nt;Jt++){if(le=et(_t,Jt),le==="\\"){ne+=le+et(_t,++Jt);continue}!ve&&le==="."?ne+="[\\s\\S]":(le==="["?ve=!0:le==="]"&&(ve=!1),ne+=le)}return ne},Ct=function(_t){for(var Nt=_t.length,Jt=0,ne="",ve=[],le=A(null),fe=!1,Ce=!1,Be=0,Ie="",ce;Jt<Nt;Jt++){if(ce=et(_t,Jt),ce==="\\"){if(ce+=et(_t,++Jt),!Ce&&et(ce,1)==="\\"){ne+="\\x5c";continue}}else if(ce==="]")fe=!1;else if(!fe)switch(!0){case ce==="[":fe=!0;break;case ce==="(":ne+=ce,at(ht,ut(_t,Jt+1))?(Jt+=2,Ce=!0,Be++):et(_t,Jt+1)!=="?"&&Be++;continue;case(ce===">"&&Ce):if(Ie===""||j(le,Ie))throw new Q("Invalid capture group name");le[Ie]=!0,ve[ve.length]=[Ie,Be],Ce=!1,Ie="";continue}Ce?Ie+=ce:ne+=ce}for(var xe=0;xe<ve.length;xe++)for(var Ue="\\k<"+ve[xe][0]+">",Pt="\\"+ve[xe][1];nt(ne,Ue)>-1;)ne=rt(ne,Ue,Pt);return[ne,ve]};if(x("RegExp",Ut)){for(var It=function(Nt,Jt){var ne=R(Z,this),ve=O(Nt),le=Jt===void 0,fe=[],Ce=Nt,Be,Ie,ce,xe,Ue,Pt;if(!ne&&ve&&le&&Nt.constructor===It)return Nt;if((ve||R(Z,Nt))&&(Nt=Nt.source,le&&(Jt=L(Ce))),Nt=Nt===void 0?"":M(Nt),Jt=Jt===void 0?"":M(Jt),Ce=Nt,k&&"dotAll"in pt&&(Ie=!!Jt&&nt(Jt,"s")>-1,Ie&&(Jt=rt(Jt,/s/g,""))),Be=Jt,Et&&"sticky"in pt&&(ce=!!Jt&&nt(Jt,"y")>-1,ce&&Ht&&(Jt=rt(Jt,/y/g,""))),Y&&(xe=Ct(Nt),Nt=xe[0],fe=xe[1]),Ue=y(J(Nt,Jt),ne?this:Z,It),(Ie||ce||fe.length)&&(Pt=X(Ue),Ie&&(Pt.dotAll=!0,Pt.raw=It(kt(Nt),Be)),ce&&(Pt.sticky=!0),fe.length&&(Pt.groups=fe)),Nt!==Ce)try{b(Ue,"source",Ce===""?"(?:)":Ce)}catch(zt){}return Ue},Dt=I(J),Vt=0;Dt.length>Vt;)N(It,J,Dt[Vt++]);Z.constructor=It,It.prototype=Z,F(g,"RegExp",It,{constructor:!0})}U("RegExp")}),(function(T,P,a){"use strict";var v=a(20),g=a(15),p=a(33),x=p("match");T.exports=function(y){var b;return v(y)&&((b=y[x])!==void 0?!!b:g(y)==="RegExp")}}),(function(T,P,a){"use strict";var v=a(8),g=a(38),p=a(24),x=a(441),y=a(442),b=RegExp.prototype;T.exports=x.correct?function(A){return A.flags}:function(A){return!x.correct&&p(b,A)&&!g(A,"flags")?v(y,A):A.flags}}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=v.RegExp,x=!g(function(){var y=!0;try{p(".","d")}catch(D){y=!1}var b={},A="",I=y?"dgimsy":"gimsy",R=function(D,N){Object.defineProperty(b,D,{get:function(){return A+=N,!0}})},O={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};y&&(O.hasIndices="d");for(var M in O)R(M,O[M]);var L=Object.getOwnPropertyDescriptor(p.prototype,"flags").get.call(b);return L!==I||A!==I});T.exports={correct:x}}),(function(T,P,a){"use strict";var v=a(46);T.exports=function(){var g=v(this),p="";return g.hasIndices&&(p+="d"),g.global&&(p+="g"),g.ignoreCase&&(p+="i"),g.multiline&&(p+="m"),g.dotAll&&(p+="s"),g.unicode&&(p+="u"),g.unicodeSets&&(p+="v"),g.sticky&&(p+="y"),p}}),(function(T,P,a){"use strict";var v=a(7),g=a(4),p=g.RegExp,x=v(function(){var A=p("a","y");return A.lastIndex=2,A.exec("abcd")!==null}),y=x||v(function(){return!p("a","y").sticky}),b=x||v(function(){var A=p("^r","gy");return A.lastIndex=2,A.exec("str")!==null});T.exports={BROKEN_CARET:b,MISSED_STICKY:y,UNSUPPORTED_Y:x}}),(function(T,P,a){"use strict";var v=a(7),g=a(4),p=g.RegExp;T.exports=v(function(){var x=p(".","s");return!(x.dotAll&&x.test(`
28
+ `)&&x.flags==="s")})}),(function(T,P,a){"use strict";var v=a(7),g=a(4),p=g.RegExp;T.exports=v(function(){var x=p("(?<a>b)","g");return x.exec("b").groups.a!=="b"||"b".replace(x,"$<a>c")!=="bc"})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(447),x=a(38),y=a(248).start,b=a(333),A=Array,I=RegExp.escape,R=g("".charAt),O=g("".charCodeAt),M=g(1.1.toString),L=g([].join),D=/^[0-9a-z]/i,N=/^[$()*+./?[\\\]^{|}]/,F=RegExp("^[!\"#%&',\\-:;<=>@`~"+b+"]"),G=g(D.exec),j={" ":"t","\n":"n","\v":"v","\f":"f","\r":"r"},X=function(V){var k=M(O(V,0),16);return k.length<3?"\\x"+y(k,2,"0"):"\\u"+y(k,4,"0")},U=!I||I("ab")!=="\\x61b";v({target:"RegExp",stat:!0,forced:U},{escape:function(k){p(k);for(var Y=k.length,K=A(Y),J=0;J<Y;J++){var Z=R(k,J);if(J===0&&G(D,Z))K[J]=X(Z);else if(x(j,Z))K[J]="\\"+j[Z];else if(G(N,Z))K[J]="\\"+Z;else if(G(F,Z))K[J]=X(Z);else{var Q=O(Z,0);(Q&63488)!==55296?K[J]=Z:Q>=56320||J+1>=Y||(O(k,J+1)&64512)!==56320?K[J]=X(Z):(K[J]=Z,K[++J]=R(k,J))}}return L(K,"")}})}),(function(T){"use strict";var P=TypeError;T.exports=function(a){if(typeof a=="string")return a;throw new P("Argument is not a string")}}),(function(T,P,a){"use strict";var v=a(6),g=a(444),p=a(15),x=a(77),y=a(51).get,b=RegExp.prototype,A=TypeError;v&&g&&x(b,"dotAll",{configurable:!0,get:function(){if(this!==b){if(p(this)==="RegExp")return!!y(this).dotAll;throw new A("Incompatible receiver, RegExp required")}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(450);v({target:"RegExp",proto:!0,forced:/./.exec!==g},{exec:g})}),(function(T,P,a){"use strict";var v=a(8),g=a(14),p=a(68),x=a(442),y=a(443),b=a(34),A=a(71),I=a(51).get,R=a(444),O=a(445),M=b("native-string-replace",String.prototype.replace),L=RegExp.prototype.exec,D=L,N=g("".charAt),F=g("".indexOf),G=g("".replace),j=g("".slice),X=(function(){var K=/a/,J=/b*/g;return v(L,K,"a"),v(L,J,"a"),K.lastIndex!==0||J.lastIndex!==0})(),U=y.BROKEN_CARET,V=/()??/.exec("")[1]!==void 0,k=X||V||U||R||O,Y=function(K,J){for(var Z=K.groups=A(null),Q=0;Q<J.length;Q++){var at=J[Q];Z[at[0]]=K[at[1]]}};k&&(D=function(J){var Z=this,Q=I(Z),at=p(J),et=Q.raw,rt,nt,ut;if(et)return et.lastIndex=Z.lastIndex,rt=v(D,et,at),Z.lastIndex=et.lastIndex,rt&&Q.groups&&Y(rt,Q.groups),rt;var ht=Q.groups,pt=U&&Z.sticky,yt=v(x,Z),At=Z.source,Et=0,Ht=at;if(pt){yt=G(yt,"y",""),F(yt,"g")===-1&&(yt+="g"),Ht=j(at,Z.lastIndex);var Ut=Z.lastIndex>0&&N(at,Z.lastIndex-1);Z.lastIndex>0&&(!Z.multiline||Z.multiline&&Ut!==`
29
+ `&&Ut!=="\r"&&Ut!=="\u2028"&&Ut!=="\u2029")&&(At="(?: (?:"+At+"))",Ht=" "+Ht,Et++),nt=new RegExp("^(?:"+At+")",yt)}V&&(nt=new RegExp("^"+At+"$(?!\\s)",yt)),X&&(ut=Z.lastIndex);var kt=v(L,pt?nt:Z,Ht);return pt?kt?(kt.input=at,kt[0]=j(kt[0],Et),kt.index=Z.lastIndex,Z.lastIndex+=kt[0].length):Z.lastIndex=0:X&&kt&&(Z.lastIndex=Z.global?kt.index+kt[0].length:ut),V&&kt&&kt.length>1&&v(M,kt[0],nt,function(){for(var Ct=1;Ct<arguments.length-2;Ct++)arguments[Ct]===void 0&&(kt[Ct]=void 0)}),kt&&ht&&Y(kt,ht),kt}),T.exports=D}),(function(T,P,a){"use strict";var v=a(6),g=a(77),p=a(441),x=a(442);v&&!p.correct&&(g(RegExp.prototype,"flags",{configurable:!0,get:x}),p.correct=!0)}),(function(T,P,a){"use strict";var v=a(6),g=a(443).MISSED_STICKY,p=a(15),x=a(77),y=a(51).get,b=RegExp.prototype,A=TypeError;v&&g&&x(b,"sticky",{configurable:!0,get:function(){if(this!==b){if(p(this)==="RegExp")return!!y(this).sticky;throw new A("Incompatible receiver, RegExp required")}}})}),(function(T,P,a){"use strict";a(449);var v=a(3),g=a(8),p=a(21),x=a(46),y=a(68),b=(function(){var I=!1,R=/[ac]/;return R.exec=function(){return I=!0,/./.exec.apply(this,arguments)},R.test("abc")===!0&&I})(),A=/./.test;v({target:"RegExp",proto:!0,forced:!b},{test:function(I){var R=x(this),O=y(I),M=R.exec;if(!p(M))return g(A,R,O);var L=g(M,R,O);return L===null?!1:(x(L),!0)}})}),(function(T,P,a){"use strict";var v=a(49).PROPER,g=a(47),p=a(46),x=a(68),y=a(7),b=a(440),A="toString",I=RegExp.prototype,R=I[A],O=y(function(){return R.call({source:"a",flags:"b"})!=="/a/b"}),M=v&&R.name!==A;(O||M)&&g(I,A,function(){var D=p(this),N=x(D.source),F=x(b(D));return"/"+N+"/"+F},{unsafe:!0})}),(function(T,P,a){"use strict";a(456)}),(function(T,P,a){"use strict";var v=a(299),g=a(303);v("Set",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},g)}),(function(T,P,a){"use strict";var v=a(3),g=a(458),p=a(7),x=a(466),y=!x("difference",function(A){return A.size===0}),b=y||p(function(){var A={size:1,has:function(){return!0},keys:function(){var R=0;return{next:function(){var O=R++>1;return I.has(1)&&I.clear(),{done:O,value:2}}}}},I=new Set([1,2,3,4]);return I.difference(A).size!==3});v({target:"Set",proto:!0,real:!0,forced:b},{difference:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(460),p=a(461),x=a(464),y=a(465),b=a(462),A=a(463),I=g.has,R=g.remove;T.exports=function(M){var L=v(this),D=y(M),N=p(L);return x(N)<=D.size?b(N,function(F){D.includes(F)&&R(N,F)}):A(D.getIterator(),function(F){I(N,F)&&R(N,F)}),N}}),(function(T,P,a){"use strict";var v=a(460).has;T.exports=function(g){return v(g),g}}),(function(T,P,a){"use strict";var v=a(14),g=Set.prototype;T.exports={Set,add:v(g.add),has:v(g.has),remove:v(g.delete),proto:g}}),(function(T,P,a){"use strict";var v=a(460),g=a(462),p=v.Set,x=v.add;T.exports=function(y){var b=new p;return g(y,function(A){x(b,A)}),b}}),(function(T,P,a){"use strict";var v=a(14),g=a(463),p=a(460),x=p.Set,y=p.proto,b=v(y.forEach),A=v(y.keys),I=A(new x).next;T.exports=function(R,O,M){return M?g({iterator:A(R),next:I},O):b(R,O)}}),(function(T,P,a){"use strict";var v=a(8);T.exports=function(g,p,x){for(var y=x?g:g.iterator,b=g.next,A,I;!(A=v(b,y)).done;)if(I=p(A.value),I!==void 0)return I}}),(function(T,P,a){"use strict";var v=a(120),g=a(460);T.exports=v(g.proto,"size","get")||function(p){return p.size}}),(function(T,P,a){"use strict";var v=a(30),g=a(46),p=a(8),x=a(61),y=a(269),b="Invalid size",A=RangeError,I=TypeError,R=Math.max,O=function(M,L){this.set=M,this.size=R(L,0),this.has=v(M.has),this.keys=v(M.keys)};O.prototype={getIterator:function(){return y(g(p(this.keys,this.set)))},includes:function(M){return p(this.has,this.set,M)}},T.exports=function(M){g(M);var L=+M.size;if(L!==L)throw new I(b);var D=x(L);if(D<0)throw new A(b);return new O(M,D)}}),(function(T,P,a){"use strict";var v=a(23),g=function(x){return{size:x,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},p=function(x){return{size:x,has:function(){return!0},keys:function(){throw new Error("e")}}};T.exports=function(x,y){var b=v("Set");try{new b()[x](g(0));try{return new b()[x](g(-1)),!1}catch(I){if(!y)return!0;try{return new b()[x](p(-1/0)),!1}catch(R){var A=new b([1,2]);return y(A[x](p(1/0)))}}}catch(I){return!1}}}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(468),x=a(466),y=!x("intersection",function(b){return b.size===2&&b.has(1)&&b.has(2)})||g(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});v({target:"Set",proto:!0,real:!0,forced:y},{intersection:p})}),(function(T,P,a){"use strict";var v=a(459),g=a(460),p=a(464),x=a(465),y=a(462),b=a(463),A=g.Set,I=g.add,R=g.has;T.exports=function(M){var L=v(this),D=x(M),N=new A;return p(L)>D.size?b(D.getIterator(),function(F){R(L,F)&&I(N,F)}):y(L,function(F){D.includes(F)&&I(N,F)}),N}}),(function(T,P,a){"use strict";var v=a(3),g=a(470),p=a(466),x=!p("isDisjointFrom",function(y){return!y});v({target:"Set",proto:!0,real:!0,forced:x},{isDisjointFrom:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(460).has,p=a(464),x=a(465),y=a(462),b=a(463),A=a(142);T.exports=function(R){var O=v(this),M=x(R);if(p(O)<=M.size)return y(O,function(D){if(M.includes(D))return!1},!0)!==!1;var L=M.getIterator();return b(L,function(D){if(g(O,D))return A(L.iterator,"normal",!1)})!==!1}}),(function(T,P,a){"use strict";var v=a(3),g=a(472),p=a(466),x=!p("isSubsetOf",function(y){return y});v({target:"Set",proto:!0,real:!0,forced:x},{isSubsetOf:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(464),p=a(462),x=a(465);T.exports=function(b){var A=v(this),I=x(b);return g(A)>I.size?!1:p(A,function(R){if(!I.includes(R))return!1},!0)!==!1}}),(function(T,P,a){"use strict";var v=a(3),g=a(474),p=a(466),x=!p("isSupersetOf",function(y){return!y});v({target:"Set",proto:!0,real:!0,forced:x},{isSupersetOf:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(460).has,p=a(464),x=a(465),y=a(463),b=a(142);T.exports=function(I){var R=v(this),O=x(I);if(p(R)<O.size)return!1;var M=O.getIterator();return y(M,function(L){if(!g(R,L))return b(M.iterator,"normal",!1)})!==!1}}),(function(T,P,a){"use strict";var v=a(3),g=a(476),p=a(477),x=a(466),y=!x("symmetricDifference")||!p("symmetricDifference");v({target:"Set",proto:!0,real:!0,forced:y},{symmetricDifference:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(460),p=a(461),x=a(465),y=a(463),b=g.add,A=g.has,I=g.remove;T.exports=function(O){var M=v(this),L=x(O).getIterator(),D=p(M);return y(L,function(N){A(M,N)?I(D,N):b(D,N)}),D}}),(function(T){"use strict";T.exports=function(P){try{var a=new Set,v={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return a.clear(),a.add(4),function(){return{done:!0}}}})}},g=a[P](v);return g.size===1&&g.values().next().value===4}catch(p){return!1}}}),(function(T,P,a){"use strict";var v=a(3),g=a(479),p=a(477),x=a(466),y=!x("union")||!p("union");v({target:"Set",proto:!0,real:!0,forced:y},{union:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(460).add,p=a(461),x=a(465),y=a(463);T.exports=function(A){var I=v(this),R=x(A).getIterator(),O=p(I);return y(R,function(M){g(O,M)}),O}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(16),x=a(61),y=a(68),b=a(7),A=g("".charAt),I=b(function(){return"\u{20BB7}".at(-2)!=="\uD842"});v({target:"String",proto:!0,forced:I},{at:function(O){var M=y(p(this)),L=M.length,D=x(O),N=D>=0?D:L+D;return N<0||N>=L?void 0:A(M,N)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(482).codeAt;v({target:"String",proto:!0},{codePointAt:function(x){return g(this,x)}})}),(function(T,P,a){"use strict";var v=a(14),g=a(61),p=a(68),x=a(16),y=v("".charAt),b=v("".charCodeAt),A=v("".slice),I=function(R){return function(O,M){var L=p(x(O)),D=g(M),N=L.length,F,G;return D<0||D>=N?R?"":void 0:(F=b(L,D),F<55296||F>56319||D+1===N||(G=b(L,D+1))<56320||G>57343?R?y(L,D):F:R?A(L,D,D+2):(F-55296<<10)+(G-56320)+65536)}};T.exports={codeAt:I(!1),charAt:I(!0)}}),(function(T,P,a){"use strict";var v=a(3),g=a(85),p=a(5).f,x=a(64),y=a(68),b=a(484),A=a(16),I=a(485),R=a(36),O=g("".slice),M=Math.min,L=I("endsWith"),D=!R&&!L&&!!(function(){var N=p(String.prototype,"endsWith");return N&&!N.writable})();v({target:"String",proto:!0,forced:!D&&!L},{endsWith:function(F){var G=y(A(this));b(F);var j=y(F),X=arguments.length>1?arguments[1]:void 0,U=G.length,V=X===void 0?U:M(x(X),U);return O(G,V-j.length,V)===j}})}),(function(T,P,a){"use strict";var v=a(439),g=TypeError;T.exports=function(p){if(v(p))throw new g("The method doesn't accept regular expressions");return p}}),(function(T,P,a){"use strict";var v=a(33),g=v("match");T.exports=function(p){var x=/./;try{"/./"[p](x)}catch(y){try{return x[g]=!1,"/./"[p](x)}catch(b){}}return!1}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(60),x=RangeError,y=String.fromCharCode,b=String.fromCodePoint,A=g([].join),I=!!b&&b.length!==1;v({target:"String",stat:!0,arity:1,forced:I},{fromCodePoint:function(O){for(var M=[],L=arguments.length,D=0,N;L>D;){if(N=+arguments[D],p(N,1114111)!==N)throw new x(N+" is not a valid code point");M[D++]=N<65536?y(N):y(((N-=65536)>>10)+55296,N%1024+56320)}return A(M,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(484),x=a(16),y=a(68),b=a(485),A=g("".indexOf);v({target:"String",proto:!0,forced:!b("includes")},{includes:function(R){return!!~A(y(x(this)),y(p(R)),arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(16),x=a(68),y=g("".charCodeAt);v({target:"String",proto:!0},{isWellFormed:function(){for(var A=x(p(this)),I=A.length,R=0;R<I;R++){var O=y(A,R);if((O&63488)===55296&&(O>=56320||++R>=I||(y(A,R)&64512)!==56320))return!1}return!0}})}),(function(T,P,a){"use strict";var v=a(482).charAt,g=a(68),p=a(51),x=a(177),y=a(180),b="String Iterator",A=p.set,I=p.getterFor(b);x(String,"String",function(R){A(this,{type:b,string:g(R),index:0})},function(){var O=I(this),M=O.string,L=O.index,D;return L>=M.length?y(void 0,!0):(D=v(M,L),O.index+=D.length,y(D,!1))})}),(function(T,P,a){"use strict";var v=a(8),g=a(14),p=a(491),x=a(46),y=a(20),b=a(64),A=a(68),I=a(16),R=a(29),O=a(492),M=a(440),L=a(493),D=g("".indexOf);p("match",function(N,F,G){return[function(X){var U=I(this),V=y(X)?R(X,N):void 0;if(V)return v(V,X,U);var k=A(U);return new RegExp(X)[N](k)},function(j){var X=x(this),U=A(j),V=G(F,X,U);if(V.done)return V.value;var k=A(M(X));if(!~D(k,"g"))return L(X,U);var Y=!!~D(k,"u")||!!~D(k,"v");X.lastIndex=0;for(var K=[],J=0,Z;(Z=L(X,U))!==null;){var Q=A(Z[0]);K[J]=Q,Q===""&&(X.lastIndex=O(U,b(X.lastIndex),Y)),J++}return J===0?null:K}]})}),(function(T,P,a){"use strict";a(449);var v=a(8),g=a(47),p=a(450),x=a(7),y=a(33),b=a(43),A=y("species"),I=RegExp.prototype;T.exports=function(R,O,M,L){var D=y(R),N=!x(function(){var X={};return X[D]=function(){return 7},""[R](X)!==7}),F=N&&!x(function(){var X=!1,U=/a/;if(R==="split"){var V={};V[A]=function(){return U},U={constructor:V,flags:""},U[D]=/./[D]}return U.exec=function(){return X=!0,null},U[D](""),!X});if(!N||!F||M){var G=/./[D],j=O(D,""[R],function(X,U,V,k,Y){var K=U.exec;return K===p||K===I.exec?N&&!Y?{done:!0,value:v(G,U,V,k)}:{done:!0,value:v(X,V,U,k)}:{done:!1}});g(String.prototype,R,j[0]),g(I,D,j[1])}L&&b(I[D],"sham",!0)}}),(function(T,P,a){"use strict";var v=a(482).charAt;T.exports=function(g,p,x){return p+(x&&v(g,p).length||1)}}),(function(T,P,a){"use strict";var v=a(8),g=a(46),p=a(21),x=a(15),y=a(450),b=TypeError;T.exports=function(A,I){var R=A.exec;if(p(R)){var O=v(R,A,I);return O!==null&&g(O),O}if(x(A)==="RegExp")return v(y,A,I);throw new b("RegExp#exec called on incompatible receiver")}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(85),x=a(178),y=a(180),b=a(16),A=a(64),I=a(68),R=a(46),O=a(20),M=a(15),L=a(439),D=a(440),N=a(29),F=a(47),G=a(7),j=a(33),X=a(387),U=a(492),V=a(493),k=a(51),Y=a(36),K=j("matchAll"),J="RegExp String",Z=J+" Iterator",Q=k.set,at=k.getterFor(Z),et=RegExp.prototype,rt=TypeError,nt=p("".indexOf),ut=p("".matchAll),ht=!!ut&&!G(function(){ut("a",/./)}),pt=x(function(Et,Ht,Ut,kt){Q(this,{type:Z,regexp:Et,string:Ht,global:Ut,unicode:kt,done:!1})},J,function(){var Et=at(this);if(Et.done)return y(void 0,!0);var Ht=Et.regexp,Ut=Et.string,kt=V(Ht,Ut);return kt===null?(Et.done=!0,y(void 0,!0)):Et.global?(I(kt[0])===""&&(Ht.lastIndex=U(Ut,A(Ht.lastIndex),Et.unicode)),y(kt,!1)):(Et.done=!0,y(kt,!1))}),yt=function(At){var Et=R(this),Ht=I(At),Ut=X(Et,RegExp),kt=I(D(Et)),Ct,It,Dt;return Ct=new Ut(Ut===RegExp?Et.source:Et,kt),It=!!~nt(kt,"g"),Dt=!!~nt(kt,"u")||!!~nt(kt,"v"),Ct.lastIndex=A(Et.lastIndex),new pt(Ct,Ht,It,Dt)};v({target:"String",proto:!0,forced:ht},{matchAll:function(Et){var Ht=b(this),Ut,kt,Ct,It;if(O(Et)){if(L(Et)&&(Ut=I(b(D(Et))),!~nt(Ut,"g")))throw new rt("`.matchAll` does not allow non-global regexes");if(ht)return ut(Ht,Et);if(Ct=N(Et,K),Ct===void 0&&Y&&M(Et)==="RegExp"&&(Ct=yt),Ct)return g(Ct,Et,Ht)}else if(ht)return ut(Ht,Et);return kt=I(Ht),It=new RegExp(Et,"g"),Y?g(yt,It,kt):It[K](kt)}}),Y||K in et||F(et,K,yt)}),(function(T,P,a){"use strict";var v=a(3),g=a(248).end,p=a(496);v({target:"String",proto:!0,forced:p},{padEnd:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(28);T.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(v)}),(function(T,P,a){"use strict";var v=a(3),g=a(248).start,p=a(496);v({target:"String",proto:!0,forced:p},{padStart:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(12),x=a(39),y=a(68),b=a(63),A=g([].push),I=g([].join);v({target:"String",stat:!0},{raw:function(O){var M=p(x(O).raw),L=b(M);if(!L)return"";for(var D=arguments.length,N=[],F=0;;){if(A(N,y(M[F++])),F===L)return I(N,"");F<D&&A(N,y(arguments[F]))}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(249);v({target:"String",proto:!0},{repeat:g})}),(function(T,P,a){"use strict";var v=a(117),g=a(8),p=a(14),x=a(491),y=a(7),b=a(46),A=a(21),I=a(20),R=a(61),O=a(64),M=a(68),L=a(16),D=a(492),N=a(29),F=a(501),G=a(440),j=a(493),X=a(33),U=X("replace"),V=Math.max,k=Math.min,Y=p([].concat),K=p([].push),J=p("".indexOf),Z=p("".slice),Q=function(nt){return nt===void 0?nt:String(nt)},at=(function(){return"a".replace(/./,"$0")==="$0"})(),et=(function(){return/./[U]?/./[U]("a","$0")==="":!1})(),rt=!y(function(){var nt=/./;return nt.exec=function(){var ut=[];return ut.groups={a:"7"},ut},"".replace(nt,"$<a>")!=="7"});x("replace",function(nt,ut,ht){var pt=et?"$":"$0";return[function(At,Et){var Ht=L(this),Ut=I(At)?N(At,U):void 0;return Ut?g(Ut,At,Ht,Et):g(ut,M(Ht),At,Et)},function(yt,At){var Et=b(this),Ht=M(yt),Ut=A(At);Ut||(At=M(At));var kt=M(G(Et));if(typeof At=="string"&&!~J(At,pt)&&!~J(At,"$<")&&!~J(kt,"y")){var Ct=ht(ut,Et,Ht,At);if(Ct.done)return Ct.value}var It=!!~J(kt,"g"),Dt;It&&(Dt=!!~J(kt,"u")||!!~J(kt,"v"),Et.lastIndex=0);for(var Vt=[],_t;_t=j(Et,Ht),!(_t===null||(K(Vt,_t),!It));){var Nt=M(_t[0]);Nt===""&&(Et.lastIndex=D(Ht,O(Et.lastIndex),Dt))}for(var Jt="",ne=0,ve=0;ve<Vt.length;ve++){_t=Vt[ve];for(var le=M(_t[0]),fe=V(k(R(_t.index),Ht.length),0),Ce=[],Be,Ie=1;Ie<_t.length;Ie++)K(Ce,Q(_t[Ie]));var ce=_t.groups;if(Ut){var xe=Y([le],Ce,fe,Ht);ce!==void 0&&K(xe,ce),Be=M(v(At,void 0,xe))}else Be=F(le,Ht,fe,Ce,ce,At);fe>=ne&&(Jt+=Z(Ht,ne,fe)+Be,ne=fe+le.length)}return Jt+Z(Ht,ne)}]},!rt||!at||et)}),(function(T,P,a){"use strict";var v=a(14),g=a(39),p=Math.floor,x=v("".charAt),y=v("".replace),b=v("".slice),A=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,I=/\$([$&'`]|\d{1,2})/g;T.exports=function(R,O,M,L,D,N){var F=M+R.length,G=L.length,j=I;return D!==void 0&&(D=g(D),j=A),y(N,j,function(X,U){var V;switch(x(U,0)){case"$":return"$";case"&":return R;case"`":return b(O,0,M);case"'":return b(O,F);case"<":V=D[b(U,1,-1)];break;default:var k=+U;if(k===0)return X;if(k>G){var Y=p(k/10);return Y===0?X:Y<=G?L[Y-1]===void 0?x(U,1):L[Y-1]+x(U,1):X}V=L[k-1]}return V===void 0?"":V})}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(14),x=a(16),y=a(21),b=a(20),A=a(439),I=a(68),R=a(29),O=a(440),M=a(501),L=a(33),D=a(36),N=L("replace"),F=TypeError,G=p("".indexOf),j=p("".replace),X=p("".slice),U=Math.max;v({target:"String",proto:!0},{replaceAll:function(k,Y){var K=x(this),J,Z,Q,at,et,rt,nt,ut,ht,pt,yt=0,At="";if(b(k)){if(J=A(k),J&&(Z=I(x(O(k))),!~G(Z,"g")))throw new F("`.replaceAll` does not allow non-global regexes");if(Q=R(k,N),Q)return g(Q,k,K,Y);if(D&&J)return j(I(K),k,Y)}for(at=I(K),et=I(k),rt=y(Y),rt||(Y=I(Y)),nt=et.length,ut=U(1,nt),ht=G(at,et);ht!==-1;)pt=rt?I(Y(et,ht,at)):M(et,at,ht,[],void 0,Y),At+=X(at,yt,ht)+pt,yt=ht+nt,ht=ht+ut>at.length?-1:G(at,et,ht+ut);return yt<at.length&&(At+=X(at,yt)),At}})}),(function(T,P,a){"use strict";var v=a(8),g=a(491),p=a(46),x=a(20),y=a(16),b=a(369),A=a(68),I=a(29),R=a(493);g("search",function(O,M,L){return[function(N){var F=y(this),G=x(N)?I(N,O):void 0;if(G)return v(G,N,F);var j=A(F);return new RegExp(N)[O](j)},function(D){var N=p(this),F=A(D),G=L(M,N,F);if(G.done)return G.value;var j=N.lastIndex;b(j,0)||(N.lastIndex=0);var X=R(N,F);return b(N.lastIndex,j)||(N.lastIndex=j),X===null?-1:X.index}]})}),(function(T,P,a){"use strict";var v=a(8),g=a(14),p=a(491),x=a(46),y=a(20),b=a(16),A=a(387),I=a(492),R=a(64),O=a(68),M=a(29),L=a(440),D=a(493),N=a(443),F=a(7),G=N.UNSUPPORTED_Y,j=4294967295,X=Math.min,U=g([].push),V=g("".slice),k=g("".indexOf),Y=!F(function(){var J=/(?:)/,Z=J.exec;J.exec=function(){return Z.apply(this,arguments)};var Q="ab".split(J);return Q.length!==2||Q[0]!=="a"||Q[1]!=="b"}),K="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;p("split",function(J,Z,Q){var at="0".split(void 0,0).length?function(et,rt){return et===void 0&&rt===0?[]:v(Z,this,et,rt)}:Z;return[function(rt,nt){var ut=b(this),ht=y(rt)?M(rt,J):void 0;return ht?v(ht,rt,ut,nt):v(at,O(ut),rt,nt)},function(et,rt){var nt=x(this),ut=O(et);if(!K){var ht=Q(at,nt,ut,rt,at!==Z);if(ht.done)return ht.value}var pt=A(nt,RegExp),yt=O(L(nt)),At=!!~k(yt,"u")||!!~k(yt,"v");G?~k(yt,"g")||(yt+="g"):~k(yt,"y")||(yt+="y");var Et=new pt(G?"^(?:"+nt.source+")":nt,yt),Ht=rt===void 0?j:rt>>>0;if(Ht===0)return[];if(ut.length===0)return D(Et,ut)===null?[ut]:[];for(var Ut=0,kt=0,Ct=[];kt<ut.length;){Et.lastIndex=G?0:kt;var It=D(Et,G?V(ut,kt):ut),Dt;if(It===null||(Dt=X(R(Et.lastIndex+(G?kt:0)),ut.length))===Ut)kt=I(ut,kt,At);else{if(U(Ct,V(ut,Ut,kt)),Ct.length===Ht)return Ct;for(var Vt=1;Vt<=It.length-1;Vt++)if(U(Ct,It[Vt]),Ct.length===Ht)return Ct;kt=Ut=Dt}}return U(Ct,V(ut,Ut)),Ct}]},K||!Y,G)}),(function(T,P,a){"use strict";var v=a(3),g=a(85),p=a(5).f,x=a(64),y=a(68),b=a(484),A=a(16),I=a(485),R=a(36),O=g("".slice),M=Math.min,L=I("startsWith"),D=!R&&!L&&!!(function(){var N=p(String.prototype,"startsWith");return N&&!N.writable})();v({target:"String",proto:!0,forced:!D&&!L},{startsWith:function(F){var G=y(A(this));b(F);var j=y(F),X=x(M(arguments.length>1?arguments[1]:void 0,G.length));return O(G,X,X+j.length)===j}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(16),x=a(61),y=a(68),b=g("".slice),A=Math.max,I=Math.min,R=!"".substr||"ab".substr(-1)!=="b";v({target:"String",proto:!0,forced:R},{substr:function(M,L){var D=y(p(this)),N=D.length,F=x(M),G=F<0?A(N+F,0):I(F,N),j=L===void 0?N:x(L);if(j<=0)return"";var X=I(G+j,N);return G>=X?"":b(D,G,X)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(14),x=a(16),y=a(68),b=a(7),A=Array,I=p("".charAt),R=p("".charCodeAt),O=p([].join),M="".toWellFormed,L="\uFFFD",D=M&&b(function(){return g(M,1)!=="1"});v({target:"String",proto:!0,forced:D},{toWellFormed:function(){var F=y(x(this));if(D)return g(M,F);for(var G=F.length,j=A(G),X=0;X<G;X++){var U=R(F,X);(U&63488)!==55296?j[X]=I(F,X):U>=56320||X+1>=G||(R(F,X+1)&64512)!==56320?j[X]=L:(j[X]=I(F,X),j[++X]=I(F,X))}return O(j,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(332).trim,p=a(509);v({target:"String",proto:!0,forced:p("trim")},{trim:function(){return g(this)}})}),(function(T,P,a){"use strict";var v=a(49).PROPER,g=a(7),p=a(333),x="\u200B\x85\u180E";T.exports=function(y){return g(function(){return!!p[y]()||x[y]()!==x||v&&p[y].name!==y})}}),(function(T,P,a){"use strict";a(511);var v=a(3),g=a(512);v({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==g},{trimEnd:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(512);v({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==g},{trimRight:g})}),(function(T,P,a){"use strict";var v=a(332).end,g=a(509);T.exports=g("trimEnd")?function(){return v(this)}:"".trimEnd}),(function(T,P,a){"use strict";a(514);var v=a(3),g=a(515);v({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==g},{trimStart:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(515);v({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==g},{trimLeft:g})}),(function(T,P,a){"use strict";var v=a(332).start,g=a(509);T.exports=g("trimStart")?function(){return v(this)}:"".trimStart}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("anchor")},{anchor:function(y){return g(this,"a","name",y)}})}),(function(T,P,a){"use strict";var v=a(14),g=a(16),p=a(68),x=/"/g,y=v("".replace);T.exports=function(b,A,I,R){var O=p(g(b)),M="<"+A;return I!==""&&(M+=" "+I+'="'+y(p(R),x,"&quot;")+'"'),M+">"+O+"</"+A+">"}}),(function(T,P,a){"use strict";var v=a(7);T.exports=function(g){return v(function(){var p=""[g]('"');return p!==p.toLowerCase()||p.split('"').length>3})}}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("big")},{big:function(){return g(this,"big","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("blink")},{blink:function(){return g(this,"blink","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("bold")},{bold:function(){return g(this,"b","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("fixed")},{fixed:function(){return g(this,"tt","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("fontcolor")},{fontcolor:function(y){return g(this,"font","color",y)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("fontsize")},{fontsize:function(y){return g(this,"font","size",y)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("italics")},{italics:function(){return g(this,"i","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("link")},{link:function(y){return g(this,"a","href",y)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("small")},{small:function(){return g(this,"small","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("strike")},{strike:function(){return g(this,"strike","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("sub")},{sub:function(){return g(this,"sub","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("sup")},{sup:function(){return g(this,"sup","","")}})}),(function(T,P,a){"use strict";var v=a(532);v("Float32",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(8),x=a(6),y=a(533),b=a(224),A=a(213),I=a(216),R=a(11),O=a(43),M=a(338),L=a(217),D=a(534),N=a(535),F=a(18),G=a(38),j=a(69),X=a(20),U=a(22),V=a(71),k=a(24),Y=a(119),K=a(57).f,J=a(536),Z=a(83).forEach,Q=a(201),at=a(77),et=a(44),rt=a(5),nt=a(205),ut=a(51),ht=a(124),pt=ut.get,yt=ut.set,At=ut.enforce,Et=et.f,Ht=rt.f,Ut=g.RangeError,kt=A.ArrayBuffer,Ct=kt.prototype,It=A.DataView,Dt=b.NATIVE_ARRAY_BUFFER_VIEWS,Vt=b.TYPED_ARRAY_TAG,_t=b.TypedArray,Nt=b.TypedArrayPrototype,Jt=b.isTypedArray,ne="BYTES_PER_ELEMENT",ve="Wrong length",le=function(ce,xe){at(ce,xe,{configurable:!0,get:function(){return pt(this)[xe]}})},fe=function(ce){var xe;return k(Ct,ce)||(xe=j(ce))==="ArrayBuffer"||xe==="SharedArrayBuffer"},Ce=function(ce,xe){return Jt(ce)&&!U(xe)&&xe in ce&&M(+xe)&&xe>=0},Be=function(xe,Ue){return Ue=F(Ue),Ce(xe,Ue)?R(2,xe[Ue]):Ht(xe,Ue)},Ie=function(xe,Ue,Pt){return Ue=F(Ue),Ce(xe,Ue)&&X(Pt)&&G(Pt,"value")&&!G(Pt,"get")&&!G(Pt,"set")&&!Pt.configurable&&(!G(Pt,"writable")||Pt.writable)&&(!G(Pt,"enumerable")||Pt.enumerable)?(xe[Ue]=Pt.value,xe):Et(xe,Ue,Pt)};x?(Dt||(rt.f=Be,et.f=Ie,le(Nt,"buffer"),le(Nt,"byteOffset"),le(Nt,"byteLength"),le(Nt,"length")),v({target:"Object",stat:!0,forced:!Dt},{getOwnPropertyDescriptor:Be,defineProperty:Ie}),T.exports=function(ce,xe,Ue){var Pt=ce.match(/\d+/)[0]/8,zt=ce+(Ue?"Clamped":"")+"Array",jt="get"+ce,we="set"+ce,$t=g[zt],Xt=$t,re=Xt&&Xt.prototype,oe={},pe=function(Tt,wt){var Ft=pt(Tt);return Ft.view[jt](wt*Pt+Ft.byteOffset,!0)},rn=function(Tt,wt,Ft){var Lt=pt(Tt);Lt.view[we](wt*Pt+Lt.byteOffset,Ue?N(Ft):Ft,!0)},vt=function(Tt,wt){Et(Tt,wt,{get:function(){return pe(this,wt)},set:function(Ft){return rn(this,wt,Ft)},enumerable:!0})};Dt?y&&(Xt=xe(function(Tt,wt,Ft,Lt){return I(Tt,re),ht((function(){return X(wt)?fe(wt)?Lt!==void 0?new $t(wt,D(Ft,Pt),Lt):Ft!==void 0?new $t(wt,D(Ft,Pt)):new $t(wt):Jt(wt)?nt(Xt,wt):p(J,Xt,wt):new $t(L(wt))})(),Tt,Xt)}),Y&&Y(Xt,_t),Z(K($t),function(Tt){Tt in Xt||O(Xt,Tt,$t[Tt])}),Xt.prototype=re):(Xt=xe(function(Tt,wt,Ft,Lt){I(Tt,re);var ue=0,ye=0,Me,Fe,tn;if(!X(wt))tn=L(wt),Fe=tn*Pt,Me=new kt(Fe);else if(fe(wt)){Me=wt,ye=D(Ft,Pt);var Ve=wt.byteLength;if(Lt===void 0){if(Ve%Pt)throw new Ut(ve);if(Fe=Ve-ye,Fe<0)throw new Ut(ve)}else if(Fe=L(Lt)*Pt,Fe+ye>Ve)throw new Ut(ve);tn=Fe/Pt}else return Jt(wt)?nt(Xt,wt):p(J,Xt,wt);for(yt(Tt,{buffer:Me,byteOffset:ye,byteLength:Fe,length:tn,view:new It(Me)});ue<tn;)vt(Tt,ue++)}),Y&&Y(Xt,_t),re=Xt.prototype=V(Nt)),re.constructor!==Xt&&O(re,"constructor",Xt),At(re).TypedArrayConstructor=Xt,Vt&&O(re,Vt,zt);var Rt=Xt!==$t;oe[zt]=Xt,v({global:!0,constructor:!0,forced:Rt,sham:!Dt},oe),ne in Xt||O(Xt,ne,Pt),ne in re||O(re,ne,Pt),Q(zt)}):T.exports=function(){}}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=a(172),x=a(224).NATIVE_ARRAY_BUFFER_VIEWS,y=v.ArrayBuffer,b=v.Int8Array;T.exports=!x||!g(function(){b(1)})||!g(function(){new b(-1)})||!p(function(A){new b,new b(null),new b(1.5),new b(A)},!0)||g(function(){return new b(new y(2),1,void 0).length!==1})}),(function(T,P,a){"use strict";var v=a(271),g=RangeError;T.exports=function(p,x){var y=v(p);if(y%x)throw new g("Wrong offset");return y}}),(function(T){"use strict";var P=Math.floor;T.exports=function(a){var v=+a;if(v!==v||v<=0)return 0;if(v>=255)return 255;var g=P(v);return g+.5<v?g+1:v<g+.5||g%2===0?g:g+1}}),(function(T,P,a){"use strict";var v=a(84),g=a(8),p=a(30),x=a(388),y=a(39),b=a(63),A=a(140),I=a(141),R=a(138),O=a(537),M=a(224).aTypedArrayConstructor,L=a(538);T.exports=function(N){var F=x(this),G=arguments.length,j=G>1?arguments[1]:void 0,X=j!==void 0;X&&p(j);var U=y(N),V=I(U),k,Y,K,J,Z,Q,at,et;if(V&&!R(V))for(at=A(U,V),et=at.next,U=[];!(Q=g(et,at)).done;)U.push(Q.value);for(X&&G>2&&(j=v(j,arguments[2])),Y=b(U),K=new(M(F))(Y),J=O(K),k=0;Y>k;k++)Z=X?j(U[k],k):U[k],K[k]=J?L(Z):+Z;return K}}),(function(T,P,a){"use strict";var v=a(69);T.exports=function(g){var p=v(g);return p==="BigInt64Array"||p==="BigUint64Array"}}),(function(T,P,a){"use strict";var v=a(19),g=TypeError;T.exports=function(p){var x=v(p,"number");if(typeof x=="number")throw new g("Can't convert number to bigint");return BigInt(x)}}),(function(T,P,a){"use strict";var v=a(532);v("Float64",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Int8",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Int16",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Int32",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Uint8",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Uint8",function(g){return function(x,y,b){return g(this,x,y,b)}},!0)}),(function(T,P,a){"use strict";var v=a(532);v("Uint16",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Uint32",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(224),g=a(63),p=a(61),x=v.aTypedArray,y=v.exportTypedArrayMethod;y("at",function(A){var I=x(this),R=g(I),O=p(A),M=O>=0?O:R+O;return M<0||M>=R?void 0:I[M]})}),(function(T,P,a){"use strict";var v=a(14),g=a(224),p=a(152),x=v(p),y=g.aTypedArray,b=g.exportTypedArrayMethod;b("copyWithin",function(I,R){return x(y(this),I,R,arguments.length>2?arguments[2]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(83).every,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("every",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(157),p=a(538),x=a(69),y=a(8),b=a(14),A=a(7),I=v.aTypedArray,R=v.exportTypedArrayMethod,O=b("".slice),M=A(function(){var L=0;return new Int8Array(2).fill({valueOf:function(){return L++}}),L!==1});R("fill",function(D){var N=arguments.length;I(this);var F=O(x(this),0,3)==="Big"?p(D):+D;return y(g,this,F,N>1?arguments[1]:void 0,N>2?arguments[2]:void 0)},M)}),(function(T,P,a){"use strict";var v=a(224),g=a(83).filter,p=a(552),x=v.aTypedArray,y=v.exportTypedArrayMethod;y("filter",function(A){var I=g(x(this),A,arguments.length>1?arguments[1]:void 0);return p(this,I)})}),(function(T,P,a){"use strict";var v=a(205),g=a(224).getTypedArrayConstructor;T.exports=function(p,x){return v(g(p),x)}}),(function(T,P,a){"use strict";var v=a(224),g=a(83).find,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("find",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(83).findIndex,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("findIndex",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(162).findLast,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("findLast",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(162).findLastIndex,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("findLastIndex",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(83).forEach,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("forEach",function(b){g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(533),g=a(224).exportTypedArrayStaticMethod,p=a(536);g("from",p,v)}),(function(T,P,a){"use strict";var v=a(224),g=a(59).includes,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("includes",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(59).indexOf,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("indexOf",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=a(14),x=a(224),y=a(176),b=a(33),A=b("iterator"),I=v.Uint8Array,R=p(y.values),O=p(y.keys),M=p(y.entries),L=x.aTypedArray,D=x.exportTypedArrayMethod,N=I&&I.prototype,F=!g(function(){N[A].call([1])}),G=!!N&&N.values&&N[A]===N.values&&N.values.name==="values",j=function(){return R(L(this))};D("entries",function(){return M(L(this))},F),D("keys",function(){return O(L(this))},F),D("values",j,F||!G,{name:"values"}),D(A,j,F||!G,{name:"values"})}),(function(T,P,a){"use strict";var v=a(224),g=a(14),p=v.aTypedArray,x=v.exportTypedArrayMethod,y=g([].join);x("join",function(A){return y(p(this),A)})}),(function(T,P,a){"use strict";var v=a(224),g=a(117),p=a(183),x=v.aTypedArray,y=v.exportTypedArrayMethod;y("lastIndexOf",function(A){var I=arguments.length;return g(p,x(this),I>1?[A,arguments[1]]:[A])})}),(function(T,P,a){"use strict";var v=a(224),g=a(83).map,p=a(552),x=v.aTypedArray,y=v.exportTypedArrayMethod;y("map",function(A){var I=g(x(this),A,arguments.length>1?arguments[1]:void 0);return p(this,I)})}),(function(T,P,a){"use strict";var v=a(224),g=a(533),p=v.aTypedArrayConstructor,x=v.exportTypedArrayStaticMethod;x("of",function(){for(var b=0,A=arguments.length,I=new(p(this))(A);A>b;)I[b]=arguments[b++];return I},g)}),(function(T,P,a){"use strict";var v=a(224),g=a(188).left,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("reduce",function(b){var A=arguments.length;return g(p(this),b,A,A>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(188).right,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("reduceRight",function(b){var A=arguments.length;return g(p(this),b,A,A>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=v.aTypedArray,p=v.exportTypedArrayMethod,x=Math.floor;p("reverse",function(){for(var b=this,A=g(b).length,I=x(A/2),R=0,O;R<I;)O=b[R],b[R++]=b[--A],b[A]=O;return b})}),(function(T,P,a){"use strict";var v=a(4),g=a(8),p=a(224),x=a(63),y=a(534),b=a(39),A=a(7),I=v.RangeError,R=v.Int8Array,O=R&&R.prototype,M=O&&O.set,L=p.aTypedArray,D=p.exportTypedArrayMethod,N=!A(function(){var G=new Uint8ClampedArray(2);return g(M,G,{length:1,0:3},1),G[1]!==3}),F=N&&p.NATIVE_ARRAY_BUFFER_VIEWS&&A(function(){var G=new R(2);return G.set(1),G.set("2",1),G[0]!==0||G[1]!==2});D("set",function(j){L(this);var X=y(arguments.length>1?arguments[1]:void 0,1),U=b(j);if(N)return g(M,this,U,X);var V=this.length,k=x(U),Y=0;if(k+X>V)throw new I("Wrong length");for(;Y<k;)this[X+Y]=U[Y++]},!N||F)}),(function(T,P,a){"use strict";var v=a(224),g=a(7),p=a(76),x=v.aTypedArray,y=v.getTypedArrayConstructor,b=v.exportTypedArrayMethod,A=g(function(){new Int8Array(1).slice()});b("slice",function(R,O){for(var M=p(x(this),R,O),L=y(this),D=0,N=M.length,F=new L(N);N>D;)F[D]=M[D++];return F},A)}),(function(T,P,a){"use strict";var v=a(224),g=a(83).some,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("some",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(4),g=a(85),p=a(7),x=a(30),y=a(196),b=a(224),A=a(197),I=a(198),R=a(27),O=a(199),M=b.aTypedArray,L=b.exportTypedArrayMethod,D=v.Uint16Array,N=D&&g(D.prototype.sort),F=!!N&&!(p(function(){N(new D(2),null)})&&p(function(){N(new D(2),{})})),G=!!N&&!p(function(){if(R)return R<74;if(A)return A<67;if(I)return!0;if(O)return O<602;var X=new D(516),U=Array(516),V,k;for(V=0;V<516;V++)k=V%4,X[V]=515-V,U[V]=V-2*k+3;for(N(X,function(Y,K){return(Y/4|0)-(K/4|0)}),V=0;V<516;V++)if(X[V]!==U[V])return!0}),j=function(X){return function(U,V){return X!==void 0?+X(U,V)||0:V!==V?U!==U?0:-1:U!==U?1:U===0&&V===0?1/U>0?1/V>0?0:1:1/V>0?-1:0:U>V?1:U<V?-1:0}};L("sort",function(U){return U!==void 0&&x(U),G?N(this,U):y(M(this),j(U))},!G||F)}),(function(T,P,a){"use strict";var v=a(224),g=a(64),p=a(60),x=v.aTypedArray,y=v.getTypedArrayConstructor,b=v.exportTypedArrayMethod;b("subarray",function(I,R){var O=x(this),M=O.length,L=p(I,M),D=y(O);return new D(O.buffer,O.byteOffset+L*O.BYTES_PER_ELEMENT,g((R===void 0?M:p(R,M))-L))})}),(function(T,P,a){"use strict";var v=a(4),g=a(117),p=a(224),x=a(7),y=a(76),b=v.Int8Array,A=p.aTypedArray,I=p.exportTypedArrayMethod,R=[].toLocaleString,O=!!b&&x(function(){R.call(new b(1))}),M=x(function(){return[1,2].toLocaleString()!==new b([1,2]).toLocaleString()})||!x(function(){b.prototype.toLocaleString.call([1,2])});I("toLocaleString",function(){return g(R,O?y(A(this)):A(this),y(arguments))},M)}),(function(T,P,a){"use strict";var v=a(63),g=a(224),p=g.aTypedArray,x=g.exportTypedArrayMethod,y=g.getTypedArrayConstructor;x("toReversed",function(){for(var A=p(this),I=v(A),R=new(y(A))(I),O=0;O<I;O++)R[O]=A[I-O-1];return R})}),(function(T,P,a){"use strict";var v=a(224),g=a(14),p=a(30),x=a(205),y=v.aTypedArray,b=v.getTypedArrayConstructor,A=v.exportTypedArrayMethod,I=g(v.TypedArrayPrototype.sort);A("toSorted",function(O){O!==void 0&&p(O);var M=y(this),L=x(b(M),M);return I(L,O)})}),(function(T,P,a){"use strict";var v=a(224).exportTypedArrayMethod,g=a(7),p=a(4),x=a(14),y=p.Uint8Array,b=y&&y.prototype||{},A=[].toString,I=x([].join);g(function(){A.call({})})&&(A=function(){return I(this)});var R=b.toString!==A;v("toString",A,R)}),(function(T,P,a){"use strict";var v=a(224),g=a(537),p=a(63),x=a(61),y=a(538),b=v.aTypedArray,A=v.getTypedArrayConstructor,I=v.exportTypedArrayMethod,R=RangeError,O=(function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(L){return L===8}})(),M=O&&(function(){try{new Int8Array(1).with(-.5,1)}catch(L){return!0}})();I("with",function(L,D){var N=b(this),F=p(N),G=x(L),j=G<0?F+G:G,X=g(N)?y(D):+D;if(j>=F||j<0)throw new R("Incorrect index");for(var U=new(A(N))(F),V=0;V<F;V++)U[V]=V===j?X:N[V];return U},!O||M)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(205),x=a(580),y=g.Uint8Array,b=!y||!y.fromBase64||!(function(){try{y.fromBase64("a");return}catch(A){}try{y.fromBase64("",null)}catch(A){return!0}})();y&&v({target:"Uint8Array",stat:!0,forced:b},{fromBase64:function(I){var R=x(I,arguments.length>1?arguments[1]:void 0,null,9007199254740991);return p(y,R.bytes)}})}),(function(T,P,a){"use strict";var v=a(4),g=a(14),p=a(287),x=a(447),y=a(38),b=a(581),A=a(582),I=a(237),R=b.c2i,O=b.c2iUrl,M=v.SyntaxError,L=v.TypeError,D=v.Array,N=g("".charAt),F=Math.floor,G=function(U,V){for(var k=U.length;V<k;V++){var Y=N(U,V);if(Y!==" "&&Y!==" "&&Y!==`
30
+ `&&Y!=="\f"&&Y!=="\r")break}return V},j=function(U,V,k){var Y=U.length;Y<4&&(U+=Y===2?"AA":"A");var K=(V[N(U,0)]<<18)+(V[N(U,1)]<<12)+(V[N(U,2)]<<6)+V[N(U,3)],J=[K>>16&255,K>>8&255,K&255];if(Y===2){if(k&&J[1]!==0)throw new M("Extra bits");return[J[0]]}if(Y===3){if(k&&J[2]!==0)throw new M("Extra bits");return[J[0],J[1]]}return J},X=function(U,V,k){for(var Y=V.length,K=0;K<Y;K++)U[k+K]=V[K];return k+Y};T.exports=function(U,V,k,Y){x(U),p(V);var K=A(V)==="base64"?R:O,J=V?V.lastChunkHandling:void 0;if(J===void 0&&(J="loose"),J!=="loose"&&J!=="strict"&&J!=="stop-before-partial")throw new L("Incorrect `lastChunkHandling` option");k&&I(k.buffer);var Z=U.length,Q=k||D(F(Z*3/4)),at=0,et=0,rt="",nt=0;if(Y)for(;;){if(nt=G(U,nt),nt===Z){if(rt.length>0){if(J==="stop-before-partial")break;if(J==="loose"){if(rt.length===1)throw new M("Malformed padding: exactly one additional character");at=X(Q,j(rt,K,!1),at)}else throw new M("Missing padding")}et=Z;break}var ut=N(U,nt);if(++nt,ut==="="){if(rt.length<2)throw new M("Padding is too early");if(nt=G(U,nt),rt.length===2){if(nt===Z){if(J==="stop-before-partial")break;throw new M("Malformed padding: only one =")}N(U,nt)==="="&&(++nt,nt=G(U,nt))}if(nt<Z)throw new M("Unexpected character after padding");at=X(Q,j(rt,K,J==="strict"),at),et=Z;break}if(!y(K,ut))throw new M("Unexpected character");var ht=Y-at;if(ht===1&&rt.length===2||ht===2&&rt.length===3||(rt+=ut,rt.length===4&&(at=X(Q,j(rt,K,!1),at),rt="",et=nt,at===Y)))break}return k||(Q.length=at),{bytes:Q,read:et,written:at}}}),(function(T){"use strict";var P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=P+"+/",v=P+"-_",g=function(p){for(var x={},y=0;y<64;y++)x[p.charAt(y)]=y;return x};T.exports={i2c:a,c2i:g(a),i2cUrl:v,c2iUrl:g(v)}}),(function(T){"use strict";var P=TypeError;T.exports=function(a){var v=a&&a.alphabet;if(v===void 0||v==="base64"||v==="base64url")return v||"base64";throw new P("Incorrect `alphabet` option")}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(447),x=a(584);g.Uint8Array&&v({target:"Uint8Array",stat:!0},{fromHex:function(b){return x(p(b)).bytes}})}),(function(T,P,a){"use strict";var v=a(4),g=a(14),p=v.Uint8Array,x=v.SyntaxError,y=Math.min,b=g("".match);T.exports=function(A,I){var R=A.length;if(R%2!==0)throw new x("String should be an even number of characters");for(var O=I?y(I.length,R/2):R/2,M=I||new p(O),L=b(A,/[\S\s]{2}/g),D=0;D<O;D++){var N=+("0x"+L[D]+"0");if(N!==N)throw new x("String should only contain hex characters");M[D]=N>>4}return{bytes:M,read:D<<1}}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(580),x=a(586),y=g.Uint8Array,b=!y||!y.prototype.setFromBase64||!(function(){var A=new y([255,255,255,255,255]);try{A.setFromBase64("",null);return}catch(I){}try{A.setFromBase64("a");return}catch(I){}try{A.setFromBase64("MjYyZg===")}catch(I){return A[0]===50&&A[1]===54&&A[2]===50&&A[3]===255&&A[4]===255}})();y&&v({target:"Uint8Array",proto:!0,forced:b},{setFromBase64:function(I){x(this);var R=p(I,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:R.read,written:R.written}}})}),(function(T,P,a){"use strict";var v=a(69),g=TypeError;T.exports=function(p){if(v(p)==="Uint8Array")return p;throw new g("Argument is not an Uint8Array")}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(447),x=a(586),y=a(237),b=a(584);function A(){try{var I=new ArrayBuffer(16,{maxByteLength:1024});new Uint8Array(I).setFromHex("cafed00d")}catch(R){return!0}}g.Uint8Array&&v({target:"Uint8Array",proto:!0,forced:A()},{setFromHex:function(R){x(this),p(R),y(this.buffer);var O=b(R,this).read;return{read:O,written:O/2}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(14),x=a(287),y=a(586),b=a(237),A=a(581),I=a(582),R=A.i2c,O=A.i2cUrl,M=Math.floor,L=Math.ceil,D=p("".charAt),N=g.Uint8Array,F=g.Array,G=p([].join),j=!N||!N.prototype.toBase64||!(function(){try{var X=new N;X.toBase64(null)}catch(U){return!0}})();N&&v({target:"Uint8Array",proto:!0,forced:j},{toBase64:function(){var U=y(this),V=arguments.length?x(arguments[0]):void 0,k=I(V)==="base64"?R:O,Y=!!V&&!!V.omitPadding;b(this.buffer);for(var K=0,J=U.length,Z=F(Y?M(J/3)*4+(J%3?J%3+1:0):L(J/3)*4),Q=0,at,et=function(rt){return D(k,at>>6*rt&63)};K+2<J;K+=3)at=(U[K]<<16)+(U[K+1]<<8)+U[K+2],Z[Q++]=et(3),Z[Q++]=et(2),Z[Q++]=et(1),Z[Q++]=et(0);return K+2===J?(at=(U[K]<<16)+(U[K+1]<<8),Z[Q++]=et(3),Z[Q++]=et(2),Z[Q++]=et(1),Y||(Z[Q++]="=")):K+1===J&&(at=U[K]<<16,Z[Q++]=et(3),Z[Q++]=et(2),Y||(Z[Q++]="=",Z[Q++]="=")),G(Z,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(14),x=a(586),y=a(237),b=p(1.1.toString),A=p([].join),I=Array,R=g.Uint8Array,O=!R||!R.prototype.toHex||!(function(){try{var M=new R([255,255,255,255,255,255,255,255]);return M.toHex()==="ffffffffffffffff"}catch(L){return!1}})();R&&v({target:"Uint8Array",proto:!0,forced:O},{toHex:function(){x(this),y(this.buffer);for(var L=I(this.length),D=0,N=this.length;D<N;D++){var F=b(this[D],16);L[D]=F.length===1?"0"+F:F}return A(L,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(68),x=String.fromCharCode,y=g("".charAt),b=g(/./.exec),A=g("".slice),I=/^[\da-f]{2}$/i,R=/^[\da-f]{4}$/i;v({global:!0},{unescape:function(M){for(var L=p(M),D="",N=L.length,F=0,G,j;F<N;){if(G=y(L,F++),G==="%"){if(y(L,F)==="u"){if(j=A(L,F+1,F+5),b(R,j)){D+=x(parseInt(j,16)),F+=5;continue}}else if(j=A(L,F,F+2),b(I,j)){D+=x(parseInt(j,16)),F+=2;continue}}D+=G}return D}})}),(function(T,P,a){"use strict";a(592)}),(function(T,P,a){"use strict";var v=a(295),g=a(4),p=a(14),x=a(215),y=a(300),b=a(299),A=a(593),I=a(20),R=a(51).enforce,O=a(7),M=a(52),L=Object,D=Array.isArray,N=L.isExtensible,F=L.isFrozen,G=L.isSealed,j=L.freeze,X=L.seal,U=!g.ActiveXObject&&"ActiveXObject"in g,V,k=function(rt){return function(){return rt(this,arguments.length?arguments[0]:void 0)}},Y=b("WeakMap",k,A),K=Y.prototype,J=p(K.set),Z=function(){return v&&O(function(){var rt=j([]);return J(new Y,rt,1),!F(rt)})};if(M)if(U){V=A.getConstructor(k,"WeakMap",!0),y.enable();var Q=p(K.delete),at=p(K.has),et=p(K.get);x(K,{delete:function(rt){if(I(rt)&&!N(rt)){var nt=R(this);return nt.frozen||(nt.frozen=new V),Q(this,rt)||nt.frozen.delete(rt)}return Q(this,rt)},has:function(nt){if(I(nt)&&!N(nt)){var ut=R(this);return ut.frozen||(ut.frozen=new V),at(this,nt)||ut.frozen.has(nt)}return at(this,nt)},get:function(nt){if(I(nt)&&!N(nt)){var ut=R(this);return ut.frozen||(ut.frozen=new V),at(this,nt)?et(this,nt):ut.frozen.get(nt)}return et(this,nt)},set:function(nt,ut){if(I(nt)&&!N(nt)){var ht=R(this);ht.frozen||(ht.frozen=new V),at(this,nt)?J(this,nt,ut):ht.frozen.set(nt,ut)}else J(this,nt,ut);return this}})}else Z()&&x(K,{set:function(nt,ut){var ht;return D(nt)&&(F(nt)?ht=j:G(nt)&&(ht=X)),J(this,nt,ut),ht&&ht(nt),this}})}),(function(T,P,a){"use strict";var v=a(14),g=a(215),p=a(300).getWeakData,x=a(216),y=a(46),b=a(17),A=a(20),I=a(137),R=a(83),O=a(38),M=a(51),L=M.set,D=M.getterFor,N=R.find,F=R.findIndex,G=v([].splice),j=0,X=function(k){return k.frozen||(k.frozen=new U)},U=function(){this.entries=[]},V=function(k,Y){return N(k.entries,function(K){return K[0]===Y})};U.prototype={get:function(k){var Y=V(this,k);if(Y)return Y[1]},has:function(k){return!!V(this,k)},set:function(k,Y){var K=V(this,k);K?K[1]=Y:this.entries.push([k,Y])},delete:function(k){var Y=F(this.entries,function(K){return K[0]===k});return~Y&&G(this.entries,Y,1),!!~Y}},T.exports={getConstructor:function(k,Y,K,J){var Z=k(function(rt,nt){x(rt,Q),L(rt,{type:Y,id:j++,frozen:null}),b(nt)||I(nt,rt[J],{that:rt,AS_ENTRIES:K})}),Q=Z.prototype,at=D(Y),et=function(rt,nt,ut){var ht=at(rt),pt=p(y(nt),!0);return pt===!0?X(ht).set(nt,ut):pt[ht.id]=ut,rt};return g(Q,{delete:function(rt){var nt=at(this);if(!A(rt))return!1;var ut=p(rt);return ut===!0?X(nt).delete(rt):ut&&O(ut,nt.id)&&delete ut[nt.id]},has:function(nt){var ut=at(this);if(!A(nt))return!1;var ht=p(nt);return ht===!0?X(ut).has(nt):ht&&O(ht,ut.id)}}),g(Q,K?{get:function(nt){var ut=at(this);if(A(nt)){var ht=p(nt);if(ht===!0)return X(ut).get(nt);if(ht)return ht[ut.id]}},set:function(nt,ut){return et(this,nt,ut)}}:{add:function(nt){return et(this,nt,!0)}}),Z}}}),(function(T,P,a){"use strict";var v=a(3),g=a(595),p=a(36),x=g.get,y=g.has,b=g.set;v({target:"WeakMap",proto:!0,real:!0,forced:p},{getOrInsert:function(I,R){return y(this,I)?x(this,I):(b(this,I,R),R)}})}),(function(T,P,a){"use strict";var v=a(14),g=WeakMap.prototype;T.exports={WeakMap,set:v(g.set),get:v(g.get),has:v(g.has),remove:v(g.delete)}}),(function(T,P,a){"use strict";var v=a(3),g=a(30),p=a(597),x=a(598),y=a(595),b=a(36),A=y.get,I=y.has,R=y.set,O=b||!(function(){try{WeakMap.prototype.getOrInsertComputed&&new WeakMap().getOrInsertComputed(1,function(){throw 1})}catch(M){return M instanceof TypeError}})();v({target:"WeakMap",proto:!0,real:!0,forced:O},{getOrInsertComputed:function(L,D){if(b||p(this),x(L),g(D),I(this,L))return A(this,L);var N=D(L);return R(this,L,N),N}})}),(function(T,P,a){"use strict";var v=a(595).has;T.exports=function(g){return v(g),g}}),(function(T,P,a){"use strict";var v=a(595),g=new v.WeakMap,p=v.set,x=v.remove;T.exports=function(y){return p(g,y,1),x(g,y),y}}),(function(T,P,a){"use strict";a(600)}),(function(T,P,a){"use strict";var v=a(299),g=a(593);v("WeakSet",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},g)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(23),x=a(14),y=a(8),b=a(7),A=a(68),I=a(390),R=a(581).c2i,O=/[^\d+/a-z]/i,M=/[\t\n\f\r ]+/g,L=/[=]{1,2}$/,D=p("atob"),N=Array,F=String.fromCharCode,G=x("".charAt),j=x("".replace),X=x([].join),U=x(O.exec),V=!!D&&!b(function(){return D("aGk=")!=="hi"}),k=V&&b(function(){return D(" ")!==""}),Y=V&&!b(function(){D("a")}),K=V&&!b(function(){D()}),J=V&&D.length!==1,Z=!V||k||Y||K||J;v({global:!0,bind:!0,enumerable:!0,forced:Z},{atob:function(at){if(I(arguments.length,1),V&&!k&&!Y)return y(D,g,at);var et=j(A(at),M,""),rt=0,nt=0,ut,ht,pt;et.length&3||(et=j(et,L,"")),ut=et.length;var yt=ut&3;if(yt===1||U(O,et))throw new(p("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(var At=new N((ut>>2)*3+(yt?yt-1:0)),Et=0;rt<ut;)ht=G(et,rt++),pt=nt&3?(pt<<6)+R[ht]:R[ht],nt++&3&&(At[Et++]=F(255&pt>>(-2*nt&6)));return X(At,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(23),x=a(14),y=a(8),b=a(7),A=a(68),I=a(390),R=a(581).i2c,O=p("btoa"),M=Array,L=x([].join),D=x("".charAt),N=x("".charCodeAt),F=!!O&&!b(function(){return O("hi")!=="aGk="}),G=F&&!b(function(){O()}),j=F&&b(function(){return O(null)!=="bnVsbA=="}),X=F&&O.length!==1;v({global:!0,bind:!0,enumerable:!0,forced:!F||G||j||X},{btoa:function(V){if(I(arguments.length,1),F)return y(O,g,A(V));for(var k=A(V),Y=new M((k.length+2)/3<<2),K=0,J=0,Z=R,Q,at;D(k,J)||(Z="=",J%1);){if(at=N(k,J+=.75),at>255)throw new(p("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");Q=Q<<8|at,Y[K++]=D(Z,63&Q>>8-J%1*8)}return L(Y,"")}})}),(function(T,P,a){"use strict";var v=a(4),g=a(604),p=a(605),x=a(168),y=a(43),b=function(I){if(I&&I.forEach!==x)try{y(I,"forEach",x)}catch(R){I.forEach=x}};for(var A in g)g[A]&&b(v[A]&&v[A].prototype);b(p)}),(function(T){"use strict";T.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),(function(T,P,a){"use strict";var v=a(42),g=v("span").classList,p=g&&g.constructor&&g.constructor.prototype;T.exports=p===Object.prototype?void 0:p}),(function(T,P,a){"use strict";var v=a(4),g=a(604),p=a(605),x=a(176),y=a(43),b=a(82),A=a(33),I=A("iterator"),R=x.values,O=function(L,D){if(L){if(L[I]!==R)try{y(L,I,R)}catch(F){L[I]=R}if(b(L,D,!0),g[D]){for(var N in x)if(L[N]!==x[N])try{y(L,N,x[N])}catch(F){L[N]=x[N]}}}};for(var M in g)O(v[M]&&v[M].prototype,M);O(p,"DOMTokenList")}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(239),x=a(7),y=a(71),b=a(11),A=a(44).f,I=a(47),R=a(77),O=a(38),M=a(216),L=a(46),D=a(132),N=a(125),F=a(608),G=a(128),j=a(51),X=a(6),U=a(36),V="DOMException",k="DATA_CLONE_ERR",Y=g("Error"),K=g(V)||(function(){try{var Nt=g("MessageChannel")||p("worker_threads").MessageChannel;new Nt().port1.postMessage(new WeakMap)}catch(Jt){if(Jt.name===k&&Jt.code===25)return Jt.constructor}})(),J=K&&K.prototype,Z=Y.prototype,Q=j.set,at=j.getterFor(V),et="stack"in new Y(V),rt=function(Nt){return O(F,Nt)&&F[Nt].m?F[Nt].c:0},nt=function(){M(this,ut);var Jt=arguments.length,ne=N(Jt<1?void 0:arguments[0]),ve=N(Jt<2?void 0:arguments[1],"Error"),le=rt(ve);if(Q(this,{type:V,name:ve,message:ne,code:le}),X||(this.name=ve,this.message=ne,this.code=le),et){var fe=new Y(ne);fe.name=V,A(this,"stack",b(1,G(fe.stack,1)))}},ut=nt.prototype=y(Z),ht=function(Nt){return{enumerable:!0,configurable:!0,get:Nt}},pt=function(Nt){return ht(function(){return at(this)[Nt]})};X&&(R(ut,"code",pt("code")),R(ut,"message",pt("message")),R(ut,"name",pt("name"))),A(ut,"constructor",b(1,nt));var yt=x(function(){return!(new K instanceof Y)}),At=yt||x(function(){return Z.toString!==D||String(new K(1,2))!=="2: 1"}),Et=yt||x(function(){return new K(1,"DataCloneError").code!==25}),Ht=yt||K[k]!==25||J[k]!==25,Ut=U?At||Et||Ht:yt;v({global:!0,constructor:!0,forced:Ut},{DOMException:Ut?nt:K});var kt=g(V),Ct=kt.prototype;At&&(U||K===kt)&&I(Ct,"toString",D),Et&&X&&K===kt&&R(Ct,"code",ht(function(){return rt(L(this).name)}));for(var It in F)if(O(F,It)){var Dt=F[It],Vt=Dt.s,_t=b(6,Dt.c);O(kt,Vt)||A(kt,Vt,_t),O(Ct,Vt)||A(Ct,Vt,_t)}}),(function(T){"use strict";T.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(23),x=a(11),y=a(44).f,b=a(38),A=a(216),I=a(124),R=a(125),O=a(608),M=a(128),L=a(6),D=a(36),N="DOMException",F=p("Error"),G=p(N),j=function(){A(this,X);var nt=arguments.length,ut=R(nt<1?void 0:arguments[0]),ht=R(nt<2?void 0:arguments[1],"Error"),pt=new G(ut,ht),yt=new F(ut);return yt.name=N,y(pt,"stack",x(1,M(yt.stack,1))),I(pt,this,j),pt},X=j.prototype=G.prototype,U="stack"in new F(N),V="stack"in new G(1,2),k=G&&L&&Object.getOwnPropertyDescriptor(g,N),Y=!!k&&!(k.writable&&k.configurable),K=U&&!Y&&!V;v({global:!0,constructor:!0,forced:D||K},{DOMException:K?j:G});var J=p(N),Z=J.prototype;if(Z.constructor!==J){D||y(Z,"constructor",x(1,J));for(var Q in O)if(b(O,Q)){var at=O[Q],et=at.s;b(J,et)||y(J,et,x(6,at.c))}}}),(function(T,P,a){"use strict";var v=a(23),g=a(82),p="DOMException";g(v(p),p)}),(function(T,P,a){"use strict";a(612),a(613)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(389).clear;v({global:!0,bind:!0,enumerable:!0,forced:g.clearImmediate!==p},{clearImmediate:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(389).set,x=a(614),y=g.setImmediate?x(p,!1):p;v({global:!0,bind:!0,enumerable:!0,forced:g.setImmediate!==y},{setImmediate:y})}),(function(T,P,a){"use strict";var v=a(4),g=a(117),p=a(21),x=a(190),y=a(28),b=a(76),A=a(390),I=v.Function,R=/MSIE .\./.test(y)||x==="BUN"&&(function(){var O=v.Bun.version.split(".");return O.length<3||O[0]==="0"&&(O[1]<3||O[1]==="3"&&O[2]==="0")})();T.exports=function(O,M){var L=M?2:1;return R?function(D,N){var F=A(arguments.length,1)>L,G=p(D)?D:I(D),j=F?b(arguments,L):[],X=F?function(){g(G,this,j)}:G;return M?O(X,N):O(X)}:O}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(392),x=a(30),y=a(390),b=a(7),A=a(6),I=b(function(){return A&&Object.getOwnPropertyDescriptor(g,"queueMicrotask").value.length!==1});v({global:!0,enumerable:!0,dontCallGetSet:!0,forced:I},{queueMicrotask:function(O){y(arguments.length,1),p(x(O))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(77),x=a(6),y=TypeError,b=Object.defineProperty,A=g.self!==g;try{if(x){var I=Object.getOwnPropertyDescriptor(g,"self");(A||!I||!I.get||!I.enumerable)&&p(g,"self",{get:function(){return g},set:function(O){if(this!==g)throw new y("Illegal invocation");b(g,"self",{value:O,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else v({global:!0,simple:!0,forced:A},{self:g})}catch(R){}}),(function(T,P,a){"use strict";var v=a(36),g=a(3),p=a(4),x=a(23),y=a(14),b=a(7),A=a(40),I=a(21),R=a(89),O=a(17),M=a(20),L=a(22),D=a(137),N=a(46),F=a(69),G=a(38),j=a(90),X=a(43),U=a(63),V=a(390),k=a(440),Y=a(305),K=a(460),J=a(462),Z=a(238),Q=a(129),at=a(240),et=p.Object,rt=p.Array,nt=p.Date,ut=p.Error,ht=p.TypeError,pt=p.PerformanceMark,yt=x("DOMException"),At=Y.Map,Et=Y.has,Ht=Y.get,Ut=Y.set,kt=K.Set,Ct=K.add,It=K.has,Dt=x("Object","keys"),Vt=y([].push),_t=y((!0).valueOf),Nt=y(1.1.valueOf),Jt=y("".valueOf),ne=y(nt.prototype.getTime),ve=A("structuredClone"),le="DataCloneError",fe="Transferring",Ce=function(vt){return!b(function(){var Rt=new p.Set([7]),Tt=vt(Rt),wt=vt(et(7));return Tt===Rt||!Tt.has(7)||!M(wt)||+wt!=7})&&vt},Be=function(vt,Rt){return!b(function(){var Tt=new Rt,wt=vt({a:Tt,b:Tt});return!(wt&&wt.a===wt.b&&wt.a instanceof Rt&&wt.a.stack===Tt.stack)})},Ie=function(vt){return!b(function(){var Rt=vt(new p.AggregateError([1],ve,{cause:3}));return Rt.name!=="AggregateError"||Rt.errors[0]!==1||Rt.message!==ve||Rt.cause!==3})},ce=p.structuredClone,xe=v||!Be(ce,ut)||!Be(ce,yt)||!Ie(ce),Ue=!ce&&Ce(function(vt){return new pt(ve,{detail:vt}).detail}),Pt=Ce(ce)||Ue,zt=function(vt){throw new yt("Uncloneable type: "+vt,le)},jt=function(vt,Rt){throw new yt((Rt||"Cloning")+" of "+vt+" cannot be properly polyfilled in this engine",le)},we=function(vt,Rt){return Pt||jt(Rt),Pt(vt)},$t=function(){var vt;try{vt=new p.DataTransfer}catch(Rt){try{vt=new p.ClipboardEvent("").clipboardData}catch(Tt){}}return vt&&vt.items&&vt.files?vt:null},Xt=function(vt,Rt,Tt){if(Et(Rt,vt))return Ht(Rt,vt);var wt=Tt||F(vt),Ft,Lt,ue,ye,Me,Fe;if(wt==="SharedArrayBuffer")Pt?Ft=Pt(vt):Ft=vt;else{var tn=p.DataView;!tn&&!I(vt.slice)&&jt("ArrayBuffer");try{if(I(vt.slice)&&!vt.resizable)Ft=vt.slice(0);else for(Lt=vt.byteLength,ue=("maxByteLength"in vt)?{maxByteLength:vt.maxByteLength}:void 0,Ft=new ArrayBuffer(Lt,ue),ye=new tn(vt),Me=new tn(Ft),Fe=0;Fe<Lt;Fe++)Me.setUint8(Fe,ye.getUint8(Fe))}catch(Ve){throw new yt("ArrayBuffer is detached",le)}}return Ut(Rt,vt,Ft),Ft},re=function(vt,Rt,Tt,wt,Ft){var Lt=p[Rt];return M(Lt)||jt(Rt),new Lt(Xt(vt.buffer,Ft),Tt,wt)},oe=function(vt,Rt){if(L(vt)&&zt("Symbol"),!M(vt))return vt;if(Rt){if(Et(Rt,vt))return Ht(Rt,vt)}else Rt=new At;var Tt=F(vt),wt,Ft,Lt,ue,ye,Me,Fe,tn;switch(Tt){case"Array":Lt=rt(U(vt));break;case"Object":Lt={};break;case"Map":Lt=new At;break;case"Set":Lt=new kt;break;case"RegExp":Lt=new RegExp(vt.source,k(vt));break;case"Error":switch(Ft=vt.name,Ft){case"AggregateError":Lt=new(x(Ft))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":Lt=new(x(Ft));break;case"CompileError":case"LinkError":case"RuntimeError":Lt=new(x("WebAssembly",Ft));break;default:Lt=new ut}break;case"DOMException":Lt=new yt(vt.message,vt.name);break;case"ArrayBuffer":case"SharedArrayBuffer":Lt=Xt(vt,Rt,Tt);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":Me=Tt==="DataView"?vt.byteLength:vt.length,Lt=re(vt,Tt,vt.byteOffset,Me,Rt);break;case"DOMQuad":try{Lt=new DOMQuad(oe(vt.p1,Rt),oe(vt.p2,Rt),oe(vt.p3,Rt),oe(vt.p4,Rt))}catch(Ve){Lt=we(vt,Tt)}break;case"File":if(Pt)try{Lt=Pt(vt),F(Lt)!==Tt&&(Lt=void 0)}catch(Ve){}if(!Lt)try{Lt=new File([vt],vt.name,vt)}catch(Ve){}Lt||jt(Tt);break;case"FileList":if(ue=$t(),ue){for(ye=0,Me=U(vt);ye<Me;ye++)ue.items.add(oe(vt[ye],Rt));Lt=ue.files}else Lt=we(vt,Tt);break;case"ImageData":try{Lt=new ImageData(oe(vt.data,Rt),vt.width,vt.height,{colorSpace:vt.colorSpace})}catch(Ve){Lt=we(vt,Tt)}break;default:if(Pt)Lt=Pt(vt);else switch(Tt){case"BigInt":Lt=et(vt.valueOf());break;case"Boolean":Lt=et(_t(vt));break;case"Number":Lt=et(Nt(vt));break;case"String":Lt=et(Jt(vt));break;case"Date":Lt=new nt(ne(vt));break;case"Blob":try{Lt=vt.slice(0,vt.size,vt.type)}catch(Ve){jt(Tt)}break;case"DOMPoint":case"DOMPointReadOnly":wt=p[Tt];try{Lt=wt.fromPoint?wt.fromPoint(vt):new wt(vt.x,vt.y,vt.z,vt.w)}catch(Ve){jt(Tt)}break;case"DOMRect":case"DOMRectReadOnly":wt=p[Tt];try{Lt=wt.fromRect?wt.fromRect(vt):new wt(vt.x,vt.y,vt.width,vt.height)}catch(Ve){jt(Tt)}break;case"DOMMatrix":case"DOMMatrixReadOnly":wt=p[Tt];try{Lt=wt.fromMatrix?wt.fromMatrix(vt):new wt(vt)}catch(Ve){jt(Tt)}break;case"AudioData":case"VideoFrame":I(vt.clone)||jt(Tt);try{Lt=vt.clone()}catch(Ve){zt(Tt)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":jt(Tt);default:zt(Tt)}}switch(Ut(Rt,vt,Lt),Tt){case"Array":case"Object":for(Fe=Dt(vt),ye=0,Me=U(Fe);ye<Me;ye++)tn=Fe[ye],j(Lt,tn,oe(vt[tn],Rt));break;case"Map":vt.forEach(function(Ve,_n){Ut(Lt,oe(_n,Rt),oe(Ve,Rt))});break;case"Set":vt.forEach(function(Ve){Ct(Lt,oe(Ve,Rt))});break;case"Error":X(Lt,"message",oe(vt.message,Rt)),G(vt,"cause")&&X(Lt,"cause",oe(vt.cause,Rt)),Ft==="AggregateError"?Lt.errors=oe(vt.errors,Rt):Ft==="SuppressedError"&&(Lt.error=oe(vt.error,Rt),Lt.suppressed=oe(vt.suppressed,Rt));case"DOMException":Q&&X(Lt,"stack",oe(vt.stack,Rt))}return Lt},pe=function(vt,Rt){if(!M(vt))throw new ht("Transfer option cannot be converted to a sequence");var Tt=[];D(vt,function(_n){Vt(Tt,N(_n))});for(var wt=0,Ft=U(Tt),Lt=new kt,ue,ye,Me,Fe,tn,Ve;wt<Ft;){if(ue=Tt[wt++],ye=F(ue),Fe=void 0,ye==="ArrayBuffer"?It(Lt,ue):Et(Rt,ue))throw new yt("Duplicate transferable",le);if(ye==="ArrayBuffer"){Ct(Lt,ue);continue}if(at)Fe=ce(ue,{transfer:[ue]});else switch(ye){case"ImageBitmap":Me=p.OffscreenCanvas,R(Me)||jt(ye,fe);try{tn=new Me(ue.width,ue.height),Ve=tn.getContext("bitmaprenderer"),Ve.transferFromImageBitmap(ue),Fe=tn.transferToImageBitmap()}catch(_n){}break;case"AudioData":case"VideoFrame":(!I(ue.clone)||!I(ue.close))&&jt(ye,fe);try{Fe=ue.clone(),ue.close()}catch(_n){}break;case"MediaSourceHandle":case"MessagePort":case"MIDIAccess":case"OffscreenCanvas":case"ReadableStream":case"RTCDataChannel":case"TransformStream":case"WebTransportReceiveStream":case"WebTransportSendStream":case"WritableStream":jt(ye,fe)}if(Fe===void 0)throw new yt("This object cannot be transferred: "+ye,le);Ut(Rt,ue,Fe)}return Lt},rn=function(vt){J(vt,function(Rt){at?ce(Rt,{transfer:[Rt]}):I(Rt.transfer)?Rt.transfer():Z?Z(Rt):jt("ArrayBuffer",fe)})};g({global:!0,enumerable:!0,sham:!at,forced:xe},{structuredClone:function(Rt){var Tt=V(arguments.length,1)>1&&!O(arguments[1])?N(arguments[1]):void 0,wt=Tt?Tt.transfer:void 0,Ft,Lt;wt!==void 0&&(Ft=new At,Lt=pe(wt,Ft));var ue=oe(Rt,Ft);return Lt&&rn(Lt),ue}})}),(function(T,P,a){"use strict";a(619),a(620)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(614),x=p(g.setInterval,!0);v({global:!0,bind:!0,forced:g.setInterval!==x},{setInterval:x})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(614),x=p(g.setTimeout,!0);v({global:!0,bind:!0,forced:g.setTimeout!==x},{setTimeout:x})}),(function(T,P,a){"use strict";a(622)}),(function(T,P,a){"use strict";a(489);var v=a(3),g=a(6),p=a(623),x=a(4),y=a(84),b=a(14),A=a(47),I=a(77),R=a(216),O=a(38),M=a(351),L=a(170),D=a(76),N=a(482).codeAt,F=a(624),G=a(625),j=a(68),X=a(82),U=a(390),V=a(626),k=a(51),Y=k.set,K=k.getterFor("URL"),J=V.URLSearchParams,Z=V.getState,Q=G.decode,at=G.encode,et=x.URL,rt=x.TypeError,nt=x.parseInt,ut=Math.floor,ht=Math.pow,pt=String.fromCharCode,yt=b("".charAt),At=b(/./.exec),Et=b([].join),Ht=b(1.1.toString),Ut=b([].pop),kt=b([].push),Ct=b("".replace),It=b([].shift),Dt=b("".split),Vt=b("".indexOf),_t=b("".slice),Nt=b("".toLowerCase),Jt=b([].unshift),ne="Invalid authority",ve="Invalid scheme",le="Invalid host",fe="Invalid port",Ce=/[a-z]/i,Be=/[\d+\-.a-z]/i,Ie=/\d/,ce=/^0x/i,xe=/^[0-7]+$/,Ue=/^\d+$/,Pt=/^[\da-f]+$/i,zt=/[\u0000-\u0020#%/:<>?@[\\\]^|\u007F]/,jt=/[\0\t\n\r #/:<>?@[\\\]^|]/,we=/^[\u0000-\u0020]+/,$t=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Xt=/[\t\n\r]/g,re=/[^\u0000-\u007F]/,oe="\xA8\xAF\xB4\xB8\u02D8\u02D9\u02DA\u02DB\u02DC\u02DD\u037A\u0384\u0385\u1FBD\u1FBF\u1FC0\u1FC1\u1FCD\u1FCE\u1FCF\u1FDD\u1FDE\u1FDF\u1FED\u1FEE\u1FFD\u1FFE\u2017\u203E\u2047\u2048\u2049\u2100\u2101\u2105\u2106\u2A74\u309B\u309C\uFC5E\uFC5F\uFC60\uFC61\uFC62\uFC63\uFDFA\uFDFB\uFE13\uFE16\uFE47\uFE48\uFE49\uFE4A\uFE4B\uFE4C\uFE55\uFE56\uFE5F\uFE64\uFE65\uFE68\uFE6A\uFE6B\uFE70\uFE72\uFE74\uFE76\uFE78\uFE7A\uFE7C\uFE7E\uFFE3",pe,rn=function(dt){return dt===173||dt===847||dt===8203||dt===12644||dt===65279||dt===65440||dt>=4447&&dt<=4448||dt>=6068&&dt<=6069||dt>=6155&&dt<=6159||dt>=8288&&dt<=8292||dt>=8298&&dt<=8303||dt>=65024&&dt<=65039||dt>=917760&&dt<=917999},vt=function(dt){return dt===65533||dt>=55296&&dt<=57343||dt>=128&&dt<=159||dt>=8206&&dt<=8207||dt>=8232&&dt<=8233||dt>=8234&&dt<=8238||dt>=8293&&dt<=8297||dt>=64976&&dt<=65007||(dt&65534)===65534||dt>=57344&&dt<=63743||dt>=983040&&dt<=1114109},Rt=function(dt){return dt>=65281&&dt<=65374?dt-65248:dt===160||dt===5760||dt===8239||dt===8287||dt===12288||dt>=8192&&dt<=8202||dt<=65535&&Vt(oe,pt(dt))>-1?32:dt},Tt=function(dt){if(!At(re,dt))return dt===""?null:F(dt);var Bt=L(dt),xt="",mt,Gt,Se;for(mt=0;mt<Bt.length;mt++){if(Gt=N(Bt[mt],0),vt(Gt))return null;rn(Gt)||(Se=Rt(Gt),xt+=Se===Gt?Bt[mt]:pt(Se))}return xt===""?null:F(xt)},wt=function(dt){var Bt=Dt(dt,"."),xt,mt;if(Bt[Bt.length-1]===""){if(Bt.length===1)return!1;Bt.length--}return xt=Bt[Bt.length-1],At(Ue,xt)?!0:At(ce,xt)?(mt=_t(xt,2),mt===""||!!At(Pt,mt)):!1},Ft=function(dt){var Bt=Dt(dt,"."),xt,mt,Gt,Se,de,dn,en;if(Bt.length&&Bt[Bt.length-1]===""&&Bt.length--,xt=Bt.length,xt>4)return null;for(mt=[],Gt=0;Gt<xt;Gt++){if(Se=Bt[Gt],Se==="")return null;if(de=10,Se.length>1&&yt(Se,0)==="0"&&(de=At(ce,Se)?16:8,Se=_t(Se,de===8?1:2)),Se==="")dn=0;else{if(!At(de===10?Ue:de===8?xe:Pt,Se))return null;dn=nt(Se,de)}kt(mt,dn)}for(Gt=0;Gt<xt;Gt++)if(dn=mt[Gt],Gt===xt-1){if(dn>=ht(256,5-xt))return null}else if(dn>255)return null;for(en=Ut(mt),Gt=0;Gt<mt.length;Gt++)en+=mt[Gt]*ht(256,3-Gt);return en},Lt=function(dt){var Bt=[0,0,0,0,0,0,0,0],xt=0,mt=null,Gt=0,Se,de,dn,en,Sn,Mn,Qt,hn=function(){return yt(dt,Gt)};if(hn()===":"){if(yt(dt,1)!==":")return;Gt+=2,xt++,mt=xt}for(;hn();){if(xt===8)return;if(hn()===":"){if(mt!==null)return;Gt++,xt++,mt=xt;continue}for(Se=de=0;de<4&&At(Pt,hn());)Se=Se*16+nt(hn(),16),Gt++,de++;if(hn()==="."){if(de===0||(Gt-=de,xt>6))return;for(dn=0;hn();){if(en=null,dn>0)if(hn()==="."&&dn<4)Gt++;else return;if(!At(Ie,hn()))return;for(;At(Ie,hn());){if(Sn=nt(hn(),10),en===null)en=Sn;else{if(en===0)return;en=en*10+Sn}if(en>255)return;Gt++}Bt[xt]=Bt[xt]*256+en,dn++,(dn===2||dn===4)&&xt++}if(dn!==4)return;break}else if(hn()===":"){if(Gt++,!hn())return}else if(hn())return;Bt[xt++]=Se}if(mt!==null)for(Mn=xt-mt,xt=7;xt!==0&&Mn>0;)Qt=Bt[xt],Bt[xt--]=Bt[mt+Mn-1],Bt[mt+--Mn]=Qt;else if(xt!==8)return;return Bt},ue=function(dt){for(var Bt=null,xt=1,mt=null,Gt=0,Se=0;Se<8;Se++)dt[Se]!==0?(Gt>xt&&(Bt=mt,xt=Gt),mt=null,Gt=0):(mt===null&&(mt=Se),++Gt);return Gt>xt?mt:Bt},ye=function(dt){var Bt,xt,mt,Gt;if(typeof dt=="number"){for(Bt=[],xt=0;xt<4;xt++)Jt(Bt,dt%256),dt=ut(dt/256);return Et(Bt,".")}if(typeof dt=="object"){for(Bt="",mt=ue(dt),xt=0;xt<8;xt++)Gt&&dt[xt]===0||(Gt&&(Gt=!1),mt===xt?(Bt+=xt?":":"::",Gt=!0):(Bt+=Ht(dt[xt],16),xt<7&&(Bt+=":")));return"["+Bt+"]"}return dt},Me={},Fe=M({},Me,{" ":1,'"':1,"#":1,"<":1,">":1}),tn=M({},Fe,{"'":1}),Ve=M({},Me,{" ":1,'"':1,"<":1,">":1,"`":1}),_n=M({},Ve,{"#":1,"?":1,"{":1,"}":1,"^":1}),Ci=M({},_n,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ar=function(dt,Bt){var xt=N(dt,0);return xt>=32&&xt<127&&!O(Bt,dt)?dt:dt==="'"&&O(Bt,dt)?"%27":at(dt)},Ga={ftp:21,file:null,http:80,https:443,ws:80,wss:443},xa=function(dt,Bt){var xt;return dt.length===2&&At(Ce,yt(dt,0))&&((xt=yt(dt,1))===":"||!Bt&&xt==="|")},Is=function(dt){var Bt;return dt.length>1&&xa(_t(dt,0,2))&&(dt.length===2||(Bt=yt(dt,2))==="/"||Bt==="\\"||Bt==="?"||Bt==="#")},fl=function(dt){return dt==="."||Nt(dt)==="%2e"},Rs=function(dt){return dt=Nt(dt),dt===".."||dt==="%2e."||dt===".%2e"||dt==="%2e%2e"},Ii={},ws={},Ri={},Os={},Ps={},wi={},Ms={},Ls={},Xa={},Wa={},Oi={},Pi={},Mi={},Li={},Di={},Fi={},ra={},sr={},Ds={},hr={},fn={},Va=function(dt,Bt,xt){var mt=j(dt),Gt,Se,de;if(Bt){if(Se=this.parse(mt),Se)throw new rt(Se);this.searchParams=null}else{if(xt!==void 0&&(Gt=new Va(xt,!0)),Se=this.parse(mt,null,Gt),Se)throw new rt(Se);de=Z(new J),de.bindURL(this),this.searchParams=de}};Va.prototype={type:"URL",parse:function(dt,Bt,xt){var mt=this,Gt=Bt||Ii,Se=0,de="",dn=!1,en=!1,Sn=!1,Mn,Qt,hn,qn;for(dt=j(dt),Bt||(mt.scheme="",mt.username="",mt.password="",mt.host=null,mt.port=null,mt.path=[],mt.query=null,mt.fragment=null,mt.cannotBeABaseURL=!1,dt=Ct(dt,we,""),dt=Ct(dt,$t,"$1")),dt=Ct(dt,Xt,""),Mn=L(dt);Se<=Mn.length;){switch(Qt=Mn[Se],Gt){case Ii:if(Qt&&At(Ce,Qt))de+=Nt(Qt),Gt=ws;else{if(Bt)return ve;Gt=Ri;continue}break;case ws:if(Qt&&At(Be,Qt))de+=Nt(Qt);else if(Qt===":"){if(Bt&&(mt.isSpecial()!==O(Ga,de)||de==="file"&&(mt.includesCredentials()||mt.port!==null)||mt.scheme==="file"&&mt.host===""))return;if(mt.scheme=de,Bt){mt.isSpecial()&&Ga[mt.scheme]===mt.port&&(mt.port=null);return}de="",mt.scheme==="file"?Gt=Li:mt.isSpecial()&&xt&&xt.scheme===mt.scheme?Gt=Os:mt.isSpecial()?Gt=Ls:Mn[Se+1]==="/"?(Gt=Ps,Se++):(mt.cannotBeABaseURL=!0,kt(mt.path,""),Gt=Ds)}else{if(Bt)return ve;de="",Gt=Ri,Se=0;continue}break;case Ri:if(!xt||xt.cannotBeABaseURL&&Qt!=="#")return ve;if(xt.cannotBeABaseURL&&Qt==="#"){mt.scheme=xt.scheme,mt.path=D(xt.path),mt.query=xt.query,mt.fragment="",mt.cannotBeABaseURL=!0,Gt=fn;break}Gt=xt.scheme==="file"?Li:wi;continue;case Os:if(Qt==="/"&&Mn[Se+1]==="/")Gt=Xa,Se++;else{Gt=wi;continue}break;case Ps:if(Qt==="/"){Gt=Wa;break}else{Gt=sr;continue}case wi:if(mt.scheme=xt.scheme,Qt===pe)mt.username=xt.username,mt.password=xt.password,mt.host=xt.host,mt.port=xt.port,mt.path=D(xt.path),mt.query=xt.query;else if(Qt==="/"||Qt==="\\"&&mt.isSpecial())Gt=Ms;else if(Qt==="?")mt.username=xt.username,mt.password=xt.password,mt.host=xt.host,mt.port=xt.port,mt.path=D(xt.path),mt.query="",Gt=hr;else if(Qt==="#")mt.username=xt.username,mt.password=xt.password,mt.host=xt.host,mt.port=xt.port,mt.path=D(xt.path),mt.query=xt.query,mt.fragment="",Gt=fn;else{mt.username=xt.username,mt.password=xt.password,mt.host=xt.host,mt.port=xt.port,mt.path=D(xt.path),mt.path.length&&mt.path.length--,Gt=sr;continue}break;case Ms:if(mt.isSpecial()&&(Qt==="/"||Qt==="\\"))Gt=Xa;else if(Qt==="/")Gt=Wa;else{mt.username=xt.username,mt.password=xt.password,mt.host=xt.host,mt.port=xt.port,Gt=sr;continue}break;case Ls:if(Gt=Xa,Qt!=="/"||Mn[Se+1]!=="/")continue;Se++;break;case Xa:if(Qt!=="/"&&Qt!=="\\"){Gt=Wa;continue}break;case Wa:if(Qt==="@"){dn&&(de="%40"+de),dn=!0,hn=L(de);for(var ya=0;ya<hn.length;ya++){var ja=hn[ya];if(ja===":"&&!Sn){Sn=!0;continue}var Ta=Ar(ja,Ci);Sn?mt.password+=Ta:mt.username+=Ta}de=""}else if(Qt===pe||Qt==="/"||Qt==="?"||Qt==="#"||Qt==="\\"&&mt.isSpecial()){if(dn&&de==="")return ne;Se-=L(de).length+1,de="",Gt=Oi}else de+=Qt;break;case Oi:case Pi:if(Bt&&mt.scheme==="file"){Gt=Fi;continue}else if(Qt===":"&&!en){if(de==="")return le;if(Bt===Pi)return;if(qn=mt.parseHost(de),qn)return qn;de="",Gt=Mi}else if(Qt===pe||Qt==="/"||Qt==="?"||Qt==="#"||Qt==="\\"&&mt.isSpecial()){if(mt.isSpecial()&&de==="")return le;if(Bt&&de===""&&(mt.includesCredentials()||mt.port!==null))return;if(qn=mt.parseHost(de),qn)return qn;if(de="",Gt=ra,Bt)return;continue}else Qt==="["?en=!0:Qt==="]"&&(en=!1),de+=Qt;break;case Mi:if(At(Ie,Qt))de+=Qt;else if(Qt===pe||Qt==="/"||Qt==="?"||Qt==="#"||Qt==="\\"&&mt.isSpecial()||Bt){if(de!==""){var Ni=nt(de,10);if(Ni>65535)return fe;mt.port=mt.isSpecial()&&Ni===Ga[mt.scheme]?null:Ni,de=""}if(Bt)return;Gt=ra;continue}else return fe;break;case Li:if(mt.scheme="file",mt.host="",Qt==="/"||Qt==="\\")Gt=Di;else if(xt&&xt.scheme==="file")switch(Qt){case pe:mt.host=xt.host,mt.path=D(xt.path),mt.query=xt.query;break;case"?":mt.host=xt.host,mt.path=D(xt.path),mt.query="",Gt=hr;break;case"#":mt.host=xt.host,mt.path=D(xt.path),mt.query=xt.query,mt.fragment="",Gt=fn;break;default:mt.host=xt.host,Is(Et(D(Mn,Se),""))||(mt.path=D(xt.path),mt.shortenPath()),Gt=sr;continue}else{Gt=sr;continue}break;case Di:if(Qt==="/"||Qt==="\\"){Gt=Fi;break}xt&&xt.scheme==="file"&&(mt.host=xt.host,!Is(Et(D(Mn,Se),""))&&xa(xt.path[0],!0)&&kt(mt.path,xt.path[0])),Gt=sr;continue;case Fi:if(Qt===pe||Qt==="/"||Qt==="\\"||Qt==="?"||Qt==="#"){if(!Bt&&xa(de))Gt=sr;else if(de===""){if(mt.host="",Bt)return;Gt=ra}else{if(qn=mt.parseHost(de),qn)return qn;if(mt.host==="localhost"&&(mt.host=""),Bt)return;de="",Gt=ra}continue}else de+=Qt;break;case ra:if(mt.isSpecial()){if(Gt=sr,Qt!=="/"&&Qt!=="\\")continue}else if(!Bt&&Qt==="?")mt.query="",Gt=hr;else if(!Bt&&Qt==="#")mt.fragment="",Gt=fn;else if(Qt!==pe&&(Gt=sr,Qt!=="/"))continue;break;case sr:if(Qt===pe||Qt==="/"||Qt==="\\"&&mt.isSpecial()||!Bt&&(Qt==="?"||Qt==="#")){if(Rs(de)?(mt.shortenPath(),Qt!=="/"&&!(Qt==="\\"&&mt.isSpecial())&&kt(mt.path,"")):fl(de)?Qt!=="/"&&!(Qt==="\\"&&mt.isSpecial())&&kt(mt.path,""):(mt.scheme==="file"&&!mt.path.length&&xa(de)&&(mt.host!==null&&mt.host!==""&&(mt.host=""),de=yt(de,0)+":"),kt(mt.path,de)),de="",mt.scheme==="file"&&(Qt===pe||Qt==="?"||Qt==="#"))for(;mt.path.length>1&&mt.path[0]==="";)It(mt.path);Qt==="?"?(mt.query="",Gt=hr):Qt==="#"&&(mt.fragment="",Gt=fn)}else de+=Ar(Qt,_n);break;case Ds:Qt==="?"?(mt.query="",Gt=hr):Qt==="#"?(mt.fragment="",Gt=fn):Qt!==pe&&(Qt===" "?mt.path[0]+=Mn[Se+1]==="?"||Mn[Se+1]==="#"?"%20":" ":mt.path[0]+=Ar(Qt,Me));break;case hr:!Bt&&Qt==="#"?(mt.fragment="",Gt=fn):Qt!==pe&&(mt.query+=Ar(Qt,mt.isSpecial()?tn:Fe));break;case fn:Qt!==pe&&(mt.fragment+=Ar(Qt,Ve));break}Se++}},parseHost:function(dt){var Bt,xt,mt;if(yt(dt,0)==="["){if(yt(dt,dt.length-1)!=="]"||(Bt=Lt(_t(dt,1,-1)),!Bt))return le;this.host=Bt}else if(this.isSpecial()){if(dt=Tt(Q(dt)),dt===null||At(zt,dt))return le;if(wt(dt)){if(Bt=Ft(dt),Bt===null)return le;this.host=Bt}else this.host=dt}else{if(At(jt,dt))return le;for(Bt="",xt=L(dt),mt=0;mt<xt.length;mt++)Bt+=Ar(xt[mt],Me);this.host=Bt}},cannotHaveUsernamePasswordPort:function(){return this.host===null||this.host===""||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return O(Ga,this.scheme)},shortenPath:function(){var dt=this.path,Bt=dt.length;Bt&&(this.scheme!=="file"||Bt!==1||!xa(dt[0],!0))&&dt.length--},serialize:function(){var dt=this,Bt=dt.scheme,xt=dt.username,mt=dt.password,Gt=dt.host,Se=dt.port,de=dt.path,dn=dt.query,en=dt.fragment,Sn=Bt+":";return Gt!==null?(Sn+="//",dt.includesCredentials()&&(Sn+=xt+(mt?":"+mt:"")+"@"),Sn+=ye(Gt),Se!==null&&(Sn+=":"+Se)):Bt==="file"&&(Sn+="//"),Gt===null&&!dt.cannotBeABaseURL&&de.length>1&&de[0]===""&&(Sn+="/."),Sn+=dt.cannotBeABaseURL?de[0]:de.length?"/"+Et(de,"/"):"",dn!==null&&(Sn+="?"+dn),en!==null&&(Sn+="#"+en),Sn},setHref:function(dt){var Bt=this.parse(dt);if(Bt)throw new rt(Bt);this.searchParams.update()},getOrigin:function(){var dt=this.scheme,Bt=this.port;if(dt==="blob")try{return new aa(this.path[0]).origin}catch(xt){return"null"}return dt==="file"||!this.isSpecial()?"null":dt+"://"+ye(this.host)+(Bt!==null?":"+Bt:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(dt){this.parse(j(dt)+":",Ii)},getUsername:function(){return this.username},setUsername:function(dt){var Bt=L(j(dt));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var xt=0;xt<Bt.length;xt++)this.username+=Ar(Bt[xt],Ci)}},getPassword:function(){return this.password},setPassword:function(dt){var Bt=L(j(dt));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var xt=0;xt<Bt.length;xt++)this.password+=Ar(Bt[xt],Ci)}},getHost:function(){var dt=this.host,Bt=this.port;return dt===null?"":Bt===null?ye(dt):ye(dt)+":"+Bt},setHost:function(dt){this.cannotBeABaseURL||this.parse(dt,Oi)},getHostname:function(){var dt=this.host;return dt===null?"":ye(dt)},setHostname:function(dt){this.cannotBeABaseURL||this.parse(dt,Pi)},getPort:function(){var dt=this.port;return dt===null?"":j(dt)},setPort:function(dt){this.cannotHaveUsernamePasswordPort()||(dt=j(dt),dt===""?this.port=null:this.parse(dt,Mi))},getPathname:function(){var dt=this.path;return this.cannotBeABaseURL?dt[0]:dt.length?"/"+Et(dt,"/"):""},setPathname:function(dt){this.cannotBeABaseURL||(this.path=[],this.parse(dt,ra))},getSearch:function(){var dt=this.query;return dt?"?"+dt:""},setSearch:function(dt){dt=j(dt),dt===""?this.query=null:(yt(dt,0)==="?"&&(dt=_t(dt,1)),this.query="",this.parse(dt,hr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var dt=this.fragment;return dt?"#"+dt:""},setHash:function(dt){if(dt=j(dt),dt===""){this.fragment=null;return}yt(dt,0)==="#"&&(dt=_t(dt,1)),this.fragment="",this.parse(dt,fn)},update:function(){this.query=this.searchParams.serialize()||null}};var aa=function(Bt){var xt=R(this,bn),mt=U(arguments.length,1)>1?arguments[1]:void 0,Gt=Y(xt,new Va(Bt,!1,mt));g||(xt.href=Gt.serialize(),xt.origin=Gt.getOrigin(),xt.protocol=Gt.getProtocol(),xt.username=Gt.getUsername(),xt.password=Gt.getPassword(),xt.host=Gt.getHost(),xt.hostname=Gt.getHostname(),xt.port=Gt.getPort(),xt.pathname=Gt.getPathname(),xt.search=Gt.getSearch(),xt.searchParams=Gt.getSearchParams(),xt.hash=Gt.getHash())},bn=aa.prototype,Yt=function(dt,Bt){return{get:function(){return K(this)[dt]()},set:Bt&&function(xt){return K(this)[Bt](xt)},configurable:!0,enumerable:!0}};if(g&&(I(bn,"href",Yt("serialize","setHref")),I(bn,"origin",Yt("getOrigin")),I(bn,"protocol",Yt("getProtocol","setProtocol")),I(bn,"username",Yt("getUsername","setUsername")),I(bn,"password",Yt("getPassword","setPassword")),I(bn,"host",Yt("getHost","setHost")),I(bn,"hostname",Yt("getHostname","setHostname")),I(bn,"port",Yt("getPort","setPort")),I(bn,"pathname",Yt("getPathname","setPathname")),I(bn,"search",Yt("getSearch","setSearch")),I(bn,"searchParams",Yt("getSearchParams")),I(bn,"hash",Yt("getHash","setHash"))),A(bn,"toJSON",function(){return K(this).serialize()},{enumerable:!0}),A(bn,"toString",function(){return K(this).serialize()},{enumerable:!0}),et){var qt=et.createObjectURL,Fs=et.revokeObjectURL;qt&&A(aa,"createObjectURL",y(qt,et)),Fs&&A(aa,"revokeObjectURL",y(Fs,et))}X(aa,"URL"),v({global:!0,constructor:!0,forced:!p,sham:!g},{URL:aa})}),(function(T,P,a){"use strict";var v=a(7),g=a(33),p=a(6),x=a(36),y=g("iterator");T.exports=!v(function(){var b=new URL("b?a=1&b=2&c=3","https://a"),A=b.searchParams,I=new URLSearchParams("a=1&a=2&b=3"),R="";return b.pathname="c%20d",A.forEach(function(O,M){A.delete("b"),R+=M+O}),I.delete("a",2),I.delete("b",void 0),x&&(!b.toJSON||!I.has("a",1)||I.has("a",2)||!I.has("a",void 0)||I.has("b"))||!A.size&&(x||!p)||!A.sort||b.href!=="https://a/c%20d?a=1&c=3"||A.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!A[y]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("https://a#\u0431").hash!=="#%D0%B1"||R!=="a1c3"||new URL("https://x",void 0).host!=="x"})}),(function(T,P,a){"use strict";var v=a(14),g=2147483647,p=36,x=1,y=26,b=38,A=700,I=72,R=128,O="-",M=/[^\0-\u007E]/,L=/[.\u3002\uFF0E\uFF61]/g,D="Overflow: input needs wider integers to process",N=p-x,F=RangeError,G=v(L.exec),j=Math.floor,X=String.fromCharCode,U=v("".charCodeAt),V=v([].join),k=v([].push),Y=v("".replace),K=v("".split),J=v("".toLowerCase),Z=function(rt){for(var nt=[],ut=0,ht=rt.length;ut<ht;){var pt=U(rt,ut++);if(pt>=55296&&pt<=56319&&ut<ht){var yt=U(rt,ut++);(yt&64512)===56320?k(nt,((pt&1023)<<10)+(yt&1023)+65536):(k(nt,pt),ut--)}else k(nt,pt)}return nt},Q=function(rt){return rt+22+75*(rt<26)},at=function(rt,nt,ut){var ht=0;for(rt=ut?j(rt/A):rt>>1,rt+=j(rt/nt);rt>N*y>>1;)rt=j(rt/N),ht+=p;return j(ht+(N+1)*rt/(rt+b))},et=function(rt){var nt=[];rt=Z(rt);var ut=rt.length,ht=R,pt=0,yt=I,At,Et;for(At=0;At<rt.length;At++)Et=rt[At],Et<128&&k(nt,X(Et));var Ht=nt.length,Ut=Ht;for(Ht&&k(nt,O);Ut<ut;){var kt=g;for(At=0;At<rt.length;At++)Et=rt[At],Et>=ht&&Et<kt&&(kt=Et);var Ct=Ut+1;if(kt-ht>j((g-pt)/Ct))throw new F(D);for(pt+=(kt-ht)*Ct,ht=kt,At=0;At<rt.length;At++){if(Et=rt[At],Et<ht&&++pt>g)throw new F(D);if(Et===ht){for(var It=pt,Dt=p;;){var Vt=Dt<=yt?x:Dt>=yt+y?y:Dt-yt;if(It<Vt)break;var _t=It-Vt,Nt=p-Vt;k(nt,X(Q(Vt+_t%Nt))),It=j(_t/Nt),Dt+=p}k(nt,X(Q(It))),yt=at(pt,Ct,Ut===Ht),pt=0,Ut++}}pt++,ht++}return V(nt,"")};T.exports=function(rt){var nt=[],ut=K(Y(J(rt),L,"."),"."),ht,pt;for(ht=0;ht<ut.length;ht++)pt=ut[ht],k(nt,G(M,pt)?"xn--"+et(pt):pt);return V(nt,".")}}),(function(T,P,a){"use strict";a(486);var v=a(23),g=a(14),p=String.fromCharCode,x=v("String","fromCodePoint"),y=encodeURIComponent,b=parseInt,A=g("".charAt),I=g([].push),R=g("".replace),O=g("".slice),M=g(/./.exec),L="\uFFFD",D=/^[0-9a-f]+$/i,N=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF]/g,F=function(k,Y){var K=O(k,Y,Y+2);return M(D,K)?b(K,16):NaN},G=function(k){for(var Y=0,K=128;K>0&&(k&K)!==0;K>>=1)Y++;return Y},j=function(k){var Y=null,K=k.length;switch(K){case 1:Y=k[0];break;case 2:Y=(k[0]&31)<<6|k[1]&63;break;case 3:Y=(k[0]&15)<<12|(k[1]&63)<<6|k[2]&63;break;case 4:Y=(k[0]&7)<<18|(k[1]&63)<<12|(k[2]&63)<<6|k[3]&63;break}return Y===null||Y>1114111||Y>=55296&&Y<=57343||Y<(K>3?65536:K>2?2048:K>1?128:0)?null:Y},X=function(k){return k.length===2?k:L},U=function(k){for(var Y=k.length,K="",J=0;J<Y;){var Z=A(k,J);if(Z==="%"){if(A(k,J+1)==="%"||J+3>Y){K+="%",J++;continue}var Q=F(k,J+1);if(Q!==Q){K+=Z,J++;continue}J+=2;var at=G(Q);if(at===0)Z=p(Q);else{if(at===1||at>4){K+=L,J++;continue}for(var et=[Q],rt=1;rt<at&&(J++,!(J+3>Y||A(k,J)!=="%"));){var nt=F(k,J+1);if(nt!==nt||nt>191||nt<128||rt===1&&(Q===224&&nt<160||Q===237&&nt>159||Q===240&&nt<144||Q===244&&nt>143))break;I(et,nt),J+=2,rt++}if(et.length!==at){K+=L;continue}var ut=j(et);if(ut===null){for(var ht=0;ht<at;ht++)K+=L;J++;continue}else Z=x(ut)}}K+=Z,J++}return K},V=function(k){try{return y(k)}catch(Y){return y(R(k,N,X))}};T.exports={decode:U,encode:V}}),(function(T,P,a){"use strict";a(176);var v=a(3),g=a(4),p=a(393),x=a(8),y=a(14),b=a(6),A=a(623),I=a(625),R=a(47),O=a(77),M=a(215),L=a(82),D=a(178),N=a(51),F=a(216),G=a(21),j=a(38),X=a(84),U=a(69),V=a(46),k=a(20),Y=a(68),K=a(71),J=a(11),Z=a(140),Q=a(141),at=a(180),et=a(390),rt=a(33),nt=a(196),ut=rt("iterator"),ht="URLSearchParams",pt=ht+"Iterator",yt=N.set,At=N.getterFor(ht),Et=N.getterFor(pt),Ht=I.decode,Ut=I.encode,kt=p("fetch"),Ct=p("Request"),It=p("Headers"),Dt=Ct&&Ct.prototype,Vt=It&&It.prototype,_t=g.TypeError,Nt=y("".charAt),Jt=y([].join),ne=y([].push),ve=y("".replace),le=y([].shift),fe=y([].splice),Ce=y("".split),Be=y("".slice),Ie=/\+/g,ce=function(vt){return Ht(ve(vt,Ie," "))},xe=/[!'()~]|%20/g,Ue={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Pt=function(vt){return Ue[vt]},zt=function(vt){return ve(Ut(vt),xe,Pt)},jt=D(function(Rt,Tt){yt(this,{type:pt,target:At(Rt).entries,index:0,kind:Tt})},ht,function(){var Rt=Et(this),Tt=Rt.target,wt=Rt.index++;if(!Tt||wt>=Tt.length)return Rt.target=null,at(void 0,!0);var Ft=Tt[wt];switch(Rt.kind){case"keys":return at(Ft.key,!1);case"values":return at(Ft.value,!1)}return at([Ft.key,Ft.value],!1)},!0),we=function(vt){this.entries=[],this.url=null,vt!==void 0&&(k(vt)?this.parseObject(vt):this.parseQuery(typeof vt=="string"?Nt(vt,0)==="?"?Be(vt,1):vt:Y(vt)))};we.prototype={type:ht,bindURL:function(vt){this.url=vt,this.update()},parseObject:function(vt){var Rt=this.entries,Tt=Q(vt),wt,Ft,Lt,ue,ye,Me,Fe;if(Tt)for(wt=Z(vt,Tt),Ft=wt.next;!(Lt=x(Ft,wt)).done;){if(ue=Z(V(Lt.value)),ye=ue.next,(Me=x(ye,ue)).done||(Fe=x(ye,ue)).done||!x(ye,ue).done)throw new _t("Expected sequence with length 2");ne(Rt,{key:Y(Me.value),value:Y(Fe.value)})}else for(var tn in vt)j(vt,tn)&&ne(Rt,{key:tn,value:Y(vt[tn])})},parseQuery:function(vt){if(vt)for(var Rt=this.entries,Tt=Ce(vt,"&"),wt=0,Ft,Lt;wt<Tt.length;)Ft=Tt[wt++],Ft.length&&(Lt=Ce(Ft,"="),ne(Rt,{key:ce(le(Lt)),value:ce(Jt(Lt,"="))}))},serialize:function(){for(var vt=this.entries,Rt=[],Tt=0,wt;Tt<vt.length;)wt=vt[Tt++],ne(Rt,zt(wt.key)+"="+zt(wt.value));return Jt(Rt,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var $t=function(){F(this,Xt);var Rt=arguments.length>0?arguments[0]:void 0,Tt=yt(this,new we(Rt));b||(this.size=Tt.entries.length)},Xt=$t.prototype;if(M(Xt,{append:function(Rt,Tt){var wt=At(this);et(arguments.length,2),ne(wt.entries,{key:Y(Rt),value:Y(Tt)}),b||this.size++,wt.updateURL()},delete:function(vt){for(var Rt=At(this),Tt=et(arguments.length,1),wt=Rt.entries,Ft=Y(vt),Lt=Tt<2?void 0:arguments[1],ue=Lt===void 0?Lt:Y(Lt),ye=0;ye<wt.length;){var Me=wt[ye];Me.key===Ft&&(ue===void 0||Me.value===ue)?fe(wt,ye,1):ye++}b||(this.size=wt.length),Rt.updateURL()},get:function(Rt){var Tt=At(this).entries;et(arguments.length,1);for(var wt=Y(Rt),Ft=0;Ft<Tt.length;Ft++)if(Tt[Ft].key===wt)return Tt[Ft].value;return null},getAll:function(Rt){var Tt=At(this).entries;et(arguments.length,1);for(var wt=Y(Rt),Ft=[],Lt=0;Lt<Tt.length;Lt++)Tt[Lt].key===wt&&ne(Ft,Tt[Lt].value);return Ft},has:function(Rt){for(var Tt=At(this).entries,wt=et(arguments.length,1),Ft=Y(Rt),Lt=wt<2?void 0:arguments[1],ue=Lt===void 0?Lt:Y(Lt),ye=0;ye<Tt.length;){var Me=Tt[ye++];if(Me.key===Ft&&(ue===void 0||Me.value===ue))return!0}return!1},set:function(Rt,Tt){var wt=At(this);et(arguments.length,2);for(var Ft=wt.entries,Lt=!1,ue=Y(Rt),ye=Y(Tt),Me=0,Fe;Me<Ft.length;Me++)Fe=Ft[Me],Fe.key===ue&&(Lt?fe(Ft,Me--,1):(Lt=!0,Fe.value=ye));Lt||ne(Ft,{key:ue,value:ye}),b||(this.size=Ft.length),wt.updateURL()},sort:function(){var Rt=At(this);nt(Rt.entries,function(Tt,wt){return Tt.key>wt.key?1:-1}),Rt.updateURL()},forEach:function(Rt){for(var Tt=At(this).entries,wt=X(Rt,arguments.length>1?arguments[1]:void 0),Ft=0,Lt;Ft<Tt.length;)Lt=Tt[Ft++],wt(Lt.value,Lt.key,this)},keys:function(){return new jt(this,"keys")},values:function(){return new jt(this,"values")},entries:function(){return new jt(this,"entries")}},{enumerable:!0}),R(Xt,ut,Xt.entries,{name:"entries"}),R(Xt,"toString",function(){return At(this).serialize()},{enumerable:!0}),b&&O(Xt,"size",{get:function(){return At(this).entries.length},configurable:!0,enumerable:!0}),L($t,ht),v({global:!0,constructor:!0,forced:!A},{URLSearchParams:$t}),!A&&G(It)){var re=y(Vt.has),oe=y(Vt.set),pe=function(vt){if(k(vt)){var Rt=vt.body,Tt;if(U(Rt)===ht)return Tt=vt.headers?new It(vt.headers):new It,re(Tt,"content-type")||oe(Tt,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),K(vt,{body:J(0,Y(Rt)),headers:J(0,Tt)})}return vt};if(G(kt)&&v({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(Rt){return kt(Rt,arguments.length>1?pe(arguments[1]):{})}}),G(Ct)){var rn=function(Rt){return F(this,Dt),new Ct(Rt,arguments.length>1?pe(arguments[1]):{})};Dt.constructor=rn,rn.prototype=Dt,v({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:rn})}}T.exports={URLSearchParams:$t,getState:At}}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(7),x=a(390),y=a(68),b=a(623),A=g("URL"),I=b&&p(function(){A.canParse()}),R=p(function(){return A.canParse.length!==1});v({target:"URL",stat:!0,forced:!I||R},{canParse:function(M){var L=x(arguments.length,1),D=y(M),N=L<2||arguments[1]===void 0?void 0:y(arguments[1]);try{return!!new A(D,N)}catch(F){return!1}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(390),x=a(68),y=a(623),b=g("URL");v({target:"URL",stat:!0,forced:!y},{parse:function(I){var R=p(arguments.length,1),O=x(I),M=R<2||arguments[1]===void 0?void 0:x(arguments[1]);try{return new b(O,M)}catch(L){return null}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(206),x=p("URL","toString");v({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return g(x,this)}})}),(function(T,P,a){"use strict";a(626)}),(function(T,P,a){"use strict";var v=a(47),g=a(14),p=a(68),x=a(390),y=URLSearchParams,b=y.prototype,A=g(b.append),I=g(b.delete),R=g(b.forEach),O=g([].push),M=new y("a=1&a=2&b=3");M.delete("a",1),M.delete("b",void 0),M+""!="a=2"&&v(b,"delete",function(L){var D=arguments.length,N=D<2?void 0:arguments[1];if(D&&N===void 0)return I(this,L);var F=[];R(this,function(k,Y){O(F,{key:Y,value:k})}),x(D,1);for(var G=p(L),j=p(N),X=0,U=F.length,V;X<U;)V=F[X],I(this,V.key),X++;for(X=0;X<U;)V=F[X++],V.key===G&&V.value===j||A(this,V.key,V.value)},{enumerable:!0,unsafe:!0})}),(function(T,P,a){"use strict";var v=a(47),g=a(14),p=a(68),x=a(390),y=URLSearchParams,b=y.prototype,A=g(b.getAll),I=g(b.has),R=new y("a=1");(R.has("a",2)||!R.has("a",void 0))&&v(b,"has",function(M){var L=arguments.length,D=L<2?void 0:arguments[1];if(L&&D===void 0)return I(this,M);var N=A(this,M);x(L,1);for(var F=p(D),G=0;G<N.length;)if(N[G++]===F)return!0;return!1},{enumerable:!0,unsafe:!0})}),(function(T,P,a){"use strict";var v=a(6),g=a(14),p=a(77),x=URLSearchParams.prototype,y=g(x.forEach);v&&!("size"in x)&&p(x,"size",{get:function(){var A=0;return y(this,function(){A++}),A},configurable:!0,enumerable:!0})}),(function(T,P,a){"use strict";a.r(P),a.d(P,{bb:function(){return nm},default:function(){return nm}});var v={};a.r(v),a.d(v,{selection:function(){return Fg},subchart:function(){return zg},zoom:function(){return jg}});var g={};a.r(g),a.d(g,{area:function(){return fp},areaLineRange:function(){return dp},areaSpline:function(){return vp},areaSplineRange:function(){return gp},areaStep:function(){return pp},areaStepRange:function(){return hp},bar:function(){return mp},bubble:function(){return xp},candlestick:function(){return Ap},donut:function(){return Lp},funnel:function(){return Bp},gauge:function(){return zp},line:function(){return Up},pie:function(){return Xp},polar:function(){return Vp},radar:function(){return Hp},scatter:function(){return Yp},spline:function(){return kp},step:function(){return Gp},treemap:function(){return em}});function p(){}function x(t){return t==null?p:function(){return this.querySelector(t)}}function y(t){typeof t!="function"&&(t=x(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],o=s.length,l=r[i]=new Array(o),c,u,f=0;f<o;++f)(c=s[f])&&(u=t.call(c,c.__data__,f,s))&&("__data__"in c&&(u.__data__=c.__data__),l[f]=u);return new fn(r,this._parents)}function b(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function A(){return[]}function I(t){return t==null?A:function(){return this.querySelectorAll(t)}}function R(t){return function(){return b(t.apply(this,arguments))}}function O(t){typeof t=="function"?t=R(t):t=I(t);for(var e=this._groups,n=e.length,r=[],i=[],s=0;s<n;++s)for(var o=e[s],l=o.length,c,u=0;u<l;++u)(c=o[u])&&(r.push(t.call(c,c.__data__,u,o)),i.push(c));return new fn(r,i)}function M(t){return function(){return this.matches(t)}}function L(t){return function(e){return e.matches(t)}}var D=Array.prototype.find;function N(t){return function(){return D.call(this.children,t)}}function F(){return this.firstElementChild}function G(t){return this.select(t==null?F:N(typeof t=="function"?t:L(t)))}var j=Array.prototype.filter;function X(){return Array.from(this.children)}function U(t){return function(){return j.call(this.children,t)}}function V(t){return this.selectAll(t==null?X:U(typeof t=="function"?t:L(t)))}function k(t){typeof t!="function"&&(t=M(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],o=s.length,l=r[i]=[],c,u=0;u<o;++u)(c=s[u])&&t.call(c,c.__data__,u,s)&&l.push(c);return new fn(r,this._parents)}function Y(t){return new Array(t.length)}function K(){return new fn(this._enter||this._groups.map(Y),this._parents)}function J(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}J.prototype={constructor:J,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Z(t){return function(){return t}}function Q(t,e,n,r,i,s){for(var o=0,l,c=e.length,u=s.length;o<u;++o)(l=e[o])?(l.__data__=s[o],r[o]=l):n[o]=new J(t,s[o]);for(;o<c;++o)(l=e[o])&&(i[o]=l)}function at(t,e,n,r,i,s,o){var l,c,u=new Map,f=e.length,d=s.length,h=new Array(f),m;for(l=0;l<f;++l)(c=e[l])&&(h[l]=m=o.call(c,c.__data__,l,e)+"",u.has(m)?i[l]=c:u.set(m,c));for(l=0;l<d;++l)m=o.call(t,s[l],l,s)+"",(c=u.get(m))?(r[l]=c,c.__data__=s[l],u.delete(m)):n[l]=new J(t,s[l]);for(l=0;l<f;++l)(c=e[l])&&u.get(h[l])===c&&(i[l]=c)}function et(t){return t.__data__}function rt(t,e){if(!arguments.length)return Array.from(this,et);var n=e?at:Q,r=this._parents,i=this._groups;typeof t!="function"&&(t=Z(t));for(var s=i.length,o=new Array(s),l=new Array(s),c=new Array(s),u=0;u<s;++u){var f=r[u],d=i[u],h=d.length,m=nt(t.call(f,f&&f.__data__,u,r)),S=m.length,E=l[u]=new Array(S),C=o[u]=new Array(S),w=c[u]=new Array(h);n(f,d,E,C,w,m,e);for(var $=0,z=0,B,W;$<S;++$)if(B=E[$]){for($>=z&&(z=$+1);!(W=C[z])&&++z<S;);B._next=W||null}}return o=new fn(o,r),o._enter=l,o._exit=c,o}function nt(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function ut(){return new fn(this._exit||this._groups.map(Y),this._parents)}function ht(t,e,n){var r=this.enter(),i=this,s=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function pt(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,s=r.length,o=Math.min(i,s),l=new Array(i),c=0;c<o;++c)for(var u=n[c],f=r[c],d=u.length,h=l[c]=new Array(d),m,S=0;S<d;++S)(m=u[S]||f[S])&&(h[S]=m);for(;c<i;++c)l[c]=n[c];return new fn(l,this._parents)}function yt(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,s=r[i],o;--i>=0;)(o=r[i])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function At(t){t||(t=Et);function e(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var o=n[s],l=o.length,c=i[s]=new Array(l),u,f=0;f<l;++f)(u=o[f])&&(c[f]=u);c.sort(e)}return new fn(i,this._parents).order()}function Et(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ht(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Ut(){return Array.from(this)}function kt(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,s=r.length;i<s;++i){var o=r[i];if(o)return o}return null}function Ct(){let t=0;for(const e of this)++t;return t}function It(){return!this.node()}function Dt(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],s=0,o=i.length,l;s<o;++s)(l=i[s])&&t.call(l,l.__data__,s,i);return this}var Vt="http://www.w3.org/1999/xhtml",_t={svg:"http://www.w3.org/2000/svg",xhtml:Vt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Nt(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),_t.hasOwnProperty(e)?{space:_t[e],local:t}:t}function Jt(t){return function(){this.removeAttribute(t)}}function ne(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ve(t,e){return function(){this.setAttribute(t,e)}}function le(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function fe(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Ce(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Be(t,e){var n=Nt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?ne:Jt:typeof e=="function"?n.local?Ce:fe:n.local?le:ve)(n,e))}function Ie(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ce(t){return function(){this.style.removeProperty(t)}}function xe(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ue(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Pt(t,e,n){return arguments.length>1?this.each((e==null?ce:typeof e=="function"?Ue:xe)(t,e,n==null?"":n)):zt(this.node(),t)}function zt(t,e){return t.style.getPropertyValue(e)||Ie(t).getComputedStyle(t,null).getPropertyValue(e)}function jt(t){return function(){delete this[t]}}function we(t,e){return function(){this[t]=e}}function $t(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Xt(t,e){return arguments.length>1?this.each((e==null?jt:typeof e=="function"?$t:we)(t,e)):this.node()[t]}function re(t){return t.trim().split(/^|\s+/)}function oe(t){return t.classList||new pe(t)}function pe(t){this._node=t,this._names=re(t.getAttribute("class")||"")}pe.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function rn(t,e){for(var n=oe(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function vt(t,e){for(var n=oe(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Rt(t){return function(){rn(this,t)}}function Tt(t){return function(){vt(this,t)}}function wt(t,e){return function(){(e.apply(this,arguments)?rn:vt)(this,t)}}function Ft(t,e){var n=re(t+"");if(arguments.length<2){for(var r=oe(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?wt:e?Rt:Tt)(n,e))}function Lt(){this.textContent=""}function ue(t){return function(){this.textContent=t}}function ye(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function Me(t){return arguments.length?this.each(t==null?Lt:(typeof t=="function"?ye:ue)(t)):this.node().textContent}function Fe(){this.innerHTML=""}function tn(t){return function(){this.innerHTML=t}}function Ve(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function _n(t){return arguments.length?this.each(t==null?Fe:(typeof t=="function"?Ve:tn)(t)):this.node().innerHTML}function Ci(){this.nextSibling&&this.parentNode.appendChild(this)}function Ar(){return this.each(Ci)}function Ga(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function xa(){return this.each(Ga)}function Is(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Vt&&e.documentElement.namespaceURI===Vt?e.createElement(t):e.createElementNS(n,t)}}function fl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Rs(t){var e=Nt(t);return(e.local?fl:Is)(e)}function Ii(t){var e=typeof t=="function"?t:Rs(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function ws(){return null}function Ri(t,e){var n=typeof t=="function"?t:Rs(t),r=e==null?ws:typeof e=="function"?e:x(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Os(){var t=this.parentNode;t&&t.removeChild(this)}function Ps(){return this.each(Os)}function wi(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ms(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ls(t){return this.select(t?Ms:wi)}function Xa(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Wa(t){return function(e){t.call(this,e,this.__data__)}}function Oi(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Pi(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,s;n<i;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++r]=s;++r?e.length=r:delete this.__on}}}function Mi(t,e,n){return function(){var r=this.__on,i,s=Wa(e);if(r){for(var o=0,l=r.length;o<l;++o)if((i=r[o]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=e;return}}this.addEventListener(t.type,s,n),i={type:t.type,name:t.name,value:e,listener:s,options:n},r?r.push(i):this.__on=[i]}}function Li(t,e,n){var r=Oi(t+""),i,s=r.length,o;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,f;c<u;++c)for(i=0,f=l[c];i<s;++i)if((o=r[i]).type===f.type&&o.name===f.name)return f.value}return}for(l=e?Mi:Pi,i=0;i<s;++i)this.each(l(r[i],e,n));return this}function Di(t,e,n){var r=Ie(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Fi(t,e){return function(){return Di(this,t,e)}}function ra(t,e){return function(){return Di(this,t,e.apply(this,arguments))}}function sr(t,e){return this.each((typeof e=="function"?ra:Fi)(t,e))}function*Ds(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,s=r.length,o;i<s;++i)(o=r[i])&&(yield o)}var hr=[null];function fn(t,e){this._groups=t,this._parents=e}function Va(){return new fn([[document.documentElement]],hr)}function aa(){return this}fn.prototype=Va.prototype={constructor:fn,select:y,selectAll:O,selectChild:G,selectChildren:V,filter:k,data:rt,enter:K,exit:ut,join:ht,merge:pt,selection:aa,order:yt,sort:At,call:Ht,nodes:Ut,node:kt,size:Ct,empty:It,each:Dt,attr:Be,style:Pt,property:Xt,classed:Ft,text:Me,html:_n,raise:Ar,lower:xa,append:Ii,insert:Ri,remove:Ps,clone:Ls,datum:Xa,on:Li,dispatch:sr,[Symbol.iterator]:Ds};var bn=Va;function Yt(t){return typeof t=="string"?new fn([[document.querySelector(t)]],[document.documentElement]):new fn([[t]],hr)}const qt={AREA:"area",AREA_LINE_RANGE:"area-line-range",AREA_SPLINE:"area-spline",AREA_SPLINE_RANGE:"area-spline-range",AREA_STEP:"area-step",AREA_STEP_RANGE:"area-step-range",BAR:"bar",BUBBLE:"bubble",CANDLESTICK:"candlestick",DONUT:"donut",FUNNEL:"funnel",GAUGE:"gauge",LINE:"line",PIE:"pie",POLAR:"polar",RADAR:"radar",SCATTER:"scatter",SPLINE:"spline",STEP:"step",TREEMAP:"treemap"},Fs={export:"exportApi",flow:"flow",xgrids:"grid",ygrids:"grid",regions:"regions",category:"category",categories:"category"},dt=16,Bt=10,xt=6,mt=3,Gt=xt+mt,Se=1,de={x:{start:"M0 -8.5 A6 6 0 0 0 -6.5 -3.5 V2.5 A6 6 0 0 0 0 8.5 Z M-2 -3.5 V3.5 M-4 -3.5 V3.5z",end:"M0 -8.5 A6 6 0 0 1 6.5 -3.5 V2.5 A6 6 0 0 1 0 8.5 Z M2 -3.5 V3.5 M4 -3.5 V3.5z"},y:{start:"M8.5 0 a6 6 0 0 0 -6 -6.5 H-2.5 a 6 6 0 0 0 -6 6.5 z m-5 -2 H-3.5 m7 -2 H-3.5z",end:"M8.5 0 a6 -6 0 0 1 -6 6.5 H-2.5 a 6 -6 0 0 1 -6 -6.5z m-5 2 H-3.5 m7 2 H-3.5z"}},dn={AREA:"initArea",AREA_LINE_RANGE:"initArea",AREA_SPLINE:"initArea",AREA_SPLINE_RANGE:"initArea",AREA_STEP:"initArea",AREA_STEP_RANGE:"initArea",BAR:"initBar",BUBBLE:"initCircle",CANDLESTICK:"initCandlestick",DONUT:"initArc",FUNNEL:"initFunnel",GAUGE:"initArc",LINE:"initLine",PIE:"initArc",POLAR:"initPolar",RADAR:"initCircle",SCATTER:"initCircle",SPLINE:"initLine",STEP:"initLine",TREEMAP:"initTreemap"},en={Area:[qt.AREA,qt.AREA_SPLINE,qt.AREA_SPLINE_RANGE,qt.AREA_LINE_RANGE,qt.AREA_STEP,qt.AREA_STEP_RANGE],AreaRange:[qt.AREA_SPLINE_RANGE,qt.AREA_LINE_RANGE,qt.AREA_STEP_RANGE],Arc:[qt.PIE,qt.DONUT,qt.GAUGE,qt.POLAR,qt.RADAR],Line:[qt.LINE,qt.SPLINE,qt.AREA,qt.AREA_SPLINE,qt.AREA_SPLINE_RANGE,qt.AREA_LINE_RANGE,qt.STEP,qt.AREA_STEP,qt.AREA_STEP_RANGE],Step:[qt.STEP,qt.AREA_STEP,qt.AREA_STEP_RANGE],Spline:[qt.SPLINE,qt.AREA_SPLINE,qt.AREA_SPLINE_RANGE]},Sn=Math.sqrt(50),Mn=Math.sqrt(10),Qt=Math.sqrt(2);function hn(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),o=s>=Sn?10:s>=Mn?5:s>=Qt?2:1;let l,c,u;return i<0?(u=Math.pow(10,-i)/o,l=Math.round(t*u),c=Math.round(e*u),l/u<t&&++l,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*o,l=Math.round(t/u),c=Math.round(e/u),l*u<t&&++l,c*u>e&&--c),c<l&&.5<=n&&n<2?hn(t,e,n*2):[l,c,u]}function qn(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,s,o]=r?hn(e,t,n):hn(t,e,n);if(!(s>=i))return[];const l=s-i+1,c=new Array(l);if(r)if(o<0)for(let u=0;u<l;++u)c[u]=(s-u)/-o;else for(let u=0;u<l;++u)c[u]=(s-u)*o;else if(o<0)for(let u=0;u<l;++u)c[u]=(i+u)/-o;else for(let u=0;u<l;++u)c[u]=(i+u)*o;return c}function ya(t,e,n){return e=+e,t=+t,n=+n,hn(t,e,n)[2]}function ja(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?ya(e,t,n):ya(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Ta(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ni(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function dl(t){let e,n,r;t.length!==2?(e=Ta,n=(l,c)=>Ta(t(l),c),r=(l,c)=>t(l)-c):(e=t===Ta||t===Ni?t:am,n=t,r=t);function i(l,c,u=0,f=l.length){if(u<f){if(e(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<0?u=d+1:f=d}while(u<f)}return u}function s(l,c,u=0,f=l.length){if(u<f){if(e(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function o(l,c,u=0,f=l.length){const d=i(l,c,u,f-1);return d>u&&r(l[d-1],c)>-r(l[d],c)?d-1:d}return{left:i,center:o,right:s}}function am(){return 0}function im(t){return t===null?NaN:+t}function*GR(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const Fu=dl(Ta),sm=Fu.right,XR=Fu.left,WR=dl(im).center;var om=sm;function hl(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Nu(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function $i(){}var Bi=.7,Ns=1/Bi,Ha="\\s*([+-]?\\d+)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Er="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",lm=/^#([0-9a-f]{3,8})$/,cm=new RegExp(`^rgb\\(${Ha},${Ha},${Ha}\\)$`),um=new RegExp(`^rgb\\(${Er},${Er},${Er}\\)$`),fm=new RegExp(`^rgba\\(${Ha},${Ha},${Ha},${zi}\\)$`),dm=new RegExp(`^rgba\\(${Er},${Er},${Er},${zi}\\)$`),hm=new RegExp(`^hsl\\(${zi},${Er},${Er}\\)$`),vm=new RegExp(`^hsla\\(${zi},${Er},${Er},${zi}\\)$`),$u={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};hl($i,ba,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Bu,formatHex:Bu,formatHex8:gm,formatHsl:pm,formatRgb:zu,toString:zu});function Bu(){return this.rgb().formatHex()}function gm(){return this.rgb().formatHex8()}function pm(){return Wu(this).formatHsl()}function zu(){return this.rgb().formatRgb()}function ba(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=lm.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Uu(e):n===3?new Yn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?$s(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?$s(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=cm.exec(t))?new Yn(e[1],e[2],e[3],1):(e=um.exec(t))?new Yn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=fm.exec(t))?$s(e[1],e[2],e[3],e[4]):(e=dm.exec(t))?$s(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=hm.exec(t))?Xu(e[1],e[2]/100,e[3]/100,1):(e=vm.exec(t))?Xu(e[1],e[2]/100,e[3]/100,e[4]):$u.hasOwnProperty(t)?Uu($u[t]):t==="transparent"?new Yn(NaN,NaN,NaN,0):null}function Uu(t){return new Yn(t>>16&255,t>>8&255,t&255,1)}function $s(t,e,n,r){return r<=0&&(t=e=n=NaN),new Yn(t,e,n,r)}function mm(t){return t instanceof $i||(t=ba(t)),t?(t=t.rgb(),new Yn(t.r,t.g,t.b,t.opacity)):new Yn}function Bs(t,e,n,r){return arguments.length===1?mm(t):new Yn(t,e,n,r==null?1:r)}function Yn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}hl(Yn,Bs,Nu($i,{brighter(t){return t=t==null?Ns:Math.pow(Ns,t),new Yn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Bi:Math.pow(Bi,t),new Yn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Yn(Sa(this.r),Sa(this.g),Sa(this.b),zs(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ku,formatHex:ku,formatHex8:xm,formatRgb:Gu,toString:Gu}));function ku(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}`}function xm(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}${Aa((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gu(){const t=zs(this.opacity);return`${t===1?"rgb(":"rgba("}${Sa(this.r)}, ${Sa(this.g)}, ${Sa(this.b)}${t===1?")":`, ${t})`}`}function zs(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Sa(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Aa(t){return t=Sa(t),(t<16?"0":"")+t.toString(16)}function Xu(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new vr(t,e,n,r)}function Wu(t){if(t instanceof vr)return new vr(t.h,t.s,t.l,t.opacity);if(t instanceof $i||(t=ba(t)),!t)return new vr;if(t instanceof vr)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=NaN,l=s-i,c=(s+i)/2;return l?(e===s?o=(n-r)/l+(n<r)*6:n===s?o=(r-e)/l+2:o=(e-n)/l+4,l/=c<.5?s+i:2-s-i,o*=60):l=c>0&&c<1?0:o,new vr(o,l,c,t.opacity)}function ym(t,e,n,r){return arguments.length===1?Wu(t):new vr(t,e,n,r==null?1:r)}function vr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}hl(vr,ym,Nu($i,{brighter(t){return t=t==null?Ns:Math.pow(Ns,t),new vr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Bi:Math.pow(Bi,t),new vr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Yn(vl(t>=240?t-240:t+120,i,r),vl(t,i,r),vl(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new vr(Vu(this.h),Us(this.s),Us(this.l),zs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=zs(this.opacity);return`${t===1?"hsl(":"hsla("}${Vu(this.h)}, ${Us(this.s)*100}%, ${Us(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Vu(t){return t=(t||0)%360,t<0?t+360:t}function Us(t){return Math.max(0,Math.min(1,t||0))}function vl(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function ju(t,e,n,r,i){var s=t*t,o=s*t;return((1-3*t+3*s-o)*e+(4-6*s+3*o)*n+(1+3*t+3*s-3*o)*r+o*i)/6}function Tm(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],s=t[r+1],o=r>0?t[r-1]:2*i-s,l=r<e-1?t[r+2]:2*s-i;return ju((n-r/e)*e,o,i,s,l)}}function bm(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],s=t[r%e],o=t[(r+1)%e],l=t[(r+2)%e];return ju((n-r/e)*e,i,s,o,l)}}var ks=(t=>()=>t);function Hu(t,e){return function(n){return t+n*e}}function Sm(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function VR(t,e){var n=e-t;return n?Hu(t,n>180||n<-180?n-360*Math.round(n/360):n):ks(isNaN(t)?e:t)}function Am(t){return(t=+t)==1?Yu:function(e,n){return n-e?Sm(e,n,t):ks(isNaN(e)?n:e)}}function Yu(t,e){var n=e-t;return n?Hu(t,n):ks(isNaN(t)?e:t)}var Gs=(function t(e){var n=Am(e);function r(i,s){var o=n((i=Bs(i)).r,(s=Bs(s)).r),l=n(i.g,s.g),c=n(i.b,s.b),u=Yu(i.opacity,s.opacity);return function(f){return i.r=o(f),i.g=l(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=t,r})(1);function Ku(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),s=new Array(n),o,l;for(o=0;o<n;++o)l=Bs(e[o]),r[o]=l.r||0,i[o]=l.g||0,s[o]=l.b||0;return r=t(r),i=t(i),s=t(s),l.opacity=1,function(c){return l.r=r(c),l.g=i(c),l.b=s(c),l+""}}}var jR=Ku(Tm),HR=Ku(bm);function Zu(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=t[i]*(1-s)+e[i]*s;return r}}function Ju(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function YR(t,e){return(Ju(e)?Zu:Qu)(t,e)}function Qu(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),s=new Array(n),o;for(o=0;o<r;++o)i[o]=Ya(t[o],e[o]);for(;o<n;++o)s[o]=e[o];return function(l){for(o=0;o<r;++o)s[o]=i[o](l);return s}}function Em(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function gr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Cm(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Ya(t[i],e[i]):r[i]=e[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var gl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pl=new RegExp(gl.source,"g");function Im(t){return function(){return t}}function Rm(t){return function(e){return t(e)+""}}function _u(t,e){var n=gl.lastIndex=pl.lastIndex=0,r,i,s,o=-1,l=[],c=[];for(t=t+"",e=e+"";(r=gl.exec(t))&&(i=pl.exec(e));)(s=i.index)>n&&(s=e.slice(n,s),l[o]?l[o]+=s:l[++o]=s),(r=r[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,c.push({i:o,x:gr(r,i)})),n=pl.lastIndex;return n<e.length&&(s=e.slice(n),l[o]?l[o]+=s:l[++o]=s),l.length<2?c[0]?Rm(c[0].x):Im(e):(e=c.length,function(u){for(var f=0,d;f<e;++f)l[(d=c[f]).i]=d.x(u);return l.join("")})}function Ya(t,e){var n=typeof e,r;return e==null||n==="boolean"?ks(e):(n==="number"?gr:n==="string"?(r=ba(e))?(e=r,Gs):_u:e instanceof ba?Gs:e instanceof Date?Em:Ju(e)?Zu:Array.isArray(e)?Qu:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Cm:gr)(t,e)}function wm(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Om(t){return function(){return t}}function Pm(t){return+t}var qu=[0,1];function Ka(t){return t}function ml(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Om(isNaN(e)?NaN:.5)}function Mm(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Lm(t,e,n){var r=t[0],i=t[1],s=e[0],o=e[1];return i<r?(r=ml(i,r),s=n(o,s)):(r=ml(r,i),s=n(s,o)),function(l){return s(r(l))}}function Dm(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),s=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=ml(t[o],t[o+1]),s[o]=n(e[o],e[o+1]);return function(l){var c=om(t,l,1,r)-1;return s[c](i[c](l))}}function Xs(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function xl(){var t=qu,e=qu,n=Ya,r,i,s,o=Ka,l,c,u;function f(){var h=Math.min(t.length,e.length);return o!==Ka&&(o=Mm(t[0],t[h-1])),l=h>2?Dm:Lm,c=u=null,d}function d(h){return h==null||isNaN(h=+h)?s:(c||(c=l(t.map(r),e,n)))(r(o(h)))}return d.invert=function(h){return o(i((u||(u=l(e,t.map(r),gr)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,Pm),f()):t.slice()},d.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},d.rangeRound=function(h){return e=Array.from(h),n=wm,f()},d.clamp=function(h){return arguments.length?(o=h?!0:Ka,f()):o!==Ka},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,m){return r=h,i=m,f()}}function tf(){return xl()(Ka,Ka)}function Ui(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function KR(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}var Fm=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ki(t){if(!(e=Fm.exec(t)))throw new Error("invalid format: "+t);var e;return new yl({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}ki.prototype=yl.prototype;function yl(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}yl.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Nm(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ws(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Za(t){return t=Ws(Math.abs(t)),t?t[1]:NaN}function $m(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Za(e)/3)))*3-Za(Math.abs(t)))}function Bm(t,e){return function(n,r){for(var i=n.length,s=[],o=0,l=t[0],c=0;i>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),s.push(n.substring(i-=l,i+l)),!((c+=l+1)>r));)l=t[o=(o+1)%t.length];return s.reverse().join(e)}}function zm(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}function Um(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Vs;function km(t,e){var n=Ws(t,e);if(!n)return Vs=void 0,t.toPrecision(e);var r=n[0],i=n[1],s=i-(Vs=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+Ws(t,Math.max(0,e+s-1))[0]}function ef(t,e){var n=Ws(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}var nf={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Nm,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ef(t*100,e),r:ef,s:km,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function rf(t){return t}var af=Array.prototype.map,sf=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Gm(t){var e=t.grouping===void 0||t.thousands===void 0?rf:Bm(af.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?rf:zm(af.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",l=t.minus===void 0?"\u2212":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function u(d,h){d=ki(d);var m=d.fill,S=d.align,E=d.sign,C=d.symbol,w=d.zero,$=d.width,z=d.comma,B=d.precision,W=d.trim,H=d.type;H==="n"?(z=!0,H="g"):nf[H]||(B===void 0&&(B=12),W=!0,H="g"),(w||m==="0"&&S==="=")&&(w=!0,m="0",S="=");var _=(h&&h.prefix!==void 0?h.prefix:"")+(C==="$"?n:C==="#"&&/[boxX]/.test(H)?"0"+H.toLowerCase():""),q=(C==="$"?r:/[%p]/.test(H)?o:"")+(h&&h.suffix!==void 0?h.suffix:""),st=nf[H],it=/[defgprs%]/.test(H);B=B===void 0?6:/[gprs]/.test(H)?Math.max(1,Math.min(21,B)):Math.max(0,Math.min(20,B));function ot(ct){var gt=_,tt=q,ft,lt,bt;if(H==="c")tt=st(ct)+tt,ct="";else{ct=+ct;var St=ct<0||1/ct<0;if(ct=isNaN(ct)?c:st(Math.abs(ct),B),W&&(ct=Um(ct)),St&&+ct==0&&E!=="+"&&(St=!1),gt=(St?E==="("?E:l:E==="-"||E==="("?"":E)+gt,tt=(H==="s"&&!isNaN(ct)&&Vs!==void 0?sf[8+Vs/3]:"")+tt+(St&&E==="("?")":""),it){for(ft=-1,lt=ct.length;++ft<lt;)if(bt=ct.charCodeAt(ft),48>bt||bt>57){tt=(bt===46?i+ct.slice(ft+1):ct.slice(ft))+tt,ct=ct.slice(0,ft);break}}}z&&!w&&(ct=e(ct,1/0));var Mt=gt.length+ct.length+tt.length,Ot=Mt<$?new Array($-Mt+1).join(m):"";switch(z&&w&&(ct=e(Ot+ct,Ot.length?$-tt.length:1/0),Ot=""),S){case"<":ct=gt+ct+tt+Ot;break;case"=":ct=gt+Ot+ct+tt;break;case"^":ct=Ot.slice(0,Mt=Ot.length>>1)+gt+ct+tt+Ot.slice(Mt);break;default:ct=Ot+gt+ct+tt;break}return s(ct)}return ot.toString=function(){return d+""},ot}function f(d,h){var m=Math.max(-8,Math.min(8,Math.floor(Za(h)/3)))*3,S=Math.pow(10,-m),E=u((d=ki(d),d.type="f",d),{suffix:sf[8+m/3]});return function(C){return E(S*C)}}return{format:u,formatPrefix:f}}var js,Tl,of;Xm({thousands:",",grouping:[3],currency:["$",""]});function Xm(t){return js=Gm(t),Tl=js.format,of=js.formatPrefix,js}function Wm(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Za(e)-Za(t))+1}function Vm(t){return Math.max(0,-Za(Math.abs(t)))}function jm(t,e,n,r){var i=ja(t,e,n),s;switch(r=ki(r==null?",f":r),r.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(s=$m(i,o))&&(r.precision=s),of(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=Wm(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=Vm(i))&&(r.precision=s-(r.type==="%")*2);break}}return Tl(r)}function lf(t){var e=t.domain;return t.ticks=function(n){var r=e();return qn(r[0],r[r.length-1],n==null?10:n)},t.tickFormat=function(n,r){var i=e();return jm(i[0],i[i.length-1],n==null?10:n,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,s=r.length-1,o=r[i],l=r[s],c,u,f=10;for(l<o&&(u=o,o=l,l=u,u=i,i=s,s=u);f-- >0;){if(u=ya(o,l,n),u===c)return r[i]=o,r[s]=l,e(r);if(u>0)o=Math.floor(o/u)*u,l=Math.ceil(l/u)*u;else if(u<0)o=Math.ceil(o*u)/u,l=Math.floor(l*u)/u;else break;c=u}return t},t}function Hs(){var t=tf();return t.copy=function(){return Xs(t,Hs())},Ui.apply(t,arguments),lf(t)}function cf(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function uf(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Hm(t){var e=1,n=t(cf(e),uf(e));return n.constant=function(r){return arguments.length?t(cf(e=+r),uf(e)):e},lf(n)}function ff(){var t=Hm(xl());return t.copy=function(){return Xs(t,ff()).constant(t.constant())},Ui.apply(t,arguments)}function df(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],o;return s<i&&(o=n,n=r,r=o,o=i,i=s,s=o),t[n]=e.floor(i),t[r]=e.ceil(s),t}function hf(t){return Math.log(t)}function vf(t){return Math.exp(t)}function Ym(t){return-Math.log(-t)}function Km(t){return-Math.exp(-t)}function Zm(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Jm(t){return t===10?Zm:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Qm(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function gf(t){return(e,n)=>-t(-e,n)}function _m(t){const e=t(hf,vf),n=e.domain;let r=10,i,s;function o(){return i=Qm(r),s=Jm(r),n()[0]<0?(i=gf(i),s=gf(s),t(Ym,Km)):t(hf,vf),e}return e.base=function(l){return arguments.length?(r=+l,o()):r},e.domain=function(l){return arguments.length?(n(l),o()):n()},e.ticks=l=>{const c=n();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=i(u),m=i(f),S,E;const C=l==null?10:+l;let w=[];if(!(r%1)&&m-h<C){if(h=Math.floor(h),m=Math.ceil(m),u>0){for(;h<=m;++h)for(S=1;S<r;++S)if(E=h<0?S/s(-h):S*s(h),!(E<u)){if(E>f)break;w.push(E)}}else for(;h<=m;++h)for(S=r-1;S>=1;--S)if(E=h>0?S/s(-h):S*s(h),!(E<u)){if(E>f)break;w.push(E)}w.length*2<C&&(w=qn(u,f,C))}else w=qn(h,m,Math.min(m-h,C)).map(s);return d?w.reverse():w},e.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=ki(c)).precision==null&&(c.trim=!0),c=Tl(c)),l===1/0)return c;const u=Math.max(1,r*l/e.ticks().length);return f=>{let d=f/s(Math.round(i(f)));return d*r<r-.5&&(d*=r),d<=u?c(f):""}},e.nice=()=>n(df(n(),{floor:l=>s(Math.floor(i(l))),ceil:l=>s(Math.ceil(i(l)))})),e}function pf(){const t=_m(xl()).domain([1,10]);return t.copy=()=>Xs(t,pf()).base(t.base()),Ui.apply(t,arguments),t}const $r=1e3,or=$r*60,Br=or*60,zr=Br*24,bl=zr*7,mf=zr*30,Sl=zr*365,Al=new Date,El=new Date;function In(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const o=i(s),l=i.ceil(s);return s-o<l-s?o:l},i.offset=(s,o)=>(e(s=new Date(+s),o==null?1:Math.floor(o)),s),i.range=(s,o,l)=>{const c=[];if(s=i.ceil(s),l=l==null?1:Math.floor(l),!(s<o)||!(l>0))return c;let u;do c.push(u=new Date(+s)),e(s,l),t(s);while(u<s&&s<o);return c},i.filter=s=>In(o=>{if(o>=o)for(;t(o),!s(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;e(o,-1),!s(o););else for(;--l>=0;)for(;e(o,1),!s(o););}),n&&(i.count=(s,o)=>(Al.setTime(+s),El.setTime(+o),t(Al),t(El),Math.floor(n(Al,El))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?o=>r(o)%s===0:o=>i.count(0,o)%s===0):i)),i}const Ys=In(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ys.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?In(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Ys);const ZR=Ys.range,Ea=In(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*$r)},(t,e)=>(e-t)/$r,t=>t.getUTCSeconds()),JR=Ea.range,Cl=In(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*$r)},(t,e)=>{t.setTime(+t+e*or)},(t,e)=>(e-t)/or,t=>t.getMinutes()),QR=Cl.range,Il=In(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*or)},(t,e)=>(e-t)/or,t=>t.getUTCMinutes()),_R=Il.range,Rl=In(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*$r-t.getMinutes()*or)},(t,e)=>{t.setTime(+t+e*Br)},(t,e)=>(e-t)/Br,t=>t.getHours()),qR=Rl.range,wl=In(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Br)},(t,e)=>(e-t)/Br,t=>t.getUTCHours()),tw=wl.range,Gi=In(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*or)/zr,t=>t.getDate()-1),ew=Gi.range,Ks=In(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/zr,t=>t.getUTCDate()-1),nw=Ks.range,xf=In(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/zr,t=>Math.floor(t/zr)),rw=xf.range;function Ca(t){return In(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*or)/bl)}const Zs=Ca(0),Js=Ca(1),qm=Ca(2),tx=Ca(3),Ja=Ca(4),ex=Ca(5),nx=Ca(6),aw=Zs.range,iw=Js.range,sw=qm.range,ow=tx.range,lw=Ja.range,cw=ex.range,uw=nx.range;function Ia(t){return In(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/bl)}const Qs=Ia(0),_s=Ia(1),rx=Ia(2),ax=Ia(3),Qa=Ia(4),ix=Ia(5),sx=Ia(6),fw=Qs.range,dw=_s.range,hw=rx.range,vw=ax.range,gw=Qa.range,pw=ix.range,mw=sx.range,Ol=In(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),xw=Ol.range,Pl=In(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),yw=Pl.range,Ur=In(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Ur.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:In(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const Tw=Ur.range,kr=In(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());kr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:In(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const bw=kr.range;function yf(t,e,n,r,i,s){const o=[[Ea,1,$r],[Ea,5,5*$r],[Ea,15,15*$r],[Ea,30,30*$r],[s,1,or],[s,5,5*or],[s,15,15*or],[s,30,30*or],[i,1,Br],[i,3,3*Br],[i,6,6*Br],[i,12,12*Br],[r,1,zr],[r,2,2*zr],[n,1,bl],[e,1,mf],[e,3,3*mf],[t,1,Sl]];function l(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const m=d&&typeof d.range=="function"?d:c(u,f,d),S=m?m.range(u,+f+1):[];return h?S.reverse():S}function c(u,f,d){const h=Math.abs(f-u)/d,m=dl(([,,C])=>C).right(o,h);if(m===o.length)return t.every(ja(u/Sl,f/Sl,d));if(m===0)return Ys.every(Math.max(ja(u,f,d),1));const[S,E]=o[h/o[m-1][2]<o[m][2]/h?m-1:m];return S.every(E)}return[l,c]}const[ox,lx]=yf(kr,Pl,Qs,xf,wl,Il),[cx,ux]=yf(Ur,Ol,Zs,Gi,Rl,Cl);function Ml(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Ll(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Xi(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function fx(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,o=t.shortDays,l=t.months,c=t.shortMonths,u=Wi(i),f=Vi(i),d=Wi(s),h=Vi(s),m=Wi(o),S=Vi(o),E=Wi(l),C=Vi(l),w=Wi(c),$=Vi(c),z={a:bt,A:St,b:Mt,B:Ot,c:null,d:Cf,e:Cf,f:Fx,g:Vx,G:Hx,H:Mx,I:Lx,j:Dx,L:If,m:Nx,M:$x,p:Kt,q:ee,Q:Lf,s:Df,S:Bx,u:zx,U:Ux,V:kx,w:Gx,W:Xx,x:null,X:null,y:Wx,Y:jx,Z:Yx,"%":Mf},B={a:Ae,A:Ee,b:Te,B:De,c:null,d:wf,e:wf,f:Qx,g:oy,G:cy,H:Kx,I:Zx,j:Jx,L:Of,m:_x,M:qx,p:me,q:Pe,Q:Lf,s:Df,S:ty,u:ey,U:ny,V:ry,w:ay,W:iy,x:null,X:null,y:sy,Y:ly,Z:uy,"%":Mf},W={a:it,A:ot,b:ct,B:gt,c:tt,d:Af,e:Af,f:Rx,g:Sf,G:bf,H:Ef,I:Ef,j:Ax,L:Ix,m:Sx,M:Ex,p:st,q:bx,Q:Ox,s:Px,S:Cx,u:px,U:mx,V:xx,w:gx,W:yx,x:ft,X:lt,y:Sf,Y:bf,Z:Tx,"%":wx};z.x=H(n,z),z.X=H(r,z),z.c=H(e,z),B.x=H(n,B),B.X=H(r,B),B.c=H(e,B);function H(Zt,he){return function(ge){var Wt=[],We=-1,Xe=0,pn=Zt.length,Cn,be,un;for(ge instanceof Date||(ge=new Date(+ge));++We<pn;)Zt.charCodeAt(We)===37&&(Wt.push(Zt.slice(Xe,We)),(be=Tf[Cn=Zt.charAt(++We)])!=null?Cn=Zt.charAt(++We):be=Cn==="e"?" ":"0",(un=he[Cn])&&(Cn=un(ge,be)),Wt.push(Cn),Xe=We+1);return Wt.push(Zt.slice(Xe,We)),Wt.join("")}}function _(Zt,he){return function(ge){var Wt=Xi(1900,void 0,1),We=q(Wt,Zt,ge+="",0),Xe,pn;if(We!=ge.length)return null;if("Q"in Wt)return new Date(Wt.Q);if("s"in Wt)return new Date(Wt.s*1e3+("L"in Wt?Wt.L:0));if(he&&!("Z"in Wt)&&(Wt.Z=0),"p"in Wt&&(Wt.H=Wt.H%12+Wt.p*12),Wt.m===void 0&&(Wt.m="q"in Wt?Wt.q:0),"V"in Wt){if(Wt.V<1||Wt.V>53)return null;"w"in Wt||(Wt.w=1),"Z"in Wt?(Xe=Ll(Xi(Wt.y,0,1)),pn=Xe.getUTCDay(),Xe=pn>4||pn===0?_s.ceil(Xe):_s(Xe),Xe=Ks.offset(Xe,(Wt.V-1)*7),Wt.y=Xe.getUTCFullYear(),Wt.m=Xe.getUTCMonth(),Wt.d=Xe.getUTCDate()+(Wt.w+6)%7):(Xe=Ml(Xi(Wt.y,0,1)),pn=Xe.getDay(),Xe=pn>4||pn===0?Js.ceil(Xe):Js(Xe),Xe=Gi.offset(Xe,(Wt.V-1)*7),Wt.y=Xe.getFullYear(),Wt.m=Xe.getMonth(),Wt.d=Xe.getDate()+(Wt.w+6)%7)}else("W"in Wt||"U"in Wt)&&("w"in Wt||(Wt.w="u"in Wt?Wt.u%7:"W"in Wt?1:0),pn="Z"in Wt?Ll(Xi(Wt.y,0,1)).getUTCDay():Ml(Xi(Wt.y,0,1)).getDay(),Wt.m=0,Wt.d="W"in Wt?(Wt.w+6)%7+Wt.W*7-(pn+5)%7:Wt.w+Wt.U*7-(pn+6)%7);return"Z"in Wt?(Wt.H+=Wt.Z/100|0,Wt.M+=Wt.Z%100,Ll(Wt)):Ml(Wt)}}function q(Zt,he,ge,Wt){for(var We=0,Xe=he.length,pn=ge.length,Cn,be;We<Xe;){if(Wt>=pn)return-1;if(Cn=he.charCodeAt(We++),Cn===37){if(Cn=he.charAt(We++),be=W[Cn in Tf?he.charAt(We++):Cn],!be||(Wt=be(Zt,ge,Wt))<0)return-1}else if(Cn!=ge.charCodeAt(Wt++))return-1}return Wt}function st(Zt,he,ge){var Wt=u.exec(he.slice(ge));return Wt?(Zt.p=f.get(Wt[0].toLowerCase()),ge+Wt[0].length):-1}function it(Zt,he,ge){var Wt=m.exec(he.slice(ge));return Wt?(Zt.w=S.get(Wt[0].toLowerCase()),ge+Wt[0].length):-1}function ot(Zt,he,ge){var Wt=d.exec(he.slice(ge));return Wt?(Zt.w=h.get(Wt[0].toLowerCase()),ge+Wt[0].length):-1}function ct(Zt,he,ge){var Wt=w.exec(he.slice(ge));return Wt?(Zt.m=$.get(Wt[0].toLowerCase()),ge+Wt[0].length):-1}function gt(Zt,he,ge){var Wt=E.exec(he.slice(ge));return Wt?(Zt.m=C.get(Wt[0].toLowerCase()),ge+Wt[0].length):-1}function tt(Zt,he,ge){return q(Zt,e,he,ge)}function ft(Zt,he,ge){return q(Zt,n,he,ge)}function lt(Zt,he,ge){return q(Zt,r,he,ge)}function bt(Zt){return o[Zt.getDay()]}function St(Zt){return s[Zt.getDay()]}function Mt(Zt){return c[Zt.getMonth()]}function Ot(Zt){return l[Zt.getMonth()]}function Kt(Zt){return i[+(Zt.getHours()>=12)]}function ee(Zt){return 1+~~(Zt.getMonth()/3)}function Ae(Zt){return o[Zt.getUTCDay()]}function Ee(Zt){return s[Zt.getUTCDay()]}function Te(Zt){return c[Zt.getUTCMonth()]}function De(Zt){return l[Zt.getUTCMonth()]}function me(Zt){return i[+(Zt.getUTCHours()>=12)]}function Pe(Zt){return 1+~~(Zt.getUTCMonth()/3)}return{format:function(Zt){var he=H(Zt+="",z);return he.toString=function(){return Zt},he},parse:function(Zt){var he=_(Zt+="",!1);return he.toString=function(){return Zt},he},utcFormat:function(Zt){var he=H(Zt+="",B);return he.toString=function(){return Zt},he},utcParse:function(Zt){var he=_(Zt+="",!0);return he.toString=function(){return Zt},he}}}var Tf={"-":"",_:" ",0:"0"},On=/^\s*\d+/,dx=/^%/,hx=/[\\^$*+?|[\]().{}]/g;function _e(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function vx(t){return t.replace(hx,"\\$&")}function Wi(t){return new RegExp("^(?:"+t.map(vx).join("|")+")","i")}function Vi(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function gx(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function px(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function mx(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function xx(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function yx(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function bf(t,e,n){var r=On.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Sf(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Tx(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function bx(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Sx(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Af(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Ax(t,e,n){var r=On.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ef(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ex(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Cx(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Ix(t,e,n){var r=On.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Rx(t,e,n){var r=On.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function wx(t,e,n){var r=dx.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ox(t,e,n){var r=On.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Px(t,e,n){var r=On.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Cf(t,e){return _e(t.getDate(),e,2)}function Mx(t,e){return _e(t.getHours(),e,2)}function Lx(t,e){return _e(t.getHours()%12||12,e,2)}function Dx(t,e){return _e(1+Gi.count(Ur(t),t),e,3)}function If(t,e){return _e(t.getMilliseconds(),e,3)}function Fx(t,e){return If(t,e)+"000"}function Nx(t,e){return _e(t.getMonth()+1,e,2)}function $x(t,e){return _e(t.getMinutes(),e,2)}function Bx(t,e){return _e(t.getSeconds(),e,2)}function zx(t){var e=t.getDay();return e===0?7:e}function Ux(t,e){return _e(Zs.count(Ur(t)-1,t),e,2)}function Rf(t){var e=t.getDay();return e>=4||e===0?Ja(t):Ja.ceil(t)}function kx(t,e){return t=Rf(t),_e(Ja.count(Ur(t),t)+(Ur(t).getDay()===4),e,2)}function Gx(t){return t.getDay()}function Xx(t,e){return _e(Js.count(Ur(t)-1,t),e,2)}function Wx(t,e){return _e(t.getFullYear()%100,e,2)}function Vx(t,e){return t=Rf(t),_e(t.getFullYear()%100,e,2)}function jx(t,e){return _e(t.getFullYear()%1e4,e,4)}function Hx(t,e){var n=t.getDay();return t=n>=4||n===0?Ja(t):Ja.ceil(t),_e(t.getFullYear()%1e4,e,4)}function Yx(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+_e(e/60|0,"0",2)+_e(e%60,"0",2)}function wf(t,e){return _e(t.getUTCDate(),e,2)}function Kx(t,e){return _e(t.getUTCHours(),e,2)}function Zx(t,e){return _e(t.getUTCHours()%12||12,e,2)}function Jx(t,e){return _e(1+Ks.count(kr(t),t),e,3)}function Of(t,e){return _e(t.getUTCMilliseconds(),e,3)}function Qx(t,e){return Of(t,e)+"000"}function _x(t,e){return _e(t.getUTCMonth()+1,e,2)}function qx(t,e){return _e(t.getUTCMinutes(),e,2)}function ty(t,e){return _e(t.getUTCSeconds(),e,2)}function ey(t){var e=t.getUTCDay();return e===0?7:e}function ny(t,e){return _e(Qs.count(kr(t)-1,t),e,2)}function Pf(t){var e=t.getUTCDay();return e>=4||e===0?Qa(t):Qa.ceil(t)}function ry(t,e){return t=Pf(t),_e(Qa.count(kr(t),t)+(kr(t).getUTCDay()===4),e,2)}function ay(t){return t.getUTCDay()}function iy(t,e){return _e(_s.count(kr(t)-1,t),e,2)}function sy(t,e){return _e(t.getUTCFullYear()%100,e,2)}function oy(t,e){return t=Pf(t),_e(t.getUTCFullYear()%100,e,2)}function ly(t,e){return _e(t.getUTCFullYear()%1e4,e,4)}function cy(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Qa(t):Qa.ceil(t),_e(t.getUTCFullYear()%1e4,e,4)}function uy(){return"+0000"}function Mf(){return"%"}function Lf(t){return+t}function Df(t){return Math.floor(+t/1e3)}var _a,Dl,Ff,Fl,Nf;fy({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function fy(t){return _a=fx(t),Dl=_a.format,Ff=_a.parse,Fl=_a.utcFormat,Nf=_a.utcParse,_a}function dy(t){return new Date(t)}function hy(t){return t instanceof Date?+t:+new Date(+t)}function Nl(t,e,n,r,i,s,o,l,c,u){var f=tf(),d=f.invert,h=f.domain,m=u(".%L"),S=u(":%S"),E=u("%I:%M"),C=u("%I %p"),w=u("%a %d"),$=u("%b %d"),z=u("%B"),B=u("%Y");function W(H){return(c(H)<H?m:l(H)<H?S:o(H)<H?E:s(H)<H?C:r(H)<H?i(H)<H?w:$:n(H)<H?z:B)(H)}return f.invert=function(H){return new Date(d(H))},f.domain=function(H){return arguments.length?h(Array.from(H,hy)):h().map(dy)},f.ticks=function(H){var _=h();return t(_[0],_[_.length-1],H==null?10:H)},f.tickFormat=function(H,_){return _==null?W:u(_)},f.nice=function(H){var _=h();return(!H||typeof H.range!="function")&&(H=e(_[0],_[_.length-1],H==null?10:H)),H?h(df(_,H)):f},f.copy=function(){return Xs(f,Nl(t,e,n,r,i,s,o,l,c,u))},f}function vy(){return Ui.apply(Nl(cx,ux,Ur,Ol,Zs,Gi,Rl,Cl,Ea,Dl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function gy(){return Ui.apply(Nl(ox,lx,kr,Pl,Qs,Ks,wl,Il,Ea,Fl).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const Ge=t=>t||t===0,ie=t=>typeof t=="function",je=t=>typeof t=="string",ae=t=>typeof t=="number",mn=t=>typeof t=="undefined",sn=t=>typeof t!="undefined",Ra=t=>typeof t=="boolean",py=t=>Math.ceil(t/10)*10,qa=t=>Math.ceil(t)+.5,wa=t=>t[1]-t[0],Kn=t=>typeof t=="object",my=t=>{for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0},lr=t=>mn(t)||t===null||je(t)&&t.length===0||Kn(t)&&!(t instanceof Date)&&my(t)||ae(t)&&isNaN(t),vn=t=>!lr(t),qe=t=>Array.isArray(t),He=t=>t&&!(t!=null&&t.nodeType)&&Kn(t)&&!qe(t);function xy(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function yy(t){const e=typeof(t==null?void 0:t.requestAnimationFrame)=="function"&&typeof(t==null?void 0:t.cancelAnimationFrame)=="function",n=typeof(t==null?void 0:t.requestIdleCallback)=="function"&&typeof(t==null?void 0:t.cancelIdleCallback)=="function",r=s=>setTimeout(s,1),i=s=>clearTimeout(s);return[e?t.requestAnimationFrame:r,e?t.cancelAnimationFrame:i,n?t.requestIdleCallback:r,n?t.cancelIdleCallback:i]}const se=xy(),Ye=se==null?void 0:se.document,[$f,Ty,Bf,by]=yy(se),Sy=new Set(["span","div","p","br","b","i","em","small","strong","mark","u","s","sub","sup","h1","h2","h3","h4","h5","h6","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","hr","pre","code","blockquote","abbr","ins","del","a","img","figure","figcaption","svg","g","path","circle","ellipse","rect","line","polyline","polygon","text","tspan","textPath","use","defs","symbol","clipPath","mask","linearGradient","radialGradient","stop","pattern","marker","title","desc"]),Ay=new Set(["class","id","style","title","lang","dir","href","src","alt","width","height","colspan","rowspan","scope","headers","d","points","x","y","x1","x2","y1","y2","cx","cy","r","rx","ry","dx","dy","viewBox","preserveAspectRatio","transform","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","opacity","clip-path","clip-rule","mask","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternTransform","marker-start","marker-mid","marker-end","markerWidth","markerHeight","refX","refY","xlink:href"]),qs=new Map;Sy.forEach(t=>qs.set(t.toLowerCase(),t));const to=new Map;Ay.forEach(t=>to.set(t.toLowerCase(),t));const Ey=new Set(["http:","https:","mailto:"]),Cy=new Set(["href","src","xlink:href"]),Iy=/^<\/?([a-zA-Z][a-zA-Z0-9]*)/,Ry=/^<\/([a-zA-Z][a-zA-Z0-9]*)\s*>$/,wy=/^<([a-zA-Z][a-zA-Z0-9]*)([\s\S]*?)(\/?)>$/,zf=/([a-zA-Z][\w:-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,Uf=/url\s*\(\s*["']?([^"')]+)["']?\s*\)/gi,Oy=["expression(","behavior:","binding:","@import","@charset","-moz-binding:"];function $l(t){return t.replace(/&colon;/gi,":").replace(/&newline;/gi,`
31
+ `).replace(/&tab;/gi," ").replace(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&amp;/gi,"&").replace(/&quot;/gi,'"').replace(/&apos;/gi,"'").replace(/&#(\d+);?/gi,(e,n)=>String.fromCharCode(parseInt(n,10))).replace(/&#x([0-9a-f]+);?/gi,(e,n)=>String.fromCharCode(parseInt(n,16)))}function kf(t){const n=$l(t).trim().replace(/[\s\u0000-\u001f]/g,"").toLowerCase();if(!n||n.startsWith("#"))return!0;const r=n.match(/^[^/?#]*:/);return r?Ey.has(r[0]):!0}function Py(t){const n=$l(t).replace(/[\u0000-\u001f]/g,"");Uf.lastIndex=0;let r;for(;(r=Uf.exec(n))!==null;)if(!kf(r[1]))return null;const i=n.toLowerCase().replace(/\s/g,"");for(const s of Oy)if(i.includes(s))return null;return t}const My={'"':"&quot;","'":"&#39;","`":"&#96;"},Ly=/["'`]/g;function Bl(t){return t.replace(Ly,e=>My[e])}function Dy(t,e,n=!1){if(Cy.has(t))return kf(e)?n?Bl(e):e:null;if(t==="style"){const i=Py(e);return i===null?null:n?Bl(i):i}const r=$l(e).toLowerCase().replace(/\s/g,"");return/\bon\w+=/.test(r)?null:n?Bl(e):e}function Fy(t){const e=t.match(Iy);return e?e[1].toLowerCase():null}function Ny(t){const e=Fy(t);return e!==null&&qs.has(e)}function $y(t){var e,n,r;const i=t.match(Ry);if(i){const E=i[1].toLowerCase();return`</${(e=qs.get(E))!=null?e:E}>`}const s=t.match(wy);if(!s)return"";const[,o,l,c]=s,u=o.toLowerCase(),f=(n=qs.get(u))!=null?n:u,d=[];zf.lastIndex=0;let h;for(;(h=zf.exec(l))!==null;){const E=h[1].toLowerCase(),C=h[2],w=h[3],$=h[4];if(E.startsWith("on"))continue;const z=(r=to.get(E))!=null?r:E;let B,W;if(C!==void 0)B=C,W='"';else if(w!==void 0)B=w,W="'";else if($!==void 0)B=$,W='"';else{to.has(E)&&d.push(z);continue}if(to.has(E)){const _=Dy(E,B,$!==void 0);_!==null&&d.push(`${z}=${W}${_}${W}`)}}const m=d.length>0?` ${d.join(" ")}`:"";return`<${f}${m}${c?"/>":">"}`}function Gr(t){return typeof t!="string"||!t||t.indexOf("<")===-1?t:t.replace(/<\/?[^>]*>|[^<>\s]+>/g,e=>e.startsWith("<!--")?"":e.startsWith("<")?Ny(e)?$y(e):e.replace(/</g,"&lt;"):e.slice(0,-1)+"&gt;")}var By=Object.defineProperty,Gf=Object.getOwnPropertySymbols,zy=Object.prototype.hasOwnProperty,Uy=Object.prototype.propertyIsEnumerable,Xf=(t,e,n)=>e in t?By(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Wf=(t,e)=>{for(var n in e||(e={}))zy.call(e,n)&&Xf(t,n,e[n]);if(Gf)for(var n of Gf(e))Uy.call(e,n)&&Xf(t,n,e[n]);return t};function Vf(t,e){for(let n=0;n<t.length;n++){const r=t[n];r!==null&&sn(r)&&e(r,n)}}function ia(t,e,n){return sn(t[e])?t[e]:n}function ky(t,e){for(const n in t)if(t[n]===e)return!0;return!1}function Ne(t,e,...n){const r=ie(t);return r&&t.call(e,...n),r}function eo(t,e){let n=0;const r=function(...i){!--n&&e.apply(this,i)};"duration"in t?t.each(()=>++n).on("end",r):(++n,t.call(r))}const Ln=t=>t.charAt(0).toUpperCase()+t.slice(1);function Gy(t,e="-"){return t.split(e).map((n,r)=>r?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()).join("")}const Oa=t=>[].slice.call(t);function Xy(...t){const e=n=>{if(qe(n))return n.map(e);if(He(n)&&n.constructor){const r=new n.constructor;for(const i in n)r[i]=e(n[i]);return r}return n};return t.map(n=>e(n)).reduce((n,r)=>Wf(Wf({},n),r))}function xn(t={},e){qe(e)&&e.forEach(n=>xn(t,n));for(const n in e)/^\d+$/.test(n)||n in t||(t[n]=e[n]);return t}function zl(t){const e=t[0]instanceof Date,n=Array.from(new Set(e?t.map(Number):t));return e?n.map(r=>new Date(r)):n}function Wy(t){return t&&t.length?t.reduce((e,n)=>e.concat(n)):[]}function Xr(t,...e){if(!e.length||e.length===1&&!e[0])return t;const n=e.shift();return He(t)&&He(n)&&Object.keys(n).forEach(r=>{if(!/^(__proto__|constructor|prototype)$/i.test(r)){const i=n[r];i instanceof Date?t[r]=new Date(i.getTime()):He(i)?(!t[r]&&(t[r]={}),t[r]=Xr(t[r],i)):t[r]=qe(i)?i.concat():i}}),Xr(t,...e)}function ti(t,e=!0){let n;return t[0]instanceof Date?n=e?(r,i)=>r-i:(r,i)=>i-r:e&&!t.every(isNaN)?n=(r,i)=>r-i:e||(n=(r,i)=>r>i&&-1||r<i&&1||r===i&&0),t.concat().sort(n)}function pr(t,e){let n=e.filter(r=>vn(r));if(n.length)if(ae(n[0])){let r=t==="min"?1/0:-1/0;for(const i of n)(t==="min"?i<r:i>r)&&(r=i);n=r}else n[0]instanceof Date&&(n=ti(n,t==="min")[0]);else n=void 0;return n}const no=(t,e,n=1)=>{const r=[],i=Math.max(0,Math.ceil((e-t)/n))|0;for(let s=0;s<i;s++)r.push(t+s*n);return r};let Vy=0;function Cr(t=!0){const e=++Vy;return t?String(e):e}function Ul(t,e,n,r,i){if(n>r)return-1;const s=Math.floor((n+r)/2);let{x:o,w:l=0}=t[s];return i&&(o=t[s].y,l=t[s].h),e>=o&&e<=o+l?s:e<o?Ul(t,e,n,s-1,i):Ul(t,e,s+1,r,i)}function Pa(t,e){return Gr(t.replace(/\{=([^}]+)\}/g,(n,r)=>{var i;return(i=e[r])!=null?i:""}))}function Wn(t){var e;let n;if(t instanceof Date)n=t;else if(je(t)){const{config:r,format:i}=this;n=(e=i.dataTime(r.data_xFormat)(t))!=null?e:new Date(t)}else ae(t)&&!isNaN(t)&&(n=new Date(+t));return(!n||isNaN(+n))&&console&&console.error&&console.error(`Failed to parse x '${t}' to Date object`),n}function jf(t){if(He(t)&&!je(t)){const o=t;return{top:o.top||0,right:o.right||0,bottom:o.bottom||0,left:o.left||0}}const e=(je(t)?t.trim().split(/\s+/):[t]).map(o=>+o||0),[n,r=n,i=n,s=r]=e;return{top:n,right:r,bottom:i,left:s}}function Hf(t,e){e()===!1?$f(()=>Hf(t,e)):t()}function Yf(t,e=(n=>n)){const n=new Set;return Vf(t,(r,i)=>{n.add(e(r,i))}),n}function Kf(t,e,n=(r=>r)){const r=new Map;return Vf(t,(i,s)=>{r.set(e(i,s),n(i,s))}),r}function sa(t="linear",e,n){const r={linear:Hs,log:ff,_log:pf,time:vy,utc:gy}[t]();return r.type=t,/_?log/.test(t)&&r.clamp(!0),r.range([e!=null?e:0,n!=null?n:1])}var jy={getXScale(t,e,n,r){const i=this,s=i.state.loading!=="append"&&i.scale.zoom||sa(i.axis.getAxisType("x"),t,e);return i.getCustomizedXScale(n?s.domain(n):s,r)},getYScale(t,e,n,r,i){const o=this.axis.getAxisType(t);if(i&&i.type===o)return i.range([e,n]),r&&i.domain(r),i;const l=sa(o,e,n);return r&&l.domain(r),l},getYScaleById(t,e=!1){var n;const r=((n=this.axis)==null?void 0:n.getId(t))==="y2",i=e?r?"subY2":"subY":r?"y2":"y";return this.scale[i]},getCustomizedXScale(t,e){const n=this,r=()=>(e?e():n.axis.x.tickOffset())||(n.axis.isCategorized()?(t(1)-t(0))/2:0),i=n.config.axis_x_inverted,s=function(o){return t(o)+r()};for(const o in t)s[o]=t[o];return s.orgDomain=()=>t.domain(),s.orgScale=()=>t,n.axis.isCategorized()&&(s.domain=function(o){let l=o;return arguments.length?(t.domain(l),s):(l=this.orgDomain(),i?[l[0]+1,l[1]]:[l[0],l[1]+1])}),s},updateScales(t,e=!0){var n,r,i,s,o,l,c,u,f;const d=this,{axis:h,config:m,format:S,org:E,scale:C,state:{current:w,width:$,height:z,width2:B,height2:W,hasAxis:H,hasTreemap:_}}=d;if(H){const q=m.axis_rotated,st=d.getResettedPadding(1),it={x:q?st:0,y:q?0:z,subX:q?1:0,subY:q?0:W},ot={x:q?z:$,y:q?$:st,subX:q?z:$,subY:q?B:1},ct=e?(n=C.x)==null?void 0:n.orgDomain():C.zoom||(i=(r=C.x)==null?void 0:r.domain)==null?void 0:i.call(r),gt=e?E.xDomain:C.zoom||(o=(s=C.subX)==null?void 0:s.domain)==null?void 0:o.call(s);C.x=d.getXScale(it.x,ot.x,ct,()=>h.x.tickOffset()),C.subX=d.getXScale(it.x,ot.x,gt,tt=>{var ft;return tt%1?0:((ft=h.subX)!=null?ft:h.x).tickOffset()}),S.xAxisTick=h.getXAxisTickFormat(),S.subXAxisTick=h.getXAxisTickFormat(!0),h.setAxis("x",C.x,m.axis_x_tick_outer,t),m.subchart_show&&h.setAxis("subX",C.subX,(l=m.subchart_axis_x_tick_outer)!=null?l:m.axis_x_tick_outer,t),C.y=d.getYScale("y",it.y,ot.y,C.y?C.y.domain():m.axis_y_default,C.y),C.subY=d.getYScale("y",it.subY,ot.subY,C.subY?C.subY.domain():m.axis_y_default,C.subY),h.setAxis("y",C.y,m.axis_y_tick_outer,t),m.subchart_show&&m.subchart_axis_y_show&&h.setAxis("subY",C.subY,(c=m.subchart_axis_y_tick_outer)!=null?c:m.axis_y_tick_outer,t),(m.axis_y2_show||m.subchart_axis_y2_show)&&(C.y2=d.getYScale("y2",it.y,ot.y,C.y2?C.y2.domain():m.axis_y2_default,C.y2),C.subY2=d.getYScale("y2",it.subY,ot.subY,C.subY2?C.subY2.domain():m.axis_y2_default,C.subY2),h.setAxis("y2",C.y2,m.axis_y2_tick_outer,t),m.subchart_show&&m.subchart_axis_y2_show&&h.setAxis("subY2",C.subY2,(u=m.subchart_axis_y2_tick_outer)!=null?u:m.axis_y2_tick_outer,t))}else if(_){const q=d.getCurrentPadding();C.x=Hs().rangeRound([q.left,w.width-q.right]),C.y=Hs().rangeRound([q.top,w.height-q.bottom])}else(f=d.updateArc)==null||f.call(d)},xx(t){const e=this,{config:n,scale:{x:r,zoom:i}}=e,s=n.zoom_enabled&&i?i:r;return t?s(Ge(t.x)?t.x:t):null},xv(t){const e=this,{axis:n,config:r,scale:{x:i,zoom:s}}=e,o=r.zoom_enabled&&s?s:i;let l=e.getBaseValue(t);return n.isTimeSeries()?l=Wn.call(e,l):n.isCategorized()&&je(l)&&(l=r.axis_x_categories.indexOf(l)),o(l)},yv(t){const e=this,{scale:{y:n,y2:r}}=e;return(t.axis&&t.axis==="y2"?r:n)(e.getBaseValue(t))},subxx(t){return t?this.scale.subX(t.x):null}};const Zf=1e5;function mr(t){const e=/(\d+(?:\.\d+)?)px/.exec(t),n=parseFloat(e?e[1]:t);return Number.isFinite(n)?n:12}function tr(t,e,n,r){return e.indices[n]||t.getShapeIndices(r)}function ei(t,e,n=[]){var r;const i=typeof e=="string"?e:e==null?void 0:e.id;return!((r=t.isGrouped)!=null&&r.call(t,i))||n.some(s=>s(t,e))}function oa(t,e){var n;const r=typeof e=="string"?e:e==null?void 0:e.id;return r&&((n=t.data_types)==null?void 0:n[r])||t.data_type||qt.LINE}function ro(t){const e=+t;return Number.isFinite(e)?e:null}function Jf(t){var e,n;const r=(n=(e=t.scale.zoom||t.scale.x)==null?void 0:e.domain)==null?void 0:n.call(e),i=ro(r==null?void 0:r[0]),s=ro(r==null?void 0:r[1]);return i===null||s===null?null:[Math.min(i,s),Math.max(i,s)]}function ao(t){return ro(t==null?void 0:t.x)}function Hy(t,e,n){let r=0,i=t.length;for(;r<i;){const s=r+i>>1,o=ao(t[s]);if(o===null)return 0;(n?o<e:o>e)?r=s+1:i=s}return r}function Yy(t,e,n){let r=0,i=t.length;for(;r<i;){const s=r+i>>1,o=ao(t[s]);if(o===null)return t.length;(n?o<=e:o>=e)?r=s+1:i=s}return r}function Wr(t,e,n=1){const r=(e==null?void 0:e.values)||[],i={start:0,end:r.length},s=Jf(t);if(!r.length||!s)return i;const o=t.state,l=o._canvasVisibleRangeCache||(o._canvasVisibleRangeCache=new Map),c=[e.id,r.length,o.dataGeneration,s[0],s[1],n].join(":"),u=l.get(e.id);if((u==null?void 0:u.key)===c)return u.range;const f=ao(r[0]),d=ao(r[r.length-1]);if(f===null||d===null)return i;const h=f<=d,m=Hy(r,s[0],h),S=Yy(r,s[1],h),E={start:Math.max(0,Math.min(m,S)-n),end:Math.min(r.length,Math.max(m,S)+n)};return l.set(e.id,{key:c,range:E}),E}function er(t,e){return oa(t.config,e)===qt.BAR}function ji(t,e){return en.Area.indexOf(oa(t.config,e))>-1}function ni(t,e){const n=oa(t.config,e);return en.Line.indexOf(n)>-1}function la(t,e){return oa(t.config,e)===qt.SCATTER}function ca(t,e){return oa(t.config,e)===qt.BUBBLE}function xr(t,e){return ni(t,e)||la(t,e)||ca(t,e)}function Vn(t,e){return oa(t.config,e)===qt.CANDLESTICK}function kl(t,e){return oa(t.config,e)===qt.TREEMAP}function Sw(t,e){const n=oa(t,e);return n===qt.BAR||en.Area.indexOf(n)>-1}function An(t,e){const n=t.getBaseValue(e);return n!=null}function gn(t,e){return Number.isFinite(t)&&Number.isFinite(e)}function Qf(t,e,n){const r=Math.ceil(n)+1,i=Math.max(1,Math.ceil(t)+r*2+1),s=Math.max(1,Math.ceil(e)+r*2+1);return{data:new Uint8Array(i*s),height:s,offset:r,width:i}}function _f(t,e,n){const r=Math.round(e)+t.offset,i=Math.round(n)+t.offset;if(r<0||r>=t.width||i<0||i>=t.height)return!1;const s=i*t.width+r;return t.data[s]?!1:(t.data[s]=1,!0)}function Nn(t,e,n,r=`axis_${e}`){const i=t[`${r}_tick_${n}`];return i!==void 0?i:t[`axis_${e}_tick_${n}`]}function io(t,e){const n=typeof t=="function"?t.call(e):t;return n!=null&&n.length?n:void 0}function qf(t,e,n){var r,i,s,o,l,c;if((i=(r=t.axis)==null?void 0:r.isTimeSeries)!=null&&i.call(r,n))return e instanceof Date?e:Wn.call(t,e);if(n==="x"&&((o=(s=t.axis)==null?void 0:s.isCategorized)!=null&&o.call(s))&&typeof e=="string"){const u=t.config.axis_x_categories.indexOf(e);return u>=0?u:e}return(c=(l=t.axis)==null?void 0:l.isLog)!=null&&c.call(l,n)&&e!==null&&e!==void 0?+e:e}function Vr(t,e){return qf(t,e,"x")}function Hi(t,e,n="y"){return qf(t,e,n)}function td(t,e,n="y"){return e.map(r=>Hi(t,r,n))}function Gl(t,e){return e.map(n=>Vr(t,n)).filter(n=>{var r,i;return!(typeof n=="string"&&((i=(r=t.axis)==null?void 0:r.isCategorized)!=null&&i.call(r)))})}function Ma(t,e){const n=typeof e=="function"?e():e;return t.ticks?t.ticks(n):t.domain()}function ed(t,e){const[n,r]=t.domain(),i=+n,s=+r;if(e||!Number.isFinite(i)||!Number.isFinite(s)||s<=0)return Ma(t,e);const o=sa("_log").domain([i>0?i:1,s]).range(t.range());let l=o.ticks();for(let c=s.toFixed().length;l.length>15;c--)l=o.ticks(c);return l.length&&(l.splice(0,1,n),l.splice(l.length-1,1,r)),l}function Yi(t,e){const n=+t,r=+e;return Number.isFinite(n)&&Number.isFinite(r)?Math.abs(n-r)<1e-6:t===e}function Ky(t,e){const[n,r]=e,i=t.slice();return n!==void 0&&!i.some(s=>Yi(s,n))&&i.unshift(n),r!==void 0&&!i.some(s=>Yi(s,r))&&i.push(r),i}function nd(t,e){const n=Vr(t,e);return ro(n)}function Xl(t){var e,n,r,i,s,o,l,c;const{scale:u}=t,f=(n=(e=u.zoom)==null?void 0:e.domain)==null?void 0:n.call(e),d=((i=(r=u.subX)==null?void 0:r.domain)==null?void 0:i.call(r))||((o=(s=u.x)==null?void 0:s.orgDomain)==null?void 0:o.call(s))||((c=(l=u.x)==null?void 0:l.domain)==null?void 0:c.call(l));return!(f!=null&&f.length)||!(d!=null&&d.length)?!1:!Yi(f[0],d[0])||!Yi(f[1],d[1])}function Zn(t){return Xl(t)?t.scale.zoom:t.scale.x}function Zy(t,e,n=0){var r,i;const s=(i=(r=Zn(t)).domain)==null?void 0:i.call(r);if(!(s!=null&&s.length))return!0;const o=nd(t,e),l=+s[0],c=+s[1];return o===null||!Number.isFinite(l)||!Number.isFinite(c)?!0:o>=Math.min(l,c)-n&&o<=Math.max(l,c)+n}function Jy(t,e){const n=[e>0?Math.abs(t[e]-t[e-1]):1/0,e<t.length-1?Math.abs(t[e+1]-t[e]):1/0].filter(Number.isFinite),r=Math.min(...n);return Number.isFinite(r)?r/2:0}function rd(t,e){let n=0,r=t.length;for(;n<r;){const i=n+r>>1;t[i]<e?n=i+1:r=i}return n}function Qy(t,e){let n=0,r=t.length;for(;n<r;){const i=n+r>>1;t[i]<=e?n=i+1:r=i}return n}function _y(t,e){var n;const{axis:r,state:i}=t,s=[i.dataGeneration,(n=r==null?void 0:r.isTimeSeries)!=null&&n.call(r)?1:0,e.map(u=>`${u.id}:${u.values.length}`).join(",")].join("|"),o=i._canvasXDataTickCache;if((o==null?void 0:o.key)===s)return o;const l=t.mapTargetsToUniqueXs(e),c={key:s,values:l,comparable:l.map(u=>{var f;return(f=nd(t,u))!=null?f:NaN})};return i._canvasXDataTickCache=c,c}function qy(t,e){const{values:n,comparable:r}=e;if(!Xl(t))return n;const i=Jf(t);if(!i||r.length!==n.length||!Number.isFinite(r[0]))return n.filter(f=>Zy(t,f));const[s,o]=i;let l=rd(r,s),c=Qy(r,o);const u=f=>{const d=rd(r,f);let h=-1,m=1/0;for(const S of[d-1,d]){const E=r[S],C=Math.abs(E-f);C<m&&(m=C,h=S)}h>-1&&h<r.length&&m<=Jy(r,h)+1e-6&&(l=Math.min(l,h),c=Math.max(c,h+1))};return u(s),u(o),n.slice(Math.max(0,l),Math.min(n.length,c))}function t0(t,e){return typeof t=="function"?`fn:${e}`:Array.isArray(t)?t.map(n=>n instanceof Date?+n:String(n)).join(","):""}function e0(t,e){var n,r,i;const{config:s,state:o}=t,c=(((r=(n=Zn(t)).domain)==null?void 0:r.call(n))||[]).map(f=>f instanceof Date?+f:String(f)).join(","),u=s.axis_rotated?o.height:o.width;return[e?1:0,o.dataGeneration,c,u,s.axis_x_tick_fit?1:0,s.axis_x_tick_count||"",s.axis_x_tick_culling,s.axis_x_tick_culling_max||"",s.axis_x_tick_culling_reverse?1:0,((i=s.axis_x_categories)==null?void 0:i.length)||0,t0(s.axis_x_tick_values,o.redrawGeneration)].join("|")}function Wl(t,e,n,r=!1){var i;return(i=t.axis)!=null&&i.generateTickValues?t.axis.generateTickValues(e,n,r):e}function n0(t,e){const[n,r]=t,i=[];if(!e||!Number.isFinite(e))return i;for(let s=Math.round(n);s<=r;s+=e)i.push(s);return i}function so(t,e=!0){var n,r,i,s,o,l,c;const{axis:u,config:f}=t,d=Zn(t),h=((n=t.getTargetsToShow)==null?void 0:n.call(t))||t.filterTargetsToShow(),m=t.state._canvasXTickValuesCache||(t.state._canvasXTickValuesCache=new Map),S=e0(t,e),E=m.get(S);if(E)return E;const C=z=>(m.set(S,z),z);if(!(h!=null&&h.length))return C([]);const w=io(f.axis_x_tick_values,t.api);if(w){const z=Gl(t,w);return C(e?jl(t,z):z)}if(f.axis_x_tick_fit&&(h!=null&&h.length)&&t.mapTargetsToUniqueXs){const z=_y(t,h),B=qy(t,z),W=Wl(t,B,f.axis_x_tick_count,(r=u==null?void 0:u.isTimeSeries)==null?void 0:r.call(u));return C(e?jl(t,W,!0):W)}if(Xl(t)&&!((i=u==null?void 0:u.isCategorized)!=null&&i.call(u))){const z=((o=(s=t.zoom)==null?void 0:s.getDomain)==null?void 0:o.call(s))||d.domain(),B=Ky(Ma(d,f.axis_x_tick_count||Bt),z);return C(e?lo(B,Hl(t)):B)}if((l=u==null?void 0:u.isCategorized)!=null&&l.call(u)&&((c=f.axis_x_categories)!=null&&c.length)){const z=f.axis_x_categories.map((B,W)=>W);return C(e?lo(z,Hl(t)):z)}const $=Ma(d,f.axis_x_tick_count||Bt);return C(e?lo($,Hl(t)):$)}function r0(t){const{config:e,state:{height2:n,width2:r}}=t,i=e.axis_rotated?n:r,s=Nn(e,"x","count","subchart_axis_x"),o=Nn(e,"x","culling","subchart_axis_x"),l=Nn(e,"x","culling_max","subchart_axis_x");if(s)return s;if(o!==!1)return Math.min(l||Bt,Math.max(2,Math.floor(i/70)))}function ad(t,e=!0){var n,r,i,s;const{axis:o,config:l,scale:c}=t,u=c.subX,f=((n=t.getTargetsToShow)==null?void 0:n.call(t))||t.filterTargetsToShow(),d=Nn(l,"x","count","subchart_axis_x"),h=r0(t),m=(C,w=!1)=>e?jl(t,C,w,"subchart_axis_x",h):C;if(!u||!(f!=null&&f.length))return[];const S=io(Nn(l,"x","values","subchart_axis_x"),t.api);if(S)return m(Gl(t,S));if(l.axis_x_tick_fit&&t.mapTargetsToUniqueXs){const C=Wl(t,t.mapTargetsToUniqueXs(f),d,(r=o==null?void 0:o.isTimeSeries)==null?void 0:r.call(o));return m(C,!0)}if((i=o==null?void 0:o.isCategorized)!=null&&i.call(o)&&((s=l.axis_x_categories)!=null&&s.length))return m(l.axis_x_categories.map((C,w)=>w),!0);const E=Ma(u,d||Bt);return m(E,!0)}function id(t,e=Zn(t),n=t.config.axis_x_tick_outer){var r,i;const s=e,o=((r=s.orgDomain)==null?void 0:r.call(s))||((i=s.domain)==null?void 0:i.call(s));if(!(o!=null&&o.length))return[];const l=+o[0],c=+o[o.length-1];if(!Number.isFinite(l)||!Number.isFinite(c))return[];const u=Math.ceil(Math.min(l,c)),f=Math.floor(Math.max(l,c)),d=Array.from({length:Math.max(0,f-u+1)},(h,m)=>u+m);return n?d.slice(1,-1):d}function Vl(t,e,n=Zn(t)){var r,i,s,o,l;const c=n,u=Vr(t,e);if((i=(r=t.axis)==null?void 0:r.isCategorized)!=null&&i.call(r)){const f=(s=c.orgScale)==null?void 0:s.call(c);if(f)return f(u);const d=((l=(o=t.axis.x)==null?void 0:o.tickOffset)==null?void 0:l.call(o))||(c(1)-c(0))/2;return c(u)-d}return c(u)}function sd(t,e,n,r=Zn(t)){if(e.length<2)return!1;const i=Math.max(1,n)/2,s=e.map(l=>Vl(t,l,r)).filter(Number.isFinite).sort((l,c)=>l-c);if(s.length<2)return!1;let o=s[0]+i;for(let l=1;l<s.length;l++){const c=s[l]-i,u=s[l]+i;if(c<=o+Se)return!0;o=Math.max(o,u)}return!1}function oo(t,e,n=Zn(t)){const r=new Set;return e.filter(i=>{const s=Vl(t,i,n),o=Math.round(s);return!Number.isFinite(s)||r.has(o)?!1:(r.add(o),!0)})}function a0(t,e,n=1){var r;const{axis:i,config:s}=t;if((r=i==null?void 0:i.isCategorized)!=null&&r.call(i)){const l=id(t);return oo(t,l)}if(s.axis_x_tick_culling===!1||s.axis_x_tick_culling_lines===!1)return e;const o=so(t,!1);return sd(t,o,n)?e:oo(t,o)}function i0(t,e,n=1){var r;const{axis:i,config:s,scale:o}=t,l=o.subX,c=Nn(s,"x","culling","subchart_axis_x"),u=Nn(s,"x","culling_lines","subchart_axis_x"),f=Nn(s,"x","outer","subchart_axis_x");if(!l)return[];if((r=i==null?void 0:i.isCategorized)!=null&&r.call(i)){const h=id(t,l,f);return oo(t,h,l)}if(c===!1||u===!1)return e;const d=ad(t,!1);return sd(t,d,n,l)?e:oo(t,d,l)}function Ki(t,e="y",n,r=!0,i=t.scale[e],s=`axis_${e}`){var o,l,c;const{axis:u,config:f}=t,d=`axis_${e}`,h=io(Nn(f,e,"values",s),t.api),m=C=>r?c0(t,e,C,s):C;if(h)return m(td(t,h,e));const S=n0(i.domain(),f[`${d}_tick_stepSize`]);if(S.length)return m(S);const E=n!=null?n:Nn(f,e,"count",s);if((o=u==null?void 0:u.isTimeSeries)!=null&&o.call(u,e)&&f[`${d}_tick_time_value`])return m(Ma(i,f[`${d}_tick_time_value`]));if((l=u==null?void 0:u.isLog)!=null&&l.call(u,e))return m(ed(i,E));if(E){const C=i.domain();return m(Wl(t,C,C.every(w=>w===0)?1:E,(c=u==null?void 0:u.isTimeSeries)==null?void 0:c.call(u,e)))}return m(Ma(i,Bt))}function s0(t,e,n){const r=e==="x"?Zn(t):t.scale[e],i=r!=null&&r.copy?r.copy():r;return n.domain&&(i!=null&&i.domain)&&i.domain(n.domain),i}function o0(t,e,n,r){var i,s,o;const l=r.tick||{},c=io(l.values,t.api);return c?e==="x"?Gl(t,c):td(t,c,e):e!=="x"&&((s=(i=t.axis)==null?void 0:i.isLog)!=null&&s.call(i,e))?ed(n,l.count):Ma(n,(o=l.count)!=null?o:Bt)}function l0(t,e){var n;const r=(n=e.tick)==null?void 0:n.format;return typeof r=="function"?r.bind(t.api):(i=>i)}function lo(t,e){const n=t.length-1;if(e&&n>e){const r=t.length-1;return e<=1?[t[0]]:Array.from({length:e},(i,s)=>t[Math.round(s*r/(e-1))])}return t}function c0(t,e,n,r=`axis_${e}`){const{config:i}=t;if(!Nn(i,e,"culling",r))return n;const o=Nn(i,e,"culling_max",r)||Bt,l=Nn(i,e,"culling_reverse",r),c=n.slice().sort((h,m)=>{const S=+h,E=+m,C=Number.isFinite(S)&&Number.isFinite(E)?S-E:String(h).localeCompare(String(m));return l?-C:C}),u=c.length;let f=0;for(let h=1;h<u;h++)if(u/h<o){f=h;break}if(!f)return n;const d=new Set(c.filter((h,m)=>m%f===0));return n.filter(h=>d.has(h))}function jl(t,e,n=!1,r="axis_x",i){const{config:s}=t;if(Nn(s,"x","culling",r)===!1)return e;const l=i||Nn(s,"x","culling_max",r)||Bt,c=Nn(s,"x","culling_reverse",r),u=n?e:e.slice().sort((m,S)=>{const E=+m,C=+S;return Number.isFinite(E)&&Number.isFinite(C)?c?C-E:E-C:c?String(S).localeCompare(String(m)):String(m).localeCompare(String(S))}),f=u.length;let d=0;for(let m=1;m<f;m++)if(f/m<l){d=m;break}if(!d)return e;if(n)return e.filter((m,S)=>c?(f-1-S)%d===0:S%d===0);const h=new Set(u.filter((m,S)=>S%d===0));return e.filter(m=>h.has(m))}function Hl(t){const{config:e,state:{height:n,width:r}}=t,i=e.axis_rotated?n:r;if(e.axis_x_tick_count)return e.axis_x_tick_count;if(e.axis_x_tick_culling!==!1)return Math.min(e.axis_x_tick_culling_max||Bt,Math.max(2,Math.floor(i/70)))}function u0(t){var e,n;const{axis:r,config:i}=t,s=(n=(e=r==null?void 0:r.y)==null?void 0:e.getGeneratedTicks)==null?void 0:n.call(e,i.grid_y_ticks);return s!=null&&s.length?s:i.grid_y_ticks?lo(Ki(t,"y",void 0,!1),i.grid_y_ticks):Ki(t,"y",void 0,!1)}var f0=Object.defineProperty,d0=(t,e,n)=>e in t?f0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,h0=(t,e,n)=>d0(t,typeof e!="symbol"?e+"":e,n);class od{constructor(e){h0(this,"ctx",e)}get context(){return this.ctx}withContext(e,n){const r=this.ctx;this.ctx=e;try{n()}finally{this.ctx=r}}withState(e){const{ctx:n}=this;n.save();try{e(n)}finally{n.restore()}}withTranslation(e,n,r){this.withState(i=>{i.translate(e,n),r(i)})}clipRect(e,n){this.withState(r=>{r.beginPath(),r.rect(e.x,e.y,e.w,e.h),r.clip(),n(r)})}measureText(e){return this.ctx.measureText(e)}traceLine(e,n,r,i){const{ctx:s}=this;s.moveTo(e,n),s.lineTo(r,i)}traceCrispLine(e,n,r,i,s){this.traceLine(this.crisp(e,s),this.crisp(n,s),this.crisp(r,s),this.crisp(i,s))}traceCircle(e,n,r){this.ctx.moveTo(e+r,n),this.ctx.arc(e,n,r,0,Math.PI*2)}strokePath(e,n){this.withStyle(n,r=>{r.beginPath(),e(r),r.stroke()})}fillPath(e,n){this.withStyle(n,r=>{r.beginPath(),e(r),r.fill()})}fillRect(e,n){this.withStyle(n,r=>{r.fillRect(e.x,e.y,e.w,e.h)})}fillRoundRect(e,n=0,r){const i=this.normalizeRect(e),s=this.getRectRadii(i,n);if(!s.tl&&!s.tr&&!s.br&&!s.bl){this.fillRect(i,r);return}this.fillPath(o=>{this.traceRoundRect(o,i,s)},r)}strokeRoundRect(e,n=0,r){const i=this.normalizeRect(e),s=this.getRectRadii(i,n);if(!s.tl&&!s.tr&&!s.br&&!s.bl){this.strokeRect(i,r);return}this.strokePath(o=>{this.traceRoundRect(o,i,s)},r)}strokeRect(e,n){this.withStyle(n,r=>{r.strokeRect(e.x,e.y,e.w,e.h)})}text(e,n,r,i){const s=(l,c,u)=>{(i==null?void 0:i.maxWidth)===void 0?l.fillText(e,c,u):l.fillText(e,c,u,i.maxWidth)},o=l=>{i!=null&&i.angle?(l.translate(n,r),l.rotate(i.angle*Math.PI/180),s(l,0,0)):s(l,n,r)};i!=null&&i.angle?this.withState(l=>{this.applyStyle(i),o(l)}):this.withStyle(i,o)}textLines(e,n,r,i){this.withState(s=>{const o=e.split(`
32
+ `),l=mr((i==null?void 0:i.font)||s.font),c=o.length>1?-((o.length-1)*l):0;this.applyStyle(i),s.translate(n,r),i!=null&&i.angle&&s.rotate(i.angle*Math.PI/180),o.forEach((u,f)=>{const d=c+f*l;(i==null?void 0:i.maxWidth)===void 0?s.fillText(u,0,d):s.fillText(u,0,d,i.maxWidth)})})}point(e,n,r,i,s){this.withStyle(s,o=>{const l=!(s!=null&&s.stroke)||s.fill!==void 0,c=(s==null?void 0:s.stroke)!==void 0;if(e==="rectangle"){const u=i*2,f={x:n-i,y:r-i,w:u,h:u};l&&o.fillRect(f.x,f.y,f.w,f.h),c&&o.strokeRect(f.x,f.y,f.w,f.h)}else o.beginPath(),o.arc(n,r,i,0,Math.PI*2),l&&o.fill(),c&&o.stroke()})}getRectRadii(e,n){const r=typeof n=="number"?{tl:n,tr:n,br:n,bl:n}:{tl:n.tl||0,tr:n.tr||0,br:n.br||0,bl:n.bl||0},i=Math.max(0,Math.min(Math.abs(e.w),Math.abs(e.h))/2);return{tl:Math.max(0,Math.min(r.tl,i)),tr:Math.max(0,Math.min(r.tr,i)),br:Math.max(0,Math.min(r.br,i)),bl:Math.max(0,Math.min(r.bl,i))}}traceRoundRect(e,n,r){const{x:i,y:s,w:o,h:l}=n,c=i+o,u=s+l;e.moveTo(i+r.tl,s),e.lineTo(c-r.tr,s),r.tr?e.quadraticCurveTo(c,s,c,s+r.tr):e.lineTo(c,s),e.lineTo(c,u-r.br),r.br?e.quadraticCurveTo(c,u,c-r.br,u):e.lineTo(c,u),e.lineTo(i+r.bl,u),r.bl?e.quadraticCurveTo(i,u,i,u-r.bl):e.lineTo(i,u),e.lineTo(i,s+r.tl),r.tl?e.quadraticCurveTo(i,s,i+r.tl,s):e.lineTo(i,s),e.closePath()}normalizeRect(e){const n=e.w<0?e.x+e.w:e.x,r=e.h<0?e.y+e.h:e.y;return{x:n,y:r,w:Math.abs(e.w),h:Math.abs(e.h)}}applyStyle(e){if(!e)return;const{ctx:n}=this;e.fill!==void 0&&(n.fillStyle=e.fill),e.stroke!==void 0&&(n.strokeStyle=e.stroke),e.lineWidth!==void 0&&(n.lineWidth=e.lineWidth),e.alpha!==void 0&&(n.globalAlpha=e.alpha),e.font!==void 0&&(n.font=e.font),e.textAlign!==void 0&&(n.textAlign=e.textAlign),e.textBaseline!==void 0&&(n.textBaseline=e.textBaseline),e.lineDash!==void 0&&n.setLineDash(e.lineDash)}withStyle(e,n){e?this.withState(r=>{this.applyStyle(e),n(r)}):n(this.ctx)}crisp(e,n){return n%2?Math.round(e)+.5:Math.round(e)}}var v0=Object.defineProperty,g0=Object.defineProperties,p0=Object.getOwnPropertyDescriptors,ld=Object.getOwnPropertySymbols,m0=Object.prototype.hasOwnProperty,x0=Object.prototype.propertyIsEnumerable,Yl=(t,e,n)=>e in t?v0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cd=(t,e)=>{for(var n in e||(e={}))m0.call(e,n)&&Yl(t,n,e[n]);if(ld)for(var n of ld(e))x0.call(e,n)&&Yl(t,n,e[n]);return t},ud=(t,e)=>g0(t,p0(e)),Kl=(t,e,n)=>Yl(t,typeof e!="symbol"?e+"":e,n);const fd=20,dd=15;function Zl(t){return t?-1:1}function y0(t,e){return t?e?-1:1:e?1:-1}function T0(t,e){var n,r,i;const s=e==="y2"?"subY2":"subY",o=(i=(r=(n=t.axis)==null?void 0:n[s])==null?void 0:r.tickFormat)==null?void 0:i.call(r),l=t.config[`subchart_axis_${e}_tick_format`]||t.config[`axis_${e}_tick_format`];return o||(typeof l=="function"?l.bind(t.api):(c=>c))}function b0(t){return t?{stroke:t.lineColor,lineWidth:t.lineWidth,lineDash:t.dashArray}:void 0}function S0(t){return t?{fill:t.labelColor,font:t.labelFont}:void 0}function Jl(t,e,n){return{x:t.left-fd,y:0,w:e+fd*2,h:n}}function Ql(t,e,n){return{x:0,y:t.top-dd,w:e,h:n+dd*2}}function A0(t,e){var n,r;const i=(r=(n=t.config.axis_tooltip)==null?void 0:n.backgroundColor)!=null?r:"black";return typeof i=="string"?i:(i==null?void 0:i[e])||null}function E0(t,e,n){var r,i;const s=t.scale[e];if(!(s!=null&&s.invert))return null;const o=s.invert(n);if(o==null)return null;if(e==="x"&&((i=(r=t.axis)==null?void 0:r.isTimeSeries)!=null&&i.call(r)))return t.format.xAxisTick(o);const l=Number(o);return Number.isFinite(l)?l.toFixed(2):`${o}`}function C0(t,e){const{config:n,state:{height:r,margin:i,width:s}}=t,o=n.axis_rotated,l={x:i.left,y:i.top};return e==="x"?!o&&(l.y+=r):e==="y"?o&&(l.y+=r):o?l.y-=1:l.x+=s,l}function I0(t,e,n,r){return r?{x:t.x+n,y:t.y-e}:{x:t.x+e,y:t.y+n}}function hd(t,e){const n=t?t(e):e;return n==null?"":String(n)}function Zi(t,e){return t[`${e}TickFont`]||t.labelFont}function _l(t,e){const n=t.measureText("0"),r=(n.fontBoundingBoxAscent||0)+(n.fontBoundingBoxDescent||0),i=(n.actualBoundingBoxAscent||0)+(n.actualBoundingBoxDescent||0),s=(e||10)*(11.5/10);return Math.max(e,r,i,s)}function R0(t){return 11.5-2.5*(t/15)*(t>0?1:-1)}function w0(t){return 8*Math.sin(Math.PI*(t/180))}function ql(t,e){if(typeof t=="number")return t;if(typeof t=="string"){const n=parseFloat(t);return Number.isFinite(n)?/em$/.test(t.trim())?n*e:n:0}return 0}function O0(t,e,n){if(!e)return[t];const r=n.measureText("0").width||5.5;function i(s,o){let l;for(let c=1;c<o.length;c++)if(o.charAt(c)===" "&&(l=c),e<r*(c+1)){const u=l||c;return i(s.concat(o.slice(0,u)),o.slice(l?l+1:c))}return s.concat(o)}return i([],t)}function tc(t,e,n,r){var i,s;const o=t.config.axis_x_tick_width;if(o&&o>0)return o;if(n)return 95;if((s=(i=t.axis)==null?void 0:i.isCategorized)!=null&&s.call(i)&&e.length>1){const l=r(Vr(t,e[0])),c=r(Vr(t,e[1]));return Math.max(0,Math.abs(c-l)-12)}return 110}function vd(t,e,n,r,i=[],s=!1,o=Zn(t),l){const c=n?n(r):r;if(c==null)return[""];if(Array.isArray(c))return c.map(f=>String(f));const u=String(c);return u.indexOf(`
33
33
  `)>-1?u.split(`
34
- `):t.config.axis_x_tick_multiline?I0(u,l!=null?l:Zl(t,i,o,s),e):[u]}function Jl(t,e){const{isRotated:n,tickCount:r,tickIndex:i,tickRotate:o,tickTextDirection:s}=e,l=t.config.axis_x_tick_text_inner;let c=n?s>0?"left":"right":o?o>0?"left":"right":"center";return!n&&i===0&&(l===!0||l!=null&&l.first)?c="left":!n&&i===r-1&&(l===!0||l!=null&&l.last)&&(c="right"),c}function R0(t,e){var n,r;return((n=t==null?void 0:t.indexOf("center"))!=null?n:-1)>-1?{x:e/2,align:"center"}:((r=t==null?void 0:t.indexOf("right"))!=null?r:-1)>-1?{x:e,align:"right"}:{x:0,align:"left"}}function pa(t){return Number.isFinite(t)}function rs(t,e,n){return pa(t)&&t>=Math.min(e,n)&&t<=Math.max(e,n)}function cd(t){return t?-1:1}function w0(t,e,n){return e?n?t.axis_y2_inner?1:-1:t.axis_y_inner?-1:1:n?t.axis_y2_inner?-1:1:t.axis_y_inner?1:-1}function Ql(t,e,n=tr(t)){return n(Jr(t,e))}function O0(t,e){var n,r;return(r=(n=t.axis)==null?void 0:n.isCategorized)!=null&&r.call(n)&&typeof e=="string"&&Number.isNaN(Number(e))?t.config.axis_x_categories.indexOf(e):Jr(t,e)}function P0(t,e){var n,r;return!!((r=(n=t.axis)==null?void 0:n.isCategorized)!=null&&r.call(n)&&Number.isNaN(Number(e)))}function ud(t,e,n,r){var i,o;if(e===void 0)return n;let s=tr(t)(O0(t,e));if(P0(t,e)){const l=tr(t),c=((o=(i=t.axis.x)==null?void 0:i.tickOffset)==null?void 0:o.call(i))||(l(1)-l(0))/2;s+=c*(r==="start"?-1:1)}return s}function fd(t,e,n="y"){return t.scale[n||"y"](Xi(t,e,n))}function dd(t,e,n){return t==="start"?e+4:t==="middle"?(e+n)/2:n-4}function hd(t,e,n){return t==="start"?n-4:t==="middle"?(e+n)/2:e+4}function M0(t,e){const{config:n,scale:r,state:{width:i,height:o}}=t,s=e.axis||"x",l=n.axis_rotated;if(s==="x"){const h=ud(t,e.start,0,"start"),m=ud(t,e.end,l?o:i,"end"),S=Math.min(h,m),E=Math.abs(m-h);return l?{x:0,y:S,w:i,h:E}:{x:S,y:0,w:E,h:o}}if(!r[s])return null;const c=e.start===void 0?l?0:o:fd(t,e.start,s),u=e.end===void 0?l?i:0:fd(t,e.end,s),f=Math.min(c,u),d=Math.abs(u-c);return l?{x:f,y:0,w:d,h:o}:{x:0,y:f,w:i,h:d}}class L0{constructor(e,n){Wl(this,"engine",e),Wl(this,"theme",n),Wl(this,"painter"),this.painter=new ed(e.ctx)}get ctx(){return this.painter.context}withContext(e,n){this.painter.withContext(e,n)}draw(e){this.drawRegions(e),this.drawGrid(e),this.drawAxis(e)}drawAxis(e){const{config:n}=e;n.axis_x_show&&this.drawXAxis(e),n.axis_y_show&&this.drawYAxis(e),n.axis_y2_show&&e.scale.y2&&this.drawYAxis(e,"y2"),this.drawAdditionalAxes(e),this.drawAxisLabels(e)}drawSubXAxis(e){var n,r,i,o;const{ctx:s,painter:l,theme:{style:{axis:c}}}=this,{config:u,format:f,scale:d,state:{current:h,margin2:m,width2:S,height2:E}}=e;if(!u.subchart_show||!u.subchart_axis_x_show||!d.subX||S<=0||E<=0)return;const C=u.axis_rotated,w=l.crisp(m.left,c.lineWidth),N=l.crisp(m.top+E,c.lineWidth),z=m.left,$=m.left+S,G=m.top,V=m.top+E,J=C?G:z,Q=C?V:$,rt=_f(e),et=n0(e,rt,c.tickWidth),st=(n=u.subchart_axis_x_tick_outer)!=null?n:u.axis_x_tick_outer,ct=C?u.axis_x_tick_inner?1:-1:u.axis_x_tick_inner?-1:1,dt=cd(C),q=Vl(C),ft=u.axis_x_tick_text_position,lt=C?0:((r=e.getAxisTickRotate)==null?void 0:r.call(e,"x"))||0,pt=f.subXAxisTick||((o=(i=e.axis)==null?void 0:i.getXAxisTickFormat)==null?void 0:o.call(i,!0));l.clipRect(C?Hl(m,h.width,E):ad(rd({},jl(m,S,h.height-m.top)),{y:m.top}),()=>{s.globalAlpha=1,s.strokeStyle=c.lineColor,s.lineWidth=c.lineWidth,s.setLineDash([]),l.strokePath(()=>{C?l.traceLine(w,G,w,V):l.traceLine(z,N,$,N),st&&(C?(l.traceLine(w,G,w+Dt*dt,G),l.traceLine(w,V,w+Dt*dt,V)):(l.traceLine(z,N,z,N+Dt*dt),l.traceLine($,N,$,N+Dt*dt)))});const Tt=ji(c,"x");s.font=Tt,s.fillStyle=c.labelColor,s.textAlign=C?q>0?"left":"right":"center",s.textBaseline=C?"middle":q>0?"top":"bottom",s.strokeStyle=c.tickColor,s.lineWidth=c.tickWidth;const Rt=Yl(l,Sr(Tt)),Ct=Zl(e,rt,C,d.subX);if(u.subchart_axis_x_tick_show)for(const Kt of et){const re=d.subX(Jr(e,Kt)),Ee=m.left+re,Ce=m.top+re;rs(C?Ce:Ee,J,Q)&&l.strokePath(()=>{C?l.traceLine(w,Ce,w+Dt*ct,Ce):l.traceLine(Ee,N,Ee,N+Dt*ct)})}for(const Kt of rt){const re=d.subX(Jr(e,Kt)),Ee=m.left+re,Ce=m.top+re;if(!rs(C?Ce:Ee,J,Q)||!u.subchart_axis_x_tick_text_show)continue;const Ne=ld(e,l,pt,Kt,rt,C,d.subX,Ct);let ye,De;C?(ye=w+(Dt+fn)*q+(ft.x||0),De=Ce+(ft.y||0),s.textAlign=q>0?"left":"right",s.textBaseline="middle"):(ye=Ee+(ft.x||0),De=N+(Dt+fn)*q+(ft.y||0),s.textAlign=lt?lt>0?"left":"right":"center",s.textBaseline=q>0?"top":"bottom"),l.withState(Zt=>{Zt.translate(ye,De),lt&&Zt.rotate(lt*Math.PI/180),Ne.forEach((ve,xe)=>{Zt.fillText(ve,0,xe*Rt)})})}})}drawSubYAxes(e){const{config:n,scale:r,state:{margin2:i,width2:o,height2:s}}=e;!n.subchart_show||o<=0||s<=0||["y","y2"].forEach(l=>{var c;const u=l==="y2"?r.subY2:r.subY;!n[`subchart_axis_${l}_show`]||!u||this.drawYAxis(e,l,{scale:u,ticks:Vi(e,l,void 0,!0,u,`subchart_axis_${l}`),format:m0(e,l),index:0,outerTick:(c=n[`subchart_axis_${l}_tick_outer`])!=null?c:n[`axis_${l}_tick_outer`],margin:i,width:o,height:s,prefix:`subchart_axis_${l}`,tickShow:n[`subchart_axis_${l}_tick_show`],tickTextShow:n[`subchart_axis_${l}_tick_text_show`],tickTextPosition:n[`axis_${l}_tick_text_position`]})})}drawTitle(e){var n,r;const{ctx:i,painter:o,theme:{style:{title:s}}}=this,{config:l,state:{current:c}}=e;if(!l.title_text)return;const u=String(l.title_text).split(`
35
- `),f=Sr(s.font),d=f*1.5,{x:h,align:m}=R0(l.title_position,c.width),S=(r=(n=e.getCanvasTitleHeight)==null?void 0:n.call(e))!=null?r:f,E=(l.title_padding.top||0)+S;o.withState(()=>{i.font=s.font,i.fillStyle=s.color,i.textAlign=m,i.textBaseline="alphabetic",u.forEach((C,w)=>{i.fillText(C,h,E+(w?f+(w-1)*d:0))})})}drawAxisLabels(e){const{ctx:n,painter:r,theme:{style:{axis:i}}}=this,{axis:o,config:s}=e,l=Sr(i.labelFont),c=["x","y","y2"],u={x:i.xLabelColor,y:i.yLabelColor,y2:i.y2LabelColor},f={start:"left",middle:"center",end:"right"};o&&r.withState(()=>{n.font=i.labelFont,n.textBaseline="alphabetic",c.forEach(d=>{const h=o.getLabelText(d);if(!h||!s[`axis_${d}_show`]||d==="y2"&&!e.scale.y2)return;const m=d==="x"&&s.axis_rotated||d!=="x"&&!s.axis_rotated,S=S0(e,d),E=o.xForAxisLabel(d)+Kl(o.dxForAxisLabel(d),l),C=Kl(o.dyForAxisLabel(d),l),{x:w,y:N}=A0(S,E,C,m),z=o.textAnchorForAxisLabel(d);n.fillStyle=u[d]||i.labelColor,n.textAlign=f[z]||"center",r.text(String(h),w,N,{angle:m?-90:0})})})}drawGrid(e){const{ctx:n,painter:r,theme:{style:{grid:i}}}=this,{config:o,scale:s,state:{height:l,margin:c,width:u}}=e;if(!i.lineColor)return;const f=o.axis_rotated,d=c.left,h=c.left+u,m=c.top,S=c.top+l;r.withState(()=>{n.strokeStyle=i.lineColor,n.lineWidth=i.lineWidth,i.dashArray.length&&n.setLineDash(i.dashArray),o.grid_x_show&&s.x&&r.strokePath(()=>{for(const E of ts(e)){const C=Ql(e,E);pa(C)&&(f?r.traceCrispLine(d,c.top+C,h,c.top+C,i.lineWidth):r.traceCrispLine(c.left+C,m,c.left+C,S,i.lineWidth))}}),o.grid_y_show&&s.y&&r.strokePath(()=>{for(const E of s0(e)){const C=Xi(e,E),w=s.y(C);pa(w)&&(f?r.traceCrispLine(c.left+w,m,c.left+w,S,i.lineWidth):r.traceCrispLine(d,c.top+w,h,c.top+w,i.lineWidth))}}),!o.grid_lines_front&&this.drawGridLines(e)})}drawRegions(e){const{ctx:n,painter:r,theme:{style:{region:i}}}=this,{config:o,state:{height:s,margin:l,width:c}}=e,u=o.regions||[];u.length&&r.clipRect({x:l.left,y:l.top,w:c,h:s},()=>{var f;n.fillStyle=i.fill,n.font=i.labelFont,n.textBaseline="top";for(const d of u){const h=M0(e,d);if(!h||!pa(h.x)||!pa(h.y)||!h.w||!h.h)continue;const m=l.left+h.x,S=l.top+h.y,E=h.w,C=h.h;if(n.globalAlpha=Number.isFinite(d.opacity)?d.opacity:i.opacity,r.fillRect({x:m,y:S,w:E,h:C}),(f=d.label)!=null&&f.text){const w=d.label,N=w.center||"",z=String(w.text),$=r.measureText(z).width,G=parseFloat(n.font)||12;let V=m+(w.x||0),J=S+(w.y||0);N.indexOf("x")>-1&&(V+=(E-$)/2),N.indexOf("y")>-1&&(J+=(C-G)/2),r.text(z,V,J,{angle:w.rotated?-90:0,alpha:1,fill:w.color||i.labelColor})}}})}drawGridLines(e){const{ctx:n,painter:r,theme:{style:{axis:i,grid:o}}}=this,{config:s,scale:l,state:{height:c,margin:u,width:f}}=e,d=s.axis_rotated,h=u.left,m=u.left+f,S=u.top,E=u.top+c;o.lineColor&&r.withState(()=>{n.strokeStyle=o.lineColor,n.lineWidth=o.lineWidth,n.font=o.labelFont||i.labelFont,n.fillStyle=o.labelColor,n.textBaseline="middle",n.setLineDash([]);const C=(G,V,J,Q=!1,rt)=>{G&&r.text(G,V,J,ad(rd({},rt),{angle:Q?-90:0}))},w=(G,V,J)=>{const Q=x0(this.theme.getGridLineStyle(V,G,"line"));r.strokePath(J,Q)},N=(G,V)=>y0(this.theme.getGridLineStyle(G,V,"text")),z=G=>{if(G.value===void 0||!l.x)return;const V=Ql(e,G.value);if(pa(V))if(d){const J=u.top+V;w(G,"x",()=>{r.traceLine(h,J,m,J)}),n.textAlign=G.position==="start"?"left":G.position==="middle"?"center":"right",C(G.text,dd(G.position,h,m),J-5,!1,N("x",G))}else{const J=u.left+V;w(G,"x",()=>{r.traceLine(J,S,J,E)}),n.textAlign=G.position==="start"?"left":G.position==="middle"?"center":"right",C(G.text,J-5,hd(G.position,S,E),!0,N("x",G))}},$=G=>{const V=G.axis==="y2"?l.y2:l.y,J=G.axis==="y2"?"y2":"y";if(G.value===void 0||!V)return;const Q=Xi(e,G.value,J),rt=V(Q);if(pa(rt))if(d){const et=u.left+rt;w(G,"y",()=>{r.traceLine(et,S,et,E)}),n.textAlign=G.position==="start"?"left":G.position==="middle"?"center":"right",C(G.text,et-5,hd(G.position,S,E),!0,N("y",G))}else{const et=u.top+rt;w(G,"y",()=>{r.traceLine(h,et,m,et)}),n.textAlign=G.position==="start"?"left":G.position==="middle"?"center":"right",C(G.text,dd(G.position,h,m),et-5,!1,N("y",G))}};(s.grid_x_lines||[]).forEach(z),(s.grid_y_lines||[]).forEach($)})}drawAdditionalAxes(e){["x","y","y2"].forEach(n=>{const r=e.config[`axis_${n}_axes`]||[];!r.length||!e.scale[n]||!e.config[`axis_${n}_show`]||r.forEach((i,o)=>{var s;const l=r0(e,n,i);if(!l)return;const c={scale:l,ticks:a0(e,n,l,i),format:i0(e,i),index:o+1,outerTick:((s=i.tick)==null?void 0:s.outer)!==!1};n==="x"?this.drawXAxis(e,c):this.drawYAxis(e,n,c)})})}drawXAxis(e,n){var r;const{ctx:i,painter:o,theme:{style:{axis:s}}}=this,{axis:l,config:c,state:{current:u,margin:f,width:d,height:h}}=e,m=c.axis_rotated,S=n!=null&&n.index?e.getAxisSize("x")*n.index:0,E=(n==null?void 0:n.scale)||tr(e),C=o.crisp(f.left-(m?S:0),s.lineWidth),w=o.crisp(f.top+h+(m?0:S),s.lineWidth),N=f.left,z=f.left+d,$=f.top,G=f.top+h,V=m?$:N,J=m?G:z,Q=(n==null?void 0:n.ticks)||ts(e),rt=(n==null?void 0:n.ticks)||e0(e,Q,s.tickWidth),et=(n==null?void 0:n.format)||l.getXAxisTickFormat(),st=n?n.outerTick:c.axis_x_tick_outer,ct=m?c.axis_x_tick_inner?1:-1:c.axis_x_tick_inner?-1:1,dt=cd(m),q=Vl(m),ft=c.axis_x_tick_text_position,lt=m?0:((r=e.getAxisTickRotate)==null?void 0:r.call(e,"x"))||0;o.clipRect(m?Hl(f,u.width,h):jl(f,d,u.height),()=>{if(i.strokeStyle=s.lineColor,i.lineWidth=s.lineWidth,o.strokePath(()=>{m?o.traceLine(C,$,C,G):o.traceLine(N,w,z,w),st&&(m?(o.traceLine(C,$,C+Dt*dt,$),o.traceLine(C,G,C+Dt*dt,G)):(o.traceLine(N,w,N,w+Dt*dt),o.traceLine(z,w,z,w+Dt*dt)))}),i.font=ji(s,"x"),i.fillStyle=s.labelColor,i.textAlign=m?q>0?"left":"right":"center",i.textBaseline=m?"middle":q>0?"top":"bottom",i.strokeStyle=s.tickColor,i.lineWidth=s.tickWidth,c.axis_x_tick_show&&o.strokePath(()=>{for(const Ct of rt){const Kt=Ul(e,Ct,E),re=f.left+Kt,Ee=f.top+Kt;rs(m?Ee:re,V,J)&&(m?o.traceLine(C,Ee,C+Dt*ct,Ee):o.traceLine(re,w,re,w+Dt*ct))}}),!n&&!c.axis_x_tick_text_show)return;const pt=ji(s,"x"),Tt=Yl(o,Sr(pt)),Rt=Zl(e,Q,m,E);Q.forEach((Ct,Kt)=>{this.drawXAxisTickText(e,Ct,et,s.labelColor,{isRotated:m,rangeEnd:J,rangeStart:V,tickCount:Q.length,tickFont:pt,tickIndex:Kt,tickLineHeight:Tt,tickTextDirection:q,tickTextWidth:Rt,tickRotate:lt,tickTextPosition:ft,targetScale:E,ticks:Q,x:C,y:w})})})}drawFocusedXAxisTick(e,n){var r;const{painter:i,theme:{style:{axis:o}}}=this,{axis:s,config:l,state:{current:c,margin:u,width:f,height:d}}=e,h=(r=n==null?void 0:n[0])==null?void 0:r.x;if(h===void 0||!s||!l.axis_x_show||!l.axis_x_tick_text_show||!o.activeLabelColor||o.activeLabelColor===o.labelColor)return;const m=ts(e),S=m.findIndex(J=>Wi(J,h)),E=m[S];if(E===void 0)return;const C=l.axis_rotated,w=i.crisp(u.left,o.lineWidth),N=i.crisp(u.top+d,o.lineWidth),z=C?u.top:u.left,$=C?u.top+d:u.left+f,G=s.getXAxisTickFormat(),V=Vl(C);i.clipRect(C?Hl(u,c.width,d):jl(u,f,c.height),()=>{var J;this.drawXAxisTickText(e,E,G,o.activeLabelColor,{isRotated:C,rangeEnd:$,rangeStart:z,targetScale:tr(e),tickCount:m.length,tickIndex:S,tickTextDirection:V,tickRotate:C?0:((J=e.getAxisTickRotate)==null?void 0:J.call(e,"x"))||0,tickTextPosition:l.axis_x_tick_text_position,ticks:m,x:w,y:N})})}drawAxisTooltip(e,n){const{ctx:r,painter:i,theme:{style:{axis:o,grid:s}}}=this,{config:l,state:{margin:c,width:u,height:f}}=e;if(!l.axis_tooltip||!n)return;const d=l.axis_rotated,h=n[0]-c.left,m=n[1]-c.top,S=h>=0&&h<=u,E=m>=0&&m<=f;if(!S&&!E)return;const C=c.left+h,w=c.top+m,N=Sr(o.labelFont),z=N||10,$=(G,V,J,Q,rt)=>{const et=T0(e,G),st=et&&b0(e,G,V);if(!st)return;r.font=o.labelFont,r.textAlign=rt,r.textBaseline="alphabetic";const ct=r.measureText(st),dt=ct.width,q=ct.actualBoundingBoxAscent||z*.8,ft=ct.actualBoundingBoxDescent||z*.2,lt=Math.max(2,dt*.15),pt=Math.max(3,z*.25),Tt=rt==="right"?J-dt:rt==="center"?J-dt/2:J,Rt=Q-q;r.fillStyle=et,r.fillRect(Tt-lt,Rt-pt,dt+lt*2,q+ft+pt*2),r.fillStyle="#fff",r.fillText(st,J,Q)};i.withState(()=>{r.strokeStyle=s.lineColor,r.lineWidth=s.lineWidth,r.setLineDash([]),i.strokePath(()=>{S&&i.traceLine(C,c.top,C,c.top+f),E&&i.traceLine(c.left,w,c.left+u,w)}),r.setLineDash([]),d?(E&&l.axis_x_show&&$("x",m,c.left-N*.3,w+N*.4,"right"),S&&l.axis_y_show&&$("y",h,C-N*1.3,c.top+f+N*1.15,"left"),S&&l.axis_y2_show&&e.scale.y2&&$("y2",h,C-N*1.3,c.top-N*.4,"left")):(S&&l.axis_x_show&&$("x",h,C-N,c.top+f+N*1.15,"left"),E&&l.axis_y_show&&$("y",m,c.left-N*.4,w+N*.3,"right"),E&&l.axis_y2_show&&e.scale.y2&&$("y2",m,c.left+u+N*.4,w+N*.3,"left"))})}drawXAxisTickText(e,n,r,i,o){var s,l;const{ctx:c,painter:u,theme:{style:{axis:f}}}=this,{state:{margin:d}}=e,{isRotated:h,rangeEnd:m,rangeStart:S,tickTextDirection:E,tickRotate:C,tickTextPosition:w,targetScale:N,ticks:z,x:$,y:G}=o,V=Ql(e,n,N),J=d.left+V,Q=d.top+V;if(!rs(h?Q:J,S,m))return;const et=(s=o.tickFont)!=null?s:ji(f,"x");c.font=et,c.fillStyle=i;const st=ld(e,u,r,n,z,h,N,o.tickTextWidth),ct=(l=o.tickLineHeight)!=null?l:Yl(u,Sr(et));let dt,q;if(h)dt=$+(Dt+fn)*E+(w.x||0),q=Q+(w.y||0),c.textAlign=Jl(e,o),c.textBaseline="middle";else if(C){const ft=Sr(et),lt=w.y?Kl(w.y,ft):.71*ft,pt=C0(C)+(w.x||0),Tt=E0(C)+lt;c.textAlign=Jl(e,o),c.textBaseline="alphabetic",u.withState(Rt=>{Rt.translate(J,G),Rt.rotate(C*Math.PI/180),st.forEach((Ct,Kt)=>{Rt.fillText(Ct,pt,Tt+Kt*ct)})});return}else dt=J+(w.x||0),q=G+(Dt+fn)*E+(w.y||0),c.textAlign=Jl(e,o),c.textBaseline=E>0?"top":"bottom";u.withState(ft=>{ft.translate(dt,q),C&&ft.rotate(C*Math.PI/180),st.forEach((lt,pt)=>{ft.fillText(lt,0,pt*ct)})})}drawYAxis(e,n="y",r){var i,o,s,l,c,u,f,d;const{ctx:h,painter:m,theme:{style:{axis:S}}}=this,{config:E,scale:C,state:w}=e,{margin:N,width:z,height:$}=w,G=(r==null?void 0:r.margin)||N,V=(i=r==null?void 0:r.width)!=null?i:z,J=(o=r==null?void 0:r.height)!=null?o:$,Q=(r==null?void 0:r.prefix)||`axis_${n}`,rt=(r==null?void 0:r.scale)||C[n],et=n==="y2",st=E.axis_rotated,ct=r!=null&&r.index?e.getAxisSize(n)*r.index:0,dt=m.crisp(G.left+(et?V+(st?0:ct):-ct),S.lineWidth),q=m.crisp(G.top+(st?et?-ct-1:J+ct:0),S.lineWidth),ft=G.left,lt=G.left+V,pt=G.top,Tt=G.top+J,Rt=(r==null?void 0:r.ticks)||Vi(e,n),Ct=(r==null?void 0:r.ticks)||(E[`${Q}_tick_culling`]&&E[`${Q}_tick_culling_lines`]!==!1?Vi(e,n,void 0,!1):Rt),Kt=(r==null?void 0:r.format)||((c=(l=(s=e.axis)==null?void 0:s[n])==null?void 0:l.tickFormat)==null?void 0:c.call(l))||((u=E[`${Q}_tick_format`])==null?void 0:u.bind(e.api))||(Zt=>Zt),re=r?r.outerTick:E[`${Q}_tick_outer`],Ee=st?et?E.axis_y2_tick_inner?1:-1:E.axis_y_tick_inner?-1:1:et?E.axis_y2_tick_inner?-1:1:E.axis_y_tick_inner?1:-1,Ce=w0(E,st,et),be=p0(st,et),Ne=(r==null?void 0:r.tickTextPosition)||E[`${Q}_tick_text_position`]||E[`axis_${n}_tick_text_position`],ye=(f=r==null?void 0:r.tickShow)!=null?f:r?!0:E[`${Q}_tick_show`],De=(d=r==null?void 0:r.tickTextShow)!=null?d:r?!0:E[`${Q}_tick_text_show`];m.withState(()=>{h.strokeStyle=S.lineColor,h.lineWidth=S.lineWidth,m.strokePath(()=>{st?m.traceLine(ft,q,lt,q):m.traceLine(dt,pt,dt,Tt),re&&(st?(m.traceLine(ft,q,ft,q+Dt*Ce),m.traceLine(lt,q,lt,q+Dt*Ce)):(m.traceLine(dt,pt,dt+Dt*Ce,pt),m.traceLine(dt,Tt,dt+Dt*Ce,Tt)))});const Zt=ji(S,n);h.font=Zt,h.fillStyle=S.labelColor,h.textAlign=st?"center":be>0?"left":"right",h.textBaseline=st?be>0?"top":"bottom":"middle",h.strokeStyle=S.tickColor,h.lineWidth=S.tickWidth;const ve=[],xe=[],Vt=(je,We)=>{const xn=Xi(e,je,n),wn=G.left+rt(xn),Ae=G.top+rt(xn);pa(st?wn:Ae)&&We.push({tick:je,tx:wn,ty:Ae})};for(const je of Rt)Vt(je,ve);for(const je of Ct)Vt(je,xe);if(ye&&m.strokePath(()=>{for(const{tx:je,ty:We}of xe)st?m.traceLine(je,q,je,q+Dt*Ee):m.traceLine(dt,We,dt+Dt*Ee,We)}),De)for(const{tick:je,tx:We,ty:xn}of ve)st?m.text(sd(Kt,je),We+(Ne.x||0),q+Dt*be+(Ne.y||0)):m.text(sd(Kt,je),dt+(Dt+fn)*be+(Ne.x||0),xn+(Ne.y||0))})}}const hr={canvas:"bb-canvas",overlay:"bb-canvas-overlay",legend:"bb-canvas-legend",legendBottom:"bb-canvas-legend-bottom",legendInset:"bb-canvas-legend-inset",legendItemInteractive:"bb-legend-item-interactive",legendItemTileCircle:"bb-legend-item-tile-circle",legendItemTitle:"bb-legend-item-title",legendRight:"bb-canvas-legend-right"};var bw=hr,D0=Object.defineProperty,F0=(t,e,n)=>e in t?D0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ri=(t,e,n)=>F0(t,typeof e!="symbol"?e+"":e,n);class N0{constructor(){ri(this,"canvas"),ri(this,"ctx"),ri(this,"dpr",1),ri(this,"frame",null),ri(this,"frameCtx",null),ri(this,"frameValid",!1)}init(e,n,r){this.canvas=Ze.createElement("canvas"),this.canvas.className=hr.canvas,this.canvas.style.display="block",e.appendChild(this.canvas),this.dpr=fe.devicePixelRatio||1,this.ctx=this.canvas.getContext("2d"),this.resize(n,r)}resize(e,n){const r=Math.max(0,e),i=Math.max(0,n);this.dpr=fe.devicePixelRatio||1,this.canvas.width=r*this.dpr,this.canvas.height=i*this.dpr,this.canvas.style.width=`${r}px`,this.canvas.style.height=`${i}px`,this.ctx.setTransform(this.dpr,0,0,this.dpr,0,0),this.frame=null,this.frameCtx=null,this.frameValid=!1}clearOverlay(){this.frameValid&&this.restoreFrame()}withOverlay(e){const{ctx:n}=this;this.frameValid?this.clearOverlay():this.captureFrame(),n.save(),n.setTransform(this.dpr,0,0,this.dpr,0,0);try{e(n)}finally{n.restore()}}beginFrame(e,n){const{ctx:r}=this;this.frameValid=!1,r.save(),r.setTransform(this.dpr,0,0,this.dpr,0,0),r.clearRect(0,0,e,n)}endFrame(){this.ctx.restore()}captureFrame(){const{canvas:e}=this;if(this.frameValid=!1,e.width&&e.height){let{frame:n,frameCtx:r}=this;if(!n){const i=Ze.createElement("canvas");n=i,r=i.getContext("2d"),this.frame=n,this.frameCtx=r}if(!n||!r)return;r.setTransform(1,0,0,1,0,0),n.width!==e.width||n.height!==e.height?(n.width=e.width,n.height=e.height):r.clearRect(0,0,e.width,e.height),r.drawImage(e,0,0),this.frameValid=!0}}restoreFrame(){if(!this.frameValid||!this.frame||!this.frameCtx)return;const{canvas:e,ctx:n}=this;n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,e.width,e.height),n.drawImage(this.frame,0,0),n.restore(),n.setTransform(this.dpr,0,0,this.dpr,0,0)}destroy(){var e;(e=this.canvas)==null||e.remove(),this.frame=null,this.frameCtx=null,this.frameValid=!1}}function _l(t){const{config:e,state:n}=t;return!!(e.subchart_grid_focus_continuous&&e.subchart_grid_focus!==!1&&e.subchart_show&&e.subchart_brush_enabled===!1&&n.width2>0&&n.height2>0)}function gd(t,e){var n;const{config:r,scale:i,state:o}=t,s=i.zoom||i.x,l=i.subX;if(!s||!l)return null;const c=r.axis_rotated?o.height2:o.width2,u=r.axis_rotated?o.height:o.width,f=(n=l.invert)==null?void 0:n.call(l,e);let d=f==null?NaN:s(f);return!Number.isFinite(d)&&c>0&&(d=Math.max(0,Math.min(1,e/c))*u),Number.isFinite(d)?Math.max(0,Math.min(u,d)):null}const ql=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,vd=/([aAcChHlLmMqQsStTvVzZ])|([-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?)/g;function $0(t){const e=new Set;let n=-1,r=0,i=!1,o;for(vd.lastIndex=0;o=vd.exec(t);)if(o[1])i=o[1]==="a"||o[1]==="A",r=0;else if(n++,i){const s=r%7;(s===2||s===3||s===4)&&e.add(n),r++}return e}function B0(t,e){const n=$0(e),r=[],i=[];let o=0,s=-1,l=-1,c,u;const f=m=>{r[s]?r[s]+=m:r[++s]=m};ql.lastIndex=0;const d=ql,h=new RegExp(ql.source,"g");for(t+="",e+="";(c=d.exec(t))&&(u=h.exec(e));){if(l++,u.index>o&&f(e.slice(o,u.index)),c[0]===u[0])f(u[0]);else{const m=+c[0],S=+u[0],E=n.has(l);r[++s]=null,i.push({index:s,fn:E?C=>Math.round(m+(S-m)*C):C=>m+(S-m)*C})}o=h.lastIndex}if(o<e.length&&f(e.slice(o)),!i.length){const m=r.join("");return()=>m}return m=>{for(let S=0,E=i.length;S<E;S++){const{index:C,fn:w}=i[S];r[C]=String(w(m))}return r.join("")}}function as(t){const{bar_radius:e,bar_radius_ratio:n}=t.config;return le(e)&&e>0?()=>e:le(n)?r=>r*n:null}function tc(t){const{config:e,data:n}=t,r=new Set;if(!e.data_groups.length)return r;const i=t.orderTargets(t.filterTargetsToShow(n.targets.filter(t.isBarType,t)));for(const o of e.data_groups){const s=new Set(o),l=new Map,c=new Map;for(const u of i)if(s.has(u.id))for(const f of u.values)f.value===null||f.value===0||(f.value>0?l:c).set(f.index,u.id);for(const[u,f]of l)r.add(`${f}:${u}`);for(const[u,f]of c)r.add(`${f}:${u}`)}return r}function z0(t,e,n){return n?t?e?{tl:n,bl:n}:{tr:n,br:n}:e?{br:n,bl:n}:{tl:n,tr:n}:0}function U0(t,e,n,r){let i="";return n?r&&t[0]<e?i=`0 ${e-t[0]}px 0 0`:!r&&t[0]>e&&(i=`0 0 0 ${t[0]-e}px`):r&&t[1]>e?i=`${t[1]-e}px 0 0 0`:!r&&t[1]<e&&(i=`0 0 ${e-t[1]}px 0`),i?`inset(${i})`:null}function ec(t,e,n,r,i,o){const{config:s,state:l}=t,c=s.axis_rotated,u=+c,f=+!u,d=e.value<0,h=s[`axis_${t.axis.getId(e.id)}_inverted`],m=!h&&d||h&&!d,S=t.isGrouped(e.id),E=r&&S&&e.value!==0?l.hiddenTargetIds.has(e.id)&&o?o(e):i.has(`${e.id}:${e.index}`):!1,C=[n[0][u],n[0][f]];let w=0;if(r){const z=c?f:u,$=Math.abs(n[2][z]-n[0][z]);w=Math.max(0,!S||E?r($):0)}const N=c?n[1][u]+(m?w:-w):n[1][f]+(m?-w:w);return{radius:w,corners:z0(c,m,w),clipPath:w?U0(C,N,c,m):null,indexX:u,indexY:f,isNegative:m,pos:N}}const pd="2 2";function md(t,e,n){const r=t.axis.isTimeSeries(),i=(o,s)=>Tn(o)?s:r?Kn.call(t,o):o;return(n||[]).map(o=>{var s,l;return{start:i(o.start,(s=e[0])==null?void 0:s.x),end:i(o.end,(l=e[e.length-1])==null?void 0:l.x),style:o.style||{dasharray:pd}}})}function xd(t,e){for(let n=0,r;r=e[n];n++)if(r.start<t&&t<=r.end)return r.style;return!1}function k0(t){const e=String((t==null?void 0:t.dasharray)||pd).split(/[\s,]+/).map(Number).filter(Number.isFinite);return e.length?e:[2,2]}function G0(t,e,n,r,i){const o=t.config.axis_rotated,s=md(t,e,i),l=[];for(let c=1;c<e.length;c++){const u=e[c-1],f=e[c];if(!Xe(u.value)||!Xe(f.value)){l.push({isBreak:!0});continue}const d=xd(f.x,s),h=n(u.x),m=r(u.value),S=n(f.x),E=r(f.value);l.push({start:o?[m,h]:[h,m],end:o?[E,S]:[S,E],dash:d?k0(d):[]})}return l}function is(t,e){return t.config.axis_rotated?[e[1],e[0]]:[e[0],e[1]]}function yd(t,e,n=1){const r=e.map(h=>is(t,h)),i=r.map(([h])=>h),o=r.map(([,h])=>h),s=Math.min(...i),l=Math.min(...o),c=Math.max(...i)-s,u=Math.max(...o)-l,f=Math.max(n,c),d=Math.max(n,u);return{x:s-(f-c)/2,y:l-(d-u)/2,w:f,h:d}}function Hi(t,e){var n,r;const i=(n=t.isGrouped)!=null&&n.call(t,e.id)&&t.circleY?t.circleY(e,e.index):t.getYScaleById(e.id)(t.getBaseValue(e)),o=(r=t.xx(e))!=null?r:NaN;return t.config.axis_rotated?{x:i,y:o}:{x:o,y:i}}function X0(t,e,n){return{x:t.cx(e,n),y:t.cy(e,n)}}function W0(t,e){return{body:yd(t,[e[0],e[1]]),wickStart:is(t,[e[2][0],e[2][1]]),wickEnd:is(t,[e[2][0],e[2][2]])}}function ai(t,e,n,r=!1){if(e===n)return{x:0,y:0,w:t.state.width,h:0};const{scale:{x:i,y:o}}=t,s=i(e.x0),l=o(e.y0),c=i(e.x1)-s,u=o(e.y1)-l;return{x:s,y:l,w:r?Math.max(0,c):c,h:r?Math.max(0,u):u}}function V0(t,e,n,r){const{config:i}=t,{id:o,value:s,ratio:l=0}=e,c=i.treemap_label_format,u=typeof c=="function"?c.bind(t.api)(s,l,o,{width:n,height:r}):`${o}
36
- ${(l*100).toFixed(2)}%`;return u==null?null:String(u)}var Sw=Array.prototype.slice;function nc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function _e(t){return function(){return t}}function Td(t){this._context=t}Td.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function os(t){return new Td(t)}var j0=Math.pow;const rc=Math.PI,ac=2*rc,Na=1e-6,H0=ac-Na;function bd(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function Y0(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return bd;const n=j0(10,e);return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class ss{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?bd:Y0(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,s){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,l=this._y1,c=r-e,u=i-n,f=s-e,d=l-n,h=f*f+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>Na)if(!(Math.abs(d*c-u*f)>Na)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let m=r-s,S=i-l,E=c*c+u*u,C=m*m+S*S,w=Math.sqrt(E),N=Math.sqrt(h),z=o*Math.tan((rc-Math.acos((E+h-C)/(2*w*N)))/2),$=z/N,G=z/w;Math.abs($-1)>Na&&this._append`L${e+$*f},${n+$*d}`,this._append`A${o},${o},0,0,${+(d*m>f*S)},${this._x1=e+G*c},${this._y1=n+G*u}`}}arc(e,n,r,i,o,s){if(e=+e,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),c=r*Math.sin(i),u=e+l,f=n+c,d=1^s,h=s?i-o:o-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Na||Math.abs(this._y1-f)>Na)&&this._append`L${u},${f}`,r&&(h<0&&(h=h%ac+ac),h>H0?this._append`A${r},${r},0,1,${d},${e-l},${n-c}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:h>Na&&this._append`A${r},${r},0,${+(h>=rc)},${d},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function K0(){return new ss}K0.prototype=ss.prototype;function Aw(t=3){return new ss(+t)}function ic(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new ss(e)}function Sd(t){return t[0]}function Ad(t){return t[1]}function oc(t,e){var n=_e(!0),r=null,i=os,o=null,s=ic(l);t=typeof t=="function"?t:t===void 0?Sd:_e(t),e=typeof e=="function"?e:e===void 0?Ad:_e(e);function l(c){var u,f=(c=nc(c)).length,d,h=!1,m;for(r==null&&(o=i(m=s())),u=0;u<=f;++u)!(u<f&&n(d=c[u],u,c))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(d,u,c),+e(d,u,c));if(m)return o=null,m+""||null}return l.x=function(c){return arguments.length?(t=typeof c=="function"?c:_e(+c),l):t},l.y=function(c){return arguments.length?(e=typeof c=="function"?c:_e(+c),l):e},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:_e(!!c),l):n},l.curve=function(c){return arguments.length?(i=c,r!=null&&(o=i(r)),l):i},l.context=function(c){return arguments.length?(c==null?r=o=null:o=i(r=c),l):r},l}function Z0(t,e,n){var r=null,i=_e(!0),o=null,s=os,l=null,c=ic(u);t=typeof t=="function"?t:t===void 0?Sd:_e(+t),e=typeof e=="function"?e:_e(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?Ad:_e(+n);function u(d){var h,m,S,E=(d=nc(d)).length,C,w=!1,N,z=new Array(E),$=new Array(E);for(o==null&&(l=s(N=c())),h=0;h<=E;++h){if(!(h<E&&i(C=d[h],h,d))===w)if(w=!w)m=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),S=h-1;S>=m;--S)l.point(z[S],$[S]);l.lineEnd(),l.areaEnd()}w&&(z[h]=+t(C,h,d),$[h]=+e(C,h,d),l.point(r?+r(C,h,d):z[h],n?+n(C,h,d):$[h]))}if(N)return l=null,N+""||null}function f(){return oc().defined(i).curve(s).context(o)}return u.x=function(d){return arguments.length?(t=typeof d=="function"?d:_e(+d),r=null,u):t},u.x0=function(d){return arguments.length?(t=typeof d=="function"?d:_e(+d),u):t},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:_e(+d),u):r},u.y=function(d){return arguments.length?(e=typeof d=="function"?d:_e(+d),n=null,u):e},u.y0=function(d){return arguments.length?(e=typeof d=="function"?d:_e(+d),u):e},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:_e(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(t).y(e)},u.lineY1=function(){return f().x(t).y(n)},u.lineX1=function(){return f().x(r).y(e)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:_e(!!d),u):i},u.curve=function(d){return arguments.length?(s=d,o!=null&&(l=s(o)),u):s},u.context=function(d){return arguments.length?(d==null?o=l=null:l=s(o=d),u):o},u}var J0=Object.defineProperty,Q0=Object.defineProperties,_0=Object.getOwnPropertyDescriptors,Ed=Object.getOwnPropertySymbols,q0=Object.prototype.hasOwnProperty,tT=Object.prototype.propertyIsEnumerable,Cd=(t,e,n)=>e in t?J0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Id=(t,e)=>{for(var n in e||(e={}))q0.call(e,n)&&Cd(t,n,e[n]);if(Ed)for(var n of Ed(e))tT.call(e,n)&&Cd(t,n,e[n]);return t},Rd=(t,e)=>Q0(t,_0(e));function wd(t,e){return e?n=>{var r;const i=(r=t.getSubchartCandlestickShapeValue)==null?void 0:r.call(t,n,!0);return i===void 0?t.getBaseValue(n):i}:n=>t.getBaseValue(n)}function Od(t,e,n){return n?e.map(r=>{var i;const o=(i=t.getSubchartCandlestickShapeValue)==null?void 0:i.call(t,r,n);return o===void 0?r:Rd(Id({},r),{value:o})}):e}function eT(t,e,n){return t.isStepType(e)?t.convertValuesToStep(n):n}function Pd(t,e,n,r){const{config:i,scale:o}=t,s=i.line_connectNull,l=i.axis_rotated,c=t.generateGetLinePoints(e,n),u=t.getYScaleById.bind(t),f=wd(t,n),d=E=>(n?t.subxx:t.xx).call(t,E),h=(E,C)=>t.isGrouped(E.id)?c(E,C)[0][1]:u(E.id,n)(f(E));let m=oc();m=l?m.x(h).y(d):m.x(d).y(h),r&&(m=m.context(r)),s||(m=m.defined(E=>f(E)!==null));const S=n?o.subX:o.x;return E=>{const C=u(E.id,n);let w=s?t.filterRemoveNull(E.values):E.values,N=0,z=0,$;if(t.isLineType(E)){const G=i.data_regions[E.id];G&&!r&&t.lineWithRegions?(w=Od(t,w,n),t.isAreaRangeType(E)&&(w=w.map(V=>Rd(Id({},V),{value:t.getRangedData(V,"mid")}))),t.isStepType(E)&&(w=t.convertValuesToStep(w)),$=t.lineWithRegions(w,o.zoom||S,C,G)):$=m.curve(t.getCurve(E))(eT(t,E,w))}else w[0]&&(N=S(w[0].x),z=C(f(w[0]))),$=l?`M ${z} ${N}`:`M ${N} ${z}`;return $||(r?void 0:"M 0 0")}}function Md(t,e,n,r){const{config:i}=t,o=i.line_connectNull,s=i.axis_rotated,l=t.generateGetAreaPoints(e,n),c=t.getYScaleById.bind(t),u=wd(t,n),f=new Map,d=E=>{let C=f.get(E);return C===void 0&&(C=t.getShapeYMin(E,n),f.set(E,C)),C},h=E=>(n?t.subxx:t.xx).call(t,E),m=(E,C)=>t.isGrouped(E.id)?l(E,C)[0][1]:c(E.id,n)(t.isAreaRangeType(E)?t.getRangedData(E,"high"):d(E.id)),S=(E,C)=>t.isGrouped(E.id)?l(E,C)[1][1]:c(E.id,n)(t.isAreaRangeType(E)?t.getRangedData(E,"low"):u(E));return E=>{let C=o?t.filterRemoveNull(E.values):E.values,w=0,N=0,z;if(t.isAreaType(E)){let $=Z0();$=s?$.y(h).x0(m).x1(S):$.x(h).y0(i.area_above?0:i.area_below?n?t.state.height2:t.state.height:m).y1(S),r&&($=$.context(r)),o||($=$.defined(G=>u(G)!==null)),C=Od(t,C,n),t.isStepType(E)&&(C=t.convertValuesToStep(C)),z=$.curve(t.getCurve(E))(C)}else C[0]&&(w=(n?t.scale.subX:t.scale.x)(C[0].x),N=t.getYScaleById(E.id,n)(u(C[0]))),z=s?`M ${N} ${w}`:`M ${w} ${N}`;return z||(r?void 0:"M 0 0")}}let Qr;function ls(t,e){if(!le(e)||e>=1)return t;const n=t.match(/^#([\da-f]{3}|[\da-f]{6})$/i);if(n){const o=(n[1].length===3?n[1].split("").map(l=>l+l).join(""):n[1]).match(/.{2}/g);return o?`rgba(${o.map(l=>parseInt(l,16)).join(",")},${e})`:t}if(/^rgb\(/i.test(t))return t.replace(/^rgb\((.*)\)$/i,`rgba($1,${e})`);if(/^rgba\(/i.test(t))return t.replace(/^rgba\((.*),\s*([\d.]+)\)$/i,(i,o,s)=>`rgba(${o},${Number(s)*e})`);const r=nT(t);return r&&r!==t?ls(r,e):t}function nT(t){if(!fe.document||(Qr===void 0&&(Qr=fe.document.createElement("canvas").getContext("2d")),!Qr))return null;Qr.fillStyle="#000",Qr.fillStyle=t;const e=Qr.fillStyle;Qr.fillStyle="#fff",Qr.fillStyle=t;const n=Qr.fillStyle;return e===n?e:null}function Yi(t,e,n,r){const i=e(n,r),o=yd(t,i);return mn(o.x,o.y)&&mn(o.x+o.w,o.y+o.h)?{points:i,rect:o}:null}function Ki(t,e,n,r){const i=e(n,r),{body:o,wickStart:s,wickEnd:l}=W0(t,i);return mn(o.x,o.y)&&mn(o.x+o.w,o.y+o.h)&&mn(s[0],s[1])&&mn(l[0],l[1])?{body:o,points:i,wickStart:s,wickEnd:l}:null}const rT=1.2;function sc(t,e){var n,r,i;let{value:o}=e;if((n=t.isBubbleZType)!=null&&n.call(t,e))o=t.getBubbleZData(o,"z");else if((r=t.isCandlestickType)!=null&&r.call(t,e)){const s=(i=t.getCandlestickData)==null?void 0:i.call(t,e);s&&(o=s.close)}return o}function Ld(t,e){const n=t.dataLabelFormat(e.id)(sc(t,e),e.id,e.index,[]);return n==null?null:String(n)}function Dd(t){return`${t.id}:${t.index}`}function lc(t,e,n){var r;if(!(e!=null&&e.length))return()=>!1;if(t.config.tooltip_grouped&&e.length>1){const o=(r=e[0])==null?void 0:r.index;return s=>o!==void 0&&s.index===o&&n(t,s)}const i=new Set(e.filter(o=>o&&n(t,o)).map(Dd));return o=>i.has(Dd(o))}function cs(t,e,n,r){const i=t.config.data_labels_position;let o;if(ue(i))o=i.bind(t.api)(n,sc(t,e),e.id,e.index,r);else if(i){const s=e.id in i?i[e.id]:i;o=s==null?void 0:s[n]}return le(o)?o:0}function aT(t,e){var n,r;const i=(n=t.config.data_labels)==null?void 0:n.image;if(ue(i))return(r=i.call(t.api,sc(t,e),e.id,e.index))!=null?r:null;if(i){const{url:o="",width:s=0,height:l=0,pos:c}=i;return{url:o,width:s,height:l,pos:c}}return null}function iT(t,e){return Da(t.url,{ID:e.id})}function oT(t,e,n,r,i,o){var s,l,c;const{width:u=0,height:f=0,pos:d}=e,h=u/2,m=f/2,S=cc(t.canvasEngine.ctx,n,r,i).h,E=Sr(t.canvasEngine.ctx.font),C=r-h,w=i-m-((s=t.isTreemapType)!=null&&s.call(t,o)?E*.7:S/2);let N=r,z=i;return t.config.axis_rotated?N+=h:z+=m,{x:C+((l=d==null?void 0:d.x)!=null?l:0),y:w+((c=d==null?void 0:d.y)!=null?c:0),textX:N,textY:z}}function Fd(t,e,n){var r,i,o;const s=(r=t.updateTextColor)==null?void 0:r.call(t,e);return typeof s=="string"?s:(i=t.isTreemapType)!=null&&i.call(t,e)?n:((o=t.color)==null?void 0:o.call(t,e))||n}function sT(t,e){var n;const r=t.config.data_labels_backgroundColors;if(!r)return null;if(Ye(r))return r;if(ue(r)){const o=(n=t.color)==null?void 0:n.call(t,e),s=r.bind(t.api)(o,e);return s==null?null:String(s)}const i=r[e.id];return i==null?null:String(i)}function lT(t){var e,n,r;if(!t)return null;const i=Ke(t)?t:{};return{padding:Uf((e=i.padding)!=null?e:"3 5"),radius:le(i.radius)?i.radius:10,stroke:(n=i.stroke)!=null?n:"#000",strokeWidth:le(i.strokeWidth)?i.strokeWidth:1,fill:(r=i.fill)!=null?r:"none"}}function cc(t,e,n,r,i={top:0,right:0,bottom:0,left:0}){var o,s;const l=e.split(`
37
- `),c=l.map(w=>t.measureText(w)),u=Math.max(...c.map(w=>w.width),0),f=Sr(t.font),d=f*rT,h=c[0]?(c[0].fontBoundingBoxAscent||0)+(c[0].fontBoundingBoxDescent||0):0,m=c[0]&&(c[0].fontBoundingBoxDescent||c[0].actualBoundingBoxDescent)||0,S=l.length>1?d*l.length:Math.max(f,h,((o=c[0])==null?void 0:o.actualBoundingBoxAscent)+((s=c[0])==null?void 0:s.actualBoundingBoxDescent)||0);let E=n,C=r;return t.textAlign==="center"?E-=u/2:(t.textAlign==="right"||t.textAlign==="end")&&(E-=u),t.textBaseline==="middle"?C-=S/2:t.textBaseline==="alphabetic"?C-=S-m:(t.textBaseline==="bottom"||t.textBaseline==="ideographic")&&(C-=S),{x:E-i.left,y:C-i.top,w:u+i.left+i.right,h:S+i.top+i.bottom}}function Nd(t,e,n,r,i,o){var s,l;const c=e.context,u=sT(t,n),f=lT((s=t.config.data_labels)==null?void 0:s.border),d=(l=f==null?void 0:f.padding)!=null?l:{top:0,right:0,bottom:0,left:0},h=cc(c,r,i,o,d),m=t.config.data_labels.rotate;e.withState(S=>{var E;m&&(S.translate(i,o),S.rotate(m*Math.PI/180),h.x-=i,h.y-=o),u&&e.fillRoundRect(h,(E=f==null?void 0:f.radius)!=null?E:0,{fill:u}),f&&(f.fill!=="none"&&e.fillRoundRect(h,f.radius,{fill:f.fill}),e.strokeRoundRect(h,f.radius,{stroke:f.stroke,lineWidth:f.strokeWidth}))})}function cT(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function uT(t){return t==="start"?"left":t==="end"?"right":"center"}function fT(t,e,n,r){var i,o,s;const l=cT(t.config.data_labels.rotate),c=t.config.axis_rotated,u=t.config[`axis_${(i=t.axis)==null?void 0:i.getId(e.id)}_inverted`],f=Zn(t,e),{value:d}=e,h=le(d)&&d<0||f&&!((s=(o=t.getCandlestickData)==null?void 0:o.call(t,e))!=null&&s._isUp),m=4,S=m*2;return c?l==="start"?(n+=h?0:S,r+=m):l==="middle"?(n+=S,r-=S):l==="end"&&(h&&(n-=S),r+=m):(l==="start"?(n+=m,h&&(r+=S*2)):l==="middle"?r-=S:l==="end"&&(n-=m,h&&(r+=S*2)),u&&(r+=h?-17:f?13:7)),{x:n,y:r,textAlign:uT(l)}}function $d(t,e,n,r,i){var o;if(t.config.axis_rotated)r+=6,e.textAlign="left",e.textBaseline="middle";else if(va(t,n))e.textAlign="center",e.textBaseline="middle";else{const{config:s,state:l}=t,c=s[`axis_${(o=t.axis)==null?void 0:o.getId(n.id)}_inverted`],u=n.value<0||n.value===0&&!l.hasPositiveValue&&l.hasNegativeValue;let f=3;le(s.point_r)&&s.point_r>5&&(ni(t,n)||ga(t,n))&&(f+=s.point_r/2.3),e.textAlign="center",(c?!u:u)?(i+=f,e.textBaseline="top"):(i-=f*2,e.textBaseline="bottom")}return{x:r,y:i}}var dT=Object.defineProperty,Bd=Object.getOwnPropertySymbols,hT=Object.prototype.hasOwnProperty,gT=Object.prototype.propertyIsEnumerable,zd=(t,e,n)=>e in t?dT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_r=(t,e)=>{for(var n in e||(e={}))hT.call(e,n)&&zd(t,n,e[n]);if(Bd)for(var n of Bd(e))gT.call(e,n)&&zd(t,n,e[n]);return t};const Ud={x:0,y:0,w:8,h:8},uc=new Map,kd=[1,0,0,1,0,0];function vT(t){return t==="circle"||t==="rectangle"}function $n(t,e,n=0){const r=t.getAttribute(e),i=r===null?NaN:parseFloat(r);return Number.isFinite(i)?i:n}function pT(t){const e=(t.match(/[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi)||[]).map(Number).filter(Number.isFinite),n=[];for(let r=0;r<e.length-1;r+=2)n.push([e[r],e[r+1]]);return n}function mT(t){const e=(t==null?void 0:t.trim().split(/[\s,]+/).map(Number).filter(Number.isFinite))||[];return e.length===4?{x:e[0],y:e[1],w:e[2],h:e[3]}:null}function Gd(t){const e=t.map(([o])=>o),n=t.map(([,o])=>o),r=Math.min(...e),i=Math.min(...n);return{x:r,y:i,w:Math.max(...e)-r,h:Math.max(...n)-i}}function xT(t){const e=t.filter(s=>Number.isFinite(s.x)&&Number.isFinite(s.y)&&Number.isFinite(s.w)&&Number.isFinite(s.h));if(!e.length)return _r({},Ud);const n=Math.min(...e.map(s=>s.x)),r=Math.min(...e.map(s=>s.y)),i=Math.max(...e.map(s=>s.x+s.w)),o=Math.max(...e.map(s=>s.y+s.h));return{x:n,y:r,w:i-n,h:o-r}}function Zi(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}function yT(t){let e=[...kd];return((t==null?void 0:t.match(/[a-z]+\([^)]*\)/gi))||[]).forEach(n=>{var r;const[,i,o]=n.match(/^([a-z]+)\(([^)]*)\)$/i)||[],s=i==null?void 0:i.toLowerCase(),l=((o==null?void 0:o.match(/[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi))||[]).map(Number).filter(Number.isFinite);let c=null;if(s==="matrix"&&l.length>=6)c=l.slice(0,6);else if(s==="translate"&&l.length)c=[1,0,0,1,l[0],l[1]||0];else if(s==="scale"&&l.length)c=[l[0],0,0,(r=l[1])!=null?r:l[0],0,0];else if(s==="rotate"&&l.length){const u=l[0]*Math.PI/180,f=Math.cos(u),d=Math.sin(u),h=[f,d,-d,f,0,0];c=l.length>=3?Zi(Zi([1,0,0,1,l[1],l[2]],h),[1,0,0,1,-l[1],-l[2]]):h}else s==="skewx"&&l.length?c=[1,0,Math.tan(l[0]*Math.PI/180),1,0,0]:s==="skewy"&&l.length&&(c=[1,Math.tan(l[0]*Math.PI/180),0,1,0,0]);c&&(e=Zi(e,c))}),e}function ma(t,e){const n=t.getAttribute("style"),r=t.getAttribute(e),i=n==null?void 0:n.match(new RegExp(`(?:^|;)\\s*${e}\\s*:\\s*([^;]+)`,"i"));return((i==null?void 0:i[1])||r||"").trim()||null}function TT(t,e){const n=_r({},e),r=ma(t,"fill"),i=ma(t,"stroke"),o=ma(t,"stroke-width"),s=ma(t,"opacity"),l=ma(t,"fill-opacity"),c=ma(t,"stroke-opacity");if(r&&(n.fill=r==="none"?null:r),i&&(n.stroke=i==="none"?null:i),o){const u=parseFloat(o);Number.isFinite(u)&&(n.lineWidth=u)}return[s,l,c].forEach(u=>{var f;const d=u===null?NaN:parseFloat(u);Number.isFinite(d)&&(n.alpha=((f=n.alpha)!=null?f:1)*d)}),n}function bT(t){const e=new Map;return Array.from(t.querySelectorAll("[id]")).forEach(n=>{const r=n.getAttribute("id");r&&e.set(r,n)}),e}function Mr(t,e){const n=t==null?void 0:t.trim();return n?/%$/.test(n)?n:parseFloat(n):e}function Lr(t,e,n,r){if(typeof t=="number")return Number.isFinite(t)?t:r;if(typeof t=="string"&&/%$/.test(t)){const o=parseFloat(t);return Number.isFinite(o)?e+n*o/100:r}const i=parseFloat(t!=null?t:"");return Number.isFinite(i)?i:r}function ST(t){const e=(t==null?void 0:t.trim())||"0",n=parseFloat(e),r=/%$/.test(e)?n/100:n;return Math.max(0,Math.min(1,Number.isFinite(r)?r:0))}function AT(t){return Array.from(t.children||[]).filter(e=>e.tagName.toLowerCase()==="stop").map(e=>{const n=ma(e,"stop-color")||"#000",r=ma(e,"stop-opacity"),i=r===null?NaN:parseFloat(r);return{offset:ST(e.getAttribute("offset")),color:n,opacity:Number.isFinite(i)?i:void 0}})}function ET(t){const e=new Map;return t.forEach((n,r)=>{const i=n.tagName.toLowerCase(),o=AT(n);o.length&&(i==="lineargradient"?e.set(r,{type:"linearGradient",x1:Mr(n.getAttribute("x1"),"0%"),y1:Mr(n.getAttribute("y1"),"0%"),x2:Mr(n.getAttribute("x2"),"100%"),y2:Mr(n.getAttribute("y2"),"0%"),stops:o}):i==="radialgradient"&&e.set(r,{type:"radialGradient",cx:Mr(n.getAttribute("cx"),"50%"),cy:Mr(n.getAttribute("cy"),"50%"),r:Mr(n.getAttribute("r"),"50%"),fx:Mr(n.getAttribute("fx"),"50%"),fy:Mr(n.getAttribute("fy"),"50%"),fr:Mr(n.getAttribute("fr"),0),stops:o}))}),e}function fc(t,e,n,r=kd,i={},o=new Set){const s=t.tagName.toLowerCase(),l=Array.from(t.children||[]),c=TT(t,i),u=Zi(r,yT(t.getAttribute("transform"))),f={matrix:u,style:c};if(s==="defs")return[];if(s==="svg"||s==="g"||s==="symbol")return l.reduce((d,h)=>d.concat(fc(h,e,n,u,c,o)),[]);if(s==="use"){const d=t.getAttribute("href")||t.getAttribute("xlink:href")||"",h=d.charAt(0)==="#"?d.slice(1):"",m=h&&n.get(h);if(!m||o.has(h))return[];const S=$n(t,"x",0),E=$n(t,"y",0),C=Zi(u,[1,0,0,1,S,E]);o.add(h);const w=fc(m,e,n,C,c,o);return o.delete(h),w}if(s==="polygon"||s==="polyline"){const d=pT(t.getAttribute("points")||"");return d.length?[_r({type:s,points:d,box:Gd(d)},f)]:[]}if(s==="circle"){const d=$n(t,"cx",0),h=$n(t,"cy",0),m=$n(t,"r",0);return m>0?[_r({type:"circle",cx:d,cy:h,r:m,box:{x:d-m,y:h-m,w:m*2,h:m*2}},f)]:[]}if(s==="ellipse"){const d=$n(t,"cx",0),h=$n(t,"cy",0),m=$n(t,"rx",0),S=$n(t,"ry",0);return m>0&&S>0?[_r({type:"ellipse",cx:d,cy:h,rx:m,ry:S,box:{x:d-m,y:h-S,w:m*2,h:S*2}},f)]:[]}if(s==="rect"){const d=$n(t,"x",0),h=$n(t,"y",0),m=$n(t,"width",0),S=$n(t,"height",0);return m>0&&S>0?[_r({type:"rect",x:d,y:h,w:m,h:S,box:{x:d,y:h,w:m,h:S}},f)]:[]}if(s==="line"){const d=$n(t,"x1",0),h=$n(t,"y1",0),m=$n(t,"x2",0),S=$n(t,"y2",0);return[_r({type:"line",x1:d,y1:h,x2:m,y2:S,box:Gd([[d,h],[m,S]])},f)]}if(s==="path"){const d=t.getAttribute("d")||"";return d?[_r({type:"path",d,box:e},f)]:[]}return[]}function CT(t){if(!/^</.test(t))return null;if(uc.has(t))return uc.get(t)||null;let e=null;try{const r=new fe.DOMParser().parseFromString(Yr(t),"image/svg+xml").documentElement,i=mT(r.getAttribute("viewBox"))||Ud,o=bT(r),s=fc(r,i,o);s.length&&(e={shapes:s,box:r.tagName.toLowerCase()==="svg"?i:xT(s.map(l=>l.box)),paints:ET(o)})}catch(n){e=null}return uc.set(t,e),e}function IT(t,e){if(e.type==="polygon"||e.type==="polyline"){const[n,...r]=e.points;t.moveTo(n[0],n[1]),r.forEach(([i,o])=>t.lineTo(i,o)),e.type==="polygon"&&t.closePath()}else e.type==="circle"?(t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,Math.PI*2)):e.type==="ellipse"?(t.moveTo(e.cx+e.rx,e.cy),t.ellipse(e.cx,e.cy,e.rx,e.ry,0,0,Math.PI*2)):e.type==="rect"?t.rect(e.x,e.y,e.w,e.h):e.type==="line"&&(t.moveTo(e.x1,e.y1),t.lineTo(e.x2,e.y2))}function us(t){const e=t==null?void 0:t.match(/^url\(#([^)]+)\)$/);return(e==null?void 0:e[1])||null}function Xd(t,e,n){const{x:r,y:i,w:o,h:s}=n,l=e.type==="linearGradient"?t.createLinearGradient(Lr(e.x1,r,o,r),Lr(e.y1,i,s,i),Lr(e.x2,r,o,r+o),Lr(e.y2,i,s,i)):t.createRadialGradient(Lr(e.fx,r,o,r+o/2),Lr(e.fy,i,s,i+s/2),Lr(e.fr,r,Math.max(o,s),0),Lr(e.cx,r,o,r+o/2),Lr(e.cy,i,s,i+s/2),Math.max(.01,Lr(e.r,0,Math.max(o,s),Math.max(o,s)/2)));return e.stops.forEach(({offset:c,color:u,opacity:f})=>{l.addColorStop(c,f===void 0?u:ls(u,f))}),l}function RT(t,e,n,r,i){const o=_r({},e||{});if(n.fill!==void 0)if(n.fill===null)delete o.fill;else if(us(n.fill)){const s=r.get(us(n.fill));s&&(o.fill=Xd(t,s,i))}else/^url\(/.test(n.fill)||(o.fill=n.fill);if(n.stroke!==void 0)if(n.stroke===null)delete o.stroke;else if(us(n.stroke)){const s=r.get(us(n.stroke));s&&(o.stroke=Xd(t,s,i))}else/^url\(/.test(n.stroke)||(o.stroke=n.stroke);return n.lineWidth!==void 0&&(o.lineWidth=n.lineWidth),{style:o,shouldFill:n.fill!==null&&(!o.stroke||o.fill!==void 0),shouldStroke:n.stroke!==null&&o.stroke!==void 0,alpha:n.alpha}}function Ji(t,e,n,r,i,o,s=i){if(vT(e)){t.point(e,n,r,i,o);return}const l=CT(e);if(!l||i<=0){t.point("circle",n,r,i,o);return}t.withState(c=>{const{box:u,paints:f,shapes:d}=l,h=s>0?i/s:1,m=S=>{const{style:E,shouldFill:C,shouldStroke:w,alpha:N}=RT(c,o,S.style,f,u);if(c.save(),t.applyStyle(E),N!==void 0&&(c.globalAlpha*=N),c.transform(...S.matrix),c.beginPath(),S.type==="path"){if(fe.Path2D){const z=S.path2D||(S.path2D=new fe.Path2D(S.d));C&&c.fill(z),w&&c.stroke(z)}}else IT(c,S),C&&c.fill(),w&&c.stroke();c.restore()};c.translate(n-(u.x+u.w/2)*h,r-(u.y+u.h/2)*h),c.scale(h,h),d.forEach(m)})}var wT=Object.defineProperty,OT=Object.defineProperties,PT=Object.getOwnPropertyDescriptors,Wd=Object.getOwnPropertySymbols,MT=Object.prototype.hasOwnProperty,LT=Object.prototype.propertyIsEnumerable,dc=(t,e,n)=>e in t?wT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vd=(t,e)=>{for(var n in e||(e={}))MT.call(e,n)&&dc(t,n,e[n]);if(Wd)for(var n of Wd(e))LT.call(e,n)&&dc(t,n,e[n]);return t},jd=(t,e)=>OT(t,PT(e)),ii=(t,e,n)=>dc(t,typeof e!="symbol"?e+"":e,n);const DT=[Gi,or,Ar,Zn],FT=1e3,Hd=new WeakMap,Yd=new Map;function Kd(t,e){if(!e||e==="none")return;const n=e.match(/^matrix\(([^)]+)\)$/),r=e.match(/^matrix3d\(([^)]+)\)$/);if(n){const i=n[1].split(",").map(o=>Number(o.trim()));i.length===6&&i.every(Number.isFinite)&&t.transform(i[0],i[1],i[2],i[3],i[4],i[5])}else if(r){const i=r[1].split(",").map(o=>Number(o.trim()));i.length===16&&i.every(Number.isFinite)&&t.transform(i[0],i[1],i[4],i[5],i[12],i[13])}}function NT(t,e,n){const r=t.naturalWidth||t.width,i=t.naturalHeight||t.height;if(!r||!i||!e||!n)return{x:0,y:0,w:e,h:n};const o=Math.min(e/r,n/i),s=r*o,l=i*o;return{x:(e-s)/2,y:(n-l)/2,w:s,h:l}}function $T(t){const{state:e}=t;return e.hasFunnel||e.hasTreemap?{x:0,y:0}:{x:qa(e.margin.left),y:qa(e.margin.top)}}function Zd(t,e,n,r,i=!1){r.strokePath(o=>{Pd(t,n,i,o)(e)},{lineDash:[]})}function Jd(t,e,n,r,i=!1){r.fillPath(o=>{Md(t,n,i,o)(e)})}function Qd(t,e){const n=Zr(t,e);return n.start===0&&n.end===e.values.length?e:jd(Vd({},e),{values:e.values.slice(n.start,n.end)})}function hc(t,e){if(!(t!=null&&t.length)||!(e!=null&&e.id))return null;let n=Hd.get(t);if(!n){n=new Map;for(const r of t){if(!(r!=null&&r.id))continue;const i=`${r.id}:*`;n.has(i)||n.set(i,r),"index"in r&&n.set(`${r.id}:${r.index}`,r)}Hd.set(t,n)}return"index"in e?n.get(`${e.id}:${e.index}`)||null:n.get(`${e.id}:*`)||null}function BT(t,e){const n=fe.Path2D;if(!n)return null;const r=`${t}:${e}`,i=Yd.get(r);if(i)return i;const o=new n(Mi[t][e]);return Yd.set(r,o),o}function Qi(t,e){const n=t.config.color_onover;return!n||!e?null:Ke(n)?e.id in n?n[e.id]:null:Ye(n)?n:ue(n)?n.call(t.api,e):null}function zT(t,e,n){const r=hc(n,e);return Qi(t,r)||t.color(e.id)}function _d(t){var e;return(t==null?void 0:t.id)||((e=t==null?void 0:t.data)==null?void 0:e.id)}function qd(t,e){var n;const r=_d(e);return!!r&&((n=t.state.focusedTargetIds)==null?void 0:n.has(r))}function Dr(t,e){var n;const r=_d(e);return r&&((n=t.state.defocusedTargetIds)!=null&&n.has(r))?t.canvasTheme.style.shape.targetDefocusedOpacity:1}function UT(t,e,n,r=!1){var i;const o=(i=t.generateGetAreaPoints)==null?void 0:i.call(t,n,r);if(!o)return null;const s=Zr(t,e);let l=1/0,c=1/0,u=-1/0,f=-1/0;for(let d=s.start;d<s.end;d++){const h=e.values[d];In(t,h)&&o(h,d).forEach(([m,S])=>{mn(m,S)&&(l=Math.min(l,m),c=Math.min(c,S),u=Math.max(u,m),f=Math.max(f,S))})}return Number.isFinite(l)&&Number.isFinite(c)?{x:l,y:c,w:u-l,h:f-c}:null}function fs(t,e,n){return e+n*(le(t)?t:0)}function th(t,e,n,r,i,o){const s=t.config[`${r}_linearGradient`];if(!s||!i||!i.w||!i.h)return o;const l=t.config.axis_rotated,c=typeof s=="object"?s:{},u=c.x||(l?[1,0]:[0,0]),f=c.y||(l?[0,0]:[0,1]),d=Array.isArray(c.stops)?c.stops:[[0,o,1],[1,o,0]],h=e.createLinearGradient(fs(u[0],i.x,i.w),fs(f[0],i.y,i.h),fs(u[1],i.x,i.w),fs(f[1],i.y,i.h));return d.forEach(([m,S,E])=>{const C=ue(S)?S.call(t.api,n.id):S,w=String(C||o),N=Number(m),z=Number.isFinite(N)?Math.max(0,Math.min(1,N)):0;h.addColorStop(z,ls(w,E))}),h}function qr(t,e){return ei(t,e,DT)}function ds(t,e){const n=t.config.point_opacity;return Number.isFinite(n)?n:ga(t,e)||va(t,e)?.5:1}function _i(t,e,n){var r,i;const o=t.config.point_r;return va(t,e)||ue(o)?(i=(r=t.pointR)==null?void 0:r.call(t,n))!=null?i:2.5:o}function kT(t,e,n,r){return!r&&n==="circle"&&ga(t,e)&&!ue(t.config.point_r)&&e.values.length>Wf}function GT(t,e){const{bar_connectLine:n}=t.config,r=Ke(n)?n[e]:n;return/^(start|end)-(start|end)$/.test(r)?r:null}function XT(t,e,n){const{indexX:r,indexY:i,pos:o}=n;return t.config.axis_rotated?{x:e[0][r],y:e[0][i],width:e[0][r]-o,height:e[2][i]-e[0][i]}:{x:e[0][r],y:o,width:e[2][r]-e[0][r],height:e[3][i]-o}}function WT(t,e,n,r,i=1){if(r.length<2)return;const o=t.config.axis_rotated,s=/^start-(start|end)$/.test(n),l=/^end-(start|end)$/.test(n),c=/\w+-end$/.test(n),u=/\w+-start$/.test(n),f=m=>({x:o?l?m.x-m.width:m.x:m.x+m.width,y:o||s?m.y+m.height:m.y}),d=m=>({x:o?m.x-(c?m.width:0):m.x,y:o?m.y:m.y+(u?m.height:0)});let h=f(r[0]);e.strokePath(()=>{for(let m=1;m<r.length;m++){const S=d(r[m]);e.traceLine(h.x,h.y,S.x,S.y),m<r.length-1&&(h=f(r[m]))}},{alpha:i,stroke:t.canvasTheme.style.shape.barConnectLineColor,lineWidth:t.canvasTheme.style.shape.barConnectLineWidth,lineDash:[]})}function gc(t,e){var n;const{config:r}=t;if(va(t,e))return"circle";const i=((n=t.mapToIds)==null?void 0:n.call(t,t.data.targets))||[],o=Array.isArray(r.point_pattern)&&r.point_pattern.length?r.point_pattern:[r.point_type],s=Math.max(0,i.indexOf(e.id)),l=o[s%o.length];return/^rect(angle)?$/i.test(l)||l==="rectangle"?"rectangle":l||"circle"}function VT(t,e,n,r,i,o,s){const l=t.config.point_radialGradient;if(!l||!o)return s;const c=Ke(l)?l:{},u=le(c.cx)?c.cx:.3,f=le(c.cy)?c.cy:.3,d=le(c.r)?c.r:.7,h=Array.isArray(c.stops)?c.stops:[[.1,null,1],[.9,null,0]],m=r+(u-.5)*o*2,S=i+(f-.5)*o*2,E=e.createRadialGradient(m,S,0,m,S,Math.max(1,o*d*2));return h.forEach(([C,w,N])=>{let z=ue(w)?w.bind(t.api)(n.id):w;z||(z=s);const $=Number(C),G=Number.isFinite($)?Math.max(0,Math.min(1,$)):0;E.addColorStop(G,ls(z,N))}),E}function eh(t,e,n){const r=t.config.candlestick_color_down;return(n!=null&&n._isUp?t.color(e):r&&typeof r=="object"?r[e.id]:r)||t.color(e)}function jT(t,e){return t.shouldDrawPointsForLine?t.shouldDrawPointsForLine(e):!0}function HT(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])}function YT(t,e,n){const{config:r,scale:i}=t,o=i.zoom||i.x,s=t.getYScaleById(e.id),l=r.line_connectNull?t.filterRemoveNull(e.values):e.values;let c=t.isAreaRangeType(e)?l.map(S=>jd(Vd({},S),{value:t.getRangedData(S,"mid")})):l;t.isStepType(e)&&(c=t.convertValuesToStep(c));const u=G0(t,c,o,s,r.data_regions[e.id]);let f=null,d=[];const h=()=>{if(d.length<2||!f){d=[];return}n.strokePath(S=>{const[E,...C]=d;S.moveTo(E[0],E[1]),C.forEach(w=>{S.lineTo(w[0],w[1])})},{lineDash:f}),d=[]},m=(S,E,C)=>{!f||!HT(f,C)?(h(),f=C,d=[S,E]):d.push(E)};for(const{start:S,end:E,dash:C,isBreak:w}of u){if(w||!S||!E||!C){h(),f=null;continue}if(!mn(S[0],S[1])||!mn(E[0],E[1])){h(),f=null;continue}m(S,E,C)}h()}class KT{constructor(e,n){ii(this,"engine",e),ii(this,"theme",n),ii(this,"painter"),ii(this,"labelImageCache",new Map),ii(this,"backgroundImageCache",new Map),ii(this,"backgroundClassStyleCache",new Map),this.painter=new ed(e.ctx)}get ctx(){return this.painter.context}withContext(e,n){this.painter.withContext(e,n)}destroy(){const e=n=>{n.image.onload=null,n.image.onerror=null};this.labelImageCache.forEach(e),this.backgroundImageCache.forEach(e),this.labelImageCache.clear(),this.backgroundImageCache.clear(),this.backgroundClassStyleCache.clear()}getLabelImage(e,n){if(!e||!fe.Image)return null;let r=this.labelImageCache.get(e);if(!r){const i={image:new fe.Image,loaded:!1,loading:!0};r=i,this.labelImageCache.set(e,r),i.image.onload=()=>{var o;i.loaded=!0,i.loading=!1,(o=n.redraw)==null||o.call(n)},i.image.onerror=()=>{i.loaded=!1,i.loading=!1},i.image.src=e}return r}getBackgroundImage(e,n){if(!e||!fe.Image)return null;let r=this.backgroundImageCache.get(e);if(!r){const i={image:new fe.Image,loaded:!1,loading:!0};r=i,this.backgroundImageCache.set(e,r),i.image.onload=()=>{var o;i.loaded=!0,i.loading=!1,(o=n.renderCanvasFrame)==null||o.call(n,void 0,null,!1)},i.image.onerror=()=>{i.loaded=!1,i.loading=!1},i.image.src=e}return r}getBackgroundClassStyle(e,n){if(!n||!fe.document)return{};const r=this.backgroundClassStyleCache.get(n);if(r)return r;const i=fe.document.createElement("div");i.className=n,i.style.cssText="position:absolute;visibility:hidden;pointer-events:none;width:1px;height:1px;",e.$el.chart.node().appendChild(i);const o=fe.getComputedStyle(i),s=parseFloat(o.opacity),l={opacity:Number.isFinite(s)?s:void 0,transform:o.transform||void 0};return i.remove(),this.backgroundClassStyleCache.set(n,l),l}drawBackground(e){const n=e.config.background;if(!(n!=null&&n.imgUrl)&&!(n!=null&&n.color))return;const{ctx:r,painter:i}=this,{current:o,margin:s,width:l,height:c}=e.state,u=this.getBackgroundClassStyle(e,n.class);i.withState(()=>{if(u.opacity!==void 0&&(r.globalAlpha*=u.opacity),n.imgUrl){const f=this.getBackgroundImage(n.imgUrl,e);if(f!=null&&f.loaded){const d=$T(e),h=NT(f.image,o.width,o.height);r.translate(d.x,d.y),Kd(r,u.transform),r.drawImage(f.image,h.x,h.y,h.w,h.h)}}else n.color&&(Kd(r,u.transform),i.fillRect({x:s.left,y:s.top,w:l,h:c},{fill:n.color}))})}drawLabelImage(e,n,r,i,o){const s=aT(e,n);if(!(s!=null&&s.url))return{x:i,y:o};const l=iT(s,n),c=oT(e,s,r,i,o,n),u=this.getLabelImage(l,e);return u!=null&&u.loaded&&this.ctx.drawImage(u.image,c.x,c.y,s.width,s.height),{x:c.textX,y:c.textY}}drawDataLabel(e,n,r,i,o){const{painter:s,theme:{style:l}}=this;if({x:i,y:o}=this.drawLabelImage(e,n,r,i,o),e.config.data_labels.rotate){const c=fT(e,n,i,o);i=c.x,o=c.y,this.ctx.textAlign=c.textAlign}this.ctx.fillStyle=Fd(e,n,l.label.color),Nd(e,s,n,r,i,o),s.textLines(r,i,o,{angle:e.config.data_labels.rotate})}drawFocusLabels(e,n){var r;if(!((r=e.hasDataLabel)!=null&&r.call(e)))return;const{ctx:i,theme:{style:o}}=this,s=n.filter(c=>c&&In(e,c)&&Ar(e,c)&&qr(e,{id:c.id})),l={size:()=>s.length};s.length&&(i.font=o.label.font,s.forEach(c=>{const u=Ld(e,c);let{x:f,y:d}=Hi(e,c);u&&({x:f,y:d}=$d(e,i,c,f,d),f+=cs(e,c,"x",l),d+=cs(e,c,"y",l),mn(f,d)&&this.drawDataLabel(e,c,u,f,d))}))}draw(e,n,r){if(e.state.hasTreemap){this.drawTreemaps(e);return}const{margin:i,width:o,height:s}=e.state,l=()=>{e.config.area_front||this.drawAreas(e,n,r),this.drawLines(e,n),e.config.area_front&&this.drawAreas(e,n,r),this.drawCircles(e,n,r)},c=()=>{e.config.bar_front||this.drawBars(e,n,r),this.drawCandlesticks(e,n,r),l(),e.config.bar_front&&this.drawBars(e,n,r),this.drawSelections(e,n),this.drawLabels(e,n)};e.config.clipPath===!1?c():this.painter.clipRect({x:i.left,y:i.top,w:o,h:s},c)}drawSubchart(e,n){const{config:r,state:i}=e;if(!r.subchart_show||!i.hasAxis||i.width2<=0||i.height2<=0)return;const{ctx:o,painter:s,theme:{style:l}}=this,{margin2:c,width2:u,height2:f}=i,d={x:c.left,y:c.top,w:u,h:f};e.withSubchartTypeContext(()=>{var h;const m=e.filterTargetsToShow().filter(qr.bind(null,e)),S=e.getDrawShape();(h=e.updateSubchartYDomain)==null||h.call(e,m),s.withState(()=>{s.clipRect(d,()=>{s.withTranslation(d.x,d.y,()=>{var E,C,w,N,z,$;const G=m.filter(Gi.bind(null,e)),V=ir(e,S,kt.AREA,Gi.bind(null,e));for(const ft of G)ft.values.some(In.bind(null,e))&&(o.globalAlpha=l.shape.areaOpacity*Dr(e,ft),o.fillStyle=e.color(ft.id),Jd(e,ft,V,s,!0));o.globalAlpha=1;const J=m.filter(or.bind(null,e)),Q=ir(e,S,kt.BAR,or.bind(null,e)),rt=(E=e.generateGetBarPoints)==null?void 0:E.call(e,Q,!0);if(rt){for(const ft of J)o.globalAlpha=l.shape.barOpacity*Dr(e,ft),o.fillStyle=e.color(ft.id),ft.values.forEach((lt,pt)=>{var Tt;if(!In(e,lt))return;const Rt=Yi(e,rt,lt,pt),Ct=((Tt=e.getSubchartCandlestickBarColor)==null?void 0:Tt.call(e,lt,!0))||o.fillStyle;Rt&&s.fillRect(Rt.rect,{fill:Ct})});o.globalAlpha=1}const et=m.filter(Zn.bind(null,e)),st=ir(e,S,kt.CANDLESTICK,Zn.bind(null,e)),ct=(C=e.generateGetCandlestickPoints)==null?void 0:C.call(e,st,!0);if(ct){o.lineWidth=l.shape.candlestickLineWidth;for(const ft of et){const lt=Dr(e,ft);o.globalAlpha=lt,ft.values.forEach((pt,Tt)=>{var Rt;const Ct=(Rt=e.getCandlestickData)==null?void 0:Rt.call(e,pt),Kt=Ct&&Ki(e,ct,pt,Tt);if(!Kt)return;const re=eh(e,{id:ft.id},Ct);o.strokeStyle=re,o.fillStyle=re,s.strokePath(()=>{s.traceLine(Kt.wickStart[0],Kt.wickStart[1],Kt.wickEnd[0],Kt.wickEnd[1])}),s.fillRect(Kt.body,{fill:o.fillStyle})})}}const dt=m.filter(ni.bind(null,e)),q=ir(e,S,kt.LINE,ni.bind(null,e));o.globalAlpha=1;for(const ft of dt)ft.values.some(In.bind(null,e))&&(o.globalAlpha=Dr(e,ft),o.lineWidth=qd(e,ft)?l.shape.lineFocusedWidth:l.shape.lineWidth,o.strokeStyle=e.color(ft.id),Zd(e,ft,q,s,!0));if(o.globalAlpha=1,r.point_show&&!((w=e.isPointFocusOnly)!=null&&w.call(e))){const ft=(N=e.updateCircleY)==null?void 0:N.call(e,!0),lt=(z=e.subxx)==null?void 0:z.bind(e);if(lt&&ft){for(const pt of m){if(!ga(e,pt)&&!va(e,pt))continue;const Tt=e.color(pt.id),Rt=l.shape.pointFillColor||Tt,Ct=l.shape.pointStrokeColor||Tt,Kt=Ct?($=l.shape.pointLineWidth)!=null?$:1:0,re=Ct&&Kt>0?{fill:Rt,stroke:Ct,lineWidth:Kt}:{fill:Rt};o.globalAlpha=ds(e,pt)*Dr(e,pt),pt.values.forEach((Ee,Ce)=>{if(!In(e,Ee))return;const be=r.axis_rotated?ft(Ee,Ce):lt(Ee),Ne=r.axis_rotated?lt(Ee):ft(Ee,Ce),ye=Math.min(_i(e,pt,Ee),3);mn(be,Ne)&&Ji(s,"circle",be,Ne,ye,re)})}o.globalAlpha=1}}})}),this.drawSubchartBrush(e)})})}drawSubchartBrush(e){var n,r;const{config:i,scale:o,state:s}=e,l=s.domain;if(!i.subchart_show||i.subchart_brush_enabled===!1||!(l!=null&&l.length)||!o.subX)return;const{margin2:c,width2:u,height2:f}=s,d=o.subX(l[0]),h=o.subX(l[1]),m=i.axis_rotated?f:u,S=(r=(n=e.axis)==null?void 0:n.getExtent)==null?void 0:r.call(n),E=Array.isArray(S)&&S.length>=2&&S.every(Number.isFinite)?S.slice(0,2):[0,m],C=Math.max(0,Math.min(m,Math.min(...E))),w=Math.max(0,Math.min(m,Math.max(...E))),N=Math.max(C,Math.min(w,Math.min(d,h))),z=Math.max(C,Math.min(w,Math.max(d,h))),$=z-N;if($<=0)return;const G=i.axis_rotated?{x:c.left,y:c.top+N,w:u,h:$}:{x:c.left+N,y:c.top,w:$,h:f};this.painter.fillRect(G,{fill:this.theme.style.subchartBrush.fill,alpha:this.theme.style.subchartBrush.opacity}),i.subchart_showHandle&&(this.drawSubchartBrushHandle(e,N,"start"),this.drawSubchartBrushHandle(e,z,"end"))}drawSubchartBrushHandle(e,n,r){const{config:i,state:{margin2:o,width2:s,height2:l}}=e,{ctx:c,painter:u,theme:{style:f}}=this,d=i.axis_rotated,h=f.subchartBrush.handleFill,m=f.subchartBrush.handleStroke,S=d?o.left+s/2:o.left+n,E=d?o.top+n:o.top+l/2,C=BT(d?"y":"x",r);C&&u.withState(()=>{c.translate(S,E),c.fillStyle=h,c.strokeStyle=m,c.lineWidth=f.subchartBrush.handleLineWidth,c.globalAlpha=f.subchartBrush.handleOpacity,c.fill(C),c.globalAlpha=1,c.stroke(C)})}drawBars(e,n,r){const{ctx:i,painter:o,theme:{style:s}}=this,l=or.bind(null,e),c=lc(e,r,or),u=e.filterTargetsToShow().filter(l).filter(qr.bind(null,e)),f=e.generateGetBarPoints(ir(e,n,kt.BAR,l),!1),{margin:d}=e.state,h=as(e),m=h?tc(e):new Set;f&&o.withTranslation(d.left,d.top,()=>{var S;for(const E of u){const C=Zr(e,E),w=GT(e,E.id),N=Dr(e,E),z=[],$=[];for(let G=C.start;G<C.end;G++){const V=E.values[G];if(!In(e,V))continue;const J=Yi(e,f,V,G);if(!J)continue;const{points:Q,rect:rt}=J,et=ec(e,V,Q,h,m,(S=e.isStackingRadiusData)==null?void 0:S.bind(e));$.push({d:V,points:Q,rect:rt,radiusInfo:et}),w&&z.push(XT(e,Q,et))}w&&s.shape.barConnectLineWidth>0&&WT(e,o,w,z,N);for(const{d:G,rect:V,radiusInfo:J}of $){const Q=Qi(e,hc(r,G)),rt=Q||e.color(E.id),st=(c(G)?s.shape.barExpandedOpacity:s.shape.barOpacity)*N;i.fillStyle=Q?rt:th(e,i,E,"bar",V,rt),h?o.fillRoundRect(V,J.corners,{alpha:st}):o.fillRect(V,{alpha:st}),s.shape.barLineWidth>0&&(i.strokeStyle=s.shape.barStrokeColor,i.lineWidth=s.shape.barLineWidth,h?o.strokeRoundRect(V,J.corners,{alpha:s.shape.barOpacity*N}):o.strokeRect(V,{alpha:s.shape.barOpacity*N}))}}})}drawCandlesticks(e,n,r){var i;const{ctx:o,painter:s,theme:{style:l}}=this,c=Zn.bind(null,e),u=lc(e,r,Zn),f=e.filterTargetsToShow().filter(c).filter(qr.bind(null,e)),d=(i=e.generateGetCandlestickPoints)==null?void 0:i.call(e,ir(e,n,kt.CANDLESTICK,c),!1),{margin:h}=e.state;d&&s.withTranslation(h.left,h.top,()=>{var m;o.lineWidth=l.shape.candlestickLineWidth;for(const S of f){const E=Zr(e,S),C=Dr(e,S),w=l.shape.candlestickLineWidth,N=l.shape.candlestickStrokeColor||"#000";for(let z=E.start;z<E.end;z++){const $=S.values[z],G=(m=e.getCandlestickData)==null?void 0:m.call(e,$);if(!G)continue;const V=Ki(e,d,$,z);if(!V)continue;const{body:J,wickStart:Q,wickEnd:rt}=V;o.fillStyle=Qi(e,hc(r,$))||eh(e,$,G),o.strokeStyle=N,o.globalAlpha=C,w>0&&s.strokePath(()=>{s.traceLine(Q[0],Q[1],rt[0],rt[1])}),s.fillRect(J,{alpha:(u($)?l.shape.candlestickExpandedOpacity:1)*C}),w>0&&s.strokeRect(J,{alpha:C,lineWidth:w,stroke:N})}}o.globalAlpha=1})}hasExpandedShapeFocus(e,n){return!!(n!=null&&n.some(r=>r&&(or(e,r)||Zn(e,r))))}drawLines(e,n){const{ctx:r,painter:i,theme:{style:o}}=this,s=ni.bind(null,e),l=e.filterTargetsToShow().filter(s).filter(qr.bind(null,e)),c=ir(e,n,kt.LINE,s),{margin:u}=e.state;e.generateGetLinePoints&&i.withTranslation(u.left,u.top,()=>{var f;for(const d of l){const h=Qd(e,d);h.values.some(In.bind(null,e))&&(r.globalAlpha=Dr(e,d),r.lineWidth=qd(e,d)?o.shape.lineFocusedWidth:o.shape.lineWidth,r.strokeStyle=e.color(d.id),(f=e.config.data_regions)!=null&&f[h.id]?YT(e,h,i):Zd(e,h,c,i))}r.globalAlpha=1})}drawAreas(e,n,r){const{ctx:i,painter:o,theme:{style:s}}=this,l=Gi.bind(null,e),c=e.filterTargetsToShow().filter(l).filter(qr.bind(null,e)),u=ir(e,n,kt.AREA,l),{margin:f}=e.state;e.generateGetAreaPoints&&o.withTranslation(f.left,f.top,()=>{for(const d of c){const h=Qd(e,d);if(!h.values.some(In.bind(null,e)))continue;const m=zT(e,h,r);i.globalAlpha=s.shape.areaOpacity*Dr(e,d),i.fillStyle=th(e,i,h,"area",e.config.area_linearGradient?UT(e,d,u):null,m),Jd(e,h,u,o)}i.globalAlpha=1})}drawCircles(e,n,r){var i;if(!e.config.point_show||(i=e.isPointFocusOnly)!=null&&i.call(e))return;const{ctx:o,painter:s,theme:{style:l}}=this,{cx:c,cy:u}=n.pos,{margin:f}=e.state,d=lc(e,r,Ar),h=!!(r!=null&&r.some(m=>m&&Ar(e,m)));!c||!u||s.withTranslation(f.left,f.top,()=>{var m,S,E;for(const C of e.filterTargetsToShow()){if(!Ar(e,C)||!qr(e,C)||ni(e,C)&&!jT(e,C))continue;const w=e.color(C.id),N=gc(e,C),z=Dr(e,C),$=!!e.config.point_radialGradient,G=kT(e,C,N,$),V=Zr(e,C),J=V.end-V.start,Q=G?jf(e.state.width,e.state.height,_i(e,C,C.values[V.start]||C.values[0])):null,rt=ds(e,C)*z;o.fillStyle=w,o.globalAlpha=rt;const et=l.shape.pointFillColor||w,st=l.shape.pointStrokeColor||w,ct=st?(m=l.shape.pointLineWidth)!=null?m:1:0,dt=!!st&&ct>0,q=dt&&N==="circle"&&le(rt)&&rt<1&&et===st;if(!h&&!$&&N==="circle")if(o.fillStyle=et,dt&&!q&&(o.strokeStyle=st,o.lineWidth=ct),J>FT)for(let ft=V.start;ft<V.end;ft++){const lt=C.values[ft];if(!In(e,lt))continue;const pt=_i(e,C,lt),Tt=q?pt+ct/2:pt,Rt=c(lt,ft),Ct=u(lt,ft);mn(Rt,Ct)&&(Q&&!Hf(Q,Rt,Ct)||(o.beginPath(),o.arc(Rt,Ct,Tt,0,Math.PI*2),o.fill(),dt&&!q&&o.stroke()))}else{o.beginPath();for(let ft=V.start;ft<V.end;ft++){const lt=C.values[ft];if(!In(e,lt))continue;const pt=_i(e,C,lt),Tt=q?pt+ct/2:pt,Rt=c(lt,ft),Ct=u(lt,ft);mn(Rt,Ct)&&s.traceCircle(Rt,Ct,Tt)}o.fill(),dt&&!q&&o.stroke()}else for(let ft=V.start;ft<V.end;ft++){const lt=C.values[ft];if(!In(e,lt))continue;const pt=d(lt),Tt=_i(e,C,lt),Rt=pt?(E=(S=e.pointExpandedR)==null?void 0:S.call(e,lt))!=null?E:Tt*1.75:Tt,Ct=c(lt,ft),Kt=u(lt,ft),re=Qi(e,lt),Ee=re||w,Ce=l.shape.pointFillColor||Ee,be=l.shape.pointStrokeColor||Ee,Ne=pt&&(re||l.focusPoint.fill)||Ce,ye=pt?re||l.focusPoint.stroke||Ee:be,De=pt?l.focusPoint.lineWidth:ct,Zt=ds(e,lt)*z,ve=!!ye&&(De!=null?De:0)>0,xe=N==="circle"&&ve&&le(Zt)&&Zt<1&&Ne===ye,Vt=xe?Rt+(De||0)/2:Rt;mn(Ct,Kt)&&(o.fillStyle=$?VT(e,o,lt,Ct,Kt,Rt,Ee):Ne,o.globalAlpha=Zt,Ji(s,N,Ct,Kt,Vt,ve&&!xe?{fill:o.fillStyle,stroke:ye,lineWidth:De}:void 0,Tt))}}})}drawSelections(e,n){var r,i;const o=(r=e.getCanvasSelectedData)==null?void 0:r.call(e);if(!e.config.data_selection_enabled||!(o!=null&&o.length)||e.state.hasTreemap)return;const{ctx:s,painter:l,theme:{style:c}}=this,{margin:u}=e.state,f=or.bind(null,e),d=Zn.bind(null,e),h=o.some(f)?e.generateGetBarPoints(ir(e,n,kt.BAR,f),!1):null,m=o.some(d)?(i=e.generateGetCandlestickPoints)==null?void 0:i.call(e,ir(e,n,kt.CANDLESTICK,d),!1):null,S=h?as(e):null,E=S?tc(e):new Set;l.withTranslation(u.left,u.top,()=>{o.forEach(C=>{var w,N,z,$,G,V,J;const Q=e.color(C.id);if(f(C)&&h){const rt=Yi(e,h,C,C.index);if(!rt)return;const{points:et,rect:st}=rt,ct=S?ec(e,C,et,S,E).corners:0;S?l.fillRoundRect(st,ct,{fill:"#fff",alpha:.3}):l.fillRect(st,{fill:"#fff",alpha:.3}),S?l.strokeRoundRect(st,ct,{stroke:Q,lineWidth:2}):l.strokeRect(st,{stroke:Q,lineWidth:2})}else if(d(C)&&m){if(!((w=e.getCandlestickData)==null?void 0:w.call(e,C)))return;const et=Ki(e,m,C,C.index);if(!et)return;const{body:st,wickStart:ct,wickEnd:dt}=et;l.strokePath(()=>{l.traceLine(ct[0],ct[1],dt[0],dt[1])},{stroke:Q,lineWidth:3}),l.fillRect(st,{fill:"#fff",alpha:.3}),l.strokeRect(st,{stroke:Q,lineWidth:2})}else if(Ar(e,C)){const rt=gc(e,{id:C.id}),{x:et,y:st}=Hi(e,C),ct=(z=(N=e.pointR)==null?void 0:N.call(e,C))!=null?z:2.5,dt=(G=($=e.pointSelectR)==null?void 0:$.call(e,C))!=null?G:ct*2;if(!mn(et,st))return;Ji(l,"circle",et,st,dt,{fill:c.selectedPoint.fill,lineWidth:c.selectedPoint.lineWidth,stroke:c.selectedPoint.stroke||Q}),(V=e.isPointFocusOnly)!=null&&V.call(e)||Ji(l,rt,et,st,ct,{fill:c.shape.pointFillColor||Q,stroke:c.shape.pointStrokeColor||Q,lineWidth:(J=c.shape.pointLineWidth)!=null?J:1})}}),s.globalAlpha=1})}drawLabels(e,n){var r;if(!((r=e.hasDataLabel)!=null&&r.call(e)))return;const{ctx:i,painter:o,theme:{style:s}}=this,{margin:l}=e.state,{cx:c,cy:u}=n.pos,f=n.indices[kt.BAR]?e.generateGetBarPoints(n.indices[kt.BAR],!1):null,d=e.generateGetCandlestickPoints?e.generateGetCandlestickPoints(ir(e,n,kt.CANDLESTICK,Zn.bind(null,e)),!1):null,h=e.filterTargetsToShow().filter(C=>(or(e,C)||Ar(e,C)||Gi(e,C)||Zn(e,C))&&qr(e,C)),m=[];let S=0;h.forEach(C=>{const w=Zr(e,C),N=e.labelishData(C),z=[];for(let $=0;$<N.length;$++){const G=N[$],V=Ld(e,G);V&&G.index>=w.start&&G.index<w.end&&In(e,G)&&z.push({d:G,text:V})}S+=z.length,z.length&&m.push(z)});const E={size:()=>S};o.withTranslation(l.left,l.top,()=>{i.font=s.label.font,i.textAlign="center",m.forEach(C=>{var w,N;for(const{d:z,text:$}of C){let G,V;if(or(e,z)&&f){const J=Yi(e,f,z,z.index);if(!J)continue;const{points:Q,rect:rt}=J,et=e.getBaseValue(z),st=is(e,Q[2]),ct=et<0,dt=cc(i,$,0,0).h;G=e.config.axis_rotated&&!e.config.data_labels.centered?st[0]+(ct?-4:4):rt.x+rt.w/2,V=e.config.data_labels.centered||e.config.axis_rotated?rt.y+rt.h/2:st[1]+(ct?dt-3:-3),i.textAlign=e.config.axis_rotated&&!e.config.data_labels.centered?ct?"right":"left":"center",i.textBaseline=e.config.data_labels.centered||e.config.axis_rotated?"middle":"alphabetic"}else if(Zn(e,z)&&d){const J=(w=e.getCandlestickData)==null?void 0:w.call(e,z),Q=Ki(e,d,z,z.index),rt=J==null?void 0:J._isUp;if(!Q)continue;const{wickEnd:et,wickStart:st}=Q,ct=e.config[`axis_${(N=e.axis)==null?void 0:N.getId(z.id)}_inverted`];G=e.config.axis_rotated?rt?et[0]+4:st[0]-4:st[0],V=e.config.axis_rotated?st[1]+3:rt?et[1]-3:st[1]+12,!e.config.axis_rotated&&ct&&(V+=15*(rt?1:-1)),i.textAlign=e.config.axis_rotated?rt?"left":"right":"center",i.textBaseline="alphabetic"}else c&&u&&({x:G,y:V}=X0(n.pos,z,z.index),{x:G,y:V}=$d(e,i,z,G,V));G+=cs(e,z,"x",E),V+=cs(e,z,"y",E),mn(G,V)&&this.drawDataLabel(e,z,$,G,V)}})})}drawEmptyLabel(e){const n=e.config.data_empty_label_text,r=e.filterTargetsToShow();if(!n||r.length)return;const{margin:i,width:o,height:s}=e.state,{style:l}=this.theme;this.painter.text(String(n),i.left+o/2,i.top+s/2,{fill:l.emptyLabel.color,font:l.emptyLabel.font,textAlign:"center",textBaseline:"middle"})}drawZoomBrush(e,n,r){const{axis_rotated:i}=e.config,{height:o,margin:s,width:l}=e.state,c=Math.min(n,r),u=Math.abs(r-n),f=i?{x:s.left,y:s.top+c,w:l,h:u}:{x:s.left+c,y:s.top,w:u,h:o};u<=0||this.painter.fillRect(f,{fill:this.theme.style.zoomBrush.fill,alpha:this.theme.style.zoomBrush.opacity})}drawSelectionDragArea(e,n){const{margin:r,width:i,height:o}=e.state,s={x:r.left,y:r.top,w:i,h:o},l=Math.max(s.x,n.x),c=Math.max(s.y,n.y),u=Math.min(s.x+s.w,n.x+n.w),f=Math.min(s.y+s.h,n.y+n.h);u<=l||f<=c||this.painter.fillRect({x:l,y:c,w:u-l,h:f-c},{fill:this.theme.style.zoomBrush.fill,alpha:this.theme.style.zoomBrush.opacity})}drawTreemaps(e){var n;const{ctx:r,painter:i,theme:{style:o}}=this,{config:s}=e,l=(n=e.getTreemapRoot)==null?void 0:n.call(e,e.data.targets),c=(l==null?void 0:l.children)||[];i.withState(()=>{var u;r.lineWidth=o.treemap.lineWidth,r.strokeStyle=o.treemap.stroke;for(const f of c){const{data:d}=f;if(!Nl(e,d))continue;const{x:h,y:m,w:S,h:E}=ai(e,f,l,!0);if(!mn(h,m)||!mn(h+S,m+E)||S<=0||E<=0)continue;const C={x:h,y:m,w:S,h:E};if(r.fillStyle=e.color(d.name),i.fillRect(C),i.strokeRect(C),!s.treemap_label_show||(d.ratio||0)<(s.treemap_label_threshold||0))continue;const w=V0(e,d,S,E);if(!w)continue;const N=w.split(`
38
- `),z=!!s.data_labels.centered;r.font=o.label.font;const $=Sr(r.font),G=r.measureText((u=N[0])!=null?u:""),V=(G.fontBoundingBoxAscent||0)+(G.fontBoundingBoxDescent||0)||(G.actualBoundingBoxAscent||0)+(G.actualBoundingBoxDescent||0),J=Math.max($,V)+(N.length-1)*$,Q=z?m+E/2:m+J+5;let rt=z?h+S/2:h+5,et=Q-(N.length-1)*$/(z?2:1);r.textAlign=z?"center":"left",r.textBaseline=z?"middle":"alphabetic",{x:rt,y:et}=this.drawLabelImage(e,d,w,rt,et),r.fillStyle=Fd(e,d,o.label.color),Nd(e,i,d,w,rt,z?et+(N.length-1)*$/2:Q),N.forEach((st,ct)=>{i.text(st,rt,et+ct*$,{maxWidth:Math.max(0,S-8)})})}})}drawSubchartFocus(e,n){const{config:r,scale:i,state:o}=e,s=n==null?void 0:n.find(C=>C&&In(e,C));if(!s||!r.subchart_show||r.subchart_grid_focus_continuous||r.subchart_brush_enabled!==!1||r.grid_focus_show===!1||r.subchart_grid_focus===!1||!r.tooltip_show||r.axis_tooltip||!i.subX||o.width2<=0||o.height2<=0)return;const{margin2:l,width2:c,height2:u}=o,f=i.subX(s.x);if(!Number.isFinite(f))return;const{painter:d,theme:{style:h}}=this,m=h.axis.lineWidth,S=d.crisp(l.left+f,m),E=d.crisp(l.top+f,m);d.strokePath(()=>{r.axis_rotated?d.traceLine(l.left,E,l.left+c,E):d.traceLine(S,l.top,S,l.top+u)},{lineDash:h.focusGrid.dashArray,lineWidth:h.focusGrid.lineWidth,stroke:h.focusGrid.lineColor})}drawFocus(e,n){if(!(n!=null&&n.length))return;const{painter:r}=this,{style:i}=this.theme,{margin:o}=e.state,s=n.find(l=>l&&In(e,l));e.config.subchart_grid_focus!==!1&&!_l(e)&&this.drawSubchartFocus(e,n),r.withTranslation(o.left,o.top,()=>{if(e.config.tooltip_show&&e.config.grid_focus_show!==!1&&!e.config.axis_tooltip&&s){const{x:l,y:c}=Hi(e,s),u=i.axis.lineWidth,f=e.config.axis_rotated,d=Number.isFinite(f?c:l),h=Number.isFinite(f?l:c),m=z=>r.crisp(o.left+z,u)-o.left,S=z=>r.crisp(o.top+z,u)-o.top,E=e.config.grid_focus_edge&&!e.config.tooltip_grouped,C=_l(e),w=C?e.state.margin2.left-o.left+e.state.width2:e.state.width,N=C?e.state.margin2.top-o.top+e.state.height2:e.state.height;d&&r.strokePath(()=>{var z,$;if(f){if(r.traceLine(m(0),c,E&&h?l:m(w),c),h&&e.config.grid_focus_y&&!e.config.tooltip_grouped){const G=((z=e.axis)==null?void 0:z.getId(s.id))==="y2";r.traceLine(l,E&&!G?c:S(0),l,E&&G?c:S(e.state.height))}}else if(r.traceLine(l,E&&h?c:S(0),l,S(N)),h&&e.config.grid_focus_y&&!e.config.tooltip_grouped){const G=(($=e.axis)==null?void 0:$.getId(s.id))==="y2";r.traceLine(E&&G?l:m(0),c,E&&!G?l:m(e.state.width),c)}},{lineDash:i.focusGrid.dashArray,lineWidth:i.focusGrid.lineWidth,stroke:i.focusGrid.lineColor})}e.config.point_show&&!e.state.canvasFocusMainRedraw&&n.filter(l=>l&&In(e,l)&&Ar(e,l)&&qr(e,{id:l.id})).forEach(l=>{var c,u,f,d;const h=gc(e,{id:l.id}),{x:m,y:S}=Hi(e,l),E=(u=(c=e.pointR)==null?void 0:c.call(e,l))!=null?u:2.5,C=(d=(f=e.pointExpandedR)==null?void 0:f.call(e,l))!=null?d:E*1.75,w=Qi(e,l),N=w||e.color(l.id),z=w||i.focusPoint.fill||i.shape.pointFillColor||N,$=w||i.focusPoint.stroke||N,G=i.focusPoint.lineWidth,V=ds(e,l),J=!!$&&(G!=null?G:0)>0,Q=h==="circle"&&J&&le(V)&&V<1&&z===$;mn(m,S)&&Ji(r,h,m,S,Q?C+(G||0)/2:C,J&&!Q?{fill:z,lineWidth:G,stroke:$,alpha:V}:{fill:z,alpha:V},E)}),this.drawFocusLabels(e,n)})}}var ZT=Object.defineProperty,nh=Object.getOwnPropertySymbols,JT=Object.prototype.hasOwnProperty,QT=Object.prototype.propertyIsEnumerable,_T=(t,e,n)=>e in t?ZT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qT=(t,e)=>{var n={};for(var r in t)JT.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&nh)for(var r of nh(t))e.indexOf(r)<0&&QT.call(t,r)&&(n[r]=t[r]);return n},qi=(t,e,n)=>_T(t,typeof e!="symbol"?e+"":e,n);const Fr="http://www.w3.org/2000/svg";function Fe(t,e){const n=typeof t=="number"?t:parseFloat(t!=null?t:"");return Number.isFinite(n)?n:e}function $a(t,e){const n=Fe(t.opacity,1),r=Fe(t["fill-opacity"],1),i=n*r;return Number.isFinite(i)?i:e}function Ge(t,e){const n=t==null?void 0:t.trim();return n&&!/^(none|transparent|rgba\(0,\s*0,\s*0,\s*0\))$/i.test(n)?n:e}function oi(t,e){const n=Ge(t,""),r=e?Ge(e,""):"";return n&&n!==r?n:void 0}function si(t,e){const n=typeof t=="number"?t:parseFloat(t!=null?t:""),r=typeof e=="number"?e:parseFloat(e!=null?e:"");return Number.isFinite(n)&&(!Number.isFinite(r)||n!==r)?n:void 0}function to(t){return Array.isArray(t)?t.filter(e=>Number.isFinite(e)&&e>0):(t||"").split(/[,\s]+/).map(e=>parseFloat(e)).filter(e=>Number.isFinite(e)&&e>0)}function t1(t,e){const n=t.getPropertyValue("font").trim();if(n)return n;const r=t.getPropertyValue("font-size").trim(),i=t.getPropertyValue("font-family").trim();if(!r||!i)return e;const o=t.getPropertyValue("font-style").trim(),s=t.getPropertyValue("font-variant").trim(),l=t.getPropertyValue("font-weight").trim(),c=t.getPropertyValue("line-height").trim(),u=c&&c!=="normal"?`${r}/${c}`:r;return[o&&o!=="normal"?o:"",s&&s!=="normal"?s:"",l&&!/^(normal|400)$/.test(l)?l:"",u,i].filter(Boolean).join(" ")}function Nr(t,e){var n;const r=e.replace(/-([a-z])/g,(i,o)=>o.toUpperCase());return(n=t[e])!=null?n:t[r]}function Je(t,e){const n=Nr(t,e);return(n==null?"":Ge(String(n),""))||void 0}function Dn(t,e){const n=Nr(t,e),r=typeof n=="number"?n:parseFloat(String(n!=null?n:""));return Number.isFinite(r)?r:void 0}function xa(t){const e=Dn(t,"opacity"),n=Dn(t,"fill-opacity");return e===void 0&&n===void 0?void 0:(e!=null?e:1)*(n!=null?n:1)}function vc(t){const e=Nr(t,"stroke-dasharray"),n=e==null?[]:to(e);return n.length?n:void 0}function sr(t){var e,n,r,i;const o=Nr(t,"font");if(o!=null&&String(o).trim())return String(o).trim();const s=Nr(t,"font-size"),l=Nr(t,"font-family");if(s==null||l==null)return;const c=String(s).trim(),u=String(l).trim();if(!c||!u)return;const f=String((e=Nr(t,"font-style"))!=null?e:"").trim(),d=String((n=Nr(t,"font-variant"))!=null?n:"").trim(),h=String((r=Nr(t,"font-weight"))!=null?r:"").trim(),m=String((i=Nr(t,"line-height"))!=null?i:"").trim();return[f&&f!=="normal"?f:"",d&&d!=="normal"?d:"",h&&!/^(normal|400)$/.test(h)?h:"",m&&m!=="normal"?`${c}/${m}`:c,u].filter(Boolean).join(" ")}function qe(t,e,n){var r;const i=Object.keys(n).reduce((o,s)=>(n[s]!==void 0&&(o[s]=n[s]),o),{});Object.keys(i).length&&(t[e]=Kr((r=t[e])!=null?r:{},i))}function rh(t){return t.split(",").map(e=>e.trim().replace(/\s*>\s*/g," ").replace(/\s+/g," ").replace(/^(?:svg)?\.bb\s+/,"").replace(/(^|\s)(?:g|path|rect|line|text|circle)\./g,"$1.")).filter(Boolean)}function pc(t){return Object.keys(t).filter(e=>t[e]!==void 0)}function ah(t,e,n){return pc(e).forEach(r=>{n!=null&&n.has(r)||(t[r]=e[r])}),t}function ih(t){const e=t.split(" ");return e.every((n,r)=>n==="line"||n==="text"?r===e.length-1:/^(\.[A-Za-z_-][\w-]*)+$/.test(n))}function oh(t){const e=t.split(" "),n=e[e.length-1];return n==="line"||n==="text"?n:null}function e1(t){return(t||"").split(/\s+/).filter(Boolean)}function n1(t,e){const n=e==="text"?{labelColor:Je(t,"fill"),labelFont:sr(t)}:{lineColor:Je(t,"stroke"),lineWidth:Dn(t,"stroke-width"),dashArray:vc(t)};return ah({},n)}function r1(t){const e=[];return Object.keys(t!=null?t:{}).forEach(n=>{rh(n).forEach(r=>{const i=oh(r)||"line",o=n1(t[n],i);ih(r)&&pc(o).length&&e.push({selector:r,target:i,style:o})})}),e}function a1(t,e,n,r){if(!ih(t))return!1;const i=oh(t);if(i&&i!==r)return!1;if(!i&&r==="text")return!1;const o=e1(n),s=`bb-${e}grid-line`,l=new Set(["bb-grid","bb-grid-lines",`bb-${e}grid-lines`,s,...o]),c=(t.match(/\.[A-Za-z_-][\w-]*/g)||[]).map(u=>u.slice(1));return!!c.length&&c.every(u=>l.has(u))&&(c.includes(s)||o.some(u=>c.includes(u)))}function i1(t,e,n){switch(e){case".bb-axis path.domain":case".bb-axis .domain":case".bb-axis-x path.domain":case".bb-axis-x .domain":case".bb-axis-y path.domain":case".bb-axis-y .domain":case".bb-axis-y2 path.domain":case".bb-axis-y2 .domain":qe(t,"axis",{lineColor:Je(n,"stroke"),lineWidth:Dn(n,"stroke-width")});break;case".bb-axis line":case".bb-axis .tick line":case".bb-axis-x line":case".bb-axis-x .tick line":case".bb-axis-y line":case".bb-axis-y .tick line":case".bb-axis-y2 line":case".bb-axis-y2 .tick line":qe(t,"axis",{tickColor:Je(n,"stroke"),tickWidth:Dn(n,"stroke-width")});break;case".bb-axis text":case".bb-axis .tick text":{const r=sr(n);qe(t,"axis",{labelColor:Je(n,"fill"),xTickFont:r,yTickFont:r,y2TickFont:r});break}case".bb-axis-x text":case".bb-axis-x .tick text":qe(t,"axis",{labelColor:Je(n,"fill"),xTickFont:sr(n)});break;case".bb-axis-y text":case".bb-axis-y .tick text":qe(t,"axis",{labelColor:Je(n,"fill"),yTickFont:sr(n)});break;case".bb-axis-y2 text":case".bb-axis-y2 .tick text":qe(t,"axis",{labelColor:Je(n,"fill"),y2TickFont:sr(n)});break;case".tick._active_ text":case".bb-axis .tick._active_ text":case".bb-axis-x .tick._active_ text":qe(t,"axis",{activeLabelColor:Je(n,"fill")});break;case".bb-axis-x-label":case".bb-axis-x .bb-axis-x-label":qe(t,"axis",{labelFont:sr(n),xLabelColor:Je(n,"fill")});break;case".bb-axis-y-label":case".bb-axis-y .bb-axis-y-label":qe(t,"axis",{labelFont:sr(n),yLabelColor:Je(n,"fill")});break;case".bb-axis-y2-label":case".bb-axis-y2 .bb-axis-y2-label":qe(t,"axis",{labelFont:sr(n),y2LabelColor:Je(n,"fill")});break;case".bb-grid line":case".bb-grid .bb-xgrid":case".bb-grid .bb-ygrid":case".bb-xgrid":case".bb-ygrid":qe(t,"grid",{lineColor:Je(n,"stroke"),lineWidth:Dn(n,"stroke-width"),dashArray:vc(n)});break;case".bb-grid text":qe(t,"grid",{labelColor:Je(n,"fill"),labelFont:sr(n)});break;case".bb-xgrid-focus line":case".bb-grid .bb-xgrid-focus line":case".bb-grid .bb-xgrid-focus":qe(t,"focusGrid",{lineColor:Je(n,"stroke"),lineWidth:Dn(n,"stroke-width"),dashArray:vc(n)});break;case".bb-region rect":case".bb-region":qe(t,"region",{fill:Je(n,"fill"),opacity:xa(n)});break;case".bb-region text":qe(t,"region",{labelColor:Je(n,"fill"),labelFont:sr(n)});break;case".bb-bar":qe(t,"shape",{barOpacity:xa(n),barStrokeColor:Je(n,"stroke"),barLineWidth:Dn(n,"stroke-width")});break;case".bb-bar._expanded_":qe(t,"shape",{barExpandedOpacity:xa(n)});break;case".bb-candlestick":qe(t,"shape",{candlestickStrokeColor:Je(n,"stroke"),candlestickLineWidth:Dn(n,"stroke-width")});break;case".bb-candlestick._expanded_":qe(t,"shape",{candlestickExpandedOpacity:xa(n)});break;case".bb-line":qe(t,"shape",{barConnectLineColor:Je(n,"stroke"),barConnectLineWidth:Dn(n,"stroke-width"),lineWidth:Dn(n,"stroke-width")});break;case".bb-target.bb-focused .bb-line":case".bb-target.bb-focused path.bb-line":qe(t,"shape",{lineFocusedWidth:Dn(n,"stroke-width")});break;case".bb-target.bb-defocused":qe(t,"shape",{targetDefocusedOpacity:Dn(n,"opacity")});break;case".bb-area":qe(t,"shape",{areaOpacity:xa(n)});break;case".bb-circle":qe(t,"shape",{pointFillColor:Je(n,"fill"),pointStrokeColor:Je(n,"stroke"),pointLineWidth:Dn(n,"stroke-width")});break;case".bb-selected-circle":qe(t,"selectedPoint",{fill:Je(n,"fill"),stroke:Je(n,"stroke"),lineWidth:Dn(n,"stroke-width")});break;case".bb-circle._expanded_":qe(t,"focusPoint",{fill:Je(n,"fill"),stroke:Je(n,"stroke"),lineWidth:Dn(n,"stroke-width")});break;case".bb-zoom-brush":qe(t,"zoomBrush",{fill:Je(n,"fill"),opacity:xa(n)});break;case".bb-brush .extent":case".bb-brush .selection":qe(t,"subchartBrush",{fill:Je(n,"fill"),opacity:xa(n)});break;case".bb-brush .handle--custom":qe(t,"subchartBrush",{handleFill:Je(n,"fill"),handleOpacity:xa(n),handleStroke:Je(n,"stroke"),handleLineWidth:Dn(n,"stroke-width")});break;case".bb-chart-treemaps rect":case".bb-chart-treemaps":qe(t,"treemap",{stroke:Je(n,"stroke"),lineWidth:Dn(n,"stroke-width")});break;case".bb-text.bb-empty":case".bb-text .bb-empty":case".bb-empty":qe(t,"emptyLabel",{color:Je(n,"fill"),font:sr(n)});break;case".bb-text":qe(t,"label",{color:Je(n,"fill"),font:sr(n)});break;case".bb-title":qe(t,"title",{color:Je(n,"fill"),font:sr(n)});break}}function o1(t){const e={};return Object.keys(t!=null?t:{}).forEach(n=>{rh(n).forEach(r=>{i1(e,r,t[n])})}),e}function s1(t){if(!t)return{};const e=t,{selectors:n}=e,r=qT(e,["selectors"]);return Kr({},o1(n),r)}function sh(t,e){try{return JSON.stringify({className:t.className,style:t.getAttribute("style")||"",override:e||null})}catch(n){return null}}class l1{constructor(){qi(this,"style"),qi(this,"cacheContainer",null),qi(this,"cacheKey",null),qi(this,"gridLineSelectorOverrides",[]),qi(this,"directGridOverrideKeys",new Set)}load(e,n){var r,i,o,s,l;const c=Ze.createElementNS(Fr,"svg");this.gridLineSelectorOverrides=r1(n==null?void 0:n.selectors),this.directGridOverrideKeys=new Set(Object.keys((r=n==null?void 0:n.grid)!=null?r:{})),c.setAttribute("class","bb"),c.style.cssText="position:absolute;visibility:hidden;pointer-events:none;width:0;height:0;overflow:hidden",e.appendChild(c);const u=(Mn,jn)=>{const Qn=fe.getComputedStyle(Mn),nr={};for(const Bn of jn)nr[Bn]=Bn==="font"?t1(Qn,""):Qn.getPropertyValue(Bn).trim();return nr},f=(Mn,jn,Qn)=>{const nr=Ze.createElementNS(Fr,Mn);nr.setAttribute("class",jn),c.appendChild(nr);const Bn=u(nr,Qn);return c.removeChild(nr),Bn},d=(Mn,jn,Qn,nr)=>{const Bn=Ze.createElementNS(Fr,"g"),pr=Ze.createElementNS(Fr,jn);Bn.setAttribute("class",Mn),Qn&&pr.setAttribute("class",Qn),Bn.appendChild(pr),c.appendChild(Bn);const la=u(pr,nr);return c.removeChild(Bn),la},h=(Mn,jn,Qn,nr,Bn)=>{const pr=Ze.createElementNS(Fr,"g"),la=Ze.createElementNS(Fr,"g"),To=Ze.createElementNS(Fr,Qn);pr.setAttribute("class",Mn),la.setAttribute("class",jn),nr&&To.setAttribute("class",nr),la.appendChild(To),pr.appendChild(la),c.appendChild(pr);const BR=u(To,Bn);return c.removeChild(pr),BR},m=(Mn,jn,Qn,nr="")=>{const Bn=Ze.createElementNS(Fr,"g"),pr=Ze.createElementNS(Fr,"g"),la=Ze.createElementNS(Fr,jn);Bn.setAttribute("class",`bb-axis ${Mn}`),pr.setAttribute("class",["tick",nr].filter(Boolean).join(" ")),la.textContent=jn==="text"?"0":"",pr.appendChild(la),Bn.appendChild(pr),c.appendChild(Bn);const To=u(la,Qn);return c.removeChild(Bn),To},S="rgb(1, 2, 3)",E=(Mn,jn)=>{const Qn=Ze.createElement("style");Qn.textContent=`
34
+ `):t.config.axis_x_tick_multiline?O0(u,l!=null?l:tc(t,i,s,o),e):[u]}function ec(t,e){const{isRotated:n,tickCount:r,tickIndex:i,tickRotate:s,tickTextDirection:o}=e,l=t.config.axis_x_tick_text_inner;let c=n?o>0?"left":"right":s?s>0?"left":"right":"center";return!n&&i===0&&(l===!0||l!=null&&l.first)?c="left":!n&&i===r-1&&(l===!0||l!=null&&l.last)&&(c="right"),c}function P0(t,e){var n,r;return((n=t==null?void 0:t.indexOf("center"))!=null?n:-1)>-1?{x:e/2,align:"center"}:((r=t==null?void 0:t.indexOf("right"))!=null?r:-1)>-1?{x:e,align:"right"}:{x:0,align:"left"}}function ua(t){return Number.isFinite(t)}function co(t,e,n){return ua(t)&&t>=Math.min(e,n)&&t<=Math.max(e,n)}function gd(t){return t?-1:1}function M0(t,e,n){return e?n?t.axis_y2_inner?1:-1:t.axis_y_inner?-1:1:n?t.axis_y2_inner?-1:1:t.axis_y_inner?1:-1}function nc(t,e,n=Zn(t)){return n(Vr(t,e))}function L0(t,e){var n,r;return(r=(n=t.axis)==null?void 0:n.isCategorized)!=null&&r.call(n)&&typeof e=="string"&&Number.isNaN(Number(e))?t.config.axis_x_categories.indexOf(e):Vr(t,e)}function D0(t,e){var n,r;return!!((r=(n=t.axis)==null?void 0:n.isCategorized)!=null&&r.call(n)&&Number.isNaN(Number(e)))}function pd(t,e,n,r){var i,s;if(e===void 0)return n;let o=Zn(t)(L0(t,e));if(D0(t,e)){const l=Zn(t),c=((s=(i=t.axis.x)==null?void 0:i.tickOffset)==null?void 0:s.call(i))||(l(1)-l(0))/2;o+=c*(r==="start"?-1:1)}return o}function md(t,e,n="y"){return t.scale[n||"y"](Hi(t,e,n))}function xd(t,e,n){return t==="start"?e+4:t==="middle"?(e+n)/2:n-4}function yd(t,e,n){return t==="start"?n-4:t==="middle"?(e+n)/2:e+4}function F0(t,e){const{config:n,scale:r,state:{width:i,height:s}}=t,o=e.axis||"x",l=n.axis_rotated;if(o==="x"){const h=pd(t,e.start,0,"start"),m=pd(t,e.end,l?s:i,"end"),S=Math.min(h,m),E=Math.abs(m-h);return l?{x:0,y:S,w:i,h:E}:{x:S,y:0,w:E,h:s}}if(!r[o])return null;const c=e.start===void 0?l?0:s:md(t,e.start,o),u=e.end===void 0?l?i:0:md(t,e.end,o),f=Math.min(c,u),d=Math.abs(u-c);return l?{x:f,y:0,w:d,h:s}:{x:0,y:f,w:i,h:d}}class N0{constructor(e,n){Kl(this,"engine",e),Kl(this,"theme",n),Kl(this,"painter"),this.painter=new od(e.ctx)}get ctx(){return this.painter.context}withContext(e,n){this.painter.withContext(e,n)}draw(e){this.drawRegions(e),this.drawGrid(e),this.drawAxis(e)}drawAxis(e){const{config:n}=e;n.axis_x_show&&this.drawXAxis(e),n.axis_y_show&&this.drawYAxis(e),n.axis_y2_show&&e.scale.y2&&this.drawYAxis(e,"y2"),this.drawAdditionalAxes(e),this.drawAxisLabels(e)}drawSubXAxis(e){var n,r,i,s;const{ctx:o,painter:l,theme:{style:{axis:c}}}=this,{config:u,format:f,scale:d,state:{current:h,margin2:m,width2:S,height2:E}}=e;if(!u.subchart_show||!u.subchart_axis_x_show||!d.subX||S<=0||E<=0)return;const C=u.axis_rotated,w=l.crisp(m.left,c.lineWidth),$=l.crisp(m.top+E,c.lineWidth),z=m.left,B=m.left+S,W=m.top,H=m.top+E,_=C?W:z,q=C?H:B,st=ad(e),it=i0(e,st,c.tickWidth),ot=(n=u.subchart_axis_x_tick_outer)!=null?n:u.axis_x_tick_outer,ct=C?u.axis_x_tick_inner?1:-1:u.axis_x_tick_inner?-1:1,gt=gd(C),tt=Zl(C),ft=u.axis_x_tick_text_position,lt=C?0:((r=e.getAxisTickRotate)==null?void 0:r.call(e,"x"))||0,bt=f.subXAxisTick||((s=(i=e.axis)==null?void 0:i.getXAxisTickFormat)==null?void 0:s.call(i,!0));l.clipRect(C?Ql(m,h.width,E):ud(cd({},Jl(m,S,h.height-m.top)),{y:m.top}),()=>{o.globalAlpha=1,o.strokeStyle=c.lineColor,o.lineWidth=c.lineWidth,o.setLineDash([]),l.strokePath(()=>{C?l.traceLine(w,W,w,H):l.traceLine(z,$,B,$),ot&&(C?(l.traceLine(w,W,w+xt*gt,W),l.traceLine(w,H,w+xt*gt,H)):(l.traceLine(z,$,z,$+xt*gt),l.traceLine(B,$,B,$+xt*gt)))});const St=Zi(c,"x");o.font=St,o.fillStyle=c.labelColor,o.textAlign=C?tt>0?"left":"right":"center",o.textBaseline=C?"middle":tt>0?"top":"bottom",o.strokeStyle=c.tickColor,o.lineWidth=c.tickWidth;const Mt=_l(l,mr(St)),Ot=tc(e,st,C,d.subX);if(u.subchart_axis_x_tick_show)for(const Kt of it){const ee=d.subX(Vr(e,Kt)),Ae=m.left+ee,Ee=m.top+ee;co(C?Ee:Ae,_,q)&&l.strokePath(()=>{C?l.traceLine(w,Ee,w+xt*ct,Ee):l.traceLine(Ae,$,Ae,$+xt*ct)})}for(const Kt of st){const ee=d.subX(Vr(e,Kt)),Ae=m.left+ee,Ee=m.top+ee;if(!co(C?Ee:Ae,_,q)||!u.subchart_axis_x_tick_text_show)continue;const De=vd(e,l,bt,Kt,st,C,d.subX,Ot);let me,Pe;C?(me=w+(xt+mt)*tt+(ft.x||0),Pe=Ee+(ft.y||0),o.textAlign=tt>0?"left":"right",o.textBaseline="middle"):(me=Ae+(ft.x||0),Pe=$+(xt+mt)*tt+(ft.y||0),o.textAlign=lt?lt>0?"left":"right":"center",o.textBaseline=tt>0?"top":"bottom"),l.withState(Zt=>{Zt.translate(me,Pe),lt&&Zt.rotate(lt*Math.PI/180),De.forEach((he,ge)=>{Zt.fillText(he,0,ge*Mt)})})}})}drawSubYAxes(e){const{config:n,scale:r,state:{margin2:i,width2:s,height2:o}}=e;!n.subchart_show||s<=0||o<=0||["y","y2"].forEach(l=>{var c;const u=l==="y2"?r.subY2:r.subY;!n[`subchart_axis_${l}_show`]||!u||this.drawYAxis(e,l,{scale:u,ticks:Ki(e,l,void 0,!0,u,`subchart_axis_${l}`),format:T0(e,l),index:0,outerTick:(c=n[`subchart_axis_${l}_tick_outer`])!=null?c:n[`axis_${l}_tick_outer`],margin:i,width:s,height:o,prefix:`subchart_axis_${l}`,tickShow:n[`subchart_axis_${l}_tick_show`],tickTextShow:n[`subchart_axis_${l}_tick_text_show`],tickTextPosition:n[`axis_${l}_tick_text_position`]})})}drawTitle(e){var n,r;const{ctx:i,painter:s,theme:{style:{title:o}}}=this,{config:l,state:{current:c}}=e;if(!l.title_text)return;const u=String(l.title_text).split(`
35
+ `),f=mr(o.font),d=f*1.5,{x:h,align:m}=P0(l.title_position,c.width),S=(r=(n=e.getCanvasTitleHeight)==null?void 0:n.call(e))!=null?r:f,E=(l.title_padding.top||0)+S;s.withState(()=>{i.font=o.font,i.fillStyle=o.color,i.textAlign=m,i.textBaseline="alphabetic",u.forEach((C,w)=>{i.fillText(C,h,E+(w?f+(w-1)*d:0))})})}drawAxisLabels(e){const{ctx:n,painter:r,theme:{style:{axis:i}}}=this,{axis:s,config:o}=e,l=mr(i.labelFont),c=["x","y","y2"],u={x:i.xLabelColor,y:i.yLabelColor,y2:i.y2LabelColor},f={start:"left",middle:"center",end:"right"};s&&r.withState(()=>{n.font=i.labelFont,n.textBaseline="alphabetic",c.forEach(d=>{const h=s.getLabelText(d);if(!h||!o[`axis_${d}_show`]||d==="y2"&&!e.scale.y2)return;const m=d==="x"&&o.axis_rotated||d!=="x"&&!o.axis_rotated,S=C0(e,d),E=s.xForAxisLabel(d)+ql(s.dxForAxisLabel(d),l),C=ql(s.dyForAxisLabel(d),l),{x:w,y:$}=I0(S,E,C,m),z=s.textAnchorForAxisLabel(d);n.fillStyle=u[d]||i.labelColor,n.textAlign=f[z]||"center",r.text(String(h),w,$,{angle:m?-90:0})})})}drawGrid(e){const{ctx:n,painter:r,theme:{style:{grid:i}}}=this,{config:s,scale:o,state:{height:l,margin:c,width:u}}=e;if(!i.lineColor)return;const f=s.axis_rotated,d=c.left,h=c.left+u,m=c.top,S=c.top+l;r.withState(()=>{n.strokeStyle=i.lineColor,n.lineWidth=i.lineWidth,i.dashArray.length&&n.setLineDash(i.dashArray),s.grid_x_show&&o.x&&r.strokePath(()=>{for(const E of so(e)){const C=nc(e,E);ua(C)&&(f?r.traceCrispLine(d,c.top+C,h,c.top+C,i.lineWidth):r.traceCrispLine(c.left+C,m,c.left+C,S,i.lineWidth))}}),s.grid_y_show&&o.y&&r.strokePath(()=>{for(const E of u0(e)){const C=Hi(e,E),w=o.y(C);ua(w)&&(f?r.traceCrispLine(c.left+w,m,c.left+w,S,i.lineWidth):r.traceCrispLine(d,c.top+w,h,c.top+w,i.lineWidth))}}),!s.grid_lines_front&&this.drawGridLines(e)})}drawRegions(e){const{ctx:n,painter:r,theme:{style:{region:i}}}=this,{config:s,state:{height:o,margin:l,width:c}}=e,u=s.regions||[];u.length&&r.clipRect({x:l.left,y:l.top,w:c,h:o},()=>{var f;n.fillStyle=i.fill,n.font=i.labelFont,n.textBaseline="top";for(const d of u){const h=F0(e,d);if(!h||!ua(h.x)||!ua(h.y)||!h.w||!h.h)continue;const m=l.left+h.x,S=l.top+h.y,E=h.w,C=h.h;if(n.globalAlpha=Number.isFinite(d.opacity)?d.opacity:i.opacity,r.fillRect({x:m,y:S,w:E,h:C}),(f=d.label)!=null&&f.text){const w=d.label,$=w.center||"",z=String(w.text),B=r.measureText(z).width,W=parseFloat(n.font)||12;let H=m+(w.x||0),_=S+(w.y||0);$.indexOf("x")>-1&&(H+=(E-B)/2),$.indexOf("y")>-1&&(_+=(C-W)/2),r.text(z,H,_,{angle:w.rotated?-90:0,alpha:1,fill:w.color||i.labelColor})}}})}drawGridLines(e){const{ctx:n,painter:r,theme:{style:{axis:i,grid:s}}}=this,{config:o,scale:l,state:{height:c,margin:u,width:f}}=e,d=o.axis_rotated,h=u.left,m=u.left+f,S=u.top,E=u.top+c;s.lineColor&&r.withState(()=>{n.strokeStyle=s.lineColor,n.lineWidth=s.lineWidth,n.font=s.labelFont||i.labelFont,n.fillStyle=s.labelColor,n.textBaseline="middle",n.setLineDash([]);const C=(W,H,_,q=!1,st)=>{W&&r.text(W,H,_,ud(cd({},st),{angle:q?-90:0}))},w=(W,H,_)=>{const q=b0(this.theme.getGridLineStyle(H,W,"line"));r.strokePath(_,q)},$=(W,H)=>S0(this.theme.getGridLineStyle(W,H,"text")),z=W=>{if(W.value===void 0||!l.x)return;const H=nc(e,W.value);if(ua(H))if(d){const _=u.top+H;w(W,"x",()=>{r.traceLine(h,_,m,_)}),n.textAlign=W.position==="start"?"left":W.position==="middle"?"center":"right",C(W.text,xd(W.position,h,m),_-5,!1,$("x",W))}else{const _=u.left+H;w(W,"x",()=>{r.traceLine(_,S,_,E)}),n.textAlign=W.position==="start"?"left":W.position==="middle"?"center":"right",C(W.text,_-5,yd(W.position,S,E),!0,$("x",W))}},B=W=>{const H=W.axis==="y2"?l.y2:l.y,_=W.axis==="y2"?"y2":"y";if(W.value===void 0||!H)return;const q=Hi(e,W.value,_),st=H(q);if(ua(st))if(d){const it=u.left+st;w(W,"y",()=>{r.traceLine(it,S,it,E)}),n.textAlign=W.position==="start"?"left":W.position==="middle"?"center":"right",C(W.text,it-5,yd(W.position,S,E),!0,$("y",W))}else{const it=u.top+st;w(W,"y",()=>{r.traceLine(h,it,m,it)}),n.textAlign=W.position==="start"?"left":W.position==="middle"?"center":"right",C(W.text,xd(W.position,h,m),it-5,!1,$("y",W))}};(o.grid_x_lines||[]).forEach(z),(o.grid_y_lines||[]).forEach(B)})}drawAdditionalAxes(e){["x","y","y2"].forEach(n=>{const r=e.config[`axis_${n}_axes`]||[];!r.length||!e.scale[n]||!e.config[`axis_${n}_show`]||r.forEach((i,s)=>{var o;const l=s0(e,n,i);if(!l)return;const c={scale:l,ticks:o0(e,n,l,i),format:l0(e,i),index:s+1,outerTick:((o=i.tick)==null?void 0:o.outer)!==!1};n==="x"?this.drawXAxis(e,c):this.drawYAxis(e,n,c)})})}drawXAxis(e,n){var r;const{ctx:i,painter:s,theme:{style:{axis:o}}}=this,{axis:l,config:c,state:{current:u,margin:f,width:d,height:h}}=e,m=c.axis_rotated,S=n!=null&&n.index?e.getAxisSize("x")*n.index:0,E=(n==null?void 0:n.scale)||Zn(e),C=s.crisp(f.left-(m?S:0),o.lineWidth),w=s.crisp(f.top+h+(m?0:S),o.lineWidth),$=f.left,z=f.left+d,B=f.top,W=f.top+h,H=m?B:$,_=m?W:z,q=(n==null?void 0:n.ticks)||so(e),st=(n==null?void 0:n.ticks)||a0(e,q,o.tickWidth),it=(n==null?void 0:n.format)||l.getXAxisTickFormat(),ot=n?n.outerTick:c.axis_x_tick_outer,ct=m?c.axis_x_tick_inner?1:-1:c.axis_x_tick_inner?-1:1,gt=gd(m),tt=Zl(m),ft=c.axis_x_tick_text_position,lt=m?0:((r=e.getAxisTickRotate)==null?void 0:r.call(e,"x"))||0;s.clipRect(m?Ql(f,u.width,h):Jl(f,d,u.height),()=>{if(i.strokeStyle=o.lineColor,i.lineWidth=o.lineWidth,s.strokePath(()=>{m?s.traceLine(C,B,C,W):s.traceLine($,w,z,w),ot&&(m?(s.traceLine(C,B,C+xt*gt,B),s.traceLine(C,W,C+xt*gt,W)):(s.traceLine($,w,$,w+xt*gt),s.traceLine(z,w,z,w+xt*gt)))}),i.font=Zi(o,"x"),i.fillStyle=o.labelColor,i.textAlign=m?tt>0?"left":"right":"center",i.textBaseline=m?"middle":tt>0?"top":"bottom",i.strokeStyle=o.tickColor,i.lineWidth=o.tickWidth,c.axis_x_tick_show&&s.strokePath(()=>{for(const Ot of st){const Kt=Vl(e,Ot,E),ee=f.left+Kt,Ae=f.top+Kt;co(m?Ae:ee,H,_)&&(m?s.traceLine(C,Ae,C+xt*ct,Ae):s.traceLine(ee,w,ee,w+xt*ct))}}),!n&&!c.axis_x_tick_text_show)return;const bt=Zi(o,"x"),St=_l(s,mr(bt)),Mt=tc(e,q,m,E);q.forEach((Ot,Kt)=>{this.drawXAxisTickText(e,Ot,it,o.labelColor,{isRotated:m,rangeEnd:_,rangeStart:H,tickCount:q.length,tickFont:bt,tickIndex:Kt,tickLineHeight:St,tickTextDirection:tt,tickTextWidth:Mt,tickRotate:lt,tickTextPosition:ft,targetScale:E,ticks:q,x:C,y:w})})})}drawFocusedXAxisTick(e,n){var r;const{painter:i,theme:{style:{axis:s}}}=this,{axis:o,config:l,state:{current:c,margin:u,width:f,height:d}}=e,h=(r=n==null?void 0:n[0])==null?void 0:r.x;if(h===void 0||!o||!l.axis_x_show||!l.axis_x_tick_text_show||!s.activeLabelColor||s.activeLabelColor===s.labelColor)return;const m=so(e),S=m.findIndex(_=>Yi(_,h)),E=m[S];if(E===void 0)return;const C=l.axis_rotated,w=i.crisp(u.left,s.lineWidth),$=i.crisp(u.top+d,s.lineWidth),z=C?u.top:u.left,B=C?u.top+d:u.left+f,W=o.getXAxisTickFormat(),H=Zl(C);i.clipRect(C?Ql(u,c.width,d):Jl(u,f,c.height),()=>{var _;this.drawXAxisTickText(e,E,W,s.activeLabelColor,{isRotated:C,rangeEnd:B,rangeStart:z,targetScale:Zn(e),tickCount:m.length,tickIndex:S,tickTextDirection:H,tickRotate:C?0:((_=e.getAxisTickRotate)==null?void 0:_.call(e,"x"))||0,tickTextPosition:l.axis_x_tick_text_position,ticks:m,x:w,y:$})})}drawAxisTooltip(e,n){const{ctx:r,painter:i,theme:{style:{axis:s,grid:o}}}=this,{config:l,state:{margin:c,width:u,height:f}}=e;if(!l.axis_tooltip||!n)return;const d=l.axis_rotated,h=n[0]-c.left,m=n[1]-c.top,S=h>=0&&h<=u,E=m>=0&&m<=f;if(!S&&!E)return;const C=c.left+h,w=c.top+m,$=mr(s.labelFont),z=$||10,B=(W,H,_,q,st)=>{const it=A0(e,W),ot=it&&E0(e,W,H);if(!ot)return;r.font=s.labelFont,r.textAlign=st,r.textBaseline="alphabetic";const ct=r.measureText(ot),gt=ct.width,tt=ct.actualBoundingBoxAscent||z*.8,ft=ct.actualBoundingBoxDescent||z*.2,lt=Math.max(2,gt*.15),bt=Math.max(3,z*.25),St=st==="right"?_-gt:st==="center"?_-gt/2:_,Mt=q-tt;r.fillStyle=it,r.fillRect(St-lt,Mt-bt,gt+lt*2,tt+ft+bt*2),r.fillStyle="#fff",r.fillText(ot,_,q)};i.withState(()=>{r.strokeStyle=o.lineColor,r.lineWidth=o.lineWidth,r.setLineDash([]),i.strokePath(()=>{S&&i.traceLine(C,c.top,C,c.top+f),E&&i.traceLine(c.left,w,c.left+u,w)}),r.setLineDash([]),d?(E&&l.axis_x_show&&B("x",m,c.left-$*.3,w+$*.4,"right"),S&&l.axis_y_show&&B("y",h,C-$*1.3,c.top+f+$*1.15,"left"),S&&l.axis_y2_show&&e.scale.y2&&B("y2",h,C-$*1.3,c.top-$*.4,"left")):(S&&l.axis_x_show&&B("x",h,C-$,c.top+f+$*1.15,"left"),E&&l.axis_y_show&&B("y",m,c.left-$*.4,w+$*.3,"right"),E&&l.axis_y2_show&&e.scale.y2&&B("y2",m,c.left+u+$*.4,w+$*.3,"left"))})}drawXAxisTickText(e,n,r,i,s){var o,l;const{ctx:c,painter:u,theme:{style:{axis:f}}}=this,{state:{margin:d}}=e,{isRotated:h,rangeEnd:m,rangeStart:S,tickTextDirection:E,tickRotate:C,tickTextPosition:w,targetScale:$,ticks:z,x:B,y:W}=s,H=nc(e,n,$),_=d.left+H,q=d.top+H;if(!co(h?q:_,S,m))return;const it=(o=s.tickFont)!=null?o:Zi(f,"x");c.font=it,c.fillStyle=i;const ot=vd(e,u,r,n,z,h,$,s.tickTextWidth),ct=(l=s.tickLineHeight)!=null?l:_l(u,mr(it));let gt,tt;if(h)gt=B+(xt+mt)*E+(w.x||0),tt=q+(w.y||0),c.textAlign=ec(e,s),c.textBaseline="middle";else if(C){const ft=mr(it),lt=w.y?ql(w.y,ft):.71*ft,bt=w0(C)+(w.x||0),St=R0(C)+lt;c.textAlign=ec(e,s),c.textBaseline="alphabetic",u.withState(Mt=>{Mt.translate(_,W),Mt.rotate(C*Math.PI/180),ot.forEach((Ot,Kt)=>{Mt.fillText(Ot,bt,St+Kt*ct)})});return}else gt=_+(w.x||0),tt=W+(xt+mt)*E+(w.y||0),c.textAlign=ec(e,s),c.textBaseline=E>0?"top":"bottom";u.withState(ft=>{ft.translate(gt,tt),C&&ft.rotate(C*Math.PI/180),ot.forEach((lt,bt)=>{ft.fillText(lt,0,bt*ct)})})}drawYAxis(e,n="y",r){var i,s,o,l,c,u,f,d;const{ctx:h,painter:m,theme:{style:{axis:S}}}=this,{config:E,scale:C,state:w}=e,{margin:$,width:z,height:B}=w,W=(r==null?void 0:r.margin)||$,H=(i=r==null?void 0:r.width)!=null?i:z,_=(s=r==null?void 0:r.height)!=null?s:B,q=(r==null?void 0:r.prefix)||`axis_${n}`,st=(r==null?void 0:r.scale)||C[n],it=n==="y2",ot=E.axis_rotated,ct=r!=null&&r.index?e.getAxisSize(n)*r.index:0,gt=m.crisp(W.left+(it?H+(ot?0:ct):-ct),S.lineWidth),tt=m.crisp(W.top+(ot?it?-ct-1:_+ct:0),S.lineWidth),ft=W.left,lt=W.left+H,bt=W.top,St=W.top+_,Mt=(r==null?void 0:r.ticks)||Ki(e,n),Ot=(r==null?void 0:r.ticks)||(E[`${q}_tick_culling`]&&E[`${q}_tick_culling_lines`]!==!1?Ki(e,n,void 0,!1):Mt),Kt=(r==null?void 0:r.format)||((c=(l=(o=e.axis)==null?void 0:o[n])==null?void 0:l.tickFormat)==null?void 0:c.call(l))||((u=E[`${q}_tick_format`])==null?void 0:u.bind(e.api))||(Zt=>Zt),ee=r?r.outerTick:E[`${q}_tick_outer`],Ae=ot?it?E.axis_y2_tick_inner?1:-1:E.axis_y_tick_inner?-1:1:it?E.axis_y2_tick_inner?-1:1:E.axis_y_tick_inner?1:-1,Ee=M0(E,ot,it),Te=y0(ot,it),De=(r==null?void 0:r.tickTextPosition)||E[`${q}_tick_text_position`]||E[`axis_${n}_tick_text_position`],me=(f=r==null?void 0:r.tickShow)!=null?f:r?!0:E[`${q}_tick_show`],Pe=(d=r==null?void 0:r.tickTextShow)!=null?d:r?!0:E[`${q}_tick_text_show`];m.withState(()=>{h.strokeStyle=S.lineColor,h.lineWidth=S.lineWidth,m.strokePath(()=>{ot?m.traceLine(ft,tt,lt,tt):m.traceLine(gt,bt,gt,St),ee&&(ot?(m.traceLine(ft,tt,ft,tt+xt*Ee),m.traceLine(lt,tt,lt,tt+xt*Ee)):(m.traceLine(gt,bt,gt+xt*Ee,bt),m.traceLine(gt,St,gt+xt*Ee,St)))});const Zt=Zi(S,n);h.font=Zt,h.fillStyle=S.labelColor,h.textAlign=ot?"center":Te>0?"left":"right",h.textBaseline=ot?Te>0?"top":"bottom":"middle",h.strokeStyle=S.tickColor,h.lineWidth=S.tickWidth;const he=[],ge=[],Wt=(We,Xe)=>{const pn=Hi(e,We,n),Cn=W.left+st(pn),be=W.top+st(pn);ua(ot?Cn:be)&&Xe.push({tick:We,tx:Cn,ty:be})};for(const We of Mt)Wt(We,he);for(const We of Ot)Wt(We,ge);if(me&&m.strokePath(()=>{for(const{tx:We,ty:Xe}of ge)ot?m.traceLine(We,tt,We,tt+xt*Ae):m.traceLine(gt,Xe,gt+xt*Ae,Xe)}),Pe)for(const{tick:We,tx:Xe,ty:pn}of he)ot?m.text(hd(Kt,We),Xe+(De.x||0),tt+xt*Te+(De.y||0)):m.text(hd(Kt,We),gt+(xt+mt)*Te+(De.x||0),pn+(De.y||0))})}}const cr={canvas:"bb-canvas",overlay:"bb-canvas-overlay",legend:"bb-canvas-legend",legendBottom:"bb-canvas-legend-bottom",legendInset:"bb-canvas-legend-inset",legendItemInteractive:"bb-legend-item-interactive",legendItemTileCircle:"bb-legend-item-tile-circle",legendItemTitle:"bb-legend-item-title",legendRight:"bb-canvas-legend-right"};var Aw=cr,$0=Object.defineProperty,B0=(t,e,n)=>e in t?$0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ri=(t,e,n)=>B0(t,typeof e!="symbol"?e+"":e,n);class z0{constructor(){ri(this,"canvas"),ri(this,"ctx"),ri(this,"dpr",1),ri(this,"frame",null),ri(this,"frameCtx",null),ri(this,"frameValid",!1)}init(e,n,r){this.canvas=Ye.createElement("canvas"),this.canvas.className=cr.canvas,this.canvas.style.display="block",e.appendChild(this.canvas),this.dpr=se.devicePixelRatio||1,this.ctx=this.canvas.getContext("2d"),this.resize(n,r)}resize(e,n){const r=Math.max(0,e),i=Math.max(0,n);this.dpr=se.devicePixelRatio||1,this.canvas.width=r*this.dpr,this.canvas.height=i*this.dpr,this.canvas.style.width=`${r}px`,this.canvas.style.height=`${i}px`,this.ctx.setTransform(this.dpr,0,0,this.dpr,0,0),this.frame=null,this.frameCtx=null,this.frameValid=!1}clearOverlay(){this.frameValid&&this.restoreFrame()}withOverlay(e){const{ctx:n}=this;this.frameValid?this.clearOverlay():this.captureFrame(),n.save(),n.setTransform(this.dpr,0,0,this.dpr,0,0);try{e(n)}finally{n.restore()}}beginFrame(e,n){const{ctx:r}=this;this.frameValid=!1,r.save(),r.setTransform(this.dpr,0,0,this.dpr,0,0),r.clearRect(0,0,e,n)}endFrame(){this.ctx.restore()}captureFrame(){const{canvas:e}=this;if(this.frameValid=!1,e.width&&e.height){let{frame:n,frameCtx:r}=this;if(!n){const i=Ye.createElement("canvas");n=i,r=i.getContext("2d"),this.frame=n,this.frameCtx=r}if(!n||!r)return;r.setTransform(1,0,0,1,0,0),n.width!==e.width||n.height!==e.height?(n.width=e.width,n.height=e.height):r.clearRect(0,0,e.width,e.height),r.drawImage(e,0,0),this.frameValid=!0}}restoreFrame(){if(!this.frameValid||!this.frame||!this.frameCtx)return;const{canvas:e,ctx:n}=this;n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,e.width,e.height),n.drawImage(this.frame,0,0),n.restore(),n.setTransform(this.dpr,0,0,this.dpr,0,0)}destroy(){var e;(e=this.canvas)==null||e.remove(),this.frame=null,this.frameCtx=null,this.frameValid=!1}}function rc(t){const{config:e,state:n}=t;return!!(e.subchart_grid_focus_continuous&&e.subchart_grid_focus!==!1&&e.subchart_show&&e.subchart_brush_enabled===!1&&n.width2>0&&n.height2>0)}function Td(t,e){var n;const{config:r,scale:i,state:s}=t,o=i.zoom||i.x,l=i.subX;if(!o||!l)return null;const c=r.axis_rotated?s.height2:s.width2,u=r.axis_rotated?s.height:s.width,f=(n=l.invert)==null?void 0:n.call(l,e);let d=f==null?NaN:o(f);return!Number.isFinite(d)&&c>0&&(d=Math.max(0,Math.min(1,e/c))*u),Number.isFinite(d)?Math.max(0,Math.min(u,d)):null}const ac=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bd=/([aAcChHlLmMqQsStTvVzZ])|([-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?)/g;function U0(t){const e=new Set;let n=-1,r=0,i=!1,s;for(bd.lastIndex=0;s=bd.exec(t);)if(s[1])i=s[1]==="a"||s[1]==="A",r=0;else if(n++,i){const o=r%7;(o===2||o===3||o===4)&&e.add(n),r++}return e}function k0(t,e){const n=U0(e),r=[],i=[];let s=0,o=-1,l=-1,c,u;const f=m=>{r[o]?r[o]+=m:r[++o]=m};ac.lastIndex=0;const d=ac,h=new RegExp(ac.source,"g");for(t+="",e+="";(c=d.exec(t))&&(u=h.exec(e));){if(l++,u.index>s&&f(e.slice(s,u.index)),c[0]===u[0])f(u[0]);else{const m=+c[0],S=+u[0],E=n.has(l);r[++o]=null,i.push({index:o,fn:E?C=>Math.round(m+(S-m)*C):C=>m+(S-m)*C})}s=h.lastIndex}if(s<e.length&&f(e.slice(s)),!i.length){const m=r.join("");return()=>m}return m=>{for(let S=0,E=i.length;S<E;S++){const{index:C,fn:w}=i[S];r[C]=String(w(m))}return r.join("")}}function uo(t){const{bar_radius:e,bar_radius_ratio:n}=t.config;return ae(e)&&e>0?()=>e:ae(n)?r=>r*n:null}function ic(t){const{config:e,data:n}=t,r=new Set;if(!e.data_groups.length)return r;const i=t.orderTargets(t.filterTargetsToShow(n.targets.filter(t.isBarType,t)));for(const s of e.data_groups){const o=new Set(s),l=new Map,c=new Map;for(const u of i)if(o.has(u.id))for(const f of u.values)f.value===null||f.value===0||(f.value>0?l:c).set(f.index,u.id);for(const[u,f]of l)r.add(`${f}:${u}`);for(const[u,f]of c)r.add(`${f}:${u}`)}return r}function G0(t,e,n){return n?t?e?{tl:n,bl:n}:{tr:n,br:n}:e?{br:n,bl:n}:{tl:n,tr:n}:0}function X0(t,e,n,r){let i="";return n?r&&t[0]<e?i=`0 ${e-t[0]}px 0 0`:!r&&t[0]>e&&(i=`0 0 0 ${t[0]-e}px`):r&&t[1]>e?i=`${t[1]-e}px 0 0 0`:!r&&t[1]<e&&(i=`0 0 ${e-t[1]}px 0`),i?`inset(${i})`:null}function sc(t,e,n,r,i,s){const{config:o,state:l}=t,c=o.axis_rotated,u=+c,f=+!u,d=e.value<0,h=o[`axis_${t.axis.getId(e.id)}_inverted`],m=!h&&d||h&&!d,S=t.isGrouped(e.id),E=r&&S&&e.value!==0?l.hiddenTargetIds.has(e.id)&&s?s(e):i.has(`${e.id}:${e.index}`):!1,C=[n[0][u],n[0][f]];let w=0;if(r){const z=c?f:u,B=Math.abs(n[2][z]-n[0][z]);w=Math.max(0,!S||E?r(B):0)}const $=c?n[1][u]+(m?w:-w):n[1][f]+(m?-w:w);return{radius:w,corners:G0(c,m,w),clipPath:w?X0(C,$,c,m):null,indexX:u,indexY:f,isNegative:m,pos:$}}const Sd="2 2";function Ad(t,e,n){const r=t.axis.isTimeSeries(),i=(s,o)=>mn(s)?o:r?Wn.call(t,s):s;return(n||[]).map(s=>{var o,l;return{start:i(s.start,(o=e[0])==null?void 0:o.x),end:i(s.end,(l=e[e.length-1])==null?void 0:l.x),style:s.style||{dasharray:Sd}}})}function Ed(t,e){for(let n=0,r;r=e[n];n++)if(r.start<t&&t<=r.end)return r.style;return!1}function W0(t){const e=String((t==null?void 0:t.dasharray)||Sd).split(/[\s,]+/).map(Number).filter(Number.isFinite);return e.length?e:[2,2]}function V0(t,e,n,r,i){const s=t.config.axis_rotated,o=Ad(t,e,i),l=[];for(let c=1;c<e.length;c++){const u=e[c-1],f=e[c];if(!Ge(u.value)||!Ge(f.value)){l.push({isBreak:!0});continue}const d=Ed(f.x,o),h=n(u.x),m=r(u.value),S=n(f.x),E=r(f.value);l.push({start:s?[m,h]:[h,m],end:s?[E,S]:[S,E],dash:d?W0(d):[]})}return l}function fo(t,e){return t.config.axis_rotated?[e[1],e[0]]:[e[0],e[1]]}function Cd(t,e,n=1){const r=e.map(h=>fo(t,h)),i=r.map(([h])=>h),s=r.map(([,h])=>h),o=Math.min(...i),l=Math.min(...s),c=Math.max(...i)-o,u=Math.max(...s)-l,f=Math.max(n,c),d=Math.max(n,u);return{x:o-(f-c)/2,y:l-(d-u)/2,w:f,h:d}}function Ji(t,e){var n,r;const i=(n=t.isGrouped)!=null&&n.call(t,e.id)&&t.circleY?t.circleY(e,e.index):t.getYScaleById(e.id)(t.getBaseValue(e)),s=(r=t.xx(e))!=null?r:NaN;return t.config.axis_rotated?{x:i,y:s}:{x:s,y:i}}function j0(t,e,n){return{x:t.cx(e,n),y:t.cy(e,n)}}function H0(t,e){return{body:Cd(t,[e[0],e[1]]),wickStart:fo(t,[e[2][0],e[2][1]]),wickEnd:fo(t,[e[2][0],e[2][2]])}}function ai(t,e,n,r=!1){if(e===n)return{x:0,y:0,w:t.state.width,h:0};const{scale:{x:i,y:s}}=t,o=i(e.x0),l=s(e.y0),c=i(e.x1)-o,u=s(e.y1)-l;return{x:o,y:l,w:r?Math.max(0,c):c,h:r?Math.max(0,u):u}}function Y0(t,e,n,r){const{config:i}=t,{id:s,value:o,ratio:l=0}=e,c=i.treemap_label_format,u=typeof c=="function"?c.bind(t.api)(o,l,s,{width:n,height:r}):`${s}
36
+ ${(l*100).toFixed(2)}%`;return u==null?null:String(u)}var Ew=Array.prototype.slice;function oc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Je(t){return function(){return t}}function Id(t){this._context=t}Id.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function ho(t){return new Id(t)}var K0=Math.pow;const lc=Math.PI,cc=2*lc,La=1e-6,Z0=cc-La;function Rd(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function J0(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Rd;const n=K0(10,e);return function(r){this._+=r[0];for(let i=1,s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class vo{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Rd:J0(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,s,o){this._append`C${+e},${+n},${+r},${+i},${this._x1=+s},${this._y1=+o}`}arcTo(e,n,r,i,s){if(e=+e,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,l=this._y1,c=r-e,u=i-n,f=o-e,d=l-n,h=f*f+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>La)if(!(Math.abs(d*c-u*f)>La)||!s)this._append`L${this._x1=e},${this._y1=n}`;else{let m=r-o,S=i-l,E=c*c+u*u,C=m*m+S*S,w=Math.sqrt(E),$=Math.sqrt(h),z=s*Math.tan((lc-Math.acos((E+h-C)/(2*w*$)))/2),B=z/$,W=z/w;Math.abs(B-1)>La&&this._append`L${e+B*f},${n+B*d}`,this._append`A${s},${s},0,0,${+(d*m>f*S)},${this._x1=e+W*c},${this._y1=n+W*u}`}}arc(e,n,r,i,s,o){if(e=+e,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),c=r*Math.sin(i),u=e+l,f=n+c,d=1^o,h=o?i-s:s-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>La||Math.abs(this._y1-f)>La)&&this._append`L${u},${f}`,r&&(h<0&&(h=h%cc+cc),h>Z0?this._append`A${r},${r},0,1,${d},${e-l},${n-c}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:h>La&&this._append`A${r},${r},0,${+(h>=lc)},${d},${this._x1=e+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Q0(){return new vo}Q0.prototype=vo.prototype;function Cw(t=3){return new vo(+t)}function uc(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new vo(e)}function wd(t){return t[0]}function Od(t){return t[1]}function fc(t,e){var n=Je(!0),r=null,i=ho,s=null,o=uc(l);t=typeof t=="function"?t:t===void 0?wd:Je(t),e=typeof e=="function"?e:e===void 0?Od:Je(e);function l(c){var u,f=(c=oc(c)).length,d,h=!1,m;for(r==null&&(s=i(m=o())),u=0;u<=f;++u)!(u<f&&n(d=c[u],u,c))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+t(d,u,c),+e(d,u,c));if(m)return s=null,m+""||null}return l.x=function(c){return arguments.length?(t=typeof c=="function"?c:Je(+c),l):t},l.y=function(c){return arguments.length?(e=typeof c=="function"?c:Je(+c),l):e},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Je(!!c),l):n},l.curve=function(c){return arguments.length?(i=c,r!=null&&(s=i(r)),l):i},l.context=function(c){return arguments.length?(c==null?r=s=null:s=i(r=c),l):r},l}function _0(t,e,n){var r=null,i=Je(!0),s=null,o=ho,l=null,c=uc(u);t=typeof t=="function"?t:t===void 0?wd:Je(+t),e=typeof e=="function"?e:Je(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?Od:Je(+n);function u(d){var h,m,S,E=(d=oc(d)).length,C,w=!1,$,z=new Array(E),B=new Array(E);for(s==null&&(l=o($=c())),h=0;h<=E;++h){if(!(h<E&&i(C=d[h],h,d))===w)if(w=!w)m=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),S=h-1;S>=m;--S)l.point(z[S],B[S]);l.lineEnd(),l.areaEnd()}w&&(z[h]=+t(C,h,d),B[h]=+e(C,h,d),l.point(r?+r(C,h,d):z[h],n?+n(C,h,d):B[h]))}if($)return l=null,$+""||null}function f(){return fc().defined(i).curve(o).context(s)}return u.x=function(d){return arguments.length?(t=typeof d=="function"?d:Je(+d),r=null,u):t},u.x0=function(d){return arguments.length?(t=typeof d=="function"?d:Je(+d),u):t},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Je(+d),u):r},u.y=function(d){return arguments.length?(e=typeof d=="function"?d:Je(+d),n=null,u):e},u.y0=function(d){return arguments.length?(e=typeof d=="function"?d:Je(+d),u):e},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Je(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(t).y(e)},u.lineY1=function(){return f().x(t).y(n)},u.lineX1=function(){return f().x(r).y(e)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:Je(!!d),u):i},u.curve=function(d){return arguments.length?(o=d,s!=null&&(l=o(s)),u):o},u.context=function(d){return arguments.length?(d==null?s=l=null:l=o(s=d),u):s},u}var q0=Object.defineProperty,tT=Object.defineProperties,eT=Object.getOwnPropertyDescriptors,Pd=Object.getOwnPropertySymbols,nT=Object.prototype.hasOwnProperty,rT=Object.prototype.propertyIsEnumerable,Md=(t,e,n)=>e in t?q0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ld=(t,e)=>{for(var n in e||(e={}))nT.call(e,n)&&Md(t,n,e[n]);if(Pd)for(var n of Pd(e))rT.call(e,n)&&Md(t,n,e[n]);return t},Dd=(t,e)=>tT(t,eT(e));function Fd(t,e){return e?n=>{var r;const i=(r=t.getSubchartCandlestickShapeValue)==null?void 0:r.call(t,n,!0);return i===void 0?t.getBaseValue(n):i}:n=>t.getBaseValue(n)}function Nd(t,e,n){return n?e.map(r=>{var i;const s=(i=t.getSubchartCandlestickShapeValue)==null?void 0:i.call(t,r,n);return s===void 0?r:Dd(Ld({},r),{value:s})}):e}function aT(t,e,n){return t.isStepType(e)?t.convertValuesToStep(n):n}function $d(t,e,n,r){const{config:i,scale:s}=t,o=i.line_connectNull,l=i.axis_rotated,c=t.generateGetLinePoints(e,n),u=t.getYScaleById.bind(t),f=Fd(t,n),d=E=>(n?t.subxx:t.xx).call(t,E),h=(E,C)=>t.isGrouped(E.id)?c(E,C)[0][1]:u(E.id,n)(f(E));let m=fc();m=l?m.x(h).y(d):m.x(d).y(h),r&&(m=m.context(r)),o||(m=m.defined(E=>f(E)!==null));const S=n?s.subX:s.x;return E=>{const C=u(E.id,n);let w=o?t.filterRemoveNull(E.values):E.values,$=0,z=0,B;if(t.isLineType(E)){const W=i.data_regions[E.id];W&&!r&&t.lineWithRegions?(w=Nd(t,w,n),t.isAreaRangeType(E)&&(w=w.map(H=>Dd(Ld({},H),{value:t.getRangedData(H,"mid")}))),t.isStepType(E)&&(w=t.convertValuesToStep(w)),B=t.lineWithRegions(w,s.zoom||S,C,W)):B=m.curve(t.getCurve(E))(aT(t,E,w))}else w[0]&&($=S(w[0].x),z=C(f(w[0]))),B=l?`M ${z} ${$}`:`M ${$} ${z}`;return B||(r?void 0:"M 0 0")}}function Bd(t,e,n,r){const{config:i}=t,s=i.line_connectNull,o=i.axis_rotated,l=t.generateGetAreaPoints(e,n),c=t.getYScaleById.bind(t),u=Fd(t,n),f=new Map,d=E=>{let C=f.get(E);return C===void 0&&(C=t.getShapeYMin(E,n),f.set(E,C)),C},h=E=>(n?t.subxx:t.xx).call(t,E),m=(E,C)=>t.isGrouped(E.id)?l(E,C)[0][1]:c(E.id,n)(t.isAreaRangeType(E)?t.getRangedData(E,"high"):d(E.id)),S=(E,C)=>t.isGrouped(E.id)?l(E,C)[1][1]:c(E.id,n)(t.isAreaRangeType(E)?t.getRangedData(E,"low"):u(E));return E=>{let C=s?t.filterRemoveNull(E.values):E.values,w=0,$=0,z;if(t.isAreaType(E)){let B=_0();B=o?B.y(h).x0(m).x1(S):B.x(h).y0(i.area_above?0:i.area_below?n?t.state.height2:t.state.height:m).y1(S),r&&(B=B.context(r)),s||(B=B.defined(W=>u(W)!==null)),C=Nd(t,C,n),t.isStepType(E)&&(C=t.convertValuesToStep(C)),z=B.curve(t.getCurve(E))(C)}else C[0]&&(w=(n?t.scale.subX:t.scale.x)(C[0].x),$=t.getYScaleById(E.id,n)(u(C[0]))),z=o?`M ${$} ${w}`:`M ${w} ${$}`;return z||(r?void 0:"M 0 0")}}let jr;function go(t,e){if(!ae(e)||e>=1)return t;const n=t.match(/^#([\da-f]{3}|[\da-f]{6})$/i);if(n){const s=(n[1].length===3?n[1].split("").map(l=>l+l).join(""):n[1]).match(/.{2}/g);return s?`rgba(${s.map(l=>parseInt(l,16)).join(",")},${e})`:t}if(/^rgb\(/i.test(t))return t.replace(/^rgb\((.*)\)$/i,`rgba($1,${e})`);if(/^rgba\(/i.test(t))return t.replace(/^rgba\((.*),\s*([\d.]+)\)$/i,(i,s,o)=>`rgba(${s},${Number(o)*e})`);const r=iT(t);return r&&r!==t?go(r,e):t}function iT(t){if(!se.document||(jr===void 0&&(jr=se.document.createElement("canvas").getContext("2d")),!jr))return null;jr.fillStyle="#000",jr.fillStyle=t;const e=jr.fillStyle;jr.fillStyle="#fff",jr.fillStyle=t;const n=jr.fillStyle;return e===n?e:null}function Qi(t,e,n,r){const i=e(n,r),s=Cd(t,i);return gn(s.x,s.y)&&gn(s.x+s.w,s.y+s.h)?{points:i,rect:s}:null}function _i(t,e,n,r){const i=e(n,r),{body:s,wickStart:o,wickEnd:l}=H0(t,i);return gn(s.x,s.y)&&gn(s.x+s.w,s.y+s.h)&&gn(o[0],o[1])&&gn(l[0],l[1])?{body:s,points:i,wickStart:o,wickEnd:l}:null}const sT=1.2;function dc(t,e){var n,r,i;let{value:s}=e;if((n=t.isBubbleZType)!=null&&n.call(t,e))s=t.getBubbleZData(s,"z");else if((r=t.isCandlestickType)!=null&&r.call(t,e)){const o=(i=t.getCandlestickData)==null?void 0:i.call(t,e);o&&(s=o.close)}return s}function zd(t,e){const n=t.dataLabelFormat(e.id)(dc(t,e),e.id,e.index,[]);return n==null?null:String(n)}function Ud(t){return`${t.id}:${t.index}`}function hc(t,e,n){var r;if(!(e!=null&&e.length))return()=>!1;if(t.config.tooltip_grouped&&e.length>1){const s=(r=e[0])==null?void 0:r.index;return o=>s!==void 0&&o.index===s&&n(t,o)}const i=new Set(e.filter(s=>s&&n(t,s)).map(Ud));return s=>i.has(Ud(s))}function po(t,e,n,r){const i=t.config.data_labels_position;let s;if(ie(i))s=i.bind(t.api)(n,dc(t,e),e.id,e.index,r);else if(i){const o=e.id in i?i[e.id]:i;s=o==null?void 0:o[n]}return ae(s)?s:0}function oT(t,e){var n,r;const i=(n=t.config.data_labels)==null?void 0:n.image;if(ie(i))return(r=i.call(t.api,dc(t,e),e.id,e.index))!=null?r:null;if(i){const{url:s="",width:o=0,height:l=0,pos:c}=i;return{url:s,width:o,height:l,pos:c}}return null}function lT(t,e){return Pa(t.url,{ID:e.id})}function cT(t,e,n,r,i,s){var o,l,c;const{width:u=0,height:f=0,pos:d}=e,h=u/2,m=f/2,S=vc(t.canvasEngine.ctx,n,r,i).h,E=mr(t.canvasEngine.ctx.font),C=r-h,w=i-m-((o=t.isTreemapType)!=null&&o.call(t,s)?E*.7:S/2);let $=r,z=i;return t.config.axis_rotated?$+=h:z+=m,{x:C+((l=d==null?void 0:d.x)!=null?l:0),y:w+((c=d==null?void 0:d.y)!=null?c:0),textX:$,textY:z}}function kd(t,e,n){var r,i,s;const o=(r=t.updateTextColor)==null?void 0:r.call(t,e);return typeof o=="string"?o:(i=t.isTreemapType)!=null&&i.call(t,e)?n:((s=t.color)==null?void 0:s.call(t,e))||n}function uT(t,e){var n;const r=t.config.data_labels_backgroundColors;if(!r)return null;if(je(r))return r;if(ie(r)){const s=(n=t.color)==null?void 0:n.call(t,e),o=r.bind(t.api)(s,e);return o==null?null:String(o)}const i=r[e.id];return i==null?null:String(i)}function fT(t){var e,n,r;if(!t)return null;const i=He(t)?t:{};return{padding:jf((e=i.padding)!=null?e:"3 5"),radius:ae(i.radius)?i.radius:10,stroke:(n=i.stroke)!=null?n:"#000",strokeWidth:ae(i.strokeWidth)?i.strokeWidth:1,fill:(r=i.fill)!=null?r:"none"}}function vc(t,e,n,r,i={top:0,right:0,bottom:0,left:0}){var s,o;const l=e.split(`
37
+ `),c=l.map(w=>t.measureText(w)),u=Math.max(...c.map(w=>w.width),0),f=mr(t.font),d=f*sT,h=c[0]?(c[0].fontBoundingBoxAscent||0)+(c[0].fontBoundingBoxDescent||0):0,m=c[0]&&(c[0].fontBoundingBoxDescent||c[0].actualBoundingBoxDescent)||0,S=l.length>1?d*l.length:Math.max(f,h,((s=c[0])==null?void 0:s.actualBoundingBoxAscent)+((o=c[0])==null?void 0:o.actualBoundingBoxDescent)||0);let E=n,C=r;return t.textAlign==="center"?E-=u/2:(t.textAlign==="right"||t.textAlign==="end")&&(E-=u),t.textBaseline==="middle"?C-=S/2:t.textBaseline==="alphabetic"?C-=S-m:(t.textBaseline==="bottom"||t.textBaseline==="ideographic")&&(C-=S),{x:E-i.left,y:C-i.top,w:u+i.left+i.right,h:S+i.top+i.bottom}}function Gd(t,e,n,r,i,s){var o,l;const c=e.context,u=uT(t,n),f=fT((o=t.config.data_labels)==null?void 0:o.border),d=(l=f==null?void 0:f.padding)!=null?l:{top:0,right:0,bottom:0,left:0},h=vc(c,r,i,s,d),m=t.config.data_labels.rotate;e.withState(S=>{var E;m&&(S.translate(i,s),S.rotate(m*Math.PI/180),h.x-=i,h.y-=s),u&&e.fillRoundRect(h,(E=f==null?void 0:f.radius)!=null?E:0,{fill:u}),f&&(f.fill!=="none"&&e.fillRoundRect(h,f.radius,{fill:f.fill}),e.strokeRoundRect(h,f.radius,{stroke:f.stroke,lineWidth:f.strokeWidth}))})}function dT(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function hT(t){return t==="start"?"left":t==="end"?"right":"center"}function vT(t,e,n,r){var i,s,o;const l=dT(t.config.data_labels.rotate),c=t.config.axis_rotated,u=t.config[`axis_${(i=t.axis)==null?void 0:i.getId(e.id)}_inverted`],f=Vn(t,e),{value:d}=e,h=ae(d)&&d<0||f&&!((o=(s=t.getCandlestickData)==null?void 0:s.call(t,e))!=null&&o._isUp),m=4,S=m*2;return c?l==="start"?(n+=h?0:S,r+=m):l==="middle"?(n+=S,r-=S):l==="end"&&(h&&(n-=S),r+=m):(l==="start"?(n+=m,h&&(r+=S*2)):l==="middle"?r-=S:l==="end"&&(n-=m,h&&(r+=S*2)),u&&(r+=h?-17:f?13:7)),{x:n,y:r,textAlign:hT(l)}}function Xd(t,e,n,r,i){var s;if(t.config.axis_rotated)r+=6,e.textAlign="left",e.textBaseline="middle";else if(ca(t,n))e.textAlign="center",e.textBaseline="middle";else{const{config:o,state:l}=t,c=o[`axis_${(s=t.axis)==null?void 0:s.getId(n.id)}_inverted`],u=n.value<0||n.value===0&&!l.hasPositiveValue&&l.hasNegativeValue;let f=3;ae(o.point_r)&&o.point_r>5&&(ni(t,n)||la(t,n))&&(f+=o.point_r/2.3),e.textAlign="center",(c?!u:u)?(i+=f,e.textBaseline="top"):(i-=f*2,e.textBaseline="bottom")}return{x:r,y:i}}var gT=Object.defineProperty,Wd=Object.getOwnPropertySymbols,pT=Object.prototype.hasOwnProperty,mT=Object.prototype.propertyIsEnumerable,Vd=(t,e,n)=>e in t?gT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hr=(t,e)=>{for(var n in e||(e={}))pT.call(e,n)&&Vd(t,n,e[n]);if(Wd)for(var n of Wd(e))mT.call(e,n)&&Vd(t,n,e[n]);return t};const jd={x:0,y:0,w:8,h:8},gc=new Map,Hd=[1,0,0,1,0,0];function xT(t){return t==="circle"||t==="rectangle"}function Dn(t,e,n=0){const r=t.getAttribute(e),i=r===null?NaN:parseFloat(r);return Number.isFinite(i)?i:n}function yT(t){const e=(t.match(/[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi)||[]).map(Number).filter(Number.isFinite),n=[];for(let r=0;r<e.length-1;r+=2)n.push([e[r],e[r+1]]);return n}function TT(t){const e=(t==null?void 0:t.trim().split(/[\s,]+/).map(Number).filter(Number.isFinite))||[];return e.length===4?{x:e[0],y:e[1],w:e[2],h:e[3]}:null}function Yd(t){const e=t.map(([s])=>s),n=t.map(([,s])=>s),r=Math.min(...e),i=Math.min(...n);return{x:r,y:i,w:Math.max(...e)-r,h:Math.max(...n)-i}}function bT(t){const e=t.filter(o=>Number.isFinite(o.x)&&Number.isFinite(o.y)&&Number.isFinite(o.w)&&Number.isFinite(o.h));if(!e.length)return Hr({},jd);const n=Math.min(...e.map(o=>o.x)),r=Math.min(...e.map(o=>o.y)),i=Math.max(...e.map(o=>o.x+o.w)),s=Math.max(...e.map(o=>o.y+o.h));return{x:n,y:r,w:i-n,h:s-r}}function qi(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}function ST(t){let e=[...Hd];return((t==null?void 0:t.match(/[a-z]+\([^)]*\)/gi))||[]).forEach(n=>{var r;const[,i,s]=n.match(/^([a-z]+)\(([^)]*)\)$/i)||[],o=i==null?void 0:i.toLowerCase(),l=((s==null?void 0:s.match(/[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi))||[]).map(Number).filter(Number.isFinite);let c=null;if(o==="matrix"&&l.length>=6)c=l.slice(0,6);else if(o==="translate"&&l.length)c=[1,0,0,1,l[0],l[1]||0];else if(o==="scale"&&l.length)c=[l[0],0,0,(r=l[1])!=null?r:l[0],0,0];else if(o==="rotate"&&l.length){const u=l[0]*Math.PI/180,f=Math.cos(u),d=Math.sin(u),h=[f,d,-d,f,0,0];c=l.length>=3?qi(qi([1,0,0,1,l[1],l[2]],h),[1,0,0,1,-l[1],-l[2]]):h}else o==="skewx"&&l.length?c=[1,0,Math.tan(l[0]*Math.PI/180),1,0,0]:o==="skewy"&&l.length&&(c=[1,Math.tan(l[0]*Math.PI/180),0,1,0,0]);c&&(e=qi(e,c))}),e}function fa(t,e){const n=t.getAttribute("style"),r=t.getAttribute(e),i=n==null?void 0:n.match(new RegExp(`(?:^|;)\\s*${e}\\s*:\\s*([^;]+)`,"i"));return((i==null?void 0:i[1])||r||"").trim()||null}function AT(t,e){const n=Hr({},e),r=fa(t,"fill"),i=fa(t,"stroke"),s=fa(t,"stroke-width"),o=fa(t,"opacity"),l=fa(t,"fill-opacity"),c=fa(t,"stroke-opacity");if(r&&(n.fill=r==="none"?null:r),i&&(n.stroke=i==="none"?null:i),s){const u=parseFloat(s);Number.isFinite(u)&&(n.lineWidth=u)}return[o,l,c].forEach(u=>{var f;const d=u===null?NaN:parseFloat(u);Number.isFinite(d)&&(n.alpha=((f=n.alpha)!=null?f:1)*d)}),n}function ET(t){const e=new Map;return Array.from(t.querySelectorAll("[id]")).forEach(n=>{const r=n.getAttribute("id");r&&e.set(r,n)}),e}function Ir(t,e){const n=t==null?void 0:t.trim();return n?/%$/.test(n)?n:parseFloat(n):e}function Rr(t,e,n,r){if(typeof t=="number")return Number.isFinite(t)?t:r;if(typeof t=="string"&&/%$/.test(t)){const s=parseFloat(t);return Number.isFinite(s)?e+n*s/100:r}const i=parseFloat(t!=null?t:"");return Number.isFinite(i)?i:r}function CT(t){const e=(t==null?void 0:t.trim())||"0",n=parseFloat(e),r=/%$/.test(e)?n/100:n;return Math.max(0,Math.min(1,Number.isFinite(r)?r:0))}function IT(t){return Array.from(t.children||[]).filter(e=>e.tagName.toLowerCase()==="stop").map(e=>{const n=fa(e,"stop-color")||"#000",r=fa(e,"stop-opacity"),i=r===null?NaN:parseFloat(r);return{offset:CT(e.getAttribute("offset")),color:n,opacity:Number.isFinite(i)?i:void 0}})}function RT(t){const e=new Map;return t.forEach((n,r)=>{const i=n.tagName.toLowerCase(),s=IT(n);s.length&&(i==="lineargradient"?e.set(r,{type:"linearGradient",x1:Ir(n.getAttribute("x1"),"0%"),y1:Ir(n.getAttribute("y1"),"0%"),x2:Ir(n.getAttribute("x2"),"100%"),y2:Ir(n.getAttribute("y2"),"0%"),stops:s}):i==="radialgradient"&&e.set(r,{type:"radialGradient",cx:Ir(n.getAttribute("cx"),"50%"),cy:Ir(n.getAttribute("cy"),"50%"),r:Ir(n.getAttribute("r"),"50%"),fx:Ir(n.getAttribute("fx"),"50%"),fy:Ir(n.getAttribute("fy"),"50%"),fr:Ir(n.getAttribute("fr"),0),stops:s}))}),e}function pc(t,e,n,r=Hd,i={},s=new Set){const o=t.tagName.toLowerCase(),l=Array.from(t.children||[]),c=AT(t,i),u=qi(r,ST(t.getAttribute("transform"))),f={matrix:u,style:c};if(o==="defs")return[];if(o==="svg"||o==="g"||o==="symbol")return l.reduce((d,h)=>d.concat(pc(h,e,n,u,c,s)),[]);if(o==="use"){const d=t.getAttribute("href")||t.getAttribute("xlink:href")||"",h=d.charAt(0)==="#"?d.slice(1):"",m=h&&n.get(h);if(!m||s.has(h))return[];const S=Dn(t,"x",0),E=Dn(t,"y",0),C=qi(u,[1,0,0,1,S,E]);s.add(h);const w=pc(m,e,n,C,c,s);return s.delete(h),w}if(o==="polygon"||o==="polyline"){const d=yT(t.getAttribute("points")||"");return d.length?[Hr({type:o,points:d,box:Yd(d)},f)]:[]}if(o==="circle"){const d=Dn(t,"cx",0),h=Dn(t,"cy",0),m=Dn(t,"r",0);return m>0?[Hr({type:"circle",cx:d,cy:h,r:m,box:{x:d-m,y:h-m,w:m*2,h:m*2}},f)]:[]}if(o==="ellipse"){const d=Dn(t,"cx",0),h=Dn(t,"cy",0),m=Dn(t,"rx",0),S=Dn(t,"ry",0);return m>0&&S>0?[Hr({type:"ellipse",cx:d,cy:h,rx:m,ry:S,box:{x:d-m,y:h-S,w:m*2,h:S*2}},f)]:[]}if(o==="rect"){const d=Dn(t,"x",0),h=Dn(t,"y",0),m=Dn(t,"width",0),S=Dn(t,"height",0);return m>0&&S>0?[Hr({type:"rect",x:d,y:h,w:m,h:S,box:{x:d,y:h,w:m,h:S}},f)]:[]}if(o==="line"){const d=Dn(t,"x1",0),h=Dn(t,"y1",0),m=Dn(t,"x2",0),S=Dn(t,"y2",0);return[Hr({type:"line",x1:d,y1:h,x2:m,y2:S,box:Yd([[d,h],[m,S]])},f)]}if(o==="path"){const d=t.getAttribute("d")||"";return d?[Hr({type:"path",d,box:e},f)]:[]}return[]}function wT(t){if(!/^</.test(t))return null;if(gc.has(t))return gc.get(t)||null;let e=null;try{const r=new se.DOMParser().parseFromString(Gr(t),"image/svg+xml").documentElement,i=TT(r.getAttribute("viewBox"))||jd,s=ET(r),o=pc(r,i,s);o.length&&(e={shapes:o,box:r.tagName.toLowerCase()==="svg"?i:bT(o.map(l=>l.box)),paints:RT(s)})}catch(n){e=null}return gc.set(t,e),e}function OT(t,e){if(e.type==="polygon"||e.type==="polyline"){const[n,...r]=e.points;t.moveTo(n[0],n[1]),r.forEach(([i,s])=>t.lineTo(i,s)),e.type==="polygon"&&t.closePath()}else e.type==="circle"?(t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,Math.PI*2)):e.type==="ellipse"?(t.moveTo(e.cx+e.rx,e.cy),t.ellipse(e.cx,e.cy,e.rx,e.ry,0,0,Math.PI*2)):e.type==="rect"?t.rect(e.x,e.y,e.w,e.h):e.type==="line"&&(t.moveTo(e.x1,e.y1),t.lineTo(e.x2,e.y2))}function mo(t){const e=t==null?void 0:t.match(/^url\(#([^)]+)\)$/);return(e==null?void 0:e[1])||null}function Kd(t,e,n){const{x:r,y:i,w:s,h:o}=n,l=e.type==="linearGradient"?t.createLinearGradient(Rr(e.x1,r,s,r),Rr(e.y1,i,o,i),Rr(e.x2,r,s,r+s),Rr(e.y2,i,o,i)):t.createRadialGradient(Rr(e.fx,r,s,r+s/2),Rr(e.fy,i,o,i+o/2),Rr(e.fr,r,Math.max(s,o),0),Rr(e.cx,r,s,r+s/2),Rr(e.cy,i,o,i+o/2),Math.max(.01,Rr(e.r,0,Math.max(s,o),Math.max(s,o)/2)));return e.stops.forEach(({offset:c,color:u,opacity:f})=>{l.addColorStop(c,f===void 0?u:go(u,f))}),l}function PT(t,e,n,r,i){const s=Hr({},e||{});if(n.fill!==void 0)if(n.fill===null)delete s.fill;else if(mo(n.fill)){const o=r.get(mo(n.fill));o&&(s.fill=Kd(t,o,i))}else/^url\(/.test(n.fill)||(s.fill=n.fill);if(n.stroke!==void 0)if(n.stroke===null)delete s.stroke;else if(mo(n.stroke)){const o=r.get(mo(n.stroke));o&&(s.stroke=Kd(t,o,i))}else/^url\(/.test(n.stroke)||(s.stroke=n.stroke);return n.lineWidth!==void 0&&(s.lineWidth=n.lineWidth),{style:s,shouldFill:n.fill!==null&&(!s.stroke||s.fill!==void 0),shouldStroke:n.stroke!==null&&s.stroke!==void 0,alpha:n.alpha}}function ts(t,e,n,r,i,s,o=i){if(xT(e)){t.point(e,n,r,i,s);return}const l=wT(e);if(!l||i<=0){t.point("circle",n,r,i,s);return}t.withState(c=>{const{box:u,paints:f,shapes:d}=l,h=o>0?i/o:1,m=S=>{const{style:E,shouldFill:C,shouldStroke:w,alpha:$}=PT(c,s,S.style,f,u);if(c.save(),t.applyStyle(E),$!==void 0&&(c.globalAlpha*=$),c.transform(...S.matrix),c.beginPath(),S.type==="path"){if(se.Path2D){const z=S.path2D||(S.path2D=new se.Path2D(S.d));C&&c.fill(z),w&&c.stroke(z)}}else OT(c,S),C&&c.fill(),w&&c.stroke();c.restore()};c.translate(n-(u.x+u.w/2)*h,r-(u.y+u.h/2)*h),c.scale(h,h),d.forEach(m)})}var MT=Object.defineProperty,LT=Object.defineProperties,DT=Object.getOwnPropertyDescriptors,Zd=Object.getOwnPropertySymbols,FT=Object.prototype.hasOwnProperty,NT=Object.prototype.propertyIsEnumerable,mc=(t,e,n)=>e in t?MT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jd=(t,e)=>{for(var n in e||(e={}))FT.call(e,n)&&mc(t,n,e[n]);if(Zd)for(var n of Zd(e))NT.call(e,n)&&mc(t,n,e[n]);return t},Qd=(t,e)=>LT(t,DT(e)),ii=(t,e,n)=>mc(t,typeof e!="symbol"?e+"":e,n);const $T=[ji,er,xr,Vn],BT=1e3,_d=new WeakMap,qd=new Map;function th(t,e){if(!e||e==="none")return;const n=e.match(/^matrix\(([^)]+)\)$/),r=e.match(/^matrix3d\(([^)]+)\)$/);if(n){const i=n[1].split(",").map(s=>Number(s.trim()));i.length===6&&i.every(Number.isFinite)&&t.transform(i[0],i[1],i[2],i[3],i[4],i[5])}else if(r){const i=r[1].split(",").map(s=>Number(s.trim()));i.length===16&&i.every(Number.isFinite)&&t.transform(i[0],i[1],i[4],i[5],i[12],i[13])}}function zT(t,e,n){const r=t.naturalWidth||t.width,i=t.naturalHeight||t.height;if(!r||!i||!e||!n)return{x:0,y:0,w:e,h:n};const s=Math.min(e/r,n/i),o=r*s,l=i*s;return{x:(e-o)/2,y:(n-l)/2,w:o,h:l}}function UT(t){const{state:e}=t;return e.hasFunnel||e.hasTreemap?{x:0,y:0}:{x:qa(e.margin.left),y:qa(e.margin.top)}}function eh(t,e,n,r,i=!1){r.strokePath(s=>{$d(t,n,i,s)(e)},{lineDash:[]})}function nh(t,e,n,r,i=!1){r.fillPath(s=>{Bd(t,n,i,s)(e)})}function rh(t,e){const n=Wr(t,e);return n.start===0&&n.end===e.values.length?e:Qd(Jd({},e),{values:e.values.slice(n.start,n.end)})}function xc(t,e){if(!(t!=null&&t.length)||!(e!=null&&e.id))return null;let n=_d.get(t);if(!n){n=new Map;for(const r of t){if(!(r!=null&&r.id))continue;const i=`${r.id}:*`;n.has(i)||n.set(i,r),"index"in r&&n.set(`${r.id}:${r.index}`,r)}_d.set(t,n)}return"index"in e?n.get(`${e.id}:${e.index}`)||null:n.get(`${e.id}:*`)||null}function kT(t,e){const n=se.Path2D;if(!n)return null;const r=`${t}:${e}`,i=qd.get(r);if(i)return i;const s=new n(de[t][e]);return qd.set(r,s),s}function es(t,e){const n=t.config.color_onover;return!n||!e?null:He(n)?e.id in n?n[e.id]:null:je(n)?n:ie(n)?n.call(t.api,e):null}function GT(t,e,n){const r=xc(n,e);return es(t,r)||t.color(e.id)}function ah(t){var e;return(t==null?void 0:t.id)||((e=t==null?void 0:t.data)==null?void 0:e.id)}function ih(t,e){var n;const r=ah(e);return!!r&&((n=t.state.focusedTargetIds)==null?void 0:n.has(r))}function wr(t,e){var n;const r=ah(e);return r&&((n=t.state.defocusedTargetIds)!=null&&n.has(r))?t.canvasTheme.style.shape.targetDefocusedOpacity:1}function XT(t,e,n,r=!1){var i;const s=(i=t.generateGetAreaPoints)==null?void 0:i.call(t,n,r);if(!s)return null;const o=Wr(t,e);let l=1/0,c=1/0,u=-1/0,f=-1/0;for(let d=o.start;d<o.end;d++){const h=e.values[d];An(t,h)&&s(h,d).forEach(([m,S])=>{gn(m,S)&&(l=Math.min(l,m),c=Math.min(c,S),u=Math.max(u,m),f=Math.max(f,S))})}return Number.isFinite(l)&&Number.isFinite(c)?{x:l,y:c,w:u-l,h:f-c}:null}function xo(t,e,n){return e+n*(ae(t)?t:0)}function sh(t,e,n,r,i,s){const o=t.config[`${r}_linearGradient`];if(!o||!i||!i.w||!i.h)return s;const l=t.config.axis_rotated,c=typeof o=="object"?o:{},u=c.x||(l?[1,0]:[0,0]),f=c.y||(l?[0,0]:[0,1]),d=Array.isArray(c.stops)?c.stops:[[0,s,1],[1,s,0]],h=e.createLinearGradient(xo(u[0],i.x,i.w),xo(f[0],i.y,i.h),xo(u[1],i.x,i.w),xo(f[1],i.y,i.h));return d.forEach(([m,S,E])=>{const C=ie(S)?S.call(t.api,n.id):S,w=String(C||s),$=Number(m),z=Number.isFinite($)?Math.max(0,Math.min(1,$)):0;h.addColorStop(z,go(w,E))}),h}function Yr(t,e){return ei(t,e,$T)}function yo(t,e){const n=t.config.point_opacity;return Number.isFinite(n)?n:la(t,e)||ca(t,e)?.5:1}function ns(t,e,n){var r,i;const s=t.config.point_r;return ca(t,e)||ie(s)?(i=(r=t.pointR)==null?void 0:r.call(t,n))!=null?i:2.5:s}function WT(t,e,n,r){return!r&&n==="circle"&&la(t,e)&&!ie(t.config.point_r)&&e.values.length>Zf}function VT(t,e){const{bar_connectLine:n}=t.config,r=He(n)?n[e]:n;return/^(start|end)-(start|end)$/.test(r)?r:null}function jT(t,e,n){const{indexX:r,indexY:i,pos:s}=n;return t.config.axis_rotated?{x:e[0][r],y:e[0][i],width:e[0][r]-s,height:e[2][i]-e[0][i]}:{x:e[0][r],y:s,width:e[2][r]-e[0][r],height:e[3][i]-s}}function HT(t,e,n,r,i=1){if(r.length<2)return;const s=t.config.axis_rotated,o=/^start-(start|end)$/.test(n),l=/^end-(start|end)$/.test(n),c=/\w+-end$/.test(n),u=/\w+-start$/.test(n),f=m=>({x:s?l?m.x-m.width:m.x:m.x+m.width,y:s||o?m.y+m.height:m.y}),d=m=>({x:s?m.x-(c?m.width:0):m.x,y:s?m.y:m.y+(u?m.height:0)});let h=f(r[0]);e.strokePath(()=>{for(let m=1;m<r.length;m++){const S=d(r[m]);e.traceLine(h.x,h.y,S.x,S.y),m<r.length-1&&(h=f(r[m]))}},{alpha:i,stroke:t.canvasTheme.style.shape.barConnectLineColor,lineWidth:t.canvasTheme.style.shape.barConnectLineWidth,lineDash:[]})}function yc(t,e){var n;const{config:r}=t;if(ca(t,e))return"circle";const i=((n=t.mapToIds)==null?void 0:n.call(t,t.data.targets))||[],s=Array.isArray(r.point_pattern)&&r.point_pattern.length?r.point_pattern:[r.point_type],o=Math.max(0,i.indexOf(e.id)),l=s[o%s.length];return/^rect(angle)?$/i.test(l)||l==="rectangle"?"rectangle":l||"circle"}function YT(t,e,n,r,i,s,o){const l=t.config.point_radialGradient;if(!l||!s)return o;const c=He(l)?l:{},u=ae(c.cx)?c.cx:.3,f=ae(c.cy)?c.cy:.3,d=ae(c.r)?c.r:.7,h=Array.isArray(c.stops)?c.stops:[[.1,null,1],[.9,null,0]],m=r+(u-.5)*s*2,S=i+(f-.5)*s*2,E=e.createRadialGradient(m,S,0,m,S,Math.max(1,s*d*2));return h.forEach(([C,w,$])=>{let z=ie(w)?w.bind(t.api)(n.id):w;z||(z=o);const B=Number(C),W=Number.isFinite(B)?Math.max(0,Math.min(1,B)):0;E.addColorStop(W,go(z,$))}),E}function oh(t,e,n){const r=t.config.candlestick_color_down;return(n!=null&&n._isUp?t.color(e):r&&typeof r=="object"?r[e.id]:r)||t.color(e)}function KT(t,e){return t.shouldDrawPointsForLine?t.shouldDrawPointsForLine(e):!0}function ZT(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])}function JT(t,e,n){const{config:r,scale:i}=t,s=i.zoom||i.x,o=t.getYScaleById(e.id),l=r.line_connectNull?t.filterRemoveNull(e.values):e.values;let c=t.isAreaRangeType(e)?l.map(S=>Qd(Jd({},S),{value:t.getRangedData(S,"mid")})):l;t.isStepType(e)&&(c=t.convertValuesToStep(c));const u=V0(t,c,s,o,r.data_regions[e.id]);let f=null,d=[];const h=()=>{if(d.length<2||!f){d=[];return}n.strokePath(S=>{const[E,...C]=d;S.moveTo(E[0],E[1]),C.forEach(w=>{S.lineTo(w[0],w[1])})},{lineDash:f}),d=[]},m=(S,E,C)=>{!f||!ZT(f,C)?(h(),f=C,d=[S,E]):d.push(E)};for(const{start:S,end:E,dash:C,isBreak:w}of u){if(w||!S||!E||!C){h(),f=null;continue}if(!gn(S[0],S[1])||!gn(E[0],E[1])){h(),f=null;continue}m(S,E,C)}h()}class QT{constructor(e,n){ii(this,"engine",e),ii(this,"theme",n),ii(this,"painter"),ii(this,"labelImageCache",new Map),ii(this,"backgroundImageCache",new Map),ii(this,"backgroundClassStyleCache",new Map),this.painter=new od(e.ctx)}get ctx(){return this.painter.context}withContext(e,n){this.painter.withContext(e,n)}destroy(){const e=n=>{n.image.onload=null,n.image.onerror=null};this.labelImageCache.forEach(e),this.backgroundImageCache.forEach(e),this.labelImageCache.clear(),this.backgroundImageCache.clear(),this.backgroundClassStyleCache.clear()}getLabelImage(e,n){if(!e||!se.Image)return null;let r=this.labelImageCache.get(e);if(!r){const i={image:new se.Image,loaded:!1,loading:!0};r=i,this.labelImageCache.set(e,r),i.image.onload=()=>{var s;i.loaded=!0,i.loading=!1,(s=n.redraw)==null||s.call(n)},i.image.onerror=()=>{i.loaded=!1,i.loading=!1},i.image.src=e}return r}getBackgroundImage(e,n){if(!e||!se.Image)return null;let r=this.backgroundImageCache.get(e);if(!r){const i={image:new se.Image,loaded:!1,loading:!0};r=i,this.backgroundImageCache.set(e,r),i.image.onload=()=>{var s;i.loaded=!0,i.loading=!1,(s=n.renderCanvasFrame)==null||s.call(n,void 0,null,!1)},i.image.onerror=()=>{i.loaded=!1,i.loading=!1},i.image.src=e}return r}getBackgroundClassStyle(e,n){if(!n||!se.document)return{};const r=this.backgroundClassStyleCache.get(n);if(r)return r;const i=se.document.createElement("div");i.className=n,i.style.cssText="position:absolute;visibility:hidden;pointer-events:none;width:1px;height:1px;",e.$el.chart.node().appendChild(i);const s=se.getComputedStyle(i),o=parseFloat(s.opacity),l={opacity:Number.isFinite(o)?o:void 0,transform:s.transform||void 0};return i.remove(),this.backgroundClassStyleCache.set(n,l),l}drawBackground(e){const n=e.config.background;if(!(n!=null&&n.imgUrl)&&!(n!=null&&n.color))return;const{ctx:r,painter:i}=this,{current:s,margin:o,width:l,height:c}=e.state,u=this.getBackgroundClassStyle(e,n.class);i.withState(()=>{if(u.opacity!==void 0&&(r.globalAlpha*=u.opacity),n.imgUrl){const f=this.getBackgroundImage(n.imgUrl,e);if(f!=null&&f.loaded){const d=UT(e),h=zT(f.image,s.width,s.height);r.translate(d.x,d.y),th(r,u.transform),r.drawImage(f.image,h.x,h.y,h.w,h.h)}}else n.color&&(th(r,u.transform),i.fillRect({x:o.left,y:o.top,w:l,h:c},{fill:n.color}))})}drawLabelImage(e,n,r,i,s){const o=oT(e,n);if(!(o!=null&&o.url))return{x:i,y:s};const l=lT(o,n),c=cT(e,o,r,i,s,n),u=this.getLabelImage(l,e);return u!=null&&u.loaded&&this.ctx.drawImage(u.image,c.x,c.y,o.width,o.height),{x:c.textX,y:c.textY}}drawDataLabel(e,n,r,i,s){const{painter:o,theme:{style:l}}=this;if({x:i,y:s}=this.drawLabelImage(e,n,r,i,s),e.config.data_labels.rotate){const c=vT(e,n,i,s);i=c.x,s=c.y,this.ctx.textAlign=c.textAlign}this.ctx.fillStyle=kd(e,n,l.label.color),Gd(e,o,n,r,i,s),o.textLines(r,i,s,{angle:e.config.data_labels.rotate})}drawFocusLabels(e,n){var r;if(!((r=e.hasDataLabel)!=null&&r.call(e)))return;const{ctx:i,theme:{style:s}}=this,o=n.filter(c=>c&&An(e,c)&&xr(e,c)&&Yr(e,{id:c.id})),l={size:()=>o.length};o.length&&(i.font=s.label.font,o.forEach(c=>{const u=zd(e,c);let{x:f,y:d}=Ji(e,c);u&&({x:f,y:d}=Xd(e,i,c,f,d),f+=po(e,c,"x",l),d+=po(e,c,"y",l),gn(f,d)&&this.drawDataLabel(e,c,u,f,d))}))}draw(e,n,r){if(e.state.hasTreemap){this.drawTreemaps(e);return}const{margin:i,width:s,height:o}=e.state,l=()=>{e.config.area_front||this.drawAreas(e,n,r),this.drawLines(e,n),e.config.area_front&&this.drawAreas(e,n,r),this.drawCircles(e,n,r)},c=()=>{e.config.bar_front||this.drawBars(e,n,r),this.drawCandlesticks(e,n,r),l(),e.config.bar_front&&this.drawBars(e,n,r),this.drawSelections(e,n),this.drawLabels(e,n)};e.config.clipPath===!1?c():this.painter.clipRect({x:i.left,y:i.top,w:s,h:o},c)}drawSubchart(e,n){const{config:r,state:i}=e;if(!r.subchart_show||!i.hasAxis||i.width2<=0||i.height2<=0)return;const{ctx:s,painter:o,theme:{style:l}}=this,{margin2:c,width2:u,height2:f}=i,d={x:c.left,y:c.top,w:u,h:f};e.withSubchartTypeContext(()=>{var h;const m=e.filterTargetsToShow().filter(Yr.bind(null,e)),S=e.getDrawShape();(h=e.updateSubchartYDomain)==null||h.call(e,m),o.withState(()=>{o.clipRect(d,()=>{o.withTranslation(d.x,d.y,()=>{var E,C,w,$,z,B;const W=m.filter(ji.bind(null,e)),H=tr(e,S,qt.AREA,ji.bind(null,e));for(const ft of W)ft.values.some(An.bind(null,e))&&(s.globalAlpha=l.shape.areaOpacity*wr(e,ft),s.fillStyle=e.color(ft.id),nh(e,ft,H,o,!0));s.globalAlpha=1;const _=m.filter(er.bind(null,e)),q=tr(e,S,qt.BAR,er.bind(null,e)),st=(E=e.generateGetBarPoints)==null?void 0:E.call(e,q,!0);if(st){for(const ft of _)s.globalAlpha=l.shape.barOpacity*wr(e,ft),s.fillStyle=e.color(ft.id),ft.values.forEach((lt,bt)=>{var St;if(!An(e,lt))return;const Mt=Qi(e,st,lt,bt),Ot=((St=e.getSubchartCandlestickBarColor)==null?void 0:St.call(e,lt,!0))||s.fillStyle;Mt&&o.fillRect(Mt.rect,{fill:Ot})});s.globalAlpha=1}const it=m.filter(Vn.bind(null,e)),ot=tr(e,S,qt.CANDLESTICK,Vn.bind(null,e)),ct=(C=e.generateGetCandlestickPoints)==null?void 0:C.call(e,ot,!0);if(ct){s.lineWidth=l.shape.candlestickLineWidth;for(const ft of it){const lt=wr(e,ft);s.globalAlpha=lt,ft.values.forEach((bt,St)=>{var Mt;const Ot=(Mt=e.getCandlestickData)==null?void 0:Mt.call(e,bt),Kt=Ot&&_i(e,ct,bt,St);if(!Kt)return;const ee=oh(e,{id:ft.id},Ot);s.strokeStyle=ee,s.fillStyle=ee,o.strokePath(()=>{o.traceLine(Kt.wickStart[0],Kt.wickStart[1],Kt.wickEnd[0],Kt.wickEnd[1])}),o.fillRect(Kt.body,{fill:s.fillStyle})})}}const gt=m.filter(ni.bind(null,e)),tt=tr(e,S,qt.LINE,ni.bind(null,e));s.globalAlpha=1;for(const ft of gt)ft.values.some(An.bind(null,e))&&(s.globalAlpha=wr(e,ft),s.lineWidth=ih(e,ft)?l.shape.lineFocusedWidth:l.shape.lineWidth,s.strokeStyle=e.color(ft.id),eh(e,ft,tt,o,!0));if(s.globalAlpha=1,r.point_show&&!((w=e.isPointFocusOnly)!=null&&w.call(e))){const ft=($=e.updateCircleY)==null?void 0:$.call(e,!0),lt=(z=e.subxx)==null?void 0:z.bind(e);if(lt&&ft){for(const bt of m){if(!la(e,bt)&&!ca(e,bt))continue;const St=e.color(bt.id),Mt=l.shape.pointFillColor||St,Ot=l.shape.pointStrokeColor||St,Kt=Ot?(B=l.shape.pointLineWidth)!=null?B:1:0,ee=Ot&&Kt>0?{fill:Mt,stroke:Ot,lineWidth:Kt}:{fill:Mt};s.globalAlpha=yo(e,bt)*wr(e,bt),bt.values.forEach((Ae,Ee)=>{if(!An(e,Ae))return;const Te=r.axis_rotated?ft(Ae,Ee):lt(Ae),De=r.axis_rotated?lt(Ae):ft(Ae,Ee),me=Math.min(ns(e,bt,Ae),3);gn(Te,De)&&ts(o,"circle",Te,De,me,ee)})}s.globalAlpha=1}}})}),this.drawSubchartBrush(e)})})}drawSubchartBrush(e){var n,r;const{config:i,scale:s,state:o}=e,l=o.domain;if(!i.subchart_show||i.subchart_brush_enabled===!1||!(l!=null&&l.length)||!s.subX)return;const{margin2:c,width2:u,height2:f}=o,d=s.subX(l[0]),h=s.subX(l[1]),m=i.axis_rotated?f:u,S=(r=(n=e.axis)==null?void 0:n.getExtent)==null?void 0:r.call(n),E=Array.isArray(S)&&S.length>=2&&S.every(Number.isFinite)?S.slice(0,2):[0,m],C=Math.max(0,Math.min(m,Math.min(...E))),w=Math.max(0,Math.min(m,Math.max(...E))),$=Math.max(C,Math.min(w,Math.min(d,h))),z=Math.max(C,Math.min(w,Math.max(d,h))),B=z-$;if(B<=0)return;const W=i.axis_rotated?{x:c.left,y:c.top+$,w:u,h:B}:{x:c.left+$,y:c.top,w:B,h:f};this.painter.fillRect(W,{fill:this.theme.style.subchartBrush.fill,alpha:this.theme.style.subchartBrush.opacity}),i.subchart_showHandle&&(this.drawSubchartBrushHandle(e,$,"start"),this.drawSubchartBrushHandle(e,z,"end"))}drawSubchartBrushHandle(e,n,r){const{config:i,state:{margin2:s,width2:o,height2:l}}=e,{ctx:c,painter:u,theme:{style:f}}=this,d=i.axis_rotated,h=f.subchartBrush.handleFill,m=f.subchartBrush.handleStroke,S=d?s.left+o/2:s.left+n,E=d?s.top+n:s.top+l/2,C=kT(d?"y":"x",r);C&&u.withState(()=>{c.translate(S,E),c.fillStyle=h,c.strokeStyle=m,c.lineWidth=f.subchartBrush.handleLineWidth,c.globalAlpha=f.subchartBrush.handleOpacity,c.fill(C),c.globalAlpha=1,c.stroke(C)})}drawBars(e,n,r){const{ctx:i,painter:s,theme:{style:o}}=this,l=er.bind(null,e),c=hc(e,r,er),u=e.filterTargetsToShow().filter(l).filter(Yr.bind(null,e)),f=e.generateGetBarPoints(tr(e,n,qt.BAR,l),!1),{margin:d}=e.state,h=uo(e),m=h?ic(e):new Set;f&&s.withTranslation(d.left,d.top,()=>{var S;for(const E of u){const C=Wr(e,E),w=VT(e,E.id),$=wr(e,E),z=[],B=[];for(let W=C.start;W<C.end;W++){const H=E.values[W];if(!An(e,H))continue;const _=Qi(e,f,H,W);if(!_)continue;const{points:q,rect:st}=_,it=sc(e,H,q,h,m,(S=e.isStackingRadiusData)==null?void 0:S.bind(e));B.push({d:H,points:q,rect:st,radiusInfo:it}),w&&z.push(jT(e,q,it))}w&&o.shape.barConnectLineWidth>0&&HT(e,s,w,z,$);for(const{d:W,rect:H,radiusInfo:_}of B){const q=es(e,xc(r,W)),st=q||e.color(E.id),ot=(c(W)?o.shape.barExpandedOpacity:o.shape.barOpacity)*$;i.fillStyle=q?st:sh(e,i,E,"bar",H,st),h?s.fillRoundRect(H,_.corners,{alpha:ot}):s.fillRect(H,{alpha:ot}),o.shape.barLineWidth>0&&(i.strokeStyle=o.shape.barStrokeColor,i.lineWidth=o.shape.barLineWidth,h?s.strokeRoundRect(H,_.corners,{alpha:o.shape.barOpacity*$}):s.strokeRect(H,{alpha:o.shape.barOpacity*$}))}}})}drawCandlesticks(e,n,r){var i;const{ctx:s,painter:o,theme:{style:l}}=this,c=Vn.bind(null,e),u=hc(e,r,Vn),f=e.filterTargetsToShow().filter(c).filter(Yr.bind(null,e)),d=(i=e.generateGetCandlestickPoints)==null?void 0:i.call(e,tr(e,n,qt.CANDLESTICK,c),!1),{margin:h}=e.state;d&&o.withTranslation(h.left,h.top,()=>{var m;s.lineWidth=l.shape.candlestickLineWidth;for(const S of f){const E=Wr(e,S),C=wr(e,S),w=l.shape.candlestickLineWidth,$=l.shape.candlestickStrokeColor||"#000";for(let z=E.start;z<E.end;z++){const B=S.values[z],W=(m=e.getCandlestickData)==null?void 0:m.call(e,B);if(!W)continue;const H=_i(e,d,B,z);if(!H)continue;const{body:_,wickStart:q,wickEnd:st}=H;s.fillStyle=es(e,xc(r,B))||oh(e,B,W),s.strokeStyle=$,s.globalAlpha=C,w>0&&o.strokePath(()=>{o.traceLine(q[0],q[1],st[0],st[1])}),o.fillRect(_,{alpha:(u(B)?l.shape.candlestickExpandedOpacity:1)*C}),w>0&&o.strokeRect(_,{alpha:C,lineWidth:w,stroke:$})}}s.globalAlpha=1})}hasExpandedShapeFocus(e,n){return!!(n!=null&&n.some(r=>r&&(er(e,r)||Vn(e,r))))}drawLines(e,n){const{ctx:r,painter:i,theme:{style:s}}=this,o=ni.bind(null,e),l=e.filterTargetsToShow().filter(o).filter(Yr.bind(null,e)),c=tr(e,n,qt.LINE,o),{margin:u}=e.state;e.generateGetLinePoints&&i.withTranslation(u.left,u.top,()=>{var f;for(const d of l){const h=rh(e,d);h.values.some(An.bind(null,e))&&(r.globalAlpha=wr(e,d),r.lineWidth=ih(e,d)?s.shape.lineFocusedWidth:s.shape.lineWidth,r.strokeStyle=e.color(d.id),(f=e.config.data_regions)!=null&&f[h.id]?JT(e,h,i):eh(e,h,c,i))}r.globalAlpha=1})}drawAreas(e,n,r){const{ctx:i,painter:s,theme:{style:o}}=this,l=ji.bind(null,e),c=e.filterTargetsToShow().filter(l).filter(Yr.bind(null,e)),u=tr(e,n,qt.AREA,l),{margin:f}=e.state;e.generateGetAreaPoints&&s.withTranslation(f.left,f.top,()=>{for(const d of c){const h=rh(e,d);if(!h.values.some(An.bind(null,e)))continue;const m=GT(e,h,r);i.globalAlpha=o.shape.areaOpacity*wr(e,d),i.fillStyle=sh(e,i,h,"area",e.config.area_linearGradient?XT(e,d,u):null,m),nh(e,h,u,s)}i.globalAlpha=1})}drawCircles(e,n,r){var i;if(!e.config.point_show||(i=e.isPointFocusOnly)!=null&&i.call(e))return;const{ctx:s,painter:o,theme:{style:l}}=this,{cx:c,cy:u}=n.pos,{margin:f}=e.state,d=hc(e,r,xr),h=!!(r!=null&&r.some(m=>m&&xr(e,m)));!c||!u||o.withTranslation(f.left,f.top,()=>{var m,S,E;for(const C of e.filterTargetsToShow()){if(!xr(e,C)||!Yr(e,C)||ni(e,C)&&!KT(e,C))continue;const w=e.color(C.id),$=yc(e,C),z=wr(e,C),B=!!e.config.point_radialGradient,W=WT(e,C,$,B),H=Wr(e,C),_=H.end-H.start,q=W?Qf(e.state.width,e.state.height,ns(e,C,C.values[H.start]||C.values[0])):null,st=yo(e,C)*z;s.fillStyle=w,s.globalAlpha=st;const it=l.shape.pointFillColor||w,ot=l.shape.pointStrokeColor||w,ct=ot?(m=l.shape.pointLineWidth)!=null?m:1:0,gt=!!ot&&ct>0,tt=gt&&$==="circle"&&ae(st)&&st<1&&it===ot;if(!h&&!B&&$==="circle")if(s.fillStyle=it,gt&&!tt&&(s.strokeStyle=ot,s.lineWidth=ct),_>BT)for(let ft=H.start;ft<H.end;ft++){const lt=C.values[ft];if(!An(e,lt))continue;const bt=ns(e,C,lt),St=tt?bt+ct/2:bt,Mt=c(lt,ft),Ot=u(lt,ft);gn(Mt,Ot)&&(q&&!_f(q,Mt,Ot)||(s.beginPath(),s.arc(Mt,Ot,St,0,Math.PI*2),s.fill(),gt&&!tt&&s.stroke()))}else{s.beginPath();for(let ft=H.start;ft<H.end;ft++){const lt=C.values[ft];if(!An(e,lt))continue;const bt=ns(e,C,lt),St=tt?bt+ct/2:bt,Mt=c(lt,ft),Ot=u(lt,ft);gn(Mt,Ot)&&o.traceCircle(Mt,Ot,St)}s.fill(),gt&&!tt&&s.stroke()}else for(let ft=H.start;ft<H.end;ft++){const lt=C.values[ft];if(!An(e,lt))continue;const bt=d(lt),St=ns(e,C,lt),Mt=bt?(E=(S=e.pointExpandedR)==null?void 0:S.call(e,lt))!=null?E:St*1.75:St,Ot=c(lt,ft),Kt=u(lt,ft),ee=es(e,lt),Ae=ee||w,Ee=l.shape.pointFillColor||Ae,Te=l.shape.pointStrokeColor||Ae,De=bt&&(ee||l.focusPoint.fill)||Ee,me=bt?ee||l.focusPoint.stroke||Ae:Te,Pe=bt?l.focusPoint.lineWidth:ct,Zt=yo(e,lt)*z,he=!!me&&(Pe!=null?Pe:0)>0,ge=$==="circle"&&he&&ae(Zt)&&Zt<1&&De===me,Wt=ge?Mt+(Pe||0)/2:Mt;gn(Ot,Kt)&&(s.fillStyle=B?YT(e,s,lt,Ot,Kt,Mt,Ae):De,s.globalAlpha=Zt,ts(o,$,Ot,Kt,Wt,he&&!ge?{fill:s.fillStyle,stroke:me,lineWidth:Pe}:void 0,St))}}})}drawSelections(e,n){var r,i;const s=(r=e.getCanvasSelectedData)==null?void 0:r.call(e);if(!e.config.data_selection_enabled||!(s!=null&&s.length)||e.state.hasTreemap)return;const{ctx:o,painter:l,theme:{style:c}}=this,{margin:u}=e.state,f=er.bind(null,e),d=Vn.bind(null,e),h=s.some(f)?e.generateGetBarPoints(tr(e,n,qt.BAR,f),!1):null,m=s.some(d)?(i=e.generateGetCandlestickPoints)==null?void 0:i.call(e,tr(e,n,qt.CANDLESTICK,d),!1):null,S=h?uo(e):null,E=S?ic(e):new Set;l.withTranslation(u.left,u.top,()=>{s.forEach(C=>{var w,$,z,B,W,H,_;const q=e.color(C.id);if(f(C)&&h){const st=Qi(e,h,C,C.index);if(!st)return;const{points:it,rect:ot}=st,ct=S?sc(e,C,it,S,E).corners:0;S?l.fillRoundRect(ot,ct,{fill:"#fff",alpha:.3}):l.fillRect(ot,{fill:"#fff",alpha:.3}),S?l.strokeRoundRect(ot,ct,{stroke:q,lineWidth:2}):l.strokeRect(ot,{stroke:q,lineWidth:2})}else if(d(C)&&m){if(!((w=e.getCandlestickData)==null?void 0:w.call(e,C)))return;const it=_i(e,m,C,C.index);if(!it)return;const{body:ot,wickStart:ct,wickEnd:gt}=it;l.strokePath(()=>{l.traceLine(ct[0],ct[1],gt[0],gt[1])},{stroke:q,lineWidth:3}),l.fillRect(ot,{fill:"#fff",alpha:.3}),l.strokeRect(ot,{stroke:q,lineWidth:2})}else if(xr(e,C)){const st=yc(e,{id:C.id}),{x:it,y:ot}=Ji(e,C),ct=(z=($=e.pointR)==null?void 0:$.call(e,C))!=null?z:2.5,gt=(W=(B=e.pointSelectR)==null?void 0:B.call(e,C))!=null?W:ct*2;if(!gn(it,ot))return;ts(l,"circle",it,ot,gt,{fill:c.selectedPoint.fill,lineWidth:c.selectedPoint.lineWidth,stroke:c.selectedPoint.stroke||q}),(H=e.isPointFocusOnly)!=null&&H.call(e)||ts(l,st,it,ot,ct,{fill:c.shape.pointFillColor||q,stroke:c.shape.pointStrokeColor||q,lineWidth:(_=c.shape.pointLineWidth)!=null?_:1})}}),o.globalAlpha=1})}drawLabels(e,n){var r;if(!((r=e.hasDataLabel)!=null&&r.call(e)))return;const{ctx:i,painter:s,theme:{style:o}}=this,{margin:l}=e.state,{cx:c,cy:u}=n.pos,f=n.indices[qt.BAR]?e.generateGetBarPoints(n.indices[qt.BAR],!1):null,d=e.generateGetCandlestickPoints?e.generateGetCandlestickPoints(tr(e,n,qt.CANDLESTICK,Vn.bind(null,e)),!1):null,h=e.filterTargetsToShow().filter(C=>(er(e,C)||xr(e,C)||ji(e,C)||Vn(e,C))&&Yr(e,C)),m=[];let S=0;h.forEach(C=>{const w=Wr(e,C),$=e.labelishData(C),z=[];for(let B=0;B<$.length;B++){const W=$[B],H=zd(e,W);H&&W.index>=w.start&&W.index<w.end&&An(e,W)&&z.push({d:W,text:H})}S+=z.length,z.length&&m.push(z)});const E={size:()=>S};s.withTranslation(l.left,l.top,()=>{i.font=o.label.font,i.textAlign="center",m.forEach(C=>{var w,$;for(const{d:z,text:B}of C){let W,H;if(er(e,z)&&f){const _=Qi(e,f,z,z.index);if(!_)continue;const{points:q,rect:st}=_,it=e.getBaseValue(z),ot=fo(e,q[2]),ct=it<0,gt=vc(i,B,0,0).h;W=e.config.axis_rotated&&!e.config.data_labels.centered?ot[0]+(ct?-4:4):st.x+st.w/2,H=e.config.data_labels.centered||e.config.axis_rotated?st.y+st.h/2:ot[1]+(ct?gt-3:-3),i.textAlign=e.config.axis_rotated&&!e.config.data_labels.centered?ct?"right":"left":"center",i.textBaseline=e.config.data_labels.centered||e.config.axis_rotated?"middle":"alphabetic"}else if(Vn(e,z)&&d){const _=(w=e.getCandlestickData)==null?void 0:w.call(e,z),q=_i(e,d,z,z.index),st=_==null?void 0:_._isUp;if(!q)continue;const{wickEnd:it,wickStart:ot}=q,ct=e.config[`axis_${($=e.axis)==null?void 0:$.getId(z.id)}_inverted`];W=e.config.axis_rotated?st?it[0]+4:ot[0]-4:ot[0],H=e.config.axis_rotated?ot[1]+3:st?it[1]-3:ot[1]+12,!e.config.axis_rotated&&ct&&(H+=15*(st?1:-1)),i.textAlign=e.config.axis_rotated?st?"left":"right":"center",i.textBaseline="alphabetic"}else c&&u&&({x:W,y:H}=j0(n.pos,z,z.index),{x:W,y:H}=Xd(e,i,z,W,H));W+=po(e,z,"x",E),H+=po(e,z,"y",E),gn(W,H)&&this.drawDataLabel(e,z,B,W,H)}})})}drawEmptyLabel(e){const n=e.config.data_empty_label_text,r=e.filterTargetsToShow();if(!n||r.length)return;const{margin:i,width:s,height:o}=e.state,{style:l}=this.theme;this.painter.text(String(n),i.left+s/2,i.top+o/2,{fill:l.emptyLabel.color,font:l.emptyLabel.font,textAlign:"center",textBaseline:"middle"})}drawZoomBrush(e,n,r){const{axis_rotated:i}=e.config,{height:s,margin:o,width:l}=e.state,c=Math.min(n,r),u=Math.abs(r-n),f=i?{x:o.left,y:o.top+c,w:l,h:u}:{x:o.left+c,y:o.top,w:u,h:s};u<=0||this.painter.fillRect(f,{fill:this.theme.style.zoomBrush.fill,alpha:this.theme.style.zoomBrush.opacity})}drawSelectionDragArea(e,n){const{margin:r,width:i,height:s}=e.state,o={x:r.left,y:r.top,w:i,h:s},l=Math.max(o.x,n.x),c=Math.max(o.y,n.y),u=Math.min(o.x+o.w,n.x+n.w),f=Math.min(o.y+o.h,n.y+n.h);u<=l||f<=c||this.painter.fillRect({x:l,y:c,w:u-l,h:f-c},{fill:this.theme.style.zoomBrush.fill,alpha:this.theme.style.zoomBrush.opacity})}drawTreemaps(e){var n;const{ctx:r,painter:i,theme:{style:s}}=this,{config:o}=e,l=(n=e.getTreemapRoot)==null?void 0:n.call(e,e.data.targets),c=(l==null?void 0:l.children)||[];i.withState(()=>{var u;r.lineWidth=s.treemap.lineWidth,r.strokeStyle=s.treemap.stroke;for(const f of c){const{data:d}=f;if(!kl(e,d))continue;const{x:h,y:m,w:S,h:E}=ai(e,f,l,!0);if(!gn(h,m)||!gn(h+S,m+E)||S<=0||E<=0)continue;const C={x:h,y:m,w:S,h:E};if(r.fillStyle=e.color(d.name),i.fillRect(C),i.strokeRect(C),!o.treemap_label_show||(d.ratio||0)<(o.treemap_label_threshold||0))continue;const w=Y0(e,d,S,E);if(!w)continue;const $=w.split(`
38
+ `),z=!!o.data_labels.centered;r.font=s.label.font;const B=mr(r.font),W=r.measureText((u=$[0])!=null?u:""),H=(W.fontBoundingBoxAscent||0)+(W.fontBoundingBoxDescent||0)||(W.actualBoundingBoxAscent||0)+(W.actualBoundingBoxDescent||0),_=Math.max(B,H)+($.length-1)*B,q=z?m+E/2:m+_+5;let st=z?h+S/2:h+5,it=q-($.length-1)*B/(z?2:1);r.textAlign=z?"center":"left",r.textBaseline=z?"middle":"alphabetic",{x:st,y:it}=this.drawLabelImage(e,d,w,st,it),r.fillStyle=kd(e,d,s.label.color),Gd(e,i,d,w,st,z?it+($.length-1)*B/2:q),$.forEach((ot,ct)=>{i.text(ot,st,it+ct*B,{maxWidth:Math.max(0,S-8)})})}})}drawSubchartFocus(e,n){const{config:r,scale:i,state:s}=e,o=n==null?void 0:n.find(C=>C&&An(e,C));if(!o||!r.subchart_show||r.subchart_grid_focus_continuous||r.subchart_brush_enabled!==!1||r.grid_focus_show===!1||r.subchart_grid_focus===!1||!r.tooltip_show||r.axis_tooltip||!i.subX||s.width2<=0||s.height2<=0)return;const{margin2:l,width2:c,height2:u}=s,f=i.subX(o.x);if(!Number.isFinite(f))return;const{painter:d,theme:{style:h}}=this,m=h.axis.lineWidth,S=d.crisp(l.left+f,m),E=d.crisp(l.top+f,m);d.strokePath(()=>{r.axis_rotated?d.traceLine(l.left,E,l.left+c,E):d.traceLine(S,l.top,S,l.top+u)},{lineDash:h.focusGrid.dashArray,lineWidth:h.focusGrid.lineWidth,stroke:h.focusGrid.lineColor})}drawFocus(e,n){if(!(n!=null&&n.length))return;const{painter:r}=this,{style:i}=this.theme,{margin:s}=e.state,o=n.find(l=>l&&An(e,l));e.config.subchart_grid_focus!==!1&&!rc(e)&&this.drawSubchartFocus(e,n),r.withTranslation(s.left,s.top,()=>{if(e.config.tooltip_show&&e.config.grid_focus_show!==!1&&!e.config.axis_tooltip&&o){const{x:l,y:c}=Ji(e,o),u=i.axis.lineWidth,f=e.config.axis_rotated,d=Number.isFinite(f?c:l),h=Number.isFinite(f?l:c),m=z=>r.crisp(s.left+z,u)-s.left,S=z=>r.crisp(s.top+z,u)-s.top,E=e.config.grid_focus_edge&&!e.config.tooltip_grouped,C=rc(e),w=C?e.state.margin2.left-s.left+e.state.width2:e.state.width,$=C?e.state.margin2.top-s.top+e.state.height2:e.state.height;d&&r.strokePath(()=>{var z,B;if(f){if(r.traceLine(m(0),c,E&&h?l:m(w),c),h&&e.config.grid_focus_y&&!e.config.tooltip_grouped){const W=((z=e.axis)==null?void 0:z.getId(o.id))==="y2";r.traceLine(l,E&&!W?c:S(0),l,E&&W?c:S(e.state.height))}}else if(r.traceLine(l,E&&h?c:S(0),l,S($)),h&&e.config.grid_focus_y&&!e.config.tooltip_grouped){const W=((B=e.axis)==null?void 0:B.getId(o.id))==="y2";r.traceLine(E&&W?l:m(0),c,E&&!W?l:m(e.state.width),c)}},{lineDash:i.focusGrid.dashArray,lineWidth:i.focusGrid.lineWidth,stroke:i.focusGrid.lineColor})}e.config.point_show&&!e.state.canvasFocusMainRedraw&&n.filter(l=>l&&An(e,l)&&xr(e,l)&&Yr(e,{id:l.id})).forEach(l=>{var c,u,f,d;const h=yc(e,{id:l.id}),{x:m,y:S}=Ji(e,l),E=(u=(c=e.pointR)==null?void 0:c.call(e,l))!=null?u:2.5,C=(d=(f=e.pointExpandedR)==null?void 0:f.call(e,l))!=null?d:E*1.75,w=es(e,l),$=w||e.color(l.id),z=w||i.focusPoint.fill||i.shape.pointFillColor||$,B=w||i.focusPoint.stroke||$,W=i.focusPoint.lineWidth,H=yo(e,l),_=!!B&&(W!=null?W:0)>0,q=h==="circle"&&_&&ae(H)&&H<1&&z===B;gn(m,S)&&ts(r,h,m,S,q?C+(W||0)/2:C,_&&!q?{fill:z,lineWidth:W,stroke:B,alpha:H}:{fill:z,alpha:H},E)}),this.drawFocusLabels(e,n)})}}var _T=Object.defineProperty,lh=Object.getOwnPropertySymbols,qT=Object.prototype.hasOwnProperty,t1=Object.prototype.propertyIsEnumerable,e1=(t,e,n)=>e in t?_T(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,n1=(t,e)=>{var n={};for(var r in t)qT.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&lh)for(var r of lh(t))e.indexOf(r)<0&&t1.call(t,r)&&(n[r]=t[r]);return n},rs=(t,e,n)=>e1(t,typeof e!="symbol"?e+"":e,n);const Or="http://www.w3.org/2000/svg";function Le(t,e){const n=typeof t=="number"?t:parseFloat(t!=null?t:"");return Number.isFinite(n)?n:e}function Da(t,e){const n=Le(t.opacity,1),r=Le(t["fill-opacity"],1),i=n*r;return Number.isFinite(i)?i:e}function ke(t,e){const n=t==null?void 0:t.trim();return n&&!/^(none|transparent|rgba\(0,\s*0,\s*0,\s*0\))$/i.test(n)?n:e}function si(t,e){const n=ke(t,""),r=e?ke(e,""):"";return n&&n!==r?n:void 0}function oi(t,e){const n=typeof t=="number"?t:parseFloat(t!=null?t:""),r=typeof e=="number"?e:parseFloat(e!=null?e:"");return Number.isFinite(n)&&(!Number.isFinite(r)||n!==r)?n:void 0}function as(t){return Array.isArray(t)?t.filter(e=>Number.isFinite(e)&&e>0):(t||"").split(/[,\s]+/).map(e=>parseFloat(e)).filter(e=>Number.isFinite(e)&&e>0)}function r1(t,e){const n=t.getPropertyValue("font").trim();if(n)return n;const r=t.getPropertyValue("font-size").trim(),i=t.getPropertyValue("font-family").trim();if(!r||!i)return e;const s=t.getPropertyValue("font-style").trim(),o=t.getPropertyValue("font-variant").trim(),l=t.getPropertyValue("font-weight").trim(),c=t.getPropertyValue("line-height").trim(),u=c&&c!=="normal"?`${r}/${c}`:r;return[s&&s!=="normal"?s:"",o&&o!=="normal"?o:"",l&&!/^(normal|400)$/.test(l)?l:"",u,i].filter(Boolean).join(" ")}function Pr(t,e){var n;const r=e.replace(/-([a-z])/g,(i,s)=>s.toUpperCase());return(n=t[e])!=null?n:t[r]}function Ke(t,e){const n=Pr(t,e);return(n==null?"":ke(String(n),""))||void 0}function Pn(t,e){const n=Pr(t,e),r=typeof n=="number"?n:parseFloat(String(n!=null?n:""));return Number.isFinite(r)?r:void 0}function da(t){const e=Pn(t,"opacity"),n=Pn(t,"fill-opacity");return e===void 0&&n===void 0?void 0:(e!=null?e:1)*(n!=null?n:1)}function Tc(t){const e=Pr(t,"stroke-dasharray"),n=e==null?[]:as(e);return n.length?n:void 0}function nr(t){var e,n,r,i;const s=Pr(t,"font");if(s!=null&&String(s).trim())return String(s).trim();const o=Pr(t,"font-size"),l=Pr(t,"font-family");if(o==null||l==null)return;const c=String(o).trim(),u=String(l).trim();if(!c||!u)return;const f=String((e=Pr(t,"font-style"))!=null?e:"").trim(),d=String((n=Pr(t,"font-variant"))!=null?n:"").trim(),h=String((r=Pr(t,"font-weight"))!=null?r:"").trim(),m=String((i=Pr(t,"line-height"))!=null?i:"").trim();return[f&&f!=="normal"?f:"",d&&d!=="normal"?d:"",h&&!/^(normal|400)$/.test(h)?h:"",m&&m!=="normal"?`${c}/${m}`:c,u].filter(Boolean).join(" ")}function Qe(t,e,n){var r;const i=Object.keys(n).reduce((s,o)=>(n[o]!==void 0&&(s[o]=n[o]),s),{});Object.keys(i).length&&(t[e]=Xr((r=t[e])!=null?r:{},i))}function ch(t){return t.split(",").map(e=>e.trim().replace(/\s*>\s*/g," ").replace(/\s+/g," ").replace(/^(?:svg)?\.bb\s+/,"").replace(/(^|\s)(?:g|path|rect|line|text|circle)\./g,"$1.")).filter(Boolean)}function bc(t){return Object.keys(t).filter(e=>t[e]!==void 0)}function uh(t,e,n){return bc(e).forEach(r=>{n!=null&&n.has(r)||(t[r]=e[r])}),t}function fh(t){const e=t.split(" ");return e.every((n,r)=>n==="line"||n==="text"?r===e.length-1:/^(\.[A-Za-z_-][\w-]*)+$/.test(n))}function dh(t){const e=t.split(" "),n=e[e.length-1];return n==="line"||n==="text"?n:null}function a1(t){return(t||"").split(/\s+/).filter(Boolean)}function i1(t,e){const n=e==="text"?{labelColor:Ke(t,"fill"),labelFont:nr(t)}:{lineColor:Ke(t,"stroke"),lineWidth:Pn(t,"stroke-width"),dashArray:Tc(t)};return uh({},n)}function s1(t){const e=[];return Object.keys(t!=null?t:{}).forEach(n=>{ch(n).forEach(r=>{const i=dh(r)||"line",s=i1(t[n],i);fh(r)&&bc(s).length&&e.push({selector:r,target:i,style:s})})}),e}function o1(t,e,n,r){if(!fh(t))return!1;const i=dh(t);if(i&&i!==r)return!1;if(!i&&r==="text")return!1;const s=a1(n),o=`bb-${e}grid-line`,l=new Set(["bb-grid","bb-grid-lines",`bb-${e}grid-lines`,o,...s]),c=(t.match(/\.[A-Za-z_-][\w-]*/g)||[]).map(u=>u.slice(1));return!!c.length&&c.every(u=>l.has(u))&&(c.includes(o)||s.some(u=>c.includes(u)))}function l1(t,e,n){switch(e){case".bb-axis path.domain":case".bb-axis .domain":case".bb-axis-x path.domain":case".bb-axis-x .domain":case".bb-axis-y path.domain":case".bb-axis-y .domain":case".bb-axis-y2 path.domain":case".bb-axis-y2 .domain":Qe(t,"axis",{lineColor:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width")});break;case".bb-axis line":case".bb-axis .tick line":case".bb-axis-x line":case".bb-axis-x .tick line":case".bb-axis-y line":case".bb-axis-y .tick line":case".bb-axis-y2 line":case".bb-axis-y2 .tick line":Qe(t,"axis",{tickColor:Ke(n,"stroke"),tickWidth:Pn(n,"stroke-width")});break;case".bb-axis text":case".bb-axis .tick text":{const r=nr(n);Qe(t,"axis",{labelColor:Ke(n,"fill"),xTickFont:r,yTickFont:r,y2TickFont:r});break}case".bb-axis-x text":case".bb-axis-x .tick text":Qe(t,"axis",{labelColor:Ke(n,"fill"),xTickFont:nr(n)});break;case".bb-axis-y text":case".bb-axis-y .tick text":Qe(t,"axis",{labelColor:Ke(n,"fill"),yTickFont:nr(n)});break;case".bb-axis-y2 text":case".bb-axis-y2 .tick text":Qe(t,"axis",{labelColor:Ke(n,"fill"),y2TickFont:nr(n)});break;case".tick._active_ text":case".bb-axis .tick._active_ text":case".bb-axis-x .tick._active_ text":Qe(t,"axis",{activeLabelColor:Ke(n,"fill")});break;case".bb-axis-x-label":case".bb-axis-x .bb-axis-x-label":Qe(t,"axis",{labelFont:nr(n),xLabelColor:Ke(n,"fill")});break;case".bb-axis-y-label":case".bb-axis-y .bb-axis-y-label":Qe(t,"axis",{labelFont:nr(n),yLabelColor:Ke(n,"fill")});break;case".bb-axis-y2-label":case".bb-axis-y2 .bb-axis-y2-label":Qe(t,"axis",{labelFont:nr(n),y2LabelColor:Ke(n,"fill")});break;case".bb-grid line":case".bb-grid .bb-xgrid":case".bb-grid .bb-ygrid":case".bb-xgrid":case".bb-ygrid":Qe(t,"grid",{lineColor:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width"),dashArray:Tc(n)});break;case".bb-grid text":Qe(t,"grid",{labelColor:Ke(n,"fill"),labelFont:nr(n)});break;case".bb-xgrid-focus line":case".bb-grid .bb-xgrid-focus line":case".bb-grid .bb-xgrid-focus":Qe(t,"focusGrid",{lineColor:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width"),dashArray:Tc(n)});break;case".bb-region rect":case".bb-region":Qe(t,"region",{fill:Ke(n,"fill"),opacity:da(n)});break;case".bb-region text":Qe(t,"region",{labelColor:Ke(n,"fill"),labelFont:nr(n)});break;case".bb-bar":Qe(t,"shape",{barOpacity:da(n),barStrokeColor:Ke(n,"stroke"),barLineWidth:Pn(n,"stroke-width")});break;case".bb-bar._expanded_":Qe(t,"shape",{barExpandedOpacity:da(n)});break;case".bb-candlestick":Qe(t,"shape",{candlestickStrokeColor:Ke(n,"stroke"),candlestickLineWidth:Pn(n,"stroke-width")});break;case".bb-candlestick._expanded_":Qe(t,"shape",{candlestickExpandedOpacity:da(n)});break;case".bb-line":Qe(t,"shape",{barConnectLineColor:Ke(n,"stroke"),barConnectLineWidth:Pn(n,"stroke-width"),lineWidth:Pn(n,"stroke-width")});break;case".bb-target.bb-focused .bb-line":case".bb-target.bb-focused path.bb-line":Qe(t,"shape",{lineFocusedWidth:Pn(n,"stroke-width")});break;case".bb-target.bb-defocused":Qe(t,"shape",{targetDefocusedOpacity:Pn(n,"opacity")});break;case".bb-area":Qe(t,"shape",{areaOpacity:da(n)});break;case".bb-circle":Qe(t,"shape",{pointFillColor:Ke(n,"fill"),pointStrokeColor:Ke(n,"stroke"),pointLineWidth:Pn(n,"stroke-width")});break;case".bb-selected-circle":Qe(t,"selectedPoint",{fill:Ke(n,"fill"),stroke:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width")});break;case".bb-circle._expanded_":Qe(t,"focusPoint",{fill:Ke(n,"fill"),stroke:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width")});break;case".bb-zoom-brush":Qe(t,"zoomBrush",{fill:Ke(n,"fill"),opacity:da(n)});break;case".bb-brush .extent":case".bb-brush .selection":Qe(t,"subchartBrush",{fill:Ke(n,"fill"),opacity:da(n)});break;case".bb-brush .handle--custom":Qe(t,"subchartBrush",{handleFill:Ke(n,"fill"),handleOpacity:da(n),handleStroke:Ke(n,"stroke"),handleLineWidth:Pn(n,"stroke-width")});break;case".bb-chart-treemaps rect":case".bb-chart-treemaps":Qe(t,"treemap",{stroke:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width")});break;case".bb-text.bb-empty":case".bb-text .bb-empty":case".bb-empty":Qe(t,"emptyLabel",{color:Ke(n,"fill"),font:nr(n)});break;case".bb-text":Qe(t,"label",{color:Ke(n,"fill"),font:nr(n)});break;case".bb-title":Qe(t,"title",{color:Ke(n,"fill"),font:nr(n)});break}}function c1(t){const e={};return Object.keys(t!=null?t:{}).forEach(n=>{ch(n).forEach(r=>{l1(e,r,t[n])})}),e}function u1(t){if(!t)return{};const e=t,{selectors:n}=e,r=n1(e,["selectors"]);return Xr({},c1(n),r)}function hh(t,e){try{return JSON.stringify({className:t.className,style:t.getAttribute("style")||"",override:e||null})}catch(n){return null}}class f1{constructor(){rs(this,"style"),rs(this,"cacheContainer",null),rs(this,"cacheKey",null),rs(this,"gridLineSelectorOverrides",[]),rs(this,"directGridOverrideKeys",new Set)}load(e,n){var r,i,s,o,l;const c=Ye.createElementNS(Or,"svg");this.gridLineSelectorOverrides=s1(n==null?void 0:n.selectors),this.directGridOverrideKeys=new Set(Object.keys((r=n==null?void 0:n.grid)!=null?r:{})),c.setAttribute("class","bb"),c.style.cssText="position:absolute;visibility:hidden;pointer-events:none;width:0;height:0;overflow:hidden",e.appendChild(c);const u=(wn,Xn)=>{const Hn=se.getComputedStyle(wn),Qn={};for(const Fn of Xn)Qn[Fn]=Fn==="font"?r1(Hn,""):Hn.getPropertyValue(Fn).trim();return Qn},f=(wn,Xn,Hn)=>{const Qn=Ye.createElementNS(Or,wn);Qn.setAttribute("class",Xn),c.appendChild(Qn);const Fn=u(Qn,Hn);return c.removeChild(Qn),Fn},d=(wn,Xn,Hn,Qn)=>{const Fn=Ye.createElementNS(Or,"g"),dr=Ye.createElementNS(Or,Xn);Fn.setAttribute("class",wn),Hn&&dr.setAttribute("class",Hn),Fn.appendChild(dr),c.appendChild(Fn);const na=u(dr,Qn);return c.removeChild(Fn),na},h=(wn,Xn,Hn,Qn,Fn)=>{const dr=Ye.createElementNS(Or,"g"),na=Ye.createElementNS(Or,"g"),As=Ye.createElementNS(Or,Hn);dr.setAttribute("class",wn),na.setAttribute("class",Xn),Qn&&As.setAttribute("class",Qn),na.appendChild(As),dr.appendChild(na),c.appendChild(dr);const kR=u(As,Fn);return c.removeChild(dr),kR},m=(wn,Xn,Hn,Qn="")=>{const Fn=Ye.createElementNS(Or,"g"),dr=Ye.createElementNS(Or,"g"),na=Ye.createElementNS(Or,Xn);Fn.setAttribute("class",`bb-axis ${wn}`),dr.setAttribute("class",["tick",Qn].filter(Boolean).join(" ")),na.textContent=Xn==="text"?"0":"",dr.appendChild(na),Fn.appendChild(dr),c.appendChild(Fn);const As=u(na,Hn);return c.removeChild(Fn),As},S="rgb(1, 2, 3)",E=(wn,Xn)=>{const Hn=Ye.createElement("style");Hn.textContent=`
39
39
  .bb-shapes-canvas-probe .bb-circle {
40
40
  fill: ${S};
41
41
  stroke: ${S};
42
42
  }
43
- `,Ze.head.appendChild(Qn);try{return d("bb-shapes bb-shapes-canvas-probe","circle",Mn,jn)}finally{Qn.remove()}},C=d("bb-axis bb-axis-x","path","domain",["stroke","stroke-width"]),w=m("bb-axis-x","line",["stroke","stroke-width"]),N=m("bb-axis-x","text",["fill","font"]),z=m("bb-axis-x","text",["fill"],"_active_"),$=m("bb-axis-y","text",["fill","font"]),G=m("bb-axis-y2","text",["fill","font"]),V=d("bb-axis bb-axis-x","text","bb-axis-x-label",["fill","font"]),J=d("bb-axis bb-axis-y","text","bb-axis-y-label",["fill","font"]),Q=d("bb-axis bb-axis-y2","text","bb-axis-y2-label",["fill","font"]),rt=f("circle","",["fill","stroke","stroke-width"]),et=d("bb-grid","line","bb-ygrid",["stroke","stroke-width","stroke-dasharray"]),st=d("bb-grid","text","",["fill","font"]),ct=h("bb-grid","bb-xgrid-focus","line","bb-xgrid-focus",["stroke","stroke-width","stroke-dasharray"]),dt=f("text","bb-text bb-empty",["fill","font"]),q=d("bb-region","rect","",["fill","fill-opacity"]),ft=d("bb-region","text","",["fill","font"]),lt=f("path","bb-bar",["opacity","fill-opacity","stroke","stroke-width"]),pt=f("path","bb-bar _expanded_",["opacity","fill-opacity"]),Tt=f("path","bb-candlestick",["stroke","stroke-width"]),Rt=f("path","bb-candlestick _expanded_",["opacity","fill-opacity"]),Ct=f("path","bb-line",["stroke-width"]),Kt=d("bb-target bb-focused","path","bb-line",["stroke-width"]),re=f("g","bb-target bb-defocused",["opacity"]),Ee=f("path","bb-area",["opacity","fill-opacity"]),Ce=f("circle","bb-circle",["fill","stroke","stroke-width"]),be=f("circle","bb-selected-circle",["fill","stroke","stroke-width"]),Ne=E("bb-circle _expanded_",["fill","stroke","stroke-width"]),ye=f("rect","bb-zoom-brush",["fill","fill-opacity","opacity"]),De=d("bb-brush","rect","extent",["fill","fill-opacity","opacity"]),Zt=d("bb-brush","rect","selection",["fill","fill-opacity","opacity"]),ve=d("bb-brush","path","handle--custom",["fill","fill-opacity","opacity","stroke","stroke-width"]),xe=d("bb-chart-treemaps","rect","",["stroke","stroke-width"]),Vt=f("text","bb-text",["fill","font"]),je=d("","text","bb-title",["fill","font"]),We=Ge(ye.fill,"#000"),xn=Fe(ye["fill-opacity"]||ye.opacity,.1),wn=Ge(Zt.fill,Ge(De.fill,We)),Ae=(l=(s=(o=(i=si(Zt["fill-opacity"],1))!=null?i:si(Zt.opacity,1))!=null?o:si(De["fill-opacity"],1))!=null?s:si(De.opacity,1))!=null?l:xn,hn=Ge(ve.stroke,"transparent"),an={axis:{lineColor:Ge(C.stroke,"#000"),lineWidth:Fe(C["stroke-width"],1),tickColor:Ge(w.stroke,Ge(C.stroke,"#000")),tickWidth:Fe(w["stroke-width"],Fe(C["stroke-width"],1)),labelFont:J.font||$.font||"10px sans-serif",xTickFont:N.font||$.font||"10px sans-serif",yTickFont:$.font||"10px sans-serif",y2TickFont:G.font||$.font||"10px sans-serif",labelColor:Ge($.fill,"#000"),xLabelColor:Ge(V.fill,Ge(N.fill,"#000")),yLabelColor:Ge(J.fill,Ge($.fill,"#000")),y2LabelColor:Ge(Q.fill,Ge(J.fill,Ge($.fill,"#000"))),activeLabelColor:oi(z.fill,N.fill)||Ge($.fill,"#000")},grid:{lineColor:Ge(et.stroke,"#aaa"),lineWidth:Fe(et["stroke-width"],1),dashArray:to(et["stroke-dasharray"]),labelFont:st.font||$.font||"10px sans-serif",labelColor:Ge(st.fill,"#aaa")},focusGrid:{lineColor:Ge(ct.stroke,Ge(et.stroke,"#aaa")),lineWidth:Fe(ct["stroke-width"],Fe(et["stroke-width"],1)),dashArray:to(ct["stroke-dasharray"]||et["stroke-dasharray"])},emptyLabel:{font:dt.font||Vt.font||$.font||"20px sans-serif",color:Ge(dt.fill,"#808080")},region:{fill:Ge(q.fill,"steelblue"),opacity:Fe(q["fill-opacity"],.1),labelFont:ft.font||$.font||"10px sans-serif",labelColor:Ge(ft.fill,"#000")},shape:{barOpacity:$a(lt,1),barExpandedOpacity:Fe($a(pt,$a(lt,1)),$a(lt,1)),barStrokeColor:Ge(lt.stroke,"#000"),barLineWidth:Fe(lt["stroke-width"],0),barConnectLineColor:Ge(Ct.stroke,"#000"),barConnectLineWidth:Fe(Ct["stroke-width"],1),candlestickStrokeColor:Ge(Tt.stroke,"#000"),candlestickLineWidth:Fe(Tt["stroke-width"],1),candlestickExpandedOpacity:Fe($a(Rt,1),1),lineWidth:Fe(Ct["stroke-width"],1),lineFocusedWidth:Fe(Kt["stroke-width"],2),areaOpacity:$a(Ee,.2),targetDefocusedOpacity:Fe(re.opacity,.3),pointFillColor:oi(Ce.fill,rt.fill),pointStrokeColor:oi(Ce.stroke,rt.stroke),pointLineWidth:si(Ce["stroke-width"],rt["stroke-width"])},selectedPoint:{fill:Ge(be.fill,"#fff"),stroke:oi(be.stroke),lineWidth:Fe(be["stroke-width"],2)},focusPoint:{fill:oi(Ne.fill,S),stroke:oi(Ne.stroke,S),lineWidth:Fe(Ne["stroke-width"],1)},zoomBrush:{fill:We,opacity:xn},subchartBrush:{fill:wn,opacity:Ae,handleFill:Ge(ve.fill,"transparent"),handleOpacity:$a(ve,1),handleStroke:hn,handleLineWidth:Fe(ve["stroke-width"],hn==="transparent"?0:1)},treemap:{stroke:Ge(xe.stroke,"#fff"),lineWidth:Fe(xe["stroke-width"],1)},label:{font:Vt.font||$.font||"10px sans-serif",color:Ge(Vt.fill,"#000")},title:{font:je.font||Vt.font||$.font||"14px sans-serif",color:Ge(je.fill,"#000")}},kr=s1(n),qt=Kr(an,kr),Aa=n==null?void 0:n.axis,NR=!!Aa&&Object.prototype.hasOwnProperty.call(Aa,"labelColor"),$R=!!Aa&&Object.prototype.hasOwnProperty.call(Aa,"labelFont");if(qt.axis.lineWidth=Fe(qt.axis.lineWidth,an.axis.lineWidth),qt.axis.tickWidth=Fe(qt.axis.tickWidth,qt.axis.lineWidth),$R){const Mn=Aa,jn=qt.axis.labelFont;Mn.xTickFont===void 0&&(qt.axis.xTickFont=jn),Mn.yTickFont===void 0&&(qt.axis.yTickFont=jn),Mn.y2TickFont===void 0&&(qt.axis.y2TickFont=jn)}if(qt.axis.labelFont=qt.axis.labelFont||an.axis.labelFont,qt.axis.xTickFont=qt.axis.xTickFont||qt.axis.labelFont,qt.axis.yTickFont=qt.axis.yTickFont||qt.axis.labelFont,qt.axis.y2TickFont=qt.axis.y2TickFont||qt.axis.yTickFont,qt.axis.labelColor=Ge(qt.axis.labelColor,an.axis.labelColor),NR){const Mn=qt.axis.labelColor;Aa.xLabelColor===void 0&&(qt.axis.xLabelColor=Mn),Aa.yLabelColor===void 0&&(qt.axis.yLabelColor=Mn),Aa.y2LabelColor===void 0&&(qt.axis.y2LabelColor=Mn)}qt.axis.xLabelColor=Ge(qt.axis.xLabelColor,qt.axis.labelColor),qt.axis.yLabelColor=Ge(qt.axis.yLabelColor,qt.axis.labelColor),qt.axis.y2LabelColor=Ge(qt.axis.y2LabelColor,qt.axis.yLabelColor),qt.axis.activeLabelColor=Ge(qt.axis.activeLabelColor,qt.axis.labelColor),qt.grid.lineWidth=Fe(qt.grid.lineWidth,an.grid.lineWidth),qt.grid.dashArray=to(qt.grid.dashArray),qt.focusGrid.lineWidth=Fe(qt.focusGrid.lineWidth,an.focusGrid.lineWidth),qt.focusGrid.dashArray=to(qt.focusGrid.dashArray),qt.region.opacity=Fe(qt.region.opacity,an.region.opacity),qt.shape.barOpacity=Fe(qt.shape.barOpacity,an.shape.barOpacity),qt.shape.barExpandedOpacity=Fe(qt.shape.barExpandedOpacity,qt.shape.barOpacity),qt.shape.barLineWidth=Fe(qt.shape.barLineWidth,an.shape.barLineWidth),qt.shape.barConnectLineWidth=Fe(qt.shape.barConnectLineWidth,an.shape.barConnectLineWidth),qt.shape.candlestickLineWidth=Fe(qt.shape.candlestickLineWidth,an.shape.candlestickLineWidth),qt.shape.candlestickStrokeColor=Ge(qt.shape.candlestickStrokeColor,an.shape.candlestickStrokeColor),qt.shape.candlestickExpandedOpacity=Fe(qt.shape.candlestickExpandedOpacity,an.shape.candlestickExpandedOpacity),qt.shape.lineWidth=Fe(qt.shape.lineWidth,an.shape.lineWidth),qt.shape.lineFocusedWidth=Fe(qt.shape.lineFocusedWidth,an.shape.lineFocusedWidth),qt.shape.areaOpacity=Fe(qt.shape.areaOpacity,an.shape.areaOpacity),qt.shape.targetDefocusedOpacity=Fe(qt.shape.targetDefocusedOpacity,an.shape.targetDefocusedOpacity),qt.shape.pointLineWidth=si(qt.shape.pointLineWidth),qt.selectedPoint.lineWidth=Fe(qt.selectedPoint.lineWidth,an.selectedPoint.lineWidth),qt.focusPoint.lineWidth=Fe(qt.focusPoint.lineWidth,an.focusPoint.lineWidth),qt.zoomBrush.opacity=Fe(qt.zoomBrush.opacity,an.zoomBrush.opacity),qt.subchartBrush.opacity=Fe(qt.subchartBrush.opacity,an.subchartBrush.opacity),qt.subchartBrush.handleOpacity=Fe(qt.subchartBrush.handleOpacity,an.subchartBrush.handleOpacity),qt.subchartBrush.handleLineWidth=Fe(qt.subchartBrush.handleLineWidth,an.subchartBrush.handleLineWidth),qt.treemap.lineWidth=Fe(qt.treemap.lineWidth,an.treemap.lineWidth),this.style=qt,this.cacheContainer=e,this.cacheKey=sh(e,n),c.remove()}reload(e,n){const r=sh(e,n);r!==null&&this.style&&this.cacheContainer===e&&this.cacheKey===r||this.load(e,n)}getGridLineStyle(e,n={},r="line"){const i={};for(const o of this.gridLineSelectorOverrides)a1(o.selector,e,n.class,r)&&ah(i,o.style,this.directGridOverrideKeys);return pc(i).length?i:void 0}}var c1=Object.defineProperty,u1=(t,e,n)=>e in t?c1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Er=(t,e,n)=>u1(t,typeof e!="symbol"?e+"":e,n);const Ba=24,lh=64,mc=[Ar,or,Zn];function li(t,e){return Math.floor(t/e)}function ch(t,e,n){var r,i;const o=li(e.x,n),s=li(e.x+((r=e.w)!=null?r:0),n),l=li(e.y,n),c=li(e.y+((i=e.h)!=null?i:0),n);for(let u=o;u<=s;u++)for(let f=l;f<=c;f++){const d=`${u}:${f}`,h=t.get(d);h?h.push(e):t.set(d,[e])}}function uh(t,e,n,r,i=0){const o=li(e,r),s=li(n,r),l=[];for(let c=-i;c<=i;c++)for(let u=-i;u<=i;u++){const f=t.get(`${o+c}:${s+u}`);if(f!=null&&f.length)for(let d=0;d<f.length;d++)l.push(f[d])}return l}function f1(t,e){var n,r,i;const o=t.config.point_sensitivity;if(Number.isFinite(o))return o;(n=t.pointR)==null||n.call(t,e);const s=(i=(r=t.getPointSensitivity)==null?void 0:r.call(t,e))!=null?i:Ba;return Number.isFinite(s)?s:Ba}function d1(t,e){return ga(t,e)&&e.values.length>Wf&&!t.config.data_selection_enabled&&Number.isFinite(t.config.point_sensitivity)&&Number.isFinite(t.config.point_r)}class h1{constructor(){Er(this,"bars",[]),Er(this,"points",[]),Er(this,"indices",[]),Er(this,"barGrid",new Map),Er(this,"pointGrid",new Map),Er(this,"plot",{x:0,y:0,w:0,h:0}),Er(this,"pointCellSize",Ba),Er(this,"maxPointSensitivity",Ba),Er(this,"grouped",!1),Er(this,"pointBased",!1),Er(this,"indexAxis","x")}rebuild(e,n){var r,i,o;const{current:s,margin:l,width:c,height:u}=e.state,f=e.filterTargetsToShow();this.bars=[],this.points=[],this.indices=[],this.barGrid=new Map,this.pointGrid=new Map,this.maxPointSensitivity=Ba,this.indexAxis=e.config.axis_rotated?"y":"x",this.plot=e.state.hasTreemap?{x:0,y:0,w:s.width,h:s.height}:{x:l.left,y:l.top,w:c,h:u},this.grouped=!!e.config.tooltip_grouped&&!e.state.hasTreemap,this.pointBased=!(e.config.axis_x_forceAsSingle&&this.grouped)&&(!!((r=e.isMultipleX)!=null&&r.call(e))||f.some(C=>ga(e,C)||va(e,C)));const h=this.grouped&&(!this.pointBased||e.config.data_selection_enabled&&e.config.data_selection_grouped)?new Map:null,m=(C,w,N)=>{var z,$;if(!h)return;const G=($=(z=e.getXCacheKey)==null?void 0:z.call(e,N.x))!=null?$:N.index;Number.isFinite(N.index)&&!h.has(G)&&mn(C,w)&&h.set(G,{x:C,y:w,data:N})};if(e.state.hasTreemap){const C=(i=e.getTreemapRoot)==null?void 0:i.call(e,e.data.targets),w=(C==null?void 0:C.children)||[];for(const N of w){const{data:z}=N;if(!Nl(e,z))continue;const{x:$,y:G,w:V,h:J}=ai(e,N,C,!0);!mn($,G)||!mn($+V,G+J)||this.addBar({x:$,y:G,w:V,h:J,data:z})}this.indices=[];return}if(n.indices[kt.BAR]||f.some(or.bind(null,e))){const C=or.bind(null,e),w=ir(e,n,kt.BAR,C),N=e.generateGetBarPoints(w,!1);f.filter(C).filter(z=>ei(e,z,mc)).forEach(z=>{const $=Zr(e,z);for(let G=$.start;G<$.end;G++){const V=z.values[G];if(!In(e,V))continue;const J=Yi(e,N,V,G);if(!J)continue;const{rect:Q}=J,rt=l.left+Q.x,et=l.top+Q.y,{w:st,h:ct}=Q;this.addBar({x:rt,y:et,w:st,h:ct,data:V}),m(rt+st/2,et+ct/2,V)}})}if(n.indices[kt.CANDLESTICK]||f.some(Zn.bind(null,e))){const C=Zn.bind(null,e),w=ir(e,n,kt.CANDLESTICK,C),N=(o=e.generateGetCandlestickPoints)==null?void 0:o.call(e,w,!1);N&&f.filter(C).filter(z=>ei(e,z,mc)).forEach(z=>{var $;const G=Zr(e,z);for(let V=G.start;V<G.end;V++){const J=z.values[V];if(!(($=e.getCandlestickData)==null?void 0:$.call(e,J)))continue;const rt=Ki(e,N,J,V);if(!rt)continue;const{body:et}=rt,st=l.left+et.x,ct=l.top+et.y,{w:dt,h:q}=et;this.addBar({x:st,y:ct,w:Math.max(1,dt),h:Math.max(1,q),data:J}),m(st+dt/2,ct+q/2,J)}})}const{cx:S,cy:E}=n.pos;S&&E&&f.filter(Ar.bind(null,e)).filter(C=>ei(e,C,mc)).forEach(C=>{const w=Zr(e,C),N=d1(e,C)?jf(c,u,e.config.point_r):null;for(let z=w.start;z<w.end;z++){const $=C.values[z];if(!In(e,$))continue;const G=l.left+S($,z),V=l.top+E($,z),J=f1(e,$);mn(G,V)&&(N&&!Hf(N,G-l.left,V-l.top)||(this.addPoint({x:G,y:V,sensitivity:J,data:$}),m(G,V,$)))}}),this.buildPointGrid(),this.indices=h?Array.from(h.values()).sort((C,w)=>C[this.indexAxis]-w[this.indexAxis]):[]}hitBar(e,n){for(const r of uh(this.barGrid,e,n,lh)){const{w:i=0,h:o=0}=r;if(e>=r.x&&e<=r.x+i&&n>=r.y&&n<=r.y+o)return r.data}return null}hitPoint(e,n){var r,i;let o=null,s=Number.POSITIVE_INFINITY;for(const l of uh(this.pointGrid,e,n,this.pointCellSize,1)){const c=l.x-e,u=l.y-n,f=Math.sqrt(c*c+u*u),d=(r=l.sensitivity)!=null?r:Ba;f<=d&&f<s&&(s=f,o=l)}return(i=o==null?void 0:o.data)!=null?i:null}findNearest(e,n){const r=this.hitBar(e,n);if(r)return r;if(!this.pointBased&&this.grouped&&this.isWithinPlot(e,n)){const i=this.findNearestIndexItem(e,n);if(i)return i.data}return this.hitPoint(e,n)}findNearestShape(e,n){var r;return(r=this.hitBar(e,n))!=null?r:this.hitPoint(e,n)}findNearestIndexByCoord(e,n){var r,i;return(i=(r=this.findNearestIndexItem(e,n))==null?void 0:r.data)!=null?i:null}findInRect(e,n=!1){const r=Math.min(e.x,e.x+e.w),i=Math.max(e.x,e.x+e.w),o=Math.min(e.y,e.y+e.h),s=Math.max(e.y,e.y+e.h),l=new Set,c=[],u=f=>{const d=f.data,h=`${d.id}:${d.index}`;l.has(h)||(l.add(h),c.push(d))};if(n){const f=this.indexAxis,d=f==="y"?o:r,h=f==="y"?s:i;return this.indices.filter(m=>m[f]>=d&&m[f]<=h).forEach(u),c}return this.bars.filter(f=>{var d,h;const m=(d=f.w)!=null?d:0,S=(h=f.h)!=null?h:0;return!(i<f.x||f.x+m<r)&&!(s<f.y||f.y+S<o)}).forEach(u),this.points.filter(f=>f.x>=r&&f.x<=i&&f.y>=o&&f.y<=s).forEach(u),c}addBar(e){this.bars.push(e),ch(this.barGrid,e,lh)}addPoint(e){var n;const r=(n=e.sensitivity)!=null?n:Ba;this.maxPointSensitivity=Math.max(this.maxPointSensitivity,r),this.points.push(e)}buildPointGrid(){this.pointCellSize=Math.max(1,this.maxPointSensitivity),this.pointGrid=new Map;for(const e of this.points)ch(this.pointGrid,e,this.pointCellSize)}isWithinPlot(e,n){const{plot:r}=this;return e>=r.x&&e<=r.x+r.w&&n>=r.y&&n<=r.y+r.h}findNearestIndexItem(e,n){const{indexAxis:r,indices:i}=this,o=r==="y"?n:e;if(!i.length)return null;let s=0,l=i.length-1;for(;s<l;){const f=s+l>>1;i[f][r]<o?s=f+1:l=f}const c=i[s],u=i[s-1];return u&&Math.abs(u[r]-o)<Math.abs(c[r]-o)?u:c}}var g1=Object.defineProperty,fh=Object.getOwnPropertySymbols,v1=Object.prototype.hasOwnProperty,p1=Object.prototype.propertyIsEnumerable,dh=(t,e,n)=>e in t?g1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dn=(t,e)=>{for(var n in e||(e={}))v1.call(e,n)&&dh(t,n,e[n]);if(fh)for(var n of fh(e))p1.call(e,n)&&dh(t,n,e[n]);return t};const Ue={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_",dummy:"_dummy_"},Qe={arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcLabelLineText:"bb-arc-label-line-text",arcRange:"bb-arc-range",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title",needle:"bb-needle"},hs={area:"bb-area",areas:"bb-areas"},Pn={axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label",axisXTooltip:"bb-axis-x-tooltip",axisYTooltip:"bb-axis-y-tooltip",axisY2Tooltip:"bb-axis-y2-tooltip",axisTooltipX:"bb-axis-tooltip-x",axisTooltipY:"bb-axis-tooltip-y"},lr={bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars",barConnectLine:"bb-bar-connectLine"},ta={candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"},Un={chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"},xc={colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"},za={dragarea:"bb-dragarea",INCLUDED:"_included_"},eo={funnel:"bb-funnel",chartFunnel:"bb-chart-funnel",chartFunnels:"bb-chart-funnels",funnelBackground:"bb-funnel-background"},cr={chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"},Be={legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"},$r={chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"},ea={eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"},nn={focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",xgridFocusContinuous:"bb-xgrid-focus-continuous",ygridFocus:"bb-ygrid-focus"},Sn={grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"},na={level:"bb-level",levels:"bb-levels"},hh={chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"},no={region:"bb-region",regions:"bb-regions"},sn={selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"},An={shape:"bb-shape",shapes:"bb-shapes"},gh={brush:"bb-brush",subchart:"bb-subchart"},Rn={chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",textBorderRect:"bb-text-border",textLabelImage:"bb-text-label-image",TextOverlapping:"text-overlapping"},gs={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"},vh={treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"},yc={buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"};var Ie=dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn({},Ue),Qe),hs),Pn),lr),ta),Un),xc),za),cr),Be),$r),ea),nn),eo),Sn),na),hh),no),sn),An),gh),Rn),gs),vh),yc),m1={boost_useCssRule:!1,boost_useWorker:!1,boost_workerUrl:void 0},x1={color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0},y1={legend_contents_bindto:void 0,legend_contents_template:"<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_format:void 0,legend_padding:0,legend_position:"bottom",legend_show:!0,legend_tooltip:!1,legend_usePoint:!1},T1={bindto:"#chart",background:{},clipPath:!0,svg_classname:void 0,size_width:void 0,size_height:void 0,padding:!0,padding_mode:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,resize_timer:!0,onclick:void 0,onover:void 0,onout:void 0,onresize:void 0,onresized:void 0,onbeforeinit:void 0,oninit:void 0,onafterinit:void 0,onrendered:void 0,transition_duration:250,plugins:[],render:{},render_mode:"svg",canvas_theme:{},regions:[]},b1={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},S1={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:void 0,tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:()=>{},tooltip_onhide:()=>{},tooltip_onshown:()=>{},tooltip_onhidden:()=>{},tooltip_order:null},A1={data_x:void 0,data_idConverter:t=>t,data_names:{},data_classes:{},data_type:void 0,data_types:{},data_order:"desc",data_groups:[],data_groupsZeroAs:"positive",data_color:void 0,data_colors:{},data_labels:{},data_labels_backgroundColors:void 0,data_labels_colors:void 0,data_labels_position:{},data_labels_imgUrl:void 0,data_hide:!1,data_filter:void 0,data_onclick:()=>{},data_onover:()=>{},data_onout:()=>{},data_onshown:void 0,data_onhidden:void 0,data_onmin:void 0,data_onmax:void 0,data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:"csv",data_keys:void 0,data_empty_label_text:""},E1={interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},interaction_onout:!0},C1=Object.defineProperty,I1=(t,e,n)=>e in t?C1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,R1=(t,e,n)=>I1(t,typeof e!="symbol"?e+"":e,n);const ph=class Jp{static setOptions(e){for(let n=0;n<e.length;n++)Object.assign(this.data,e[n])}constructor(){return Uy(T1,m1,A1,x1,E1,y1,b1,S1,Jp.data)}};R1(ph,"data",{});let Ua=ph;class w1{constructor(){return{chart:null,main:null,svg:null,axis:{x:null,y:null,y2:null,subX:null,subY:null,subY2:null},axisTooltip:{x:null,y:null,y2:null},defs:null,tooltip:null,legend:null,title:null,subchart:{main:null,bar:null,line:null,area:null},arcs:null,bar:null,candlestick:null,line:null,area:null,circle:null,radar:null,text:null,grid:{main:null,x:null,y:null},gridLines:{main:null,x:null,y:null},region:{main:null,list:null},eventRect:null,zoomResetBtn:null}}}class O1{constructor(){return{width:0,width2:0,height:0,height2:0,margin:{top:0,bottom:0,left:0,right:0},margin2:{top:0,bottom:0,left:0,right:0},margin3:{top:0,bottom:0,left:0,right:0},arcWidth:0,arcHeight:0,xAxisHeight:0,hasAxis:!1,hasFunnel:!1,hasRadar:!1,hasTreemap:!1,isCanvasMode:!1,canvasShape:null,canvasFocusKey:null,canvasSubchartBrushDragging:!1,canvasSubchartBrushMode:null,canvasSubchartBrushStart:null,canvasSubchartBrushOrigin:null,canvasSubchartBrushMoved:!1,canvasFlowFrame:null,canvasFlowFinish:null,canvasFocusMainRedraw:!1,cssRule:{},loading:void 0,domain:void 0,subchartSourceTypes:void 0,current:{domain:void 0,width:0,height:0,dataMax:0,maxTickSize:{x:{width:0,height:0,ticks:[],clipPath:0,domain:""},y:{width:0,height:0,domain:""},y2:{width:0,height:0,domain:""}},types:[],needle:void 0,zoomDomain:null},isLegendRight:!1,isLegendInset:!1,isLegendTop:!1,isLegendLeft:!1,legendStep:0,legendItemWidth:0,legendItemHeight:0,legendHasRendered:!1,canvasInlineStyle:{minHeight:""},canvasSelection:new Set,canvasSelectionDragStart:null,canvasSelectionDragIncluded:new Set,canvasSelectionDragging:!1,canvasSelectionDragMoved:!1,canvasSelectionDragMoveHandler:null,canvasSelectionDragEndHandler:null,eventReceiver:{currentIdx:-1,rect:{},data:[],coords:[]},axis:{x:{padding:{left:0,right:0},tickCount:0}},rotatedPadding:{left:30,right:0,top:5},withoutFadeIn:{},inputType:"",datetimeId:"",clip:{id:"",idXAxis:"",idYAxis:"",idXAxisTickTexts:"",idGrid:"",idSubchart:"",path:"",pathXAxis:"",pathYAxis:"",pathXAxisTickTexts:"",pathGrid:""},event:null,dragStart:null,dragging:!1,flowing:!1,cancelClick:!1,mouseover:!1,rendered:!1,transiting:!1,redrawing:!1,resizing:!1,toggling:!1,zooming:!1,hasNegativeValue:!1,hasPositiveValue:!0,orgAreaOpacity:"0.2",orgConfig:{},hiddenTargetIds:new Set,hiddenLegendIds:new Set,focusedTargetIds:new Set,defocusedTargetIds:new Set,radius:0,innerRadius:0,outerRadius:void 0,innerRadiusRatio:0,gaugeArcWidth:0,radiusExpanded:0,xgridAttr:{x1:null,x2:null,y1:null,y2:null},pendingRaf:null,rafBatchQueue:[],dirty:{data:!1,visibility:!1,size:!1},redrawGeneration:0,dataGeneration:0,_targetsToShow:null,_cachedDrawShape:null,_canvasVisibleRangeCache:null,_canvasXDataTickCache:null,_canvasXTickValuesCache:null,_eventRectFingerprint:null,_lastTooltipMouse:null,_gridFocusEl:null,generateClassCache:new Map}}}const mh={element:w1,state:O1};class P1{constructor(){Object.keys(mh).forEach(e=>{this[e]=new mh[e]})}getStore(e){return this[e]}}var M1=Object.defineProperty,L1=(t,e,n)=>e in t?M1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,D1=(t,e,n)=>L1(t,typeof e!="symbol"?e+"":e,n);const ke={bubbleBaseLength:"$baseLength",bubbleMaxValue:"$bubbleMaxValue",colorPattern:"__colorPattern__",dataMinMax:"$dataMinMax",dataTotalSum:"$dataTotalSum",dataTotalPerIndex:"$totalPerIndex",domainMinMax:"$domainMinMax",filteredTargets:"$filteredTargets",filteredNullish:"$filteredNullish",svgLeft:"$svgLeft",valuesByX:"$valuesByX",legendItemTextBox:"legendItemTextBox",legendItemMap:"$legendItemMap",radarPoints:"$radarPoints",radarTextWidth:"$radarTextWidth",setOverOut:"setOverOut",callOverOutForTouch:"callOverOutForTouch",textRect:"textRect",shapeOffset:"$shapeOffset",maxTickSize:"$maxTickSize",maxDataCountTarget:"$maxDataCountTarget",valuesXIndexMap:"$valuesXIndexMap"};class F1{constructor(){D1(this,"cache",new Map)}add(e,n,r=!1){const i=r?this.cloneTarget(n):n;return this.cache.set(e,i),i}remove(e){const n=Ye(e)?[e]:e;for(let r=0;r<n.length;r++)this.cache.delete(n[r])}get(e,n=!1){if(n&&Array.isArray(e)){const r=[];for(let i=0,o;o=e[i];i++)this.cache.has(o)&&r.push(this.cache.get(o));return r}else return this.cache.has(e)?this.cache.get(e):null}has(e){return this.cache.has(e)}getKeys(){return Array.from(this.cache.keys())}reset(e,n){e?this.cache.clear():this.cache.forEach((r,i)=>{/^\$/.test(i)&&(n!=null&&n.some(o=>i.startsWith(o))||this.cache.delete(i))})}cloneTarget(e){return{id:e.id,id_org:e.id_org,values:e.values.map(n=>({x:n.x,value:n.value,id:n.id}))}}}const xh="https://github.com/naver/billboard.js/blob/master/MODULE_IMPORTS.md";function N1(t){const e=t,{config:n}=e;let r="";if(dr(n.data_type||n.data_types)&&!e[ja.LINE])r="line";else for(const i in ja){const o=kt[i];if(e.hasType(o)&&!e[ja[i]]){r=o;break}}r&&yh(`Please, make sure if %c${zy(r)}`,"module has been imported and specified correctly.",xh)}function Ew(t){const e=Cn[t];e&&yh(`Please, make sure if %c${e}`,"module has been imported and specified correctly.",xh)}function yh(t,e,n){var r;const i="[billboard.js]";if((r=fe.console)==null?void 0:r.error){const s=e?["background:red;color:white;display:block;font-size:15px",e]:[];console.error(`\u274C ${i} ${t}`,"background:red;color:white;display:block;font-size:15px",...s),n&&console.info("%c\u2139\uFE0F","font-size:15px",n)}throw Error(`${i} ${t.replace(/\%c([a-z-]+)/i,"'$1' ")} ${e!=null?e:""}`)}function $1(t){let e;for(;e=t.sourceEvent;)t=e;return t}function gr(t,e){if(t=$1(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}const B1=/\s?(bb-)/g,z1=/\.+/g;function U1(t){return t.replace(B1,".$1").replace(z1,".")}function Th(t,e,n=!1){const r=o=>o[t?"getBoundingClientRect":"getBBox"](),i=t?"rectClient":"rectBBox";return n?r(e):!(i in e)||e.hasAttribute("width")&&e[i].width!==+(e.getAttribute("width")||0)?e[i]=r(e):e[i]}function ci(t,e,n=[-1,1],r=!1){if(!(!t||!Ye(e)))if(e.indexOf(`
44
- `)===-1)t.text(e);else{const i=[t.text(),e].map(o=>o.replace(/[\s\n]/g,""));if(i[0]!==i[1]){const o=e.split(`
45
- `),s=r?o.length-1:1;t.html(""),o.forEach((l,c)=>{t.append("tspan").attr("x",0).attr("dy",`${c===0?n[0]*s:n[1]}em`).text(l)})}}}function bh(t){const{x:e,y:n,width:r,height:i}=ya(t,!0);return[{x:e,y:n+i},{x:e,y:n},{x:e+r,y:n},{x:e+r,y:n+i}]}function Sh(t){const{width:e,height:n}=cn(t),r=bh(t),i=r[0].x,o=Math.min(r[0].y,r[1].y);return{x:i,y:o,width:e,height:n}}function er(t,e){var n;const r=t&&((n=t.touches||t.sourceEvent&&t.sourceEvent.touches)==null?void 0:n[0]);let i=[0,0];try{i=gr(r||t,e)}catch(o){}return i.map(o=>isNaN(o)?0:o)}function cn(t,e=!1){return Th(!0,t,e)}function ya(t,e=!1){return Th(!1,t,e)}function k1(t,e,n){const{rootSelector:r="",sheet:i}=t,o=`${r} ${U1(e)} {${n.join(";")}}`;return i[i.insertRule?"insertRule":"addRule"](o,i.cssRules.length)}function G1(t){let e=[];return t.forEach(n=>{var r;try{n.cssRules&&n.cssRules.length&&(e=e.concat(La(n.cssRules)))}catch(i){(r=fe.console)==null||r.warn(`Error while reading rules from ${n.href}: ${String(i)}`)}}),e}function Ah(t){var e,n,r,i,o,s;return{x:((n=(e=fe.pageXOffset)!=null?e:fe.scrollX)!=null?n:0)+((r=t.scrollLeft)!=null?r:0),y:((o=(i=fe.pageYOffset)!=null?i:fe.scrollY)!=null?o:0)+((s=t.scrollTop)!=null?s:0)}}function vs(t,e=0,n=0,r=!0){const i=new DOMPoint(e,n),o=t.getScreenCTM(),s=i.matrixTransform(r?o==null?void 0:o.inverse():o);if(r===!1){const l=cn(t);s.x-=l.x,s.y-=l.y}return s}function Tc(t){const e=t?t.transform:null,n=e&&e.baseVal;return n&&n.numberOfItems?n.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function bc(t,e){var n;const r=(n=t==null?void 0:t.getAttribute)==null?void 0:n.call(t,e);if(r)return parseFloat(r);const i=Tc(t);return e==="x"?i.e:i.f}function Sc(t){const e=t.attr("viewBox");return e?e.trim().split(/[\s,]+/).length===4:!1}function X1(t,e,n=!1){const r=!!t.node;let i=!1;for(const[o,s]of Object.entries(e))if(i=r?t.style(o)===s:t.style[o]===s,n?!i:i)break;return i}function ro(){var t,e;return((t=Ze)==null?void 0:t.hidden)===!1||((e=Ze)==null?void 0:e.visibilityState)==="visible"}function W1(t,e){const{DocumentTouch:n,matchMedia:r,navigator:i}=fe,o=r==null?void 0:r("(pointer:coarse)").matches;let s=!1;if(e)if(i&&"maxTouchPoints"in i)s=i.maxTouchPoints>0;else if("ontouchmove"in fe||n&&Ze instanceof n)s=!0;else if(o)s=!0;else{const c=i.userAgent;s=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(c)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(c)}return t&&!o&&(r==null?void 0:r("(pointer:fine)").matches)&&"mouse"||s&&"touch"||"mouse"}function Eh(t,e){t.pendingRaf!==null?(fe.cancelAnimationFrame(t.pendingRaf),t.pendingRaf=fe.requestAnimationFrame(()=>{t.pendingRaf=null,e()})):(t.pendingRaf=fe.requestAnimationFrame(()=>{t.pendingRaf=null}),e())}const Ac={mouse:(()=>{const t=()=>({bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});try{return new MouseEvent("t"),(e,n,r=t())=>{e.dispatchEvent(new MouseEvent(n,r))}}catch(e){return(n,r,i=t())=>{const o=Ze.createEvent("MouseEvent");o.initMouseEvent(r,i.bubbles,i.cancelable,fe,0,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),n.dispatchEvent(o)}}})(),touch:(t,e,n)=>{const r=new Touch(Kr({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}},{setTimeout:V1,clearTimeout:j1}=fe;function H1(t){const e=[];let n;const r=function(){r.clear(),t===!1?n=Mf(()=>{n=null,e.forEach(i=>i())},{timeout:200}):n=V1(()=>{n=null,e.forEach(i=>i())},le(t)?t:200)};return r.clear=()=>{n&&((t===!1?xy:j1)(n),n=null)},r.add=i=>e.push(i),r.remove=i=>{const o=e.indexOf(i);o!==-1&&e.splice(o,1)},r}function Ch(){let t=[];const e=function(n,r){function i(){var o;let s=0;for(let l=0,c;c=t[l];l++){if(c===!0||(o=c.empty)!=null&&o.call(c)){s++;continue}if(ro()===!1){s=t.length;break}try{c.transition()}catch(u){s++}}return s===t.length}kf(()=>{r==null||r()},i)};return e.add=function(n){en(n)?t=t.concat(n):t.push(n)},e}const Br={},ps=new Set,ka=new Map,Y1=5e3,Ih=3;let K1=0;function Z1(){try{return"var bbWorker=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){let t=[];return e.forEach(function(e,n){let r=e[0];e.forEach(function(e,i){if(i>0){if(t[i-1]===void 0&&(t[i-1]={}),e===void 0)throw Error(`Source data is missing a component at (${n}, ${i})!`);t[i-1][r]=e}})}),t}function n(e){let t=e[0],n=[];return e.forEach(function(e,r){if(r>0){let i={};e.forEach(function(e,n){if(e===void 0)throw Error(`Source data is missing a component at (${r}, ${n})!`);i[t[n]]=e}),n.push(i)}}),n}function r(e,r){let i=[],a,o;if(Array.isArray(e)){let t=function(e,t){if(e[t]!==void 0)return e[t];let n=t.replace(/\\[(\\w+)\\]/g,`.$1`).replace(/^\\./,``).split(`.`),r=e;return n.some(function(e){return!(r=r&&typeof r==`object`&&e in r?r[e]:void 0)}),r};a=r.x?r.value.concat(r.x):r.value,i.push(a),e.forEach(function(e){let n=a.map(function(n){let r=t(e,n);return r===void 0&&(r=null),r});i.push(n)}),o=n(i)}else Object.keys(e).forEach(function(t){let n=[].concat(e[t]);n.unshift?.(t),i.push(n)}),o=t(i);return o}let i={columns:t,json:r,rows:n},a=self;function o({data:e}){let{args:t,id:n,op:r}=e;try{let e=i[r];if(!e)throw Error(`Unknown worker op: ${r}`);a.postMessage({id:n,result:e(...t)})}catch(e){a.postMessage({id:n,error:e&&(e.message||e.name)||String(e)})}}return typeof window>`u`&&(a.onmessage=o),e.handleMessage=o,e.ops=i,e})({});"}catch(t){return""}}function Ec(){const{Blob:t,Worker:e,URL:n}=fe;return e&&t&&(n!=null&&n.createObjectURL)&&(n!=null&&n.revokeObjectURL)?{Blob:t,Worker:e,URL:n}:null}function Rh(){return fe.Worker||null}function J1(t){var e,n;return typeof t=="number"?{timeout:t,workerUrl:""}:{timeout:(e=t==null?void 0:t.timeout)!=null?e:Y1,workerUrl:(n=t==null?void 0:t.workerUrl)!=null?n:""}}function wh(t,e=!1){var n,r;const i=Br[t];e&&ps.add(t),i&&((n=i.worker)==null||n.terminate(),i.revoke&&((r=Ec())==null||r.URL.revokeObjectURL(i.src)),delete Br[t]);for(const o of ka.keys())o.startsWith(`${t}:`)&&ka.delete(o)}function Q1(t,e){if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch(n){return!0}}function _1(t){const[e,...n]=t;return Array.isArray(e)?[e.slice(0,Ih).map(r=>Array.isArray(r)?r.slice(0,Ih+1):r),...n]:t}function Oh(t,e,n,r){const i=++K1;let o=!1,s;const l=new Promise((c,u)=>{const f=(S,E)=>{o||(o=!0,s(),S(E))},d=function(S){var E;((E=S.data)==null?void 0:E.id)===i&&(S.data.error?f(u,new Error(S.data.error)):f(c,S.data.result))},h=function(){f(u,new Error("worker error"))},m=setTimeout(()=>f(u,new Error("worker timeout")),r);s=()=>{clearTimeout(m),t.removeEventListener("message",d),t.removeEventListener("error",h)},t.addEventListener("message",d),t.addEventListener("error",h)});try{t.postMessage({args:n,id:i,op:e})}catch(c){throw o=!0,s(),c}return l}function q1(t,e,n,r,i,o){const s=_1(i),l=Oh(t,n,s,o).then(c=>Q1(c,r(...s)),()=>!1).then(c=>(c?ka.set(e,!0):ka.delete(e),c));return ka.set(e,l),l}function tb(t,e=""){const n=!!Rh(),r=e?null:Ec(),i=e?"":Z1(),o=e||"blob";if(!n||!e&&(!r||!i)||ps.has(o))return null;if(!(o in Br))try{if(e)Br[o]={revoke:!1,src:e,worker:null};else if(r){const s=new r.Blob([i],{type:"text/javascript"});Br[o]={revoke:!0,src:r.URL.createObjectURL(s),worker:null}}}catch(s){return null}return{key:o,src:Br[o].src}}function eb(t,e){const n=Br[t],r=Rh();if(!n||!r||ps.has(t))return null;if(!n.worker)try{n.worker=new r(e)}catch(i){return wh(t,!0),null}return n.worker}function Cc(t=!0,e,n,r,i){const{timeout:o,workerUrl:s}=J1(i),l=function(...u){const f=n(...u);r(f)};let c=l;if(t){const u=tb(e,s),f=u?eb(u.key,u.src):null;if(f&&u){const{key:d}=u;c=function(...h){var m;const S=()=>{wh(d,!0),c=l,l(...h)};try{const E=`${d}:${e}`,C=(m=ka.get(E))!=null?m:q1(f,E,e,n,h,o);Oh(f,e,h,o).then(w=>{C===!0?r(w):C.then(N=>N?r(w):S())},S)}catch(E){S()}}}}return c}function nb(){const t=Ec();for(const e in Br){const n=Br[e];n.worker&&n.worker.terminate(),n.src&&n.revoke&&(t==null||t.URL.revokeObjectURL(n.src)),delete Br[e]}ps.clear(),ka.clear()}const Ic=34,ao=10,Rc=13;function Ph(t){const e=t.charCodeAt(0);function n(i,o){const s=[];let l=i.length,c=0,u=0,f=l<=0,d=!1;i.charCodeAt(0)===65279&&c++,i.charCodeAt(l-1)===ao&&--l,i.charCodeAt(l-1)===Rc&&--l;function h(){if(f)return null;if(d)return d=!1,null;const S=c;let E,C;if(i.charCodeAt(S)===Ic){for(;++c<l;)if(i.charCodeAt(c)===Ic){if(i.charCodeAt(c+1)!==Ic)break;c++}return(C=c++)>=l?f=!0:(E=i.charCodeAt(c++))===ao?d=!0:E===Rc&&(d=!0,i.charCodeAt(c)===ao&&++c),i.slice(S+1,C).replace(/""/g,'"')}for(;c<l;){if((E=i.charCodeAt(C=c++))===ao)d=!0;else if(E===Rc)d=!0,i.charCodeAt(c)===ao&&++c;else if(E!==e)continue;return i.slice(S,C)}return f=!0,i.slice(S,l)}let m;for(;(m=h())!==null;){const S=[];for(;m!==null;)S.push(m),m=h();if(o){const E=o(S,u++);E!=null&&s.push(E)}else s.push(S)}return s}function r(i,o){let s=[];return n(i,(l,c)=>{var u;if(c===0)return s=l,null;const f={};for(let d=0;d<s.length;d++)f[s[d]]=(u=l[d])!=null?u:"";return o?o(f,c-1,s):f})}return{parse:r,parseRows:n}}const Mh=Ph(","),Lh=Ph(" "),rb=Mh.parse,ab=Mh.parseRows,ib=Lh.parse,ob=Lh.parseRows;function Dh(t){const e=[];return t.forEach(function(n,r){const i=n[0];n.forEach(function(o,s){if(s>0){if(typeof e[s-1]=="undefined"&&(e[s-1]={}),typeof o=="undefined")throw new Error(`Source data is missing a component at (${r}, ${s})!`);e[s-1][i]=o}})}),e}function Fh(t){const e=t[0],n=[];return t.forEach(function(r,i){if(i>0){const o={};r.forEach(function(s,l){if(typeof s=="undefined")throw new Error(`Source data is missing a component at (${i}, ${l})!`);o[e[l]]=s}),n.push(o)}}),n}function Nh(t,e){const n=[];let r,i;if(Array.isArray(t)){const o=function(s,l){if(s[l]!==void 0)return s[l];const u=l.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");let f=s;return u.some(function(d){return!(f=f&&typeof f=="object"&&d in f?f[d]:void 0)}),f};e.x?r=e.value.concat(e.x):r=e.value,n.push(r),t.forEach(function(s){const l=r.map(function(c){let u=o(s,c);return typeof u=="undefined"&&(u=null),u});n.push(l)}),i=Fh(n)}else Object.keys(t).forEach(function(o){var s;const l=[].concat(t[o]);(s=l.unshift)==null||s.call(l,o),n.push(l)}),i=Dh(n);return i}function sb(t,e="csv",n,r,i){const o=new XMLHttpRequest,s={csv:lb,tsv:cb,json:Nh};o.open("GET",t),n&&Object.keys(n).forEach(function(l){o.setRequestHeader(l,n[l])}),o.onreadystatechange=function(){if(o.readyState===4)if(o.status===200){const l=o.responseText;l&&i.call(this,s[e](e==="json"?JSON.parse(l):l,r))}else throw new Error(`${t}: Something went wrong loading!`)},o.send()}function $h(t,e){const n=t.rows(e);let r;return n.length===1?(r=[{}],n[0].forEach(i=>{r[0][i]=null})):r=t.parse(e),r}function lb(t){return $h({rows:ab,parse:rb},t)}function cb(t){return $h({rows:ob,parse:ib},t)}const ub=5e3;function fb(t){var e,n;const r=t[0];if(en(r)){let i=0;for(let o=0,s=t.length;o<s;o++)i+=(n=(e=t[o])==null?void 0:e.length)!=null?n:0;return i}return t.length*Object.keys(r!=null?r:{}).length}function Bh(t,e){const n=t||(e==null?void 0:e.data_keys);return n!=null&&n.x&&(e.data_x=n.x),n}function db(t,e,n){const r=this,{config:i}=r;let o;t.forEach(s=>{const l=r.getXKey(s);if(n.customX||n.timeSeries?n.xs.indexOf(l)>=0?o=(n.appendXs&&r.data.xs[s]||[]).concat(e.map((c,u)=>{const f=c[l];return Xe(f)?r.generateTargetX(f,s,u):!1}).filter(c=>c!==!1)):i.data_x?o=this.getOtherTargetXs():pn(i.data_xs)&&(o=r.getXValuesOfXKey(l,r.data.targets)):o=e.map((c,u)=>u),o)r.data.xs[s]=o;else throw new Error(`x is not defined for id = "${s}".`)})}var hb={convertData(t,e){const{config:n}=this,r=s=>!(s!=null&&s.length)||dr(s[0])?!1:n.boost_useWorker==="auto"?fb(s)>=ub:!!n.boost_useWorker,i=n.boost_workerUrl?{workerUrl:n.boost_workerUrl}:void 0;let o=t;if(t.bindto&&(o={},["url","mimeType","headers","keys","json","rows","columns"].forEach(s=>{const l=`data_${s}`;l in t&&(o[s]=t[l])})),o.url&&e)sb(o.url,o.mimeType,o.headers,Bh(o.keys,n),e);else if(o.json)Cc(r(o.json),"json",Nh,e,i)(o.json,Bh(o.keys,n));else if(o.rows)Cc(r(o.rows),"rows",Fh,e,i)(o.rows);else if(o.columns)Cc(r(o.columns),"columns",Dh,e,i)(o.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets(t,e){const n=this,{axis:r,config:i,state:o}=n,s=i.data_type,l=Object.keys(t[0]||{}),{ids:c,xs:u}=l.length?l.reduce((S,E)=>(n.isX.call(n,E)?S.xs.push(E):S.ids.push(E),S),{ids:[],xs:[]}):{ids:[],xs:[]},f={appendXs:e,xs:u,categorized:r==null?void 0:r.isCategorized(),timeSeries:r==null?void 0:r.isTimeSeries(),customX:r==null?void 0:r.isCustomX()};db.bind(n)(c,t,f);const d=f.customX&&f.categorized&&i.axis_x_categories.length?new Map(i.axis_x_categories.map((S,E)=>[S,E])):null,h=i.data_idConverter.bind(n.api),m=c.map((S,E)=>{const C=h(S),w=n.getXKey(S),N=f.customX&&f.categorized,z=N&&E===0&&(()=>{const V=Gf(i.axis_x_categories);return t.every(J=>V.has(J[w]))})(),$=t.__append__,G=w===null&&$?n.api.data.values(S).length:0;return{id:C,id_org:S,values:t.map((V,J)=>{var Q;const rt=V[w];let et=V[S],st;if(et=et!==null&&!isNaN(et)&&!Ke(et)?+et:en(et)||Ke(et)?et:null,(N||o.hasRadar)&&E===0&&!Tn(rt)){!z&&J===0&&!$&&(i.axis_x_categories=[],d&&d.clear());const ct=String(rt);st=(Q=d==null?void 0:d.get(ct))!=null?Q:-1,st===-1&&(st=i.axis_x_categories.length,i.axis_x_categories.push(rt),d==null||d.set(ct,st))}else st=n.generateTargetX(rt,S,G+J);return(Tn(et)||n.data.xs[S].length<=J)&&(st=void 0),{x:st,value:et,id:C,index:-1}}).filter(V=>on(V.x))}});if(m.forEach(S=>{var E;i.data_xSort&&(S.values=S.values.sort((C,w)=>{const N=C.x||C.x===0?C.x:1/0,z=w.x||w.x===0?w.x:1/0;return N-z})),S.values.forEach((C,w)=>C.index=w),(E=n.data.xs[S.id])==null||E.sort((C,w)=>C-w)}),o.hasNegativeValue=m.some(S=>S.values.some(E=>E.value!==null&&E.value<0)),o.hasPositiveValue=m.some(S=>S.values.some(E=>E.value!==null&&E.value>0)),s&&n.isValidChartType(s)){const S=n.mapToIds(m).filter(E=>!(E in i.data_types)||!n.isValidChartType(i.data_types[E]));n.setTargetType(S,s)}return m.forEach(S=>n.cache.add(S.id_org,S,!0)),m}};const gb={areaRange:{high:0,mid:1,low:2},candlestick:{open:0,high:1,low:2,close:3,volume:4}};function zh(t){return en(t)?t:[t]}var vb={isX(t){const e=this,{config:n}=e,r=n.data_x&&t===n.data_x,i=pn(n.data_xs)&&By(n.data_xs,t);return r||i},isStackNormalized(){const{config:t}=this;return!!((t.data_stack_normalize===!0||qn(t.data_stack_normalize))&&t.data_groups.length)},isStackNormalizedPerGroup(){var t;const{config:e}=this;return!!(qn(e.data_stack_normalize)&&((t=e.data_stack_normalize)!=null&&t.perGroup)&&e.data_groups.length)},isGrouped(t){const e=this.config.data_groups;return t?e.some(n=>n.indexOf(t)>=0&&n.length>1):e.length>0},hasAxisGroupedData(t){const e=this,{axis:n}=e;return e.data.targets.filter(o=>n.getId(o.id)===t).map(o=>o.id).some(o=>e.isGrouped(o))},getXKey(t){const e=this,{config:n}=e;return n.data_x?n.data_x:pn(n.data_xs)?n.data_xs[t]:null},getXValuesOfXKey(t,e){const n=this,r=e&&pn(e)?n.mapToIds(e):[];let i;return r.forEach(o=>{n.getXKey(o)===t&&(i=n.data.xs[o])}),i},getIndexByX(t,e){const n=this;return e?e.indexOf(Ye(t)?t:+t):(n.filterByX(n.data.targets,t)[0]||{index:null}).index},getXValue(t,e){const n=this;return t in n.data.xs&&n.data.xs[t]&&Xe(n.data.xs[t][e])?n.data.xs[t][e]:e},getOtherTargetXs(){const t=this,e=Object.keys(t.data.xs);return e.length?t.data.xs[e[0]]:null},getOtherTargetX(t){const e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},addXs(t){const e=this,{config:n}=e;Object.keys(t).forEach(r=>{n.data_xs[r]=t[r]})},isMultipleX(){return!this.config.axis_x_forceAsSingle&&(pn(this.config.data_xs)||this.hasType("bubble")||this.hasType("scatter"))},addName(t){const e=this,{config:n}=e;let r;return t&&(r=n.data_names[t.id],t.name=r!==void 0?r:t.id),t},getAllValuesOnIndex(t,e=!1){const n=this;let r=n.filterTargetsToShow(n.data.targets).map(i=>n.addName(n.getValueOnIndex(i.values,t)));return e&&(r=r.filter(i=>i&&"value"in i&&Xe(i.value))),r},getValueOnIndex(t,e){var n;if(((n=t[e])==null?void 0:n.index)===e)return t[e];const r=t.filter(i=>i.index===e);return r.length?r[0]:null},updateTargetX(t,e){const n=this;t.forEach(r=>{r.values.forEach((i,o)=>{i.x=n.generateTargetX(e[o],r.id,o)}),n.data.xs[r.id]=e})},updateTargetXs(t,e){const n=this;t.forEach(r=>{e[r.id]&&n.updateTargetX([r],e[r.id])})},generateTargetX(t,e,n){const r=this,{axis:i}=r;let o=i!=null&&i.isCategorized()?n:t||n;if(i!=null&&i.isTimeSeries()){const s=Kn.bind(r);o=s(t||r.getXValue(e,n))}else i!=null&&i.isCustomX()&&!(i!=null&&i.isCategorized())&&(o=Xe(t)?+t:r.getXValue(e,n));return o},updateXs(t){t.length&&(this.axis.xs=t.map(e=>e.x))},getPrevX(t){const e=this.axis.xs[t-1];return on(e)?e:null},getNextX(t){const e=this.axis.xs[t+1];return on(e)?e:null},getBaseValue(t){const e=this,{hasAxis:n}=e.state;let{value:r}=t;return r&&n&&(e.isAreaRangeType(t)?r=e.getRangedData(t,"mid"):e.isBubbleZType(t)&&(r=e.getBubbleZData(r,"y"))),r},getMinMaxValue(t){const e=this.getBaseValue.bind(this);let n=1/0,r=-1/0;const i=t||this.data.targets.map(o=>o.values);for(let o=0;o<i.length;o++){const s=i[o];for(let l=0;l<s.length;l++){const c=e(s[l]);le(c)&&(c<n&&(n=c),c>r&&(r=c))}}return{min:n,max:r}},getMinMaxData(){const t=this,e=ke.dataMinMax;let n=t.cache.get(e);if(!n){const r=t.data.targets.map(u=>u.values),i=t.getMinMaxValue(r),o=[],s=[],{min:l,max:c}=i;r.forEach(u=>{const f=t.getFilteredDataByValue(u,l),d=t.getFilteredDataByValue(u,c);if(f.length)for(let h=0;h<f.length;h++)o.push(f[h]);if(d.length)for(let h=0;h<d.length;h++)s.push(d[h])}),t.cache.add(e,n={min:o,max:s})}return n},getTotalPerIndex(t){const e=this,{config:n}=e,r=t?`${ke.dataTotalPerIndex}-${t}`:ke.dataTotalPerIndex;let i=e.cache.get(r);if((e.config.data_groups.length||e.isStackNormalized())&&!i){i=[];let{targets:o}=e.data;if(e.isStackNormalizedPerGroup()&&t){const s=n.data_groups.find(l=>l.indexOf(t)>=0);if(s)o=o.filter(l=>s.indexOf(l.id)>=0);else return null}o.forEach(s=>{s.values.forEach((l,c)=>{i[c]||(i[c]=0),i[c]+=le(l.value)?l.value:0})}),e.cache.add(r,i)}return i},getTotalDataSum(t){const e=this,n=ke.dataTotalSum;let r=e.cache.get(n);return le(r)||(r=e.data.targets.reduce((i,o)=>i+o.values.reduce((s,l)=>{var c;return s+((c=l.value)!=null?c:0)},0),0),e.cache.add(n,r)),t&&(r-=e.getHiddenTotalDataSum()),r},getHiddenTotalDataSum(){const t=this,{api:e,state:{hiddenTargetIds:n}}=t;let r=0;return n.size&&(r=e.data.values.bind(e)([...n]).reduce((i,o)=>i+o,0)),r},getFilteredDataByValue(t,e){return t.filter(n=>this.getBaseValue(n)===e)},getMaxDataCount(){const{targets:t}=this.data;let e=0;for(let n=0;n<t.length;n++)t[n].values.length>e&&(e=t[n].values.length);return e},getMaxDataCountTarget(){const t=this,{cache:e,state:n}=t,r=e.get(ke.maxDataCountTarget);if(r&&r.generation===n.dataGeneration)return r.value;let i=t.filterTargetsToShow()||[];const o=i.length,s=t.config.axis_x_inverted;if(o>1){const l=[];for(let c=0;c<i.length;c++){const u=i[c].values;for(let f=0;f<u.length;f++)l.push(u[f].x)}i=l,i=ti(Dl(i)).map((c,u,f)=>({x:c,index:s?f.length-u-1:u}))}else o&&(i=i[0].values.concat());return e.add(ke.maxDataCountTarget,{value:i,generation:n.dataGeneration}),i},mapToIds(t){return t.map(e=>e.id)},mapToTargetIds(t){const e=this;return t?en(t)?t.concat():[t]:e.mapToIds(e.data.targets)},hasTarget(t,e){const n=this.mapToIds(t);for(let r=0,i;i=n[r];r++)if(i===e)return!0;return!1},isTargetToShow(t){return!this.state.hiddenTargetIds.has(t)},isLegendToShow(t){return!this.state.hiddenLegendIds.has(t)},getTargetsToShow(){var t;const{state:e}=this;return(t=e._targetsToShow)!=null?t:this.filterTargetsToShow()},filterTargetsToShow(t){const e=this;if(!t){const{cache:n,data:r,state:i}=e,o=ke.filteredTargets,s=n.get(o);if(s&&s.generation===i.dataGeneration)return s.value;const l=r.targets.filter(c=>e.isTargetToShow(c.id));return n.add(o,{value:l,generation:i.dataGeneration}),l}return t.filter(n=>e.isTargetToShow(n.id))},mapTargetsToUniqueXs(t){const e=this,{axis:n}=e;let r=[];return t!=null&&t.length&&(r=Dl(ky(t.map(i=>i.values.map(o=>+o.x)))),r=n!=null&&n.isTimeSeries()?r.map(i=>new Date(+i)):r.map(Number)),ti(r)},addTargetIds(t,e){const{state:n}=this;zh(e).forEach(r=>n[t].add(r))},removeTargetIds(t,e){const{state:n}=this;zh(e).forEach(r=>n[t].delete(r))},addHiddenTargetIds(t){this.addTargetIds("hiddenTargetIds",t)},removeHiddenTargetIds(t){this.removeTargetIds("hiddenTargetIds",t)},addHiddenLegendIds(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed(t){const e=this,{hasAxis:n}=e.state,r={},i=e.isMultipleX();let o=null;if(i){const s=e.cache.get(ke.valuesXIndexMap);if(s&&s.generation===e.state.dataGeneration)o=s.value;else{const l=e.mapTargetsToUniqueXs(e.data.targets).map(c=>Ye(c)?c:+c);o=new Map(l.map((c,u)=>[c,u])),e.cache.add(ke.valuesXIndexMap,{value:o,generation:e.state.dataGeneration})}}return t.forEach(s=>{const l=[];s.values.filter(({value:c})=>Xe(c)||c===null).forEach(c=>{let{value:u}=c;if(u!==null&&e.isCandlestickType(c)&&(u=en(u)?u.slice(0,4):[u.open,u.high,u.low,u.close]),en(u))l.push(...u);else if(Ke(u)&&"high"in u)l.push(...Object.values(u));else if(e.isBubbleZType(c))l.push(n&&e.getBubbleZData(u,"y"));else if(i&&o){const f=Ye(c.x)?c.x:+c.x,d=o.get(f);d!==void 0&&(l[d]=u)}else l.push(u)}),r[s.id]=l}),r},hasMultiTargets(){return this.filterTargetsToShow().length>1},orderTargets(t){const e=this,n=t.slice(),r=e.getSortCompareFn();return r&&n.sort(r),n},getSortCompareFn(t=!1){const e=this,{config:n}=e,r=n.data_order,i=/asc/i.test(r),o=/desc/i.test(r);let s;if(i||o){const l=(u,f)=>u+Math.abs(f.value),c=u=>le(u)?u:"values"in u?u.values.reduce(l,0):u.value;s=(u,f)=>{const d=c(u),h=c(f);return t?i?d-h:h-d:i?h-d:d-h}}else ue(r)&&(s=r.bind(e.api));return s||null},filterByX(t,e){return this.getValuesByX(t).get(this.getXCacheKey(e))||[]},filterNullish(t){const e=n=>Xe(n.value);return t&&t.filter(n=>"value"in n?e(n):n.values.some(e))},filterRemoveNull(t){return t.filter(e=>Xe(this.getBaseValue(e)))},filterByXDomain(t,e){return t.map(n=>({id:n.id,id_org:n.id_org,values:n.values.filter(r=>e[0]<=r.x&&r.x<=e[1])}))},hasDataLabel(){const t=this.config.data_labels;return Pa(t)&&t||qn(t)&&pn(t)},hasNullDataValue(t){return t.some(({value:e})=>e===null)},getDataIndexFromEvent(t){const e=this,{$el:n,config:r,state:{hasRadar:i,inputType:o,eventReceiver:{coords:s,rect:l}}}=e;let c;if(i){let u=t.target;/tspan/i.test(u.tagName)&&(u=u.parentNode);const f=Ut(u).datum();c=f&&Object.keys(f).length===1?f.index:void 0}else{const u=r.axis_rotated,f=Ah(n.chart.node()),d=o==="touch"&&t.changedTouches?t.changedTouches[0]:t;let h=u?d.clientY+f.y:d.clientX+f.x;if(Sc(n.svg)){const m=[h,0];u&&m.reverse(),h=vs(n.eventRect.node(),...m)[u?"y":"x"]}else h-=u?l.top:l.left;c=Fl(s,h,0,s.length-1,u)}return c},getDataLabelLength(t,e,n){var r,i,o;const s=this,l=1.3,c=[t,e].map(u=>s.dataLabelFormat()(u));if(s.config.render_mode==="canvas"&&!s.$el.svg){const u=(i=(r=s.$el.chart)==null?void 0:r.node)==null?void 0:i.call(r),f=u==null?void 0:u.ownerDocument,d=f==null?void 0:f.createElementNS("http://www.w3.org/2000/svg","svg");if(u&&d){const h=c.map(S=>{const E=f.createElementNS("http://www.w3.org/2000/svg","text");return E.textContent=S,d.appendChild(E),E});d.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",u.appendChild(d);const m=h.map(S=>S.getBoundingClientRect()[n]*l);return d.remove(),m}}return((o=s.getTextRect(c))==null?void 0:o.map(u=>u[n]*l))||[0,0]},isNoneArc(t){return this.hasTarget(this.data.targets,t.id)},isArc(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues(t,e){const n=t[e].x,r=[];let i;for(i=e-1;i>=0&&n===t[i].x;i--)r.push(t[i]);for(i=e;i<t.length&&n===t[i].x;i++)r.push(t[i]);return r},getXCacheKey(t){return Ye(t)?t:+t},getValuesByX(t){const e=this,{cache:n,state:r}=e,i=t.map(l=>{const{values:c}=l,u=c[0],f=c[c.length-1];return`${l.id}:${c.length}:${u?e.getXCacheKey(u.x):""}:${f?e.getXCacheKey(f.x):""}`}).join("|"),o=n.get(ke.valuesByX);if(o&&o.generation===r.dataGeneration&&o.targetKey===i)return o.value;const s=new Map;for(let l=0;l<t.length;l++){const c=t[l].values;for(let u=0;u<c.length;u++){const f=c[u],d=e.getXCacheKey(f.x),h=s.get(d);h?h.push(f):s.set(d,[f])}}return n.add(ke.valuesByX,{generation:r.dataGeneration,targetKey:i,value:s}),s},getClosestCandidates(t,e,n=!0){const r=this,{config:i,scale:o}=r,s=t.length,l=t[0];if(!n||s<200||!l||!i.data_xSort)return t;const c=r.isBarType(l.id),u=r.isCandlestickType(l.id),f=i.point_sensitivity;if(!(c||u)&&!le(f))return t;const d=o.zoom||o.x,h=e[+i.axis_rotated],m=d(t[0].x)<=d(t[s-1].x);let S=0,E=s-1;for(;S<E;){const $=S+E>>1,G=d(t[$].x);(m?G<h:G>h)?S=$+1:E=$}const C=[],w=new Set,N=$=>{$>=0&&$<s&&!w.has($)&&(w.add($),C.push(t[$]))},z=$=>{if($<0||$>=s)return;const G=r.getXCacheKey(t[$].x);let V=$;for(;V>=0&&r.getXCacheKey(t[V].x)===G;)N(V--);for(V=$+1;V<s&&r.getXCacheKey(t[V].x)===G;)N(V++)};if(c||u)for(let $=S-2;$<=S+2;$++)z($);else{const $=f,G=(V,J)=>{for(let Q=V;Q>=0&&Q<s;Q+=J){const rt=t[Q];if(Math.abs(d(rt.x)-h)>$)break;N(Q)}};G(S,1),G(S-1,-1)}return C},findClosestFromTargets(t,e){const n=this,r=[];for(let i=0;i<t.length;i++){const o=n.findClosest(t[i].values,e);o&&r.push(o)}return n.findClosest(r,e,!1)},findClosest(t,e,n=!0){const r=this,{$el:{main:i}}=r,o=r.getClosestCandidates(t,e,n);let s,l;for(let c=0;c<o.length;c++){const u=o[c];if(!u||!Xe(u.value))continue;const f=r.isBarType(u.id),d=r.isCandlestickType(u.id);if(f||d){const h=f?`.${lr.chartBar}.${Ue.target}${r.getTargetSelectorSuffix(u.id)} .${lr.bar}-${u.index}`:`.${ta.chartCandlestick}.${Ue.target}${r.getTargetSelectorSuffix(u.id)} .${ta.candlestick}-${u.index} path`;!l&&r.isWithinBar(i.select(h).node())&&(l=u)}else{const h=r.dist(u,e),m=r.getPointSensitivity(u);h<m&&(s===void 0||h<s)&&(s=h,l=u)}}return l},dist(t,e){const n=this,{config:{axis_rotated:r},scale:i}=n,o=+r,s=+!r,l=n.circleY(t,t.index),u=(i.zoom||i.x)(t.x)-e[o],f=l-e[s];return Math.sqrt(u*u+f*f)},convertValuesToStep(t){const e=this,{axis:n,config:r}=e,i=r.line_step_type,o=n?n.isCategorized():!1,s=en(t)?t.concat():[t];if(!(o||/step\-(after|before)/.test(i)))return t;if(s.length){const l=s[0],c=s[s.length-1],{id:u}=l;let{x:f}=l;s.unshift({x:--f,value:l.value,id:u}),o&&i==="step-after"&&s.unshift({x:f-1,value:l.value,id:u}),f=c.x,s.push({x:++f,value:c.value,id:u}),o&&i==="step-before"&&s.push({x:f+1,value:c.value,id:u})}return s},convertValuesToRange(t){const e=en(t)?t.concat():[t],n=[];return e.forEach(r=>{const{x:i,id:o}=r;n.push({x:i,id:o,value:r.value[0]}),n.push({x:i,id:o,value:r.value[2]})}),n},updateDataAttributes(t,e){const n=this,{config:r}=n,i=r[`data_${t}`];return Tn(e)||(Object.keys(e).forEach(o=>{i[o]=e[o]}),n.redraw({withLegend:!0})),i},getRangedData(t,e="",n="areaRange"){var r,i;const o=t==null?void 0:t.value;if(en(o)){if(n==="bar")return o.reduce((s,l)=>l-s);{const s=(i=(r=gb[n])==null?void 0:r[e])!=null?i:-1;return s>=0?o[s]:void 0}}else if(o&&e)return o[e];return o},setRatioForGroupedData(t){const e=this,{config:n}=e;if(n.data_groups.length&&t.some(r=>e.isGrouped(r.id))){const r=i=>e.getRatio("index",i,!0);t.forEach(i=>{"values"in i?i.values.forEach(r):r(i)})}},getRatio(t,e,n=!1){const r=this,{config:i,state:o}=r,s=r.api;let l=0;if(e&&s.data.shown().length)if(l=e.ratio||e.value,t==="arc")if(r.pie.padAngle()())l=e.value/r.getTotalDataSum(!0);else{const c=i.gauge_fullCircle?r.getArcLength():r.getStartingAngle()*-2,u=r.hasType("gauge")?c:Math.PI*2;l=(e.endAngle-e.startAngle)/u}else if(t==="index"){const c=s.data.values.bind(s),{hiddenTargetIds:u}=o;let f=this.getTotalPerIndex(r.isStackNormalizedPerGroup()?e.id:void 0);if(f===null)return l;if(u.size){let h=[...u];if(r.isStackNormalizedPerGroup()&&e.id){const m=i.data_groups.find(S=>S.indexOf(e.id)>=0);m&&(h=h.filter(S=>m.indexOf(S)>=0))}if(h.length){let m=c(h,!1);m.length&&(m=m.reduce((S,E)=>S.map((C,w)=>(le(C)?C:0)+E[w])),f=f.map((S,E)=>S-m[E]))}}const d=f[e.index];e.ratio=le(e.value)&&f&&d?e.value/d:0,l=e.ratio}else if(t==="radar")l=parseFloat(String(Math.max(e.value,0)))/o.current.dataMax*i.radar_size_ratio;else if(t==="bar"){const u=r.getYScaleById.bind(r)(e.id).domain().reduce((f,d)=>d-f);l=u===0?0:Math.abs(r.getRangedData(e,null,t)/u)}else t==="treemap"&&(l/=r.getTotalDataSum(!0));return n&&l?l*100:l},updateDataIndexByX(t){const e=this,n=t.reduce((r,i,o)=>(r[Number(i.x)]=o,r),{});e.data.targets.forEach(r=>{r.values.forEach((i,o)=>{let s=n[Number(i.x)];s===void 0&&(s=o),i.index=s})})},isBubbleZType(t){return this.isBubbleType(t)&&(Ke(t.value)&&("z"in t.value||"y"in t.value)||en(t.value)&&t.value.length>=2)},isBarRangeType(t){var e;const n=this,{value:r}=t;return n.isBarType(t)&&!((e=n.isSubchartSourceTypeOf)!=null&&e.call(n,t,kt.CANDLESTICK))&&en(r)&&r.length>=2&&r.every(le)},getDataById(t){var e;const n=this.cache.get(t)||this.api.data(t);return(e=n==null?void 0:n[0])!=null?e:n}};function ms(t,e=!1){const n=this,{api:r}=n;e&&n.api.flush(!0),t==null||t.call(r)}var pb={load(t,e){const n=this,{axis:r,data:i,org:o,scale:s}=n,{append:l}=e,c={domain:null,currentDomain:null,x:null};let u=t;if(u){e.filter&&(u=u.filter(e.filter)),(e.type||e.types)&&u.forEach(d=>{var h;const m=((h=e.types)==null?void 0:h[d.id])||e.type;n.setTargetType(d.id,m)});const f=new Map(u.map(d=>[d.id,d]));i.targets.forEach(d=>{const h=f.get(d.id);if(h){if(l){const m=h.values;for(let S=0;S<m.length;S++)d.values.push(m[S])}else d.values=h.values;f.delete(d.id)}}),f.forEach(d=>i.targets.push(d))}if(n.state.isCanvasMode){n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.updateTypesElements(),ms.call(n,e.done,e.resizeAfter);return}n.updateTargets(i.targets),s.zoom&&(c.x=r.isCategorized()?s.x.orgScale():(o.xScale||s.x).copy(),c.domain=n.getXDomain(i.targets),c.x.domain(c.domain),c.currentDomain=n.zoom.getDomain(),n.withinRange(c.currentDomain,void 0,c.domain)||(s.x.domain(c.domain),s.zoom=null,n.$el.eventRect.property("__zoom",null))),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),s.zoom?(o.xDomain=c.domain,o.xScale=c.x,r.isCategorized()&&(c.currentDomain=n.getZoomDomainValue(c.currentDomain),o.xDomain=n.getZoomDomainValue(o.xDomain),o.xScale=c.x.domain(o.xDomain)),n.updateCurrentZoomTransform(c.x,c.currentDomain)):o.xScale&&o.xScale.domain(o.xDomain),n.updateTypesElements(),ms.call(n,e.done,e.resizeAfter)},loadFromArgs(t){const e=this;e.config&&(e.cache.reset(!1,[ke.filteredTargets,ke.maxDataCountTarget,ke.valuesXIndexMap,ke.maxTickSize]),e.convertData(t,n=>{const r=t.data||n;t.append&&(r.__append__=!0),r&&e.load(e.convertDataToTargets.call(e,r),t)}))},unload(t,e){var n;const r=this,{state:i,$el:o,$T:s}=r,l=!!((n=r.hasLegendDefsPoint)!=null&&n.call(r));let c=e,u=t;if(r.cache.reset(!1,[ke.filteredTargets,ke.maxDataCountTarget,ke.valuesXIndexMap,ke.maxTickSize]),c||(c=()=>{}),u=u.filter(h=>r.hasTarget(r.data.targets,h)),u.length===0){c();return}const f=new Set(u);if(i.isCanvasMode){u.forEach(h=>{i.withoutFadeIn[h]=!1}),r.data.targets=r.data.targets.filter(h=>!f.has(h.id)),r.removeHiddenTargetIds(u),r.removeHiddenLegendIds(u),r.updateTypesElements(),c();return}u.forEach(h=>{var m;const S=r.getTargetSelectorSuffix(h);i.withoutFadeIn[h]=!1,o.legend&&o.legend.selectAll(`.${Be.legendItem}${S}`).remove(),l&&((m=o.defs)==null||m.select(`#${r.getDefsPointId(S)}`).remove())}),r.data.targets=r.data.targets.filter(h=>!f.has(h.id)),i.hasFunnel&&r.updateFunnel(r.data.targets),i.hasTreemap&&r.updateTargetsForTreemap(r.data.targets),r.updateTypesElements();const d=o.svg.selectAll(u.map(h=>r.selectorTarget(h)));s(d).style("opacity","0").remove().call(Zo,c)}},mb={value:()=>{}};function Uh(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new xs(n)}function xs(t){this._=t}function xb(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}xs.prototype=Uh.prototype={constructor:xs,on:function(t,e){var n=this._,r=xb(t+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=yb(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(i=(t=r[o]).type)n[i]=kh(n[i],t.name,e);else if(e==null)for(i in n)n[i]=kh(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new xs(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function yb(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function kh(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=mb,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var ys=Uh;const Tb={passive:!1},io={capture:!0,passive:!1};function wc(t){t.stopImmediatePropagation()}function ui(t){t.preventDefault(),t.stopImmediatePropagation()}function Oc(t){var e=t.document.documentElement,n=Ut(t).on("dragstart.drag",ui,io);"onselectstart"in e?n.on("selectstart.drag",ui,io):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Pc(t,e){var n=t.document.documentElement,r=Ut(t).on("dragstart.drag",null);e&&(r.on("click.drag",ui,io),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Ts=(t=>()=>t);function Mc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:s,y:l,dx:c,dy:u,dispatch:f}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}Mc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function bb(t){return!t.ctrlKey&&!t.button}function Sb(){return this.parentNode}function Ab(t,e){return e==null?{x:t.x,y:t.y}:e}function Eb(){return navigator.maxTouchPoints||"ontouchstart"in this}function Gh(){var t=bb,e=Sb,n=Ab,r=Eb,i={},o=ys("start","drag","end"),s=0,l,c,u,f,d=0;function h($){$.on("mousedown.drag",m).filter(r).on("touchstart.drag",C).on("touchmove.drag",w,Tb).on("touchend.drag touchcancel.drag",N).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m($,G){if(!(f||!t.call(this,$,G))){var V=z(this,e.call(this,$,G),$,G,"mouse");V&&(Ut($.view).on("mousemove.drag",S,io).on("mouseup.drag",E,io),Oc($.view),wc($),u=!1,l=$.clientX,c=$.clientY,V("start",$))}}function S($){if(ui($),!u){var G=$.clientX-l,V=$.clientY-c;u=G*G+V*V>d}i.mouse("drag",$)}function E($){Ut($.view).on("mousemove.drag mouseup.drag",null),Pc($.view,u),ui($),i.mouse("end",$)}function C($,G){if(t.call(this,$,G)){var V=$.changedTouches,J=e.call(this,$,G),Q=V.length,rt,et;for(rt=0;rt<Q;++rt)(et=z(this,J,$,G,V[rt].identifier,V[rt]))&&(wc($),et("start",$,V[rt]))}}function w($){var G=$.changedTouches,V=G.length,J,Q;for(J=0;J<V;++J)(Q=i[G[J].identifier])&&(ui($),Q("drag",$,G[J]))}function N($){var G=$.changedTouches,V=G.length,J,Q;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),J=0;J<V;++J)(Q=i[G[J].identifier])&&(wc($),Q("end",$,G[J]))}function z($,G,V,J,Q,rt){var et=o.copy(),st=gr(rt||V,G),ct,dt,q;if((q=n.call($,new Mc("beforestart",{sourceEvent:V,target:h,identifier:Q,active:s,x:st[0],y:st[1],dx:0,dy:0,dispatch:et}),J))!=null)return ct=q.x-st[0]||0,dt=q.y-st[1]||0,function ft(lt,pt,Tt){var Rt=st,Ct;switch(lt){case"start":i[Q]=ft,Ct=s++;break;case"end":delete i[Q],--s;case"drag":st=gr(Tt||pt,G),Ct=s;break}et.call(lt,$,new Mc(lt,{sourceEvent:pt,subject:q,target:h,identifier:Q,active:Ct,x:st[0]+ct,y:st[1]+dt,dx:st[0]-Rt[0],dy:st[1]-Rt[1],dispatch:et}),J)}}return h.filter=function($){return arguments.length?(t=typeof $=="function"?$:Ts(!!$),h):t},h.container=function($){return arguments.length?(e=typeof $=="function"?$:Ts($),h):e},h.subject=function($){return arguments.length?(n=typeof $=="function"?$:Ts($),h):n},h.touchable=function($){return arguments.length?(r=typeof $=="function"?$:Ts(!!$),h):r},h.on=function(){var $=o.on.apply(o,arguments);return $===o?h:$},h.clickDistance=function($){return arguments.length?(d=($=+$)*$,h):Math.sqrt(d)},h}var Cb={setExpand(t,e,n){const r=this,{config:i,$el:{circle:o}}=r;o&&i.point_focus_expand_enabled&&r.expandCircles(t,e,n),r.expandBarTypeShapes(!0,t,e,n)},expandBarTypeShapes(t=!0,e,n,r){const i=this;["bar","candlestick"].filter(o=>i.$el[o]).forEach(o=>{r&&i.$el[o].classed(Ue.EXPANDED,!1),i.getShapeByIndex(o,e,n).classed(Ue.EXPANDED,t)})},setOverOut(t,e){const n=this,{config:r,state:{hasFunnel:i,hasRadar:o,hasTreemap:s},$el:{main:l}}=n,c=Ke(e);if(c||e!==-1){const u=r[t?"data_onover":"data_onout"].bind(n.api);if(r.color_onover&&n.setOverColor(t,e,c),c){const f=n.getTargetSelectorSuffix(e.id),d=i||s?`${Ue.target+f} .${An.shape}`:Qe.arc+f;u(e,l.select(`.${d}`).node())}else if(r.tooltip_grouped)t&&(o&&n.isPointFocusOnly()?n.showCircleFocus(n.getAllValuesOnIndex(e,!0)):n.setExpand(e,null,!0)),!n.isMultipleX()&&l.selectAll(`.${An.shape}-${e}`).each(function(f){u(f,this)});else{const f=n.cache.get(ke.setOverOut)||[],d=l.selectAll(`.${An.shape}-${e}`).filter(function(m){return n.isWithinShape(this,m)}),h=d.filter(function(){return f.every(m=>m!==this)});if(!t||d.empty()||f.length===h.size()&&h.nodes().every((m,S)=>m!==f[S]))for(;f.length;){const m=f.pop();r.data_onout.bind(n.api)(Ut(m).datum(),m)}h.each(function(){t&&(u(Ut(this).datum(),this),f.push(this))}),n.cache.add(ke.setOverOut,f)}}},callOverOutForTouch(t){const e=this,n=e.cache.get(ke.callOverOutForTouch);(Ke(t)&&n?t.id!==n.id:t!==n)&&((n||le(n))&&e.setOverOut(!1,n),(t||le(t))&&e.setOverOut(!0,t),e.cache.add(ke.callOverOutForTouch,t))},getDraggableSelection(){const t=this,{config:e,state:n}=t;return e.interaction_enabled&&e.data_selection_draggable&&t.drag?Gh().on("drag",function(r){n.event=r,t.drag(er(r,this))}).on("start",function(r){n.event=r,t.dragstart(er(r,this))}).on("end",r=>{n.event=r,t.dragend()}):()=>{}},dispatchEvent(t,e,n){var r,i,o;const s=this,{config:l,state:{eventReceiver:c,hasAxis:u,hasFunnel:f,hasRadar:d,hasTreemap:h},$el:{eventRect:m,funnel:S,radar:E,svg:C,treemap:w}}=s;let N=(o=(i=(f||h)&&c.rect||d&&E.axes.select(`.${Pn.axis}-${e} text`)||m||((r=s.getArcElementByIdOrIndex)==null?void 0:r.call(s,e)))==null?void 0:i.node)==null?void 0:o.call(i);if(N){const z=s.isMultipleX(),$=l.axis_rotated;let{width:G,left:V,top:J}=cn(N);if(u&&!d&&!z){const st=c.coords[e];st?(G=st.w,V+=st.x,J+=st.y):(G=0,V=0,J=0)}let Q=V+(n?n[0]:0)+(z||$?0:G/2),rt=J+(n?n[1]:0)+($?4:0);if(Sc(C)&&s.$el.eventRect){const st=vs(s.$el.eventRect.node(),Q,rt,!1);Q=st.x,rt=st.y}const et={screenX:Q,screenY:rt,clientX:Q,clientY:rt,bubbles:d};(f||h)&&(N=(S!=null?S:w).node()),Ac[/^(mouse|click)/.test(t)?"mouse":"touch"](N,t,et)}},setDragStatus(t){this.state.dragging=t},unbindZoomEvent(){const t=this,{$el:{canvas:e,eventRect:n,svg:r,zoomResetBtn:i}}=t;n==null||n.on(".zoom wheel.zoom .drag",null),e==null||e.on(".zoom wheel.zoom .drag",null),r==null||r.on("wheel",null),i==null||i.on("click",null).style("display","none")},unbindAllEvents(){var t;const e=this,{$el:{arcs:n,eventRect:r,legend:i,region:o,svg:s,treemap:l},brush:c}=e,u=["wheel","click","mouseover","mousemove","mouseout","touchstart","touchmove","touchend","touchstart.eventRect","touchmove.eventRect","touchend.eventRect",".brush",".drag",".zoom","wheel.zoom","dblclick.zoom"].join(" ");[s,r,o==null?void 0:o.list,c==null?void 0:c.getSelection(),n==null?void 0:n.selectAll("path"),i==null?void 0:i.selectAll("g"),l].forEach(f=>f==null?void 0:f.on(u,null)),(t=e.unbindZoomEvent)==null||t.call(e)}},Ib={categoryName(t){var e;const{axis_x_categories:n}=this.config;return(e=n==null?void 0:n[t])!=null?e:t}};const Rb=/[\x00-\x20\x7F-\xA0\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g;var wb={generateClass(t,e){const n=this.state.generateClassCache,r=`${t}\0${e}`;let i=n.get(r);return i||(i=` ${t} ${t+this.getTargetSelectorSuffix(e)}`,n.set(r,i)),i},getClass(t,e){const n=/s$/.test(t),r=/^(area|arc|line|funnel|treemap)s?$/.test(t),i=n?"id":"index";return o=>{const s=o.data||o;return((e?this.generateClass(Ie[n?"shapes":"shape"],s[i]):"")+this.generateClass(Ie[t],s[r?"id":i])).trim()}},getChartClass(t){return e=>Ie[`chart${t}`]+this.classTarget((e.data?e.data:e).id)},generateExtraLineClass(){const e=this.config.line_classes||[],n=[];return function(r){var i;const o=r.id||((i=r.data)==null?void 0:i.id)||r;return n.indexOf(o)<0&&n.push(o),e[n.indexOf(o)%e.length]}},classRegion(t,e){return`${this.generateClass(Ie.region,e)} ${"class"in t?t.class:""}`},classTarget(t){const e=this.config.data_classes[t];let n="";return e&&(n=` ${Ie.target}-${e}`),this.generateClass(Ie.target,t)+n},classFocus(t){return this.classFocused(t)+this.classDefocused(t)},classFocused(t){return` ${this.state.focusedTargetIds.has(t.id)?Ie.focused:""}`},classDefocused(t){return` ${this.state.defocusedTargetIds.has(t.id)?Ie.defocused:""}`},getTargetSelectorSuffix(t){return(t||t===0?`-${t}`:"").replace(Rb,"-")},selectorTarget(t,e="",n=""){const r=this.getTargetSelectorSuffix(t);return`${e}.${Ie.target+r} ${n}, ${e}.${Ie.circles+r} ${n}`},selectorTargets(t,e){const n=t||[];return n.length?n.map(r=>this.selectorTarget(r,e)):null},selectorLegend(t){return`.${Ie.legendItem+this.getTargetSelectorSuffix(t)}`},selectorLegends(t){return t!=null&&t.length?t.map(e=>this.selectorLegend(e)):null}};const Ob=(t,e,n)=>{const r=Ut(t.cloneNode(!0));return r.attr("id",n).insert("rect",":first-child").attr("width",r.attr("width")).attr("height",r.attr("height")).style("fill",e),{id:n,node:r.node()}};function Pb(t){const e=ke.colorPattern,{body:n}=Ze;let r=n[e];if(!r){const o=t.classed(xc.colorPattern,!0).style("background-image");t.classed(xc.colorPattern,!1),o.indexOf(";")>-1&&(r=o.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(s=>s.trim().replace(/[\"'\s]/g,"")).filter(Boolean),n[e]=r)}return r}const Mb=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var Lb={generateColor(){const t=this,{$el:e,config:n}=t,r=[],i=n.area_linearGradient||n.bar_linearGradient||n.point_radialGradient;let o=pn(n.color_pattern)?n.color_pattern:[...Pb(e.chart)||Mb];const s=o;if(ue(n.color_tiles)){const l=n.color_tiles.bind(t.api)(),c=o.map((u,f)=>{const d=u.replace(/[#\(\)\s,]/g,""),h=`${t.state.datetimeId}-pattern-${d}-${f}`;return Ob(l[f%l.length],u,h)});o=c.map(u=>`url(#${u.id})`),t.patterns=c}return function(l){var c;const u=n.data_colors,f=n.data_color,d=l.id||((c=l.data)==null?void 0:c.id)||l,h=t.isTypeOf(d,["line","spline","step"])||!n.data_types[d];let m;if(ue(u[d]))m=u[d].bind(t.api)(l);else if(u[d])m=u[d];else{let S=r.indexOf(d);S<0&&(r.push(d),S=r.length-1),m=h?s[S%s.length]:o[S%o.length],u[d]=m}if(m=ue(f)?f.call(t.api,m,l):m,i&&e.defs){const S=t.$el.defs.selectAll(`[id$='-gradient${t.getTargetSelectorSuffix(d)}'] stop`);let E;S.each(function(C,w){E=w===0?this.style.stopColor:this.style.stopColor===E}),E===!0&&S.attr("stop-color",m)}return m}},generateLevelColor(){const t=this,{config:e}=t,n=e.color_pattern,r=e.color_threshold,i=r.unit==="value",o=r.max||100,s=r.values&&r.values.length?r.values:[];return pn(r)?function(l){const c=i?l:l*100/o;let u=n[n.length-1];for(let f=0,d=s.length;f<d;f++)if(c<=s[f]){u=n[f];break}return u}:null},generateTextBGColorFilter(t,e={x:0,y:0,width:1,height:1}){const n=this,{$el:{defs:r},state:i}=n;if(t){let o=[];Ye(t)?o.push(""):Ke(t)?o=Object.keys(t):ue(t)&&(o=n.mapToTargetIds()),o.forEach(s=>{const l=`${i.datetimeId}-labels-bg${n.getTargetSelectorSuffix(s)}${Ye(t)?n.getTargetSelectorSuffix(t):""}`,c=Yr(s===""?t:(t==null?void 0:t[s])||"");if(r.select(`#${l}`).empty()){const u=r.append("filter").attr("x",e.x).attr("y",e.y).attr("width",e.width).attr("height",e.height).attr("id",l);u.append("feFlood").attr("flood-color",c),u.append("feComposite").attr("in","SourceGraphic")}})}},getGradienColortUrl(t){return`url(#${this.state.datetimeId}-gradient${this.getTargetSelectorSuffix(t)})`},updateLinearGradient(){const t=this,{config:e,data:{targets:n},state:{datetimeId:r},$el:{defs:i}}=t;n.forEach(o=>{const s=`${r}-gradient${t.getTargetSelectorSuffix(o.id)}`,l=t.hasPointType()&&e.point_radialGradient,c=t.isAreaType(o)&&"area"||t.isBarType(o)&&"bar";if((l||c)&&i.select(`#${s}`).empty()){const u=t.color(o),f={defs:null,stops:[]};if(l){const{cx:d=.3,cy:h=.3,r:m=.7,stops:S=[[.1,u,0],[.9,u,1]]}=l;f.stops=S,f.defs=i.append("radialGradient").attr("id",`${s}`).attr("cx",d).attr("cy",h).attr("r",m)}else{const d=e.axis_rotated,{x:h=d?[1,0]:[0,0],y:m=d?[0,0]:[0,1],stops:S=[[0,u,1],[1,u,0]]}=e[`${c}_linearGradient`];f.stops=S,f.defs=i.append("linearGradient").attr("id",`${s}`).attr("x1",h[0]).attr("x2",h[1]).attr("y1",m[0]).attr("y2",m[1])}f.stops.forEach(d=>{const[h,m,S]=d,E=ue(m)?m.bind(t.api)(o.id):m;f.defs&&f.defs.append("stop").attr("offset",h).attr("stop-color",E||u).attr("stop-opacity",S)})}})},setOverColor(t,e){const n=this,{config:r,$el:{main:i}}=n,o=r.color_onover;let s=t?o:n.color;Ke(s)?s=({id:l})=>l in o?o[l]:n.color(l):Ye(s)?s=()=>o:ue(o)&&(s=s.bind(n.api)),i.selectAll(Ke(e)?`.${Qe.arc}${n.getTargetSelectorSuffix(e.id)}`:`.${An.shape}-${e}`).style("fill",s)}},fi=0,oo=0,so=0,Xh=1e3,bs,lo,Ss=0,Ga=0,As=0,co=typeof performance=="object"&&performance.now?performance:Date,Wh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Lc(){return Ga||(Wh(Db),Ga=co.now()+As)}function Db(){Ga=0}function Es(){this._call=this._time=this._next=null}Es.prototype=Vh.prototype={constructor:Es,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Lc():+n)+(e==null?0:+e),!this._next&&lo!==this&&(lo?lo._next=this:bs=this,lo=this),this._call=t,this._time=n,Dc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Dc())}};function Vh(t,e,n){var r=new Es;return r.restart(t,e,n),r}function Fb(){Lc(),++fi;for(var t=bs,e;t;)(e=Ga-t._time)>=0&&t._call.call(void 0,e),t=t._next;--fi}function jh(){Ga=(Ss=co.now())+As,fi=oo=0;try{Fb()}finally{fi=0,$b(),Ga=0}}function Nb(){var t=co.now(),e=t-Ss;e>Xh&&(As-=e,Ss=t)}function $b(){for(var t,e=bs,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:bs=n);lo=t,Dc(r)}function Dc(t){if(!fi){oo&&(oo=clearTimeout(oo));var e=t-Ga;e>24?(t<1/0&&(oo=setTimeout(jh,t-co.now()-As)),so&&(so=clearInterval(so))):(so||(Ss=co.now(),so=setInterval(Nb,Xh)),fi=1,Wh(jh))}}function Hh(t,e,n){var r=new Es;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var Bb=ys("start","end","cancel","interrupt"),zb=[],Yh=0,Kh=1,Fc=2,Cs=3,Zh=4,Nc=5,Is=6;function Rs(t,e,n,r,i,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;Ub(t,n,{name:e,index:r,group:i,on:Bb,tween:zb,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Yh})}function $c(t,e){var n=Cr(t,e);if(n.state>Yh)throw new Error("too late; already scheduled");return n}function zr(t,e){var n=Cr(t,e);if(n.state>Cs)throw new Error("too late; already running");return n}function Cr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ub(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Vh(o,0,n.time);function o(u){n.state=Kh,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var f,d,h,m;if(n.state!==Kh)return c();for(f in r)if(m=r[f],m.name===n.name){if(m.state===Cs)return Hh(s);m.state===Zh?(m.state=Is,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete r[f]):+f<e&&(m.state=Is,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete r[f])}if(Hh(function(){n.state===Cs&&(n.state=Zh,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=Fc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Fc){for(n.state=Cs,i=new Array(h=n.tween.length),f=0,d=-1;f<h;++f)(m=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++d]=m);i.length=d+1}}function l(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=Nc,1),d=-1,h=i.length;++d<h;)i[d].call(t,f);n.state===Nc&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=Is,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function di(t,e){var n=t.__transition,r,i,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((r=n[s]).name!==e){o=!1;continue}i=r.state>Fc&&r.state<Nc,r.state=Is,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[s]}o&&delete t.__transition}}function kb(t){return this.each(function(){di(this,t)})}var Jh=180/Math.PI,Bc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Qh(t,e,n,r,i,o){var s,l,c;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),t*r<e*n&&(t=-t,e=-e,c=-c,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Jh,skewX:Math.atan(c)*Jh,scaleX:s,scaleY:l}}var ws;function Gb(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Bc:Qh(e.a,e.b,e.c,e.d,e.e,e.f)}function Xb(t){return t==null||(ws||(ws=document.createElementNS("http://www.w3.org/2000/svg","g")),ws.setAttribute("transform",t),!(t=ws.transform.baseVal.consolidate()))?Bc:(t=t.matrix,Qh(t.a,t.b,t.c,t.d,t.e,t.f))}function _h(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,f,d,h,m,S){if(u!==d||f!==h){var E=m.push("translate(",null,e,null,n);S.push({i:E-4,x:Tr(u,d)},{i:E-2,x:Tr(f,h)})}else(d||h)&&m.push("translate("+d+e+h+n)}function s(u,f,d,h){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:Tr(u,f)})):f&&d.push(i(d)+"rotate("+f+r)}function l(u,f,d,h){u!==f?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:Tr(u,f)}):f&&d.push(i(d)+"skewX("+f+r)}function c(u,f,d,h,m,S){if(u!==d||f!==h){var E=m.push(i(m)+"scale(",null,",",null,")");S.push({i:E-4,x:Tr(u,d)},{i:E-2,x:Tr(f,h)})}else(d!==1||h!==1)&&m.push(i(m)+"scale("+d+","+h+")")}return function(u,f){var d=[],h=[];return u=t(u),f=t(f),o(u.translateX,u.translateY,f.translateX,f.translateY,d,h),s(u.rotate,f.rotate,d,h),l(u.skewX,f.skewX,d,h),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,d,h),u=f=null,function(m){for(var S=-1,E=h.length,C;++S<E;)d[(C=h[S]).i]=C.x(m);return d.join("")}}}var Wb=_h(Gb,"px, ","px)","deg)"),Vb=_h(Xb,", ",")",")");function jb(t,e){var n,r;return function(){var i=zr(this,t),o=i.tween;if(o!==n){r=n=o;for(var s=0,l=r.length;s<l;++s)if(r[s].name===e){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function Hb(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=zr(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var l={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=l;break}c===u&&i.push(l)}o.tween=i}}function Yb(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Cr(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===t)return s.value;return null}return this.each((e==null?jb:Hb)(n,t,e))}function zc(t,e,n){var r=t._id;return t.each(function(){var i=zr(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Cr(i,r).value[e]}}function qh(t,e){var n;return(typeof e=="number"?Tr:e instanceof Ea?No:(n=Ea(e))?(e=n,No):Yu)(t,e)}function Kb(t){return function(){this.removeAttribute(t)}}function Zb(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Jb(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttribute(t);return s===i?null:s===r?o:o=e(r=s,n)}}function Qb(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===r?o:o=e(r=s,n)}}function _b(t,e,n){var r,i,o;return function(){var s,l=n(this),c;return l==null?void this.removeAttribute(t):(s=this.getAttribute(t),c=l+"",s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,l)))}}function qb(t,e,n){var r,i,o;return function(){var s,l=n(this),c;return l==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),c=l+"",s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,l)))}}function tS(t,e){var n=Ot(t),r=n==="transform"?Vb:qh;return this.attrTween(t,typeof e=="function"?(n.local?qb:_b)(n,r,zc(this,"attr."+t,e)):e==null?(n.local?Zb:Kb)(n):(n.local?Qb:Jb)(n,r,e))}function eS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function nS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function rS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&nS(t,o)),n}return i._value=e,i}function aS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&eS(t,o)),n}return i._value=e,i}function iS(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Ot(t);return this.tween(n,(r.local?rS:aS)(r,e))}function oS(t,e){return function(){$c(this,t).delay=+e.apply(this,arguments)}}function sS(t,e){return e=+e,function(){$c(this,t).delay=e}}function lS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?oS:sS)(e,t)):Cr(this.node(),e).delay}function cS(t,e){return function(){zr(this,t).duration=+e.apply(this,arguments)}}function uS(t,e){return e=+e,function(){zr(this,t).duration=e}}function fS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?cS:uS)(e,t)):Cr(this.node(),e).duration}function dS(t,e){if(typeof e!="function")throw new Error;return function(){zr(this,t).ease=e}}function hS(t){var e=this._id;return arguments.length?this.each(dS(e,t)):Cr(this.node(),e).ease}function gS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;zr(this,t).ease=n}}function vS(t){if(typeof t!="function")throw new Error;return this.each(gS(this._id,t))}function pS(t){typeof t!="function"&&(t=M(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,l=r[i]=[],c,u=0;u<s;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&l.push(c);return new ra(r,this._parents,this._name,this._id)}function mS(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),s=new Array(r),l=0;l<o;++l)for(var c=e[l],u=n[l],f=c.length,d=s[l]=new Array(f),h,m=0;m<f;++m)(h=c[m]||u[m])&&(d[m]=h);for(;l<r;++l)s[l]=e[l];return new ra(s,this._parents,this._name,this._id)}function xS(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function yS(t,e,n){var r,i,o=xS(e)?$c:zr;return function(){var s=o(this,t),l=s.on;l!==r&&(i=(r=l).copy()).on(e,n),s.on=i}}function TS(t,e){var n=this._id;return arguments.length<2?Cr(this.node(),n).on.on(t):this.each(yS(n,t,e))}function bS(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function SS(){return this.on("end.remove",bS(this._id))}function AS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=x(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var l=r[s],c=l.length,u=o[s]=new Array(c),f,d,h=0;h<c;++h)(f=l[h])&&(d=t.call(f,f.__data__,h,l))&&("__data__"in f&&(d.__data__=f.__data__),u[h]=d,Rs(u[h],e,n,h,u,Cr(f,n)));return new ra(o,this._parents,e,n)}function ES(t){var e=this._name,n=this._id;typeof t!="function"&&(t=I(t));for(var r=this._groups,i=r.length,o=[],s=[],l=0;l<i;++l)for(var c=r[l],u=c.length,f,d=0;d<u;++d)if(f=c[d]){for(var h=t.call(f,f.__data__,d,c),m,S=Cr(f,n),E=0,C=h.length;E<C;++E)(m=h[E])&&Rs(m,e,n,E,h,S);o.push(h),s.push(f)}return new ra(o,s,e,n)}var CS=de.prototype.constructor;function IS(){return new CS(this._groups,this._parents)}function RS(t,e){var n,r,i;return function(){var o=ne(this,t),s=(this.style.removeProperty(t),ne(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}function tg(t){return function(){this.style.removeProperty(t)}}function wS(t,e,n){var r,i=n+"",o;return function(){var s=ne(this,t);return s===i?null:s===r?o:o=e(r=s,n)}}function OS(t,e,n){var r,i,o;return function(){var s=ne(this,t),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(t),ne(this,t))),s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,l))}}function PS(t,e){var n,r,i,o="style."+e,s="end."+o,l;return function(){var c=zr(this,t),u=c.on,f=c.value[o]==null?l||(l=tg(e)):void 0;(u!==n||i!==f)&&(r=(n=u).copy()).on(s,i=f),c.on=r}}function MS(t,e,n){var r=(t+="")=="transform"?Wb:qh;return e==null?this.styleTween(t,RS(t,r)).on("end.style."+t,tg(t)):typeof e=="function"?this.styleTween(t,OS(t,r,zc(this,"style."+t,e))).each(PS(this._id,t)):this.styleTween(t,wS(t,r,e),n).on("end.style."+t,null)}function LS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function DS(t,e,n){var r,i;function o(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&LS(t,s,n)),r}return o._value=e,o}function FS(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,DS(t,e,n==null?"":n))}function NS(t){return function(){this.textContent=t}}function $S(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function BS(t){return this.tween("text",typeof t=="function"?$S(zc(this,"text",t)):NS(t==null?"":t+""))}function zS(t){return function(e){this.textContent=t.call(this,e)}}function US(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&zS(i)),e}return r._value=t,r}function kS(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,US(t))}function GS(){for(var t=this._name,e=this._id,n=ng(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],l=s.length,c,u=0;u<l;++u)if(c=s[u]){var f=Cr(c,e);Rs(c,t,n,u,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new ra(r,this._parents,t,n)}function XS(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var l={value:s},c={value:function(){--i===0&&o()}};n.each(function(){var u=zr(this,r),f=u.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(l),e._.interrupt.push(l),e._.end.push(c)),u.on=e}),i===0&&o()})}var WS=0;function ra(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function eg(t){return de().transition(t)}function ng(){return++WS}var aa=de.prototype;ra.prototype=eg.prototype={constructor:ra,select:AS,selectAll:ES,selectChild:aa.selectChild,selectChildren:aa.selectChildren,filter:pS,merge:mS,selection:IS,transition:GS,call:aa.call,nodes:aa.nodes,node:aa.node,size:aa.size,empty:aa.empty,each:aa.each,on:TS,attr:tS,attrTween:iS,style:MS,styleTween:FS,text:BS,textTween:kS,remove:SS,tween:Yb,delay:lS,duration:fS,ease:hS,easeVarying:vS,end:XS,[Symbol.iterator]:aa[Symbol.iterator]};function Cw(t){return t*t*t}function Iw(t){return--t*t*t+1}function VS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var jS={time:null,delay:0,duration:250,ease:VS};function HS(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function YS(t){var e,n;t instanceof ra?(e=t._id,t=t._name):(e=ng(),(n=jS).time=Lc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],l=s.length,c,u=0;u<l;++u)(c=s[u])&&Rs(c,t,e,u,s,n||HS(c,e));return new ra(r,this._parents,t,e)}de.prototype.interrupt=kb,de.prototype.transition=YS;var Uc=(t=>()=>t);function KS(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function ZS(t){t.stopImmediatePropagation()}function kc(t){t.preventDefault(),t.stopImmediatePropagation()}var rg={name:"drag"},Gc={name:"space"},hi={name:"handle"},gi={name:"center"};const{abs:ag,max:kn,min:Gn}=Math;function ig(t){return[+t[0],+t[1]]}function Xc(t){return[ig(t[0]),ig(t[1])]}var Os={name:"x",handles:["w","e"].map(uo),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Ps={name:"y",handles:["n","s"].map(uo),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},JS={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(uo),input:function(t){return t==null?null:Xc(t)},output:function(t){return t}},ia={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},og={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},sg={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},QS={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},_S={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function uo(t){return{type:t}}function qS(t){return!t.ctrlKey&&!t.button}function tA(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function eA(){return navigator.maxTouchPoints||"ontouchstart"in this}function Wc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function nA(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function lg(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function rA(){return Vc(Os)}function aA(){return Vc(Ps)}function Rw(){return Vc(JS)}function Vc(t){var e=tA,n=qS,r=eA,i=!0,o=ys("start","brush","end"),s=6,l;function c(C){var w=C.property("__brush",E).selectAll(".overlay").data([uo("overlay")]);w.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",ia.overlay).merge(w).each(function(){var z=Wc(this).extent;Ut(this).attr("x",z[0][0]).attr("y",z[0][1]).attr("width",z[1][0]-z[0][0]).attr("height",z[1][1]-z[0][1])}),C.selectAll(".selection").data([uo("selection")]).enter().append("rect").attr("class","selection").attr("cursor",ia.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var N=C.selectAll(".handle").data(t.handles,function(z){return z.type});N.exit().remove(),N.enter().append("rect").attr("class",function(z){return"handle handle--"+z.type}).attr("cursor",function(z){return ia[z.type]}),C.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",m).on("touchend.brush touchcancel.brush",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}c.move=function(C,w,N){C.tween?C.on("start.brush",function(z){f(this,arguments).beforestart().start(z)}).on("interrupt.brush end.brush",function(z){f(this,arguments).end(z)}).tween("brush",function(){var z=this,$=z.__brush,G=f(z,arguments),V=$.selection,J=t.input(typeof w=="function"?w.apply(this,arguments):w,$.extent),Q=Ya(V,J);function rt(et){$.selection=et===1&&J===null?null:Q(et),u.call(z),G.brush()}return V!==null&&J!==null?rt:rt(1)}):C.each(function(){var z=this,$=arguments,G=z.__brush,V=t.input(typeof w=="function"?w.apply(z,$):w,G.extent),J=f(z,$).beforestart();di(z),G.selection=V===null?null:V,u.call(z),J.start(N).brush(N).end(N)})},c.clear=function(C,w){c.move(C,null,w)};function u(){var C=Ut(this),w=Wc(this).selection;w?(C.selectAll(".selection").style("display",null).attr("x",w[0][0]).attr("y",w[0][1]).attr("width",w[1][0]-w[0][0]).attr("height",w[1][1]-w[0][1]),C.selectAll(".handle").style("display",null).attr("x",function(N){return N.type[N.type.length-1]==="e"?w[1][0]-s/2:w[0][0]-s/2}).attr("y",function(N){return N.type[0]==="s"?w[1][1]-s/2:w[0][1]-s/2}).attr("width",function(N){return N.type==="n"||N.type==="s"?w[1][0]-w[0][0]+s:s}).attr("height",function(N){return N.type==="e"||N.type==="w"?w[1][1]-w[0][1]+s:s})):C.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function f(C,w,N){var z=C.__brush.emitter;return z&&(!N||!z.clean)?z:new d(C,w,N)}function d(C,w,N){this.that=C,this.args=w,this.state=C.__brush,this.active=0,this.clean=N}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(C,w){return this.starting?(this.starting=!1,this.emit("start",C,w)):this.emit("brush",C),this},brush:function(C,w){return this.emit("brush",C,w),this},end:function(C,w){return--this.active===0&&(delete this.state.emitter,this.emit("end",C,w)),this},emit:function(C,w,N){var z=Ut(this.that).datum();o.call(C,this.that,new KS(C,{sourceEvent:w,target:c,selection:t.output(this.state.selection),mode:N,dispatch:o}),z)}};function h(C){if(l&&!C.touches||!n.apply(this,arguments))return;var w=this,N=C.target.__data__.type,z=(i&&C.metaKey?N="overlay":N)==="selection"?rg:i&&C.altKey?gi:hi,$=t===Ps?null:QS[N],G=t===Os?null:_S[N],V=Wc(w),J=V.extent,Q=V.selection,rt=J[0][0],et,st,ct=J[0][1],dt,q,ft=J[1][0],lt,pt,Tt=J[1][1],Rt,Ct,Kt=0,re=0,Ee,Ce=$&&G&&i&&C.shiftKey,be,Ne,ye=Array.from(C.touches||[C],Ae=>{const hn=Ae.identifier;return Ae=gr(Ae,w),Ae.point0=Ae.slice(),Ae.identifier=hn,Ae});di(w);var De=f(w,arguments,!0).beforestart();if(N==="overlay"){Q&&(Ee=!0);const Ae=[ye[0],ye[1]||ye[0]];V.selection=Q=[[et=t===Ps?rt:Gn(Ae[0][0],Ae[1][0]),dt=t===Os?ct:Gn(Ae[0][1],Ae[1][1])],[lt=t===Ps?ft:kn(Ae[0][0],Ae[1][0]),Rt=t===Os?Tt:kn(Ae[0][1],Ae[1][1])]],ye.length>1&&je(C)}else et=Q[0][0],dt=Q[0][1],lt=Q[1][0],Rt=Q[1][1];st=et,q=dt,pt=lt,Ct=Rt;var Zt=Ut(w).attr("pointer-events","none"),ve=Zt.selectAll(".overlay").attr("cursor",ia[N]);if(C.touches)De.moved=Vt,De.ended=We;else{var xe=Ut(C.view).on("mousemove.brush",Vt,!0).on("mouseup.brush",We,!0);i&&xe.on("keydown.brush",xn,!0).on("keyup.brush",wn,!0),Oc(C.view)}u.call(w),De.start(C,z.name);function Vt(Ae){for(const hn of Ae.changedTouches||[Ae])for(const an of ye)an.identifier===hn.identifier&&(an.cur=gr(hn,w));if(Ce&&!be&&!Ne&&ye.length===1){const hn=ye[0];ag(hn.cur[0]-hn[0])>ag(hn.cur[1]-hn[1])?Ne=!0:be=!0}for(const hn of ye)hn.cur&&(hn[0]=hn.cur[0],hn[1]=hn.cur[1]);Ee=!0,kc(Ae),je(Ae)}function je(Ae){const hn=ye[0],an=hn.point0;var kr;switch(Kt=hn[0]-an[0],re=hn[1]-an[1],z){case Gc:case rg:{$&&(Kt=kn(rt-et,Gn(ft-lt,Kt)),st=et+Kt,pt=lt+Kt),G&&(re=kn(ct-dt,Gn(Tt-Rt,re)),q=dt+re,Ct=Rt+re);break}case hi:{ye[1]?($&&(st=kn(rt,Gn(ft,ye[0][0])),pt=kn(rt,Gn(ft,ye[1][0])),$=1),G&&(q=kn(ct,Gn(Tt,ye[0][1])),Ct=kn(ct,Gn(Tt,ye[1][1])),G=1)):($<0?(Kt=kn(rt-et,Gn(ft-et,Kt)),st=et+Kt,pt=lt):$>0&&(Kt=kn(rt-lt,Gn(ft-lt,Kt)),st=et,pt=lt+Kt),G<0?(re=kn(ct-dt,Gn(Tt-dt,re)),q=dt+re,Ct=Rt):G>0&&(re=kn(ct-Rt,Gn(Tt-Rt,re)),q=dt,Ct=Rt+re));break}case gi:{$&&(st=kn(rt,Gn(ft,et-Kt*$)),pt=kn(rt,Gn(ft,lt+Kt*$))),G&&(q=kn(ct,Gn(Tt,dt-re*G)),Ct=kn(ct,Gn(Tt,Rt+re*G)));break}}pt<st&&($*=-1,kr=et,et=lt,lt=kr,kr=st,st=pt,pt=kr,N in og&&ve.attr("cursor",ia[N=og[N]])),Ct<q&&(G*=-1,kr=dt,dt=Rt,Rt=kr,kr=q,q=Ct,Ct=kr,N in sg&&ve.attr("cursor",ia[N=sg[N]])),V.selection&&(Q=V.selection),be&&(st=Q[0][0],pt=Q[1][0]),Ne&&(q=Q[0][1],Ct=Q[1][1]),(Q[0][0]!==st||Q[0][1]!==q||Q[1][0]!==pt||Q[1][1]!==Ct)&&(V.selection=[[st,q],[pt,Ct]],u.call(w),De.brush(Ae,z.name))}function We(Ae){if(ZS(Ae),Ae.touches){if(Ae.touches.length)return;l&&clearTimeout(l),l=setTimeout(function(){l=null},500)}else Pc(Ae.view,Ee),xe.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Zt.attr("pointer-events","all"),ve.attr("cursor",ia.overlay),V.selection&&(Q=V.selection),nA(Q)&&(V.selection=null,u.call(w)),De.end(Ae,z.name)}function xn(Ae){switch(Ae.keyCode){case 16:{Ce=$&&G;break}case 18:{z===hi&&($&&(lt=pt-Kt*$,et=st+Kt*$),G&&(Rt=Ct-re*G,dt=q+re*G),z=gi,je(Ae));break}case 32:{(z===hi||z===gi)&&($<0?lt=pt-Kt:$>0&&(et=st-Kt),G<0?Rt=Ct-re:G>0&&(dt=q-re),z=Gc,ve.attr("cursor",ia.selection),je(Ae));break}default:return}kc(Ae)}function wn(Ae){switch(Ae.keyCode){case 16:{Ce&&(be=Ne=Ce=!1,je(Ae));break}case 18:{z===gi&&($<0?lt=pt:$>0&&(et=st),G<0?Rt=Ct:G>0&&(dt=q),z=hi,je(Ae));break}case 32:{z===Gc&&(Ae.altKey?($&&(lt=pt-Kt*$,et=st+Kt*$),G&&(Rt=Ct-re*G,dt=q+re*G),z=gi):($<0?lt=pt:$>0&&(et=st),G<0?Rt=Ct:G>0&&(dt=q),z=hi),ve.attr("cursor",ia[N]),je(Ae));break}default:return}kc(Ae)}}function m(C){f(this,arguments).moved(C)}function S(C){f(this,arguments).ended(C)}function E(){var C=this.__brush||{selection:null};return C.extent=Xc(e.apply(this,arguments)),C.dim=t,C}return c.extent=function(C){return arguments.length?(e=typeof C=="function"?C:Uc(Xc(C)),c):e},c.filter=function(C){return arguments.length?(n=typeof C=="function"?C:Uc(!!C),c):n},c.touchable=function(C){return arguments.length?(r=typeof C=="function"?C:Uc(!!C),c):r},c.handleSize=function(C){return arguments.length?(s=+C,c):s},c.keyModifiers=function(C){return arguments.length?(i=!!C,c):i},c.on=function(){var C=o.on.apply(o,arguments);return C===o?c:C},c}function cg(t){const{event:e,$el:n}=t,r=n.subchart.main||n.main;let i;return e&&e.type==="brush"?i=e.selection:r&&(i=r.select(".bb-brush").node())&&(i=lg(i)),i}function ug(t){const e=cg(t);return e?e[0]===e[1]:!0}function fg(t,e){return e.map(n=>{var r,i,o,s,l,c,u,f,d;const{values:h}=n,m=h[0],S=h[h.length-1],E=m?(i=(r=t.getXCacheKey)==null?void 0:r.call(t,m.x))!=null?i:m.x:"",C=S?(s=(o=t.getXCacheKey)==null?void 0:o.call(t,S.x))!=null?s:S.x:"",w=(c=(l=t.getTargetType)==null?void 0:l.call(t,n))!=null?c:"",N=(d=(f=(u=t.state)==null?void 0:u.subchartSourceTypes)==null?void 0:f[n.id])!=null?d:"";return`${n.id}:${w}:${N}:${h.length}:${E}:${C}`}).join("|")}function dg(t,e){var n;const r=(n=t.data)==null?void 0:n.targets;if(!r)return!1;for(let i=0;i<e.length;i++){const o=e[i],s=r.find(l=>l.id===o.id);if(!s||s.values!==o.values)return!1}return!0}function jc(t,e){pn(e)&&((t.min===void 0||e<t.min)&&(t.min=e),(t.max===void 0||e>t.max)&&(t.max=e))}function hg(t,e){for(let n=0;n<e.length;n++)jc(t,e[n])}function iA(t,e){var n,r,i,o;const s={min:void 0,max:void 0},l=t.state.hasAxis;for(let c=0;c<e.length;c++){const u=e[c],f=(n=t.isCandlestickType)==null?void 0:n.call(t,u),d=!f&&!!((r=t.isSubchartSourceTypeOf)!=null&&r.call(t,u,kt.CANDLESTICK)),{values:h}=u;for(let m=0;m<h.length;m++){const S=h[m];let E=S.value;if(!(Xe(E)||E===null))continue;const C=d?(i=t.getSubchartCandlestickShapeValue)==null?void 0:i.call(t,S,!0):void 0;le(C)?E=C:E!==null&&(f||d)&&(E=Array.isArray(E)?E.slice(0,4):[E.open,E.high,E.low,E.close]),Array.isArray(E)?hg(s,E):Ke(E)&&"high"in E?hg(s,Object.values(E)):(o=t.isBubbleZType)!=null&&o.call(t,S)?jc(s,l&&t.getBubbleZData(E,"y")):jc(s,E)}}return[s.min,s.max]}function oA(t,e){let n;for(let r=0;r<t.length;r++){const{values:i}=t[r];for(let o=0;o<i.length;o++){const{x:s}=i[o];pn(s)&&(n===void 0||(e==="min"?s<n:s>n))&&(n=s)}}return n}var sA={getYDomainMinMaxBoth(t){const e=this,{axis:n,cache:r,config:i,state:o}=e,l=dg(e,t)?`${ke.domainMinMax}_y_${fg(e,t)}`:null,c=l&&r.get(l);if(c&&c.generation===o.dataGeneration)return c.value;const u=i.data_groups,f=e.mapToIds(t),d=Gf(f);let h;if(u.length>0){const m=e.getValuesAsIdKeyed(t),S=t.some(G=>G.values.some(V=>V.value<0)),E=t.some(G=>G.values.some(V=>V.value>0)),C=new Map(f.map(G=>[G,n.getId(G)])),w={},N={};for(const G in m)w[G]=m[G].slice(),N[G]=m[G].slice();u.forEach(G=>{const V=G.filter(J=>d.has(J));if(V.length){const J=V[0],Q=C.get(J);w[J]&&S&&(w[J]=w[J].map(rt=>rt<0?rt:0)),N[J]&&E&&(N[J]=N[J].map(rt=>rt>0?rt:0)),V.filter((rt,et)=>et>0).forEach(rt=>{if(w[rt]){const et=C.get(rt);w[rt].forEach((st,ct)=>{const dt=+st;et===Q&&!(S&&dt>0)&&(w[J][ct]+=dt)})}if(N[rt]){const et=C.get(rt);N[rt].forEach((st,ct)=>{const dt=+st;et===Q&&!(E&&dt<0)&&(N[J][ct]+=dt)})}})}});const z=[],$=[];for(const G in w)z.push(br("min",w[G])),$.push(br("max",N[G]));h=[br("min",z),br("max",$)]}else h=iA(e,t);return l&&r.add(l,{generation:o.dataGeneration,value:h}),h},isHiddenTargetWithYDomain(t){const e=this;for(const n of e.state.hiddenTargetIds)if(e.axis.getId(n)===t)return!0;return!1},getYDomain(t,e,n){const r=this,{axis:i,config:o,scale:s}=r,l=`axis_${e}`;if(r.isStackNormalized()&&t.filter(q=>i.getId(q.id)===e).map(q=>q.id).some(q=>r.isGrouped(q)))return[0,100];const c=(s==null?void 0:s[e])&&s[e].type==="log",u=t.filter(ct=>i.getId(ct.id)===e),f=n?r.filterByXDomain(u,n):u;if(f.length===0)return r.isHiddenTargetWithYDomain(e)?s[e].domain():e==="y2"?s.y.domain():r.getYDomain(t,"y2",n);const d=o[`${l}_min`],h=o[`${l}_max`],m=o[`${l}_center`],S=o[`${l}_inverted`],E=r.hasDataLabel()&&o.axis_rotated,C=r.hasDataLabel()&&!o.axis_rotated,[w,N]=r.getYDomainMinMaxBoth(f);let z=w,$=N,G=[kt.BAR,kt.BUBBLE,kt.SCATTER,...Yn.Line].some(ct=>{const dt=ct.indexOf("area")>-1?"area":ct;return r.hasType(ct,f,!0)&&o[`${dt}_zerobased`]});z=Xe(d)?d:Xe(h)?z<=h?z:h-10:z,$=Xe(h)?h:Xe(d)?d<=$?$:d+10:$,isNaN(z)&&(z=0),isNaN($)&&($=z),z===$&&(z<0?$=0:z=0);const V=z>=0&&$>=0,J=z<=0&&$<=0;(Xe(d)&&V||Xe(h)&&J)&&(G=!1),G&&(V&&(z=0),J&&($=0));const Q=Math.abs($-z);let rt={top:Q*.1,bottom:Q*.1};if(on(m)){const ct=Math.max(Math.abs(z),Math.abs($));$=m+ct,z=m-ct}if(E){const ct=Ma(s.y.range()),dt=r.getDataLabelLength(z,$,"width").map(q=>{const ft=q/ct;return isFinite(ft)?ft:0});["bottom","top"].forEach((q,ft)=>{rt[q]+=Q*(dt[ft]/(1-dt[0]-dt[1]))})}else if(C){const ct=r.getDataLabelLength(z,$,"height");["bottom","top"].forEach((dt,q)=>{rt[dt]+=r.convertPixelToScale("y",ct[q],Q)})}rt=r.getResettedPadding(rt);const et=o[`${l}_padding`];pn(et)&&["bottom","top"].forEach(ct=>{rt[ct]=i.getPadding(et,ct,rt[ct],Q)}),G&&(V&&(rt.bottom=z),J&&(rt.top=-$));const st=c?[z,$].map(ct=>ct<0?0:ct):[z-rt.bottom,$+rt.top];return S?st.reverse():st},getXDomainMinMax(t,e){var n;const r=this,{cache:i,state:o}=r,s=r.config[`axis_x_${e}`],c=dg(r,t)?`${ke.domainMinMax}_x_${e}_${fg(r,t)}`:null,u=c&&i.get(c);let f=(u==null?void 0:u.generation)===o.dataGeneration?u.value:void 0;f===void 0&&(f=oA(t,e),c&&i.add(c,{generation:o.dataGeneration,value:f}));let d=Ke(s)?s.value:s;return d=on(d)&&((n=r.axis)!=null&&n.isTimeSeries())?Kn.bind(this)(d):d,Ke(s)&&s.fit&&(e==="min"&&d<f||e==="max"&&d>f)&&(d=void 0),on(d)?d:f},getXDomainPadding(t,e){const n=this,{axis:r,config:i}=n,o=i.axis_x_padding,s=r.isTimeSeries()&&e,l=Ma(t);let c;if(r.isCategorized()||s)c=0;else if(n.hasType("bar")){const d=n.getMaxDataCount();c=d>1?l/(d-1)/2:.5}else c=n.getResettedPadding(l*.01);let{left:u=c,right:f=c}=le(o)?{left:o,right:o}:o;if(o.unit==="px"){const d=Math.abs(l+l*.2);u=r.getPadding(o,"left",c,d),f=r.getPadding(o,"right",c,d)}else{const d=l+u+f;if(s&&d){const h=l/e/d;u=u/d/h,f=f/d/h}}return{left:u,right:f}},getXDomain(t){const e=this,{axis:n,config:r,scale:{x:i}}=e,o=r.axis_x_inverted,s=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")];let[l=0,c=0]=s;if(i.type!=="log"){const u=n.isCategorized(),f=n.isTimeSeries(),d=e.getXDomainPadding(s);let[h,m]=s;h-m===0&&!u&&(f?(h=new Date(h.getTime()*.5),m=new Date(m.getTime()*1.5)):(h=h===0?1:h*.5,m=m===0?-1:m*1.5)),(h||h===0)&&(l=f?new Date(h.getTime()-d.left):h-d.left),(m||m===0)&&(c=f?new Date(m.getTime()+d.right):m+d.right)}return o?[c,l]:[l,c]},updateXDomain(t,e,n,r,i){var o;const s=this,{config:l,org:c,scale:{x:u,subX:f}}=s,d=l.zoom_enabled;if(n&&(u.domain(i||ti(s.getXDomain(t),!l.axis_x_inverted)),c.xDomain=u.domain(),f.domain(u.domain()),(o=s.brush)==null||o.scale(f)),e){const h=i||!s.brush||ug(s)?c.xDomain:cg(s).map(f.invert);u.domain(h)}return(n||e)&&d&&s.zoom.updateScaleExtent(),r&&u.domain(s.trimXDomain(u.orgDomain())),u.domain()},trimXDomain(t){const e=this,n=e.config.axis_x_inverted,r=e.getZoomDomain(),[i,o]=r;return(n?t[0]>=i:t[0]<=i)&&(t[1]=+t[1]+(i-t[0]),t[0]=i),(n?t[1]<=o:t[1]>=o)&&(t[0]=+t[0]-(t[1]-o),t[1]=o),t},getZoomDomain(t="zoom",e=!1){const n=this,{config:r,scale:i,org:o}=n;let[s,l]=e&&i[t]?i[t].domain():o.xDomain;return t==="zoom"&&(on(r.zoom_x_min)&&(s=br("min",[s,r.zoom_x_min])),on(r.zoom_x_max)&&(l=br("max",[l,r.zoom_x_max]))),[s,l]},getZoomDomainValue(t){const e=this,{config:n,axis:r}=e;if(r.isCategorized()&&Array.isArray(t)){const i=n.axis_x_inverted;return t.map((s,l)=>Number(s)+(l===0?+i:+!i))}return t},convertPixelToScale(t,e,n){const r=this,{config:i,state:o}=r,s=i.axis_rotated;let l;return t==="x"?l=s?"height":"width":l=s?"width":"height",n*(e/o[l])},withinRange(t,e=[0,0],n){const i=this.config.axis_x_inverted,[o,s]=n;if(Array.isArray(t)){const l=i?t[1]:t[0],c=i?t[0]:t[1];if(l<c)return t.every((u,f)=>(f===0?i?+u<=o:+u>=o:i?+u>=s:+u<=s)&&!t.every((d,h)=>d===e[h]))}return!1}};function gg(t,e,n){const{config:r}=t,i=`axis_${e}_tick_format`;return(r[i]?r[i]:t.defaultValueFormat).call(t.api,n)}var lA={yFormat(t){return gg(this,"y",t)},y2Format(t){return gg(this,"y2",t)},getDefaultValueFormat(){const t=this,{defaultArcValueFormat:e,yFormat:n,y2Format:r}=t,i=t.hasArcType(null,["gauge","polar","radar"]);return function(o,s,l){return(i?e:t.axis&&t.axis.getId(l)==="y2"?r:n).call(t,o,s)}},defaultValueFormat(t){return en(t)?t.join("~"):Xe(t)?+t:""},defaultArcValueFormat(t,e){return`${(e*100).toFixed(1)}%`},defaultPolarValueFormat(t){return`${t}`},dataLabelFormat(t){const e=this,n=e.config.data_labels,r=o=>{let l=o;return en(o)?l=o.join("~"):Ke(o)&&(l=Object.values(o).join("~")),l};let i=r;return ue(n.format)?i=n.format:qn(n.format)&&(n.format[t]?i=n.format[t]===!0?r:n.format[t]:i=()=>""),i.bind(e.api)}};const vg=10,cA=750;function Ms(t){const e=this,n=e.getDataById(t);return e.levelColor?e.levelColor(n.values[0].value):e.color(n)}function uA(t,e=!0){var n;const{config:r}=this;let i=(n=r.data_names[t])!=null?n:t;return e&&ue(r.legend_format)&&(i=r.legend_format(i,t!==i?t:void 0)),i}function fA(t,e){var n;if(!e||e.empty())return;const r=(n=t.$el.legend)==null?void 0:n.selectAll(`.${Be.legendItem}`);r&&!r.empty()&&(e=r);const i=[];e.each(function(s){i.push({id:s,node:this})});const o=Xf(i,s=>s.id,s=>s.node);t.cache.add(ke.legendItemMap,o)}function pg(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function dA(t,e,n){const r=pg(n);t.state.legendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function mg(t,e){const n=t.state.legendTouch,r=n&&pg(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>vg||Math.abs(r.clientY-n.y)>vg)}function hA(t,e,n){mg(t,n);const r=t.state.legendTouch;return t.state.legendTouch=null,!!r&&r.id===e&&!r.moved}function gA(t,e){t.state.legendLastTouchClickId=e,t.state.legendLastTouchClickTime=Date.now()}function vA(t,e){const{state:n}=t,r=n.legendLastTouchClickId===e&&Date.now()-(n.legendLastTouchClickTime||0)<cA;return r&&(n.legendLastTouchClickId=null,n.legendLastTouchClickTime=0),r}function pA(t){var e;const n=(e=t.config.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Pa(n)&&n||!1,i=!isNaN(n)&&n||null;return{passive:!r&&i===null}}var mA={initLegend(){var t;const e=this,{config:n,$el:r}=e;if(e.legendItemTextBox={},e.state.legendHasRendered=!1,e.state.isCanvasMode){n.legend_show?(t=e.updateHtmlLegend)==null||t.call(e):e.state.hiddenLegendIds=new Set(e.mapToIds(e.data.targets));return}n.legend_show?(n.legend_contents_bindto||(r.legend=e.$el.svg.append("g").classed(Be.legend,!0).attr("transform",e.getTranslate("legend"))),e.updateLegend()):e.state.hiddenLegendIds=new Set(e.mapToIds(e.data.targets))},updateLegend(t,e,n){var r;const i=this,{config:o,state:s,scale:l,$el:c}=i,u=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};u.withTransition=fa(u,"withTransition",!0),u.withTransitionForTransform=fa(u,"withTransitionForTransform",!0),o.legend_contents_bindto&&o.legend_contents_template?i.updateLegendTemplate():s.hasTreemap||i.updateLegendElement(t||i.mapToIds(i.data.targets),u),(r=c.legend)==null||r.selectAll(`.${Be.legendItem}`).classed(Be.legendItemHidden,function(f){const d=!i.isTargetToShow(f);return d&&(this.style.opacity=null),d}),i.updateScales(!1,!l.zoom),i.updateSvgSize(),i.transformAll(u.withTransitionForTransform,n),s.legendHasRendered=!0},updateLegendTemplate(){const t=this,{config:e,$el:n}=t,r=Ut(e.legend_contents_bindto),i=e.legend_contents_template;if(!r.empty()){const o=t.mapToIds(t.data.targets),s=[];let l="";o.forEach(u=>{const f=ue(i)?Yr(i.call(t.api,u,t.color(u),t.api.data(u)[0].values)):Da(i,{COLOR:t.color(u),TITLE:u});f&&(s.push(u),l+=f)});const c=r.html(l).selectAll(function(){return this.childNodes}).data(s);t.setLegendItem(c),n.legend=r}},updateSizeForLegend(t){const e=this,{config:n,state:{isLegendTop:r,isLegendLeft:i,isLegendRight:o,isLegendInset:s,current:l}}=e,{width:c,height:u}=t,f={top:r?e.getCurrentPaddingByDirection("top")+n.legend_inset_y+5.5:l.height-u-e.getCurrentPaddingByDirection("bottom")-n.legend_inset_y,left:i?e.getCurrentPaddingByDirection("left")+n.legend_inset_x+.5:l.width-c-e.getCurrentPaddingByDirection("right")-n.legend_inset_x+.5};e.state.margin3={top:o?0:s?f.top:l.height-u,right:NaN,bottom:0,left:o?l.width-c:s?f.left:0}},transformLegend(t){const e=this,{$el:{legend:n},$T:r}=e;r(n,t).attr("transform",e.getTranslate("legend"))},updateLegendItemColor(t,e){const n=this,{legend:r}=n.$el;if(r){const i=n.getLegendItemById(t);i&&Ut(i).select("line").style("stroke",e)}},getLegendWidth(){const t=this,{current:{width:e},isLegendRight:n,isLegendInset:r,legendItemWidth:i,legendStep:o}=t.state;return t.config.legend_show?n||r?i*(o+1):e:0},getLegendHeight(){var t;const e=this,{current:n,isLegendRight:r,legendItemHeight:i,legendStep:o}=e.state,l=((t=e.config.padding)==null?void 0:t.mode)==="fit"?10:20;return e.config.legend_show?r?n.height:Math.max(l,i)*(o+1):0},opacityForUnfocusedLegend(t){return t.classed(Be.legendItemHidden)?null:"0.3"},toggleFocusLegend(t,e){const n=this,{$el:{legend:r},$T:i}=n,o=n.mapToTargetIds(t);r&&i(r.selectAll(`.${Be.legendItem}`).filter(s=>o.indexOf(s)>=0).classed(nn.legendItemFocused,e)).style("opacity",function(){return e?null:n.opacityForUnfocusedLegend.call(n,Ut(this))})},revertLegend(){const t=this,{$el:{legend:e},$T:n}=t;e&&n(e.selectAll(`.${Be.legendItem}`).classed(nn.legendItemFocused,!1)).style("opacity",null)},showLegend(t){const e=this,{config:n,$el:r,$T:i}=e;n.legend_show||(n.legend_show=!0,r.legend?r.legend.style("visibility",null):e.initLegend(),!e.state.legendHasRendered&&e.updateLegend()),e.removeHiddenLegendIds(t),i(r.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend(t){const e=this,{config:n,$el:{legend:r}}=e;n.legend_show&&dr(t)&&(n.legend_show=!1,r==null||r.style("visibility","hidden")),e.addHiddenLegendIds(t),r==null||r.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox(t,e){const n=this,{cache:r,state:i}=n;let o;const s=ke.legendItemTextBox;return t&&(o=!i.redrawing&&r.get(s)||{},o[t]||(o[t]=n.getTextRect(e,Be.legendItem),r.add(s,o)),o=o[t]),o},setLegendItem(t){const e=this,{$el:n,api:r,config:i,state:o}=e,s=o.inputType==="touch",l=e.hasType("gauge"),c=i.boost_useCssRule,u=i.legend_item_interaction,f=u.dblclick?"dblclick":"click",d=u||ue(i.legend_item_onclick),h=s?pA(e):void 0,m=function(S,E){var C;if(!$e(i.legend_item_onclick,r,E,!o.hiddenTargetIds.has(E))){const{altKey:w,type:N}=S,z=Ut(this);N==="dblclick"||w?o.hiddenTargetIds.size&&!z.classed(Be.legendItemHidden)?r.show():(r.hide(),r.show(E)):(r.toggle(E),z.classed(nn.legendItemFocused,!1))}s&&(e.hideTooltip(),(C=e.hideGridFocus)==null||C.call(e,!0))};t.attr("class",function(S){const E=Ut(this);return(!E.empty()&&E.attr("class")||"")+e.generateClass(Be.legendItem,S)}).style("visibility",S=>e.isLegendToShow(S)?null:"hidden"),i.interaction_enabled&&(c&&[[`.${Be.legendItem}`,"cursor:pointer"],[`.${Be.legendItem} text`,"pointer-events:none"],[`.${Be.legendItemPoint} text`,"pointer-events:none"],[`.${Be.legendItemTile}`,"pointer-events:none"],[`.${Be.legendItemEvent}`,"fill-opacity:0"]].forEach(S=>{const[E,C]=S;e.setCssRule(!1,E,[C])(n.legend)}),t.on(f,d?function(S,E){s&&S.type==="click"&&vA(e,E)||m.call(this,S,E)}:null),s&&f==="click"&&d&&t.on("touchstart",function(S,E){dA(e,E,S)},h).on("touchmove",S=>{mg(e,S)},h).on("touchend",function(S,E){hA(e,E,S)&&(gA(e,E),m.call(this,S,E))},h),!s&&t.on("mouseout",u||ue(i.legend_item_onout)?function(S,E){$e(i.legend_item_onout,r,E,!o.hiddenTargetIds.has(E))||(Ut(this).classed(nn.legendItemFocused,!1),l&&e.undoMarkOverlapped(e,`.${cr.gaugeValue}`),e.api.revert())}:null).on("mouseover",u||ue(i.legend_item_onover)?function(S,E){$e(i.legend_item_onover,r,E,!o.hiddenTargetIds.has(E))||(Ut(this).classed(nn.legendItemFocused,!0),l&&e.markOverlapped(E,e,`.${cr.gaugeValue}`),!o.transiting&&e.isTargetToShow(E)&&r.focus(E))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",e.getStylePropValue("pointer"))),fA(e,t)},getLegendItemById(t){var e;const n=this,r=n.cache.get(ke.legendItemMap);if(r&&r instanceof Map)return r.get(t)||null;const i=(e=n.$el.legend)==null?void 0:e.selectAll(`.${Be.legendItem}`).filter(o=>o===t);return(i==null?void 0:i.node())||null},updateLegendElement(t,e){const n=this,{config:r,state:i,$el:{legend:o},$T:s}=n,c=r.legend_item_tile_type!=="circle",u=r.legend_item_tile_r,f={width:c?r.legend_item_tile_width:u*2,height:c?r.legend_item_tile_height:u*2},d={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:f.width+5,totalLength:0},h={offsets:{},widths:{},heights:{},margins:[0],steps:{}};let m,S,E;const C=t.filter(Q=>!on(r.data_names[Q])||r.data_names[Q]!==null),w=e.withTransition,N=i.isLegendRight||i.isLegendInset,z=uA.bind(n),$=n.getUpdateLegendPositions(C,d,h,N);i.isLegendInset&&(d.step=r.legend_inset_step?r.legend_inset_step:C.length,i.legendStep=d.step),i.isLegendRight?(m=Q=>d.max.width*h.steps[Q],S=Q=>h.margins[h.steps[Q]]+h.offsets[Q]):i.isLegendInset?(m=Q=>d.max.width*h.steps[Q]+10,S=Q=>h.margins[h.steps[Q]]+h.offsets[Q]):(m=Q=>h.margins[h.steps[Q]]+h.offsets[Q],S=Q=>d.max.height*h.steps[Q]);const G={xText:(Q,rt)=>m(Q,rt)+4+f.width,xRect:(Q,rt)=>m(Q,rt),x1Tile:(Q,rt)=>m(Q,rt)-2,x2Tile:(Q,rt)=>m(Q,rt)-2+f.width,yText:(Q,rt)=>S(Q,rt)+9,yRect:(Q,rt)=>S(Q,rt)-5,yTile:(Q,rt)=>S(Q,rt)+4};n.generateLegendItem(C,f,$,G,N,z),E=o.select(`.${Be.legendBackground} rect`),i.isLegendInset&&d.max.width>0&&E.size()===0&&(E=o.insert("g",`.${Be.legendItem}`).attr("class",Be.legendBackground).append("rect")),r.legend_tooltip&&o.selectAll("title").data(C).text(Q=>z(Q,!1));const V=o.selectAll("text").data(C).text(Q=>z(Q)).each(function(Q,rt){$(this,Q,rt)});s(V,w).attr("x",G.xText).attr("y",G.yText);const J=o.selectAll(`rect.${Be.legendItemEvent}`).data(C);s(J,w).attr("width",Q=>h.widths[Q]).attr("height",Q=>h.heights[Q]).attr("x",G.xRect).attr("y",G.yRect),n.updateLegendItemPos(C,w,G),E&&s(E,w).attr("height",n.getLegendHeight()-12).attr("width",d.max.width*(d.step+1)+10),i.legendItemWidth=d.max.width,i.legendItemHeight=d.max.height,i.legendStep=d.step},getUpdateLegendPositions(t,e,n,r){const i=this,{config:o,state:s}=i;return function(l,c,u){const f=u===0,d=u===t.length-1,h=i.getLegendItemTextBox(c,l),m=h.width+e.tileWidth+(d&&!r?0:e.padding.right)+o.legend_padding,S=h.height+e.padding.top,E=r?S:m,C=r?i.getLegendHeight():i.getLegendWidth();let w;const N=function($,G){G||(w=(C-e.totalLength-E)/2,w<e.posMin&&(w=(C-E)/2,e.totalLength=0,e.step++)),n.steps[$]=e.step,n.margins[e.step]=s.isLegendInset?10:w,n.offsets[$]=e.totalLength,e.totalLength+=E};if(f&&(e.totalLength=0,e.step=0,e.max.width=0,e.max.height=0),o.legend_show&&!i.isLegendToShow(c)){n.widths[c]=0,n.heights[c]=0,n.steps[c]=0,n.offsets[c]=0;return}n.widths[c]=m,n.heights[c]=S,(!e.max.width||m>=e.max.width)&&(e.max.width=m),(!e.max.height||S>=e.max.height)&&(e.max.height=S);const z=r?e.max.height:e.max.width;if(o.legend_equally){for(const $ in n.widths)n.widths[$]=e.max.width;for(const $ in n.heights)n.heights[$]=e.max.height;w=(C-z*t.length)/2,w<e.posMin?(e.totalLength=0,e.step=0,t.forEach($=>N($))):N(c,!0)}else N(c)}},generateLegendItem(t,e,n,r,i,o){const s=this,{config:l,state:c,$el:{legend:u}}=s,f=l.legend_usePoint,d=l.legend_item_tile_r,h=l.legend_item_tile_type,m=h!=="circle",S=-200,E=u.selectAll(`.${Be.legendItem}`).data(t).enter().append("g");if(s.setLegendItem(E),l.legend_tooltip&&E.append("title").text(C=>C),E.append("text").text(C=>o(C)).each(function(C,w){n(this,C,w)}).style("pointer-events",s.getStylePropValue("none")).attr("x",i?r.xText:S).attr("y",i?S:r.yText),E.append("rect").attr("class",Be.legendItemEvent).style("fill-opacity",s.getStylePropValue("0")).attr("x",i?r.xRect:S).attr("y",i?S:r.yRect),f){const C=[],w=s.getValidPointPattern();E.append(N=>{C.indexOf(N)===-1&&C.push(N);let z=w[C.indexOf(N)%w.length];return z==="rectangle"&&(z="rect"),Ze.createElementNS(Jt.svg,"hasValidPointType"in s&&s.hasValidPointType(z)?z:"use")}).attr("class",Be.legendItemPoint).style("fill",Ms.bind(s)).style("pointer-events",s.getStylePropValue("none")).attr("href",(N,z,$)=>{const V=$[z].nodeName.toLowerCase(),J=s.getTargetSelectorSuffix(N);return V==="use"?`#${c.datetimeId}-point${J}`:void 0})}else E.append(m?"line":h).attr("class",Be.legendItemTile).style("stroke",Ms.bind(s)).style("pointer-events",s.getStylePropValue("none")).call(C=>{h==="circle"?C.attr("r",d).style("fill",Ms.bind(s)).attr("cx",i?r.x2Tile:S).attr("cy",i?S:r.yTile):m&&C.attr("stroke-width",e.height).attr("x1",i?r.x1Tile:S).attr("y1",i?S:r.yTile).attr("x2",i?r.x2Tile:S).attr("y2",i?S:r.yTile)})},updateLegendItemPos(t,e,n){const r=this,{config:i,$el:{legend:o},$T:s}=r,l=i.legend_usePoint,c=i.legend_item_tile_type,u=c!=="circle";if(l){const f=o.selectAll(`.${Be.legendItemPoint}`).data(t),d=i.legend_item_tile_type!=="circle",h=d?i.legend_item_tile_width:i.legend_item_tile_r*2,m=d?i.legend_item_tile_height:i.legend_item_tile_r*2,S=h*.75,E=m*.75,C=h/8,w=m/8;s(f,e).each(function(){const N=this.nodeName.toLowerCase();let z="x",$="y",G=null,V=null,J=null;N==="circle"?(z="cx",$="cy",G=Math.min(S,E)/2):N==="rect"&&(V=S,J=E);const Q=Ut(this).attr("transform",null).attr("x",null).attr("y",null).attr("cx",null).attr("cy",null).attr("r",G).attr("width",V).attr("height",J);N==="use"?Q.attr("transform",rt=>`translate(${n.x1Tile(rt)} ${n.yTile(rt)-m/2}) scale(${C} ${w})`):Q.attr(z,rt=>n.x1Tile(rt)+(h-(V||0))/2).attr($,rt=>n.yTile(rt)-(J||0)/2)})}else{const f=o.selectAll(`.${Be.legendItemTile}`).data(t);s(f,e).style("stroke",Ms.bind(r)).call(d=>{c==="circle"?d.attr("cx",h=>{const m=n.x2Tile(h);return m-(m-n.x1Tile(h))/2}).attr("cy",n.yTile):u&&d.attr("x1",n.x1Tile).attr("y1",n.yTile).attr("x2",n.x2Tile).attr("y2",n.yTile)})}}},xA={redraw(t={}){var e,n,r,i,o,s,l,c,u,f;const d=this,{config:h,state:m,$el:S}=d,{main:E,treemap:C}=S;m.redrawing=!0,m.redrawGeneration++,(m.dirty.data||m.dirty.visibility||t.initializing)&&m.dataGeneration++,(t.initializing||m.dirty.size||m.dirty.data||!m.rendered)&&d.cache.remove([ke.svgLeft]);const w=d.filterTargetsToShow(d.data.targets);m._targetsToShow=w;const N={data:m.dirty.data,visibility:m.dirty.visibility,size:m.dirty.size};m.dirty.data=!1,m.dirty.visibility=!1,m.dirty.size=!1;const{flow:z,initializing:$}=t,G=d.getWithOption(t),V=G.Transition?h.transition_duration:0,J=G.TransitionForExit?V:0,Q=G.TransitionForAxis?V:0,rt=(e=d.axis)==null?void 0:e.generateTransitions(Q),et=N.data||N.visibility||$;if(m.isCanvasMode&&(d.setContainerSize(),(n=d.updateHtmlLegend)==null||n.call(d)),d.updateSizes($),m.isCanvasMode){const st=d.scale.zoom,ct=st==null?void 0:st.domain();st&&(d.scale.zoom=null),d.updateScales($,G.UpdateXDomain),st&&(st.range(d.scale.x.range()),ct&&st.domain(ct),d.scale.zoom=d.getCustomizedXScale(st),d.axis.x.scale(d.scale.zoom),d.scale.x.domain(h.zoom_rescale?ct:d.org.xDomain),d.scale.subX.domain(d.org.xDomain)),m.hasAxis&&d.axis.syncAxisDomains(w,G,z),m.hasAxis&&((r=d.applyCanvasSubchartDomain)==null||r.call(d));const dt=et?d.getDrawShape():m._cachedDrawShape||d.getDrawShape();et&&(m._cachedDrawShape=dt),(i=d.updateHtmlLegend)==null||i.call(d),(o=d.resizeCanvas)==null||o.call(d),m.canvasFocusKey=null,d.renderCanvasFrame(dt,null,!0),$&&d.updateTypesElements(),d.callPluginHook("$redraw",t,0),m.redrawing=!1,m._targetsToShow=null,m._cachedDrawShape=null,d.mapToIds(d.data.targets).forEach(q=>{m.withoutFadeIn[q]=!0}),$e(h.onrendered,d.api);return}G.Legend&&h.legend_show?(t.withTransition=!!V,!C&&d.updateLegend(d.mapToIds(d.data.targets),t,rt)):G.Dimension&&d.updateDimension(!0),h.data_empty_label_text&&E.select(`text.${Rn.text}.${Ue.empty}`).attr("x",m.width/2).attr("y",m.height/2).text(h.data_empty_label_text).style("display",w.length?"none":null),(s=d.redrawTitle)==null||s.call(d),m.hasAxis?(d.axis.redrawAxis(w,G,rt,z,$),(l=d.hasGrid)!=null&&l.call(d)&&d.updateGrid(),h.regions.length&&((c=d.updateRegion)==null||c.call(d)),["bar","candlestick","line","area"].forEach(st=>{const ct=Nn(st);(/^(line|area)$/.test(st)&&d.hasTypeOf(ct)||d.hasType(st))&&et&&d[`update${ct}`](G.TransitionForExit)}),S.text&&E.selectAll(`.${sn.selectedCircles}`).filter(d.isBarType.bind(d)).selectAll("circle").remove(),h.interaction_enabled&&!z&&G.EventRect&&(d.redrawEventRect(),(u=d.bindZoomEvent)==null||u.call(d))):(S.arcs&&d.redrawArc(V,J,G.Transform),S.radar&&d.redrawRadar(),S.polar&&d.redrawPolar(),S.funnel&&d.redrawFunnel(),C&&d.updateTreemap(J)),!m.resizing&&!C&&(d.hasPointType()||m.hasRadar)?et&&d.updateCircle():(f=d.hasLegendDefsPoint)!=null&&f.call(d)&&d.data.targets.forEach(d.point("create",this)),d.hasDataLabel()&&!d.hasArcType(null,["radar"])&&et&&d.updateText(),$&&d.updateTypesElements(),d.generateRedrawList(w,z,V,G.Subchart,et),d.updateTooltipOnRedraw(),d.callPluginHook("$redraw",t,V)},generateRedrawList(t,e,n,r,i=!0){const o=this,{config:s,state:l}=o,c=i?o.getDrawShape():l._cachedDrawShape||o.getDrawShape();i&&(l._cachedDrawShape=c),l.hasAxis&&s.subchart_show&&o.redrawSubchart(r,n,c);const u=e&&o.generateFlow({targets:t,flow:e,duration:e.duration,shape:c,xv:o.xv.bind(o)}),f=(n||u)&&ro(),d=o.getRedrawList(c,e,u,f),h=()=>{u&&u(),l.redrawing=!1,l._targetsToShow=null,l._cachedDrawShape=null,$e(s.onrendered,o.api)};if(f&&d.length){const m=Ch();eg().duration(n).each(()=>{d.flatMap(S=>S).forEach(S=>m.add(S))}).call(m,h)}else l.transiting||h();o.mapToIds(o.data.targets).forEach(m=>{l.withoutFadeIn[m]=!0})},getRedrawList(t,e,n,r){const i=this,{config:o,state:{hasAxis:s,hasRadar:l,hasTreemap:c},$el:{grid:u}}=i,{cx:f,cy:d,xForText:h,yForText:m}=t.pos,S=[];if(s){i.redrawGrid&&(o.grid_x_lines.length||o.grid_y_lines.length)&&S.push(i.redrawGrid(r)),i.redrawRegion&&o.regions.length&&S.push(i.redrawRegion(r));for(const E in t.type){const C=Nn(E),w=t.type[E];(/^(area|line)$/.test(E)&&i.hasTypeOf(C)||i.hasType(E))&&S.push(i[`redraw${C}`](w,r))}!e&&u.main&&i.updateGridFocus&&S.push(i.updateGridFocus())}return(!i.hasArcType()||l)&&pn(o.data_labels)&&o.data_labels!==!1&&S.push(i.redrawText(h,m,e,r)),(i.hasPointType()||l)&&!i.isPointFocusOnly()&&i.redrawCircle&&S.push(i.redrawCircle(f,d,r,n)),c&&S.push(i.redrawTreemap(r)),S},updateAndRedraw(t={}){const e=this,{config:n,state:r}=e;let i;t.withTransition=fa(t,"withTransition",!0),t.withTransform=fa(t,"withTransform",!1),t.withLegend=fa(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=fa(t,"withTransitionForTransform",t.withTransition),t.withLegend&&n.legend_show||(r.hasAxis&&(i=e.axis.generateTransitions(t.withTransitionForAxis?n.transition_duration:0)),e.updateScales(),e.updateSvgSize(),e.transformAll(t.withTransitionForTransform,i)),e.redraw(t)}},yA={setContainerSize(){const t=this,{state:e}=t;e.current.width=t.getCurrentWidth(),e.current.height=t.getCurrentHeight()},getCurrentWidth(){const t=this;return t.config.size_width||t.getParentRectValue("width")},getCurrentHeight(){const t=this,{config:e}=t,n=e.size_height||t.getParentHeight();return n>0?n:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},getParentRectValue(t){const e=`offset${Nn(t)}`;let n=this.$el.chart.node(),r=0;for(;r<30&&n&&n.tagName!=="BODY";){try{r=cn(n,!0)[t]}catch(o){e in n&&(r=n[e])}n=n.parentNode}const i=Ze.body[e];return r>i&&(r=i),r},getParentHeight(){const t=this.$el.chart.style("height");let e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft(t){var e,n,r;const i=this,{cache:o,config:s,state:{hasAxis:l},$el:c}=i;if(t){const rt=o.get(ke.svgLeft);if(rt!==null)return rt}const u=s.axis_rotated,f=u||!u&&!s.axis_y_inner,d=u?Pn.axisX:Pn.axisY,h=c.main.select(`.${d}`).node(),m=l&&s[`axis_${u?"x":"y"}_label`],E=l&&(Ye(m)||Ye(m.text)||/^inner-/.test(m==null?void 0:m.position))?c.main.select(`.${d}-label`):null,C=E&&!E.empty()?E.node():null,w=!t,N={label:C?cn(C,w):null,leftAxis:h&&f?cn(h,w):null,chart:cn(c.chart.node(),w)},z=(n=(e=N.label)==null?void 0:e.left)!=null?n:0,$=(r=N.leftAxis)!=null?r:{right:0},G=N.chart.left+z,V=i.hasArcType(),J=$.right-G-(V?0:i.getCurrentPaddingByDirection("left",t)),Q=J>0?J:0;return o.add(ke.svgLeft,Q),Q},updateDimension(t){var e,n;const r=this,{config:i,state:{hasAxis:o,isCanvasMode:s},$el:l}=r;if(o&&!t&&r.axis.x&&i.axis_rotated&&((e=r.axis.subX)==null||e.create(l.axis.subX)),r.updateScales(t),s){(n=r.resizeCanvas)==null||n.call(r);return}r.updateSvgSize(),r.transformAll(!1)},updateSvgSize(){var t;const e=this,{config:n,state:{clip:r,current:i,hasAxis:o,width:s,height:l},$el:{svg:c}}=e;if(!c){(t=e.resizeCanvas)==null||t.call(e);return}if(n.resize_auto==="viewBox"?c.attr("viewBox",`0 0 ${i.width} ${i.height}`):c.attr("width",i.width).attr("height",i.height),o){const u=c.select(`.${gh.brush} .overlay`),f={width:0,height:0};u.size()&&(f.width=+u.attr("width"),f.height=+u.attr("height")),c.selectAll([`#${r.id}`,`#${r.idGrid}`]).select("rect").attr("width",s).attr("height",l),c.select(`#${r.idXAxis}`).select("rect").call(e.setXAxisClipPath.bind(e)),c.select(`#${r.idYAxis}`).select("rect").call(e.setYAxisClipPath.bind(e)),r.idSubchart&&c.select(`#${r.idSubchart}`).select("rect").attr("width",s).attr("height",f.height)}},getCurrentPaddingByDirection(t,e=!1,n=!1){var r;const i=this,{config:o,$el:s,state:{hasAxis:l,isCanvasMode:c}}=i,u=o.axis_rotated,f=((r=o.padding)==null?void 0:r.mode)==="fit",d=le(o[`padding_${t}`])?o[`padding_${t}`]:void 0,h=l?{top:u?"y2":null,bottom:u?"y":"x",left:u?"x":"y",right:u?null:"y2"}[t]:null,m=/^(left|right)$/.test(t),S=h&&o[`axis_${h}_inner`],E=h&&o[`axis_${h}_show`],C=h?o[`axis_${h}_axes`].length:0;let w=h?m?i.getAxisWidthByAxisId(h,e):i.getHorizontalAxisHeight(h):0;const N=20;let z=0;!f&&m&&(w=hy(w));let $=l&&m&&(S||Tn(d)&&!E)?0:f?(E?w:0)+(d!=null?d:0):Tn(d)?w:d;return m&&l?(h&&(f||S)&&o[`axis_${h}_label`].text&&($+=i.axis.getAxisLabelPosition(h).isOuter?N:0),t==="right"?($+=u?!f&&Tn(d)?10:2:!E||S?f?2:1:0,$+=n?i.axis.getXAxisTickTextY2Overflow(N):0):t==="left"&&u&&Tn(d)&&($=o.axis_x_show?f?w:Math.max(w,40):1)):t==="top"?((s.title&&s.title.node()||c&&o.title_text)&&($+=i.getTitlePadding()),z=u&&!S?C:0):t==="bottom"&&l&&u&&!E&&($+=1),$+w*C-z},getCurrentPadding(t=!1){const e=this,[n,r,i,o]=["top","bottom","left","right"].map(s=>e.getCurrentPaddingByDirection(s,null,t));return{top:n,bottom:r,left:i,right:o}},getResettedPadding(t){const e=this,{config:n}=e,r=le(t);let i=r?0:{};return n.padding===!1?!r&&Object.keys(t).forEach(o=>{i[o]=!dr(n.data_labels)&&n.data_labels!==!1&&o==="top"?t[o]:0}):i=t,i},updateSizes(t){var e,n,r,i,o;const s=this,{config:l,state:c,$el:{legend:u}}=s,f=l.axis_rotated,d=s.hasArcType()||c.hasFunnel||c.hasTreemap,h=((e=l.padding)==null?void 0:e.mode)==="fit";!t&&s.setContainerSize();const m=u?s.getLegendWidth():0,S=u?s.getLegendHeight():0,E={width:m,height:S};!d&&l.axis_x_show&&l.axis_x_tick_autorotate&&s.updateXAxisTickClip();const C={right:l.legend_show&&c.isLegendRight?m+(h?0:20):0,bottom:!l.legend_show||c.isLegendRight||c.isLegendInset?0:S},w=f||d?0:s.getHorizontalAxisHeight("x"),N=l.subchart_axis_x_show&&l.subchart_axis_x_tick_text_show?w:30,z=l.subchart_show&&!d?l.subchart_size_height+N:0,$=s.hasType("gauge")&&l.arc_needle_show&&!l.gauge_fullCircle&&!l.gauge_label_show?10:0,G=s.getCurrentPadding(!0);if(c.margin=!d&&f?{top:G.top,right:d?0:G.right+C.right,bottom:C.bottom+G.bottom,left:z+(d?0:G.left)}:{top:(h?0:4)+G.top,right:d?0:G.right+C.right,bottom:$+z+C.bottom+G.bottom,left:d?0:G.left},c.margin=s.getResettedPadding(c.margin),c.margin2=f?{top:c.margin.top,right:NaN,bottom:20+C.bottom,left:s.state.rotatedPadding.left}:{top:c.current.height-z-C.bottom,right:NaN,bottom:N+C.bottom,left:c.margin.left},c.margin3={top:0,right:NaN,bottom:0,left:0},(n=s.updateSizeForLegend)==null||n.call(s,E),c.width=c.current.width-c.margin.left-c.margin.right,c.height=c.current.height-c.margin.top-c.margin.bottom,c.width<0&&(c.width=0),c.height<0&&(c.height=0),c.width2=f?c.margin.left-c.rotatedPadding.left-c.rotatedPadding.right:c.width,c.height2=f?c.height:c.current.height-c.margin2.top-c.margin2.bottom,c.width2<0&&(c.width2=0),c.height2<0&&(c.height2=0),s.hasArcType()){const V=s.hasType("gauge"),J=l.legend_show&&c.isLegendRight,Q=(r=c.hasRadar&&s.cache.get(ke.radarTextWidth))!=null?r:0;c.arcWidth=c.width-(J?E.width+10:0)-Q,c.arcHeight=c.height-(J&&!V?0:10),(i=l.arc_rangeText_values)!=null&&i.length&&(V?(c.arcWidth-=25,c.arcHeight-=10,c.margin.left+=10):(c.arcHeight-=20,c.margin.top+=10)),V&&!l.gauge_fullCircle&&(c.arcHeight+=c.height-s.getPaddingBottomForGauge()),(o=s.updateRadius)==null||o.call(s)}c.isLegendRight&&d&&(c.margin3.left=c.arcWidth/2+c.radiusExpanded*1.1)}},TA={setCssRule(t,e,n,r){const i=this,{config:o,state:{cssRule:s,style:l}}=i;return o.boost_useCssRule?c=>{c.each(u=>{const f=r&&(r==null?void 0:r.call(i,u)),d=`${t?`.${An.shapes+i.getTargetSelectorSuffix(u.id)}`:""}${e}`;e in s&&l.sheet.deleteRule(s[d]),i.state.cssRule[d]=k1(l,d,n.filter(Boolean).map(h=>Ye(f)&&h.indexOf(":")===-1?`${h}: ${f}`:h||""))})}:()=>{}},getStylePropValue(t){const{config:{boost_useCssRule:e}}=this;return e?null:ue(t)?t.bind(this):t}};function xg(t){return typeof t=="string"?new vt([document.querySelectorAll(t)],[document.documentElement]):new vt([b(t)],At)}function bA(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function SA(t,e,n,r,i){var o;const s=this,{value:l}=t,c=s.isCandlestickType(t),u=le(l)&&l<0||c&&!((o=s.getCandlestickData(t))!=null&&o._isUp);let{x:f,y:d}=e;const h=4,m=h*2;return r?n==="start"?(f+=u?0:m,d+=h):n==="middle"?(f+=m,d-=m):n==="end"&&(u&&(f-=m),d+=h):(n==="start"?(f+=h,u&&(d+=m*2)):n==="middle"?d-=m:n==="end"&&(f-=h,u&&(d+=m*2)),i&&(d+=u?-17:c?13:7)),{x:f,y:d}}function yg(t,e){var n;const r=this.config.data_labels_position,{id:i,index:o,value:s}=t;return(n=ue(r)?r.bind(this.api)(e,s,i,o,this.$el.text):(i in r?r[i]:r)[e])!=null?n:0}function AA(t,e,n){var r,i;const o=this,{config:s,$T:l}=o,c=s.axis_rotated,{border:{padding:u="3 5",radius:f=10,stroke:d="#000",strokeWidth:h=1,fill:m="none"}}=s.data_labels,S=Uf(u),E=s.data_labels.border!==!0,C=ya(t);let w=Ut(t.previousElementSibling);(w.empty()||((r=w.node())==null?void 0:r.tagName)!=="rect"||!((i=w.attr("class"))!=null&&i.includes(n)))&&(w=Ut(t.parentNode).insert("rect",()=>t).attr("class",`${Rn.textBorderRect} ${n}`).attr("width",C.width+(E?S.left+S.right:0)).attr("height",C.height+(E?S.top+S.bottom:0)),E&&w.style("fill",m).style("stroke",d).style("stroke-width",`${h}px`).attr("rx",f).attr("ry",f)),l(w).attr("x",e.x-(E?S.left:0)-(c?0:C.width/2)).attr("y",e.y-(E?S.top:0)-C.height/4*3.2)}function Hc(t=0,e){const n=this,{config:r}=n,i=r[`${e}_label_threshold`]||0;return t>=i}function Tg(){const t=this,{$el:{text:e},config:n}=t;(t.state.arcWidth?t.getArcLabelConfig("image"):n.data_labels.image)&&e.filter(function(){const i=this.previousElementSibling;return i?i.tagName!=="image"||!i.classList.contains(Rn.textLabelImage):!0}).each(function(i){var o,s,l,c;const u=EA.call(t,i);if(!u)return;const{url:f,width:d,height:h,pos:m}=u;if(f){const S=Ut(this.parentNode);S==null||S.insert("image",`${(s=(o=this.getAttribute("class"))==null?void 0:o.replace(/(?:^(.)|\s)/g,".$1"))!=null?s:"text"}`).style("opacity","0").attr("href",E=>Da(f,{ID:"id"in E?E.id:E.data.id})).attr("class",Rn.textLabelImage).style("pointer-events","none").attr("width",d).attr("height",h).attr("transform",m?`translate(${(l=m.x)!=null?l:0} ${(c=m.y)!=null?c:0})`:null)}})}function EA(t){var e;const n=this,{config:r,state:i}=n,o=i.arcWidth?n.getArcLabelConfig("image"):r.data_labels.image;if(ue(o))return(e=o.call(n.api,t.value,t.id,t.index))!=null?e:{url:"",width:0,height:0,pos:{x:0,y:0}};if(o){const{url:s="",width:l=0,height:c=0,pos:u}=o;return{url:s,width:l,height:c,pos:u}}return null}function bg(t,e,n){var r;const i=this,{config:o,state:{arcWidth:s,hasTreemap:l}}=i,c=o.axis_rotated,u=Ut(t.previousElementSibling),f=d=>{var h;const m=d.style.opacity!=="0"&&d.style.fillOpacity!=="0";return(s?d.textContent:m)&&((h=this.previousElementSibling)==null?void 0:h.tagName)!=="image"};if(!u.empty()&&((r=u.node())==null?void 0:r.tagName)==="image"){const d=n||cn(t),h=+u.attr("width")/2,m=+u.attr("height")/2;let S=e.x-h,E=e.y-m-d.height/2;c?e.x+=h:(l&&(S=-h,E=-(m*2+d.height)),i.hasType("pie")||i.hasType("polar")||(e.y+=m)),i.$T(u).style("opacity",f(t)?null:"0").attr("x",S).attr("y",E)}}function CA(t){return Xf(t,e=>e,e=>ya(e,!0))}var IA={opacityForText(t){const e=this;return e.isBarType(t)&&!Hc.call(e,Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel()?null:"0"},initText(){const{$el:t}=this;t.main.select(`.${Ue.chart}`).append("g").attr("class",Rn.chartTexts).style("pointer-events",t.funnel||t.treemap?"none":null)},updateTargetsForText(t){const e=this,n=e.getChartClass("Text"),r=e.getClass("texts","id"),i=e.classFocus.bind(e);e.$el.main.select(`.${Rn.chartTexts}`).selectAll(`.${Rn.chartText}`).data(e.filterNullish(t)).attr("class",l=>`${n(l)}${i(l)}`.trim()).enter().append("g").style("opacity","0").attr("class",n).call(e.setCssRule(!0,` .${Rn.text}`,["fill","pointer-events:none"],e.updateTextColor)).append("g").attr("class",r)},updateText(){const t=this,{$el:e,$T:n,config:r,axis:i}=t,o=t.getClass("text","index"),s=r.data_labels.centered,l=e.main.selectAll(`.${Rn.texts}`).selectAll(`.${Rn.text}`).data(t.labelishData.bind(t));n(l.exit()).style("fill-opacity","0").remove(),e.text=l.enter().append("text").merge(l).attr("class",o).attr("text-anchor",c=>{let f=r[`axis_${i==null?void 0:i.getId(c.id)}_inverted`]?c.value>0:c.value<0;if(t.isCandlestickType(c)){const d=t.getCandlestickData(c);f=!(d!=null&&d._isUp)}else if(t.isTreemapType(c))return s?"middle":"start";return r.axis_rotated?f?"end":"start":"middle"}).style("fill",t.getStylePropValue(t.updateTextColor)).style("fill-opacity","0").each(function(c,u,f){const d=Ut(this);let{value:h}=c;if(t.isBubbleZType(c))h=t.getBubbleZData(h,"z");else if(t.isCandlestickType(c)){const m=t.getCandlestickData(c);m&&(h=m.close)}h=t.isTreemapType(c)?t.treemapDataLabelFormat(c)(d):t.dataLabelFormat(c.id)(h,c.id,c.index,f),le(h)?this.textContent=h:ci(d,h,void 0,!0)}),Tg.call(t)},updateTextColor(t){const e=this,{config:n}=e,r=n.data_labels_colors,i=e.isArcType(t)&&!e.isRadarType(t)||e.isFunnelType(t)||e.isTreemapType(t)?null:e.color(t);let o;if(Ye(r))o=r;else if(Ke(r)){const{id:s}=t.data||t;o=r[s]}else ue(r)&&(o=r.bind(e.api)(i,t));if(e.isCandlestickType(t)&&!ue(r)){const s=e.getCandlestickData(t);if(!(s!=null&&s._isUp)){const l=n.candlestick_color_down;o=Ke(l)?l[t.id]:l}}return o||i},updateTextBGColor(t,e){const n=this,{$el:{defs:r}}=n;let i="";if(e){const o=Ye(e)?"":n.getTargetSelectorSuffix("id"in t?t.id:t.data.id),s=r.select(["filter[id*='labels-bg","']"].join(o));if(s.size()&&(i=`url(#${s.attr("id")})`),ue(e)){n.generateTextBGColorFilter(e);const l=n.color(t),c=e.bind(n.api)(l,t);c?s.select("feFlood").attr("flood-color",c):i=""}}return i||null},redrawText(t,e,n,r){const i=this,{$T:o,axis:s,config:l,state:{hasTreemap:c}}=i,u=Pr(!0),f=l.axis_rotated,d=l.data_labels.rotate,h=bA(d),m=d?`rotate(${d})`:"",S=i.$el.text.style("fill",i.getStylePropValue(i.updateTextColor)).attr("filter",w=>i.updateTextBGColor.bind(i)(w,l.data_labels_backgroundColors)).style("fill-opacity",n?0:i.opacityForText.bind(i)),E=new Map,C=[];return S.each(function(w){const N=this;E.set(N,{rect:cn(N)}),l.data_labels.centered&&(i.isBarType(w)||i.isTreemapType(w))&&C.push(N)}),C.length>0&&CA(C).forEach((w,N)=>{const z=E.get(N);z&&(z.bbox=w)}),S.each(function(w,N){const z=E.get(this),$=o(c&&this.childElementCount?this.parentNode:this,!!(r&&(this.getAttribute("x")||this.getAttribute("transform"))),u),G=l[`axis_${s==null?void 0:s.getId(w.id)}_inverted`];let V={x:t.call(this,w,N,z),y:e.call(this,w,N,z)};d&&(V=SA.bind(i)(w,V,h,f,G),$.attr("text-anchor",h)),bg.call(i,this,V,z==null?void 0:z.rect),this.childElementCount||d?$.attr("transform",`translate(${V.x} ${V.y}) ${m}`):$.attr("x",V.x).attr("y",V.y),l.data_labels.border&&AA.call(i,$.node(),V,`${Rn.textBorderRect}-${N}`)}),!0},getTextRect(t,e){var n,r;const i=this;let o,s,l;Array.isArray(t)?o=`${ke.textRect}-${t.join("_")}`:(s=(r=(n=t.node)==null?void 0:n.call(t))!=null?r:t,/text/i.test(s.tagName)||(s=s.querySelector("text")),l=s.textContent,o=`${ke.textRect}-${l.replace(/\W/g,"_")}`);const c=i.cache.get(o)||[];return c.length===0&&((i.$el.svg||i.$el.chart.select("svg")).selectAll(`.${Ue.dummy}`).data(l?[l]:t).enter().append("text").style("visibility","hidden").style("font",s?Ut(s).style("font"):null).classed(e||Ue.dummy,!0).text(u=>u).each(function(u,f){c[f]=cn(this)}).remove(),i.cache.add(o,c)),c.length>1?c:c[0]},generateXYForText(t,e){const n=this,{state:{hasRadar:r,hasFunnel:i,hasTreemap:o}}=n,s=Object.keys(t),l={},c=e?n.getXForText:n.getYForText;return i&&s.push("funnel"),r&&s.push("radar"),o&&s.push("treemap"),s.forEach(u=>{l[u]=n[`generateGet${Nn(u)}Points`](t[u],!1)}),function(u,f,d){const h=n.isAreaType(u)&&"area"||n.isBarType(u)&&"bar"||n.isCandlestickType(u)&&"candlestick"||n.isFunnelType(u)&&"funnel"||n.isRadarType(u)&&"radar"||n.isTreemapType(u)&&"treemap"||"line";return c.call(n,l[h](u,f),u,this,d)}},getCenteredTextPos(t,e,n,r,i){const o=this,{config:s}=o,l=s.axis_rotated,c=o.isBarType(t),u=o.isTreemapType(t);if(s.data_labels.centered&&(c||u)){const f=(i==null?void 0:i.bbox)||ya(n);if(c){const d=o.getRangedData(t,null,"bar")>=0;if(l){const h=(d?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+f.width/2;return d?-h-3:h+2}else{const h=(d?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+f.height/2;return d?h:-h-2}}else if(u)return r==="x"?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2-f.y-f.height/2}return 0},getXForText(t,e,n,r){var i,o,s;const l=this,{config:c}=l,u=c.axis_rotated,f=l.isFunnelType(e),d=l.isTreemapType(e);let h=t?t[0][0]:0;if(l.isCandlestickType(e))u?h=(i=l.getCandlestickData(e))!=null&&i._isUp?t[2][2]+4:t[2][1]-4:h+=(t[1][0]-h)/2;else if(f)if(t)h=(s=(o=t[2])==null?void 0:o[0])!=null?s:h;else return bc(n,"x");else if(d)h+=c.data_labels.centered?0:5;else if(u){const m=c[`axis_${l.axis.getId(e.id)}_inverted`],S=l.isBarType(e)?4:6,E=e.value;h=t[2][1],h+=S*((m?E>0:E<0)?-1:1)}else h=l.hasType("bar")?(t[2][0]+t[0][0])/2:h;return(u||d||f)&&(h+=l.getCenteredTextPos(e,t,n,"x",r)),h+yg.call(this,e,"x")},getYForText(t,e,n,r){var i,o;const s=this,{axis:l,config:c,state:u}=s,f=c.axis_rotated,d=c[`axis_${l==null?void 0:l.getId(e.id)}_inverted`],h=s.isBarType(e),m=s.isFunnelType(e),S=s.isTreemapType(e),E=c.point_r,C=(r==null?void 0:r.rect)||cn(n);let{value:w}=e,N=3,z;if(s.isCandlestickType(e))w=s.getCandlestickData(e),f?(z=t[0][0],z+=(t[1][0]-z)/2+N):(z=w&&w._isUp?t[2][2]-N:t[2][1]+N*4,d&&(z+=15*(w._isUp?1:-1)));else if(m)if(t)z=((o=(i=t[2])==null?void 0:i[1])!=null?o:t[0][1])+C.height/2-3;else return bc(n,"y");else if(S)z=t[0][1]+(c.data_labels.centered?0:C.height+5);else if(f)z=(t[0][0]+t[2][0]+C.height*.6)/2;else if(z=t[2][1],le(E)&&E>5&&(s.isLineType(e)||s.isScatterType(e))&&(N+=c.point_r/2.3),w<0||w===0&&!u.hasPositiveValue&&u.hasNegativeValue)z+=d?h?-3:-5:C.height+(h?-N:N);else{let $=-N*2;h?$=-N:s.isBubbleType(e)&&($=N),d&&($=h?10:15),z+=$}return(!f||S)&&(z+=s.getCenteredTextPos(e,t,n,"y",r)),z+yg.call(this,e,"y")},markOverlapped(t,e,n){const r=e.$el.arcs.selectAll(n),i=r.filter(f=>f.data.id!==t),o=r.filter(f=>f.data.id===t),s=Tc(o.node()),l=(f,d)=>Math.sqrt(f*f+d*d);if(!o.node())return;const c=parseInt(o.style("font-size"),10),u=[];i.each(function(){const f=Tc(this),d=l(s.e,s.f)>l(f.e,f.f)?o:Ut(this),h=Math.ceil(Math.abs(s.e-f.e))<Math.ceil(d.node().getComputedTextLength()),m=Math.ceil(Math.abs(s.f-f.f))<c;u.push({node:this,overlaps:h&&m})}),u.forEach(({node:f,overlaps:d})=>{Ut(f).classed(Rn.TextOverlapping,d)})},undoMarkOverlapped(t,e){t.$el.arcs.selectAll(e).each(function(){xg([this,this.previousSibling]).classed(Rn.TextOverlapping,!1)})}};function Sg(t="left",e){const n=le(e);return t.includes("center")?n?e/2:"middle":t.includes("right")?n?e:"end":n?0:"start"}function RA(t){var e,n,r,i,o,s,l,c;const{config:u,$el:f}=t,d=((r=(n=(e=t.canvasTheme)==null?void 0:e.style)==null?void 0:n.title)==null?void 0:r.font)||((s=(o=(i=t.canvasTheme)==null?void 0:i.style)==null?void 0:o.label)==null?void 0:s.font)||"14px sans-serif",h=(c=(l=f.chart)==null?void 0:l.node)==null?void 0:c.call(l),m=h==null?void 0:h.ownerDocument;if(h&&m&&u.title_text){const S=m.createElementNS("http://www.w3.org/2000/svg","svg"),E=m.createElementNS("http://www.w3.org/2000/svg","text");S.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",E.setAttribute("class",Rn.title),E.style.font=d,E.textContent=String(u.title_text),S.appendChild(E),h.appendChild(S);const C=cn(E).height;if(S.remove(),C)return C}return u.title_text?parseFloat(d)||14:0}var wA={initTitle(){const t=this,{config:e,$el:n}=t;if(e.title_text){n.title=n.svg.append("g");const r=n.title.append("text").style("text-anchor",Sg(e.title_position)).attr("class",Rn.title);ci(r,e.title_text,[.3,1.5])}},redrawTitle(){const t=this,{config:e,state:{current:n},$el:{title:r}}=t;if(r){const i=Sg(e.title_position,n.width),o=(e.title_padding.top||0)+t.getTextRect(t.$el.title,Rn.title).height;r.attr("transform",`translate(${i}, ${o})`)}},getCanvasTitleHeight(){return RA(this)},getTitlePadding(){const t=this,{$el:{title:e},config:n,state:r}=t,i=n.title_padding.top||0,o=n.title_padding.bottom||0;if(r.isCanvasMode&&n.title_text)return i+t.getCanvasTitleHeight()+o;if(!(e!=null&&e.node()))return i+o;const s=e.node(),l=bc(s,"y");if(l){const c=ya(s);return l+c.y+c.height+o}return i+t.getTextRect(e,Rn.title).height+o}};const OA=/(\r?\n|\t)/g,PA=/{{(.*)}}/;var MA={initTooltip(){const t=this,{config:e,$el:n}=t;n.tooltip=Ut(e.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.append("div").attr("class",gs.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip(){var t;const e=this,{config:n,$el:r,state:{hasAxis:i,hasRadar:o}}=e;if(n.tooltip_init_show){const s=!(i||o);(t=e.axis)!=null&&t.isTimeSeries()&&Ye(n.tooltip_init_x)&&(n.tooltip_init_x=Kn.call(e,n.tooltip_init_x)),e.api.tooltip.show({data:{[s?"index":"x"]:n.tooltip_init_x}});const l=n.tooltip_init_position;if(!n.tooltip_contents.bindto&&!dr(l)){const{top:c=0,left:u=50}=l;r.tooltip.style("top",Ye(c)?c:`${c}px`).style("left",Ye(u)?u:`${u}px`).style("display",null)}}},getTooltipHTML(...t){const e=this,{api:n,config:r}=e;return Yr(ue(r.tooltip_contents)?r.tooltip_contents.bind(n)(...t):e.getTooltipContent(...t))},getTooltipContent(t,e,n,r){var i;const o=this,{api:s,config:l,state:c,$el:u}=o,f=l.tooltip_format_title,d=l.tooltip_format_name,h=l.tooltip_format_value,m=ue(f)?f.bind(s):e,S=ue(d)?d.bind(s):(q=>q),E=ue(h)?h.bind(s):null,C=(q,ft,lt,pt)=>{let Tt=E;return Tt||(c.hasTreemap||o.isStackNormalized()&&(!o.isStackNormalizedPerGroup()||o.isGrouped(lt))?Tt=(Rt,Ct)=>`${(Ct*100).toFixed(2)}%`:Tt=n),Tt(q,ft,lt,pt)},w=l.tooltip_order,N=q=>o.axis&&o.isBubbleZType(q)?o.getBubbleZData(q.value,"z"):o.getBaseValue(q),z=o.levelColor?q=>o.levelColor(q.value):q=>r(q),$=l.tooltip_contents,G=$.template,V=o.mapToTargetIds();if(w===null&&l.data_groups.length){const q=o.orderTargets(o.data.targets).map(ft=>ft.id).reverse();t.sort((ft,lt)=>{let pt=ft?ft.value:null,Tt=lt?lt.value:null;return pt>0&&Tt>0&&(pt=ft.id?q.indexOf(ft.id):null,Tt=lt.id?q.indexOf(lt.id):null),pt-Tt})}else if(/^(asc|desc)$/.test(w)){const q=w==="asc";t.sort((ft,lt)=>{const pt=ft?N(ft):null,Tt=lt?N(lt):null;return q?pt-Tt:Tt-pt})}else ue(w)&&t.sort(w.bind(s));const J=o.getTooltipContentTemplate(G),Q=t.length;let rt,et,st,ct,dt;for(dt=0;dt<Q;dt++){et=t[dt];const q=et&&N(et);if(!(!et||!(q||q===0))){if(Tn(rt)){const ft=(c.hasAxis||c.hasRadar)&&m(et.x);rt=Da(J[0],{CLASS_TOOLTIP:gs.tooltip,TITLE:Xe(ft)?G?ft:`<tr><th colspan="2">${ft}</th></tr>`:""})}if(!et.ratio&&u.arcs&&(st=["arc",o.$el.arcs.select(`path.${Qe.arc}-${et.id}`).data()[0]],et.ratio=o.getRatio(...st)),st=[et.ratio,et.id,et.index],o.isAreaRangeType(et)){const[ft,lt]=["high","low"].map(Tt=>C(o.getRangedData(et,Tt),...st));ct=`<b>Mid:</b> ${C(N(et),...st)} <b>High:</b> ${ft} <b>Low:</b> ${lt}`}else if(o.isCandlestickType(et)){const[ft,lt,pt,Tt,Rt]=["open","high","low","close","volume"].map(Ct=>o.getRangedData(et,Ct,"candlestick")?C(o.getRangedData(et,Ct,"candlestick"),...st):void 0);ct=`<b>Open:</b> ${ft} <b>High:</b> ${lt} <b>Low:</b> ${pt} <b>Close:</b> ${Tt}${Rt?` <b>Volume:</b> ${Rt}`:""}`}else if(o.isBarRangeType(et)){const{value:ft,id:lt,index:pt}=et;ct=`${C(ft,void 0,lt,pt)}`}else ct=C(N(et),...st);if(ct!==void 0){if(et.name===null)continue;const ft=S((i=et.name)!=null?i:et.id,...st),lt=z(et),pt={CLASS_TOOLTIP_NAME:gs.tooltipName+o.getTargetSelectorSuffix(et.id),COLOR:G||!o.patterns?lt:`<svg><rect style="fill:${lt}" width="10" height="10"></rect></svg>`,NAME:ft,VALUE:ct};if(G&&Ke($.text)){const Tt=V.indexOf(et.id);Object.keys($.text).forEach(Rt=>{pt[Rt]=$.text[Rt][Tt]})}rt+=Da(J[1],pt)}}}return`${rt}</table>`},getTooltipContentTemplate(t){return(t||`<table class="{=CLASS_TOOLTIP}"><tbody>
43
+ `,Ye.head.appendChild(Hn);try{return d("bb-shapes bb-shapes-canvas-probe","circle",wn,Xn)}finally{Hn.remove()}},C=d("bb-axis bb-axis-x","path","domain",["stroke","stroke-width"]),w=m("bb-axis-x","line",["stroke","stroke-width"]),$=m("bb-axis-x","text",["fill","font"]),z=m("bb-axis-x","text",["fill"],"_active_"),B=m("bb-axis-y","text",["fill","font"]),W=m("bb-axis-y2","text",["fill","font"]),H=d("bb-axis bb-axis-x","text","bb-axis-x-label",["fill","font"]),_=d("bb-axis bb-axis-y","text","bb-axis-y-label",["fill","font"]),q=d("bb-axis bb-axis-y2","text","bb-axis-y2-label",["fill","font"]),st=f("circle","",["fill","stroke","stroke-width"]),it=d("bb-grid","line","bb-ygrid",["stroke","stroke-width","stroke-dasharray"]),ot=d("bb-grid","text","",["fill","font"]),ct=h("bb-grid","bb-xgrid-focus","line","bb-xgrid-focus",["stroke","stroke-width","stroke-dasharray"]),gt=f("text","bb-text bb-empty",["fill","font"]),tt=d("bb-region","rect","",["fill","fill-opacity"]),ft=d("bb-region","text","",["fill","font"]),lt=f("path","bb-bar",["opacity","fill-opacity","stroke","stroke-width"]),bt=f("path","bb-bar _expanded_",["opacity","fill-opacity"]),St=f("path","bb-candlestick",["stroke","stroke-width"]),Mt=f("path","bb-candlestick _expanded_",["opacity","fill-opacity"]),Ot=f("path","bb-line",["stroke-width"]),Kt=d("bb-target bb-focused","path","bb-line",["stroke-width"]),ee=f("g","bb-target bb-defocused",["opacity"]),Ae=f("path","bb-area",["opacity","fill-opacity"]),Ee=f("circle","bb-circle",["fill","stroke","stroke-width"]),Te=f("circle","bb-selected-circle",["fill","stroke","stroke-width"]),De=E("bb-circle _expanded_",["fill","stroke","stroke-width"]),me=f("rect","bb-zoom-brush",["fill","fill-opacity","opacity"]),Pe=d("bb-brush","rect","extent",["fill","fill-opacity","opacity"]),Zt=d("bb-brush","rect","selection",["fill","fill-opacity","opacity"]),he=d("bb-brush","path","handle--custom",["fill","fill-opacity","opacity","stroke","stroke-width"]),ge=d("bb-chart-treemaps","rect","",["stroke","stroke-width"]),Wt=f("text","bb-text",["fill","font"]),We=d("","text","bb-title",["fill","font"]),Xe=ke(me.fill,"#000"),pn=Le(me["fill-opacity"]||me.opacity,.1),Cn=ke(Zt.fill,ke(Pe.fill,Xe)),be=(l=(o=(s=(i=oi(Zt["fill-opacity"],1))!=null?i:oi(Zt.opacity,1))!=null?s:oi(Pe["fill-opacity"],1))!=null?o:oi(Pe.opacity,1))!=null?l:pn,un=ke(he.stroke,"transparent"),an={axis:{lineColor:ke(C.stroke,"#000"),lineWidth:Le(C["stroke-width"],1),tickColor:ke(w.stroke,ke(C.stroke,"#000")),tickWidth:Le(w["stroke-width"],Le(C["stroke-width"],1)),labelFont:_.font||B.font||"10px sans-serif",xTickFont:$.font||B.font||"10px sans-serif",yTickFont:B.font||"10px sans-serif",y2TickFont:W.font||B.font||"10px sans-serif",labelColor:ke(B.fill,"#000"),xLabelColor:ke(H.fill,ke($.fill,"#000")),yLabelColor:ke(_.fill,ke(B.fill,"#000")),y2LabelColor:ke(q.fill,ke(_.fill,ke(B.fill,"#000"))),activeLabelColor:si(z.fill,$.fill)||ke(B.fill,"#000")},grid:{lineColor:ke(it.stroke,"#aaa"),lineWidth:Le(it["stroke-width"],1),dashArray:as(it["stroke-dasharray"]),labelFont:ot.font||B.font||"10px sans-serif",labelColor:ke(ot.fill,"#aaa")},focusGrid:{lineColor:ke(ct.stroke,ke(it.stroke,"#aaa")),lineWidth:Le(ct["stroke-width"],Le(it["stroke-width"],1)),dashArray:as(ct["stroke-dasharray"]||it["stroke-dasharray"])},emptyLabel:{font:gt.font||Wt.font||B.font||"20px sans-serif",color:ke(gt.fill,"#808080")},region:{fill:ke(tt.fill,"steelblue"),opacity:Le(tt["fill-opacity"],.1),labelFont:ft.font||B.font||"10px sans-serif",labelColor:ke(ft.fill,"#000")},shape:{barOpacity:Da(lt,1),barExpandedOpacity:Le(Da(bt,Da(lt,1)),Da(lt,1)),barStrokeColor:ke(lt.stroke,"#000"),barLineWidth:Le(lt["stroke-width"],0),barConnectLineColor:ke(Ot.stroke,"#000"),barConnectLineWidth:Le(Ot["stroke-width"],1),candlestickStrokeColor:ke(St.stroke,"#000"),candlestickLineWidth:Le(St["stroke-width"],1),candlestickExpandedOpacity:Le(Da(Mt,1),1),lineWidth:Le(Ot["stroke-width"],1),lineFocusedWidth:Le(Kt["stroke-width"],2),areaOpacity:Da(Ae,.2),targetDefocusedOpacity:Le(ee.opacity,.3),pointFillColor:si(Ee.fill,st.fill),pointStrokeColor:si(Ee.stroke,st.stroke),pointLineWidth:oi(Ee["stroke-width"],st["stroke-width"])},selectedPoint:{fill:ke(Te.fill,"#fff"),stroke:si(Te.stroke),lineWidth:Le(Te["stroke-width"],2)},focusPoint:{fill:si(De.fill,S),stroke:si(De.stroke,S),lineWidth:Le(De["stroke-width"],1)},zoomBrush:{fill:Xe,opacity:pn},subchartBrush:{fill:Cn,opacity:be,handleFill:ke(he.fill,"transparent"),handleOpacity:Da(he,1),handleStroke:un,handleLineWidth:Le(he["stroke-width"],un==="transparent"?0:1)},treemap:{stroke:ke(ge.stroke,"#fff"),lineWidth:Le(ge["stroke-width"],1)},label:{font:Wt.font||B.font||"10px sans-serif",color:ke(Wt.fill,"#000")},title:{font:We.font||Wt.font||B.font||"14px sans-serif",color:ke(We.fill,"#000")}},Nr=u1(n),te=Xr(an,Nr),ma=n==null?void 0:n.axis,zR=!!ma&&Object.prototype.hasOwnProperty.call(ma,"labelColor"),UR=!!ma&&Object.prototype.hasOwnProperty.call(ma,"labelFont");if(te.axis.lineWidth=Le(te.axis.lineWidth,an.axis.lineWidth),te.axis.tickWidth=Le(te.axis.tickWidth,te.axis.lineWidth),UR){const wn=ma,Xn=te.axis.labelFont;wn.xTickFont===void 0&&(te.axis.xTickFont=Xn),wn.yTickFont===void 0&&(te.axis.yTickFont=Xn),wn.y2TickFont===void 0&&(te.axis.y2TickFont=Xn)}if(te.axis.labelFont=te.axis.labelFont||an.axis.labelFont,te.axis.xTickFont=te.axis.xTickFont||te.axis.labelFont,te.axis.yTickFont=te.axis.yTickFont||te.axis.labelFont,te.axis.y2TickFont=te.axis.y2TickFont||te.axis.yTickFont,te.axis.labelColor=ke(te.axis.labelColor,an.axis.labelColor),zR){const wn=te.axis.labelColor;ma.xLabelColor===void 0&&(te.axis.xLabelColor=wn),ma.yLabelColor===void 0&&(te.axis.yLabelColor=wn),ma.y2LabelColor===void 0&&(te.axis.y2LabelColor=wn)}te.axis.xLabelColor=ke(te.axis.xLabelColor,te.axis.labelColor),te.axis.yLabelColor=ke(te.axis.yLabelColor,te.axis.labelColor),te.axis.y2LabelColor=ke(te.axis.y2LabelColor,te.axis.yLabelColor),te.axis.activeLabelColor=ke(te.axis.activeLabelColor,te.axis.labelColor),te.grid.lineWidth=Le(te.grid.lineWidth,an.grid.lineWidth),te.grid.dashArray=as(te.grid.dashArray),te.focusGrid.lineWidth=Le(te.focusGrid.lineWidth,an.focusGrid.lineWidth),te.focusGrid.dashArray=as(te.focusGrid.dashArray),te.region.opacity=Le(te.region.opacity,an.region.opacity),te.shape.barOpacity=Le(te.shape.barOpacity,an.shape.barOpacity),te.shape.barExpandedOpacity=Le(te.shape.barExpandedOpacity,te.shape.barOpacity),te.shape.barLineWidth=Le(te.shape.barLineWidth,an.shape.barLineWidth),te.shape.barConnectLineWidth=Le(te.shape.barConnectLineWidth,an.shape.barConnectLineWidth),te.shape.candlestickLineWidth=Le(te.shape.candlestickLineWidth,an.shape.candlestickLineWidth),te.shape.candlestickStrokeColor=ke(te.shape.candlestickStrokeColor,an.shape.candlestickStrokeColor),te.shape.candlestickExpandedOpacity=Le(te.shape.candlestickExpandedOpacity,an.shape.candlestickExpandedOpacity),te.shape.lineWidth=Le(te.shape.lineWidth,an.shape.lineWidth),te.shape.lineFocusedWidth=Le(te.shape.lineFocusedWidth,an.shape.lineFocusedWidth),te.shape.areaOpacity=Le(te.shape.areaOpacity,an.shape.areaOpacity),te.shape.targetDefocusedOpacity=Le(te.shape.targetDefocusedOpacity,an.shape.targetDefocusedOpacity),te.shape.pointLineWidth=oi(te.shape.pointLineWidth),te.selectedPoint.lineWidth=Le(te.selectedPoint.lineWidth,an.selectedPoint.lineWidth),te.focusPoint.lineWidth=Le(te.focusPoint.lineWidth,an.focusPoint.lineWidth),te.zoomBrush.opacity=Le(te.zoomBrush.opacity,an.zoomBrush.opacity),te.subchartBrush.opacity=Le(te.subchartBrush.opacity,an.subchartBrush.opacity),te.subchartBrush.handleOpacity=Le(te.subchartBrush.handleOpacity,an.subchartBrush.handleOpacity),te.subchartBrush.handleLineWidth=Le(te.subchartBrush.handleLineWidth,an.subchartBrush.handleLineWidth),te.treemap.lineWidth=Le(te.treemap.lineWidth,an.treemap.lineWidth),this.style=te,this.cacheContainer=e,this.cacheKey=hh(e,n),c.remove()}reload(e,n){const r=hh(e,n);r!==null&&this.style&&this.cacheContainer===e&&this.cacheKey===r||this.load(e,n)}getGridLineStyle(e,n={},r="line"){const i={};for(const s of this.gridLineSelectorOverrides)o1(s.selector,e,n.class,r)&&uh(i,s.style,this.directGridOverrideKeys);return bc(i).length?i:void 0}}var d1=Object.defineProperty,h1=(t,e,n)=>e in t?d1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yr=(t,e,n)=>h1(t,typeof e!="symbol"?e+"":e,n);const Fa=24,vh=64,Sc=[xr,er,Vn];function li(t,e){return Math.floor(t/e)}function gh(t,e,n){var r,i;const s=li(e.x,n),o=li(e.x+((r=e.w)!=null?r:0),n),l=li(e.y,n),c=li(e.y+((i=e.h)!=null?i:0),n);for(let u=s;u<=o;u++)for(let f=l;f<=c;f++){const d=`${u}:${f}`,h=t.get(d);h?h.push(e):t.set(d,[e])}}function ph(t,e,n,r,i=0){const s=li(e,r),o=li(n,r),l=[];for(let c=-i;c<=i;c++)for(let u=-i;u<=i;u++){const f=t.get(`${s+c}:${o+u}`);if(f!=null&&f.length)for(let d=0;d<f.length;d++)l.push(f[d])}return l}function v1(t,e){var n,r,i;const s=t.config.point_sensitivity;if(Number.isFinite(s))return s;(n=t.pointR)==null||n.call(t,e);const o=(i=(r=t.getPointSensitivity)==null?void 0:r.call(t,e))!=null?i:Fa;return Number.isFinite(o)?o:Fa}function g1(t,e){return la(t,e)&&e.values.length>Zf&&!t.config.data_selection_enabled&&Number.isFinite(t.config.point_sensitivity)&&Number.isFinite(t.config.point_r)}class p1{constructor(){yr(this,"bars",[]),yr(this,"points",[]),yr(this,"indices",[]),yr(this,"barGrid",new Map),yr(this,"pointGrid",new Map),yr(this,"plot",{x:0,y:0,w:0,h:0}),yr(this,"pointCellSize",Fa),yr(this,"maxPointSensitivity",Fa),yr(this,"grouped",!1),yr(this,"pointBased",!1),yr(this,"indexAxis","x")}rebuild(e,n){var r,i,s;const{current:o,margin:l,width:c,height:u}=e.state,f=e.filterTargetsToShow();this.bars=[],this.points=[],this.indices=[],this.barGrid=new Map,this.pointGrid=new Map,this.maxPointSensitivity=Fa,this.indexAxis=e.config.axis_rotated?"y":"x",this.plot=e.state.hasTreemap?{x:0,y:0,w:o.width,h:o.height}:{x:l.left,y:l.top,w:c,h:u},this.grouped=!!e.config.tooltip_grouped&&!e.state.hasTreemap,this.pointBased=!(e.config.axis_x_forceAsSingle&&this.grouped)&&(!!((r=e.isMultipleX)!=null&&r.call(e))||f.some(C=>la(e,C)||ca(e,C)));const h=this.grouped&&(!this.pointBased||e.config.data_selection_enabled&&e.config.data_selection_grouped)?new Map:null,m=(C,w,$)=>{var z,B;if(!h)return;const W=(B=(z=e.getXCacheKey)==null?void 0:z.call(e,$.x))!=null?B:$.index;Number.isFinite($.index)&&!h.has(W)&&gn(C,w)&&h.set(W,{x:C,y:w,data:$})};if(e.state.hasTreemap){const C=(i=e.getTreemapRoot)==null?void 0:i.call(e,e.data.targets),w=(C==null?void 0:C.children)||[];for(const $ of w){const{data:z}=$;if(!kl(e,z))continue;const{x:B,y:W,w:H,h:_}=ai(e,$,C,!0);!gn(B,W)||!gn(B+H,W+_)||this.addBar({x:B,y:W,w:H,h:_,data:z})}this.indices=[];return}if(n.indices[qt.BAR]||f.some(er.bind(null,e))){const C=er.bind(null,e),w=tr(e,n,qt.BAR,C),$=e.generateGetBarPoints(w,!1);f.filter(C).filter(z=>ei(e,z,Sc)).forEach(z=>{const B=Wr(e,z);for(let W=B.start;W<B.end;W++){const H=z.values[W];if(!An(e,H))continue;const _=Qi(e,$,H,W);if(!_)continue;const{rect:q}=_,st=l.left+q.x,it=l.top+q.y,{w:ot,h:ct}=q;this.addBar({x:st,y:it,w:ot,h:ct,data:H}),m(st+ot/2,it+ct/2,H)}})}if(n.indices[qt.CANDLESTICK]||f.some(Vn.bind(null,e))){const C=Vn.bind(null,e),w=tr(e,n,qt.CANDLESTICK,C),$=(s=e.generateGetCandlestickPoints)==null?void 0:s.call(e,w,!1);$&&f.filter(C).filter(z=>ei(e,z,Sc)).forEach(z=>{var B;const W=Wr(e,z);for(let H=W.start;H<W.end;H++){const _=z.values[H];if(!((B=e.getCandlestickData)==null?void 0:B.call(e,_)))continue;const st=_i(e,$,_,H);if(!st)continue;const{body:it}=st,ot=l.left+it.x,ct=l.top+it.y,{w:gt,h:tt}=it;this.addBar({x:ot,y:ct,w:Math.max(1,gt),h:Math.max(1,tt),data:_}),m(ot+gt/2,ct+tt/2,_)}})}const{cx:S,cy:E}=n.pos;S&&E&&f.filter(xr.bind(null,e)).filter(C=>ei(e,C,Sc)).forEach(C=>{const w=Wr(e,C),$=g1(e,C)?Qf(c,u,e.config.point_r):null;for(let z=w.start;z<w.end;z++){const B=C.values[z];if(!An(e,B))continue;const W=l.left+S(B,z),H=l.top+E(B,z),_=v1(e,B);gn(W,H)&&($&&!_f($,W-l.left,H-l.top)||(this.addPoint({x:W,y:H,sensitivity:_,data:B}),m(W,H,B)))}}),this.buildPointGrid(),this.indices=h?Array.from(h.values()).sort((C,w)=>C[this.indexAxis]-w[this.indexAxis]):[]}hitBar(e,n){for(const r of ph(this.barGrid,e,n,vh)){const{w:i=0,h:s=0}=r;if(e>=r.x&&e<=r.x+i&&n>=r.y&&n<=r.y+s)return r.data}return null}hitPoint(e,n){var r,i;let s=null,o=Number.POSITIVE_INFINITY;for(const l of ph(this.pointGrid,e,n,this.pointCellSize,1)){const c=l.x-e,u=l.y-n,f=Math.sqrt(c*c+u*u),d=(r=l.sensitivity)!=null?r:Fa;f<=d&&f<o&&(o=f,s=l)}return(i=s==null?void 0:s.data)!=null?i:null}findNearest(e,n){const r=this.hitBar(e,n);if(r)return r;if(!this.pointBased&&this.grouped&&this.isWithinPlot(e,n)){const i=this.findNearestIndexItem(e,n);if(i)return i.data}return this.hitPoint(e,n)}findNearestShape(e,n){var r;return(r=this.hitBar(e,n))!=null?r:this.hitPoint(e,n)}findNearestIndexByCoord(e,n){var r,i;return(i=(r=this.findNearestIndexItem(e,n))==null?void 0:r.data)!=null?i:null}findInRect(e,n=!1){const r=Math.min(e.x,e.x+e.w),i=Math.max(e.x,e.x+e.w),s=Math.min(e.y,e.y+e.h),o=Math.max(e.y,e.y+e.h),l=new Set,c=[],u=f=>{const d=f.data,h=`${d.id}:${d.index}`;l.has(h)||(l.add(h),c.push(d))};if(n){const f=this.indexAxis,d=f==="y"?s:r,h=f==="y"?o:i;return this.indices.filter(m=>m[f]>=d&&m[f]<=h).forEach(u),c}return this.bars.filter(f=>{var d,h;const m=(d=f.w)!=null?d:0,S=(h=f.h)!=null?h:0;return!(i<f.x||f.x+m<r)&&!(o<f.y||f.y+S<s)}).forEach(u),this.points.filter(f=>f.x>=r&&f.x<=i&&f.y>=s&&f.y<=o).forEach(u),c}addBar(e){this.bars.push(e),gh(this.barGrid,e,vh)}addPoint(e){var n;const r=(n=e.sensitivity)!=null?n:Fa;this.maxPointSensitivity=Math.max(this.maxPointSensitivity,r),this.points.push(e)}buildPointGrid(){this.pointCellSize=Math.max(1,this.maxPointSensitivity),this.pointGrid=new Map;for(const e of this.points)gh(this.pointGrid,e,this.pointCellSize)}isWithinPlot(e,n){const{plot:r}=this;return e>=r.x&&e<=r.x+r.w&&n>=r.y&&n<=r.y+r.h}findNearestIndexItem(e,n){const{indexAxis:r,indices:i}=this,s=r==="y"?n:e;if(!i.length)return null;let o=0,l=i.length-1;for(;o<l;){const f=o+l>>1;i[f][r]<s?o=f+1:l=f}const c=i[o],u=i[o-1];return u&&Math.abs(u[r]-s)<Math.abs(c[r]-s)?u:c}}var m1=Object.defineProperty,mh=Object.getOwnPropertySymbols,x1=Object.prototype.hasOwnProperty,y1=Object.prototype.propertyIsEnumerable,xh=(t,e,n)=>e in t?m1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cn=(t,e)=>{for(var n in e||(e={}))x1.call(e,n)&&xh(t,n,e[n]);if(mh)for(var n of mh(e))y1.call(e,n)&&xh(t,n,e[n]);return t};const ze={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_",dummy:"_dummy_"},Ze={arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcLabelLineText:"bb-arc-label-line-text",arcRange:"bb-arc-range",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title",needle:"bb-needle"},To={area:"bb-area",areas:"bb-areas"},Rn={axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label",axisXTooltip:"bb-axis-x-tooltip",axisYTooltip:"bb-axis-y-tooltip",axisY2Tooltip:"bb-axis-y2-tooltip",axisTooltipX:"bb-axis-tooltip-x",axisTooltipY:"bb-axis-tooltip-y"},rr={bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars",barConnectLine:"bb-bar-connectLine"},Kr={candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"},$n={chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"},Ac={colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"},Na={dragarea:"bb-dragarea",INCLUDED:"_included_"},is={funnel:"bb-funnel",chartFunnel:"bb-chart-funnel",chartFunnels:"bb-chart-funnels",funnelBackground:"bb-funnel-background"},ar={chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"},$e={legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"},Mr={chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"},Zr={eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"},nn={focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",xgridFocusContinuous:"bb-xgrid-focus-continuous",ygridFocus:"bb-ygrid-focus"},yn={grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"},Jr={level:"bb-level",levels:"bb-levels"},yh={chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"},ss={region:"bb-region",regions:"bb-regions"},on={selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"},Tn={shape:"bb-shape",shapes:"bb-shapes"},Th={brush:"bb-brush",subchart:"bb-subchart"},En={chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",textBorderRect:"bb-text-border",textLabelImage:"bb-text-label-image",TextOverlapping:"text-overlapping"},bo={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"},bh={treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"},Ec={buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"};var Re=cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn({},ze),Ze),To),Rn),rr),Kr),$n),Ac),Na),ar),$e),Mr),Zr),nn),is),yn),Jr),yh),ss),on),Tn),Th),En),bo),bh),Ec),T1={boost_useCssRule:!1,boost_useWorker:!1,boost_workerUrl:void 0},b1={color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0},S1={legend_contents_bindto:void 0,legend_contents_template:"<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_format:void 0,legend_padding:0,legend_position:"bottom",legend_show:!0,legend_tooltip:!1,legend_usePoint:!1},A1={bindto:"#chart",background:{},clipPath:!0,svg_classname:void 0,size_width:void 0,size_height:void 0,padding:!0,padding_mode:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,resize_timer:!0,resize_live:!1,onclick:void 0,onover:void 0,onout:void 0,onresize:void 0,onresized:void 0,onbeforeinit:void 0,oninit:void 0,onafterinit:void 0,onrendered:void 0,transition_duration:250,plugins:[],render:{},render_mode:"svg",canvas_theme:{},regions:[]},E1={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},C1={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:void 0,tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:()=>{},tooltip_onhide:()=>{},tooltip_onshown:()=>{},tooltip_onhidden:()=>{},tooltip_order:null},I1={data_x:void 0,data_idConverter:t=>t,data_names:{},data_classes:{},data_type:void 0,data_types:{},data_order:"desc",data_groups:[],data_groupsZeroAs:"positive",data_color:void 0,data_colors:{},data_labels:{},data_labels_backgroundColors:void 0,data_labels_colors:void 0,data_labels_position:{},data_labels_imgUrl:void 0,data_hide:!1,data_filter:void 0,data_onclick:()=>{},data_onover:()=>{},data_onout:()=>{},data_onshown:void 0,data_onhidden:void 0,data_onmin:void 0,data_onmax:void 0,data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:"csv",data_keys:void 0,data_empty_label_text:""},R1={interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},interaction_onout:!0},w1=Object.defineProperty,O1=(t,e,n)=>e in t?w1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,P1=(t,e,n)=>O1(t,typeof e!="symbol"?e+"":e,n);const Sh=class rm{static setOptions(e){for(let n=0;n<e.length;n++)Object.assign(this.data,e[n])}constructor(){return Xy(A1,T1,I1,b1,R1,S1,E1,C1,rm.data)}};P1(Sh,"data",{});let $a=Sh;class M1{constructor(){return{chart:null,main:null,svg:null,axis:{x:null,y:null,y2:null,subX:null,subY:null,subY2:null},axisTooltip:{x:null,y:null,y2:null},defs:null,tooltip:null,legend:null,title:null,subchart:{main:null,bar:null,line:null,area:null},arcs:null,bar:null,candlestick:null,line:null,area:null,circle:null,radar:null,text:null,grid:{main:null,x:null,y:null},gridLines:{main:null,x:null,y:null},region:{main:null,list:null},eventRect:null,zoomResetBtn:null}}}class L1{constructor(){return{width:0,width2:0,height:0,height2:0,margin:{top:0,bottom:0,left:0,right:0},margin2:{top:0,bottom:0,left:0,right:0},margin3:{top:0,bottom:0,left:0,right:0},arcWidth:0,arcHeight:0,xAxisHeight:0,hasAxis:!1,hasFunnel:!1,hasRadar:!1,hasTreemap:!1,isCanvasMode:!1,canvasShape:null,canvasFocusKey:null,canvasSubchartBrushDragging:!1,canvasSubchartBrushMode:null,canvasSubchartBrushStart:null,canvasSubchartBrushOrigin:null,canvasSubchartBrushMoved:!1,canvasFlowFrame:null,canvasFlowFinish:null,canvasFocusMainRedraw:!1,cssRule:{},loading:void 0,domain:void 0,subchartSourceTypes:void 0,current:{domain:void 0,width:0,height:0,dataMax:0,maxTickSize:{x:{width:0,height:0,ticks:[],clipPath:0,domain:""},y:{width:0,height:0,domain:""},y2:{width:0,height:0,domain:""}},types:[],needle:void 0,zoomDomain:null},isLegendRight:!1,isLegendInset:!1,isLegendTop:!1,isLegendLeft:!1,legendStep:0,legendItemWidth:0,legendItemHeight:0,legendHasRendered:!1,canvasInlineStyle:{minHeight:""},canvasSelection:new Set,canvasSelectionDragStart:null,canvasSelectionDragIncluded:new Set,canvasSelectionDragging:!1,canvasSelectionDragMoved:!1,canvasSelectionDragMoveHandler:null,canvasSelectionDragEndHandler:null,eventReceiver:{currentIdx:-1,rect:{},data:[],coords:[]},axis:{x:{padding:{left:0,right:0},tickCount:0}},rotatedPadding:{left:30,right:0,top:5},withoutFadeIn:{},inputType:"",datetimeId:"",clip:{id:"",idXAxis:"",idYAxis:"",idXAxisTickTexts:"",idGrid:"",idSubchart:"",path:"",pathXAxis:"",pathYAxis:"",pathXAxisTickTexts:"",pathGrid:""},event:null,dragStart:null,dragging:!1,flowing:!1,cancelClick:!1,mouseover:!1,rendered:!1,transiting:!1,redrawing:!1,resizing:!1,resizePreview:!1,resizeRedrawTime:0,resizeLiveScale:null,toggling:!1,zooming:!1,hasNegativeValue:!1,hasPositiveValue:!0,orgAreaOpacity:"0.2",orgConfig:{},hiddenTargetIds:new Set,hiddenLegendIds:new Set,focusedTargetIds:new Set,defocusedTargetIds:new Set,radius:0,innerRadius:0,outerRadius:void 0,innerRadiusRatio:0,gaugeArcWidth:0,radiusExpanded:0,xgridAttr:{x1:null,x2:null,y1:null,y2:null},pendingRaf:null,rafBatchQueue:[],dirty:{data:!1,visibility:!1,size:!1},redrawGeneration:0,dataGeneration:0,_targetsToShow:null,_cachedDrawShape:null,_canvasVisibleRangeCache:null,_canvasXDataTickCache:null,_canvasXTickValuesCache:null,_eventRectFingerprint:null,_lastTooltipMouse:null,_gridFocusEl:null,generateClassCache:new Map}}}const Ah={element:M1,state:L1};class D1{constructor(){Object.keys(Ah).forEach(e=>{this[e]=new Ah[e]})}getStore(e){return this[e]}}var F1=Object.defineProperty,N1=(t,e,n)=>e in t?F1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$1=(t,e,n)=>N1(t,typeof e!="symbol"?e+"":e,n);const Oe={bubbleBaseLength:"$baseLength",bubbleMaxValue:"$bubbleMaxValue",colorPattern:"__colorPattern__",dataMinMax:"$dataMinMax",dataTotalSum:"$dataTotalSum",dataTotalPerIndex:"$totalPerIndex",visibleTotalPerIndex:"$visibleTotalPerIndex",domainMinMax:"$domainMinMax",filteredTargets:"$filteredTargets",svgLeft:"$svgLeft",valuesByX:"$valuesByX",legendItemTextBox:"legendItemTextBox",legendItemMap:"$legendItemMap",radarPoints:"$radarPoints",radarTextWidth:"$radarTextWidth",setOverOut:"setOverOut",callOverOutForTouch:"callOverOutForTouch",textRect:"textRect",shapeOffset:"$shapeOffset",maxTickSize:"$maxTickSize",maxDataCountTarget:"$maxDataCountTarget",valuesXIndexMap:"$valuesXIndexMap"};class B1{constructor(){$1(this,"cache",new Map)}add(e,n,r=!1){const i=r?this.cloneTarget(n):n;return this.cache.set(e,i),i}remove(e){const n=je(e)?[e]:e;for(let r=0;r<n.length;r++)this.cache.delete(n[r])}get(e,n=!1){if(n&&Array.isArray(e)){const r=[];for(let i=0,s;s=e[i];i++)this.cache.has(s)&&r.push(this.cache.get(s));return r}else return this.cache.has(e)?this.cache.get(e):null}has(e){return this.cache.has(e)}getKeys(){return Array.from(this.cache.keys())}reset(e,n){e?this.cache.clear():this.cache.forEach((r,i)=>{/^\$/.test(i)&&(n!=null&&n.some(s=>i.startsWith(s))||this.cache.delete(i))})}cloneTarget(e){return{id:e.id,id_org:e.id_org,values:e.values.map(n=>({x:n.x,value:n.value,id:n.id}))}}}const Eh="https://github.com/naver/billboard.js/blob/master/MODULE_IMPORTS.md";function z1(t){const e=t,{config:n}=e;let r="";if(lr(n.data_type||n.data_types)&&!e[dn.LINE])r="line";else for(const i in dn){const s=qt[i];if(e.hasType(s)&&!e[dn[i]]){r=s;break}}r&&Ch(`Please, make sure if %c${Gy(r)}`,"module has been imported and specified correctly.",Eh)}function Iw(t){const e=Fs[t];e&&Ch(`Please, make sure if %c${e}`,"module has been imported and specified correctly.",Eh)}function Ch(t,e,n){var r;const i="[billboard.js]";if((r=se.console)==null?void 0:r.error){const o=e?["background:red;color:white;display:block;font-size:15px",e]:[];console.error(`\u274C ${i} ${t}`,"background:red;color:white;display:block;font-size:15px",...o),n&&console.info("%c\u2139\uFE0F","font-size:15px",n)}throw Error(`${i} ${t.replace(/\%c([a-z-]+)/i,"'$1' ")} ${e!=null?e:""}`)}function U1(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ur(t,e){if(t=U1(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}const k1=/\s?(bb-)/g,G1=/\.+/g;function X1(t){return t.replace(k1,".$1").replace(G1,".")}function Ih(t,e,n=!1){const r=s=>s[t?"getBoundingClientRect":"getBBox"](),i=t?"rectClient":"rectBBox";return n?r(e):!(i in e)||e.hasAttribute("width")&&e[i].width!==+(e.getAttribute("width")||0)?e[i]=r(e):e[i]}function ci(t,e,n=[-1,1],r=!1){if(!(!t||!je(e)))if(e.indexOf(`
44
+ `)===-1)t.text(e);else{const i=[t.text(),e].map(s=>s.replace(/[\s\n]/g,""));if(i[0]!==i[1]){const s=e.split(`
45
+ `),o=r?s.length-1:1;t.html(""),s.forEach((l,c)=>{t.append("tspan").attr("x",0).attr("dy",`${c===0?n[0]*o:n[1]}em`).text(l)})}}}function Rh(t){const{x:e,y:n,width:r,height:i}=ha(t,!0);return[{x:e,y:n+i},{x:e,y:n},{x:e+r,y:n},{x:e+r,y:n+i}]}function wh(t){const{width:e,height:n}=ln(t),r=Rh(t),i=r[0].x,s=Math.min(r[0].y,r[1].y);return{x:i,y:s,width:e,height:n}}function Jn(t,e){var n;const r=t&&((n=t.touches||t.sourceEvent&&t.sourceEvent.touches)==null?void 0:n[0]);let i=[0,0];try{i=ur(r||t,e)}catch(s){}return i.map(s=>isNaN(s)?0:s)}function ln(t,e=!1){return Ih(!0,t,e)}function ha(t,e=!1){return Ih(!1,t,e)}function W1(t,e,n){const{rootSelector:r="",sheet:i}=t,s=`${r} ${X1(e)} {${n.join(";")}}`;return i[i.insertRule?"insertRule":"addRule"](s,i.cssRules.length)}function V1(t){let e=[];return t.forEach(n=>{var r;try{n.cssRules&&n.cssRules.length&&(e=e.concat(Oa(n.cssRules)))}catch(i){(r=se.console)==null||r.warn(`Error while reading rules from ${n.href}: ${String(i)}`)}}),e}function Oh(t){var e,n,r,i,s,o;return{x:((n=(e=se.pageXOffset)!=null?e:se.scrollX)!=null?n:0)+((r=t.scrollLeft)!=null?r:0),y:((s=(i=se.pageYOffset)!=null?i:se.scrollY)!=null?s:0)+((o=t.scrollTop)!=null?o:0)}}function So(t,e=0,n=0,r=!0){const i=new DOMPoint(e,n),s=t.getScreenCTM(),o=i.matrixTransform(r?s==null?void 0:s.inverse():s);if(r===!1){const l=ln(t);o.x-=l.x,o.y-=l.y}return o}function Cc(t){const e=t?t.transform:null,n=e&&e.baseVal;return n&&n.numberOfItems?n.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function Ic(t,e){var n;const r=(n=t==null?void 0:t.getAttribute)==null?void 0:n.call(t,e);if(r)return parseFloat(r);const i=Cc(t);return e==="x"?i.e:i.f}function Rc(t){const e=t.attr("viewBox");return e?e.trim().split(/[\s,]+/).length===4:!1}function j1(t,e,n=!1){const r=!!t.node;let i=!1;for(const[s,o]of Object.entries(e))if(i=r?t.style(s)===o:t.style[s]===o,n?!i:i)break;return i}function os(){var t,e;return((t=Ye)==null?void 0:t.hidden)===!1||((e=Ye)==null?void 0:e.visibilityState)==="visible"}function H1(t,e){const{DocumentTouch:n,matchMedia:r,navigator:i}=se,s=r==null?void 0:r("(pointer:coarse)").matches;let o=!1;if(e)if(i&&"maxTouchPoints"in i)o=i.maxTouchPoints>0;else if("ontouchmove"in se||n&&Ye instanceof n)o=!0;else if(s)o=!0;else{const c=i.userAgent;o=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(c)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(c)}return t&&!s&&(r==null?void 0:r("(pointer:fine)").matches)&&"mouse"||o&&"touch"||"mouse"}function Ph(t,e){t.pendingRaf!==null?(se.cancelAnimationFrame(t.pendingRaf),t.pendingRaf=se.requestAnimationFrame(()=>{t.pendingRaf=null,e()})):(t.pendingRaf=se.requestAnimationFrame(()=>{t.pendingRaf=null}),e())}const wc={mouse:(()=>{const t=()=>({bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});try{return new MouseEvent("t"),(e,n,r=t())=>{e.dispatchEvent(new MouseEvent(n,r))}}catch(e){return(n,r,i=t())=>{const s=Ye.createEvent("MouseEvent");s.initMouseEvent(r,i.bubbles,i.cancelable,se,0,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),n.dispatchEvent(s)}}})(),touch:(t,e,n)=>{const r=new Touch(Xr({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}},{setTimeout:Y1,clearTimeout:K1}=se;function Z1(t,e){const n=[];let r,i=null;const s=function(){s.clear(),e&&i===null&&(i=$f(()=>{i=null,e()})),t===!1?r=Bf(()=>{r=null,n.forEach(o=>o())},{timeout:200}):r=Y1(()=>{r=null,n.forEach(o=>o())},ae(t)?t:200)};return s.clear=()=>{r&&((t===!1?by:K1)(r),r=null)},s.clearLive=()=>{i!==null&&(Ty(i),i=null)},s.add=o=>n.push(o),s.remove=o=>{const l=n.indexOf(o);l!==-1&&n.splice(l,1)},s}function Mh(){let t=[];const e=function(n,r){function i(){var s;let o=0;for(let l=0,c;c=t[l];l++){if(c===!0||(s=c.empty)!=null&&s.call(c)){o++;continue}if(os()===!1){o=t.length;break}try{c.transition()}catch(u){o++}}return o===t.length}Hf(()=>{r==null||r()},i)};return e.add=function(n){qe(n)?t=t.concat(n):t.push(n)},e}const Lr={},Ao=new Set,Ba=new Map,J1=5e3,Lh=3;let Q1=0;function _1(){try{return"var bbWorker=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){let t=[];return e.forEach(function(e,n){let r=e[0];e.forEach(function(e,i){if(i>0){if(t[i-1]===void 0&&(t[i-1]={}),e===void 0)throw Error(`Source data is missing a component at (${n}, ${i})!`);t[i-1][r]=e}})}),t}function n(e){let t=e[0],n=[];return e.forEach(function(e,r){if(r>0){let i={};e.forEach(function(e,n){if(e===void 0)throw Error(`Source data is missing a component at (${r}, ${n})!`);i[t[n]]=e}),n.push(i)}}),n}function r(e,r){let i=[],a,o;if(Array.isArray(e)){let t=function(e,t){if(e[t]!==void 0)return e[t];let n=t.replace(/\\[(\\w+)\\]/g,`.$1`).replace(/^\\./,``).split(`.`),r=e;return n.some(function(e){return!(r=r&&typeof r==`object`&&e in r?r[e]:void 0)}),r};a=r.x?r.value.concat(r.x):r.value,i.push(a),e.forEach(function(e){let n=a.map(function(n){let r=t(e,n);return r===void 0&&(r=null),r});i.push(n)}),o=n(i)}else Object.keys(e).forEach(function(t){let n=[].concat(e[t]);n.unshift?.(t),i.push(n)}),o=t(i);return o}let i={columns:t,json:r,rows:n},a=self;function o({data:e}){let{args:t,id:n,op:r}=e;try{let e=i[r];if(!e)throw Error(`Unknown worker op: ${r}`);a.postMessage({id:n,result:e(...t)})}catch(e){a.postMessage({id:n,error:e&&(e.message||e.name)||String(e)})}}return typeof window>`u`&&(a.onmessage=o),e.handleMessage=o,e.ops=i,e})({});"}catch(t){return""}}function Oc(){const{Blob:t,Worker:e,URL:n}=se;return e&&t&&(n!=null&&n.createObjectURL)&&(n!=null&&n.revokeObjectURL)?{Blob:t,Worker:e,URL:n}:null}function Dh(){return se.Worker||null}function q1(t){var e,n;return typeof t=="number"?{timeout:t,workerUrl:""}:{timeout:(e=t==null?void 0:t.timeout)!=null?e:J1,workerUrl:(n=t==null?void 0:t.workerUrl)!=null?n:""}}function Fh(t,e=!1){var n,r;const i=Lr[t];e&&Ao.add(t),i&&((n=i.worker)==null||n.terminate(),i.revoke&&((r=Oc())==null||r.URL.revokeObjectURL(i.src)),delete Lr[t]);for(const s of Ba.keys())s.startsWith(`${t}:`)&&Ba.delete(s)}function tb(t,e){if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch(n){return!0}}function eb(t){const[e,...n]=t;return Array.isArray(e)?[e.slice(0,Lh).map(r=>Array.isArray(r)?r.slice(0,Lh+1):r),...n]:t}function Nh(t,e,n,r){const i=++Q1;let s=!1,o;const l=new Promise((c,u)=>{const f=(S,E)=>{s||(s=!0,o(),S(E))},d=function(S){var E;((E=S.data)==null?void 0:E.id)===i&&(S.data.error?f(u,new Error(S.data.error)):f(c,S.data.result))},h=function(){f(u,new Error("worker error"))},m=setTimeout(()=>f(u,new Error("worker timeout")),r);o=()=>{clearTimeout(m),t.removeEventListener("message",d),t.removeEventListener("error",h)},t.addEventListener("message",d),t.addEventListener("error",h)});try{t.postMessage({args:n,id:i,op:e})}catch(c){throw s=!0,o(),c}return l}function nb(t,e,n,r,i,s){const o=eb(i),l=Nh(t,n,o,s).then(c=>tb(c,r(...o)),()=>!1).then(c=>(c?Ba.set(e,!0):Ba.delete(e),c));return Ba.set(e,l),l}function rb(t,e=""){const n=!!Dh(),r=e?null:Oc(),i=e?"":_1(),s=e||"blob";if(!n||!e&&(!r||!i)||Ao.has(s))return null;if(!(s in Lr))try{if(e)Lr[s]={revoke:!1,src:e,worker:null};else if(r){const o=new r.Blob([i],{type:"text/javascript"});Lr[s]={revoke:!0,src:r.URL.createObjectURL(o),worker:null}}}catch(o){return null}return{key:s,src:Lr[s].src}}function ab(t,e){const n=Lr[t],r=Dh();if(!n||!r||Ao.has(t))return null;if(!n.worker)try{n.worker=new r(e)}catch(i){return Fh(t,!0),null}return n.worker}function Pc(t=!0,e,n,r,i){const{timeout:s,workerUrl:o}=q1(i),l=function(...u){const f=n(...u);r(f)};let c=l;if(t){const u=rb(e,o),f=u?ab(u.key,u.src):null;if(f&&u){const{key:d}=u;c=function(...h){var m;const S=()=>{Fh(d,!0),c=l,l(...h)};try{const E=`${d}:${e}`,C=(m=Ba.get(E))!=null?m:nb(f,E,e,n,h,s);Nh(f,e,h,s).then(w=>{C===!0?r(w):C.then($=>$?r(w):S())},S)}catch(E){S()}}}}return c}function ib(){const t=Oc();for(const e in Lr){const n=Lr[e];n.worker&&n.worker.terminate(),n.src&&n.revoke&&(t==null||t.URL.revokeObjectURL(n.src)),delete Lr[e]}Ao.clear(),Ba.clear()}const Mc=34,ls=10,Lc=13;function $h(t){const e=t.charCodeAt(0);function n(i,s){const o=[];let l=i.length,c=0,u=0,f=l<=0,d=!1;i.charCodeAt(0)===65279&&c++,i.charCodeAt(l-1)===ls&&--l,i.charCodeAt(l-1)===Lc&&--l;function h(){if(f)return null;if(d)return d=!1,null;const S=c;let E,C;if(i.charCodeAt(S)===Mc){for(;++c<l;)if(i.charCodeAt(c)===Mc){if(i.charCodeAt(c+1)!==Mc)break;c++}return(C=c++)>=l?f=!0:(E=i.charCodeAt(c++))===ls?d=!0:E===Lc&&(d=!0,i.charCodeAt(c)===ls&&++c),i.slice(S+1,C).replace(/""/g,'"')}for(;c<l;){if((E=i.charCodeAt(C=c++))===ls)d=!0;else if(E===Lc)d=!0,i.charCodeAt(c)===ls&&++c;else if(E!==e)continue;return i.slice(S,C)}return f=!0,i.slice(S,l)}let m;for(;(m=h())!==null;){const S=[];for(;m!==null;)S.push(m),m=h();if(s){const E=s(S,u++);E!=null&&o.push(E)}else o.push(S)}return o}function r(i,s){let o=[];return n(i,(l,c)=>{var u;if(c===0)return o=l,null;const f={};for(let d=0;d<o.length;d++)f[o[d]]=(u=l[d])!=null?u:"";return s?s(f,c-1,o):f})}return{parse:r,parseRows:n}}const Bh=$h(","),zh=$h(" "),sb=Bh.parse,ob=Bh.parseRows,lb=zh.parse,cb=zh.parseRows;function Uh(t){const e=[];return t.forEach(function(n,r){const i=n[0];n.forEach(function(s,o){if(o>0){if(typeof e[o-1]=="undefined"&&(e[o-1]={}),typeof s=="undefined")throw new Error(`Source data is missing a component at (${r}, ${o})!`);e[o-1][i]=s}})}),e}function kh(t){const e=t[0],n=[];return t.forEach(function(r,i){if(i>0){const s={};r.forEach(function(o,l){if(typeof o=="undefined")throw new Error(`Source data is missing a component at (${i}, ${l})!`);s[e[l]]=o}),n.push(s)}}),n}function Gh(t,e){const n=[];let r,i;if(Array.isArray(t)){const s=function(o,l){if(o[l]!==void 0)return o[l];const u=l.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");let f=o;return u.some(function(d){return!(f=f&&typeof f=="object"&&d in f?f[d]:void 0)}),f};e.x?r=e.value.concat(e.x):r=e.value,n.push(r),t.forEach(function(o){const l=r.map(function(c){let u=s(o,c);return typeof u=="undefined"&&(u=null),u});n.push(l)}),i=kh(n)}else Object.keys(t).forEach(function(s){var o;const l=[].concat(t[s]);(o=l.unshift)==null||o.call(l,s),n.push(l)}),i=Uh(n);return i}function ub(t,e="csv",n,r,i){const s=new XMLHttpRequest,o={csv:fb,tsv:db,json:Gh};s.open("GET",t),n&&Object.keys(n).forEach(function(l){s.setRequestHeader(l,n[l])}),s.onreadystatechange=function(){if(s.readyState===4)if(s.status===200){const l=s.responseText;l&&i.call(this,o[e](e==="json"?JSON.parse(l):l,r))}else throw new Error(`${t}: Something went wrong loading!`)},s.send()}function Xh(t,e){const n=t.rows(e);let r;return n.length===1?(r=[{}],n[0].forEach(i=>{r[0][i]=null})):r=t.parse(e),r}function fb(t){return Xh({rows:ob,parse:sb},t)}function db(t){return Xh({rows:cb,parse:lb},t)}const hb=5e3;function vb(t){var e,n;const r=t[0];if(qe(r)){let i=0;for(let s=0,o=t.length;s<o;s++)i+=(n=(e=t[s])==null?void 0:e.length)!=null?n:0;return i}return t.length*Object.keys(r!=null?r:{}).length}function Wh(t,e){const n=t||(e==null?void 0:e.data_keys);return n!=null&&n.x&&(e.data_x=n.x),n}function gb(t,e,n){const r=this,{config:i}=r;let s;t.forEach(o=>{const l=r.getXKey(o);if(n.customX||n.timeSeries?n.xs.indexOf(l)>=0?s=(n.appendXs&&r.data.xs[o]||[]).concat(e.map((c,u)=>{const f=c[l];return Ge(f)?r.generateTargetX(f,o,u):!1}).filter(c=>c!==!1)):i.data_x?s=this.getOtherTargetXs():vn(i.data_xs)&&(s=r.getXValuesOfXKey(l,r.data.targets)):s=e.map((c,u)=>u),s)r.data.xs[o]=s;else throw new Error(`x is not defined for id = "${o}".`)})}var pb={convertData(t,e){const{config:n}=this,r=o=>!(o!=null&&o.length)||lr(o[0])?!1:n.boost_useWorker==="auto"?vb(o)>=hb:!!n.boost_useWorker,i=n.boost_workerUrl?{workerUrl:n.boost_workerUrl}:void 0;let s=t;if(t.bindto&&(s={},["url","mimeType","headers","keys","json","rows","columns"].forEach(o=>{const l=`data_${o}`;l in t&&(s[o]=t[l])})),s.url&&e)ub(s.url,s.mimeType,s.headers,Wh(s.keys,n),e);else if(s.json)Pc(r(s.json),"json",Gh,e,i)(s.json,Wh(s.keys,n));else if(s.rows)Pc(r(s.rows),"rows",kh,e,i)(s.rows);else if(s.columns)Pc(r(s.columns),"columns",Uh,e,i)(s.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets(t,e){const n=this,{axis:r,config:i,state:s}=n,o=i.data_type,l=Object.keys(t[0]||{}),{ids:c,xs:u}=l.length?l.reduce((S,E)=>(n.isX.call(n,E)?S.xs.push(E):S.ids.push(E),S),{ids:[],xs:[]}):{ids:[],xs:[]},f={appendXs:e,xs:u,categorized:r==null?void 0:r.isCategorized(),timeSeries:r==null?void 0:r.isTimeSeries(),customX:r==null?void 0:r.isCustomX()};gb.bind(n)(c,t,f);const d=f.customX&&f.categorized&&i.axis_x_categories.length?new Map(i.axis_x_categories.map((S,E)=>[S,E])):null,h=i.data_idConverter.bind(n.api),m=c.map((S,E)=>{const C=h(S),w=n.getXKey(S),$=f.customX&&f.categorized,z=$&&E===0&&(()=>{const H=Yf(i.axis_x_categories);return t.every(_=>H.has(_[w]))})(),B=t.__append__,W=w===null&&B?n.api.data.values(S).length:0;return{id:C,id_org:S,values:t.map((H,_)=>{var q;const st=H[w];let it=H[S],ot;if(it=it!==null&&!isNaN(it)&&!He(it)?+it:qe(it)||He(it)?it:null,($||s.hasRadar)&&E===0&&!mn(st)){!z&&_===0&&!B&&(i.axis_x_categories=[],d&&d.clear());const ct=String(st);ot=(q=d==null?void 0:d.get(ct))!=null?q:-1,ot===-1&&(ot=i.axis_x_categories.length,i.axis_x_categories.push(st),d==null||d.set(ct,ot))}else ot=n.generateTargetX(st,S,W+_);return(mn(it)||n.data.xs[S].length<=_)&&(ot=void 0),{x:ot,value:it,id:C,index:-1}}).filter(H=>sn(H.x))}});if(m.forEach(S=>{var E;i.data_xSort&&(S.values=S.values.sort((C,w)=>{const $=C.x||C.x===0?C.x:1/0,z=w.x||w.x===0?w.x:1/0;return $-z})),S.values.forEach((C,w)=>C.index=w),(E=n.data.xs[S.id])==null||E.sort((C,w)=>C-w)}),s.hasNegativeValue=m.some(S=>S.values.some(E=>E.value!==null&&E.value<0)),s.hasPositiveValue=m.some(S=>S.values.some(E=>E.value!==null&&E.value>0)),o&&n.isValidChartType(o)){const S=n.mapToIds(m).filter(E=>!(E in i.data_types)||!n.isValidChartType(i.data_types[E]));n.setTargetType(S,o)}return m.forEach(S=>n.cache.add(S.id_org,S,!0)),m}};const mb={areaRange:{high:0,mid:1,low:2},candlestick:{open:0,high:1,low:2,close:3,volume:4}};function Vh(t){return qe(t)?t:[t]}var xb={isX(t){const e=this,{config:n}=e,r=n.data_x&&t===n.data_x,i=vn(n.data_xs)&&ky(n.data_xs,t);return r||i},isStackNormalized(){const{config:t}=this;return!!((t.data_stack_normalize===!0||Kn(t.data_stack_normalize))&&t.data_groups.length)},isStackNormalizedPerGroup(){var t;const{config:e}=this;return!!(Kn(e.data_stack_normalize)&&((t=e.data_stack_normalize)!=null&&t.perGroup)&&e.data_groups.length)},isGrouped(t){const e=this.config.data_groups;return t?e.some(n=>n.indexOf(t)>=0&&n.length>1):e.length>0},hasAxisGroupedData(t){const e=this,{axis:n}=e;return e.data.targets.filter(s=>n.getId(s.id)===t).map(s=>s.id).some(s=>e.isGrouped(s))},getXKey(t){const e=this,{config:n}=e;return n.data_x?n.data_x:vn(n.data_xs)?n.data_xs[t]:null},getXValuesOfXKey(t,e){const n=this,r=e&&vn(e)?n.mapToIds(e):[];let i;return r.forEach(s=>{n.getXKey(s)===t&&(i=n.data.xs[s])}),i},getIndexByX(t,e){const n=this;return e?e.indexOf(je(t)?t:+t):(n.filterByX(n.data.targets,t)[0]||{index:null}).index},getXValue(t,e){const n=this;return t in n.data.xs&&n.data.xs[t]&&Ge(n.data.xs[t][e])?n.data.xs[t][e]:e},getOtherTargetXs(){const t=this,e=Object.keys(t.data.xs);return e.length?t.data.xs[e[0]]:null},getOtherTargetX(t){const e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},addXs(t){const e=this,{config:n}=e;Object.keys(t).forEach(r=>{n.data_xs[r]=t[r]})},isMultipleX(){return!this.config.axis_x_forceAsSingle&&(vn(this.config.data_xs)||this.hasType("bubble")||this.hasType("scatter"))},addName(t){const e=this,{config:n}=e;let r;return t&&(r=n.data_names[t.id],t.name=r!==void 0?r:t.id),t},getAllValuesOnIndex(t,e=!1){const n=this;let r=n.filterTargetsToShow(n.data.targets).map(i=>n.addName(n.getValueOnIndex(i.values,t)));return e&&(r=r.filter(i=>i&&"value"in i&&Ge(i.value))),r},getValueOnIndex(t,e){var n;if(((n=t[e])==null?void 0:n.index)===e)return t[e];const r=t.filter(i=>i.index===e);return r.length?r[0]:null},updateTargetX(t,e){const n=this;t.forEach(r=>{r.values.forEach((i,s)=>{i.x=n.generateTargetX(e[s],r.id,s)}),n.data.xs[r.id]=e})},updateTargetXs(t,e){const n=this;t.forEach(r=>{e[r.id]&&n.updateTargetX([r],e[r.id])})},generateTargetX(t,e,n){const r=this,{axis:i}=r;let s=i!=null&&i.isCategorized()?n:t||n;if(i!=null&&i.isTimeSeries()){const o=Wn.bind(r);s=o(t||r.getXValue(e,n))}else i!=null&&i.isCustomX()&&!(i!=null&&i.isCategorized())&&(s=Ge(t)?+t:r.getXValue(e,n));return s},updateXs(t){t.length&&(this.axis.xs=t.map(e=>e.x))},getPrevX(t){const e=this.axis.xs[t-1];return sn(e)?e:null},getNextX(t){const e=this.axis.xs[t+1];return sn(e)?e:null},getBaseValue(t){const e=this,{hasAxis:n}=e.state;let{value:r}=t;return r&&n&&(e.isAreaRangeType(t)?r=e.getRangedData(t,"mid"):e.isBubbleZType(t)&&(r=e.getBubbleZData(r,"y"))),r},getMinMaxValue(t){const e=this.getBaseValue.bind(this);let n=1/0,r=-1/0;const i=t||this.data.targets.map(s=>s.values);for(let s=0;s<i.length;s++){const o=i[s];for(let l=0;l<o.length;l++){const c=e(o[l]);ae(c)&&(c<n&&(n=c),c>r&&(r=c))}}return{min:n,max:r}},getMinMaxData(){const t=this,e=Oe.dataMinMax;let n=t.cache.get(e);if(!n){const r=t.data.targets.map(u=>u.values),i=t.getMinMaxValue(r),s=[],o=[],{min:l,max:c}=i;r.forEach(u=>{const f=t.getFilteredDataByValue(u,l),d=t.getFilteredDataByValue(u,c);if(f.length)for(let h=0;h<f.length;h++)s.push(f[h]);if(d.length)for(let h=0;h<d.length;h++)o.push(d[h])}),t.cache.add(e,n={min:s,max:o})}return n},getTotalPerIndex(t){const e=this,{config:n}=e,r=t?`${Oe.dataTotalPerIndex}-${t}`:Oe.dataTotalPerIndex,i=e.cache.get(r);let s=(i==null?void 0:i.generation)===e.state.dataGeneration?i.value:null;if((e.config.data_groups.length||e.isStackNormalized())&&!s){s=[];let{targets:o}=e.data;if(e.isStackNormalizedPerGroup()&&t){const l=n.data_groups.find(c=>c.indexOf(t)>=0);if(l)o=o.filter(c=>l.indexOf(c.id)>=0);else return null}o.forEach(l=>{l.values.forEach((c,u)=>{s[u]||(s[u]=0),s[u]+=ae(c.value)?c.value:0})}),e.cache.add(r,{generation:e.state.dataGeneration,value:s})}return s},getVisibleTotalPerIndex(t){const e=this,{api:n,config:r,state:i,cache:s}=e;let o=s.get(Oe.visibleTotalPerIndex);if((!o||o.generation!==i.dataGeneration)&&(o=s.add(Oe.visibleTotalPerIndex,{generation:i.dataGeneration,values:new Map})),o.values.has(t))return o.values.get(t);const l=n.data.values.bind(n),{hiddenTargetIds:c}=i;let u=e.getTotalPerIndex(t);if(u===null)return o.values.set(t,u),u;if(c.size){let f=[...c];if(t){const d=r.data_groups.find(h=>h.indexOf(t)>=0);d&&(f=f.filter(h=>d.indexOf(h)>=0))}if(f.length){let d=l(f,!1);d.length&&(d=d.reduce((h,m)=>h.map((S,E)=>(ae(S)?S:0)+m[E])),u=u.map((h,m)=>h-d[m]))}}return o.values.set(t,u),u},getTotalDataSum(t){const e=this,n=Oe.dataTotalSum;let r=e.cache.get(n);return ae(r)||(r=e.data.targets.reduce((i,s)=>i+s.values.reduce((o,l)=>{var c;return o+((c=l.value)!=null?c:0)},0),0),e.cache.add(n,r)),t&&(r-=e.getHiddenTotalDataSum()),r},getHiddenTotalDataSum(){const t=this,{api:e,state:{hiddenTargetIds:n}}=t;let r=0;return n.size&&(r=e.data.values.bind(e)([...n]).reduce((i,s)=>i+s,0)),r},getFilteredDataByValue(t,e){return t.filter(n=>this.getBaseValue(n)===e)},getMaxDataCount(){const{targets:t}=this.data;let e=0;for(let n=0;n<t.length;n++)t[n].values.length>e&&(e=t[n].values.length);return e},getMaxDataCountTarget(){const t=this,{cache:e,state:n}=t,r=e.get(Oe.maxDataCountTarget);if(r&&r.generation===n.dataGeneration)return r.value;let i=t.filterTargetsToShow()||[];const s=i.length,o=t.config.axis_x_inverted;if(s>1){const l=[];for(let c=0;c<i.length;c++){const u=i[c].values;for(let f=0;f<u.length;f++)l.push(u[f].x)}i=l,i=ti(zl(i)).map((c,u,f)=>({x:c,index:o?f.length-u-1:u}))}else s&&(i=i[0].values.concat());return e.add(Oe.maxDataCountTarget,{value:i,generation:n.dataGeneration}),i},mapToIds(t){return t.map(e=>e.id)},mapToTargetIds(t){const e=this;return t?qe(t)?t.concat():[t]:e.mapToIds(e.data.targets)},hasTarget(t,e){const n=this.mapToIds(t);for(let r=0,i;i=n[r];r++)if(i===e)return!0;return!1},isTargetToShow(t){return!this.state.hiddenTargetIds.has(t)},isLegendToShow(t){return!this.state.hiddenLegendIds.has(t)},getTargetsToShow(){var t;const{state:e}=this;return(t=e._targetsToShow)!=null?t:this.filterTargetsToShow()},filterTargetsToShow(t){const e=this;if(!t){const{cache:n,data:r,state:i}=e,s=Oe.filteredTargets,o=n.get(s);if(o&&o.generation===i.dataGeneration)return o.value;const l=r.targets.filter(c=>e.isTargetToShow(c.id));return n.add(s,{value:l,generation:i.dataGeneration}),l}return t.filter(n=>e.isTargetToShow(n.id))},mapTargetsToUniqueXs(t){const e=this,{axis:n}=e;let r=[];return t!=null&&t.length&&(r=zl(Wy(t.map(i=>i.values.map(s=>+s.x)))),r=n!=null&&n.isTimeSeries()?r.map(i=>new Date(+i)):r.map(Number)),ti(r)},addTargetIds(t,e){const{state:n}=this;Vh(e).forEach(r=>n[t].add(r))},removeTargetIds(t,e){const{state:n}=this;Vh(e).forEach(r=>n[t].delete(r))},addHiddenTargetIds(t){this.addTargetIds("hiddenTargetIds",t),this.cache.remove(Oe.visibleTotalPerIndex)},removeHiddenTargetIds(t){this.removeTargetIds("hiddenTargetIds",t),this.cache.remove(Oe.visibleTotalPerIndex)},addHiddenLegendIds(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed(t){const e=this,{hasAxis:n}=e.state,r={},i=e.isMultipleX();let s=null;if(i){const o=e.cache.get(Oe.valuesXIndexMap);if(o&&o.generation===e.state.dataGeneration)s=o.value;else{const l=e.mapTargetsToUniqueXs(e.data.targets).map(c=>je(c)?c:+c);s=new Map(l.map((c,u)=>[c,u])),e.cache.add(Oe.valuesXIndexMap,{value:s,generation:e.state.dataGeneration})}}return t.forEach(o=>{const l=[];o.values.filter(({value:c})=>Ge(c)||c===null).forEach(c=>{let{value:u}=c;if(u!==null&&e.isCandlestickType(c)&&(u=qe(u)?u.slice(0,4):[u.open,u.high,u.low,u.close]),qe(u))l.push(...u);else if(He(u)&&"high"in u)l.push(...Object.values(u));else if(e.isBubbleZType(c))l.push(n&&e.getBubbleZData(u,"y"));else if(i&&s){const f=je(c.x)?c.x:+c.x,d=s.get(f);d!==void 0&&(l[d]=u)}else l.push(u)}),r[o.id]=l}),r},hasMultiTargets(){return this.filterTargetsToShow().length>1},orderTargets(t){const e=this,n=t.slice(),r=e.getSortCompareFn();return r&&n.sort(r),n},getSortCompareFn(t=!1){const e=this,{config:n}=e,r=n.data_order,i=/asc/i.test(r),s=/desc/i.test(r);let o;if(i||s){const l=(u,f)=>u+Math.abs(f.value),c=u=>ae(u)?u:"values"in u?u.values.reduce(l,0):u.value;o=(u,f)=>{const d=c(u),h=c(f);return t?i?d-h:h-d:i?h-d:d-h}}else ie(r)&&(o=r.bind(e.api));return o||null},filterByX(t,e){return this.getValuesByX(t).get(this.getXCacheKey(e))||[]},filterNullish(t){const e=n=>Ge(n.value);return t&&t.filter(n=>"value"in n?e(n):n.values.some(e))},filterRemoveNull(t){return t.filter(e=>Ge(this.getBaseValue(e)))},filterByXDomain(t,e){return t.map(n=>({id:n.id,id_org:n.id_org,values:n.values.filter(r=>e[0]<=r.x&&r.x<=e[1])}))},hasDataLabel(){const t=this.config.data_labels;return Ra(t)&&t||Kn(t)&&vn(t)},hasNullDataValue(t){return t.some(({value:e})=>e===null)},getDataIndexFromEvent(t){const e=this,{$el:n,config:r,state:{hasRadar:i,inputType:s,eventReceiver:{coords:o,rect:l}}}=e;let c;if(i){let u=t.target;/tspan/i.test(u.tagName)&&(u=u.parentNode);const f=Yt(u).datum();c=f&&Object.keys(f).length===1?f.index:void 0}else{const u=r.axis_rotated,f=Oh(n.chart.node()),d=s==="touch"&&t.changedTouches?t.changedTouches[0]:t;let h=u?d.clientY+f.y:d.clientX+f.x;if(Rc(n.svg)){const m=[h,0];u&&m.reverse(),h=So(n.eventRect.node(),...m)[u?"y":"x"]}else h-=u?l.top:l.left;c=Ul(o,h,0,o.length-1,u)}return c},getDataLabelLength(t,e,n){var r,i,s;const o=this,l=1.3,c=[t,e].map(u=>o.dataLabelFormat()(u));if(o.config.render_mode==="canvas"&&!o.$el.svg){const u=(i=(r=o.$el.chart)==null?void 0:r.node)==null?void 0:i.call(r),f=u==null?void 0:u.ownerDocument,d=f==null?void 0:f.createElementNS("http://www.w3.org/2000/svg","svg");if(u&&d){const h=c.map(S=>{const E=f.createElementNS("http://www.w3.org/2000/svg","text");return E.textContent=S,d.appendChild(E),E});d.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",u.appendChild(d);const m=h.map(S=>S.getBoundingClientRect()[n]*l);return d.remove(),m}}return((s=o.getTextRect(c))==null?void 0:s.map(u=>u[n]*l))||[0,0]},isNoneArc(t){return this.hasTarget(this.data.targets,t.id)},isArc(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues(t,e){const n=t[e].x,r=[];let i;for(i=e-1;i>=0&&n===t[i].x;i--)r.push(t[i]);for(i=e;i<t.length&&n===t[i].x;i++)r.push(t[i]);return r},getXCacheKey(t){return je(t)?t:+t},getValuesByX(t){const e=this,{cache:n,state:r}=e,i=t.map(l=>{const{values:c}=l,u=c[0],f=c[c.length-1];return`${l.id}:${c.length}:${u?e.getXCacheKey(u.x):""}:${f?e.getXCacheKey(f.x):""}`}).join("|"),s=n.get(Oe.valuesByX);if(s&&s.generation===r.dataGeneration&&s.targetKey===i)return s.value;const o=new Map;for(let l=0;l<t.length;l++){const c=t[l].values;for(let u=0;u<c.length;u++){const f=c[u],d=e.getXCacheKey(f.x),h=o.get(d);h?h.push(f):o.set(d,[f])}}return n.add(Oe.valuesByX,{generation:r.dataGeneration,targetKey:i,value:o}),o},getClosestCandidates(t,e,n=!0){const r=this,{config:i,scale:s}=r,o=t.length,l=t[0];if(!n||o<200||!l||!i.data_xSort)return t;const c=r.isBarType(l.id),u=r.isCandlestickType(l.id),f=i.point_sensitivity;if(!(c||u)&&!ae(f))return t;const d=s.zoom||s.x,h=e[+i.axis_rotated],m=d(t[0].x)<=d(t[o-1].x);let S=0,E=o-1;for(;S<E;){const B=S+E>>1,W=d(t[B].x);(m?W<h:W>h)?S=B+1:E=B}const C=[],w=new Set,$=B=>{B>=0&&B<o&&!w.has(B)&&(w.add(B),C.push(t[B]))},z=B=>{if(B<0||B>=o)return;const W=r.getXCacheKey(t[B].x);let H=B;for(;H>=0&&r.getXCacheKey(t[H].x)===W;)$(H--);for(H=B+1;H<o&&r.getXCacheKey(t[H].x)===W;)$(H++)};if(c||u)for(let B=S-2;B<=S+2;B++)z(B);else{const B=f,W=(H,_)=>{for(let q=H;q>=0&&q<o;q+=_){const st=t[q];if(Math.abs(d(st.x)-h)>B)break;$(q)}};W(S,1),W(S-1,-1)}return C},findClosestFromTargets(t,e){const n=this,r=[];for(let i=0;i<t.length;i++){const s=n.findClosest(t[i].values,e);s&&r.push(s)}return n.findClosest(r,e,!1)},findClosest(t,e,n=!0){const r=this,{$el:{main:i}}=r,s=r.getClosestCandidates(t,e,n);let o,l;for(let c=0;c<s.length;c++){const u=s[c];if(!u||!Ge(u.value))continue;const f=r.isBarType(u.id),d=r.isCandlestickType(u.id);if(f||d){const h=f?`.${rr.chartBar}.${ze.target}${r.getTargetSelectorSuffix(u.id)} .${rr.bar}-${u.index}`:`.${Kr.chartCandlestick}.${ze.target}${r.getTargetSelectorSuffix(u.id)} .${Kr.candlestick}-${u.index} path`;!l&&r.isWithinBar(i.select(h).node())&&(l=u)}else{const h=r.dist(u,e),m=r.getPointSensitivity(u);h<m&&(o===void 0||h<o)&&(o=h,l=u)}}return l},dist(t,e){const n=this,{config:{axis_rotated:r},scale:i}=n,s=+r,o=+!r,l=n.circleY(t,t.index),u=(i.zoom||i.x)(t.x)-e[s],f=l-e[o];return Math.sqrt(u*u+f*f)},convertValuesToStep(t){const e=this,{axis:n,config:r}=e,i=r.line_step_type,s=n?n.isCategorized():!1,o=qe(t)?t.concat():[t];if(!(s||/step\-(after|before)/.test(i)))return t;if(o.length){const l=o[0],c=o[o.length-1],{id:u}=l;let{x:f}=l;o.unshift({x:--f,value:l.value,id:u}),s&&i==="step-after"&&o.unshift({x:f-1,value:l.value,id:u}),f=c.x,o.push({x:++f,value:c.value,id:u}),s&&i==="step-before"&&o.push({x:f+1,value:c.value,id:u})}return o},convertValuesToRange(t){const e=qe(t)?t.concat():[t],n=[];return e.forEach(r=>{const{x:i,id:s}=r;n.push({x:i,id:s,value:r.value[0]}),n.push({x:i,id:s,value:r.value[2]})}),n},updateDataAttributes(t,e){const n=this,{config:r}=n,i=r[`data_${t}`];return mn(e)||(Object.keys(e).forEach(s=>{i[s]=e[s]}),n.redraw({withLegend:!0})),i},getRangedData(t,e="",n="areaRange"){var r,i;const s=t==null?void 0:t.value;if(qe(s)){if(n==="bar")return s.reduce((o,l)=>l-o);{const o=(i=(r=mb[n])==null?void 0:r[e])!=null?i:-1;return o>=0?s[o]:void 0}}else if(s&&e)return s[e];return s},setRatioForGroupedData(t){const e=this,{config:n}=e;if(n.data_groups.length&&t.some(r=>e.isGrouped(r.id))){const r=i=>e.getRatio("index",i,!0);t.forEach(i=>{"values"in i?i.values.forEach(r):r(i)})}},getRatio(t,e,n=!1){const r=this,{config:i,state:s}=r,o=r.api;let l=0;if(e&&o.data.shown().length)if(l=e.ratio||e.value,t==="arc")if(r.pie.padAngle()())l=e.value/r.getTotalDataSum(!0);else{const c=i.gauge_fullCircle?r.getArcLength():r.getStartingAngle()*-2,u=r.hasType("gauge")?c:Math.PI*2;l=(e.endAngle-e.startAngle)/u}else if(t==="index"){const c=r.getVisibleTotalPerIndex(r.isStackNormalizedPerGroup()?e.id:void 0);if(c===null)return l;const u=c[e.index];e.ratio=ae(e.value)&&c&&u?e.value/u:0,l=e.ratio}else if(t==="radar")l=parseFloat(String(Math.max(e.value,0)))/s.current.dataMax*i.radar_size_ratio;else if(t==="bar"){const u=r.getYScaleById.bind(r)(e.id).domain().reduce((f,d)=>d-f);l=u===0?0:Math.abs(r.getRangedData(e,null,t)/u)}else t==="treemap"&&(l/=r.getTotalDataSum(!0));return n&&l?l*100:l},updateDataIndexByX(t){const e=this,n=t.reduce((r,i,s)=>(r[Number(i.x)]=s,r),{});e.data.targets.forEach(r=>{r.values.forEach((i,s)=>{let o=n[Number(i.x)];o===void 0&&(o=s),i.index=o})})},isBubbleZType(t){return this.isBubbleType(t)&&(He(t.value)&&("z"in t.value||"y"in t.value)||qe(t.value)&&t.value.length>=2)},isBarRangeType(t){var e;const n=this,{value:r}=t;return n.isBarType(t)&&!((e=n.isSubchartSourceTypeOf)!=null&&e.call(n,t,qt.CANDLESTICK))&&qe(r)&&r.length>=2&&r.every(ae)},getDataById(t){var e;const n=this.cache.get(t)||this.api.data(t);return(e=n==null?void 0:n[0])!=null?e:n}};function Eo(t,e=!1){const n=this,{api:r}=n;e&&n.api.flush(!0),t==null||t.call(r)}var yb={load(t,e){const n=this,{axis:r,data:i,org:s,scale:o}=n,{append:l}=e,c={domain:null,currentDomain:null,x:null};let u=t;if(u){e.filter&&(u=u.filter(e.filter)),(e.type||e.types)&&u.forEach(d=>{var h;const m=((h=e.types)==null?void 0:h[d.id])||e.type;n.setTargetType(d.id,m)});const f=new Map(u.map(d=>[d.id,d]));i.targets.forEach(d=>{const h=f.get(d.id);if(h){if(l){const m=h.values;for(let S=0;S<m.length;S++)d.values.push(m[S])}else d.values=h.values;f.delete(d.id)}}),f.forEach(d=>i.targets.push(d))}if(n.state.isCanvasMode){n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.updateTypesElements(),Eo.call(n,e.done,e.resizeAfter);return}n.updateTargets(i.targets),o.zoom&&(c.x=r.isCategorized()?o.x.orgScale():(s.xScale||o.x).copy(),c.domain=n.getXDomain(i.targets),c.x.domain(c.domain),c.currentDomain=n.zoom.getDomain(),n.withinRange(c.currentDomain,void 0,c.domain)||(o.x.domain(c.domain),o.zoom=null,n.$el.eventRect.property("__zoom",null))),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),o.zoom?(s.xDomain=c.domain,s.xScale=c.x,r.isCategorized()&&(c.currentDomain=n.getZoomDomainValue(c.currentDomain),s.xDomain=n.getZoomDomainValue(s.xDomain),s.xScale=c.x.domain(s.xDomain)),n.updateCurrentZoomTransform(c.x,c.currentDomain)):s.xScale&&s.xScale.domain(s.xDomain),n.updateTypesElements(),Eo.call(n,e.done,e.resizeAfter)},loadFromArgs(t){const e=this;e.config&&(e.cache.reset(!1,[Oe.filteredTargets,Oe.maxDataCountTarget,Oe.valuesXIndexMap,Oe.maxTickSize]),e.convertData(t,n=>{const r=t.data||n;t.append&&(r.__append__=!0),r&&e.load(e.convertDataToTargets.call(e,r),t)}))},unload(t,e){var n;const r=this,{state:i,$el:s,$T:o}=r,l=!!((n=r.hasLegendDefsPoint)!=null&&n.call(r));let c=e,u=t;if(r.cache.reset(!1,[Oe.filteredTargets,Oe.maxDataCountTarget,Oe.valuesXIndexMap,Oe.maxTickSize]),c||(c=()=>{}),u=u.filter(h=>r.hasTarget(r.data.targets,h)),u.length===0){c();return}const f=new Set(u);if(i.isCanvasMode){u.forEach(h=>{i.withoutFadeIn[h]=!1}),r.data.targets=r.data.targets.filter(h=>!f.has(h.id)),r.removeHiddenTargetIds(u),r.removeHiddenLegendIds(u),r.updateTypesElements(),c();return}u.forEach(h=>{var m;const S=r.getTargetSelectorSuffix(h);i.withoutFadeIn[h]=!1,s.legend&&s.legend.selectAll(`.${$e.legendItem}${S}`).remove(),l&&((m=s.defs)==null||m.select(`#${r.getDefsPointId(S)}`).remove())}),r.data.targets=r.data.targets.filter(h=>!f.has(h.id)),i.hasFunnel&&r.updateFunnel(r.data.targets),i.hasTreemap&&r.updateTargetsForTreemap(r.data.targets),r.updateTypesElements();const d=s.svg.selectAll(u.map(h=>r.selectorTarget(h)));o(d).style("opacity","0").remove().call(eo,c)}},Tb={value:()=>{}};function jh(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Co(n)}function Co(t){this._=t}function bb(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Co.prototype=jh.prototype={constructor:Co,on:function(t,e){var n=this._,r=bb(t+"",n),i,s=-1,o=r.length;if(arguments.length<2){for(;++s<o;)if((i=(t=r[s]).type)&&(i=Sb(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<o;)if(i=(t=r[s]).type)n[i]=Hh(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Hh(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Co(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],r=0,i=s.length;r<i;++r)s[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,s=r.length;i<s;++i)r[i].value.apply(e,n)}};function Sb(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Hh(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Tb,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Io=jh;const Ab={passive:!1},cs={capture:!0,passive:!1};function Dc(t){t.stopImmediatePropagation()}function ui(t){t.preventDefault(),t.stopImmediatePropagation()}function Fc(t){var e=t.document.documentElement,n=Yt(t).on("dragstart.drag",ui,cs);"onselectstart"in e?n.on("selectstart.drag",ui,cs):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Nc(t,e){var n=t.document.documentElement,r=Yt(t).on("dragstart.drag",null);e&&(r.on("click.drag",ui,cs),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Ro=(t=>()=>t);function $c(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:s,x:o,y:l,dx:c,dy:u,dispatch:f}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}$c.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Eb(t){return!t.ctrlKey&&!t.button}function Cb(){return this.parentNode}function Ib(t,e){return e==null?{x:t.x,y:t.y}:e}function Rb(){return navigator.maxTouchPoints||"ontouchstart"in this}function Yh(){var t=Eb,e=Cb,n=Ib,r=Rb,i={},s=Io("start","drag","end"),o=0,l,c,u,f,d=0;function h(B){B.on("mousedown.drag",m).filter(r).on("touchstart.drag",C).on("touchmove.drag",w,Ab).on("touchend.drag touchcancel.drag",$).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(B,W){if(!(f||!t.call(this,B,W))){var H=z(this,e.call(this,B,W),B,W,"mouse");H&&(Yt(B.view).on("mousemove.drag",S,cs).on("mouseup.drag",E,cs),Fc(B.view),Dc(B),u=!1,l=B.clientX,c=B.clientY,H("start",B))}}function S(B){if(ui(B),!u){var W=B.clientX-l,H=B.clientY-c;u=W*W+H*H>d}i.mouse("drag",B)}function E(B){Yt(B.view).on("mousemove.drag mouseup.drag",null),Nc(B.view,u),ui(B),i.mouse("end",B)}function C(B,W){if(t.call(this,B,W)){var H=B.changedTouches,_=e.call(this,B,W),q=H.length,st,it;for(st=0;st<q;++st)(it=z(this,_,B,W,H[st].identifier,H[st]))&&(Dc(B),it("start",B,H[st]))}}function w(B){var W=B.changedTouches,H=W.length,_,q;for(_=0;_<H;++_)(q=i[W[_].identifier])&&(ui(B),q("drag",B,W[_]))}function $(B){var W=B.changedTouches,H=W.length,_,q;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),_=0;_<H;++_)(q=i[W[_].identifier])&&(Dc(B),q("end",B,W[_]))}function z(B,W,H,_,q,st){var it=s.copy(),ot=ur(st||H,W),ct,gt,tt;if((tt=n.call(B,new $c("beforestart",{sourceEvent:H,target:h,identifier:q,active:o,x:ot[0],y:ot[1],dx:0,dy:0,dispatch:it}),_))!=null)return ct=tt.x-ot[0]||0,gt=tt.y-ot[1]||0,function ft(lt,bt,St){var Mt=ot,Ot;switch(lt){case"start":i[q]=ft,Ot=o++;break;case"end":delete i[q],--o;case"drag":ot=ur(St||bt,W),Ot=o;break}it.call(lt,B,new $c(lt,{sourceEvent:bt,subject:tt,target:h,identifier:q,active:Ot,x:ot[0]+ct,y:ot[1]+gt,dx:ot[0]-Mt[0],dy:ot[1]-Mt[1],dispatch:it}),_)}}return h.filter=function(B){return arguments.length?(t=typeof B=="function"?B:Ro(!!B),h):t},h.container=function(B){return arguments.length?(e=typeof B=="function"?B:Ro(B),h):e},h.subject=function(B){return arguments.length?(n=typeof B=="function"?B:Ro(B),h):n},h.touchable=function(B){return arguments.length?(r=typeof B=="function"?B:Ro(!!B),h):r},h.on=function(){var B=s.on.apply(s,arguments);return B===s?h:B},h.clickDistance=function(B){return arguments.length?(d=(B=+B)*B,h):Math.sqrt(d)},h}var wb={setExpand(t,e,n){const r=this,{config:i,$el:{circle:s}}=r;s&&i.point_focus_expand_enabled&&r.expandCircles(t,e,n),r.expandBarTypeShapes(!0,t,e,n)},expandBarTypeShapes(t=!0,e,n,r){const i=this;["bar","candlestick"].filter(s=>i.$el[s]).forEach(s=>{r&&i.$el[s].classed(ze.EXPANDED,!1),i.getShapeByIndex(s,e,n).classed(ze.EXPANDED,t)})},setOverOut(t,e){const n=this,{config:r,state:{hasFunnel:i,hasRadar:s,hasTreemap:o},$el:{main:l}}=n,c=He(e);if(c||e!==-1){const u=r[t?"data_onover":"data_onout"].bind(n.api);if(r.color_onover&&n.setOverColor(t,e,c),c){const f=n.getTargetSelectorSuffix(e.id),d=i||o?`${ze.target+f} .${Tn.shape}`:Ze.arc+f;u(e,l.select(`.${d}`).node())}else if(r.tooltip_grouped)t&&(s&&n.isPointFocusOnly()?n.showCircleFocus(n.getAllValuesOnIndex(e,!0)):n.setExpand(e,null,!0)),!n.isMultipleX()&&l.selectAll(`.${Tn.shape}-${e}`).each(function(f){u(f,this)});else{const f=n.cache.get(Oe.setOverOut)||[],d=l.selectAll(`.${Tn.shape}-${e}`).filter(function(m){return n.isWithinShape(this,m)}),h=d.filter(function(){return f.every(m=>m!==this)});if(!t||d.empty()||f.length===h.size()&&h.nodes().every((m,S)=>m!==f[S]))for(;f.length;){const m=f.pop();r.data_onout.bind(n.api)(Yt(m).datum(),m)}h.each(function(){t&&(u(Yt(this).datum(),this),f.push(this))}),n.cache.add(Oe.setOverOut,f)}}},callOverOutForTouch(t){const e=this,n=e.cache.get(Oe.callOverOutForTouch);(He(t)&&n?t.id!==n.id:t!==n)&&((n||ae(n))&&e.setOverOut(!1,n),(t||ae(t))&&e.setOverOut(!0,t),e.cache.add(Oe.callOverOutForTouch,t))},getDraggableSelection(){const t=this,{config:e,state:n}=t;return e.interaction_enabled&&e.data_selection_draggable&&t.drag?Yh().on("drag",function(r){n.event=r,t.drag(Jn(r,this))}).on("start",function(r){n.event=r,t.dragstart(Jn(r,this))}).on("end",r=>{n.event=r,t.dragend()}):()=>{}},dispatchEvent(t,e,n){var r,i,s;const o=this,{config:l,state:{eventReceiver:c,hasAxis:u,hasFunnel:f,hasRadar:d,hasTreemap:h},$el:{eventRect:m,funnel:S,radar:E,svg:C,treemap:w}}=o;let $=(s=(i=(f||h)&&c.rect||d&&E.axes.select(`.${Rn.axis}-${e} text`)||m||((r=o.getArcElementByIdOrIndex)==null?void 0:r.call(o,e)))==null?void 0:i.node)==null?void 0:s.call(i);if($){const z=o.isMultipleX(),B=l.axis_rotated;let{width:W,left:H,top:_}=ln($);if(u&&!d&&!z){const ot=c.coords[e];ot?(W=ot.w,H+=ot.x,_+=ot.y):(W=0,H=0,_=0)}let q=H+(n?n[0]:0)+(z||B?0:W/2),st=_+(n?n[1]:0)+(B?4:0);if(Rc(C)&&o.$el.eventRect){const ot=So(o.$el.eventRect.node(),q,st,!1);q=ot.x,st=ot.y}const it={screenX:q,screenY:st,clientX:q,clientY:st,bubbles:d};(f||h)&&($=(S!=null?S:w).node()),wc[/^(mouse|click)/.test(t)?"mouse":"touch"]($,t,it)}},setDragStatus(t){this.state.dragging=t},unbindZoomEvent(){const t=this,{$el:{canvas:e,eventRect:n,svg:r,zoomResetBtn:i}}=t;n==null||n.on(".zoom wheel.zoom .drag",null),e==null||e.on(".zoom wheel.zoom .drag",null),r==null||r.on("wheel",null),i==null||i.on("click",null).style("display","none")},unbindAllEvents(){var t;const e=this,{$el:{arcs:n,eventRect:r,legend:i,region:s,svg:o,treemap:l},brush:c}=e,u=["wheel","click","mouseover","mousemove","mouseout","touchstart","touchmove","touchend","touchstart.eventRect","touchmove.eventRect","touchend.eventRect",".brush",".drag",".zoom","wheel.zoom","dblclick.zoom"].join(" ");[o,r,s==null?void 0:s.list,c==null?void 0:c.getSelection(),n==null?void 0:n.selectAll("path"),i==null?void 0:i.selectAll("g"),l].forEach(f=>f==null?void 0:f.on(u,null)),(t=e.unbindZoomEvent)==null||t.call(e)}},Ob={categoryName(t){var e;const{axis_x_categories:n}=this.config;return(e=n==null?void 0:n[t])!=null?e:t}};const Pb=/[\x00-\x20\x7F-\xA0\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g;var Mb={generateClass(t,e){const n=this.state.generateClassCache,r=`${t}\0${e}`;let i=n.get(r);return i||(i=` ${t} ${t+this.getTargetSelectorSuffix(e)}`,n.set(r,i)),i},getClass(t,e){const n=/s$/.test(t),r=/^(area|arc|line|funnel|treemap)s?$/.test(t),i=n?"id":"index";return s=>{const o=s.data||s;return((e?this.generateClass(Re[n?"shapes":"shape"],o[i]):"")+this.generateClass(Re[t],o[r?"id":i])).trim()}},getChartClass(t){return e=>Re[`chart${t}`]+this.classTarget((e.data?e.data:e).id)},generateExtraLineClass(){const e=this.config.line_classes||[],n=[];return function(r){var i;const s=r.id||((i=r.data)==null?void 0:i.id)||r;return n.indexOf(s)<0&&n.push(s),e[n.indexOf(s)%e.length]}},classRegion(t,e){return`${this.generateClass(Re.region,e)} ${"class"in t?t.class:""}`},classTarget(t){const e=this.config.data_classes[t];let n="";return e&&(n=` ${Re.target}-${e}`),this.generateClass(Re.target,t)+n},classFocus(t){return this.classFocused(t)+this.classDefocused(t)},classFocused(t){return` ${this.state.focusedTargetIds.has(t.id)?Re.focused:""}`},classDefocused(t){return` ${this.state.defocusedTargetIds.has(t.id)?Re.defocused:""}`},getTargetSelectorSuffix(t){return(t||t===0?`-${t}`:"").replace(Pb,"-")},selectorTarget(t,e="",n=""){const r=this.getTargetSelectorSuffix(t);return`${e}.${Re.target+r} ${n}, ${e}.${Re.circles+r} ${n}`},selectorTargets(t,e){const n=t||[];return n.length?n.map(r=>this.selectorTarget(r,e)):null},selectorLegend(t){return`.${Re.legendItem+this.getTargetSelectorSuffix(t)}`},selectorLegends(t){return t!=null&&t.length?t.map(e=>this.selectorLegend(e)):null}};const Lb=(t,e,n)=>{const r=Yt(t.cloneNode(!0));return r.attr("id",n).insert("rect",":first-child").attr("width",r.attr("width")).attr("height",r.attr("height")).style("fill",e),{id:n,node:r.node()}};function Db(t){const e=Oe.colorPattern,{body:n}=Ye;let r=n[e];if(!r){const s=t.classed(Ac.colorPattern,!0).style("background-image");t.classed(Ac.colorPattern,!1),s.indexOf(";")>-1&&(r=s.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(o=>o.trim().replace(/[\"'\s]/g,"")).filter(Boolean),n[e]=r)}return r}const Fb=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var Nb={generateColor(){const t=this,{$el:e,config:n}=t,r=[],i=n.area_linearGradient||n.bar_linearGradient||n.point_radialGradient;let s=vn(n.color_pattern)?n.color_pattern:[...Db(e.chart)||Fb];const o=s;if(ie(n.color_tiles)){const l=n.color_tiles.bind(t.api)(),c=s.map((u,f)=>{const d=u.replace(/[#\(\)\s,]/g,""),h=`${t.state.datetimeId}-pattern-${d}-${f}`;return Lb(l[f%l.length],u,h)});s=c.map(u=>`url(#${u.id})`),t.patterns=c}return function(l){var c;const u=n.data_colors,f=n.data_color,d=l.id||((c=l.data)==null?void 0:c.id)||l,h=t.isTypeOf(d,["line","spline","step"])||!n.data_types[d];let m;if(ie(u[d]))m=u[d].bind(t.api)(l);else if(u[d])m=u[d];else{let S=r.indexOf(d);S<0&&(r.push(d),S=r.length-1),m=h?o[S%o.length]:s[S%s.length],u[d]=m}if(m=ie(f)?f.call(t.api,m,l):m,i&&e.defs){const S=t.$el.defs.selectAll(`[id$='-gradient${t.getTargetSelectorSuffix(d)}'] stop`);let E;S.each(function(C,w){E=w===0?this.style.stopColor:this.style.stopColor===E}),E===!0&&S.attr("stop-color",m)}return m}},generateLevelColor(){const t=this,{config:e}=t,n=e.color_pattern,r=e.color_threshold,i=r.unit==="value",s=r.max||100,o=r.values&&r.values.length?r.values:[];return vn(r)?function(l){const c=i?l:l*100/s;let u=n[n.length-1];for(let f=0,d=o.length;f<d;f++)if(c<=o[f]){u=n[f];break}return u}:null},generateTextBGColorFilter(t,e={x:0,y:0,width:1,height:1}){const n=this,{$el:{defs:r},state:i}=n;if(t){let s=[];je(t)?s.push(""):He(t)?s=Object.keys(t):ie(t)&&(s=n.mapToTargetIds()),s.forEach(o=>{const l=`${i.datetimeId}-labels-bg${n.getTargetSelectorSuffix(o)}${je(t)?n.getTargetSelectorSuffix(t):""}`,c=Gr(o===""?t:(t==null?void 0:t[o])||"");if(r.select(`#${l}`).empty()){const u=r.append("filter").attr("x",e.x).attr("y",e.y).attr("width",e.width).attr("height",e.height).attr("id",l);u.append("feFlood").attr("flood-color",c),u.append("feComposite").attr("in","SourceGraphic")}})}},getGradienColortUrl(t){return`url(#${this.state.datetimeId}-gradient${this.getTargetSelectorSuffix(t)})`},updateLinearGradient(){const t=this,{config:e,data:{targets:n},state:{datetimeId:r},$el:{defs:i}}=t;n.forEach(s=>{const o=`${r}-gradient${t.getTargetSelectorSuffix(s.id)}`,l=t.hasPointType()&&e.point_radialGradient,c=t.isAreaType(s)&&"area"||t.isBarType(s)&&"bar";if((l||c)&&i.select(`#${o}`).empty()){const u=t.color(s),f={defs:null,stops:[]};if(l){const{cx:d=.3,cy:h=.3,r:m=.7,stops:S=[[.1,u,0],[.9,u,1]]}=l;f.stops=S,f.defs=i.append("radialGradient").attr("id",`${o}`).attr("cx",d).attr("cy",h).attr("r",m)}else{const d=e.axis_rotated,{x:h=d?[1,0]:[0,0],y:m=d?[0,0]:[0,1],stops:S=[[0,u,1],[1,u,0]]}=e[`${c}_linearGradient`];f.stops=S,f.defs=i.append("linearGradient").attr("id",`${o}`).attr("x1",h[0]).attr("x2",h[1]).attr("y1",m[0]).attr("y2",m[1])}f.stops.forEach(d=>{const[h,m,S]=d,E=ie(m)?m.bind(t.api)(s.id):m;f.defs&&f.defs.append("stop").attr("offset",h).attr("stop-color",E||u).attr("stop-opacity",S)})}})},setOverColor(t,e){const n=this,{config:r,$el:{main:i}}=n,s=r.color_onover;let o=t?s:n.color;He(o)?o=({id:l})=>l in s?s[l]:n.color(l):je(o)?o=()=>s:ie(s)&&(o=o.bind(n.api)),i.selectAll(He(e)?`.${Ze.arc}${n.getTargetSelectorSuffix(e.id)}`:`.${Tn.shape}-${e}`).style("fill",o)}},fi=0,us=0,fs=0,Kh=1e3,wo,ds,Oo=0,za=0,Po=0,hs=typeof performance=="object"&&performance.now?performance:Date,Zh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Bc(){return za||(Zh($b),za=hs.now()+Po)}function $b(){za=0}function Mo(){this._call=this._time=this._next=null}Mo.prototype=Jh.prototype={constructor:Mo,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Bc():+n)+(e==null?0:+e),!this._next&&ds!==this&&(ds?ds._next=this:wo=this,ds=this),this._call=t,this._time=n,zc()},stop:function(){this._call&&(this._call=null,this._time=1/0,zc())}};function Jh(t,e,n){var r=new Mo;return r.restart(t,e,n),r}function Bb(){Bc(),++fi;for(var t=wo,e;t;)(e=za-t._time)>=0&&t._call.call(void 0,e),t=t._next;--fi}function Qh(){za=(Oo=hs.now())+Po,fi=us=0;try{Bb()}finally{fi=0,Ub(),za=0}}function zb(){var t=hs.now(),e=t-Oo;e>Kh&&(Po-=e,Oo=t)}function Ub(){for(var t,e=wo,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:wo=n);ds=t,zc(r)}function zc(t){if(!fi){us&&(us=clearTimeout(us));var e=t-za;e>24?(t<1/0&&(us=setTimeout(Qh,t-hs.now()-Po)),fs&&(fs=clearInterval(fs))):(fs||(Oo=hs.now(),fs=setInterval(zb,Kh)),fi=1,Zh(Qh))}}function _h(t,e,n){var r=new Mo;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var kb=Io("start","end","cancel","interrupt"),Gb=[],qh=0,tv=1,Uc=2,Lo=3,ev=4,kc=5,Do=6;function Fo(t,e,n,r,i,s){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;Xb(t,n,{name:e,index:r,group:i,on:kb,tween:Gb,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:qh})}function Gc(t,e){var n=Tr(t,e);if(n.state>qh)throw new Error("too late; already scheduled");return n}function Dr(t,e){var n=Tr(t,e);if(n.state>Lo)throw new Error("too late; already running");return n}function Tr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Xb(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Jh(s,0,n.time);function s(u){n.state=tv,n.timer.restart(o,n.delay,n.time),n.delay<=u&&o(u-n.delay)}function o(u){var f,d,h,m;if(n.state!==tv)return c();for(f in r)if(m=r[f],m.name===n.name){if(m.state===Lo)return _h(o);m.state===ev?(m.state=Do,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete r[f]):+f<e&&(m.state=Do,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete r[f])}if(_h(function(){n.state===Lo&&(n.state=ev,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=Uc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Uc){for(n.state=Lo,i=new Array(h=n.tween.length),f=0,d=-1;f<h;++f)(m=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++d]=m);i.length=d+1}}function l(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=kc,1),d=-1,h=i.length;++d<h;)i[d].call(t,f);n.state===kc&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=Do,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function di(t,e){var n=t.__transition,r,i,s=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((r=n[o]).name!==e){s=!1;continue}i=r.state>Uc&&r.state<kc,r.state=Do,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]}s&&delete t.__transition}}function Wb(t){return this.each(function(){di(this,t)})}var nv=180/Math.PI,Xc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function rv(t,e,n,r,i,s){var o,l,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:s,rotate:Math.atan2(e,t)*nv,skewX:Math.atan(c)*nv,scaleX:o,scaleY:l}}var No;function Vb(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Xc:rv(e.a,e.b,e.c,e.d,e.e,e.f)}function jb(t){return t==null||(No||(No=document.createElementNS("http://www.w3.org/2000/svg","g")),No.setAttribute("transform",t),!(t=No.transform.baseVal.consolidate()))?Xc:(t=t.matrix,rv(t.a,t.b,t.c,t.d,t.e,t.f))}function av(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function s(u,f,d,h,m,S){if(u!==d||f!==h){var E=m.push("translate(",null,e,null,n);S.push({i:E-4,x:gr(u,d)},{i:E-2,x:gr(f,h)})}else(d||h)&&m.push("translate("+d+e+h+n)}function o(u,f,d,h){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:gr(u,f)})):f&&d.push(i(d)+"rotate("+f+r)}function l(u,f,d,h){u!==f?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:gr(u,f)}):f&&d.push(i(d)+"skewX("+f+r)}function c(u,f,d,h,m,S){if(u!==d||f!==h){var E=m.push(i(m)+"scale(",null,",",null,")");S.push({i:E-4,x:gr(u,d)},{i:E-2,x:gr(f,h)})}else(d!==1||h!==1)&&m.push(i(m)+"scale("+d+","+h+")")}return function(u,f){var d=[],h=[];return u=t(u),f=t(f),s(u.translateX,u.translateY,f.translateX,f.translateY,d,h),o(u.rotate,f.rotate,d,h),l(u.skewX,f.skewX,d,h),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,d,h),u=f=null,function(m){for(var S=-1,E=h.length,C;++S<E;)d[(C=h[S]).i]=C.x(m);return d.join("")}}}var Hb=av(Vb,"px, ","px)","deg)"),Yb=av(jb,", ",")",")");function Kb(t,e){var n,r;return function(){var i=Dr(this,t),s=i.tween;if(s!==n){r=n=s;for(var o=0,l=r.length;o<l;++o)if(r[o].name===e){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Zb(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=Dr(this,t),o=s.tween;if(o!==r){i=(r=o).slice();for(var l={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=l;break}c===u&&i.push(l)}s.tween=i}}function Jb(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Tr(this.node(),n).tween,i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===t)return o.value;return null}return this.each((e==null?Kb:Zb)(n,t,e))}function Wc(t,e,n){var r=t._id;return t.each(function(){var i=Dr(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Tr(i,r).value[e]}}function iv(t,e){var n;return(typeof e=="number"?gr:e instanceof ba?Gs:(n=ba(e))?(e=n,Gs):_u)(t,e)}function Qb(t){return function(){this.removeAttribute(t)}}function _b(t){return function(){this.removeAttributeNS(t.space,t.local)}}function qb(t,e,n){var r,i=n+"",s;return function(){var o=this.getAttribute(t);return o===i?null:o===r?s:s=e(r=o,n)}}function tS(t,e,n){var r,i=n+"",s;return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===r?s:s=e(r=o,n)}}function eS(t,e,n){var r,i,s;return function(){var o,l=n(this),c;return l==null?void this.removeAttribute(t):(o=this.getAttribute(t),c=l+"",o===c?null:o===r&&c===i?s:(i=c,s=e(r=o,l)))}}function nS(t,e,n){var r,i,s;return function(){var o,l=n(this),c;return l==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),c=l+"",o===c?null:o===r&&c===i?s:(i=c,s=e(r=o,l)))}}function rS(t,e){var n=Nt(t),r=n==="transform"?Yb:iv;return this.attrTween(t,typeof e=="function"?(n.local?nS:eS)(n,r,Wc(this,"attr."+t,e)):e==null?(n.local?_b:Qb)(n):(n.local?tS:qb)(n,r,e))}function aS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function iS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function sS(t,e){var n,r;function i(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&iS(t,s)),n}return i._value=e,i}function oS(t,e){var n,r;function i(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&aS(t,s)),n}return i._value=e,i}function lS(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Nt(t);return this.tween(n,(r.local?sS:oS)(r,e))}function cS(t,e){return function(){Gc(this,t).delay=+e.apply(this,arguments)}}function uS(t,e){return e=+e,function(){Gc(this,t).delay=e}}function fS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?cS:uS)(e,t)):Tr(this.node(),e).delay}function dS(t,e){return function(){Dr(this,t).duration=+e.apply(this,arguments)}}function hS(t,e){return e=+e,function(){Dr(this,t).duration=e}}function vS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?dS:hS)(e,t)):Tr(this.node(),e).duration}function gS(t,e){if(typeof e!="function")throw new Error;return function(){Dr(this,t).ease=e}}function pS(t){var e=this._id;return arguments.length?this.each(gS(e,t)):Tr(this.node(),e).ease}function mS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Dr(this,t).ease=n}}function xS(t){if(typeof t!="function")throw new Error;return this.each(mS(this._id,t))}function yS(t){typeof t!="function"&&(t=M(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],o=s.length,l=r[i]=[],c,u=0;u<o;++u)(c=s[u])&&t.call(c,c.__data__,u,s)&&l.push(c);return new Qr(r,this._parents,this._name,this._id)}function TS(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,s=Math.min(r,i),o=new Array(r),l=0;l<s;++l)for(var c=e[l],u=n[l],f=c.length,d=o[l]=new Array(f),h,m=0;m<f;++m)(h=c[m]||u[m])&&(d[m]=h);for(;l<r;++l)o[l]=e[l];return new Qr(o,this._parents,this._name,this._id)}function bS(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function SS(t,e,n){var r,i,s=bS(e)?Gc:Dr;return function(){var o=s(this,t),l=o.on;l!==r&&(i=(r=l).copy()).on(e,n),o.on=i}}function AS(t,e){var n=this._id;return arguments.length<2?Tr(this.node(),n).on.on(t):this.each(SS(n,t,e))}function ES(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function CS(){return this.on("end.remove",ES(this._id))}function IS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=x(t));for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o)for(var l=r[o],c=l.length,u=s[o]=new Array(c),f,d,h=0;h<c;++h)(f=l[h])&&(d=t.call(f,f.__data__,h,l))&&("__data__"in f&&(d.__data__=f.__data__),u[h]=d,Fo(u[h],e,n,h,u,Tr(f,n)));return new Qr(s,this._parents,e,n)}function RS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=I(t));for(var r=this._groups,i=r.length,s=[],o=[],l=0;l<i;++l)for(var c=r[l],u=c.length,f,d=0;d<u;++d)if(f=c[d]){for(var h=t.call(f,f.__data__,d,c),m,S=Tr(f,n),E=0,C=h.length;E<C;++E)(m=h[E])&&Fo(m,e,n,E,h,S);s.push(h),o.push(f)}return new Qr(s,o,e,n)}var wS=bn.prototype.constructor;function OS(){return new wS(this._groups,this._parents)}function PS(t,e){var n,r,i;return function(){var s=zt(this,t),o=(this.style.removeProperty(t),zt(this,t));return s===o?null:s===n&&o===r?i:i=e(n=s,r=o)}}function sv(t){return function(){this.style.removeProperty(t)}}function MS(t,e,n){var r,i=n+"",s;return function(){var o=zt(this,t);return o===i?null:o===r?s:s=e(r=o,n)}}function LS(t,e,n){var r,i,s;return function(){var o=zt(this,t),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(t),zt(this,t))),o===c?null:o===r&&c===i?s:(i=c,s=e(r=o,l))}}function DS(t,e){var n,r,i,s="style."+e,o="end."+s,l;return function(){var c=Dr(this,t),u=c.on,f=c.value[s]==null?l||(l=sv(e)):void 0;(u!==n||i!==f)&&(r=(n=u).copy()).on(o,i=f),c.on=r}}function FS(t,e,n){var r=(t+="")=="transform"?Hb:iv;return e==null?this.styleTween(t,PS(t,r)).on("end.style."+t,sv(t)):typeof e=="function"?this.styleTween(t,LS(t,r,Wc(this,"style."+t,e))).each(DS(this._id,t)):this.styleTween(t,MS(t,r,e),n).on("end.style."+t,null)}function NS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function $S(t,e,n){var r,i;function s(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&NS(t,o,n)),r}return s._value=e,s}function BS(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,$S(t,e,n==null?"":n))}function zS(t){return function(){this.textContent=t}}function US(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function kS(t){return this.tween("text",typeof t=="function"?US(Wc(this,"text",t)):zS(t==null?"":t+""))}function GS(t){return function(e){this.textContent=t.call(this,e)}}function XS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&GS(i)),e}return r._value=t,r}function WS(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,XS(t))}function VS(){for(var t=this._name,e=this._id,n=lv(),r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],l=o.length,c,u=0;u<l;++u)if(c=o[u]){var f=Tr(c,e);Fo(c,t,n,u,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Qr(r,this._parents,t,n)}function jS(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(s,o){var l={value:o},c={value:function(){--i===0&&s()}};n.each(function(){var u=Dr(this,r),f=u.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(l),e._.interrupt.push(l),e._.end.push(c)),u.on=e}),i===0&&s()})}var HS=0;function Qr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ov(t){return bn().transition(t)}function lv(){return++HS}var _r=bn.prototype;Qr.prototype=ov.prototype={constructor:Qr,select:IS,selectAll:RS,selectChild:_r.selectChild,selectChildren:_r.selectChildren,filter:yS,merge:TS,selection:OS,transition:VS,call:_r.call,nodes:_r.nodes,node:_r.node,size:_r.size,empty:_r.empty,each:_r.each,on:AS,attr:rS,attrTween:lS,style:FS,styleTween:BS,text:kS,textTween:WS,remove:CS,tween:Jb,delay:fS,duration:vS,ease:pS,easeVarying:xS,end:jS,[Symbol.iterator]:_r[Symbol.iterator]};function Rw(t){return t*t*t}function ww(t){return--t*t*t+1}function YS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var KS={time:null,delay:0,duration:250,ease:YS};function ZS(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function JS(t){var e,n;t instanceof Qr?(e=t._id,t=t._name):(e=lv(),(n=KS).time=Bc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],l=o.length,c,u=0;u<l;++u)(c=o[u])&&Fo(c,t,e,u,o,n||ZS(c,e));return new Qr(r,this._parents,t,e)}bn.prototype.interrupt=Wb,bn.prototype.transition=JS;var Vc=(t=>()=>t);function QS(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:s}})}function _S(t){t.stopImmediatePropagation()}function jc(t){t.preventDefault(),t.stopImmediatePropagation()}var cv={name:"drag"},Hc={name:"space"},hi={name:"handle"},vi={name:"center"};const{abs:uv,max:Bn,min:zn}=Math;function fv(t){return[+t[0],+t[1]]}function Yc(t){return[fv(t[0]),fv(t[1])]}var $o={name:"x",handles:["w","e"].map(vs),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Bo={name:"y",handles:["n","s"].map(vs),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},qS={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(vs),input:function(t){return t==null?null:Yc(t)},output:function(t){return t}},qr={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},dv={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},hv={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},tA={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},eA={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function vs(t){return{type:t}}function nA(t){return!t.ctrlKey&&!t.button}function rA(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function aA(){return navigator.maxTouchPoints||"ontouchstart"in this}function Kc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function iA(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function vv(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function sA(){return Zc($o)}function oA(){return Zc(Bo)}function Ow(){return Zc(qS)}function Zc(t){var e=rA,n=nA,r=aA,i=!0,s=Io("start","brush","end"),o=6,l;function c(C){var w=C.property("__brush",E).selectAll(".overlay").data([vs("overlay")]);w.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",qr.overlay).merge(w).each(function(){var z=Kc(this).extent;Yt(this).attr("x",z[0][0]).attr("y",z[0][1]).attr("width",z[1][0]-z[0][0]).attr("height",z[1][1]-z[0][1])}),C.selectAll(".selection").data([vs("selection")]).enter().append("rect").attr("class","selection").attr("cursor",qr.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var $=C.selectAll(".handle").data(t.handles,function(z){return z.type});$.exit().remove(),$.enter().append("rect").attr("class",function(z){return"handle handle--"+z.type}).attr("cursor",function(z){return qr[z.type]}),C.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",m).on("touchend.brush touchcancel.brush",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}c.move=function(C,w,$){C.tween?C.on("start.brush",function(z){f(this,arguments).beforestart().start(z)}).on("interrupt.brush end.brush",function(z){f(this,arguments).end(z)}).tween("brush",function(){var z=this,B=z.__brush,W=f(z,arguments),H=B.selection,_=t.input(typeof w=="function"?w.apply(this,arguments):w,B.extent),q=Ya(H,_);function st(it){B.selection=it===1&&_===null?null:q(it),u.call(z),W.brush()}return H!==null&&_!==null?st:st(1)}):C.each(function(){var z=this,B=arguments,W=z.__brush,H=t.input(typeof w=="function"?w.apply(z,B):w,W.extent),_=f(z,B).beforestart();di(z),W.selection=H===null?null:H,u.call(z),_.start($).brush($).end($)})},c.clear=function(C,w){c.move(C,null,w)};function u(){var C=Yt(this),w=Kc(this).selection;w?(C.selectAll(".selection").style("display",null).attr("x",w[0][0]).attr("y",w[0][1]).attr("width",w[1][0]-w[0][0]).attr("height",w[1][1]-w[0][1]),C.selectAll(".handle").style("display",null).attr("x",function($){return $.type[$.type.length-1]==="e"?w[1][0]-o/2:w[0][0]-o/2}).attr("y",function($){return $.type[0]==="s"?w[1][1]-o/2:w[0][1]-o/2}).attr("width",function($){return $.type==="n"||$.type==="s"?w[1][0]-w[0][0]+o:o}).attr("height",function($){return $.type==="e"||$.type==="w"?w[1][1]-w[0][1]+o:o})):C.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function f(C,w,$){var z=C.__brush.emitter;return z&&(!$||!z.clean)?z:new d(C,w,$)}function d(C,w,$){this.that=C,this.args=w,this.state=C.__brush,this.active=0,this.clean=$}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(C,w){return this.starting?(this.starting=!1,this.emit("start",C,w)):this.emit("brush",C),this},brush:function(C,w){return this.emit("brush",C,w),this},end:function(C,w){return--this.active===0&&(delete this.state.emitter,this.emit("end",C,w)),this},emit:function(C,w,$){var z=Yt(this.that).datum();s.call(C,this.that,new QS(C,{sourceEvent:w,target:c,selection:t.output(this.state.selection),mode:$,dispatch:s}),z)}};function h(C){if(l&&!C.touches||!n.apply(this,arguments))return;var w=this,$=C.target.__data__.type,z=(i&&C.metaKey?$="overlay":$)==="selection"?cv:i&&C.altKey?vi:hi,B=t===Bo?null:tA[$],W=t===$o?null:eA[$],H=Kc(w),_=H.extent,q=H.selection,st=_[0][0],it,ot,ct=_[0][1],gt,tt,ft=_[1][0],lt,bt,St=_[1][1],Mt,Ot,Kt=0,ee=0,Ae,Ee=B&&W&&i&&C.shiftKey,Te,De,me=Array.from(C.touches||[C],be=>{const un=be.identifier;return be=ur(be,w),be.point0=be.slice(),be.identifier=un,be});di(w);var Pe=f(w,arguments,!0).beforestart();if($==="overlay"){q&&(Ae=!0);const be=[me[0],me[1]||me[0]];H.selection=q=[[it=t===Bo?st:zn(be[0][0],be[1][0]),gt=t===$o?ct:zn(be[0][1],be[1][1])],[lt=t===Bo?ft:Bn(be[0][0],be[1][0]),Mt=t===$o?St:Bn(be[0][1],be[1][1])]],me.length>1&&We(C)}else it=q[0][0],gt=q[0][1],lt=q[1][0],Mt=q[1][1];ot=it,tt=gt,bt=lt,Ot=Mt;var Zt=Yt(w).attr("pointer-events","none"),he=Zt.selectAll(".overlay").attr("cursor",qr[$]);if(C.touches)Pe.moved=Wt,Pe.ended=Xe;else{var ge=Yt(C.view).on("mousemove.brush",Wt,!0).on("mouseup.brush",Xe,!0);i&&ge.on("keydown.brush",pn,!0).on("keyup.brush",Cn,!0),Fc(C.view)}u.call(w),Pe.start(C,z.name);function Wt(be){for(const un of be.changedTouches||[be])for(const an of me)an.identifier===un.identifier&&(an.cur=ur(un,w));if(Ee&&!Te&&!De&&me.length===1){const un=me[0];uv(un.cur[0]-un[0])>uv(un.cur[1]-un[1])?De=!0:Te=!0}for(const un of me)un.cur&&(un[0]=un.cur[0],un[1]=un.cur[1]);Ae=!0,jc(be),We(be)}function We(be){const un=me[0],an=un.point0;var Nr;switch(Kt=un[0]-an[0],ee=un[1]-an[1],z){case Hc:case cv:{B&&(Kt=Bn(st-it,zn(ft-lt,Kt)),ot=it+Kt,bt=lt+Kt),W&&(ee=Bn(ct-gt,zn(St-Mt,ee)),tt=gt+ee,Ot=Mt+ee);break}case hi:{me[1]?(B&&(ot=Bn(st,zn(ft,me[0][0])),bt=Bn(st,zn(ft,me[1][0])),B=1),W&&(tt=Bn(ct,zn(St,me[0][1])),Ot=Bn(ct,zn(St,me[1][1])),W=1)):(B<0?(Kt=Bn(st-it,zn(ft-it,Kt)),ot=it+Kt,bt=lt):B>0&&(Kt=Bn(st-lt,zn(ft-lt,Kt)),ot=it,bt=lt+Kt),W<0?(ee=Bn(ct-gt,zn(St-gt,ee)),tt=gt+ee,Ot=Mt):W>0&&(ee=Bn(ct-Mt,zn(St-Mt,ee)),tt=gt,Ot=Mt+ee));break}case vi:{B&&(ot=Bn(st,zn(ft,it-Kt*B)),bt=Bn(st,zn(ft,lt+Kt*B))),W&&(tt=Bn(ct,zn(St,gt-ee*W)),Ot=Bn(ct,zn(St,Mt+ee*W)));break}}bt<ot&&(B*=-1,Nr=it,it=lt,lt=Nr,Nr=ot,ot=bt,bt=Nr,$ in dv&&he.attr("cursor",qr[$=dv[$]])),Ot<tt&&(W*=-1,Nr=gt,gt=Mt,Mt=Nr,Nr=tt,tt=Ot,Ot=Nr,$ in hv&&he.attr("cursor",qr[$=hv[$]])),H.selection&&(q=H.selection),Te&&(ot=q[0][0],bt=q[1][0]),De&&(tt=q[0][1],Ot=q[1][1]),(q[0][0]!==ot||q[0][1]!==tt||q[1][0]!==bt||q[1][1]!==Ot)&&(H.selection=[[ot,tt],[bt,Ot]],u.call(w),Pe.brush(be,z.name))}function Xe(be){if(_S(be),be.touches){if(be.touches.length)return;l&&clearTimeout(l),l=setTimeout(function(){l=null},500)}else Nc(be.view,Ae),ge.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Zt.attr("pointer-events","all"),he.attr("cursor",qr.overlay),H.selection&&(q=H.selection),iA(q)&&(H.selection=null,u.call(w)),Pe.end(be,z.name)}function pn(be){switch(be.keyCode){case 16:{Ee=B&&W;break}case 18:{z===hi&&(B&&(lt=bt-Kt*B,it=ot+Kt*B),W&&(Mt=Ot-ee*W,gt=tt+ee*W),z=vi,We(be));break}case 32:{(z===hi||z===vi)&&(B<0?lt=bt-Kt:B>0&&(it=ot-Kt),W<0?Mt=Ot-ee:W>0&&(gt=tt-ee),z=Hc,he.attr("cursor",qr.selection),We(be));break}default:return}jc(be)}function Cn(be){switch(be.keyCode){case 16:{Ee&&(Te=De=Ee=!1,We(be));break}case 18:{z===vi&&(B<0?lt=bt:B>0&&(it=ot),W<0?Mt=Ot:W>0&&(gt=tt),z=hi,We(be));break}case 32:{z===Hc&&(be.altKey?(B&&(lt=bt-Kt*B,it=ot+Kt*B),W&&(Mt=Ot-ee*W,gt=tt+ee*W),z=vi):(B<0?lt=bt:B>0&&(it=ot),W<0?Mt=Ot:W>0&&(gt=tt),z=hi),he.attr("cursor",qr[$]),We(be));break}default:return}jc(be)}}function m(C){f(this,arguments).moved(C)}function S(C){f(this,arguments).ended(C)}function E(){var C=this.__brush||{selection:null};return C.extent=Yc(e.apply(this,arguments)),C.dim=t,C}return c.extent=function(C){return arguments.length?(e=typeof C=="function"?C:Vc(Yc(C)),c):e},c.filter=function(C){return arguments.length?(n=typeof C=="function"?C:Vc(!!C),c):n},c.touchable=function(C){return arguments.length?(r=typeof C=="function"?C:Vc(!!C),c):r},c.handleSize=function(C){return arguments.length?(o=+C,c):o},c.keyModifiers=function(C){return arguments.length?(i=!!C,c):i},c.on=function(){var C=s.on.apply(s,arguments);return C===s?c:C},c}function gv(t){const{event:e,$el:n}=t,r=n.subchart.main||n.main;let i;return e&&e.type==="brush"?i=e.selection:r&&(i=r.select(".bb-brush").node())&&(i=vv(i)),i}function pv(t){const e=gv(t);return e?e[0]===e[1]:!0}function mv(t,e){return e.map(n=>{var r,i,s,o,l,c,u,f,d;const{values:h}=n,m=h[0],S=h[h.length-1],E=m?(i=(r=t.getXCacheKey)==null?void 0:r.call(t,m.x))!=null?i:m.x:"",C=S?(o=(s=t.getXCacheKey)==null?void 0:s.call(t,S.x))!=null?o:S.x:"",w=(c=(l=t.getTargetType)==null?void 0:l.call(t,n))!=null?c:"",$=(d=(f=(u=t.state)==null?void 0:u.subchartSourceTypes)==null?void 0:f[n.id])!=null?d:"";return`${n.id}:${w}:${$}:${h.length}:${E}:${C}`}).join("|")}function xv(t,e){var n;const r=(n=t.data)==null?void 0:n.targets;if(!r)return!1;for(let i=0;i<e.length;i++){const s=e[i],o=r.find(l=>l.id===s.id);if(!o||o.values!==s.values)return!1}return!0}function Jc(t,e){vn(e)&&((t.min===void 0||e<t.min)&&(t.min=e),(t.max===void 0||e>t.max)&&(t.max=e))}function yv(t,e){for(let n=0;n<e.length;n++)Jc(t,e[n])}function lA(t,e){var n,r,i,s;const o={min:void 0,max:void 0},l=t.state.hasAxis;for(let c=0;c<e.length;c++){const u=e[c],f=(n=t.isCandlestickType)==null?void 0:n.call(t,u),d=!f&&!!((r=t.isSubchartSourceTypeOf)!=null&&r.call(t,u,qt.CANDLESTICK)),{values:h}=u;for(let m=0;m<h.length;m++){const S=h[m];let E=S.value;if(!(Ge(E)||E===null))continue;const C=d?(i=t.getSubchartCandlestickShapeValue)==null?void 0:i.call(t,S,!0):void 0;ae(C)?E=C:E!==null&&(f||d)&&(E=Array.isArray(E)?E.slice(0,4):[E.open,E.high,E.low,E.close]),Array.isArray(E)?yv(o,E):He(E)&&"high"in E?yv(o,Object.values(E)):(s=t.isBubbleZType)!=null&&s.call(t,S)?Jc(o,l&&t.getBubbleZData(E,"y")):Jc(o,E)}}return[o.min,o.max]}function cA(t,e){let n;for(let r=0;r<t.length;r++){const{values:i}=t[r];for(let s=0;s<i.length;s++){const{x:o}=i[s];vn(o)&&(n===void 0||(e==="min"?o<n:o>n))&&(n=o)}}return n}var uA={getYDomainMinMaxBoth(t){const e=this,{axis:n,cache:r,config:i,state:s}=e,l=xv(e,t)?`${Oe.domainMinMax}_y_${mv(e,t)}`:null,c=l&&r.get(l);if(c&&c.generation===s.dataGeneration)return c.value;const u=i.data_groups,f=e.mapToIds(t),d=Yf(f);let h;if(u.length>0){const m=e.getValuesAsIdKeyed(t),S=t.some(W=>W.values.some(H=>H.value<0)),E=t.some(W=>W.values.some(H=>H.value>0)),C=new Map(f.map(W=>[W,n.getId(W)])),w={},$={};for(const W in m)w[W]=m[W].slice(),$[W]=m[W].slice();u.forEach(W=>{const H=W.filter(_=>d.has(_));if(H.length){const _=H[0],q=C.get(_);w[_]&&S&&(w[_]=w[_].map(st=>st<0?st:0)),$[_]&&E&&($[_]=$[_].map(st=>st>0?st:0)),H.filter((st,it)=>it>0).forEach(st=>{if(w[st]){const it=C.get(st);w[st].forEach((ot,ct)=>{const gt=+ot;it===q&&!(S&&gt>0)&&(w[_][ct]+=gt)})}if($[st]){const it=C.get(st);$[st].forEach((ot,ct)=>{const gt=+ot;it===q&&!(E&&gt<0)&&($[_][ct]+=gt)})}})}});const z=[],B=[];for(const W in w)z.push(pr("min",w[W])),B.push(pr("max",$[W]));h=[pr("min",z),pr("max",B)]}else h=lA(e,t);return l&&r.add(l,{generation:s.dataGeneration,value:h}),h},isHiddenTargetWithYDomain(t){const e=this;for(const n of e.state.hiddenTargetIds)if(e.axis.getId(n)===t)return!0;return!1},getYDomain(t,e,n){const r=this,{axis:i,config:s,scale:o}=r,l=`axis_${e}`;if(r.isStackNormalized()&&t.filter(tt=>i.getId(tt.id)===e).map(tt=>tt.id).some(tt=>r.isGrouped(tt)))return[0,100];const c=(o==null?void 0:o[e])&&o[e].type==="log",u=t.filter(ct=>i.getId(ct.id)===e),f=n?r.filterByXDomain(u,n):u;if(f.length===0)return r.isHiddenTargetWithYDomain(e)?o[e].domain():e==="y2"?o.y.domain():r.getYDomain(t,"y2",n);const d=s[`${l}_min`],h=s[`${l}_max`],m=s[`${l}_center`],S=s[`${l}_inverted`],E=r.hasDataLabel()&&s.axis_rotated,C=r.hasDataLabel()&&!s.axis_rotated,[w,$]=r.getYDomainMinMaxBoth(f);let z=w,B=$,W=[qt.BAR,qt.BUBBLE,qt.SCATTER,...en.Line].some(ct=>{const gt=ct.indexOf("area")>-1?"area":ct;return r.hasType(ct,f,!0)&&s[`${gt}_zerobased`]});z=Ge(d)?d:Ge(h)?z<=h?z:h-10:z,B=Ge(h)?h:Ge(d)?d<=B?B:d+10:B,isNaN(z)&&(z=0),isNaN(B)&&(B=z),z===B&&(z<0?B=0:z=0);const H=z>=0&&B>=0,_=z<=0&&B<=0;(Ge(d)&&H||Ge(h)&&_)&&(W=!1),W&&(H&&(z=0),_&&(B=0));const q=Math.abs(B-z);let st={top:q*.1,bottom:q*.1};if(sn(m)){const ct=Math.max(Math.abs(z),Math.abs(B));B=m+ct,z=m-ct}if(E){const ct=wa(o.y.range()),gt=r.getDataLabelLength(z,B,"width").map(tt=>{const ft=tt/ct;return isFinite(ft)?ft:0});["bottom","top"].forEach((tt,ft)=>{st[tt]+=q*(gt[ft]/(1-gt[0]-gt[1]))})}else if(C){const ct=r.getDataLabelLength(z,B,"height");["bottom","top"].forEach((gt,tt)=>{st[gt]+=r.convertPixelToScale("y",ct[tt],q)})}st=r.getResettedPadding(st);const it=s[`${l}_padding`];vn(it)&&["bottom","top"].forEach(ct=>{st[ct]=i.getPadding(it,ct,st[ct],q)}),W&&(H&&(st.bottom=z),_&&(st.top=-B));const ot=c?[z,B].map(ct=>ct<0?0:ct):[z-st.bottom,B+st.top];return S?ot.reverse():ot},getXDomainMinMax(t,e){var n;const r=this,{cache:i,state:s}=r,o=r.config[`axis_x_${e}`],c=xv(r,t)?`${Oe.domainMinMax}_x_${e}_${mv(r,t)}`:null,u=c&&i.get(c);let f=(u==null?void 0:u.generation)===s.dataGeneration?u.value:void 0;f===void 0&&(f=cA(t,e),c&&i.add(c,{generation:s.dataGeneration,value:f}));let d=He(o)?o.value:o;return d=sn(d)&&((n=r.axis)!=null&&n.isTimeSeries())?Wn.bind(this)(d):d,He(o)&&o.fit&&(e==="min"&&d<f||e==="max"&&d>f)&&(d=void 0),sn(d)?d:f},getXDomainPadding(t,e){const n=this,{axis:r,config:i}=n,s=i.axis_x_padding,o=r.isTimeSeries()&&e,l=wa(t);let c;if(r.isCategorized()||o)c=0;else if(n.hasType("bar")){const d=n.getMaxDataCount();c=d>1?l/(d-1)/2:.5}else c=n.getResettedPadding(l*.01);let{left:u=c,right:f=c}=ae(s)?{left:s,right:s}:s;if(s.unit==="px"){const d=Math.abs(l+l*.2);u=r.getPadding(s,"left",c,d),f=r.getPadding(s,"right",c,d)}else{const d=l+u+f;if(o&&d){const h=l/e/d;u=u/d/h,f=f/d/h}}return{left:u,right:f}},getXDomain(t){const e=this,{axis:n,config:r,scale:{x:i}}=e,s=r.axis_x_inverted,o=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")];let[l=0,c=0]=o;if(i.type!=="log"){const u=n.isCategorized(),f=n.isTimeSeries(),d=e.getXDomainPadding(o);let[h,m]=o;h-m===0&&!u&&(f?(h=new Date(h.getTime()*.5),m=new Date(m.getTime()*1.5)):(h=h===0?1:h*.5,m=m===0?-1:m*1.5)),(h||h===0)&&(l=f?new Date(h.getTime()-d.left):h-d.left),(m||m===0)&&(c=f?new Date(m.getTime()+d.right):m+d.right)}return s?[c,l]:[l,c]},updateXDomain(t,e,n,r,i){var s;const o=this,{config:l,org:c,scale:{x:u,subX:f}}=o,d=l.zoom_enabled;if(n&&(u.domain(i||ti(o.getXDomain(t),!l.axis_x_inverted)),c.xDomain=u.domain(),f.domain(u.domain()),(s=o.brush)==null||s.scale(f)),e){const h=i||!o.brush||pv(o)?c.xDomain:gv(o).map(f.invert);u.domain(h)}return(n||e)&&d&&o.zoom.updateScaleExtent(),r&&u.domain(o.trimXDomain(u.orgDomain())),u.domain()},trimXDomain(t){const e=this,n=e.config.axis_x_inverted,r=e.getZoomDomain(),[i,s]=r;return(n?t[0]>=i:t[0]<=i)&&(t[1]=+t[1]+(i-t[0]),t[0]=i),(n?t[1]<=s:t[1]>=s)&&(t[0]=+t[0]-(t[1]-s),t[1]=s),t},getZoomDomain(t="zoom",e=!1){const n=this,{config:r,scale:i,org:s}=n;let[o,l]=e&&i[t]?i[t].domain():s.xDomain;return t==="zoom"&&(sn(r.zoom_x_min)&&(o=pr("min",[o,r.zoom_x_min])),sn(r.zoom_x_max)&&(l=pr("max",[l,r.zoom_x_max]))),[o,l]},getZoomDomainValue(t){const e=this,{config:n,axis:r}=e;if(r.isCategorized()&&Array.isArray(t)){const i=n.axis_x_inverted;return t.map((o,l)=>Number(o)+(l===0?+i:+!i))}return t},convertPixelToScale(t,e,n){const r=this,{config:i,state:s}=r,o=i.axis_rotated;let l;return t==="x"?l=o?"height":"width":l=o?"width":"height",n*(e/s[l])},withinRange(t,e=[0,0],n){const i=this.config.axis_x_inverted,[s,o]=n;if(Array.isArray(t)){const l=i?t[1]:t[0],c=i?t[0]:t[1];if(l<c)return t.every((u,f)=>(f===0?i?+u<=s:+u>=s:i?+u>=o:+u<=o)&&!t.every((d,h)=>d===e[h]))}return!1}};function Tv(t,e,n){const{config:r}=t,i=`axis_${e}_tick_format`;return(r[i]?r[i]:t.defaultValueFormat).call(t.api,n)}var fA={yFormat(t){return Tv(this,"y",t)},y2Format(t){return Tv(this,"y2",t)},getDefaultValueFormat(){const t=this,{defaultArcValueFormat:e,yFormat:n,y2Format:r}=t,i=t.hasArcType(null,["gauge","polar","radar"]);return function(s,o,l){return(i?e:t.axis&&t.axis.getId(l)==="y2"?r:n).call(t,s,o)}},defaultValueFormat(t){return qe(t)?t.join("~"):Ge(t)?+t:""},defaultArcValueFormat(t,e){return`${(e*100).toFixed(1)}%`},defaultPolarValueFormat(t){return`${t}`},dataLabelFormat(t){const e=this,n=e.config.data_labels,r=s=>{let l=s;return qe(s)?l=s.join("~"):He(s)&&(l=Object.values(s).join("~")),l};let i=r;return ie(n.format)?i=n.format:Kn(n.format)&&(n.format[t]?i=n.format[t]===!0?r:n.format[t]:i=()=>""),i.bind(e.api)}};const bv=10,dA=750;function zo(t){const e=this,n=e.getDataById(t);return e.levelColor?e.levelColor(n.values[0].value):e.color(n)}function hA(t,e=!0){var n;const{config:r}=this;let i=(n=r.data_names[t])!=null?n:t;return e&&ie(r.legend_format)&&(i=r.legend_format(i,t!==i?t:void 0)),i}function vA(t,e){var n;if(!e||e.empty())return;const r=(n=t.$el.legend)==null?void 0:n.selectAll(`.${$e.legendItem}`);r&&!r.empty()&&(e=r);const i=[];e.each(function(o){i.push({id:o,node:this})});const s=Kf(i,o=>o.id,o=>o.node);t.cache.add(Oe.legendItemMap,s)}function Sv(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function gA(t,e,n){const r=Sv(n);t.state.legendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function Av(t,e){const n=t.state.legendTouch,r=n&&Sv(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>bv||Math.abs(r.clientY-n.y)>bv)}function pA(t,e,n){Av(t,n);const r=t.state.legendTouch;return t.state.legendTouch=null,!!r&&r.id===e&&!r.moved}function mA(t,e){t.state.legendLastTouchClickId=e,t.state.legendLastTouchClickTime=Date.now()}function xA(t,e){const{state:n}=t,r=n.legendLastTouchClickId===e&&Date.now()-(n.legendLastTouchClickTime||0)<dA;return r&&(n.legendLastTouchClickId=null,n.legendLastTouchClickTime=0),r}function yA(t){var e;const n=(e=t.config.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Ra(n)&&n||!1,i=!isNaN(n)&&n||null;return{passive:!r&&i===null}}var TA={initLegend(){var t;const e=this,{config:n,$el:r}=e;if(e.legendItemTextBox={},e.state.legendHasRendered=!1,e.state.isCanvasMode){n.legend_show?(t=e.updateHtmlLegend)==null||t.call(e):e.state.hiddenLegendIds=new Set(e.mapToIds(e.data.targets));return}n.legend_show?(n.legend_contents_bindto||(r.legend=e.$el.svg.append("g").classed($e.legend,!0).attr("transform",e.getTranslate("legend"))),e.updateLegend()):e.state.hiddenLegendIds=new Set(e.mapToIds(e.data.targets))},updateLegend(t,e,n){var r;const i=this,{config:s,state:o,scale:l,$el:c}=i,u=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};u.withTransition=ia(u,"withTransition",!0),u.withTransitionForTransform=ia(u,"withTransitionForTransform",!0),s.legend_contents_bindto&&s.legend_contents_template?i.updateLegendTemplate():o.hasTreemap||i.updateLegendElement(t||i.mapToIds(i.data.targets),u),(r=c.legend)==null||r.selectAll(`.${$e.legendItem}`).classed($e.legendItemHidden,function(f){const d=!i.isTargetToShow(f);return d&&(this.style.opacity=null),d}),i.updateScales(!1,!l.zoom),i.updateSvgSize(),i.transformAll(u.withTransitionForTransform,n),o.legendHasRendered=!0},updateLegendTemplate(){const t=this,{config:e,$el:n}=t,r=Yt(e.legend_contents_bindto),i=e.legend_contents_template;if(!r.empty()){const s=t.mapToIds(t.data.targets),o=[];let l="";s.forEach(u=>{const f=ie(i)?Gr(i.call(t.api,u,t.color(u),t.api.data(u)[0].values)):Pa(i,{COLOR:t.color(u),TITLE:u});f&&(o.push(u),l+=f)});const c=r.html(l).selectAll(function(){return this.childNodes}).data(o);t.setLegendItem(c),n.legend=r}},updateSizeForLegend(t){const e=this,{config:n,state:{isLegendTop:r,isLegendLeft:i,isLegendRight:s,isLegendInset:o,current:l}}=e,{width:c,height:u}=t,f={top:r?e.getCurrentPaddingByDirection("top")+n.legend_inset_y+5.5:l.height-u-e.getCurrentPaddingByDirection("bottom")-n.legend_inset_y,left:i?e.getCurrentPaddingByDirection("left")+n.legend_inset_x+.5:l.width-c-e.getCurrentPaddingByDirection("right")-n.legend_inset_x+.5};e.state.margin3={top:s?0:o?f.top:l.height-u,right:NaN,bottom:0,left:s?l.width-c:o?f.left:0}},transformLegend(t){const e=this,{$el:{legend:n},$T:r}=e;r(n,t).attr("transform",e.getTranslate("legend"))},updateLegendItemColor(t,e){const n=this,{legend:r}=n.$el;if(r){const i=n.getLegendItemById(t);i&&Yt(i).select("line").style("stroke",e)}},getLegendWidth(){const t=this,{current:{width:e},isLegendRight:n,isLegendInset:r,legendItemWidth:i,legendStep:s}=t.state;return t.config.legend_show?n||r?i*(s+1):e:0},getLegendHeight(){var t;const e=this,{current:n,isLegendRight:r,legendItemHeight:i,legendStep:s}=e.state,l=((t=e.config.padding)==null?void 0:t.mode)==="fit"?10:20;return e.config.legend_show?r?n.height:Math.max(l,i)*(s+1):0},opacityForUnfocusedLegend(t){return t.classed($e.legendItemHidden)?null:"0.3"},toggleFocusLegend(t,e){const n=this,{$el:{legend:r},$T:i}=n,s=n.mapToTargetIds(t);r&&i(r.selectAll(`.${$e.legendItem}`).filter(o=>s.indexOf(o)>=0).classed(nn.legendItemFocused,e)).style("opacity",function(){return e?null:n.opacityForUnfocusedLegend.call(n,Yt(this))})},revertLegend(){const t=this,{$el:{legend:e},$T:n}=t;e&&n(e.selectAll(`.${$e.legendItem}`).classed(nn.legendItemFocused,!1)).style("opacity",null)},showLegend(t){const e=this,{config:n,$el:r,$T:i}=e;n.legend_show||(n.legend_show=!0,r.legend?r.legend.style("visibility",null):e.initLegend(),!e.state.legendHasRendered&&e.updateLegend()),e.removeHiddenLegendIds(t),i(r.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend(t){const e=this,{config:n,$el:{legend:r}}=e;n.legend_show&&lr(t)&&(n.legend_show=!1,r==null||r.style("visibility","hidden")),e.addHiddenLegendIds(t),r==null||r.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox(t,e){const n=this,{cache:r,state:i}=n;let s;const o=Oe.legendItemTextBox;return t&&(s=!i.redrawing&&r.get(o)||{},s[t]||(s[t]=n.getTextRect(e,$e.legendItem),r.add(o,s)),s=s[t]),s},setLegendItem(t){const e=this,{$el:n,api:r,config:i,state:s}=e,o=s.inputType==="touch",l=e.hasType("gauge"),c=i.boost_useCssRule,u=i.legend_item_interaction,f=u.dblclick?"dblclick":"click",d=u||ie(i.legend_item_onclick),h=o?yA(e):void 0,m=function(S,E){var C;if(!Ne(i.legend_item_onclick,r,E,!s.hiddenTargetIds.has(E))){const{altKey:w,type:$}=S,z=Yt(this);$==="dblclick"||w?s.hiddenTargetIds.size&&!z.classed($e.legendItemHidden)?r.show():(r.hide(),r.show(E)):(r.toggle(E),z.classed(nn.legendItemFocused,!1))}o&&(e.hideTooltip(),(C=e.hideGridFocus)==null||C.call(e,!0))};t.attr("class",function(S){const E=Yt(this);return(!E.empty()&&E.attr("class")||"")+e.generateClass($e.legendItem,S)}).style("visibility",S=>e.isLegendToShow(S)?null:"hidden"),i.interaction_enabled&&(c&&[[`.${$e.legendItem}`,"cursor:pointer"],[`.${$e.legendItem} text`,"pointer-events:none"],[`.${$e.legendItemPoint} text`,"pointer-events:none"],[`.${$e.legendItemTile}`,"pointer-events:none"],[`.${$e.legendItemEvent}`,"fill-opacity:0"]].forEach(S=>{const[E,C]=S;e.setCssRule(!1,E,[C])(n.legend)}),t.on(f,d?function(S,E){o&&S.type==="click"&&xA(e,E)||m.call(this,S,E)}:null),o&&f==="click"&&d&&t.on("touchstart",function(S,E){gA(e,E,S)},h).on("touchmove",S=>{Av(e,S)},h).on("touchend",function(S,E){pA(e,E,S)&&(mA(e,E),m.call(this,S,E))},h),!o&&t.on("mouseout",u||ie(i.legend_item_onout)?function(S,E){Ne(i.legend_item_onout,r,E,!s.hiddenTargetIds.has(E))||(Yt(this).classed(nn.legendItemFocused,!1),l&&e.undoMarkOverlapped(e,`.${ar.gaugeValue}`),e.api.revert())}:null).on("mouseover",u||ie(i.legend_item_onover)?function(S,E){Ne(i.legend_item_onover,r,E,!s.hiddenTargetIds.has(E))||(Yt(this).classed(nn.legendItemFocused,!0),l&&e.markOverlapped(E,e,`.${ar.gaugeValue}`),!s.transiting&&e.isTargetToShow(E)&&r.focus(E))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",e.getStylePropValue("pointer"))),vA(e,t)},getLegendItemById(t){var e;const n=this,r=n.cache.get(Oe.legendItemMap);if(r&&r instanceof Map)return r.get(t)||null;const i=(e=n.$el.legend)==null?void 0:e.selectAll(`.${$e.legendItem}`).filter(s=>s===t);return(i==null?void 0:i.node())||null},updateLegendElement(t,e){const n=this,{config:r,state:i,$el:{legend:s},$T:o}=n,c=r.legend_item_tile_type!=="circle",u=r.legend_item_tile_r,f={width:c?r.legend_item_tile_width:u*2,height:c?r.legend_item_tile_height:u*2},d={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:f.width+5,totalLength:0},h={offsets:{},widths:{},heights:{},margins:[0],steps:{}};let m,S,E;const C=t.filter(q=>!sn(r.data_names[q])||r.data_names[q]!==null),w=e.withTransition,$=i.isLegendRight||i.isLegendInset,z=hA.bind(n),B=n.getUpdateLegendPositions(C,d,h,$);i.isLegendInset&&(d.step=r.legend_inset_step?r.legend_inset_step:C.length,i.legendStep=d.step),i.isLegendRight?(m=q=>d.max.width*h.steps[q],S=q=>h.margins[h.steps[q]]+h.offsets[q]):i.isLegendInset?(m=q=>d.max.width*h.steps[q]+10,S=q=>h.margins[h.steps[q]]+h.offsets[q]):(m=q=>h.margins[h.steps[q]]+h.offsets[q],S=q=>d.max.height*h.steps[q]);const W={xText:(q,st)=>m(q,st)+4+f.width,xRect:(q,st)=>m(q,st),x1Tile:(q,st)=>m(q,st)-2,x2Tile:(q,st)=>m(q,st)-2+f.width,yText:(q,st)=>S(q,st)+9,yRect:(q,st)=>S(q,st)-5,yTile:(q,st)=>S(q,st)+4};n.generateLegendItem(C,f,B,W,$,z),E=s.select(`.${$e.legendBackground} rect`),i.isLegendInset&&d.max.width>0&&E.size()===0&&(E=s.insert("g",`.${$e.legendItem}`).attr("class",$e.legendBackground).append("rect")),r.legend_tooltip&&s.selectAll("title").data(C).text(q=>z(q,!1));const H=s.selectAll("text").data(C).text(q=>z(q)).each(function(q,st){B(this,q,st)});o(H,w).attr("x",W.xText).attr("y",W.yText);const _=s.selectAll(`rect.${$e.legendItemEvent}`).data(C);o(_,w).attr("width",q=>h.widths[q]).attr("height",q=>h.heights[q]).attr("x",W.xRect).attr("y",W.yRect),n.updateLegendItemPos(C,w,W),E&&o(E,w).attr("height",n.getLegendHeight()-12).attr("width",d.max.width*(d.step+1)+10),i.legendItemWidth=d.max.width,i.legendItemHeight=d.max.height,i.legendStep=d.step},getUpdateLegendPositions(t,e,n,r){const i=this,{config:s,state:o}=i;return function(l,c,u){const f=u===0,d=u===t.length-1,h=i.getLegendItemTextBox(c,l),m=h.width+e.tileWidth+(d&&!r?0:e.padding.right)+s.legend_padding,S=h.height+e.padding.top,E=r?S:m,C=r?i.getLegendHeight():i.getLegendWidth();let w;const $=function(B,W){W||(w=(C-e.totalLength-E)/2,w<e.posMin&&(w=(C-E)/2,e.totalLength=0,e.step++)),n.steps[B]=e.step,n.margins[e.step]=o.isLegendInset?10:w,n.offsets[B]=e.totalLength,e.totalLength+=E};if(f&&(e.totalLength=0,e.step=0,e.max.width=0,e.max.height=0),s.legend_show&&!i.isLegendToShow(c)){n.widths[c]=0,n.heights[c]=0,n.steps[c]=0,n.offsets[c]=0;return}n.widths[c]=m,n.heights[c]=S,(!e.max.width||m>=e.max.width)&&(e.max.width=m),(!e.max.height||S>=e.max.height)&&(e.max.height=S);const z=r?e.max.height:e.max.width;if(s.legend_equally){for(const B in n.widths)n.widths[B]=e.max.width;for(const B in n.heights)n.heights[B]=e.max.height;w=(C-z*t.length)/2,w<e.posMin?(e.totalLength=0,e.step=0,t.forEach(B=>$(B))):$(c,!0)}else $(c)}},generateLegendItem(t,e,n,r,i,s){const o=this,{config:l,state:c,$el:{legend:u}}=o,f=l.legend_usePoint,d=l.legend_item_tile_r,h=l.legend_item_tile_type,m=h!=="circle",S=-200,E=u.selectAll(`.${$e.legendItem}`).data(t).enter().append("g");if(o.setLegendItem(E),l.legend_tooltip&&E.append("title").text(C=>C),E.append("text").text(C=>s(C)).each(function(C,w){n(this,C,w)}).style("pointer-events",o.getStylePropValue("none")).attr("x",i?r.xText:S).attr("y",i?S:r.yText),E.append("rect").attr("class",$e.legendItemEvent).style("fill-opacity",o.getStylePropValue("0")).attr("x",i?r.xRect:S).attr("y",i?S:r.yRect),f){const C=[],w=o.getValidPointPattern();E.append($=>{C.indexOf($)===-1&&C.push($);let z=w[C.indexOf($)%w.length];return z==="rectangle"&&(z="rect"),Ye.createElementNS(_t.svg,"hasValidPointType"in o&&o.hasValidPointType(z)?z:"use")}).attr("class",$e.legendItemPoint).style("fill",zo.bind(o)).style("pointer-events",o.getStylePropValue("none")).attr("href",($,z,B)=>{const H=B[z].nodeName.toLowerCase(),_=o.getTargetSelectorSuffix($);return H==="use"?`#${c.datetimeId}-point${_}`:void 0})}else E.append(m?"line":h).attr("class",$e.legendItemTile).style("stroke",zo.bind(o)).style("pointer-events",o.getStylePropValue("none")).call(C=>{h==="circle"?C.attr("r",d).style("fill",zo.bind(o)).attr("cx",i?r.x2Tile:S).attr("cy",i?S:r.yTile):m&&C.attr("stroke-width",e.height).attr("x1",i?r.x1Tile:S).attr("y1",i?S:r.yTile).attr("x2",i?r.x2Tile:S).attr("y2",i?S:r.yTile)})},updateLegendItemPos(t,e,n){const r=this,{config:i,$el:{legend:s},$T:o}=r,l=i.legend_usePoint,c=i.legend_item_tile_type,u=c!=="circle";if(l){const f=s.selectAll(`.${$e.legendItemPoint}`).data(t),d=i.legend_item_tile_type!=="circle",h=d?i.legend_item_tile_width:i.legend_item_tile_r*2,m=d?i.legend_item_tile_height:i.legend_item_tile_r*2,S=h*.75,E=m*.75,C=h/8,w=m/8;o(f,e).each(function(){const $=this.nodeName.toLowerCase();let z="x",B="y",W=null,H=null,_=null;$==="circle"?(z="cx",B="cy",W=Math.min(S,E)/2):$==="rect"&&(H=S,_=E);const q=Yt(this).attr("transform",null).attr("x",null).attr("y",null).attr("cx",null).attr("cy",null).attr("r",W).attr("width",H).attr("height",_);$==="use"?q.attr("transform",st=>`translate(${n.x1Tile(st)} ${n.yTile(st)-m/2}) scale(${C} ${w})`):q.attr(z,st=>n.x1Tile(st)+(h-(H||0))/2).attr(B,st=>n.yTile(st)-(_||0)/2)})}else{const f=s.selectAll(`.${$e.legendItemTile}`).data(t);o(f,e).style("stroke",zo.bind(r)).call(d=>{c==="circle"?d.attr("cx",h=>{const m=n.x2Tile(h);return m-(m-n.x1Tile(h))/2}).attr("cy",n.yTile):u&&d.attr("x1",n.x1Tile).attr("y1",n.yTile).attr("x2",n.x2Tile).attr("y2",n.yTile)})}}},bA={redraw(t={}){var e,n,r,i,s,o,l,c,u,f;const d=this,{config:h,state:m,$el:S}=d,{main:E,treemap:C}=S;m.redrawing=!0,m.redrawGeneration++,(m.dirty.data||m.dirty.visibility||t.initializing)&&m.dataGeneration++,(t.initializing||m.dirty.size||m.dirty.data||!m.rendered)&&d.cache.remove([Oe.svgLeft]);const w=d.filterTargetsToShow(d.data.targets);m._targetsToShow=w;const $={data:m.dirty.data,visibility:m.dirty.visibility,size:m.dirty.size};m.dirty.data=!1,m.dirty.visibility=!1,m.dirty.size=!1;const{flow:z,initializing:B}=t,W=d.getWithOption(t),H=W.Transition?h.transition_duration:0,_=W.TransitionForExit?H:0,q=W.TransitionForAxis?H:0,st=(e=d.axis)==null?void 0:e.generateTransitions(q),it=$.data||$.visibility||B;if(m.isCanvasMode&&(d.setContainerSize(),(n=d.updateHtmlLegend)==null||n.call(d)),d.updateSizes(B),m.isCanvasMode){const ot=d.scale.zoom,ct=ot==null?void 0:ot.domain();ot&&(d.scale.zoom=null),d.updateScales(B,W.UpdateXDomain),ot&&(ot.range(d.scale.x.range()),ct&&ot.domain(ct),d.scale.zoom=d.getCustomizedXScale(ot),d.axis.x.scale(d.scale.zoom),d.scale.x.domain(h.zoom_rescale?ct:d.org.xDomain),d.scale.subX.domain(d.org.xDomain)),m.hasAxis&&d.axis.syncAxisDomains(w,W,z),m.hasAxis&&((r=d.applyCanvasSubchartDomain)==null||r.call(d));const gt=it?d.getDrawShape():m._cachedDrawShape||d.getDrawShape();it&&(m._cachedDrawShape=gt),h.legend_show&&S.legend&&!(h.legend_contents_bindto&&h.legend_contents_template)&&((i=d.positionHtmlLegend)==null||i.call(d)),(s=d.resizeCanvas)==null||s.call(d),m.canvasFocusKey=null,d.renderCanvasFrame(gt,null,!0),B&&d.updateTypesElements(),d.callPluginHook("$redraw",t,0),m.redrawing=!1,m._targetsToShow=null,m._cachedDrawShape=null,d.mapToIds(d.data.targets).forEach(tt=>{m.withoutFadeIn[tt]=!0}),Ne(h.onrendered,d.api);return}W.Legend&&h.legend_show?(t.withTransition=!!H,!C&&d.updateLegend(d.mapToIds(d.data.targets),t,st)):W.Dimension&&d.updateDimension(!0),h.data_empty_label_text&&E.select(`text.${En.text}.${ze.empty}`).attr("x",m.width/2).attr("y",m.height/2).text(h.data_empty_label_text).style("display",w.length?"none":null),(o=d.redrawTitle)==null||o.call(d),m.hasAxis?(d.axis.redrawAxis(w,W,st,z,B),(l=d.hasGrid)!=null&&l.call(d)&&d.updateGrid(),h.regions.length&&((c=d.updateRegion)==null||c.call(d)),["bar","candlestick","line","area"].forEach(ot=>{const ct=Ln(ot);(/^(line|area)$/.test(ot)&&d.hasTypeOf(ct)||d.hasType(ot))&&it&&d[`update${ct}`](W.TransitionForExit)}),S.text&&E.selectAll(`.${on.selectedCircles}`).filter(d.isBarType.bind(d)).selectAll("circle").remove(),h.interaction_enabled&&!z&&W.EventRect&&(d.redrawEventRect(),(u=d.bindZoomEvent)==null||u.call(d))):(S.arcs&&d.redrawArc(H,_,W.Transform),S.radar&&d.redrawRadar(),S.polar&&d.redrawPolar(),S.funnel&&d.redrawFunnel(),C&&d.updateTreemap(_)),!m.resizing&&!C&&(d.hasPointType()||m.hasRadar)?it&&d.updateCircle():(f=d.hasLegendDefsPoint)!=null&&f.call(d)&&d.data.targets.forEach(d.point("create",this)),d.hasDataLabel()&&!d.hasArcType(null,["radar"])&&it&&d.updateText(),B&&d.updateTypesElements(),d.generateRedrawList(w,z,H,W.Subchart,it),d.updateTooltipOnRedraw(),d.callPluginHook("$redraw",t,H)},generateRedrawList(t,e,n,r,i=!0){const s=this,{config:o,state:l}=s,c=i?s.getDrawShape():l._cachedDrawShape||s.getDrawShape();i&&(l._cachedDrawShape=c),l.hasAxis&&o.subchart_show&&s.redrawSubchart(r,n,c);const u=e&&s.generateFlow({targets:t,flow:e,duration:e.duration,shape:c,xv:s.xv.bind(s)}),f=(n||u)&&os(),d=s.getRedrawList(c,e,u,f),h=()=>{u&&u(),l.redrawing=!1,l._targetsToShow=null,l._cachedDrawShape=null,Ne(o.onrendered,s.api)};if(f&&d.length){const m=Mh();ov().duration(n).each(()=>{d.flatMap(S=>S).forEach(S=>m.add(S))}).call(m,h)}else l.transiting||h();s.mapToIds(s.data.targets).forEach(m=>{l.withoutFadeIn[m]=!0})},getRedrawList(t,e,n,r){const i=this,{config:s,state:{hasAxis:o,hasRadar:l,hasTreemap:c},$el:{grid:u}}=i,{cx:f,cy:d,xForText:h,yForText:m}=t.pos,S=[];if(o){i.redrawGrid&&(s.grid_x_lines.length||s.grid_y_lines.length)&&S.push(i.redrawGrid(r)),i.redrawRegion&&s.regions.length&&S.push(i.redrawRegion(r));for(const E in t.type){const C=Ln(E),w=t.type[E];(/^(area|line)$/.test(E)&&i.hasTypeOf(C)||i.hasType(E))&&S.push(i[`redraw${C}`](w,r))}!e&&u.main&&i.updateGridFocus&&S.push(i.updateGridFocus())}return(!i.hasArcType()||l)&&vn(s.data_labels)&&s.data_labels!==!1&&S.push(i.redrawText(h,m,e,r)),(i.hasPointType()||l)&&!i.isPointFocusOnly()&&i.redrawCircle&&S.push(i.redrawCircle(f,d,r,n)),c&&S.push(i.redrawTreemap(r)),S},updateAndRedraw(t={}){const e=this,{config:n,state:r}=e;let i;t.withTransition=ia(t,"withTransition",!0),t.withTransform=ia(t,"withTransform",!1),t.withLegend=ia(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=ia(t,"withTransitionForTransform",t.withTransition),t.withLegend&&n.legend_show||(r.hasAxis&&(i=e.axis.generateTransitions(t.withTransitionForAxis?n.transition_duration:0)),e.updateScales(),e.updateSvgSize(),e.transformAll(t.withTransitionForTransform,i)),e.redraw(t)}},SA={setContainerSize(){const t=this,{state:e}=t;e.current.width=t.getCurrentWidth(),e.current.height=t.getCurrentHeight()},getCurrentWidth(){const t=this;return t.config.size_width||t.getParentRectValue("width")},getCurrentHeight(){var t,e;const n=this,{config:r,state:i,$el:s}=n;let o=r.size_height;if(!o){const l=i.isCanvasMode?(t=s.chart)==null?void 0:t.node():null,c=l==null?void 0:l.style.minHeight;c&&(l.style.minHeight=""),o=n.getParentHeight(),c&&(l.style.minHeight=c);const u=l&&parseFloat((e=n.canvasEngine)==null?void 0:e.canvas.style.height)||0,f=i.current.height-u;f>0&&Math.round(o)===Math.round(u)&&(o+=f)}return o>0?o:320/(n.hasType("gauge")&&!r.gauge_fullCircle?2:1)},getParentRectValue(t){const e=`offset${Ln(t)}`;let n=this.$el.chart.node(),r=0;for(;r<30&&n&&n.tagName!=="BODY";){try{r=ln(n,!0)[t]}catch(s){e in n&&(r=n[e])}n=n.parentNode}const i=Ye.body[e];return r>i&&(r=i),r},getParentHeight(){const t=this.$el.chart.style("height");let e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft(t){var e,n,r;const i=this,{cache:s,config:o,state:{hasAxis:l},$el:c}=i;if(t){const st=s.get(Oe.svgLeft);if(st!==null)return st}const u=o.axis_rotated,f=u||!u&&!o.axis_y_inner,d=u?Rn.axisX:Rn.axisY,h=c.main.select(`.${d}`).node(),m=l&&o[`axis_${u?"x":"y"}_label`],E=l&&(je(m)||je(m.text)||/^inner-/.test(m==null?void 0:m.position))?c.main.select(`.${d}-label`):null,C=E&&!E.empty()?E.node():null,w=!t,$={label:C?ln(C,w):null,leftAxis:h&&f?ln(h,w):null,chart:ln(c.chart.node(),w)},z=(n=(e=$.label)==null?void 0:e.left)!=null?n:0,B=(r=$.leftAxis)!=null?r:{right:0},W=$.chart.left+z,H=i.hasArcType(),_=B.right-W-(H?0:i.getCurrentPaddingByDirection("left",t)),q=_>0?_:0;return s.add(Oe.svgLeft,q),q},previewResize(){var t,e,n;const r=this,{state:i,$el:s}=r,{current:o}=i,l=r.getCurrentWidth(),c=r.getCurrentHeight();if(!(!l||!c||!o.width||!o.height||l===o.width&&c===o.height)){if(i.isCanvasMode){const u=(t=r.canvasEngine)==null?void 0:t.canvas;if(!u)return;s.chart.style("min-height",`${c}px`),u.style.width=`${l}px`,u.style.height=`${Math.max(0,c-((n=(e=r.getCanvasBottomLegendHeight)==null?void 0:e.call(r))!=null?n:0))}px`}else if(s.svg)s.svg.attr("viewBox",`0 0 ${o.width} ${o.height}`).attr("preserveAspectRatio","none").attr("width",l).attr("height",c);else return;i.resizePreview=!0}},clearResizePreview(){const t=this,{config:e,state:n,$el:r}=t;n.resizePreview&&(n.resizePreview=!1,!n.isCanvasMode&&r.svg&&e.resize_auto!=="viewBox"&&r.svg.attr("viewBox",null).attr("preserveAspectRatio",null))},updateDimension(t){var e,n;const r=this,{config:i,state:{hasAxis:s,isCanvasMode:o},$el:l}=r;if(s&&!t&&r.axis.x&&i.axis_rotated&&((e=r.axis.subX)==null||e.create(l.axis.subX)),r.updateScales(t),o){(n=r.resizeCanvas)==null||n.call(r);return}r.updateSvgSize(),r.transformAll(!1)},updateSvgSize(){var t;const e=this,{config:n,state:{clip:r,current:i,hasAxis:s,width:o,height:l},$el:{svg:c}}=e;if(!c){(t=e.resizeCanvas)==null||t.call(e);return}if(e.clearResizePreview(),n.resize_auto==="viewBox"?c.attr("viewBox",`0 0 ${i.width} ${i.height}`):c.attr("width",i.width).attr("height",i.height),s){const u=c.select(`.${Th.brush} .overlay`),f={width:0,height:0};u.size()&&(f.width=+u.attr("width"),f.height=+u.attr("height")),c.selectAll([`#${r.id}`,`#${r.idGrid}`]).select("rect").attr("width",o).attr("height",l),c.select(`#${r.idXAxis}`).select("rect").call(e.setXAxisClipPath.bind(e)),c.select(`#${r.idYAxis}`).select("rect").call(e.setYAxisClipPath.bind(e)),r.idSubchart&&c.select(`#${r.idSubchart}`).select("rect").attr("width",o).attr("height",f.height)}},getCurrentPaddingByDirection(t,e=!1,n=!1){var r;const i=this,{config:s,$el:o,state:{hasAxis:l,isCanvasMode:c}}=i,u=s.axis_rotated,f=((r=s.padding)==null?void 0:r.mode)==="fit",d=ae(s[`padding_${t}`])?s[`padding_${t}`]:void 0,h=l?{top:u?"y2":null,bottom:u?"y":"x",left:u?"x":"y",right:u?null:"y2"}[t]:null,m=/^(left|right)$/.test(t),S=h&&s[`axis_${h}_inner`],E=h&&s[`axis_${h}_show`],C=h?s[`axis_${h}_axes`].length:0;let w=h?m?i.getAxisWidthByAxisId(h,e):i.getHorizontalAxisHeight(h):0;const $=20;let z=0;!f&&m&&(w=py(w));let B=l&&m&&(S||mn(d)&&!E)?0:f?(E?w:0)+(d!=null?d:0):mn(d)?w:d;return m&&l?(h&&(f||S)&&s[`axis_${h}_label`].text&&(B+=i.axis.getAxisLabelPosition(h).isOuter?$:0),t==="right"?(B+=u?!f&&mn(d)?10:2:!E||S?f?2:1:0,B+=n?i.axis.getXAxisTickTextY2Overflow($):0):t==="left"&&u&&mn(d)&&(B=s.axis_x_show?f?w:Math.max(w,40):1)):t==="top"?((o.title&&o.title.node()||c&&s.title_text)&&(B+=i.getTitlePadding()),z=u&&!S?C:0):t==="bottom"&&l&&u&&!E&&(B+=1),B+w*C-z},getCurrentPadding(t=!1){const e=this,[n,r,i,s]=["top","bottom","left","right"].map(o=>e.getCurrentPaddingByDirection(o,null,t));return{top:n,bottom:r,left:i,right:s}},getResettedPadding(t){const e=this,{config:n}=e,r=ae(t);let i=r?0:{};return n.padding===!1?!r&&Object.keys(t).forEach(s=>{i[s]=!lr(n.data_labels)&&n.data_labels!==!1&&s==="top"?t[s]:0}):i=t,i},updateSizes(t){var e,n,r,i,s;const o=this,{config:l,state:c,$el:{legend:u}}=o,f=l.axis_rotated,d=o.hasArcType()||c.hasFunnel||c.hasTreemap,h=((e=l.padding)==null?void 0:e.mode)==="fit";!t&&o.setContainerSize();const m=u?o.getLegendWidth():0,S=u?o.getLegendHeight():0,E={width:m,height:S};!d&&l.axis_x_show&&l.axis_x_tick_autorotate&&o.updateXAxisTickClip();const C={right:l.legend_show&&c.isLegendRight?m+(h?0:20):0,bottom:!l.legend_show||c.isLegendRight||c.isLegendInset?0:S},w=f||d?0:o.getHorizontalAxisHeight("x"),$=l.subchart_axis_x_show&&l.subchart_axis_x_tick_text_show?w:30,z=l.subchart_show&&!d?l.subchart_size_height+$:0,B=o.hasType("gauge")&&l.arc_needle_show&&!l.gauge_fullCircle&&!l.gauge_label_show?10:0,W=o.getCurrentPadding(!0);if(c.margin=!d&&f?{top:W.top,right:d?0:W.right+C.right,bottom:C.bottom+W.bottom,left:z+(d?0:W.left)}:{top:(h?0:4)+W.top,right:d?0:W.right+C.right,bottom:B+z+C.bottom+W.bottom,left:d?0:W.left},c.margin=o.getResettedPadding(c.margin),c.margin2=f?{top:c.margin.top,right:NaN,bottom:20+C.bottom,left:o.state.rotatedPadding.left}:{top:c.current.height-z-C.bottom,right:NaN,bottom:$+C.bottom,left:c.margin.left},c.margin3={top:0,right:NaN,bottom:0,left:0},(n=o.updateSizeForLegend)==null||n.call(o,E),c.width=c.current.width-c.margin.left-c.margin.right,c.height=c.current.height-c.margin.top-c.margin.bottom,c.width<0&&(c.width=0),c.height<0&&(c.height=0),c.width2=f?c.margin.left-c.rotatedPadding.left-c.rotatedPadding.right:c.width,c.height2=f?c.height:c.current.height-c.margin2.top-c.margin2.bottom,c.width2<0&&(c.width2=0),c.height2<0&&(c.height2=0),o.hasArcType()){const H=o.hasType("gauge"),_=l.legend_show&&c.isLegendRight,q=(r=c.hasRadar&&o.cache.get(Oe.radarTextWidth))!=null?r:0;c.arcWidth=c.width-(_?E.width+10:0)-q,c.arcHeight=c.height-(_&&!H?0:10),(i=l.arc_rangeText_values)!=null&&i.length&&(H?(c.arcWidth-=25,c.arcHeight-=10,c.margin.left+=10):(c.arcHeight-=20,c.margin.top+=10)),H&&!l.gauge_fullCircle&&(c.arcHeight+=c.height-o.getPaddingBottomForGauge()),(s=o.updateRadius)==null||s.call(o)}c.isLegendRight&&d&&(c.margin3.left=c.arcWidth/2+c.radiusExpanded*1.1)}},AA={setCssRule(t,e,n,r){const i=this,{config:s,state:{cssRule:o,style:l}}=i;return s.boost_useCssRule?c=>{c.each(u=>{const f=r&&(r==null?void 0:r.call(i,u)),d=`${t?`.${Tn.shapes+i.getTargetSelectorSuffix(u.id)}`:""}${e}`;e in o&&l.sheet.deleteRule(o[d]),i.state.cssRule[d]=W1(l,d,n.filter(Boolean).map(h=>je(f)&&h.indexOf(":")===-1?`${h}: ${f}`:h||""))})}:()=>{}},getStylePropValue(t){const{config:{boost_useCssRule:e}}=this;return e?null:ie(t)?t.bind(this):t}};function Ev(t){return typeof t=="string"?new fn([document.querySelectorAll(t)],[document.documentElement]):new fn([b(t)],hr)}function EA(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function CA(t,e,n,r,i){var s;const o=this,{value:l}=t,c=o.isCandlestickType(t),u=ae(l)&&l<0||c&&!((s=o.getCandlestickData(t))!=null&&s._isUp);let{x:f,y:d}=e;const h=4,m=h*2;return r?n==="start"?(f+=u?0:m,d+=h):n==="middle"?(f+=m,d-=m):n==="end"&&(u&&(f-=m),d+=h):(n==="start"?(f+=h,u&&(d+=m*2)):n==="middle"?d-=m:n==="end"&&(f-=h,u&&(d+=m*2)),i&&(d+=u?-17:c?13:7)),{x:f,y:d}}function Cv(t,e){var n;const r=this.config.data_labels_position,{id:i,index:s,value:o}=t;return(n=ie(r)?r.bind(this.api)(e,o,i,s,this.$el.text):(i in r?r[i]:r)[e])!=null?n:0}function IA(t,e,n){var r,i;const s=this,{config:o,$T:l}=s,c=o.axis_rotated,{border:{padding:u="3 5",radius:f=10,stroke:d="#000",strokeWidth:h=1,fill:m="none"}}=o.data_labels,S=jf(u),E=o.data_labels.border!==!0,C=ha(t);let w=Yt(t.previousElementSibling);(w.empty()||((r=w.node())==null?void 0:r.tagName)!=="rect"||!((i=w.attr("class"))!=null&&i.includes(n)))&&(w=Yt(t.parentNode).insert("rect",()=>t).attr("class",`${En.textBorderRect} ${n}`).attr("width",C.width+(E?S.left+S.right:0)).attr("height",C.height+(E?S.top+S.bottom:0)),E&&w.style("fill",m).style("stroke",d).style("stroke-width",`${h}px`).attr("rx",f).attr("ry",f)),l(w).attr("x",e.x-(E?S.left:0)-(c?0:C.width/2)).attr("y",e.y-(E?S.top:0)-C.height/4*3.2)}function Qc(t=0,e){const n=this,{config:r}=n,i=r[`${e}_label_threshold`]||0;return t>=i}function Iv(){const t=this,{$el:{text:e},config:n}=t;(t.state.arcWidth?t.getArcLabelConfig("image"):n.data_labels.image)&&e.filter(function(){const i=this.previousElementSibling;return i?i.tagName!=="image"||!i.classList.contains(En.textLabelImage):!0}).each(function(i){var s,o,l,c;const u=RA.call(t,i);if(!u)return;const{url:f,width:d,height:h,pos:m}=u;if(f){const S=Yt(this.parentNode);S==null||S.insert("image",`${(o=(s=this.getAttribute("class"))==null?void 0:s.replace(/(?:^(.)|\s)/g,".$1"))!=null?o:"text"}`).style("opacity","0").attr("href",E=>Pa(f,{ID:"id"in E?E.id:E.data.id})).attr("class",En.textLabelImage).style("pointer-events","none").attr("width",d).attr("height",h).attr("transform",m?`translate(${(l=m.x)!=null?l:0} ${(c=m.y)!=null?c:0})`:null)}})}function RA(t){var e;const n=this,{config:r,state:i}=n,s=i.arcWidth?n.getArcLabelConfig("image"):r.data_labels.image;if(ie(s))return(e=s.call(n.api,t.value,t.id,t.index))!=null?e:{url:"",width:0,height:0,pos:{x:0,y:0}};if(s){const{url:o="",width:l=0,height:c=0,pos:u}=s;return{url:o,width:l,height:c,pos:u}}return null}function Rv(t,e,n){var r;const i=this,{config:s,state:{arcWidth:o,hasTreemap:l}}=i,c=s.axis_rotated,u=Yt(t.previousElementSibling),f=d=>{var h;const m=d.style.opacity!=="0"&&d.style.fillOpacity!=="0";return(o?d.textContent:m)&&((h=this.previousElementSibling)==null?void 0:h.tagName)!=="image"};if(!u.empty()&&((r=u.node())==null?void 0:r.tagName)==="image"){const d=n||ln(t),h=+u.attr("width")/2,m=+u.attr("height")/2;let S=e.x-h,E=e.y-m-d.height/2;c?e.x+=h:(l&&(S=-h,E=-(m*2+d.height)),i.hasType("pie")||i.hasType("polar")||(e.y+=m)),i.$T(u).style("opacity",f(t)?null:"0").attr("x",S).attr("y",E)}}function wA(t){return Kf(t,e=>e,e=>ha(e,!0))}var OA={opacityForText(t){const e=this;return e.isBarType(t)&&!Qc.call(e,Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel()?null:"0"},initText(){const{$el:t}=this;t.main.select(`.${ze.chart}`).append("g").attr("class",En.chartTexts).style("pointer-events",t.funnel||t.treemap?"none":null)},updateTargetsForText(t){const e=this,n=e.getChartClass("Text"),r=e.getClass("texts","id"),i=e.classFocus.bind(e);e.$el.main.select(`.${En.chartTexts}`).selectAll(`.${En.chartText}`).data(e.filterNullish(t)).attr("class",l=>`${n(l)}${i(l)}`.trim()).enter().append("g").style("opacity","0").attr("class",n).call(e.setCssRule(!0,` .${En.text}`,["fill","pointer-events:none"],e.updateTextColor)).append("g").attr("class",r)},updateText(){const t=this,{$el:e,$T:n,config:r,axis:i}=t,s=t.getClass("text","index"),o=r.data_labels.centered,l=e.main.selectAll(`.${En.texts}`).selectAll(`.${En.text}`).data(t.labelishData.bind(t));n(l.exit()).style("fill-opacity","0").remove(),e.text=l.enter().append("text").merge(l).attr("class",s).attr("text-anchor",c=>{let f=r[`axis_${i==null?void 0:i.getId(c.id)}_inverted`]?c.value>0:c.value<0;if(t.isCandlestickType(c)){const d=t.getCandlestickData(c);f=!(d!=null&&d._isUp)}else if(t.isTreemapType(c))return o?"middle":"start";return r.axis_rotated?f?"end":"start":"middle"}).style("fill",t.getStylePropValue(t.updateTextColor)).style("fill-opacity","0").each(function(c,u,f){const d=Yt(this);let{value:h}=c;if(t.isBubbleZType(c))h=t.getBubbleZData(h,"z");else if(t.isCandlestickType(c)){const m=t.getCandlestickData(c);m&&(h=m.close)}h=t.isTreemapType(c)?t.treemapDataLabelFormat(c)(d):t.dataLabelFormat(c.id)(h,c.id,c.index,f),ae(h)?this.textContent=h:ci(d,h,void 0,!0)}),Iv.call(t)},updateTextColor(t){const e=this,{config:n}=e,r=n.data_labels_colors,i=e.isArcType(t)&&!e.isRadarType(t)||e.isFunnelType(t)||e.isTreemapType(t)?null:e.color(t);let s;if(je(r))s=r;else if(He(r)){const{id:o}=t.data||t;s=r[o]}else ie(r)&&(s=r.bind(e.api)(i,t));if(e.isCandlestickType(t)&&!ie(r)){const o=e.getCandlestickData(t);if(!(o!=null&&o._isUp)){const l=n.candlestick_color_down;s=He(l)?l[t.id]:l}}return s||i},updateTextBGColor(t,e){const n=this,{$el:{defs:r}}=n;let i="";if(e){const s=je(e)?"":n.getTargetSelectorSuffix("id"in t?t.id:t.data.id),o=r.select(["filter[id*='labels-bg","']"].join(s));if(o.size()&&(i=`url(#${o.attr("id")})`),ie(e)){n.generateTextBGColorFilter(e);const l=n.color(t),c=e.bind(n.api)(l,t);c?o.select("feFlood").attr("flood-color",c):i=""}}return i||null},redrawText(t,e,n,r){const i=this,{$T:s,axis:o,config:l,state:{hasTreemap:c}}=i,u=Cr(!0),f=l.axis_rotated,d=l.data_labels.rotate,h=EA(d),m=d?`rotate(${d})`:"",S=i.$el.text.style("fill",i.getStylePropValue(i.updateTextColor)).attr("filter",w=>i.updateTextBGColor.bind(i)(w,l.data_labels_backgroundColors)).style("fill-opacity",n?0:i.opacityForText.bind(i)),E=new Map,C=[];return S.each(function(w){const $=this;E.set($,{rect:ln($)}),l.data_labels.centered&&(i.isBarType(w)||i.isTreemapType(w))&&C.push($)}),C.length>0&&wA(C).forEach((w,$)=>{const z=E.get($);z&&(z.bbox=w)}),S.each(function(w,$){const z=E.get(this),B=s(c&&this.childElementCount?this.parentNode:this,!!(r&&(this.getAttribute("x")||this.getAttribute("transform"))),u),W=l[`axis_${o==null?void 0:o.getId(w.id)}_inverted`];let H={x:t.call(this,w,$,z),y:e.call(this,w,$,z)};d&&(H=CA.bind(i)(w,H,h,f,W),B.attr("text-anchor",h)),Rv.call(i,this,H,z==null?void 0:z.rect),this.childElementCount||d?B.attr("transform",`translate(${H.x} ${H.y}) ${m}`):B.attr("x",H.x).attr("y",H.y),l.data_labels.border&&IA.call(i,B.node(),H,`${En.textBorderRect}-${$}`)}),!0},getTextRect(t,e){var n,r;const i=this;let s,o,l;Array.isArray(t)?s=`${Oe.textRect}-${t.join("_")}`:(o=(r=(n=t.node)==null?void 0:n.call(t))!=null?r:t,/text/i.test(o.tagName)||(o=o.querySelector("text")),l=o.textContent,s=`${Oe.textRect}-${l.replace(/\W/g,"_")}`);const c=i.cache.get(s)||[];return c.length===0&&((i.$el.svg||i.$el.chart.select("svg")).selectAll(`.${ze.dummy}`).data(l?[l]:t).enter().append("text").style("visibility","hidden").style("font",o?Yt(o).style("font"):null).classed(e||ze.dummy,!0).text(u=>u).each(function(u,f){c[f]=ln(this)}).remove(),i.cache.add(s,c)),c.length>1?c:c[0]},generateXYForText(t,e){const n=this,{state:{hasRadar:r,hasFunnel:i,hasTreemap:s}}=n,o=Object.keys(t),l={},c=e?n.getXForText:n.getYForText;return i&&o.push("funnel"),r&&o.push("radar"),s&&o.push("treemap"),o.forEach(u=>{l[u]=n[`generateGet${Ln(u)}Points`](t[u],!1)}),function(u,f,d){const h=n.isAreaType(u)&&"area"||n.isBarType(u)&&"bar"||n.isCandlestickType(u)&&"candlestick"||n.isFunnelType(u)&&"funnel"||n.isRadarType(u)&&"radar"||n.isTreemapType(u)&&"treemap"||"line";return c.call(n,l[h](u,f),u,this,d)}},getCenteredTextPos(t,e,n,r,i){const s=this,{config:o}=s,l=o.axis_rotated,c=s.isBarType(t),u=s.isTreemapType(t);if(o.data_labels.centered&&(c||u)){const f=(i==null?void 0:i.bbox)||ha(n);if(c){const d=s.getRangedData(t,null,"bar")>=0;if(l){const h=(d?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+f.width/2;return d?-h-3:h+2}else{const h=(d?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+f.height/2;return d?h:-h-2}}else if(u)return r==="x"?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2-f.y-f.height/2}return 0},getXForText(t,e,n,r){var i,s,o;const l=this,{config:c}=l,u=c.axis_rotated,f=l.isFunnelType(e),d=l.isTreemapType(e);let h=t?t[0][0]:0;if(l.isCandlestickType(e))u?h=(i=l.getCandlestickData(e))!=null&&i._isUp?t[2][2]+4:t[2][1]-4:h+=(t[1][0]-h)/2;else if(f)if(t)h=(o=(s=t[2])==null?void 0:s[0])!=null?o:h;else return Ic(n,"x");else if(d)h+=c.data_labels.centered?0:5;else if(u){const m=c[`axis_${l.axis.getId(e.id)}_inverted`],S=l.isBarType(e)?4:6,E=e.value;h=t[2][1],h+=S*((m?E>0:E<0)?-1:1)}else h=l.hasType("bar")?(t[2][0]+t[0][0])/2:h;return(u||d||f)&&(h+=l.getCenteredTextPos(e,t,n,"x",r)),h+Cv.call(this,e,"x")},getYForText(t,e,n,r){var i,s;const o=this,{axis:l,config:c,state:u}=o,f=c.axis_rotated,d=c[`axis_${l==null?void 0:l.getId(e.id)}_inverted`],h=o.isBarType(e),m=o.isFunnelType(e),S=o.isTreemapType(e),E=c.point_r,C=(r==null?void 0:r.rect)||ln(n);let{value:w}=e,$=3,z;if(o.isCandlestickType(e))w=o.getCandlestickData(e),f?(z=t[0][0],z+=(t[1][0]-z)/2+$):(z=w&&w._isUp?t[2][2]-$:t[2][1]+$*4,d&&(z+=15*(w._isUp?1:-1)));else if(m)if(t)z=((s=(i=t[2])==null?void 0:i[1])!=null?s:t[0][1])+C.height/2-3;else return Ic(n,"y");else if(S)z=t[0][1]+(c.data_labels.centered?0:C.height+5);else if(f)z=(t[0][0]+t[2][0]+C.height*.6)/2;else if(z=t[2][1],ae(E)&&E>5&&(o.isLineType(e)||o.isScatterType(e))&&($+=c.point_r/2.3),w<0||w===0&&!u.hasPositiveValue&&u.hasNegativeValue)z+=d?h?-3:-5:C.height+(h?-$:$);else{let B=-$*2;h?B=-$:o.isBubbleType(e)&&(B=$),d&&(B=h?10:15),z+=B}return(!f||S)&&(z+=o.getCenteredTextPos(e,t,n,"y",r)),z+Cv.call(this,e,"y")},markOverlapped(t,e,n){const r=e.$el.arcs.selectAll(n),i=r.filter(f=>f.data.id!==t),s=r.filter(f=>f.data.id===t),o=Cc(s.node()),l=(f,d)=>Math.sqrt(f*f+d*d);if(!s.node())return;const c=parseInt(s.style("font-size"),10),u=[];i.each(function(){const f=Cc(this),d=l(o.e,o.f)>l(f.e,f.f)?s:Yt(this),h=Math.ceil(Math.abs(o.e-f.e))<Math.ceil(d.node().getComputedTextLength()),m=Math.ceil(Math.abs(o.f-f.f))<c;u.push({node:this,overlaps:h&&m})}),u.forEach(({node:f,overlaps:d})=>{Yt(f).classed(En.TextOverlapping,d)})},undoMarkOverlapped(t,e){t.$el.arcs.selectAll(e).each(function(){Ev([this,this.previousSibling]).classed(En.TextOverlapping,!1)})}};function wv(t="left",e){const n=ae(e);return t.includes("center")?n?e/2:"middle":t.includes("right")?n?e:"end":n?0:"start"}function PA(t){var e,n,r,i,s,o,l,c;const{config:u,$el:f}=t,d=((r=(n=(e=t.canvasTheme)==null?void 0:e.style)==null?void 0:n.title)==null?void 0:r.font)||((o=(s=(i=t.canvasTheme)==null?void 0:i.style)==null?void 0:s.label)==null?void 0:o.font)||"14px sans-serif",h=(c=(l=f.chart)==null?void 0:l.node)==null?void 0:c.call(l),m=h==null?void 0:h.ownerDocument;if(h&&m&&u.title_text){const S=m.createElementNS("http://www.w3.org/2000/svg","svg"),E=m.createElementNS("http://www.w3.org/2000/svg","text");S.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",E.setAttribute("class",En.title),E.style.font=d,E.textContent=String(u.title_text),S.appendChild(E),h.appendChild(S);const C=ln(E).height;if(S.remove(),C)return C}return u.title_text?parseFloat(d)||14:0}var MA={initTitle(){const t=this,{config:e,$el:n}=t;if(e.title_text){n.title=n.svg.append("g");const r=n.title.append("text").style("text-anchor",wv(e.title_position)).attr("class",En.title);ci(r,e.title_text,[.3,1.5])}},redrawTitle(){const t=this,{config:e,state:{current:n},$el:{title:r}}=t;if(r){const i=wv(e.title_position,n.width),s=(e.title_padding.top||0)+t.getTextRect(t.$el.title,En.title).height;r.attr("transform",`translate(${i}, ${s})`)}},getCanvasTitleHeight(){return PA(this)},getTitlePadding(){const t=this,{$el:{title:e},config:n,state:r}=t,i=n.title_padding.top||0,s=n.title_padding.bottom||0;if(r.isCanvasMode&&n.title_text)return i+t.getCanvasTitleHeight()+s;if(!(e!=null&&e.node()))return i+s;const o=e.node(),l=Ic(o,"y");if(l){const c=ha(o);return l+c.y+c.height+s}return i+t.getTextRect(e,En.title).height+s}};const LA=/(\r?\n|\t)/g,DA=/{{(.*)}}/;var FA={initTooltip(){const t=this,{config:e,$el:n}=t;n.tooltip=Yt(e.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.append("div").attr("class",bo.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip(){var t;const e=this,{config:n,$el:r,state:{hasAxis:i,hasRadar:s}}=e;if(n.tooltip_init_show){const o=!(i||s);(t=e.axis)!=null&&t.isTimeSeries()&&je(n.tooltip_init_x)&&(n.tooltip_init_x=Wn.call(e,n.tooltip_init_x)),e.api.tooltip.show({data:{[o?"index":"x"]:n.tooltip_init_x}});const l=n.tooltip_init_position;if(!n.tooltip_contents.bindto&&!lr(l)){const{top:c=0,left:u=50}=l;r.tooltip.style("top",je(c)?c:`${c}px`).style("left",je(u)?u:`${u}px`).style("display",null)}}},getTooltipHTML(...t){const e=this,{api:n,config:r}=e;return Gr(ie(r.tooltip_contents)?r.tooltip_contents.bind(n)(...t):e.getTooltipContent(...t))},getTooltipContent(t,e,n,r){var i;const s=this,{api:o,config:l,state:c,$el:u}=s,f=l.tooltip_format_title,d=l.tooltip_format_name,h=l.tooltip_format_value,m=ie(f)?f.bind(o):e,S=ie(d)?d.bind(o):(tt=>tt),E=ie(h)?h.bind(o):null,C=(tt,ft,lt,bt)=>{let St=E;return St||(c.hasTreemap||s.isStackNormalized()&&(!s.isStackNormalizedPerGroup()||s.isGrouped(lt))?St=(Mt,Ot)=>`${(Ot*100).toFixed(2)}%`:St=n),St(tt,ft,lt,bt)},w=l.tooltip_order,$=tt=>s.axis&&s.isBubbleZType(tt)?s.getBubbleZData(tt.value,"z"):s.getBaseValue(tt),z=s.levelColor?tt=>s.levelColor(tt.value):tt=>r(tt),B=l.tooltip_contents,W=B.template,H=s.mapToTargetIds();if(w===null&&l.data_groups.length){const tt=s.orderTargets(s.data.targets).map(ft=>ft.id).reverse();t.sort((ft,lt)=>{let bt=ft?ft.value:null,St=lt?lt.value:null;return bt>0&&St>0&&(bt=ft.id?tt.indexOf(ft.id):null,St=lt.id?tt.indexOf(lt.id):null),bt-St})}else if(/^(asc|desc)$/.test(w)){const tt=w==="asc";t.sort((ft,lt)=>{const bt=ft?$(ft):null,St=lt?$(lt):null;return tt?bt-St:St-bt})}else ie(w)&&t.sort(w.bind(o));const _=s.getTooltipContentTemplate(W),q=t.length;let st,it,ot,ct,gt;for(gt=0;gt<q;gt++){it=t[gt];const tt=it&&$(it);if(!(!it||!(tt||tt===0))){if(mn(st)){const ft=(c.hasAxis||c.hasRadar)&&m(it.x);st=Pa(_[0],{CLASS_TOOLTIP:bo.tooltip,TITLE:Ge(ft)?W?ft:`<tr><th colspan="2">${ft}</th></tr>`:""})}if(!it.ratio&&u.arcs&&(ot=["arc",s.$el.arcs.select(`path.${Ze.arc}-${it.id}`).data()[0]],it.ratio=s.getRatio(...ot)),ot=[it.ratio,it.id,it.index],s.isAreaRangeType(it)){const[ft,lt]=["high","low"].map(St=>C(s.getRangedData(it,St),...ot));ct=`<b>Mid:</b> ${C($(it),...ot)} <b>High:</b> ${ft} <b>Low:</b> ${lt}`}else if(s.isCandlestickType(it)){const[ft,lt,bt,St,Mt]=["open","high","low","close","volume"].map(Ot=>s.getRangedData(it,Ot,"candlestick")?C(s.getRangedData(it,Ot,"candlestick"),...ot):void 0);ct=`<b>Open:</b> ${ft} <b>High:</b> ${lt} <b>Low:</b> ${bt} <b>Close:</b> ${St}${Mt?` <b>Volume:</b> ${Mt}`:""}`}else if(s.isBarRangeType(it)){const{value:ft,id:lt,index:bt}=it;ct=`${C(ft,void 0,lt,bt)}`}else ct=C($(it),...ot);if(ct!==void 0){if(it.name===null)continue;const ft=S((i=it.name)!=null?i:it.id,...ot),lt=z(it),bt={CLASS_TOOLTIP_NAME:bo.tooltipName+s.getTargetSelectorSuffix(it.id),COLOR:W||!s.patterns?lt:`<svg><rect style="fill:${lt}" width="10" height="10"></rect></svg>`,NAME:ft,VALUE:ct};if(W&&He(B.text)){const St=H.indexOf(it.id);Object.keys(B.text).forEach(Mt=>{bt[Mt]=B.text[Mt][St]})}st+=Pa(_[1],bt)}}}return`${st}</table>`},getTooltipContentTemplate(t){return(t||`<table class="{=CLASS_TOOLTIP}"><tbody>
46
46
  {=TITLE}
47
47
  {{<tr class="{=CLASS_TOOLTIP_NAME}">
48
48
  <td class="name">${this.patterns?"{=COLOR}":'<span style="background-color:{=COLOR}"></span>'}{=NAME}</td>
49
49
  <td class="value">{=VALUE}</td>
50
50
  </tr>}}
51
- </tbody></table>`).replace(OA,"").split(PA)},setTooltipPosition(t,e){var n,r;const i=this,{config:o,scale:s,state:l,$el:{eventRect:c,tooltip:u,svg:f}}=i,{bindto:d}=o.tooltip_contents,h=o.axis_rotated,m=u==null?void 0:u.datum();if(!d&&m){const S=t!=null?t:m.data,[E,C]=er(l.event,e!=null?e:c==null?void 0:c.node()),w={x:E,y:C};if(l.hasAxis&&s.x&&m&&"x"in m){const G=(V=0,J,Q="y")=>{var rt;const et=s[J?(rt=i.axis)==null?void 0:rt.getId(J):Q];return et?et(V)+(h?l.margin.left:l.margin.top):0};w.xAxis=s.x(m.x)+(o.tooltip_position?h?l.margin.top:l.margin.left:0),S.length===1?w.yAxis=G(S[0].value,S[0].id):w.yAxis=G}const{width:N=0,height:z=0}=m,$=(r=(n=o.tooltip_position)==null?void 0:n.bind(i.api)(S,N,z,c==null?void 0:c.node(),w))!=null?r:f&&Sc(f)?i.getTooltipPositionViewBox.bind(i)(N,z,w):i.getTooltipPosition.bind(i)(N,z,w);["top","left"].forEach(G=>{const V=$[G];u.style(G,`${V}px`),G==="left"&&!m.xPosInPercent&&(m.xPosInPercent=V/l.current.width*100)})}},getTooltipPositionViewBox(t,e,n){var r,i;const o=this,{$el:{eventRect:s,svg:l},config:c,state:u}=o,f=c.axis_rotated,d=o.hasArcType()||u.hasFunnel||u.hasTreemap,h=(i=(r=d?l:s)==null?void 0:r.node())!=null?i:u.event.target;let{x:m,y:S}=n;u.hasAxis&&(m=f?m:n.xAxis,S=f?n.xAxis:S);const E=vs(h,m,S,!1),C=cn(h),w=vs(h,20,0,!1).x;let N=E.y,z=E.x+t/2+w;return d&&(u.hasFunnel||u.hasTreemap||u.hasRadar?(z-=t/2+w,N+=e):(N+=C.height/2,z+=C.width/2-(t-w))),z+t>C.width&&(z=C.width-t-w),N+e>C.height&&(N-=e*2),{top:N,left:z}},getTooltipPosition(t,e,n){var r,i,o;const s=this,{config:l,scale:c,state:u}=s,{width:f,height:d,current:h,hasFunnel:m,hasRadar:S,hasTreemap:E,isLegendRight:C,inputType:w}=u,N=s.hasType("gauge")&&!l.gauge_fullCircle,z=l.axis_rotated,$=s.hasArcType(),G=u.isCanvasMode?0:s.getSvgLeft(!0);let V=G+h.width-s.getCurrentPaddingByDirection("right");const J=20;let{x:Q,y:rt}=n;if(S)Q+=Q>=f/2?15:-(t+15),rt+=15;else if($){if(w!=="touch"){let ct=(i=(r=s.getTitlePadding)==null?void 0:r.call(s))!=null?i:0;ct&&N&&((o=l.arc_rangeText_values)!=null&&o.length)&&(ct+=10),Q+=(f-(C?s.getLegendWidth():0))/2,rt+=(N?d:d/2+e)+ct}}else if(m||E)rt+=e;else{const st={top:s.getCurrentPaddingByDirection("top",!0),left:s.getCurrentPaddingByDirection("left",!0)};z?(Q+=G+st.left+J,rt=st.top+n.xAxis+J,V-=G):(Q=G+st.left+J+(c.zoom?Q:n.xAxis),rt+=st.top-5)}if(Q+t+15>V&&(Q-=t+(m||E||$?0:z?J*2:38)),rt+e>h.height){const st=E?e+10:30;rt-=N?e*1.5:e+st}const et={top:rt,left:Q};return et.top<0&&(et.top=0),et.left<0&&(et.left=0),et},showTooltip(t,e){const n=this,{config:r,$el:{tooltip:i}}=n;if(!i||!r.tooltip_show)return;let o=null,s=0,l=`${n.data.targets.length}:`,c;for(let d=0;d<t.length;d++){const h=t[d];d>0&&(l+=","),l+=`${h==null?void 0:h.index}|${h==null?void 0:h.id}|${h==null?void 0:h.value}`,!c&&h&&(c=h),h&&Xe(n.getBaseValue(h))?(s++,o==null||o.push(h)):o||(o=t.slice(0,d))}if(s===0||!c)return;const u=i.datum();let f=o;if(!u||u.current!==l){const{index:d,x:h}=c;f||(f=t.slice()),$e(r.tooltip_onshow,n.api,t),i.html(n.getTooltipHTML(t,n.axis?n.axis.getXAxisTickFormat():n.categoryName.bind(n),n.getDefaultValueFormat(),n.color)).style("display",null).style("visibility",null),i.datum({index:d,x:h,current:l,data:t,width:i.property("offsetWidth"),height:i.property("offsetHeight")}),$e(r.tooltip_onshown,n.api,t),n._handleLinkedCharts(!0,d)}n.setTooltipPosition(f||t,e)},bindTooltipResizePos(){const t=this,{resizeFunction:e,state:n,$el:{tooltip:r}}=t;e.add(()=>{if(r.style("display")==="block"){const{current:i}=n,{width:o,xPosInPercent:s}=r.datum();let l=i.width/100*s;const c=i.width-(l+o);c<0&&(l+=c),r.style("left",`${l}px`)}})},hideTooltip(t){var e;const n=this,{api:r,config:i,$el:{tooltip:o}}=n;if(o&&o.style("display")!=="none"&&(!i.tooltip_doNotHide||t)){const s=(e=o.datum().data)!=null?e:[];$e(i.tooltip_onhide,r,s),o.style("display","none").datum(null),$e(i.tooltip_onhidden,r,s)}},_handleLinkedCharts(t,e){const n=this,{charts:r,config:i,state:{event:o}}=n;if(o!=null&&o.isTrusted&&i.tooltip_linked&&r.length>1){const s=i.tooltip_linked_name;r.filter(l=>l!==n.api).forEach(l=>{var c,u;const{config:f,$el:d,state:h}=l.internal,m=f.tooltip_linked,S=f.tooltip_linked_name,E=Ze.body.contains(d.chart.node());if(m&&s===S&&E){const C=d.tooltip.data()[0],w=e!==(C==null?void 0:C.index);try{t&&w&&h.isCanvasMode?(u=(c=l.internal).showCanvasLinkedTooltip)==null||u.call(c,e):l.tooltip[t&&w?"show":"hide"]({index:e})}catch(N){}}})}},updateTooltipOnRedraw(t,e){var n;const r=this,{config:i,$el:{eventRect:o,svg:s,tooltip:l},state:{event:c,hasAxis:u,hasRadar:f,hasTreemap:d}}=r;if(!r.state.isCanvasMode&&(l==null?void 0:l.style("display"))==="block"&&c){const h=t!=null?t:(n=f?s:o)==null?void 0:n.node();if(u||f)if(r.isMultipleX())r.selectRectForMultipleXs(h,!1);else{const m=e!=null?e:r.getDataIndexFromEvent(c);e===-1?r.api.tooltip.hide():(r.selectRectForSingle(h,m),r.setExpand(m,null,!0))}else{const{clientX:m,clientY:S}=c;setTimeout(()=>{let E=[m,S].every(Number.isFinite)&&Ze.elementFromPoint(m,S);const C=E&&Ut(E).datum();if(C){const w=r.hasArcType()?r.convertToArcData(r.updateAngle(C)):C==null?void 0:C.data;d&&(E=s.node()),w&&r.showTooltip([w],E)}else r.api.tooltip.hide()},i.transition_duration)}}}},LA={getTranslate(t,e=0){var n;const r=this,{config:i,state:o}=r,s=i.axis_rotated;let l=0,c,u;if(e&&/^(x|y2?)$/.test(t)&&(l=r.getAxisSize(t)*e),t==="main")c=qa(o.margin.left),u=qa(o.margin.top);else if(t==="context")c=qa(o.margin2.left),u=qa(o.margin2.top);else if(t==="legend")c=o.margin3.left,u=o.margin3.top;else if(t==="x")c=s?-l:0,u=s?0:o.height+l;else if(t==="y")c=s?0:-l,u=s?o.height+l:0;else if(t==="y2")c=s?0:o.width+l,u=s?-l-1:0;else if(t==="subX")c=0,u=s?0:o.height2;else if(t==="subY")c=0,u=s?o.height2:0;else if(t==="subY2")c=s?0:o.width2,u=s?-1:0;else if(t==="arc")c=o.arcWidth/2,u=o.arcHeight/2,(n=i.arc_rangeText_values)!=null&&n.length&&(u+=5+(r.hasType("gauge")&&i.title_text?10:0));else if(t==="polar")c=o.arcWidth/2,u=o.arcHeight/2;else if(t==="radar"){const[f,d]=r.getRadarSize();c=o.width/2-f,u=o.height/2-d}return`translate(${c}, ${u})`},transformMain(t,e){const n=this,{$el:{main:r},$T:i}=n,o=e!=null&&e.axisX?e.axisX:i(r.select(`.${Pn.axisX}`),t),s=e!=null&&e.axisY?e.axisY:i(r.select(`.${Pn.axisY}`),t),l=e!=null&&e.axisY2?e.axisY2:i(r.select(`.${Pn.axisY2}`),t);i(r,t).attr("transform",n.getTranslate("main")),o.attr("transform",n.getTranslate("x")),s.attr("transform",n.getTranslate("y")),l.attr("transform",n.getTranslate("y2")),r.select(`.${Qe.chartArcs}`).attr("transform",n.getTranslate("arc"))},transformAll(t,e){const n=this,{config:r,state:{hasAxis:i,hasFunnel:o,hasTreemap:s,isCanvasMode:l},$el:c}=n;l||(!o&&!s&&n.transformMain(t,e),i&&r.subchart_show&&n.transformContext(t,e),c.legend&&n.transformLegend(t))}};const DA=new Set(["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"]);var FA={isValidChartType(t){return!!(t&&Object.values(kt).indexOf(t)>-1)},getSubchartTargetType(t){const e=this,{config:n}=e,r=Ye(t)?t:t==null?void 0:t.id,i=n.subchart_types||{},o=n.subchart_type,s=n.data_types||{},l=r&&i[r];return l&&e.isValidChartType(l)?l:o&&e.isValidChartType(o)?o:r&&s[r]||n.data_type||kt.LINE},getTargetType(t){var e;const{config:n}=this,r=Ye(t)?t:t==null?void 0:t.id;return r&&((e=n.data_types)==null?void 0:e[r])||n.data_type||kt.LINE},getSubchartSourceTargetType(t){const{state:e}=this,n=Ye(t)?t:t==null?void 0:t.id,r=e.subchartSourceTypes;return n&&(r==null?void 0:r[n])||this.getTargetType(t)},isSubchartSourceTypeOf(t,e){const n=this.getSubchartSourceTargetType(t);return en(e)?e.indexOf(n)>=0:n===e},withSubchartTypeContext(t){const e=this,{config:n,data:r,state:i}=e,o=n.data_type,s=n.data_types,l=i.current.types,c=i.subchartSourceTypes,u={},f={},d=n.subchart_type;e.mapToIds(r.targets).forEach(h=>{f[h]=e.getTargetType(h),u[h]=e.getSubchartTargetType(h)}),n.data_type=d&&e.isValidChartType(d)?d:o,n.data_types=u,i.current.types=[],i.subchartSourceTypes=f;try{return t()}finally{n.data_type=o,n.data_types=s,i.current.types=l,i.subchartSourceTypes=c}},setTargetType(t,e){const n=this,{config:r,state:{withoutFadeIn:i}}=n;n.mapToTargetIds(t).forEach(o=>{i[o]=e===r.data_types[o],r.data_types[o]=e}),t||(r.data_type=e)},updateTypesElements(){const t=this,{state:{current:e}}=t;Object.keys(kt).forEach(n=>{const r=kt[n],i=t.hasType(r,null,!0),o=e.types.indexOf(r);o===-1&&i?e.types.push(r):o>-1&&!i&&e.types.splice(o,1)}),t.setChartElements()},hasType(t,e,n=!1){var r;const i=this,{config:o,state:{current:s}}=i,l=o.data_types,c=e||i.data.targets;return!n&&((r=s.types)==null?void 0:r.indexOf(t))>-1?!0:c!=null&&c.length?c.some(u=>{const f=l[u.id];return f===t||!f&&t==="line"}):Object.keys(l).length?Object.values(l).some(u=>u===t):o.data_type===t},hasTypeOf(t,e,n=[]){return t in Yn?!Yn[t].filter(r=>n.indexOf(r)===-1).every(r=>!this.hasType(r,e)):!1},isTypeOf(t,e){const n=Ye(t)?t:t.id,r=this.config&&this.getTargetType(n);return en(e)?e.indexOf(r)>=0:r===e},hasPointType(){const t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge(){return this.hasType("gauge")&&this.config.gauge_type==="multi"},isLineType(t){const e=Ye(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,Yn.Line)},isStepType(t){return this.isTypeOf(t,Yn.Step)},isSplineType(t){return this.isTypeOf(t,Yn.Spline)},isAreaType(t){return this.isTypeOf(t,Yn.Area)},isAreaRangeType(t){return this.isTypeOf(t,Yn.AreaRange)},isBarType(t){return this.isTypeOf(t,"bar")},isBubbleType(t){return this.isTypeOf(t,"bubble")},isCandlestickType(t){return this.isTypeOf(t,"candlestick")},isScatterType(t){return this.isTypeOf(t,"scatter")},isTreemapType(t){return this.isTypeOf(t,"treemap")},isPieType(t){return this.isTypeOf(t,"pie")},isFunnelType(t){return this.isTypeOf(t,"funnel")},isGaugeType(t){return this.isTypeOf(t,"gauge")},isDonutType(t){return this.isTypeOf(t,"donut")},isPolarType(t){return this.isTypeOf(t,"polar")},isRadarType(t){return this.isTypeOf(t,"radar")},isArcType(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint(t){const{config:e}=this,n=e.point_pattern;return(t==null?void 0:t.tagName)==="circle"||e.point_type==="circle"&&(!n||en(n)&&n.length===0)},lineData(t){return this.isLineType(t)?[t]:[]},arcData(t){return this.isArcType(t.data)?[t]:[]},labelishData(t){return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isFunnelType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(e=>le(e.value)||!!e.value):[]},barLineBubbleData(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType(t){return DA.has(t)}};function Ls(t,e,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+n)/6)}function Ds(t){this._context=t}Ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ls(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ls(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function NA(t){return new Ds(t)}function Ta(){}function Ag(t){this._context=t}Ag.prototype={areaStart:Ta,areaEnd:Ta,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Ls(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function $A(t){return new Ag(t)}function Eg(t){this._context=t}Eg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Ls(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function BA(t){return new Eg(t)}function Cg(t,e){this._basis=new Ds(t),this._beta=e}Cg.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,s=e[n]-i,l=-1,c;++l<=n;)c=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+c*o),this._beta*e[l]+(1-this._beta)*(i+c*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var zA=(function t(e){function n(r){return e===1?new Ds(r):new Cg(r,e)}return n.beta=function(r){return t(+r)},n})(.85);function Fs(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Yc(t,e){this._context=t,this._k=(1-e)/6}Yc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Fs(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Fs(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var UA=(function t(e){function n(r){return new Yc(r,e)}return n.tension=function(r){return t(+r)},n})(0);function Kc(t,e){this._context=t,this._k=(1-e)/6}Kc.prototype={areaStart:Ta,areaEnd:Ta,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Fs(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var kA=(function t(e){function n(r){return new Kc(r,e)}return n.tension=function(r){return t(+r)},n})(0);function Zc(t,e){this._context=t,this._k=(1-e)/6}Zc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Fs(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var GA=(function t(e){function n(r){return new Zc(r,e)}return n.tension=function(r){return t(+r)},n})(0);const Ig=Math.abs,Xn=Math.atan2,Xa=Math.cos,XA=Math.max,Jc=Math.min,Ur=Math.sin,vi=Math.sqrt,Wn=1e-12,fo=Math.PI,Ns=fo/2,$s=2*fo;function WA(t){return t>1?0:t<-1?fo:Math.acos(t)}function Rg(t){return t>=1?Ns:t<=-1?-Ns:Math.asin(t)}function Qc(t,e,n){var r=t._x1,i=t._y1,o=t._x2,s=t._y2;if(t._l01_a>Wn){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Wn){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/f,s=(s*u+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,s,t._x2,t._y2)}function wg(t,e){this._context=t,this._alpha=e}wg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Qc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var VA=(function t(e){function n(r){return e?new wg(r,e):new Yc(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function Og(t,e){this._context=t,this._alpha=e}Og.prototype={areaStart:Ta,areaEnd:Ta,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Qc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var jA=(function t(e){function n(r){return e?new Og(r,e):new Kc(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function Pg(t,e){this._context=t,this._alpha=e}Pg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Qc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var HA=(function t(e){function n(r){return e?new Pg(r,e):new Zc(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function Mg(t){return t<0?-1:1}function Lg(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),s=(n-t._y1)/(i||r<0&&-0),l=(o*i+s*r)/(r+i);return(Mg(o)+Mg(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(l))||0}function Dg(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function _c(t,e,n){var r=t._x0,i=t._y0,o=t._x1,s=t._y1,l=(o-r)/3;t._context.bezierCurveTo(r+l,i+l*e,o-l,s-l*n,o,s)}function Bs(t){this._context=t}Bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:_c(this,this._t0,Dg(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,_c(this,Dg(this,n=Lg(this,t,e)),n);break;default:_c(this,this._t0,n=Lg(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Fg(t){this._context=new Ng(t)}(Fg.prototype=Object.create(Bs.prototype)).point=function(t,e){Bs.prototype.point.call(this,e,t)};function Ng(t){this._context=t}Ng.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function YA(t){return new Bs(t)}function KA(t){return new Fg(t)}function $g(t){this._context=t}$g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=Bg(t),i=Bg(e),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[s],e[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Bg(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),s=new Array(n);for(i[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,s[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,s[e]-=r*s[e-1];for(i[n-1]=s[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(s[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function ZA(t){return new $g(t)}function zg(t){this._context=t}zg.prototype={areaStart:Ta,areaEnd:Ta,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function JA(t){return new zg(t)}function zs(t,e){this._context=t,this._t=e}zs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function QA(t){return new zs(t,.5)}function _A(t){return new zs(t,0)}function qA(t){return new zs(t,1)}const tE={basis:NA,"basis-closed":$A,"basis-open":BA,bundle:zA,cardinal:UA,"cardinal-closed":kA,"cardinal-open":GA,"catmull-rom":VA,"catmull-rom-closed":jA,"catmull-rom-open":HA,"monotone-x":YA,"monotone-y":KA,natural:ZA,"linear-closed":JA,linear:os,step:QA,"step-after":qA,"step-before":_A};function qc(t,e){var n,r;return t.isLineType(e)||((n=t.isScatterType)==null?void 0:n.call(t,e))||((r=t.isBubbleType)==null?void 0:r.call(t,e))}function Ug(t){return e=>qc(t,e)}function tu(t,e,n){var r,i,o;const s=n?Us(t,e,n):void 0;return le(s)?s:(r=t.isCandlestickType)!=null&&r.call(t,e)?(o=(i=t.getCandlestickData)==null?void 0:i.call(t,e))==null?void 0:o.close:t.getBaseValue(e)}function Us(t,e,n){var r,i,o;if(!n||(r=t.isCandlestickType)!=null&&r.call(t,e)||!((i=t.isSubchartSourceTypeOf)!=null&&i.call(t,e,kt.CANDLESTICK)))return;const s=(o=t.getCandlestickData)==null?void 0:o.call(t,e);if(s)return t.isBarType(e)?le(s.open)&&le(s.close)?s._isUp?s.close:s.open:void 0:le(s.close)?s.close:void 0}function kg(t,e,n){const r=Us(t,e,n);return le(r)&&t.isBarType(e)}function eE(t,e,n){var r;if(!kg(t,e,n))return null;const i=(r=t.getCandlestickData)==null?void 0:r.call(t,e);if(i!=null&&i._isUp)return t.color(e);const o=t.config.candlestick_color_down;return(o&&typeof o=="object"?o[e.id]:o)||t.color(e)}function nE(t){var e,n;const r=this;let i;if(qc(r,t)){const o=Ug(r);i=r.generateGetLinePoints(r.getShapeIndices(o),!1,o)}else r.isBarType(t)?i=r.generateGetBarPoints(r.getShapeIndices(r.isBarType)):(e=r.isCandlestickType)!=null&&e.call(r,t)&&(i=(n=r.generateGetCandlestickPoints)==null?void 0:n.call(r,r.getShapeIndices(r.isCandlestickType)));return i}function Gg(t,e,n){return this.config[e]?this.getGradienColortUrl(t.id):n(t)}function Xg(t){const{$el:e}=this,{elKey:n,className:r,cssRules:i,position:o}=t,s=e.main.select(`.${Ie.chart}`);e[n]=o==="first"?s.insert("g",":first-child"):s.append("g"),e[n].attr("class",r),i!=null&&i.length&&e[n].call(this.setCssRule(!1,`.${r}`,i))}function eu(t,e){const n=this,{$el:r}=n,{type:i,elKey:o,containerClass:s,itemClass:l,initFn:c,withFocus:u=!0,withStyles:f=!0}=e;r[o]||c.call(n);const d=n.getChartClass(i),h=u?n.classFocus.bind(n):()=>"",S=r.main.select(`.${s}`).selectAll(`.${l}`).data(n.filterNullish(t)).attr("class",E=>d(E)+h(E)).enter().append("g").attr("class",d);return f&&S.style("opacity","0").style("pointer-events",n.getStylePropValue("none")),S}var rE={getDrawShape(){const t=this,e=t.config.axis_rotated,{hasRadar:n,hasTreemap:r}=t.state,i={type:{},indices:{},pos:{}};if(!r&&["bar","candlestick","line","area"].forEach(o=>{const s=Nn(o);if(t.hasType(o)||t.hasTypeOf(s)||o==="line"&&(t.hasType("bubble")||t.hasType("scatter"))){const l=t.getShapeIndices(t[`is${s}Type`]),c=t[`generateDraw${s}`];i.indices[o]=l,i.type[o]=c?c.bind(t)(l,!1):void 0}}),!t.hasArcType()||n||r){let o,s,l,c;r||(o=n?t.radarCircleX:e?t.circleY:t.circleX,s=n?t.radarCircleY:e?t.circleX:t.circleY),r&&t.state.isCanvasMode?l=c=function(){}:(l=t.generateXYForText(i.indices,!0),c=t.generateXYForText(i.indices,!1)),i.pos={xForText:l,yForText:c,cx:(o||function(){}).bind(t),cy:(s||function(){}).bind(t)}}return i},getShapeIndices(t){const e=this,{config:n}=e,r=n.data_xs,i=pn(r),o={};let s=i?{}:0;return i&&Dl(Object.keys(r).map(l=>r[l])).forEach(l=>{s[l]=0,o[l]={}}),e.filterTargetsToShow(e.data.targets.filter(t,e)).forEach(l=>{var c;const u=l.id in r?r[l.id]:"",f=u?o[u]:o;for(let d=0,h;h=n.data_groups[d];d++)if(!(h.indexOf(l.id)<0))for(let m=0,S;S=h[m];m++){if(S in f){f[l.id]=f[S];break}l.id!==S&&u&&(f[S]=(c=f[l.id])!=null?c:s[u])}Tn(f[l.id])&&(f[l.id]=u?s[u]++:s++,f.__max__=(u?s[u]:s)-1)}),o},getIndices(t,e,n){const r=this,{data_xs:i,bar_indices_removeNull:o}=r.config,{id:s,index:l}=e;if(r.isBarType(s)&&o){const c={};return r.getAllValuesOnIndex(l,!0).forEach((u,f)=>{c[u.id]=f,c.__max__=f}),c}return pn(i)?t[i[s]]:t},getIndicesMax(t){if(!pn(this.config.data_xs))return t.__max__;let e=0;for(const n in t)e+=t[n].__max__||0;return e},getShapeX(t,e,n){const r=this,{config:i,scale:o}=r,s=n?o.subX:o.zoom||o.x,l=i.bar_overlap,c=i.bar_padding,u=(h,m)=>h+m,f=qn(t)&&(t._$total.length?t._$total.reduce(u)/2:0),d=[];if(f&&qn(t)&&t._$total.length){let h=0;for(const m of t._$total)h+=m,d.push(h)}return h=>{var m;const S=r.getIndices(e,h,"getShapeX"),E=h.id in S?S[h.id]:0,C=(S.__max__||0)+1;let w=0;if(pn(h.x)){const N=s(h.x,!0);if(f){const z=t[h.id]||t._$width;w=l?N-z/2:N-z+((m=d[E])!=null?m:t._$total.slice(0,E+1).reduce(u))-f}else w=N-(le(t)?t:t._$width)*(C/2-(l?1:E))}return t&&w&&C>1&&c&&(E&&(w+=c*E),C>2?w-=(C-1)*c/2:C===2&&(w-=c/2)),w}},getShapeY(t){const e=this,n=e.isStackNormalized();return r=>{let{value:i}=r;const o=t?Us(e,r,t):void 0;return le(r)?i=r:le(o)?i=o:e.isAreaRangeType(r)?i=e.getBaseValue(r,"mid"):n?i=e.getRatio("index",r,!0):e.isBubbleZType(r)?i=e.getBubbleZData(r.value,"y"):e.isBarRangeType(r)&&(i=i[1]),e.getYScaleById(r.id,t)(i)}},getShapeYMin(t,e=!1){const n=this,r=n.axis.getId(t),i=n.getYScaleById(t,e),[o]=i.domain(),s=n.config[`axis_${r}_inverted`];return!n.isGrouped(t)&&!s&&o>0?o:0},getShapeOffsetData(t,e){const n=this,r=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),i=n.state.dataGeneration,o=r.map(h=>h.id).join("_"),s=`${ke.shapeOffset}_${e?"sub":"main"}_${o}`,l=n.cache.get(s);if((l==null?void 0:l.generation)===i)return l;const c=n.isStackNormalized(),u=r.map(h=>{let m=h.values;const S={};n.isStepType(h)&&(m=n.convertValuesToStep(m));const E=m.reduce((C,w)=>{const N=Number(w.x),z=tu(n,w,e);return C[N]=w,S[N]=c?n.getRatio("index",w,!0):z,C},{});return{id:h.id,rowValues:m,rowValueMapByXValue:E,values:S}}),f=r.reduce((h,{id:m},S)=>(h[m]=S,h),{}),d={generation:i,indexMapByTargetId:f,shapeOffsetTargets:u};return n.cache.add(s,d),d},getShapeOffset(t,e,n){const r=this,{shapeOffsetTargets:i,indexMapByTargetId:o}=r.getShapeOffsetData(t,n),s=r.config.data_groupsZeroAs;let l=null;if(!r.config.bar_indices_removeNull){l=new Map;for(const c of i){const u=r.getIndices(e,{id:c.id,index:0});l.set(c.id,i.filter(f=>f.id!==c.id&&u[f.id]===u[c.id]))}}return(c,u)=>{var f;const{id:d,value:h,x:m}=c,S=tu(r,c,n),E=r.getIndices(e,c),C=r.getYScaleById(d,n);if(r.isBarRangeType(c))return C(h[0]);const w=Number(m),N=C(s==="zero"?0:r.getShapeYMin(d,n));let z=N;const $=(f=l==null?void 0:l.get(d))!=null?f:i.filter(G=>G.id!==d&&E[G.id]===E[d]);for(const G of $){const{id:V,rowValueMapByXValue:J,rowValues:Q,values:rt}=G;if(o[V]<o[d]){const et=rt[w];let st=Q[u];(!st||Number(st.x)!==w)&&(st=J[w]);const ct=st&&tu(r,st,n);le(ct)&&le(S)&&ct*S>=0&&le(et)&&(S!==0||s==="positive"&&et>0||s==="negative"&&et<0)&&(z+=C(et)-N)}}return z}},generateGetLinePoints(t,e,n){const r=this,{config:i}=r,o=r.getShapeX(0,t,e),s=r.getShapeY(e),l=r.getShapeOffset(n||r.isLineType,t,e),c=r.getYScaleById.bind(r),u=new Map;return(f,d)=>{let h=u.get(f.id);h===void 0&&(h=c.call(r,f.id,e)(r.getShapeYMin(f.id,e)),u.set(f.id,h));const m=l(f,d)||h,S=o(f);let E=s(f);i.axis_rotated&&(f.value>0&&E<h||f.value<0&&h<E)&&(E=h);const C=[S,E-(h-m)];return[C,C,C,C]}},generateGetAreaPoints(t,e){const n=this,{config:r}=n,i=n.getShapeX(0,t,e),o=n.getShapeY(!!e),s=n.getShapeOffset(n.isAreaType,t,e),l=n.getYScaleById.bind(n),c=new Map;return function(u,f){let d=c.get(u.id);d===void 0&&(d=l.call(n,u.id,e)(n.getShapeYMin(u.id,e)),c.set(u.id,d));const h=s(u,f)||d,m=i(u),S=u.value;let E=o(u);return r.axis_rotated&&(S>0&&E<d||S<0&&d<E)&&(E=d),[[m,h],[m,E-(d-h)],[m,E-(d-h)],[m,h]]}},generateGetBarPoints(t,e){const n=this,{config:r}=n,i=e?n.axis.subX:n.axis.x,o=n.getIndicesMax(t)+1,s=n.getBarW("bar",i,o),l=n.getShapeX(s,t,!!e),c=n.getShapeY(!!e),u=n.getShapeOffset(n.isBarType,t,!!e),f=n.getYScaleById.bind(n),d=new Map;return(h,m)=>{const{id:S}=h;let E=d.get(S);E||(E={y0:f.call(n,S,e)(n.getShapeYMin(S,e)),isInverted:r[`axis_${n.axis.getId(S)}_inverted`]},d.set(S,E));const{y0:C,isInverted:w}=E,N=u(h,m)||C,z=le(s)?s:s[h.id]||s._$width,$=h.value,G=l(h);let V=c(h);r.axis_rotated&&!w&&($>0&&V<C||$<0&&C<V)&&(V=C),n.isBarRangeType(h)||(V-=C-N);const J=G+z;return[[G,N],[G,V],[J,V],[J,N]]}},circleY(t,e){const n=this,r=t.id;let i;return n.isGrouped(r)&&(i=nE.bind(n)(t)),i?i(t,e)[0][1]:n.getYScaleById(r)(n.getBaseValue(t))},circleX(t){return this.xx(t)},updateCircleY(t=!1){const e=this,n=Ug(e),r=e.generateGetLinePoints(e.getShapeIndices(n),t,n),i=e.getShapeY(t);return(o,s)=>{const l=o.id;return e.isGrouped(l)&&qc(e,o)?r(o,s)[0][1]:i(o)}},getSubchartCandlestickShapeValue(t,e){return Us(this,t,e)},isSubchartCandlestickBarValue(t,e){return kg(this,t,e)},getSubchartCandlestickBarColor(t,e){return eE(this,t,e)},pointR(t){const e=this,{config:n}=e,r=n.point_r;let i=r;return e.isBubbleType(t)?i=e.getBubbleR(t):ue(r)&&(i=r.bind(e.api)(t)),t.r=i,i},pointExpandedR(t){const e=this,{config:n}=e,r=e.isBubbleType(t)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||e.pointR(t)*r:e.pointR(t)},pointSelectR(t){const e=this,n=e.config.point_select_r;return ue(n)?n(t):n||e.pointR(t)*4},isPointFocusOnly(){const t=this;return t.config.point_focus_only&&!t.hasType("bubble")&&!t.hasType("scatter")&&!t.hasArcType(null,["radar"])},getPointSensitivity(t){const e=this;let n=e.config.point_sensitivity;if(t)ue(n)?n=n.call(e.api,t):n==="radius"&&(n=t.r);else return n;return n},getBarW(t,e,n){var r,i,o,s,l;const c=this,{config:u,org:f,scale:d,state:h}=c,m=c.getMaxDataCount(),S=t==="bar"&&((r=u.data_groups)==null?void 0:r.length),E=`${t}_width`,{k:C}=(o=(i=c.getZoomTransform)==null?void 0:i.call(c))!=null?o:{k:1},w=[(s=u.axis_x_min)!=null?s:f.xDomain[0],(l=u.axis_x_max)!=null?l:f.xDomain[1]].map(G=>c.axis.isTimeSeries()?Kn.call(c,G):Number(G));let N=e.tickInterval(m);if(d.zoom&&!c.axis.isCategorized()&&C>1){const G=w.every((V,J)=>V===f.xDomain[J]);N=f.xDomain.map((V,J)=>{const Q=G?V:V-Math.abs(w[J]);return d.zoom(Q)}).reduce((V,J)=>Math.abs(V)+J)/m}const z=G=>{const V=G?u[E][G]:u[E],J=G?V.ratio:u[`${E}_ratio`],Q=G?V.max:u[`${E}_max`],rt=le(V)?V:ue(V)?V.call(c,h.width,n,m):n?N*J/n:0;return Q&&rt>Q?Q:rt};let $=z();return!S&&qn(u[E])&&($={_$width:$,_$total:[]},c.getTargetsToShow().forEach(G=>{u[E][G.id]&&($[G.id]=z(G.id),$._$total.push($[G.id]||$._$width))})),$},getShapeByIndex(t,e,n){const r=this,{$el:i}=r,o=Xe(e)?`-${e}`:"";let s=i[t];return s&&!s.empty()?s=s.filter(l=>n?l.id===n:!0).filter(l=>Xe(e)?l.index===e:!0):s=(n?i.main.selectAll(`.${Ie[`${t}s`]}${r.getTargetSelectorSuffix(n)}`):i.main).selectAll(`.${Ie[t]}${o}`),s},isWithinShape(t,e){var n;const r=this,i=Ut(t);let o;return r.isTargetToShow(e.id)?(n=r.hasValidPointType)!=null&&n.call(r,t.nodeName)?o=r.isStepType(e)?r.isWithinStep(t,r.getYScaleById(e.id)(r.getBaseValue(e))):r.isWithinCircle(t,r.isBubbleType(e)?r.pointSelectR(e)*1.5:0):t.nodeName==="path"&&(o=i.classed(Ie.bar)?r.isWithinBar(t):!0):o=!1,o},getInterpolate(t){const n=this.getInterpolateType(t);return tE[n]},getCurve(t){const e=this;return e.config.axis_rotated&&e.isStepType(t)?r=>{const i=e.getInterpolate(t)(r);return i.orgPoint=i.point,i.pointRotated=function(o,s){this._point===1&&(this._point=2);const l=this._y*(1-this._t)+s*this._t;this._context.lineTo(this._x,l),this._context.lineTo(o,l),this._x=o,this._y=s},i.point=function(o,s){this._point===0?this.orgPoint(o,s):this.pointRotated(o,s)},i}:e.getInterpolate(t)},getInterpolateType(t){const e=this,{config:n}=e,r=n.spline_interpolation_type,i=e.isInterpolationType(r)?r:"cardinal";return e.isSplineType(t)?i:e.isStepType(t)?n.line_step_type:"linear"},isWithinBar(t){const e=er(this.state.event,t),n=bh(t),[r,i,o]=n,s=Math.min(r.x,i.x),l=Math.min(r.y,i.y),c=this.config.bar_sensitivity,u=Math.abs(o.x-i.x),f=Math.abs(r.y-i.y),d=s-c,h=s+u+c,m=l+f+c,S=l-c;return d<e[0]&&e[0]<h&&S<e[1]&&e[1]<m}},aE=Object.defineProperty,iE=(t,e,n)=>e in t?aE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vn=(t,e,n)=>iE(t,typeof e!="symbol"?e+"":e,n);function oE(t){return t.hasArcType()?"arc charts":t.hasType("funnel")?"funnel chart":null}function sE(t){var e,n;const{config:r}=t,i=r.render_mode==="canvas"?oE(t):null;i&&((n=(e=fe.console)==null?void 0:e.warn)==null||n.call(e,`[billboard.js] render.mode='canvas' is ignored for ${i}; falling back to SVG.`),r.render_mode="svg")}class Ir{constructor(e){Vn(this,"api"),Vn(this,"config"),Vn(this,"cache"),Vn(this,"$el"),Vn(this,"state"),Vn(this,"charts"),Vn(this,"data",{xs:{},targets:[]}),Vn(this,"axis"),Vn(this,"scale",{x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null}),Vn(this,"org",{xScale:null,xDomain:null}),Vn(this,"color"),Vn(this,"patterns"),Vn(this,"levelColor"),Vn(this,"point"),Vn(this,"brush"),Vn(this,"format",{extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null});const n=this;n.api=e,n.config=new Ua,n.cache=new F1;const r=new P1;n.$el=r.getStore("element"),n.state=r.getStore("state"),n.$T=n.$T.bind(n)}$T(e,n,r){const{config:i,state:o}=this,s=i.transition_duration,l=i.subchart_show;let c=e;return c&&("tagName"in c&&(c=Ut(c)),c=(n!==!1&&s||n)&&(!o.zooming||o.dragging)&&!o.resizing&&o.rendered&&!l?c.transition(r).duration(s):c),c}beforeInit(){const e=this;e.callPluginHook("$beforeInit"),$e(e.config.onbeforeinit,e.api)}afterInit(){const e=this;e.callPluginHook("$afterInit"),$e(e.config.onafterinit,e.api)}init(){const e=this,{config:n,state:r,$el:i}=e,{boost_useCssRule:o,bindto:s}=n;N1(e),sE(e);const l=e.hasArcType();if(r.hasRadar=!r.hasAxis&&e.hasType("radar"),r.hasFunnel=!r.hasAxis&&e.hasType("funnel"),r.hasTreemap=!r.hasAxis&&e.hasType("treemap"),r.hasAxis=!l&&!r.hasFunnel&&!r.hasTreemap,r.datetimeId=`bb-${+new Date*Pr()}`,o){const u=Ze.createElement("style");u.type="text/css",Ze.head.appendChild(u),r.style={rootSelector:`.${r.datetimeId}`,sheet:u.sheet},i.style=u}const c={element:s,classname:"bb"};Ke(s)&&(c.element=s.element||"#chart",c.classname=s.classname||c.classname),i.chart=ue(c.element.node)?s.element:Ut(c.element||[]),i.chart.empty()&&(i.chart=Ut(Ze.body.appendChild(Ze.createElement("div")))),i.chart.html("").classed(c.classname,!0).classed(r.datetimeId,o).style("position","relative"),e.initParams(),e.initToRender()}initToRender(e){const n=this,{config:r,state:i,$el:{chart:o}}=n,s=()=>X1(o,{display:"none",visibility:"hidden"}),l=r.render.lazy===!1?!1:r.render.lazy||s(),c=fe.MutationObserver;l&&c&&r.render.observe!==!1&&!e&&new c((u,f)=>{s()||(f.disconnect(),!i.rendered&&n.initToRender(!0))}).observe(o.node(),{attributes:!0,attributeFilter:["class","style"]}),(!l||e)&&n.convertData(r,u=>{n.initWithData(u),n.afterInit()})}initParams(){var e,n;const r=this,{config:i,format:o,state:s}=r;if(i.render_mode==="canvas"&&((e=r.prepareCanvasConfig)==null||e.call(r)),r.color=r.generateColor(),r.levelColor=r.generateLevelColor(),i.padding===!1&&(i.axis_x_show=!1,i.axis_y_show=!1,i.axis_y2_show=!1,i.subchart_show=!1),i.render_mode!=="canvas"&&(r.hasPointType()||(n=r.hasLegendDefsPoint)!=null&&n.call(r))&&(r.point=r.generatePoint()),s.hasAxis){r.initClip(),o.extraLineClasses=r.generateExtraLineClass(),o.dataTime=i.data_xLocaltime?Of:Pf,o.axisTime=i.axis_x_localtime?wl:Ol;const f=i.zoom_enabled&&i.zoom_type==="drag";o.defaultAxisTime=d=>{const{x:h,zoom:m}=r.scale,S=f?m:m&&h.orgDomain().toString()!==m.domain().toString(),E=d.getMilliseconds()&&".%L"||d.getSeconds()&&".:%S"||d.getMinutes()&&"%I:%M"||d.getHours()&&"%I %p"||d.getDate()!==1&&"%b %d"||S&&d.getDate()===1&&"%b'%y"||d.getMonth()&&"%-m/%-d"||"%Y";return o.axisTime(E)(d)}}const{legend_position:l,legend_inset_anchor:c,axis_rotated:u}=i;s.isLegendRight=l==="right",s.isLegendInset=l==="inset",s.isLegendTop=c==="top-left"||c==="top-right",s.isLegendLeft=c==="top-left"||c==="bottom-left",s.rotatedPadding.top=r.getResettedPadding(s.rotatedPadding.top),s.rotatedPadding.right=u&&!i.axis_x_show?0:30,s.inputType=W1(i.interaction_inputType_mouse,i.interaction_inputType_touch)}initWithData(e){var n,r,i,o,s,l;const c=this,{config:u,scale:f,state:d,$el:h,org:m}=c,{hasAxis:S,hasFunnel:E,hasTreemap:C}=d,w=u.interaction_enabled,N=c.hasType("polar"),z=u.data_labels_backgroundColors;if(S&&(c.axis=c.getAxisInstance(),u.zoom_enabled&&c.initZoom()),c.data.xs={},c.data.targets=c.convertDataToTargets(e),u.data_filter&&(c.data.targets=c.data.targets.filter(u.data_filter.bind(c.api))),u.data_hide&&c.addHiddenTargetIds(u.data_hide===!0?c.mapToIds(c.data.targets):u.data_hide),u.legend_hide&&c.addHiddenLegendIds(u.legend_hide===!0?c.mapToIds(c.data.targets):u.legend_hide),c.updateSizes(),c.updateScales(!0),S){const{x:V,y:J,y2:Q,subX:rt,subY:et,subY2:st}=f;V&&(V.domain(ti(c.getXDomain(c.data.targets),!u.axis_x_inverted)),rt.domain(V.domain()),m.xDomain=V.domain()),J&&(J.domain(c.getYDomain(c.data.targets,"y")),et.domain(J.domain())),Q&&(Q.domain(c.getYDomain(c.data.targets,"y2")),st&&st.domain(Q.domain()))}if(u.render_mode==="canvas"){if(!c.initCanvas)throw Error("[billboard.js] Please import and call canvas() to use render.mode='canvas'.");if(c.bindResize(),c.initCanvas(),u.tooltip_show&&c.initTooltip(),c.callPluginHook("$init"),$e(u.oninit,c.api),c.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),u.data_onmin||u.data_onmax){const V=c.getMinMaxData();$e(u.data_onmin,c.api,V.min),$e(u.data_onmax,c.api,V.max)}d.rendered=!0;return}if(h.svg=h.chart.append("svg").style("overflow","hidden").style("display","block"),w&&d.inputType){const V=d.inputType==="touch",{onclick:J,onover:Q,onout:rt}=u,et=(n=u.interaction_inputType_touch)==null?void 0:n.preventDefault,st=Pa(et)&&et||!1,ct=!isNaN(et)&&et||null,dt=V?{passive:!st&&ct===null}:void 0;h.svg.on("click",(J==null?void 0:J.bind(c.api))||null).on(V?"touchstart":"mouseenter",(Q==null?void 0:Q.bind(c.api))||null,dt).on(V?"touchend":"mouseleave",(rt==null?void 0:rt.bind(c.api))||null)}u.svg_classname&&h.svg.attr("class",u.svg_classname);const $=ue(u.color_tiles)&&c.patterns;(S||$||N||C||z||(r=c.hasLegendDefsPoint)!=null&&r.call(c))&&(h.defs=h.svg.append("defs"),S&&["id","idXAxis","idYAxis","idY2Axis","idGrid"].forEach(V=>{c.appendClip(h.defs,d.clip[V])}),c.generateTextBGColorFilter(z),$&&c.patterns.forEach(V=>h.defs.append(()=>V.node))),c.updateSvgSize(),c.bindResize();const G=h.svg.append("g").classed(Ue.main,!0).attr("transform",E||C?null:c.getTranslate("main"));if(h.main=G,u.subchart_show&&c.initSubchart(),u.tooltip_show&&c.initTooltip(),u.title_text&&c.initTitle(),!C&&u.legend_show&&c.initLegend(),u.data_empty_label_text&&G.append("text").attr("class",`${Rn.text} ${Ue.empty}`).attr("text-anchor","middle").attr("dominant-baseline","middle"),S&&(u.regions.length&&((i=c.initRegion)==null||i.call(c)),!u.clipPath&&c.axis.init()),G.append("g").classed(Ue.chart,!0).attr("clip-path",S?d.clip.path:null),c.callPluginHook("$init"),c.initChartElements(),S&&(w&&((o=c.initEventRect)==null||o.call(c)),(s=c.initGrid)==null||s.call(c),u.clipPath&&((l=c.axis)==null||l.init())),c.updateTargets(c.data.targets),c.updateDimension(),$e(u.oninit,c.api),c.setBackground(),c.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),u.data_onmin||u.data_onmax){const V=c.getMinMaxData();$e(u.data_onmin,c.api,V.min),$e(u.data_onmax,c.api,V.max)}u.tooltip_show&&c.initShowTooltip(),d.rendered=!0}initChartElements(){const e=this,{hasAxis:n,hasRadar:r,hasTreemap:i}=e.state,o=[];if(n){const s=["bar","bubble","candlestick","line"];e.config.bar_front&&s.push(s.shift());for(const l of s){const c=Nn(l);(l==="line"&&e.hasTypeOf(c)||e.hasType(l))&&o.push(c)}}else if(i)o.push("Treemap");else if(e.hasType("funnel"))o.push("Funnel");else{const s=e.hasType("polar"),l=e.hasType("gauge");r||o.push("Arc","Pie"),l?o.push("Gauge"):r?o.push("Radar"):s&&o.push("Polar")}for(const s of o)e[`init${s}`]();pn(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()}setChartElements(){const e=this,{$el:{chart:n,svg:r,defs:i,main:o,tooltip:s,legend:l,title:c,canvas:u,eventOverlay:f,grid:d,needle:h,arcs:m,circle:S,bar:E,candlestick:C,line:w,area:N,text:z}}=e;e.api.$={chart:n,svg:r,canvas:u,eventOverlay:f,defs:i,main:o,tooltip:s,legend:l,title:c,grid:d,arc:m,circles:S,bar:{bars:E},candlestick:C,line:{lines:w,areas:N},needle:h,text:{texts:z}}}setBackground(){const e=this,{config:{background:n},state:r,$el:{svg:i}}=e;if(pn(n)){const o=i.select("g").insert(n.imgUrl?"image":"rect",":first-child");n.imgUrl?o.attr("href",n.imgUrl):n.color&&o.style("fill",n.color).attr("clip-path",r.clip.path),o.attr("class",n.class||null).attr("width","100%").attr("height","100%")}}updateTargets(e){var n,r;const i=this,{hasAxis:o,hasFunnel:s,hasRadar:l,hasTreemap:c}=i.state,u=d=>i[`updateTargetsFor${d}`](e.filter(i[`is${d}Type`].bind(i)));if(i.updateTargetsForText(e),o){const d=["bar","candlestick","line"];for(const h of d){const m=Nn(h);(h==="line"&&i.hasTypeOf(m)||i.hasType(h))&&u(m)}(n=i.updateTargetsForSubchart)==null||n.call(i,e)}else if(i.hasArcType(e)){let d="Arc";l?d="Radar":i.hasType("polar")&&(d="Polar"),u(d)}else s?u("Funnel"):c&&u("Treemap");const f=i.hasType("bubble")||i.hasType("scatter");f&&((r=i.updateTargetForCircle)==null||r.call(i)),i.filterTargetsToShowAtInit(f)}filterTargetsToShowAtInit(e=!1){const n=this,{$el:{svg:r},$T:i}=n;let o=`.${Ue.target}`;e&&(o+=`, .${Un.chartCircles} > .${Un.circles}`),i(r.selectAll(o).filter(s=>n.isTargetToShow(s.id))).style("opacity",null)}getWithOption(e){const n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};for(const[r,i]of Object.entries(n)){const o=Ye(i)?n[i]:i;n[r]=fa(e,`with${r}`,o)}return n}initialOpacity(e){const n=this,{withoutFadeIn:r}=n.state;return n.getBaseValue(e)!==null&&r[e.id]?null:"0"}bindResize(){var e,n;const r=this,{$el:i,config:o,state:s}=r,l=H1(o.resize_timer),{resize_auto:c}=o,u=[];u.push(()=>$e(o.onresize,r.api)),/^(true|parent)$/.test(c)&&u.push(()=>{var f;const d=s.current.width,h=s.current.height;r.setContainerSize(),!(d===s.current.width&&h===s.current.height)&&(s.resizing=!0,o.legend_show&&(r.updateSizes(),s.isCanvasMode?(f=r.updateHtmlLegend)==null||f.call(r):r.updateLegend()),r.api.flush(!1))}),u.push(()=>{$e(o.onresized,r.api),s.resizing=!1}),u.forEach(f=>l.add(f)),r.resizeFunction=l,c==="parent"&&fe.ResizeObserver?(r.resizeFunction.resizeObserver=new fe.ResizeObserver(r.resizeFunction.bind(r))).observe(i.chart.node().parentNode):(c==="parent"&&((n=(e=fe.console)==null?void 0:e.warn)==null||n.call(e,"[billboard.js] resize.auto='parent' requires ResizeObserver; falling back to window resize.")),fe.addEventListener("resize",r.resizeFunction))}callPluginHook(e,...n){this.config.plugins.forEach(r=>{e==="$beforeInit"&&(r.$$=this,this.api.plugins.push(r)),r[e](...n)})}}bn(Ir.prototype,[hb,vb,pb,Ib,wb,Lb,sA,Cb,lA,mA,xA,Xy,rE,yA,TA,IA,wA,MA,LA,FA]);const nu=[Ar,or,Zn,Nl],Wg=10,lE=750,Vg=6,cE=2,uE=1e5,fE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ks=new WeakMap;function jg(t){var e,n;(n=(e=fe.console)==null?void 0:e.warn)==null||n.call(e,`[billboard.js] ${t}`)}function Gs(t,e){var n;const{config:r}=t,i=(n=r.data_names[e])!=null?n:e;return ue(r.legend_format)?r.legend_format(i,e!==i?e:void 0):i}function dE(t){return`${t}`.replace(/[&<>"']/g,e=>fE[e])}function hE(t,e){var n,r;const{config:i}=t,o=((n=t.mapToIds)==null?void 0:n.call(t,t.data.targets))||[],s=((r=t.getValidPointPattern)==null?void 0:r.call(t))||(Array.isArray(i.point_pattern)&&i.point_pattern.length?i.point_pattern:[i.point_type]),l=Math.max(0,o.indexOf(e));return s[l%s.length]||"circle"}function gE(t,e){const n=dE(t.color(e)),r=hE(t,e),i='viewBox="0 0 8 8" aria-hidden="true" focusable="false" style="display:block;width:100%;height:100%;overflow:visible;pointer-events:none"',o=`fill="${n}" stroke="${n}"`;return/^rect(angle)?$/i.test(r)?`<svg ${i}><rect x="1" y="1" width="6" height="6" ${o}></rect></svg>`:!r||/^circle$/i.test(r)?`<svg ${i}><circle cx="4" cy="4" r="3" ${o}></circle></svg>`:`<svg ${i}><g ${o}>${Yr(r)}</g></svg>`}function vE(t,e){const n=new Map;e.each(function(r){n.set(r,this)}),t.cache.add(ke.legendItemMap,n)}function Hg(t,e){const{config:n}=t;e.attr("class",function(r){const o=`${Ut(this).attr("class")||""} ${t.generateClass(Be.legendItem,r)}`;return Array.from(new Set(o.trim().split(/\s+/).filter(Boolean))).join(" ")}).style("visibility",r=>t.isLegendToShow(r)?null:"hidden").classed(Be.legendItemHidden,r=>!t.isTargetToShow(r)).classed(hr.legendItemInteractive,!!n.interaction_enabled),vE(t,e)}function pE(t,e){var n;const{legend:r}=t.$el,i=((n=t.mapToTargetIds)==null?void 0:n.call(t,[e]))||[e];r==null||r.selectAll(`.${Be.legendItem}`).classed(nn.legendItemFocused,o=>i.indexOf(o)>=0).style("opacity",function(o){return i.indexOf(o)>=0?null:t.opacityForUnfocusedLegend.call(t,Ut(this))})}function mE(t){const{legend:e}=t.$el;e==null||e.selectAll(`.${Be.legendItem}`).classed(nn.legendItemFocused,!1).style("opacity",null)}function xE(t,e){var n,r,i;const{state:o}=t,l=(((n=t.mapToTargetIds)==null?void 0:n.call(t,[e]))||[e]).filter(t.isTargetToShow,t),c=new Set(l),u=(((r=t.mapToTargetIds)==null?void 0:r.call(t))||[]).filter(f=>!c.has(f)&&t.isTargetToShow(f));o.focusedTargetIds=c,o.defocusedTargetIds=new Set(u),(i=t.renderCanvasFrame)==null||i.call(t,void 0,null,!1)}function Yg(t){var e,n,r;const{state:i}=t,o=!!((e=i.focusedTargetIds)!=null&&e.size)||!!((n=i.defocusedTargetIds)!=null&&n.size);i.focusedTargetIds=new Set,i.defocusedTargetIds=new Set,o&&((r=t.renderCanvasFrame)==null||r.call(t,void 0,null,!1))}function Kg(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function yE(t,e,n){const r=Kg(n);t.state.canvasLegendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function Zg(t,e){const n=t.state.canvasLegendTouch,r=n&&Kg(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>Wg||Math.abs(r.clientY-n.y)>Wg)}function TE(t,e,n){Zg(t,n);const r=t.state.canvasLegendTouch;return t.state.canvasLegendTouch=null,!!r&&r.id===e&&!r.moved}function bE(t,e){t.state.canvasLegendLastTouchClickId=e,t.state.canvasLegendLastTouchClickTime=Date.now()}function SE(t,e){const{state:n}=t,r=n.canvasLegendLastTouchClickId===e&&Date.now()-(n.canvasLegendLastTouchClickTime||0)<lE;return r&&(n.canvasLegendLastTouchClickId=null,n.canvasLegendLastTouchClickTime=0),r}function Jg(t,e){const{api:n,config:r,state:i}=t;if(e.on("click dblclick mouseover mouseout touchstart touchmove touchend",null),!r.interaction_enabled)return;const o=r.legend_item_interaction,s=typeof o=="object"&&(o!=null&&o.dblclick)?"dblclick":"click",l=i.inputType==="touch",c=o||ue(r.legend_item_onclick),u=l?rv(r):void 0,f=function(d,h){var m;if(!$e(r.legend_item_onclick,n,h,!i.hiddenTargetIds.has(h))){const S=Ut(this);d.type==="dblclick"||d.altKey?i.hiddenTargetIds.size&&!S.classed(Be.legendItemHidden)?n.show():(n.hide(),n.show(h)):(n.toggle(h),S.classed(nn.legendItemFocused,!1)),Yg(t)}l&&((m=t.hideTooltip)==null||m.call(t))};e.on(s,c?function(d,h){l&&d.type==="click"&&SE(t,h)||f.call(this,d,h)}:null),l&&s==="click"&&c&&e.on("touchstart",function(d,h){yE(t,h,d)},u).on("touchmove",d=>{Zg(t,d)},u).on("touchend",function(d,h){TE(t,h,d)&&(bE(t,h),f.call(this,d,h))},u),!l&&e.on("mouseover",o||ue(r.legend_item_onover)?function(d,h){$e(r.legend_item_onover,n,h,!i.hiddenTargetIds.has(h))||!i.transiting&&t.isTargetToShow(h)&&(pE(t,h),xE(t,h))}:null).on("mouseout",o||ue(r.legend_item_onout)?function(d,h){$e(r.legend_item_onout,n,h,!i.hiddenTargetIds.has(h))||(mE(t),Yg(t))}:null)}function AE(t,e){var n,r;const i=(r=(n=t.$el.chart)==null?void 0:n.node)==null?void 0:r.call(n),o=i==null?void 0:i.ownerDocument;if(!i||!o)return null;const s=o.createElementNS("http://www.w3.org/2000/svg","svg"),l=o.createElementNS("http://www.w3.org/2000/svg","g"),c=o.createElementNS("http://www.w3.org/2000/svg","text");s.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",l.setAttribute("class",Be.legendItem),c.textContent=e,l.appendChild(c),s.appendChild(l),i.appendChild(s);const u=cn(c);return s.remove(),u}function Qg(t){return/^(indexed|category|log|timeseries)$/.test(t)}function Xs(t){return/^(indexed|log|timeseries)$/.test(t)}function EE(t){var e,n;const r=t;return((e=r.changedTouches)==null?void 0:e[0])||((n=r.touches)==null?void 0:n[0])||("clientX"in t?t:null)}function CE(t,e,n=!1){var r,i;const o=ho(t,e);return o?n?(i=(r=t.hitDetector).findNearestShape)==null?void 0:i.call(r,o[0],o[1]):t.hitDetector.findNearest(o[0],o[1]):null}function IE(t,e){var n;const{config:r,state:i}=t,{height:o,margin:s,width:l,xAxisHeight:c}=i,[u,f]=e,d=s.left,h=s.left+l,m=s.top,S=s.top+o,E=r.axis_x_show?Math.max(c||0,24):0;return(n=t.isMultipleX)!=null&&n.call(t)||i.hasTreemap?!1:r.axis_rotated?f>=m&&f<=S&&u>=d-E&&u<=h:u>=d&&u<=h&&f>=m&&f<=S+E}function RE(t,e){const{state:{height:n,margin:r,width:i}}=t,[o,s]=e;return o>=r.left&&o<=r.left+i&&s>=r.top&&s<=r.top+n}function wE(t,e){var n,r;return t.hitDetector.findNearest(e[0],e[1])||(IE(t,e)?(r=(n=t.hitDetector).findNearestIndexByCoord)==null?void 0:r.call(n,e[0],e[1]):null)}function _g(t,e){var n;const{config:r,state:i}=t,o=t.filterTargetsToShow(t.data.targets),s=nv(t,e),l=r.tooltip_grouped&&!i.hasTreemap&&!s?(n=t.filterByX)==null?void 0:n.call(t,o,e.x):null;return(i.hasTreemap?[e]:s?[e]:r.tooltip_grouped?l!=null&&l.length?l:o.map(c=>c.values[e.index]).filter(Boolean):[e]).map(c=>{var u;return((u=t.addName)==null?void 0:u.call(t,c))||c})}function OE(t,e,n){var r,i;return(r=t.isMultipleX)!=null&&r.call(t)&&!nv(t,e)?[((i=t.addName)==null?void 0:i.call(t,e))||e]:n}function ho(t,e){const n=EE(e);if(!n)return null;const r=t.$el.canvas.node(),i=cn(r,!0);return[n.clientX-i.left,n.clientY-i.top]}function ru(t,e){var n,r;if(!Array.isArray(e)||e.length<2)return null;const i=e.slice(0,2);return(r=(n=t.axis)==null?void 0:n.isTimeSeries)!=null&&r.call(n)?i.map(o=>Kn.call(t,o)):i}function go(t){const{config:e,state:n}=t;return!e.subchart_show||!n.hasAxis||n.width2<=0||n.height2<=0?null:{x:n.margin2.left,y:n.margin2.top,w:n.width2,h:n.height2}}function qg(t,e){const n=go(t);return!!n&&e[0]>=n.x&&e[0]<=n.x+n.w&&e[1]>=n.y&&e[1]<=n.y+n.h}function PE(t,e){const{config:n,state:r}=t,i=go(t);if(n.subchart_brush_enabled!==!1||!i||!qg(t,e))return null;const o=gd(t,n.axis_rotated?e[1]-i.y:e[0]-i.x);return o===null?null:n.axis_rotated?[r.margin.left+r.width/2,r.margin.top+o]:[r.margin.left+o,r.margin.top+r.height/2]}function Ws(t){var e,n;const r=go(t),i=r?t.config.axis_rotated?r.h:r.w:0,o=(n=(e=t.axis)==null?void 0:e.getExtent)==null?void 0:n.call(e),s=Array.isArray(o)?o.slice(0,2):[];if(s.length===2&&s.every(Number.isFinite)){const l=Math.max(0,Math.min(i,s[0])),c=Math.max(0,Math.min(i,s[1]));return[Math.min(l,c),Math.max(l,c)]}return[0,i]}function au(t,e,n=!1){const r=ho(t,e),i=r&&go(t);if(!r||!i||!qg(t,r))return null;const o=t.config.axis_rotated?r[1]-i.y:r[0]-i.x,[s,l]=Ws(t);return!n&&(o<s||o>l)?null:Math.max(s,Math.min(l,o))}function ME(t,e,n){const r=Math.min(e,n),i=Math.max(e,n);return[t.scale.subX.invert(r),t.scale.subX.invert(i)]}function tv(t){const{scale:e,state:n}=t,r=n.domain;if(!(r!=null&&r.length)||!e.subX)return null;const i=go(t),o=e.subX(r[0]),s=e.subX(r[1]);if(!i||!Number.isFinite(o)||!Number.isFinite(s))return null;const[l,c]=Ws(t);return[Math.max(l,Math.min(c,Math.min(o,s))),Math.max(l,Math.min(c,Math.max(o,s)))]}function ev(t,e){const n=tv(t);if(!n)return"select";const[r,i]=n;return Math.abs(e-r)<=Vg?"resize-start":Math.abs(e-i)<=Vg?"resize-end":e>r&&e<i?"move":"select"}function iu(t,e,n){const[r,i]=Ws(t);return[Math.max(r,Math.min(i,e)),Math.max(r,Math.min(i,n))]}function LE(t,e){return/^resize/.test(e)?t.config.axis_rotated?"ns-resize":"ew-resize":e==="move"?"move":"crosshair"}function ba(t){return t?`${t.id}:${t.index}`:null}function DE(t,e){const n=t.state.canvasSelectionDragIncluded,r=ks.get(t)||new Map,i=new Map,o=new Set,s=[];return e.filter(l=>ou(t,l)).forEach(l=>{const c=ba(l);c&&(o.add(c),!i.has(c)&&i.set(c,l))}),i.forEach((l,c)=>{!n.has(c)&&s.push(l)}),r.forEach((l,c)=>{!o.has(c)&&s.push(l)}),ks.set(t,i),{included:o,rows:s}}function FE(t){return t?Array.isArray(t)?t:[t]:null}function ou(t,e){return e&&In(t,e)&&ei(t,e,nu)&&nu.some(n=>n(t,e))&&t.config.data_selection_isselectable.bind(t.api)(e)}function su(t,e){t.filterTargetsToShow(t.data.targets).filter(n=>ei(t,n,nu)).forEach(n=>{n.values.forEach(r=>{ou(t,r)&&e(r)})})}function nv(t,e){return!(t.config.axis_x_forceAsSingle&&t.config.tooltip_grouped)&&(ga(t,e)||va(t,e))}function NE(t){return t.interaction_inputType_touch!==!1}function rv(t){var e;const n=(e=t.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Pa(n)&&n||!1,i=!isNaN(n)&&n||null;return{passive:!r&&i===null}}function $E(t){var e;const n=(e=t.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Pa(n)&&n||!1,i=!isNaN(n)&&n||null;let o;return s=>{var l,c;const u=((l=s.changedTouches)==null?void 0:l[0])||((c=s.touches)==null?void 0:c[0]);if(!u)return;const f=u[`client${t.axis_rotated?"Y":"X"}`];s.type==="touchstart"?r?s.preventDefault():i!==null&&(o=f):s.type==="touchmove"&&(r||o===!0||i!==null&&Math.abs(o-f)>=i)&&(o=!0,s.preventDefault())}}function pi(t,e){return e.pointerType!=="mouse"&&t.state.inputType!=="touch"}function BE(t,e){const{state:n}=t,r=ba(e),i=r&&n.canvasLastInputClickKey===r&&Date.now()-(n.canvasLastInputClickTime||0)<750;return i&&(n.canvasLastInputClickKey=null,n.canvasLastInputClickTime=0),!!i}function zE(t,e){t.state.canvasLastInputClickKey=ba(e),t.state.canvasLastInputClickTime=Date.now()}function UE(){var t,e,n;return(n=(e=(t=fe.performance)==null?void 0:t.now)==null?void 0:e.call(t))!=null?n:Date.now()}function av(t,e=!1){return Array.isArray(t)&&t.length>=2&&t.every(n=>Number.isFinite(+n)&&(!e||+n>0))}function kE(t,e,n,r=!1){return t.slice(0,2).map((i,o)=>{const s=r?Math.exp(Math.log(+i)+(Math.log(+e[o])-Math.log(+i))*n):+i+(+e[o]-+i)*n;return i instanceof Date||e[o]instanceof Date?new Date(s):s})}function GE(t){return t.data.targets.reduce((e,n)=>e+n.values.length,0)}function XE(t){const{scale:e}=t,n=t.filterTargetsToShow(t.data.targets);["y","y2"].forEach(r=>{var i;(i=e[r])==null||i.domain(t.getYDomain(n,r))}),t.withSubchartTypeContext(()=>{var r,i;(r=e.subY)==null||r.domain(t.getYDomain(n,"y")),(i=e.subY2)==null||i.domain(t.getYDomain(n,"y2"))})}const WE={prepareCanvasConfig(){var t,e;const{config:n,state:r}=this;this.warnUnsupportedCanvasOptions(),(t=r.orgConfig)!=null&&t.transition&&Object.prototype.hasOwnProperty.call(r.orgConfig.transition,"duration")&&r.orgConfig.transition.duration&&jg("canvas mode: transition.duration is ignored; canvas redraws synchronously."),n.transition_duration=0,Qg(n.axis_x_type)||(n.axis_x_type="indexed"),Xs(n.axis_y_type)||(n.axis_y_type="indexed"),Xs(n.axis_y2_type)||(n.axis_y2_type="indexed"),(e=this.hasType)!=null&&e.call(this,"bubble")&&(n.point_show=!0,n.point_type="circle")},applyCanvasSubchartDomain(){const t=this,{axis:e,config:n,scale:r,state:i}=t;if(!n.subchart_show||!i.hasAxis||!r.subX)return;!i.rendered&&!i.domain&&n.subchart_init_range&&(i.domain=ru(t,n.subchart_init_range));const o=ru(t,i.domain);!o||!t.withinRange(o,t.getZoomDomain("subX",!0),t.getZoomDomain("subX"))||(i.domain=o,r.x.domain(o),e.x.scale(r.x))},setCanvasSubchartDomain(t,e=!0,n=!1){const r=this,{config:i,scale:o,state:s}=r,l=ru(r,t);if(!(!i.subchart_show||!l||!r.withinRange(l,r.getZoomDomain("subX",!0),r.getZoomDomain("subX"))))return s.domain=l,o.zoom=null,e&&r.redraw({withTransition:!1,withY:i.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),n&&i.subchart_onbrush.bind(r.api)(s.domain),s.domain},clearCanvasSubchartDomain(t=!0,e=!1){var n;const r=this,{axis:i,config:o,org:s,scale:l,state:c}=r;o.subchart_show&&(c.domain=void 0,l.zoom=null,(n=s.xDomain)!=null&&n.length&&(l.x.domain(s.xDomain),i.x.scale(l.x)),t&&r.redraw({withTransition:!1,withUpdateXDomain:!0,withUpdateOrgXDomain:!1,withY:o.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e&&o.subchart_onbrush.bind(r.api)(l.x.orgDomain()))},flushCanvasFlow(){var t,e;const{state:n}=this;n.canvasFlowFinish&&(n.canvasFlowFrame!==null&&((e=(t=fe).cancelAnimationFrame)==null||e.call(t,n.canvasFlowFrame)),n.canvasFlowFrame=null,n.canvasFlowFinish())},animateCanvasFlow(t){var e,n,r,i,o,s,l,c,u,f,d;const h=this,{axis:m,data:S,org:E,scale:C,state:w}=h,{done:N=()=>{},duration:z,length:$,orgDataCount:G}=t,V=(e=fe.requestAnimationFrame)==null?void 0:e.bind(fe),J=!!((n=m.isLog)!=null&&n.call(m,"x"));if(!V||!z||!$||!G||GE(h)>uE)return!1;const Q=C.x.domain().slice(0,2),rt=(i=(r=E.xDomain)==null?void 0:r.slice)==null?void 0:i.call(r),et=(c=(s=(o=C.subX)==null?void 0:o.domain)==null?void 0:(l=s.call(o)).slice)==null?void 0:c.call(l);if(!av(Q,J))return!1;const st=S.targets.map(Tt=>Tt.values.splice(0,$));h.updateXDomain(h.filterTargetsToShow(S.targets),!0,!0);const ct=C.x.domain().slice(0,2),dt=(f=(u=E.xDomain)==null?void 0:u.slice)==null?void 0:f.call(u);if(S.targets.forEach((Tt,Rt)=>{Tt.values.unshift(...st[Rt])}),!av(ct,J))return rt&&(E.xDomain=rt),C.x.domain(Q),et&&C.subX.domain(et),m.x.scale(C.x),!1;XE(h);let q=!1;const ft=UE(),lt=()=>{var Tt,Rt;q||(q=!0,S.targets.forEach(Ct=>{Ct.values.splice(0,$)}),dt&&(E.xDomain=dt),C.x.domain(ct),(Rt=(Tt=C.subX)==null?void 0:Tt.domain)==null||Rt.call(Tt,dt!=null?dt:ct),m.x.scale(C.x),w.dirty.data=!0,w._eventRectFingerprint=null,w.canvasShape=null,w._cachedDrawShape=null,h.redraw({withLegend:!0,withTransition:!1,withTrimXDomain:!1,withUpdateOrgXDomain:!0,withUpdateXAxis:!0,withUpdateXDomain:!0}),h.updateTypesElements(),w.canvasFlowFrame=null,w.canvasFlowFinish=null,w.flowing=!1,N.call(h.api))},pt=Tt=>{const Rt=Math.min(1,Math.max(0,(Tt-ft)/z)),Ct=kE(Q,ct,Rt,J);C.x.domain(Ct),m.x.scale(C.x),w.canvasShape=null,w._cachedDrawShape=null,w._canvasVisibleRangeCache=null,w._canvasXTickValuesCache=null,h.renderCanvasFrame(void 0,null,!1),Rt<1?w.canvasFlowFrame=V(pt):lt()};return rt&&(E.xDomain=rt),C.x.domain(Q),et&&C.subX.domain(et),m.x.scale(C.x),w.flowing=!0,w.cancelClick=!0,(d=h.hideTooltip)==null||d.call(h),w.canvasFlowFinish=lt,w.canvasFlowFrame=V(pt),!0},initCanvas(){var t;const e=this,{config:n,state:r,$el:i}=e,o=i.chart.node();r.isCanvasMode=!0,r.canvasInlineStyle.minHeight=o.style.minHeight,fe.getComputedStyle(o).position==="static"&&i.chart.style("position","relative"),i.chart.style("min-height",`${r.current.height}px`),e.canvasEngine=new N0,e.canvasEngine.init(o,r.current.width,e.getCanvasSurfaceHeight()),i.canvas=Ut(e.canvasEngine.canvas),e.canvasTheme=new l1,e.canvasTheme.load(o,n.canvas_theme),e.canvasAxisRenderer=new L0(e.canvasEngine,e.canvasTheme),e.canvasRenderer=new KT(e.canvasEngine,e.canvasTheme),e.hitDetector=new h1,e.bindCanvasEvents(),n.zoom_enabled&&((t=e.bindZoomEvent)==null||t.call(e))},warnUnsupportedCanvasOptions(){var t,e,n,r;const{config:i}=this;[[!Qg(i.axis_x_type),"axis.x.type other than indexed/category/log/timeseries"],[!Xs(i.axis_y_type),"axis.y.type other than indexed/log/timeseries"],[!Xs(i.axis_y2_type),"axis.y2.type other than indexed/log/timeseries"],[i.boost_useCssRule,"boost.useCssRule"],[(t=this.hasArcType)==null?void 0:t.call(this),"arc charts"],[(e=this.hasType)==null?void 0:e.call(this,"radar"),"radar chart"],[(n=this.hasType)==null?void 0:n.call(this,"polar"),"polar chart"],[(r=this.hasType)==null?void 0:r.call(this,"funnel"),"funnel chart"]].forEach(([s,l])=>{s&&jg(`canvas mode: ${l} is not yet supported.`)})},bindCanvasEvents(){const t=this,{config:e,state:n,$el:r}=t,i=r.canvas.node(),o=$E(e),s=rv(e);i.addEventListener("mousemove",t.onCanvasMouseMove.bind(t)),i.addEventListener("mouseenter",l=>{var c;n.event=l,(c=e.onover)==null||c.bind(t.api)(l)}),i.addEventListener("mouseout",t.onCanvasMouseOut.bind(t)),i.addEventListener("mouseleave",l=>{var c;n.event=l,(c=e.onout)==null||c.bind(t.api)(l)}),i.addEventListener("mousedown",l=>{var c;(c=t.onCanvasSubchartBrushStart)!=null&&c.call(t,l)||t.onCanvasSelectionDragStart(l)}),i.addEventListener("click",t.onCanvasClick.bind(t)),i.addEventListener("pointerdown",t.onCanvasPointerDown.bind(t)),i.addEventListener("pointerenter",t.onCanvasPointerEnter.bind(t)),i.addEventListener("pointermove",t.onCanvasPointerMove.bind(t)),i.addEventListener("pointerup",t.onCanvasPointerUp.bind(t)),i.addEventListener("pointerleave",t.onCanvasPointerOut.bind(t)),i.addEventListener("pointercancel",t.onCanvasPointerCancel.bind(t)),NE(e)&&(i.addEventListener("touchstart",l=>{o(l),t.onCanvasTouchStart(l)},s),i.addEventListener("touchmove",l=>{o(l),t.onCanvasTouchMove(l)},s),i.addEventListener("touchend",t.onCanvasTouchEnd.bind(t),s),i.addEventListener("touchcancel",t.onCanvasTouchCancel.bind(t),s))},updateHtmlLegend(){var t,e;const n=this,{config:r,state:i,$el:o}=n,s=o.chart.node();if(!r.legend_show||i.hasTreemap){i.hasTreemap?((t=o.legend)==null||t.remove(),o.legend=null):(e=o.legend)==null||e.style("visibility","hidden"),i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0;return}const l=n.mapToIds(n.data.targets).filter(d=>r.data_names[d]!==null);if(r.legend_contents_bindto&&r.legend_contents_template){n.updateHtmlLegendTemplate(l)?(i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0,i.legendHasRendered=!0):(i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0);return}o.legend||(o.legend=Ut(s).append("div").classed(Be.legend,!0).classed(hr.legend,!0)),o.legend.style("visibility",null);const c=o.legend.selectAll(`button.${Be.legendItem}`).data(l,d=>d);c.exit().remove();const u=c.enter().append("button").attr("type","button").attr("data-id",d=>d);u.append("span").classed(Be.legendItemTile,!0),u.append("span").classed(hr.legendItemTitle,!0);const f=u.merge(c).attr("class",d=>n.generateClass(Be.legendItem,d).trim());Hg(n,f),f.select(`.${Be.legendItemTile}`).classed(hr.legendItemTileCircle,!r.legend_usePoint&&r.legend_item_tile_type==="circle").style("background-color",d=>r.legend_usePoint?null:n.color(d)).html(d=>r.legend_usePoint?gE(n,d):""),f.select(`.${hr.legendItemTitle}`).text(d=>Gs(n,d)),r.legend_tooltip&&f.attr("title",d=>Gs(n,d)),Jg(n,f),n.updateHtmlLegendSize(l),n.positionHtmlLegend(),i.legendHasRendered=!0},updateHtmlLegendTemplate(t){const e=this,{api:n,config:r,$el:i}=e,o=Ut(r.legend_contents_bindto),s=r.legend_contents_template,l=[];let c="";if(o.empty())return!1;t.forEach(f=>{const d=ue(s)?Yr(s.call(n,f,e.color(f),n.data(f)[0].values)):Da(s,{COLOR:e.color(f),TITLE:f});d&&(l.push(f),c+=d)});const u=o.html(c).classed(Be.legend,!0).classed(hr.legend,!1).style("visibility",null).selectAll(function(){return this.children}).data(l);return Hg(e,u),Jg(e,u),i.legend=o,!0},updateHtmlLegendSize(t){const e=this,{config:n,state:r,$el:i}=e,o=[],s={};let l=0,c=0,u=0;const f=n.legend_contents_bindto&&n.legend_contents_template;if(f)i.legend.selectAll(`.${Be.legendItem}`).each(function(d){const h=cn(this,!0),m=`${Gs(e,d)}`,S=Math.max(32,m.length*7+24),E=20,C=Math.ceil(h.width||S),w=Math.ceil(h.height||E);o.push(C),l=Math.max(l,C),c=Math.max(c,w)});else if(t.length){const d=r.isLegendRight||r.isLegendInset,h=n.legend_item_tile_type!=="circle",m={width:h?n.legend_item_tile_width:n.legend_item_tile_r*2,height:h?n.legend_item_tile_height:n.legend_item_tile_r*2},S={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:m.width+5,totalLength:0},E={offsets:{},widths:{},heights:{},margins:[0],steps:{}},C=t.map((J,Q)=>{const rt=`${Gs(e,J)}`,et=AE(e,rt),st=Math.max(32,rt.length*7),ct=12,dt=Q===t.length-1,q=n.legend_show&&!e.isLegendToShow(J),ft=q?0:((et==null?void 0:et.width)||st)+S.tileWidth+(dt&&!d?0:S.padding.right)+n.legend_padding,lt=q?0:((et==null?void 0:et.height)||ct)+S.padding.top;return S.max.width=Math.max(S.max.width,ft),S.max.height=Math.max(S.max.height,lt),{id:J,hidden:q,width:ft,height:lt}}),w=d?e.getLegendHeight():e.getLegendWidth(),N=(J,Q,rt=!1)=>{let et;rt||(et=(w-S.totalLength-Q)/2,et<S.posMin&&(et=(w-Q)/2,S.totalLength=0,S.step++)),E.steps[J]=S.step,E.margins[S.step]=r.isLegendInset?10:et,E.offsets[J]=S.totalLength,S.totalLength+=Q};r.isLegendInset&&(S.step=n.legend_inset_step?n.legend_inset_step:t.length,r.legendStep=S.step),C.forEach(({id:J,hidden:Q,width:rt,height:et})=>{const st=n.legend_equally&&!Q?S.max.width:rt,ct=n.legend_equally&&!Q?S.max.height:et,dt=d?ct:st;if(E.widths[J]=st,E.heights[J]=ct,o.push(st),l=Math.max(l,st),c=Math.max(c,ct),Q){E.steps[J]=0,E.offsets[J]=0;return}N(J,dt)});const z=r.isLegendRight?J=>S.max.width*E.steps[J]:r.isLegendInset?J=>S.max.width*E.steps[J]+10:J=>E.margins[E.steps[J]]+E.offsets[J],$=r.isLegendRight||r.isLegendInset?J=>E.margins[E.steps[J]]+E.offsets[J]:J=>S.max.height*E.steps[J],G=4+m.width,V=9;C.forEach(({id:J,hidden:Q})=>{const rt=Q?0:z(J),et=Q?0:$(J);s[J]={item:{x:rt,y:et-5,width:E.widths[J],height:E.heights[J]},title:{x:G,y:0,height:E.heights[J]},tile:{x:-2,y:V-m.height/2,width:m.width,height:m.height}}}),u=S.step}if(!t.length){r.legendItemWidth=0,r.legendItemHeight=0,r.legendStep=0;return}if(f){const d=Math.max(1,r.current.width),h=10;let m=1,S=0;o.forEach(E=>{S&&S+h+E>d?(m++,S=E):S+=(S?h:0)+E}),r.legendStep=Math.max(0,m-1)}else r.legendStep=u;r.legendItemWidth=l,r.legendItemHeight=Math.max(12,c),f||i.legend.selectAll(`button.${Be.legendItem}`).each(function(d){const h=s[d],m=Ut(this);h&&(m.style("left",`${h.item.x}px`).style("top",`${h.item.y}px`).style("width",`${h.item.width}px`).style("height",`${h.item.height}px`),m.select(`.${hr.legendItemTitle}`).style("left",`${h.title.x}px`).style("top",`${h.title.y}px`).style("height",`${h.title.height}px`).style("line-height",`${h.title.height}px`),m.select(`.${Be.legendItemTile}`).style("left",`${h.tile.x}px`).style("top",`${h.tile.y}px`).style("width",`${h.tile.width}px`).style("height",`${h.tile.height}px`))})},getCanvasBottomLegendHeight(){var t;const e=this,{config:n,state:r,$el:i}=e;if(!n.legend_show||r.isLegendRight||r.isLegendInset||r.hasTreemap||!i.legend||!r.legendItemHeight)return 0;const o=cn(i.legend.node(),!0).height,s=r.legendItemHeight*(r.legendStep+1);return Math.ceil(Math.max(((t=e.getLegendHeight)==null?void 0:t.call(e))||0,o||s))},getCanvasSurfaceHeight(){const t=this;return Math.max(0,t.state.current.height-t.getCanvasBottomLegendHeight())},positionHtmlLegend(){var t;const e=this,{config:n,state:r,$el:i}=e,o=i.legend;if(o.classed(hr.legendBottom,!r.isLegendRight&&!r.isLegendInset).classed(hr.legendRight,r.isLegendRight).classed(hr.legendInset,r.isLegendInset).style("top",null).style("right",null).style("bottom",null).style("left",null).style("width",null).style("height",null).style("min-height",null),r.isLegendRight)o.style("top",`${r.margin3.top}px`).style("right","0").style("bottom",`${r.margin3.bottom}px`).style("width",`${Math.max(0,e.getLegendWidth())}px`);else if(r.isLegendInset){if(r.isLegendInset){const s=r.isLegendTop,l=r.isLegendLeft;o.style(s?"top":"bottom",`${n.legend_inset_y}px`).style(l?"left":"right",`${n.legend_inset_x}px`).style("width",`${Math.max(0,r.legendItemWidth*(r.legendStep+1)+20)}px`)}}else{const s=((t=e.getLegendHeight)==null?void 0:t.call(e))||0;o.style("top",`${Math.max(0,r.current.height-s)}px`).style("right","0").style("bottom","auto").style("left","0")}},getCanvasSelectedData(t){const e=this,n=e.state.canvasSelection,r=[];return!e.config.data_selection_enabled||!(n!=null&&n.size)||su(e,i=>{(!t||i.id===t)&&n.has(ba(i))&&r.push(i)}),r},setCanvasSelection(t=!1,e,n,r){var i;const o=this,{config:s,state:l}=o,c=l.canvasSelection,u=s.data_selection_grouped;let f=FE(e),d=!1;const h=t&&!s.data_selection_multiple;let m=!h;if(s.data_selection_enabled){if(h&&(n=n!=null&&n.length?[n[0]]:[0],!u))if(f)f=f.slice(0,1);else{const[S]=o.filterTargetsToShow(o.data.targets);f=S?[S.id]:[]}su(o,S=>{const E=ba(S),C=u||!f||f.indexOf(S.id)>=0,w=!n||n.indexOf(S.index)>=0,N=c.has(E);if(t)if(C&&w&&(!N||h)){if(m||(o.setCanvasSelection(!1),m=!0),c.has(E))return;c.add(E),$e(s.data_onselected,o.api,S,o.canvasEngine.canvas),d=!0}else(!h||m)&&r&&N&&(c.delete(E),$e(s.data_onunselected,o.api,S,o.canvasEngine.canvas),d=!0);else C&&w&&N&&(c.delete(E),$e(s.data_onunselected,o.api,S,o.canvasEngine.canvas),d=!0)}),d&&((i=o.renderCanvasFrame)==null||i.call(o,void 0,null,!1))}},toggleCanvasSelection(t){var e;const n=this,{config:r,state:i}=n,o=i.canvasSelection;let s=!1;r.data_selection_enabled&&(t.filter(l=>ou(n,l)).forEach(l=>{const c=ba(l),u=o.has(c);r.data_selection_multiple||su(n,f=>{const d=ba(f);(r.data_selection_grouped?f.id===l.id:d!==c)&&o.has(d)&&(o.delete(d),$e(r.data_onunselected,n.api,f,n.canvasEngine.canvas),s=!0)}),u&&o.has(c)?(o.delete(c),$e(r.data_onunselected,n.api,l,n.canvasEngine.canvas)):(o.add(c),$e(r.data_onselected,n.api,l,n.canvasEngine.canvas)),s=!0}),s&&((e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1)))},canStartCanvasSelectionDrag(t){const e=this,{config:n}=e,r=t;return!!(n.interaction_enabled&&n.data_selection_enabled&&n.data_selection_draggable&&n.data_selection_multiple&&!n.zoom_enabled&&(r.button===void 0||r.button===0))},getCanvasSelectionDragData(t){const e=this,{config:n}=e,r=e.hitDetector.findInRect(t,n.data_selection_grouped);if(!n.data_selection_grouped)return r;const i=new Set(r.map(o=>o.index));return e.filterTargetsToShow(e.data.targets).flatMap(o=>o.values.filter(s=>i.has(s.index)))},startCanvasSelectionDrag(t){var e,n;const r=this,{state:i}=r,o=ho(r,t);return!o||!r.canStartCanvasSelectionDrag(t)?!1:(i.dragStart=o,i.canvasSelectionDragStart=o,i.canvasSelectionDragIncluded=new Set,i.canvasSelectionDragging=!0,i.canvasSelectionDragMoved=!1,ks.set(r,new Map),r.setDragStatus(!0),(e=r.hideTooltip)==null||e.call(r),(n=t.preventDefault)==null||n.call(t),!0)},updateCanvasSelectionDrag(t){var e;const n=this,{config:r,state:i}=n,o=i.canvasSelectionDragStart,s=ho(n,t);if(!i.canvasSelectionDragging||!o||!s)return!1;const[l,c]=o,[u,f]=s,d=Math.min(l,u),h=Math.max(l,u),m=r.data_selection_grouped?i.margin.top:Math.min(c,f),S=r.data_selection_grouped?i.margin.top+i.height:Math.max(c,f),E={x:d,y:m,w:h-d,h:S-m},C=Math.abs(u-l)>4||Math.abs(f-c)>4;if(i.canvasSelectionDragMoved=i.canvasSelectionDragMoved||C,C){const{included:w,rows:N}=DE(n,n.getCanvasSelectionDragData(E));N.length&&n.toggleCanvasSelection(N),i.canvasSelectionDragIncluded=w,i.cancelClick=!0}return n.renderCanvasSelectionDrag(E),(e=t.preventDefault)==null||e.call(t),!0},endCanvasSelectionDrag(t){var e;const n=this,{state:r}=n;return r.canvasSelectionDragging?(n.updateCanvasSelectionDrag(t),r.cancelClick=r.cancelClick||r.canvasSelectionDragMoved,r.dragStart=null,r.canvasSelectionDragStart=null,r.canvasSelectionDragIncluded=new Set,r.canvasSelectionDragging=!1,r.canvasSelectionDragMoved=!1,ks.delete(n),n.setDragStatus(!1),n.clearCanvasFocus(),(e=t.preventDefault)==null||e.call(t),!0):!1},dispatchCanvasDataOut(t){const e=this,{config:n,state:r}=e,i=r.canvasDataHover;i&&(r.canvasDataHover=null,r.canvasDataHoverKey=null,n.interaction_enabled&&$e(n.data_onout,e.api,i,t))},dispatchCanvasDataOver(t,e){const n=this,{config:r,state:i}=n,o=ba(t);i.canvasDataHoverKey!==o&&(n.dispatchCanvasDataOut(e),i.canvasDataHover=t,i.canvasDataHoverKey=o,r.interaction_enabled&&t&&$e(r.data_onover,n.api,t,e))},dispatchCanvasDataClick(t,e=!1){var n;const r=this,{config:i,$el:o}=r,s=o.canvas.node(),l=CE(r,t,!0);if(!l||BE(r,l))return l;if(i.interaction_enabled){const c=i.data_selection_grouped?r.filterTargetsToShow(r.data.targets).map(u=>u.values[l.index]).filter(Boolean):[l];(n=r.toggleCanvasSelection)==null||n.call(r,c),c.forEach(u=>$e(i.data_onclick,r.api,u,s)),e&&zE(r,l)}return l},updateCanvasSubchartBrush(t){var e,n;const r=this,{config:i,state:o}=r,s=o.canvasSubchartBrushStart,l=o.canvasSubchartBrushOrigin,c=o.canvasSubchartBrushMode,u=au(r,t,!0);if(i.subchart_brush_enabled===!1||!o.canvasSubchartBrushDragging||s===null||u===null||!c)return!1;const f=u-s;if(Math.abs(f)>cE&&(o.canvasSubchartBrushMoved=!0),!o.canvasSubchartBrushMoved)return(e=t.preventDefault)==null||e.call(t),!0;let d;if(c==="move"&&l){const[m,S]=Ws(r),E=l[1]-l[0];let C=l[0]+f,w=l[1]+f;C<m&&(w+=m-C,C=m),w>S&&(C-=w-S,w=S),d=[Math.max(m,Math.min(S-E,C)),Math.min(S,Math.max(m+E,w))]}else c==="resize-start"&&l?d=iu(r,u,l[1]):c==="resize-end"&&l?d=iu(r,l[0],u):d=iu(r,s,u);const h=ME(r,d[0],d[1]);return r.setCanvasSubchartDomain(h,!0),o.cancelClick=!0,(n=t.preventDefault)==null||n.call(t),!0},updateCanvasSubchartCursor(t){const e=this,n=e.$el.canvas.node();if(e.config.subchart_brush_enabled===!1)return n.style.cursor="",!1;const r=au(e,t);if(r===null)return n.style.cursor="",!1;const i=ev(e,r);return n.style.cursor=LE(e,i),!0},startCanvasSubchartBrush(t){var e;const n=this,{state:r}=n;if(n.config.subchart_brush_enabled===!1)return!1;const i=au(n,t);if(i===null)return!1;const o=ev(n,i);return r.event=t,r.canvasSubchartBrushDragging=!0,r.canvasSubchartBrushMode=o,r.canvasSubchartBrushStart=i,r.canvasSubchartBrushOrigin=tv(n),r.canvasSubchartBrushMoved=!1,r.cancelClick=!0,n.setDragStatus(!0),(e=t.preventDefault)==null||e.call(t),!0},endCanvasSubchartBrush(t){var e,n,r;const i=this,{state:o}=i;if(!o.canvasSubchartBrushDragging)return!1;i.updateCanvasSubchartBrush(t);const s=o.canvasSubchartBrushMode==="select"&&!o.canvasSubchartBrushMoved,l=o.canvasSubchartBrushMoved||s;return s?(e=i.clearCanvasSubchartDomain)==null||e.call(i,!0,!0):l&&i.config.subchart_onbrush.bind(i.api)((n=o.domain)!=null?n:i.scale.x.orgDomain()),o.canvasSubchartBrushDragging=!1,o.canvasSubchartBrushMode=null,o.canvasSubchartBrushStart=null,o.canvasSubchartBrushOrigin=null,o.canvasSubchartBrushMoved=!1,i.setDragStatus(!1),(r=t.preventDefault)==null||r.call(t),!0},cancelCanvasSubchartBrush(t){var e;const n=this,{state:r}=n;return r.canvasSubchartBrushDragging?(r.canvasSubchartBrushDragging=!1,r.canvasSubchartBrushMode=null,r.canvasSubchartBrushStart=null,r.canvasSubchartBrushOrigin=null,r.canvasSubchartBrushMoved=!1,n.setDragStatus(!1),(e=t.preventDefault)==null||e.call(t),!0):!1},onCanvasSubchartBrushStart(t){const e=this;if(!e.startCanvasSubchartBrush(t))return!1;const n=i=>{e.updateCanvasSubchartBrush(i)},r=i=>{e.endCanvasSubchartBrush(i),fe.removeEventListener("mousemove",n),fe.removeEventListener("mouseup",r)};return fe.addEventListener("mousemove",n),fe.addEventListener("mouseup",r),!0},onCanvasClick(t){var e;const n=this,{config:r,state:i}=n;if(i.event=t,i.flowing||i.cancelClick){i.cancelClick=!1;return}n.dispatchCanvasDataClick(t),(e=r.onclick)==null||e.bind(n.api)(t)},onCanvasSelectionDragStart(t){const e=this,{state:n}=e;if(!e.startCanvasSelectionDrag(t))return;const r=o=>{e.updateCanvasSelectionDrag(o)},i=o=>{e.endCanvasSelectionDrag(o),fe.removeEventListener("mousemove",r),fe.removeEventListener("mouseup",i),n.canvasSelectionDragMoveHandler=null,n.canvasSelectionDragEndHandler=null};n.canvasSelectionDragMoveHandler=r,n.canvasSelectionDragEndHandler=i,fe.addEventListener("mousemove",r),fe.addEventListener("mouseup",i)},onCanvasPointerDown(t){var e;if(!pi(this,t))return;const n=this,r=n.$el.canvas.node();if(!n.startCanvasSubchartBrush(t))return;const i=t.pointerId,o=f=>f.pointerId===i,s=f=>{o(f)&&n.updateCanvasSubchartBrush(f)},l=f=>{o(f)&&(n.endCanvasSubchartBrush(f),u())},c=f=>{o(f)&&(n.cancelCanvasSubchartBrush(f),u())};function u(){var f;fe.removeEventListener("pointermove",s),fe.removeEventListener("pointerup",l),fe.removeEventListener("pointercancel",c);try{(f=r.releasePointerCapture)==null||f.call(r,i)}catch(d){}}try{(e=r.setPointerCapture)==null||e.call(r,i)}catch(f){}fe.addEventListener("pointermove",s),fe.addEventListener("pointerup",l),fe.addEventListener("pointercancel",c)},onCanvasPointerEnter(t){var e;pi(this,t)&&(this.state.event=t,(e=this.config.onover)==null||e.bind(this.api)(t))},onCanvasPointerMove(t){pi(this,t)&&(this.updateCanvasSubchartBrush(t)||this.onCanvasMouseMove(t))},onCanvasPointerUp(t){var e;if(pi(this,t)){if(this.state.event=t,this.endCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}this.dispatchCanvasDataClick(t,!0),this.dispatchCanvasDataOut(this.$el.canvas.node())}},onCanvasPointerOut(t){var e;pi(this,t)&&(this.state.canvasSubchartBrushDragging||(this.state.event=t,this.onCanvasMouseOut(),(e=this.config.onout)==null||e.bind(this.api)(t)))},onCanvasPointerCancel(t){var e;if(pi(this,t)){if(this.state.event=t,this.cancelCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}this.onCanvasPointerOut(t)}},onCanvasTouchStart(t){var e;t.touches.length>1||(this.state.event=t,!this.startCanvasSubchartBrush(t)&&(this.startCanvasSelectionDrag(t)||((e=this.config.onover)==null||e.bind(this.api)(t),this.onCanvasMouseMove(t))))},onCanvasTouchMove(t){t.touches.length>1||this.updateCanvasSubchartBrush(t)||this.updateCanvasSelectionDrag(t)||this.onCanvasMouseMove(t)},onCanvasTouchEnd(t){var e,n,r;if(this.state.event=t,this.endCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}if(this.endCanvasSelectionDrag(t)){(n=this.config.onout)==null||n.bind(this.api)(t);return}this.dispatchCanvasDataClick(t,!0),this.dispatchCanvasDataOut(this.$el.canvas.node()),(r=this.config.onout)==null||r.bind(this.api)(t)},onCanvasTouchCancel(t){var e;this.state.event=t,this.cancelCanvasSubchartBrush(t),this.endCanvasSelectionDrag(t),this.onCanvasMouseOut(),(e=this.config.onout)==null||e.bind(this.api)(t)},onCanvasMouseMove(t){var e,n,r,i,o;const s=this,{config:l,state:c,$el:u}=s,f=u.canvas.node();if(c.event=t,c.flowing||c.canvasSelectionDragging)return;if((e=s.updateCanvasSubchartCursor)!=null&&e.call(s,t)){s.dispatchCanvasDataOut(f),c.canvasFocusKey&&(c.canvasFocusKey=null,s.clearCanvasFocus()),(n=s.hideTooltip)==null||n.call(s);return}const d=ho(s,t),h=d&&(PE(s,d)||d),m=h?wE(s,h):null;if(!m){if(s.dispatchCanvasDataOut(f),c.canvasFocusKey&&(c.canvasFocusKey=null,s.clearCanvasFocus()),d&&l.axis_tooltip&&RE(s,d)){s.renderCanvasAxisTooltip(d),(r=s.hideTooltip)==null||r.call(s);return}(i=s.hideTooltip)==null||i.call(s);return}s.dispatchCanvasDataOver(m,f);const S=_g(s,m),E=OE(s,m,S),C=E.map(w=>`${w.id}:${w.index}`).join("|");(c.canvasFocusKey!==C||l.axis_tooltip)&&(c.canvasFocusKey=C,s.renderCanvasFocus(E,h)),(o=s.showTooltip)==null||o.call(s,S,f)},onCanvasMouseOut(){var t;const e=this.$el.canvas.node();e.style.cursor="",this.dispatchCanvasDataOut(e),this.state.canvasFocusKey?(this.state.canvasFocusKey=null,this.clearCanvasFocus()):this.config.axis_tooltip&&this.clearCanvasFocus(),(t=this.hideTooltip)==null||t.call(this)},showCanvasLinkedTooltip(t){var e,n,r,i;const o=this,{$el:s,state:l}=o,c=(e=s.canvas)==null?void 0:e.node(),f=o.filterTargetsToShow(o.data.targets).map(w=>w.values[t]).find(Boolean);if(!c||!f)return(n=o.hideTooltip)==null||n.call(o),!1;const d=_g(o,f),h=d.find(w=>w&&In(o,w))||d[0];if(!d.length||!h)return(r=o.hideTooltip)==null||r.call(o),!1;const{left:m,top:S}=cn(c,!0),E=Hi(o,h),C=[l.margin.left+E.x,l.margin.top+E.y];return l.event={clientX:m+C[0],clientY:S+C[1],currentTarget:c,target:c},l.canvasFocusKey=d.map(w=>`${w.id}:${w.index}`).join("|"),o.renderCanvasFocus(d,C),(i=o.showTooltip)==null||i.call(o,d,c),!0},renderCanvasZoomBrush(t,e){const n=this;n.canvasEngine.withOverlay(r=>{n.canvasRenderer.withContext(r,()=>{n.canvasRenderer.drawZoomBrush(n,t,e)})})},clearCanvasZoomBrush(){this.canvasEngine.clearOverlay()},renderCanvasSelectionDrag(t){const e=this;e.canvasEngine.withOverlay(n=>{e.canvasRenderer.withContext(n,()=>{e.canvasRenderer.drawSelectionDragArea(e,t)})})},renderCanvasFrame(t,e,n=!1){const r=this,{state:i}=r,o=t||i.canvasShape||r.getDrawShape();i.canvasShape=o,i._canvasVisibleRangeCache=null,i._canvasXTickValuesCache=null,r.canvasEngine.beginFrame(i.current.width,r.getCanvasSurfaceHeight());try{r.canvasRenderer.drawBackground(r),r.canvasAxisRenderer.drawTitle(r),i.hasAxis&&r.canvasAxisRenderer.draw(r),r.canvasRenderer.draw(r,o),i.hasAxis&&r.config.grid_lines_front&&r.canvasAxisRenderer.drawGridLines(r),r.canvasRenderer.drawSubchart(r,o),i.hasAxis&&r.canvasAxisRenderer.drawSubXAxis(r),i.hasAxis&&r.canvasAxisRenderer.drawSubYAxes(r),r.canvasRenderer.drawEmptyLabel(r),n&&r.hitDetector.rebuild(r,o)}finally{r.canvasEngine.endFrame()}r.canvasEngine.clearOverlay(),i.canvasFocusMainRedraw=!1,e&&r.renderCanvasFocus(e)},renderCanvasFocus(t,e){var n,r;const i=this,{state:o}=i,s=(r=(n=i.canvasRenderer).hasExpandedShapeFocus)==null?void 0:r.call(n,i,t);if(s){const l=o.canvasShape||i.getDrawShape();i.canvasEngine.beginFrame(o.current.width,i.getCanvasSurfaceHeight());try{i.canvasRenderer.drawBackground(i),i.canvasAxisRenderer.drawTitle(i),o.hasAxis&&i.canvasAxisRenderer.draw(i),i.canvasRenderer.draw(i,l,t),o.hasAxis&&i.config.grid_lines_front&&i.canvasAxisRenderer.drawGridLines(i),i.canvasRenderer.drawSubchart(i,l),o.hasAxis&&i.canvasAxisRenderer.drawSubXAxis(i),o.hasAxis&&i.canvasAxisRenderer.drawSubYAxes(i),i.canvasRenderer.drawEmptyLabel(i)}finally{i.canvasEngine.endFrame()}}o.canvasFocusMainRedraw=!!s,i.canvasEngine.withOverlay(l=>{i.canvasRenderer.withContext(l,()=>{i.canvasRenderer.drawFocus(i,t)}),i.canvasAxisRenderer.withContext(l,()=>{i.canvasAxisRenderer.drawFocusedXAxisTick(i,t),e&&i.canvasAxisRenderer.drawAxisTooltip(i,e)})})},renderCanvasAxisTooltip(t){const e=this;e.canvasEngine.withOverlay(n=>{e.canvasAxisRenderer.withContext(n,()=>{e.canvasAxisRenderer.drawAxisTooltip(e,t)})})},clearCanvasFocus(){var t;const e=this;e.state.canvasFocusMainRedraw?(e.state.canvasFocusMainRedraw=!1,e.renderCanvasFrame(void 0,null,!1)):(t=e.canvasEngine)==null||t.clearOverlay()},resizeCanvas(){var t,e;const n=this,{config:r,state:i,$el:o}=n,s=o.chart.node();o.chart.style("min-height",`${i.current.height}px`),(t=n.canvasEngine)==null||t.resize(i.current.width,n.getCanvasSurfaceHeight()),(e=n.canvasTheme)==null||e.reload(s,r.canvas_theme)}};let iv=()=>(bn(Ir.prototype,WE),(iv=()=>"canvas")());var ov={category(t,e){const n=this.internal,{config:r}=n;return arguments.length>1&&(r.axis_x_categories[t]=e,n.state.dirty.data=!0,n.redraw()),r.axis_x_categories[t]},categories(t){const e=this.internal,{config:n}=e;if(!t||!Array.isArray(t)){const r=n.axis_x_categories;return dr(r)?Object.values(e.data.xs)[0]:r}return n.axis_x_categories=t,e.state.dirty.data=!0,e.redraw(),n.axis_x_categories}};function VE(t){const e=this.config;let n,r,i;const o=()=>{const s=r.shift();if(s&&n&&qn(n)&&s in n)return n=n[s],o();if(!s)return n};Object.keys(e).forEach(s=>{n=t,r=s.split("_"),i=o(),on(i)&&(e[s]=i)}),this.api&&(this.state.orgConfig=t)}var jE={resize(t){const e=this.internal,{config:n,state:r}=e;r.rendered&&(n.size_width=t?t.width:null,n.size_height=t?t.height:null,r.resizing=!0,r.dirty.size=!0,this.flush(!1),e.resizeFunction())},flush(t){var e,n;const r=this.internal,{state:i,$el:{zoomResetBtn:o}}=r;i.rendered?(i.resizing?(e=r.brush)==null||e.updateResize():(n=r.axis)==null||n.setOrient(),o==null||o.style("display","none"),r.scale.zoom&&(i.current.zoomDomain=r.scale.zoom.domain()),r.scale.zoom=null,i.resizing||(i.dirty.data=!0),t?r.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):r.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1}),!i.resizing&&r.brush&&(r.brush.getSelection().call(r.brush.move),r.unselectRect()),i.current.zoomDomain&&(r.api.zoom(i.current.zoomDomain),i.current.zoomDomain=null)):r.initToRender(!0)},destroy(){var t,e,n,r,i,o,s,l,c,u;const f=this.internal,{state:d,$el:{chart:h,style:m,svg:S}}=f;if(pn(f)){f.callPluginHook("$willDestroy"),(t=f.cache)==null||t.remove(["setOverOut","callOverOutForTouch"]),f.charts.splice(f.charts.indexOf(this),1),f.charts.length===0&&nb(),f.unbindAllEvents(),S==null||S.select("*").interrupt(),d.canvasFlowFrame!==null&&((n=(e=fe).cancelAnimationFrame)==null||n.call(e,d.canvasFlowFrame)),d.canvasFlowFrame=null,d.canvasFlowFinish=null,d.pendingRaf!==null&&((i=(r=fe).cancelAnimationFrame)==null||i.call(r,d.pendingRaf)),d.pendingRaf=null,(o=f.canvasRenderer)==null||o.destroy(),(s=f.canvasEngine)==null||s.destroy(),(l=f.resizeFunction)==null||l.clear(),(u=(c=f.resizeFunction)==null?void 0:c.resizeObserver)==null||u.disconnect(),f.resizeFunction&&fe.removeEventListener("resize",f.resizeFunction),h.classed("bb",!1).style("position",null),d.isCanvasMode&&h.style("min-height",d.canvasInlineStyle.minHeight||null),h.selectChildren().remove(),m&&m.parentNode.removeChild(m),Object.keys(this).forEach(E=>{E==="internal"&&Object.keys(f).forEach(C=>{f[C]=null}),this[E]=null,delete this[E]});for(const E in this)this[E]=()=>{}}return null},config(t,e,n){const r=this.internal,{config:i,state:o}=r,s=t==null?void 0:t.replace(/\./g,"_");let l;return t&&s in i?on(e)?(i[s]=e,l=e,n&&this.flush()):l=i[s]:(arguments.length===0||dr(t))&&(l=o.orgConfig),l}},HE={color(t){return this.internal.color(t)}};const sv=function(t){const{targets:e}=this.internal.data;if(!Tn(t)){const n=en(t)?t:[t];return e.filter(r=>n.some(i=>i===r.id))}return e};bn(sv,{shown:function(t){return this.internal.filterTargetsToShow(this.data(t))},values:function(t,e=!0){let n=null;if(t){const r=this.data(t);en(r)&&(n=[],r.forEach(i=>{const o=i.values.map(s=>s.value);e?n=n.concat(o):n.push(o)}))}return n},names:function(t){return this.internal.updateDataAttributes("names",t)},colors:function(t){return this.internal.updateDataAttributes("colors",t)},axes:function(t){return this.internal.updateDataAttributes("axes",t)},min:function(){return this.internal.getMinMaxData().min},max:function(){return this.internal.getMinMaxData().max}});var YE={data:sv},KE={focus(t){var e;const n=this.internal,{state:r}=n,i=n.mapToTargetIds(t);if(r.isCanvasMode){const s=i.filter(n.isTargetToShow,n),l=new Set(s),c=n.mapToTargetIds().filter(u=>!l.has(u)&&n.isTargetToShow(u));n.revertLegend(),n.toggleFocusLegend(c,!1),n.toggleFocusLegend(s,!0),r.focusedTargetIds=l,r.defocusedTargetIds=new Set(c),(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1);return}const o=n.$el.svg.selectAll(n.selectorTargets(i.filter(n.isTargetToShow,n)));this.revert(),this.defocus(),o.classed(nn.focused,!0).classed(nn.defocused,!1),n.hasArcType()&&!r.hasRadar&&(n.expandArc(i),n.hasType("gauge")&&n.markOverlapped(t,n,`.${cr.gaugeValue}`)),n.toggleFocusLegend(i,!0),r.focusedTargetIds=new Set(i),i.forEach(s=>r.defocusedTargetIds.delete(s))},defocus(t){var e;const n=this.internal,{state:r}=n,i=n.mapToTargetIds(t);if(r.isCanvasMode){const s=i.filter(n.isTargetToShow,n);n.toggleFocusLegend(s,!1),s.forEach(l=>r.focusedTargetIds.delete(l)),r.defocusedTargetIds=new Set(s),(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1);return}n.$el.svg.selectAll(n.selectorTargets(i.filter(n.isTargetToShow,n))).classed(nn.focused,!1).classed(nn.defocused,!0),n.hasArcType(null,["polar"])&&(n.unexpandArc(i),n.hasType("gauge")&&n.undoMarkOverlapped(n,`.${cr.gaugeValue}`)),n.toggleFocusLegend(i,!1),i.forEach(s=>r.focusedTargetIds.delete(s)),r.defocusedTargetIds=new Set(i)},revert(t){var e,n,r;const i=this.internal,{config:o,state:s,$el:l}=i,c=i.mapToTargetIds(t),u=()=>{o.legend_show&&(i.showLegend(c.filter(i.isLegendToShow.bind(i))),l.legend.selectAll(i.selectorLegends(c)).filter(function(){return Ut(this).classed(nn.legendItemFocused)}).classed(nn.legendItemFocused,!1))};if(s.isCanvasMode){const d=!!((e=s.focusedTargetIds)!=null&&e.size)||!!((n=s.defocusedTargetIds)!=null&&n.size);u(),s.focusedTargetIds=new Set,s.defocusedTargetIds=new Set,d&&((r=i.renderCanvasFrame)==null||r.call(i,void 0,null,!1));return}l.svg.selectAll(i.selectorTargets(c)).classed(nn.focused,!1).classed(nn.defocused,!1),i.hasArcType(null,["polar"])&&i.unexpandArc(c),u(),s.focusedTargetIds=new Set,s.defocusedTargetIds=new Set}},ZE={legend:{show:function(t){const e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){const e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},JE={load(t){const e=this.internal,{config:n}=e;e.state.dirty.data=!0,e.state._eventRectFingerprint=null,t.xs&&e.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(o=>{n.data_classes[o]=t.classes[o]}),"categories"in t&&e.axis.isCategorized()&&(n.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(o=>{n.data_axes[o]=t.axes[o]}),"colors"in t&&Object.keys(t.colors).forEach(o=>{n.data_colors[o]=t.colors[o]}),"regions"in t&&(n.data_regions=t.regions||{});const r=["data","columns","rows","json","url"].some(o=>o in t),i="unload"in t&&t.unload!==!1;if("regions"in t&&!r&&!i){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),ms.call(e,t.done,t.resizeAfter);return}if(i){const o=e.mapToTargetIds(t.unload===!0?null:t.unload);e.unload(o,()=>{!e.config||!e.cache||(e.cache.remove(o),Mf(()=>e.loadFromArgs(t)))})}else e.loadFromArgs(t)},unload(t){const e=this.internal;let n=t||{};dr(n)&&this.tooltip.hide(),en(n)?n={ids:n}:Ye(n)&&(n={ids:[n]});const r=e.mapToTargetIds(n.ids);e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.unload(r,()=>{!e.config||!e.cache||(e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.cache.remove(r),ms.call(e,n.done,n.resizeAfter))})}};function Vs(t,e,n,r=!1){var i;const o=this.internal,s=o.mapToTargetIds(e),l=new Set(s),c=[...o.state.hiddenTargetIds].filter(d=>l.has(d));if(o.state.toggling=!0,o.state.dirty.visibility=!0,o[`${t?"remove":"add"}HiddenTargetIds`](s),o.state.isCanvasMode){t&&c.length?$e(o.config.data_onshown,this,c):!t&&c.length===0&&$e((i=o.config)==null?void 0:i.data_onhidden,this,s),r||o.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),o.state.toggling=!1;return}const u=o.$el.svg.selectAll(o.selectorTargets(s)),f=t?null:"0";t&&c.length&&(u.style("display",null),$e(o.config.data_onshown,this,c)),o.$T(u).style("opacity",f,"important").call(Zo,()=>{var d;!t&&c.length===0&&(u.style("display","none"),$e((d=o.config)==null?void 0:d.data_onhidden,this,s)),u.style("opacity",f)}),n.withLegend&&o[`${t?"show":"hide"}Legend`](s),r||o.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),o.state.toggling=!1}var QE={show(t,e={}){Vs.call(this,!0,t,e)},hide(t,e={}){Vs.call(this,!1,t,e)},toggle(t,e={}){const n=this.internal,r={show:[],hide:[]};n.mapToTargetIds(t).forEach(i=>r[n.isTargetToShow(i)?"hide":"show"].push(i)),r.show.length&&r.hide.length?(Vs.call(this,!0,r.show,e,!0),Vs.call(this,!1,r.hide,e)):(r.show.length&&this.show(r.show,e),r.hide.length&&this.hide(r.hide,e))}},_E={tooltip:{show:function(t){var e,n,r,i,o,s,l,c,u,f,d,h;const m=this.internal,{$el:S,config:E,state:{eventReceiver:C,hasFunnel:w,hasTreemap:N,inputType:z}}=m;let $,G;if(t.mouse&&(G=t.mouse),t.data){const{data:V}=t,J=(e=m.getYScaleById(V.id))==null?void 0:e(V.value);if((w||N)&&V.id){const Q=m.selectorTarget(V.id,void 0,`.${An.shape}`);C.rect=S.main.select(Q)}else m.isMultipleX()?G=[m.xx(V),J]:(E.tooltip_grouped||(G=[0,J]),$=(r=V.index)!=null?r:m.hasArcType()&&V.id?(n=m.getArcElementByIdOrIndex(V.id))==null?void 0:n.datum().index:m.getIndexByX(V.x))}else on(t.x)?$=m.getIndexByX(t.x):on(t.index)&&($=t.index);if(m.state.isCanvasMode){const V=((i=m.filterTargetsToShow)==null?void 0:i.call(m))||m.data.targets,J=(o=t.data)!=null&&o.id&&!E.tooltip_grouped?V.filter(ct=>ct.id===t.data.id).map(ct=>ct.values[$!=null?$:t.data.index]).filter(Boolean):V.map(ct=>ct.values[$]).filter(Boolean),Q=(l=(s=S.canvas)==null?void 0:s.node)==null?void 0:l.call(s),rt=m.state.canvasShape||((c=m.getDrawShape)==null?void 0:c.call(m)),et=J[0],st=G||(et&&((u=rt==null?void 0:rt.pos)!=null&&u.cx)&&((f=rt==null?void 0:rt.pos)!=null&&f.cy)?[m.state.margin.left+rt.pos.cx(et),m.state.margin.top+rt.pos.cy(et)]:void 0);if(!J.length||!Q)return;m.state.canvasFocusKey=J.map(ct=>`${ct.id}:${ct.index}`).join("|"),(d=m.renderCanvasFocus)==null||d.call(m,J,st),(h=m.showTooltip)==null||h.call(m,J,Q);return}(z==="mouse"?["mouseover","mousemove"]:["touchstart"]).forEach(V=>{m.dispatchEvent(V,$,G)})},hide:function(){var t,e,n,r,i;const o=this.internal,{state:{inputType:s,isCanvasMode:l},$el:{tooltip:c}}=o,u=c==null?void 0:c.datum();if(l){o.state.canvasFocusKey=null,o.hideTooltip(!0),(t=o.clearCanvasFocus)==null||t.call(o);return}if((e=u==null?void 0:u.data)!=null&&e[0]){const{index:f}=u.data[0];(s==="mouse"?["mouseout"]:["touchend"]).forEach(d=>{o.dispatchEvent(d,f)})}s==="touch"&&o.callOverOutForTouch(),o.hideTooltip(!0),(n=o.hideGridFocus)==null||n.call(o),(r=o.unexpandCircles)==null||r.call(o),(i=o.expandBarTypeShapes)==null||i.call(o,!1)}}},qE=Object.defineProperty,tC=(t,e,n)=>e in t?qE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lv=(t,e,n)=>tC(t,typeof e!="symbol"?e+"":e,n);class Jn{constructor(e){lv(this,"plugins",[]),lv(this,"internal");const n=new Ir(this);this.internal=n,(function r(i,o,s){Object.keys(i).forEach(l=>{const c=ue(i[l]),u=o!==s,f=pn(i[l]),d=f&&Object.keys(i[l]).length>0;c&&(!u&&d||u)?o[l]=i[l].bind(s):f&&!c?o[l]={}:o[l]=i[l],d&&r(i[l],o[l],s)})})(Jn.prototype,this,this),VE.call(n,e),n.beforeInit(),n.init()}}bn(Jn.prototype,[jE,HE,YE,KE,ZE,JE,QE,_E]);let cv=()=>(Jn.prototype.category=ov.category,Jn.prototype.categories=ov.categories,(cv=()=>({}))());const eC=t=>{var e,n;return(n=(e=fe).btoa)==null?void 0:n.call(e,encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(r,i)=>String.fromCharCode(+`0x${i}`)))};function nC(t,e,n){const{width:r,height:i}=e||n,o=new XMLSerializer,s=t.cloneNode(!0),l=G1(La(Ze.styleSheets)).filter(h=>h.cssText).map(h=>h.cssText);s.setAttribute("xmlns",Jt.xhtml),s.style.margin="0",s.style.padding="0",e.preserveFontStyle&&s.querySelectorAll("text").forEach(h=>{h.innerHTML=""});const c=o.serializeToString(s),u=Ze.createElement("style");u.appendChild(Ze.createTextNode(l.join(`
52
- `)));const f=o.serializeToString(u),d=`<svg xmlns="${Jt.svg}" width="${r}" height="${i}"
51
+ </tbody></table>`).replace(LA,"").split(DA)},setTooltipPosition(t,e){var n,r;const i=this,{config:s,scale:o,state:l,$el:{eventRect:c,tooltip:u,svg:f}}=i,{bindto:d}=s.tooltip_contents,h=s.axis_rotated,m=u==null?void 0:u.datum();if(!d&&m){const S=t!=null?t:m.data,[E,C]=Jn(l.event,e!=null?e:c==null?void 0:c.node()),w={x:E,y:C};if(l.hasAxis&&o.x&&m&&"x"in m){const W=(H=0,_,q="y")=>{var st;const it=o[_?(st=i.axis)==null?void 0:st.getId(_):q];return it?it(H)+(h?l.margin.left:l.margin.top):0};w.xAxis=o.x(m.x)+(s.tooltip_position?h?l.margin.top:l.margin.left:0),S.length===1?w.yAxis=W(S[0].value,S[0].id):w.yAxis=W}const{width:$=0,height:z=0}=m,B=(r=(n=s.tooltip_position)==null?void 0:n.bind(i.api)(S,$,z,c==null?void 0:c.node(),w))!=null?r:f&&Rc(f)?i.getTooltipPositionViewBox.bind(i)($,z,w):i.getTooltipPosition.bind(i)($,z,w);["top","left"].forEach(W=>{const H=B[W];u.style(W,`${H}px`),W==="left"&&!m.xPosInPercent&&(m.xPosInPercent=H/l.current.width*100)})}},getTooltipPositionViewBox(t,e,n){var r,i;const s=this,{$el:{eventRect:o,svg:l},config:c,state:u}=s,f=c.axis_rotated,d=s.hasArcType()||u.hasFunnel||u.hasTreemap,h=(i=(r=d?l:o)==null?void 0:r.node())!=null?i:u.event.target;let{x:m,y:S}=n;u.hasAxis&&(m=f?m:n.xAxis,S=f?n.xAxis:S);const E=So(h,m,S,!1),C=ln(h),w=So(h,20,0,!1).x;let $=E.y,z=E.x+t/2+w;return d&&(u.hasFunnel||u.hasTreemap||u.hasRadar?(z-=t/2+w,$+=e):($+=C.height/2,z+=C.width/2-(t-w))),z+t>C.width&&(z=C.width-t-w),$+e>C.height&&($-=e*2),{top:$,left:z}},getTooltipPosition(t,e,n){var r,i,s;const o=this,{config:l,scale:c,state:u}=o,{width:f,height:d,current:h,hasFunnel:m,hasRadar:S,hasTreemap:E,isLegendRight:C,inputType:w}=u,$=o.hasType("gauge")&&!l.gauge_fullCircle,z=l.axis_rotated,B=o.hasArcType(),W=u.isCanvasMode?0:o.getSvgLeft(!0);let H=W+h.width-o.getCurrentPaddingByDirection("right");const _=20;let{x:q,y:st}=n;if(S)q+=q>=f/2?15:-(t+15),st+=15;else if(B){if(w!=="touch"){let ct=(i=(r=o.getTitlePadding)==null?void 0:r.call(o))!=null?i:0;ct&&$&&((s=l.arc_rangeText_values)!=null&&s.length)&&(ct+=10),q+=(f-(C?o.getLegendWidth():0))/2,st+=($?d:d/2+e)+ct}}else if(m||E)st+=e;else{const ot={top:o.getCurrentPaddingByDirection("top",!0),left:o.getCurrentPaddingByDirection("left",!0)};z?(q+=W+ot.left+_,st=ot.top+n.xAxis+_,H-=W):(q=W+ot.left+_+(c.zoom?q:n.xAxis),st+=ot.top-5)}if(q+t+15>H&&(q-=t+(m||E||B?0:z?_*2:38)),st+e>h.height){const ot=E?e+10:30;st-=$?e*1.5:e+ot}const it={top:st,left:q};return it.top<0&&(it.top=0),it.left<0&&(it.left=0),it},showTooltip(t,e){const n=this,{config:r,$el:{tooltip:i}}=n;if(!i||!r.tooltip_show)return;let s=null,o=0,l=`${n.data.targets.length}:`,c;for(let d=0;d<t.length;d++){const h=t[d];d>0&&(l+=","),l+=`${h==null?void 0:h.index}|${h==null?void 0:h.id}|${h==null?void 0:h.value}`,!c&&h&&(c=h),h&&Ge(n.getBaseValue(h))?(o++,s==null||s.push(h)):s||(s=t.slice(0,d))}if(o===0||!c)return;const u=i.datum();let f=s;if(!u||u.current!==l){const{index:d,x:h}=c;f||(f=t.slice()),Ne(r.tooltip_onshow,n.api,t),i.html(n.getTooltipHTML(t,n.axis?n.axis.getXAxisTickFormat():n.categoryName.bind(n),n.getDefaultValueFormat(),n.color)).style("display",null).style("visibility",null),i.datum({index:d,x:h,current:l,data:t,width:i.property("offsetWidth"),height:i.property("offsetHeight")}),Ne(r.tooltip_onshown,n.api,t),n._handleLinkedCharts(!0,d)}n.setTooltipPosition(f||t,e)},bindTooltipResizePos(){const t=this,{resizeFunction:e,state:n,$el:{tooltip:r}}=t;e.add(()=>{if(r.style("display")==="block"){const{current:i}=n,{width:s,xPosInPercent:o}=r.datum();let l=i.width/100*o;const c=i.width-(l+s);c<0&&(l+=c),r.style("left",`${l}px`)}})},hideTooltip(t){var e;const n=this,{api:r,config:i,$el:{tooltip:s}}=n;if(s&&s.style("display")!=="none"&&(!i.tooltip_doNotHide||t)){const o=(e=s.datum().data)!=null?e:[];Ne(i.tooltip_onhide,r,o),s.style("display","none").datum(null),Ne(i.tooltip_onhidden,r,o)}},_handleLinkedCharts(t,e){const n=this,{charts:r,config:i,state:{event:s}}=n;if(s!=null&&s.isTrusted&&i.tooltip_linked&&r.length>1){const o=i.tooltip_linked_name;r.filter(l=>l!==n.api).forEach(l=>{var c,u;const{config:f,$el:d,state:h}=l.internal,m=f.tooltip_linked,S=f.tooltip_linked_name,E=Ye.body.contains(d.chart.node());if(m&&o===S&&E){const C=d.tooltip.data()[0],w=e!==(C==null?void 0:C.index);try{t&&w&&h.isCanvasMode?(u=(c=l.internal).showCanvasLinkedTooltip)==null||u.call(c,e):l.tooltip[t&&w?"show":"hide"]({index:e})}catch($){}}})}},updateTooltipOnRedraw(t,e){var n;const r=this,{config:i,$el:{eventRect:s,svg:o,tooltip:l},state:{event:c,hasAxis:u,hasRadar:f,hasTreemap:d}}=r;if(!r.state.isCanvasMode&&(l==null?void 0:l.style("display"))==="block"&&c){const h=t!=null?t:(n=f?o:s)==null?void 0:n.node();if(u||f)if(r.isMultipleX())r.selectRectForMultipleXs(h,!1);else{const m=e!=null?e:r.getDataIndexFromEvent(c);e===-1?r.api.tooltip.hide():(r.selectRectForSingle(h,m),r.setExpand(m,null,!0))}else{const{clientX:m,clientY:S}=c;setTimeout(()=>{let E=[m,S].every(Number.isFinite)&&Ye.elementFromPoint(m,S);const C=E&&Yt(E).datum();if(C){const w=r.hasArcType()?r.convertToArcData(r.updateAngle(C)):C==null?void 0:C.data;d&&(E=o.node()),w&&r.showTooltip([w],E)}else r.api.tooltip.hide()},i.transition_duration)}}}},NA={getTranslate(t,e=0){var n;const r=this,{config:i,state:s}=r,o=i.axis_rotated;let l=0,c,u;if(e&&/^(x|y2?)$/.test(t)&&(l=r.getAxisSize(t)*e),t==="main")c=qa(s.margin.left),u=qa(s.margin.top);else if(t==="context")c=qa(s.margin2.left),u=qa(s.margin2.top);else if(t==="legend")c=s.margin3.left,u=s.margin3.top;else if(t==="x")c=o?-l:0,u=o?0:s.height+l;else if(t==="y")c=o?0:-l,u=o?s.height+l:0;else if(t==="y2")c=o?0:s.width+l,u=o?-l-1:0;else if(t==="subX")c=0,u=o?0:s.height2;else if(t==="subY")c=0,u=o?s.height2:0;else if(t==="subY2")c=o?0:s.width2,u=o?-1:0;else if(t==="arc")c=s.arcWidth/2,u=s.arcHeight/2,(n=i.arc_rangeText_values)!=null&&n.length&&(u+=5+(r.hasType("gauge")&&i.title_text?10:0));else if(t==="polar")c=s.arcWidth/2,u=s.arcHeight/2;else if(t==="radar"){const[f,d]=r.getRadarSize();c=s.width/2-f,u=s.height/2-d}return`translate(${c}, ${u})`},transformMain(t,e){const n=this,{$el:{main:r},$T:i}=n,s=e!=null&&e.axisX?e.axisX:i(r.select(`.${Rn.axisX}`),t),o=e!=null&&e.axisY?e.axisY:i(r.select(`.${Rn.axisY}`),t),l=e!=null&&e.axisY2?e.axisY2:i(r.select(`.${Rn.axisY2}`),t);i(r,t).attr("transform",n.getTranslate("main")),s.attr("transform",n.getTranslate("x")),o.attr("transform",n.getTranslate("y")),l.attr("transform",n.getTranslate("y2")),r.select(`.${Ze.chartArcs}`).attr("transform",n.getTranslate("arc"))},transformAll(t,e){const n=this,{config:r,state:{hasAxis:i,hasFunnel:s,hasTreemap:o,isCanvasMode:l},$el:c}=n;l||(!s&&!o&&n.transformMain(t,e),i&&r.subchart_show&&n.transformContext(t,e),c.legend&&n.transformLegend(t))}};const $A=new Set(["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"]);var BA={isValidChartType(t){return!!(t&&Object.values(qt).indexOf(t)>-1)},getSubchartTargetType(t){const e=this,{config:n}=e,r=je(t)?t:t==null?void 0:t.id,i=n.subchart_types||{},s=n.subchart_type,o=n.data_types||{},l=r&&i[r];return l&&e.isValidChartType(l)?l:s&&e.isValidChartType(s)?s:r&&o[r]||n.data_type||qt.LINE},getTargetType(t){var e;const{config:n}=this,r=je(t)?t:t==null?void 0:t.id;return r&&((e=n.data_types)==null?void 0:e[r])||n.data_type||qt.LINE},getSubchartSourceTargetType(t){const{state:e}=this,n=je(t)?t:t==null?void 0:t.id,r=e.subchartSourceTypes;return n&&(r==null?void 0:r[n])||this.getTargetType(t)},isSubchartSourceTypeOf(t,e){const n=this.getSubchartSourceTargetType(t);return qe(e)?e.indexOf(n)>=0:n===e},withSubchartTypeContext(t){const e=this,{config:n,data:r,state:i}=e,s=n.data_type,o=n.data_types,l=i.current.types,c=i.subchartSourceTypes,u={},f={},d=n.subchart_type;e.mapToIds(r.targets).forEach(h=>{f[h]=e.getTargetType(h),u[h]=e.getSubchartTargetType(h)}),n.data_type=d&&e.isValidChartType(d)?d:s,n.data_types=u,i.current.types=[],i.subchartSourceTypes=f;try{return t()}finally{n.data_type=s,n.data_types=o,i.current.types=l,i.subchartSourceTypes=c}},setTargetType(t,e){const n=this,{config:r,state:{withoutFadeIn:i}}=n;n.mapToTargetIds(t).forEach(s=>{i[s]=e===r.data_types[s],r.data_types[s]=e}),t||(r.data_type=e)},updateTypesElements(){const t=this,{state:{current:e}}=t;Object.keys(qt).forEach(n=>{const r=qt[n],i=t.hasType(r,null,!0),s=e.types.indexOf(r);s===-1&&i?e.types.push(r):s>-1&&!i&&e.types.splice(s,1)}),t.setChartElements()},hasType(t,e,n=!1){var r;const i=this,{config:s,state:{current:o}}=i,l=s.data_types,c=e||i.data.targets;return!n&&((r=o.types)==null?void 0:r.indexOf(t))>-1?!0:c!=null&&c.length?c.some(u=>{const f=l[u.id];return f===t||!f&&t==="line"}):Object.keys(l).length?Object.values(l).some(u=>u===t):s.data_type===t},hasTypeOf(t,e,n=[]){return t in en?!en[t].filter(r=>n.indexOf(r)===-1).every(r=>!this.hasType(r,e)):!1},isTypeOf(t,e){const n=je(t)?t:t.id,r=this.config&&this.getTargetType(n);return qe(e)?e.indexOf(r)>=0:r===e},hasPointType(){const t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge(){return this.hasType("gauge")&&this.config.gauge_type==="multi"},isLineType(t){const e=je(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,en.Line)},isStepType(t){return this.isTypeOf(t,en.Step)},isSplineType(t){return this.isTypeOf(t,en.Spline)},isAreaType(t){return this.isTypeOf(t,en.Area)},isAreaRangeType(t){return this.isTypeOf(t,en.AreaRange)},isBarType(t){return this.isTypeOf(t,"bar")},isBubbleType(t){return this.isTypeOf(t,"bubble")},isCandlestickType(t){return this.isTypeOf(t,"candlestick")},isScatterType(t){return this.isTypeOf(t,"scatter")},isTreemapType(t){return this.isTypeOf(t,"treemap")},isPieType(t){return this.isTypeOf(t,"pie")},isFunnelType(t){return this.isTypeOf(t,"funnel")},isGaugeType(t){return this.isTypeOf(t,"gauge")},isDonutType(t){return this.isTypeOf(t,"donut")},isPolarType(t){return this.isTypeOf(t,"polar")},isRadarType(t){return this.isTypeOf(t,"radar")},isArcType(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint(t){const{config:e}=this,n=e.point_pattern;return(t==null?void 0:t.tagName)==="circle"||e.point_type==="circle"&&(!n||qe(n)&&n.length===0)},lineData(t){return this.isLineType(t)?[t]:[]},arcData(t){return this.isArcType(t.data)?[t]:[]},labelishData(t){return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isFunnelType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(e=>ae(e.value)||!!e.value):[]},barLineBubbleData(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType(t){return $A.has(t)}};function Uo(t,e,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+n)/6)}function ko(t){this._context=t}ko.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Uo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Uo(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function zA(t){return new ko(t)}function va(){}function Ov(t){this._context=t}Ov.prototype={areaStart:va,areaEnd:va,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Uo(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function UA(t){return new Ov(t)}function Pv(t){this._context=t}Pv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Uo(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function kA(t){return new Pv(t)}function Mv(t,e){this._basis=new ko(t),this._beta=e}Mv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],s=t[n]-r,o=e[n]-i,l=-1,c;++l<=n;)c=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+c*s),this._beta*e[l]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var GA=(function t(e){function n(r){return e===1?new ko(r):new Mv(r,e)}return n.beta=function(r){return t(+r)},n})(.85);function Go(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function _c(t,e){this._context=t,this._k=(1-e)/6}_c.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Go(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Go(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var XA=(function t(e){function n(r){return new _c(r,e)}return n.tension=function(r){return t(+r)},n})(0);function qc(t,e){this._context=t,this._k=(1-e)/6}qc.prototype={areaStart:va,areaEnd:va,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Go(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var WA=(function t(e){function n(r){return new qc(r,e)}return n.tension=function(r){return t(+r)},n})(0);function tu(t,e){this._context=t,this._k=(1-e)/6}tu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Go(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var VA=(function t(e){function n(r){return new tu(r,e)}return n.tension=function(r){return t(+r)},n})(0);const Lv=Math.abs,Un=Math.atan2,Ua=Math.cos,jA=Math.max,eu=Math.min,Fr=Math.sin,gi=Math.sqrt,kn=1e-12,gs=Math.PI,Xo=gs/2,Wo=2*gs;function HA(t){return t>1?0:t<-1?gs:Math.acos(t)}function Dv(t){return t>=1?Xo:t<=-1?-Xo:Math.asin(t)}function nu(t,e,n){var r=t._x1,i=t._y1,s=t._x2,o=t._y2;if(t._l01_a>kn){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>kn){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*u+t._x1*t._l23_2a-e*t._l12_2a)/f,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,s,o,t._x2,t._y2)}function Fv(t,e){this._context=t,this._alpha=e}Fv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:nu(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var YA=(function t(e){function n(r){return e?new Fv(r,e):new _c(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function Nv(t,e){this._context=t,this._alpha=e}Nv.prototype={areaStart:va,areaEnd:va,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:nu(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var KA=(function t(e){function n(r){return e?new Nv(r,e):new qc(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function $v(t,e){this._context=t,this._alpha=e}$v.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:nu(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ZA=(function t(e){function n(r){return e?new $v(r,e):new tu(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function Bv(t){return t<0?-1:1}function zv(t,e,n){var r=t._x1-t._x0,i=e-t._x1,s=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),l=(s*i+o*r)/(r+i);return(Bv(s)+Bv(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(l))||0}function Uv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ru(t,e,n){var r=t._x0,i=t._y0,s=t._x1,o=t._y1,l=(s-r)/3;t._context.bezierCurveTo(r+l,i+l*e,s-l,o-l*n,s,o)}function Vo(t){this._context=t}Vo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ru(this,this._t0,Uv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,ru(this,Uv(this,n=zv(this,t,e)),n);break;default:ru(this,this._t0,n=zv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function kv(t){this._context=new Gv(t)}(kv.prototype=Object.create(Vo.prototype)).point=function(t,e){Vo.prototype.point.call(this,e,t)};function Gv(t){this._context=t}Gv.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,s){this._context.bezierCurveTo(e,t,r,n,s,i)}};function JA(t){return new Vo(t)}function QA(t){return new kv(t)}function Xv(t){this._context=t}Xv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=Wv(t),i=Wv(e),s=0,o=1;o<n;++s,++o)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],t[o],e[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Wv(t){var e,n=t.length-1,r,i=new Array(n),s=new Array(n),o=new Array(n);for(i[0]=0,s[0]=2,o[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,s[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,s[n-1]=7,o[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/s[e-1],s[e]-=r,o[e]-=r*o[e-1];for(i[n-1]=o[n-1]/s[n-1],e=n-2;e>=0;--e)i[e]=(o[e]-i[e+1])/s[e];for(s[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)s[e]=2*t[e+1]-i[e+1];return[i,s]}function _A(t){return new Xv(t)}function Vv(t){this._context=t}Vv.prototype={areaStart:va,areaEnd:va,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function qA(t){return new Vv(t)}function jo(t,e){this._context=t,this._t=e}jo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function tE(t){return new jo(t,.5)}function eE(t){return new jo(t,0)}function nE(t){return new jo(t,1)}const rE={basis:zA,"basis-closed":UA,"basis-open":kA,bundle:GA,cardinal:XA,"cardinal-closed":WA,"cardinal-open":VA,"catmull-rom":YA,"catmull-rom-closed":KA,"catmull-rom-open":ZA,"monotone-x":JA,"monotone-y":QA,natural:_A,"linear-closed":qA,linear:ho,step:tE,"step-after":nE,"step-before":eE};function au(t,e){var n,r;return t.isLineType(e)||((n=t.isScatterType)==null?void 0:n.call(t,e))||((r=t.isBubbleType)==null?void 0:r.call(t,e))}function jv(t){return e=>au(t,e)}function iu(t,e,n){var r,i,s;const o=n?Ho(t,e,n):void 0;return ae(o)?o:(r=t.isCandlestickType)!=null&&r.call(t,e)?(s=(i=t.getCandlestickData)==null?void 0:i.call(t,e))==null?void 0:s.close:t.getBaseValue(e)}function Ho(t,e,n){var r,i,s;if(!n||(r=t.isCandlestickType)!=null&&r.call(t,e)||!((i=t.isSubchartSourceTypeOf)!=null&&i.call(t,e,qt.CANDLESTICK)))return;const o=(s=t.getCandlestickData)==null?void 0:s.call(t,e);if(o)return t.isBarType(e)?ae(o.open)&&ae(o.close)?o._isUp?o.close:o.open:void 0:ae(o.close)?o.close:void 0}function Hv(t,e,n){const r=Ho(t,e,n);return ae(r)&&t.isBarType(e)}function aE(t,e,n){var r;if(!Hv(t,e,n))return null;const i=(r=t.getCandlestickData)==null?void 0:r.call(t,e);if(i!=null&&i._isUp)return t.color(e);const s=t.config.candlestick_color_down;return(s&&typeof s=="object"?s[e.id]:s)||t.color(e)}function iE(t){var e,n;const r=this;let i;if(au(r,t)){const s=jv(r);i=r.generateGetLinePoints(r.getShapeIndices(s),!1,s)}else r.isBarType(t)?i=r.generateGetBarPoints(r.getShapeIndices(r.isBarType)):(e=r.isCandlestickType)!=null&&e.call(r,t)&&(i=(n=r.generateGetCandlestickPoints)==null?void 0:n.call(r,r.getShapeIndices(r.isCandlestickType)));return i}function Yv(t,e,n){return this.config[e]?this.getGradienColortUrl(t.id):n(t)}function Kv(t){const{$el:e}=this,{elKey:n,className:r,cssRules:i,position:s}=t,o=e.main.select(`.${Re.chart}`);e[n]=s==="first"?o.insert("g",":first-child"):o.append("g"),e[n].attr("class",r),i!=null&&i.length&&e[n].call(this.setCssRule(!1,`.${r}`,i))}function su(t,e){const n=this,{$el:r}=n,{type:i,elKey:s,containerClass:o,itemClass:l,initFn:c,withFocus:u=!0,withStyles:f=!0}=e;r[s]||c.call(n);const d=n.getChartClass(i),h=u?n.classFocus.bind(n):()=>"",S=r.main.select(`.${o}`).selectAll(`.${l}`).data(n.filterNullish(t)).attr("class",E=>d(E)+h(E)).enter().append("g").attr("class",d);return f&&S.style("opacity","0").style("pointer-events",n.getStylePropValue("none")),S}var sE={getDrawShape(){const t=this,e=t.config.axis_rotated,{hasRadar:n,hasTreemap:r}=t.state,i={type:{},indices:{},pos:{}};if(!r&&["bar","candlestick","line","area"].forEach(s=>{const o=Ln(s);if(t.hasType(s)||t.hasTypeOf(o)||s==="line"&&(t.hasType("bubble")||t.hasType("scatter"))){const l=t.getShapeIndices(t[`is${o}Type`]),c=t[`generateDraw${o}`];i.indices[s]=l,i.type[s]=c?c.bind(t)(l,!1):void 0}}),!t.hasArcType()||n||r){let s,o,l,c;r||(s=n?t.radarCircleX:e?t.circleY:t.circleX,o=n?t.radarCircleY:e?t.circleX:t.circleY),r&&t.state.isCanvasMode?l=c=function(){}:(l=t.generateXYForText(i.indices,!0),c=t.generateXYForText(i.indices,!1)),i.pos={xForText:l,yForText:c,cx:(s||function(){}).bind(t),cy:(o||function(){}).bind(t)}}return i},getShapeIndices(t){const e=this,{config:n}=e,r=n.data_xs,i=vn(r),s={};let o=i?{}:0;return i&&zl(Object.keys(r).map(l=>r[l])).forEach(l=>{o[l]=0,s[l]={}}),e.filterTargetsToShow(e.data.targets.filter(t,e)).forEach(l=>{var c;const u=l.id in r?r[l.id]:"",f=u?s[u]:s;for(let d=0,h;h=n.data_groups[d];d++)if(!(h.indexOf(l.id)<0))for(let m=0,S;S=h[m];m++){if(S in f){f[l.id]=f[S];break}l.id!==S&&u&&(f[S]=(c=f[l.id])!=null?c:o[u])}mn(f[l.id])&&(f[l.id]=u?o[u]++:o++,f.__max__=(u?o[u]:o)-1)}),s},getIndices(t,e,n){const r=this,{data_xs:i,bar_indices_removeNull:s}=r.config,{id:o,index:l}=e;if(r.isBarType(o)&&s){const c={};return r.getAllValuesOnIndex(l,!0).forEach((u,f)=>{c[u.id]=f,c.__max__=f}),c}return vn(i)?t[i[o]]:t},getIndicesMax(t){if(!vn(this.config.data_xs))return t.__max__;let e=0;for(const n in t)e+=t[n].__max__||0;return e},getShapeX(t,e,n){const r=this,{config:i,scale:s}=r,o=n?s.subX:s.zoom||s.x,l=i.bar_overlap,c=i.bar_padding,u=(h,m)=>h+m,f=Kn(t)&&(t._$total.length?t._$total.reduce(u)/2:0),d=[];if(f&&Kn(t)&&t._$total.length){let h=0;for(const m of t._$total)h+=m,d.push(h)}return h=>{var m;const S=r.getIndices(e,h,"getShapeX"),E=h.id in S?S[h.id]:0,C=(S.__max__||0)+1;let w=0;if(vn(h.x)){const $=o(h.x,!0);if(f){const z=t[h.id]||t._$width;w=l?$-z/2:$-z+((m=d[E])!=null?m:t._$total.slice(0,E+1).reduce(u))-f}else w=$-(ae(t)?t:t._$width)*(C/2-(l?1:E))}return t&&w&&C>1&&c&&(E&&(w+=c*E),C>2?w-=(C-1)*c/2:C===2&&(w-=c/2)),w}},getShapeY(t){const e=this,n=e.isStackNormalized();return r=>{let{value:i}=r;const s=t?Ho(e,r,t):void 0;return ae(r)?i=r:ae(s)?i=s:e.isAreaRangeType(r)?i=e.getBaseValue(r,"mid"):n?i=e.getRatio("index",r,!0):e.isBubbleZType(r)?i=e.getBubbleZData(r.value,"y"):e.isBarRangeType(r)&&(i=i[1]),e.getYScaleById(r.id,t)(i)}},getShapeYMin(t,e=!1){const n=this,r=n.axis.getId(t),i=n.getYScaleById(t,e),[s]=i.domain(),o=n.config[`axis_${r}_inverted`];return!n.isGrouped(t)&&!o&&s>0?s:0},getShapeOffsetData(t,e){const n=this,r=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),i=n.state.dataGeneration,s=r.map(h=>h.id).join("_"),o=`${Oe.shapeOffset}_${e?"sub":"main"}_${s}`,l=n.cache.get(o);if((l==null?void 0:l.generation)===i)return l;const c=n.isStackNormalized(),u=r.map(h=>{let m=h.values;const S={};n.isStepType(h)&&(m=n.convertValuesToStep(m));const E=m.reduce((C,w)=>{const $=Number(w.x),z=iu(n,w,e);return C[$]=w,S[$]=c?n.getRatio("index",w,!0):z,C},{});return{id:h.id,rowValues:m,rowValueMapByXValue:E,values:S}}),f=r.reduce((h,{id:m},S)=>(h[m]=S,h),{}),d={generation:i,indexMapByTargetId:f,shapeOffsetTargets:u};return n.cache.add(o,d),d},getShapeOffset(t,e,n){const r=this,{shapeOffsetTargets:i,indexMapByTargetId:s}=r.getShapeOffsetData(t,n),o=r.config.data_groupsZeroAs;let l=null;if(!r.config.bar_indices_removeNull){l=new Map;for(const c of i){const u=r.getIndices(e,{id:c.id,index:0});l.set(c.id,i.filter(f=>f.id!==c.id&&u[f.id]===u[c.id]))}}return(c,u)=>{var f;const{id:d,value:h,x:m}=c,S=iu(r,c,n),E=r.getIndices(e,c),C=r.getYScaleById(d,n);if(r.isBarRangeType(c))return C(h[0]);const w=Number(m),$=C(o==="zero"?0:r.getShapeYMin(d,n));let z=$;const B=(f=l==null?void 0:l.get(d))!=null?f:i.filter(W=>W.id!==d&&E[W.id]===E[d]);for(const W of B){const{id:H,rowValueMapByXValue:_,rowValues:q,values:st}=W;if(s[H]<s[d]){const it=st[w];let ot=q[u];(!ot||Number(ot.x)!==w)&&(ot=_[w]);const ct=ot&&iu(r,ot,n);ae(ct)&&ae(S)&&ct*S>=0&&ae(it)&&(S!==0||o==="positive"&&it>0||o==="negative"&&it<0)&&(z+=C(it)-$)}}return z}},generateGetLinePoints(t,e,n){const r=this,{config:i}=r,s=r.getShapeX(0,t,e),o=r.getShapeY(e),l=r.getShapeOffset(n||r.isLineType,t,e),c=r.getYScaleById.bind(r),u=new Map;return(f,d)=>{let h=u.get(f.id);h===void 0&&(h=c.call(r,f.id,e)(r.getShapeYMin(f.id,e)),u.set(f.id,h));const m=l(f,d)||h,S=s(f);let E=o(f);i.axis_rotated&&(f.value>0&&E<h||f.value<0&&h<E)&&(E=h);const C=[S,E-(h-m)];return[C,C,C,C]}},generateGetAreaPoints(t,e){const n=this,{config:r}=n,i=n.getShapeX(0,t,e),s=n.getShapeY(!!e),o=n.getShapeOffset(n.isAreaType,t,e),l=n.getYScaleById.bind(n),c=new Map;return function(u,f){let d=c.get(u.id);d===void 0&&(d=l.call(n,u.id,e)(n.getShapeYMin(u.id,e)),c.set(u.id,d));const h=o(u,f)||d,m=i(u),S=u.value;let E=s(u);return r.axis_rotated&&(S>0&&E<d||S<0&&d<E)&&(E=d),[[m,h],[m,E-(d-h)],[m,E-(d-h)],[m,h]]}},generateGetBarPoints(t,e){const n=this,{config:r}=n,i=e?n.axis.subX:n.axis.x,s=n.getIndicesMax(t)+1,o=n.getBarW("bar",i,s),l=n.getShapeX(o,t,!!e),c=n.getShapeY(!!e),u=n.getShapeOffset(n.isBarType,t,!!e),f=n.getYScaleById.bind(n),d=new Map;return(h,m)=>{const{id:S}=h;let E=d.get(S);E||(E={y0:f.call(n,S,e)(n.getShapeYMin(S,e)),isInverted:r[`axis_${n.axis.getId(S)}_inverted`]},d.set(S,E));const{y0:C,isInverted:w}=E,$=u(h,m)||C,z=ae(o)?o:o[h.id]||o._$width,B=h.value,W=l(h);let H=c(h);r.axis_rotated&&!w&&(B>0&&H<C||B<0&&C<H)&&(H=C),n.isBarRangeType(h)||(H-=C-$);const _=W+z;return[[W,$],[W,H],[_,H],[_,$]]}},circleY(t,e){const n=this,r=t.id;let i;return n.isGrouped(r)&&(i=iE.bind(n)(t)),i?i(t,e)[0][1]:n.getYScaleById(r)(n.getBaseValue(t))},circleX(t){return this.xx(t)},updateCircleY(t=!1){const e=this,n=jv(e),r=e.generateGetLinePoints(e.getShapeIndices(n),t,n),i=e.getShapeY(t);return(s,o)=>{const l=s.id;return e.isGrouped(l)&&au(e,s)?r(s,o)[0][1]:i(s)}},getSubchartCandlestickShapeValue(t,e){return Ho(this,t,e)},isSubchartCandlestickBarValue(t,e){return Hv(this,t,e)},getSubchartCandlestickBarColor(t,e){return aE(this,t,e)},pointR(t){const e=this,{config:n}=e,r=n.point_r;let i=r;return e.isBubbleType(t)?i=e.getBubbleR(t):ie(r)&&(i=r.bind(e.api)(t)),t.r=i,i},pointExpandedR(t){const e=this,{config:n}=e,r=e.isBubbleType(t)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||e.pointR(t)*r:e.pointR(t)},pointSelectR(t){const e=this,n=e.config.point_select_r;return ie(n)?n(t):n||e.pointR(t)*4},isPointFocusOnly(){const t=this;return t.config.point_focus_only&&!t.hasType("bubble")&&!t.hasType("scatter")&&!t.hasArcType(null,["radar"])},getPointSensitivity(t){const e=this;let n=e.config.point_sensitivity;if(t)ie(n)?n=n.call(e.api,t):n==="radius"&&(n=t.r);else return n;return n},getBarW(t,e,n){var r,i,s,o,l;const c=this,{config:u,org:f,scale:d,state:h}=c,m=c.getMaxDataCount(),S=t==="bar"&&((r=u.data_groups)==null?void 0:r.length),E=`${t}_width`,{k:C}=(s=(i=c.getZoomTransform)==null?void 0:i.call(c))!=null?s:{k:1},w=[(o=u.axis_x_min)!=null?o:f.xDomain[0],(l=u.axis_x_max)!=null?l:f.xDomain[1]].map(W=>c.axis.isTimeSeries()?Wn.call(c,W):Number(W));let $=e.tickInterval(m);if(d.zoom&&!c.axis.isCategorized()&&C>1){const W=w.every((H,_)=>H===f.xDomain[_]);$=f.xDomain.map((H,_)=>{const q=W?H:H-Math.abs(w[_]);return d.zoom(q)}).reduce((H,_)=>Math.abs(H)+_)/m}const z=W=>{const H=W?u[E][W]:u[E],_=W?H.ratio:u[`${E}_ratio`],q=W?H.max:u[`${E}_max`],st=ae(H)?H:ie(H)?H.call(c,h.width,n,m):n?$*_/n:0;return q&&st>q?q:st};let B=z();return!S&&Kn(u[E])&&(B={_$width:B,_$total:[]},c.getTargetsToShow().forEach(W=>{u[E][W.id]&&(B[W.id]=z(W.id),B._$total.push(B[W.id]||B._$width))})),B},getShapeByIndex(t,e,n){const r=this,{$el:i}=r,s=Ge(e)?`-${e}`:"";let o=i[t];return o&&!o.empty()?o=o.filter(l=>n?l.id===n:!0).filter(l=>Ge(e)?l.index===e:!0):o=(n?i.main.selectAll(`.${Re[`${t}s`]}${r.getTargetSelectorSuffix(n)}`):i.main).selectAll(`.${Re[t]}${s}`),o},isWithinShape(t,e){var n;const r=this,i=Yt(t);let s;return r.isTargetToShow(e.id)?(n=r.hasValidPointType)!=null&&n.call(r,t.nodeName)?s=r.isStepType(e)?r.isWithinStep(t,r.getYScaleById(e.id)(r.getBaseValue(e))):r.isWithinCircle(t,r.isBubbleType(e)?r.pointSelectR(e)*1.5:0):t.nodeName==="path"&&(s=i.classed(Re.bar)?r.isWithinBar(t):!0):s=!1,s},getInterpolate(t){const n=this.getInterpolateType(t);return rE[n]},getCurve(t){const e=this;return e.config.axis_rotated&&e.isStepType(t)?r=>{const i=e.getInterpolate(t)(r);return i.orgPoint=i.point,i.pointRotated=function(s,o){this._point===1&&(this._point=2);const l=this._y*(1-this._t)+o*this._t;this._context.lineTo(this._x,l),this._context.lineTo(s,l),this._x=s,this._y=o},i.point=function(s,o){this._point===0?this.orgPoint(s,o):this.pointRotated(s,o)},i}:e.getInterpolate(t)},getInterpolateType(t){const e=this,{config:n}=e,r=n.spline_interpolation_type,i=e.isInterpolationType(r)?r:"cardinal";return e.isSplineType(t)?i:e.isStepType(t)?n.line_step_type:"linear"},isWithinBar(t){const e=Jn(this.state.event,t),n=Rh(t),[r,i,s]=n,o=Math.min(r.x,i.x),l=Math.min(r.y,i.y),c=this.config.bar_sensitivity,u=Math.abs(s.x-i.x),f=Math.abs(r.y-i.y),d=o-c,h=o+u+c,m=l+f+c,S=l-c;return d<e[0]&&e[0]<h&&S<e[1]&&e[1]<m}},oE=Object.defineProperty,lE=(t,e,n)=>e in t?oE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gn=(t,e,n)=>lE(t,typeof e!="symbol"?e+"":e,n);function Zv(){var t,e,n;return(n=(e=(t=se.performance)==null?void 0:t.now)==null?void 0:e.call(t))!=null?n:Date.now()}function cE(t){return t.hasArcType()?"arc charts":t.hasType("funnel")?"funnel chart":null}function uE(t){var e,n;const{config:r}=t,i=r.render_mode==="canvas"?cE(t):null;i&&((n=(e=se.console)==null?void 0:e.warn)==null||n.call(e,`[billboard.js] render.mode='canvas' is ignored for ${i}; falling back to SVG.`),r.render_mode="svg")}class br{constructor(e){Gn(this,"api"),Gn(this,"config"),Gn(this,"cache"),Gn(this,"$el"),Gn(this,"state"),Gn(this,"charts"),Gn(this,"data",{xs:{},targets:[]}),Gn(this,"axis"),Gn(this,"scale",{x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null}),Gn(this,"org",{xScale:null,xDomain:null}),Gn(this,"color"),Gn(this,"patterns"),Gn(this,"levelColor"),Gn(this,"point"),Gn(this,"brush"),Gn(this,"format",{extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null});const n=this;n.api=e,n.config=new $a,n.cache=new B1;const r=new D1;n.$el=r.getStore("element"),n.state=r.getStore("state"),n.$T=n.$T.bind(n)}$T(e,n,r){const{config:i,state:s}=this,o=i.transition_duration,l=i.subchart_show;let c=e;return c&&("tagName"in c&&(c=Yt(c)),c=(n!==!1&&o||n)&&(!s.zooming||s.dragging)&&!s.resizing&&s.rendered&&!l?c.transition(r).duration(o):c),c}beforeInit(){const e=this;e.callPluginHook("$beforeInit"),Ne(e.config.onbeforeinit,e.api)}afterInit(){const e=this;e.callPluginHook("$afterInit"),Ne(e.config.onafterinit,e.api)}init(){const e=this,{config:n,state:r,$el:i}=e,{boost_useCssRule:s,bindto:o}=n;z1(e),uE(e);const l=e.hasArcType();if(r.hasRadar=!r.hasAxis&&e.hasType("radar"),r.hasFunnel=!r.hasAxis&&e.hasType("funnel"),r.hasTreemap=!r.hasAxis&&e.hasType("treemap"),r.hasAxis=!l&&!r.hasFunnel&&!r.hasTreemap,r.datetimeId=`bb-${+new Date*Cr()}`,s){const u=Ye.createElement("style");u.type="text/css",Ye.head.appendChild(u),r.style={rootSelector:`.${r.datetimeId}`,sheet:u.sheet},i.style=u}const c={element:o,classname:"bb"};He(o)&&(c.element=o.element||"#chart",c.classname=o.classname||c.classname),i.chart=ie(c.element.node)?o.element:Yt(c.element||[]),i.chart.empty()&&(i.chart=Yt(Ye.body.appendChild(Ye.createElement("div")))),i.chart.html("").classed(c.classname,!0).classed(r.datetimeId,s).style("position","relative"),e.initParams(),e.initToRender()}initToRender(e){const n=this,{config:r,state:i,$el:{chart:s}}=n,o=()=>j1(s,{display:"none",visibility:"hidden"}),l=r.render.lazy===!1?!1:r.render.lazy||o(),c=se.MutationObserver;l&&c&&r.render.observe!==!1&&!e&&new c((u,f)=>{o()||(f.disconnect(),!i.rendered&&n.initToRender(!0))}).observe(s.node(),{attributes:!0,attributeFilter:["class","style"]}),(!l||e)&&n.convertData(r,u=>{n.initWithData(u),n.afterInit()})}initParams(){var e,n;const r=this,{config:i,format:s,state:o}=r;if(i.render_mode==="canvas"&&((e=r.prepareCanvasConfig)==null||e.call(r)),r.color=r.generateColor(),r.levelColor=r.generateLevelColor(),i.padding===!1&&(i.axis_x_show=!1,i.axis_y_show=!1,i.axis_y2_show=!1,i.subchart_show=!1),i.render_mode!=="canvas"&&(r.hasPointType()||(n=r.hasLegendDefsPoint)!=null&&n.call(r))&&(r.point=r.generatePoint()),o.hasAxis){r.initClip(),s.extraLineClasses=r.generateExtraLineClass(),s.dataTime=i.data_xLocaltime?Ff:Nf,s.axisTime=i.axis_x_localtime?Dl:Fl;const f=i.zoom_enabled&&i.zoom_type==="drag";s.defaultAxisTime=d=>{const{x:h,zoom:m}=r.scale,S=f?m:m&&h.orgDomain().toString()!==m.domain().toString(),E=d.getMilliseconds()&&".%L"||d.getSeconds()&&".:%S"||d.getMinutes()&&"%I:%M"||d.getHours()&&"%I %p"||d.getDate()!==1&&"%b %d"||S&&d.getDate()===1&&"%b'%y"||d.getMonth()&&"%-m/%-d"||"%Y";return s.axisTime(E)(d)}}const{legend_position:l,legend_inset_anchor:c,axis_rotated:u}=i;o.isLegendRight=l==="right",o.isLegendInset=l==="inset",o.isLegendTop=c==="top-left"||c==="top-right",o.isLegendLeft=c==="top-left"||c==="bottom-left",o.rotatedPadding.top=r.getResettedPadding(o.rotatedPadding.top),o.rotatedPadding.right=u&&!i.axis_x_show?0:30,o.inputType=H1(i.interaction_inputType_mouse,i.interaction_inputType_touch)}initWithData(e){var n,r,i,s,o,l;const c=this,{config:u,scale:f,state:d,$el:h,org:m}=c,{hasAxis:S,hasFunnel:E,hasTreemap:C}=d,w=u.interaction_enabled,$=c.hasType("polar"),z=u.data_labels_backgroundColors;if(S&&(c.axis=c.getAxisInstance(),u.zoom_enabled&&c.initZoom()),c.data.xs={},c.data.targets=c.convertDataToTargets(e),u.data_filter&&(c.data.targets=c.data.targets.filter(u.data_filter.bind(c.api))),u.data_hide&&c.addHiddenTargetIds(u.data_hide===!0?c.mapToIds(c.data.targets):u.data_hide),u.legend_hide&&c.addHiddenLegendIds(u.legend_hide===!0?c.mapToIds(c.data.targets):u.legend_hide),c.updateSizes(),c.updateScales(!0),S){const{x:H,y:_,y2:q,subX:st,subY:it,subY2:ot}=f;H&&(H.domain(ti(c.getXDomain(c.data.targets),!u.axis_x_inverted)),st.domain(H.domain()),m.xDomain=H.domain()),_&&(_.domain(c.getYDomain(c.data.targets,"y")),it.domain(_.domain())),q&&(q.domain(c.getYDomain(c.data.targets,"y2")),ot&&ot.domain(q.domain()))}if(u.render_mode==="canvas"){if(!c.initCanvas)throw Error("[billboard.js] Please import and call canvas() to use render.mode='canvas'.");if(c.bindResize(),c.initCanvas(),u.tooltip_show&&c.initTooltip(),c.callPluginHook("$init"),Ne(u.oninit,c.api),c.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),u.data_onmin||u.data_onmax){const H=c.getMinMaxData();Ne(u.data_onmin,c.api,H.min),Ne(u.data_onmax,c.api,H.max)}d.rendered=!0;return}if(h.svg=h.chart.append("svg").style("overflow","hidden").style("display","block"),w&&d.inputType){const H=d.inputType==="touch",{onclick:_,onover:q,onout:st}=u,it=(n=u.interaction_inputType_touch)==null?void 0:n.preventDefault,ot=Ra(it)&&it||!1,ct=!isNaN(it)&&it||null,gt=H?{passive:!ot&&ct===null}:void 0;h.svg.on("click",(_==null?void 0:_.bind(c.api))||null).on(H?"touchstart":"mouseenter",(q==null?void 0:q.bind(c.api))||null,gt).on(H?"touchend":"mouseleave",(st==null?void 0:st.bind(c.api))||null)}u.svg_classname&&h.svg.attr("class",u.svg_classname);const B=ie(u.color_tiles)&&c.patterns;(S||B||$||C||z||(r=c.hasLegendDefsPoint)!=null&&r.call(c))&&(h.defs=h.svg.append("defs"),S&&["id","idXAxis","idYAxis","idGrid"].forEach(H=>{c.appendClip(h.defs,d.clip[H])}),c.generateTextBGColorFilter(z),B&&c.patterns.forEach(H=>h.defs.append(()=>H.node))),c.updateSvgSize(),c.bindResize();const W=h.svg.append("g").classed(ze.main,!0).attr("transform",E||C?null:c.getTranslate("main"));if(h.main=W,u.subchart_show&&c.initSubchart(),u.tooltip_show&&c.initTooltip(),u.title_text&&c.initTitle(),!C&&u.legend_show&&c.initLegend(),u.data_empty_label_text&&W.append("text").attr("class",`${En.text} ${ze.empty}`).attr("text-anchor","middle").attr("dominant-baseline","middle"),S&&(u.regions.length&&((i=c.initRegion)==null||i.call(c)),!u.clipPath&&c.axis.init()),W.append("g").classed(ze.chart,!0).attr("clip-path",S?d.clip.path:null),c.callPluginHook("$init"),c.initChartElements(),S&&(w&&((s=c.initEventRect)==null||s.call(c)),(o=c.initGrid)==null||o.call(c),u.clipPath&&((l=c.axis)==null||l.init())),c.updateTargets(c.data.targets),c.updateDimension(),Ne(u.oninit,c.api),c.setBackground(),c.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),u.data_onmin||u.data_onmax){const H=c.getMinMaxData();Ne(u.data_onmin,c.api,H.min),Ne(u.data_onmax,c.api,H.max)}u.tooltip_show&&c.initShowTooltip(),d.rendered=!0}initChartElements(){const e=this,{hasAxis:n,hasRadar:r,hasTreemap:i}=e.state,s=[];if(n){const o=["bar","bubble","candlestick","line"];e.config.bar_front&&o.push(o.shift());for(const l of o){const c=Ln(l);(l==="line"&&e.hasTypeOf(c)||e.hasType(l))&&s.push(c)}}else if(i)s.push("Treemap");else if(e.hasType("funnel"))s.push("Funnel");else{const o=e.hasType("polar"),l=e.hasType("gauge");r||s.push("Arc","Pie"),l?s.push("Gauge"):r?s.push("Radar"):o&&s.push("Polar")}for(const o of s)e[`init${o}`]();vn(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()}setChartElements(){const e=this,{$el:{chart:n,svg:r,defs:i,main:s,tooltip:o,legend:l,title:c,canvas:u,eventOverlay:f,grid:d,needle:h,arcs:m,circle:S,bar:E,candlestick:C,line:w,area:$,text:z}}=e;e.api.$={chart:n,svg:r,canvas:u,eventOverlay:f,defs:i,main:s,tooltip:o,legend:l,title:c,grid:d,arc:m,circles:S,bar:{bars:E},candlestick:C,line:{lines:w,areas:$},needle:h,text:{texts:z}}}setBackground(){const e=this,{config:{background:n},state:r,$el:{svg:i}}=e;if(vn(n)){const s=i.select("g").insert(n.imgUrl?"image":"rect",":first-child");n.imgUrl?s.attr("href",n.imgUrl):n.color&&s.style("fill",n.color).attr("clip-path",r.clip.path),s.attr("class",n.class||null).attr("width","100%").attr("height","100%")}}updateTargets(e){var n,r;const i=this,{hasAxis:s,hasFunnel:o,hasRadar:l,hasTreemap:c}=i.state,u=d=>i[`updateTargetsFor${d}`](e.filter(i[`is${d}Type`].bind(i)));if(i.updateTargetsForText(e),s){const d=["bar","candlestick","line"];for(const h of d){const m=Ln(h);(h==="line"&&i.hasTypeOf(m)||i.hasType(h))&&u(m)}(n=i.updateTargetsForSubchart)==null||n.call(i,e)}else if(i.hasArcType(e)){let d="Arc";l?d="Radar":i.hasType("polar")&&(d="Polar"),u(d)}else o?u("Funnel"):c&&u("Treemap");const f=i.hasType("bubble")||i.hasType("scatter");f&&((r=i.updateTargetForCircle)==null||r.call(i)),i.filterTargetsToShowAtInit(f)}filterTargetsToShowAtInit(e=!1){const n=this,{$el:{svg:r},$T:i}=n;let s=`.${ze.target}`;e&&(s+=`, .${$n.chartCircles} > .${$n.circles}`),i(r.selectAll(s).filter(o=>n.isTargetToShow(o.id))).style("opacity",null)}getWithOption(e){const n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};for(const[r,i]of Object.entries(n)){const s=je(i)?n[i]:i;n[r]=ia(e,`with${r}`,s)}return n}initialOpacity(e){const n=this,{withoutFadeIn:r}=n.state;return n.getBaseValue(e)!==null&&r[e.id]?null:"0"}bindResize(){var e,n;const r=this,{$el:i,config:s,state:o}=r,{resize_auto:l,resize_live:c}=s,u=/^(true|parent)$/.test(l),f=[],d=()=>{var S;const E=o.current.width,C=o.current.height;return r.setContainerSize(),!o.resizePreview&&E===o.current.width&&C===o.current.height?!1:(o.resizing=!0,o.dirty.size=!0,s.legend_show&&(r.updateSizes(),o.isCanvasMode?(S=r.updateHtmlLegend)==null||S.call(r):r.updateLegend()),r.api.flush(!1),!0)},h=()=>{if(o.resizeLiveScale===null&&(o.resizeLiveScale=o.resizeRedrawTime>dt),o.resizeLiveScale){r.previewResize();return}const S=Zv();d()&&(o.resizeRedrawTime=Zv()-S,o.resizeLiveScale=o.resizeRedrawTime>dt)},m=Z1(s.resize_timer,u&&c?h:void 0);f.push(()=>Ne(s.onresize,r.api)),u&&f.push(d),f.push(()=>{Ne(s.onresized,r.api),o.resizing=!1,o.resizeLiveScale=null}),f.forEach(S=>m.add(S)),r.resizeFunction=m,l==="parent"&&se.ResizeObserver?(r.resizeFunction.resizeObserver=new se.ResizeObserver(r.resizeFunction.bind(r))).observe(i.chart.node().parentNode):(l==="parent"&&((n=(e=se.console)==null?void 0:e.warn)==null||n.call(e,"[billboard.js] resize.auto='parent' requires ResizeObserver; falling back to window resize.")),se.addEventListener("resize",r.resizeFunction))}callPluginHook(e,...n){this.config.plugins.forEach(r=>{e==="$beforeInit"&&(r.$$=this,this.api.plugins.push(r)),r[e](...n)})}}xn(br.prototype,[pb,xb,yb,Ob,Mb,Nb,uA,wb,fA,TA,bA,jy,sE,SA,AA,OA,MA,FA,NA,BA]);const ou=[xr,er,Vn,kl],Jv=10,fE=750,Qv=6,dE=2,hE=1e5,vE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Yo=new WeakMap;function _v(t){var e,n;(n=(e=se.console)==null?void 0:e.warn)==null||n.call(e,`[billboard.js] ${t}`)}function Ko(t,e){var n;const{config:r}=t,i=(n=r.data_names[e])!=null?n:e;return ie(r.legend_format)?r.legend_format(i,e!==i?e:void 0):i}function gE(t){return`${t}`.replace(/[&<>"']/g,e=>vE[e])}function pE(t,e){var n,r;const{config:i}=t,s=((n=t.mapToIds)==null?void 0:n.call(t,t.data.targets))||[],o=((r=t.getValidPointPattern)==null?void 0:r.call(t))||(Array.isArray(i.point_pattern)&&i.point_pattern.length?i.point_pattern:[i.point_type]),l=Math.max(0,s.indexOf(e));return o[l%o.length]||"circle"}function mE(t,e){const n=gE(t.color(e)),r=pE(t,e),i='viewBox="0 0 8 8" aria-hidden="true" focusable="false" style="display:block;width:100%;height:100%;overflow:visible;pointer-events:none"',s=`fill="${n}" stroke="${n}"`;return/^rect(angle)?$/i.test(r)?`<svg ${i}><rect x="1" y="1" width="6" height="6" ${s}></rect></svg>`:!r||/^circle$/i.test(r)?`<svg ${i}><circle cx="4" cy="4" r="3" ${s}></circle></svg>`:`<svg ${i}><g ${s}>${Gr(r)}</g></svg>`}function xE(t,e){const n=new Map;e.each(function(r){n.set(r,this)}),t.cache.add(Oe.legendItemMap,n)}function qv(t,e){const{config:n}=t;e.attr("class",function(r){const s=`${Yt(this).attr("class")||""} ${t.generateClass($e.legendItem,r)}`;return Array.from(new Set(s.trim().split(/\s+/).filter(Boolean))).join(" ")}).style("visibility",r=>t.isLegendToShow(r)?null:"hidden").classed($e.legendItemHidden,r=>!t.isTargetToShow(r)).classed(cr.legendItemInteractive,!!n.interaction_enabled),xE(t,e)}function yE(t,e){var n;const{legend:r}=t.$el,i=((n=t.mapToTargetIds)==null?void 0:n.call(t,[e]))||[e];r==null||r.selectAll(`.${$e.legendItem}`).classed(nn.legendItemFocused,s=>i.indexOf(s)>=0).style("opacity",function(s){return i.indexOf(s)>=0?null:t.opacityForUnfocusedLegend.call(t,Yt(this))})}function TE(t){const{legend:e}=t.$el;e==null||e.selectAll(`.${$e.legendItem}`).classed(nn.legendItemFocused,!1).style("opacity",null)}function bE(t,e){var n,r,i;const{state:s}=t,l=(((n=t.mapToTargetIds)==null?void 0:n.call(t,[e]))||[e]).filter(t.isTargetToShow,t),c=new Set(l),u=(((r=t.mapToTargetIds)==null?void 0:r.call(t))||[]).filter(f=>!c.has(f)&&t.isTargetToShow(f));s.focusedTargetIds=c,s.defocusedTargetIds=new Set(u),(i=t.renderCanvasFrame)==null||i.call(t,void 0,null,!1)}function tg(t){var e,n,r;const{state:i}=t,s=!!((e=i.focusedTargetIds)!=null&&e.size)||!!((n=i.defocusedTargetIds)!=null&&n.size);i.focusedTargetIds=new Set,i.defocusedTargetIds=new Set,s&&((r=t.renderCanvasFrame)==null||r.call(t,void 0,null,!1))}function eg(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function SE(t,e,n){const r=eg(n);t.state.canvasLegendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function ng(t,e){const n=t.state.canvasLegendTouch,r=n&&eg(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>Jv||Math.abs(r.clientY-n.y)>Jv)}function AE(t,e,n){ng(t,n);const r=t.state.canvasLegendTouch;return t.state.canvasLegendTouch=null,!!r&&r.id===e&&!r.moved}function EE(t,e){t.state.canvasLegendLastTouchClickId=e,t.state.canvasLegendLastTouchClickTime=Date.now()}function CE(t,e){const{state:n}=t,r=n.canvasLegendLastTouchClickId===e&&Date.now()-(n.canvasLegendLastTouchClickTime||0)<fE;return r&&(n.canvasLegendLastTouchClickId=null,n.canvasLegendLastTouchClickTime=0),r}function rg(t,e){const{api:n,config:r,state:i}=t;if(e.on("click dblclick mouseover mouseout touchstart touchmove touchend",null),!r.interaction_enabled)return;const s=r.legend_item_interaction,o=typeof s=="object"&&(s!=null&&s.dblclick)?"dblclick":"click",l=i.inputType==="touch",c=s||ie(r.legend_item_onclick),u=l?ug(r):void 0,f=function(d,h){var m;if(!Ne(r.legend_item_onclick,n,h,!i.hiddenTargetIds.has(h))){const S=Yt(this);d.type==="dblclick"||d.altKey?i.hiddenTargetIds.size&&!S.classed($e.legendItemHidden)?n.show():(n.hide(),n.show(h)):(n.toggle(h),S.classed(nn.legendItemFocused,!1)),tg(t)}l&&((m=t.hideTooltip)==null||m.call(t))};e.on(o,c?function(d,h){l&&d.type==="click"&&CE(t,h)||f.call(this,d,h)}:null),l&&o==="click"&&c&&e.on("touchstart",function(d,h){SE(t,h,d)},u).on("touchmove",d=>{ng(t,d)},u).on("touchend",function(d,h){AE(t,h,d)&&(EE(t,h),f.call(this,d,h))},u),!l&&e.on("mouseover",s||ie(r.legend_item_onover)?function(d,h){Ne(r.legend_item_onover,n,h,!i.hiddenTargetIds.has(h))||!i.transiting&&t.isTargetToShow(h)&&(yE(t,h),bE(t,h))}:null).on("mouseout",s||ie(r.legend_item_onout)?function(d,h){Ne(r.legend_item_onout,n,h,!i.hiddenTargetIds.has(h))||(TE(t),tg(t))}:null)}function IE(t,e){var n,r;const i=(r=(n=t.$el.chart)==null?void 0:n.node)==null?void 0:r.call(n),s=i==null?void 0:i.ownerDocument;if(!i||!s)return null;const o=s.createElementNS("http://www.w3.org/2000/svg","svg"),l=s.createElementNS("http://www.w3.org/2000/svg","g"),c=s.createElementNS("http://www.w3.org/2000/svg","text");o.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",l.setAttribute("class",$e.legendItem),c.textContent=e,l.appendChild(c),o.appendChild(l),i.appendChild(o);const u=ln(c);return o.remove(),u}function ag(t){return/^(indexed|category|log|timeseries)$/.test(t)}function Zo(t){return/^(indexed|log|timeseries)$/.test(t)}function RE(t){var e,n;const r=t;return((e=r.changedTouches)==null?void 0:e[0])||((n=r.touches)==null?void 0:n[0])||("clientX"in t?t:null)}function wE(t,e,n=!1){var r,i;const s=ps(t,e);return s?n?(i=(r=t.hitDetector).findNearestShape)==null?void 0:i.call(r,s[0],s[1]):t.hitDetector.findNearest(s[0],s[1]):null}function OE(t,e){var n;const{config:r,state:i}=t,{height:s,margin:o,width:l,xAxisHeight:c}=i,[u,f]=e,d=o.left,h=o.left+l,m=o.top,S=o.top+s,E=r.axis_x_show?Math.max(c||0,24):0;return(n=t.isMultipleX)!=null&&n.call(t)||i.hasTreemap?!1:r.axis_rotated?f>=m&&f<=S&&u>=d-E&&u<=h:u>=d&&u<=h&&f>=m&&f<=S+E}function PE(t,e){const{state:{height:n,margin:r,width:i}}=t,[s,o]=e;return s>=r.left&&s<=r.left+i&&o>=r.top&&o<=r.top+n}function ME(t,e){var n,r;return t.hitDetector.findNearest(e[0],e[1])||(OE(t,e)?(r=(n=t.hitDetector).findNearestIndexByCoord)==null?void 0:r.call(n,e[0],e[1]):null)}function ig(t,e){var n;const{config:r,state:i}=t,s=t.filterTargetsToShow(t.data.targets),o=cg(t,e),l=r.tooltip_grouped&&!i.hasTreemap&&!o?(n=t.filterByX)==null?void 0:n.call(t,s,e.x):null;return(i.hasTreemap?[e]:o?[e]:r.tooltip_grouped?l!=null&&l.length?l:s.map(c=>c.values[e.index]).filter(Boolean):[e]).map(c=>{var u;return((u=t.addName)==null?void 0:u.call(t,c))||c})}function LE(t,e,n){var r,i;return(r=t.isMultipleX)!=null&&r.call(t)&&!cg(t,e)?[((i=t.addName)==null?void 0:i.call(t,e))||e]:n}function ps(t,e){const n=RE(e);if(!n)return null;const r=t.$el.canvas.node(),i=ln(r,!0);return[n.clientX-i.left,n.clientY-i.top]}function lu(t,e){var n,r;if(!Array.isArray(e)||e.length<2)return null;const i=e.slice(0,2);return(r=(n=t.axis)==null?void 0:n.isTimeSeries)!=null&&r.call(n)?i.map(s=>Wn.call(t,s)):i}function ms(t){const{config:e,state:n}=t;return!e.subchart_show||!n.hasAxis||n.width2<=0||n.height2<=0?null:{x:n.margin2.left,y:n.margin2.top,w:n.width2,h:n.height2}}function sg(t,e){const n=ms(t);return!!n&&e[0]>=n.x&&e[0]<=n.x+n.w&&e[1]>=n.y&&e[1]<=n.y+n.h}function DE(t,e){const{config:n,state:r}=t,i=ms(t);if(n.subchart_brush_enabled!==!1||!i||!sg(t,e))return null;const s=Td(t,n.axis_rotated?e[1]-i.y:e[0]-i.x);return s===null?null:n.axis_rotated?[r.margin.left+r.width/2,r.margin.top+s]:[r.margin.left+s,r.margin.top+r.height/2]}function Jo(t){var e,n;const r=ms(t),i=r?t.config.axis_rotated?r.h:r.w:0,s=(n=(e=t.axis)==null?void 0:e.getExtent)==null?void 0:n.call(e),o=Array.isArray(s)?s.slice(0,2):[];if(o.length===2&&o.every(Number.isFinite)){const l=Math.max(0,Math.min(i,o[0])),c=Math.max(0,Math.min(i,o[1]));return[Math.min(l,c),Math.max(l,c)]}return[0,i]}function cu(t,e,n=!1){const r=ps(t,e),i=r&&ms(t);if(!r||!i||!sg(t,r))return null;const s=t.config.axis_rotated?r[1]-i.y:r[0]-i.x,[o,l]=Jo(t);return!n&&(s<o||s>l)?null:Math.max(o,Math.min(l,s))}function FE(t,e,n){const r=Math.min(e,n),i=Math.max(e,n);return[t.scale.subX.invert(r),t.scale.subX.invert(i)]}function og(t){const{scale:e,state:n}=t,r=n.domain;if(!(r!=null&&r.length)||!e.subX)return null;const i=ms(t),s=e.subX(r[0]),o=e.subX(r[1]);if(!i||!Number.isFinite(s)||!Number.isFinite(o))return null;const[l,c]=Jo(t);return[Math.max(l,Math.min(c,Math.min(s,o))),Math.max(l,Math.min(c,Math.max(s,o)))]}function lg(t,e){const n=og(t);if(!n)return"select";const[r,i]=n;return Math.abs(e-r)<=Qv?"resize-start":Math.abs(e-i)<=Qv?"resize-end":e>r&&e<i?"move":"select"}function uu(t,e,n){const[r,i]=Jo(t);return[Math.max(r,Math.min(i,e)),Math.max(r,Math.min(i,n))]}function NE(t,e){return/^resize/.test(e)?t.config.axis_rotated?"ns-resize":"ew-resize":e==="move"?"move":"crosshair"}function ga(t){return t?`${t.id}:${t.index}`:null}function $E(t,e){const n=t.state.canvasSelectionDragIncluded,r=Yo.get(t)||new Map,i=new Map,s=new Set,o=[];return e.filter(l=>fu(t,l)).forEach(l=>{const c=ga(l);c&&(s.add(c),!i.has(c)&&i.set(c,l))}),i.forEach((l,c)=>{!n.has(c)&&o.push(l)}),r.forEach((l,c)=>{!s.has(c)&&o.push(l)}),Yo.set(t,i),{included:s,rows:o}}function BE(t){return t?Array.isArray(t)?t:[t]:null}function fu(t,e){return e&&An(t,e)&&ei(t,e,ou)&&ou.some(n=>n(t,e))&&t.config.data_selection_isselectable.bind(t.api)(e)}function du(t,e){t.filterTargetsToShow(t.data.targets).filter(n=>ei(t,n,ou)).forEach(n=>{n.values.forEach(r=>{fu(t,r)&&e(r)})})}function cg(t,e){return!(t.config.axis_x_forceAsSingle&&t.config.tooltip_grouped)&&(la(t,e)||ca(t,e))}function zE(t){return t.interaction_inputType_touch!==!1}function ug(t){var e;const n=(e=t.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Ra(n)&&n||!1,i=!isNaN(n)&&n||null;return{passive:!r&&i===null}}function UE(t){var e;const n=(e=t.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Ra(n)&&n||!1,i=!isNaN(n)&&n||null;let s;return o=>{var l,c;const u=((l=o.changedTouches)==null?void 0:l[0])||((c=o.touches)==null?void 0:c[0]);if(!u)return;const f=u[`client${t.axis_rotated?"Y":"X"}`];o.type==="touchstart"?r?o.preventDefault():i!==null&&(s=f):o.type==="touchmove"&&(r||s===!0||i!==null&&Math.abs(s-f)>=i)&&(s=!0,o.preventDefault())}}function pi(t,e){return e.pointerType!=="mouse"&&t.state.inputType!=="touch"}function kE(t,e){const{state:n}=t,r=ga(e),i=r&&n.canvasLastInputClickKey===r&&Date.now()-(n.canvasLastInputClickTime||0)<750;return i&&(n.canvasLastInputClickKey=null,n.canvasLastInputClickTime=0),!!i}function GE(t,e){t.state.canvasLastInputClickKey=ga(e),t.state.canvasLastInputClickTime=Date.now()}function XE(){var t,e,n;return(n=(e=(t=se.performance)==null?void 0:t.now)==null?void 0:e.call(t))!=null?n:Date.now()}function fg(t,e=!1){return Array.isArray(t)&&t.length>=2&&t.every(n=>Number.isFinite(+n)&&(!e||+n>0))}function WE(t,e,n,r=!1){return t.slice(0,2).map((i,s)=>{const o=r?Math.exp(Math.log(+i)+(Math.log(+e[s])-Math.log(+i))*n):+i+(+e[s]-+i)*n;return i instanceof Date||e[s]instanceof Date?new Date(o):o})}function VE(t){return t.data.targets.reduce((e,n)=>e+n.values.length,0)}function jE(t){const{scale:e}=t,n=t.filterTargetsToShow(t.data.targets);["y","y2"].forEach(r=>{var i;(i=e[r])==null||i.domain(t.getYDomain(n,r))}),t.withSubchartTypeContext(()=>{var r,i;(r=e.subY)==null||r.domain(t.getYDomain(n,"y")),(i=e.subY2)==null||i.domain(t.getYDomain(n,"y2"))})}const HE={prepareCanvasConfig(){var t,e;const{config:n,state:r}=this;this.warnUnsupportedCanvasOptions(),(t=r.orgConfig)!=null&&t.transition&&Object.prototype.hasOwnProperty.call(r.orgConfig.transition,"duration")&&r.orgConfig.transition.duration&&_v("canvas mode: transition.duration is ignored; canvas redraws synchronously."),n.transition_duration=0,ag(n.axis_x_type)||(n.axis_x_type="indexed"),Zo(n.axis_y_type)||(n.axis_y_type="indexed"),Zo(n.axis_y2_type)||(n.axis_y2_type="indexed"),(e=this.hasType)!=null&&e.call(this,"bubble")&&(n.point_show=!0,n.point_type="circle")},applyCanvasSubchartDomain(){const t=this,{axis:e,config:n,scale:r,state:i}=t;if(!n.subchart_show||!i.hasAxis||!r.subX)return;!i.rendered&&!i.domain&&n.subchart_init_range&&(i.domain=lu(t,n.subchart_init_range));const s=lu(t,i.domain);!s||!t.withinRange(s,t.getZoomDomain("subX",!0),t.getZoomDomain("subX"))||(i.domain=s,r.x.domain(s),e.x.scale(r.x))},setCanvasSubchartDomain(t,e=!0,n=!1){const r=this,{config:i,scale:s,state:o}=r,l=lu(r,t);if(!(!i.subchart_show||!l||!r.withinRange(l,r.getZoomDomain("subX",!0),r.getZoomDomain("subX"))))return o.domain=l,s.zoom=null,e&&r.redraw({withTransition:!1,withY:i.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),n&&i.subchart_onbrush.bind(r.api)(o.domain),o.domain},clearCanvasSubchartDomain(t=!0,e=!1){var n;const r=this,{axis:i,config:s,org:o,scale:l,state:c}=r;s.subchart_show&&(c.domain=void 0,l.zoom=null,(n=o.xDomain)!=null&&n.length&&(l.x.domain(o.xDomain),i.x.scale(l.x)),t&&r.redraw({withTransition:!1,withUpdateXDomain:!0,withUpdateOrgXDomain:!1,withY:s.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e&&s.subchart_onbrush.bind(r.api)(l.x.orgDomain()))},flushCanvasFlow(){var t,e;const{state:n}=this;n.canvasFlowFinish&&(n.canvasFlowFrame!==null&&((e=(t=se).cancelAnimationFrame)==null||e.call(t,n.canvasFlowFrame)),n.canvasFlowFrame=null,n.canvasFlowFinish())},animateCanvasFlow(t){var e,n,r,i,s,o,l,c,u,f,d;const h=this,{axis:m,data:S,org:E,scale:C,state:w}=h,{done:$=()=>{},duration:z,length:B,orgDataCount:W}=t,H=(e=se.requestAnimationFrame)==null?void 0:e.bind(se),_=!!((n=m.isLog)!=null&&n.call(m,"x"));if(!H||!z||!B||!W||VE(h)>hE)return!1;const q=C.x.domain().slice(0,2),st=(i=(r=E.xDomain)==null?void 0:r.slice)==null?void 0:i.call(r),it=(c=(o=(s=C.subX)==null?void 0:s.domain)==null?void 0:(l=o.call(s)).slice)==null?void 0:c.call(l);if(!fg(q,_))return!1;const ot=S.targets.map(St=>St.values.splice(0,B));h.updateXDomain(h.filterTargetsToShow(S.targets),!0,!0);const ct=C.x.domain().slice(0,2),gt=(f=(u=E.xDomain)==null?void 0:u.slice)==null?void 0:f.call(u);if(S.targets.forEach((St,Mt)=>{St.values.unshift(...ot[Mt])}),!fg(ct,_))return st&&(E.xDomain=st),C.x.domain(q),it&&C.subX.domain(it),m.x.scale(C.x),!1;jE(h);let tt=!1;const ft=XE(),lt=()=>{var St,Mt;tt||(tt=!0,S.targets.forEach(Ot=>{Ot.values.splice(0,B)}),gt&&(E.xDomain=gt),C.x.domain(ct),(Mt=(St=C.subX)==null?void 0:St.domain)==null||Mt.call(St,gt!=null?gt:ct),m.x.scale(C.x),w.dirty.data=!0,w._eventRectFingerprint=null,w.canvasShape=null,w._cachedDrawShape=null,h.redraw({withLegend:!0,withTransition:!1,withTrimXDomain:!1,withUpdateOrgXDomain:!0,withUpdateXAxis:!0,withUpdateXDomain:!0}),h.updateTypesElements(),w.canvasFlowFrame=null,w.canvasFlowFinish=null,w.flowing=!1,$.call(h.api))},bt=St=>{const Mt=Math.min(1,Math.max(0,(St-ft)/z)),Ot=WE(q,ct,Mt,_);C.x.domain(Ot),m.x.scale(C.x),w.canvasShape=null,w._cachedDrawShape=null,w._canvasVisibleRangeCache=null,w._canvasXTickValuesCache=null,h.renderCanvasFrame(void 0,null,!1),Mt<1?w.canvasFlowFrame=H(bt):lt()};return st&&(E.xDomain=st),C.x.domain(q),it&&C.subX.domain(it),m.x.scale(C.x),w.flowing=!0,w.cancelClick=!0,(d=h.hideTooltip)==null||d.call(h),w.canvasFlowFinish=lt,w.canvasFlowFrame=H(bt),!0},initCanvas(){var t;const e=this,{config:n,state:r,$el:i}=e,s=i.chart.node();r.isCanvasMode=!0,r.canvasInlineStyle.minHeight=s.style.minHeight,se.getComputedStyle(s).position==="static"&&i.chart.style("position","relative"),i.chart.style("min-height",`${r.current.height}px`),e.canvasEngine=new z0,e.canvasEngine.init(s,r.current.width,e.getCanvasSurfaceHeight()),i.canvas=Yt(e.canvasEngine.canvas),e.canvasTheme=new f1,e.canvasTheme.load(s,n.canvas_theme),e.canvasAxisRenderer=new N0(e.canvasEngine,e.canvasTheme),e.canvasRenderer=new QT(e.canvasEngine,e.canvasTheme),e.hitDetector=new p1,e.bindCanvasEvents(),n.zoom_enabled&&((t=e.bindZoomEvent)==null||t.call(e))},warnUnsupportedCanvasOptions(){var t,e,n,r;const{config:i}=this;[[!ag(i.axis_x_type),"axis.x.type other than indexed/category/log/timeseries"],[!Zo(i.axis_y_type),"axis.y.type other than indexed/log/timeseries"],[!Zo(i.axis_y2_type),"axis.y2.type other than indexed/log/timeseries"],[i.boost_useCssRule,"boost.useCssRule"],[(t=this.hasArcType)==null?void 0:t.call(this),"arc charts"],[(e=this.hasType)==null?void 0:e.call(this,"radar"),"radar chart"],[(n=this.hasType)==null?void 0:n.call(this,"polar"),"polar chart"],[(r=this.hasType)==null?void 0:r.call(this,"funnel"),"funnel chart"]].forEach(([o,l])=>{o&&_v(`canvas mode: ${l} is not yet supported.`)})},bindCanvasEvents(){const t=this,{config:e,state:n,$el:r}=t,i=r.canvas.node(),s=UE(e),o=ug(e);i.addEventListener("mousemove",t.onCanvasMouseMove.bind(t)),i.addEventListener("mouseenter",l=>{var c;n.event=l,(c=e.onover)==null||c.bind(t.api)(l)}),i.addEventListener("mouseout",t.onCanvasMouseOut.bind(t)),i.addEventListener("mouseleave",l=>{var c;n.event=l,(c=e.onout)==null||c.bind(t.api)(l)}),i.addEventListener("mousedown",l=>{var c;(c=t.onCanvasSubchartBrushStart)!=null&&c.call(t,l)||t.onCanvasSelectionDragStart(l)}),i.addEventListener("click",t.onCanvasClick.bind(t)),i.addEventListener("pointerdown",t.onCanvasPointerDown.bind(t)),i.addEventListener("pointerenter",t.onCanvasPointerEnter.bind(t)),i.addEventListener("pointermove",t.onCanvasPointerMove.bind(t)),i.addEventListener("pointerup",t.onCanvasPointerUp.bind(t)),i.addEventListener("pointerleave",t.onCanvasPointerOut.bind(t)),i.addEventListener("pointercancel",t.onCanvasPointerCancel.bind(t)),zE(e)&&(i.addEventListener("touchstart",l=>{s(l),t.onCanvasTouchStart(l)},o),i.addEventListener("touchmove",l=>{s(l),t.onCanvasTouchMove(l)},o),i.addEventListener("touchend",t.onCanvasTouchEnd.bind(t),o),i.addEventListener("touchcancel",t.onCanvasTouchCancel.bind(t),o))},updateHtmlLegend(){var t,e;const n=this,{config:r,state:i,$el:s}=n,o=s.chart.node();if(!r.legend_show||i.hasTreemap){i.hasTreemap?((t=s.legend)==null||t.remove(),s.legend=null):(e=s.legend)==null||e.style("visibility","hidden"),i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0;return}const l=n.mapToIds(n.data.targets).filter(d=>r.data_names[d]!==null);if(r.legend_contents_bindto&&r.legend_contents_template){n.updateHtmlLegendTemplate(l)?(i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0,i.legendHasRendered=!0):(i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0);return}s.legend||(s.legend=Yt(o).append("div").classed($e.legend,!0).classed(cr.legend,!0)),s.legend.style("visibility",null);const c=s.legend.selectAll(`button.${$e.legendItem}`).data(l,d=>d);c.exit().remove();const u=c.enter().append("button").attr("type","button").attr("data-id",d=>d);u.append("span").classed($e.legendItemTile,!0),u.append("span").classed(cr.legendItemTitle,!0);const f=u.merge(c).attr("class",d=>n.generateClass($e.legendItem,d).trim());qv(n,f),f.select(`.${$e.legendItemTile}`).classed(cr.legendItemTileCircle,!r.legend_usePoint&&r.legend_item_tile_type==="circle").style("background-color",d=>r.legend_usePoint?null:n.color(d)).html(d=>r.legend_usePoint?mE(n,d):""),f.select(`.${cr.legendItemTitle}`).text(d=>Ko(n,d)),r.legend_tooltip&&f.attr("title",d=>Ko(n,d)),rg(n,f),n.updateHtmlLegendSize(l),n.positionHtmlLegend(),i.legendHasRendered=!0},updateHtmlLegendTemplate(t){const e=this,{api:n,config:r,$el:i}=e,s=Yt(r.legend_contents_bindto),o=r.legend_contents_template,l=[];let c="";if(s.empty())return!1;t.forEach(f=>{const d=ie(o)?Gr(o.call(n,f,e.color(f),n.data(f)[0].values)):Pa(o,{COLOR:e.color(f),TITLE:f});d&&(l.push(f),c+=d)});const u=s.html(c).classed($e.legend,!0).classed(cr.legend,!1).style("visibility",null).selectAll(function(){return this.children}).data(l);return qv(e,u),rg(e,u),i.legend=s,!0},updateHtmlLegendSize(t){const e=this,{config:n,state:r,$el:i}=e,s=[],o={};let l=0,c=0,u=0;const f=n.legend_contents_bindto&&n.legend_contents_template;if(f)i.legend.selectAll(`.${$e.legendItem}`).each(function(d){const h=ln(this,!0),m=`${Ko(e,d)}`,S=Math.max(32,m.length*7+24),E=20,C=Math.ceil(h.width||S),w=Math.ceil(h.height||E);s.push(C),l=Math.max(l,C),c=Math.max(c,w)});else if(t.length){const d=r.isLegendRight||r.isLegendInset,h=n.legend_item_tile_type!=="circle",m={width:h?n.legend_item_tile_width:n.legend_item_tile_r*2,height:h?n.legend_item_tile_height:n.legend_item_tile_r*2},S={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:m.width+5,totalLength:0},E={offsets:{},widths:{},heights:{},margins:[0],steps:{}},C=t.map((_,q)=>{const st=`${Ko(e,_)}`,it=IE(e,st),ot=Math.max(32,st.length*7),ct=12,gt=q===t.length-1,tt=n.legend_show&&!e.isLegendToShow(_),ft=tt?0:((it==null?void 0:it.width)||ot)+S.tileWidth+(gt&&!d?0:S.padding.right)+n.legend_padding,lt=tt?0:((it==null?void 0:it.height)||ct)+S.padding.top;return S.max.width=Math.max(S.max.width,ft),S.max.height=Math.max(S.max.height,lt),{id:_,hidden:tt,width:ft,height:lt}}),w=d?e.getLegendHeight():e.getLegendWidth(),$=(_,q,st=!1)=>{let it;st||(it=(w-S.totalLength-q)/2,it<S.posMin&&(it=(w-q)/2,S.totalLength=0,S.step++)),E.steps[_]=S.step,E.margins[S.step]=r.isLegendInset?10:it,E.offsets[_]=S.totalLength,S.totalLength+=q};r.isLegendInset&&(S.step=n.legend_inset_step?n.legend_inset_step:t.length,r.legendStep=S.step),C.forEach(({id:_,hidden:q,width:st,height:it})=>{const ot=n.legend_equally&&!q?S.max.width:st,ct=n.legend_equally&&!q?S.max.height:it,gt=d?ct:ot;if(E.widths[_]=ot,E.heights[_]=ct,s.push(ot),l=Math.max(l,ot),c=Math.max(c,ct),q){E.steps[_]=0,E.offsets[_]=0;return}$(_,gt)});const z=r.isLegendRight?_=>S.max.width*E.steps[_]:r.isLegendInset?_=>S.max.width*E.steps[_]+10:_=>E.margins[E.steps[_]]+E.offsets[_],B=r.isLegendRight||r.isLegendInset?_=>E.margins[E.steps[_]]+E.offsets[_]:_=>S.max.height*E.steps[_],W=4+m.width,H=9;C.forEach(({id:_,hidden:q})=>{const st=q?0:z(_),it=q?0:B(_);o[_]={item:{x:st,y:it-5,width:E.widths[_],height:E.heights[_]},title:{x:W,y:0,height:E.heights[_]},tile:{x:-2,y:H-m.height/2,width:m.width,height:m.height}}}),u=S.step}if(!t.length){r.legendItemWidth=0,r.legendItemHeight=0,r.legendStep=0;return}if(f){const d=Math.max(1,r.current.width),h=10;let m=1,S=0;s.forEach(E=>{S&&S+h+E>d?(m++,S=E):S+=(S?h:0)+E}),r.legendStep=Math.max(0,m-1)}else r.legendStep=u;r.legendItemWidth=l,r.legendItemHeight=Math.max(12,c),f||i.legend.selectAll(`button.${$e.legendItem}`).each(function(d){const h=o[d],m=Yt(this);h&&(m.style("left",`${h.item.x}px`).style("top",`${h.item.y}px`).style("width",`${h.item.width}px`).style("height",`${h.item.height}px`),m.select(`.${cr.legendItemTitle}`).style("left",`${h.title.x}px`).style("top",`${h.title.y}px`).style("height",`${h.title.height}px`).style("line-height",`${h.title.height}px`),m.select(`.${$e.legendItemTile}`).style("left",`${h.tile.x}px`).style("top",`${h.tile.y}px`).style("width",`${h.tile.width}px`).style("height",`${h.tile.height}px`))})},getCanvasBottomLegendHeight(){var t;const e=this,{config:n,state:r,$el:i}=e;if(!n.legend_show||r.isLegendRight||r.isLegendInset||r.hasTreemap||!i.legend||!r.legendItemHeight)return 0;const s=ln(i.legend.node(),!0).height,o=r.legendItemHeight*(r.legendStep+1);return Math.ceil(Math.max(((t=e.getLegendHeight)==null?void 0:t.call(e))||0,s||o))},getCanvasSurfaceHeight(){const t=this;return Math.max(0,t.state.current.height-t.getCanvasBottomLegendHeight())},positionHtmlLegend(){var t;const e=this,{config:n,state:r,$el:i}=e,s=i.legend;if(s.classed(cr.legendBottom,!r.isLegendRight&&!r.isLegendInset).classed(cr.legendRight,r.isLegendRight).classed(cr.legendInset,r.isLegendInset).style("top",null).style("right",null).style("bottom",null).style("left",null).style("width",null).style("height",null).style("min-height",null),r.isLegendRight)s.style("top",`${r.margin3.top}px`).style("right","0").style("bottom",`${r.margin3.bottom}px`).style("width",`${Math.max(0,e.getLegendWidth())}px`);else if(r.isLegendInset){if(r.isLegendInset){const o=r.isLegendTop,l=r.isLegendLeft;s.style(o?"top":"bottom",`${n.legend_inset_y}px`).style(l?"left":"right",`${n.legend_inset_x}px`).style("width",`${Math.max(0,r.legendItemWidth*(r.legendStep+1)+20)}px`)}}else{const o=((t=e.getLegendHeight)==null?void 0:t.call(e))||0;s.style("top",`${Math.max(0,r.current.height-o)}px`).style("right","0").style("bottom","auto").style("left","0")}},getCanvasSelectedData(t){const e=this,n=e.state.canvasSelection,r=[];return!e.config.data_selection_enabled||!(n!=null&&n.size)||du(e,i=>{(!t||i.id===t)&&n.has(ga(i))&&r.push(i)}),r},setCanvasSelection(t=!1,e,n,r){var i;const s=this,{config:o,state:l}=s,c=l.canvasSelection,u=o.data_selection_grouped;let f=BE(e),d=!1;const h=t&&!o.data_selection_multiple;let m=!h;if(o.data_selection_enabled){if(h&&(n=n!=null&&n.length?[n[0]]:[0],!u))if(f)f=f.slice(0,1);else{const[S]=s.filterTargetsToShow(s.data.targets);f=S?[S.id]:[]}du(s,S=>{const E=ga(S),C=u||!f||f.indexOf(S.id)>=0,w=!n||n.indexOf(S.index)>=0,$=c.has(E);if(t)if(C&&w&&(!$||h)){if(m||(s.setCanvasSelection(!1),m=!0),c.has(E))return;c.add(E),Ne(o.data_onselected,s.api,S,s.canvasEngine.canvas),d=!0}else(!h||m)&&r&&$&&(c.delete(E),Ne(o.data_onunselected,s.api,S,s.canvasEngine.canvas),d=!0);else C&&w&&$&&(c.delete(E),Ne(o.data_onunselected,s.api,S,s.canvasEngine.canvas),d=!0)}),d&&((i=s.renderCanvasFrame)==null||i.call(s,void 0,null,!1))}},toggleCanvasSelection(t){var e;const n=this,{config:r,state:i}=n,s=i.canvasSelection;let o=!1;r.data_selection_enabled&&(t.filter(l=>fu(n,l)).forEach(l=>{const c=ga(l),u=s.has(c);r.data_selection_multiple||du(n,f=>{const d=ga(f);(r.data_selection_grouped?f.id===l.id:d!==c)&&s.has(d)&&(s.delete(d),Ne(r.data_onunselected,n.api,f,n.canvasEngine.canvas),o=!0)}),u&&s.has(c)?(s.delete(c),Ne(r.data_onunselected,n.api,l,n.canvasEngine.canvas)):(s.add(c),Ne(r.data_onselected,n.api,l,n.canvasEngine.canvas)),o=!0}),o&&((e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1)))},canStartCanvasSelectionDrag(t){const e=this,{config:n}=e,r=t;return!!(n.interaction_enabled&&n.data_selection_enabled&&n.data_selection_draggable&&n.data_selection_multiple&&!n.zoom_enabled&&(r.button===void 0||r.button===0))},getCanvasSelectionDragData(t){const e=this,{config:n}=e,r=e.hitDetector.findInRect(t,n.data_selection_grouped);if(!n.data_selection_grouped)return r;const i=new Set(r.map(s=>s.index));return e.filterTargetsToShow(e.data.targets).flatMap(s=>s.values.filter(o=>i.has(o.index)))},startCanvasSelectionDrag(t){var e,n;const r=this,{state:i}=r,s=ps(r,t);return!s||!r.canStartCanvasSelectionDrag(t)?!1:(i.dragStart=s,i.canvasSelectionDragStart=s,i.canvasSelectionDragIncluded=new Set,i.canvasSelectionDragging=!0,i.canvasSelectionDragMoved=!1,Yo.set(r,new Map),r.setDragStatus(!0),(e=r.hideTooltip)==null||e.call(r),(n=t.preventDefault)==null||n.call(t),!0)},updateCanvasSelectionDrag(t){var e;const n=this,{config:r,state:i}=n,s=i.canvasSelectionDragStart,o=ps(n,t);if(!i.canvasSelectionDragging||!s||!o)return!1;const[l,c]=s,[u,f]=o,d=Math.min(l,u),h=Math.max(l,u),m=r.data_selection_grouped?i.margin.top:Math.min(c,f),S=r.data_selection_grouped?i.margin.top+i.height:Math.max(c,f),E={x:d,y:m,w:h-d,h:S-m},C=Math.abs(u-l)>4||Math.abs(f-c)>4;if(i.canvasSelectionDragMoved=i.canvasSelectionDragMoved||C,C){const{included:w,rows:$}=$E(n,n.getCanvasSelectionDragData(E));$.length&&n.toggleCanvasSelection($),i.canvasSelectionDragIncluded=w,i.cancelClick=!0}return n.renderCanvasSelectionDrag(E),(e=t.preventDefault)==null||e.call(t),!0},endCanvasSelectionDrag(t){var e;const n=this,{state:r}=n;return r.canvasSelectionDragging?(n.updateCanvasSelectionDrag(t),r.cancelClick=r.cancelClick||r.canvasSelectionDragMoved,r.dragStart=null,r.canvasSelectionDragStart=null,r.canvasSelectionDragIncluded=new Set,r.canvasSelectionDragging=!1,r.canvasSelectionDragMoved=!1,Yo.delete(n),n.setDragStatus(!1),n.clearCanvasFocus(),(e=t.preventDefault)==null||e.call(t),!0):!1},dispatchCanvasDataOut(t){const e=this,{config:n,state:r}=e,i=r.canvasDataHover;i&&(r.canvasDataHover=null,r.canvasDataHoverKey=null,n.interaction_enabled&&Ne(n.data_onout,e.api,i,t))},dispatchCanvasDataOver(t,e){const n=this,{config:r,state:i}=n,s=ga(t);i.canvasDataHoverKey!==s&&(n.dispatchCanvasDataOut(e),i.canvasDataHover=t,i.canvasDataHoverKey=s,r.interaction_enabled&&t&&Ne(r.data_onover,n.api,t,e))},dispatchCanvasDataClick(t,e=!1){var n;const r=this,{config:i,$el:s}=r,o=s.canvas.node(),l=wE(r,t,!0);if(!l||kE(r,l))return l;if(i.interaction_enabled){const c=i.data_selection_grouped?r.filterTargetsToShow(r.data.targets).map(u=>u.values[l.index]).filter(Boolean):[l];(n=r.toggleCanvasSelection)==null||n.call(r,c),c.forEach(u=>Ne(i.data_onclick,r.api,u,o)),e&&GE(r,l)}return l},updateCanvasSubchartBrush(t){var e,n;const r=this,{config:i,state:s}=r,o=s.canvasSubchartBrushStart,l=s.canvasSubchartBrushOrigin,c=s.canvasSubchartBrushMode,u=cu(r,t,!0);if(i.subchart_brush_enabled===!1||!s.canvasSubchartBrushDragging||o===null||u===null||!c)return!1;const f=u-o;if(Math.abs(f)>dE&&(s.canvasSubchartBrushMoved=!0),!s.canvasSubchartBrushMoved)return(e=t.preventDefault)==null||e.call(t),!0;let d;if(c==="move"&&l){const[m,S]=Jo(r),E=l[1]-l[0];let C=l[0]+f,w=l[1]+f;C<m&&(w+=m-C,C=m),w>S&&(C-=w-S,w=S),d=[Math.max(m,Math.min(S-E,C)),Math.min(S,Math.max(m+E,w))]}else c==="resize-start"&&l?d=uu(r,u,l[1]):c==="resize-end"&&l?d=uu(r,l[0],u):d=uu(r,o,u);const h=FE(r,d[0],d[1]);return r.setCanvasSubchartDomain(h,!0),s.cancelClick=!0,(n=t.preventDefault)==null||n.call(t),!0},updateCanvasSubchartCursor(t){const e=this,n=e.$el.canvas.node();if(e.config.subchart_brush_enabled===!1)return n.style.cursor="",!1;const r=cu(e,t);if(r===null)return n.style.cursor="",!1;const i=lg(e,r);return n.style.cursor=NE(e,i),!0},startCanvasSubchartBrush(t){var e;const n=this,{state:r}=n;if(n.config.subchart_brush_enabled===!1)return!1;const i=cu(n,t);if(i===null)return!1;const s=lg(n,i);return r.event=t,r.canvasSubchartBrushDragging=!0,r.canvasSubchartBrushMode=s,r.canvasSubchartBrushStart=i,r.canvasSubchartBrushOrigin=og(n),r.canvasSubchartBrushMoved=!1,r.cancelClick=!0,n.setDragStatus(!0),(e=t.preventDefault)==null||e.call(t),!0},endCanvasSubchartBrush(t){var e,n,r;const i=this,{state:s}=i;if(!s.canvasSubchartBrushDragging)return!1;i.updateCanvasSubchartBrush(t);const o=s.canvasSubchartBrushMode==="select"&&!s.canvasSubchartBrushMoved,l=s.canvasSubchartBrushMoved||o;return o?(e=i.clearCanvasSubchartDomain)==null||e.call(i,!0,!0):l&&i.config.subchart_onbrush.bind(i.api)((n=s.domain)!=null?n:i.scale.x.orgDomain()),s.canvasSubchartBrushDragging=!1,s.canvasSubchartBrushMode=null,s.canvasSubchartBrushStart=null,s.canvasSubchartBrushOrigin=null,s.canvasSubchartBrushMoved=!1,i.setDragStatus(!1),(r=t.preventDefault)==null||r.call(t),!0},cancelCanvasSubchartBrush(t){var e;const n=this,{state:r}=n;return r.canvasSubchartBrushDragging?(r.canvasSubchartBrushDragging=!1,r.canvasSubchartBrushMode=null,r.canvasSubchartBrushStart=null,r.canvasSubchartBrushOrigin=null,r.canvasSubchartBrushMoved=!1,n.setDragStatus(!1),(e=t.preventDefault)==null||e.call(t),!0):!1},onCanvasSubchartBrushStart(t){const e=this;if(!e.startCanvasSubchartBrush(t))return!1;const n=i=>{e.updateCanvasSubchartBrush(i)},r=i=>{e.endCanvasSubchartBrush(i),se.removeEventListener("mousemove",n),se.removeEventListener("mouseup",r)};return se.addEventListener("mousemove",n),se.addEventListener("mouseup",r),!0},onCanvasClick(t){var e;const n=this,{config:r,state:i}=n;if(i.event=t,i.flowing||i.cancelClick){i.cancelClick=!1;return}n.dispatchCanvasDataClick(t),(e=r.onclick)==null||e.bind(n.api)(t)},onCanvasSelectionDragStart(t){const e=this,{state:n}=e;if(!e.startCanvasSelectionDrag(t))return;const r=s=>{e.updateCanvasSelectionDrag(s)},i=s=>{e.endCanvasSelectionDrag(s),se.removeEventListener("mousemove",r),se.removeEventListener("mouseup",i),n.canvasSelectionDragMoveHandler=null,n.canvasSelectionDragEndHandler=null};n.canvasSelectionDragMoveHandler=r,n.canvasSelectionDragEndHandler=i,se.addEventListener("mousemove",r),se.addEventListener("mouseup",i)},onCanvasPointerDown(t){var e;if(!pi(this,t))return;const n=this,r=n.$el.canvas.node();if(!n.startCanvasSubchartBrush(t))return;const i=t.pointerId,s=f=>f.pointerId===i,o=f=>{s(f)&&n.updateCanvasSubchartBrush(f)},l=f=>{s(f)&&(n.endCanvasSubchartBrush(f),u())},c=f=>{s(f)&&(n.cancelCanvasSubchartBrush(f),u())};function u(){var f;se.removeEventListener("pointermove",o),se.removeEventListener("pointerup",l),se.removeEventListener("pointercancel",c);try{(f=r.releasePointerCapture)==null||f.call(r,i)}catch(d){}}try{(e=r.setPointerCapture)==null||e.call(r,i)}catch(f){}se.addEventListener("pointermove",o),se.addEventListener("pointerup",l),se.addEventListener("pointercancel",c)},onCanvasPointerEnter(t){var e;pi(this,t)&&(this.state.event=t,(e=this.config.onover)==null||e.bind(this.api)(t))},onCanvasPointerMove(t){pi(this,t)&&(this.updateCanvasSubchartBrush(t)||this.onCanvasMouseMove(t))},onCanvasPointerUp(t){var e;if(pi(this,t)){if(this.state.event=t,this.endCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}this.dispatchCanvasDataClick(t,!0),this.dispatchCanvasDataOut(this.$el.canvas.node())}},onCanvasPointerOut(t){var e;pi(this,t)&&(this.state.canvasSubchartBrushDragging||(this.state.event=t,this.onCanvasMouseOut(),(e=this.config.onout)==null||e.bind(this.api)(t)))},onCanvasPointerCancel(t){var e;if(pi(this,t)){if(this.state.event=t,this.cancelCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}this.onCanvasPointerOut(t)}},onCanvasTouchStart(t){var e;t.touches.length>1||(this.state.event=t,!this.startCanvasSubchartBrush(t)&&(this.startCanvasSelectionDrag(t)||((e=this.config.onover)==null||e.bind(this.api)(t),this.onCanvasMouseMove(t))))},onCanvasTouchMove(t){t.touches.length>1||this.updateCanvasSubchartBrush(t)||this.updateCanvasSelectionDrag(t)||this.onCanvasMouseMove(t)},onCanvasTouchEnd(t){var e,n,r;if(this.state.event=t,this.endCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}if(this.endCanvasSelectionDrag(t)){(n=this.config.onout)==null||n.bind(this.api)(t);return}this.dispatchCanvasDataClick(t,!0),this.dispatchCanvasDataOut(this.$el.canvas.node()),(r=this.config.onout)==null||r.bind(this.api)(t)},onCanvasTouchCancel(t){var e;this.state.event=t,this.cancelCanvasSubchartBrush(t),this.endCanvasSelectionDrag(t),this.onCanvasMouseOut(),(e=this.config.onout)==null||e.bind(this.api)(t)},onCanvasMouseMove(t){var e,n,r,i,s;const o=this,{config:l,state:c,$el:u}=o,f=u.canvas.node();if(c.event=t,c.flowing||c.canvasSelectionDragging)return;if((e=o.updateCanvasSubchartCursor)!=null&&e.call(o,t)){o.dispatchCanvasDataOut(f),c.canvasFocusKey&&(c.canvasFocusKey=null,o.clearCanvasFocus()),(n=o.hideTooltip)==null||n.call(o);return}const d=ps(o,t),h=d&&(DE(o,d)||d),m=h?ME(o,h):null;if(!m){if(o.dispatchCanvasDataOut(f),c.canvasFocusKey&&(c.canvasFocusKey=null,o.clearCanvasFocus()),d&&l.axis_tooltip&&PE(o,d)){o.renderCanvasAxisTooltip(d),(r=o.hideTooltip)==null||r.call(o);return}(i=o.hideTooltip)==null||i.call(o);return}o.dispatchCanvasDataOver(m,f);const S=ig(o,m),E=LE(o,m,S),C=E.map(w=>`${w.id}:${w.index}`).join("|");(c.canvasFocusKey!==C||l.axis_tooltip)&&(c.canvasFocusKey=C,o.renderCanvasFocus(E,h)),(s=o.showTooltip)==null||s.call(o,S,f)},onCanvasMouseOut(){var t;const e=this.$el.canvas.node();e.style.cursor="",this.dispatchCanvasDataOut(e),this.state.canvasFocusKey?(this.state.canvasFocusKey=null,this.clearCanvasFocus()):this.config.axis_tooltip&&this.clearCanvasFocus(),(t=this.hideTooltip)==null||t.call(this)},showCanvasLinkedTooltip(t){var e,n,r,i;const s=this,{$el:o,state:l}=s,c=(e=o.canvas)==null?void 0:e.node(),f=s.filterTargetsToShow(s.data.targets).map(w=>w.values[t]).find(Boolean);if(!c||!f)return(n=s.hideTooltip)==null||n.call(s),!1;const d=ig(s,f),h=d.find(w=>w&&An(s,w))||d[0];if(!d.length||!h)return(r=s.hideTooltip)==null||r.call(s),!1;const{left:m,top:S}=ln(c,!0),E=Ji(s,h),C=[l.margin.left+E.x,l.margin.top+E.y];return l.event={clientX:m+C[0],clientY:S+C[1],currentTarget:c,target:c},l.canvasFocusKey=d.map(w=>`${w.id}:${w.index}`).join("|"),s.renderCanvasFocus(d,C),(i=s.showTooltip)==null||i.call(s,d,c),!0},renderCanvasZoomBrush(t,e){const n=this;n.canvasEngine.withOverlay(r=>{n.canvasRenderer.withContext(r,()=>{n.canvasRenderer.drawZoomBrush(n,t,e)})})},clearCanvasZoomBrush(){this.canvasEngine.clearOverlay()},renderCanvasSelectionDrag(t){const e=this;e.canvasEngine.withOverlay(n=>{e.canvasRenderer.withContext(n,()=>{e.canvasRenderer.drawSelectionDragArea(e,t)})})},renderCanvasFrame(t,e,n=!1){const r=this,{state:i}=r,s=t||i.canvasShape||r.getDrawShape();i.canvasShape=s,i._canvasVisibleRangeCache=null,i._canvasXTickValuesCache=null,r.canvasEngine.beginFrame(i.current.width,r.getCanvasSurfaceHeight());try{r.canvasRenderer.drawBackground(r),r.canvasAxisRenderer.drawTitle(r),i.hasAxis&&r.canvasAxisRenderer.draw(r),r.canvasRenderer.draw(r,s),i.hasAxis&&r.config.grid_lines_front&&r.canvasAxisRenderer.drawGridLines(r),r.canvasRenderer.drawSubchart(r,s),i.hasAxis&&r.canvasAxisRenderer.drawSubXAxis(r),i.hasAxis&&r.canvasAxisRenderer.drawSubYAxes(r),r.canvasRenderer.drawEmptyLabel(r),n&&r.hitDetector.rebuild(r,s)}finally{r.canvasEngine.endFrame()}r.canvasEngine.clearOverlay(),i.canvasFocusMainRedraw=!1,e&&r.renderCanvasFocus(e)},renderCanvasFocus(t,e){var n,r;const i=this,{state:s}=i,o=(r=(n=i.canvasRenderer).hasExpandedShapeFocus)==null?void 0:r.call(n,i,t);if(o){const l=s.canvasShape||i.getDrawShape();i.canvasEngine.beginFrame(s.current.width,i.getCanvasSurfaceHeight());try{i.canvasRenderer.drawBackground(i),i.canvasAxisRenderer.drawTitle(i),s.hasAxis&&i.canvasAxisRenderer.draw(i),i.canvasRenderer.draw(i,l,t),s.hasAxis&&i.config.grid_lines_front&&i.canvasAxisRenderer.drawGridLines(i),i.canvasRenderer.drawSubchart(i,l),s.hasAxis&&i.canvasAxisRenderer.drawSubXAxis(i),s.hasAxis&&i.canvasAxisRenderer.drawSubYAxes(i),i.canvasRenderer.drawEmptyLabel(i)}finally{i.canvasEngine.endFrame()}}s.canvasFocusMainRedraw=!!o,i.canvasEngine.withOverlay(l=>{i.canvasRenderer.withContext(l,()=>{i.canvasRenderer.drawFocus(i,t)}),i.canvasAxisRenderer.withContext(l,()=>{i.canvasAxisRenderer.drawFocusedXAxisTick(i,t),e&&i.canvasAxisRenderer.drawAxisTooltip(i,e)})})},renderCanvasAxisTooltip(t){const e=this;e.canvasEngine.withOverlay(n=>{e.canvasAxisRenderer.withContext(n,()=>{e.canvasAxisRenderer.drawAxisTooltip(e,t)})})},clearCanvasFocus(){var t;const e=this;e.state.canvasFocusMainRedraw?(e.state.canvasFocusMainRedraw=!1,e.renderCanvasFrame(void 0,null,!1)):(t=e.canvasEngine)==null||t.clearOverlay()},resizeCanvas(){var t,e;const n=this,{config:r,state:i,$el:s}=n,o=s.chart.node();n.clearResizePreview(),s.chart.style("min-height",`${i.current.height}px`),(t=n.canvasEngine)==null||t.resize(i.current.width,n.getCanvasSurfaceHeight()),(e=n.canvasTheme)==null||e.reload(o,r.canvas_theme)}};let dg=()=>(xn(br.prototype,HE),(dg=()=>"canvas")());var hg={category(t,e){const n=this.internal,{config:r}=n;return arguments.length>1&&(r.axis_x_categories[t]=e,n.state.dirty.data=!0,n.redraw()),r.axis_x_categories[t]},categories(t){const e=this.internal,{config:n}=e;if(!t||!Array.isArray(t)){const r=n.axis_x_categories;return lr(r)?Object.values(e.data.xs)[0]:r}return n.axis_x_categories=t,e.state.dirty.data=!0,e.redraw(),n.axis_x_categories}};function YE(t){const e=this.config;let n,r,i;const s=()=>{const o=r.shift();if(o&&n&&Kn(n)&&o in n)return n=n[o],s();if(!o)return n};Object.keys(e).forEach(o=>{n=t,r=o.split("_"),i=s(),sn(i)&&(e[o]=i)}),this.api&&(this.state.orgConfig=t)}var KE={resize(t){const e=this.internal,{config:n,state:r}=e;r.rendered&&(n.size_width=t?t.width:null,n.size_height=t?t.height:null,r.resizing=!0,r.dirty.size=!0,this.flush(!1),e.resizeFunction())},flush(t){var e,n;const r=this.internal,{state:i,$el:{zoomResetBtn:s}}=r;i.rendered?(i.resizing?(e=r.brush)==null||e.updateResize():(n=r.axis)==null||n.setOrient(),s==null||s.style("display","none"),r.scale.zoom&&(i.current.zoomDomain=r.scale.zoom.domain()),r.scale.zoom=null,i.resizing||(i.dirty.data=!0),t?r.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):r.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1}),!i.resizing&&r.brush&&(r.brush.getSelection().call(r.brush.move),r.unselectRect()),i.current.zoomDomain&&(r.api.zoom(i.current.zoomDomain),i.current.zoomDomain=null)):r.initToRender(!0)},destroy(){var t,e,n,r,i,s,o,l,c,u,f,d;const h=this.internal,{state:m,$el:{chart:S,style:E,svg:C}}=h;if(vn(h)){h.callPluginHook("$willDestroy"),(t=h.cache)==null||t.remove(["setOverOut","callOverOutForTouch"]),h.charts.splice(h.charts.indexOf(this),1),h.charts.length===0&&ib(),h.unbindAllEvents(),C==null||C.select("*").interrupt(),m.canvasFlowFrame!==null&&((n=(e=se).cancelAnimationFrame)==null||n.call(e,m.canvasFlowFrame)),m.canvasFlowFrame=null,m.canvasFlowFinish=null,m.pendingRaf!==null&&((i=(r=se).cancelAnimationFrame)==null||i.call(r,m.pendingRaf)),m.pendingRaf=null,(s=h.canvasRenderer)==null||s.destroy(),(o=h.canvasEngine)==null||o.destroy(),(l=h.resizeFunction)==null||l.clear(),(u=(c=h.resizeFunction)==null?void 0:c.clearLive)==null||u.call(c),(d=(f=h.resizeFunction)==null?void 0:f.resizeObserver)==null||d.disconnect(),h.resizeFunction&&se.removeEventListener("resize",h.resizeFunction),S.classed("bb",!1).style("position",null),m.isCanvasMode&&S.style("min-height",m.canvasInlineStyle.minHeight||null),S.selectChildren().remove(),E&&E.parentNode.removeChild(E),Object.keys(this).forEach(w=>{w==="internal"&&Object.keys(h).forEach($=>{h[$]=null}),this[w]=null,delete this[w]});for(const w in this)this[w]=()=>{}}return null},config(t,e,n){const r=this.internal,{config:i,state:s}=r,o=t==null?void 0:t.replace(/\./g,"_");let l;return t&&o in i?sn(e)?(i[o]=e,l=e,n&&this.flush()):l=i[o]:(arguments.length===0||lr(t))&&(l=s.orgConfig),l}},ZE={color(t){return this.internal.color(t)}};const vg=function(t){const{targets:e}=this.internal.data;if(!mn(t)){const n=qe(t)?t:[t];return e.filter(r=>n.some(i=>i===r.id))}return e};xn(vg,{shown:function(t){return this.internal.filterTargetsToShow(this.data(t))},values:function(t,e=!0){let n=null;if(t){const r=this.data(t);qe(r)&&(n=[],r.forEach(i=>{e?i.values.forEach(s=>n.push(s.value)):n.push(i.values.map(s=>s.value))}))}return n},names:function(t){return this.internal.updateDataAttributes("names",t)},colors:function(t){return this.internal.updateDataAttributes("colors",t)},axes:function(t){return this.internal.updateDataAttributes("axes",t)},min:function(){return this.internal.getMinMaxData().min},max:function(){return this.internal.getMinMaxData().max}});var JE={data:vg},QE={focus(t){var e;const n=this.internal,{state:r}=n,i=n.mapToTargetIds(t);if(r.isCanvasMode){const o=i.filter(n.isTargetToShow,n),l=new Set(o),c=n.mapToTargetIds().filter(u=>!l.has(u)&&n.isTargetToShow(u));n.revertLegend(),n.toggleFocusLegend(c,!1),n.toggleFocusLegend(o,!0),r.focusedTargetIds=l,r.defocusedTargetIds=new Set(c),(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1);return}const s=n.$el.svg.selectAll(n.selectorTargets(i.filter(n.isTargetToShow,n)));this.revert(),this.defocus(),s.classed(nn.focused,!0).classed(nn.defocused,!1),n.hasArcType()&&!r.hasRadar&&(n.expandArc(i),n.hasType("gauge")&&n.markOverlapped(t,n,`.${ar.gaugeValue}`)),n.toggleFocusLegend(i,!0),r.focusedTargetIds=new Set(i),i.forEach(o=>r.defocusedTargetIds.delete(o))},defocus(t){var e;const n=this.internal,{state:r}=n,i=n.mapToTargetIds(t);if(r.isCanvasMode){const o=i.filter(n.isTargetToShow,n);n.toggleFocusLegend(o,!1),o.forEach(l=>r.focusedTargetIds.delete(l)),r.defocusedTargetIds=new Set(o),(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1);return}n.$el.svg.selectAll(n.selectorTargets(i.filter(n.isTargetToShow,n))).classed(nn.focused,!1).classed(nn.defocused,!0),n.hasArcType(null,["polar"])&&(n.unexpandArc(i),n.hasType("gauge")&&n.undoMarkOverlapped(n,`.${ar.gaugeValue}`)),n.toggleFocusLegend(i,!1),i.forEach(o=>r.focusedTargetIds.delete(o)),r.defocusedTargetIds=new Set(i)},revert(t){var e,n,r;const i=this.internal,{config:s,state:o,$el:l}=i,c=i.mapToTargetIds(t),u=()=>{s.legend_show&&(i.showLegend(c.filter(i.isLegendToShow.bind(i))),l.legend.selectAll(i.selectorLegends(c)).filter(function(){return Yt(this).classed(nn.legendItemFocused)}).classed(nn.legendItemFocused,!1))};if(o.isCanvasMode){const d=!!((e=o.focusedTargetIds)!=null&&e.size)||!!((n=o.defocusedTargetIds)!=null&&n.size);u(),o.focusedTargetIds=new Set,o.defocusedTargetIds=new Set,d&&((r=i.renderCanvasFrame)==null||r.call(i,void 0,null,!1));return}l.svg.selectAll(i.selectorTargets(c)).classed(nn.focused,!1).classed(nn.defocused,!1),i.hasArcType(null,["polar"])&&i.unexpandArc(c),u(),o.focusedTargetIds=new Set,o.defocusedTargetIds=new Set}},_E={legend:{show:function(t){const e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){const e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},qE={load(t){const e=this.internal,{config:n}=e;e.state.dirty.data=!0,e.state._eventRectFingerprint=null,t.xs&&e.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(s=>{n.data_classes[s]=t.classes[s]}),"categories"in t&&e.axis.isCategorized()&&(n.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(s=>{n.data_axes[s]=t.axes[s]}),"colors"in t&&Object.keys(t.colors).forEach(s=>{n.data_colors[s]=t.colors[s]}),"regions"in t&&(n.data_regions=t.regions||{});const r=["data","columns","rows","json","url"].some(s=>s in t),i="unload"in t&&t.unload!==!1;if("regions"in t&&!r&&!i){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),Eo.call(e,t.done,t.resizeAfter);return}if(i){const s=e.mapToTargetIds(t.unload===!0?null:t.unload);e.unload(s,()=>{!e.config||!e.cache||(e.cache.remove(s),Bf(()=>e.loadFromArgs(t)))})}else e.loadFromArgs(t)},unload(t){const e=this.internal;let n=t||{};lr(n)&&this.tooltip.hide(),qe(n)?n={ids:n}:je(n)&&(n={ids:[n]});const r=e.mapToTargetIds(n.ids);e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.unload(r,()=>{!e.config||!e.cache||(e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.cache.remove(r),Eo.call(e,n.done,n.resizeAfter))})}};function Qo(t,e,n,r=!1){var i;const s=this.internal,o=s.mapToTargetIds(e),l=new Set(o),c=[...s.state.hiddenTargetIds].filter(d=>l.has(d));if(s.state.toggling=!0,s.state.dirty.visibility=!0,s[`${t?"remove":"add"}HiddenTargetIds`](o),s.state.isCanvasMode){t&&c.length?Ne(s.config.data_onshown,this,c):!t&&c.length===0&&Ne((i=s.config)==null?void 0:i.data_onhidden,this,o),r||s.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),s.state.toggling=!1;return}const u=s.$el.svg.selectAll(s.selectorTargets(o)),f=t?null:"0";t&&c.length&&(u.style("display",null),Ne(s.config.data_onshown,this,c)),s.$T(u).style("opacity",f,"important").call(eo,()=>{var d;!t&&c.length===0&&(u.style("display","none"),Ne((d=s.config)==null?void 0:d.data_onhidden,this,o)),u.style("opacity",f)}),n.withLegend&&s[`${t?"show":"hide"}Legend`](o),r||s.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),s.state.toggling=!1}var tC={show(t,e={}){Qo.call(this,!0,t,e)},hide(t,e={}){Qo.call(this,!1,t,e)},toggle(t,e={}){const n=this.internal,r={show:[],hide:[]};n.mapToTargetIds(t).forEach(i=>r[n.isTargetToShow(i)?"hide":"show"].push(i)),r.show.length&&r.hide.length?(Qo.call(this,!0,r.show,e,!0),Qo.call(this,!1,r.hide,e)):(r.show.length&&this.show(r.show,e),r.hide.length&&this.hide(r.hide,e))}},eC={tooltip:{show:function(t){var e,n,r,i,s,o,l,c,u,f,d,h;const m=this.internal,{$el:S,config:E,state:{eventReceiver:C,hasFunnel:w,hasTreemap:$,inputType:z}}=m;let B,W;if(t.mouse&&(W=t.mouse),t.data){const{data:H}=t,_=(e=m.getYScaleById(H.id))==null?void 0:e(H.value);if((w||$)&&H.id){const q=m.selectorTarget(H.id,void 0,`.${Tn.shape}`);C.rect=S.main.select(q)}else m.isMultipleX()?W=[m.xx(H),_]:(E.tooltip_grouped||(W=[0,_]),B=(r=H.index)!=null?r:m.hasArcType()&&H.id?(n=m.getArcElementByIdOrIndex(H.id))==null?void 0:n.datum().index:m.getIndexByX(H.x))}else sn(t.x)?B=m.getIndexByX(t.x):sn(t.index)&&(B=t.index);if(m.state.isCanvasMode){const H=((i=m.filterTargetsToShow)==null?void 0:i.call(m))||m.data.targets,_=(s=t.data)!=null&&s.id&&!E.tooltip_grouped?H.filter(ct=>ct.id===t.data.id).map(ct=>ct.values[B!=null?B:t.data.index]).filter(Boolean):H.map(ct=>ct.values[B]).filter(Boolean),q=(l=(o=S.canvas)==null?void 0:o.node)==null?void 0:l.call(o),st=m.state.canvasShape||((c=m.getDrawShape)==null?void 0:c.call(m)),it=_[0],ot=W||(it&&((u=st==null?void 0:st.pos)!=null&&u.cx)&&((f=st==null?void 0:st.pos)!=null&&f.cy)?[m.state.margin.left+st.pos.cx(it),m.state.margin.top+st.pos.cy(it)]:void 0);if(!_.length||!q)return;m.state.canvasFocusKey=_.map(ct=>`${ct.id}:${ct.index}`).join("|"),(d=m.renderCanvasFocus)==null||d.call(m,_,ot),(h=m.showTooltip)==null||h.call(m,_,q);return}(z==="mouse"?["mouseover","mousemove"]:["touchstart"]).forEach(H=>{m.dispatchEvent(H,B,W)})},hide:function(){var t,e,n,r,i;const s=this.internal,{state:{inputType:o,isCanvasMode:l},$el:{tooltip:c}}=s,u=c==null?void 0:c.datum();if(l){s.state.canvasFocusKey=null,s.hideTooltip(!0),(t=s.clearCanvasFocus)==null||t.call(s);return}if((e=u==null?void 0:u.data)!=null&&e[0]){const{index:f}=u.data[0];(o==="mouse"?["mouseout"]:["touchend"]).forEach(d=>{s.dispatchEvent(d,f)})}o==="touch"&&s.callOverOutForTouch(),s.hideTooltip(!0),(n=s.hideGridFocus)==null||n.call(s),(r=s.unexpandCircles)==null||r.call(s),(i=s.expandBarTypeShapes)==null||i.call(s,!1)}}},nC=Object.defineProperty,rC=(t,e,n)=>e in t?nC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gg=(t,e,n)=>rC(t,typeof e!="symbol"?e+"":e,n);class jn{constructor(e){gg(this,"plugins",[]),gg(this,"internal");const n=new br(this);this.internal=n,(function r(i,s,o){Object.keys(i).forEach(l=>{const c=ie(i[l]),u=s!==o,f=vn(i[l]),d=f&&Object.keys(i[l]).length>0;c&&(!u&&d||u)?s[l]=i[l].bind(o):f&&!c?s[l]={}:s[l]=i[l],d&&r(i[l],s[l],o)})})(jn.prototype,this,this),YE.call(n,e),n.beforeInit(),n.init()}}xn(jn.prototype,[KE,ZE,JE,QE,_E,qE,tC,eC]);let pg=()=>(jn.prototype.category=hg.category,jn.prototype.categories=hg.categories,(pg=()=>({}))());const aC=t=>{var e,n;return(n=(e=se).btoa)==null?void 0:n.call(e,encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(r,i)=>String.fromCharCode(+`0x${i}`)))};function iC(t,e,n){const{width:r,height:i}=e||n,s=new XMLSerializer,o=t.cloneNode(!0),l=V1(Oa(Ye.styleSheets)).filter(h=>h.cssText).map(h=>h.cssText);o.setAttribute("xmlns",_t.xhtml),o.style.margin="0",o.style.padding="0",e.preserveFontStyle&&o.querySelectorAll("text").forEach(h=>{h.innerHTML=""});const c=s.serializeToString(o),u=Ye.createElement("style");u.appendChild(Ye.createTextNode(l.join(`
52
+ `)));const f=s.serializeToString(u),d=`<svg xmlns="${_t.svg}" width="${r}" height="${i}"
53
53
  viewBox="0 0 ${n.width} ${n.height}"
54
54
  preserveAspectRatio="${(e==null?void 0:e.preserveAspectRatio)===!1?"none":"xMinYMid meet"}">
55
55
  <foreignObject width="100%" height="100%">
56
56
  ${f}
57
57
  ${c.replace(/(url\()[^#]+/g,"$1")}
58
- </foreignObject></svg>`;return`data:image/svg+xml;base64,${eC(d)}`}function rC(t,e){const{top:n,left:r}=e,{x:i,y:o}=ya(t,!0),{a:s,b:l,c,d:u,e:f,f:d}=t.getScreenCTM(),{width:h,height:m}=cn(t,!0);return{x:s*i+c*o+f-r,y:l*i+u*o+d-n+(m-Math.round(m/4)),width:h,height:m}}function aC(t){const{left:e,top:n}=cn(t),r=o=>o.textContent||o.childElementCount,i=[];return La(t.querySelectorAll("text")).filter(r).forEach(o=>{const s=l=>{const{fill:c,fontFamily:u,fontSize:f,textAnchor:d,transform:h}=fe.getComputedStyle(l),{x:m,y:S,width:E,height:C}=rC(l,{left:e,top:n});return{[l.textContent]:{x:m,y:S,width:E,height:C,fill:c,fontFamily:u,fontSize:f,textAnchor:d,transform:h}}};o.childElementCount>1?La(o.querySelectorAll("tspan")).filter(r).forEach(l=>{i.push(s(l))}):i.push(s(o))}),i}function iC(t,e){e.forEach(n=>{Object.keys(n).forEach(r=>{const{x:i,y:o,width:s,height:l,fill:c,fontFamily:u,fontSize:f,transform:d}=n[r];if(t.save(),t.font=`${f} ${u}`,t.fillStyle=c,d==="none")t.fillText(r,i,o);else{const h=d.replace(/(matrix|\(|\))/g,"").split(",");h.splice(4).every(m=>+m==0)?(h.push(i+s-s/4),h.push(o-l+l/3)):(h.push(i),h.push(o)),t.transform(...h),t.fillText(r,0,0)}t.restore()})})}function oC(t,e,n){const{width:r,height:i}=e||n,o=Ze.createElement("canvas"),s=o.getContext("2d");if(o.width=r,o.height=i,s){let c=0,u=r,f=i;if((e==null?void 0:e.preserveAspectRatio)!==!1){const d=Math.min(r/n.width,i/n.height);u=n.width*d,f=n.height*d,c=(i-f)/2}s.drawImage(t,0,0,t.width,t.height,0,c,u,f)}return o.toDataURL(e.mimeType)}var sC={export(t,e){var n;const r=this.internal,{state:i,$el:{chart:o,svg:s}}=r,l=(n=r.canvasEngine)==null?void 0:n.canvas,c=i.isCanvasMode&&l?cn(l,!0):null,{width:u,height:f}=c&&c.width&&c.height?{width:c.width,height:c.height}:i.current,d=Kr(Object.create(null),{width:u,height:f,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t);if(i.isCanvasMode&&l){const S=oC(l,d,{width:u,height:f});return e==null||e.bind(this)(S),S}const h=nC(o.node(),d,{width:u,height:f}),m=d.preserveFontStyle?aC(s.node()):[];if(e&&ue(e)){const S=new Image;S.crossOrigin="Anonymous",S.onload=()=>{const E=Ze.createElement("canvas"),C=E.getContext("2d");E.width=d.width||u,E.height=d.height||f,C.drawImage(S,0,0),m.length&&(iC(C,m),m.length=0),e.bind(this)(E.toDataURL(d.mimeType))},S.src=h}return h}};let uv=()=>(Jn.prototype.export=sC.export,(uv=()=>({}))());var lC={flow(t){const e=this.internal;let n;(t.json||t.rows||t.columns)&&e.convertData(t,i=>{n=i,r()});function r(){var i,o,s;let l,c=0,u=0,f,d;if(e.state.redrawing||!n||!ro())return;(i=e.flushCanvasFlow)==null||i.call(e);const h=[],m=e.getMaxDataCount(),S=e.convertDataToTargets(n,!0),E=e.axis.isTimeSeries();e.data.targets.forEach(N=>{let z=!1;for(let $=0;$<S.length;$++)if(N.id===S[$].id){z=!0,N.values[N.values.length-1]&&(u=N.values[N.values.length-1].index+1);const G=S[$].values;c=G.length;for(let V=0;V<c;V++)G[V].index=u+V,E||(G[V].x=u+V),N.values.push(G[V]);S.splice($,1);break}!z&&h.push(N.id)}),e.data.targets.forEach(N=>{for(let z=0;z<h.length;z++)if(N.id===h[z]){if(!N.values[N.values.length-1])continue;u=N.values[N.values.length-1].index+1;for(let $=0;$<c;$++)N.values.push({id:N.id,index:u+$,x:E?e.getOtherTargetX(u+$):u+$,value:null})}}),e.data.targets.length&&S.forEach(N=>{const z=e.data.targets[0].values[0].index,$=N.values,G=$.length,V=Math.max(u-z,0);if(V){$.length=G+V;for(let J=G-1;J>=0;J--)$[J+V]=$[J];for(let J=0;J<V;J++){const Q=z+J;$[J]={id:N.id,index:Q,x:E?e.getOtherTargetX(Q):Q,value:null}}}for(let J=V;J<$.length;J++){const Q=$[J];Q.index+=u,E||(Q.x+=u)}});for(let N=0;N<S.length;N++)e.data.targets.push(S[N]);const C=e.data.targets[0],w=C.values[0];if(on(t.to)?(c=0,d=E?Kn.call(e,t.to):t.to,C.values.forEach(N=>{N.x<d&&c++})):on(t.length)&&(c=t.length),m?m===1&&E&&(f=(C.values[C.values.length-1].x-w.x)/2,l=[new Date(+w.x-f),new Date(+w.x+f)]):(E?f=C.values.length>1?C.values[C.values.length-1].x-w.x:w.x-e.getXDomain(e.data.targets)[0]:f=1,l=[w.x-f,w.x]),l&&e.updateXDomain(null,!0,!0,!1,l),e.state.isCanvasMode){const N=Xe(t.duration)?t.duration:e.config.transition_duration;if((o=e.animateCanvasFlow)==null?void 0:o.call(e,{done:t.done,duration:N,length:c,orgDataCount:m}))return;c&&m&&e.data.targets.forEach($=>{$.values.splice(0,c)}),e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.redraw({withLegend:!0,withTransition:!1,withTrimXDomain:!1,withUpdateOrgXDomain:!0,withUpdateXAxis:!0,withUpdateXDomain:!0}),e.updateTypesElements(),(s=t.done)==null||s.call(e.api);return}e.updateTargets(e.data.targets),e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.redraw({flow:{index:w.index,length:c,duration:Xe(t.duration)?t.duration:e.config.transition_duration,done:t.done,orgDataCount:m},withLegend:!0,withTransition:m>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}},cC={generateFlow(t){const e=this,{data:n,state:r,$el:i}=e;return function(){var o;const s=t.flow.length;r.flowing=!0,n.targets.forEach(c=>{c.values.splice(0,s)}),r.dataGeneration++,e.updateXGrid&&e.updateXGrid(!0);const l={};["axis.x","grid.x","gridLines.x","region.list","text","bar","line","area","circle"].forEach(c=>{const u=c.split(".");let f=i[u[0]];f&&u.length>1&&(f=f[u[1]]),f!=null&&f.size()&&(l[c]=f)}),(o=e.hideGridFocus)==null||o.call(e),e.setFlowList(l,t)}},setFlowList(t,e){const n=this,{flow:r,targets:i}=e,{duration:o=e.duration,index:s,length:l,orgDataCount:c}=r,u=n.getFlowTransform(i,c,s,l),f=Ch();let d;f.add(Object.keys(t).map(h=>(d=t[h].transition().ease(m=>+m).duration(o),h==="axis.x"?d=d.call(m=>{n.axis.x.setTransition(m).create(m)}):h==="region.list"?d=d.filter(n.isRegionOnX).attr("transform",u):d=d.attr("transform",u),d))),d.call(f,()=>{n.cleanUpFlow(t,e)})},cleanUpFlow(t,e){const n=this,{config:r,state:i,$el:{svg:o}}=n,s=r.axis_rotated,{flow:l,shape:c,xv:u}=e,{cx:f,cy:d,xForText:h,yForText:m}=c.pos,{done:S=()=>{},length:E}=l;E&&(["circle","text","shape","eventRect"].forEach(C=>{const w=[];for(let N=0;N<E;N++)w.push(`.${Ie[C]}-${N}`);o.selectAll(`.${Ie[`${C}s`]}`).selectAll(w).remove()}),o.select(`.${Ie.xgrid}`).remove()),Object.keys(t).forEach(C=>{const w=t[C];if(C!=="axis.x"&&w.attr("transform",null),C==="grid.x")w.attr(i.xgridAttr);else if(C==="gridLines.x")w.attr("x1",s?0:u).attr("x2",s?i.width:u),w.select("text").attr("x",s?i.width:0).attr("y",u);else if(/^(area|bar|line)$/.test(C))w.attr("d",c.type[C]);else if(C==="text")w.attr("x",h).attr("y",m).style("fill-opacity",n.opacityForText.bind(n));else if(C==="circle")if(n.isCirclePoint())w.attr("cx",f).attr("cy",d);else{const N=$=>f($)-r.point_r,z=$=>d($)-r.point_r;w.attr("x",N).attr("y",z)}else C==="region.list"&&w.select("rect").filter(n.isRegionOnX).attr("x",n.regionX.bind(n)).attr("width",n.regionWidth.bind(n))}),r.interaction_enabled&&n.redrawEventRect(),S.call(n.api),i.flowing=!1},getFlowTransform(t,e,n,r){const i=this,{data:o,scale:{x:s}}=i,l=o.targets[0].values;let c=i.getValueOnIndex(l,n),u=i.getValueOnIndex(l,n+r),f;const d=s.domain(),h=i.updateXDomain(t,!0,!0);e?e===1||(c==null?void 0:c.x)===(u==null?void 0:u.x)?f=s(d[0])-s(h[0]):f=i.axis.isTimeSeries()?s(d[0])-s(h[0]):s((c==null?void 0:c.x)||0)-s(u.x):l.length!==1?f=s(d[0])-s(h[0]):i.axis.isTimeSeries()?(c=i.getValueOnIndex(l,0),u=i.getValueOnIndex(l,l.length-1),f=s(c.x)-s(u.x)):f=Ma(h)/2;const m=Ma(d)/Ma(h);return`translate(${f},0) scale(${m},1)`}};let fv=()=>(bn(Ir.prototype,cC),Jn.prototype.flow=lC.flow,(fv=()=>({}))());function dv(t){return Array.isArray(t)?t:[t]}function hv(t){var e;t.state.canvasShape=null,(e=t.renderCanvasFrame)==null||e.call(t,void 0,null,!1)}function lu(t,e){const n=this.internal,{config:r}=n,i=r.transition_duration&&ro(),o=`grid_${e}_lines`;return t?(r[o]=dv(t),n.state.isCanvasMode?(hv(n),r[o]):(n.updateGrid(),n.redrawGrid(i),r[o])):r[o]}function gv(t,e){const n=`grid_${e}_lines`;return lu.bind(this)(this.internal.config[n].concat(t?dv(t):[]),e)}function vv(t,e){var n;const r=this.internal;if(r.state.isCanvasMode){const i=((n=r.getGridFilterToRemove)==null?void 0:n.call(r,t))||(()=>!0),o=`grid_${e?"x":"y"}_lines`;r.config[o]=r.config[o].filter(s=>!i(s)),hv(r);return}r.removeGridLines(t,e)}const pv=function(t){return lu.bind(this)(t,"x")};bn(pv,{add(t){return gv.bind(this)(t,"x")},remove(t){return vv.bind(this)(t,!0)}});const mv=function(t){return lu.bind(this)(t,"y")};bn(mv,{add(t){return gv.bind(this)(t,"y")},remove(t){return vv.bind(this)(t,!1)}});var xv={xgrids:pv,ygrids:mv};const uC=`line.${nn.xgridFocus}:not(.${nn.xgridFocusContinuous}), line.${nn.ygridFocus}`,fC=t=>Xe(t.position)||"end",dC=t=>t.position==="start"?4:t.position==="middle"?0:-4;function yv(t){var e;const{state:n,$el:{main:r}}=t,i=n._gridFocusEl,o=r.node(),s=((e=i==null?void 0:i.nodes)==null?void 0:e.call(i))||[];return s.length&&s.every(l=>o==null?void 0:o.contains(l))?i:n._gridFocusEl=r.selectAll(uC)}function Tv(t){t.$el.main.select(`line.${nn.xgridFocusContinuous}`).style("visibility","hidden")}function bv(t,e,n){return r=>{let i=t?0:e;return r.position==="start"?i=t?-n:0:r.position==="middle"&&(i=(t?-n:e)/2),i}}function Sv(t,e){e==="grid"&&t.each(function(){const n=Ut(this);["x1","x2","y1","y2"].forEach(r=>n.attr(r,+n.attr(r)))})}var hC={hasGrid(){const{config:t}=this;return["x","y"].some(e=>t[`grid_${e}_show`]||t[`grid_${e}_lines`].length)},initGrid(){const t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines(){const t=this,{config:e,state:{clip:n},$el:r}=t;(e.grid_x_lines.length||e.grid_y_lines.length)&&(r.gridLines.main=r.main.insert("g",`.${Ue.chart}${e.grid_lines_front?" + *":""}`).attr("clip-path",n.pathGrid).attr("class",`${Sn.grid} ${Sn.gridLines}`),r.gridLines.main.append("g").attr("class",Sn.xgridLines),r.gridLines.main.append("g").attr("class",Sn.ygridLines),r.gridLines.x=xg([]))},updateXGrid(t){const e=this,{config:n,scale:r,state:i,$el:{main:o,grid:s}}=e,l=n.axis_rotated,c=e.generateGridData(n.grid_x_type,r.x),u=e.axis.isCategorized()?e.axis.x.tickOffset():0,f=d=>(r.zoom||r.x)(d)+u*(l?-1:1);i.xgridAttr=l?{x1:0,x2:i.width,y1:f,y2:f}:{x1:f,x2:f,y1:0,y2:i.height},s.x=o.select(`.${Sn.xgrids}`).selectAll(`.${Sn.xgrid}`).data(c),s.x.exit().remove(),s.x=s.x.enter().append("line").attr("class",Sn.xgrid).merge(s.x),t||s.x.each(function(){const d=Ut(this);Object.keys(i.xgridAttr).forEach(h=>{d.attr(h,i.xgridAttr[h])}),d.style("opacity",()=>+d.attr(l?"y1":"x1")===(l?i.height:0)?"0":null)})},updateYGrid(){const t=this,{axis:e,config:n,scale:r,state:i,$el:{grid:o,main:s}}=t,l=n.axis_rotated,c=f=>r.y(f),u=e.y.getGeneratedTicks(n.grid_y_ticks)||t.scale.y.ticks(n.grid_y_ticks);o.y=s.select(`.${Sn.ygrids}`).selectAll(`.${Sn.ygrid}`).data(u),o.y.exit().remove(),o.y=o.y.enter().append("line").attr("class",Sn.ygrid).merge(o.y),o.y.attr("x1",l?c:0).attr("x2",l?c:i.width).attr("y1",l?0:c).attr("y2",l?i.height:c),Sv(o.y,"grid")},updateGrid(){const t=this,{$el:{grid:e,gridLines:n}}=t;!n.main&&t.initGridLines(),e.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateGridLines("x"),t.updateGridLines("y")},updateGridLines(t){const e=this,{config:n,$el:{gridLines:r,main:i},$T:o}=e,s=n.axis_rotated,l=t==="x";n[`grid_${t}_show`]&&e[`update${t.toUpperCase()}Grid`]();let c=i.select(`.${Sn[`${t}gridLines`]}`).selectAll(`.${Sn[`${t}gridLine`]}`).data(n[`grid_${t}_lines`]);o(c.exit()).style("opacity","0").remove();const u=c.enter().append("g");u.append("line").style("opacity","0"),c=u.merge(c),c.each(function(f){const d=Ut(this);d.select("text").empty()&&f.text&&d.append("text").style("opacity","0")}),o(c.attr("class",f=>`${Sn[`${t}gridLine`]} ${f.class||""}`.trim()).select("text").attr("text-anchor",fC).attr("transform",()=>l?s?null:"rotate(-90)":s?"rotate(-90)":null).attr("dx",dC).attr("dy",-5)).text(function(f){var d;return(d=f.text)!=null?d:this.remove()}),r[t]=c},redrawGrid(t){const e=this,{config:{axis_rotated:n},state:{width:r,height:i},$el:{gridLines:o},$T:s}=e,l=e.xv.bind(e),c=e.yv.bind(e);let u=o.x.select("line"),f=o.x.select("text"),d=o.y.select("line"),h=o.y.select("text");return u=s(u,t).attr("x1",n?0:l).attr("x2",n?r:l).attr("y1",n?l:0).attr("y2",n?l:i),f=s(f,t).attr("x",bv(!n,r,i)).attr("y",l),d=s(d,t).attr("x1",n?c:0).attr("x2",n?c:r).attr("y1",n?0:c).attr("y2",n?i:c),h=s(h,t).attr("x",bv(n,r,i)).attr("y",c),[u.style("opacity",null),f.style("opacity",null),d.style("opacity",null),h.style("opacity",null)]},initFocusGrid(){const t=this,{config:e,state:n,state:{clip:r},$el:i}=t;n._gridFocusEl=null;const o=e.grid_front,s=`.${o&&i.gridLines.main?Sn.gridLines:Ue.chart}${o?" + *":""}`,l=i.main.insert("g",s).attr("clip-path",r.pathGrid).attr("class",Sn.grid);if(i.grid.main=l,e.grid_x_show&&l.append("g").attr("class",Sn.xgrids),e.grid_y_show&&l.append("g").attr("class",Sn.ygrids),e.axis_tooltip){const c=l.append("g").attr("class","bb-axis-tooltip");c.append("line").attr("class","bb-axis-tooltip-x"),c.append("line").attr("class","bb-axis-tooltip-y")}e.interaction_enabled&&e.grid_focus_show&&!e.axis_tooltip&&(l.append("g").attr("class",nn.xgridFocus).append("line").attr("class",nn.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&l.append("g").attr("class",nn.ygridFocus).append("line").attr("class",nn.ygridFocus),e.subchart_grid_focus_continuous&&e.subchart_grid_focus!==!1&&i.main.insert("g",s).attr("class",nn.xgridFocusContinuous).append("line").attr("class",`${nn.xgridFocus} ${nn.xgridFocusContinuous}`).style("visibility","hidden"))},showAxisGridFocus(){var t,e;const n=this,{config:r,format:i,state:{event:o,width:s,height:l}}=n,c=r.axis_rotated,[u,f]=er(o,(t=n.$el.eventRect)==null?void 0:t.node()),d={x:u,y:f};for(const[h,m]of Object.entries(n.$el.axisTooltip)){const S=h==="x"&&!c||h!=="x"&&c?"x":"y",E=d[S];let C=(e=n.scale[h])==null?void 0:e.invert(E);C&&(C=h==="x"&&n.axis.isTimeSeries()?i.xAxisTick(C):C==null?void 0:C.toFixed(2),m==null||m.attr(S,E).text(C))}n.$el.main.selectAll("line.bb-axis-tooltip-x, line.bb-axis-tooltip-y").style("visibility",null).each(function(h,m){const S=Ut(this);m===0?S.attr("x1",u).attr("x2",u).attr("y1",m?0:l).attr("y2",m?l:0):S.attr("x1",m?0:s).attr("x2",m?s:0).attr("y1",f).attr("y2",f)})},hideAxisGridFocus(){const t=this;t.$el.main.selectAll(`line.${Pn.axisTooltipX}, line.${Pn.axisTooltipY}`).style("visibility","hidden"),Object.values(t.$el.axisTooltip).forEach(e=>e==null?void 0:e.style("display","none"))},showGridFocus(t){var e;const n=this,{config:r,state:{width:i,height:o}}=n,s=r.axis_rotated,l=yv(n),c=(t||[l.datum()]).filter(d=>d&&Xe(n.getBaseValue(d)));if(!r.tooltip_show||c.length===0||!r.axis_x_forceAsSingle&&n.hasType("bubble")||n.hasArcType())return;const u=r.grid_focus_edge&&!r.tooltip_grouped,f=n.xx.bind(n);l.style("visibility",null).data(c.concat(c)).each(function(d){const h=Ut(this),m={x:f(d),y:n.getYScaleById(d.id)(d.value)};let S;if(h.classed(nn.xgridFocus))S=s?[null,m.x,u?m.y:i,m.x]:[m.x,u?m.y:null,m.x,o];else{const E=n.axis.getId(d.id)==="y2";S=s?[m.y,u&&!E?m.x:null,m.y,u&&E?m.x:o]:[u&&E?m.x:null,m.y,u&&!E?m.x:i,m.y]}["x1","y1","x2","y2"].forEach((E,C)=>h.attr(E,S[C]))}),Sv(l,"grid"),(e=n.showCircleFocus)==null||e.call(n,t)},hideGridFocus(t=!1){var e;const n=this,{state:{inputType:r,resizing:i}}=n;(t||r==="mouse"||!i)&&(yv(n).style("visibility","hidden"),Tv(n),(e=n.hideCircleFocus)==null||e.call(n))},updateGridFocus(){var t;const e=this,{state:{inputType:n,width:r,height:i,resizing:o},$el:{grid:s}}=e,l=s.main.select(`line.${nn.xgridFocus}`);if(n==="touch")l.empty()?o&&((t=e.showCircleFocus)==null||t.call(e)):e.showGridFocus();else{const c=e.config.axis_rotated;l.attr("x1",c?0:-10).attr("x2",c?r:-10).attr("y1",c?-10:0).attr("y2",c?-10:i),Tv(e)}return!0},generateGridData(t,e){const n=this,r=n.$el.main.select(`.${Pn.axisX}`).selectAll(".tick").size();let i=[];if(t==="year"){const o=n.getXDomain(n.data.targets),[s,l]=o.map(c=>c.getFullYear());for(let c=s;c<=l;c++)i.push(new Date(`${c}-01-01 00:00:00`))}else i=e.ticks(vn),i.length>r&&(i=i.filter(o=>String(o).indexOf(".")<0));return i},getGridFilterToRemove(t){return t?e=>{let n=!1;return(en(t)?t.concat():[t]).forEach(r=>{("value"in r&&e.value===r.value||"class"in r&&e.class===r.class)&&(n=!0)}),n}:()=>!0},removeGridLines(t,e){const n=this,{config:r,$T:i}=n,o=n.getGridFilterToRemove(t),s=f=>!o(f),l=e?Sn.xgridLines:Sn.ygridLines,c=e?Sn.xgridLine:Sn.ygridLine;i(n.$el.main.select(`.${l}`).selectAll(`.${c}`).filter(o)).style("opacity","0").remove();const u=`grid_${e?"x":"y"}_lines`;r[u]=r[u].filter(s)}},gC={grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0};let Av=()=>(bn(Ir.prototype,hC),Jn.prototype.xgrids=xv.xgrids,Jn.prototype.ygrids=xv.ygrids,Ua.setOptions([gC]),(Av=()=>({}))());function Ev(t,e,n,r){const i=this,{config:o,$el:{main:s}}=i,l=o.data_selection_grouped,c=o.data_selection_isselectable.bind(i.api),u=on(e)?[].concat(e):null,f=t&&!o.data_selection_multiple;let d=!f;const h=(m,S,E)=>{i.unselectPoint(m,S,E),m.interrupt().remove()};i.getTargetsToShow().forEach(m=>{const{id:S}=m,E=l||!u||u.indexOf(S)>=0,C=s.select(`.${sn.selectedCircles}${i.getTargetSelectorSuffix(S)}`);m.values.forEach(w=>{const{index:N}=w,z=!n||n.indexOf(N)>=0,$=C.selectAll(`.${sn.selectedCircle}-${N}`),G=!$.empty();t?E&&z&&c(w)&&(!G||f)?(d||(Ev.call(i,!1),d=!0),i.selectPoint(null,w,N)):(!f||d)&&on(r)&&r&&G&&h($,w,N):E&&z&&G&&h($,w,N)})})}function cu(t=!1,e,n,r){var i;const o=this,{config:s,$el:{main:l}}=o,c=s.data_selection_grouped,u=s.data_selection_isselectable.bind(o.api),f=t&&!s.data_selection_multiple;let d=!f;if(s.data_selection_enabled){if(f&&(n=n!=null&&n.length?[n[0]]:[0],c||(e=(on(e)?[].concat(e):o.getTargetsToShow().map(m=>m.id)).slice(0,1))),(i=o.isPointFocusOnly)!=null&&i.call(o)){Ev.call(o,t,e,n,r);return}l.selectAll(`.${An.shapes}`).selectAll(`.${An.shape}`).each(function(h){const m=Ut(this),{id:S,index:E}=h.data?h.data:h,C=c||!e||e.indexOf(S)>=0,w=!n||n.indexOf(E)>=0;if(m.classed($r.line)||m.classed(hs.area))return;const N=o.getToggle(this,h).bind(o),z=m.classed(sn.SELECTED);t?C&&w&&u(h)&&(!z||f)?(d||(cu.call(o,!1),d=!0),!m.classed(sn.SELECTED)&&N(!0,m.classed(sn.SELECTED,!0),h,E)):(!f||d)&&on(r)&&r&&z&&N(!1,m.classed(sn.SELECTED,!1),h,E):C&&w&&u(h)&&z&&N(!1,m.classed(sn.SELECTED,!1),h,E)})}}var vC={selected(t){var e,n;const r=this.internal,i=[];return r.state.isCanvasMode?((e=r.getCanvasSelectedData)==null?void 0:e.call(r,t))||i:(n=r.isPointFocusOnly)!=null&&n.call(r)?(r.$el.main.selectAll(`.${sn.selectedCircles+r.getTargetSelectorSuffix(t)}`).selectAll(`.${sn.selectedCircle}`).each(o=>i.push(o)),i):(r.$el.main.selectAll(`.${An.shapes+r.getTargetSelectorSuffix(t)}`).selectAll(`.${An.shape}`).filter(function(){return Ut(this).classed(sn.SELECTED)}).each(o=>i.push(o)),i)},select(t,e,n){var r;const i=this.internal;if(i.state.isCanvasMode){(r=i.setCanvasSelection)==null||r.call(i,!0,t,e,n);return}cu.bind(i)(!0,t,e,n)},unselect(t,e){var n;const r=this.internal;if(r.state.isCanvasMode){(n=r.setCanvasSelection)==null||n.call(r,!1,t,e);return}cu.bind(r)(!1,t,e)}},pC={drag(t){const e=this,{config:n,state:r,$el:{main:i}}=e,o=n.data_selection_grouped,s=n.interaction_enabled&&n.data_selection_isselectable;if(e.hasArcType()||!n.data_selection_enabled||n.zoom_enabled&&!e.zoom.altDomain||!n.data_selection_multiple)return;const[l,c]=r.dragStart||[0,0],[u,f]=t,d=Math.min(l,u),h=Math.max(l,u),m=o?r.margin.top:Math.min(c,f),S=o?r.height:Math.max(c,f),E=()=>{!e||!e.$el||!e.$el.main||(i.select(`.${za.dragarea}`).attr("x",d).attr("y",m).attr("width",h-d).attr("height",S-m),i.selectAll(`.${An.shapes}`).selectAll(`.${An.shape}`).filter(C=>s==null?void 0:s.bind(e.api)(C)).each(function(C,w){const N=Ut(this),z=N.classed(sn.SELECTED),$=N.classed(za.INCLUDED);let G,V;if(N.classed(Un.circle)){const J=+N.attr("cx"),Q=+N.attr("cy");V=e.togglePoint,G=d<J&&J<h&&m<Q&&Q<S}else if(N.classed(lr.bar)){const{x:J,y:Q,width:rt,height:et}=Sh(this);V=e.togglePath,G=!(h<J||J+rt<d)&&!(S<Q||Q+et<m)}else return;G^$&&(N.classed(za.INCLUDED,!$),N.classed(sn.SELECTED,!z),V.call(e,!z,N,C,w))}))};Eh(e.state,E)},dragstart(t){const e=this,{config:n,state:r,$el:{main:i}}=e;e.hasArcType()||!n.data_selection_enabled||(r.dragStart=t,i.select(`.${Ue.chart}`).append("rect").attr("class",za.dragarea).style("opacity","0.1"),e.setDragStatus(!0))},dragend(){const t=this,{config:e,$el:{main:n},$T:r}=t;t.hasArcType()||!e.data_selection_enabled||(r(n.select(`.${za.dragarea}`)).style("opacity","0").remove(),n.selectAll(`.${An.shape}`).classed(za.INCLUDED,!1),t.setDragStatus(!1))}},mC=Object.defineProperty,xC=Object.defineProperties,yC=Object.getOwnPropertyDescriptors,Cv=Object.getOwnPropertySymbols,TC=Object.prototype.hasOwnProperty,bC=Object.prototype.propertyIsEnumerable,Iv=(t,e,n)=>e in t?mC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,SC=(t,e)=>{for(var n in e||(e={}))TC.call(e,n)&&Iv(t,n,e[n]);if(Cv)for(var n of Cv(e))bC.call(e,n)&&Iv(t,n,e[n]);return t},AC=(t,e)=>xC(t,yC(e)),EC=AC(SC({},pC),{selectPoint(t,e,n){const r=this,{config:i,$el:{main:o},$T:s}=r,l=i.axis_rotated,c=(l?r.circleY:r.circleX).bind(r),u=(l?r.circleX:r.circleY).bind(r),f=r.pointSelectR.bind(r);$e(i.data_onselected,r.api,e,t==null?void 0:t.node()),s(o.select(`.${sn.selectedCircles}${r.getTargetSelectorSuffix(e.id)}`).selectAll(`.${sn.selectedCircle}-${n}`).data([e]).enter().append("circle").attr("class",()=>r.generateClass(sn.selectedCircle,n)).attr("cx",c).attr("cy",u).attr("stroke",r.color).attr("r",d=>r.pointSelectR(d)*1.4)).attr("r",f)},unselectPoint(t,e,n){const r=this,{config:i,$el:{main:o},$T:s}=r;$e(i.data_onunselected,r.api,e,t==null?void 0:t.node()),s(o.select(`.${sn.selectedCircles}${r.getTargetSelectorSuffix(e.id)}`).selectAll(`.${sn.selectedCircle}-${n}`)).attr("r",0).remove()},togglePoint(t,e,n,r){this[`${t?"":"un"}selectPoint`](e,n,r)},selectPath(t,e){const n=this,{config:r}=n;$e(r.data_onselected,n.api,e,t.node()),r.interaction_brighten&&t.style("filter","brightness(1.25)")},unselectPath(t,e){const n=this,{config:r}=n;$e(r.data_onunselected,n.api,e,t.node()),r.interaction_brighten&&t.style("filter",null)},togglePath(t,e,n,r){this[`${t?"":"un"}selectPath`](e,n,r)},getToggle(t,e){const n=this;return t.nodeName==="path"?n.togglePath:n.isStepType(e)?()=>{}:n.togglePoint},toggleShape(t,e,n){var r;const i=this,{config:o,$el:{main:s}}=i;if(o.data_selection_enabled&&o.data_selection_isselectable.bind(i.api)(e)){const l=Ut(t),c=l.classed(sn.SELECTED),u=i.getToggle(t,e).bind(i);let f;if(!o.data_selection_multiple){const d=(r=i.isPointFocusOnly)==null?void 0:r.call(i);let h=`.${d?sn.selectedCircles:An.shapes}`;o.data_selection_grouped&&(h+=i.getTargetSelectorSuffix(e.id)),s.selectAll(h).selectAll(d?`.${sn.selectedCircle}`:`.${An.shape}.${sn.SELECTED}`).classed(sn.SELECTED,!1).each(function(m){const S=Ut(this);f=S,u(!1,S,m,m.index)})}(!f||f.node()!==l.node())&&(l.classed(sn.SELECTED,!c),u(!c,l,e,n))}}}),CC={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:()=>!0,data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:()=>{},data_onunselected:()=>{}};let Rv=()=>(bn(Ir.prototype,EC),bn(Jn.prototype,vC),Ua.setOptions([CC]),(Rv=()=>!0)());const wv=function(t){var e,n;const r=this.internal,{axis:i,brush:o,config:s,scale:{x:l,subX:c},state:u}=r;let f;return u.isCanvasMode?(s.subchart_show&&(f=t,Array.isArray(f)?(f=i.isTimeSeries()?f.map(d=>Kn.bind(r)(d)):f,f=r.setCanvasSubchartDomain(f)||u.domain):f=(e=u.domain)!=null?e:l.orgDomain()),f):(s.subchart_show&&(f=t,Array.isArray(f)?(i.isTimeSeries()&&(f=f.map(h=>Kn.bind(r)(h))),r.withinRange(f,r.getZoomDomain("subX",!0),r.getZoomDomain("subX"))&&(u.domain=f.slice(),o.move(o.getSelection(),f.map(c)))):f=(n=u.domain)!=null?n:l.orgDomain()),f)};bn(wv,{show(){var t,e,n;const r=this.internal,{$el:{subchart:i},config:o}=r,s=o.subchart_show;if(!s){if(r.state.isCanvasMode){(t=r.unbindZoomEvent)==null||t.call(r),o.subchart_show=!0,this.resize();return}r.unbindZoomEvent(),o.subchart_show=!s,!i.main&&r.initSubchart();let l=i.main.selectAll(`.${Ue.target}`);r.data.targets.length!==l.size()&&(r.updateSizes(),r.updateTargetsForSubchart(r.data.targets),l=(e=i.main)==null?void 0:e.selectAll(`.${Ue.target}`)),l==null||l.style("opacity",null),(n=i.main)==null||n.style("display",null),this.resize()}},hide(){var t;const e=this.internal,{$el:{subchart:{main:n}},config:r}=e;if(e.state.isCanvasMode){r.subchart_show&&(r.subchart_show=!1,this.resize(),(t=e.bindZoomEvent)==null||t.call(e));return}r.subchart_show&&(n==null?void 0:n.style("display"))!=="none"&&(r.subchart_show=!1,n.style("display","none"),this.resize())},toggle(){const t=this.internal,{config:e}=t;this.subchart[e.subchart_show?"hide":"show"]()},reset(){var t;const e=this.internal,{brush:n}=e;if(e.state.isCanvasMode){(t=e.clearCanvasSubchartDomain)==null||t.call(e,!0,!1);return}n.clear(n.getSelection())}});var IC={subchart:wv};const Ov=["bar","line","bubble","candlestick","scatter"],RC=["opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width"];function Pv(t,e){var n,r;const i=(r=(n=t.$el.grid)==null?void 0:n.main)==null?void 0:r.select(`line.${Ie.xgridFocus}`).node();if(!i||!fe.getComputedStyle)return;const o=fe.getComputedStyle(i);RC.forEach(s=>{const l=o.getPropertyValue(s);l&&e.style(s,l)})}function mi(t,e){const n=Number(t);return Number.isFinite(n)?n:e}function wC(t){var e,n;if(!_l(t))return!1;const{config:r,state:i,$el:o}=t,s=(n=(e=o.grid)==null?void 0:e.main)==null?void 0:n.select(`line.${Ie.xgridFocus}:not(.${Ie.xgridFocusContinuous})`),l=o.main.select(`line.${Ie.xgridFocusContinuous}`);if(!(s!=null&&s.node())||!l.node())return!1;const c=i.margin2.left-i.margin.left+i.width2,u=i.margin2.top-i.margin.top+i.height2;return Pv(t,l),r.axis_rotated?l.attr("x1",mi(s.attr("x1"),0)).attr("x2",c).attr("y1",mi(s.attr("y1"),-10)).attr("y2",mi(s.attr("y2"),-10)):l.attr("x1",mi(s.attr("x1"),-10)).attr("x2",mi(s.attr("x2"),-10)).attr("y1",mi(s.attr("y1"),0)).attr("y2",u),l.style("visibility",null),s.style("visibility","hidden"),!0}function OC(t){var e;(e=t.$el.main)==null||e.select(`line.${Ie.xgridFocusContinuous}`).style("visibility","hidden")}function PC(t,e,n){const{config:r,state:i}=t,[o,s]=er(e,n),l=gd(t,r.axis_rotated?s:o);return l===null?null:r.axis_rotated?[i.width/2,l]:[l,i.height/2]}function uu(t,e,n,r){var i,o;const s=(o=(i=t.$el.eventRect)==null?void 0:i.node)==null?void 0:o.call(i);if(!s)return;const l=PC(t,n,r)||[0,0],c=cn(s,!0),u=c.left+l[0],f=c.top+l[1],d={bubbles:!0,cancelable:!0,screenX:u,screenY:f,clientX:u,clientY:f};/^touch/.test(e)?Ac.touch(s,e,d):Ac.mouse(s,e,d)}var MC={isSubchartBrushEnabled(){const{config:t}=this;return t.subchart_show&&t.subchart_brush_enabled!==!1},bindSubchartEventRect(t){const e=this,{config:n,state:r}=e;t.on("mouseover mousemove mouseout touchstart touchmove touchend",null),n.interaction_enabled&&(r.inputType==="mouse"?t.on("mouseover mousemove",function(i){e.isSubchartBrushEnabled()||uu(e,i.type,i,this)}).on("mouseout",function(i){e.isSubchartBrushEnabled()||uu(e,"mouseout",i,this)}):r.inputType==="touch"&&t.on("touchstart touchmove touchend",function(i){var o;e.isSubchartBrushEnabled()||((o=i.touches)==null?void 0:o.length)>1||uu(e,i.type,i,this)}))},initBrush(){const t=this,{config:e,scale:n,$el:{subchart:r},state:i}=t,o=e.axis_rotated,s=e.subchart_size_height;let l,c,u;t.brush=(o?aA():rA()).handleSize(5),t.brush.on("start brush end",f=>{const{selection:d,sourceEvent:h,target:m,type:S}=f;S==="start"&&(t.state.inputType==="touch"&&t.hideTooltip(),c=h?d:null),/(start|brush)/.test(S)&&(S==="brush"&&h&&i.domain&&(c==null||c.forEach((E,C)=>{E!==d[C]&&(i.domain[C]=n.x.orgDomain()[C])})),t.redrawForBrush(S!=="start")),S==="end"&&(l=n.x.orgDomain()),m!=null&&m.handle&&(d===null?t.brush.handle.attr("display","none"):t.brush.handle.attr("display",null).attr("transform",(E,C)=>{const w=[d[C],s/2];return`translate(${o?w.reverse():w})`}))}),t.brush.updateResize=function(){u&&clearTimeout(u),u=setTimeout(()=>{const f=this.getSelection();l&&lg(f.node())&&this.move(f,l.map(n.subX.orgScale()))},0)},t.brush.update=function(){var f;return this.extent()()[1].filter(h=>isNaN(h)).length===0&&((f=r.main)==null||f.select(`.${Ie.brush}`).call(this)),this},t.brush.scale=function(f){const d=e.subchart_size_height;let h=t.axis.getExtent();!h&&f.range?h=[[0,0],[f.range()[1],d]]:en(h)&&(h=h.map((m,S)=>[m,S>0?d:S])),o&&h[1].reverse(),this.extent(h),this.update()},t.brush.getSelection=()=>r.main?r.main.select(`.${Ie.brush}`):Ut([])},initSubchart(){const t=this,{config:e,state:{clip:n,hasAxis:r},$el:{defs:i,svg:o,subchart:s,axis:l}}=t;if(!r)return;const c=e.subchart_show?null:"hidden",u=`${n.id}-subchart`,f=t.getClipPath(u);n.idSubchart=u,t.appendClip(i,u),t.initBrush(),s.main=o.append("g").classed(Ie.subchart,!0).attr("transform",t.getTranslate("context"));const{main:d}=s;d.style("visibility",c),d.append("g").attr("clip-path",f).attr("class",Ie.chart),t.withSubchartTypeContext(()=>{Ov.forEach(m=>{const S=Nn(/^(bubble|scatter)$/.test(m)?"circle":m);if(t.hasType(m)||t.hasTypeOf(S)){const E=d.select(`.${Ie.chart}`),C=Ie[`chart${S}s`];E.select(`.${C}`).empty()&&E.append("g").attr("class",C)}})});const h=d.append("g").attr("clip-path",f).attr("class",Ie.brush).style("pointer-events",t.isSubchartBrushEnabled()?null:"none").call(t.brush);e.subchart_showHandle&&t.addBrushHandle(h),s.eventRect=d.append("g").attr("clip-path",f).attr("class",`${Ie.eventRects} ${Ie.eventRects}-subchart`).style("fill-opacity","0").style("pointer-events",t.isSubchartBrushEnabled()?"none":"all").append("rect").attr("class",`${Ie.eventRect} ${Ie.eventRect}-subchart`).attr("width",t.state.width2).attr("height",t.state.height2),t.bindSubchartEventRect(s.eventRect),d.append("g").attr("clip-path",f).attr("class",Ie.xgridFocus).append("line").attr("class",Ie.xgridFocus).style("visibility","hidden"),l.subX=d.append("g").attr("class",Ie.axisX).attr("transform",t.getTranslate("subX")).attr("clip-path",e.axis_rotated?"":n.pathXAxis).style("visibility",e.subchart_axis_x_show?c:"hidden"),l.subY=d.append("g").attr("class",Ie.axisY).attr("transform",t.getTranslate("subY")).style("visibility",e.subchart_axis_y_show?c:"hidden"),l.subY2=d.append("g").attr("class",Ie.axisY2).attr("transform",t.getTranslate("subY2")).style("visibility",e.subchart_axis_y2_show?c:"hidden")},addBrushHandle(t){const e=this,{config:n}=e,r=n.axis_rotated,i=n.subchart_init_range,o="handle--custom",s=Mi[r?"y":"x"];e.brush.handle=t.selectAll(`.${o}`).data(r?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class",o).attr("cursor",`${r?"ns":"ew"}-resize`).attr("d",l=>s[/[se]/.test(l.type)?"end":"start"]).attr("display",i?null:"none")},updateTargetsForSubchart(t){var e;const n=this,{config:r,state:i,$el:{subchart:{main:o}}}=n;r.subchart_show&&(n.withSubchartTypeContext(()=>{Ov.filter(s=>n.hasType(s)||n.hasTypeOf(Nn(s))).forEach(s=>{const l=/^(bubble|scatter)$/.test(s),c=Nn(l?"circle":s),u=n.getChartClass(c,!0),f=n.getClass(l?"circles":`${s}s`,!0),d=o.select(`.${Ie[`chart${`${c}s`}`]}`);if(l){const h=d.selectAll(`.${Ie.circles}`).data(t.filter(n[`is${Nn(s)}Type`].bind(n))).attr("class",f);h.exit().remove(),h.enter().append("g").attr("class",f)}else{const h=d.selectAll(`.${Ie[`chart${c}`]}`).attr("class",u).data(t.filter(n[`is${c}Type`].bind(n))),m=h.enter().append("g").style("opacity","0").attr("class",u).append("g").attr("class",f);h.exit().remove(),s==="line"&&n.hasTypeOf("Area")&&m.append("g").attr("class",n.getClass("areas",!0))}})}),o.selectAll(`.${Ie.brush} rect`).attr(r.axis_rotated?"width":"height",r.axis_rotated?i.width2:i.height2),(e=n.$el.subchart.eventRect)==null||e.attr("width",i.width2).attr("height",i.height2).style("pointer-events",n.isSubchartBrushEnabled()?"none":"all"))},updateSubchartYDomain(t){var e,n;const r=this,{scale:i}=r,o=t||r.filterTargetsToShow(r.data.targets);(e=i.subY)==null||e.domain(r.getYDomain(o,"y")),(n=i.subY2)==null||n.domain(r.getYDomain(o,"y2"))},redrawSubchart(t,e){var n,r,i,o;const s=this,{config:l,$el:{subchart:{main:c}},state:u}=s,f=!!e;if(c.style("visibility",l.subchart_show?null:"hidden"),c.select(`.${Ie.brush}`).style("pointer-events",s.isSubchartBrushEnabled()?null:"none"),(n=s.$el.subchart.eventRect)==null||n.style("pointer-events",s.isSubchartBrushEnabled()?"none":"all"),(r=s.$el.axis.subY)==null||r.style("visibility",l.subchart_axis_y_show?null:"hidden"),(i=s.$el.axis.subY2)==null||i.style("visibility",l.subchart_axis_y2_show?null:"hidden"),l.subchart_show&&(((o=u.event)==null?void 0:o.type)==="zoom"&&s.brush.update(),t)){const d=l.subchart_init_range;!ug(s)&&s.brush.update(),s.withSubchartTypeContext(()=>{const h=u._targetsToShow||s.filterTargetsToShow(s.data.targets);s.updateSubchartYDomain(h);const m=s.getDrawShape();if(Object.keys(m.type).forEach(S=>{const E=Nn(S),C=s[`generateDraw${E}`](m.indices[S],!0);s[`update${E}`](f,!0),s[`redraw${E}`](C,f,!0)}),s.hasType("bubble")||s.hasType("scatter")){const{cx:S}=m.pos,E=s.updateCircleY(!0);s.updateCircle(!0),s.redrawCircle(S,E,f,void 0,!0)}}),!u.rendered&&d&&(u.domain=d,s.brush.move(s.brush.getSelection(),d.map(s.scale.x)))}},showSubchartGridFocus(t){const e=this,{config:n,state:r,$el:{subchart:{main:i}}}=e;if(!i||!n.subchart_show||e.isSubchartBrushEnabled()||n.grid_focus_show===!1||n.subchart_grid_focus===!1||!n.tooltip_show||n.axis_tooltip)return;const s=(Array.isArray(t)?t:[t]).find(u=>u&&e.getBaseValue(u)!=null);if(!s){e.hideSubchartGridFocus();return}const l=e.scale.subX(s.x);if(!Number.isFinite(l)){e.hideSubchartGridFocus();return}const c=i.select(`g.${Ie.xgridFocus} line.${Ie.xgridFocus}`);if(wC(e)){c.style("visibility","hidden");return}Pv(e,c),n.axis_rotated?c.attr("x1",0).attr("x2",r.width2).attr("y1",l).attr("y2",l):c.attr("x1",l).attr("x2",l).attr("y1",0).attr("y2",r.height2),c.style("visibility",null)},hideSubchartGridFocus(){var t;OC(this),(t=this.$el.subchart.main)==null||t.select(`g.${Ie.xgridFocus} line.${Ie.xgridFocus}`).style("visibility","hidden")},redrawForBrush(t=!0){var e;const n=this,{config:{subchart_onbrush:r,zoom_rescale:i},scale:o,state:s}=n;n.redraw({withTransition:!1,withY:i,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t&&s.rendered&&r.bind(n.api)((e=s.domain)!=null?e:o.x.orgDomain())},transformContext(t,e){const n=this,{$el:{subchart:r},$T:i}=n,o=e!=null&&e.axisSubX?e.axisSubX:i(r.main.select(`.${Ie.axisX}`),t),s=e!=null&&e.axisSubY?e.axisSubY:i(r.main.select(`.${Ie.axisY}`),t),l=e!=null&&e.axisSubY2?e.axisSubY2:i(r.main.select(`.${Ie.axisY2}`),t);r.main.attr("transform",n.getTranslate("context")),o.attr("transform",n.getTranslate("subX")),s.attr("transform",n.getTranslate("subY")),l.attr("transform",n.getTranslate("subY2"))}},LC={subchart_show:!1,subchart_type:void 0,subchart_types:{},subchart_brush_enabled:!0,subchart_showHandle:!1,subchart_size_height:60,subchart_grid_focus:!0,subchart_grid_focus_continuous:!1,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_count:void 0,subchart_axis_x_tick_values:void 0,subchart_axis_x_tick_culling:void 0,subchart_axis_x_tick_culling_max:void 0,subchart_axis_x_tick_culling_lines:void 0,subchart_axis_x_tick_culling_reverse:void 0,subchart_axis_x_tick_outer:void 0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_axis_y_show:!1,subchart_axis_y_tick_show:!0,subchart_axis_y_tick_count:void 0,subchart_axis_y_tick_values:void 0,subchart_axis_y_tick_culling:void 0,subchart_axis_y_tick_culling_max:void 0,subchart_axis_y_tick_culling_lines:void 0,subchart_axis_y_tick_culling_reverse:void 0,subchart_axis_y_tick_outer:void 0,subchart_axis_y_tick_format:void 0,subchart_axis_y_tick_text_show:!0,subchart_axis_y2_show:!1,subchart_axis_y2_tick_show:!0,subchart_axis_y2_tick_count:void 0,subchart_axis_y2_tick_values:void 0,subchart_axis_y2_tick_culling:void 0,subchart_axis_y2_tick_culling_max:void 0,subchart_axis_y2_tick_culling_lines:void 0,subchart_axis_y2_tick_culling_reverse:void 0,subchart_axis_y2_tick_outer:void 0,subchart_axis_y2_tick_format:void 0,subchart_axis_y2_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:()=>{}};let Mv=()=>(bn(Ir.prototype,MC),bn(Jn.prototype,IC),Ua.setOptions([LC]),(Mv=()=>!0)());var DC=1e-12;function Lv(t){return((t=Math.exp(t))+1/t)/2}function FC(t){return((t=Math.exp(t))-1/t)/2}function NC(t){return((t=Math.exp(2*t))-1)/(t+1)}var $C=(function t(e,n,r){function i(o,s){var l=o[0],c=o[1],u=o[2],f=s[0],d=s[1],h=s[2],m=f-l,S=d-c,E=m*m+S*S,C,w;if(E<DC)w=Math.log(h/u)/e,C=function(J){return[l+J*m,c+J*S,u*Math.exp(e*J*w)]};else{var N=Math.sqrt(E),z=(h*h-u*u+r*E)/(2*u*n*N),$=(h*h-u*u-r*E)/(2*h*n*N),G=Math.log(Math.sqrt(z*z+1)-z),V=Math.log(Math.sqrt($*$+1)-$);w=(V-G)/e,C=function(J){var Q=J*w,rt=Lv(G),et=u/(n*N)*(rt*NC(e*Q+G)-FC(G));return[l+et*m,c+et*S,u*rt/Lv(e*Q+G)]}}return C.duration=w*1e3*e/Math.SQRT2,C}return i.rho=function(o){var s=Math.max(.001,+o),l=s*s,c=l*l;return t(s,l,c)},i})(Math.SQRT2,2,4),js=(t=>()=>t);function BC(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function oa(t,e,n){this.k=t,this.x=e,this.y=n}oa.prototype={constructor:oa,scale:function(t){return t===1?this:new oa(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new oa(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var vr=new oa(1,0,0);fu.prototype=oa.prototype;function fu(t){for(;!t.__zoom;)if(!(t=t.parentNode))return vr;return t.__zoom}function du(t){t.stopImmediatePropagation()}function vo(t){t.preventDefault(),t.stopImmediatePropagation()}function zC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function UC(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Dv(){return this.__zoom||vr}function kC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function GC(){return navigator.maxTouchPoints||"ontouchstart"in this}function XC(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function WC(){var t=zC,e=UC,n=XC,r=kC,i=GC,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=$C,u=ys("start","zoom","end"),f,d,h,m=500,S=150,E=0,C=10;function w(q){q.property("__zoom",Dv).on("wheel.zoom",Q,{passive:!1}).on("mousedown.zoom",rt).on("dblclick.zoom",et).filter(i).on("touchstart.zoom",st).on("touchmove.zoom",ct).on("touchend.zoom touchcancel.zoom",dt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(q,ft,lt,pt){var Tt=q.selection?q.selection():q;Tt.property("__zoom",Dv),q!==Tt?G(q,ft,lt,pt):Tt.interrupt().each(function(){V(this,arguments).event(pt).start().zoom(null,typeof ft=="function"?ft.apply(this,arguments):ft).end()})},w.scaleBy=function(q,ft,lt,pt){w.scaleTo(q,function(){var Tt=this.__zoom.k,Rt=typeof ft=="function"?ft.apply(this,arguments):ft;return Tt*Rt},lt,pt)},w.scaleTo=function(q,ft,lt,pt){w.transform(q,function(){var Tt=e.apply(this,arguments),Rt=this.__zoom,Ct=lt==null?$(Tt):typeof lt=="function"?lt.apply(this,arguments):lt,Kt=Rt.invert(Ct),re=typeof ft=="function"?ft.apply(this,arguments):ft;return n(z(N(Rt,re),Ct,Kt),Tt,s)},lt,pt)},w.translateBy=function(q,ft,lt,pt){w.transform(q,function(){return n(this.__zoom.translate(typeof ft=="function"?ft.apply(this,arguments):ft,typeof lt=="function"?lt.apply(this,arguments):lt),e.apply(this,arguments),s)},null,pt)},w.translateTo=function(q,ft,lt,pt,Tt){w.transform(q,function(){var Rt=e.apply(this,arguments),Ct=this.__zoom,Kt=pt==null?$(Rt):typeof pt=="function"?pt.apply(this,arguments):pt;return n(vr.translate(Kt[0],Kt[1]).scale(Ct.k).translate(typeof ft=="function"?-ft.apply(this,arguments):-ft,typeof lt=="function"?-lt.apply(this,arguments):-lt),Rt,s)},pt,Tt)};function N(q,ft){return ft=Math.max(o[0],Math.min(o[1],ft)),ft===q.k?q:new oa(ft,q.x,q.y)}function z(q,ft,lt){var pt=ft[0]-lt[0]*q.k,Tt=ft[1]-lt[1]*q.k;return pt===q.x&&Tt===q.y?q:new oa(q.k,pt,Tt)}function $(q){return[(+q[0][0]+ +q[1][0])/2,(+q[0][1]+ +q[1][1])/2]}function G(q,ft,lt,pt){q.on("start.zoom",function(){V(this,arguments).event(pt).start()}).on("interrupt.zoom end.zoom",function(){V(this,arguments).event(pt).end()}).tween("zoom",function(){var Tt=this,Rt=arguments,Ct=V(Tt,Rt).event(pt),Kt=e.apply(Tt,Rt),re=lt==null?$(Kt):typeof lt=="function"?lt.apply(Tt,Rt):lt,Ee=Math.max(Kt[1][0]-Kt[0][0],Kt[1][1]-Kt[0][1]),Ce=Tt.__zoom,be=typeof ft=="function"?ft.apply(Tt,Rt):ft,Ne=c(Ce.invert(re).concat(Ee/Ce.k),be.invert(re).concat(Ee/be.k));return function(ye){if(ye===1)ye=be;else{var De=Ne(ye),Zt=Ee/De[2];ye=new oa(Zt,re[0]-De[0]*Zt,re[1]-De[1]*Zt)}Ct.zoom(null,ye)}})}function V(q,ft,lt){return!lt&&q.__zooming||new J(q,ft)}function J(q,ft){this.that=q,this.args=ft,this.active=0,this.sourceEvent=null,this.extent=e.apply(q,ft),this.taps=0}J.prototype={event:function(q){return q&&(this.sourceEvent=q),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(q,ft){return this.mouse&&q!=="mouse"&&(this.mouse[1]=ft.invert(this.mouse[0])),this.touch0&&q!=="touch"&&(this.touch0[1]=ft.invert(this.touch0[0])),this.touch1&&q!=="touch"&&(this.touch1[1]=ft.invert(this.touch1[0])),this.that.__zoom=ft,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(q){var ft=Ut(this.that).datum();u.call(q,this.that,new BC(q,{sourceEvent:this.sourceEvent,target:w,type:q,transform:this.that.__zoom,dispatch:u}),ft)}};function Q(q,...ft){if(!t.apply(this,arguments))return;var lt=V(this,ft).event(q),pt=this.__zoom,Tt=Math.max(o[0],Math.min(o[1],pt.k*Math.pow(2,r.apply(this,arguments)))),Rt=gr(q);if(lt.wheel)(lt.mouse[0][0]!==Rt[0]||lt.mouse[0][1]!==Rt[1])&&(lt.mouse[1]=pt.invert(lt.mouse[0]=Rt)),clearTimeout(lt.wheel);else{if(pt.k===Tt)return;lt.mouse=[Rt,pt.invert(Rt)],di(this),lt.start()}vo(q),lt.wheel=setTimeout(Ct,S),lt.zoom("mouse",n(z(N(pt,Tt),lt.mouse[0],lt.mouse[1]),lt.extent,s));function Ct(){lt.wheel=null,lt.end()}}function rt(q,...ft){if(h||!t.apply(this,arguments))return;var lt=q.currentTarget,pt=V(this,ft,!0).event(q),Tt=Ut(q.view).on("mousemove.zoom",re,!0).on("mouseup.zoom",Ee,!0),Rt=gr(q,lt),Ct=q.clientX,Kt=q.clientY;Oc(q.view),du(q),pt.mouse=[Rt,this.__zoom.invert(Rt)],di(this),pt.start();function re(Ce){if(vo(Ce),!pt.moved){var be=Ce.clientX-Ct,Ne=Ce.clientY-Kt;pt.moved=be*be+Ne*Ne>E}pt.event(Ce).zoom("mouse",n(z(pt.that.__zoom,pt.mouse[0]=gr(Ce,lt),pt.mouse[1]),pt.extent,s))}function Ee(Ce){Tt.on("mousemove.zoom mouseup.zoom",null),Pc(Ce.view,pt.moved),vo(Ce),pt.event(Ce).end()}}function et(q,...ft){if(t.apply(this,arguments)){var lt=this.__zoom,pt=gr(q.changedTouches?q.changedTouches[0]:q,this),Tt=lt.invert(pt),Rt=lt.k*(q.shiftKey?.5:2),Ct=n(z(N(lt,Rt),pt,Tt),e.apply(this,ft),s);vo(q),l>0?Ut(this).transition().duration(l).call(G,Ct,pt,q):Ut(this).call(w.transform,Ct,pt,q)}}function st(q,...ft){if(t.apply(this,arguments)){var lt=q.touches,pt=lt.length,Tt=V(this,ft,q.changedTouches.length===pt).event(q),Rt,Ct,Kt,re;for(du(q),Ct=0;Ct<pt;++Ct)Kt=lt[Ct],re=gr(Kt,this),re=[re,this.__zoom.invert(re),Kt.identifier],Tt.touch0?!Tt.touch1&&Tt.touch0[2]!==re[2]&&(Tt.touch1=re,Tt.taps=0):(Tt.touch0=re,Rt=!0,Tt.taps=1+!!f);f&&(f=clearTimeout(f)),Rt&&(Tt.taps<2&&(d=re[0],f=setTimeout(function(){f=null},m)),di(this),Tt.start())}}function ct(q,...ft){if(this.__zooming){var lt=V(this,ft).event(q),pt=q.changedTouches,Tt=pt.length,Rt,Ct,Kt,re;for(vo(q),Rt=0;Rt<Tt;++Rt)Ct=pt[Rt],Kt=gr(Ct,this),lt.touch0&&lt.touch0[2]===Ct.identifier?lt.touch0[0]=Kt:lt.touch1&&lt.touch1[2]===Ct.identifier&&(lt.touch1[0]=Kt);if(Ct=lt.that.__zoom,lt.touch1){var Ee=lt.touch0[0],Ce=lt.touch0[1],be=lt.touch1[0],Ne=lt.touch1[1],ye=(ye=be[0]-Ee[0])*ye+(ye=be[1]-Ee[1])*ye,De=(De=Ne[0]-Ce[0])*De+(De=Ne[1]-Ce[1])*De;Ct=N(Ct,Math.sqrt(ye/De)),Kt=[(Ee[0]+be[0])/2,(Ee[1]+be[1])/2],re=[(Ce[0]+Ne[0])/2,(Ce[1]+Ne[1])/2]}else if(lt.touch0)Kt=lt.touch0[0],re=lt.touch0[1];else return;lt.zoom("touch",n(z(Ct,Kt,re),lt.extent,s))}}function dt(q,...ft){if(this.__zooming){var lt=V(this,ft).event(q),pt=q.changedTouches,Tt=pt.length,Rt,Ct;for(du(q),h&&clearTimeout(h),h=setTimeout(function(){h=null},m),Rt=0;Rt<Tt;++Rt)Ct=pt[Rt],lt.touch0&&lt.touch0[2]===Ct.identifier?delete lt.touch0:lt.touch1&&lt.touch1[2]===Ct.identifier&&delete lt.touch1;if(lt.touch1&&!lt.touch0&&(lt.touch0=lt.touch1,delete lt.touch1),lt.touch0)lt.touch0[1]=this.__zoom.invert(lt.touch0[0]);else if(lt.end(),lt.taps===2&&(Ct=gr(Ct,this),Math.hypot(d[0]-Ct[0],d[1]-Ct[1])<C)){var Kt=Ut(this).on("dblclick.zoom");Kt&&Kt.apply(this,arguments)}}}return w.wheelDelta=function(q){return arguments.length?(r=typeof q=="function"?q:js(+q),w):r},w.filter=function(q){return arguments.length?(t=typeof q=="function"?q:js(!!q),w):t},w.touchable=function(q){return arguments.length?(i=typeof q=="function"?q:js(!!q),w):i},w.extent=function(q){return arguments.length?(e=typeof q=="function"?q:js([[+q[0][0],+q[0][1]],[+q[1][0],+q[1][1]]]),w):e},w.scaleExtent=function(q){return arguments.length?(o[0]=+q[0],o[1]=+q[1],w):[o[0],o[1]]},w.translateExtent=function(q){return arguments.length?(s[0][0]=+q[0][0],s[1][0]=+q[1][0],s[0][1]=+q[0][1],s[1][1]=+q[1][1],w):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},w.constrain=function(q){return arguments.length?(n=q,w):n},w.duration=function(q){return arguments.length?(l=+q,w):l},w.interpolate=function(q){return arguments.length?(c=q,w):c},w.on=function(){var q=u.on.apply(u,arguments);return q===u?w:q},w.clickDistance=function(q){return arguments.length?(E=(q=+q)*q,w):Math.sqrt(E)},w.tapDistance=function(q){return arguments.length?(C=+q,w):C},w}const Fv=function(t){var e,n;const r=this.internal,{axis:i,config:o,org:s,scale:l,state:c}=r;let u;if(!i)return;const f=i.isCategorized();if(o.zoom_enabled)if(u=t,Array.isArray(u)){if(i.isTimeSeries()&&(u=u.map(h=>Kn.bind(r)(h))),r.withinRange(u,r.getZoomDomain("zoom",!0),r.getZoomDomain("zoom"))){if(c.domain=u.slice(),u=r.getZoomDomainValue(u),r.api.tooltip.hide(),o.subchart_show)if(c.isCanvasMode)(e=r.setCanvasSubchartDomain)==null||e.call(r,u,!0,!1);else{const h=l.zoom||l.x;r.brush.getSelection().call(r.brush.move,u.map(h))}else{const h=f?l.x.orgScale():s.xScale||l.x;r.updateCurrentZoomTransform(h,u)}r.setZoomResetButton()}}else u=r.zoom.getDomain();return(n=c.domain)!=null?n:u};bn(Fv,{enable(t){var e;const n=this.internal,{axis:r,config:i}=n;if(!r){i.zoom_enabled=!1;return}/^(drag|wheel)$/.test(t)&&(i.zoom_type=t),i.zoom_enabled=!!t,n.zoom?t===!1&&n.bindZoomEvent(!1):n.initZoom(),t!==!1&&(i.zoom_type==="drag"&&!n.zoomBehaviour&&((e=n.initZoomBehaviour)==null||e.call(n)),n.bindZoomEvent()),n.updateAndRedraw()},max(t){const e=this.internal,{config:n,org:{xDomain:r}}=e;return(t===0||t)&&(n.zoom_x_max=br("max",[r[1],t])),n.zoom_x_max},min(t){const e=this.internal,{config:n,org:{xDomain:r}}=e;return(t===0||t)&&(n.zoom_x_min=br("min",[r[0],t])),n.zoom_x_min},range(t){const e=this.zoom;if(Ke(t)){const{min:n,max:r}=t;on(n)&&e.min(n),on(r)&&e.max(r)}return{min:e.min(),max:e.max()}}});var VC={zoom:Fv,unzoom(){var t;const e=this.internal,{config:n,$el:{canvas:r,eventRect:i,zoomResetBtn:o},scale:{zoom:s},state:l}=e,c=l.isCanvasMode?r:i;(s||l.isCanvasMode&&n.subchart_show&&l.domain)&&(n.subchart_show?l.isCanvasMode?(t=e.clearCanvasSubchartDomain)==null||t.call(e,!0,!1):e.brush.getSelection().call(e.brush.move,null):e.zoom.updateTransformScale(vr),e.updateZoom(!0),o==null||o.style("display","none"),c!=null&&c.node()&&fu(c.node())!==vr&&e.zoom.transform(c,vr),l.domain=void 0)}};function Hs(t){return t.state.isCanvasMode?t.$el.canvas:t.$el.eventRect}function Nv(t,e){if(!t.state.isCanvasMode)return e;const{margin:n}=t.state;return vr.translate(e.x+(e.k-1)*n.left,e.y+(e.k-1)*n.top).scale(e.k)}function $v(t,e){if(!t.state.isCanvasMode)return e;const{margin:n}=t.state;return vr.translate(e.x-(e.k-1)*n.left,e.y-(e.k-1)*n.top).scale(e.k)}function Bv(t,e,n){const r=er(e,n);if(t.state.isCanvasMode){const{margin:i}=t.state;r[0]-=i.left,r[1]-=i.top}return r}var jC={initZoom(){const t=this;t.scale.zoom=null,t.generateZoom(),t.config.zoom_type==="drag"&&t.initZoomBehaviour()},bindZoomEvent(t=!0){const e=this,{config:n}=e;n.zoom_enabled&&t?!n.subchart_show&&e.bindZoomOnEventRect():t===!1&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom(){const t=this,{config:e,org:n,scale:r}=t,i=WC().duration(0).on("start",t.onZoomStart.bind(t)).on("zoom",t.onZoom.bind(t)).on("end",t.onZoomEnd.bind(t));i.orgScaleExtent=()=>{const o=e.zoom_extent||[1,10];return[o[0],Math.max(t.getMaxDataCount()/o[1],o[1])]},i.updateScaleExtent=function(){const o=Ma(t.scale.x.orgDomain())/Ma(t.getZoomDomain()),s=this.orgScaleExtent();return this.scaleExtent([s[0]*o,s[1]*o]),this},i.updateTransformScale=(o,s)=>{var l,c;const u=e.axis_rotated,f=Nv(t,o);(l=n.xScale)==null||l.range(r.x.range());const d=f[u?"rescaleY":"rescaleX"](n.xScale||r.x);if(d.domain().some(S=>/(Invalid Date|NaN)/.test(S.toString())))return;const h=t.trimXDomain(d.domain()),m=e.zoom_rescale;if(d.domain(h,n.xDomain),s){const S=d(r.x.domain()[0]),E=u?f.x:S,C=u?S:f.y,w=$v(t,vr.translate(E,C).scale(o.k));(c=Hs(t))==null||c.property("__zoom",w)}r.zoom=t.getCustomizedXScale(d),t.axis.x.scale(r.zoom),m?(!n.xScale&&(n.xScale=r.x.copy()),r.x.domain(h)):n.xScale&&(r.x.domain(n.xScale.domain()),n.xScale=null)},i.getDomain=()=>{const o=r[r.zoom?"zoom":"subX"].domain();return t.axis.isCategorized()&&(o[1]-=2),o},t.zoom=i},onZoomStart(t){const e=this,{sourceEvent:n}=t;n&&(e.zoom.startEvent=n,e.state.zooming=!0,$e(e.config.zoom_onzoomstart,e.api,t))},onZoom(t){const e=this,{config:n,scale:r,state:i,org:o}=e,{sourceEvent:s}=t,l=(t==null?void 0:t.transform)===vr;if(!n.zoom_enabled||e.filterTargetsToShow(e.data.targets).length===0||!r.zoom&&(s==null?void 0:s.type.indexOf("touch"))>-1&&(s==null?void 0:s.touches.length)===1)return;t.sourceEvent&&(i.zooming=!0,i.domain=void 0);const c=(s==null?void 0:s.type)==="mousemove",u=(s==null?void 0:s.wheelDelta)<0,{transform:f}=t;!c&&u&&r.x.domain().every((S,E)=>S!==o.xDomain[E])&&r.x.domain(o.xDomain),e.zoom.updateTransformScale(f,n.zoom_type==="wheel"&&s);const d=n.transition_duration>0&&!n.subchart_show&&(i.dragging||l||!t.sourceEvent),h=s&&c&&n.zoom_type!=="wheel",m=()=>{var S;e.config&&(e.redraw({withTransition:d,withY:n.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e.state.cancelClick=c,!l&&$e(n.zoom_onzoom,e.api,(S=e.state.domain)!=null?S:e.zoom.getDomain()))};h?Eh(e.state,m):m()},onZoomEnd(t){var e,n;const r=this,{config:i,state:o}=r,s=r.zoom;if(!s)return;let{startEvent:l}=s,c=t==null?void 0:t.sourceEvent;const u=(t==null?void 0:t.transform)===vr;(l==null?void 0:l.type.indexOf("touch"))>-1&&(l=l.changedTouches[0],c=(e=c==null?void 0:c.changedTouches)==null?void 0:e[0]),!(i.zoom_type==="drag"&&c&&l.clientX===c.clientX&&l.clientY===c.clientY)&&(o.zooming=!1,!o.isCanvasMode&&r.redrawEventRect(),r.updateZoom(),!u&&(c||o.dragging)&&$e(i.zoom_onzoomend,r.api,(n=r.state.domain)!=null?n:r.zoom.getDomain()))},updateZoom(t){const e=this,{subX:n,x:r,zoom:i}=e.scale;if(i){const o=i.domain(),s=n.domain(),l=.015,c=e.config.axis_x_inverted?(o[0]>=s[0]||o[0]+l>=s[0])&&(s[1]>=o[1]||s[1]>=o[1]+l):(o[0]<=s[0]||o[0]-l<=s[0])&&(s[1]<=o[1]||s[1]<=o[1]-l);(t||c)&&(e.axis.x.scale(n),r.domain(n.orgDomain()),e.scale.zoom=null)}},updateCurrentZoomTransform(t,e){var n;const r=this,{config:i}=r,o=i.axis_rotated,s=[-t(e[0]),0],l=vr.scale(t.range()[1]/(t(e[1])-t(e[0]))).translate(...o?s.reverse():s);(n=Hs(r))==null||n.call(r.zoom.transform,$v(r,l))},bindZoomOnEventRect(){var t,e;const n=this,{config:r,$el:{svg:i}}=n,o=Hs(n),s=r.zoom_type==="drag"?n.zoomBehaviour:n.zoom;n.state.isCanvasMode&&((t=s==null?void 0:s.touchable)==null||t.call(s,()=>r.interaction_inputType_touch!==!1)),!n.state.isCanvasMode&&fe.GestureEvent&&/^((?!chrome|android|mobile).)*safari/i.test((e=fe.navigator)==null?void 0:e.userAgent)&&i.on("wheel",()=>{}),o==null||o.call(s).on("dblclick.zoom",null)},initZoomBehaviour(){const t=this,{config:e,state:n}=t,r=e.axis_rotated;let i=0,o=0,s,l;const c={axis:r?"y":"x",attr:r?"height":"width",index:r?1:0},u=f=>{const[d,h]=l!=null?l:[0,r?n.height:n.width];return Math.min(Math.max(f,d),h)};t.zoomBehaviour=Gh().touchable(()=>!n.isCanvasMode||e.interaction_inputType_touch!==!1).clickDistance(4).on("start",function(f){var d;l=t.scale.zoom?null:t.axis.getExtent(),n.event=f,t.setDragStatus(!0),t.unselectRect(),!n.isCanvasMode&&!s&&(s=t.$el.main.append("rect").attr("clip-path",n.clip.path).attr("class",yc.zoomBrush).attr("width",r?n.width:0).attr("height",r?0:n.height)),s==null||s.attr(r?"width":"height",r?n.width:n.height),i=u(Bv(t,f,this)[c.index]),o=i,n.isCanvasMode?(d=t.renderCanvasZoomBrush)==null||d.call(t,i,o):s.attr(c.axis,i).attr(c.attr,0),t.onZoomStart(f)}).on("drag",function(f){var d;o=u(Bv(t,f,this)[c.index]),n.isCanvasMode?(d=t.renderCanvasZoomBrush)==null||d.call(t,i,o):s.attr(c.axis,Math.min(i,o)).attr(c.attr,Math.abs(o-i))}).on("end",f=>{var d;const h=t.scale.zoom||t.scale.x;n.event=f,o=u(o),n.isCanvasMode?(d=t.clearCanvasZoomBrush)==null||d.call(t):s.attr(c.axis,0).attr(c.attr,0),i>o&&([i,o]=[o,i]),i<0&&(o+=Math.abs(i),i=0),i!==o&&t.api.zoom([i,o].map(m=>h.invert(m))),t.setDragStatus(!1)})},setZoomResetButton(){const t=this,{config:e,$el:n}=t,r=e.zoom_resetButton;r&&e.zoom_type==="drag"&&(n.zoomResetBtn?n.zoomResetBtn.style("display",null):n.zoomResetBtn=t.$el.chart.append("div").classed(Ue.button,!0).append("span").on("click",function(){ue(r.onclick)&&r.onclick.bind(t.api)(this),t.api.unzoom()}).classed(yc.buttonZoomReset,!0).text(r.text||"Reset Zoom"))},getZoomTransform(){const t=this,e=Hs(t),n=e==null?void 0:e.node();return n?Nv(t,fu(n)):{k:1}}},HC={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0};let zv=()=>(bn(Ir.prototype,jC),bn(Jn.prototype,VC),Ua.setOptions([HC]),(zv=()=>!0)());function Uv(t){var e;t.state.canvasShape=null,(e=t.renderCanvasFrame)==null||e.call(t,void 0,null,!1)}function kv(t,e=!1){const n=this.internal,{config:r}=n,i=r.transition_duration&&ro();return t?(r.regions=e?r.regions.concat(t):t,n.state.isCanvasMode?(Uv(n),r.regions):(n.updateRegion(),n.redrawRegion(i),r.regions)):r.regions}const Gv=function(t){return kv.bind(this)(t)};bn(Gv,{add:function(t){return kv.bind(this)(t,!0)},remove:function(t){const e=this.internal,{config:n,$T:r}=e,i=t||{},o=fa(i,"classes",[no.region]);let s=n.regions;if(e.state.isCanvasMode)return Object.keys(i).length?(s=s.filter(c=>{let u=!1;return c.class?(c.class.split(" ").forEach(f=>{o.indexOf(f)>=0&&(u=!0)}),!u):!0}),n.regions=s):n.regions=[],Uv(e),n.regions;const l=e.$el.main.select(`.${no.regions}`).selectAll(o.map(c=>`.${c}`));return r(l).style("opacity","0").remove(),Object.keys(i).length?(s=s.filter(c=>{let u=!1;return c.class?(c.class.split(" ").forEach(f=>{o.indexOf(f)>=0&&(u=!0)}),!u):!0}),n.regions=s):n.regions=[],s}});var YC={regions:Gv},KC={initRegion(){const t=this,{$el:e}=t;e.region.main=e.main.insert("g",":first-child").attr("clip-path",t.state.clip.path).attr("class",no.regions)},updateRegion(){const t=this,{config:e,$el:{region:n},$T:r}=t;n.main||t.initRegion(),n.main.style("visibility",t.hasArcType()?"hidden":null);const i=n.main.selectAll(`.${no.region}`).data(e.regions);r(i.exit()).style("opacity","0").remove();const o=i.enter().append("g");o.append("rect").style("fill-opacity","0"),n.list=o.merge(i).attr("class",t.classRegion.bind(t)),n.list.each(function(s){var l;Ut(this).select("text").empty()&&((l=s.label)!=null&&l.text)&&Ut(this).append("text").style("opacity","0")})},redrawRegion(t){const e=this,{$el:{region:n},$T:r}=e,i=e.regionX.bind(e),o=e.regionY.bind(e),s=["width","height"];let l=n.list.select("rect"),c=n.list.selectAll("text");return l=r(l,t).attr("x",i).attr("y",o).attr("width",e.regionWidth.bind(e)).attr("height",e.regionHeight.bind(e)),c=r(c,t).text(u=>{var f;return(f=u.label)==null?void 0:f.text}).attr("transform",({label:u})=>u.rotated?" rotate(-90)":null).attr("transform",function(u){var f;const{x:d=0,y:h=0,center:m=!1,rotated:S=!1}=(f=u.label)!=null?f:{},E=this.previousElementSibling,C={x:0,y:0};return Ye(m)&&["x","y"].forEach((w,N)=>{m.indexOf(w)>-1&&(C[w]=(+E.getAttribute(s[N])-cn(this)[s[N]])/2)}),`translate(${i(u)+C.x+d}, ${o(u)+C.y+h})${S?" rotate(-90)":""}`}).attr("text-anchor",({label:u})=>u!=null&&u.rotated?"end":null).attr("dy","1em").style("fill",({label:u})=>{var f;return(f=u==null?void 0:u.color)!=null?f:null}),[l.style("fill-opacity",u=>Xe(u.opacity)?u.opacity:null).on("end",function(){Ut(this.parentNode).selectAll("rect:not([x])").remove()}),c.style("opacity",null)]},regionX(t){return this.getRegionSize("x",t)},regionY(t){return this.getRegionSize("y",t)},regionWidth(t){return this.getRegionSize("width",t)},regionHeight(t){return this.getRegionSize("height",t)},getRegionSize(t,e){const n=this,{config:r,scale:i,state:o}=n,s=r.axis_rotated,l=/(x|y|y2)/.test(t),c=l?t==="x":t==="width",u=!l&&n[c?"regionX":"regionY"](e);let f=l?"start":"end",d=l?0:o[t],h;if(e.axis==="y"||e.axis==="y2"?(!l&&!c?f="start":l&&!c&&(f="end"),(c?s:!s)&&f in e&&(h=i[e.axis])):(c?!s:s)&&f in e&&(h=i.zoom||i.x),h){let m=0;d=e[f],n.axis.isTimeSeries(e.axis)?d=Kn.call(n,d):/(x|width)/.test(t)&&n.axis.isCategorized()&&isNaN(d)&&(d=r.axis_x_categories.indexOf(d),m=n.axis.x.tickOffset()*(f==="start"?-1:1)),d=h(d)+m}return l?d:d<u?0:d-u},isRegionOnX(t){return!t.axis||t.axis==="x"}};let Xv=()=>(bn(Ir.prototype,KC),Jn.prototype.regions=YC.regions,(Xv=()=>({}))());var xi={initArea(t){const e=this,{config:n}=e;t.insert("g",`.${n.area_front?Un.circles:$r.lines}`).attr("class",e.getClass("areas",!0))},updateAreaColor(t){const e=this;return Gg.call(e,t,"area_linearGradient",e.color)},updateArea(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{config:r,state:i,$el:o,$T:s}=n,l=e?o.subchart:o;r.area_linearGradient&&n.updateLinearGradient();const c=l.main.selectAll(`.${hs.areas}`).selectAll(`.${hs.area}`).data(n.lineData.bind(n));s(c.exit(),t).style("opacity","0").remove(),l.area=c.enter().append("path").attr("class",n.getClass("area",!0)).style("fill",n.updateAreaColor.bind(n)).style("opacity",function(){return i.orgAreaOpacity=Ut(this).style("opacity"),"0"}).merge(c),c.style("opacity",i.orgAreaOpacity),n.setRatioForGroupedData(l.area.data())},redrawArea(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{area:i}=n?this.$el.subchart:this.$el,{orgAreaOpacity:o}=r.state;return[r.$T(i,e,Pr()).attr("d",t).style("fill",r.updateAreaColor.bind(r)).style("opacity",s=>String(r.isAreaRangeType(s)?o/1.75:o))]},generateDrawArea(t,e){return Md(this,t,e)}},yi={area_above:!1,area_below:!1,area_front:!0,area_linearGradient:!1,area_zerobased:!0},hu={spline_interpolation_type:"cardinal"};function ZC(t){return qn(t)&&ue(t.create)&&ue(t.update)}function JC(t,e){var n;const r=this,i=(c,u)=>{const f=c.attributes;for(let d=0,h;h=f[d];d++)h=h.name,u.setAttribute(h,c.getAttribute(h))},s=new DOMParser().parseFromString(Yr(t),"image/svg+xml").documentElement,l=Ze.createElementNS(Jt.svg,s.nodeName.toLowerCase());if(l.id=e,l.style.fill="inherit",l.style.stroke="inherit",i(s,l),(n=s.childNodes)!=null&&n.length){const c=Ut(l);"innerHTML"in l?c.html(Yr(s.innerHTML)):La(s.childNodes).forEach(u=>{i(u,c.append(u.tagName).node())})}r.$el.defs.node().appendChild(l)}var Ti={hasValidPointType(t){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(t||this.config.point_type)},hasLegendDefsPoint(){var t;const{config:e}=this;return e.legend_show&&((t=e.point_pattern)==null?void 0:t.length)&&e.legend_usePoint},getDefsPointId(t){const{state:{datetimeId:e}}=this;return`${e}-point${t}`},getValidPointPattern(){const{config:t}=this,e=/^(circle|rect(angle)?)$/i.test(t.point_type)?t.point_type:"circle";return pn(t.point_pattern)?t.point_pattern:[e]},generatePoint(){const t=this,{$el:e,config:n}=t,r=[],i=t.getValidPointPattern();return function(o,s,...l){return function(c){var u,f,d,h;const m=t.getTargetSelectorSuffix(c.id||((u=c.data)==null?void 0:u.id)||c),S=Ut(this);r.indexOf(m)<0&&r.push(m);let E=i[r.indexOf(m)%i.length];if(t.hasValidPointType(E))E=t[E];else if(!ZC(E||n.point_type)){const C=t.getDefsPointId(m);if(e.defs.select(`#${C}`).size()<1&&JC.call(t,E,C),o==="create")return(f=t.custom)==null?void 0:f.create.bind(s)(S,C,...l);if(o==="update")return(d=t.custom)==null?void 0:d.update.bind(s)(S,...l)}return(h=E[o])==null?void 0:h.bind(s)(S,...l)}}}};function QC(t,e,n,r=!1){const i=t?[t,0]:n;for(let o=t||n.reduce((s,l)=>s+l);o<=e;)n.forEach(s=>{o+s<=e&&i.push(s),o+=s});return i.length%2!==0&&i.push(r?n[1]:0),{dash:i.join(" "),length:i.reduce((o,s)=>o+s,0)}}var _C={initLine(){Xg.call(this,{elKey:"line",className:$r.chartLines,cssRules:["pointer-events:none"]})},updateTargetsForLine(t){const e=this,{$el:{area:n,main:r}}=e,i=e.getClass("lines",!0),o=t.filter(l=>!(e.isScatterType(l)||e.isBubbleType(l))),s=eu.call(e,o,{type:"Line",elKey:"line",containerClass:$r.chartLines,itemClass:$r.chartLine,initFn:e.initLine});if(s.append("g").attr("class",i),e.hasTypeOf("Area")){const l=r.select(`.${$r.chartLines}`).selectAll(`.${$r.chartLine}`),c=(!n&&s.empty()?l:s).filter(e.isAreaType.bind(e));e.initArea(c)}e.updateTargetForCircle(o,s)},updateLine(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{format:{extraLineClasses:r},$el:i,$T:o}=n,s=e?i.subchart:i,l=s.main.selectAll(`.${$r.lines}`).selectAll(`.${$r.line}`).data(n.lineData.bind(n));o(l.exit(),t).style("opacity","0").remove(),s.line=l.enter().append("path").attr("class",c=>`${n.getClass("line",!0)(c)} ${r(c)||""}`).style("stroke",n.color).merge(l).style("opacity",n.initialOpacity.bind(n)).attr("transform",null)},redrawLine(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{$el:i,$T:o}=r,{line:s}=n?i.subchart:i;return[o(s,e,Pr()).attr("d",t).style("stroke",this.color).style("opacity",null)]},generateDrawLine(t,e){return Pd(this,t,e)},lineWithRegions(t,e,n,r){const i=this,{config:o}=i,s=o.axis_rotated,l=i.axis.isTimeSeries(),c="2 2",u=md(i,t,r),f=i.hasNullDataValue(t);let d,h,m,S;const E=s?et=>n(et.value):et=>e(et.x),C=s?et=>e(et.x):et=>n(et.value),w=et=>`M${et[0][0]},${et[0][1]}L${et[1][0]},${et[1][1]}`,N=l?(et,st,ct,dt)=>{const q=et.x.getTime(),ft=st.x-et.x,lt=new Date(q+ft*ct),pt=new Date(q+ft*(ct+dt)),Tt=s?[[n(h(ct)),e(lt)],[n(h(ct+m)),e(pt)]]:[[e(lt),n(h(ct))],[e(pt),n(h(ct+m))]];return w(Tt)}:(et,st,ct,dt)=>{const q=e(st.x,!s),ft=n(st.value,s),lt=ct+dt,pt=e(d(ct),!s),Tt=n(h(ct),s);let Rt=e(d(lt),!s),Ct=n(h(lt),s);Rt>q&&(Rt=q),et.value>st.value&&(s?Ct<ft:Ct>ft)&&(Ct=ft);const Kt=[[pt,Tt],[Rt,Ct]];return s&&Kt.forEach(re=>re.reverse()),w(Kt)},z={x:i.axis.getAxisType("x"),y:i.axis.getAxisType("y")};let $="";if(!t.length)return $;const G=i.$el.line.filter(({id:et})=>et===t[0].id),V=G.clone().style("display","none"),J=(et,st)=>et.attr("d",st).node().getTotalLength(),Q={dash:[],lastLength:0};let rt=!1;for(let et=0,st;st=t[et];et++){const ct=t[et-1],dt=ct&&Xe(ct.value);let q=i.isWithinRegions(st.x,u);if(Xe(st.value)){if(Tn(u)||!q||!dt)$+=`${et&&dt?"L":"M"}${E(st)},${C(st)}`;else if(dt)if(q=((q==null?void 0:q.dasharray)||c).split(" ").map(Number),d=da(z.x,ct.x,st.x),h=da(z.y,ct.value,st.value),f){const ft=e(st.x)-e(ct.x),lt=n(st.value)-n(ct.value),pt=Math.sqrt(ft*ft+lt*lt);m=q[0]/pt,S=m*q[1];for(let Tt=m;Tt<=1;Tt+=S)$+=N(ct,st,Tt,m),Tt+S>=1&&($+=N(ct,st,1,0))}else{let ft;if(rt=st.x===t[t.length-1].x,l){const Rt=+ct.x,Ct=new Date(Rt),Kt=new Date(Rt+(+st.x-Rt));ft=[[e(Ct),n(h(0))],[e(Kt),n(h(1))]]}else ft=[[e(d(0)),n(h(0))],[e(d(1)),n(h(1))]];s&&ft.forEach(Rt=>Rt.reverse());const lt=J(V,$),pt=J(V,$+=`L${ft[1].join(",")}`),Tt=QC(lt-Q.lastLength,pt-Q.lastLength,q,rt);Q.lastLength+=Tt.length,Q.dash.push(Tt.dash)}}}return Q.dash.length&&(!rt&&Q.dash.push(J(V,$)),G.attr("stroke-dasharray",Q.dash.join(" "))),V.remove(),$},isWithinRegions(t,e){return xd(t,e)},isWithinStep(t,e){return Math.abs(e-er(this.state.event,t)[1])<30},shouldDrawPointsForLine(t){const e=this.config.line_point;return e===!0||en(e)&&e.indexOf(t.id)!==-1}};const bi=()=>Pr(),Wv=new WeakMap;function Vv(t){const e=t.getAttribute("height"),n=t.getAttribute("width"),r=t.getAttribute("href")||t.getAttribute("xlink:href"),i=Wv.get(t);if(i&&i.attrHeight===e&&i.attrWidth===n&&i.href===r)return i;const{width:o,height:s}=ya(t),l={attrHeight:e,attrWidth:n,height:s,href:r,width:o};return Wv.set(t,l),l}var Ys={initialOpacityForCircle(t){const{config:e,state:{withoutFadeIn:n}}=this;let r=e.point_opacity;return Tn(r)&&(r=this.getBaseValue(t)!==null&&n[t.id]?this.opacityForCircle(t):"0"),r},opacityForCircle(t){var e;const{config:n}=this;let r=n.point_opacity;return Tn(r)&&(r=n.point_show&&!((e=this.isPointFocusOnly)!=null&&e.call(this))?null:"0",r=Xe(this.getBaseValue(t))?this.isBubbleType(t)||this.isScatterType(t)?"0.5":r:"0"),r},initCircle(){const t=this,{$el:{main:e}}=t;!t.point&&(t.point=t.generatePoint()),(t.hasType("bubble")||t.hasType("scatter"))&&e.select(`.${Ue.chart} > .${Un.chartCircles}`).empty()&&e.select(`.${Ue.chart}`).append("g").attr("class",Un.chartCircles)},updateTargetForCircle(t,e){const n=this,{config:r,data:i,$el:o}=n,s=r.interaction_enabled&&r.data_selection_enabled,l=s&&r.data_selection_isselectable,c=n.getClass("circles",!0);if(!r.point_show)return;n.initCircle();let u=t,f=e;if(!u){u=n.filterNullish(i.targets).filter(h=>this.isScatterType(h)||this.isBubbleType(h));const d=o.main.select(`.${Un.chartCircles}`).style("pointer-events","none").selectAll(`.${Un.circles}`).data(u);d.exit().remove(),f=d.enter()}s&&f.append("g").attr("class",d=>n.generateClass(sn.selectedCircles,d.id)),f.append("g").attr("class",c).call(d=>{n.setCssRule(!0,`.${Un.circles}`,["cursor:pointer"],l)(d),n.setCssRule(!0,` .${Un.circle}`,["fill","stroke"],n.color)(d)}).style("opacity",function(){return Ut(this.parentNode).classed(Un.chartCircles)?"0":null}),s&&u.forEach(d=>{o.main.selectAll(`.${sn.selectedCircles}${n.getTargetSelectorSuffix(d.id)}`).selectAll(`${sn.selectedCircle}`).each(h=>{h.value=d.values[h.index].value})})},updateCircle(t=!1){const e=this,{config:n,state:r,$el:i}=e,o=e.isPointFocusOnly(),s=t?i.subchart:i;if(n.point_show&&!r.toggling){n.point_radialGradient&&e.updateLinearGradient();const l=s.main.selectAll(`.${Un.circles}`).selectAll(`.${Un.circle}`).data(d=>{const h=e.isLineType(d)&&e.shouldDrawPointsForLine(d)||e.isBubbleType(d)||e.isRadarType(d)||e.isScatterType(d)?o?[d.values[0]]:d.values:[];return e.filterNullish(h)});l.exit().remove();const c=e.pointR.bind(e),u=e.generateUpdateCircleColor(),f=e.initialOpacityForCircle.bind(e);l.enter().filter(Boolean).append(e.point("create",this,c,u)),s.circle=s.main.selectAll(`.${Un.circles} .${Un.circle}`).style("stroke",e.getStylePropValue(e.color)).style("opacity",f)}},generateUpdateCircleColor(){const t=this,e=t.getStylePropValue(t.color);return n=>t.config.point_radialGradient?t.getGradienColortUrl(n.id):e?e(n):null},updateCircleColor(t){return this.generateUpdateCircleColor()(t)},redrawCircle(t,e,n,r,i=!1){const o=this,{state:{rendered:s},$el:l,$T:c}=o,u=i?l.subchart:l,f=u.main.selectAll(`.${sn.selectedCircle}`);if(!o.config.point_show)return[];const d=o.isCirclePoint()?"c":"",h=Pr(),m=o.opacityForCircle.bind(o),S=o.generateUpdateCircleColor();if(o.isCirclePoint()){const w=u.circle;return o.hasType("bubble")&&w.attr("r",o.pointR.bind(o)),n?(r&&w.attr("cx",t),c(w.filter(function(){return!!this.getAttribute("cx")}),!0,`${h}-pos`).attr("cx",t).attr("cy",e).style("fill",S),w.filter(function(){return!this.getAttribute("cx")}).attr("cx",t).attr("cy",e).style("fill",S)):w.attr("cx",t).attr("cy",e).style("fill",S),[[c(w,n||!s,h).style("opacity",m)],c(f,n).attr("cx",t).attr("cy",e)]}const E=o.point("update",o,t,e,S,n,r,f),C=[];return u.circle.each(function(w){let N=E.bind(this)(w);N=c(N,n||!s,h).style("opacity",m),C.push(N)}),[C,c(f,n).attr(`${d}x`,t).attr(`${d}y`,e)]},showCircleFocus(t){const e=this,{state:{hasRadar:n,resizing:r,toggling:i,transiting:o},$el:s}=e;let{circle:l}=s;if(o===!1&&l&&e.isPointFocusOnly()){const c=(n?e.radarCircleX:e.circleX).bind(e),u=(n?e.radarCircleY:e.circleY).bind(e),f=i||Tn(t),d=e.point("update",e,c,u,e.getStylePropValue(e.color),r?!1:f);t&&(l=l.filter(function(h){var m;const S=(m=t.filter)==null?void 0:m.call(t,E=>E.id===h.id);return S.length?Ut(this).datum(S[0]):!1})),l.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each(function(h){const{id:m,index:S,value:E}=h;let C="hidden";Xe(E)&&(d.bind(this)(h),e.expandCircles(S,m),C=""),this.style.visibility=C})}},hideCircleFocus(){const t=this,{$el:{circle:e}}=t;t.isPointFocusOnly()&&e&&(t.unexpandCircles(),e.style("visibility","hidden"))},expandCircles(t,e,n){const r=this,i=r.pointExpandedR.bind(r);n&&r.unexpandCircles();const o=r.getShapeByIndex("circle",t,e).classed(Ue.EXPANDED,!0),s=i(o)/r.config.point_r,l=1-s;r.isCirclePoint()?o.attr("r",i):o.each(function(){const c=Ut(this);if(this.tagName==="circle")c.attr("r",i);else{const{width:u,height:f}=Vv(this),d=l*(+c.attr("x")+u/2),h=l*(+c.attr("y")+f/2);c.attr("transform",`translate(${d} ${h}) scale(${s})`)}})},unexpandCircles(t){const e=this,n=e.pointR.bind(e),r=e.getShapeByIndex("circle",t).filter(function(){return Ut(this).classed(Ue.EXPANDED)}).classed(Ue.EXPANDED,!1);if(r.attr("r",n),!e.isCirclePoint()){const i=n(r)/e.config.point_r;r.attr("transform",i!==1?`scale(${i})`:null)}},isWithinCircle(t,e){const{state:n}=this,r=er(n.event,t),i=Ut(t),o=this.isCirclePoint(t)?"c":"",s=this.getPointSensitivity(i==null?void 0:i.datum());let l=+i.attr(`${o}x`),c=+i.attr(`${o}y`);if(!(l||c)&&t.nodeType===1){const{x:d,y:h}=cn(t);l=d,c=h}const u=l-r[0],f=c-r[1];return Math.sqrt(u*u+f*f)<(e||s)},updatePointClass(t){const e=this,{circle:n}=e.$el;let r=!1;return(Ke(t)||n)&&(r=t===!0?n.each(function(i){let o=e.getClass("circle",!0)(i);this.getAttribute("class").indexOf(Ue.EXPANDED)>-1&&(o+=` ${Ue.EXPANDED}`),this.setAttribute("class",o)}):e.getClass("circle",!0)(t)),r},custom:{create(t,e,n){return t.append("use").attr("xlink:href",`#${e}`).attr("class",this.updatePointClass.bind(this)).style("fill",n).node()},update(t,e,n,r,i,o,s){const l=this,{width:c,height:u}=Vv(t.node()),f=m=>Xe(m.value)?e(m)-c/2:0,d=m=>Xe(m.value)?n(m)-u/2:0;let h=t;return i&&(o&&h.attr("x",f),h=l.$T(h,i,bi()),s&&l.$T(s,i,bi())),h.attr("x",f).attr("y",d).style("fill",r)}},circle:{create(t,e,n){return t.append("circle").attr("class",this.updatePointClass.bind(this)).attr("r",e).style("fill",n).node()},update(t,e,n,r,i,o,s){const l=this;let c=t;return l.hasType("bubble")&&c.attr("r",l.pointR.bind(l)),i&&(o&&c.attr("cx",e),c.attr("cx")&&(c=l.$T(c,i,bi())),s&&l.$T(s,i,bi())),c.attr("cx",e).attr("cy",n).style("fill",r)}},rectangle:{create(t,e,n){const r=i=>e(i)*2;return t.append("rect").attr("class",this.updatePointClass.bind(this)).attr("width",r).attr("height",r).style("fill",n).node()},update(t,e,n,r,i,o,s){const l=this,c=l.config.point_r,u=h=>e(h)-c,f=h=>n(h)-c;let d=t;return i&&(o&&d.attr("x",u),d=l.$T(d,i,bi()),s&&l.$T(s,i,bi())),d.attr("x",u).attr("y",f).style("fill",r)}}},Wa={point_show:!0,point_r:2.5,point_radialGradient:!1,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_focus_only:!1,point_opacity:void 0,point_pattern:[],point_select_r:void 0,point_type:"circle"},qC={line_connectNull:!1,line_step_type:"step",line_step_tooltipMatch:!1,line_zerobased:!1,line_classes:void 0,line_point:!0};function jv(t,e,n){const{config:r}=t,i=(o,s)=>{const l=le(s)?s:s===!1?void 0:null;l!==null&&(r[`axis_${o}_${e}`]=l)};on(n)&&(qn(n)?Object.keys(n).forEach(o=>{i(o,n[o])}):(le(n)||n===!1)&&["y","y2"].forEach(o=>{i(o,n)}),t.state.dirty.data=!0,t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function Hv(t,e){const{config:n}=t;return{x:n[`axis_x_${e}`],y:n[`axis_y_${e}`],y2:n[`axis_y2_${e}`]}}var t2={axis:{labels:function(t){var e;const n=this.internal;let r;return t&&(Object.keys(t).forEach(i=>{n.axis.setLabelText(i,t[i])}),n.state.isCanvasMode?(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1):n.axis.updateLabels()),["x","y","y2"].forEach(i=>{const o=n.axis.getLabelText(i);o&&(!r&&(r={}),r[i]=o)}),r},min:function(t){const e=this.internal;return Xe(t)||t===!1?jv(e,"min",t):Hv(e,"min")},max:function(t){const e=this.internal;return Xe(t)||t===!1?jv(e,"max",t):Hv(e,"max")},range:function(t){const{axis:e}=this;if(arguments.length){const{min:n,max:r}=t;on(r)&&e.max(r),on(n)&&e.min(n)}else return{max:e.max(),min:e.min()}}}},e2={groups(t){const e=this.internal,{config:n}=e;return Tn(t)||(n.data_groups=t,e.state.dirty.data=!0,e.redraw()),n.data_groups}},n2={x(t){const e=this.internal,{axis:n,data:r}=e,i=n.isCustomX()&&n.isCategorized();return en(t)&&(i?this.categories(t):(e.updateTargetX(r.targets,t),e.state.dirty.data=!0,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),i?this.categories():r.xs},xs(t){const e=this.internal;return Ke(t)&&(e.updateTargetXs(e.data.targets,t),e.state.dirty.data=!0,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},r2=Object.defineProperty,a2=(t,e,n)=>e in t?r2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ks=(t,e,n)=>a2(t,typeof e!="symbol"?e+"":e,n);class i2{constructor(e){Ks(this,"owner"),Ks(this,"config"),Ks(this,"scale"),Ks(this,"charSize",{});const n=da(),{config:r,params:i}=e;this.owner=e,this.config=r,this.scale=n,(r.noTransition||!i.config.transition_duration)&&(r.withoutTransition=!0),r.range=this.scaleExtent((i.orgXScale||n).range())}getSizeFor1Char(e,n,r=!0){const i={w:5.5,h:11.5};return this.charSize[e]&&r?this.charSize[e]:(!n.empty()&&n.text("0").call(o=>{try{const{width:s,height:l}=ya(o.node(),!0);s&&l&&(i.w=s,i.h=l)}finally{o.text("")}}),this.charSize[e]=i,i)}getTickTransformSetter(e){const{config:n}=this,r=e==="x"?i=>`translate(${i+n.tickOffset},0)`:i=>`translate(0,${i})`;return(i,o)=>{i.attr("transform",s=>{const l=o(s);return Xe(s)?r(l):null})}}scaleExtent(e){const n=e[0],r=e[e.length-1];return n<r?[n,r]:[r,n]}generateTicks(e,n){const{tickStepSize:r}=this.owner.params,[i,o]=e.domain();let s=[];if(n&&r){let l=Math.round(i);for(;l<=o;)s.push(l),l+=r}else if(e.ticks){const{tickArguments:l}=this.config;if(e.type==="log"&&!l){const c=da("_log").domain([i>0?i:1,o]).range(e.range());s=c.ticks();for(let u=o.toFixed().length;s.length>15;u--)s=c.ticks(u);s.splice(0,1,i),s.splice(s.length-1,1,o)}else s=e.ticks(...this.config.tickArguments||[])}return s}copyScale(){const e=this.scale.copy();return e.domain().length||e.domain(this.scale.domain()),e.type=this.scale.type,e}textFormatted(e){const n=this.config.tickFormat,r=/\d+\.\d+0{5,}\d$/.test(e)?+String(e).replace(/0+\d$/,""):e,i=n?n(r):r;return on(i)?i:""}transitionise(e){const{config:n}=this;let r=e;if(n.withoutTransition)r=e.interrupt();else if(n.transition||!this.owner.params.noTransition)try{r=e.transition(n.transition)}catch(i){}return r}}var o2=Object.defineProperty,s2=(t,e,n)=>e in t?o2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,po=(t,e,n)=>s2(t,typeof e!="symbol"?e+"":e,n);function Zs(t){return t==="subX"?"x":t==="subY"?"y":t==="subY2"?"y2":t}function l2(t){const e=Zs(t);return/^sub/.test(t)?`subchart_axis_${e}`:`axis_${e}`}class Yv{constructor(e={}){po(this,"helper"),po(this,"config"),po(this,"params"),po(this,"g"),po(this,"generatedTicks",[]);const n={innerTickSize:Dt,outerTickSize:e.outerTick?Dt:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:xr,tickOffset:0,tickPadding:fn,tickValues:null,transition:null,noTransition:e.noTransition};n.tickLength=Math.max(n.innerTickSize,0)+n.tickPadding,this.config=n,this.params=e,this.helper=new i2(this)}canReuseTickTextOnResize(e){const{config:n,params:r}=this,{config:i,id:o,owner:s}=r,l=/^(x|subX)$/.test(o),c=Zs(o),u=/^sub/.test(o)?i[`subchart_axis_${c}_tick_format`]||i[`axis_${c}_tick_format`]:i[`axis_${c}_tick_format`],f=r.tickMultiline&&r.isCategory&&!e&&!(r.tickWidth>0);return!!(s.state.resizing&&!s.state.flowing&&!ue(i.axis_evalTextSize)&&!u&&!r.tickTitle&&!(l&&i.axis_x_tick_autorotate)&&!f&&n.withoutTransition)}canReuseTickNodesOnResize(e,n,r,i){if(i.tick||!i.text||!this.canReuseTickTextOnResize(r)||e.size()!==n.length)return!1;const o=e.nodes();for(let s=0;s<n.length;s++){const l=o[s].__data__,c=n[s];if(l instanceof Date||c instanceof Date){if(+l!=+c)return!1}else if(l!==c)return!1}return!0}create(e){const n=this,{config:r,helper:i,params:o}=n,{scale:s}=i,{orient:l}=r,c=this.splitTickText.bind(n),u=/^(left|right)$/.test(l),f=/^(top|bottom)$/.test(l),d=i.getTickTransformSetter(f?"x":"y"),h=d===i.axisX?"y":"x",m=/^(top|left)$/.test(l)?-1:1,S=o.tickTextRotate;this.config.range=s.rangeExtent?s.rangeExtent():i.scaleExtent((o.orgXScale||s).range());const{innerTickSize:E,tickLength:C,range:w}=r,N=o.id,z=Zs(N),{isSubAxes:$}=o,G=!$&&z&&/^(x|y|y2)$/.test(z)?o.config[`axis_${z}_tick_text_position`]:{x:0,y:0},V=l2(N),J=o.config[`${V}_show`],Q=$?{tick:!0,text:!0}:{tick:J?o.config[`${V}_tick_show`]:!1,text:J?o.config[`${V}_tick_text_show`]:!1},rt=o.config.axis_evalTextSize;let et;e.each(function(){const st=Ut(this);let ct=this.__chart__||s,dt=i.copyScale();et=st,this.__chart__=dt,r.tickOffset=o.isCategory?(dt(1)-dt(0))/2:0;const q=st.selectAll(".domain").data([0]);if(q.enter().append("path").attr("class","domain").merge(q).attr("d",()=>{const ft=r.outerTickSize*m;return f?`M${w[0]},${ft}V0H${w[1]}V${ft}`:`M${ft},${w[0]}H0V${w[1]}H${ft}`}),Q.tick||Q.text){const ft=r.tickValues||i.generateTicks(dt,u||o.config.axis_rotated);n.generatedTicks=ft;let lt=st.selectAll(".tick");if(n.canReuseTickNodesOnResize(lt,ft,u||o.config.axis_rotated,Q))d(lt,dt);else{lt=lt.data(ft,dt);const Tt=lt.enter().insert("g",".domain").attr("class","tick"),Rt=lt.exit().remove();lt=Tt.merge(lt),Q.tick&&Tt.append("line"),Q.text&&Tt.append("text");const Ct=!Tt.empty()||!Rt.empty(),Kt=Q.text&&!Ct&&n.canReuseTickTextOnResize(u||o.config.axis_rotated);let re={w:0,h:0},Ee=lt.selectAll("text.__bb-empty");if(Q.text&&!Kt){const be=lt.select("text"),Ne=[];Ee=be,ue(rt)&&(re=rt.bind(n.params.owner.api)(be.node(),N),this.classList.contains(Ue.dummy)&&(this.sizeFor1Char=re)),(!re||re.w===0||re.h===0)&&(re=n.helper.getSizeFor1Char(l,be,!!rt));let ye=be.selectAll("tspan").data((De,Zt)=>{let ve;if(o.tickMultiline)ve=c(De,dt,ft,u,re.w);else{const xe=i.textFormatted(De);ve=en(xe)?xe.concat():[xe]}return Ne[Zt]=ve.length,ve.map(xe=>({index:Zt,splitted:xe}))});ye.exit().remove(),ye=ye.enter().append("tspan").merge(ye).text(De=>De.splitted),ye.attr("x",f?0:C*m).attr("dx",(()=>{let De=0;return/(top|bottom)/.test(l)&&S&&(De=8*Math.sin(Math.PI*(S/180))*(l==="top"?-1:1)),De+(G.x||0)})()).attr("dy",(De,Zt)=>{const ve=".71em";let xe=0;return l!=="top"&&(xe=re.h,Zt===0&&(xe=u?-((Ne[De.index]-1)*(re.h/2)-3):G.y===0?ve:0)),le(xe)&&G.y?xe+G.y:xe||ve})}const Ce=lt.select("line");if(Tt.select("line").attr(`${h}2`,E*m),Tt.select("text").attr(h,C*m),n.setTickLineTextPosition(Ce,Ee,re),o.tickTitle){const be=Ee.select("title"),Ne=o.tickTitle;(be.empty()?Ee.append("title"):be).text(ye=>Ne[Number(ye)])}if(dt.bandwidth){const be=dt,Ne=be.bandwidth()/2;ct=ye=>be(ye)+Ne,dt=ct}else ct.bandwidth?ct=dt:d(Rt,dt);lt=o.owner.state.flowing?i.transitionise(lt):o.owner.$T(lt),d(Tt,ct),d(lt.style("opacity",null),dt)}}}),this.g=et}getGeneratedTicks(e){var n;const r=((n=this.generatedTicks)==null?void 0:n.length)-1;let i=this.generatedTicks;if(r>e){const o=Math.round(r/e+.1);i=this.generatedTicks.map((s,l)=>l%o===0?s:null).filter(s=>s!==null).splice(0,e)}return i}getTickXY(){const{config:e}=this,n={x:0,y:0};return this.params.isCategory&&(n.x=e.tickCentered?0:e.tickOffset,n.y=e.tickCentered?e.tickOffset:0),n}getTickSize(e){const{scale:n}=this.helper,{config:r}=this,{innerTickSize:i,range:o}=r,s=n(e)+(r.tickCentered?0:r.tickOffset);return o[0]<s&&s<o[1]?i:0}setTickLineTextPosition(e,n,r){const i=this.getTickXY(),{innerTickSize:o,orient:s,tickLength:l,tickOffset:c}=this.config,u=this.params.id,f=this.params.tickTextRotate,d=6,h=r.h/2-d,m=z=>{const $=["start","end"];return s==="top"&&$.reverse(),z?$[z>0?0:1]:"middle"},S=z=>z?`rotate(${z})`:null,E=z=>{const $=z/(s==="bottom"?15:23);return z?11.5-2.5*$*(z>0?1:-1):l},{config:{axis_rotated:C,axis_x_tick_text_inner:w}}=this.params.owner,N=this.params.config[`axis_${Zs(u)}_tick_inner`];switch(s){case"bottom":e.attr("x1",i.x).attr("x2",i.x).attr("y2",z=>this.getTickSize.bind(this)(z)*(N?-1:1)),n.attr("x",0).attr("y",E(f)).style("text-anchor",(z,$,{length:G})=>!C&&$===0&&(w===!0||w.first)?"start":!C&&$===G-1&&(w===!0||w.last)?"end":m(f)).attr("transform",S(f));break;case"top":e.attr("x2",0).attr("y2",N?o:-o),n.attr("x",0).attr("y",-(E(f)+h+d)).style("text-anchor",m(f)).attr("transform",S(f));break;case"left":e.attr("x2",N?o:-o).attr("y1",i.y).attr("y2",i.y),n.attr("x",-l).attr("y",c+(C?h/4:h)).style("text-anchor","end");break;case"right":e.attr("x2",N?-o:o).attr("y2",0),n.attr("x",l).attr("y",h).style("text-anchor","start")}}splitTickText(e,n,r,i,o){const{params:s}=this,l=this.helper.textFormatted(e),c=Ye(l)&&l.indexOf(`
58
+ </foreignObject></svg>`;return`data:image/svg+xml;base64,${aC(d)}`}function sC(t,e){const{top:n,left:r}=e,{x:i,y:s}=ha(t,!0),{a:o,b:l,c,d:u,e:f,f:d}=t.getScreenCTM(),{width:h,height:m}=ln(t,!0);return{x:o*i+c*s+f-r,y:l*i+u*s+d-n+(m-Math.round(m/4)),width:h,height:m}}function oC(t){const{left:e,top:n}=ln(t),r=s=>s.textContent||s.childElementCount,i=[];return Oa(t.querySelectorAll("text")).filter(r).forEach(s=>{const o=l=>{const{fill:c,fontFamily:u,fontSize:f,textAnchor:d,transform:h}=se.getComputedStyle(l),{x:m,y:S,width:E,height:C}=sC(l,{left:e,top:n});return{[l.textContent]:{x:m,y:S,width:E,height:C,fill:c,fontFamily:u,fontSize:f,textAnchor:d,transform:h}}};s.childElementCount>1?Oa(s.querySelectorAll("tspan")).filter(r).forEach(l=>{i.push(o(l))}):i.push(o(s))}),i}function lC(t,e){e.forEach(n=>{Object.keys(n).forEach(r=>{const{x:i,y:s,width:o,height:l,fill:c,fontFamily:u,fontSize:f,transform:d}=n[r];if(t.save(),t.font=`${f} ${u}`,t.fillStyle=c,d==="none")t.fillText(r,i,s);else{const h=d.replace(/(matrix|\(|\))/g,"").split(",");h.splice(4).every(m=>+m==0)?(h.push(i+o-o/4),h.push(s-l+l/3)):(h.push(i),h.push(s)),t.transform(...h),t.fillText(r,0,0)}t.restore()})})}function cC(t,e,n){const{width:r,height:i}=e||n,s=Ye.createElement("canvas"),o=s.getContext("2d");if(s.width=r,s.height=i,o){let c=0,u=r,f=i;if((e==null?void 0:e.preserveAspectRatio)!==!1){const d=Math.min(r/n.width,i/n.height);u=n.width*d,f=n.height*d,c=(i-f)/2}o.drawImage(t,0,0,t.width,t.height,0,c,u,f)}return s.toDataURL(e.mimeType)}var uC={export(t,e){var n;const r=this.internal,{state:i,$el:{chart:s,svg:o}}=r,l=(n=r.canvasEngine)==null?void 0:n.canvas,c=i.isCanvasMode&&l?ln(l,!0):null,{width:u,height:f}=c&&c.width&&c.height?{width:c.width,height:c.height}:i.current,d=Xr(Object.create(null),{width:u,height:f,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t);if(i.isCanvasMode&&l){const S=cC(l,d,{width:u,height:f});return e==null||e.bind(this)(S),S}const h=iC(s.node(),d,{width:u,height:f}),m=d.preserveFontStyle?oC(o.node()):[];if(e&&ie(e)){const S=new Image;S.crossOrigin="Anonymous",S.onload=()=>{const E=Ye.createElement("canvas"),C=E.getContext("2d");E.width=d.width||u,E.height=d.height||f,C.drawImage(S,0,0),m.length&&(lC(C,m),m.length=0),e.bind(this)(E.toDataURL(d.mimeType))},S.src=h}return h}};let mg=()=>(jn.prototype.export=uC.export,(mg=()=>({}))());var fC={flow(t){const e=this.internal;let n;(t.json||t.rows||t.columns)&&e.convertData(t,i=>{n=i,r()});function r(){var i,s,o;let l,c=0,u=0,f,d;if(e.state.redrawing||!n||!os())return;(i=e.flushCanvasFlow)==null||i.call(e);const h=[],m=e.getMaxDataCount(),S=e.convertDataToTargets(n,!0),E=e.axis.isTimeSeries();e.data.targets.forEach($=>{let z=!1;for(let B=0;B<S.length;B++)if($.id===S[B].id){z=!0,$.values[$.values.length-1]&&(u=$.values[$.values.length-1].index+1);const W=S[B].values;c=W.length;for(let H=0;H<c;H++)W[H].index=u+H,E||(W[H].x=u+H),$.values.push(W[H]);S.splice(B,1);break}!z&&h.push($.id)}),e.data.targets.forEach($=>{for(let z=0;z<h.length;z++)if($.id===h[z]){if(!$.values[$.values.length-1])continue;u=$.values[$.values.length-1].index+1;for(let B=0;B<c;B++)$.values.push({id:$.id,index:u+B,x:E?e.getOtherTargetX(u+B):u+B,value:null})}}),e.data.targets.length&&S.forEach($=>{const z=e.data.targets[0].values[0].index,B=$.values,W=B.length,H=Math.max(u-z,0);if(H){B.length=W+H;for(let _=W-1;_>=0;_--)B[_+H]=B[_];for(let _=0;_<H;_++){const q=z+_;B[_]={id:$.id,index:q,x:E?e.getOtherTargetX(q):q,value:null}}}for(let _=H;_<B.length;_++){const q=B[_];q.index+=u,E||(q.x+=u)}});for(let $=0;$<S.length;$++)e.data.targets.push(S[$]);const C=e.data.targets[0],w=C.values[0];if(sn(t.to)?(c=0,d=E?Wn.call(e,t.to):t.to,C.values.forEach($=>{$.x<d&&c++})):sn(t.length)&&(c=t.length),m?m===1&&E&&(f=(C.values[C.values.length-1].x-w.x)/2,l=[new Date(+w.x-f),new Date(+w.x+f)]):(E?f=C.values.length>1?C.values[C.values.length-1].x-w.x:w.x-e.getXDomain(e.data.targets)[0]:f=1,l=[w.x-f,w.x]),l&&e.updateXDomain(null,!0,!0,!1,l),e.state.isCanvasMode){const $=Ge(t.duration)?t.duration:e.config.transition_duration;if((s=e.animateCanvasFlow)==null?void 0:s.call(e,{done:t.done,duration:$,length:c,orgDataCount:m}))return;c&&m&&e.data.targets.forEach(B=>{B.values.splice(0,c)}),e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.redraw({withLegend:!0,withTransition:!1,withTrimXDomain:!1,withUpdateOrgXDomain:!0,withUpdateXAxis:!0,withUpdateXDomain:!0}),e.updateTypesElements(),(o=t.done)==null||o.call(e.api);return}e.updateTargets(e.data.targets),e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.redraw({flow:{index:w.index,length:c,duration:Ge(t.duration)?t.duration:e.config.transition_duration,done:t.done,orgDataCount:m},withLegend:!0,withTransition:m>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}},dC={generateFlow(t){const e=this,{data:n,state:r,$el:i}=e;return function(){var s;const o=t.flow.length;r.flowing=!0,n.targets.forEach(c=>{c.values.splice(0,o)}),r.dataGeneration++,e.updateXGrid&&e.updateXGrid(!0);const l={};["axis.x","grid.x","gridLines.x","region.list","text","bar","line","area","circle"].forEach(c=>{const u=c.split(".");let f=i[u[0]];f&&u.length>1&&(f=f[u[1]]),f!=null&&f.size()&&(l[c]=f)}),(s=e.hideGridFocus)==null||s.call(e),e.setFlowList(l,t)}},setFlowList(t,e){const n=this,{flow:r,targets:i}=e,{duration:s=e.duration,index:o,length:l,orgDataCount:c}=r,u=n.getFlowTransform(i,c,o,l),f=Mh();let d;f.add(Object.keys(t).map(h=>(d=t[h].transition().ease(m=>+m).duration(s),h==="axis.x"?d=d.call(m=>{n.axis.x.setTransition(m).create(m)}):h==="region.list"?d=d.filter(n.isRegionOnX).attr("transform",u):d=d.attr("transform",u),d))),d.call(f,()=>{n.cleanUpFlow(t,e)})},cleanUpFlow(t,e){const n=this,{config:r,state:i,$el:{svg:s}}=n,o=r.axis_rotated,{flow:l,shape:c,xv:u}=e,{cx:f,cy:d,xForText:h,yForText:m}=c.pos,{done:S=()=>{},length:E}=l;E&&(["circle","text","shape","eventRect"].forEach(C=>{const w=[];for(let $=0;$<E;$++)w.push(`.${Re[C]}-${$}`);s.selectAll(`.${Re[`${C}s`]}`).selectAll(w).remove()}),s.select(`.${Re.xgrid}`).remove()),Object.keys(t).forEach(C=>{const w=t[C];if(C!=="axis.x"&&w.attr("transform",null),C==="grid.x")w.attr(i.xgridAttr);else if(C==="gridLines.x")w.attr("x1",o?0:u).attr("x2",o?i.width:u),w.select("text").attr("x",o?i.width:0).attr("y",u);else if(/^(area|bar|line)$/.test(C))w.attr("d",c.type[C]);else if(C==="text")w.attr("x",h).attr("y",m).style("fill-opacity",n.opacityForText.bind(n));else if(C==="circle")if(n.isCirclePoint())w.attr("cx",f).attr("cy",d);else{const $=B=>f(B)-r.point_r,z=B=>d(B)-r.point_r;w.attr("x",$).attr("y",z)}else C==="region.list"&&w.select("rect").filter(n.isRegionOnX).attr("x",n.regionX.bind(n)).attr("width",n.regionWidth.bind(n))}),r.interaction_enabled&&n.redrawEventRect(),S.call(n.api),i.flowing=!1},getFlowTransform(t,e,n,r){const i=this,{data:s,scale:{x:o}}=i,l=s.targets[0].values;let c=i.getValueOnIndex(l,n),u=i.getValueOnIndex(l,n+r),f;const d=o.domain(),h=i.updateXDomain(t,!0,!0);e?e===1||(c==null?void 0:c.x)===(u==null?void 0:u.x)?f=o(d[0])-o(h[0]):f=i.axis.isTimeSeries()?o(d[0])-o(h[0]):o((c==null?void 0:c.x)||0)-o(u.x):l.length!==1?f=o(d[0])-o(h[0]):i.axis.isTimeSeries()?(c=i.getValueOnIndex(l,0),u=i.getValueOnIndex(l,l.length-1),f=o(c.x)-o(u.x)):f=wa(h)/2;const m=wa(d)/wa(h);return`translate(${f},0) scale(${m},1)`}};let xg=()=>(xn(br.prototype,dC),jn.prototype.flow=fC.flow,(xg=()=>({}))());function yg(t){return Array.isArray(t)?t:[t]}function Tg(t){var e;t.state.canvasShape=null,(e=t.renderCanvasFrame)==null||e.call(t,void 0,null,!1)}function hu(t,e){const n=this.internal,{config:r}=n,i=r.transition_duration&&os(),s=`grid_${e}_lines`;return t?(r[s]=yg(t),n.state.isCanvasMode?(Tg(n),r[s]):(n.updateGrid(),n.redrawGrid(i),r[s])):r[s]}function bg(t,e){const n=`grid_${e}_lines`;return hu.bind(this)(this.internal.config[n].concat(t?yg(t):[]),e)}function Sg(t,e){var n;const r=this.internal;if(r.state.isCanvasMode){const i=((n=r.getGridFilterToRemove)==null?void 0:n.call(r,t))||(()=>!0),s=`grid_${e?"x":"y"}_lines`;r.config[s]=r.config[s].filter(o=>!i(o)),Tg(r);return}r.removeGridLines(t,e)}const Ag=function(t){return hu.bind(this)(t,"x")};xn(Ag,{add(t){return bg.bind(this)(t,"x")},remove(t){return Sg.bind(this)(t,!0)}});const Eg=function(t){return hu.bind(this)(t,"y")};xn(Eg,{add(t){return bg.bind(this)(t,"y")},remove(t){return Sg.bind(this)(t,!1)}});var Cg={xgrids:Ag,ygrids:Eg};const hC=`line.${nn.xgridFocus}:not(.${nn.xgridFocusContinuous}), line.${nn.ygridFocus}`,vC=t=>Ge(t.position)||"end",gC=t=>t.position==="start"?4:t.position==="middle"?0:-4;function Ig(t){var e;const{state:n,$el:{main:r}}=t,i=n._gridFocusEl,s=r.node(),o=((e=i==null?void 0:i.nodes)==null?void 0:e.call(i))||[];return o.length&&o.every(l=>s==null?void 0:s.contains(l))?i:n._gridFocusEl=r.selectAll(hC)}function Rg(t){t.$el.main.select(`line.${nn.xgridFocusContinuous}`).style("visibility","hidden")}function wg(t,e,n){return r=>{let i=t?0:e;return r.position==="start"?i=t?-n:0:r.position==="middle"&&(i=(t?-n:e)/2),i}}function Og(t,e){e==="grid"&&t.each(function(){const n=Yt(this);["x1","x2","y1","y2"].forEach(r=>n.attr(r,+n.attr(r)))})}var pC={hasGrid(){const{config:t}=this;return["x","y"].some(e=>t[`grid_${e}_show`]||t[`grid_${e}_lines`].length)},initGrid(){const t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines(){const t=this,{config:e,state:{clip:n},$el:r}=t;(e.grid_x_lines.length||e.grid_y_lines.length)&&(r.gridLines.main=r.main.insert("g",`.${ze.chart}${e.grid_lines_front?" + *":""}`).attr("clip-path",n.pathGrid).attr("class",`${yn.grid} ${yn.gridLines}`),r.gridLines.main.append("g").attr("class",yn.xgridLines),r.gridLines.main.append("g").attr("class",yn.ygridLines),r.gridLines.x=Ev([]))},updateXGrid(t){const e=this,{config:n,scale:r,state:i,$el:{main:s,grid:o}}=e,l=n.axis_rotated,c=e.generateGridData(n.grid_x_type,r.x),u=e.axis.isCategorized()?e.axis.x.tickOffset():0,f=d=>(r.zoom||r.x)(d)+u*(l?-1:1);i.xgridAttr=l?{x1:0,x2:i.width,y1:f,y2:f}:{x1:f,x2:f,y1:0,y2:i.height},o.x=s.select(`.${yn.xgrids}`).selectAll(`.${yn.xgrid}`).data(c),o.x.exit().remove(),o.x=o.x.enter().append("line").attr("class",yn.xgrid).merge(o.x),t||o.x.each(function(){const d=Yt(this);Object.keys(i.xgridAttr).forEach(h=>{d.attr(h,i.xgridAttr[h])}),d.style("opacity",()=>+d.attr(l?"y1":"x1")===(l?i.height:0)?"0":null)})},updateYGrid(){const t=this,{axis:e,config:n,scale:r,state:i,$el:{grid:s,main:o}}=t,l=n.axis_rotated,c=f=>r.y(f),u=e.y.getGeneratedTicks(n.grid_y_ticks)||t.scale.y.ticks(n.grid_y_ticks);s.y=o.select(`.${yn.ygrids}`).selectAll(`.${yn.ygrid}`).data(u),s.y.exit().remove(),s.y=s.y.enter().append("line").attr("class",yn.ygrid).merge(s.y),s.y.attr("x1",l?c:0).attr("x2",l?c:i.width).attr("y1",l?0:c).attr("y2",l?i.height:c),Og(s.y,"grid")},updateGrid(){const t=this,{$el:{grid:e,gridLines:n}}=t;!n.main&&t.initGridLines(),e.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateGridLines("x"),t.updateGridLines("y")},updateGridLines(t){const e=this,{config:n,$el:{gridLines:r,main:i},$T:s}=e,o=n.axis_rotated,l=t==="x";n[`grid_${t}_show`]&&e[`update${t.toUpperCase()}Grid`]();let c=i.select(`.${yn[`${t}gridLines`]}`).selectAll(`.${yn[`${t}gridLine`]}`).data(n[`grid_${t}_lines`]);s(c.exit()).style("opacity","0").remove();const u=c.enter().append("g");u.append("line").style("opacity","0"),c=u.merge(c),c.each(function(f){const d=Yt(this);d.select("text").empty()&&f.text&&d.append("text").style("opacity","0")}),s(c.attr("class",f=>`${yn[`${t}gridLine`]} ${f.class||""}`.trim()).select("text").attr("text-anchor",vC).attr("transform",()=>l?o?null:"rotate(-90)":o?"rotate(-90)":null).attr("dx",gC).attr("dy",-5)).text(function(f){var d;return(d=f.text)!=null?d:this.remove()}),r[t]=c},redrawGrid(t){const e=this,{config:{axis_rotated:n},state:{width:r,height:i},$el:{gridLines:s},$T:o}=e,l=e.xv.bind(e),c=e.yv.bind(e);let u=s.x.select("line"),f=s.x.select("text"),d=s.y.select("line"),h=s.y.select("text");return u=o(u,t).attr("x1",n?0:l).attr("x2",n?r:l).attr("y1",n?l:0).attr("y2",n?l:i),f=o(f,t).attr("x",wg(!n,r,i)).attr("y",l),d=o(d,t).attr("x1",n?c:0).attr("x2",n?c:r).attr("y1",n?0:c).attr("y2",n?i:c),h=o(h,t).attr("x",wg(n,r,i)).attr("y",c),[u.style("opacity",null),f.style("opacity",null),d.style("opacity",null),h.style("opacity",null)]},initFocusGrid(){const t=this,{config:e,state:n,state:{clip:r},$el:i}=t;n._gridFocusEl=null;const s=e.grid_front,o=`.${s&&i.gridLines.main?yn.gridLines:ze.chart}${s?" + *":""}`,l=i.main.insert("g",o).attr("clip-path",r.pathGrid).attr("class",yn.grid);if(i.grid.main=l,e.grid_x_show&&l.append("g").attr("class",yn.xgrids),e.grid_y_show&&l.append("g").attr("class",yn.ygrids),e.axis_tooltip){const c=l.append("g").attr("class","bb-axis-tooltip");c.append("line").attr("class","bb-axis-tooltip-x"),c.append("line").attr("class","bb-axis-tooltip-y")}e.interaction_enabled&&e.grid_focus_show&&!e.axis_tooltip&&(l.append("g").attr("class",nn.xgridFocus).append("line").attr("class",nn.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&l.append("g").attr("class",nn.ygridFocus).append("line").attr("class",nn.ygridFocus),e.subchart_grid_focus_continuous&&e.subchart_grid_focus!==!1&&i.main.insert("g",o).attr("class",nn.xgridFocusContinuous).append("line").attr("class",`${nn.xgridFocus} ${nn.xgridFocusContinuous}`).style("visibility","hidden"))},showAxisGridFocus(){var t,e;const n=this,{config:r,format:i,state:{event:s,width:o,height:l}}=n,c=r.axis_rotated,[u,f]=Jn(s,(t=n.$el.eventRect)==null?void 0:t.node()),d={x:u,y:f};for(const[h,m]of Object.entries(n.$el.axisTooltip)){const S=h==="x"&&!c||h!=="x"&&c?"x":"y",E=d[S];let C=(e=n.scale[h])==null?void 0:e.invert(E);C&&(C=h==="x"&&n.axis.isTimeSeries()?i.xAxisTick(C):C==null?void 0:C.toFixed(2),m==null||m.attr(S,E).text(C))}n.$el.main.selectAll("line.bb-axis-tooltip-x, line.bb-axis-tooltip-y").style("visibility",null).each(function(h,m){const S=Yt(this);m===0?S.attr("x1",u).attr("x2",u).attr("y1",m?0:l).attr("y2",m?l:0):S.attr("x1",m?0:o).attr("x2",m?o:0).attr("y1",f).attr("y2",f)})},hideAxisGridFocus(){const t=this;t.$el.main.selectAll(`line.${Rn.axisTooltipX}, line.${Rn.axisTooltipY}`).style("visibility","hidden"),Object.values(t.$el.axisTooltip).forEach(e=>e==null?void 0:e.style("display","none"))},showGridFocus(t){var e;const n=this,{config:r,state:{width:i,height:s}}=n,o=r.axis_rotated,l=Ig(n),c=(t||[l.datum()]).filter(d=>d&&Ge(n.getBaseValue(d)));if(!r.tooltip_show||c.length===0||!r.axis_x_forceAsSingle&&n.hasType("bubble")||n.hasArcType())return;const u=r.grid_focus_edge&&!r.tooltip_grouped,f=n.xx.bind(n);l.style("visibility",null).data(c.concat(c)).each(function(d){const h=Yt(this),m={x:f(d),y:n.getYScaleById(d.id)(d.value)};let S;if(h.classed(nn.xgridFocus))S=o?[null,m.x,u?m.y:i,m.x]:[m.x,u?m.y:null,m.x,s];else{const E=n.axis.getId(d.id)==="y2";S=o?[m.y,u&&!E?m.x:null,m.y,u&&E?m.x:s]:[u&&E?m.x:null,m.y,u&&!E?m.x:i,m.y]}["x1","y1","x2","y2"].forEach((E,C)=>h.attr(E,S[C]))}),Og(l,"grid"),(e=n.showCircleFocus)==null||e.call(n,t)},hideGridFocus(t=!1){var e;const n=this,{state:{inputType:r,resizing:i}}=n;(t||r==="mouse"||!i)&&(Ig(n).style("visibility","hidden"),Rg(n),(e=n.hideCircleFocus)==null||e.call(n))},updateGridFocus(){var t;const e=this,{state:{inputType:n,width:r,height:i,resizing:s},$el:{grid:o}}=e,l=o.main.select(`line.${nn.xgridFocus}`);if(n==="touch")l.empty()?s&&((t=e.showCircleFocus)==null||t.call(e)):e.showGridFocus();else{const c=e.config.axis_rotated;l.attr("x1",c?0:-10).attr("x2",c?r:-10).attr("y1",c?-10:0).attr("y2",c?-10:i),Rg(e)}return!0},generateGridData(t,e){const n=this,r=n.$el.main.select(`.${Rn.axisX}`).selectAll(".tick").size();let i=[];if(t==="year"){const s=n.getXDomain(n.data.targets),[o,l]=s.map(c=>c.getFullYear());for(let c=o;c<=l;c++)i.push(new Date(`${c}-01-01 00:00:00`))}else i=e.ticks(Bt),i.length>r&&(i=i.filter(s=>String(s).indexOf(".")<0));return i},getGridFilterToRemove(t){return t?e=>{let n=!1;return(qe(t)?t.concat():[t]).forEach(r=>{("value"in r&&e.value===r.value||"class"in r&&e.class===r.class)&&(n=!0)}),n}:()=>!0},removeGridLines(t,e){const n=this,{config:r,$T:i}=n,s=n.getGridFilterToRemove(t),o=f=>!s(f),l=e?yn.xgridLines:yn.ygridLines,c=e?yn.xgridLine:yn.ygridLine;i(n.$el.main.select(`.${l}`).selectAll(`.${c}`).filter(s)).style("opacity","0").remove();const u=`grid_${e?"x":"y"}_lines`;r[u]=r[u].filter(o)}},mC={grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0};let Pg=()=>(xn(br.prototype,pC),jn.prototype.xgrids=Cg.xgrids,jn.prototype.ygrids=Cg.ygrids,$a.setOptions([mC]),(Pg=()=>({}))());function Mg(t,e,n,r){const i=this,{config:s,$el:{main:o}}=i,l=s.data_selection_grouped,c=s.data_selection_isselectable.bind(i.api),u=sn(e)?[].concat(e):null,f=t&&!s.data_selection_multiple;let d=!f;const h=(m,S,E)=>{i.unselectPoint(m,S,E),m.interrupt().remove()};i.getTargetsToShow().forEach(m=>{const{id:S}=m,E=l||!u||u.indexOf(S)>=0,C=o.select(`.${on.selectedCircles}${i.getTargetSelectorSuffix(S)}`);m.values.forEach(w=>{const{index:$}=w,z=!n||n.indexOf($)>=0,B=C.selectAll(`.${on.selectedCircle}-${$}`),W=!B.empty();t?E&&z&&c(w)&&(!W||f)?(d||(Mg.call(i,!1),d=!0),i.selectPoint(null,w,$)):(!f||d)&&sn(r)&&r&&W&&h(B,w,$):E&&z&&W&&h(B,w,$)})})}function vu(t=!1,e,n,r){var i;const s=this,{config:o,$el:{main:l}}=s,c=o.data_selection_grouped,u=o.data_selection_isselectable.bind(s.api),f=t&&!o.data_selection_multiple;let d=!f;if(o.data_selection_enabled){if(f&&(n=n!=null&&n.length?[n[0]]:[0],c||(e=(sn(e)?[].concat(e):s.getTargetsToShow().map(m=>m.id)).slice(0,1))),(i=s.isPointFocusOnly)!=null&&i.call(s)){Mg.call(s,t,e,n,r);return}l.selectAll(`.${Tn.shapes}`).selectAll(`.${Tn.shape}`).each(function(h){const m=Yt(this),{id:S,index:E}=h.data?h.data:h,C=c||!e||e.indexOf(S)>=0,w=!n||n.indexOf(E)>=0;if(m.classed(Mr.line)||m.classed(To.area))return;const $=s.getToggle(this,h).bind(s),z=m.classed(on.SELECTED);t?C&&w&&u(h)&&(!z||f)?(d||(vu.call(s,!1),d=!0),!m.classed(on.SELECTED)&&$(!0,m.classed(on.SELECTED,!0),h,E)):(!f||d)&&sn(r)&&r&&z&&$(!1,m.classed(on.SELECTED,!1),h,E):C&&w&&u(h)&&z&&$(!1,m.classed(on.SELECTED,!1),h,E)})}}var xC={selected(t){var e,n;const r=this.internal,i=[];return r.state.isCanvasMode?((e=r.getCanvasSelectedData)==null?void 0:e.call(r,t))||i:(n=r.isPointFocusOnly)!=null&&n.call(r)?(r.$el.main.selectAll(`.${on.selectedCircles+r.getTargetSelectorSuffix(t)}`).selectAll(`.${on.selectedCircle}`).each(s=>i.push(s)),i):(r.$el.main.selectAll(`.${Tn.shapes+r.getTargetSelectorSuffix(t)}`).selectAll(`.${Tn.shape}`).filter(function(){return Yt(this).classed(on.SELECTED)}).each(s=>i.push(s)),i)},select(t,e,n){var r;const i=this.internal;if(i.state.isCanvasMode){(r=i.setCanvasSelection)==null||r.call(i,!0,t,e,n);return}vu.bind(i)(!0,t,e,n)},unselect(t,e){var n;const r=this.internal;if(r.state.isCanvasMode){(n=r.setCanvasSelection)==null||n.call(r,!1,t,e);return}vu.bind(r)(!1,t,e)}},yC={drag(t){const e=this,{config:n,state:r,$el:{main:i}}=e,s=n.data_selection_grouped,o=n.interaction_enabled&&n.data_selection_isselectable;if(e.hasArcType()||!n.data_selection_enabled||n.zoom_enabled&&!e.zoom.altDomain||!n.data_selection_multiple)return;const[l,c]=r.dragStart||[0,0],[u,f]=t,d=Math.min(l,u),h=Math.max(l,u),m=s?r.margin.top:Math.min(c,f),S=s?r.height:Math.max(c,f),E=()=>{!e||!e.$el||!e.$el.main||(i.select(`.${Na.dragarea}`).attr("x",d).attr("y",m).attr("width",h-d).attr("height",S-m),i.selectAll(`.${Tn.shapes}`).selectAll(`.${Tn.shape}`).filter(C=>o==null?void 0:o.bind(e.api)(C)).each(function(C,w){const $=Yt(this),z=$.classed(on.SELECTED),B=$.classed(Na.INCLUDED);let W,H;if($.classed($n.circle)){const _=+$.attr("cx"),q=+$.attr("cy");H=e.togglePoint,W=d<_&&_<h&&m<q&&q<S}else if($.classed(rr.bar)){const{x:_,y:q,width:st,height:it}=wh(this);H=e.togglePath,W=!(h<_||_+st<d)&&!(S<q||q+it<m)}else return;W^B&&($.classed(Na.INCLUDED,!B),$.classed(on.SELECTED,!z),H.call(e,!z,$,C,w))}))};Ph(e.state,E)},dragstart(t){const e=this,{config:n,state:r,$el:{main:i}}=e;e.hasArcType()||!n.data_selection_enabled||(r.dragStart=t,i.select(`.${ze.chart}`).append("rect").attr("class",Na.dragarea).style("opacity","0.1"),e.setDragStatus(!0))},dragend(){const t=this,{config:e,$el:{main:n},$T:r}=t;t.hasArcType()||!e.data_selection_enabled||(r(n.select(`.${Na.dragarea}`)).style("opacity","0").remove(),n.selectAll(`.${Tn.shape}`).classed(Na.INCLUDED,!1),t.setDragStatus(!1))}},TC=Object.defineProperty,bC=Object.defineProperties,SC=Object.getOwnPropertyDescriptors,Lg=Object.getOwnPropertySymbols,AC=Object.prototype.hasOwnProperty,EC=Object.prototype.propertyIsEnumerable,Dg=(t,e,n)=>e in t?TC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,CC=(t,e)=>{for(var n in e||(e={}))AC.call(e,n)&&Dg(t,n,e[n]);if(Lg)for(var n of Lg(e))EC.call(e,n)&&Dg(t,n,e[n]);return t},IC=(t,e)=>bC(t,SC(e)),RC=IC(CC({},yC),{selectPoint(t,e,n){const r=this,{config:i,$el:{main:s},$T:o}=r,l=i.axis_rotated,c=(l?r.circleY:r.circleX).bind(r),u=(l?r.circleX:r.circleY).bind(r),f=r.pointSelectR.bind(r);Ne(i.data_onselected,r.api,e,t==null?void 0:t.node()),o(s.select(`.${on.selectedCircles}${r.getTargetSelectorSuffix(e.id)}`).selectAll(`.${on.selectedCircle}-${n}`).data([e]).enter().append("circle").attr("class",()=>r.generateClass(on.selectedCircle,n)).attr("cx",c).attr("cy",u).attr("stroke",r.color).attr("r",d=>r.pointSelectR(d)*1.4)).attr("r",f)},unselectPoint(t,e,n){const r=this,{config:i,$el:{main:s},$T:o}=r;Ne(i.data_onunselected,r.api,e,t==null?void 0:t.node()),o(s.select(`.${on.selectedCircles}${r.getTargetSelectorSuffix(e.id)}`).selectAll(`.${on.selectedCircle}-${n}`)).attr("r",0).remove()},togglePoint(t,e,n,r){this[`${t?"":"un"}selectPoint`](e,n,r)},selectPath(t,e){const n=this,{config:r}=n;Ne(r.data_onselected,n.api,e,t.node()),r.interaction_brighten&&t.style("filter","brightness(1.25)")},unselectPath(t,e){const n=this,{config:r}=n;Ne(r.data_onunselected,n.api,e,t.node()),r.interaction_brighten&&t.style("filter",null)},togglePath(t,e,n,r){this[`${t?"":"un"}selectPath`](e,n,r)},getToggle(t,e){const n=this;return t.nodeName==="path"?n.togglePath:n.isStepType(e)?()=>{}:n.togglePoint},toggleShape(t,e,n){var r;const i=this,{config:s,$el:{main:o}}=i;if(s.data_selection_enabled&&s.data_selection_isselectable.bind(i.api)(e)){const l=Yt(t),c=l.classed(on.SELECTED),u=i.getToggle(t,e).bind(i);let f;if(!s.data_selection_multiple){const d=(r=i.isPointFocusOnly)==null?void 0:r.call(i);let h=`.${d?on.selectedCircles:Tn.shapes}`;s.data_selection_grouped&&(h+=i.getTargetSelectorSuffix(e.id)),o.selectAll(h).selectAll(d?`.${on.selectedCircle}`:`.${Tn.shape}.${on.SELECTED}`).classed(on.SELECTED,!1).each(function(m){const S=Yt(this);f=S,u(!1,S,m,m.index)})}(!f||f.node()!==l.node())&&(l.classed(on.SELECTED,!c),u(!c,l,e,n))}}}),wC={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:()=>!0,data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:()=>{},data_onunselected:()=>{}};let Fg=()=>(xn(br.prototype,RC),xn(jn.prototype,xC),$a.setOptions([wC]),(Fg=()=>!0)());const Ng=function(t){var e,n;const r=this.internal,{axis:i,brush:s,config:o,scale:{x:l,subX:c},state:u}=r;let f;return u.isCanvasMode?(o.subchart_show&&(f=t,Array.isArray(f)?(f=i.isTimeSeries()?f.map(d=>Wn.bind(r)(d)):f,f=r.setCanvasSubchartDomain(f)||u.domain):f=(e=u.domain)!=null?e:l.orgDomain()),f):(o.subchart_show&&(f=t,Array.isArray(f)?(i.isTimeSeries()&&(f=f.map(h=>Wn.bind(r)(h))),r.withinRange(f,r.getZoomDomain("subX",!0),r.getZoomDomain("subX"))&&(u.domain=f.slice(),s.move(s.getSelection(),f.map(c)))):f=(n=u.domain)!=null?n:l.orgDomain()),f)};xn(Ng,{show(){var t,e,n;const r=this.internal,{$el:{subchart:i},config:s}=r,o=s.subchart_show;if(!o){if(r.state.isCanvasMode){(t=r.unbindZoomEvent)==null||t.call(r),s.subchart_show=!0,this.resize();return}r.unbindZoomEvent(),s.subchart_show=!o,!i.main&&r.initSubchart();let l=i.main.selectAll(`.${ze.target}`);r.data.targets.length!==l.size()&&(r.updateSizes(),r.updateTargetsForSubchart(r.data.targets),l=(e=i.main)==null?void 0:e.selectAll(`.${ze.target}`)),l==null||l.style("opacity",null),(n=i.main)==null||n.style("display",null),this.resize()}},hide(){var t;const e=this.internal,{$el:{subchart:{main:n}},config:r}=e;if(e.state.isCanvasMode){r.subchart_show&&(r.subchart_show=!1,this.resize(),(t=e.bindZoomEvent)==null||t.call(e));return}r.subchart_show&&(n==null?void 0:n.style("display"))!=="none"&&(r.subchart_show=!1,n.style("display","none"),this.resize())},toggle(){const t=this.internal,{config:e}=t;this.subchart[e.subchart_show?"hide":"show"]()},reset(){var t;const e=this.internal,{brush:n}=e;if(e.state.isCanvasMode){(t=e.clearCanvasSubchartDomain)==null||t.call(e,!0,!1);return}n.clear(n.getSelection())}});var OC={subchart:Ng};const $g=["bar","line","bubble","candlestick","scatter"],PC=["opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width"];function Bg(t,e){var n,r;const i=(r=(n=t.$el.grid)==null?void 0:n.main)==null?void 0:r.select(`line.${Re.xgridFocus}`).node();if(!i||!se.getComputedStyle)return;const s=se.getComputedStyle(i);PC.forEach(o=>{const l=s.getPropertyValue(o);l&&e.style(o,l)})}function mi(t,e){const n=Number(t);return Number.isFinite(n)?n:e}function MC(t){var e,n;if(!rc(t))return!1;const{config:r,state:i,$el:s}=t,o=(n=(e=s.grid)==null?void 0:e.main)==null?void 0:n.select(`line.${Re.xgridFocus}:not(.${Re.xgridFocusContinuous})`),l=s.main.select(`line.${Re.xgridFocusContinuous}`);if(!(o!=null&&o.node())||!l.node())return!1;const c=i.margin2.left-i.margin.left+i.width2,u=i.margin2.top-i.margin.top+i.height2;return Bg(t,l),r.axis_rotated?l.attr("x1",mi(o.attr("x1"),0)).attr("x2",c).attr("y1",mi(o.attr("y1"),-10)).attr("y2",mi(o.attr("y2"),-10)):l.attr("x1",mi(o.attr("x1"),-10)).attr("x2",mi(o.attr("x2"),-10)).attr("y1",mi(o.attr("y1"),0)).attr("y2",u),l.style("visibility",null),o.style("visibility","hidden"),!0}function LC(t){var e;(e=t.$el.main)==null||e.select(`line.${Re.xgridFocusContinuous}`).style("visibility","hidden")}function DC(t,e,n){const{config:r,state:i}=t,[s,o]=Jn(e,n),l=Td(t,r.axis_rotated?o:s);return l===null?null:r.axis_rotated?[i.width/2,l]:[l,i.height/2]}function gu(t,e,n,r){var i,s;const o=(s=(i=t.$el.eventRect)==null?void 0:i.node)==null?void 0:s.call(i);if(!o)return;const l=DC(t,n,r)||[0,0],c=ln(o,!0),u=c.left+l[0],f=c.top+l[1],d={bubbles:!0,cancelable:!0,screenX:u,screenY:f,clientX:u,clientY:f};/^touch/.test(e)?wc.touch(o,e,d):wc.mouse(o,e,d)}var FC={isSubchartBrushEnabled(){const{config:t}=this;return t.subchart_show&&t.subchart_brush_enabled!==!1},bindSubchartEventRect(t){const e=this,{config:n,state:r}=e;t.on("mouseover mousemove mouseout touchstart touchmove touchend",null),n.interaction_enabled&&(r.inputType==="mouse"?t.on("mouseover mousemove",function(i){e.isSubchartBrushEnabled()||gu(e,i.type,i,this)}).on("mouseout",function(i){e.isSubchartBrushEnabled()||gu(e,"mouseout",i,this)}):r.inputType==="touch"&&t.on("touchstart touchmove touchend",function(i){var s;e.isSubchartBrushEnabled()||((s=i.touches)==null?void 0:s.length)>1||gu(e,i.type,i,this)}))},initBrush(){const t=this,{config:e,scale:n,$el:{subchart:r},state:i}=t,s=e.axis_rotated,o=e.subchart_size_height;let l,c,u;t.brush=(s?oA():sA()).handleSize(5),t.brush.on("start brush end",f=>{const{selection:d,sourceEvent:h,target:m,type:S}=f;S==="start"&&(t.state.inputType==="touch"&&t.hideTooltip(),c=h?d:null),/(start|brush)/.test(S)&&(S==="brush"&&h&&i.domain&&(c==null||c.forEach((E,C)=>{E!==d[C]&&(i.domain[C]=n.x.orgDomain()[C])})),t.redrawForBrush(S!=="start")),S==="end"&&(l=n.x.orgDomain()),m!=null&&m.handle&&(d===null?t.brush.handle.attr("display","none"):t.brush.handle.attr("display",null).attr("transform",(E,C)=>{const w=[d[C],o/2];return`translate(${s?w.reverse():w})`}))}),t.brush.updateResize=function(){u&&clearTimeout(u),u=setTimeout(()=>{const f=this.getSelection();l&&vv(f.node())&&this.move(f,l.map(n.subX.orgScale()))},0)},t.brush.update=function(){var f;return this.extent()()[1].filter(h=>isNaN(h)).length===0&&((f=r.main)==null||f.select(`.${Re.brush}`).call(this)),this},t.brush.scale=function(f){const d=e.subchart_size_height;let h=t.axis.getExtent();!h&&f.range?h=[[0,0],[f.range()[1],d]]:qe(h)&&(h=h.map((m,S)=>[m,S>0?d:S])),s&&h[1].reverse(),this.extent(h),this.update()},t.brush.getSelection=()=>r.main?r.main.select(`.${Re.brush}`):Yt([])},initSubchart(){const t=this,{config:e,state:{clip:n,hasAxis:r},$el:{defs:i,svg:s,subchart:o,axis:l}}=t;if(!r)return;const c=e.subchart_show?null:"hidden",u=`${n.id}-subchart`,f=t.getClipPath(u);n.idSubchart=u,t.appendClip(i,u),t.initBrush(),o.main=s.append("g").classed(Re.subchart,!0).attr("transform",t.getTranslate("context"));const{main:d}=o;d.style("visibility",c),d.append("g").attr("clip-path",f).attr("class",Re.chart),t.withSubchartTypeContext(()=>{$g.forEach(m=>{const S=Ln(/^(bubble|scatter)$/.test(m)?"circle":m);if(t.hasType(m)||t.hasTypeOf(S)){const E=d.select(`.${Re.chart}`),C=Re[`chart${S}s`];E.select(`.${C}`).empty()&&E.append("g").attr("class",C)}})});const h=d.append("g").attr("clip-path",f).attr("class",Re.brush).style("pointer-events",t.isSubchartBrushEnabled()?null:"none").call(t.brush);e.subchart_showHandle&&t.addBrushHandle(h),o.eventRect=d.append("g").attr("clip-path",f).attr("class",`${Re.eventRects} ${Re.eventRects}-subchart`).style("fill-opacity","0").style("pointer-events",t.isSubchartBrushEnabled()?"none":"all").append("rect").attr("class",`${Re.eventRect} ${Re.eventRect}-subchart`).attr("width",t.state.width2).attr("height",t.state.height2),t.bindSubchartEventRect(o.eventRect),d.append("g").attr("clip-path",f).attr("class",Re.xgridFocus).append("line").attr("class",Re.xgridFocus).style("visibility","hidden"),l.subX=d.append("g").attr("class",Re.axisX).attr("transform",t.getTranslate("subX")).attr("clip-path",e.axis_rotated?"":n.pathXAxis).style("visibility",e.subchart_axis_x_show?c:"hidden"),l.subY=d.append("g").attr("class",Re.axisY).attr("transform",t.getTranslate("subY")).style("visibility",e.subchart_axis_y_show?c:"hidden"),l.subY2=d.append("g").attr("class",Re.axisY2).attr("transform",t.getTranslate("subY2")).style("visibility",e.subchart_axis_y2_show?c:"hidden")},addBrushHandle(t){const e=this,{config:n}=e,r=n.axis_rotated,i=n.subchart_init_range,s="handle--custom",o=de[r?"y":"x"];e.brush.handle=t.selectAll(`.${s}`).data(r?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class",s).attr("cursor",`${r?"ns":"ew"}-resize`).attr("d",l=>o[/[se]/.test(l.type)?"end":"start"]).attr("display",i?null:"none")},updateTargetsForSubchart(t){var e;const n=this,{config:r,state:i,$el:{subchart:{main:s}}}=n;r.subchart_show&&(n.withSubchartTypeContext(()=>{$g.filter(o=>n.hasType(o)||n.hasTypeOf(Ln(o))).forEach(o=>{const l=/^(bubble|scatter)$/.test(o),c=Ln(l?"circle":o),u=n.getChartClass(c,!0),f=n.getClass(l?"circles":`${o}s`,!0),d=s.select(`.${Re[`chart${`${c}s`}`]}`);if(l){const h=d.selectAll(`.${Re.circles}`).data(t.filter(n[`is${Ln(o)}Type`].bind(n))).attr("class",f);h.exit().remove(),h.enter().append("g").attr("class",f)}else{const h=d.selectAll(`.${Re[`chart${c}`]}`).attr("class",u).data(t.filter(n[`is${c}Type`].bind(n))),m=h.enter().append("g").style("opacity","0").attr("class",u).append("g").attr("class",f);h.exit().remove(),o==="line"&&n.hasTypeOf("Area")&&m.append("g").attr("class",n.getClass("areas",!0))}})}),s.selectAll(`.${Re.brush} rect`).attr(r.axis_rotated?"width":"height",r.axis_rotated?i.width2:i.height2),(e=n.$el.subchart.eventRect)==null||e.attr("width",i.width2).attr("height",i.height2).style("pointer-events",n.isSubchartBrushEnabled()?"none":"all"))},updateSubchartYDomain(t){var e,n;const r=this,{scale:i}=r,s=t||r.filterTargetsToShow(r.data.targets);(e=i.subY)==null||e.domain(r.getYDomain(s,"y")),(n=i.subY2)==null||n.domain(r.getYDomain(s,"y2"))},redrawSubchart(t,e){var n,r,i,s;const o=this,{config:l,$el:{subchart:{main:c}},state:u}=o,f=!!e;if(c.style("visibility",l.subchart_show?null:"hidden"),c.select(`.${Re.brush}`).style("pointer-events",o.isSubchartBrushEnabled()?null:"none"),(n=o.$el.subchart.eventRect)==null||n.style("pointer-events",o.isSubchartBrushEnabled()?"none":"all"),(r=o.$el.axis.subY)==null||r.style("visibility",l.subchart_axis_y_show?null:"hidden"),(i=o.$el.axis.subY2)==null||i.style("visibility",l.subchart_axis_y2_show?null:"hidden"),l.subchart_show&&(((s=u.event)==null?void 0:s.type)==="zoom"&&o.brush.update(),t)){const d=l.subchart_init_range;!pv(o)&&o.brush.update(),o.withSubchartTypeContext(()=>{const h=u._targetsToShow||o.filterTargetsToShow(o.data.targets);o.updateSubchartYDomain(h);const m=o.getDrawShape();if(Object.keys(m.type).forEach(S=>{const E=Ln(S),C=o[`generateDraw${E}`](m.indices[S],!0);o[`update${E}`](f,!0),o[`redraw${E}`](C,f,!0)}),o.hasType("bubble")||o.hasType("scatter")){const{cx:S}=m.pos,E=o.updateCircleY(!0);o.updateCircle(!0),o.redrawCircle(S,E,f,void 0,!0)}}),!u.rendered&&d&&(u.domain=d,o.brush.move(o.brush.getSelection(),d.map(o.scale.x)))}},showSubchartGridFocus(t){const e=this,{config:n,state:r,$el:{subchart:{main:i}}}=e;if(!i||!n.subchart_show||e.isSubchartBrushEnabled()||n.grid_focus_show===!1||n.subchart_grid_focus===!1||!n.tooltip_show||n.axis_tooltip)return;const o=(Array.isArray(t)?t:[t]).find(u=>u&&e.getBaseValue(u)!=null);if(!o){e.hideSubchartGridFocus();return}const l=e.scale.subX(o.x);if(!Number.isFinite(l)){e.hideSubchartGridFocus();return}const c=i.select(`g.${Re.xgridFocus} line.${Re.xgridFocus}`);if(MC(e)){c.style("visibility","hidden");return}Bg(e,c),n.axis_rotated?c.attr("x1",0).attr("x2",r.width2).attr("y1",l).attr("y2",l):c.attr("x1",l).attr("x2",l).attr("y1",0).attr("y2",r.height2),c.style("visibility",null)},hideSubchartGridFocus(){var t;LC(this),(t=this.$el.subchart.main)==null||t.select(`g.${Re.xgridFocus} line.${Re.xgridFocus}`).style("visibility","hidden")},redrawForBrush(t=!0){var e;const n=this,{config:{subchart_onbrush:r,zoom_rescale:i},scale:s,state:o}=n;n.redraw({withTransition:!1,withY:i,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t&&o.rendered&&r.bind(n.api)((e=o.domain)!=null?e:s.x.orgDomain())},transformContext(t,e){const n=this,{$el:{subchart:r},$T:i}=n,s=e!=null&&e.axisSubX?e.axisSubX:i(r.main.select(`.${Re.axisX}`),t),o=e!=null&&e.axisSubY?e.axisSubY:i(r.main.select(`.${Re.axisY}`),t),l=e!=null&&e.axisSubY2?e.axisSubY2:i(r.main.select(`.${Re.axisY2}`),t);r.main.attr("transform",n.getTranslate("context")),s.attr("transform",n.getTranslate("subX")),o.attr("transform",n.getTranslate("subY")),l.attr("transform",n.getTranslate("subY2"))}},NC={subchart_show:!1,subchart_type:void 0,subchart_types:{},subchart_brush_enabled:!0,subchart_showHandle:!1,subchart_size_height:60,subchart_grid_focus:!0,subchart_grid_focus_continuous:!1,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_count:void 0,subchart_axis_x_tick_values:void 0,subchart_axis_x_tick_culling:void 0,subchart_axis_x_tick_culling_max:void 0,subchart_axis_x_tick_culling_lines:void 0,subchart_axis_x_tick_culling_reverse:void 0,subchart_axis_x_tick_outer:void 0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_axis_y_show:!1,subchart_axis_y_tick_show:!0,subchart_axis_y_tick_count:void 0,subchart_axis_y_tick_values:void 0,subchart_axis_y_tick_culling:void 0,subchart_axis_y_tick_culling_max:void 0,subchart_axis_y_tick_culling_lines:void 0,subchart_axis_y_tick_culling_reverse:void 0,subchart_axis_y_tick_outer:void 0,subchart_axis_y_tick_format:void 0,subchart_axis_y_tick_text_show:!0,subchart_axis_y2_show:!1,subchart_axis_y2_tick_show:!0,subchart_axis_y2_tick_count:void 0,subchart_axis_y2_tick_values:void 0,subchart_axis_y2_tick_culling:void 0,subchart_axis_y2_tick_culling_max:void 0,subchart_axis_y2_tick_culling_lines:void 0,subchart_axis_y2_tick_culling_reverse:void 0,subchart_axis_y2_tick_outer:void 0,subchart_axis_y2_tick_format:void 0,subchart_axis_y2_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:()=>{}};let zg=()=>(xn(br.prototype,FC),xn(jn.prototype,OC),$a.setOptions([NC]),(zg=()=>!0)());var $C=1e-12;function Ug(t){return((t=Math.exp(t))+1/t)/2}function BC(t){return((t=Math.exp(t))-1/t)/2}function zC(t){return((t=Math.exp(2*t))-1)/(t+1)}var UC=(function t(e,n,r){function i(s,o){var l=s[0],c=s[1],u=s[2],f=o[0],d=o[1],h=o[2],m=f-l,S=d-c,E=m*m+S*S,C,w;if(E<$C)w=Math.log(h/u)/e,C=function(_){return[l+_*m,c+_*S,u*Math.exp(e*_*w)]};else{var $=Math.sqrt(E),z=(h*h-u*u+r*E)/(2*u*n*$),B=(h*h-u*u-r*E)/(2*h*n*$),W=Math.log(Math.sqrt(z*z+1)-z),H=Math.log(Math.sqrt(B*B+1)-B);w=(H-W)/e,C=function(_){var q=_*w,st=Ug(W),it=u/(n*$)*(st*zC(e*q+W)-BC(W));return[l+it*m,c+it*S,u*st/Ug(e*q+W)]}}return C.duration=w*1e3*e/Math.SQRT2,C}return i.rho=function(s){var o=Math.max(.001,+s),l=o*o,c=l*l;return t(o,l,c)},i})(Math.SQRT2,2,4),_o=(t=>()=>t);function kC(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function ta(t,e,n){this.k=t,this.x=e,this.y=n}ta.prototype={constructor:ta,scale:function(t){return t===1?this:new ta(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ta(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var fr=new ta(1,0,0);pu.prototype=ta.prototype;function pu(t){for(;!t.__zoom;)if(!(t=t.parentNode))return fr;return t.__zoom}function mu(t){t.stopImmediatePropagation()}function xs(t){t.preventDefault(),t.stopImmediatePropagation()}function GC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function XC(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function kg(){return this.__zoom||fr}function WC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function VC(){return navigator.maxTouchPoints||"ontouchstart"in this}function jC(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],s=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function HC(){var t=GC,e=XC,n=jC,r=WC,i=VC,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,c=UC,u=Io("start","zoom","end"),f,d,h,m=500,S=150,E=0,C=10;function w(tt){tt.property("__zoom",kg).on("wheel.zoom",q,{passive:!1}).on("mousedown.zoom",st).on("dblclick.zoom",it).filter(i).on("touchstart.zoom",ot).on("touchmove.zoom",ct).on("touchend.zoom touchcancel.zoom",gt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(tt,ft,lt,bt){var St=tt.selection?tt.selection():tt;St.property("__zoom",kg),tt!==St?W(tt,ft,lt,bt):St.interrupt().each(function(){H(this,arguments).event(bt).start().zoom(null,typeof ft=="function"?ft.apply(this,arguments):ft).end()})},w.scaleBy=function(tt,ft,lt,bt){w.scaleTo(tt,function(){var St=this.__zoom.k,Mt=typeof ft=="function"?ft.apply(this,arguments):ft;return St*Mt},lt,bt)},w.scaleTo=function(tt,ft,lt,bt){w.transform(tt,function(){var St=e.apply(this,arguments),Mt=this.__zoom,Ot=lt==null?B(St):typeof lt=="function"?lt.apply(this,arguments):lt,Kt=Mt.invert(Ot),ee=typeof ft=="function"?ft.apply(this,arguments):ft;return n(z($(Mt,ee),Ot,Kt),St,o)},lt,bt)},w.translateBy=function(tt,ft,lt,bt){w.transform(tt,function(){return n(this.__zoom.translate(typeof ft=="function"?ft.apply(this,arguments):ft,typeof lt=="function"?lt.apply(this,arguments):lt),e.apply(this,arguments),o)},null,bt)},w.translateTo=function(tt,ft,lt,bt,St){w.transform(tt,function(){var Mt=e.apply(this,arguments),Ot=this.__zoom,Kt=bt==null?B(Mt):typeof bt=="function"?bt.apply(this,arguments):bt;return n(fr.translate(Kt[0],Kt[1]).scale(Ot.k).translate(typeof ft=="function"?-ft.apply(this,arguments):-ft,typeof lt=="function"?-lt.apply(this,arguments):-lt),Mt,o)},bt,St)};function $(tt,ft){return ft=Math.max(s[0],Math.min(s[1],ft)),ft===tt.k?tt:new ta(ft,tt.x,tt.y)}function z(tt,ft,lt){var bt=ft[0]-lt[0]*tt.k,St=ft[1]-lt[1]*tt.k;return bt===tt.x&&St===tt.y?tt:new ta(tt.k,bt,St)}function B(tt){return[(+tt[0][0]+ +tt[1][0])/2,(+tt[0][1]+ +tt[1][1])/2]}function W(tt,ft,lt,bt){tt.on("start.zoom",function(){H(this,arguments).event(bt).start()}).on("interrupt.zoom end.zoom",function(){H(this,arguments).event(bt).end()}).tween("zoom",function(){var St=this,Mt=arguments,Ot=H(St,Mt).event(bt),Kt=e.apply(St,Mt),ee=lt==null?B(Kt):typeof lt=="function"?lt.apply(St,Mt):lt,Ae=Math.max(Kt[1][0]-Kt[0][0],Kt[1][1]-Kt[0][1]),Ee=St.__zoom,Te=typeof ft=="function"?ft.apply(St,Mt):ft,De=c(Ee.invert(ee).concat(Ae/Ee.k),Te.invert(ee).concat(Ae/Te.k));return function(me){if(me===1)me=Te;else{var Pe=De(me),Zt=Ae/Pe[2];me=new ta(Zt,ee[0]-Pe[0]*Zt,ee[1]-Pe[1]*Zt)}Ot.zoom(null,me)}})}function H(tt,ft,lt){return!lt&&tt.__zooming||new _(tt,ft)}function _(tt,ft){this.that=tt,this.args=ft,this.active=0,this.sourceEvent=null,this.extent=e.apply(tt,ft),this.taps=0}_.prototype={event:function(tt){return tt&&(this.sourceEvent=tt),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(tt,ft){return this.mouse&&tt!=="mouse"&&(this.mouse[1]=ft.invert(this.mouse[0])),this.touch0&&tt!=="touch"&&(this.touch0[1]=ft.invert(this.touch0[0])),this.touch1&&tt!=="touch"&&(this.touch1[1]=ft.invert(this.touch1[0])),this.that.__zoom=ft,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(tt){var ft=Yt(this.that).datum();u.call(tt,this.that,new kC(tt,{sourceEvent:this.sourceEvent,target:w,type:tt,transform:this.that.__zoom,dispatch:u}),ft)}};function q(tt,...ft){if(!t.apply(this,arguments))return;var lt=H(this,ft).event(tt),bt=this.__zoom,St=Math.max(s[0],Math.min(s[1],bt.k*Math.pow(2,r.apply(this,arguments)))),Mt=ur(tt);if(lt.wheel)(lt.mouse[0][0]!==Mt[0]||lt.mouse[0][1]!==Mt[1])&&(lt.mouse[1]=bt.invert(lt.mouse[0]=Mt)),clearTimeout(lt.wheel);else{if(bt.k===St)return;lt.mouse=[Mt,bt.invert(Mt)],di(this),lt.start()}xs(tt),lt.wheel=setTimeout(Ot,S),lt.zoom("mouse",n(z($(bt,St),lt.mouse[0],lt.mouse[1]),lt.extent,o));function Ot(){lt.wheel=null,lt.end()}}function st(tt,...ft){if(h||!t.apply(this,arguments))return;var lt=tt.currentTarget,bt=H(this,ft,!0).event(tt),St=Yt(tt.view).on("mousemove.zoom",ee,!0).on("mouseup.zoom",Ae,!0),Mt=ur(tt,lt),Ot=tt.clientX,Kt=tt.clientY;Fc(tt.view),mu(tt),bt.mouse=[Mt,this.__zoom.invert(Mt)],di(this),bt.start();function ee(Ee){if(xs(Ee),!bt.moved){var Te=Ee.clientX-Ot,De=Ee.clientY-Kt;bt.moved=Te*Te+De*De>E}bt.event(Ee).zoom("mouse",n(z(bt.that.__zoom,bt.mouse[0]=ur(Ee,lt),bt.mouse[1]),bt.extent,o))}function Ae(Ee){St.on("mousemove.zoom mouseup.zoom",null),Nc(Ee.view,bt.moved),xs(Ee),bt.event(Ee).end()}}function it(tt,...ft){if(t.apply(this,arguments)){var lt=this.__zoom,bt=ur(tt.changedTouches?tt.changedTouches[0]:tt,this),St=lt.invert(bt),Mt=lt.k*(tt.shiftKey?.5:2),Ot=n(z($(lt,Mt),bt,St),e.apply(this,ft),o);xs(tt),l>0?Yt(this).transition().duration(l).call(W,Ot,bt,tt):Yt(this).call(w.transform,Ot,bt,tt)}}function ot(tt,...ft){if(t.apply(this,arguments)){var lt=tt.touches,bt=lt.length,St=H(this,ft,tt.changedTouches.length===bt).event(tt),Mt,Ot,Kt,ee;for(mu(tt),Ot=0;Ot<bt;++Ot)Kt=lt[Ot],ee=ur(Kt,this),ee=[ee,this.__zoom.invert(ee),Kt.identifier],St.touch0?!St.touch1&&St.touch0[2]!==ee[2]&&(St.touch1=ee,St.taps=0):(St.touch0=ee,Mt=!0,St.taps=1+!!f);f&&(f=clearTimeout(f)),Mt&&(St.taps<2&&(d=ee[0],f=setTimeout(function(){f=null},m)),di(this),St.start())}}function ct(tt,...ft){if(this.__zooming){var lt=H(this,ft).event(tt),bt=tt.changedTouches,St=bt.length,Mt,Ot,Kt,ee;for(xs(tt),Mt=0;Mt<St;++Mt)Ot=bt[Mt],Kt=ur(Ot,this),lt.touch0&&lt.touch0[2]===Ot.identifier?lt.touch0[0]=Kt:lt.touch1&&lt.touch1[2]===Ot.identifier&&(lt.touch1[0]=Kt);if(Ot=lt.that.__zoom,lt.touch1){var Ae=lt.touch0[0],Ee=lt.touch0[1],Te=lt.touch1[0],De=lt.touch1[1],me=(me=Te[0]-Ae[0])*me+(me=Te[1]-Ae[1])*me,Pe=(Pe=De[0]-Ee[0])*Pe+(Pe=De[1]-Ee[1])*Pe;Ot=$(Ot,Math.sqrt(me/Pe)),Kt=[(Ae[0]+Te[0])/2,(Ae[1]+Te[1])/2],ee=[(Ee[0]+De[0])/2,(Ee[1]+De[1])/2]}else if(lt.touch0)Kt=lt.touch0[0],ee=lt.touch0[1];else return;lt.zoom("touch",n(z(Ot,Kt,ee),lt.extent,o))}}function gt(tt,...ft){if(this.__zooming){var lt=H(this,ft).event(tt),bt=tt.changedTouches,St=bt.length,Mt,Ot;for(mu(tt),h&&clearTimeout(h),h=setTimeout(function(){h=null},m),Mt=0;Mt<St;++Mt)Ot=bt[Mt],lt.touch0&&lt.touch0[2]===Ot.identifier?delete lt.touch0:lt.touch1&&lt.touch1[2]===Ot.identifier&&delete lt.touch1;if(lt.touch1&&!lt.touch0&&(lt.touch0=lt.touch1,delete lt.touch1),lt.touch0)lt.touch0[1]=this.__zoom.invert(lt.touch0[0]);else if(lt.end(),lt.taps===2&&(Ot=ur(Ot,this),Math.hypot(d[0]-Ot[0],d[1]-Ot[1])<C)){var Kt=Yt(this).on("dblclick.zoom");Kt&&Kt.apply(this,arguments)}}}return w.wheelDelta=function(tt){return arguments.length?(r=typeof tt=="function"?tt:_o(+tt),w):r},w.filter=function(tt){return arguments.length?(t=typeof tt=="function"?tt:_o(!!tt),w):t},w.touchable=function(tt){return arguments.length?(i=typeof tt=="function"?tt:_o(!!tt),w):i},w.extent=function(tt){return arguments.length?(e=typeof tt=="function"?tt:_o([[+tt[0][0],+tt[0][1]],[+tt[1][0],+tt[1][1]]]),w):e},w.scaleExtent=function(tt){return arguments.length?(s[0]=+tt[0],s[1]=+tt[1],w):[s[0],s[1]]},w.translateExtent=function(tt){return arguments.length?(o[0][0]=+tt[0][0],o[1][0]=+tt[1][0],o[0][1]=+tt[0][1],o[1][1]=+tt[1][1],w):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},w.constrain=function(tt){return arguments.length?(n=tt,w):n},w.duration=function(tt){return arguments.length?(l=+tt,w):l},w.interpolate=function(tt){return arguments.length?(c=tt,w):c},w.on=function(){var tt=u.on.apply(u,arguments);return tt===u?w:tt},w.clickDistance=function(tt){return arguments.length?(E=(tt=+tt)*tt,w):Math.sqrt(E)},w.tapDistance=function(tt){return arguments.length?(C=+tt,w):C},w}const Gg=function(t){var e,n;const r=this.internal,{axis:i,config:s,org:o,scale:l,state:c}=r;let u;if(!i)return;const f=i.isCategorized();if(s.zoom_enabled)if(u=t,Array.isArray(u)){if(i.isTimeSeries()&&(u=u.map(h=>Wn.bind(r)(h))),r.withinRange(u,r.getZoomDomain("zoom",!0),r.getZoomDomain("zoom"))){if(c.domain=u.slice(),u=r.getZoomDomainValue(u),r.api.tooltip.hide(),s.subchart_show)if(c.isCanvasMode)(e=r.setCanvasSubchartDomain)==null||e.call(r,u,!0,!1);else{const h=l.zoom||l.x;r.brush.getSelection().call(r.brush.move,u.map(h))}else{const h=f?l.x.orgScale():o.xScale||l.x;r.updateCurrentZoomTransform(h,u)}r.setZoomResetButton()}}else u=r.zoom.getDomain();return(n=c.domain)!=null?n:u};xn(Gg,{enable(t){var e;const n=this.internal,{axis:r,config:i}=n;if(!r){i.zoom_enabled=!1;return}/^(drag|wheel)$/.test(t)&&(i.zoom_type=t),i.zoom_enabled=!!t,n.zoom?t===!1&&n.bindZoomEvent(!1):n.initZoom(),t!==!1&&(i.zoom_type==="drag"&&!n.zoomBehaviour&&((e=n.initZoomBehaviour)==null||e.call(n)),n.bindZoomEvent()),n.updateAndRedraw()},max(t){const e=this.internal,{config:n,org:{xDomain:r}}=e;return(t===0||t)&&(n.zoom_x_max=pr("max",[r[1],t])),n.zoom_x_max},min(t){const e=this.internal,{config:n,org:{xDomain:r}}=e;return(t===0||t)&&(n.zoom_x_min=pr("min",[r[0],t])),n.zoom_x_min},range(t){const e=this.zoom;if(He(t)){const{min:n,max:r}=t;sn(n)&&e.min(n),sn(r)&&e.max(r)}return{min:e.min(),max:e.max()}}});var YC={zoom:Gg,unzoom(){var t;const e=this.internal,{config:n,$el:{canvas:r,eventRect:i,zoomResetBtn:s},scale:{zoom:o},state:l}=e,c=l.isCanvasMode?r:i;(o||l.isCanvasMode&&n.subchart_show&&l.domain)&&(n.subchart_show?l.isCanvasMode?(t=e.clearCanvasSubchartDomain)==null||t.call(e,!0,!1):e.brush.getSelection().call(e.brush.move,null):e.zoom.updateTransformScale(fr),e.updateZoom(!0),s==null||s.style("display","none"),c!=null&&c.node()&&pu(c.node())!==fr&&e.zoom.transform(c,fr),l.domain=void 0)}};function qo(t){return t.state.isCanvasMode?t.$el.canvas:t.$el.eventRect}function Xg(t,e){if(!t.state.isCanvasMode)return e;const{margin:n}=t.state;return fr.translate(e.x+(e.k-1)*n.left,e.y+(e.k-1)*n.top).scale(e.k)}function Wg(t,e){if(!t.state.isCanvasMode)return e;const{margin:n}=t.state;return fr.translate(e.x-(e.k-1)*n.left,e.y-(e.k-1)*n.top).scale(e.k)}function Vg(t,e,n){const r=Jn(e,n);if(t.state.isCanvasMode){const{margin:i}=t.state;r[0]-=i.left,r[1]-=i.top}return r}var KC={initZoom(){const t=this;t.scale.zoom=null,t.generateZoom(),t.config.zoom_type==="drag"&&t.initZoomBehaviour()},bindZoomEvent(t=!0){const e=this,{config:n}=e;n.zoom_enabled&&t?!n.subchart_show&&e.bindZoomOnEventRect():t===!1&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom(){const t=this,{config:e,org:n,scale:r}=t,i=HC().duration(0).on("start",t.onZoomStart.bind(t)).on("zoom",t.onZoom.bind(t)).on("end",t.onZoomEnd.bind(t));i.orgScaleExtent=()=>{const s=e.zoom_extent||[1,10];return[s[0],Math.max(t.getMaxDataCount()/s[1],s[1])]},i.updateScaleExtent=function(){const s=wa(t.scale.x.orgDomain())/wa(t.getZoomDomain()),o=this.orgScaleExtent();return this.scaleExtent([o[0]*s,o[1]*s]),this},i.updateTransformScale=(s,o)=>{var l,c;const u=e.axis_rotated,f=Xg(t,s);(l=n.xScale)==null||l.range(r.x.range());const d=f[u?"rescaleY":"rescaleX"](n.xScale||r.x);if(d.domain().some(S=>/(Invalid Date|NaN)/.test(S.toString())))return;const h=t.trimXDomain(d.domain()),m=e.zoom_rescale;if(d.domain(h,n.xDomain),o){const S=d(r.x.domain()[0]),E=u?f.x:S,C=u?S:f.y,w=Wg(t,fr.translate(E,C).scale(s.k));(c=qo(t))==null||c.property("__zoom",w)}r.zoom=t.getCustomizedXScale(d),t.axis.x.scale(r.zoom),m?(!n.xScale&&(n.xScale=r.x.copy()),r.x.domain(h)):n.xScale&&(r.x.domain(n.xScale.domain()),n.xScale=null)},i.getDomain=()=>{const s=r[r.zoom?"zoom":"subX"].domain();return t.axis.isCategorized()&&(s[1]-=2),s},t.zoom=i},onZoomStart(t){const e=this,{sourceEvent:n}=t;n&&(e.zoom.startEvent=n,e.state.zooming=!0,Ne(e.config.zoom_onzoomstart,e.api,t))},onZoom(t){const e=this,{config:n,scale:r,state:i,org:s}=e,{sourceEvent:o}=t,l=(t==null?void 0:t.transform)===fr;if(!n.zoom_enabled||e.filterTargetsToShow(e.data.targets).length===0||!r.zoom&&(o==null?void 0:o.type.indexOf("touch"))>-1&&(o==null?void 0:o.touches.length)===1)return;t.sourceEvent&&(i.zooming=!0,i.domain=void 0);const c=(o==null?void 0:o.type)==="mousemove",u=(o==null?void 0:o.wheelDelta)<0,{transform:f}=t;!c&&u&&r.x.domain().every((S,E)=>S!==s.xDomain[E])&&r.x.domain(s.xDomain),e.zoom.updateTransformScale(f,n.zoom_type==="wheel"&&o);const d=n.transition_duration>0&&!n.subchart_show&&(i.dragging||l||!t.sourceEvent),h=o&&c&&n.zoom_type!=="wheel",m=()=>{var S;e.config&&(e.redraw({withTransition:d,withY:n.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e.state.cancelClick=c,!l&&Ne(n.zoom_onzoom,e.api,(S=e.state.domain)!=null?S:e.zoom.getDomain()))};h?Ph(e.state,m):m()},onZoomEnd(t){var e,n;const r=this,{config:i,state:s}=r,o=r.zoom;if(!o)return;let{startEvent:l}=o,c=t==null?void 0:t.sourceEvent;const u=(t==null?void 0:t.transform)===fr;(l==null?void 0:l.type.indexOf("touch"))>-1&&(l=l.changedTouches[0],c=(e=c==null?void 0:c.changedTouches)==null?void 0:e[0]),!(i.zoom_type==="drag"&&c&&l.clientX===c.clientX&&l.clientY===c.clientY)&&(s.zooming=!1,!s.isCanvasMode&&r.redrawEventRect(),r.updateZoom(),!u&&(c||s.dragging)&&Ne(i.zoom_onzoomend,r.api,(n=r.state.domain)!=null?n:r.zoom.getDomain()))},updateZoom(t){const e=this,{subX:n,x:r,zoom:i}=e.scale;if(i){const s=i.domain(),o=n.domain(),l=.015,c=e.config.axis_x_inverted?(s[0]>=o[0]||s[0]+l>=o[0])&&(o[1]>=s[1]||o[1]>=s[1]+l):(s[0]<=o[0]||s[0]-l<=o[0])&&(o[1]<=s[1]||o[1]<=s[1]-l);(t||c)&&(e.axis.x.scale(n),r.domain(n.orgDomain()),e.scale.zoom=null)}},updateCurrentZoomTransform(t,e){var n;const r=this,{config:i}=r,s=i.axis_rotated,o=[-t(e[0]),0],l=fr.scale(t.range()[1]/(t(e[1])-t(e[0]))).translate(...s?o.reverse():o);(n=qo(r))==null||n.call(r.zoom.transform,Wg(r,l))},bindZoomOnEventRect(){var t,e;const n=this,{config:r,$el:{svg:i}}=n,s=qo(n),o=r.zoom_type==="drag"?n.zoomBehaviour:n.zoom;n.state.isCanvasMode&&((t=o==null?void 0:o.touchable)==null||t.call(o,()=>r.interaction_inputType_touch!==!1)),!n.state.isCanvasMode&&se.GestureEvent&&/^((?!chrome|android|mobile).)*safari/i.test((e=se.navigator)==null?void 0:e.userAgent)&&i.on("wheel",()=>{}),s==null||s.call(o).on("dblclick.zoom",null)},initZoomBehaviour(){const t=this,{config:e,state:n}=t,r=e.axis_rotated;let i=0,s=0,o,l;const c={axis:r?"y":"x",attr:r?"height":"width",index:r?1:0},u=f=>{const[d,h]=l!=null?l:[0,r?n.height:n.width];return Math.min(Math.max(f,d),h)};t.zoomBehaviour=Yh().touchable(()=>!n.isCanvasMode||e.interaction_inputType_touch!==!1).clickDistance(4).on("start",function(f){var d;l=t.scale.zoom?null:t.axis.getExtent(),n.event=f,t.setDragStatus(!0),t.unselectRect(),!n.isCanvasMode&&!o&&(o=t.$el.main.append("rect").attr("clip-path",n.clip.path).attr("class",Ec.zoomBrush).attr("width",r?n.width:0).attr("height",r?0:n.height)),o==null||o.attr(r?"width":"height",r?n.width:n.height),i=u(Vg(t,f,this)[c.index]),s=i,n.isCanvasMode?(d=t.renderCanvasZoomBrush)==null||d.call(t,i,s):o.attr(c.axis,i).attr(c.attr,0),t.onZoomStart(f)}).on("drag",function(f){var d;s=u(Vg(t,f,this)[c.index]),n.isCanvasMode?(d=t.renderCanvasZoomBrush)==null||d.call(t,i,s):o.attr(c.axis,Math.min(i,s)).attr(c.attr,Math.abs(s-i))}).on("end",f=>{var d;const h=t.scale.zoom||t.scale.x;n.event=f,s=u(s),n.isCanvasMode?(d=t.clearCanvasZoomBrush)==null||d.call(t):o.attr(c.axis,0).attr(c.attr,0),i>s&&([i,s]=[s,i]),i<0&&(s+=Math.abs(i),i=0),i!==s&&t.api.zoom([i,s].map(m=>h.invert(m))),t.setDragStatus(!1)})},setZoomResetButton(){const t=this,{config:e,$el:n}=t,r=e.zoom_resetButton;r&&e.zoom_type==="drag"&&(n.zoomResetBtn?n.zoomResetBtn.style("display",null):n.zoomResetBtn=t.$el.chart.append("div").classed(ze.button,!0).append("span").on("click",function(){ie(r.onclick)&&r.onclick.bind(t.api)(this),t.api.unzoom()}).classed(Ec.buttonZoomReset,!0).text(r.text||"Reset Zoom"))},getZoomTransform(){const t=this,e=qo(t),n=e==null?void 0:e.node();return n?Xg(t,pu(n)):{k:1}}},ZC={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0};let jg=()=>(xn(br.prototype,KC),xn(jn.prototype,YC),$a.setOptions([ZC]),(jg=()=>!0)());function Hg(t){var e;t.state.canvasShape=null,(e=t.renderCanvasFrame)==null||e.call(t,void 0,null,!1)}function Yg(t,e=!1){const n=this.internal,{config:r}=n,i=r.transition_duration&&os();return t?(r.regions=e?r.regions.concat(t):t,n.state.isCanvasMode?(Hg(n),r.regions):(n.updateRegion(),n.redrawRegion(i),r.regions)):r.regions}const Kg=function(t){return Yg.bind(this)(t)};xn(Kg,{add:function(t){return Yg.bind(this)(t,!0)},remove:function(t){const e=this.internal,{config:n,$T:r}=e,i=t||{},s=ia(i,"classes",[ss.region]);let o=n.regions;if(e.state.isCanvasMode)return Object.keys(i).length?(o=o.filter(c=>{let u=!1;return c.class?(c.class.split(" ").forEach(f=>{s.indexOf(f)>=0&&(u=!0)}),!u):!0}),n.regions=o):n.regions=[],Hg(e),n.regions;const l=e.$el.main.select(`.${ss.regions}`).selectAll(s.map(c=>`.${c}`));return r(l).style("opacity","0").remove(),Object.keys(i).length?(o=o.filter(c=>{let u=!1;return c.class?(c.class.split(" ").forEach(f=>{s.indexOf(f)>=0&&(u=!0)}),!u):!0}),n.regions=o):n.regions=[],o}});var JC={regions:Kg},QC={initRegion(){const t=this,{$el:e}=t;e.region.main=e.main.insert("g",":first-child").attr("clip-path",t.state.clip.path).attr("class",ss.regions)},updateRegion(){const t=this,{config:e,$el:{region:n},$T:r}=t;n.main||t.initRegion(),n.main.style("visibility",t.hasArcType()?"hidden":null);const i=n.main.selectAll(`.${ss.region}`).data(e.regions);r(i.exit()).style("opacity","0").remove();const s=i.enter().append("g");s.append("rect").style("fill-opacity","0"),n.list=s.merge(i).attr("class",t.classRegion.bind(t)),n.list.each(function(o){var l;Yt(this).select("text").empty()&&((l=o.label)!=null&&l.text)&&Yt(this).append("text").style("opacity","0")})},redrawRegion(t){const e=this,{$el:{region:n},$T:r}=e,i=e.regionX.bind(e),s=e.regionY.bind(e),o=["width","height"];let l=n.list.select("rect"),c=n.list.selectAll("text");return l=r(l,t).attr("x",i).attr("y",s).attr("width",e.regionWidth.bind(e)).attr("height",e.regionHeight.bind(e)),c=r(c,t).text(u=>{var f;return(f=u.label)==null?void 0:f.text}).attr("transform",({label:u})=>u.rotated?" rotate(-90)":null).attr("transform",function(u){var f;const{x:d=0,y:h=0,center:m=!1,rotated:S=!1}=(f=u.label)!=null?f:{},E=this.previousElementSibling,C={x:0,y:0};return je(m)&&["x","y"].forEach((w,$)=>{m.indexOf(w)>-1&&(C[w]=(+E.getAttribute(o[$])-ln(this)[o[$]])/2)}),`translate(${i(u)+C.x+d}, ${s(u)+C.y+h})${S?" rotate(-90)":""}`}).attr("text-anchor",({label:u})=>u!=null&&u.rotated?"end":null).attr("dy","1em").style("fill",({label:u})=>{var f;return(f=u==null?void 0:u.color)!=null?f:null}),[l.style("fill-opacity",u=>Ge(u.opacity)?u.opacity:null).on("end",function(){Yt(this.parentNode).selectAll("rect:not([x])").remove()}),c.style("opacity",null)]},regionX(t){return this.getRegionSize("x",t)},regionY(t){return this.getRegionSize("y",t)},regionWidth(t){return this.getRegionSize("width",t)},regionHeight(t){return this.getRegionSize("height",t)},getRegionSize(t,e){const n=this,{config:r,scale:i,state:s}=n,o=r.axis_rotated,l=/(x|y|y2)/.test(t),c=l?t==="x":t==="width",u=!l&&n[c?"regionX":"regionY"](e);let f=l?"start":"end",d=l?0:s[t],h;if(e.axis==="y"||e.axis==="y2"?(!l&&!c?f="start":l&&!c&&(f="end"),(c?o:!o)&&f in e&&(h=i[e.axis])):(c?!o:o)&&f in e&&(h=i.zoom||i.x),h){let m=0;d=e[f],n.axis.isTimeSeries(e.axis)?d=Wn.call(n,d):/(x|width)/.test(t)&&n.axis.isCategorized()&&isNaN(d)&&(d=r.axis_x_categories.indexOf(d),m=n.axis.x.tickOffset()*(f==="start"?-1:1)),d=h(d)+m}return l?d:d<u?0:d-u},isRegionOnX(t){return!t.axis||t.axis==="x"}};let Zg=()=>(xn(br.prototype,QC),jn.prototype.regions=JC.regions,(Zg=()=>({}))());var xi={initArea(t){const e=this,{config:n}=e;t.insert("g",`.${n.area_front?$n.circles:Mr.lines}`).attr("class",e.getClass("areas",!0))},updateAreaColor(t){const e=this;return Yv.call(e,t,"area_linearGradient",e.color)},updateArea(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{config:r,state:i,$el:s,$T:o}=n,l=e?s.subchart:s;r.area_linearGradient&&n.updateLinearGradient();const c=l.main.selectAll(`.${To.areas}`).selectAll(`.${To.area}`).data(n.lineData.bind(n));o(c.exit(),t).style("opacity","0").remove(),l.area=c.enter().append("path").attr("class",n.getClass("area",!0)).style("fill",n.updateAreaColor.bind(n)).style("opacity",function(){return i.orgAreaOpacity=Yt(this).style("opacity"),"0"}).merge(c),c.style("opacity",i.orgAreaOpacity),n.setRatioForGroupedData(l.area.data())},redrawArea(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{area:i}=n?this.$el.subchart:this.$el,{orgAreaOpacity:s}=r.state;return[r.$T(i,e,Cr()).attr("d",t).style("fill",r.updateAreaColor.bind(r)).style("opacity",o=>String(r.isAreaRangeType(o)?s/1.75:s))]},generateDrawArea(t,e){return Bd(this,t,e)}},yi={area_above:!1,area_below:!1,area_front:!0,area_linearGradient:!1,area_zerobased:!0},xu={spline_interpolation_type:"cardinal"};function _C(t){return Kn(t)&&ie(t.create)&&ie(t.update)}function qC(t,e){var n;const r=this,i=(c,u)=>{const f=c.attributes;for(let d=0,h;h=f[d];d++)h=h.name,u.setAttribute(h,c.getAttribute(h))},o=new DOMParser().parseFromString(Gr(t),"image/svg+xml").documentElement,l=Ye.createElementNS(_t.svg,o.nodeName.toLowerCase());if(l.id=e,l.style.fill="inherit",l.style.stroke="inherit",i(o,l),(n=o.childNodes)!=null&&n.length){const c=Yt(l);"innerHTML"in l?c.html(Gr(o.innerHTML)):Oa(o.childNodes).forEach(u=>{i(u,c.append(u.tagName).node())})}r.$el.defs.node().appendChild(l)}var Ti={hasValidPointType(t){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(t||this.config.point_type)},hasLegendDefsPoint(){var t;const{config:e}=this;return e.legend_show&&((t=e.point_pattern)==null?void 0:t.length)&&e.legend_usePoint},getDefsPointId(t){const{state:{datetimeId:e}}=this;return`${e}-point${t}`},getValidPointPattern(){const{config:t}=this,e=/^(circle|rect(angle)?)$/i.test(t.point_type)?t.point_type:"circle";return vn(t.point_pattern)?t.point_pattern:[e]},generatePoint(){const t=this,{$el:e,config:n}=t,r=[],i=t.getValidPointPattern();return function(s,o,...l){return function(c){var u,f,d,h;const m=t.getTargetSelectorSuffix(c.id||((u=c.data)==null?void 0:u.id)||c),S=Yt(this);r.indexOf(m)<0&&r.push(m);let E=i[r.indexOf(m)%i.length];if(t.hasValidPointType(E))E=t[E];else if(!_C(E||n.point_type)){const C=t.getDefsPointId(m);if(e.defs.select(`#${C}`).size()<1&&qC.call(t,E,C),s==="create")return(f=t.custom)==null?void 0:f.create.bind(o)(S,C,...l);if(s==="update")return(d=t.custom)==null?void 0:d.update.bind(o)(S,...l)}return(h=E[s])==null?void 0:h.bind(o)(S,...l)}}}};function t2(t,e,n,r=!1){const i=t?[t,0]:n;for(let s=t||n.reduce((o,l)=>o+l);s<=e;)n.forEach(o=>{s+o<=e&&i.push(o),s+=o});return i.length%2!==0&&i.push(r?n[1]:0),{dash:i.join(" "),length:i.reduce((s,o)=>s+o,0)}}var e2={initLine(){Kv.call(this,{elKey:"line",className:Mr.chartLines,cssRules:["pointer-events:none"]})},updateTargetsForLine(t){const e=this,{$el:{area:n,main:r}}=e,i=e.getClass("lines",!0),s=t.filter(l=>!(e.isScatterType(l)||e.isBubbleType(l))),o=su.call(e,s,{type:"Line",elKey:"line",containerClass:Mr.chartLines,itemClass:Mr.chartLine,initFn:e.initLine});if(o.append("g").attr("class",i),e.hasTypeOf("Area")){const l=r.select(`.${Mr.chartLines}`).selectAll(`.${Mr.chartLine}`),c=(!n&&o.empty()?l:o).filter(e.isAreaType.bind(e));e.initArea(c)}e.updateTargetForCircle(s,o)},updateLine(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{format:{extraLineClasses:r},$el:i,$T:s}=n,o=e?i.subchart:i,l=o.main.selectAll(`.${Mr.lines}`).selectAll(`.${Mr.line}`).data(n.lineData.bind(n));s(l.exit(),t).style("opacity","0").remove(),o.line=l.enter().append("path").attr("class",c=>`${n.getClass("line",!0)(c)} ${r(c)||""}`).style("stroke",n.color).merge(l).style("opacity",n.initialOpacity.bind(n)).attr("transform",null)},redrawLine(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{$el:i,$T:s}=r,{line:o}=n?i.subchart:i;return[s(o,e,Cr()).attr("d",t).style("stroke",this.color).style("opacity",null)]},generateDrawLine(t,e){return $d(this,t,e)},lineWithRegions(t,e,n,r){const i=this,{config:s}=i,o=s.axis_rotated,l=i.axis.isTimeSeries(),c="2 2",u=Ad(i,t,r),f=i.hasNullDataValue(t);let d,h,m,S;const E=o?it=>n(it.value):it=>e(it.x),C=o?it=>e(it.x):it=>n(it.value),w=it=>`M${it[0][0]},${it[0][1]}L${it[1][0]},${it[1][1]}`,$=l?(it,ot,ct,gt)=>{const tt=it.x.getTime(),ft=ot.x-it.x,lt=new Date(tt+ft*ct),bt=new Date(tt+ft*(ct+gt)),St=o?[[n(h(ct)),e(lt)],[n(h(ct+m)),e(bt)]]:[[e(lt),n(h(ct))],[e(bt),n(h(ct+m))]];return w(St)}:(it,ot,ct,gt)=>{const tt=e(ot.x,!o),ft=n(ot.value,o),lt=ct+gt,bt=e(d(ct),!o),St=n(h(ct),o);let Mt=e(d(lt),!o),Ot=n(h(lt),o);Mt>tt&&(Mt=tt),it.value>ot.value&&(o?Ot<ft:Ot>ft)&&(Ot=ft);const Kt=[[bt,St],[Mt,Ot]];return o&&Kt.forEach(ee=>ee.reverse()),w(Kt)},z={x:i.axis.getAxisType("x"),y:i.axis.getAxisType("y")};let B="";if(!t.length)return B;const W=i.$el.line.filter(({id:it})=>it===t[0].id),H=W.clone().style("display","none"),_=(it,ot)=>it.attr("d",ot).node().getTotalLength(),q={dash:[],lastLength:0};let st=!1;for(let it=0,ot;ot=t[it];it++){const ct=t[it-1],gt=ct&&Ge(ct.value);let tt=i.isWithinRegions(ot.x,u);if(Ge(ot.value)){if(mn(u)||!tt||!gt)B+=`${it&&gt?"L":"M"}${E(ot)},${C(ot)}`;else if(gt)if(tt=((tt==null?void 0:tt.dasharray)||c).split(" ").map(Number),d=sa(z.x,ct.x,ot.x),h=sa(z.y,ct.value,ot.value),f){const ft=e(ot.x)-e(ct.x),lt=n(ot.value)-n(ct.value),bt=Math.sqrt(ft*ft+lt*lt);m=tt[0]/bt,S=m*tt[1];for(let St=m;St<=1;St+=S)B+=$(ct,ot,St,m),St+S>=1&&(B+=$(ct,ot,1,0))}else{let ft;if(st=ot.x===t[t.length-1].x,l){const Mt=+ct.x,Ot=new Date(Mt),Kt=new Date(Mt+(+ot.x-Mt));ft=[[e(Ot),n(h(0))],[e(Kt),n(h(1))]]}else ft=[[e(d(0)),n(h(0))],[e(d(1)),n(h(1))]];o&&ft.forEach(Mt=>Mt.reverse());const lt=_(H,B),bt=_(H,B+=`L${ft[1].join(",")}`),St=t2(lt-q.lastLength,bt-q.lastLength,tt,st);q.lastLength+=St.length,q.dash.push(St.dash)}}}return q.dash.length&&(!st&&q.dash.push(_(H,B)),W.attr("stroke-dasharray",q.dash.join(" "))),H.remove(),B},isWithinRegions(t,e){return Ed(t,e)},isWithinStep(t,e){return Math.abs(e-Jn(this.state.event,t)[1])<30},shouldDrawPointsForLine(t){const e=this.config.line_point;return e===!0||qe(e)&&e.indexOf(t.id)!==-1}};const bi=()=>Cr(),Jg=new WeakMap;function Qg(t){const e=t.getAttribute("height"),n=t.getAttribute("width"),r=t.getAttribute("href")||t.getAttribute("xlink:href"),i=Jg.get(t);if(i&&i.attrHeight===e&&i.attrWidth===n&&i.href===r)return i;const{width:s,height:o}=ha(t),l={attrHeight:e,attrWidth:n,height:o,href:r,width:s};return Jg.set(t,l),l}var tl={initialOpacityForCircle(t){const{config:e,state:{withoutFadeIn:n}}=this;let r=e.point_opacity;return mn(r)&&(r=this.getBaseValue(t)!==null&&n[t.id]?this.opacityForCircle(t):"0"),r},opacityForCircle(t){var e;const{config:n}=this;let r=n.point_opacity;return mn(r)&&(r=n.point_show&&!((e=this.isPointFocusOnly)!=null&&e.call(this))?null:"0",r=Ge(this.getBaseValue(t))?this.isBubbleType(t)||this.isScatterType(t)?"0.5":r:"0"),r},initCircle(){const t=this,{$el:{main:e}}=t;!t.point&&(t.point=t.generatePoint()),(t.hasType("bubble")||t.hasType("scatter"))&&e.select(`.${ze.chart} > .${$n.chartCircles}`).empty()&&e.select(`.${ze.chart}`).append("g").attr("class",$n.chartCircles)},updateTargetForCircle(t,e){const n=this,{config:r,data:i,$el:s}=n,o=r.interaction_enabled&&r.data_selection_enabled,l=o&&r.data_selection_isselectable,c=n.getClass("circles",!0);if(!r.point_show)return;n.initCircle();let u=t,f=e;if(!u){u=n.filterNullish(i.targets).filter(h=>this.isScatterType(h)||this.isBubbleType(h));const d=s.main.select(`.${$n.chartCircles}`).style("pointer-events","none").selectAll(`.${$n.circles}`).data(u);d.exit().remove(),f=d.enter()}o&&f.append("g").attr("class",d=>n.generateClass(on.selectedCircles,d.id)),f.append("g").attr("class",c).call(d=>{n.setCssRule(!0,`.${$n.circles}`,["cursor:pointer"],l)(d),n.setCssRule(!0,` .${$n.circle}`,["fill","stroke"],n.color)(d)}).style("opacity",function(){return Yt(this.parentNode).classed($n.chartCircles)?"0":null}),o&&u.forEach(d=>{s.main.selectAll(`.${on.selectedCircles}${n.getTargetSelectorSuffix(d.id)}`).selectAll(`${on.selectedCircle}`).each(h=>{h.value=d.values[h.index].value})})},updateCircle(t=!1){const e=this,{config:n,state:r,$el:i}=e,s=e.isPointFocusOnly(),o=t?i.subchart:i;if(n.point_show&&!r.toggling){n.point_radialGradient&&e.updateLinearGradient();const l=o.main.selectAll(`.${$n.circles}`).selectAll(`.${$n.circle}`).data(d=>{const h=e.isLineType(d)&&e.shouldDrawPointsForLine(d)||e.isBubbleType(d)||e.isRadarType(d)||e.isScatterType(d)?s?[d.values[0]]:d.values:[];return e.filterNullish(h)});l.exit().remove();const c=e.pointR.bind(e),u=e.generateUpdateCircleColor(),f=e.initialOpacityForCircle.bind(e);l.enter().filter(Boolean).append(e.point("create",this,c,u)),o.circle=o.main.selectAll(`.${$n.circles} .${$n.circle}`).style("stroke",e.getStylePropValue(e.color)).style("opacity",f)}},generateUpdateCircleColor(){const t=this,e=t.getStylePropValue(t.color);return n=>t.config.point_radialGradient?t.getGradienColortUrl(n.id):e?e(n):null},updateCircleColor(t){return this.generateUpdateCircleColor()(t)},redrawCircle(t,e,n,r,i=!1){const s=this,{state:{rendered:o},$el:l,$T:c}=s,u=i?l.subchart:l,f=u.main.selectAll(`.${on.selectedCircle}`);if(!s.config.point_show)return[];const d=s.isCirclePoint()?"c":"",h=Cr(),m=s.opacityForCircle.bind(s),S=s.generateUpdateCircleColor();if(s.isCirclePoint()){const w=u.circle;return s.hasType("bubble")&&w.attr("r",s.pointR.bind(s)),n?(r&&w.attr("cx",t),c(w.filter(function(){return!!this.getAttribute("cx")}),!0,`${h}-pos`).attr("cx",t).attr("cy",e).style("fill",S),w.filter(function(){return!this.getAttribute("cx")}).attr("cx",t).attr("cy",e).style("fill",S)):w.attr("cx",t).attr("cy",e).style("fill",S),[[c(w,n||!o,h).style("opacity",m)],c(f,n).attr("cx",t).attr("cy",e)]}const E=s.point("update",s,t,e,S,n,r,f),C=[];return u.circle.each(function(w){let $=E.bind(this)(w);$=c($,n||!o,h).style("opacity",m),C.push($)}),[C,c(f,n).attr(`${d}x`,t).attr(`${d}y`,e)]},showCircleFocus(t){const e=this,{state:{hasRadar:n,resizing:r,toggling:i,transiting:s},$el:o}=e;let{circle:l}=o;if(s===!1&&l&&e.isPointFocusOnly()){const c=(n?e.radarCircleX:e.circleX).bind(e),u=(n?e.radarCircleY:e.circleY).bind(e),f=i||mn(t),d=e.point("update",e,c,u,e.getStylePropValue(e.color),r?!1:f);t&&(l=l.filter(function(h){var m;const S=(m=t.filter)==null?void 0:m.call(t,E=>E.id===h.id);return S.length?Yt(this).datum(S[0]):!1})),l.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each(function(h){const{id:m,index:S,value:E}=h;let C="hidden";Ge(E)&&(d.bind(this)(h),e.expandCircles(S,m),C=""),this.style.visibility=C})}},hideCircleFocus(){const t=this,{$el:{circle:e}}=t;t.isPointFocusOnly()&&e&&(t.unexpandCircles(),e.style("visibility","hidden"))},expandCircles(t,e,n){const r=this,i=r.pointExpandedR.bind(r);n&&r.unexpandCircles();const s=r.getShapeByIndex("circle",t,e).classed(ze.EXPANDED,!0),o=i(s)/r.config.point_r,l=1-o;r.isCirclePoint()?s.attr("r",i):s.each(function(){const c=Yt(this);if(this.tagName==="circle")c.attr("r",i);else{const{width:u,height:f}=Qg(this),d=l*(+c.attr("x")+u/2),h=l*(+c.attr("y")+f/2);c.attr("transform",`translate(${d} ${h}) scale(${o})`)}})},unexpandCircles(t){const e=this,n=e.pointR.bind(e),r=e.getShapeByIndex("circle",t).filter(function(){return Yt(this).classed(ze.EXPANDED)}).classed(ze.EXPANDED,!1);if(r.attr("r",n),!e.isCirclePoint()){const i=n(r)/e.config.point_r;r.attr("transform",i!==1?`scale(${i})`:null)}},isWithinCircle(t,e){const{state:n}=this,r=Jn(n.event,t),i=Yt(t),s=this.isCirclePoint(t)?"c":"",o=this.getPointSensitivity(i==null?void 0:i.datum());let l=+i.attr(`${s}x`),c=+i.attr(`${s}y`);if(!(l||c)&&t.nodeType===1){const{x:d,y:h}=ln(t);l=d,c=h}const u=l-r[0],f=c-r[1];return Math.sqrt(u*u+f*f)<(e||o)},updatePointClass(t){const e=this,{circle:n}=e.$el;let r=!1;return(He(t)||n)&&(r=t===!0?n.each(function(i){let s=e.getClass("circle",!0)(i);this.getAttribute("class").indexOf(ze.EXPANDED)>-1&&(s+=` ${ze.EXPANDED}`),this.setAttribute("class",s)}):e.getClass("circle",!0)(t)),r},custom:{create(t,e,n){return t.append("use").attr("xlink:href",`#${e}`).attr("class",this.updatePointClass.bind(this)).style("fill",n).node()},update(t,e,n,r,i,s,o){const l=this,{width:c,height:u}=Qg(t.node()),f=m=>Ge(m.value)?e(m)-c/2:0,d=m=>Ge(m.value)?n(m)-u/2:0;let h=t;return i&&(s&&h.attr("x",f),h=l.$T(h,i,bi()),o&&l.$T(o,i,bi())),h.attr("x",f).attr("y",d).style("fill",r)}},circle:{create(t,e,n){return t.append("circle").attr("class",this.updatePointClass.bind(this)).attr("r",e).style("fill",n).node()},update(t,e,n,r,i,s,o){const l=this;let c=t;return l.hasType("bubble")&&c.attr("r",l.pointR.bind(l)),i&&(s&&c.attr("cx",e),c.attr("cx")&&(c=l.$T(c,i,bi())),o&&l.$T(o,i,bi())),c.attr("cx",e).attr("cy",n).style("fill",r)}},rectangle:{create(t,e,n){const r=i=>e(i)*2;return t.append("rect").attr("class",this.updatePointClass.bind(this)).attr("width",r).attr("height",r).style("fill",n).node()},update(t,e,n,r,i,s,o){const l=this,c=l.config.point_r,u=h=>e(h)-c,f=h=>n(h)-c;let d=t;return i&&(s&&d.attr("x",u),d=l.$T(d,i,bi()),o&&l.$T(o,i,bi())),d.attr("x",u).attr("y",f).style("fill",r)}}},ka={point_show:!0,point_r:2.5,point_radialGradient:!1,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_focus_only:!1,point_opacity:void 0,point_pattern:[],point_select_r:void 0,point_type:"circle"},n2={line_connectNull:!1,line_step_type:"step",line_step_tooltipMatch:!1,line_zerobased:!1,line_classes:void 0,line_point:!0};function _g(t,e,n){const{config:r}=t,i=(s,o)=>{const l=ae(o)?o:o===!1?void 0:null;l!==null&&(r[`axis_${s}_${e}`]=l)};sn(n)&&(Kn(n)?Object.keys(n).forEach(s=>{i(s,n[s])}):(ae(n)||n===!1)&&["y","y2"].forEach(s=>{i(s,n)}),t.state.dirty.data=!0,t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function qg(t,e){const{config:n}=t;return{x:n[`axis_x_${e}`],y:n[`axis_y_${e}`],y2:n[`axis_y2_${e}`]}}var r2={axis:{labels:function(t){var e;const n=this.internal;let r;return t&&(Object.keys(t).forEach(i=>{n.axis.setLabelText(i,t[i])}),n.state.isCanvasMode?(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1):n.axis.updateLabels()),["x","y","y2"].forEach(i=>{const s=n.axis.getLabelText(i);s&&(!r&&(r={}),r[i]=s)}),r},min:function(t){const e=this.internal;return Ge(t)||t===!1?_g(e,"min",t):qg(e,"min")},max:function(t){const e=this.internal;return Ge(t)||t===!1?_g(e,"max",t):qg(e,"max")},range:function(t){const{axis:e}=this;if(arguments.length){const{min:n,max:r}=t;sn(r)&&e.max(r),sn(n)&&e.min(n)}else return{max:e.max(),min:e.min()}}}},a2={groups(t){const e=this.internal,{config:n}=e;return mn(t)||(n.data_groups=t,e.state.dirty.data=!0,e.redraw()),n.data_groups}},i2={x(t){const e=this.internal,{axis:n,data:r}=e,i=n.isCustomX()&&n.isCategorized();return qe(t)&&(i?this.categories(t):(e.updateTargetX(r.targets,t),e.state.dirty.data=!0,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),i?this.categories():r.xs},xs(t){const e=this.internal;return He(t)&&(e.updateTargetXs(e.data.targets,t),e.state.dirty.data=!0,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},s2=Object.defineProperty,o2=(t,e,n)=>e in t?s2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,el=(t,e,n)=>o2(t,typeof e!="symbol"?e+"":e,n);class l2{constructor(e){el(this,"owner"),el(this,"config"),el(this,"scale"),el(this,"charSize",{});const n=sa(),{config:r,params:i}=e;this.owner=e,this.config=r,this.scale=n,(r.noTransition||!i.config.transition_duration)&&(r.withoutTransition=!0),r.range=this.scaleExtent((i.orgXScale||n).range())}getSizeFor1Char(e,n,r=!0){const i={w:5.5,h:11.5};return this.charSize[e]&&r?this.charSize[e]:(!n.empty()&&n.text("0").call(s=>{try{const{width:o,height:l}=ha(s.node(),!0);o&&l&&(i.w=o,i.h=l)}finally{s.text("")}}),this.charSize[e]=i,i)}getTickTransformSetter(e){const{config:n}=this,r=e==="x"?i=>`translate(${i+n.tickOffset},0)`:i=>`translate(0,${i})`;return(i,s)=>{i.attr("transform",o=>{const l=s(o);return Ge(o)?r(l):null})}}scaleExtent(e){const n=e[0],r=e[e.length-1];return n<r?[n,r]:[r,n]}generateTicks(e,n){const{tickStepSize:r}=this.owner.params,[i,s]=e.domain();let o=[];if(n&&r){let l=Math.round(i);for(;l<=s;)o.push(l),l+=r}else if(e.ticks){const{tickArguments:l}=this.config;if(e.type==="log"&&!l){const c=sa("_log").domain([i>0?i:1,s]).range(e.range());o=c.ticks();for(let u=s.toFixed().length;o.length>15;u--)o=c.ticks(u);o.splice(0,1,i),o.splice(o.length-1,1,s)}else o=e.ticks(...this.config.tickArguments||[])}return o}copyScale(){const e=this.scale.copy();return e.domain().length||e.domain(this.scale.domain()),e.type=this.scale.type,e}textFormatted(e){const n=this.config.tickFormat,r=/\d+\.\d+0{5,}\d$/.test(e)?+String(e).replace(/0+\d$/,""):e,i=n?n(r):r;return sn(i)?i:""}transitionise(e){const{config:n}=this;let r=e;if(n.withoutTransition)r=e.interrupt();else if(n.transition||!this.owner.params.noTransition)try{r=e.transition(n.transition)}catch(i){}return r}}var c2=Object.defineProperty,u2=(t,e,n)=>e in t?c2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ys=(t,e,n)=>u2(t,typeof e!="symbol"?e+"":e,n);function nl(t){return t==="subX"?"x":t==="subY"?"y":t==="subY2"?"y2":t}function f2(t){const e=nl(t);return/^sub/.test(t)?`subchart_axis_${e}`:`axis_${e}`}class tp{constructor(e={}){ys(this,"helper"),ys(this,"config"),ys(this,"params"),ys(this,"g"),ys(this,"generatedTicks",[]);const n={innerTickSize:xt,outerTickSize:e.outerTick?xt:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:Gt,tickOffset:0,tickPadding:mt,tickValues:null,transition:null,noTransition:e.noTransition};n.tickLength=Math.max(n.innerTickSize,0)+n.tickPadding,this.config=n,this.params=e,this.helper=new l2(this)}canReuseTickTextOnResize(e){const{config:n,params:r}=this,{config:i,id:s,owner:o}=r,l=/^(x|subX)$/.test(s),c=nl(s),u=/^sub/.test(s)?i[`subchart_axis_${c}_tick_format`]||i[`axis_${c}_tick_format`]:i[`axis_${c}_tick_format`],f=r.tickMultiline&&r.isCategory&&!e&&!(r.tickWidth>0);return!!(o.state.resizing&&!o.state.flowing&&!ie(i.axis_evalTextSize)&&!u&&!r.tickTitle&&!(l&&i.axis_x_tick_autorotate)&&!f&&n.withoutTransition)}canReuseTickNodesOnResize(e,n,r,i){if(i.tick||!i.text||!this.canReuseTickTextOnResize(r)||e.size()!==n.length)return!1;const s=e.nodes();for(let o=0;o<n.length;o++){const l=s[o].__data__,c=n[o];if(l instanceof Date||c instanceof Date){if(+l!=+c)return!1}else if(l!==c)return!1}return!0}create(e){const n=this,{config:r,helper:i,params:s}=n,{scale:o}=i,{orient:l}=r,c=this.splitTickText.bind(n),u=/^(left|right)$/.test(l),f=/^(top|bottom)$/.test(l),d=i.getTickTransformSetter(f?"x":"y"),h=d===i.axisX?"y":"x",m=/^(top|left)$/.test(l)?-1:1,S=s.tickTextRotate;this.config.range=o.rangeExtent?o.rangeExtent():i.scaleExtent((s.orgXScale||o).range());const{innerTickSize:E,tickLength:C,range:w}=r,$=s.id,z=nl($),{isSubAxes:B}=s,W=!B&&z&&/^(x|y|y2)$/.test(z)?s.config[`axis_${z}_tick_text_position`]:{x:0,y:0},H=f2($),_=s.config[`${H}_show`],q=B?{tick:!0,text:!0}:{tick:_?s.config[`${H}_tick_show`]:!1,text:_?s.config[`${H}_tick_text_show`]:!1},st=s.config.axis_evalTextSize;let it;e.each(function(){const ot=Yt(this);let ct=this.__chart__||o,gt=i.copyScale();it=ot,this.__chart__=gt,r.tickOffset=s.isCategory?(gt(1)-gt(0))/2:0;const tt=ot.selectAll(".domain").data([0]);if(tt.enter().append("path").attr("class","domain").merge(tt).attr("d",()=>{const ft=r.outerTickSize*m;return f?`M${w[0]},${ft}V0H${w[1]}V${ft}`:`M${ft},${w[0]}H0V${w[1]}H${ft}`}),q.tick||q.text){const ft=r.tickValues||i.generateTicks(gt,u||s.config.axis_rotated);n.generatedTicks=ft;let lt=ot.selectAll(".tick");if(n.canReuseTickNodesOnResize(lt,ft,u||s.config.axis_rotated,q))d(lt,gt);else{lt=lt.data(ft,gt);const St=lt.enter().insert("g",".domain").attr("class","tick"),Mt=lt.exit().remove();lt=St.merge(lt),q.tick&&St.append("line"),q.text&&St.append("text");const Ot=!St.empty()||!Mt.empty(),Kt=q.text&&!Ot&&n.canReuseTickTextOnResize(u||s.config.axis_rotated);let ee={w:0,h:0},Ae=lt.selectAll("text.__bb-empty");if(q.text&&!Kt){const Te=lt.select("text"),De=[];Ae=Te,ie(st)&&(ee=st.bind(n.params.owner.api)(Te.node(),$),this.classList.contains(ze.dummy)&&(this.sizeFor1Char=ee)),(!ee||ee.w===0||ee.h===0)&&(ee=n.helper.getSizeFor1Char(l,Te,!!st));let me=Te.selectAll("tspan").data((Pe,Zt)=>{let he;if(s.tickMultiline)he=c(Pe,gt,ft,u,ee.w);else{const ge=i.textFormatted(Pe);he=qe(ge)?ge.concat():[ge]}return De[Zt]=he.length,he.map(ge=>({index:Zt,splitted:ge}))});me.exit().remove(),me=me.enter().append("tspan").merge(me).text(Pe=>Pe.splitted),me.attr("x",f?0:C*m).attr("dx",(()=>{let Pe=0;return/(top|bottom)/.test(l)&&S&&(Pe=8*Math.sin(Math.PI*(S/180))*(l==="top"?-1:1)),Pe+(W.x||0)})()).attr("dy",(Pe,Zt)=>{const he=".71em";let ge=0;return l!=="top"&&(ge=ee.h,Zt===0&&(ge=u?-((De[Pe.index]-1)*(ee.h/2)-3):W.y===0?he:0)),ae(ge)&&W.y?ge+W.y:ge||he})}const Ee=lt.select("line");if(St.select("line").attr(`${h}2`,E*m),St.select("text").attr(h,C*m),n.setTickLineTextPosition(Ee,Ae,ee),s.tickTitle){const Te=Ae.select("title"),De=s.tickTitle;(Te.empty()?Ae.append("title"):Te).text(me=>De[Number(me)])}if(gt.bandwidth){const Te=gt,De=Te.bandwidth()/2;ct=me=>Te(me)+De,gt=ct}else ct.bandwidth?ct=gt:d(Mt,gt);lt=s.owner.state.flowing?i.transitionise(lt):s.owner.$T(lt),d(St,ct),d(lt.style("opacity",null),gt)}}}),this.g=it}getGeneratedTicks(e){var n;const r=((n=this.generatedTicks)==null?void 0:n.length)-1;let i=this.generatedTicks;if(r>e){const s=Math.round(r/e+.1);i=this.generatedTicks.map((o,l)=>l%s===0?o:null).filter(o=>o!==null).splice(0,e)}return i}getTickXY(){const{config:e}=this,n={x:0,y:0};return this.params.isCategory&&(n.x=e.tickCentered?0:e.tickOffset,n.y=e.tickCentered?e.tickOffset:0),n}getTickSize(e){const{scale:n}=this.helper,{config:r}=this,{innerTickSize:i,range:s}=r,o=n(e)+(r.tickCentered?0:r.tickOffset);return s[0]<o&&o<s[1]?i:0}setTickLineTextPosition(e,n,r){const i=this.getTickXY(),{innerTickSize:s,orient:o,tickLength:l,tickOffset:c}=this.config,u=this.params.id,f=this.params.tickTextRotate,d=6,h=r.h/2-d,m=z=>{const B=["start","end"];return o==="top"&&B.reverse(),z?B[z>0?0:1]:"middle"},S=z=>z?`rotate(${z})`:null,E=z=>{const B=z/(o==="bottom"?15:23);return z?11.5-2.5*B*(z>0?1:-1):l},{config:{axis_rotated:C,axis_x_tick_text_inner:w}}=this.params.owner,$=this.params.config[`axis_${nl(u)}_tick_inner`];switch(o){case"bottom":e.attr("x1",i.x).attr("x2",i.x).attr("y2",z=>this.getTickSize.bind(this)(z)*($?-1:1)),n.attr("x",0).attr("y",E(f)).style("text-anchor",(z,B,{length:W})=>!C&&B===0&&(w===!0||w.first)?"start":!C&&B===W-1&&(w===!0||w.last)?"end":m(f)).attr("transform",S(f));break;case"top":e.attr("x2",0).attr("y2",$?s:-s),n.attr("x",0).attr("y",-(E(f)+h+d)).style("text-anchor",m(f)).attr("transform",S(f));break;case"left":e.attr("x2",$?s:-s).attr("y1",i.y).attr("y2",i.y),n.attr("x",-l).attr("y",c+(C?h/4:h)).style("text-anchor","end");break;case"right":e.attr("x2",$?-s:s).attr("y2",0),n.attr("x",l).attr("y",h).style("text-anchor","start")}}splitTickText(e,n,r,i,s){const{params:o}=this,l=this.helper.textFormatted(e),c=je(l)&&l.indexOf(`
59
59
  `)>-1?l.split(`
60
- `):[];if(c.length)return c;if(en(l))return l;let u=s.tickWidth;(!u||u<=0)&&(u=i?95:s.isCategory?(s.isInverted?n(r[0])-n(r[1]):n(r[1])-n(r[0]))-12:110);function f(d,h){let m,S,E;for(let C=1;C<h.length;C++)if(h.charAt(C)===" "&&(S=C),m=h.substr(0,C+1),E=o*m.length,u<E)return f(d.concat(h.substr(0,S||C)),h.slice(S?S+1:C));return d.concat(h)}return f(c,String(l))}scale(e){return arguments.length?(this.helper.scale=e,this):this.helper.scale}orient(e){return arguments.length?(this.config.orient=e in{top:1,right:1,bottom:1,left:1}?String(e):"bottom",this):this.config.orient}tickFormat(e){const{config:n}=this;return arguments.length?(n.tickFormat=e,this):n.tickFormat}tickCentered(e){const{config:n}=this;return arguments.length?(n.tickCentered=e,this):n.tickCentered}tickOffset(){return this.config.tickOffset}tickInterval(e){var n,r,i;const{outerTickSize:o,tickOffset:s,tickValues:l}=this.config;let c;if(this.params.isCategory){const u=(n=this.params.owner.scale.zoom)!=null?n:this.helper.scale;c=s*2||Math.abs(u(1)-u(0))}else{const u=(r=this.params.owner.scale.zoom)!=null?r:this.helper.scale;if(c=(this.g?this.g.select("path.domain").node().getTotalLength()-o*2:Math.abs(u.range()[1]-u.range()[0]))/(e||((i=this.g)==null?void 0:i.selectAll("line").size())||1),l)for(let d=0;d<l.length-1;d++){const h=u(l[d+1])-u(l[d]);h&&h<c&&(c=h)}}return c===1/0?0:c}ticks(...e){const{config:n}=this;return e.length?(n.tickArguments=La(e),this):n.tickArguments}tickCulling(e){const{config:n}=this;return arguments.length?(n.tickCulling=e,this):n.tickCulling}tickValues(e){const{config:n}=this;if(ue(e))n.tickValues=()=>e(this.helper.scale.domain());else{if(!arguments.length)return n.tickValues;n.tickValues=e}return this}setTransition(e){return this.config.transition=e,this}}var c2=Object.defineProperty,u2=Object.defineProperties,f2=Object.getOwnPropertyDescriptors,Kv=Object.getOwnPropertySymbols,d2=Object.prototype.hasOwnProperty,h2=Object.prototype.propertyIsEnumerable,gu=(t,e,n)=>e in t?c2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,g2=(t,e)=>{for(var n in e||(e={}))d2.call(e,n)&&gu(t,n,e[n]);if(Kv)for(var n of Kv(e))h2.call(e,n)&&gu(t,n,e[n]);return t},v2=(t,e)=>u2(t,f2(e)),Rr=(t,e,n)=>gu(t,typeof e!="symbol"?e+"":e,n);function vu(t){return t==="subX"?"x":t==="subY"?"y":t==="subY2"?"y2":t}function Js(t){return/^sub/.test(t)}function Sa(t,e,n){const r=vu(e),i=t[`subchart_axis_${r}_tick_${n}`];return Js(e)&&i!==void 0?i:t[`axis_${r}_tick_${n}`]}function p2(t){var e,n;const r=[t[0],t[t.length-1]];let i=0,o=null;for(const l of t){const c=(n=(e=l.textContent)==null?void 0:e.length)!=null?n:0;c>i&&(i=c,o=l)}o&&!r.includes(o)&&r.push(o);const s=t[Math.floor(t.length/2)];return r.includes(s)||r.push(s),r}const Qs=50,pu=Symbol("tickWidthFallback");function m2(t){var e,n,r;const i=t.select("line").node(),o=(n=(e=i==null?void 0:i.ownerDocument)==null?void 0:e.defaultView)!=null&&n.getComputedStyle?parseFloat(i.ownerDocument.defaultView.getComputedStyle(i).strokeWidth):parseFloat((r=i==null?void 0:i.getAttribute)==null?void 0:r.call(i,"stroke-width"));return Number.isFinite(o)&&o>0?o:1}function x2(t,e,n){var r;const i=(r=t==null?void 0:t.scale)==null?void 0:r.call(t);if(!i||e.length<2)return!1;const o=Math.max(1,n)/2,s=e.map(c=>+i(c)).filter(Number.isFinite).sort((c,u)=>c-u);if(s.length<2)return!1;let l=s[0]+o;for(let c=1;c<s.length;c++){const u=s[c]-o,f=s[c]+o;if(u<=l+Va)return!0;l=Math.max(l,f)}return!1}function y2(t,e){if(t.length<=Qs)return t;const n=new Map,r=l=>{l>=0&&l<t.length&&n.set(l,t[l])};r(0),r(t.length-1),r(Math.floor(t.length/2));const i=Math.max(1,Math.floor(t.length/(Qs-3)));let o=-1,s=0;for(let l=0;l<t.length;l+=i){r(l);const c=t[l],u=e?e(c):c,f=Array.isArray(u)?u.join("").length:String(u!=null?u:"").length;f>o&&(o=f,s=l)}return r(s),Array.from(n.keys()).sort((l,c)=>l-c).map(l=>n.get(l))}function T2(t){return ue(t)?Jv(t):!Array.isArray(t)||t.length<=Qs?t:{length:t.length,first:t[0],middle:t[Math.floor(t.length/2)],last:t[t.length-1]}}function mu(t){return t[pu]}function _s(t,e){le(e)?Object.defineProperty(t,pu,{configurable:!0,value:e,writable:!0}):delete t[pu]}function xu(t){t.length=0,_s(t)}function b2(t,e,n){xu(t),t.length=e,_s(t,n)}function S2(t){const e=[];return e.length=t.length,Object.keys(t).forEach(n=>{const r=+n;e[r]=t[r]}),_s(e,mu(t)),e}function A2(t,e){xu(t),t.length=e.length,Object.keys(e).forEach(n=>{const r=+n;t[r]=e[r]}),_s(t,mu(e))}function E2(t,e,n){const r=t[e];if(le(r))return r;const i=Number(r);return Number.isFinite(i)?i:n}const Zv=new WeakMap;let C2=0;function Jv(t){if(!t||!/^(function|object)$/.test(typeof t))return`${typeof t}:${String(t)}`;let e=Zv.get(t);return e||(e=++C2,Zv.set(t,e)),`${typeof t}:${e}`}function yu(t){return t instanceof Date?`date:${+t}`:Array.isArray(t)?`[${t.map(e=>yu(e)).join(",")}]`:t&&typeof t=="object"?`{${Object.keys(t).sort().map(e=>`${e}:${yu(t[e])}`).join(",")}}`:typeof t=="function"?Jv(t):`${typeof t}:${String(t)}`}function Tu(t){return t instanceof Date?new Date(+t):Array.isArray(t)?t.map(e=>Tu(e)):t}function I2(t){return{width:t.width,height:t.height,ticks:t.ticks&&S2(t.ticks),clipPath:t.clipPath,domain:Tu(t.domain)}}function R2(t,e){return t.width=e.width,t.height=e.height,t.clipPath=e.clipPath,t.domain=Tu(e.domain),t.ticks&&e.ticks&&A2(t.ticks,e.ticks),t}var w2={getAxisInstance:function(){return this.axis||new O2(this)}};class O2{constructor(e){Rr(this,"owner"),Rr(this,"x"),Rr(this,"subX"),Rr(this,"subY"),Rr(this,"subY2"),Rr(this,"y"),Rr(this,"y2"),Rr(this,"axesList",{}),Rr(this,"tick",{x:null,y:null,y2:null}),Rr(this,"xs",[]),Rr(this,"orient",{x:"bottom",y:"left",y2:"right",subX:"bottom",subY:"left",subY2:"right"}),this.owner=e,this.setOrient()}getAxisClassName(e){return`${Pn.axis} ${Pn[`axis${Nn(e)}`]}`}isHorizontal(e,n){const r=e.config.axis_rotated;return n?r:!r}isCategorized(){const{config:e,state:n}=this.owner;return e.axis_x_type.indexOf("category")>=0||n.hasRadar}isCustomX(){const{config:e}=this.owner;return!this.isTimeSeries()&&(e.data_x||pn(e.data_xs))}isTimeSeries(e="x"){return this.owner.config[`axis_${e}_type`]==="timeseries"}isLog(e="x"){return this.owner.config[`axis_${e}_type`]==="log"}isTimeSeriesY(){return this.isTimeSeries("y")}getAxisType(e="x"){let n="linear";return this.isTimeSeries(e)?n=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(e)&&(n="log"),n}getExtent(){const e=this.owner,{config:n,scale:r}=e;let i=n.axis_x_extent;if(i){if(ue(i))i=i.bind(e.api)(e.getXDomain(e.data.targets),r.subX);else if(this.isTimeSeries()&&i.every(isNaN)){const o=Kn.bind(e);i=i.map(s=>r.subX(o(s)))}}return i}init(){const e=this.owner,{config:n,$el:{main:r,axis:i},state:{clip:o}}=e,s=["x","y"];n.axis_y2_show&&s.push("y2"),s.forEach(l=>{const c=this.getAxisClassName(l);i[l]=r.append("g").attr("class",c).attr("clip-path",()=>{let u=null;return l==="x"?u=o.pathXAxis:l==="y"&&(u=o.pathYAxis),u}).attr("transform",e.getTranslate(l)).style("visibility",n[`axis_${l}_show`]?null:"hidden"),this.generateAxes(l)})}setOrient(){const e=this.owner,{axis_rotated:n,axis_y_inner:r,axis_y2_inner:i}=e.config;this.orient={x:n?"left":"bottom",y:n?r?"top":"bottom":r?"right":"left",y2:n?i?"bottom":"top":i?"left":"right",subX:n?"left":"bottom",subY:n?r?"top":"bottom":r?"right":"left",subY2:n?i?"bottom":"top":i?"left":"right"}}generateAxes(e){const n=this.owner,{config:r}=n,i=[],o=r[`axis_${e}_axes`],s=r.axis_rotated;let l;e==="x"?l=s?"left":"bottom":e==="y"?l=s?"bottom":"left":e==="y2"&&(l=s?"top":"right"),o.length&&o.forEach(c=>{const u=c.tick||{},f=n.scale[e].copy();c.domain&&f.domain(c.domain);const d=new Yv({outerTick:u.outer!==!1,noTransition:!1,config:r,id:e,isSubAxes:!0,owner:n}).scale(f).orient(l).tickFormat(ue(u.format)?u.format.bind(n.api):(h=>h));Xe(u.count)&&d.ticks(u.count),u.values&&d.tickValues(u.values),i.push(d)}),this.axesList[e]=i}updateAxes(){const e=this.owner,{config:n,$el:{main:r},$T:i}=e;Object.keys(this.axesList).forEach(o=>{const s=n[`axis_${o}_axes`],l=e.scale[o].copy(),c=l.range();this.axesList[o].forEach((u,f)=>{const d=u.scale().range();c.every((S,E)=>S===d[E])||u.scale().range(c);const h=`${this.getAxisClassName(o)}-${f+1}`;let m=r.select(`.${h.replace(/\s/,".")}`);m.empty()?(m=r.append("g").attr("class",h).style("visibility",n[`axis_${o}_show`]?null:"hidden"),u.create(m)):(s[f].domain&&l.domain(s[f].domain),u.scale(l).create(i(m))),m.attr("transform",e.getTranslate(o,f+1))})})}setAxis(e,n,r,i){const o=this.owner,s=vu(e);Js(e)||(this.tick[s]=this.getTickValues(s)),this[e]=this.getAxis(e,n,r,e==="x"&&(o.scale.zoom||o.config.subchart_show||o.state.resizing)?!0:i)}getAxis(e,n,r,i,o){const s=this.owner,{config:l}=s,c=/^(x|subX)$/.test(e),u=vu(e),f=c&&this.isCategorized(),d=this.orient[e],h=o?0:s.getAxisTickRotate(u);let m;if(c)m=e==="subX"?s.format.subXAxisTick:s.format.xAxisTick;else{const N=Js(e)?l[`subchart_axis_${u}_tick_format`]||l[`axis_${u}_tick_format`]:l[`axis_${u}_tick_format`];ue(N)&&(m=N.bind(s.api))}let S=Js(e)?this.getTickValues(u,!0):this.tick[u];const E=Kr({outerTick:r,noTransition:i,config:l,id:e,tickTextRotate:h,owner:s},c&&{isCategory:f,isInverted:l.axis_x_inverted,tickMultiline:l.axis_x_tick_multiline,tickWidth:l.axis_x_tick_width,tickTitle:f&&l.axis_x_tick_tooltip&&s.api.categories(),orgXScale:s.scale.x});c||(E.tickStepSize=l[`axis_${u}_tick_stepSize`]);const C=new Yv(E).scale(c&&s.scale.zoom||n).orient(d);if(c&&this.isTimeSeries()&&S&&!ue(S)){const N=Kn.bind(s);S=S.map(z=>N(z))}else!c&&this.isTimeSeriesY()&&(C.ticks(l.axis_y_tick_time_value),S=null);S&&C.tickValues(S),C.tickFormat(m||!c&&s.isStackNormalized()&&s.hasAxisGroupedData(u)&&(N=>`${N}%`)),f&&(C.tickCentered(l.axis_x_tick_centered),dr(l.axis_x_tick_culling)&&(l.axis_x_tick_culling=!1));const w=Sa(l,e,"count");return w&&C.ticks(w),C}updateXAxisTickValues(e,n){var r;const i=this.owner,{config:o}=i,s=o.axis_x_tick_fit,l=(u=o.axis_x_tick_count)=>{let f=u,d;return s&&(d=i.mapTargetsToUniqueXs(e),this.isCategorized()&&f>d.length&&(f=d.length),d=this.generateTickValues(d,f,this.isTimeSeries())),d},c=l();if(n)n.tickValues(c);else if(this.x){const u=this.getTickValues("x",!0),f=Sa(o,"subX","count"),d=u!=null?u:f!==o.axis_x_tick_count?l(f):c;this.x.tickValues(c),(r=this.subX)==null||r.tickValues(d)}return c}getId(e){const{config:n,scale:r}=this.owner;let i=n.data_axes[e];return(!i||!r[i])&&(i="y"),i}getXAxisTickFormat(e){const n=this.owner,{config:r,format:i}=n,o=e&&r.subchart_axis_x_tick_format||r.axis_x_tick_format,s=this.isTimeSeries(),l=this.isCategorized();let c;return o?ue(o)?c=o.bind(n.api):s&&(c=u=>u?i.axisTime(o)(u):""):c=s?i.defaultAxisTime:l?n.categoryName:u=>u<0?u.toFixed(0):u,ue(c)?u=>c.apply(n,l?[u,n.categoryName(u)]:[u]):c}getTickValues(e,n=!1){const r=this.owner,i=n?Sa(r.config,`sub${Nn(e)}`,"values"):r.config[`axis_${e}_tick_values`],o=ue(i)?i.call(r.api):i,s=r[`${e}Axis`];return n?o!=null?o:void 0:o||(s?s.tickValues():void 0)}getLabelOptionByAxisId(e){return this.owner.config[`axis_${e}_label`]}getLabelText(e){const n=this.getLabelOptionByAxisId(e);return Ye(n)?n:n?n.text:null}setLabelText(e,n){const r=this.owner,{config:i}=r,o=this.getLabelOptionByAxisId(e);Ye(o)?i[`axis_${e}_label`]=n:o&&(o.text=n)}getLabelPosition(e,n){const r=this.owner.config.axis_rotated,i=this.getLabelOptionByAxisId(e),o=qn(i)&&i.position?i.position:n[+!r],s=l=>!!~o.indexOf(l);return{isInner:s("inner"),isOuter:s("outer"),isLeft:s("left"),isCenter:s("center"),isRight:s("right"),isTop:s("top"),isMiddle:s("middle"),isBottom:s("bottom")}}getAxisLabelPosition(e){return this.getLabelPosition(e,e==="x"?["inner-top","inner-right"]:["inner-right","inner-top"])}xForAxisLabel(e){const n=this.owner,{state:{width:r,height:i}}=n,o=this.getAxisLabelPosition(e);let s=o.isMiddle?-i/2:0;return this.isHorizontal(n,e!=="x")?s=o.isLeft?0:o.isCenter?r/2:r:o.isBottom&&(s=-i),s}textAnchorForAxisLabel(e){const n=this.owner,r=this.getAxisLabelPosition(e);let i=r.isMiddle?"middle":"end";return this.isHorizontal(n,e!=="x")?i=r.isLeft?"start":r.isCenter?"middle":"end":r.isBottom&&(i="start"),i}dxForAxisLabel(e){const n=this.owner,r=this.getAxisLabelPosition(e);let i=r.isBottom?"0.5em":"0";return this.isHorizontal(n,e!=="x")?i=r.isLeft?"0.5em":r.isRight?"-0.5em":"0":r.isTop&&(i="-0.5em"),i}dyForAxisLabel(e){const n=this.owner,{config:r}=n,i=r.axis_rotated,o=this.getAxisLabelPosition(e).isInner,s=r[`axis_${e}_tick_rotate`]?n.getHorizontalAxisHeight(e):0,{width:l}=this.getMaxTickSize(e);let c;if(e==="x"){const u=r.axis_x_height;i?c=o?"1.2em":-25-l:o?c="-0.5em":u?c=u-10:s?c=s-10:c="3em"}else c={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[e],i?o?c=c[0]:s?c=s*(e==="y2"?-1:1)-c[1]:c=c[2]:c=o?c[3]:(c[4]+(r[`axis_${e}_inner`]?0:l+c[4]))*(e==="y"?-1:1);return c}getTickFormatCacheValue(e){const n=this.owner,{config:r}=n;return e==="x"?{format:r.axis_x_tick_format,type:r.axis_x_type,localtime:r.axis_x_localtime,categories:r.axis_x_categories}:{format:r[`axis_${e}_tick_format`],normalized:n.isStackNormalized(),grouped:n.hasAxisGroupedData(e),type:r[`axis_${e}_type`]}}getMaxTickSizeFingerprint(e,n,r,i,o,s){var l;const c=this.owner,{config:u,state:f}=c,d=e==="x",h=d?"axis_x":`axis_${e}`,m=i.tickValues();return yu({id:e,withoutRecompute:!!s,dataGeneration:f.dataGeneration,size:[f.current.width,f.current.height],range:(l=n.range)==null?void 0:l.call(n),domain:r,type:n.type,orient:this.orient[e],axisRotated:u.axis_rotated,evalTextSize:u.axis_evalTextSize,format:this.getTickFormatCacheValue(e),ticks:{values:T2(m),rawValues:u[`${h}_tick_values`],arguments:i.ticks(),count:u[`${h}_tick_count`],rotate:o,show:u[`${h}_tick_show`],textShow:u[`${h}_tick_text_show`],textPosition:u[`${h}_tick_text_position`],inner:u[`${h}_tick_inner`],culling:u[`${h}_tick_culling`],cullingMax:u[`${h}_tick_culling_max`],cullingLines:u[`${h}_tick_culling_lines`],cullingReverse:u[`${h}_tick_culling_reverse`],stepSize:!d&&u[`${h}_tick_stepSize`],timeValue:!d&&u[`${h}_tick_time_value`],fit:d&&u.axis_x_tick_fit,autorotate:d&&u.axis_x_tick_autorotate,centered:d&&u.axis_x_tick_centered,inverted:d&&u.axis_x_inverted,multiline:d&&u.axis_x_tick_multiline,width:d&&u.axis_x_tick_width}})}getMaxTickSize(e,n){var r;const i=this.owner,{config:o,state:s,$el:{svg:l,chart:c}}=i,{current:u,resizing:f}=s,d=u.maxTickSize[e],h=`${ke.maxTickSize}_${e}_${!!n}`,m=i.cache.get(h);if(m&&m.generation===s.redrawGeneration)return d;const S=`axis_${e}`,E={width:0,height:0};let C;if(f||n||!o[`${S}_show`]||d.width>0&&i.filterTargetsToShow().length===0)return d;if((l||o.render_mode==="canvas")&&((r=i.scale[e])!=null&&r.copy)){const w=/^y2?$/.test(e),N=i.getTargetsToShow(),z=i.scale[e].copy().domain(i[`get${w?"Y":"X"}Domain`](N,e)),$=z.domain(),G=$[0]===$[1]&&$.every(Tt=>Tt>0),V=en(d.domain)&&d.domain[0]===d.domain[1]&&d.domain.every(Tt=>Tt>0);if(G||V)return d;d.domain=$,w||xu(d.ticks);const J=this.getAxis(e,z,!1,!1,!0),Q=o[`${S}_tick_rotate`],rt=o[`${S}_tick_count`];if(!o[`${S}_tick_values`]&&rt&&J.tickValues(this.generateTickValues($,rt,w?this.isTimeSeriesY():this.isTimeSeries())),!w&&this.updateXAxisTickValues(N,J),C=this.getMaxTickSizeFingerprint(e,z,$,J,Q,n),(m==null?void 0:m.fingerprint)===C)return i.cache.add(h,v2(g2({},m),{generation:s.redrawGeneration})),R2(d,m.value);const st=J.tickValues(),ct=!w&&Array.isArray(st)&&st.length>Qs;ct&&J.tickValues(y2(st,J.tickFormat()));const dt=c.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0"),q=dt.append("g").attr("class",`${Pn[`axis${Nn(e)}`]} ${Ue.dummy}`);J.create(q);const{sizeFor1Char:ft}=q.node(),lt=dt.selectAll("text").attr("transform",le(Q)?`rotate(${Q})`:null),pt=ct?st.length:lt.size();if(ft)lt.each(function(Tt,Rt){const Ct=this.textContent.length*ft.w,Kt=ft.h;E.width=Math.max(E.width,Ct),E.height=Math.max(E.height,Kt),w||(d.ticks[Rt]=Ct)});else{const Tt=[];if(lt.each(function(){Tt.push(this)}),(Tt.length<=5?Tt:p2(Tt)).map(Ct=>cn(Ct,!0)).forEach(Ct=>{E.width=Math.max(E.width,Ct.width),E.height=Math.max(E.height,Ct.height)}),!w)for(let Ct=0;Ct<Tt.length;Ct++)d.ticks[Ct]=E.width}!w&&ct&&b2(d.ticks,pt,E.width),dt.remove()}return Object.keys(E).forEach(w=>{E[w]>0&&(d[w]=E[w])}),i.cache.add(h,{fingerprint:C,generation:s.redrawGeneration,value:I2(d)}),d}getXAxisTickTextY2Overflow(e){const n=this.owner,{axis:r,config:i,state:{current:o,isLegendRight:s,legendItemWidth:l}}=n,c=n.getAxisTickRotate("x"),u=c>0&&c<90;if((r.isCategorized()||r.isTimeSeries())&&i.axis_x_tick_fit&&(!i.axis_x_tick_culling||dr(i.axis_x_tick_culling))&&!i.axis_x_tick_multiline&&u){const f=i.axis_y2_show&&o.maxTickSize.y2.width||0,d=s&&l||0,h=o.width-n.getCurrentPaddingByDirection("left"),m=this.getXAxisTickMaxOverflow(c,h-e)-f-d,S=Math.max(0,m)+e;return Math.min(S,h/2)}return 0}getXAxisTickMaxOverflow(e,n){var r;const i=this.owner,{axis:o,config:s,state:l}=i,c=o.isTimeSeries(),u=l.current.maxTickSize.x.ticks,f=u.length,d=(r=mu(u))!=null?r:l.current.maxTickSize.x.width,{left:h,right:m}=l.axis.x.padding;let S=0;const E=f-(c&&s.axis_x_tick_fit?.5:0);for(let N=0;N<f;N++){const z=N+1,$=Math.cos(Math.PI*e/180)*E2(u,N,d),G=z-(c?1:.5)+h;if(G<=0)continue;const J=(n-$)/G,Q=E-z,rt=m*J,et=Q*J+rt,st=$-J/2-et;S=Math.max(S,st)}const C=i.getTargetsToShow();let w=0;if(!c&&s.axis_x_tick_count<=C.length&&C[0].values.length){const N=da(i.axis.getAxisType("x"),0,n-S).domain([h*-1,i.getXDomainMax(i.data.targets)+1+m]);w=(N(1)-N(0))/2}return S+w}updateLabels(e){const n=this.owner,{config:r,$el:{main:i},$T:o}=n,s=r.axis_rotated;["x","y","y2"].forEach(l=>{const c=this.getLabelText(l),u=`axis${Nn(l)}`,f=Pn[`${u}Label`];if(c){let d=i.select(`text.${f}`);d.empty()&&(d=i.select(`g.${Pn[u]}`).insert("text",":first-child").attr("class",f).attr("transform",["rotate(-90)",null][l==="x"?+!s:+s]).style("text-anchor",()=>this.textAnchorForAxisLabel(l))),o(d,e).attr("x",()=>this.xForAxisLabel(l)).attr("dx",()=>this.dxForAxisLabel(l)).attr("dy",()=>this.dyForAxisLabel(l)).text(c)}})}getPadding(e,n,r,i){const o=le(e)?e:e[n];return Xe(o)?this.owner.convertPixelToScale(/(bottom|top)/.test(n)?"y":"x",o,i):r}generateTickValues(e,n,r){let i=e;if(n){const o=ue(n)?n():n;if(o===1)i=[e[0]];else if(o===2)i=[e[0],e[e.length-1]];else if(o>2){const s=this.isCategorized(),l=o-2,c=e[0],u=e[e.length-1],f=(u-c)/(l+1);let d;i=[c];for(let h=0;h<l;h++)d=+c+f*(h+1),i.push(r?new Date(d):s?Math.round(d):d);i.push(u)}}return r||(i=i.sort((o,s)=>o-s)),i}generateTransitions(e){const n=this.owner,{$el:{axis:r},$T:i}=n,[o,s,l,c,u,f]=["x","y","y2","subX","subY","subY2"].map(d=>i(r[d],e));return{axisX:o,axisY:s,axisY2:l,axisSubX:c,axisSubY:u,axisSubY2:f}}redraw(e,n,r){const i=this.owner,{config:o,state:s,$el:l}=i,c=n?"0":null;["x","y","y2","subX","subY","subY2"].forEach(u=>{const f=this[u],d=l.axis[u];f&&d&&(!r&&!o.transition_duration&&(f.config.withoutTransition=!0),d.style("opacity",c),f.create(e[`axis${Nn(u)}`]))}),this.updateAxes(),!s.rendered&&o.axis_tooltip&&this.setAxisTooltip()}syncAxisDomains(e,n,r){var i;const o=this.owner,{config:s,scale:l,$el:c}=o,u=!!l.zoom;let f;if(!u&&this.isCategorized()&&e.length===0&&c.axis.x&&l.x.domain([0,c.axis.x.selectAll(".tick").size()]),l.x&&e.length?(!u&&o.updateXDomain(e,n.UpdateXDomain,n.UpdateOrgXDomain,n.TrimXDomain),s.axis_x_tick_values||this.updateXAxisTickValues(e)):this.x&&(this.x.tickValues([]),(i=this.subX)==null||i.tickValues([])),s.zoom_rescale&&!r&&(f=l.x.orgDomain()),["y","y2"].forEach(d=>{const h=`axis_${d}_`,m=l[d];if(m){const S=s[`${h}tick_values`],E=s[`${h}tick_count`];if(m.domain(o.getYDomain(e,d,f)),!S&&E){const C=o.axis[d],w=m.domain();C.tickValues(this.generateTickValues(w,w.every(N=>N===0)?1:E,this.isTimeSeriesY()))}}}),n.Y){const d=()=>{var h,m;(h=l.subY)==null||h.domain(o.getYDomain(e,"y")),(m=l.subY2)==null||m.domain(o.getYDomain(e,"y2")),["y","y2"].forEach(S=>{const E=S==="y2"?"subY2":"subY",C=l[E],w=o.axis[E],N=this.getTickValues(S,!0),z=Sa(s,E,"count");if(!C||!w||N||!z)return;const $=C.domain();w.tickValues(this.generateTickValues($,$.every(G=>G===0)?1:z,this.isTimeSeriesY()))})};s.subchart_show?o.withSubchartTypeContext(d):d()}}redrawAxis(e,n,r,i,o){const s=this.owner;this.syncAxisDomains(e,n,i),this.redraw(r,s.hasArcType(),o),this.updateLabels(n.Transition),(n.UpdateXDomain||n.UpdateXAxis||n.Y)&&e.length&&this.setCulling()}setCulling(){const e=this.owner,{config:n,state:{clip:r,current:i},$el:o}=e;["subX","x","y","y2","subY","subY2"].forEach(s=>{const l=o.axis[s],c=Sa(n,s,"culling");if(l&&c){const u=l.selectAll(".tick"),f=ti(u.data(),!Sa(n,s,"culling_reverse")),d=f.length,h=Sa(n,s,"culling_max"),S=!Sa(n,s,"culling_lines")||x2(this[s],f,m2(u));let E;if(d){for(let w=1;w<d;w++)if(d/w<h){E=w;break}E=E!=null?E:d;const C=new Map;for(let w=0;w<f.length;w++)C.set(f[w],w);u.each(function(w){var N;const z=S?this:this.querySelector("text");z&&(z.style.display=((N=C.get(w))!=null?N:0)%E?"none":null)})}else u.style("display",null);if(s==="x"){const C=i.maxTickSize.x.clipPath?r.pathXAxisTickTexts:null;o.svg.selectAll(`.${Pn.axisX} .tick text`).attr("clip-path",C)}}})}setAxisTooltip(){var e;const n=this.owner,{config:{axis_rotated:r,axis_tooltip:i},$el:{axis:o,axisTooltip:s}}=n,l=(e=i.backgroundColor)!=null?e:"black";n.generateTextBGColorFilter(l,{x:-.15,y:-.2,width:1.3,height:1.3}),["x","y","y2"].forEach(c=>{var u,f,d;if(Ye(l)||l[c])if(s[c]=(u=o[c])==null?void 0:u.append("text").classed(Pn[`axis${c.toUpperCase()}Tooltip`],!0).attr("filter",n.updateTextBGColor({id:c},l)),r){const h=c==="x"?"x":"y",m=c==="y"?"1.15em":c==="x"?"-0.3em":"-0.4em";(f=s[c])==null||f.attr(h,m).attr(`d${c==="x"?"y":"x"}`,c==="x"?"0.4em":"-1.3em").style("text-anchor",c==="x"?"end":null)}else{const h=c==="x"?"y":"x",m=c==="x"?"1.15em":`${c==="y"?"-":""}0.4em`;(d=s[c])==null||d.attr(h,m).attr(`d${c==="x"?"x":"y"}`,c==="x"?"-1em":"0.3em").style("text-anchor",c==="y"?"end":null)}})}}var Qv=Math.pow,P2={initEventRect(){this.$el.main.select(`.${Ue.chart}`).append("g").attr("class",ea.eventRects).style("fill-opacity","0")},redrawEventRect(){var t;const e=this,{config:n,state:r,$el:i}=e,o=e.isMultipleX(),s=n.axis_x_inverted;if(i.eventRect)e.updateEventRect(i.eventRect,!0);else if(e.data.targets.length){const c=e.$el.main.select(`.${ea.eventRects}`).style("cursor",n.zoom_enabled&&n.zoom_type!=="drag"?n.axis_rotated?"ns-resize":"ew-resize":null).classed(ea.eventRectsMultiple,o).classed(ea.eventRectsSingle,!o).selectAll(`.${ea.eventRect}`).data([0]).enter().append("rect");e.updateEventRect(c),e.updateEventType(c),c.call(e.getDraggableSelection()),i.eventRect=c,e.state.inputType==="touch"&&!i.svg.on("touchstart.eventRect")&&!e.hasArcType()&&e.bindTouchOnEventRect(),r.rendered&&e.updateEventRect(i.eventRect,!0)}if(!o){const l=e.getMaxDataCountTarget();(!n.data_xSort||s)&&l.sort((c,u)=>s?u.x-c.x:c.x-u.x),e.updateDataIndexByX(l),e.updateXs(l),(t=e.updatePointClass)==null||t.call(e,!0),r.eventReceiver.data=l}e.updateEventRectData()},bindTouchOnEventRect(){const t=this,{config:e,state:n,$el:{eventRect:r,svg:i}}=t,o=m=>{if(t.isMultipleX())t.selectRectForMultipleXs(m);else{const S=t.getDataIndexFromEvent(n.event);t.callOverOutForTouch(S),S===-1?t.unselectRect():t.selectRectForSingle(m,S)}},s=()=>{t.unselectRect(),t.callOverOutForTouch()},l=e.interaction_inputType_touch.preventDefault,c=Pa(l)&&l||!1,u=!isNaN(l)&&l||null;let f;const d=!c&&u===null,h=m=>{const S=m.type,C=m.changedTouches[0][`client${e.axis_rotated?"Y":"X"}`];S==="touchstart"?c?m.preventDefault():u!==null&&(f=C):S==="touchmove"&&(c||f===!0||u!==null&&Math.abs(f-C)>=u)&&(f=!0,m.preventDefault())};r.on("touchstart",m=>{n.event=m,t.updateEventRect()},{passive:d}).on("touchstart.eventRect touchmove.eventRect",m=>{if(n.event=m,!r.empty()&&r.classed(ea.eventRect)){if(n.dragging||n.flowing||t.hasArcType()||m.touches.length>1)return;h(m),o(r.node())}else s()},{passive:d}).on("touchend.eventRect",m=>{n.event=m,!r.empty()&&r.classed(ea.eventRect)&&(t.hasArcType()||!t.toggleShape||n.cancelClick)&&n.cancelClick&&(n.cancelClick=!1)},{passive:d}),i.on("touchstart",m=>{n.event=m;const{target:S}=m;S&&S!==r.node()&&s()},{passive:d})},updateEventRect(t,e=!1){const n=this,{state:r,$el:i}=n,{eventReceiver:o,width:s,height:l,rendered:c,resizing:u}=r,f=t||i.eventRect,d=()=>{if(o){const h=Ah(i.chart.node());o.rect=cn(f.node(),!0).toJSON(),o.rect.top+=h.y,o.rect.left+=h.x}};(!c||u||e)&&(f.attr("x",0).attr("y",0).attr("width",s).attr("height",l),(!c||e)&&f.classed(ea.eventRect,!0)),d()},updateEventType(t){const e=this,n=Pa(t),r=n?e.$el.eventRect:t,i=n?t!==(r==null?void 0:r.datum().multipleX):!1;r&&(i&&(r==null||r.on("mouseover mousemove mouseout click",null)),e.isMultipleX()?e.generateEventRectsForMultipleXs(r):e.generateEventRectsForSingleX(r))},updateEventRectData(){const t=this,{config:e,scale:n,state:r}=t,i=n.zoom||n.x,o=e.axis_rotated,s=t.isMultipleX(),l=i==null?void 0:i.domain(),c=l?`${l[0]}_${l[1]}_${r.width}_${r.height}_${t.data.targets.length}_${r.dataGeneration}_${[...r.hiddenTargetIds].join(",")}`:null;if(c&&c===r._eventRectFingerprint)return;r._eventRectFingerprint=c;let u,f,d,h;if(t.updateEventType(s),s)u=0,f=0,d=r.width,h=r.height;else{let E,C;if(t.axis.isCategorized())E=t.getEventRectWidth(),C=w=>i(w.x)-E/2;else{const w=({index:N})=>({prev:t.getPrevX(N),next:t.getNextX(N)});E=N=>{const z=w(N),$=i.domain();let G;return z.prev===null&&z.next===null?G=o?r.height:r.width:z.prev===null?G=(i(z.next)+i(N.x))/2:z.next===null?G=i($[1])-(i(z.prev)+i(N.x))/2:G=Math.max(0,(i(z.next)-i(z.prev))/2),G},C=N=>{const z=w(N);let $;return z.prev===null&&z.next===null?$=0:z.prev===null?$=i(i.domain()[0]):$=(i(N.x)+i(z.prev))/2,$}}u=o?0:C,f=o?C:0,d=o?r.width:E,h=o?E:r.height}const{eventReceiver:m}=r,S=(E,C)=>ue(E)?E(C):E;m.coords.splice(m.data.length),m.data.forEach((E,C)=>{m.coords[C]={x:S(u,E),y:S(f,E),w:S(d,E),h:S(h,E)}})},selectRectForSingle(t,e){var n,r,i,o,s,l,c;const u=this,{config:f,state:d,$el:{main:h,circle:m}}=u,S=f.data_selection_enabled,E=f.data_selection_grouped,C=f.data_selection_isselectable,w=f.tooltip_grouped,N=u.getAllValuesOnIndex(e);if(w&&(u.showTooltip(N,t),(n=u.showGridFocus)==null||n.call(u,N),(r=u.showSubchartGridFocus)==null||r.call(u,N),!S||E))return;!m&&h.selectAll(`.${Ue.EXPANDED}:not(.${An.shape}-${e})`).classed(Ue.EXPANDED,!1);const z=h.selectAll(`.${An.shape}-${e}`).classed(Ue.EXPANDED,!0).style("cursor",C?"pointer":null).filter(function($){return u.isWithinShape(this,$)});if(z.call($=>{var G,V,J;const Q=$.data();S&&(E||C!=null&&C.bind(u.api)(Q))&&(t.style.cursor="pointer"),w||(u.showTooltip(Q,t),(G=u.showGridFocus)==null||G.call(u,Q),(V=u.showSubchartGridFocus)==null||V.call(u,Q),(J=u.unexpandCircles)==null||J.call(u),$.each(rt=>u.setExpand(e,rt.id)))}),!w&&z.empty()){const $=er(d.event,t),G=N.filter(V=>u.isTargetToShow(V.id)?u.dist(V,$)<u.getPointSensitivity(V):!1);if(G.length>0){let V=G[0],J=u.dist(V,$);for(let Q=1;Q<G.length;Q++){const rt=G[Q],et=u.dist(rt,$);et<J&&(J=et,V=rt)}u.showTooltip([V],t),(i=u.showGridFocus)==null||i.call(u,[V]),(o=u.showSubchartGridFocus)==null||o.call(u,[V]),(s=u.unexpandCircles)==null||s.call(u),u.setExpand(e,V.id,!0),S&&(E||C!=null&&C.bind(u.api)(V))&&(t.style.cursor="pointer")}else f.interaction_onout&&((l=u.hideGridFocus)==null||l.call(u),(c=u.hideSubchartGridFocus)==null||c.call(u),u.hideTooltip(),!E&&u.setExpand(e))}},selectRectForMultipleXs(t,e=!0){var n,r;const i=this,{config:o,state:s}=i,l=i.getTargetsToShow();if(s.dragging||i.hasArcType(l))return;const c=er(s.event,t),u=i.findClosestFromTargets(l,c);if(e&&s.mouseover&&(!u||u.id!==s.mouseover.id)&&(o.data_onout.call(i.api,s.mouseover),s.mouseover=void 0),!u){i.unselectRect();return}const d=(i.isBubbleType(u)||i.isScatterType(u)||!o.tooltip_grouped?[u]:i.filterByX(l,u.x)).map(m=>i.addName(m));i.showTooltip(d,t),i.setExpand(u.index,u.id,!0),(n=i.showGridFocus)==null||n.call(i,d),(r=i.showSubchartGridFocus)==null||r.call(i,d);const h=i.dist(u,c);(i.isBarType(u.id)||h<i.getPointSensitivity(u))&&(i.$el.eventRect.style("cursor","pointer"),e&&(!s.mouseover||s.mouseover.x!==u.x||s.mouseover.id!==u.id)&&(o.data_onover.call(i.api,u),s.mouseover=u))},unselectRect(){var t,e,n,r;const i=this,{state:o,$el:{circle:s,tooltip:l}}=i;if(o._lastTooltipMouse=null,o.isCanvasMode){(t=i.clearCanvasFocus)==null||t.call(i),l&&i.hideTooltip();return}(e=i.$el.eventRect)==null||e.style("cursor",null),(n=i.hideGridFocus)==null||n.call(i),(r=i.hideSubchartGridFocus)==null||r.call(i),l&&(i.hideTooltip(),i._handleLinkedCharts(!1)),s&&!i.isPointFocusOnly()&&i.unexpandCircles(),i.expandBarTypeShapes(!1)},generateEventRectsForSingleX(t){const e=this,{config:n,state:r}=e,{eventReceiver:i}=r,o=t.style("cursor",n.data_selection_enabled&&n.data_selection_grouped?"pointer":null).on("click",function(s){r.event=s;const{currentIdx:l,data:c}=i,u=c[l===-1?e.getDataIndexFromEvent(s):l];e.clickHandlerForSingleX.bind(this)(u,e)}).datum({multipleX:!1});if(r.inputType==="mouse"){const s=l=>{const c=l?e.getDataIndexFromEvent(l):i.currentIdx;return c>-1?i.data[c]:null};o.on("mouseover",l=>{r.event=l,e.updateEventRect(),Object.values(e.$el.axisTooltip).forEach(c=>c==null?void 0:c.style("display",null))}).on("mousemove",function(l){var c;const u=s(l);if(r.event=l,!u)return;let{index:f}=u;const d=n.line_step_type;if(n.line_step_tooltipMatch&&e.hasType("step")&&/^step\-(before|after)$/.test(d)){const m=e.scale.zoom||e.scale.x,S=e.axis.xs[f],E=m.invert(er(l,this)[0]);d==="step-after"&&E<S?f-=1:d==="step-before"&&E>S&&(f+=1)}(c=e.showAxisGridFocus)==null||c.call(e);const h=n.tooltip_grouped&&f===i.currentIdx;if(r.dragging||r.flowing||e.hasArcType()||h){if(n.tooltip_show&&h){const[m,S]=er(l,this),E=r._lastTooltipMouse;(!E||Qv(m-E[0],2)+Qv(S-E[1],2)>=9)&&(r._lastTooltipMouse=[m,S],e.setTooltipPosition())}return}f!==i.currentIdx&&(e.setOverOut(!1,i.currentIdx),i.currentIdx=f),f===-1?e.unselectRect():e.selectRectForSingle(this,f),e.setOverOut(f!==-1,f)}).on("mouseout",l=>{var c;r.event=l,!(!e.config||e.hasArcType()||i.currentIdx===-1||!n.interaction_onout)&&((c=e.hideAxisGridFocus)==null||c.call(e),e.unselectRect(),e.setOverOut(!1,i.currentIdx),i.currentIdx=-1)})}return o},clickHandlerForSingleX(t,e){const n=e,{config:r,state:i,$el:{main:o}}=n;if(!t||n.hasArcType()||i.cancelClick){i.cancelClick&&(i.cancelClick=!1);return}const{index:s}=t;o.selectAll(`.${An.shape}-${s}`).each(function(l){var c;(r.data_selection_grouped||n.isWithinShape(this,l))&&((c=n.toggleShape)==null||c.call(n,this,l,s),r.data_onclick.bind(n.api)(l,this))})},generateEventRectsForMultipleXs(t){const e=this,{config:n,state:r}=e;t.on("click",function(i){r.event=i,e.clickHandlerForMultipleXS.bind(this)(e)}).datum({multipleX:!0}),r.inputType==="mouse"&&t.on("mouseover mousemove",function(i){r.event=i,e.selectRectForMultipleXs(this)}).on("mouseout",i=>{r.event=i,!(!e.config||e.hasArcType()||!n.interaction_onout)&&e.unselectRect()})},clickHandlerForMultipleXS(t){const e=t,{config:n,state:r}=e,i=e.getTargetsToShow();if(e.hasArcType(i))return;const o=er(r.event,this),s=e.findClosestFromTargets(i,o);if(!s)return;const l=e.getPointSensitivity(s);(e.isBarType(s.id)||e.dist(s,o)<l)&&e.$el.main.selectAll(`.${An.shapes}${e.getTargetSelectorSuffix(s.id)}`).selectAll(`.${An.shape}-${s.index}`).each(function(){var c;(n.data_selection_grouped||e.isWithinShape(this,s))&&((c=e.toggleShape)==null||c.call(e,this,s,s.index),n.data_onclick.bind(e.api)(s,this))})}},M2={initClip(){const t=this,{clip:e,datetimeId:n}=t.state;e.id=`${n}-clip`,e.idXAxis=`${e.id}-xaxis`,e.idYAxis=`${e.id}-yaxis`,e.idGrid=`${e.id}-grid`,e.path=t.getClipPath(e.id),e.pathXAxis=t.getClipPath(e.idXAxis),e.pathYAxis=t.getClipPath(e.idYAxis),e.pathGrid=t.getClipPath(e.idGrid)},getClipPath(t){const e=this,{config:n}=e;return!n.clipPath&&/-clip$/.test(t)||!n.axis_x_clipPath&&/-clip-xaxis$/.test(t)||!n.axis_y_clipPath&&/-clip-yaxis$/.test(t)?null:`url(#${t})`},appendClip(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath(t){const e=this,{config:n,state:{margin:r,width:i,height:o}}=e,s=n.axis_rotated,l=Math.max(30,r.left)-(s?0:20),c=(s?r.top+o+10:r.bottom)+20,u=s?-(1+l):-(l-1),f=-15,d=s?r.left+20:i+10+l;t.attr("x",u).attr("y",f).attr("width",d).attr("height",c)},setYAxisClipPath(t){const e=this,{config:n,state:{margin:r,width:i,height:o}}=e,s=n.axis_rotated,l=Math.max(30,r.left)-(s?20:0),c=n.axis_y_inner,u=c&&!s?n.axis_y_label.text?-20:-1:s?-(1+l):-(l-1),f=-(s?20:r.top),d=(s?i+15+l:r.left+20)+(c?20:0),h=(s?r.bottom+10:r.top+o)+10;t.attr("x",u).attr("y",f).attr("width",d).attr("height",h)},updateXAxisTickClip(){const t=this,{config:e,state:{clip:n,xAxisHeight:r},$el:{defs:i}}=t,o=t.getHorizontalAxisHeight("x");if(i&&!n.idXAxisTickTexts){const s=`${n.id}-xaxisticktexts`;t.appendClip(i,s),n.idXAxisTickTexts=s,n.pathXAxisTickTexts=t.getClipPath(n.idXAxisTickTexts)}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&o!==r&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=o},setXAxisTickClipWidth(){const t=this,{config:e,state:{current:{maxTickSize:n}}}=t,r=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&r){const i=Math.sin(Math.PI/180*Math.abs(r));n.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/i}else n.x.clipPath=null},setXAxisTickTextClipPathWidth(){const t=this,{state:{clip:e,current:n},$el:{svg:r}}=t;r&&r.select(`#${e.idXAxisTickTexts} rect`).attr("width",n.maxTickSize.x.clipPath).attr("height",30)}},L2={getAxisSize(t){const e=this,n=e.config.axis_rotated;return n&&t==="x"||!n&&/y2?/.test(t)?e.getAxisWidthByAxisId(t,!0):e.getHorizontalAxisHeight(t)},getAxisWidthByAxisId(t,e){var n,r;const i=this;if(i.axis){const o=(n=i.axis)==null?void 0:n.getAxisLabelPosition(t),{width:s}=i.axis.getMaxTickSize(t,e),l=s===0?.5:0;return s+(((r=i.config.padding)==null?void 0:r.mode)==="fit"?o.isInner?10+l:10:o.isInner?20+l:40)}else return 40},getHorizontalAxisHeight(t){var e,n;const r=this,{config:i,state:o}=r,{rotatedPadding:s,isLegendRight:l,isLegendInset:c}=o,u=i.axis_rotated,f=((e=i.padding)==null?void 0:e.mode)==="fit",d=i[`axis_${t}_inner`],h=i[`axis_${t}_label`].text,m=13;let S=((n=i.padding)==null?void 0:n.mode)==="fit"?d&&!h?t==="y"?1:0:20:30;if(t==="x"&&!i.axis_x_show)return 8;if(t==="x"&&le(i.axis_x_height))return i.axis_x_height;if(t==="y"&&!i.axis_y_show)return i.legend_show&&!l&&!c?10:1;if(t==="y2"&&!i.axis_y2_show)return f?0:s.top;const E=r.axis.getMaxTickSize(t),C=Math.abs(i.axis_x_tick_rotate)>0&&(!i.axis_x_tick_autorotate||r.needToRotateXAxisTickTexts());return(i.axis_x_tick_multiline||C)&&E.height>m&&(S+=E.height-m),S+(r.axis.getAxisLabelPosition(t).isInner?0:10)+(t==="y2"&&!u?-10:0)},getEventRectWidth(){const t=this,{config:e,axis:n}=t,r=e.axis_x_inverted,i=n.x.tickInterval();return Math.max(0,r?Math.abs(i):i)},getAxisTickRotate(t){const e=this,{axis:n,config:r,state:i,$el:o}=e;let s=r[`axis_${t}_tick_rotate`];if(t==="x"){const l=n.isCategorized()||n.isTimeSeries();if(r.axis_x_tick_fit&&l){const c=r.axis_x_tick_count,u=i.current.maxTickSize.x.ticks.length;let f=0;if(c?f=c>u?u:c:u&&(f=u),f!==i.axis.x.tickCount){const{targets:d}=e.data;i.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(d,"min"),e.getXDomainMinMax(d,"max")],f)}i.axis.x.tickCount=f}(o.svg||i.isCanvasMode)&&r.axis_x_tick_autorotate&&r.axis_x_tick_fit&&!r.axis_x_tick_multiline&&!r.axis_x_tick_culling&&l&&(s=e.needToRotateXAxisTickTexts()?r.axis_x_tick_rotate:0)}return s},needToRotateXAxisTickTexts(){const t=this,{state:{axis:e,current:n,isLegendRight:r,legendItemWidth:i}}=t,o=r&&i,s=n.width-o-t.getCurrentPaddingByDirection("left")-t.getCurrentPaddingByDirection("right"),l=e.x.tickCount+e.x.padding.left+e.x.padding.right,{width:c}=t.axis.getMaxTickSize("x"),u=l?s/l:0;return c>u}},D2={axis_x_clipPath:!0,axis_x_show:!0,axis_x_forceAsSingle:!1,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_culling_lines:!0,axis_x_tick_culling_reverse:!1,axis_x_tick_count:void 0,axis_x_tick_inner:!1,axis_x_tick_show:!0,axis_x_tick_text_show:!0,axis_x_tick_text_inner:!1,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_autorotate:!1,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:void 0,axis_x_min:void 0,axis_x_inverted:!1,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_axes:[]},F2={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_culling_reverse:!1,axis_y_tick_inner:!1,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},N2={axis_y2_clipPath:!0,axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_culling_reverse:!1,axis_y2_tick_inner:!1,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]},$2=Object.defineProperty,_v=Object.getOwnPropertySymbols,B2=Object.prototype.hasOwnProperty,z2=Object.prototype.propertyIsEnumerable,qv=(t,e,n)=>e in t?$2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bu=(t,e)=>{for(var n in e||(e={}))B2.call(e,n)&&qv(t,n,e[n]);if(_v)for(var n of _v(e))z2.call(e,n)&&qv(t,n,e[n]);return t},U2=bu(bu(bu({axis_evalTextSize:!0,axis_rotated:!1,axis_tooltip:!1},D2),F2),N2),k2={data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1};const G2=[t2,e2,n2],tp={axis:w2,clip:M2,eventrect:P2,sizeAxis:L2},ep={optDataAxis:k2,optAxis:U2};function np(t){return Object.keys(t).map(e=>t[e])}function rp(t=[],e=[]){bn(Ir.prototype,np(tp).concat(t)),bn(Jn.prototype,G2),Ua.setOptions(np(ep).concat(e))}function mo(t=[],e=[]){rp(t,e)}function sa(t,e=[]){const n=Array.isArray(t)?t:t?[t]:[];rp([Ti,Ys,_C].concat(n),[Wa,qC].concat(e))}let ap=()=>(sa(xi,[yi]),(ap=()=>kt.AREA)()),ip=()=>(sa(xi,[yi]),(ip=()=>kt.AREA_LINE_RANGE)()),op=()=>(sa(xi,[yi]),(op=()=>kt.AREA_STEP_RANGE)()),sp=()=>(sa(xi,[yi,hu]),(sp=()=>kt.AREA_SPLINE)()),lp=()=>(sa(xi,[yi,hu]),(lp=()=>kt.AREA_SPLINE_RANGE)()),cp=()=>(sa(xi,[yi]),(cp=()=>kt.AREA_STEP)());function Su(t){const e=this.config.bar_connectLine,n=(e==null?void 0:e[t])||e;return/^(start|end)\-(start|end)$/.test(n)?n:null}var X2={initBar(){const{$el:t,config:e,state:{clip:n}}=this;t.bar=t.main.select(`.${Ue.chart}`),t.bar=e.bar_front?t.bar.append("g"):t.bar.insert("g",":first-child"),t.bar.attr("class",lr.chartBars).call(this.setCssRule(!1,`.${lr.chartBars}`,["pointer-events:none"])),e.clipPath===!1&&(e.bar_radius||e.bar_radius_ratio)&&t.bar.attr("clip-path",n.pathXAxis.replace(/#[^)]*/,`#${n.id}`))},updateTargetsForBar(t){const e=this,{config:n}=e,r=e.getClass("bars",!0),i=n.interaction_enabled&&n.data_selection_isselectable;eu.call(e,t,{type:"Bar",elKey:"bar",containerClass:lr.chartBars,itemClass:lr.chartBar,initFn:e.initBar}).append("g").attr("class",r).style("cursor",s=>{var l;return(l=i==null?void 0:i.bind)!=null&&l.call(i,e.api)(s)?"pointer":null}).call(s=>{e.setCssRule(!0,` .${lr.bar}`,["fill"],e.color)(s),s.each(function(l){Su.call(e,l.id)&&Ut(this).append("path").attr("class",lr.barConnectLine)})})},updateBar(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{config:r,$el:i,$T:o}=n,s=e?i.subchart:i,l=n.getClass("bar",!0),c=n.initialOpacity.bind(n);r.bar_linearGradient&&n.updateLinearGradient();const u=s.main.selectAll(`.${lr.bars}`).selectAll(`.${lr.bar}`).data(n.labelishData.bind(n));o(u.exit(),t).style("opacity","0").remove(),s.bar=u.enter().append("path").attr("class",l).style("fill",n.generateUpdateBarColor()).merge(u).style("opacity",c),n.setRatioForGroupedData(s.bar.data())},generateUpdateBarColor(){const t=this,e=t.getStylePropValue(t.color)||(()=>null);return n=>Gg.call(t,n,"bar_linearGradient",e)},updateBarColor(t){return this.generateUpdateBarColor()(t)},redrawBar(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{bar:i}=n?r.$el.subchart:r.$el,o=[],s=new Map,l=as(r),c=r.generateUpdateBarColor(),u=function(d,h,m){var S;const C=le(d.value)||r.isBarRangeType(d)||((S=r.isSubchartCandlestickBarValue)==null?void 0:S.call(r,d,n))?t(d,h):[""];let w=s.get(d.id);if(w===void 0&&(w=Su.call(r,d.id),s.set(d.id,w)),C.length>1&&o.push(C[1]),h===m.length-1&&o.length){const N=r.$T(Ut(this.parentNode.querySelector(`.${lr.barConnectLine}`)),e,Pr());r.updateConnectLine(N,w,o),o.splice(0)}return C[0]},f=r.$T(i,e,Pr());return l&&typeof f.attrTween=="function"?f.attrTween("d",function(d,h,m){var S;const E=u.call(this,d,h,m);return B0((S=this.getAttribute("d"))!=null?S:"",E)}):f.attr("d",u),[f.style("fill",d=>{var h;return((h=r.getSubchartCandlestickBarColor)==null?void 0:h.call(r,d,n))||c(d)}).style("clip-path",d=>d.clipPath).style("opacity",null)]},generateDrawBar(t,e){const n=this,{config:r}=n,i=n.generateGetBarPoints(t,e),o=as(n),s=o?tc(n):new Set,l=new Map;return(c,u)=>{const f=i(c,u),{indexX:d,indexY:h,isNegative:m,pos:S,radius:E,clipPath:C}=ec(n,c,f,o,s,n.isStackingRadiusData.bind(n)),w=["",""];if(c.clipPath=C,o){const G=`a${E} ${E} ${m?"1 0 0":"0 0 1"} `;w[h]=`${G}${E},${E}`,w[d]=`${G}${[-E,E][r.axis_rotated?"sort":"reverse"]()}`,m&&w.reverse()}const N=r.axis_rotated?`H${S} ${w[0]}V${f[2][h]-E} ${w[1]}H${f[3][d]}`:`V${S} ${w[0]}H${f[2][d]-E} ${w[1]}V${f[3][h]}`,z=[`M${f[0][d]},${f[0][h]}${N}z`];let $=l.get(c.id);return $===void 0&&($=Su.call(n,c.id),l.set(c.id,$)),$&&z.push(r.axis_rotated?{x:f[0][d],y:f[0][h],width:f[0][d]-S,height:f[2][h]-f[0][h]}:{x:f[0][d],y:S,width:f[2][d]-f[0][d],height:f[3][h]-S}),z}},isStackingRadiusData(t){const e=this,{$el:n,config:r,data:i,state:o}=e,{id:s,index:l,value:c}=t;if(o.hiddenTargetIds.has(s)){const h=n.bar.filter(m=>m.id===s&&m.value===c);return!h.empty()&&/a\d+/i.test(h.attr("d"))}const u=r.data_groups.find(h=>h.indexOf(s)>-1),d=e.orderTargets(e.filterTargetsToShow(i.targets.filter(e.isBarType,e))).filter(h=>u.indexOf(h.id)>-1).map(h=>{const m=h.values[l];if(m&&(le(c)&&c>0?m.value>0:m.value<0))return m}).filter(Boolean).map(h=>h.id);return c!==0&&d.indexOf(s)===d.length-1},updateConnectLine(t,e,n){const r=n.map((i,o,s)=>{const l=this.config.axis_rotated,c=/^start-(start|end)$/.test(e),u=/^end-(start|end)$/.test(e),f=[],d=l?u?i.x-i.width:i.x:i.x+i.width,h=l||c?i.y+i.height:i.y;return o===0?f.push(`${d},${h}`):(f.push(l?`L${i.x-(/\w+-end$/.test(e)?i.width:0)},${i.y}`:`L${i.x},${i.y+(/\w+-start$/.test(e)?i.height:0)}`),o<s.length-1&&f.push(`M${d},${h}`)),f.join(" ")});t.attr("d",`M${r.join("")}z`)}},W2={bar_connectLine:!1,bar_front:!1,bar_indices_removeNull:!1,bar_label_threshold:0,bar_linearGradient:!1,bar_overlap:!1,bar_padding:0,bar_radius:void 0,bar_radius_ratio:void 0,bar_sensitivity:2,bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0};let up=()=>(mo([X2,Ti],[W2,Wa]),(up=()=>kt.BAR)());var V2={initBubble(){const t=this,{config:e}=t;t.hasType("bubble")&&(e.point_show=!0,e.point_type="circle")},getBaseLength(){const t=this,{width:e,height:n}=t.state,r=ke.bubbleBaseLength;let i=t.cache.get(r);return i||t.cache.add(r,i=br("min",[e,n])),i},getBubbleR(t){const e=this;let n=e.config.bubble_maxR;ue(n)?n=n.bind(e.api)(t):le(n)||(n=e.getBaseLength()/(e.getMaxDataCount()*2)+12);const r=ke.bubbleMaxValue;let i=e.cache.get(r);i===null&&e.cache.add(r,i=br("max",e.getMinMaxData().max.map(l=>e.isBubbleZType(l)?e.getBubbleZData(l.value,"y"):Ke(l.value)?l.value.mid:l.value)));const o=n*n*Math.PI,s=(e.isBubbleZType(t)?e.getBubbleZData(t.value,"z"):t.value)*(o/i);return Math.sqrt(s/Math.PI)},getBubbleZData(t,e){return Ke(t)?t[e]:t[e==="y"?0:1]}},j2=V2,H2={bubble_maxR:35,bubble_zerobased:!1};let fp=()=>(mo([Ti,Ys,j2],[H2,Wa]),(fp=()=>kt.BUBBLE)());var Y2=Object.defineProperty,dp=Object.getOwnPropertySymbols,K2=Object.prototype.hasOwnProperty,Z2=Object.prototype.propertyIsEnumerable,hp=(t,e,n)=>e in t?Y2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,J2=(t,e)=>{for(var n in e||(e={}))K2.call(e,n)&&hp(t,n,e[n]);if(dp)for(var n of dp(e))Z2.call(e,n)&&hp(t,n,e[n]);return t},Q2={generateGetCandlestickPoints(t,e=!1){const n=this,r=e?n.axis.subX:n.axis.x,i=n.getIndicesMax(t)+1,o=n.getBarW("candlestick",r,i),s=n.getShapeX(o,t,!!e),l=n.getShapeY(!!e),c=n.getShapeOffset(n.isCandlestickType,t,!!e),u=n.getYScaleById.bind(n);return(f,d)=>{const h=u.call(n,f.id,e)(n.getShapeYMin(f.id,e)),m=c(f,d)||h,S=le(o)?o:o[f.id]||o._$width,E=n.getCandlestickData(f);let C;if(E&&le(E.open)&&le(E.close)){const w={start:s(f),end:0};w.end=w.start+S;const N={start:l(E.open),end:l(E.close)},z={x:w.start+S/2,high:l(E.high),low:l(E.low)},$=h-m;N.start-=$,N.end-=$,z.high-=$,z.low-=$,C=[[w.start,N.start],[w.end,N.end],[z.x,z.low,z.high]]}else C=[[0,0],[0,0],[0,0,0]];return C}},getCandlestickData({value:t}){let e;if(en(t)){const[n,r,i,o,s=!1]=t;e={open:n,high:r,low:i,close:o},s!==!1&&(e.volume=s)}else Ke(t)&&(e=J2({},t));return e&&(e._isUp=e.close>=e.open),e||null}},_2=Object.defineProperty,q2=Object.defineProperties,tI=Object.getOwnPropertyDescriptors,gp=Object.getOwnPropertySymbols,eI=Object.prototype.hasOwnProperty,nI=Object.prototype.propertyIsEnumerable,vp=(t,e,n)=>e in t?_2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rI=(t,e)=>{for(var n in e||(e={}))eI.call(e,n)&&vp(t,n,e[n]);if(gp)for(var n of gp(e))nI.call(e,n)&&vp(t,n,e[n]);return t},aI=(t,e)=>q2(t,tI(e)),iI=aI(rI({},Q2),{initCandlestick(){Xg.call(this,{elKey:"candlestick",className:ta.chartCandlesticks})},updateTargetsForCandlestick(t){eu.call(this,t,{type:"Candlestick",elKey:"candlestick",containerClass:ta.chartCandlesticks,itemClass:ta.chartCandlestick,initFn:this.initCandlestick,withFocus:!1,withStyles:!1}).style("pointer-events","none")},updateCandlestick(t,e=!1){const n=this,{$el:r,$T:i}=n,o=e?r.subchart:r,s=n.getClass("candlestick",!0),l=n.initialOpacity.bind(n),c=o.main.selectAll(`.${ta.chartCandlestick}`).selectAll(`.${ta.candlestick}`).data(n.labelishData.bind(n));i(c.exit(),t).style("opacity","0").remove();const u=c.enter().filter(f=>f.value).append("g").attr("class",s);u.append("line"),u.append("path"),o.candlestick=c.merge(u).style("opacity",l)},generateDrawCandlestick(t,e){const n=this,{config:r}=n,i=n.generateGetCandlestickPoints(t,e),o=r.axis_rotated,s=r.candlestick_color_down;return(l,c,u)=>{const f=i(l,c),d=n.getCandlestickData(l),h=d==null?void 0:d._isUp,m=+o,S=+!m;u.classed&&u.classed(ta[h?"valueUp":"valueDown"],!0);const E=o?`H${f[1][1]} V${f[1][0]} H${f[0][1]}`:`V${f[1][1]} H${f[1][0]} V${f[0][1]}`;u.select("path").attr("d",`M${f[0][m]},${f[0][S]}${E}z`).style("fill",N=>(h?n.color(N):Ke(s)?s[N.id]:s)||n.color(N));const C=u.select("line"),w=o?{x1:f[2][1],x2:f[2][2],y1:f[2][0],y2:f[2][0]}:{x1:f[2][0],x2:f[2][0],y1:f[2][1],y2:f[2][2]};for(const N in w)C.attr(N,w[N])}},redrawCandlestick(t,e,n=!1){const r=this,{$el:i,$T:o}=r,{candlestick:s}=n?i.subchart:i,l=Pr(!0);return[s.each(function(c,u){const f=o(Ut(this),e,l);t(c,u,f)}).style("opacity",null)]}}),oI={candlestick_width:void 0,candlestick_width_ratio:.6,candlestick_width_max:void 0,candlestick_color_down:"red"};let pp=()=>(mo([iI,Ti],[oI,Wa]),(pp=()=>kt.CANDLESTICK)());var qs={arc_cornerRadius:0,arc_cornerRadius_ratio:0,arc_needle_show:!1,arc_needle_color:void 0,arc_needle_value:void 0,arc_needle_path:void 0,arc_needle_length:100,arc_needle_top_rx:0,arc_needle_top_ry:0,arc_needle_top_width:0,arc_needle_bottom_rx:1,arc_needle_bottom_ry:1,arc_needle_bottom_width:15,arc_needle_bottom_len:0,arc_rangeText_values:void 0,arc_rangeText_unit:"absolute",arc_rangeText_fixed:!1,arc_rangeText_format:void 0,arc_rangeText_position:void 0},sI={donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_line:!1,donut_label_image:void 0,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_rate:.98,donut_expand_duration:50,donut_padAngle:0,donut_startingAngle:0};function lI(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function cI(t){return t}function uI(){var t=cI,e=lI,n=null,r=_e(0),i=_e($s),o=_e(0);function s(l){var c,u=(l=nc(l)).length,f,d,h=0,m=new Array(u),S=new Array(u),E=+r.apply(this,arguments),C=Math.min($s,Math.max(-$s,i.apply(this,arguments)-E)),w,N=Math.min(Math.abs(C)/u,o.apply(this,arguments)),z=N*(C<0?-1:1),$;for(c=0;c<u;++c)($=S[m[c]=c]=+t(l[c],c,l))>0&&(h+=$);for(e!=null?m.sort(function(G,V){return e(S[G],S[V])}):n!=null&&m.sort(function(G,V){return n(l[G],l[V])}),c=0,d=h?(C-u*z)/h:0;c<u;++c,E=w)f=m[c],$=S[f],w=E+($>0?$*d:0)+z,S[f]={data:l[f],index:c,value:$,startAngle:E,endAngle:w,padAngle:N};return S}return s.value=function(l){return arguments.length?(t=typeof l=="function"?l:_e(+l),s):t},s.sortValues=function(l){return arguments.length?(e=l,n=null,s):e},s.sort=function(l){return arguments.length?(n=l,e=null,s):n},s.startAngle=function(l){return arguments.length?(r=typeof l=="function"?l:_e(+l),s):r},s.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:_e(+l),s):i},s.padAngle=function(l){return arguments.length?(o=typeof l=="function"?l:_e(+l),s):o},s}function fI(t){return t.innerRadius}function dI(t){return t.outerRadius}function hI(t){return t.startAngle}function gI(t){return t.endAngle}function vI(t){return t&&t.padAngle}function pI(t,e,n,r,i,o,s,l){var c=n-t,u=r-e,f=s-i,d=l-o,h=d*c-f*u;if(!(h*h<Wn))return h=(f*(e-o)-d*(t-i))/h,[t+h*c,e+h*u]}function tl(t,e,n,r,i,o,s){var l=t-n,c=e-r,u=(s?o:-o)/vi(l*l+c*c),f=u*c,d=-u*l,h=t+f,m=e+d,S=n+f,E=r+d,C=(h+S)/2,w=(m+E)/2,N=S-h,z=E-m,$=N*N+z*z,G=i-o,V=h*E-S*m,J=(z<0?-1:1)*vi(XA(0,G*G*$-V*V)),Q=(V*z-N*J)/$,rt=(-V*N-z*J)/$,et=(V*z+N*J)/$,st=(-V*N+z*J)/$,ct=Q-C,dt=rt-w,q=et-C,ft=st-w;return ct*ct+dt*dt>q*q+ft*ft&&(Q=et,rt=st),{cx:Q,cy:rt,x01:-f,y01:-d,x11:Q*(i/G-1),y11:rt*(i/G-1)}}function mp(){var t=fI,e=dI,n=_e(0),r=null,i=hI,o=gI,s=vI,l=null,c=ic(u);function u(){var f,d,h=+t.apply(this,arguments),m=+e.apply(this,arguments),S=i.apply(this,arguments)-Ns,E=o.apply(this,arguments)-Ns,C=Ig(E-S),w=E>S;if(l||(l=f=c()),m<h&&(d=m,m=h,h=d),!(m>Wn))l.moveTo(0,0);else if(C>$s-Wn)l.moveTo(m*Xa(S),m*Ur(S)),l.arc(0,0,m,S,E,!w),h>Wn&&(l.moveTo(h*Xa(E),h*Ur(E)),l.arc(0,0,h,E,S,w));else{var N=S,z=E,$=S,G=E,V=C,J=C,Q=s.apply(this,arguments)/2,rt=Q>Wn&&(r?+r.apply(this,arguments):vi(h*h+m*m)),et=Jc(Ig(m-h)/2,+n.apply(this,arguments)),st=et,ct=et,dt,q;if(rt>Wn){var ft=Rg(rt/h*Ur(Q)),lt=Rg(rt/m*Ur(Q));(V-=ft*2)>Wn?(ft*=w?1:-1,$+=ft,G-=ft):(V=0,$=G=(S+E)/2),(J-=lt*2)>Wn?(lt*=w?1:-1,N+=lt,z-=lt):(J=0,N=z=(S+E)/2)}var pt=m*Xa(N),Tt=m*Ur(N),Rt=h*Xa(G),Ct=h*Ur(G);if(et>Wn){var Kt=m*Xa(z),re=m*Ur(z),Ee=h*Xa($),Ce=h*Ur($),be;if(C<fo)if(be=pI(pt,Tt,Ee,Ce,Kt,re,Rt,Ct)){var Ne=pt-be[0],ye=Tt-be[1],De=Kt-be[0],Zt=re-be[1],ve=1/Ur(WA((Ne*De+ye*Zt)/(vi(Ne*Ne+ye*ye)*vi(De*De+Zt*Zt)))/2),xe=vi(be[0]*be[0]+be[1]*be[1]);st=Jc(et,(h-xe)/(ve-1)),ct=Jc(et,(m-xe)/(ve+1))}else st=ct=0}J>Wn?ct>Wn?(dt=tl(Ee,Ce,pt,Tt,m,ct,w),q=tl(Kt,re,Rt,Ct,m,ct,w),l.moveTo(dt.cx+dt.x01,dt.cy+dt.y01),ct<et?l.arc(dt.cx,dt.cy,ct,Xn(dt.y01,dt.x01),Xn(q.y01,q.x01),!w):(l.arc(dt.cx,dt.cy,ct,Xn(dt.y01,dt.x01),Xn(dt.y11,dt.x11),!w),l.arc(0,0,m,Xn(dt.cy+dt.y11,dt.cx+dt.x11),Xn(q.cy+q.y11,q.cx+q.x11),!w),l.arc(q.cx,q.cy,ct,Xn(q.y11,q.x11),Xn(q.y01,q.x01),!w))):(l.moveTo(pt,Tt),l.arc(0,0,m,N,z,!w)):l.moveTo(pt,Tt),!(h>Wn)||!(V>Wn)?l.lineTo(Rt,Ct):st>Wn?(dt=tl(Rt,Ct,Kt,re,h,-st,w),q=tl(pt,Tt,Ee,Ce,h,-st,w),l.lineTo(dt.cx+dt.x01,dt.cy+dt.y01),st<et?l.arc(dt.cx,dt.cy,st,Xn(dt.y01,dt.x01),Xn(q.y01,q.x01),!w):(l.arc(dt.cx,dt.cy,st,Xn(dt.y01,dt.x01),Xn(dt.y11,dt.x11),!w),l.arc(0,0,h,Xn(dt.cy+dt.y11,dt.cx+dt.x11),Xn(q.cy+q.y11,q.cx+q.x11),w),l.arc(q.cx,q.cy,st,Xn(q.y11,q.x11),Xn(q.y01,q.x01),!w))):l.arc(0,0,h,G,$,w)}if(l.closePath(),f)return l=null,f+""||null}return u.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-fo/2;return[Xa(d)*f,Ur(d)*f]},u.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:_e(+f),u):t},u.outerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:_e(+f),u):e},u.cornerRadius=function(f){return arguments.length?(n=typeof f=="function"?f:_e(+f),u):n},u.padRadius=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:_e(+f),u):r},u.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:_e(+f),u):i},u.endAngle=function(f){return arguments.length?(o=typeof f=="function"?f:_e(+f),u):o},u.padAngle=function(f){return arguments.length?(s=typeof f=="function"?f:_e(+f),u):s},u.context=function(f){return arguments.length?(l=f==null?null:f,u):l},u}const mI=15,xp=20,yp=.35;function xI(t=!1){const e=this;return["donut","pie","polar","gauge"].find(n=>e.hasType(n)&&!(n==="gauge"&&t&&e.hasMultiArcGauge()))}function Tp(){const t=this,{config:e}=t,n=xI.call(t,!0),r=n&&e[`${n}_label_line`],i=qn(r),o=(c,u,f)=>f,s={show:r===!0||i&&(r==null?void 0:r.show)!==!1,distance:i&&(r==null?void 0:r.distance)||xp};if(r===!0)return{chartType:n,line:s,text:{formatter:o}};if(!i)return{chartType:n,line:{show:!1,distance:xp},text:{formatter:null}};let l=o;return ue(r.text)?l=r.text:r.text===!1&&(l=null),{chartType:n,line:s,text:{formatter:l}}}function yI(t,e){const n=this,{state:r}=n,i=n.updateAngle(t);if(!i)return null;let{outerRadius:o}=n.getRadius(t),s=o;n.hasType("polar")&&(s=n.getPolarOuterRadius(t,o),o=r.radius);let l=(i.startAngle+i.endAngle)/2;Math.abs(i.endAngle-i.startAngle-2*Math.PI)<.01&&(l=Math.PI/2);const u=Math.sin(l),f=-Math.cos(l),d={x:u*s,y:f*s},h=o+mI,m={x:u*h,y:f*h},S=u>=0,E={x:m.x+e*(S?1:-1),y:m.y};return{startPoint:d,breakPoint:m,endPoint:E,isRight:S,midAngle:l}}function bp(){return Tp.call(this).line.show}function TI(t){const e=this,{$el:{arcs:n},$T:r}=e,{line:i,text:o}=Tp.call(e),s=i.distance;let l=null;n.selectAll(`.${Qe.chartArc}`).each(function(c){var u,f,d;const h=Ut(this),m=yI.call(e,c,s),{ratio:S,meetsThreshold:E,updated:C}=(u=c._cache)!=null?u:{};if(!C||!m)return;const w=e.isTargetToShow(c.data.id)&&E,{startPoint:N,breakPoint:z,endPoint:$,isRight:G}=m,V=`${N.x},${N.y} ${z.x},${z.y} ${$.x},${$.y}`;if(i.show){let Q=h.select(`.${Qe.arcLabelLine}`);Q.empty()&&(Q=h.append("polyline").attr("class",Qe.arcLabelLine)),r(Q,t).attr("points",V).style("stroke",e.color(c.data)).style("opacity",w?null:"0")}let J=h.select(`.${Qe.arcLabelLineText}`);if(J.empty()&&(J=h.append("text").attr("class",Qe.arcLabelLineText).style("pointer-events","none")),w){const{value:Q}=C,{id:rt}=c.data,et=((d=(f=o.formatter)!=null?f:e.getArcLabelConfig("format"))!=null?d:e.defaultArcValueFormat)(Q,S,rt).toString();ci(J,et,[-1,1],!1);const st={x:$.x+5*(G?1:-1),y:$.y};J.style("text-anchor",G?"start":"end");const ct=J.node(),dt=ct==null?void 0:ct.querySelectorAll("tspan");if(l===null&&(l=parseFloat(fe.getComputedStyle(ct).fontSize)||12),dt&&dt.length>1){const ft=(dt.length-3)/2;st.y+=(-ft+yp)*l}else st.y+=yp*l;r(J,t).attr("transform",`translate(${st.x},${st.y})`).style("opacity",null).style("fill",e.updateTextColor.bind(e)(c))}else r(J,t).style("opacity","0")})}var bI=Object.defineProperty,SI=Object.defineProperties,AI=Object.getOwnPropertyDescriptors,Sp=Object.getOwnPropertySymbols,EI=Object.prototype.hasOwnProperty,CI=Object.prototype.propertyIsEnumerable,Ap=(t,e,n)=>e in t?bI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,II=(t,e)=>{for(var n in e||(e={}))EI.call(e,n)&&Ap(t,n,e[n]);if(Sp)for(var n of Sp(e))CI.call(e,n)&&Ap(t,n,e[n]);return t},RI=(t,e)=>SI(t,AI(e));const Au=["donut","gauge","pie","polar"];function wI(t){return["donut","pie","polar","gauge"].find(e=>t.hasType(e))}function OI(t,e,n,r){var i,o;const{config:s,state:{radiusExpanded:l}}=t,c=n.endAngle-Math.PI/2,u=Math.sin(c),f={x:Math.cos(c)*(l+(r?5:25)),y:u*(l+15-Math.abs(u*10))+3};if(r){const d=s.arc_rangeText_position;if(d){const h=s.arc_rangeText_values,m=ue(d)?d(h[e.index]):d;f.x+=(i=m==null?void 0:m.x)!=null?i:0,f.y+=(o=m==null?void 0:m.y)!=null?o:0}}return f}function PI(t,e,n,r){const{config:i}=t,o=wI(t);let s=o?i[`${o}_label_ratio`]:void 0;if(s)s=ue(s)?s.bind(t.api)(e,n,r):s;else{const d=36/n,h=d>.375;s=n&&r?(h?1.175-d:.8)*n/r:0}return s}function MI(t,e,n){let{outerRadius:r}=t.getRadius(e);t.hasType("polar")&&(r=t.getPolarOuterRadius(e,r));const[i,o]=t.svgArc.centroid(n).map(c=>isNaN(c)?0:c),s=Math.sqrt(i*i+o*o),l=PI(t,e,r,s);return{pos:{x:i,y:o},ratio:l}}function Ep(t=0){const e=this,{config:n,state:r}=e,i=e.hasMultiArcGauge(),o=r.gaugeArcWidth/e.getTargetsToShow().length,s=t?Math.min(r.radiusExpanded*t-r.radius,o*.8-(1-t)*100):0;return{inner(l){const{innerRadius:c}=e.getRadius(l);return i?r.radius-o*(l.index+1):le(c)?c:0},outer(l){const{outerRadius:c}=e.getRadius(l);let u;if(i)u=r.radius-o*l.index+s;else if(e.hasType("polar")&&!t)u=e.getPolarOuterRadius(l,c);else if(u=c,t){let{radiusExpanded:f}=r;r.radius!==c&&(f-=Math.abs(r.radius-c)),u=f*t}return u},corner(l,c){const{arc_cornerRadius_ratio:u=0,arc_cornerRadius:f=0}=n,{data:{id:d},value:h}=l;let m;return u?m=u*c:m=le(f)?f:f.call(e.api,d,h,c),m}}}function Eu(t){return function(e){const n=({startAngle:i=0,endAngle:o=0,padAngle:s=0})=>({startAngle:i,endAngle:o,padAngle:s}),r=Ya(n(this._current),n(e));return this._current=e,function(i){const o=r(i),{data:s,index:l,value:c}=e;return t(RI(II({},o),{data:s,index:l,value:c}))}}}var LI={initPie(){const t=this,{config:e}=t,n=e.data_type,r=e[`${n}_padding`],i=e[`${n}_startingAngle`]||0,o=(r?r*.01:e[`${n}_padAngle`])||0;t.pie=uI().startAngle(i).endAngle(i+2*Math.PI).padAngle(o).value(s=>{var l,c;return(c=(l=s.values)==null?void 0:l.reduce((u,f)=>u+f.value,0))!=null?c:s}).sort(t.getSortCompareFn.bind(t)(!0))},updateRadius(){const t=this,{config:e,state:n}=t,r=e.data_type,i=e[`${r}_padding`],o=e.gauge_width||e.donut_width,s=t.getTargetsToShow().length*e.gauge_arcs_minWidth,l=.85,c=bp.call(t)?l:1;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2*(t.hasMultiArcGauge()&&e.gauge_label_show?l:c),n.radius=n.radiusExpanded*.95,n.innerRadiusRatio=o?(n.radius-o)/n.radius:.6,n.gaugeArcWidth=o||(s<=n.radius-n.innerRadius?n.radius-n.innerRadius:s<=n.radius?s:n.radius);const u=e.pie_innerRadius||(i?i*(n.innerRadiusRatio+.1):0);n.outerRadius=e.pie_outerRadius,n.innerRadius=t.hasType("donut")||t.hasType("gauge")?n.radius*n.innerRadiusRatio:u},getRadius(t){const e=this,n=t==null?void 0:t.data;let{innerRadius:r,outerRadius:i}=e.state;return!le(r)&&n&&(r=r[n.id]||0),Ke(i)&&n&&n.id in i?i=i[n.id]:le(i)||(i=e.state.radius),{innerRadius:r,outerRadius:i}},updateArc(){const t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength(){const t=this,{config:e}=t,n=e.gauge_arcLength*3.6;let r=2*(n/360);return n<-360?r=-2:n>360&&(r=2),r*Math.PI},getStartingAngle(){const t=this,{config:e}=t,n=e.data_type,r=t.hasType("gauge")?e.gauge_fullCircle:!1,i=-1*Math.PI/2,o=Math.PI/2;let s=e[`${n}_startingAngle`]||0;return!r&&s<=i?s=i:!r&&s>=o?s=o:(s>Math.PI||s<-1*Math.PI)&&(s=Math.PI),s},updateAngle(t,e=!1){var n;const r=this,{config:i,state:o}=r,s=e&&r.hasType("gauge");let{pie:l}=r,c=t,u=!1;if(!i)return null;const f=r.getStartingAngle(),d=i.gauge_fullCircle||e&&!s?r.getArcLength():f*-2,h=c.data&&r.isGaugeType(c.data)&&!r.hasMultiArcGauge();if(h){const{gauge_min:m,gauge_max:S}=i,E=r.getTotalDataSum(o.rendered),C=d*((E-m)/(S-m));l=l.startAngle(f).endAngle(C+f)}if(e===!1){let m;if(h)m=l(r.filterTargetsToShow());else{const S="$arcPieLayout";let E=r.cache.get(S);(!E||E.generation!==o.redrawGeneration)&&(E={generation:o.redrawGeneration,layout:l(r.filterTargetsToShow())},r.cache.add(S,E)),m=E.layout}m.forEach((S,E)=>{var C;!u&&S.data.id===((C=c.data)==null?void 0:C.id)&&(u=!0,c=S,c.index=E)})}if(isNaN(c.startAngle)&&(c.startAngle=0),isNaN(c.endAngle)&&(c.endAngle=c.startAngle),e||c.data&&(i.gauge_enforceMinMax||r.hasMultiArcGauge())){const{gauge_min:m,gauge_max:S}=i,E=e&&!s?r.getTotalDataSum(o.rendered):S,C=d/(E-m),w=(n=c.value)!=null?n:0,N=w<m?0:w<E?w-m:E-m;c.startAngle=f,c.endAngle=f+C*N}return u||e?c:null},getSvgArc(){const t=this,{inner:e,outer:n,corner:r}=Ep.call(t),i=mp().innerRadius(e).outerRadius(n),o=function(s,l){var c;let u="M 0 0";if(s.value||s.data){const f=l?s:(c=t.updateAngle(s))!=null?c:null;f&&(u=i.cornerRadius(r(f,n(f)))(f))}return u};return o.centroid=i.centroid,o},getSvgArcExpanded(t=1){const e=this,{inner:n,outer:r,corner:i}=Ep.call(e,t),o=mp().innerRadius(n).outerRadius(r);return s=>{const l=e.updateAngle(s),c=r(l);let u=0;return l&&(u=i(l,c)),l&&o.cornerRadius(u)(l)||"M 0 0"}},getArc(t,e,n){return n||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},redrawArcRangeText(){const t=this,{config:e,$el:{arcs:n},state:r,$T:i}=t,o=e.arc_rangeText_format,s=t.hasType("gauge")&&e.arc_rangeText_fixed;let l=e.arc_rangeText_values;if(l!=null&&l.length){const c=e.arc_rangeText_unit==="%",u=t.getTotalDataSum(r.rendered);c&&(l=l.map(h=>u/100*h));const f=t.pie(l).map((h,m)=>(h.index=m,h));let d=n.selectAll(`.${Qe.arcRange}`).data(l);d.exit().remove(),d=i(d.enter().append("text").attr("class",Qe.arcRange).style("text-anchor","middle").style("pointer-events","none").style("opacity","0").text(h=>{const m=c?h/u*100:h;return ue(o)?o(m):`${m}${c?"%":""}`}).merge(d)),(!r.rendered||r.rendered&&!s)&&u>0&&d.attr("transform",function(h,m){return t.transformForArcLabel(this,f[m],!0)}),d.style("opacity",h=>!s&&(h>u||u===0)?"0":null)}},transformForArcLabel(t,e,n=!1){const r=this,i=r.updateAngle(e,n);if(!i)return"";let o,s=1;if(n||r.hasMultiArcGauge())o=OI(r,e,i,n);else if(!r.hasType("gauge")||r.data.targets.length>1){const l=MI(r,e,i);o=l.pos,s=l.ratio}else return"";return bg.call(r,t,o),`translate(${o.x*s},${o.y*s})`},convertToArcData(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel(t){var e;const n=this,r=n.hasType("gauge"),i=(e=Au.filter(n.hasType.bind(n)))==null?void 0:e[0];n.shouldShowArcLabel()&&t.style("fill",n.updateTextColor.bind(n)).attr("filter",o=>n.updateTextBGColor.bind(n)(o,n.config.data_labels_backgroundColors)).each(function(o){const s=Ut(this),l=n.updateAngle(o),c=n.getRatio("arc",l),u=Hc.call(n,c,i);if(o._cache={updated:l,ratio:c,meetsThreshold:u},u){const{value:f}=l||o,d=(n.getArcLabelConfig("format")||n.defaultArcValueFormat)(f,c,o.data.id).toString();ci(s,d,[-1,1],r)}else s.text("")})},expandArc(t){const e=this,{state:{transiting:n},$el:r}=e;if(n){const o=setInterval(()=>{e.state.transiting||(clearInterval(o),r.legend.selectAll(`.${nn.legendItemFocused}`).size()>0&&e.expandArc(t))},10);return}const i=e.mapToTargetIds(t);r.svg.selectAll(e.selectorTargets(i,`.${Qe.chartArc}`)).each(function(o){if(!e.shouldExpand(o.data.id))return;const s=e.getExpandConfig(o.data.id,"duration"),l=e.getSvgArcExpanded(e.getExpandConfig(o.data.id,"rate"));Ut(this).selectAll("path").transition().duration(s).attrTween("d",Eu(e.svgArcExpanded.bind(e))).transition().duration(s*2).attrTween("d",Eu(l.bind(e)))})},unexpandArc(t){const e=this,{state:{transiting:n},$el:{svg:r}}=e;if(n)return;const i=e.mapToTargetIds(t);r.selectAll(e.selectorTargets(i,`.${Qe.chartArc}`)).selectAll("path").transition().duration(o=>e.getExpandConfig(o.data.id,"duration")).attrTween("d",Eu(e.svgArc.bind(e))),r.selectAll(`${Qe.arc}`).style("opacity",null)},getExpandConfig(t,e){const n=this,{config:r}=n,i={duration:50,rate:.98};let o;return n.isDonutType(t)?o="donut":n.isGaugeType(t)?o="gauge":n.isPieType(t)&&(o="pie"),o?r[`${o}_expand_${e}`]:i[e]},shouldExpand(t){const e=this,{config:n}=e,r=e.isDonutType(t)?"donut":e.isGaugeType(t)?"gauge":e.isPieType(t)?"pie":null;return r?!!n[`${r}_expand`]:!1},shouldShowArcLabel(){const t=this,{config:e}=t;return Au.some(n=>t.hasType(n)&&e[`${n}_label_show`])},getArcLabelConfig(t="format"){const e=this,{config:n}=e;let r=i=>i;return Au.filter(e.hasType.bind(e)).forEach(i=>{r=n[`${i}_label_${t}`]}),t==="format"&&ue(r)?r.bind(e.api):r},updateTargetsForArc(t){const e=this,{$el:n}=e,r=e.hasType("gauge"),i=e.getChartClass("Arc"),o=e.getClass("arcs",!0),s=e.classFocus.bind(e),l=n.main.select(`.${Qe.chartArcs}`),c=l.selectAll(`.${Qe.chartArc}`).data(e.pie(t)).attr("class",f=>i(f)+s(f.data)),u=c.enter().append("g").attr("class",i).call(this.setCssRule(!1,`.${Qe.chartArcs} text`,["pointer-events:none","text-anchor:middle"]));u.append("g").attr("class",o).merge(c),u.append("text").attr("dy",r&&!e.hasMultiTargets()?"-.1em":null).style("opacity","0").style("text-anchor",e.getStylePropValue("middle")).style("pointer-events",e.getStylePropValue("none")),n.text=l.selectAll(`.${Ue.target} text`)},initArc(){const t=this,{$el:e}=t;e.arcs=e.main.select(`.${Ue.chart}`).append("g").attr("class",Qe.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle(t){const e=this,n=t||e.getArcTitle(),r=e.hasType("gauge");if(n){const i=r?cr.chartArcsGaugeTitle:Qe.chartArcsTitle;let o=e.$el.arcs.select(`.${i}`);o.empty()&&(o=e.$el.arcs.append("text").attr("class",i).style("text-anchor","middle")),r&&o.attr("dy","-0.3em"),ci(o,n,r?void 0:[-.6,1.35],!0)}},getArcTitle(){const t=this,e=t.hasType("donut")&&"donut"||t.hasType("gauge")&&"gauge";return e?t.config[`${e}_title`]:""},getArcTitleWithNeedleValue(){const t=this,{config:e,state:n}=t,r=t.getArcTitle();if(r&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(r)){let i=n.current.needle;return le(i)||(i=e.arc_needle_value),Da(r,{NEEDLE_VALUE:~~i})}return!1},redrawArc(t,e,n){const r=this,{config:i,state:o,$el:{main:s}}=r,l=i.interaction_enabled,c=l&&i.data_selection_isselectable;let u=s.selectAll(`.${Qe.arcs}`).selectAll(`.${Qe.arc}`).data(r.arcData.bind(r));u.exit().transition().duration(e).style("opacity","0").remove(),u=u.enter().append("path").attr("class",r.getClass("arc",!0)).style("fill",f=>r.color(f.data)).style("cursor",f=>{var d;return(d=c==null?void 0:c.bind)!=null&&d.call(c,r.api)(f)?"pointer":null}).style("opacity","0").each(function(f){r.isGaugeType(f.data)&&(f.startAngle=i.gauge_startingAngle,f.endAngle=i.gauge_startingAngle),this._current=f}).merge(u),r.hasType("gauge")&&(r.updateGaugeMax(),r.hasMultiArcGauge()&&r.redrawArcGaugeLine()),u.attr("transform",f=>!r.isGaugeType(f.data)&&n?"scale(0)":"").style("opacity",function(f){return f===this._current?"0":null}).each(()=>{o.transiting=!0}).transition().duration(t).attrTween("d",function(f){const d=r.updateAngle(f);if(!d)return()=>"M 0 0";isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);const h=Ya(this._current,d);return this._current=h(0),function(m){const S=h(m);return S.data=f.data,r.getArc(S,!0)}}).attr("transform",n?"scale(1)":"").style("fill",f=>{let d;return r.levelColor?(d=r.levelColor(f.data.values[0].value),i.data_colors[f.data.id]=d):d=r.color(f.data),d}).style("opacity",null).call(Zo,function(){if(r.levelColor){const f=Ut(this),d=f.datum(this._current);r.updateLegendItemColor(d.data.id,f.style("fill"))}o.transiting=!1,o.redrawing&&(o.redrawing=!1,o._targetsToShow=null,o._cachedDrawShape=null),$e(i.onrendered,r.api)}),l&&r.bindArcEvent(u),r.hasType("polar")&&r.redrawPolar(),r.hasType("gauge")&&r.redrawBackgroundArcs(),i.arc_needle_show&&r.redrawNeedle(),r.redrawArcText(t),r.redrawArcRangeText()},redrawNeedle(){const t=this,{$el:e,config:n,state:{hiddenTargetIds:r,radius:i}}=t,o=(i-1)/100*n.arc_needle_length,s=r.size!==t.data.targets.length;let l=t.$el.arcs.select(`.${Qe.needle}`);const c=n.arc_needle_path,u=n.arc_needle_bottom_width/2,f=n.arc_needle_top_width/2,d=n.arc_needle_top_rx,h=n.arc_needle_top_ry,m=n.arc_needle_bottom_len,S=n.arc_needle_bottom_rx,E=n.arc_needle_bottom_ry,C=t.getNeedleAngle(),w=()=>{const N=t.getArcTitleWithNeedleValue();N&&t.setArcTitle(N)};if(w(),l.empty()&&(l=e.arcs.append("path").classed(Qe.needle,!0),e.needle=l,e.needle.updateHelper=(N,z=!1)=>{e.needle.style("display")!=="none"&&t.$T(e.needle).style("transform",`rotate(${t.getNeedleAngle(N)}deg)`).call(Zo,()=>{z&&(n.arc_needle_value=N),w()})}),s){const N=ue(c)?c.call(t,o):`M-${u} ${m} A${S} ${E} 0 0 0 ${u} ${m} L${f} -${o} A${d} ${h} 0 0 0 -${f} -${o} L-${u} ${m} Z`;t.$T(l).attr("d",N).style("fill",n.arc_needle_color).style("display",null).style("transform",`rotate(${C}deg)`)}else l.style("display","none")},getNeedleAngle(t){const e=this,{config:n,state:r}=e,i=e.getArcLength(),o=e.hasType("gauge"),s=e.getTotalDataSum(!0);let l=on(t)?t:n.arc_needle_value,c=n[`${n.data_type}_startingAngle`]||0,u;if(le(l)||(l=o&&e.data.targets.length===1?s:0),r.current.needle=l,o){c=e.getStartingAngle();const f=n.gauge_fullCircle?i:c*-2,{gauge_min:d,gauge_max:h}=n;u=f*((l-d)/(h-d))}else u=s?i*(l/s):0;return(c+u)*(180/Math.PI)},redrawBackgroundArcs(){const t=this,{config:e,state:n}=t,r=t.hasMultiArcGauge(),i=e.gauge_fullCircle,o=t.getTargetsToShow().length===0&&!!e.data_empty_label_text,s=t.getStartingAngle(),l=i?s+t.getArcLength():s*-1;let c=t.$el.arcs.select(`${r?"g":""}.${Qe.chartArcsBackground}`);if(r){let u=0;c=c.selectAll(`path.${Qe.chartArcsBackground}`).data(t.data.targets),c.enter().append("path").attr("class",(f,d)=>`${Qe.chartArcsBackground} ${Qe.chartArcsBackground}-${d}`).merge(c).style("fill",e.gauge_background||null).attr("d",({id:f})=>{if(o||n.hiddenTargetIds.has(f))return"M 0 0";const d={data:[{value:e.gauge_max}],startAngle:s,endAngle:l,index:u++};return t.getArc(d,!0,!0)}),c.exit().remove()}else c.attr("d",o?"M 0 0":()=>{const u={data:[{value:e.gauge_max}],startAngle:s,endAngle:l};return t.getArc(u,!0,!0)})},bindArcEvent(t){const e=this,{config:n,state:r}=e,i=r.inputType==="touch",o=r.inputType==="mouse",s=u=>{const f=e.updateAngle(u);return f?e.convertToArcData(f):null};function l(u,f,d){e.expandArc(d),e.api.focus(d),e.toggleFocusLegend(d,!0),e.showTooltip([f],u)}function c(u){const f=(u==null?void 0:u.id)||void 0;e.unexpandArc(f),e.api.revert(),e.revertLegend(),e.hideTooltip()}if(t.on("click",function(u,f,d){var h;const m=s(f);m&&((h=e.toggleShape)==null||h.call(e,this,m,d),n.data_onclick.bind(e.api)(m,this))}),o&&t.on("mouseover",function(u,f){if(r.transiting)return;r.event=u;const d=s(f),h=(d==null?void 0:d.id)||void 0;l(this,d,h),e.setOverOut(!0,d)}).on("mouseout",(u,f)=>{if(r.transiting||!n.interaction_onout)return;r.event=u;const d=s(f);c(),e.setOverOut(!1,d)}).on("mousemove",function(u,f){const d=s(f);r.event=u,e.showTooltip([d],this)}),i&&e.hasArcType()&&!e.radars){const u=f=>{var d,h;const{clientX:m,clientY:S}=(h=(d=f.changedTouches)==null?void 0:d[0])!=null?h:{clientX:0,clientY:0};return Ut(Ze.elementFromPoint(m,S))};e.$el.svg.on("touchstart touchmove",function(f){if(r.transiting)return;r.event=f;const h=u(f).datum(),m=h!=null&&h.data&&h.data.id?e.updateAngle(h):null,S=m?e.convertToArcData(m):null,E=(S==null?void 0:S.id)||void 0;e.callOverOutForTouch(S),Tn(E)?c():l(this,S,E)},{passive:!0})}},redrawArcText(t){const e=this,{config:n,state:r,$el:{main:i,arcs:o}}=e,s=e.hasType("gauge"),l=e.hasMultiArcGauge();let c;if(s&&e.data.targets.length===1&&n.gauge_title||(c=i.selectAll(`.${Qe.chartArc}`).select("text").style("opacity","0").attr("class",u=>e.isGaugeType(u.data)?cr.gaugeValue:null).call(e.textForArcLabel.bind(e)).style("font-size",u=>e.isGaugeType(u.data)&&e.data.targets.length===1&&!l?`${Math.round(r.radius/5)}px`:null),Tg.call(e),c.attr("transform",function(u){return e.transformForArcLabel.bind(e)(this,u)}).transition().duration(t).style("opacity",u=>e.isTargetToShow(u.data.id)&&e.isArcType(u.data)?null:"0"),l&&c.attr("dy","-.1em")),i.select(`.${Qe.chartArcsTitle}`).style("opacity",e.hasType("donut")||s?null:"0"),s){const u=n.gauge_fullCircle;u&&(c==null||c.attr("dy",`${l?0:Math.round(r.radius/14)}`)),n.gauge_label_show&&(o.select(`.${cr.chartArcsGaugeUnit}`).attr("dy",`${u?1.5:.75}em`).text(n.gauge_units),o.select(`.${cr.chartArcsGaugeMin}`).attr("dx",`${-1*(r.innerRadius+(r.radius-r.innerRadius)/(u?1:2))}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_min,!1)),!u&&o.select(`.${cr.chartArcsGaugeMax}`).attr("dx",`${r.innerRadius+(r.radius-r.innerRadius)/2}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_max,!0)))}bp.call(e)&&TI.call(e,t)},getArcElementByIdOrIndex(t){const e=this,{$el:{arcs:n}}=e,r=le(t)?i=>i.index===t:i=>i.data.id===t;return n==null?void 0:n.selectAll(`.${Ue.target} path`).filter(r)}};function Si(t,e){bn(Ir.prototype,[LI,Ti].concat(t||[])),Ua.setOptions([Wa].concat(e||[]))}let Cp=()=>(Si(void 0,[qs,sI]),(Cp=()=>kt.DONUT)());var DI=Object.defineProperty,Ip=Object.getOwnPropertySymbols,FI=Object.prototype.hasOwnProperty,NI=Object.prototype.propertyIsEnumerable,Rp=(t,e,n)=>e in t?DI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$I=(t,e)=>{for(var n in e||(e={}))FI.call(e,n)&&Rp(t,n,e[n]);if(Ip)for(var n of Ip(e))NI.call(e,n)&&Rp(t,n,e[n]);return t};function Ai(t=!1){const e=this,{config:n,state:{current:{width:r,height:i}}}=e,o=e.getCurrentPadding(),s=$I({width:r-o.left-o.right,height:i-(n.legend_show?e.getLegendHeight()+10:0)-o.top-o.bottom},o);if(t){const l=Cu.call(e,s),c=n.funnel_rotated;s.width=Math.max(s.width,c?l.height:l.width),s.height=Math.max(s.height,c?l.width:l.height)}return s}function Cu(t){const e=this,{config:n}=e,r=n.funnel_rotated,[i,o]=[n.funnel_neck_width,n.funnel_neck_height].map((s,l)=>Ke(s)?t[r!==!l?"width":"height"]*s.ratio:s);return{width:i,height:o}}function BI(t){const e=this,n=e.config.funnel_rotated,{width:r,height:i}=Ai.call(e,!0),o=[];return t.forEach((s,l)=>{const{ratio:c=0}=s,u=l>0?o[l-1][2][n?0:1]:0,f=c+u;o.push(s.coords=n?[[u,0],[f,0],[f,i],[u,i],[u,0]]:[[0,u],[r,u],[r,f],[0,f],[0,u]])}),o}function zI(){const t=this,e=t.config.funnel_rotated,{width:n,height:r}=Ai.call(t,!0),i=Cu.call(t,{width:n,height:r});let o;if(e){const s=(r-i.width)/2,l=n-i.height;o=[[l,s],[n,s],[n,r-s],[l,r-s],[0,r]]}else{const s=(n-i.width)/2,l=r-i.height;o=[[n,0],[n-s,l],[n-s,r],[s,r],[s,l]]}return`M${[[0,0],...o,[0,0]].join("L")}z`}function UI(t){const e=this,{config:n}=e,r=t.map(i=>({id:i.id,value:i.values.reduce((o,s)=>o+s.value,0)}));return n.data_order&&r.sort(e.getSortCompareFn.bind(e)(!0)),wp.call(e,r)}function wp(t){const e=this,{width:n,height:r}=Ai.call(e),i=e.getTotalDataSum(!0),o=e.config.funnel_rotated?n:r;return t.forEach(s=>{s.ratio=s.value/i*o}),t}function kI(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2}function Op(t,e,n,r,i){const o=[];for(let l=0;l<=20;l++){const c=l/20,u=t+(e-t)*c,f=n+(r-n)*kI(c);o.push(i?[u,f]:[f,u])}return o}function GI(){var t;const e=this,n=e.config.funnel_rotated,{width:r,height:i}=Ai.call(e,!0),o=Cu.call(e,{width:r,height:i}),s=oc().x(m=>m[0]).y(m=>m[1]).curve(os),l=(n?i-o.width:r-o.width)/2,c=n?r-o.height:i-o.height,u=Op(0,c,n?0:r,n?l:r-l,n),f=[];if(o.height>0&&(u.push(n?[r,l]:[r-l,i]),f.push(n?[r,i-l]:[l,i])),f.push(...Op(c,0,n?i-l:l,n?i:0,n)),u.length>1){const[m,S]=n?[1,0]:[0,1];u.splice(1,0,[u[m][0],u[S][1]]);const E=f.length-1;E>0&&f.splice(E,0,[f[E-m][0],f[E-S][1]])}const d=s(u)||"",h=((t=s(f))==null?void 0:t.replace(/^M/,"L"))||"";return n?`${d}${h}z`:`M0,0${d.replace(/^M/,"L")}${h}z`}var XI={initFunnel(){const t=this,{$el:e}=t;e.funnel=e.main.select(`.${Ue.chart}`).append("g").classed(eo.chartFunnels,!0),e.funnel.background=e.funnel.append("path").classed(eo.funnelBackground,!0),t.bindFunnelEvent()},bindFunnelEvent(){const t=this,{$el:{funnel:e},config:n,state:r}=t;if(!n.interaction_enabled)return;const i=s=>{var l;const c=s.isTrusted?s.target:(l=r.eventReceiver.rect)==null?void 0:l.node();if(c&&/^path$/i.test(c.tagName))return r.event=s,Ut(c).datum()},o=r.inputType==="touch";e.on(o?"touchstart":"mouseover mousemove",s=>{const l=i(s);l&&(t.showTooltip([l],s.target),/^(touchstart|mouseover)$/.test(s.type)&&t.setOverOut(!0,l))},o?{passive:!0}:void 0).on(o?"touchend":"mouseout",s=>{const l=i(s);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))})},updateTargetsForFunnel(t){const e=this,{$el:{funnel:n}}=e;n||e.initFunnel();const r=e.getChartClass("Funnel"),i=e.getClass("funnel",!0),o=UI.call(e,t.filter(e.isFunnelType.bind(e))),s=e.filterNullish(o),l=n.selectAll(`.${eo.chartFunnel}`).data(s);l.exit().remove();const c=l.enter().insert("g",`.${eo.funnelBackground}`);c.append("path"),n.path=c.merge(l).attr("class",r).select("path").attr("class",i).style("opacity","0").style("fill",e.color)},updateFunnel(t){const e=this,{$el:{funnel:n}}=e,r=t.map(({id:i})=>i);n.path=n.path.filter(i=>r.includes(i.id))},generateGetFunnelPoints(){const t=this,{config:e,$el:{funnel:n}}=t,r=e.funnel_rotated,i=t.filterTargetsToShow(n.path),{top:o,left:s,width:l,height:c}=Ai.call(t),u={};let f=0;return i.each(d=>{const h=f,{ratio:m}=d;f+=m;const S=r?s:o,E=S+h,C=S+f,w=(E+C)/2,N=r?o+c/2:s+l/2;u[d.id]=r?[[E,N],[C,N],[w,N]]:[[N,E],[N,C],[N,w]]}),d=>u[d.id]},redrawFunnel(){const t=this,{config:e,$T:n,$el:{funnel:r}}=t,i=t.filterTargetsToShow(r.path),o=BI.call(t,wp.call(t,i.data())),{top:s,left:l}=Ai.call(t),c=(e.funnel_spline?GI:zI).call(t);r.attr("transform",`translate(${l}, ${s})`).attr("clip-path",`path('${c}')`),r.background.attr("d",c),n(i).attr("d",(u,f)=>`M${o[f].join("L")}z`).style("opacity","1"),r.selectAll("g").style("opacity",null)}},WI={funnel_neck_width:0,funnel_neck_height:0,funnel_rotated:!1,funnel_spline:!1};let Pp=()=>(Si([XI],[WI]),(Pp=()=>kt.FUNNEL)());var VI={initGauge(){const t=this,{config:e,$el:{arcs:n}}=t,r=(i=null,o="")=>{n.append("text").attr("class",i).style("text-anchor","middle").style("pointer-events","none").text(o)};if(t.hasType("gauge")){const i=t.hasMultiArcGauge();n.append(i?"g":"path").attr("class",Qe.chartArcsBackground).style("fill",!i&&e.gauge_background||null),e.gauge_units&&r(cr.chartArcsGaugeUnit),e.gauge_label_show&&(r(cr.chartArcsGaugeMin),!e.gauge_fullCircle&&r(cr.chartArcsGaugeMax))}},updateGaugeMax(){const t=this,{config:e,state:n}=t,i=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(n.rendered);!e.gauge_enforceMinMax&&i+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=i-e.gauge_min)},redrawArcGaugeLine(){const t=this,{config:e,state:n,$el:r}=t,{hiddenTargetIds:i}=t.state,o=r.main.selectAll(`.${Qe.arcs}`).selectAll(`.${Qe.arcLabelLine}`).data(t.arcData.bind(t));o.enter().append("rect").attr("class",l=>`${Qe.arcLabelLine} ${Ue.target} ${Ue.target}-${l.data.id}`).merge(o).style("fill",l=>t.levelColor?t.levelColor(l.data.values[0].value):t.color(l.data)).style("display",e.gauge_label_show?null:"none").each(function(l){let c=0;const u=2;let f=0,d=0,h="";if(!i.has(l.data.id)){const m=t.updateAngle(l),S=n.gaugeArcWidth/t.getTargetsToShow().length*(m.index+1),E=m.endAngle-Math.PI/2,C=n.radius-S,w=E-(C===0?0:1/C);c=n.radiusExpanded-n.radius+S,f=Math.cos(w)*C,d=Math.sin(w)*C,h=`rotate(${E*180/Math.PI}, ${f}, ${d})`}Ut(this).attr("x",f).attr("y",d).attr("width",c).attr("height",u).attr("transform",h).style("stroke-dasharray",`0, ${c+u}, 0`)})},textForGaugeMinMax(t,e){const n=this,{config:r}=n,i=r.gauge_label_extents;return ue(i)?i.bind(n.api)(t,e):t},getGaugeLabelHeight(){const{config:t}=this;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge(){return this.getGaugeLabelHeight()*2}},jI={gauge_background:"",gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_extents:void 0,gauge_label_format:void 0,gauge_label_ratio:void 0,gauge_label_threshold:0,gauge_label_line:!1,gauge_label_image:void 0,gauge_enforceMinMax:!1,gauge_min:0,gauge_max:100,gauge_type:"single",gauge_startingAngle:-1*Math.PI/2,gauge_arcLength:100,gauge_title:"",gauge_units:void 0,gauge_width:void 0,gauge_arcs_minWidth:5,gauge_expand:{},gauge_expand_rate:.98,gauge_expand_duration:50};let Mp=()=>(Si([VI],[qs,jI]),(Mp=()=>kt.GAUGE)()),Lp=()=>(sa(),(Lp=()=>kt.LINE)()),Dp=()=>(sa(void 0,[hu]),(Dp=()=>kt.SPLINE)()),Fp=()=>(sa(),(Fp=()=>kt.STEP)());var HI={pie_label_show:!0,pie_label_format:void 0,pie_label_ratio:void 0,pie_label_threshold:.05,pie_label_line:!1,pie_label_image:void 0,pie_expand:{},pie_expand_rate:.98,pie_expand_duration:50,pie_innerRadius:0,pie_outerRadius:void 0,pie_padAngle:0,pie_padding:0,pie_startingAngle:0};let Np=()=>(Si(void 0,[qs,HI]),(Np=()=>kt.PIE)());function $p(t){const e=t.config.polar_level_max;let n=t.getMinMaxData().max[0].value;return e&&e>n&&(n=e),n}var YI={initPolar(){const t=this,{$el:{arcs:e},config:n}=t,r=n.polar_level_text_show,i=n.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",na.levels),r&&i&&t.generateTextBGColorFilter(i)},getPolarOuterRadius(t,e){var n;const r=$p(this);return((n=t==null?void 0:t.data.values[0].value)!=null?n:0)/r*e},updateTargetsForPolar(t){this.updateTargetsForArc(t)},redrawPolar(){const t=this,{config:e}=t;e.polar_level_show&&t.updatePolarLevel()},updatePolarLevel(){const t=this,{config:e,state:n,$el:{arcs:{levels:r}}}=t,i=e.polar_level_depth,o=$p(t),s=Jo(0,i),l=n.radius,c=s.map(h=>l*((h+1)/i)),u=(e.polar_level_text_format||function(){}).bind(t.api),f=r.selectAll(`.${na.level}`).data(s);f.exit().remove();const d=f.enter().append("g").attr("class",(h,m)=>`${na.level} ${na.level}-${m}`);if(d.append("circle"),d.merge(f).selectAll("circle").style("visibility",e.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",h=>c[h]),e.polar_level_text_show){const h=e.polar_level_text_backgroundColor,m=`#${n.datetimeId}-labels-bg${t.getTargetSelectorSuffix(h)}`;d.append("text").style("text-anchor","middle"),d.merge(f).selectAll("text").attr("dy",S=>-c[S]+5).attr("filter",h?`url(${m})`:null).text(S=>u(o/s.length*(S+1)))}}},KI={polar_label_show:!0,polar_label_format:void 0,polar_label_threshold:.05,polar_label_line:!1,polar_label_image:void 0,polar_label_ratio:void 0,polar_level_depth:3,polar_level_max:void 0,polar_level_show:!0,polar_level_text_backgroundColor:"#fff",polar_level_text_format:t=>t%1===0?t:t.toFixed(2),polar_level_text_show:!0,polar_padAngle:0,polar_padding:0,polar_startingAngle:0};let Bp=()=>(Si([YI],[qs,KI]),(Bp=()=>kt.POLAR)());function ZI(t,e,n,r,i,o){const s=t&&r>0?n-r:r,l=2*Math.PI;return i*(1-o*(e==="x"?Math.sin:Math.cos)(s*l/n))}const Ei=ke.radarPoints,zp=ke.radarTextWidth;var JI={initRadar(){const t=this,{config:e,state:{current:n},$el:r}=t;t.hasType("radar")&&(r.radar=r.main.select(`.${Ue.chart}`).append("g").attr("class",hh.chartRadars),r.radar.levels=r.radar.append("g").attr("class",na.levels),r.radar.axes=r.radar.append("g").attr("class",Pn.axis),r.radar.shapes=r.radar.append("g").attr("class",An.shapes),n.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value,e.radar_axis_text_show&&(e.interaction_enabled&&t.bindRadarEvent(),t.updateRadarLevel(),t.updateRadarAxes()))},getRadarSize(){const t=this,{config:e,state:{arcWidth:n,arcHeight:r}}=t,i=e.axis_x_categories.length<4?-20:10,o=(Math.min(n,r)-i)/2;return[o,o]},updateTargetsForRadar(t){const e=this,{config:n}=e;dr(n.axis_x_categories)&&(n.axis_x_categories=Jo(0,br("max",t.map(r=>r.values.length)))),e.generateRadarPoints()},getRadarPosition(t,e,n,r){const i=this,{config:o}=i,[s,l]=i.getRadarSize(),c=o.axis_x_categories.length,u=o.radar_direction_clockwise,f=La(t).map(d=>ZI(u,d,c,e,on(n)?n:t==="x"?s:l,le(r)?r:o.radar_size_ratio));return f.length===1?f[0]:f},generateRadarPoints(){const t=this,e=t.data.targets,[n,r]=t.getRadarSize(),i=t.cache.get(Ei)||{},o=i._size;(!o||o.width!==n&&o.height!==r)&&(e.forEach(s=>{i[s.id]=s.values.map((l,c)=>t.getRadarPosition(["x","y"],c,void 0,t.getRatio("radar",l)))}),i._size={width:n,height:r},t.cache.add(Ei,i))},redrawRadar(){const t=this,{radar:e,main:n}=t.$el,r=t.getTranslate("radar");r&&(e.attr("transform",r),n.select(`.${Rn.chartTexts}`).attr("transform",r),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints(){const t=this.cache.get(Ei);return(e,n)=>{const r=t[e.id][n];return[r,r,r,r]}},updateRadarLevel(){const t=this,{config:e,state:n,$el:{radar:r}}=t,[i,o]=t.getRadarSize(),s=e.radar_level_depth,l=e.axis_x_categories.length,c=e.radar_level_text_show,u=r.levels,f=Jo(0,s),d=e.radar_size_ratio*Math.min(i,o),h=f.map(w=>d*((w+1)/s)),m=(e.radar_level_text_format||function(){}).bind(t.api),S=f.map(w=>{const N=h[w];return Jo(0,l).map($=>t.getRadarPosition(["x","y"],$,N,1).join(",")).join(" ")}),E=u.selectAll(`.${na.level}`).data(f);E.exit().remove();const C=E.enter().append("g").attr("class",(w,N)=>`${na.level} ${na.level}-${N}`);C.append("polygon").style("visibility",e.radar_level_show?null:"hidden"),c&&(u.select("text").empty()&&u.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(()=>m(0)),C.append("text").attr("dx","-.5em").style("text-anchor","end").text(w=>m(n.current.dataMax/f.length*(w+1)))),C.merge(E).attr("transform",w=>`translate(${i-h[w]}, ${o-h[w]})`).selectAll("polygon").attr("points",w=>S[w]),c&&u.selectAll("text").attr("x",w=>Tn(w)?i:S[w].split(",")[0]).attr("y",w=>Tn(w)?o:0)},updateRadarAxes(){const t=this,{config:e,$el:{radar:n}}=t,[r,i]=t.getRadarSize(),o=e.axis_x_categories;let s=n.axes.selectAll("g").data(o);s.exit().remove();const l=s.enter().append("g").attr("class",(c,u)=>`${Pn.axis}-${u}`);if(e.radar_axis_line_show&&l.append("line"),e.radar_axis_text_show&&l.append("text"),s=l.merge(s),e.radar_axis_line_show&&s.select("line").attr("x1",r).attr("y1",i).attr("x2",(c,u)=>t.getRadarPosition("x",u)).attr("y2",(c,u)=>t.getRadarPosition("y",u)),e.radar_axis_text_show){const{x:c=0,y:u=0}=e.radar_axis_text_position,f=t.cache.get(zp)||0;if(s.select("text").style("text-anchor","middle").attr("dy",".5em").call(d=>{d.each(function(h){ci(Ut(this),String(h),[-.6,1.2])})}).datum((d,h)=>({index:h})).attr("transform",function(d){Tn(this.width)&&(this.width=cn(this,!0).width/2);let h=t.getRadarPosition("x",d.index,void 0,1),m=Math.round(t.getRadarPosition("y",d.index,void 0,1));return h>r?h+=this.width+c:Math.round(h)<r&&(h-=this.width+c),m>i?(m/2===i&&this.firstChild.tagName==="tspan"&&this.firstChild.setAttribute("dy","0em"),m+=u):m<i&&(m-=u),`translate(${h} ${m})`}),!f){const d=[n.axes,n.levels].map(h=>Sh(h.node()).width);d.every(h=>h>0)&&t.cache.add(zp,d[0]-d[1])}}},bindRadarEvent(){const t=this,{config:e,state:n,$el:{radar:r,svg:i}}=t,o=t.isPointFocusOnly(),{inputType:s,transiting:l}=n,c=s==="mouse",u=f=>{if(n.event=f,!e.interaction_onout)return;const d=t.getDataIndexFromEvent(f),h=Tn(d);(c||h)&&(t.hideTooltip(),o?t.hideCircleFocus():t.unexpandCircles(),c?t.setOverOut(!1,d):h&&t.callOverOutForTouch())};r.axes.on(c?"mouseover ":"touchstart",f=>{if(l)return;n.event=f;const d=t.getDataIndexFromEvent(f);t.selectRectForSingle(i.node(),d),c?t.setOverOut(!0,d):t.callOverOutForTouch(d)},c?void 0:{passive:!0}).on("mouseout",c?u:null),c||i.on("touchstart",u,{passive:!0})},updateRadarShape(){const t=this,e=t.data.targets.filter(o=>t.isRadarType(o)),n=t.cache.get(Ei),r=t.$el.radar.shapes.selectAll("polygon").data(t.filterNullish(e)),i=r.enter().append("g").attr("class",t.getChartClass("Radar"));t.$T(r.exit()).remove(),i.append("polygon").merge(r).style("fill",t.color).style("stroke",t.color).attr("points",o=>n[o.id].join(" ")),t.updateTargetForCircle(e,i)},radarCircleX(t){return this.cache.get(Ei)[t.id][t.index][0]},radarCircleY(t){return this.cache.get(Ei)[t.id][t.index][1]}},QI={radar_axis_max:void 0,radar_axis_line_show:!0,radar_axis_text_show:!0,radar_axis_text_position:{},radar_level_depth:3,radar_level_show:!0,radar_level_text_format:t=>t%1===0?t:t.toFixed(2),radar_level_text_show:!0,radar_size_ratio:.87,radar_direction_clockwise:!1};let Up=()=>(Si([tp.eventrect,Ys,JI],[Wa,QI,{axis_x_categories:ep.optAxis.axis_x_categories}]),(Up=()=>kt.RADAR)());var _I={scatter_zerobased:!1};let kp=()=>(mo([Ti,Ys],[Wa,_I]),(kp=()=>kt.SCATTER)());function qI(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function el(t,e,n,r,i){for(var o=t.children,s,l=-1,c=o.length,u=t.value&&(r-e)/t.value;++l<c;)s=o[l],s.y0=n,s.y1=i,s.x0=e,s.x1=e+=s.value*u}function nl(t,e,n,r,i){for(var o=t.children,s,l=-1,c=o.length,u=t.value&&(i-n)/t.value;++l<c;)s=o[l],s.x0=e,s.x1=r,s.y0=n,s.y1=n+=s.value*u}var Gp=(1+Math.sqrt(5))/2;function Xp(t,e,n,r,i,o){for(var s=[],l=e.children,c,u,f=0,d=0,h=l.length,m,S,E=e.value,C,w,N,z,$,G,V;f<h;){m=i-n,S=o-r;do C=l[d++].value;while(!C&&d<h);for(w=N=C,G=Math.max(S/m,m/S)/(E*t),V=C*C*G,$=Math.max(N/V,V/w);d<h;++d){if(C+=u=l[d].value,u<w&&(w=u),u>N&&(N=u),V=C*C*G,z=Math.max(N/V,V/w),z>$){C-=u;break}$=z}s.push(c={value:C,dice:m<S,children:l.slice(f,d)}),c.dice?el(c,n,r,i,E?r+=S*C/E:o):nl(c,n,r,E?n+=m*C/E:i,o),E-=C,f=d}return s}var Wp=(function t(e){function n(r,i,o,s,l){Xp(e,r,i,o,s,l)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(Gp);function Mw(t){return t==null?null:Vp(t)}function Vp(t){if(typeof t!="function")throw new Error;return t}function xo(){return 0}function yo(t){return function(){return t}}function tR(){var t=Wp,e=!1,n=1,r=1,i=[0],o=xo,s=xo,l=xo,c=xo,u=xo;function f(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],e&&h.eachBefore(qI),h}function d(h){var m=i[h.depth],S=h.x0+m,E=h.y0+m,C=h.x1-m,w=h.y1-m;C<S&&(S=C=(S+C)/2),w<E&&(E=w=(E+w)/2),h.x0=S,h.y0=E,h.x1=C,h.y1=w,h.children&&(m=i[h.depth+1]=o(h)/2,S+=u(h)-m,E+=s(h)-m,C-=l(h)-m,w-=c(h)-m,C<S&&(S=C=(S+C)/2),w<E&&(E=w=(E+w)/2),t(h,S,E,C,w))}return f.round=function(h){return arguments.length?(e=!!h,f):e},f.size=function(h){return arguments.length?(n=+h[0],r=+h[1],f):[n,r]},f.tile=function(h){return arguments.length?(t=Vp(h),f):t},f.padding=function(h){return arguments.length?f.paddingInner(h).paddingOuter(h):f.paddingInner()},f.paddingInner=function(h){return arguments.length?(o=typeof h=="function"?h:yo(+h),f):o},f.paddingOuter=function(h){return arguments.length?f.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):f.paddingTop()},f.paddingTop=function(h){return arguments.length?(s=typeof h=="function"?h:yo(+h),f):s},f.paddingRight=function(h){return arguments.length?(l=typeof h=="function"?h:yo(+h),f):l},f.paddingBottom=function(h){return arguments.length?(c=typeof h=="function"?h:yo(+h),f):c},f.paddingLeft=function(h){return arguments.length?(u=typeof h=="function"?h:yo(+h),f):u},f}function jp(t,e,n,r,i){var o=t.children,s,l=o.length,c,u=new Array(l+1);for(u[0]=c=s=0;s<l;++s)u[s+1]=c+=o[s].value;f(0,l,t.value,e,n,r,i);function f(d,h,m,S,E,C,w){if(d>=h-1){var N=o[d];N.x0=S,N.y0=E,N.x1=C,N.y1=w;return}for(var z=u[d],$=m/2+z,G=d+1,V=h-1;G<V;){var J=G+V>>>1;u[J]<$?G=J+1:V=J}$-u[G-1]<u[G]-$&&d+1<G&&--G;var Q=u[G]-z,rt=m-Q;if(C-S>w-E){var et=m?(S*rt+C*Q)/m:C;f(d,G,Q,S,E,et,w),f(G,h,rt,et,E,C,w)}else{var st=m?(E*rt+w*Q)/m:w;f(d,G,Q,S,E,C,st),f(G,h,rt,S,st,C,w)}}}function eR(t,e,n,r,i){(t.depth&1?nl:el)(t,e,n,r,i)}var nR=(function t(e){function n(r,i,o,s,l){if((c=r._squarify)&&c.ratio===e)for(var c,u,f,d,h=-1,m,S=c.length,E=r.value;++h<S;){for(u=c[h],f=u.children,d=u.value=0,m=f.length;d<m;++d)u.value+=f[d].value;u.dice?el(u,i,o,s,E?o+=(l-o)*u.value/E:l):nl(u,i,o,E?i+=(s-i)*u.value/E:s,l),E-=u.value}else r._squarify=c=Xp(e,r,i,o,s,l),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(Gp);function rR(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function aR(){return this.eachAfter(rR)}function iR(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function oR(t,e){for(var n=this,r=[n],i,o,s=-1;n=r.pop();)if(t.call(e,n,++s,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function sR(t,e){for(var n=this,r=[n],i=[],o,s,l,c=-1;n=r.pop();)if(i.push(n),o=n.children)for(s=0,l=o.length;s<l;++s)r.push(o[s]);for(;n=i.pop();)t.call(e,n,++c,this);return this}function lR(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function cR(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function uR(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function fR(t){for(var e=this,n=dR(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function dR(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function hR(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function gR(){return Array.from(this)}function vR(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function pR(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*mR(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Iu(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=TR)):e===void 0&&(e=yR);for(var n=new rl(t),r,i=[n],o,s,l,c;r=i.pop();)if((s=e(r.data))&&(c=(s=Array.from(s)).length))for(r.children=s,l=c-1;l>=0;--l)i.push(o=s[l]=new rl(s[l])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(SR)}function xR(){return Iu(this).eachBefore(bR)}function yR(t){return t.children}function TR(t){return Array.isArray(t)?t[1]:null}function bR(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function SR(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function rl(t){this.data=t,this.depth=this.height=0,this.parent=null}rl.prototype=Iu.prototype={constructor:rl,count:aR,each:iR,eachAfter:sR,eachBefore:oR,find:lR,sum:cR,sort:uR,path:fR,ancestors:hR,descendants:gR,leaves:vR,links:pR,copy:xR,[Symbol.iterator]:mR};function AR(t){const e=this;return t.map(n=>{const{id:r,values:i}=n,{value:o}=i[0];return{name:r,id:r,value:o,ratio:e.getRatio("treemap",i[0])}})}var ER={initTreemapLayout(){this.treemap=tR().tile(this.getTreemapTile())},getTreemapTile(){var t,e;const n=this,{config:r,state:{current:{width:i,height:o}}}=n,s=(e={binary:jp,dice:el,slice:nl,sliceDice:eR,squarify:Wp,resquarify:nR}[(t=r.treemap_tile)!=null?t:"binary"])!=null?e:jp;return(l,c,u,f,d)=>{s(l,0,0,i,o);for(const h of l.children)h.x0=c+h.x0/i*(f-c),h.x1=c+h.x1/i*(f-c),h.y0=u+h.y0/o*(d-u),h.y1=u+h.y1/o*(d-u)}},getTreemapData(t){const e=this;return{name:"root",children:AR.bind(e)(e.filterTargetsToShow(t.filter(e.isTreemapType,e)))}},getTreemapRoot(t){const e=this,n=e.getTreemapData(t!=null?t:e.data.targets),r=Iu(n).sum(o=>o.value),i=e.getSortCompareFn(!0);return e.treemap||e.initTreemapLayout(),e.treemap(i?r.sort(i):r)}},CR=Object.defineProperty,IR=Object.defineProperties,RR=Object.getOwnPropertyDescriptors,Hp=Object.getOwnPropertySymbols,wR=Object.prototype.hasOwnProperty,OR=Object.prototype.propertyIsEnumerable,Yp=(t,e,n)=>e in t?CR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PR=(t,e)=>{for(var n in e||(e={}))wR.call(e,n)&&Yp(t,n,e[n]);if(Hp)for(var n of Hp(e))OR.call(e,n)&&Yp(t,n,e[n]);return t},MR=(t,e)=>IR(t,RR(e));function LR(t,e){const n=this;t.selectAll("g").attr("transform",r=>{const i=ai(n,r,e);return`translate(${i.x},${i.y})`}).select("rect").attr("width",r=>ai(n,r,e).w).attr("height",r=>ai(n,r,e).h)}var DR=MR(PR({},ER),{initTreemap(){const t=this,{$el:e,state:{current:{width:n,height:r},clip:i,datetimeId:o}}=t;i.id=`${o}-clip`,t.initTreemapLayout(),e.defs.append("clipPath").attr("id",i.id).append("rect").attr("width",n).attr("height",r),e.treemap=e.main.select(`.${Ue.chart}`).attr("clip-path",`url(#${i.id})`).append("g").classed(vh.chartTreemaps,!0),t.bindTreemapEvent()},bindTreemapEvent(){const t=this,{$el:e,config:n,state:r}=t,i=o=>{var s;const l=o.isTrusted?o.target:(s=r.eventReceiver.rect)==null?void 0:s.node();let c;return l&&/^rect$/i.test(l.tagName)&&(r.event=o,c=Ut(l).datum()),c==null?void 0:c.data};if(n.interaction_enabled){const o=r.inputType==="touch";e.treemap.on(o?"touchstart":"mouseover mousemove",s=>{const l=i(s);l&&(t.showTooltip([l],s.currentTarget),/^(touchstart|mouseover)$/.test(s.type)&&t.setOverOut(!0,l))},o?{passive:!0}:void 0).on(o?"touchend":"mouseout",s=>{const l=i(s);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))})}},updateTargetsForTreemap(t){const e=this,{$el:{treemap:n}}=e,r=[e.getTreemapRoot(t!=null?t:e.data.targets)];n.data(e.filterNullish(r))},updateTreemap(t){const e=this,{$el:n,$T:r}=e,i=n.treemap.datum(),o=e.getChartClass("Treemap"),s=e.getClass("treemap",!0),l=n.treemap.selectAll("g").data(i.children);r(l.exit(),t).style("opacity","0").remove(),l.enter().append("g").append("rect"),n.treemap.selectAll("g").attr("class",o).select("rect").attr("class",s).attr("fill",c=>e.color(c.data.name))},generateGetTreemapPoints(){const t=this,{$el:e}=t,n={};return e.treemap.selectAll("g").each(r=>{const i=ai(t,r);n[r.data.name]=[[i.x,i.y],[i.x+i.w,i.y+i.h]]}),r=>n[r.id]},redrawTreemap(t){const e=this,{$el:n,state:{current:{width:r,height:i}}}=e;return n.defs.select("rect").attr("width",r).attr("height",i),[e.$T(n.treemap,t,Pr()).call(LR.bind(e),n.treemap.datum())]},treemapDataLabelFormat(t){const e=this,{$el:{treemap:n},config:r,scale:{x:i,y:o}}=e,{id:s,value:l}=t,c=r.treemap_label_format,u=e.getRatio("treemap",t),f=(u*100).toFixed(2),d=r.treemap_label_show&&Hc.call(e,u,"treemap")?null:"0",h=n.selectAll("g").filter(E=>E.data.id===s).datum();let m=0,S=0;if(h){const{x0:E,x1:C,y0:w,y1:N}=h;m=i(C)-i(E),S=o(N)-o(w)}return function(E){return E.style("opacity",d),ue(c)?c.bind(e.api)(l,u,s,{width:m,height:S}):`${s}
61
- ${f}%`}}}),FR={treemap_tile:"binary",treemap_label_format:void 0,treemap_label_threshold:.05,treemap_label_show:!0};let Kp=()=>(mo([DR],[FR]),(Kp=()=>kt.TREEMAP)()),Ru=Object.create(null);const Zp={version:"4.1.0-next.2",generate(t){const e=Kr(Object.create(null),Ru,t),n=new Jn(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults(t){return Ke(t)&&(Ru=t),Ru},instance:[],plugin:{}};Object.keys(v).forEach(t=>v[t]()),Object.keys(g).forEach(t=>g[t]()),uv(),fv(),Av(),Xv(),cv(),iv()})],bo={};function rr(T){var P=bo[T];if(P!==void 0)return P.exports;var a=bo[T]={exports:{}};return wu[T].call(a.exports,a,a.exports,rr),a.exports}(function(){rr.d=function(T,P){if(Array.isArray(P))for(var a=0;a<P.length;){var g=P[a++],v=P[a++];rr.o(T,g)?v===0&&a++:v===0?Object.defineProperty(T,g,{enumerable:!0,value:P[a++]}):Object.defineProperty(T,g,{enumerable:!0,get:v})}else for(var g in P)rr.o(P,g)&&!rr.o(T,g)&&Object.defineProperty(T,g,{enumerable:!0,get:P[g]})}})(),(function(){rr.o=function(T,P){return Object.prototype.hasOwnProperty.call(T,P)}})(),(function(){rr.r=function(T){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(T,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(T,"__esModule",{value:!0})}})(),rr(0);var So=rr(627);return So})()});
60
+ `):[];if(c.length)return c;if(qe(l))return l;let u=o.tickWidth;(!u||u<=0)&&(u=i?95:o.isCategory?(o.isInverted?n(r[0])-n(r[1]):n(r[1])-n(r[0]))-12:110);function f(d,h){let m,S,E;for(let C=1;C<h.length;C++)if(h.charAt(C)===" "&&(S=C),m=h.substr(0,C+1),E=s*m.length,u<E)return f(d.concat(h.substr(0,S||C)),h.slice(S?S+1:C));return d.concat(h)}return f(c,String(l))}scale(e){return arguments.length?(this.helper.scale=e,this):this.helper.scale}orient(e){return arguments.length?(this.config.orient=e in{top:1,right:1,bottom:1,left:1}?String(e):"bottom",this):this.config.orient}tickFormat(e){const{config:n}=this;return arguments.length?(n.tickFormat=e,this):n.tickFormat}tickCentered(e){const{config:n}=this;return arguments.length?(n.tickCentered=e,this):n.tickCentered}tickOffset(){return this.config.tickOffset}tickInterval(e){var n,r,i;const{outerTickSize:s,tickOffset:o,tickValues:l}=this.config;let c;if(this.params.isCategory){const u=(n=this.params.owner.scale.zoom)!=null?n:this.helper.scale;c=o*2||Math.abs(u(1)-u(0))}else{const u=(r=this.params.owner.scale.zoom)!=null?r:this.helper.scale;if(c=(this.g?this.g.select("path.domain").node().getTotalLength()-s*2:Math.abs(u.range()[1]-u.range()[0]))/(e||((i=this.g)==null?void 0:i.selectAll("line").size())||1),l)for(let d=0;d<l.length-1;d++){const h=u(l[d+1])-u(l[d]);h&&h<c&&(c=h)}}return c===1/0?0:c}ticks(...e){const{config:n}=this;return e.length?(n.tickArguments=Oa(e),this):n.tickArguments}tickCulling(e){const{config:n}=this;return arguments.length?(n.tickCulling=e,this):n.tickCulling}tickValues(e){const{config:n}=this;if(ie(e))n.tickValues=()=>e(this.helper.scale.domain());else{if(!arguments.length)return n.tickValues;n.tickValues=e}return this}setTransition(e){return this.config.transition=e,this}}var d2=Object.defineProperty,h2=Object.defineProperties,v2=Object.getOwnPropertyDescriptors,ep=Object.getOwnPropertySymbols,g2=Object.prototype.hasOwnProperty,p2=Object.prototype.propertyIsEnumerable,yu=(t,e,n)=>e in t?d2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,m2=(t,e)=>{for(var n in e||(e={}))g2.call(e,n)&&yu(t,n,e[n]);if(ep)for(var n of ep(e))p2.call(e,n)&&yu(t,n,e[n]);return t},x2=(t,e)=>h2(t,v2(e)),Sr=(t,e,n)=>yu(t,typeof e!="symbol"?e+"":e,n);function Tu(t){return t==="subX"?"x":t==="subY"?"y":t==="subY2"?"y2":t}function rl(t){return/^sub/.test(t)}function pa(t,e,n){const r=Tu(e),i=t[`subchart_axis_${r}_tick_${n}`];return rl(e)&&i!==void 0?i:t[`axis_${r}_tick_${n}`]}function y2(t){var e,n;const r=[t[0],t[t.length-1]];let i=0,s=null;for(const l of t){const c=(n=(e=l.textContent)==null?void 0:e.length)!=null?n:0;c>i&&(i=c,s=l)}s&&!r.includes(s)&&r.push(s);const o=t[Math.floor(t.length/2)];return r.includes(o)||r.push(o),r}const al=50,bu=Symbol("tickWidthFallback");function T2(t){var e,n,r;const i=t.select("line").node(),s=(n=(e=i==null?void 0:i.ownerDocument)==null?void 0:e.defaultView)!=null&&n.getComputedStyle?parseFloat(i.ownerDocument.defaultView.getComputedStyle(i).strokeWidth):parseFloat((r=i==null?void 0:i.getAttribute)==null?void 0:r.call(i,"stroke-width"));return Number.isFinite(s)&&s>0?s:1}function b2(t,e,n){var r;const i=(r=t==null?void 0:t.scale)==null?void 0:r.call(t);if(!i||e.length<2)return!1;const s=Math.max(1,n)/2,o=e.map(c=>+i(c)).filter(Number.isFinite).sort((c,u)=>c-u);if(o.length<2)return!1;let l=o[0]+s;for(let c=1;c<o.length;c++){const u=o[c]-s,f=o[c]+s;if(u<=l+Se)return!0;l=Math.max(l,f)}return!1}function S2(t,e){if(t.length<=al)return t;const n=new Map,r=l=>{l>=0&&l<t.length&&n.set(l,t[l])};r(0),r(t.length-1),r(Math.floor(t.length/2));const i=Math.max(1,Math.floor(t.length/(al-3)));let s=-1,o=0;for(let l=0;l<t.length;l+=i){r(l);const c=t[l],u=e?e(c):c,f=Array.isArray(u)?u.join("").length:String(u!=null?u:"").length;f>s&&(s=f,o=l)}return r(o),Array.from(n.keys()).sort((l,c)=>l-c).map(l=>n.get(l))}function A2(t){return ie(t)?rp(t):!Array.isArray(t)||t.length<=al?t:{length:t.length,first:t[0],middle:t[Math.floor(t.length/2)],last:t[t.length-1]}}function Su(t){return t[bu]}function il(t,e){ae(e)?Object.defineProperty(t,bu,{configurable:!0,value:e,writable:!0}):delete t[bu]}function Au(t){t.length=0,il(t)}function E2(t,e,n){Au(t),t.length=e,il(t,n)}function C2(t){const e=[];return e.length=t.length,Object.keys(t).forEach(n=>{const r=+n;e[r]=t[r]}),il(e,Su(t)),e}function I2(t,e){Au(t),t.length=e.length,Object.keys(e).forEach(n=>{const r=+n;t[r]=e[r]}),il(t,Su(e))}function R2(t,e,n){const r=t[e];if(ae(r))return r;const i=Number(r);return Number.isFinite(i)?i:n}const np=new WeakMap;let w2=0;function rp(t){if(!t||!/^(function|object)$/.test(typeof t))return`${typeof t}:${String(t)}`;let e=np.get(t);return e||(e=++w2,np.set(t,e)),`${typeof t}:${e}`}function Eu(t){return t instanceof Date?`date:${+t}`:Array.isArray(t)?`[${t.map(e=>Eu(e)).join(",")}]`:t&&typeof t=="object"?`{${Object.keys(t).sort().map(e=>`${e}:${Eu(t[e])}`).join(",")}}`:typeof t=="function"?rp(t):`${typeof t}:${String(t)}`}function Cu(t){return t instanceof Date?new Date(+t):Array.isArray(t)?t.map(e=>Cu(e)):t}function O2(t){return{width:t.width,height:t.height,ticks:t.ticks&&C2(t.ticks),clipPath:t.clipPath,domain:Cu(t.domain)}}function P2(t,e){return t.width=e.width,t.height=e.height,t.clipPath=e.clipPath,t.domain=Cu(e.domain),t.ticks&&e.ticks&&I2(t.ticks,e.ticks),t}var M2={getAxisInstance:function(){return this.axis||new L2(this)}};class L2{constructor(e){Sr(this,"owner"),Sr(this,"x"),Sr(this,"subX"),Sr(this,"subY"),Sr(this,"subY2"),Sr(this,"y"),Sr(this,"y2"),Sr(this,"axesList",{}),Sr(this,"tick",{x:null,y:null,y2:null}),Sr(this,"xs",[]),Sr(this,"orient",{x:"bottom",y:"left",y2:"right",subX:"bottom",subY:"left",subY2:"right"}),this.owner=e,this.setOrient()}getAxisClassName(e){return`${Rn.axis} ${Rn[`axis${Ln(e)}`]}`}isHorizontal(e,n){const r=e.config.axis_rotated;return n?r:!r}isCategorized(){const{config:e,state:n}=this.owner;return e.axis_x_type.indexOf("category")>=0||n.hasRadar}isCustomX(){const{config:e}=this.owner;return!this.isTimeSeries()&&(e.data_x||vn(e.data_xs))}isTimeSeries(e="x"){return this.owner.config[`axis_${e}_type`]==="timeseries"}isLog(e="x"){return this.owner.config[`axis_${e}_type`]==="log"}isTimeSeriesY(){return this.isTimeSeries("y")}getAxisType(e="x"){let n="linear";return this.isTimeSeries(e)?n=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(e)&&(n="log"),n}getExtent(){const e=this.owner,{config:n,scale:r}=e;let i=n.axis_x_extent;if(i){if(ie(i))i=i.bind(e.api)(e.getXDomain(e.data.targets),r.subX);else if(this.isTimeSeries()&&i.every(isNaN)){const s=Wn.bind(e);i=i.map(o=>r.subX(s(o)))}}return i}init(){const e=this.owner,{config:n,$el:{main:r,axis:i},state:{clip:s}}=e,o=["x","y"];n.axis_y2_show&&o.push("y2"),o.forEach(l=>{const c=this.getAxisClassName(l);i[l]=r.append("g").attr("class",c).attr("clip-path",()=>{let u=null;return l==="x"?u=s.pathXAxis:l==="y"&&(u=s.pathYAxis),u}).attr("transform",e.getTranslate(l)).style("visibility",n[`axis_${l}_show`]?null:"hidden"),this.generateAxes(l)})}setOrient(){const e=this.owner,{axis_rotated:n,axis_y_inner:r,axis_y2_inner:i}=e.config;this.orient={x:n?"left":"bottom",y:n?r?"top":"bottom":r?"right":"left",y2:n?i?"bottom":"top":i?"left":"right",subX:n?"left":"bottom",subY:n?r?"top":"bottom":r?"right":"left",subY2:n?i?"bottom":"top":i?"left":"right"}}generateAxes(e){const n=this.owner,{config:r}=n,i=[],s=r[`axis_${e}_axes`],o=r.axis_rotated;let l;e==="x"?l=o?"left":"bottom":e==="y"?l=o?"bottom":"left":e==="y2"&&(l=o?"top":"right"),s.length&&s.forEach(c=>{const u=c.tick||{},f=n.scale[e].copy();c.domain&&f.domain(c.domain);const d=new tp({outerTick:u.outer!==!1,noTransition:!1,config:r,id:e,isSubAxes:!0,owner:n}).scale(f).orient(l).tickFormat(ie(u.format)?u.format.bind(n.api):(h=>h));Ge(u.count)&&d.ticks(u.count),u.values&&d.tickValues(u.values),i.push(d)}),this.axesList[e]=i}updateAxes(){const e=this.owner,{config:n,$el:{main:r},$T:i}=e;Object.keys(this.axesList).forEach(s=>{const o=n[`axis_${s}_axes`],l=e.scale[s].copy(),c=l.range();this.axesList[s].forEach((u,f)=>{const d=u.scale().range();c.every((S,E)=>S===d[E])||u.scale().range(c);const h=`${this.getAxisClassName(s)}-${f+1}`;let m=r.select(`.${h.replace(/\s/,".")}`);m.empty()?(m=r.append("g").attr("class",h).style("visibility",n[`axis_${s}_show`]?null:"hidden"),u.create(m)):(o[f].domain&&l.domain(o[f].domain),u.scale(l).create(i(m))),m.attr("transform",e.getTranslate(s,f+1))})})}setAxis(e,n,r,i){const s=this.owner,o=Tu(e);rl(e)||(this.tick[o]=this.getTickValues(o)),this[e]=this.getAxis(e,n,r,e==="x"&&(s.scale.zoom||s.config.subchart_show||s.state.resizing)?!0:i)}getAxis(e,n,r,i,s){const o=this.owner,{config:l}=o,c=/^(x|subX)$/.test(e),u=Tu(e),f=c&&this.isCategorized(),d=this.orient[e],h=s?0:o.getAxisTickRotate(u);let m;if(c)m=e==="subX"?o.format.subXAxisTick:o.format.xAxisTick;else{const $=rl(e)?l[`subchart_axis_${u}_tick_format`]||l[`axis_${u}_tick_format`]:l[`axis_${u}_tick_format`];ie($)&&(m=$.bind(o.api))}let S=rl(e)?this.getTickValues(u,!0):this.tick[u];const E=Xr({outerTick:r,noTransition:i,config:l,id:e,tickTextRotate:h,owner:o},c&&{isCategory:f,isInverted:l.axis_x_inverted,tickMultiline:l.axis_x_tick_multiline,tickWidth:l.axis_x_tick_width,tickTitle:f&&l.axis_x_tick_tooltip&&o.api.categories(),orgXScale:o.scale.x});c||(E.tickStepSize=l[`axis_${u}_tick_stepSize`]);const C=new tp(E).scale(c&&o.scale.zoom||n).orient(d);if(c&&this.isTimeSeries()&&S&&!ie(S)){const $=Wn.bind(o);S=S.map(z=>$(z))}else!c&&this.isTimeSeriesY()&&(C.ticks(l.axis_y_tick_time_value),S=null);S&&C.tickValues(S),C.tickFormat(m||!c&&o.isStackNormalized()&&o.hasAxisGroupedData(u)&&($=>`${$}%`)),f&&(C.tickCentered(l.axis_x_tick_centered),lr(l.axis_x_tick_culling)&&(l.axis_x_tick_culling=!1));const w=pa(l,e,"count");return w&&C.ticks(w),C}updateXAxisTickValues(e,n){var r;const i=this.owner,{config:s}=i,o=s.axis_x_tick_fit,l=(u=s.axis_x_tick_count)=>{let f=u,d;return o&&(d=i.mapTargetsToUniqueXs(e),this.isCategorized()&&f>d.length&&(f=d.length),d=this.generateTickValues(d,f,this.isTimeSeries())),d},c=l();if(n)n.tickValues(c);else if(this.x){const u=this.getTickValues("x",!0),f=pa(s,"subX","count"),d=u!=null?u:f!==s.axis_x_tick_count?l(f):c;this.x.tickValues(c),(r=this.subX)==null||r.tickValues(d)}return c}getId(e){const{config:n,scale:r}=this.owner;let i=n.data_axes[e];return(!i||!r[i])&&(i="y"),i}getXAxisTickFormat(e){const n=this.owner,{config:r,format:i}=n,s=e&&r.subchart_axis_x_tick_format||r.axis_x_tick_format,o=this.isTimeSeries(),l=this.isCategorized();let c;return s?ie(s)?c=s.bind(n.api):o&&(c=u=>u?i.axisTime(s)(u):""):c=o?i.defaultAxisTime:l?n.categoryName:u=>u<0?u.toFixed(0):u,ie(c)?u=>c.apply(n,l?[u,n.categoryName(u)]:[u]):c}getTickValues(e,n=!1){const r=this.owner,i=n?pa(r.config,`sub${Ln(e)}`,"values"):r.config[`axis_${e}_tick_values`],s=ie(i)?i.call(r.api):i,o=r[`${e}Axis`];return n?s!=null?s:void 0:s||(o?o.tickValues():void 0)}getLabelOptionByAxisId(e){return this.owner.config[`axis_${e}_label`]}getLabelText(e){const n=this.getLabelOptionByAxisId(e);return je(n)?n:n?n.text:null}setLabelText(e,n){const r=this.owner,{config:i}=r,s=this.getLabelOptionByAxisId(e);je(s)?i[`axis_${e}_label`]=n:s&&(s.text=n)}getLabelPosition(e,n){const r=this.owner.config.axis_rotated,i=this.getLabelOptionByAxisId(e),s=Kn(i)&&i.position?i.position:n[+!r],o=l=>!!~s.indexOf(l);return{isInner:o("inner"),isOuter:o("outer"),isLeft:o("left"),isCenter:o("center"),isRight:o("right"),isTop:o("top"),isMiddle:o("middle"),isBottom:o("bottom")}}getAxisLabelPosition(e){return this.getLabelPosition(e,e==="x"?["inner-top","inner-right"]:["inner-right","inner-top"])}xForAxisLabel(e){const n=this.owner,{state:{width:r,height:i}}=n,s=this.getAxisLabelPosition(e);let o=s.isMiddle?-i/2:0;return this.isHorizontal(n,e!=="x")?o=s.isLeft?0:s.isCenter?r/2:r:s.isBottom&&(o=-i),o}textAnchorForAxisLabel(e){const n=this.owner,r=this.getAxisLabelPosition(e);let i=r.isMiddle?"middle":"end";return this.isHorizontal(n,e!=="x")?i=r.isLeft?"start":r.isCenter?"middle":"end":r.isBottom&&(i="start"),i}dxForAxisLabel(e){const n=this.owner,r=this.getAxisLabelPosition(e);let i=r.isBottom?"0.5em":"0";return this.isHorizontal(n,e!=="x")?i=r.isLeft?"0.5em":r.isRight?"-0.5em":"0":r.isTop&&(i="-0.5em"),i}dyForAxisLabel(e){const n=this.owner,{config:r}=n,i=r.axis_rotated,s=this.getAxisLabelPosition(e).isInner,o=r[`axis_${e}_tick_rotate`]?n.getHorizontalAxisHeight(e):0,{width:l}=this.getMaxTickSize(e);let c;if(e==="x"){const u=r.axis_x_height;i?c=s?"1.2em":-25-l:s?c="-0.5em":u?c=u-10:o?c=o-10:c="3em"}else c={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[e],i?s?c=c[0]:o?c=o*(e==="y2"?-1:1)-c[1]:c=c[2]:c=s?c[3]:(c[4]+(r[`axis_${e}_inner`]?0:l+c[4]))*(e==="y"?-1:1);return c}getTickFormatCacheValue(e){const n=this.owner,{config:r}=n;return e==="x"?{format:r.axis_x_tick_format,type:r.axis_x_type,localtime:r.axis_x_localtime,categories:r.axis_x_categories}:{format:r[`axis_${e}_tick_format`],normalized:n.isStackNormalized(),grouped:n.hasAxisGroupedData(e),type:r[`axis_${e}_type`]}}getMaxTickSizeFingerprint(e,n,r,i,s,o){var l;const c=this.owner,{config:u,state:f}=c,d=e==="x",h=d?"axis_x":`axis_${e}`,m=i.tickValues();return Eu({id:e,withoutRecompute:!!o,dataGeneration:f.dataGeneration,size:[f.current.width,f.current.height],range:(l=n.range)==null?void 0:l.call(n),domain:r,type:n.type,orient:this.orient[e],axisRotated:u.axis_rotated,evalTextSize:u.axis_evalTextSize,format:this.getTickFormatCacheValue(e),ticks:{values:A2(m),rawValues:u[`${h}_tick_values`],arguments:i.ticks(),count:u[`${h}_tick_count`],rotate:s,show:u[`${h}_tick_show`],textShow:u[`${h}_tick_text_show`],textPosition:u[`${h}_tick_text_position`],inner:u[`${h}_tick_inner`],culling:u[`${h}_tick_culling`],cullingMax:u[`${h}_tick_culling_max`],cullingLines:u[`${h}_tick_culling_lines`],cullingReverse:u[`${h}_tick_culling_reverse`],stepSize:!d&&u[`${h}_tick_stepSize`],timeValue:!d&&u[`${h}_tick_time_value`],fit:d&&u.axis_x_tick_fit,autorotate:d&&u.axis_x_tick_autorotate,centered:d&&u.axis_x_tick_centered,inverted:d&&u.axis_x_inverted,multiline:d&&u.axis_x_tick_multiline,width:d&&u.axis_x_tick_width}})}getMaxTickSize(e,n){var r;const i=this.owner,{config:s,state:o,$el:{svg:l,chart:c}}=i,{current:u,resizing:f}=o,d=u.maxTickSize[e],h=`${Oe.maxTickSize}_${e}_${!!n}`,m=i.cache.get(h);if(m&&m.generation===o.redrawGeneration)return d;const S=`axis_${e}`,E={width:0,height:0};let C;if(f||n||!s[`${S}_show`]||d.width>0&&i.filterTargetsToShow().length===0)return d;if((l||s.render_mode==="canvas")&&((r=i.scale[e])!=null&&r.copy)){const w=/^y2?$/.test(e),$=i.getTargetsToShow(),z=i.scale[e].copy().domain(i[`get${w?"Y":"X"}Domain`]($,e)),B=z.domain(),W=B[0]===B[1]&&B.every(St=>St>0),H=qe(d.domain)&&d.domain[0]===d.domain[1]&&d.domain.every(St=>St>0);if(W||H)return d;d.domain=B,w||Au(d.ticks);const _=this.getAxis(e,z,!1,!1,!0),q=s[`${S}_tick_rotate`],st=s[`${S}_tick_count`];if(!s[`${S}_tick_values`]&&st&&_.tickValues(this.generateTickValues(B,st,w?this.isTimeSeriesY():this.isTimeSeries())),!w&&this.updateXAxisTickValues($,_),C=this.getMaxTickSizeFingerprint(e,z,B,_,q,n),(m==null?void 0:m.fingerprint)===C)return i.cache.add(h,x2(m2({},m),{generation:o.redrawGeneration})),P2(d,m.value);const ot=_.tickValues(),ct=!w&&Array.isArray(ot)&&ot.length>al;ct&&_.tickValues(S2(ot,_.tickFormat()));const gt=c.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0"),tt=gt.append("g").attr("class",`${Rn[`axis${Ln(e)}`]} ${ze.dummy}`);_.create(tt);const{sizeFor1Char:ft}=tt.node(),lt=gt.selectAll("text").attr("transform",ae(q)?`rotate(${q})`:null),bt=ct?ot.length:lt.size();if(ft)lt.each(function(St,Mt){const Ot=this.textContent.length*ft.w,Kt=ft.h;E.width=Math.max(E.width,Ot),E.height=Math.max(E.height,Kt),w||(d.ticks[Mt]=Ot)});else{const St=[];if(lt.each(function(){St.push(this)}),(St.length<=5?St:y2(St)).map(Ot=>ln(Ot,!0)).forEach(Ot=>{E.width=Math.max(E.width,Ot.width),E.height=Math.max(E.height,Ot.height)}),!w)for(let Ot=0;Ot<St.length;Ot++)d.ticks[Ot]=E.width}!w&&ct&&E2(d.ticks,bt,E.width),gt.remove()}return Object.keys(E).forEach(w=>{E[w]>0&&(d[w]=E[w])}),i.cache.add(h,{fingerprint:C,generation:o.redrawGeneration,value:O2(d)}),d}getXAxisTickTextY2Overflow(e){const n=this.owner,{axis:r,config:i,state:{current:s,isLegendRight:o,legendItemWidth:l}}=n,c=n.getAxisTickRotate("x"),u=c>0&&c<90;if((r.isCategorized()||r.isTimeSeries())&&i.axis_x_tick_fit&&(!i.axis_x_tick_culling||lr(i.axis_x_tick_culling))&&!i.axis_x_tick_multiline&&u){const f=i.axis_y2_show&&s.maxTickSize.y2.width||0,d=o&&l||0,h=s.width-n.getCurrentPaddingByDirection("left"),m=this.getXAxisTickMaxOverflow(c,h-e)-f-d,S=Math.max(0,m)+e;return Math.min(S,h/2)}return 0}getXAxisTickMaxOverflow(e,n){var r;const i=this.owner,{axis:s,config:o,state:l}=i,c=s.isTimeSeries(),u=l.current.maxTickSize.x.ticks,f=u.length,d=(r=Su(u))!=null?r:l.current.maxTickSize.x.width,{left:h,right:m}=l.axis.x.padding;let S=0;const E=f-(c&&o.axis_x_tick_fit?.5:0);for(let $=0;$<f;$++){const z=$+1,B=Math.cos(Math.PI*e/180)*R2(u,$,d),W=z-(c?1:.5)+h;if(W<=0)continue;const _=(n-B)/W,q=E-z,st=m*_,it=q*_+st,ot=B-_/2-it;S=Math.max(S,ot)}const C=i.getTargetsToShow();let w=0;if(!c&&o.axis_x_tick_count<=C.length&&C[0].values.length){const $=sa(i.axis.getAxisType("x"),0,n-S).domain([h*-1,i.getXDomainMax(i.data.targets)+1+m]);w=($(1)-$(0))/2}return S+w}updateLabels(e){const n=this.owner,{config:r,$el:{main:i},$T:s}=n,o=r.axis_rotated;["x","y","y2"].forEach(l=>{const c=this.getLabelText(l),u=`axis${Ln(l)}`,f=Rn[`${u}Label`];if(c){let d=i.select(`text.${f}`);d.empty()&&(d=i.select(`g.${Rn[u]}`).insert("text",":first-child").attr("class",f).attr("transform",["rotate(-90)",null][l==="x"?+!o:+o]).style("text-anchor",()=>this.textAnchorForAxisLabel(l))),s(d,e).attr("x",()=>this.xForAxisLabel(l)).attr("dx",()=>this.dxForAxisLabel(l)).attr("dy",()=>this.dyForAxisLabel(l)).text(c)}})}getPadding(e,n,r,i){const s=ae(e)?e:e[n];return Ge(s)?this.owner.convertPixelToScale(/(bottom|top)/.test(n)?"y":"x",s,i):r}generateTickValues(e,n,r){let i=e;if(n){const s=ie(n)?n():n;if(s===1)i=[e[0]];else if(s===2)i=[e[0],e[e.length-1]];else if(s>2){const o=this.isCategorized(),l=s-2,c=e[0],u=e[e.length-1],f=(u-c)/(l+1);let d;i=[c];for(let h=0;h<l;h++)d=+c+f*(h+1),i.push(r?new Date(d):o?Math.round(d):d);i.push(u)}}return r||(i=i.sort((s,o)=>s-o)),i}generateTransitions(e){const n=this.owner,{$el:{axis:r},$T:i}=n,[s,o,l,c,u,f]=["x","y","y2","subX","subY","subY2"].map(d=>i(r[d],e));return{axisX:s,axisY:o,axisY2:l,axisSubX:c,axisSubY:u,axisSubY2:f}}redraw(e,n,r){const i=this.owner,{config:s,state:o,$el:l}=i,c=n?"0":null;["x","y","y2","subX","subY","subY2"].forEach(u=>{const f=this[u],d=l.axis[u];f&&d&&(!r&&!s.transition_duration&&(f.config.withoutTransition=!0),d.style("opacity",c),f.create(e[`axis${Ln(u)}`]))}),this.updateAxes(),!o.rendered&&s.axis_tooltip&&this.setAxisTooltip()}syncAxisDomains(e,n,r){var i;const s=this.owner,{config:o,scale:l,$el:c}=s,u=!!l.zoom;let f;if(!u&&this.isCategorized()&&e.length===0&&c.axis.x&&l.x.domain([0,c.axis.x.selectAll(".tick").size()]),l.x&&e.length?(!u&&s.updateXDomain(e,n.UpdateXDomain,n.UpdateOrgXDomain,n.TrimXDomain),o.axis_x_tick_values||this.updateXAxisTickValues(e)):this.x&&(this.x.tickValues([]),(i=this.subX)==null||i.tickValues([])),o.zoom_rescale&&!r&&(f=l.x.orgDomain()),["y","y2"].forEach(d=>{const h=`axis_${d}_`,m=l[d];if(m){const S=o[`${h}tick_values`],E=o[`${h}tick_count`];if(m.domain(s.getYDomain(e,d,f)),!S&&E){const C=s.axis[d],w=m.domain();C.tickValues(this.generateTickValues(w,w.every($=>$===0)?1:E,this.isTimeSeriesY()))}}}),n.Y){const d=()=>{var h,m;(h=l.subY)==null||h.domain(s.getYDomain(e,"y")),(m=l.subY2)==null||m.domain(s.getYDomain(e,"y2")),["y","y2"].forEach(S=>{const E=S==="y2"?"subY2":"subY",C=l[E],w=s.axis[E],$=this.getTickValues(S,!0),z=pa(o,E,"count");if(!C||!w||$||!z)return;const B=C.domain();w.tickValues(this.generateTickValues(B,B.every(W=>W===0)?1:z,this.isTimeSeriesY()))})};o.subchart_show?s.withSubchartTypeContext(d):d()}}redrawAxis(e,n,r,i,s){const o=this.owner;this.syncAxisDomains(e,n,i),this.redraw(r,o.hasArcType(),s),this.updateLabels(n.Transition),(n.UpdateXDomain||n.UpdateXAxis||n.Y)&&e.length&&this.setCulling()}setCulling(){const e=this.owner,{config:n,state:{clip:r,current:i},$el:s}=e;["subX","x","y","y2","subY","subY2"].forEach(o=>{const l=s.axis[o],c=pa(n,o,"culling");if(l&&c){const u=l.selectAll(".tick"),f=ti(u.data(),!pa(n,o,"culling_reverse")),d=f.length,h=pa(n,o,"culling_max"),S=!pa(n,o,"culling_lines")||b2(this[o],f,T2(u));let E;if(d){for(let w=1;w<d;w++)if(d/w<h){E=w;break}E=E!=null?E:d;const C=new Map;for(let w=0;w<f.length;w++)C.set(f[w],w);u.each(function(w){var $;const z=S?this:this.querySelector("text");z&&(z.style.display=(($=C.get(w))!=null?$:0)%E?"none":null)})}else u.style("display",null);if(o==="x"){const C=i.maxTickSize.x.clipPath?r.pathXAxisTickTexts:null;s.svg.selectAll(`.${Rn.axisX} .tick text`).attr("clip-path",C)}}})}setAxisTooltip(){var e;const n=this.owner,{config:{axis_rotated:r,axis_tooltip:i},$el:{axis:s,axisTooltip:o}}=n,l=(e=i.backgroundColor)!=null?e:"black";n.generateTextBGColorFilter(l,{x:-.15,y:-.2,width:1.3,height:1.3}),["x","y","y2"].forEach(c=>{var u,f,d;if(je(l)||l[c])if(o[c]=(u=s[c])==null?void 0:u.append("text").classed(Rn[`axis${c.toUpperCase()}Tooltip`],!0).attr("filter",n.updateTextBGColor({id:c},l)),r){const h=c==="x"?"x":"y",m=c==="y"?"1.15em":c==="x"?"-0.3em":"-0.4em";(f=o[c])==null||f.attr(h,m).attr(`d${c==="x"?"y":"x"}`,c==="x"?"0.4em":"-1.3em").style("text-anchor",c==="x"?"end":null)}else{const h=c==="x"?"y":"x",m=c==="x"?"1.15em":`${c==="y"?"-":""}0.4em`;(d=o[c])==null||d.attr(h,m).attr(`d${c==="x"?"x":"y"}`,c==="x"?"-1em":"0.3em").style("text-anchor",c==="y"?"end":null)}})}}var ap=Math.pow,D2={initEventRect(){this.$el.main.select(`.${ze.chart}`).append("g").attr("class",Zr.eventRects).style("fill-opacity","0")},redrawEventRect(){var t;const e=this,{config:n,state:r,$el:i}=e,s=e.isMultipleX(),o=n.axis_x_inverted;if(i.eventRect)e.updateEventRect(i.eventRect,!0);else if(e.data.targets.length){const c=e.$el.main.select(`.${Zr.eventRects}`).style("cursor",n.zoom_enabled&&n.zoom_type!=="drag"?n.axis_rotated?"ns-resize":"ew-resize":null).classed(Zr.eventRectsMultiple,s).classed(Zr.eventRectsSingle,!s).selectAll(`.${Zr.eventRect}`).data([0]).enter().append("rect");e.updateEventRect(c),e.updateEventType(c),c.call(e.getDraggableSelection()),i.eventRect=c,e.state.inputType==="touch"&&!i.svg.on("touchstart.eventRect")&&!e.hasArcType()&&e.bindTouchOnEventRect(),r.rendered&&e.updateEventRect(i.eventRect,!0)}if(!s){const l=e.getMaxDataCountTarget();(!n.data_xSort||o)&&l.sort((c,u)=>o?u.x-c.x:c.x-u.x),e.updateDataIndexByX(l),e.updateXs(l),(t=e.updatePointClass)==null||t.call(e,!0),r.eventReceiver.data=l}e.updateEventRectData()},bindTouchOnEventRect(){const t=this,{config:e,state:n,$el:{eventRect:r,svg:i}}=t,s=m=>{if(t.isMultipleX())t.selectRectForMultipleXs(m);else{const S=t.getDataIndexFromEvent(n.event);t.callOverOutForTouch(S),S===-1?t.unselectRect():t.selectRectForSingle(m,S)}},o=()=>{t.unselectRect(),t.callOverOutForTouch()},l=e.interaction_inputType_touch.preventDefault,c=Ra(l)&&l||!1,u=!isNaN(l)&&l||null;let f;const d=!c&&u===null,h=m=>{const S=m.type,C=m.changedTouches[0][`client${e.axis_rotated?"Y":"X"}`];S==="touchstart"?c?m.preventDefault():u!==null&&(f=C):S==="touchmove"&&(c||f===!0||u!==null&&Math.abs(f-C)>=u)&&(f=!0,m.preventDefault())};r.on("touchstart",m=>{n.event=m,t.updateEventRect()},{passive:d}).on("touchstart.eventRect touchmove.eventRect",m=>{if(n.event=m,!r.empty()&&r.classed(Zr.eventRect)){if(n.dragging||n.flowing||t.hasArcType()||m.touches.length>1)return;h(m),s(r.node())}else o()},{passive:d}).on("touchend.eventRect",m=>{n.event=m,!r.empty()&&r.classed(Zr.eventRect)&&(t.hasArcType()||!t.toggleShape||n.cancelClick)&&n.cancelClick&&(n.cancelClick=!1)},{passive:d}),i.on("touchstart",m=>{n.event=m;const{target:S}=m;S&&S!==r.node()&&o()},{passive:d})},updateEventRect(t,e=!1){const n=this,{state:r,$el:i}=n,{eventReceiver:s,width:o,height:l,rendered:c,resizing:u}=r,f=t||i.eventRect,d=()=>{if(s){const h=Oh(i.chart.node());s.rect=ln(f.node(),!0).toJSON(),s.rect.top+=h.y,s.rect.left+=h.x}};(!c||u||e)&&(f.attr("x",0).attr("y",0).attr("width",o).attr("height",l),(!c||e)&&f.classed(Zr.eventRect,!0)),d()},updateEventType(t){const e=this,n=Ra(t),r=n?e.$el.eventRect:t,i=n?t!==(r==null?void 0:r.datum().multipleX):!1;r&&(i&&(r==null||r.on("mouseover mousemove mouseout click",null)),e.isMultipleX()?e.generateEventRectsForMultipleXs(r):e.generateEventRectsForSingleX(r))},updateEventRectData(){const t=this,{config:e,scale:n,state:r}=t,i=n.zoom||n.x,s=e.axis_rotated,o=t.isMultipleX(),l=i==null?void 0:i.domain(),c=l?`${l[0]}_${l[1]}_${r.width}_${r.height}_${t.data.targets.length}_${r.dataGeneration}_${[...r.hiddenTargetIds].join(",")}`:null;if(c&&c===r._eventRectFingerprint)return;r._eventRectFingerprint=c;let u,f,d,h;if(t.updateEventType(o),o)u=0,f=0,d=r.width,h=r.height;else{let E,C;if(t.axis.isCategorized())E=t.getEventRectWidth(),C=w=>i(w.x)-E/2;else{const w=({index:$})=>({prev:t.getPrevX($),next:t.getNextX($)});E=$=>{const z=w($),B=i.domain();let W;return z.prev===null&&z.next===null?W=s?r.height:r.width:z.prev===null?W=(i(z.next)+i($.x))/2:z.next===null?W=i(B[1])-(i(z.prev)+i($.x))/2:W=Math.max(0,(i(z.next)-i(z.prev))/2),W},C=$=>{const z=w($);let B;return z.prev===null&&z.next===null?B=0:z.prev===null?B=i(i.domain()[0]):B=(i($.x)+i(z.prev))/2,B}}u=s?0:C,f=s?C:0,d=s?r.width:E,h=s?E:r.height}const{eventReceiver:m}=r,S=(E,C)=>ie(E)?E(C):E;m.coords.splice(m.data.length),m.data.forEach((E,C)=>{m.coords[C]={x:S(u,E),y:S(f,E),w:S(d,E),h:S(h,E)}})},selectRectForSingle(t,e){var n,r,i,s,o,l,c;const u=this,{config:f,state:d,$el:{main:h,circle:m}}=u,S=f.data_selection_enabled,E=f.data_selection_grouped,C=f.data_selection_isselectable,w=f.tooltip_grouped,$=u.getAllValuesOnIndex(e);if(w&&(u.showTooltip($,t),(n=u.showGridFocus)==null||n.call(u,$),(r=u.showSubchartGridFocus)==null||r.call(u,$),!S||E))return;!m&&h.selectAll(`.${ze.EXPANDED}:not(.${Tn.shape}-${e})`).classed(ze.EXPANDED,!1);const z=h.selectAll(`.${Tn.shape}-${e}`).classed(ze.EXPANDED,!0).style("cursor",C?"pointer":null).filter(function(B){return u.isWithinShape(this,B)});if(z.call(B=>{var W,H,_;const q=B.data();S&&(E||C!=null&&C.bind(u.api)(q))&&(t.style.cursor="pointer"),w||(u.showTooltip(q,t),(W=u.showGridFocus)==null||W.call(u,q),(H=u.showSubchartGridFocus)==null||H.call(u,q),(_=u.unexpandCircles)==null||_.call(u),B.each(st=>u.setExpand(e,st.id)))}),!w&&z.empty()){const B=Jn(d.event,t),W=$.filter(H=>u.isTargetToShow(H.id)?u.dist(H,B)<u.getPointSensitivity(H):!1);if(W.length>0){let H=W[0],_=u.dist(H,B);for(let q=1;q<W.length;q++){const st=W[q],it=u.dist(st,B);it<_&&(_=it,H=st)}u.showTooltip([H],t),(i=u.showGridFocus)==null||i.call(u,[H]),(s=u.showSubchartGridFocus)==null||s.call(u,[H]),(o=u.unexpandCircles)==null||o.call(u),u.setExpand(e,H.id,!0),S&&(E||C!=null&&C.bind(u.api)(H))&&(t.style.cursor="pointer")}else f.interaction_onout&&((l=u.hideGridFocus)==null||l.call(u),(c=u.hideSubchartGridFocus)==null||c.call(u),u.hideTooltip(),!E&&u.setExpand(e))}},selectRectForMultipleXs(t,e=!0){var n,r;const i=this,{config:s,state:o}=i,l=i.getTargetsToShow();if(o.dragging||i.hasArcType(l))return;const c=Jn(o.event,t),u=i.findClosestFromTargets(l,c);if(e&&o.mouseover&&(!u||u.id!==o.mouseover.id)&&(s.data_onout.call(i.api,o.mouseover),o.mouseover=void 0),!u){i.unselectRect();return}const d=(i.isBubbleType(u)||i.isScatterType(u)||!s.tooltip_grouped?[u]:i.filterByX(l,u.x)).map(m=>i.addName(m));i.showTooltip(d,t),i.setExpand(u.index,u.id,!0),(n=i.showGridFocus)==null||n.call(i,d),(r=i.showSubchartGridFocus)==null||r.call(i,d);const h=i.dist(u,c);(i.isBarType(u.id)||h<i.getPointSensitivity(u))&&(i.$el.eventRect.style("cursor","pointer"),e&&(!o.mouseover||o.mouseover.x!==u.x||o.mouseover.id!==u.id)&&(s.data_onover.call(i.api,u),o.mouseover=u))},unselectRect(){var t,e,n,r;const i=this,{state:s,$el:{circle:o,tooltip:l}}=i;if(s._lastTooltipMouse=null,s.isCanvasMode){(t=i.clearCanvasFocus)==null||t.call(i),l&&i.hideTooltip();return}(e=i.$el.eventRect)==null||e.style("cursor",null),(n=i.hideGridFocus)==null||n.call(i),(r=i.hideSubchartGridFocus)==null||r.call(i),l&&(i.hideTooltip(),i._handleLinkedCharts(!1)),o&&!i.isPointFocusOnly()&&i.unexpandCircles(),i.expandBarTypeShapes(!1)},generateEventRectsForSingleX(t){const e=this,{config:n,state:r}=e,{eventReceiver:i}=r,s=t.style("cursor",n.data_selection_enabled&&n.data_selection_grouped?"pointer":null).on("click",function(o){r.event=o;const{currentIdx:l,data:c}=i,u=c[l===-1?e.getDataIndexFromEvent(o):l];e.clickHandlerForSingleX.bind(this)(u,e)}).datum({multipleX:!1});if(r.inputType==="mouse"){const o=l=>{const c=l?e.getDataIndexFromEvent(l):i.currentIdx;return c>-1?i.data[c]:null};s.on("mouseover",l=>{r.event=l,e.updateEventRect(),Object.values(e.$el.axisTooltip).forEach(c=>c==null?void 0:c.style("display",null))}).on("mousemove",function(l){var c;const u=o(l);if(r.event=l,!u)return;let{index:f}=u;const d=n.line_step_type;if(n.line_step_tooltipMatch&&e.hasType("step")&&/^step\-(before|after)$/.test(d)){const m=e.scale.zoom||e.scale.x,S=e.axis.xs[f],E=m.invert(Jn(l,this)[0]);d==="step-after"&&E<S?f-=1:d==="step-before"&&E>S&&(f+=1)}(c=e.showAxisGridFocus)==null||c.call(e);const h=n.tooltip_grouped&&f===i.currentIdx;if(r.dragging||r.flowing||e.hasArcType()||h){if(n.tooltip_show&&h){const[m,S]=Jn(l,this),E=r._lastTooltipMouse;(!E||ap(m-E[0],2)+ap(S-E[1],2)>=9)&&(r._lastTooltipMouse=[m,S],e.setTooltipPosition())}return}f!==i.currentIdx&&(e.setOverOut(!1,i.currentIdx),i.currentIdx=f),f===-1?e.unselectRect():e.selectRectForSingle(this,f),e.setOverOut(f!==-1,f)}).on("mouseout",l=>{var c;r.event=l,!(!e.config||e.hasArcType()||i.currentIdx===-1||!n.interaction_onout)&&((c=e.hideAxisGridFocus)==null||c.call(e),e.unselectRect(),e.setOverOut(!1,i.currentIdx),i.currentIdx=-1)})}return s},clickHandlerForSingleX(t,e){const n=e,{config:r,state:i,$el:{main:s}}=n;if(!t||n.hasArcType()||i.cancelClick){i.cancelClick&&(i.cancelClick=!1);return}const{index:o}=t;s.selectAll(`.${Tn.shape}-${o}`).each(function(l){var c;(r.data_selection_grouped||n.isWithinShape(this,l))&&((c=n.toggleShape)==null||c.call(n,this,l,o),r.data_onclick.bind(n.api)(l,this))})},generateEventRectsForMultipleXs(t){const e=this,{config:n,state:r}=e;t.on("click",function(i){r.event=i,e.clickHandlerForMultipleXS.bind(this)(e)}).datum({multipleX:!0}),r.inputType==="mouse"&&t.on("mouseover mousemove",function(i){r.event=i,e.selectRectForMultipleXs(this)}).on("mouseout",i=>{r.event=i,!(!e.config||e.hasArcType()||!n.interaction_onout)&&e.unselectRect()})},clickHandlerForMultipleXS(t){const e=t,{config:n,state:r}=e,i=e.getTargetsToShow();if(e.hasArcType(i))return;const s=Jn(r.event,this),o=e.findClosestFromTargets(i,s);if(!o)return;const l=e.getPointSensitivity(o);(e.isBarType(o.id)||e.dist(o,s)<l)&&e.$el.main.selectAll(`.${Tn.shapes}${e.getTargetSelectorSuffix(o.id)}`).selectAll(`.${Tn.shape}-${o.index}`).each(function(){var c;(n.data_selection_grouped||e.isWithinShape(this,o))&&((c=e.toggleShape)==null||c.call(e,this,o,o.index),n.data_onclick.bind(e.api)(o,this))})}},F2={initClip(){const t=this,{clip:e,datetimeId:n}=t.state;e.id=`${n}-clip`,e.idXAxis=`${e.id}-xaxis`,e.idYAxis=`${e.id}-yaxis`,e.idGrid=`${e.id}-grid`,e.path=t.getClipPath(e.id),e.pathXAxis=t.getClipPath(e.idXAxis),e.pathYAxis=t.getClipPath(e.idYAxis),e.pathGrid=t.getClipPath(e.idGrid)},getClipPath(t){const e=this,{config:n}=e;return!n.clipPath&&/-clip$/.test(t)||!n.axis_x_clipPath&&/-clip-xaxis$/.test(t)||!n.axis_y_clipPath&&/-clip-yaxis$/.test(t)?null:`url(#${t})`},appendClip(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath(t){const e=this,{config:n,state:{margin:r,width:i,height:s}}=e,o=n.axis_rotated,l=Math.max(30,r.left)-(o?0:20),c=(o?r.top+s+10:r.bottom)+20,u=o?-(1+l):-(l-1),f=-15,d=o?r.left+20:i+10+l;t.attr("x",u).attr("y",f).attr("width",d).attr("height",c)},setYAxisClipPath(t){const e=this,{config:n,state:{margin:r,width:i,height:s}}=e,o=n.axis_rotated,l=Math.max(30,r.left)-(o?20:0),c=n.axis_y_inner,u=c&&!o?n.axis_y_label.text?-20:-1:o?-(1+l):-(l-1),f=-(o?20:r.top),d=(o?i+15+l:r.left+20)+(c?20:0),h=(o?r.bottom+10:r.top+s)+10;t.attr("x",u).attr("y",f).attr("width",d).attr("height",h)},updateXAxisTickClip(){const t=this,{config:e,state:{clip:n,xAxisHeight:r},$el:{defs:i}}=t,s=t.getHorizontalAxisHeight("x");if(i&&!n.idXAxisTickTexts){const o=`${n.id}-xaxisticktexts`;t.appendClip(i,o),n.idXAxisTickTexts=o,n.pathXAxisTickTexts=t.getClipPath(n.idXAxisTickTexts)}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&s!==r&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=s},setXAxisTickClipWidth(){const t=this,{config:e,state:{current:{maxTickSize:n}}}=t,r=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&r){const i=Math.sin(Math.PI/180*Math.abs(r));n.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/i}else n.x.clipPath=null},setXAxisTickTextClipPathWidth(){const t=this,{state:{clip:e,current:n},$el:{svg:r}}=t;r&&r.select(`#${e.idXAxisTickTexts} rect`).attr("width",n.maxTickSize.x.clipPath).attr("height",30)}},N2={getAxisSize(t){const e=this,n=e.config.axis_rotated;return n&&t==="x"||!n&&/y2?/.test(t)?e.getAxisWidthByAxisId(t,!0):e.getHorizontalAxisHeight(t)},getAxisWidthByAxisId(t,e){var n,r;const i=this;if(i.axis){const s=(n=i.axis)==null?void 0:n.getAxisLabelPosition(t),{width:o}=i.axis.getMaxTickSize(t,e),l=o===0?.5:0;return o+(((r=i.config.padding)==null?void 0:r.mode)==="fit"?s.isInner?10+l:10:s.isInner?20+l:40)}else return 40},getHorizontalAxisHeight(t){var e,n;const r=this,{config:i,state:s}=r,{rotatedPadding:o,isLegendRight:l,isLegendInset:c}=s,u=i.axis_rotated,f=((e=i.padding)==null?void 0:e.mode)==="fit",d=i[`axis_${t}_inner`],h=i[`axis_${t}_label`].text,m=13;let S=((n=i.padding)==null?void 0:n.mode)==="fit"?d&&!h?t==="y"?1:0:20:30;if(t==="x"&&!i.axis_x_show)return 8;if(t==="x"&&ae(i.axis_x_height))return i.axis_x_height;if(t==="y"&&!i.axis_y_show)return i.legend_show&&!l&&!c?10:1;if(t==="y2"&&!i.axis_y2_show)return f?0:o.top;const E=r.axis.getMaxTickSize(t),C=Math.abs(i.axis_x_tick_rotate)>0&&(!i.axis_x_tick_autorotate||r.needToRotateXAxisTickTexts());return(i.axis_x_tick_multiline||C)&&E.height>m&&(S+=E.height-m),S+(r.axis.getAxisLabelPosition(t).isInner?0:10)+(t==="y2"&&!u?-10:0)},getEventRectWidth(){const t=this,{config:e,axis:n}=t,r=e.axis_x_inverted,i=n.x.tickInterval();return Math.max(0,r?Math.abs(i):i)},getAxisTickRotate(t){const e=this,{axis:n,config:r,state:i,$el:s}=e;let o=r[`axis_${t}_tick_rotate`];if(t==="x"){const l=n.isCategorized()||n.isTimeSeries();if(r.axis_x_tick_fit&&l){const c=r.axis_x_tick_count,u=i.current.maxTickSize.x.ticks.length;let f=0;if(c?f=c>u?u:c:u&&(f=u),f!==i.axis.x.tickCount){const{targets:d}=e.data;i.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(d,"min"),e.getXDomainMinMax(d,"max")],f)}i.axis.x.tickCount=f}(s.svg||i.isCanvasMode)&&r.axis_x_tick_autorotate&&r.axis_x_tick_fit&&!r.axis_x_tick_multiline&&!r.axis_x_tick_culling&&l&&(o=e.needToRotateXAxisTickTexts()?r.axis_x_tick_rotate:0)}return o},needToRotateXAxisTickTexts(){const t=this,{state:{axis:e,current:n,isLegendRight:r,legendItemWidth:i}}=t,s=r&&i,o=n.width-s-t.getCurrentPaddingByDirection("left")-t.getCurrentPaddingByDirection("right"),l=e.x.tickCount+e.x.padding.left+e.x.padding.right,{width:c}=t.axis.getMaxTickSize("x"),u=l?o/l:0;return c>u}},$2={axis_x_clipPath:!0,axis_x_show:!0,axis_x_forceAsSingle:!1,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_culling_lines:!0,axis_x_tick_culling_reverse:!1,axis_x_tick_count:void 0,axis_x_tick_inner:!1,axis_x_tick_show:!0,axis_x_tick_text_show:!0,axis_x_tick_text_inner:!1,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_autorotate:!1,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:void 0,axis_x_min:void 0,axis_x_inverted:!1,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_axes:[]},B2={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_culling_reverse:!1,axis_y_tick_inner:!1,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},z2={axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_culling_reverse:!1,axis_y2_tick_inner:!1,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]},U2=Object.defineProperty,ip=Object.getOwnPropertySymbols,k2=Object.prototype.hasOwnProperty,G2=Object.prototype.propertyIsEnumerable,sp=(t,e,n)=>e in t?U2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Iu=(t,e)=>{for(var n in e||(e={}))k2.call(e,n)&&sp(t,n,e[n]);if(ip)for(var n of ip(e))G2.call(e,n)&&sp(t,n,e[n]);return t},X2=Iu(Iu(Iu({axis_evalTextSize:!0,axis_rotated:!1,axis_tooltip:!1},$2),B2),z2),W2={data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1};const V2=[r2,a2,i2],op={axis:M2,clip:F2,eventrect:D2,sizeAxis:N2},lp={optDataAxis:W2,optAxis:X2};function cp(t){return Object.keys(t).map(e=>t[e])}function up(t=[],e=[]){xn(br.prototype,cp(op).concat(t)),xn(jn.prototype,V2),$a.setOptions(cp(lp).concat(e))}function Ts(t=[],e=[]){up(t,e)}function ea(t,e=[]){const n=Array.isArray(t)?t:t?[t]:[];up([Ti,tl,e2].concat(n),[ka,n2].concat(e))}let fp=()=>(ea(xi,[yi]),(fp=()=>qt.AREA)()),dp=()=>(ea(xi,[yi]),(dp=()=>qt.AREA_LINE_RANGE)()),hp=()=>(ea(xi,[yi]),(hp=()=>qt.AREA_STEP_RANGE)()),vp=()=>(ea(xi,[yi,xu]),(vp=()=>qt.AREA_SPLINE)()),gp=()=>(ea(xi,[yi,xu]),(gp=()=>qt.AREA_SPLINE_RANGE)()),pp=()=>(ea(xi,[yi]),(pp=()=>qt.AREA_STEP)());function Ru(t){const e=this.config.bar_connectLine,n=(e==null?void 0:e[t])||e;return/^(start|end)\-(start|end)$/.test(n)?n:null}var j2={initBar(){const{$el:t,config:e,state:{clip:n}}=this;t.bar=t.main.select(`.${ze.chart}`),t.bar=e.bar_front?t.bar.append("g"):t.bar.insert("g",":first-child"),t.bar.attr("class",rr.chartBars).call(this.setCssRule(!1,`.${rr.chartBars}`,["pointer-events:none"])),e.clipPath===!1&&(e.bar_radius||e.bar_radius_ratio)&&t.bar.attr("clip-path",n.pathXAxis.replace(/#[^)]*/,`#${n.id}`))},updateTargetsForBar(t){const e=this,{config:n}=e,r=e.getClass("bars",!0),i=n.interaction_enabled&&n.data_selection_isselectable;su.call(e,t,{type:"Bar",elKey:"bar",containerClass:rr.chartBars,itemClass:rr.chartBar,initFn:e.initBar}).append("g").attr("class",r).style("cursor",o=>{var l;return(l=i==null?void 0:i.bind)!=null&&l.call(i,e.api)(o)?"pointer":null}).call(o=>{e.setCssRule(!0,` .${rr.bar}`,["fill"],e.color)(o),o.each(function(l){Ru.call(e,l.id)&&Yt(this).append("path").attr("class",rr.barConnectLine)})})},updateBar(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{config:r,$el:i,$T:s}=n,o=e?i.subchart:i,l=n.getClass("bar",!0),c=n.initialOpacity.bind(n);r.bar_linearGradient&&n.updateLinearGradient();const u=o.main.selectAll(`.${rr.bars}`).selectAll(`.${rr.bar}`).data(n.labelishData.bind(n));s(u.exit(),t).style("opacity","0").remove(),o.bar=u.enter().append("path").attr("class",l).style("fill",n.generateUpdateBarColor()).merge(u).style("opacity",c),n.setRatioForGroupedData(o.bar.data())},generateUpdateBarColor(){const t=this,e=t.getStylePropValue(t.color)||(()=>null);return n=>Yv.call(t,n,"bar_linearGradient",e)},updateBarColor(t){return this.generateUpdateBarColor()(t)},redrawBar(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{bar:i}=n?r.$el.subchart:r.$el,s=[],o=new Map,l=uo(r),c=r.generateUpdateBarColor(),u=function(d,h,m){var S;const C=ae(d.value)||r.isBarRangeType(d)||((S=r.isSubchartCandlestickBarValue)==null?void 0:S.call(r,d,n))?t(d,h):[""];let w=o.get(d.id);if(w===void 0&&(w=Ru.call(r,d.id),o.set(d.id,w)),C.length>1&&s.push(C[1]),h===m.length-1&&s.length){const $=r.$T(Yt(this.parentNode.querySelector(`.${rr.barConnectLine}`)),e,Cr());r.updateConnectLine($,w,s),s.splice(0)}return C[0]},f=r.$T(i,e,Cr());return l&&typeof f.attrTween=="function"?f.attrTween("d",function(d,h,m){var S;const E=u.call(this,d,h,m);return k0((S=this.getAttribute("d"))!=null?S:"",E)}):f.attr("d",u),[f.style("fill",d=>{var h;return((h=r.getSubchartCandlestickBarColor)==null?void 0:h.call(r,d,n))||c(d)}).style("clip-path",d=>d.clipPath).style("opacity",null)]},generateDrawBar(t,e){const n=this,{config:r}=n,i=n.generateGetBarPoints(t,e),s=uo(n),o=s?ic(n):new Set,l=new Map;return(c,u)=>{const f=i(c,u),{indexX:d,indexY:h,isNegative:m,pos:S,radius:E,clipPath:C}=sc(n,c,f,s,o,n.isStackingRadiusData.bind(n)),w=["",""];if(c.clipPath=C,s){const W=`a${E} ${E} ${m?"1 0 0":"0 0 1"} `;w[h]=`${W}${E},${E}`,w[d]=`${W}${[-E,E][r.axis_rotated?"sort":"reverse"]()}`,m&&w.reverse()}const $=r.axis_rotated?`H${S} ${w[0]}V${f[2][h]-E} ${w[1]}H${f[3][d]}`:`V${S} ${w[0]}H${f[2][d]-E} ${w[1]}V${f[3][h]}`,z=[`M${f[0][d]},${f[0][h]}${$}z`];let B=l.get(c.id);return B===void 0&&(B=Ru.call(n,c.id),l.set(c.id,B)),B&&z.push(r.axis_rotated?{x:f[0][d],y:f[0][h],width:f[0][d]-S,height:f[2][h]-f[0][h]}:{x:f[0][d],y:S,width:f[2][d]-f[0][d],height:f[3][h]-S}),z}},isStackingRadiusData(t){const e=this,{$el:n,config:r,data:i,state:s}=e,{id:o,index:l,value:c}=t;if(s.hiddenTargetIds.has(o)){const h=n.bar.filter(m=>m.id===o&&m.value===c);return!h.empty()&&/a\d+/i.test(h.attr("d"))}const u=r.data_groups.find(h=>h.indexOf(o)>-1),d=e.orderTargets(e.filterTargetsToShow(i.targets.filter(e.isBarType,e))).filter(h=>u.indexOf(h.id)>-1).map(h=>{const m=h.values[l];if(m&&(ae(c)&&c>0?m.value>0:m.value<0))return m}).filter(Boolean).map(h=>h.id);return c!==0&&d.indexOf(o)===d.length-1},updateConnectLine(t,e,n){const r=n.map((i,s,o)=>{const l=this.config.axis_rotated,c=/^start-(start|end)$/.test(e),u=/^end-(start|end)$/.test(e),f=[],d=l?u?i.x-i.width:i.x:i.x+i.width,h=l||c?i.y+i.height:i.y;return s===0?f.push(`${d},${h}`):(f.push(l?`L${i.x-(/\w+-end$/.test(e)?i.width:0)},${i.y}`:`L${i.x},${i.y+(/\w+-start$/.test(e)?i.height:0)}`),s<o.length-1&&f.push(`M${d},${h}`)),f.join(" ")});t.attr("d",`M${r.join("")}z`)}},H2={bar_connectLine:!1,bar_front:!1,bar_indices_removeNull:!1,bar_label_threshold:0,bar_linearGradient:!1,bar_overlap:!1,bar_padding:0,bar_radius:void 0,bar_radius_ratio:void 0,bar_sensitivity:2,bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0};let mp=()=>(Ts([j2,Ti],[H2,ka]),(mp=()=>qt.BAR)());var Y2={initBubble(){const t=this,{config:e}=t;t.hasType("bubble")&&(e.point_show=!0,e.point_type="circle")},getBaseLength(){const t=this,{width:e,height:n}=t.state,r=Oe.bubbleBaseLength;let i=t.cache.get(r);return i||t.cache.add(r,i=pr("min",[e,n])),i},getBubbleR(t){const e=this;let n=e.config.bubble_maxR;ie(n)?n=n.bind(e.api)(t):ae(n)||(n=e.getBaseLength()/(e.getMaxDataCount()*2)+12);const r=Oe.bubbleMaxValue;let i=e.cache.get(r);i===null&&e.cache.add(r,i=pr("max",e.getMinMaxData().max.map(l=>e.isBubbleZType(l)?e.getBubbleZData(l.value,"y"):He(l.value)?l.value.mid:l.value)));const s=n*n*Math.PI,o=(e.isBubbleZType(t)?e.getBubbleZData(t.value,"z"):t.value)*(s/i);return Math.sqrt(o/Math.PI)},getBubbleZData(t,e){return He(t)?t[e]:t[e==="y"?0:1]}},K2=Y2,Z2={bubble_maxR:35,bubble_zerobased:!1};let xp=()=>(Ts([Ti,tl,K2],[Z2,ka]),(xp=()=>qt.BUBBLE)());var J2=Object.defineProperty,yp=Object.getOwnPropertySymbols,Q2=Object.prototype.hasOwnProperty,_2=Object.prototype.propertyIsEnumerable,Tp=(t,e,n)=>e in t?J2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,q2=(t,e)=>{for(var n in e||(e={}))Q2.call(e,n)&&Tp(t,n,e[n]);if(yp)for(var n of yp(e))_2.call(e,n)&&Tp(t,n,e[n]);return t},tI={generateGetCandlestickPoints(t,e=!1){const n=this,r=e?n.axis.subX:n.axis.x,i=n.getIndicesMax(t)+1,s=n.getBarW("candlestick",r,i),o=n.getShapeX(s,t,!!e),l=n.getShapeY(!!e),c=n.getShapeOffset(n.isCandlestickType,t,!!e),u=n.getYScaleById.bind(n);return(f,d)=>{const h=u.call(n,f.id,e)(n.getShapeYMin(f.id,e)),m=c(f,d)||h,S=ae(s)?s:s[f.id]||s._$width,E=n.getCandlestickData(f);let C;if(E&&ae(E.open)&&ae(E.close)){const w={start:o(f),end:0};w.end=w.start+S;const $={start:l(E.open),end:l(E.close)},z={x:w.start+S/2,high:l(E.high),low:l(E.low)},B=h-m;$.start-=B,$.end-=B,z.high-=B,z.low-=B,C=[[w.start,$.start],[w.end,$.end],[z.x,z.low,z.high]]}else C=[[0,0],[0,0],[0,0,0]];return C}},getCandlestickData({value:t}){let e;if(qe(t)){const[n,r,i,s,o=!1]=t;e={open:n,high:r,low:i,close:s},o!==!1&&(e.volume=o)}else He(t)&&(e=q2({},t));return e&&(e._isUp=e.close>=e.open),e||null}},eI=Object.defineProperty,nI=Object.defineProperties,rI=Object.getOwnPropertyDescriptors,bp=Object.getOwnPropertySymbols,aI=Object.prototype.hasOwnProperty,iI=Object.prototype.propertyIsEnumerable,Sp=(t,e,n)=>e in t?eI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sI=(t,e)=>{for(var n in e||(e={}))aI.call(e,n)&&Sp(t,n,e[n]);if(bp)for(var n of bp(e))iI.call(e,n)&&Sp(t,n,e[n]);return t},oI=(t,e)=>nI(t,rI(e)),lI=oI(sI({},tI),{initCandlestick(){Kv.call(this,{elKey:"candlestick",className:Kr.chartCandlesticks})},updateTargetsForCandlestick(t){su.call(this,t,{type:"Candlestick",elKey:"candlestick",containerClass:Kr.chartCandlesticks,itemClass:Kr.chartCandlestick,initFn:this.initCandlestick,withFocus:!1,withStyles:!1}).style("pointer-events","none")},updateCandlestick(t,e=!1){const n=this,{$el:r,$T:i}=n,s=e?r.subchart:r,o=n.getClass("candlestick",!0),l=n.initialOpacity.bind(n),c=s.main.selectAll(`.${Kr.chartCandlestick}`).selectAll(`.${Kr.candlestick}`).data(n.labelishData.bind(n));i(c.exit(),t).style("opacity","0").remove();const u=c.enter().filter(f=>f.value).append("g").attr("class",o);u.append("line"),u.append("path"),s.candlestick=c.merge(u).style("opacity",l)},generateDrawCandlestick(t,e){const n=this,{config:r}=n,i=n.generateGetCandlestickPoints(t,e),s=r.axis_rotated,o=r.candlestick_color_down;return(l,c,u)=>{const f=i(l,c),d=n.getCandlestickData(l),h=d==null?void 0:d._isUp,m=+s,S=+!m;u.classed&&u.classed(Kr[h?"valueUp":"valueDown"],!0);const E=s?`H${f[1][1]} V${f[1][0]} H${f[0][1]}`:`V${f[1][1]} H${f[1][0]} V${f[0][1]}`;u.select("path").attr("d",`M${f[0][m]},${f[0][S]}${E}z`).style("fill",$=>(h?n.color($):He(o)?o[$.id]:o)||n.color($));const C=u.select("line"),w=s?{x1:f[2][1],x2:f[2][2],y1:f[2][0],y2:f[2][0]}:{x1:f[2][0],x2:f[2][0],y1:f[2][1],y2:f[2][2]};for(const $ in w)C.attr($,w[$])}},redrawCandlestick(t,e,n=!1){const r=this,{$el:i,$T:s}=r,{candlestick:o}=n?i.subchart:i,l=Cr(!0);return[o.each(function(c,u){const f=s(Yt(this),e,l);t(c,u,f)}).style("opacity",null)]}}),cI={candlestick_width:void 0,candlestick_width_ratio:.6,candlestick_width_max:void 0,candlestick_color_down:"red"};let Ap=()=>(Ts([lI,Ti],[cI,ka]),(Ap=()=>qt.CANDLESTICK)());var sl={arc_cornerRadius:0,arc_cornerRadius_ratio:0,arc_needle_show:!1,arc_needle_color:void 0,arc_needle_value:void 0,arc_needle_path:void 0,arc_needle_length:100,arc_needle_top_rx:0,arc_needle_top_ry:0,arc_needle_top_width:0,arc_needle_bottom_rx:1,arc_needle_bottom_ry:1,arc_needle_bottom_width:15,arc_needle_bottom_len:0,arc_rangeText_values:void 0,arc_rangeText_unit:"absolute",arc_rangeText_fixed:!1,arc_rangeText_format:void 0,arc_rangeText_position:void 0},uI={donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_line:!1,donut_label_image:void 0,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_rate:.98,donut_expand_duration:50,donut_padAngle:0,donut_startingAngle:0};function fI(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function dI(t){return t}function hI(){var t=dI,e=fI,n=null,r=Je(0),i=Je(Wo),s=Je(0);function o(l){var c,u=(l=oc(l)).length,f,d,h=0,m=new Array(u),S=new Array(u),E=+r.apply(this,arguments),C=Math.min(Wo,Math.max(-Wo,i.apply(this,arguments)-E)),w,$=Math.min(Math.abs(C)/u,s.apply(this,arguments)),z=$*(C<0?-1:1),B;for(c=0;c<u;++c)(B=S[m[c]=c]=+t(l[c],c,l))>0&&(h+=B);for(e!=null?m.sort(function(W,H){return e(S[W],S[H])}):n!=null&&m.sort(function(W,H){return n(l[W],l[H])}),c=0,d=h?(C-u*z)/h:0;c<u;++c,E=w)f=m[c],B=S[f],w=E+(B>0?B*d:0)+z,S[f]={data:l[f],index:c,value:B,startAngle:E,endAngle:w,padAngle:$};return S}return o.value=function(l){return arguments.length?(t=typeof l=="function"?l:Je(+l),o):t},o.sortValues=function(l){return arguments.length?(e=l,n=null,o):e},o.sort=function(l){return arguments.length?(n=l,e=null,o):n},o.startAngle=function(l){return arguments.length?(r=typeof l=="function"?l:Je(+l),o):r},o.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:Je(+l),o):i},o.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:Je(+l),o):s},o}function vI(t){return t.innerRadius}function gI(t){return t.outerRadius}function pI(t){return t.startAngle}function mI(t){return t.endAngle}function xI(t){return t&&t.padAngle}function yI(t,e,n,r,i,s,o,l){var c=n-t,u=r-e,f=o-i,d=l-s,h=d*c-f*u;if(!(h*h<kn))return h=(f*(e-s)-d*(t-i))/h,[t+h*c,e+h*u]}function ol(t,e,n,r,i,s,o){var l=t-n,c=e-r,u=(o?s:-s)/gi(l*l+c*c),f=u*c,d=-u*l,h=t+f,m=e+d,S=n+f,E=r+d,C=(h+S)/2,w=(m+E)/2,$=S-h,z=E-m,B=$*$+z*z,W=i-s,H=h*E-S*m,_=(z<0?-1:1)*gi(jA(0,W*W*B-H*H)),q=(H*z-$*_)/B,st=(-H*$-z*_)/B,it=(H*z+$*_)/B,ot=(-H*$+z*_)/B,ct=q-C,gt=st-w,tt=it-C,ft=ot-w;return ct*ct+gt*gt>tt*tt+ft*ft&&(q=it,st=ot),{cx:q,cy:st,x01:-f,y01:-d,x11:q*(i/W-1),y11:st*(i/W-1)}}function Ep(){var t=vI,e=gI,n=Je(0),r=null,i=pI,s=mI,o=xI,l=null,c=uc(u);function u(){var f,d,h=+t.apply(this,arguments),m=+e.apply(this,arguments),S=i.apply(this,arguments)-Xo,E=s.apply(this,arguments)-Xo,C=Lv(E-S),w=E>S;if(l||(l=f=c()),m<h&&(d=m,m=h,h=d),!(m>kn))l.moveTo(0,0);else if(C>Wo-kn)l.moveTo(m*Ua(S),m*Fr(S)),l.arc(0,0,m,S,E,!w),h>kn&&(l.moveTo(h*Ua(E),h*Fr(E)),l.arc(0,0,h,E,S,w));else{var $=S,z=E,B=S,W=E,H=C,_=C,q=o.apply(this,arguments)/2,st=q>kn&&(r?+r.apply(this,arguments):gi(h*h+m*m)),it=eu(Lv(m-h)/2,+n.apply(this,arguments)),ot=it,ct=it,gt,tt;if(st>kn){var ft=Dv(st/h*Fr(q)),lt=Dv(st/m*Fr(q));(H-=ft*2)>kn?(ft*=w?1:-1,B+=ft,W-=ft):(H=0,B=W=(S+E)/2),(_-=lt*2)>kn?(lt*=w?1:-1,$+=lt,z-=lt):(_=0,$=z=(S+E)/2)}var bt=m*Ua($),St=m*Fr($),Mt=h*Ua(W),Ot=h*Fr(W);if(it>kn){var Kt=m*Ua(z),ee=m*Fr(z),Ae=h*Ua(B),Ee=h*Fr(B),Te;if(C<gs)if(Te=yI(bt,St,Ae,Ee,Kt,ee,Mt,Ot)){var De=bt-Te[0],me=St-Te[1],Pe=Kt-Te[0],Zt=ee-Te[1],he=1/Fr(HA((De*Pe+me*Zt)/(gi(De*De+me*me)*gi(Pe*Pe+Zt*Zt)))/2),ge=gi(Te[0]*Te[0]+Te[1]*Te[1]);ot=eu(it,(h-ge)/(he-1)),ct=eu(it,(m-ge)/(he+1))}else ot=ct=0}_>kn?ct>kn?(gt=ol(Ae,Ee,bt,St,m,ct,w),tt=ol(Kt,ee,Mt,Ot,m,ct,w),l.moveTo(gt.cx+gt.x01,gt.cy+gt.y01),ct<it?l.arc(gt.cx,gt.cy,ct,Un(gt.y01,gt.x01),Un(tt.y01,tt.x01),!w):(l.arc(gt.cx,gt.cy,ct,Un(gt.y01,gt.x01),Un(gt.y11,gt.x11),!w),l.arc(0,0,m,Un(gt.cy+gt.y11,gt.cx+gt.x11),Un(tt.cy+tt.y11,tt.cx+tt.x11),!w),l.arc(tt.cx,tt.cy,ct,Un(tt.y11,tt.x11),Un(tt.y01,tt.x01),!w))):(l.moveTo(bt,St),l.arc(0,0,m,$,z,!w)):l.moveTo(bt,St),!(h>kn)||!(H>kn)?l.lineTo(Mt,Ot):ot>kn?(gt=ol(Mt,Ot,Kt,ee,h,-ot,w),tt=ol(bt,St,Ae,Ee,h,-ot,w),l.lineTo(gt.cx+gt.x01,gt.cy+gt.y01),ot<it?l.arc(gt.cx,gt.cy,ot,Un(gt.y01,gt.x01),Un(tt.y01,tt.x01),!w):(l.arc(gt.cx,gt.cy,ot,Un(gt.y01,gt.x01),Un(gt.y11,gt.x11),!w),l.arc(0,0,h,Un(gt.cy+gt.y11,gt.cx+gt.x11),Un(tt.cy+tt.y11,tt.cx+tt.x11),w),l.arc(tt.cx,tt.cy,ot,Un(tt.y11,tt.x11),Un(tt.y01,tt.x01),!w))):l.arc(0,0,h,W,B,w)}if(l.closePath(),f)return l=null,f+""||null}return u.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-gs/2;return[Ua(d)*f,Fr(d)*f]},u.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:Je(+f),u):t},u.outerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:Je(+f),u):e},u.cornerRadius=function(f){return arguments.length?(n=typeof f=="function"?f:Je(+f),u):n},u.padRadius=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Je(+f),u):r},u.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:Je(+f),u):i},u.endAngle=function(f){return arguments.length?(s=typeof f=="function"?f:Je(+f),u):s},u.padAngle=function(f){return arguments.length?(o=typeof f=="function"?f:Je(+f),u):o},u.context=function(f){return arguments.length?(l=f==null?null:f,u):l},u}const TI=15,Cp=20,Ip=.35;function bI(t=!1){const e=this;return["donut","pie","polar","gauge"].find(n=>e.hasType(n)&&!(n==="gauge"&&t&&e.hasMultiArcGauge()))}function Rp(){const t=this,{config:e}=t,n=bI.call(t,!0),r=n&&e[`${n}_label_line`],i=Kn(r),s=(c,u,f)=>f,o={show:r===!0||i&&(r==null?void 0:r.show)!==!1,distance:i&&(r==null?void 0:r.distance)||Cp};if(r===!0)return{chartType:n,line:o,text:{formatter:s}};if(!i)return{chartType:n,line:{show:!1,distance:Cp},text:{formatter:null}};let l=s;return ie(r.text)?l=r.text:r.text===!1&&(l=null),{chartType:n,line:o,text:{formatter:l}}}function SI(t,e){const n=this,{state:r}=n,i=n.updateAngle(t);if(!i)return null;let{outerRadius:s}=n.getRadius(t),o=s;n.hasType("polar")&&(o=n.getPolarOuterRadius(t,s),s=r.radius);let l=(i.startAngle+i.endAngle)/2;Math.abs(i.endAngle-i.startAngle-2*Math.PI)<.01&&(l=Math.PI/2);const u=Math.sin(l),f=-Math.cos(l),d={x:u*o,y:f*o},h=s+TI,m={x:u*h,y:f*h},S=u>=0,E={x:m.x+e*(S?1:-1),y:m.y};return{startPoint:d,breakPoint:m,endPoint:E,isRight:S,midAngle:l}}function wp(){return Rp.call(this).line.show}function AI(t){const e=this,{$el:{arcs:n},$T:r}=e,{line:i,text:s}=Rp.call(e),o=i.distance;let l=null;n.selectAll(`.${Ze.chartArc}`).each(function(c){var u,f,d;const h=Yt(this),m=SI.call(e,c,o),{ratio:S,meetsThreshold:E,updated:C}=(u=c._cache)!=null?u:{};if(!C||!m)return;const w=e.isTargetToShow(c.data.id)&&E,{startPoint:$,breakPoint:z,endPoint:B,isRight:W}=m,H=`${$.x},${$.y} ${z.x},${z.y} ${B.x},${B.y}`;if(i.show){let q=h.select(`.${Ze.arcLabelLine}`);q.empty()&&(q=h.append("polyline").attr("class",Ze.arcLabelLine)),r(q,t).attr("points",H).style("stroke",e.color(c.data)).style("opacity",w?null:"0")}let _=h.select(`.${Ze.arcLabelLineText}`);if(_.empty()&&(_=h.append("text").attr("class",Ze.arcLabelLineText).style("pointer-events","none")),w){const{value:q}=C,{id:st}=c.data,it=((d=(f=s.formatter)!=null?f:e.getArcLabelConfig("format"))!=null?d:e.defaultArcValueFormat)(q,S,st).toString();ci(_,it,[-1,1],!1);const ot={x:B.x+5*(W?1:-1),y:B.y};_.style("text-anchor",W?"start":"end");const ct=_.node(),gt=ct==null?void 0:ct.querySelectorAll("tspan");if(l===null&&(l=parseFloat(se.getComputedStyle(ct).fontSize)||12),gt&&gt.length>1){const ft=(gt.length-3)/2;ot.y+=(-ft+Ip)*l}else ot.y+=Ip*l;r(_,t).attr("transform",`translate(${ot.x},${ot.y})`).style("opacity",null).style("fill",e.updateTextColor.bind(e)(c))}else r(_,t).style("opacity","0")})}var EI=Object.defineProperty,CI=Object.defineProperties,II=Object.getOwnPropertyDescriptors,Op=Object.getOwnPropertySymbols,RI=Object.prototype.hasOwnProperty,wI=Object.prototype.propertyIsEnumerable,Pp=(t,e,n)=>e in t?EI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,OI=(t,e)=>{for(var n in e||(e={}))RI.call(e,n)&&Pp(t,n,e[n]);if(Op)for(var n of Op(e))wI.call(e,n)&&Pp(t,n,e[n]);return t},PI=(t,e)=>CI(t,II(e));const wu=["donut","gauge","pie","polar"];function MI(t){return["donut","pie","polar","gauge"].find(e=>t.hasType(e))}function LI(t,e,n,r){var i,s;const{config:o,state:{radiusExpanded:l}}=t,c=n.endAngle-Math.PI/2,u=Math.sin(c),f={x:Math.cos(c)*(l+(r?5:25)),y:u*(l+15-Math.abs(u*10))+3};if(r){const d=o.arc_rangeText_position;if(d){const h=o.arc_rangeText_values,m=ie(d)?d(h[e.index]):d;f.x+=(i=m==null?void 0:m.x)!=null?i:0,f.y+=(s=m==null?void 0:m.y)!=null?s:0}}return f}function DI(t,e,n,r){const{config:i}=t,s=MI(t);let o=s?i[`${s}_label_ratio`]:void 0;if(o)o=ie(o)?o.bind(t.api)(e,n,r):o;else{const d=36/n,h=d>.375;o=n&&r?(h?1.175-d:.8)*n/r:0}return o}function FI(t,e,n){let{outerRadius:r}=t.getRadius(e);t.hasType("polar")&&(r=t.getPolarOuterRadius(e,r));const[i,s]=t.svgArc.centroid(n).map(c=>isNaN(c)?0:c),o=Math.sqrt(i*i+s*s),l=DI(t,e,r,o);return{pos:{x:i,y:s},ratio:l}}function Mp(t=0){const e=this,{config:n,state:r}=e,i=e.hasMultiArcGauge(),s=r.gaugeArcWidth/e.getTargetsToShow().length,o=t?Math.min(r.radiusExpanded*t-r.radius,s*.8-(1-t)*100):0;return{inner(l){const{innerRadius:c}=e.getRadius(l);return i?r.radius-s*(l.index+1):ae(c)?c:0},outer(l){const{outerRadius:c}=e.getRadius(l);let u;if(i)u=r.radius-s*l.index+o;else if(e.hasType("polar")&&!t)u=e.getPolarOuterRadius(l,c);else if(u=c,t){let{radiusExpanded:f}=r;r.radius!==c&&(f-=Math.abs(r.radius-c)),u=f*t}return u},corner(l,c){const{arc_cornerRadius_ratio:u=0,arc_cornerRadius:f=0}=n,{data:{id:d},value:h}=l;let m;return u?m=u*c:m=ae(f)?f:f.call(e.api,d,h,c),m}}}function Ou(t){return function(e){const n=({startAngle:i=0,endAngle:s=0,padAngle:o=0})=>({startAngle:i,endAngle:s,padAngle:o}),r=Ya(n(this._current),n(e));return this._current=e,function(i){const s=r(i),{data:o,index:l,value:c}=e;return t(PI(OI({},s),{data:o,index:l,value:c}))}}}var NI={initPie(){const t=this,{config:e}=t,n=e.data_type,r=e[`${n}_padding`],i=e[`${n}_startingAngle`]||0,s=(r?r*.01:e[`${n}_padAngle`])||0;t.pie=hI().startAngle(i).endAngle(i+2*Math.PI).padAngle(s).value(o=>{var l,c;return(c=(l=o.values)==null?void 0:l.reduce((u,f)=>u+f.value,0))!=null?c:o}).sort(t.getSortCompareFn.bind(t)(!0))},updateRadius(){const t=this,{config:e,state:n}=t,r=e.data_type,i=e[`${r}_padding`],s=e.gauge_width||e.donut_width,o=t.getTargetsToShow().length*e.gauge_arcs_minWidth,l=.85,c=wp.call(t)?l:1;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2*(t.hasMultiArcGauge()&&e.gauge_label_show?l:c),n.radius=n.radiusExpanded*.95,n.innerRadiusRatio=s?(n.radius-s)/n.radius:.6,n.gaugeArcWidth=s||(o<=n.radius-n.innerRadius?n.radius-n.innerRadius:o<=n.radius?o:n.radius);const u=e.pie_innerRadius||(i?i*(n.innerRadiusRatio+.1):0);n.outerRadius=e.pie_outerRadius,n.innerRadius=t.hasType("donut")||t.hasType("gauge")?n.radius*n.innerRadiusRatio:u},getRadius(t){const e=this,n=t==null?void 0:t.data;let{innerRadius:r,outerRadius:i}=e.state;return!ae(r)&&n&&(r=r[n.id]||0),He(i)&&n&&n.id in i?i=i[n.id]:ae(i)||(i=e.state.radius),{innerRadius:r,outerRadius:i}},updateArc(){const t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength(){const t=this,{config:e}=t,n=e.gauge_arcLength*3.6;let r=2*(n/360);return n<-360?r=-2:n>360&&(r=2),r*Math.PI},getStartingAngle(){const t=this,{config:e}=t,n=e.data_type,r=t.hasType("gauge")?e.gauge_fullCircle:!1,i=-1*Math.PI/2,s=Math.PI/2;let o=e[`${n}_startingAngle`]||0;return!r&&o<=i?o=i:!r&&o>=s?o=s:(o>Math.PI||o<-1*Math.PI)&&(o=Math.PI),o},updateAngle(t,e=!1){var n;const r=this,{config:i,state:s}=r,o=e&&r.hasType("gauge");let{pie:l}=r,c=t,u=!1;if(!i)return null;const f=r.getStartingAngle(),d=i.gauge_fullCircle||e&&!o?r.getArcLength():f*-2,h=c.data&&r.isGaugeType(c.data)&&!r.hasMultiArcGauge();if(h){const{gauge_min:m,gauge_max:S}=i,E=r.getTotalDataSum(s.rendered),C=d*((E-m)/(S-m));l=l.startAngle(f).endAngle(C+f)}if(e===!1){let m;if(h)m=l(r.filterTargetsToShow());else{const S="$arcPieLayout";let E=r.cache.get(S);(!E||E.generation!==s.redrawGeneration)&&(E={generation:s.redrawGeneration,layout:l(r.filterTargetsToShow())},r.cache.add(S,E)),m=E.layout}m.forEach((S,E)=>{var C;!u&&S.data.id===((C=c.data)==null?void 0:C.id)&&(u=!0,c=S,c.index=E)})}if(isNaN(c.startAngle)&&(c.startAngle=0),isNaN(c.endAngle)&&(c.endAngle=c.startAngle),e||c.data&&(i.gauge_enforceMinMax||r.hasMultiArcGauge())){const{gauge_min:m,gauge_max:S}=i,E=e&&!o?r.getTotalDataSum(s.rendered):S,C=d/(E-m),w=(n=c.value)!=null?n:0,$=w<m?0:w<E?w-m:E-m;c.startAngle=f,c.endAngle=f+C*$}return u||e?c:null},getSvgArc(){const t=this,{inner:e,outer:n,corner:r}=Mp.call(t),i=Ep().innerRadius(e).outerRadius(n),s=function(o,l){var c;let u="M 0 0";if(o.value||o.data){const f=l?o:(c=t.updateAngle(o))!=null?c:null;f&&(u=i.cornerRadius(r(f,n(f)))(f))}return u};return s.centroid=i.centroid,s},getSvgArcExpanded(t=1){const e=this,{inner:n,outer:r,corner:i}=Mp.call(e,t),s=Ep().innerRadius(n).outerRadius(r);return o=>{const l=e.updateAngle(o),c=r(l);let u=0;return l&&(u=i(l,c)),l&&s.cornerRadius(u)(l)||"M 0 0"}},getArc(t,e,n){return n||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},redrawArcRangeText(){const t=this,{config:e,$el:{arcs:n},state:r,$T:i}=t,s=e.arc_rangeText_format,o=t.hasType("gauge")&&e.arc_rangeText_fixed;let l=e.arc_rangeText_values;if(l!=null&&l.length){const c=e.arc_rangeText_unit==="%",u=t.getTotalDataSum(r.rendered);c&&(l=l.map(h=>u/100*h));const f=t.pie(l).map((h,m)=>(h.index=m,h));let d=n.selectAll(`.${Ze.arcRange}`).data(l);d.exit().remove(),d=i(d.enter().append("text").attr("class",Ze.arcRange).style("text-anchor","middle").style("pointer-events","none").style("opacity","0").text(h=>{const m=c?h/u*100:h;return ie(s)?s(m):`${m}${c?"%":""}`}).merge(d)),(!r.rendered||r.rendered&&!o)&&u>0&&d.attr("transform",function(h,m){return t.transformForArcLabel(this,f[m],!0)}),d.style("opacity",h=>!o&&(h>u||u===0)?"0":null)}},transformForArcLabel(t,e,n=!1){const r=this,i=r.updateAngle(e,n);if(!i)return"";let s,o=1;if(n||r.hasMultiArcGauge())s=LI(r,e,i,n);else if(!r.hasType("gauge")||r.data.targets.length>1){const l=FI(r,e,i);s=l.pos,o=l.ratio}else return"";return Rv.call(r,t,s),`translate(${s.x*o},${s.y*o})`},convertToArcData(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel(t){var e;const n=this,r=n.hasType("gauge"),i=(e=wu.filter(n.hasType.bind(n)))==null?void 0:e[0];n.shouldShowArcLabel()&&t.style("fill",n.updateTextColor.bind(n)).attr("filter",s=>n.updateTextBGColor.bind(n)(s,n.config.data_labels_backgroundColors)).each(function(s){const o=Yt(this),l=n.updateAngle(s),c=n.getRatio("arc",l),u=Qc.call(n,c,i);if(s._cache={updated:l,ratio:c,meetsThreshold:u},u){const{value:f}=l||s,d=(n.getArcLabelConfig("format")||n.defaultArcValueFormat)(f,c,s.data.id).toString();ci(o,d,[-1,1],r)}else o.text("")})},expandArc(t){const e=this,{state:{transiting:n},$el:r}=e;if(n){const s=setInterval(()=>{e.state.transiting||(clearInterval(s),r.legend.selectAll(`.${nn.legendItemFocused}`).size()>0&&e.expandArc(t))},10);return}const i=e.mapToTargetIds(t);r.svg.selectAll(e.selectorTargets(i,`.${Ze.chartArc}`)).each(function(s){if(!e.shouldExpand(s.data.id))return;const o=e.getExpandConfig(s.data.id,"duration"),l=e.getSvgArcExpanded(e.getExpandConfig(s.data.id,"rate"));Yt(this).selectAll("path").transition().duration(o).attrTween("d",Ou(e.svgArcExpanded.bind(e))).transition().duration(o*2).attrTween("d",Ou(l.bind(e)))})},unexpandArc(t){const e=this,{state:{transiting:n},$el:{svg:r}}=e;if(n)return;const i=e.mapToTargetIds(t);r.selectAll(e.selectorTargets(i,`.${Ze.chartArc}`)).selectAll("path").transition().duration(s=>e.getExpandConfig(s.data.id,"duration")).attrTween("d",Ou(e.svgArc.bind(e))),r.selectAll(`${Ze.arc}`).style("opacity",null)},getExpandConfig(t,e){const n=this,{config:r}=n,i={duration:50,rate:.98};let s;return n.isDonutType(t)?s="donut":n.isGaugeType(t)?s="gauge":n.isPieType(t)&&(s="pie"),s?r[`${s}_expand_${e}`]:i[e]},shouldExpand(t){const e=this,{config:n}=e,r=e.isDonutType(t)?"donut":e.isGaugeType(t)?"gauge":e.isPieType(t)?"pie":null;return r?!!n[`${r}_expand`]:!1},shouldShowArcLabel(){const t=this,{config:e}=t;return wu.some(n=>t.hasType(n)&&e[`${n}_label_show`])},getArcLabelConfig(t="format"){const e=this,{config:n}=e;let r=i=>i;return wu.filter(e.hasType.bind(e)).forEach(i=>{r=n[`${i}_label_${t}`]}),t==="format"&&ie(r)?r.bind(e.api):r},updateTargetsForArc(t){const e=this,{$el:n}=e,r=e.hasType("gauge"),i=e.getChartClass("Arc"),s=e.getClass("arcs",!0),o=e.classFocus.bind(e),l=n.main.select(`.${Ze.chartArcs}`),c=l.selectAll(`.${Ze.chartArc}`).data(e.pie(t)).attr("class",f=>i(f)+o(f.data)),u=c.enter().append("g").attr("class",i).call(this.setCssRule(!1,`.${Ze.chartArcs} text`,["pointer-events:none","text-anchor:middle"]));u.append("g").attr("class",s).merge(c),u.append("text").attr("dy",r&&!e.hasMultiTargets()?"-.1em":null).style("opacity","0").style("text-anchor",e.getStylePropValue("middle")).style("pointer-events",e.getStylePropValue("none")),n.text=l.selectAll(`.${ze.target} text`)},initArc(){const t=this,{$el:e}=t;e.arcs=e.main.select(`.${ze.chart}`).append("g").attr("class",Ze.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle(t){const e=this,n=t||e.getArcTitle(),r=e.hasType("gauge");if(n){const i=r?ar.chartArcsGaugeTitle:Ze.chartArcsTitle;let s=e.$el.arcs.select(`.${i}`);s.empty()&&(s=e.$el.arcs.append("text").attr("class",i).style("text-anchor","middle")),r&&s.attr("dy","-0.3em"),ci(s,n,r?void 0:[-.6,1.35],!0)}},getArcTitle(){const t=this,e=t.hasType("donut")&&"donut"||t.hasType("gauge")&&"gauge";return e?t.config[`${e}_title`]:""},getArcTitleWithNeedleValue(){const t=this,{config:e,state:n}=t,r=t.getArcTitle();if(r&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(r)){let i=n.current.needle;return ae(i)||(i=e.arc_needle_value),Pa(r,{NEEDLE_VALUE:~~i})}return!1},redrawArc(t,e,n){const r=this,{config:i,state:s,$el:{main:o}}=r,l=i.interaction_enabled,c=l&&i.data_selection_isselectable;let u=o.selectAll(`.${Ze.arcs}`).selectAll(`.${Ze.arc}`).data(r.arcData.bind(r));u.exit().transition().duration(e).style("opacity","0").remove(),u=u.enter().append("path").attr("class",r.getClass("arc",!0)).style("fill",f=>r.color(f.data)).style("cursor",f=>{var d;return(d=c==null?void 0:c.bind)!=null&&d.call(c,r.api)(f)?"pointer":null}).style("opacity","0").each(function(f){r.isGaugeType(f.data)&&(f.startAngle=i.gauge_startingAngle,f.endAngle=i.gauge_startingAngle),this._current=f}).merge(u),r.hasType("gauge")&&(r.updateGaugeMax(),r.hasMultiArcGauge()&&r.redrawArcGaugeLine()),u.attr("transform",f=>!r.isGaugeType(f.data)&&n?"scale(0)":"").style("opacity",function(f){return f===this._current?"0":null}).each(()=>{s.transiting=!0}).transition().duration(t).attrTween("d",function(f){const d=r.updateAngle(f);if(!d)return()=>"M 0 0";isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);const h=Ya(this._current,d);return this._current=h(0),function(m){const S=h(m);return S.data=f.data,r.getArc(S,!0)}}).attr("transform",n?"scale(1)":"").style("fill",f=>{let d;return r.levelColor?(d=r.levelColor(f.data.values[0].value),i.data_colors[f.data.id]=d):d=r.color(f.data),d}).style("opacity",null).call(eo,function(){if(r.levelColor){const f=Yt(this),d=f.datum(this._current);r.updateLegendItemColor(d.data.id,f.style("fill"))}s.transiting=!1,s.redrawing&&(s.redrawing=!1,s._targetsToShow=null,s._cachedDrawShape=null),Ne(i.onrendered,r.api)}),l&&r.bindArcEvent(u),r.hasType("polar")&&r.redrawPolar(),r.hasType("gauge")&&r.redrawBackgroundArcs(),i.arc_needle_show&&r.redrawNeedle(),r.redrawArcText(t),r.redrawArcRangeText()},redrawNeedle(){const t=this,{$el:e,config:n,state:{hiddenTargetIds:r,radius:i}}=t,s=(i-1)/100*n.arc_needle_length,o=r.size!==t.data.targets.length;let l=t.$el.arcs.select(`.${Ze.needle}`);const c=n.arc_needle_path,u=n.arc_needle_bottom_width/2,f=n.arc_needle_top_width/2,d=n.arc_needle_top_rx,h=n.arc_needle_top_ry,m=n.arc_needle_bottom_len,S=n.arc_needle_bottom_rx,E=n.arc_needle_bottom_ry,C=t.getNeedleAngle(),w=()=>{const $=t.getArcTitleWithNeedleValue();$&&t.setArcTitle($)};if(w(),l.empty()&&(l=e.arcs.append("path").classed(Ze.needle,!0),e.needle=l,e.needle.updateHelper=($,z=!1)=>{e.needle.style("display")!=="none"&&t.$T(e.needle).style("transform",`rotate(${t.getNeedleAngle($)}deg)`).call(eo,()=>{z&&(n.arc_needle_value=$),w()})}),o){const $=ie(c)?c.call(t,s):`M-${u} ${m} A${S} ${E} 0 0 0 ${u} ${m} L${f} -${s} A${d} ${h} 0 0 0 -${f} -${s} L-${u} ${m} Z`;t.$T(l).attr("d",$).style("fill",n.arc_needle_color).style("display",null).style("transform",`rotate(${C}deg)`)}else l.style("display","none")},getNeedleAngle(t){const e=this,{config:n,state:r}=e,i=e.getArcLength(),s=e.hasType("gauge"),o=e.getTotalDataSum(!0);let l=sn(t)?t:n.arc_needle_value,c=n[`${n.data_type}_startingAngle`]||0,u;if(ae(l)||(l=s&&e.data.targets.length===1?o:0),r.current.needle=l,s){c=e.getStartingAngle();const f=n.gauge_fullCircle?i:c*-2,{gauge_min:d,gauge_max:h}=n;u=f*((l-d)/(h-d))}else u=o?i*(l/o):0;return(c+u)*(180/Math.PI)},redrawBackgroundArcs(){const t=this,{config:e,state:n}=t,r=t.hasMultiArcGauge(),i=e.gauge_fullCircle,s=t.getTargetsToShow().length===0&&!!e.data_empty_label_text,o=t.getStartingAngle(),l=i?o+t.getArcLength():o*-1;let c=t.$el.arcs.select(`${r?"g":""}.${Ze.chartArcsBackground}`);if(r){let u=0;c=c.selectAll(`path.${Ze.chartArcsBackground}`).data(t.data.targets),c.enter().append("path").attr("class",(f,d)=>`${Ze.chartArcsBackground} ${Ze.chartArcsBackground}-${d}`).merge(c).style("fill",e.gauge_background||null).attr("d",({id:f})=>{if(s||n.hiddenTargetIds.has(f))return"M 0 0";const d={data:[{value:e.gauge_max}],startAngle:o,endAngle:l,index:u++};return t.getArc(d,!0,!0)}),c.exit().remove()}else c.attr("d",s?"M 0 0":()=>{const u={data:[{value:e.gauge_max}],startAngle:o,endAngle:l};return t.getArc(u,!0,!0)})},bindArcEvent(t){const e=this,{config:n,state:r}=e,i=r.inputType==="touch",s=r.inputType==="mouse",o=u=>{const f=e.updateAngle(u);return f?e.convertToArcData(f):null};function l(u,f,d){e.expandArc(d),e.api.focus(d),e.toggleFocusLegend(d,!0),e.showTooltip([f],u)}function c(u){const f=(u==null?void 0:u.id)||void 0;e.unexpandArc(f),e.api.revert(),e.revertLegend(),e.hideTooltip()}if(t.on("click",function(u,f,d){var h;const m=o(f);m&&((h=e.toggleShape)==null||h.call(e,this,m,d),n.data_onclick.bind(e.api)(m,this))}),s&&t.on("mouseover",function(u,f){if(r.transiting)return;r.event=u;const d=o(f),h=(d==null?void 0:d.id)||void 0;l(this,d,h),e.setOverOut(!0,d)}).on("mouseout",(u,f)=>{if(r.transiting||!n.interaction_onout)return;r.event=u;const d=o(f);c(),e.setOverOut(!1,d)}).on("mousemove",function(u,f){const d=o(f);r.event=u,e.showTooltip([d],this)}),i&&e.hasArcType()&&!e.radars){const u=f=>{var d,h;const{clientX:m,clientY:S}=(h=(d=f.changedTouches)==null?void 0:d[0])!=null?h:{clientX:0,clientY:0};return Yt(Ye.elementFromPoint(m,S))};e.$el.svg.on("touchstart touchmove",function(f){if(r.transiting)return;r.event=f;const h=u(f).datum(),m=h!=null&&h.data&&h.data.id?e.updateAngle(h):null,S=m?e.convertToArcData(m):null,E=(S==null?void 0:S.id)||void 0;e.callOverOutForTouch(S),mn(E)?c():l(this,S,E)},{passive:!0})}},redrawArcText(t){const e=this,{config:n,state:r,$el:{main:i,arcs:s}}=e,o=e.hasType("gauge"),l=e.hasMultiArcGauge();let c;if(o&&e.data.targets.length===1&&n.gauge_title||(c=i.selectAll(`.${Ze.chartArc}`).select("text").style("opacity","0").attr("class",u=>e.isGaugeType(u.data)?ar.gaugeValue:null).call(e.textForArcLabel.bind(e)).style("font-size",u=>e.isGaugeType(u.data)&&e.data.targets.length===1&&!l?`${Math.round(r.radius/5)}px`:null),Iv.call(e),c.attr("transform",function(u){return e.transformForArcLabel.bind(e)(this,u)}).transition().duration(t).style("opacity",u=>e.isTargetToShow(u.data.id)&&e.isArcType(u.data)?null:"0"),l&&c.attr("dy","-.1em")),i.select(`.${Ze.chartArcsTitle}`).style("opacity",e.hasType("donut")||o?null:"0"),o){const u=n.gauge_fullCircle;u&&(c==null||c.attr("dy",`${l?0:Math.round(r.radius/14)}`)),n.gauge_label_show&&(s.select(`.${ar.chartArcsGaugeUnit}`).attr("dy",`${u?1.5:.75}em`).text(n.gauge_units),s.select(`.${ar.chartArcsGaugeMin}`).attr("dx",`${-1*(r.innerRadius+(r.radius-r.innerRadius)/(u?1:2))}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_min,!1)),!u&&s.select(`.${ar.chartArcsGaugeMax}`).attr("dx",`${r.innerRadius+(r.radius-r.innerRadius)/2}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_max,!0)))}wp.call(e)&&AI.call(e,t)},getArcElementByIdOrIndex(t){const e=this,{$el:{arcs:n}}=e,r=ae(t)?i=>i.index===t:i=>i.data.id===t;return n==null?void 0:n.selectAll(`.${ze.target} path`).filter(r)}};function Si(t,e){xn(br.prototype,[NI,Ti].concat(t||[])),$a.setOptions([ka].concat(e||[]))}let Lp=()=>(Si(void 0,[sl,uI]),(Lp=()=>qt.DONUT)());var $I=Object.defineProperty,Dp=Object.getOwnPropertySymbols,BI=Object.prototype.hasOwnProperty,zI=Object.prototype.propertyIsEnumerable,Fp=(t,e,n)=>e in t?$I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,UI=(t,e)=>{for(var n in e||(e={}))BI.call(e,n)&&Fp(t,n,e[n]);if(Dp)for(var n of Dp(e))zI.call(e,n)&&Fp(t,n,e[n]);return t};function Ai(t=!1){const e=this,{config:n,state:{current:{width:r,height:i}}}=e,s=e.getCurrentPadding(),o=UI({width:r-s.left-s.right,height:i-(n.legend_show?e.getLegendHeight()+10:0)-s.top-s.bottom},s);if(t){const l=Pu.call(e,o),c=n.funnel_rotated;o.width=Math.max(o.width,c?l.height:l.width),o.height=Math.max(o.height,c?l.width:l.height)}return o}function Pu(t){const e=this,{config:n}=e,r=n.funnel_rotated,[i,s]=[n.funnel_neck_width,n.funnel_neck_height].map((o,l)=>He(o)?t[r!==!l?"width":"height"]*o.ratio:o);return{width:i,height:s}}function kI(t){const e=this,n=e.config.funnel_rotated,{width:r,height:i}=Ai.call(e,!0),s=[];return t.forEach((o,l)=>{const{ratio:c=0}=o,u=l>0?s[l-1][2][n?0:1]:0,f=c+u;s.push(o.coords=n?[[u,0],[f,0],[f,i],[u,i],[u,0]]:[[0,u],[r,u],[r,f],[0,f],[0,u]])}),s}function GI(){const t=this,e=t.config.funnel_rotated,{width:n,height:r}=Ai.call(t,!0),i=Pu.call(t,{width:n,height:r});let s;if(e){const o=(r-i.width)/2,l=n-i.height;s=[[l,o],[n,o],[n,r-o],[l,r-o],[0,r]]}else{const o=(n-i.width)/2,l=r-i.height;s=[[n,0],[n-o,l],[n-o,r],[o,r],[o,l]]}return`M${[[0,0],...s,[0,0]].join("L")}z`}function XI(t){const e=this,{config:n}=e,r=t.map(i=>({id:i.id,value:i.values.reduce((s,o)=>s+o.value,0)}));return n.data_order&&r.sort(e.getSortCompareFn.bind(e)(!0)),Np.call(e,r)}function Np(t){const e=this,{width:n,height:r}=Ai.call(e),i=e.getTotalDataSum(!0),s=e.config.funnel_rotated?n:r;return t.forEach(o=>{o.ratio=o.value/i*s}),t}function WI(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2}function $p(t,e,n,r,i){const s=[];for(let l=0;l<=20;l++){const c=l/20,u=t+(e-t)*c,f=n+(r-n)*WI(c);s.push(i?[u,f]:[f,u])}return s}function VI(){var t;const e=this,n=e.config.funnel_rotated,{width:r,height:i}=Ai.call(e,!0),s=Pu.call(e,{width:r,height:i}),o=fc().x(m=>m[0]).y(m=>m[1]).curve(ho),l=(n?i-s.width:r-s.width)/2,c=n?r-s.height:i-s.height,u=$p(0,c,n?0:r,n?l:r-l,n),f=[];if(s.height>0&&(u.push(n?[r,l]:[r-l,i]),f.push(n?[r,i-l]:[l,i])),f.push(...$p(c,0,n?i-l:l,n?i:0,n)),u.length>1){const[m,S]=n?[1,0]:[0,1];u.splice(1,0,[u[m][0],u[S][1]]);const E=f.length-1;E>0&&f.splice(E,0,[f[E-m][0],f[E-S][1]])}const d=o(u)||"",h=((t=o(f))==null?void 0:t.replace(/^M/,"L"))||"";return n?`${d}${h}z`:`M0,0${d.replace(/^M/,"L")}${h}z`}var jI={initFunnel(){const t=this,{$el:e}=t;e.funnel=e.main.select(`.${ze.chart}`).append("g").classed(is.chartFunnels,!0),e.funnel.background=e.funnel.append("path").classed(is.funnelBackground,!0),t.bindFunnelEvent()},bindFunnelEvent(){const t=this,{$el:{funnel:e},config:n,state:r}=t;if(!n.interaction_enabled)return;const i=o=>{var l;const c=o.isTrusted?o.target:(l=r.eventReceiver.rect)==null?void 0:l.node();if(c&&/^path$/i.test(c.tagName))return r.event=o,Yt(c).datum()},s=r.inputType==="touch";e.on(s?"touchstart":"mouseover mousemove",o=>{const l=i(o);l&&(t.showTooltip([l],o.target),/^(touchstart|mouseover)$/.test(o.type)&&t.setOverOut(!0,l))},s?{passive:!0}:void 0).on(s?"touchend":"mouseout",o=>{const l=i(o);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))})},updateTargetsForFunnel(t){const e=this,{$el:{funnel:n}}=e;n||e.initFunnel();const r=e.getChartClass("Funnel"),i=e.getClass("funnel",!0),s=XI.call(e,t.filter(e.isFunnelType.bind(e))),o=e.filterNullish(s),l=n.selectAll(`.${is.chartFunnel}`).data(o);l.exit().remove();const c=l.enter().insert("g",`.${is.funnelBackground}`);c.append("path"),n.path=c.merge(l).attr("class",r).select("path").attr("class",i).style("opacity","0").style("fill",e.color)},updateFunnel(t){const e=this,{$el:{funnel:n}}=e,r=t.map(({id:i})=>i);n.path=n.path.filter(i=>r.includes(i.id))},generateGetFunnelPoints(){const t=this,{config:e,$el:{funnel:n}}=t,r=e.funnel_rotated,i=t.filterTargetsToShow(n.path),{top:s,left:o,width:l,height:c}=Ai.call(t),u={};let f=0;return i.each(d=>{const h=f,{ratio:m}=d;f+=m;const S=r?o:s,E=S+h,C=S+f,w=(E+C)/2,$=r?s+c/2:o+l/2;u[d.id]=r?[[E,$],[C,$],[w,$]]:[[$,E],[$,C],[$,w]]}),d=>u[d.id]},redrawFunnel(){const t=this,{config:e,$T:n,$el:{funnel:r}}=t,i=t.filterTargetsToShow(r.path),s=kI.call(t,Np.call(t,i.data())),{top:o,left:l}=Ai.call(t),c=(e.funnel_spline?VI:GI).call(t);r.attr("transform",`translate(${l}, ${o})`).attr("clip-path",`path('${c}')`),r.background.attr("d",c),n(i).attr("d",(u,f)=>`M${s[f].join("L")}z`).style("opacity","1"),r.selectAll("g").style("opacity",null)}},HI={funnel_neck_width:0,funnel_neck_height:0,funnel_rotated:!1,funnel_spline:!1};let Bp=()=>(Si([jI],[HI]),(Bp=()=>qt.FUNNEL)());var YI={initGauge(){const t=this,{config:e,$el:{arcs:n}}=t,r=(i=null,s="")=>{n.append("text").attr("class",i).style("text-anchor","middle").style("pointer-events","none").text(s)};if(t.hasType("gauge")){const i=t.hasMultiArcGauge();n.append(i?"g":"path").attr("class",Ze.chartArcsBackground).style("fill",!i&&e.gauge_background||null),e.gauge_units&&r(ar.chartArcsGaugeUnit),e.gauge_label_show&&(r(ar.chartArcsGaugeMin),!e.gauge_fullCircle&&r(ar.chartArcsGaugeMax))}},updateGaugeMax(){const t=this,{config:e,state:n}=t,i=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(n.rendered);!e.gauge_enforceMinMax&&i+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=i-e.gauge_min)},redrawArcGaugeLine(){const t=this,{config:e,state:n,$el:r}=t,{hiddenTargetIds:i}=t.state,s=r.main.selectAll(`.${Ze.arcs}`).selectAll(`.${Ze.arcLabelLine}`).data(t.arcData.bind(t));s.enter().append("rect").attr("class",l=>`${Ze.arcLabelLine} ${ze.target} ${ze.target}-${l.data.id}`).merge(s).style("fill",l=>t.levelColor?t.levelColor(l.data.values[0].value):t.color(l.data)).style("display",e.gauge_label_show?null:"none").each(function(l){let c=0;const u=2;let f=0,d=0,h="";if(!i.has(l.data.id)){const m=t.updateAngle(l),S=n.gaugeArcWidth/t.getTargetsToShow().length*(m.index+1),E=m.endAngle-Math.PI/2,C=n.radius-S,w=E-(C===0?0:1/C);c=n.radiusExpanded-n.radius+S,f=Math.cos(w)*C,d=Math.sin(w)*C,h=`rotate(${E*180/Math.PI}, ${f}, ${d})`}Yt(this).attr("x",f).attr("y",d).attr("width",c).attr("height",u).attr("transform",h).style("stroke-dasharray",`0, ${c+u}, 0`)})},textForGaugeMinMax(t,e){const n=this,{config:r}=n,i=r.gauge_label_extents;return ie(i)?i.bind(n.api)(t,e):t},getGaugeLabelHeight(){const{config:t}=this;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge(){return this.getGaugeLabelHeight()*2}},KI={gauge_background:"",gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_extents:void 0,gauge_label_format:void 0,gauge_label_ratio:void 0,gauge_label_threshold:0,gauge_label_line:!1,gauge_label_image:void 0,gauge_enforceMinMax:!1,gauge_min:0,gauge_max:100,gauge_type:"single",gauge_startingAngle:-1*Math.PI/2,gauge_arcLength:100,gauge_title:"",gauge_units:void 0,gauge_width:void 0,gauge_arcs_minWidth:5,gauge_expand:{},gauge_expand_rate:.98,gauge_expand_duration:50};let zp=()=>(Si([YI],[sl,KI]),(zp=()=>qt.GAUGE)()),Up=()=>(ea(),(Up=()=>qt.LINE)()),kp=()=>(ea(void 0,[xu]),(kp=()=>qt.SPLINE)()),Gp=()=>(ea(),(Gp=()=>qt.STEP)());var ZI={pie_label_show:!0,pie_label_format:void 0,pie_label_ratio:void 0,pie_label_threshold:.05,pie_label_line:!1,pie_label_image:void 0,pie_expand:{},pie_expand_rate:.98,pie_expand_duration:50,pie_innerRadius:0,pie_outerRadius:void 0,pie_padAngle:0,pie_padding:0,pie_startingAngle:0};let Xp=()=>(Si(void 0,[sl,ZI]),(Xp=()=>qt.PIE)());function Wp(t){const e=t.config.polar_level_max;let n=t.getMinMaxData().max[0].value;return e&&e>n&&(n=e),n}var JI={initPolar(){const t=this,{$el:{arcs:e},config:n}=t,r=n.polar_level_text_show,i=n.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",Jr.levels),r&&i&&t.generateTextBGColorFilter(i)},getPolarOuterRadius(t,e){var n;const r=Wp(this);return((n=t==null?void 0:t.data.values[0].value)!=null?n:0)/r*e},updateTargetsForPolar(t){this.updateTargetsForArc(t)},redrawPolar(){const t=this,{config:e}=t;e.polar_level_show&&t.updatePolarLevel()},updatePolarLevel(){const t=this,{config:e,state:n,$el:{arcs:{levels:r}}}=t,i=e.polar_level_depth,s=Wp(t),o=no(0,i),l=n.radius,c=o.map(h=>l*((h+1)/i)),u=(e.polar_level_text_format||function(){}).bind(t.api),f=r.selectAll(`.${Jr.level}`).data(o);f.exit().remove();const d=f.enter().append("g").attr("class",(h,m)=>`${Jr.level} ${Jr.level}-${m}`);if(d.append("circle"),d.merge(f).selectAll("circle").style("visibility",e.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",h=>c[h]),e.polar_level_text_show){const h=e.polar_level_text_backgroundColor,m=`#${n.datetimeId}-labels-bg${t.getTargetSelectorSuffix(h)}`;d.append("text").style("text-anchor","middle"),d.merge(f).selectAll("text").attr("dy",S=>-c[S]+5).attr("filter",h?`url(${m})`:null).text(S=>u(s/o.length*(S+1)))}}},QI={polar_label_show:!0,polar_label_format:void 0,polar_label_threshold:.05,polar_label_line:!1,polar_label_image:void 0,polar_label_ratio:void 0,polar_level_depth:3,polar_level_max:void 0,polar_level_show:!0,polar_level_text_backgroundColor:"#fff",polar_level_text_format:t=>t%1===0?t:t.toFixed(2),polar_level_text_show:!0,polar_padAngle:0,polar_padding:0,polar_startingAngle:0};let Vp=()=>(Si([JI],[sl,QI]),(Vp=()=>qt.POLAR)());function _I(t,e,n,r,i,s){const o=t&&r>0?n-r:r,l=2*Math.PI;return i*(1-s*(e==="x"?Math.sin:Math.cos)(o*l/n))}const Ei=Oe.radarPoints,jp=Oe.radarTextWidth;var qI={initRadar(){const t=this,{config:e,state:{current:n},$el:r}=t;t.hasType("radar")&&(r.radar=r.main.select(`.${ze.chart}`).append("g").attr("class",yh.chartRadars),r.radar.levels=r.radar.append("g").attr("class",Jr.levels),r.radar.axes=r.radar.append("g").attr("class",Rn.axis),r.radar.shapes=r.radar.append("g").attr("class",Tn.shapes),n.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value,e.radar_axis_text_show&&(e.interaction_enabled&&t.bindRadarEvent(),t.updateRadarLevel(),t.updateRadarAxes()))},getRadarSize(){const t=this,{config:e,state:{arcWidth:n,arcHeight:r}}=t,i=e.axis_x_categories.length<4?-20:10,s=(Math.min(n,r)-i)/2;return[s,s]},updateTargetsForRadar(t){const e=this,{config:n}=e;lr(n.axis_x_categories)&&(n.axis_x_categories=no(0,pr("max",t.map(r=>r.values.length)))),e.generateRadarPoints()},getRadarPosition(t,e,n,r){const i=this,{config:s}=i,[o,l]=i.getRadarSize(),c=s.axis_x_categories.length,u=s.radar_direction_clockwise,f=Oa(t).map(d=>_I(u,d,c,e,sn(n)?n:t==="x"?o:l,ae(r)?r:s.radar_size_ratio));return f.length===1?f[0]:f},generateRadarPoints(){const t=this,e=t.data.targets,[n,r]=t.getRadarSize(),i=t.cache.get(Ei)||{},s=i._size;(!s||s.width!==n&&s.height!==r)&&(e.forEach(o=>{i[o.id]=o.values.map((l,c)=>t.getRadarPosition(["x","y"],c,void 0,t.getRatio("radar",l)))}),i._size={width:n,height:r},t.cache.add(Ei,i))},redrawRadar(){const t=this,{radar:e,main:n}=t.$el,r=t.getTranslate("radar");r&&(e.attr("transform",r),n.select(`.${En.chartTexts}`).attr("transform",r),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints(){const t=this.cache.get(Ei);return(e,n)=>{const r=t[e.id][n];return[r,r,r,r]}},updateRadarLevel(){const t=this,{config:e,state:n,$el:{radar:r}}=t,[i,s]=t.getRadarSize(),o=e.radar_level_depth,l=e.axis_x_categories.length,c=e.radar_level_text_show,u=r.levels,f=no(0,o),d=e.radar_size_ratio*Math.min(i,s),h=f.map(w=>d*((w+1)/o)),m=(e.radar_level_text_format||function(){}).bind(t.api),S=f.map(w=>{const $=h[w];return no(0,l).map(B=>t.getRadarPosition(["x","y"],B,$,1).join(",")).join(" ")}),E=u.selectAll(`.${Jr.level}`).data(f);E.exit().remove();const C=E.enter().append("g").attr("class",(w,$)=>`${Jr.level} ${Jr.level}-${$}`);C.append("polygon").style("visibility",e.radar_level_show?null:"hidden"),c&&(u.select("text").empty()&&u.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(()=>m(0)),C.append("text").attr("dx","-.5em").style("text-anchor","end").text(w=>m(n.current.dataMax/f.length*(w+1)))),C.merge(E).attr("transform",w=>`translate(${i-h[w]}, ${s-h[w]})`).selectAll("polygon").attr("points",w=>S[w]),c&&u.selectAll("text").attr("x",w=>mn(w)?i:S[w].split(",")[0]).attr("y",w=>mn(w)?s:0)},updateRadarAxes(){const t=this,{config:e,$el:{radar:n}}=t,[r,i]=t.getRadarSize(),s=e.axis_x_categories;let o=n.axes.selectAll("g").data(s);o.exit().remove();const l=o.enter().append("g").attr("class",(c,u)=>`${Rn.axis}-${u}`);if(e.radar_axis_line_show&&l.append("line"),e.radar_axis_text_show&&l.append("text"),o=l.merge(o),e.radar_axis_line_show&&o.select("line").attr("x1",r).attr("y1",i).attr("x2",(c,u)=>t.getRadarPosition("x",u)).attr("y2",(c,u)=>t.getRadarPosition("y",u)),e.radar_axis_text_show){const{x:c=0,y:u=0}=e.radar_axis_text_position,f=t.cache.get(jp)||0;if(o.select("text").style("text-anchor","middle").attr("dy",".5em").call(d=>{d.each(function(h){ci(Yt(this),String(h),[-.6,1.2])})}).datum((d,h)=>({index:h})).attr("transform",function(d){mn(this.width)&&(this.width=ln(this,!0).width/2);let h=t.getRadarPosition("x",d.index,void 0,1),m=Math.round(t.getRadarPosition("y",d.index,void 0,1));return h>r?h+=this.width+c:Math.round(h)<r&&(h-=this.width+c),m>i?(m/2===i&&this.firstChild.tagName==="tspan"&&this.firstChild.setAttribute("dy","0em"),m+=u):m<i&&(m-=u),`translate(${h} ${m})`}),!f){const d=[n.axes,n.levels].map(h=>wh(h.node()).width);d.every(h=>h>0)&&t.cache.add(jp,d[0]-d[1])}}},bindRadarEvent(){const t=this,{config:e,state:n,$el:{radar:r,svg:i}}=t,s=t.isPointFocusOnly(),{inputType:o,transiting:l}=n,c=o==="mouse",u=f=>{if(n.event=f,!e.interaction_onout)return;const d=t.getDataIndexFromEvent(f),h=mn(d);(c||h)&&(t.hideTooltip(),s?t.hideCircleFocus():t.unexpandCircles(),c?t.setOverOut(!1,d):h&&t.callOverOutForTouch())};r.axes.on(c?"mouseover ":"touchstart",f=>{if(l)return;n.event=f;const d=t.getDataIndexFromEvent(f);t.selectRectForSingle(i.node(),d),c?t.setOverOut(!0,d):t.callOverOutForTouch(d)},c?void 0:{passive:!0}).on("mouseout",c?u:null),c||i.on("touchstart",u,{passive:!0})},updateRadarShape(){const t=this,e=t.data.targets.filter(s=>t.isRadarType(s)),n=t.cache.get(Ei),r=t.$el.radar.shapes.selectAll("polygon").data(t.filterNullish(e)),i=r.enter().append("g").attr("class",t.getChartClass("Radar"));t.$T(r.exit()).remove(),i.append("polygon").merge(r).style("fill",t.color).style("stroke",t.color).attr("points",s=>n[s.id].join(" ")),t.updateTargetForCircle(e,i)},radarCircleX(t){return this.cache.get(Ei)[t.id][t.index][0]},radarCircleY(t){return this.cache.get(Ei)[t.id][t.index][1]}},tR={radar_axis_max:void 0,radar_axis_line_show:!0,radar_axis_text_show:!0,radar_axis_text_position:{},radar_level_depth:3,radar_level_show:!0,radar_level_text_format:t=>t%1===0?t:t.toFixed(2),radar_level_text_show:!0,radar_size_ratio:.87,radar_direction_clockwise:!1};let Hp=()=>(Si([op.eventrect,tl,qI],[ka,tR,{axis_x_categories:lp.optAxis.axis_x_categories}]),(Hp=()=>qt.RADAR)());var eR={scatter_zerobased:!1};let Yp=()=>(Ts([Ti,tl],[ka,eR]),(Yp=()=>qt.SCATTER)());function nR(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function ll(t,e,n,r,i){for(var s=t.children,o,l=-1,c=s.length,u=t.value&&(r-e)/t.value;++l<c;)o=s[l],o.y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*u}function cl(t,e,n,r,i){for(var s=t.children,o,l=-1,c=s.length,u=t.value&&(i-n)/t.value;++l<c;)o=s[l],o.x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*u}var Kp=(1+Math.sqrt(5))/2;function Zp(t,e,n,r,i,s){for(var o=[],l=e.children,c,u,f=0,d=0,h=l.length,m,S,E=e.value,C,w,$,z,B,W,H;f<h;){m=i-n,S=s-r;do C=l[d++].value;while(!C&&d<h);for(w=$=C,W=Math.max(S/m,m/S)/(E*t),H=C*C*W,B=Math.max($/H,H/w);d<h;++d){if(C+=u=l[d].value,u<w&&(w=u),u>$&&($=u),H=C*C*W,z=Math.max($/H,H/w),z>B){C-=u;break}B=z}o.push(c={value:C,dice:m<S,children:l.slice(f,d)}),c.dice?ll(c,n,r,i,E?r+=S*C/E:s):cl(c,n,r,E?n+=m*C/E:i,s),E-=C,f=d}return o}var Jp=(function t(e){function n(r,i,s,o,l){Zp(e,r,i,s,o,l)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(Kp);function Dw(t){return t==null?null:Qp(t)}function Qp(t){if(typeof t!="function")throw new Error;return t}function bs(){return 0}function Ss(t){return function(){return t}}function rR(){var t=Jp,e=!1,n=1,r=1,i=[0],s=bs,o=bs,l=bs,c=bs,u=bs;function f(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],e&&h.eachBefore(nR),h}function d(h){var m=i[h.depth],S=h.x0+m,E=h.y0+m,C=h.x1-m,w=h.y1-m;C<S&&(S=C=(S+C)/2),w<E&&(E=w=(E+w)/2),h.x0=S,h.y0=E,h.x1=C,h.y1=w,h.children&&(m=i[h.depth+1]=s(h)/2,S+=u(h)-m,E+=o(h)-m,C-=l(h)-m,w-=c(h)-m,C<S&&(S=C=(S+C)/2),w<E&&(E=w=(E+w)/2),t(h,S,E,C,w))}return f.round=function(h){return arguments.length?(e=!!h,f):e},f.size=function(h){return arguments.length?(n=+h[0],r=+h[1],f):[n,r]},f.tile=function(h){return arguments.length?(t=Qp(h),f):t},f.padding=function(h){return arguments.length?f.paddingInner(h).paddingOuter(h):f.paddingInner()},f.paddingInner=function(h){return arguments.length?(s=typeof h=="function"?h:Ss(+h),f):s},f.paddingOuter=function(h){return arguments.length?f.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):f.paddingTop()},f.paddingTop=function(h){return arguments.length?(o=typeof h=="function"?h:Ss(+h),f):o},f.paddingRight=function(h){return arguments.length?(l=typeof h=="function"?h:Ss(+h),f):l},f.paddingBottom=function(h){return arguments.length?(c=typeof h=="function"?h:Ss(+h),f):c},f.paddingLeft=function(h){return arguments.length?(u=typeof h=="function"?h:Ss(+h),f):u},f}function _p(t,e,n,r,i){var s=t.children,o,l=s.length,c,u=new Array(l+1);for(u[0]=c=o=0;o<l;++o)u[o+1]=c+=s[o].value;f(0,l,t.value,e,n,r,i);function f(d,h,m,S,E,C,w){if(d>=h-1){var $=s[d];$.x0=S,$.y0=E,$.x1=C,$.y1=w;return}for(var z=u[d],B=m/2+z,W=d+1,H=h-1;W<H;){var _=W+H>>>1;u[_]<B?W=_+1:H=_}B-u[W-1]<u[W]-B&&d+1<W&&--W;var q=u[W]-z,st=m-q;if(C-S>w-E){var it=m?(S*st+C*q)/m:C;f(d,W,q,S,E,it,w),f(W,h,st,it,E,C,w)}else{var ot=m?(E*st+w*q)/m:w;f(d,W,q,S,E,C,ot),f(W,h,st,S,ot,C,w)}}}function aR(t,e,n,r,i){(t.depth&1?cl:ll)(t,e,n,r,i)}var iR=(function t(e){function n(r,i,s,o,l){if((c=r._squarify)&&c.ratio===e)for(var c,u,f,d,h=-1,m,S=c.length,E=r.value;++h<S;){for(u=c[h],f=u.children,d=u.value=0,m=f.length;d<m;++d)u.value+=f[d].value;u.dice?ll(u,i,s,o,E?s+=(l-s)*u.value/E:l):cl(u,i,s,E?i+=(o-i)*u.value/E:o,l),E-=u.value}else r._squarify=c=Zp(e,r,i,s,o,l),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(Kp);function sR(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function oR(){return this.eachAfter(sR)}function lR(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function cR(t,e){for(var n=this,r=[n],i,s,o=-1;n=r.pop();)if(t.call(e,n,++o,this),i=n.children)for(s=i.length-1;s>=0;--s)r.push(i[s]);return this}function uR(t,e){for(var n=this,r=[n],i=[],s,o,l,c=-1;n=r.pop();)if(i.push(n),s=n.children)for(o=0,l=s.length;o<l;++o)r.push(s[o]);for(;n=i.pop();)t.call(e,n,++c,this);return this}function fR(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function dR(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function hR(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function vR(t){for(var e=this,n=gR(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function gR(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function pR(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function mR(){return Array.from(this)}function xR(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function yR(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*TR(){var t=this,e,n=[t],r,i,s;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,s=r.length;i<s;++i)n.push(r[i]);while(n.length)}function Mu(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=AR)):e===void 0&&(e=SR);for(var n=new ul(t),r,i=[n],s,o,l,c;r=i.pop();)if((o=e(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,l=c-1;l>=0;--l)i.push(s=o[l]=new ul(o[l])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(CR)}function bR(){return Mu(this).eachBefore(ER)}function SR(t){return t.children}function AR(t){return Array.isArray(t)?t[1]:null}function ER(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function CR(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function ul(t){this.data=t,this.depth=this.height=0,this.parent=null}ul.prototype=Mu.prototype={constructor:ul,count:oR,each:lR,eachAfter:uR,eachBefore:cR,find:fR,sum:dR,sort:hR,path:vR,ancestors:pR,descendants:mR,leaves:xR,links:yR,copy:bR,[Symbol.iterator]:TR};function IR(t){const e=this;return t.map(n=>{const{id:r,values:i}=n,{value:s}=i[0];return{name:r,id:r,value:s,ratio:e.getRatio("treemap",i[0])}})}var RR={initTreemapLayout(){this.treemap=rR().tile(this.getTreemapTile())},getTreemapTile(){var t,e;const n=this,{config:r,state:{current:{width:i,height:s}}}=n,o=(e={binary:_p,dice:ll,slice:cl,sliceDice:aR,squarify:Jp,resquarify:iR}[(t=r.treemap_tile)!=null?t:"binary"])!=null?e:_p;return(l,c,u,f,d)=>{o(l,0,0,i,s);for(const h of l.children)h.x0=c+h.x0/i*(f-c),h.x1=c+h.x1/i*(f-c),h.y0=u+h.y0/s*(d-u),h.y1=u+h.y1/s*(d-u)}},getTreemapData(t){const e=this;return{name:"root",children:IR.bind(e)(e.filterTargetsToShow(t.filter(e.isTreemapType,e)))}},getTreemapRoot(t){const e=this,n=e.getTreemapData(t!=null?t:e.data.targets),r=Mu(n).sum(s=>s.value),i=e.getSortCompareFn(!0);return e.treemap||e.initTreemapLayout(),e.treemap(i?r.sort(i):r)}},wR=Object.defineProperty,OR=Object.defineProperties,PR=Object.getOwnPropertyDescriptors,qp=Object.getOwnPropertySymbols,MR=Object.prototype.hasOwnProperty,LR=Object.prototype.propertyIsEnumerable,tm=(t,e,n)=>e in t?wR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,DR=(t,e)=>{for(var n in e||(e={}))MR.call(e,n)&&tm(t,n,e[n]);if(qp)for(var n of qp(e))LR.call(e,n)&&tm(t,n,e[n]);return t},FR=(t,e)=>OR(t,PR(e));function NR(t,e){const n=this;t.selectAll("g").attr("transform",r=>{const i=ai(n,r,e);return`translate(${i.x},${i.y})`}).select("rect").attr("width",r=>ai(n,r,e).w).attr("height",r=>ai(n,r,e).h)}var $R=FR(DR({},RR),{initTreemap(){const t=this,{$el:e,state:{current:{width:n,height:r},clip:i,datetimeId:s}}=t;i.id=`${s}-clip`,t.initTreemapLayout(),e.defs.append("clipPath").attr("id",i.id).append("rect").attr("width",n).attr("height",r),e.treemap=e.main.select(`.${ze.chart}`).attr("clip-path",`url(#${i.id})`).append("g").classed(bh.chartTreemaps,!0),t.bindTreemapEvent()},bindTreemapEvent(){const t=this,{$el:e,config:n,state:r}=t,i=s=>{var o;const l=s.isTrusted?s.target:(o=r.eventReceiver.rect)==null?void 0:o.node();let c;return l&&/^rect$/i.test(l.tagName)&&(r.event=s,c=Yt(l).datum()),c==null?void 0:c.data};if(n.interaction_enabled){const s=r.inputType==="touch";e.treemap.on(s?"touchstart":"mouseover mousemove",o=>{const l=i(o);l&&(t.showTooltip([l],o.currentTarget),/^(touchstart|mouseover)$/.test(o.type)&&t.setOverOut(!0,l))},s?{passive:!0}:void 0).on(s?"touchend":"mouseout",o=>{const l=i(o);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))})}},updateTargetsForTreemap(t){const e=this,{$el:{treemap:n}}=e,r=[e.getTreemapRoot(t!=null?t:e.data.targets)];n.data(e.filterNullish(r))},updateTreemap(t){const e=this,{$el:n,$T:r}=e,i=n.treemap.datum(),s=e.getChartClass("Treemap"),o=e.getClass("treemap",!0),l=n.treemap.selectAll("g").data(i.children);r(l.exit(),t).style("opacity","0").remove(),l.enter().append("g").append("rect"),n.treemap.selectAll("g").attr("class",s).select("rect").attr("class",o).attr("fill",c=>e.color(c.data.name))},generateGetTreemapPoints(){const t=this,{$el:e}=t,n={};return e.treemap.selectAll("g").each(r=>{const i=ai(t,r);n[r.data.name]=[[i.x,i.y],[i.x+i.w,i.y+i.h]]}),r=>n[r.id]},redrawTreemap(t){const e=this,{$el:n,state:{current:{width:r,height:i}}}=e;return n.defs.select("rect").attr("width",r).attr("height",i),[e.$T(n.treemap,t,Cr()).call(NR.bind(e),n.treemap.datum())]},treemapDataLabelFormat(t){const e=this,{$el:{treemap:n},config:r,scale:{x:i,y:s}}=e,{id:o,value:l}=t,c=r.treemap_label_format,u=e.getRatio("treemap",t),f=(u*100).toFixed(2),d=r.treemap_label_show&&Qc.call(e,u,"treemap")?null:"0",h=n.selectAll("g").filter(E=>E.data.id===o).datum();let m=0,S=0;if(h){const{x0:E,x1:C,y0:w,y1:$}=h;m=i(C)-i(E),S=s($)-s(w)}return function(E){return E.style("opacity",d),ie(c)?c.bind(e.api)(l,u,o,{width:m,height:S}):`${o}
61
+ ${f}%`}}}),BR={treemap_tile:"binary",treemap_label_format:void 0,treemap_label_threshold:.05,treemap_label_show:!0};let em=()=>(Ts([$R],[BR]),(em=()=>qt.TREEMAP)()),Lu=Object.create(null);const nm={version:"4.1.0",generate(t){const e=Xr(Object.create(null),Lu,t),n=new jn(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults(t){return He(t)&&(Lu=t),Lu},instance:[],plugin:{}};Object.keys(g).forEach(t=>g[t]()),Object.keys(v).forEach(t=>v[t]()),mg(),xg(),Pg(),Zg(),pg(),dg()})],Es={};function ir(T){var P=Es[T];if(P!==void 0)return P.exports;var a=Es[T]={exports:{}};return Du[T].call(a.exports,a,a.exports,ir),a.exports}ir.d=function(T,P){for(var a in P)ir.o(P,a)&&!ir.o(T,a)&&Object.defineProperty(T,a,{enumerable:!0,get:P[a]})},ir.o=function(T,P){return Object.prototype.hasOwnProperty.call(T,P)},ir.r=function(T){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(T,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(T,"__esModule",{value:!0})},ir(0);var Cs=ir(634);return Cs})()});