@vc-shell/framework 1.2.4-beta.3 → 1.2.4-beta.4

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 (473) hide show
  1. package/core/plugins/modularity/loader.ts +121 -57
  2. package/dist/core/composables/index.d.ts +24 -24
  3. package/dist/core/composables/useAppBarMobileButtons/index.d.ts +1 -1
  4. package/dist/core/composables/useAppBarWidget/index.d.ts +1 -1
  5. package/dist/core/composables/useAssets/index.d.ts +1 -1
  6. package/dist/core/composables/useAsync/index.d.ts +1 -1
  7. package/dist/core/composables/useBlade/index.d.ts +2 -2
  8. package/dist/core/composables/useBladeRegistry/index.d.ts +1 -1
  9. package/dist/core/composables/useBreadcrumbs/index.d.ts +1 -1
  10. package/dist/core/composables/useDashboard/index.d.ts +1 -1
  11. package/dist/core/composables/useErrorHandler/index.d.ts +1 -1
  12. package/dist/core/composables/useFunctions/index.d.ts +4 -4
  13. package/dist/core/composables/useGlobalSearch/index.d.ts +1 -1
  14. package/dist/core/composables/useLanguages/index.d.ts +1 -1
  15. package/dist/core/composables/useMenuService/index.d.ts +1 -1
  16. package/dist/core/composables/useNotifications/index.d.ts +1 -1
  17. package/dist/core/composables/useSettingsMenu/index.d.ts +1 -1
  18. package/dist/core/composables/useToolbar/index.d.ts +2 -2
  19. package/dist/core/composables/useUser/index.d.ts +2 -2
  20. package/dist/core/composables/useUserManagement/index.d.ts +2 -2
  21. package/dist/core/composables/useWidgets/index.d.ts +1 -1
  22. package/dist/core/constants/index.d.ts +3 -3
  23. package/dist/core/directives/index.d.ts +2 -2
  24. package/dist/core/plugins/ai-agent/components/index.d.ts +1 -1
  25. package/dist/core/plugins/ai-agent/composables/index.d.ts +3 -3
  26. package/dist/core/plugins/ai-agent/composables/useAiAgent.d.ts +2 -2
  27. package/dist/core/plugins/ai-agent/composables/useAiAgentContext.d.ts +1 -1
  28. package/dist/core/plugins/ai-agent/constants.d.ts +1 -1
  29. package/dist/core/plugins/ai-agent/index.d.ts +9 -9
  30. package/dist/core/plugins/ai-agent/services/ai-agent-service.d.ts +1 -1
  31. package/dist/core/plugins/extension-points/ExtensionPoint.vue.d.ts +1 -1
  32. package/dist/core/plugins/extension-points/defineExtensionPoint.d.ts +1 -1
  33. package/dist/core/plugins/extension-points/index.d.ts +4 -4
  34. package/dist/core/plugins/extension-points/store.d.ts +1 -1
  35. package/dist/core/plugins/extension-points/useExtensionPoint.d.ts +1 -1
  36. package/dist/core/plugins/index.d.ts +7 -7
  37. package/dist/core/plugins/modularity/index.d.ts +2 -2
  38. package/dist/core/plugins/modularity/loader.d.ts +1 -0
  39. package/dist/core/plugins/modularity/loader.d.ts.map +1 -1
  40. package/dist/core/plugins/moment/index.d.ts +1 -1
  41. package/dist/core/plugins/validation/index.d.ts +1 -1
  42. package/dist/core/services/_internal/index.d.ts +3 -3
  43. package/dist/core/services/app-bar-menu-service.d.ts +1 -1
  44. package/dist/core/services/dashboard-service.d.ts +1 -1
  45. package/dist/core/services/index.d.ts +9 -9
  46. package/dist/core/services/menu-service.d.ts +2 -2
  47. package/dist/core/services/settings-menu-service.d.ts +1 -1
  48. package/dist/core/services/toolbar-service.d.ts +2 -2
  49. package/dist/core/services/widget-service.d.ts +2 -2
  50. package/dist/core/types/index.d.ts +3 -3
  51. package/dist/core/utilities/index.d.ts +6 -6
  52. package/dist/framework.js +13076 -12647
  53. package/dist/index.css +1 -1
  54. package/dist/index.d.ts +13 -13
  55. package/dist/injection-keys.d.ts +6 -6
  56. package/dist/locales/de.json +4 -4
  57. package/dist/locales/en.json +5 -5
  58. package/dist/shared/components/app-switcher/components/index.d.ts +1 -1
  59. package/dist/shared/components/app-switcher/components/vc-app-switcher/index.d.ts +1 -1
  60. package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts +1 -1
  61. package/dist/shared/components/app-switcher/composables/index.d.ts +1 -1
  62. package/dist/shared/components/app-switcher/composables/useAppSwitcher/index.d.ts +1 -1
  63. package/dist/shared/components/app-switcher/index.d.ts +2 -2
  64. package/dist/shared/components/blade-navigation/components/index.d.ts +2 -2
  65. package/dist/shared/components/blade-navigation/components/vc-blade-navigation/_internal/vc-mobile-back-button.vue.d.ts +1 -1
  66. package/dist/shared/components/blade-navigation/components/vc-blade-navigation/index.d.ts +2 -2
  67. package/dist/shared/components/blade-navigation/components/vc-blade-slot/index.d.ts +1 -1
  68. package/dist/shared/components/blade-navigation/components/vc-blade-slot/vc-blade-slot.vue.d.ts +2 -2
  69. package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts +3 -3
  70. package/dist/shared/components/blade-navigation/composables/index.d.ts +5 -5
  71. package/dist/shared/components/blade-navigation/composables/useBladeMessaging.d.ts +1 -1
  72. package/dist/shared/components/blade-navigation/composables/useBladeNavigationAdapter.d.ts +1 -1
  73. package/dist/shared/components/blade-navigation/composables/useBladeStack.d.ts +2 -2
  74. package/dist/shared/components/blade-navigation/index.d.ts +4 -4
  75. package/dist/shared/components/blade-navigation/plugin-v2.d.ts +4 -4
  76. package/dist/shared/components/blade-navigation/types/index.d.ts +4 -4
  77. package/dist/shared/components/blade-navigation/utils/restoreFromUrl.d.ts +2 -2
  78. package/dist/shared/components/blade-navigation/utils/urlSync.d.ts +1 -1
  79. package/dist/shared/components/change-password/index.d.ts +1 -1
  80. package/dist/shared/components/change-password-button/index.d.ts +1 -1
  81. package/dist/shared/components/dashboard-charts/ChartContainer.vue.d.ts +16 -0
  82. package/dist/shared/components/dashboard-charts/ChartContainer.vue.d.ts.map +1 -0
  83. package/dist/shared/components/dashboard-charts/ChartLegend.vue.d.ts +7 -0
  84. package/dist/shared/components/dashboard-charts/ChartLegend.vue.d.ts.map +1 -0
  85. package/dist/shared/components/dashboard-charts/ChartTooltip.vue.d.ts +12 -0
  86. package/dist/shared/components/dashboard-charts/ChartTooltip.vue.d.ts.map +1 -0
  87. package/dist/shared/components/dashboard-charts/DashboardBarChart.vue.d.ts +34 -0
  88. package/dist/shared/components/dashboard-charts/DashboardBarChart.vue.d.ts.map +1 -0
  89. package/dist/shared/components/dashboard-charts/DashboardDonutChart.vue.d.ts +28 -0
  90. package/dist/shared/components/dashboard-charts/DashboardDonutChart.vue.d.ts.map +1 -0
  91. package/dist/shared/components/dashboard-charts/DashboardLineChart.vue.d.ts +34 -0
  92. package/dist/shared/components/dashboard-charts/DashboardLineChart.vue.d.ts.map +1 -0
  93. package/dist/shared/components/dashboard-charts/chart-utils.d.ts +29 -0
  94. package/dist/shared/components/dashboard-charts/chart-utils.d.ts.map +1 -0
  95. package/dist/shared/components/dashboard-charts/index.d.ts +8 -0
  96. package/dist/shared/components/dashboard-charts/index.d.ts.map +1 -0
  97. package/dist/shared/components/dashboard-charts/types.d.ts +7 -0
  98. package/dist/shared/components/dashboard-charts/types.d.ts.map +1 -0
  99. package/dist/shared/components/dashboard-widget-card/index.d.ts +4 -4
  100. package/dist/shared/components/draggable-dashboard/composables/useGridstack.d.ts +1 -1
  101. package/dist/shared/components/draggable-dashboard/composables/useGridstackAdapter.d.ts +1 -1
  102. package/dist/shared/components/draggable-dashboard/index.d.ts +5 -5
  103. package/dist/shared/components/error-interceptor/index.d.ts +2 -2
  104. package/dist/shared/components/index.d.ts +19 -18
  105. package/dist/shared/components/index.d.ts.map +1 -1
  106. package/dist/shared/components/language-selector/index.d.ts +1 -1
  107. package/dist/shared/components/logout-button/index.d.ts +1 -1
  108. package/dist/shared/components/multilanguage-selector/index.d.ts +1 -1
  109. package/dist/shared/components/notification-dropdown/_internal/notification/index.d.ts +1 -1
  110. package/dist/shared/components/notification-dropdown/_internal/notification/notification.vue.d.ts +2 -2
  111. package/dist/shared/components/notification-dropdown/index.d.ts +1 -1
  112. package/dist/shared/components/notification-template/index.d.ts +1 -1
  113. package/dist/shared/components/notification-template/notification-template.vue.d.ts +1 -1
  114. package/dist/shared/components/notifications/components/index.d.ts +1 -1
  115. package/dist/shared/components/notifications/components/notification-container/index.d.ts +1 -1
  116. package/dist/shared/components/notifications/composables/index.d.ts +2 -2
  117. package/dist/shared/components/notifications/composables/useContainer/index.d.ts +1 -1
  118. package/dist/shared/components/notifications/composables/useInstance/index.d.ts +1 -1
  119. package/dist/shared/components/notifications/core/index.d.ts +1 -1
  120. package/dist/shared/components/notifications/core/notification.d.ts +2 -2
  121. package/dist/shared/components/notifications/index.d.ts +4 -4
  122. package/dist/shared/components/popup-handler/components/index.d.ts +1 -1
  123. package/dist/shared/components/popup-handler/components/vc-popup-container/index.d.ts +1 -1
  124. package/dist/shared/components/popup-handler/composables/index.d.ts +1 -1
  125. package/dist/shared/components/popup-handler/composables/usePopup/index.d.ts +3 -3
  126. package/dist/shared/components/popup-handler/index.d.ts +7 -7
  127. package/dist/shared/components/popup-handler/keys.d.ts +1 -1
  128. package/dist/shared/components/popup-handler/plugin.d.ts +1 -1
  129. package/dist/shared/components/popup-handler/types/index.d.ts +1 -1
  130. package/dist/shared/components/settings-menu/index.d.ts +1 -1
  131. package/dist/shared/components/settings-menu-item/index.d.ts +1 -1
  132. package/dist/shared/components/sidebar/index.d.ts +3 -3
  133. package/dist/shared/components/sign-in/external-providers.vue.d.ts +1 -1
  134. package/dist/shared/components/sign-in/external-providers.vue.d.ts.map +1 -1
  135. package/dist/shared/components/sign-in/index.d.ts +1 -1
  136. package/dist/shared/components/sign-in/useExternalProvider.d.ts +1 -1
  137. package/dist/shared/components/theme-selector/index.d.ts +1 -1
  138. package/dist/shared/components/user-dropdown-button/_internal/user-sidebar.vue.d.ts +1 -1
  139. package/dist/shared/components/user-dropdown-button/index.d.ts +1 -1
  140. package/dist/shared/composables/index.d.ts +5 -5
  141. package/dist/shared/index.d.ts +5 -5
  142. package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts +1 -1
  143. package/dist/shared/modules/assets/components/assets-details/index.d.ts +1 -1
  144. package/dist/shared/modules/assets/components/index.d.ts +1 -1
  145. package/dist/shared/modules/assets/index.d.ts +1 -1
  146. package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +2 -2
  147. package/dist/shared/modules/assets-manager/components/assets-manager/index.d.ts +1 -1
  148. package/dist/shared/modules/assets-manager/components/index.d.ts +1 -1
  149. package/dist/shared/modules/assets-manager/index.d.ts +2 -2
  150. package/dist/shared/modules/dynamic/components/FIELD_MAP.d.ts +1 -1
  151. package/dist/shared/modules/dynamic/components/SchemaRender.d.ts +16 -16
  152. package/dist/shared/modules/dynamic/components/factories.d.ts +1 -1
  153. package/dist/shared/modules/dynamic/components/fields/Button.d.ts +4 -4
  154. package/dist/shared/modules/dynamic/components/fields/Card.d.ts +4 -4
  155. package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts +4 -4
  156. package/dist/shared/modules/dynamic/components/fields/ContentField.d.ts +4 -4
  157. package/dist/shared/modules/dynamic/components/fields/CustomComponent.d.ts +4 -4
  158. package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts +6 -6
  159. package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts +6 -6
  160. package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts +4 -4
  161. package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts +4 -4
  162. package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts +4 -4
  163. package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts +4 -4
  164. package/dist/shared/modules/dynamic/components/fields/InputField.d.ts +2 -2
  165. package/dist/shared/modules/dynamic/components/fields/MultivalueField.d.ts +4 -4
  166. package/dist/shared/modules/dynamic/components/fields/RadioButtonGroup.d.ts +4 -4
  167. package/dist/shared/modules/dynamic/components/fields/RatingField.d.ts +4 -4
  168. package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts +4 -4
  169. package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts +4 -4
  170. package/dist/shared/modules/dynamic/components/fields/SwitchField.d.ts +4 -4
  171. package/dist/shared/modules/dynamic/components/fields/Table.d.ts +4 -4
  172. package/dist/shared/modules/dynamic/components/fields/TextareaField.d.ts +4 -4
  173. package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts +4 -4
  174. package/dist/shared/modules/dynamic/components/fields/props.d.ts +3 -3
  175. package/dist/shared/modules/dynamic/components/index.d.ts +2 -2
  176. package/dist/shared/modules/dynamic/composables/index.d.ts +4 -4
  177. package/dist/shared/modules/dynamic/composables/useDynamicViewsUtils/index.d.ts +1 -1
  178. package/dist/shared/modules/dynamic/composables/useFilterBuilder/index.d.ts +2 -2
  179. package/dist/shared/modules/dynamic/composables/useTableTemplates/index.d.ts +1 -1
  180. package/dist/shared/modules/dynamic/composables/useToolbarReducer/index.d.ts +3 -3
  181. package/dist/shared/modules/dynamic/factories/base/useDetailsFactory.d.ts +1 -1
  182. package/dist/shared/modules/dynamic/factories/base/useListFactory.d.ts +1 -1
  183. package/dist/shared/modules/dynamic/factories/index.d.ts +3 -3
  184. package/dist/shared/modules/dynamic/factories/types/index.d.ts +6 -6
  185. package/dist/shared/modules/dynamic/helpers/methodHandler.d.ts +1 -1
  186. package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts +2 -2
  187. package/dist/shared/modules/dynamic/helpers/override.d.ts +1 -1
  188. package/dist/shared/modules/dynamic/index.d.ts +5 -5
  189. package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +10 -10
  190. package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +15 -15
  191. package/dist/shared/modules/dynamic/pages/index.d.ts +2 -2
  192. package/dist/shared/modules/dynamic/types/index.d.ts +3 -3
  193. package/dist/shared/modules/dynamic/types/models.d.ts +1 -1
  194. package/dist/shared/modules/index.d.ts +3 -3
  195. package/dist/shared/pages/ChangePasswordPage/components/change-password/index.d.ts +1 -1
  196. package/dist/shared/pages/ChangePasswordPage/components/index.d.ts +1 -1
  197. package/dist/shared/pages/ChangePasswordPage/index.d.ts +1 -1
  198. package/dist/shared/pages/ForgotPasswordPage/components/forgot-password/index.d.ts +1 -1
  199. package/dist/shared/pages/ForgotPasswordPage/components/index.d.ts +1 -1
  200. package/dist/shared/pages/ForgotPasswordPage/index.d.ts +1 -1
  201. package/dist/shared/pages/InvitePage/components/index.d.ts +1 -1
  202. package/dist/shared/pages/InvitePage/components/invite/index.d.ts +1 -1
  203. package/dist/shared/pages/InvitePage/index.d.ts +1 -1
  204. package/dist/shared/pages/LoginPage/components/index.d.ts +1 -1
  205. package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts.map +1 -1
  206. package/dist/shared/pages/LoginPage/components/login/index.d.ts +1 -1
  207. package/dist/shared/pages/LoginPage/index.d.ts +1 -1
  208. package/dist/shared/pages/ResetPasswordPage/components/index.d.ts +1 -1
  209. package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts +1 -1
  210. package/dist/shared/pages/ResetPasswordPage/index.d.ts +1 -1
  211. package/dist/shared/pages/index.d.ts +5 -5
  212. package/dist/shared/pages/plugin.d.ts +5 -5
  213. package/dist/shared/utilities/index.d.ts +4 -4
  214. package/dist/tsconfig.tsbuildinfo +1 -1
  215. package/dist/ui/components/atoms/index.d.ts +21 -21
  216. package/dist/ui/components/atoms/vc-badge/index.d.ts +1 -1
  217. package/dist/ui/components/atoms/vc-banner/index.d.ts +1 -1
  218. package/dist/ui/components/atoms/vc-button/index.d.ts +3 -3
  219. package/dist/ui/components/atoms/vc-button/vc-button-group.vue.d.ts +1 -1
  220. package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts +2 -2
  221. package/dist/ui/components/atoms/vc-card/index.d.ts +1 -1
  222. package/dist/ui/components/atoms/vc-col/index.d.ts +1 -1
  223. package/dist/ui/components/atoms/vc-container/index.d.ts +1 -1
  224. package/dist/ui/components/atoms/vc-hint/index.d.ts +1 -1
  225. package/dist/ui/components/atoms/vc-icon/composables/index.d.ts +2 -2
  226. package/dist/ui/components/atoms/vc-icon/composables/use-icon-type.d.ts +1 -1
  227. package/dist/ui/components/atoms/vc-icon/composables/use-icon.d.ts +1 -1
  228. package/dist/ui/components/atoms/vc-icon/icons/index.d.ts +1 -1
  229. package/dist/ui/components/atoms/vc-icon/index.d.ts +3 -3
  230. package/dist/ui/components/atoms/vc-icon/vc-bootstrap-icon.vue.d.ts +1 -1
  231. package/dist/ui/components/atoms/vc-icon/vc-fontawesome-icon.vue.d.ts +1 -1
  232. package/dist/ui/components/atoms/vc-icon/vc-lucide-icon.vue.d.ts +1 -1
  233. package/dist/ui/components/atoms/vc-icon/vc-material-icon.vue.d.ts +1 -1
  234. package/dist/ui/components/atoms/vc-icon/vc-svg-icon.vue.d.ts +1 -1
  235. package/dist/ui/components/atoms/vc-image/index.d.ts +1 -1
  236. package/dist/ui/components/atoms/vc-label/index.d.ts +1 -1
  237. package/dist/ui/components/atoms/vc-link/index.d.ts +1 -1
  238. package/dist/ui/components/atoms/vc-loading/index.d.ts +1 -1
  239. package/dist/ui/components/atoms/vc-progress/index.d.ts +1 -1
  240. package/dist/ui/components/atoms/vc-row/index.d.ts +1 -1
  241. package/dist/ui/components/atoms/vc-scrollable-container/index.d.ts +1 -1
  242. package/dist/ui/components/atoms/vc-skeleton/index.d.ts +1 -1
  243. package/dist/ui/components/atoms/vc-status/index.d.ts +1 -1
  244. package/dist/ui/components/atoms/vc-status-icon/index.d.ts +1 -1
  245. package/dist/ui/components/atoms/vc-tooltip/index.d.ts +1 -1
  246. package/dist/ui/components/atoms/vc-video/index.d.ts +1 -1
  247. package/dist/ui/components/atoms/vc-widget/index.d.ts +1 -1
  248. package/dist/ui/components/index.d.ts +3 -3
  249. package/dist/ui/components/molecules/index.d.ts +27 -27
  250. package/dist/ui/components/molecules/vc-accordion/index.d.ts +4 -4
  251. package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts +1 -1
  252. package/dist/ui/components/molecules/vc-checkbox/index.d.ts +1 -1
  253. package/dist/ui/components/molecules/vc-checkbox/vc-checkbox.vue.d.ts +1 -1
  254. package/dist/ui/components/molecules/vc-checkbox/vc-checkbox.vue.d.ts.map +1 -1
  255. package/dist/ui/components/molecules/vc-checkbox-group/index.d.ts +2 -2
  256. package/dist/ui/components/molecules/vc-color-input/index.d.ts +1 -1
  257. package/dist/ui/components/molecules/vc-color-input/vc-color-input.vue.d.ts +1 -1
  258. package/dist/ui/components/molecules/vc-date-picker/index.d.ts +1 -1
  259. package/dist/ui/components/molecules/vc-date-picker/vc-date-picker.vue.d.ts +1 -1
  260. package/dist/ui/components/molecules/vc-dropdown/index.d.ts +2 -2
  261. package/dist/ui/components/molecules/vc-dropdown/vc-dropdown.vue.d.ts +1 -1
  262. package/dist/ui/components/molecules/vc-dropdown-panel/index.d.ts +1 -1
  263. package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-custom-button.vue.d.ts +1 -1
  264. package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-toolbar.vue.d.ts +1 -1
  265. package/dist/ui/components/molecules/vc-editor/index.d.ts +2 -2
  266. package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts +2 -2
  267. package/dist/ui/components/molecules/vc-field/index.d.ts +1 -1
  268. package/dist/ui/components/molecules/vc-file-upload/index.d.ts +1 -1
  269. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +1 -1
  270. package/dist/ui/components/molecules/vc-form/index.d.ts +1 -1
  271. package/dist/ui/components/molecules/vc-input/index.d.ts +1 -1
  272. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +1 -1
  273. package/dist/ui/components/molecules/vc-input-currency/index.d.ts +1 -1
  274. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts +1 -1
  275. package/dist/ui/components/molecules/vc-input-dropdown/index.d.ts +1 -1
  276. package/dist/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.vue.d.ts +1 -1
  277. package/dist/ui/components/molecules/vc-input-group/index.d.ts +2 -2
  278. package/dist/ui/components/molecules/vc-multivalue/composables/index.d.ts +6 -6
  279. package/dist/ui/components/molecules/vc-multivalue/composables/useMultivalueDropdown.d.ts +1 -1
  280. package/dist/ui/components/molecules/vc-multivalue/composables/useMultivalueInput.d.ts +1 -1
  281. package/dist/ui/components/molecules/vc-multivalue/composables/useMultivalueValues.d.ts +1 -1
  282. package/dist/ui/components/molecules/vc-multivalue/index.d.ts +1 -1
  283. package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts +2 -2
  284. package/dist/ui/components/molecules/vc-pagination/index.d.ts +1 -1
  285. package/dist/ui/components/molecules/vc-paginator/index.d.ts +1 -1
  286. package/dist/ui/components/molecules/vc-radio-button/index.d.ts +1 -1
  287. package/dist/ui/components/molecules/vc-radio-button/vc-radio-button.vue.d.ts +1 -1
  288. package/dist/ui/components/molecules/vc-radio-group/index.d.ts +2 -2
  289. package/dist/ui/components/molecules/vc-rating/index.d.ts +1 -1
  290. package/dist/ui/components/molecules/vc-select/composables/index.d.ts +7 -7
  291. package/dist/ui/components/molecules/vc-select/composables/useSelectDropdown.d.ts +1 -1
  292. package/dist/ui/components/molecules/vc-select/index.d.ts +2 -2
  293. package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +2 -2
  294. package/dist/ui/components/molecules/vc-slider/index.d.ts +1 -1
  295. package/dist/ui/components/molecules/vc-switch/index.d.ts +1 -1
  296. package/dist/ui/components/molecules/vc-switch/vc-switch.vue.d.ts +1 -1
  297. package/dist/ui/components/molecules/vc-textarea/index.d.ts +1 -1
  298. package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts +1 -1
  299. package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts.map +1 -1
  300. package/dist/ui/components/molecules/vc-toast/index.d.ts +1 -1
  301. package/dist/ui/components/molecules/vc-toast/vc-toast.vue.d.ts +1 -1
  302. package/dist/ui/components/organisms/index.d.ts +8 -8
  303. package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/AppHubContent.vue.d.ts +1 -4
  304. package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/AppHubContent.vue.d.ts.map +1 -1
  305. package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/AppHubPopover.vue.d.ts +1 -1
  306. package/dist/ui/components/organisms/vc-app/_internal/app-bar/composables/useAppHub.d.ts +2 -8
  307. package/dist/ui/components/organisms/vc-app/_internal/app-bar/composables/useAppHub.d.ts.map +1 -1
  308. package/dist/ui/components/organisms/vc-app/_internal/layouts/DesktopLayout.vue.d.ts +2 -2
  309. package/dist/ui/components/organisms/vc-app/_internal/layouts/DesktopLayout.vue.d.ts.map +1 -1
  310. package/dist/ui/components/organisms/vc-app/_internal/layouts/MobileLayout.vue.d.ts +2 -2
  311. package/dist/ui/components/organisms/vc-app/_internal/menu/VcAppMenu.vue.d.ts +1 -1
  312. package/dist/ui/components/organisms/vc-app/_internal/menu/VcAppMenuGroup.vue.d.ts +1 -1
  313. package/dist/ui/components/organisms/vc-app/_internal/menu/VcAppMenuItem.vue.d.ts +1 -1
  314. package/dist/ui/components/organisms/vc-app/_internal/menu/composables/useBadge.d.ts +1 -1
  315. package/dist/ui/components/organisms/vc-app/_internal/sidebar/SidebarContent.vue.d.ts +1 -1
  316. package/dist/ui/components/organisms/vc-app/_internal/sidebar/SidebarHeader.vue.d.ts +2 -0
  317. package/dist/ui/components/organisms/vc-app/_internal/sidebar/SidebarHeader.vue.d.ts.map +1 -1
  318. package/dist/ui/components/organisms/vc-app/composables/useShellBootstrap.d.ts +2 -2
  319. package/dist/ui/components/organisms/vc-app/composables/useShellNavigation.d.ts +1 -1
  320. package/dist/ui/components/organisms/vc-app/composition/app-bar/index.d.ts +6 -6
  321. package/dist/ui/components/organisms/vc-app/composition/index.d.ts +6 -6
  322. package/dist/ui/components/organisms/vc-app/composition/layouts/index.d.ts +2 -2
  323. package/dist/ui/components/organisms/vc-app/composition/menu/index.d.ts +5 -5
  324. package/dist/ui/components/organisms/vc-app/composition/shell/index.d.ts +3 -3
  325. package/dist/ui/components/organisms/vc-app/composition/sidebar/index.d.ts +3 -3
  326. package/dist/ui/components/organisms/vc-app/composition/state/index.d.ts +4 -4
  327. package/dist/ui/components/organisms/vc-app/index.d.ts +2 -2
  328. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +3 -3
  329. package/dist/ui/components/organisms/vc-auth-layout/index.d.ts +1 -1
  330. package/dist/ui/components/organisms/vc-blade/_internal/BladeToolbar.vue.d.ts +1 -1
  331. package/dist/ui/components/organisms/vc-blade/_internal/composables/useBladeError.d.ts +1 -1
  332. package/dist/ui/components/organisms/vc-blade/_internal/composables/useToolbarRegistration.d.ts +2 -2
  333. package/dist/ui/components/organisms/vc-blade/_internal/toolbar/ToolbarBaseButton.vue.d.ts +1 -1
  334. package/dist/ui/components/organisms/vc-blade/_internal/toolbar/ToolbarCircleButton.vue.d.ts +1 -1
  335. package/dist/ui/components/organisms/vc-blade/_internal/toolbar/ToolbarDesktop.vue.d.ts +1 -1
  336. package/dist/ui/components/organisms/vc-blade/_internal/toolbar/ToolbarMobile.vue.d.ts +1 -1
  337. package/dist/ui/components/organisms/vc-blade/_internal/widgets/WidgetContainerDesktop.vue.d.ts +1 -1
  338. package/dist/ui/components/organisms/vc-blade/_internal/widgets/WidgetContainerMobile.vue.d.ts +1 -1
  339. package/dist/ui/components/organisms/vc-blade/constants.d.ts +1 -1
  340. package/dist/ui/components/organisms/vc-blade/index.d.ts +1 -1
  341. package/dist/ui/components/organisms/vc-blade/utils.d.ts +1 -1
  342. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +1 -1
  343. package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts +1 -1
  344. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +1 -1
  345. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts +1 -1
  346. package/dist/ui/components/organisms/vc-gallery/index.d.ts +1 -1
  347. package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +1 -1
  348. package/dist/ui/components/organisms/vc-popup/index.d.ts +1 -1
  349. package/dist/ui/components/organisms/vc-sidebar/index.d.ts +1 -1
  350. package/dist/ui/components/organisms/vc-table/VcDataTable.vue.d.ts +1 -1
  351. package/dist/ui/components/organisms/vc-table/VcTableAdapter.vue.d.ts +2 -2
  352. package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts +2 -2
  353. package/dist/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue.d.ts +2 -2
  354. package/dist/ui/components/organisms/vc-table/_internal/vc-table-empty/vc-table-empty.vue.d.ts +1 -1
  355. package/dist/ui/components/organisms/vc-table/base/BaseVcDataTable.d.ts +1 -1
  356. package/dist/ui/components/organisms/vc-table/components/ColumnFilter.vue.d.ts +1 -1
  357. package/dist/ui/components/organisms/vc-table/components/DataTableBody.vue.d.ts +3 -3
  358. package/dist/ui/components/organisms/vc-table/components/DataTableCellRenderer.vue.d.ts +1 -1
  359. package/dist/ui/components/organisms/vc-table/components/DataTableHeader.vue.d.ts +2 -2
  360. package/dist/ui/components/organisms/vc-table/components/DataTableRow.vue.d.ts +2 -2
  361. package/dist/ui/components/organisms/vc-table/components/GlobalFiltersPanel.vue.d.ts +1 -1
  362. package/dist/ui/components/organisms/vc-table/components/TableActions.vue.d.ts +1 -1
  363. package/dist/ui/components/organisms/vc-table/components/TableRowActions.vue.d.ts +1 -1
  364. package/dist/ui/components/organisms/vc-table/components/VcColumn.vue.d.ts +1 -1
  365. package/dist/ui/components/organisms/vc-table/components/cells/index.d.ts +11 -11
  366. package/dist/ui/components/organisms/vc-table/components/index.d.ts +26 -26
  367. package/dist/ui/components/organisms/vc-table/components/mobile/DataTableMobileCard.vue.d.ts +1 -1
  368. package/dist/ui/components/organisms/vc-table/components/mobile/DataTableMobileView.vue.d.ts +1 -1
  369. package/dist/ui/components/organisms/vc-table/components/mobile/MobileActionSheet.vue.d.ts +1 -1
  370. package/dist/ui/components/organisms/vc-table/components/mobile/MobileCellRenderer.vue.d.ts +1 -1
  371. package/dist/ui/components/organisms/vc-table/components/mobile/index.d.ts +5 -5
  372. package/dist/ui/components/organisms/vc-table/composables/index.d.ts +30 -30
  373. package/dist/ui/components/organisms/vc-table/composables/useColumnFilter.d.ts +1 -1
  374. package/dist/ui/components/organisms/vc-table/composables/useDataProcessing.d.ts +1 -1
  375. package/dist/ui/components/organisms/vc-table/composables/useDataTableOrchestrator.d.ts +4 -4
  376. package/dist/ui/components/organisms/vc-table/composables/useMobileCardLayout.d.ts +2 -2
  377. package/dist/ui/components/organisms/vc-table/composables/useTableColumns.d.ts +2 -2
  378. package/dist/ui/components/organisms/vc-table/composables/useTableFilter.d.ts +1 -1
  379. package/dist/ui/components/organisms/vc-table/composables/useTableRowReorder.d.ts +1 -1
  380. package/dist/ui/components/organisms/vc-table/composables/useTableSort.d.ts +1 -1
  381. package/dist/ui/components/organisms/vc-table/index.d.ts +9 -9
  382. package/dist/ui/components/organisms/vc-table/keys.d.ts +2 -2
  383. package/dist/ui/components/organisms/vc-table/types.d.ts +3 -3
  384. package/dist/ui/components/organisms/vc-table/utils/ColumnCollector.d.ts +1 -1
  385. package/dist/ui/components/organisms/vc-table/utils/index.d.ts +3 -3
  386. package/dist/ui/composables/index.d.ts +5 -5
  387. package/dist/ui/composables/useFormField.d.ts +2 -2
  388. package/dist/ui/types/index.d.ts +1 -1
  389. package/dist/vendor-d3-array-9cpTrqlO.js +149 -0
  390. package/dist/vendor-d3-axis-D1_DbKLz.js +74 -0
  391. package/dist/vendor-d3-brush-CcKeJp9e.js +1 -0
  392. package/dist/vendor-d3-chord-l0sNRNKZ.js +1 -0
  393. package/dist/vendor-d3-color-BOYE6h_9.js +306 -0
  394. package/dist/vendor-d3-dispatch-fx-WMg0D.js +64 -0
  395. package/dist/vendor-d3-drag-l0sNRNKZ.js +1 -0
  396. package/dist/vendor-d3-ease-Cr34gv04.js +8 -0
  397. package/dist/vendor-d3-force-l0sNRNKZ.js +1 -0
  398. package/dist/vendor-d3-format-DaIwZvFc.js +182 -0
  399. package/dist/vendor-d3-geo-l0sNRNKZ.js +1 -0
  400. package/dist/vendor-d3-geo-projection-l0sNRNKZ.js +1 -0
  401. package/dist/vendor-d3-hierarchy-l0sNRNKZ.js +1 -0
  402. package/dist/vendor-d3-interpolate-BYG2gvO4.js +177 -0
  403. package/dist/vendor-d3-interpolate-path-CpGLvKgS.js +299 -0
  404. package/dist/vendor-d3-path-DJOTitNW.js +64 -0
  405. package/dist/vendor-d3-quadtree-l0sNRNKZ.js +1 -0
  406. package/dist/vendor-d3-sankey-l0sNRNKZ.js +1 -0
  407. package/dist/vendor-d3-scale-CC5rtdt5.js +561 -0
  408. package/dist/vendor-d3-selection-CNMxsYiL.js +603 -0
  409. package/dist/vendor-d3-shape-DBhCDMiV.js +925 -0
  410. package/dist/vendor-d3-time-DAPP210_.js +212 -0
  411. package/dist/vendor-d3-time-format-hD7iE2WG.js +491 -0
  412. package/dist/vendor-d3-timer-C1cUWKPz.js +67 -0
  413. package/dist/vendor-d3-transition-BbNQT7qF.js +524 -0
  414. package/dist/vendor-d3-zoom-CcKeJp9e.js +1 -0
  415. package/dist/vendor-elkjs-l0sNRNKZ.js +1 -0
  416. package/dist/vendor-emotion-cache-eEZT5l-Q.js +274 -0
  417. package/dist/vendor-emotion-hash-DImMRhyK.js +22 -0
  418. package/dist/vendor-emotion-memoize-BcEUCz8q.js +9 -0
  419. package/dist/vendor-emotion-serialize-BSDW8NwU.js +123 -0
  420. package/dist/vendor-emotion-sheet-CS8ZBl9s.js +44 -0
  421. package/dist/vendor-emotion-unitless-B7u1PU6w.js +53 -0
  422. package/dist/vendor-emotion-utils-D7refZTM.js +28 -0
  423. package/dist/vendor-emotion-weak-memoize-l0sNRNKZ.js +1 -0
  424. package/dist/vendor-internmap-Q5729_cS.js +35 -0
  425. package/dist/vendor-juggle-resize-observer-DiSiNbbT.js +286 -0
  426. package/dist/vendor-kdbush-l0sNRNKZ.js +1 -0
  427. package/dist/vendor-leaflet-l0sNRNKZ.js +1 -0
  428. package/dist/vendor-lodash-l0sNRNKZ.js +1 -0
  429. package/dist/vendor-maplibre-gl-l0sNRNKZ.js +1 -0
  430. package/dist/vendor-microsoft-signalr-Bgpbb4fW.js +1 -1
  431. package/dist/vendor-striptags-BrHtQQiF.js +120 -0
  432. package/dist/vendor-stylis-ClfDrgKE.js +334 -0
  433. package/dist/vendor-supercluster-l0sNRNKZ.js +1 -0
  434. package/dist/vendor-three-l0sNRNKZ.js +1 -0
  435. package/dist/vendor-throttle-debounce-CX0imT7m.js +28 -0
  436. package/dist/vendor-topojson-client-l0sNRNKZ.js +1 -0
  437. package/dist/vendor-tslib-l0sNRNKZ.js +1 -0
  438. package/dist/vendor-unovis-dagre-layout-l0sNRNKZ.js +1 -0
  439. package/dist/vendor-unovis-graphlibrary-l0sNRNKZ.js +1 -0
  440. package/dist/vendor-unovis-ts-Bue71Kwt.js +2382 -0
  441. package/dist/vendor-unovis-vue-C_K1g5KH.js +446 -0
  442. package/package.json +6 -4
  443. package/shared/components/dashboard-charts/ChartContainer.vue +54 -0
  444. package/shared/components/dashboard-charts/ChartLegend.vue +40 -0
  445. package/shared/components/dashboard-charts/ChartTooltip.vue +43 -0
  446. package/shared/components/dashboard-charts/DashboardBarChart.vue +165 -0
  447. package/shared/components/dashboard-charts/DashboardDonutChart.vue +137 -0
  448. package/shared/components/dashboard-charts/DashboardLineChart.vue +170 -0
  449. package/shared/components/dashboard-charts/chart-theme.scss +19 -0
  450. package/shared/components/dashboard-charts/chart-tooltip.scss +48 -0
  451. package/shared/components/dashboard-charts/chart-utils.ts +189 -0
  452. package/shared/components/dashboard-charts/dashboard-charts.stories.ts +393 -0
  453. package/shared/components/dashboard-charts/index.ts +7 -0
  454. package/shared/components/dashboard-charts/types.ts +7 -0
  455. package/shared/components/index.ts +1 -0
  456. package/shared/components/sign-in/external-providers.vue +1 -1
  457. package/shared/pages/LoginPage/components/login/Login.vue +29 -31
  458. package/ui/components/molecules/vc-checkbox/vc-checkbox.vue +2 -4
  459. package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +3 -3
  460. package/ui/components/molecules/vc-multivalue/vc-multivalue.vue +1 -1
  461. package/ui/components/molecules/vc-radio-button/vc-radio-button.vue +2 -2
  462. package/ui/components/molecules/vc-select/vc-select.vue +1 -1
  463. package/ui/components/molecules/vc-slider/vc-slider.vue +1 -1
  464. package/ui/components/molecules/vc-switch/vc-switch.vue +2 -2
  465. package/ui/components/molecules/vc-textarea/vc-textarea.vue +8 -2
  466. package/ui/components/organisms/vc-app/_internal/app-bar/components/AppHubContent.test.ts +2 -23
  467. package/ui/components/organisms/vc-app/_internal/app-bar/components/AppHubContent.vue +135 -194
  468. package/ui/components/organisms/vc-app/_internal/app-bar/components/AppHubPopover.vue +1 -1
  469. package/ui/components/organisms/vc-app/_internal/app-bar/composables/useAppHub.ts +0 -44
  470. package/ui/components/organisms/vc-app/_internal/layouts/DesktopLayout.vue +1 -0
  471. package/ui/components/organisms/vc-app/_internal/sidebar/SidebarHeader.vue +181 -164
  472. package/ui/components/organisms/vc-app/composables/useShellBootstrap.ts +114 -106
  473. package/ui/components/organisms/vc-app/vc-app-shell.stories.ts +96 -37
@@ -0,0 +1,2382 @@
1
+ import { R as ei } from "./vendor-juggle-resize-observer-DiSiNbbT.js";
2
+ import { s as V, p as bt } from "./vendor-d3-selection-CNMxsYiL.js";
3
+ import { m as lt, a as Et, b as ii, c as ni, e as si, d as oi, r as ai, s as ri } from "./vendor-d3-array-9cpTrqlO.js";
4
+ import { i as li } from "./vendor-d3-interpolate-path-CpGLvKgS.js";
5
+ import { s as ci, a as di, c as hi, b as ui, m as fi, d as gi, e as pi, f as vi, g as mi, h as _i, i as bi, j as xi, k as yi, l as ki, n as Si, o as Ci, p as wi, q as Ai, r as Ti, t as $i, u as Ri } from "./vendor-d3-shape-DBhCDMiV.js";
6
+ import { l as Di, p as Mi, b as be, o as Ei, t as Oi, q as Li, a as Pi, d as Bi, s as Fi, u as zi, c as Wi, i as Ii, e as Vi, f as Hi, g as Ni, h as Gi } from "./vendor-d3-scale-CC5rtdt5.js";
7
+ import { i as xe } from "./vendor-d3-transition-BbNQT7qF.js";
8
+ import { a as oe, b as ae, c as re, d as le } from "./vendor-d3-axis-D1_DbKLz.js";
9
+ import { l as ce } from "./vendor-d3-ease-Cr34gv04.js";
10
+ import { s as Yi } from "./vendor-striptags-BrHtQQiF.js";
11
+ import { i as Xi } from "./vendor-d3-interpolate-BYG2gvO4.js";
12
+ import { t as Ui } from "./vendor-throttle-debounce-CX0imT7m.js";
13
+ import { h as ye } from "./vendor-d3-color-BOYE6h_9.js";
14
+ import { c as ji } from "./vendor-emotion-cache-eEZT5l-Q.js";
15
+ import { s as Mt } from "./vendor-emotion-serialize-BSDW8NwU.js";
16
+ import { g as ke, i as qi } from "./vendor-emotion-utils-D7refZTM.js";
17
+ var ct;
18
+ (function(n) {
19
+ n[n.SVG = 0] = "SVG", n[n.HTML = 1] = "HTML";
20
+ })(ct || (ct = {}));
21
+ var Y;
22
+ (function(n) {
23
+ n.Fit = "fit", n.Extend = "extend", n.FitWidth = "fit_width";
24
+ })(Y || (Y = {}));
25
+ var G;
26
+ (function(n) {
27
+ n.Left = "left", n.Right = "right", n.Auto = "auto";
28
+ })(G || (G = {}));
29
+ const B = (n) => typeof n == "number", Gt = (n) => typeof n == "function", it = (n) => Array.isArray(n), Zi = (n) => n instanceof Object, xt = (n) => n.constructor.name !== "Function" && n.constructor.name !== "Object", de = (n) => Zi(n) && !it(n) && !Gt(n) && !xt(n), Qi = (n) => [Object, Array].includes((n || {}).constructor) && !Object.entries(n || {}).length, K = (n, t, e = [], i = /* @__PURE__ */ new Set()) => {
30
+ if (Array.isArray(n)) {
31
+ if (!Array.isArray(t) || n.length !== t.length)
32
+ return !1;
33
+ if (i.has(n))
34
+ return !0;
35
+ i.add(n);
36
+ for (let s = 0; s < n.length; s++)
37
+ if (!K(n[s], t[s], e, i))
38
+ return !1;
39
+ return !0;
40
+ }
41
+ if (n instanceof Date && t instanceof Date)
42
+ return n.getTime() === t.getTime();
43
+ if (typeof n == "object" && n !== null && t !== null) {
44
+ if (typeof t != "object")
45
+ return !1;
46
+ if (n === t)
47
+ return !0;
48
+ const s = Object.keys(n).filter((a) => !e.includes(a)), o = Object.keys(t).filter((a) => !e.includes(a));
49
+ if (s.length !== o.length)
50
+ return !1;
51
+ if (i.has(n))
52
+ return !0;
53
+ i.add(n);
54
+ for (const a of s)
55
+ if (!K(n[a], t[a], e, i))
56
+ return !1;
57
+ return !0;
58
+ }
59
+ return n === t;
60
+ }, Ot = (n) => n.flat(), yt = (n, t = /* @__PURE__ */ new Map()) => {
61
+ if (typeof n != "object" || n === null)
62
+ return n;
63
+ if (n instanceof Date)
64
+ return new Date(n.getTime());
65
+ if (n instanceof Array) {
66
+ const e = [];
67
+ t.set(n, e);
68
+ for (const i of n)
69
+ e.push(t.has(i) ? t.get(i) : yt(i, t));
70
+ return e;
71
+ }
72
+ if (xt(n))
73
+ return n;
74
+ if (n instanceof Object) {
75
+ const e = {};
76
+ t.set(n, e);
77
+ const i = n;
78
+ return Object.keys(n).reduce((s, o) => (s[o] = t.has(i[o]) ? t.get(i[o]) : yt(i[o], t), s), e), e;
79
+ }
80
+ return n;
81
+ }, tt = (n, t, e = /* @__PURE__ */ new Map()) => {
82
+ if (!n || !t || n === t)
83
+ return n;
84
+ const i = xt(n) ? n : yt(n);
85
+ return e.has(t) ? e.get(t) : (e.set(t, i), Object.keys(t).forEach((s) => {
86
+ s === "__proto__" || s === "constructor" || (de(n[s]) && de(t[s]) ? i[s] = tt(n[s], t[s], e) : xt(t) ? i[s] = t : i[s] = yt(t[s]));
87
+ }), i);
88
+ }, kt = (n, t, e) => Ui(t, n);
89
+ function Yt(n, t, e) {
90
+ return Gt(t) ? t(n, e) : t;
91
+ }
92
+ function St(n, t, e) {
93
+ return Yt(n, t, e);
94
+ }
95
+ function R(n, t, e) {
96
+ return Yt(n, t, e);
97
+ }
98
+ function ot(n) {
99
+ return n.filter((t) => t && !B(t));
100
+ }
101
+ function I(n, t, e) {
102
+ return Math.min(Math.max(n, t), e);
103
+ }
104
+ function Ji(n, t, ...e) {
105
+ const i = [];
106
+ let s = 0, o = 0;
107
+ for (const a of e) {
108
+ const l = R(n, a, t) || 0;
109
+ l >= 0 ? i.push(s += l) : i.push(o += l);
110
+ }
111
+ return i;
112
+ }
113
+ function Se(n, ...t) {
114
+ return n ? lt(n, (i, s) => lt(t, (o) => R(i, o, s))) : void 0;
115
+ }
116
+ function Ce(n, ...t) {
117
+ return n ? Et(n, (i, s) => Et(t, (o) => R(i, o, s))) : void 0;
118
+ }
119
+ function ft(n, ...t) {
120
+ return [Se(n, ...t), Ce(n, ...t)];
121
+ }
122
+ function Ct(n, t, e, i = G.Auto) {
123
+ if (n.length <= 1)
124
+ return n[0];
125
+ const o = n.map((r, c) => [r, c]).sort(([r, c], [h, d]) => R(r, e, c) - R(h, e, d)), a = o.map(([r, c]) => R(r, e, c)), l = i === G.Right ? ii(a, t, 0, n.length - 1) : ni(a, t, 1, n.length);
126
+ return i === G.Right ? o[l][0] : i === G.Left ? o[l - 1][0] : t - a[l - 1] > a[l] - t ? o[l][0] : o[l - 1][0];
127
+ }
128
+ function Ki(n, t, e, i = !1) {
129
+ if (!e)
130
+ return [];
131
+ const s = n.filter((o, a) => {
132
+ const l = R(o, e, a);
133
+ return l >= t[0] && l <= t[1];
134
+ });
135
+ if (i) {
136
+ if (s.length === 0) {
137
+ const d = Ct(n, t[0], e, G.Left), u = Ct(n, t[1], e, G.Right);
138
+ return [d, u].filter(Boolean);
139
+ }
140
+ const o = s[0], a = s[s.length - 1], l = n.findIndex((d) => d === o), r = n.findIndex((d) => d === a), c = Math.max(0, l - 1), h = Math.min(n.length - 1, r + 1);
141
+ return n.slice(c, h + 1);
142
+ }
143
+ return s;
144
+ }
145
+ const tn = globalThis.ResizeObserver || ei, Xt = {
146
+ duration: void 0,
147
+ margin: {
148
+ top: 0,
149
+ bottom: 0,
150
+ left: 0,
151
+ right: 0
152
+ },
153
+ padding: {
154
+ top: 0,
155
+ bottom: 0,
156
+ left: 0,
157
+ right: 0
158
+ },
159
+ sizing: Y.Fit,
160
+ width: void 0,
161
+ height: void 0,
162
+ svgDefs: void 0,
163
+ ariaLabel: void 0
164
+ };
165
+ class et {
166
+ constructor(t) {
167
+ this._defaultConfig = Xt, this._isFirstRender = !0, this._renderAnimationFrameId = null, this._container = t;
168
+ const e = V(this._container);
169
+ e.attr("role", "figure"), this.svg = e.append("svg").style("display", "block").attr("xmlns", "http://www.w3.org/2000/svg").attr("height", et.DEFAULT_CONTAINER_HEIGHT).attr("aria-hidden", !0), this._svgDefs = this.svg.append("defs"), this._svgDefsExternal = this.svg.append("defs"), this.element = this.svg.node();
170
+ }
171
+ updateContainer(t) {
172
+ var e;
173
+ this.prevConfig = this.config, this.config = tt(this._defaultConfig, t), t?.svgDefs !== ((e = this.prevConfig) === null || e === void 0 ? void 0 : e.svgDefs) && (this._svgDefsExternal.selectAll("*").remove(), this._svgDefsExternal.html(t.svgDefs));
174
+ }
175
+ // The `_preRender` step should be used to perform some actions before rendering.
176
+ // For example, calculating scales, setting component sizes, etc ...
177
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
178
+ _preRender() {
179
+ }
180
+ // The `_render` step should be used to perform the actual rendering
181
+ _render(t) {
182
+ const { config: e } = this;
183
+ V(this._container).attr("aria-label", e.ariaLabel), this._isFirstRender = !1;
184
+ }
185
+ // Warning: Some Containers (i.e. Single Container) may override this method, so if you introduce any changes here,
186
+ // make sure to check that other containers didn't break after them.
187
+ render(t = this.config.duration) {
188
+ const e = this.config.width || this.containerWidth, i = this.config.height || this.containerHeight;
189
+ this.svg.attr("width", e).attr("height", i), this._resizeObserver || this._setUpResizeObserver(), cancelAnimationFrame(this._renderAnimationFrameId), this._renderAnimationFrameId = requestAnimationFrame(() => {
190
+ this._preRender(), this._render(t);
191
+ });
192
+ }
193
+ get containerWidth() {
194
+ return this.config.width ? this.element.clientWidth : this._container.clientWidth || this._container.getBoundingClientRect().width;
195
+ }
196
+ get containerHeight() {
197
+ return this.config.height ? this.element.clientHeight : this._container.clientHeight || this._container.getBoundingClientRect().height || et.DEFAULT_CONTAINER_HEIGHT;
198
+ }
199
+ get width() {
200
+ return I(this.containerWidth - this.config.margin.left - this.config.margin.right, 0, Number.POSITIVE_INFINITY);
201
+ }
202
+ get height() {
203
+ return I(this.containerHeight - this.config.margin.top - this.config.margin.bottom, 0, Number.POSITIVE_INFINITY);
204
+ }
205
+ _removeAllChildren() {
206
+ for (; this.element.firstChild; )
207
+ this.element.removeChild(this.element.firstChild);
208
+ }
209
+ _onResize() {
210
+ const { config: t } = this;
211
+ (t.sizing === Y.Fit || t.sizing === Y.FitWidth) && this.render(0);
212
+ }
213
+ _setUpResizeObserver() {
214
+ if (this._resizeObserver)
215
+ return;
216
+ const t = this._container.getBoundingClientRect();
217
+ this._containerSize = { width: t.width, height: t.height }, this._resizeObserver = new tn((e, i) => {
218
+ cancelAnimationFrame(this._resizeObserverAnimationFrameId), this._resizeObserverAnimationFrameId = requestAnimationFrame(() => {
219
+ const s = this._container.getBoundingClientRect(), o = { width: s.width, height: s.height };
220
+ !K(this._containerSize, o) && o.width && o.height && (this._containerSize = o, this._onResize());
221
+ });
222
+ }), this._resizeObserver.observe(this._container);
223
+ }
224
+ destroy() {
225
+ var t;
226
+ cancelAnimationFrame(this._renderAnimationFrameId), cancelAnimationFrame(this._resizeObserverAnimationFrameId), (t = this._resizeObserver) === null || t === void 0 || t.disconnect(), this.svg.remove();
227
+ }
228
+ }
229
+ et.DEFAULT_CONTAINER_HEIGHT = 300;
230
+ function he(n, t) {
231
+ if (n.inserted[t.name] === void 0)
232
+ return n.insert("", t, n.sheet, !0);
233
+ }
234
+ function ue(n, t, e) {
235
+ var i = [], s = ke(n, i, e);
236
+ return i.length < 2 ? e : s + t(i);
237
+ }
238
+ var en = function(t) {
239
+ var e = ji(t);
240
+ e.sheet.speedy = function(l) {
241
+ this.isSpeedy = l;
242
+ }, e.compat = !0;
243
+ var i = function() {
244
+ for (var r = arguments.length, c = new Array(r), h = 0; h < r; h++)
245
+ c[h] = arguments[h];
246
+ var d = Mt(c, e.registered, void 0);
247
+ return qi(e, d), e.key + "-" + d.name;
248
+ }, s = function() {
249
+ for (var r = arguments.length, c = new Array(r), h = 0; h < r; h++)
250
+ c[h] = arguments[h];
251
+ var d = Mt(c, e.registered), u = "animation-" + d.name;
252
+ return he(e, {
253
+ name: d.name,
254
+ styles: "@keyframes " + u + "{" + d.styles + "}"
255
+ }), u;
256
+ }, o = function() {
257
+ for (var r = arguments.length, c = new Array(r), h = 0; h < r; h++)
258
+ c[h] = arguments[h];
259
+ var d = Mt(c, e.registered);
260
+ he(e, d);
261
+ }, a = function() {
262
+ for (var r = arguments.length, c = new Array(r), h = 0; h < r; h++)
263
+ c[h] = arguments[h];
264
+ return ue(e.registered, i, nn(c));
265
+ };
266
+ return {
267
+ css: i,
268
+ cx: a,
269
+ injectGlobal: o,
270
+ keyframes: s,
271
+ hydrate: function(r) {
272
+ r.forEach(function(c) {
273
+ e.inserted[c] = !0;
274
+ });
275
+ },
276
+ flush: function() {
277
+ e.registered = {}, e.inserted = {}, e.sheet.flush();
278
+ },
279
+ sheet: e.sheet,
280
+ cache: e,
281
+ getRegisteredStyles: ke.bind(null, e.registered),
282
+ merge: ue.bind(null, e.registered, i)
283
+ };
284
+ }, nn = function n(t) {
285
+ for (var e = "", i = 0; i < t.length; i++) {
286
+ var s = t[i];
287
+ if (s != null) {
288
+ var o = void 0;
289
+ switch (typeof s) {
290
+ case "boolean":
291
+ break;
292
+ case "object": {
293
+ if (Array.isArray(s))
294
+ o = n(s);
295
+ else {
296
+ o = "";
297
+ for (var a in s)
298
+ s[a] && a && (o && (o += " "), o += a);
299
+ }
300
+ break;
301
+ }
302
+ default:
303
+ o = s;
304
+ }
305
+ o && (e && (e += " "), e += o);
306
+ }
307
+ }
308
+ return e;
309
+ }, we = en({
310
+ key: "css"
311
+ }), J = we.injectGlobal, A = we.css;
312
+ function Ae() {
313
+ const n = () => Math.floor((1 + crypto.getRandomValues(new Uint32Array(1))[0]) * 65536).toString(16).substring(1);
314
+ return `${n() + n()}-${n()}-${n()}-${n()}-${n()}${n()}${n()}`;
315
+ }
316
+ const fe = /* @__PURE__ */ new WeakMap();
317
+ function sn(n, t) {
318
+ const e = n.substr(4, n.length - 5);
319
+ let i = fe.get(t);
320
+ if (i || (i = /* @__PURE__ */ new Map(), fe.set(t, i)), i.has(e))
321
+ return i.get(e);
322
+ const s = getComputedStyle(t).getPropertyValue(e);
323
+ return i.set(e, s), s;
324
+ }
325
+ function on(n, t, e = 0) {
326
+ const [i, s, o, a] = [
327
+ n.x + e,
328
+ n.y + n.height - 2 * e,
329
+ n.x + n.width - 2 * e,
330
+ n.y + e
331
+ ], [l, r, c, h] = [
332
+ t.x + e,
333
+ t.y + t.height - 2 * e,
334
+ t.x + t.width - 2 * e,
335
+ t.y + e
336
+ ];
337
+ return !(s < h || r < a || o < l || c < i);
338
+ }
339
+ const at = globalThis?.UNOVIS_COLORS || ["#4D8CFD", "#FF6B7E", "#F4B83E", "#A6CC74", "#00C19A", "#6859BE"], an = globalThis?.UNOVIS_COLORS_DARK || ["#4D8CFD", "#FF6B7E", "#FFC16D", "#A6CC74", "#00C19A", "#7887E0"], U = (n) => `--vis-${B(n) ? `color${n % at.length}` : n}`;
340
+ function rn(n, t = 0.4) {
341
+ const e = ye(n);
342
+ return e.l = e.l * (1 + t), e.formatHex();
343
+ }
344
+ function ln(n, t = 0.4, e = 0.6) {
345
+ const i = ye(n);
346
+ return i.s = i.s * (1 - e), i.l = i.l * (1 - t), i.formatHex();
347
+ }
348
+ const wt = 10, Lt = [
349
+ { id: "stripes-diagonal", svg: '<path d="M-1,1 l2,-2 M0,10 l10,-10 M9,11 l2,-2" stroke="#000"/>' },
350
+ { id: "dots", svg: '<path d="m0-1.5a1 1 0 010 3m10-3a1 1 0 000 3M5 3.5a1 1 0 010 3 1 1 0 010-3M0 8.5 a1 1 0 010 3m10-3a1 1 0 000 3" fill"#000"/>' },
351
+ { id: "stripes-vertical", svg: '<path d="M 5,-1 L5,11" stroke="#000"/>' },
352
+ { id: "crosshatch", svg: '<path d="M0 0L10 10ZM10 0L0 10Z" stroke="#000"/>' },
353
+ { id: "waves", svg: '<path d="M0 4Q2.5 1 5 4 7.5 7 10 4v2Q7.5 9 5 6 2.5 3 0 6Z" fill="#000"/>' },
354
+ { id: "circles", svg: '<circle cx="5" cy="5" r="3" stroke="#000" fill="#fff"/>' }
355
+ ], Pt = [
356
+ { id: "circle", marker: '<circle cx="5" cy="5" r="5"/>', dashArray: [] },
357
+ { id: "triangle", marker: '<path d="M5,0 L10,9 L0,9Z">', dashArray: [9, 1] },
358
+ { id: "diamond", marker: '<path d="M 0 5 L5 0 L 10 5 L 5 10 L 0 5Z">', dashArray: [2] },
359
+ { id: "arrow", marker: '<path d="M4 0 0 0 6 5 0 10 4 10 10 5Z">', dashArray: [2, 3, 8, 3] },
360
+ { id: "square", marker: '<rect x="1" y="1" width="8" height="8"/>', dashArray: [6] },
361
+ { id: "star", marker: '<path d="m2 9 3-9 3 9L0 3h10Z"/>', dashArray: [1, 6] }
362
+ ];
363
+ function j(n) {
364
+ return `vis-${`pattern-${n.svg ? "fill" : "marker"}`}-${n.id}`;
365
+ }
366
+ const cn = (n) => `<mask id="${j(n)}">
367
+ <pattern id="${n.id}" viewBox="0 0 10 10" width="${wt}" height="${wt}" patternUnits="userSpaceOnUse">
368
+ <rect width="100%" height="100%" fill="#fff"/>
369
+ ${n.svg}
370
+ </pattern>
371
+ <rect x="-50%" y="-50%" width="200%" height="200%" fill="url(#${n.id})"/>
372
+ </mask>`, dn = (n, t) => `<marker id="${j(n)}"
373
+ fill="var(${U(t)})"
374
+ markerUnits="userSpaceOnUse"
375
+ refX="5"
376
+ refY="5"
377
+ markerWidth="${wt}"
378
+ markerHeight="${wt}">
379
+ ${n.marker}
380
+ </marker>`;
381
+ function hn() {
382
+ const n = Lt.map(cn).concat(Pt.map(dn)).join(""), t = document.createElementNS("http://www.w3.org/2000/svg", "svg");
383
+ t.setAttribute("height", "100%"), t.setAttribute("width", "100%"), t.style.position = "fixed", t.style.zIndex = "-99999999", t.innerHTML = `<defs>${n}</defs>`, document.body.appendChild(t);
384
+ }
385
+ typeof window < "u" && hn();
386
+ const Te = globalThis?.UNOVIS_FONT_W2H_RATIO_DEFAULT || 0.5, $e = globalThis?.UNOVIS_TEXT_SEPARATOR_DEFAULT || [" ", "-", ".", ","], Re = globalThis?.UNOVIS_TEXT_HYPHEN_CHARACTER_DEFAULT || "-", dt = globalThis?.UNOVIS_TEXT_DEFAULT || {
387
+ // If you change these defaults, don't forget to update the values in the `UnovisText` type in `types/text.ts`
388
+ text: "",
389
+ fontSize: 12,
390
+ fontFamily: "var(--vis-font-family)",
391
+ lineHeight: 1.25,
392
+ marginTop: 0,
393
+ marginBottom: 0
394
+ };
395
+ J`
396
+ :root {
397
+ label: vis-root-styles;
398
+ --vis-font-family: Inter, Arial, "Helvetica Neue", Helvetica, sans-serif;
399
+ --vis-font-wh-ratio: ${Te};
400
+ --vis-color-main: var(${U(0)});
401
+ --vis-color-main-light: ${rn(at[0])};
402
+ --vis-color-main-dark: ${ln(at[0])};
403
+ --vis-color-grey: #2a2a2a;
404
+ ${at.map((n, t) => `${U(t)}: ${n};`)}
405
+ ${an.map((n, t) => `--vis-dark-color${t}: ${n};`)}
406
+ ${Lt.map((n, t) => `
407
+ --${j(n)}: url(#${j(n)});
408
+ --vis-pattern-fill${t}: var(--${j(n)});
409
+ `)}
410
+ ${Pt.map((n, t) => {
411
+ var e;
412
+ return `
413
+ --${j(n)}: url(#${j(n)});
414
+ --vis-pattern-marker${t}: var(--${j(n)});
415
+ --vis-pattern-dasharray${t}: ${(e = n.dashArray) === null || e === void 0 ? void 0 : e.join(" ")};
416
+ `;
417
+ })}
418
+
419
+ body.theme-dark {
420
+ ${at.map((n, t) => `${U(t)}: var(--vis-dark-color${t});`)}
421
+ }
422
+
423
+ body.theme-patterns {
424
+ ${Lt.map((n, t) => `path[style*="fill: var(${U(t)})"] {
425
+ mask: var(--vis-pattern-fill${t});
426
+ }`)}
427
+ ${Pt.map((n, t) => `
428
+ path[stroke="var(${U(t)})"]:not([style*="fill"]),
429
+ path[style*="stroke: var(${U(t)})"]:not([style*="fill"]) {
430
+ marker: var(--vis-pattern-marker${t});
431
+ stroke-dasharray: var(--vis-pattern-dasharray${t});
432
+ }
433
+ `)}
434
+ }
435
+ `;
436
+ function Ut(n = window?.document.body) {
437
+ return n ? +sn("var(--vis-font-wh-ratio)", n) : Te;
438
+ }
439
+ function O(n, t, e) {
440
+ if (n.nodes().forEach((i) => xe(i)), t) {
441
+ const i = n.transition().duration(t);
442
+ return e && i.ease(e), i;
443
+ } else
444
+ return n;
445
+ }
446
+ const un = Object.assign(Object.assign({}, Xt), { tooltip: void 0, annotations: void 0 });
447
+ class Cs extends et {
448
+ constructor(t, e, i) {
449
+ var s;
450
+ super(t), this._defaultConfig = un, this.config = this._defaultConfig, e && (this.updateContainer(e, !0), this.component = e.component), i && this.setData(i, !0), !((s = this.component) === null || s === void 0) && s.datamodel.data && this.render();
451
+ }
452
+ setData(t, e) {
453
+ var i;
454
+ const { config: s } = this;
455
+ this.component && this.component.setData(t), e || this.render(), (i = s.tooltip) === null || i === void 0 || i.hide();
456
+ }
457
+ updateContainer(t, e) {
458
+ super.updateContainer(t), this._removeAllChildren(), this.component = t.component, t.sizing && (this.component.sizing = t.sizing), this.element.appendChild(this.component.element);
459
+ const i = t.tooltip;
460
+ i && (i.hasContainer() || i.setContainer(this._container), i.setComponents([this.component]));
461
+ const s = t.annotations;
462
+ s && this.element.appendChild(s.element), this.element.appendChild(this._svgDefs.node()), this.element.appendChild(this._svgDefsExternal.node()), e || this.render();
463
+ }
464
+ updateComponent(t, e) {
465
+ this.component.setConfig(t), e || this.render();
466
+ }
467
+ update(t, e, i) {
468
+ t && this.updateContainer(t, !0), e && this.updateComponent(e, !0), i && this.setData(i, !0), this.render();
469
+ }
470
+ getFitWidthScale() {
471
+ const { config: t, component: e } = this, i = e;
472
+ if (!i.getWidth)
473
+ return 1;
474
+ const s = i.getWidth() + t.margin.left + t.margin.right;
475
+ return this.width / s;
476
+ }
477
+ _preRender() {
478
+ var t, e;
479
+ super._preRender(), this.component.setSize(this.width, this.height, this.containerWidth, this.containerHeight), this.component.setContainerMargin(this.config.margin), (t = this.config.annotations) === null || t === void 0 || t.setSize(this.width, this.height, this.containerWidth, this.containerHeight), (e = this.config.annotations) === null || e === void 0 || e.setContainerMargin(this.config.margin);
480
+ }
481
+ _render(t) {
482
+ var e, i;
483
+ const { config: s, component: o } = this;
484
+ super._render(t), o.g.attr("transform", `translate(${s.margin.left},${s.margin.top})`), o.render(t), (e = s.annotations) === null || e === void 0 || e.render(t), s.tooltip && s.tooltip.update(), (i = s.onRenderComplete) === null || i === void 0 || i.call(s, this.svg.node(), s.margin, this.containerWidth, this.containerHeight, this.width, this.height);
485
+ }
486
+ // Re-defining the `render()` function to handle different sizing techniques (`Sizing.Extend` and `Sizing.FitWidth`)
487
+ // Not calling `super.render()` because we don't want it to interfere with setting the SVG size here.
488
+ render(t = this.config.duration) {
489
+ const { config: e, component: i } = this;
490
+ if (e.sizing === Y.Extend || e.sizing === Y.FitWidth) {
491
+ const s = e.sizing === Y.FitWidth, o = i, a = o.getWidth() + e.margin.left + e.margin.right, l = o.getHeight() + e.margin.top + e.margin.bottom, r = s ? this.getFitWidthScale() : 1, c = this.svg.attr("width"), h = this.svg.attr("height"), d = a * r, u = l * r, p = c || h;
492
+ O(this.svg, p ? t : 0).attr("width", d).attr("height", u).attr("viewBox", `0 0 ${a} ${s ? u : l}`).attr("preserveAspectRatio", "xMinYMin");
493
+ } else
494
+ this.svg.attr("width", this.config.width || this.containerWidth).attr("height", this.config.height || this.containerHeight);
495
+ this._resizeObserver || this._setUpResizeObserver(), cancelAnimationFrame(this._renderAnimationFrameId), this._renderAnimationFrameId = requestAnimationFrame(() => {
496
+ this._preRender(), this._render(t);
497
+ });
498
+ }
499
+ _onResize() {
500
+ var t;
501
+ const { config: e } = this;
502
+ super._onResize(), (t = e.tooltip) === null || t === void 0 || t.hide();
503
+ }
504
+ destroy() {
505
+ var t, e;
506
+ const { component: i, config: s } = this;
507
+ super.destroy(), i?.destroy(), (t = s.tooltip) === null || t === void 0 || t.destroy(), (e = s.annotations) === null || e === void 0 || e.destroy();
508
+ }
509
+ }
510
+ class jt {
511
+ constructor(t) {
512
+ this.data = t;
513
+ }
514
+ get data() {
515
+ return this._data;
516
+ }
517
+ set data(t) {
518
+ this._data = t;
519
+ }
520
+ }
521
+ var w;
522
+ (function(n) {
523
+ n.X = "x", n.Y = "y";
524
+ })(w || (w = {}));
525
+ const ge = {
526
+ scaleLinear: Di,
527
+ scalePow: Gi,
528
+ scaleSqrt: Ni,
529
+ scaleLog: Hi,
530
+ scaleSymlog: Vi,
531
+ scaleIdentity: Ii,
532
+ scaleTime: Wi,
533
+ scaleUtc: zi,
534
+ scaleSequential: Fi,
535
+ scaleDiverging: Bi,
536
+ scaleQuantize: Pi,
537
+ scaleQuantile: Li,
538
+ scaleThreshold: Oi,
539
+ scaleOrdinal: Ei,
540
+ scaleBand: be,
541
+ scalePoint: Mi
542
+ };
543
+ var M;
544
+ (function(n) {
545
+ n.X = "x", n.Y = "y";
546
+ })(M || (M = {}));
547
+ var F;
548
+ (function(n) {
549
+ n.West = "west", n.East = "east", n.North = "north", n.South = "south";
550
+ })(F || (F = {}));
551
+ const fn = Object.assign(Object.assign({}, Xt), { components: [], tooltip: void 0, crosshair: void 0, annotations: void 0, xAxis: void 0, yAxis: void 0, autoMargin: !0, xScale: void 0, xDomain: void 0, xDomainMinConstraint: void 0, xDomainMaxConstraint: void 0, xRange: void 0, yScale: void 0, yDomain: void 0, yDomainMinConstraint: void 0, yDomainMaxConstraint: void 0, yRange: void 0, yDirection: F.North, preventEmptyDomain: null, scaleByDomain: !1, clipPathExtend: 2 });
552
+ class ws extends et {
553
+ constructor(t, e, i) {
554
+ var s, o;
555
+ super(t), this._defaultConfig = fn, this.datamodel = new jt(), this.config = this._defaultConfig, this._clipPathId = Ae(), this._axisMargin = { top: 0, bottom: 0, left: 0, right: 0 }, this._firstRender = !0, this._clipPath = this.svg.append("clipPath").attr("id", this._clipPathId), this._clipPath.append("rect");
556
+ const a = "saturate", l = window.location.href.replace(window.location.hash, "");
557
+ this.svg.attr("class", A`
558
+ --highlight-filter-id: url(${l}#${a}); // defining a css variable
559
+ `), this._svgDefs.append("filter").attr("id", a).attr("filterUnits", "objectBoundingBox").html('<feColorMatrix type="saturate" in="SourceGraphic" values="1.35"/>'), e && this.updateContainer(e, !0), i && this.setData(i, !0), (this.config.xAxis || this.config.yAxis || !((s = this.components) === null || s === void 0) && s.some((r) => r.datamodel.data)) && this.render(), (o = document.fonts) === null || o === void 0 || o.ready.then(() => {
560
+ this._firstRender || this._renderAxes(0);
561
+ });
562
+ }
563
+ get components() {
564
+ return this.config.components;
565
+ }
566
+ // Overriding ContainerCore default get width method to work with axis auto margin
567
+ get width() {
568
+ const t = this._getMargin();
569
+ return I(this.containerWidth - t.left - t.right, 0, Number.POSITIVE_INFINITY);
570
+ }
571
+ // Overriding ContainerCore default get height method to work with axis auto margin
572
+ get height() {
573
+ const t = this._getMargin();
574
+ return I(this.containerHeight - t.top - t.bottom, 0, Number.POSITIVE_INFINITY);
575
+ }
576
+ setData(t, e) {
577
+ var i, s, o, a, l;
578
+ const { components: r, config: c } = this;
579
+ if (!t)
580
+ return;
581
+ this.datamodel.data = t, r.forEach((d) => {
582
+ d.setData(t);
583
+ }), (i = c.crosshair) === null || i === void 0 || i.setData(t), (s = c.xAxis) === null || s === void 0 || s.setData(t), (o = c.yAxis) === null || o === void 0 || o.setData(t), !K(this.datamodel.data, t) && ((a = c.tooltip) === null || a === void 0 || a.hide(), (l = c.crosshair) === null || l === void 0 || l.hide()), e || this.render();
584
+ }
585
+ updateContainer(t, e) {
586
+ super.updateContainer(t), this._removeAllChildren(), this.setData(this.datamodel.data, !0), t.xAxis && (this.config.xAxis.config.type = w.X, this.element.appendChild(t.xAxis.element)), t.yAxis && (this.config.yAxis.config.type = w.Y, this.element.appendChild(t.yAxis.element));
587
+ for (const a of this.components)
588
+ this.element.appendChild(a.element);
589
+ const i = t.tooltip;
590
+ i && (i.hasContainer() || i.setContainer(this._container), i.setComponents(this.components));
591
+ const s = t.crosshair;
592
+ s && (s.setContainer(this.svg), s.tooltip = i, this.element.appendChild(s.element));
593
+ const o = t.annotations;
594
+ o && this.element.appendChild(o.element), this.element.appendChild(this._clipPath.node()), this.element.appendChild(this._svgDefs.node()), this.element.appendChild(this._svgDefsExternal.node()), e || this.render();
595
+ }
596
+ updateComponents(t, e) {
597
+ const { config: i } = this;
598
+ this.components.forEach((s, o) => {
599
+ t[o] && s.setConfig(t[o]);
600
+ }), this._updateScales(...this.components, i.xAxis, i.yAxis, i.crosshair), e || this.render();
601
+ }
602
+ update(t, e, i) {
603
+ i && (this.datamodel.data = i), t && this.updateContainer(t, !0), e && this.updateComponents(e, !0), this.render();
604
+ }
605
+ _preRender() {
606
+ const { config: t } = this;
607
+ super._preRender(), t.autoMargin && this._setAutoMargin();
608
+ const e = ot([...this.components, t.xAxis, t.yAxis, t.crosshair, t.annotations]), i = this._getMargin();
609
+ for (const s of e)
610
+ s.setSize(this.width, this.height, this.containerWidth, this.containerHeight), s.setContainerMargin(i);
611
+ this._updateScales(...this.components, t.xAxis, t.yAxis, t.crosshair);
612
+ }
613
+ _render(t) {
614
+ var e, i, s, o, a, l;
615
+ const { config: r } = this;
616
+ super._render();
617
+ const c = this._getMargin();
618
+ for (const u of this.components)
619
+ u.g.attr("transform", `translate(${c.left},${c.top})`).style("clip-path", u.clippable ? `url(#${this._clipPathId})` : null).style("-webkit-clip-path", u.clippable ? `url(#${this._clipPathId})` : null), u.render(t);
620
+ this._renderAxes(this._firstRender ? 0 : t);
621
+ const h = r.clipPathExtend;
622
+ this._clipPath.select("rect").attr("x", -h).attr("y", -h).attr("width", this.width + 2 * h).attr("height", this.height + 2 * h), (e = r.tooltip) === null || e === void 0 || e.update();
623
+ const d = r.crosshair;
624
+ if (d) {
625
+ const u = this.components.filter((g) => !g.stacked).map((g) => g.config.y), p = this.components.filter((g) => g.stacked).map((g) => g.config.y), f = (i = this.components.find((g) => g.config.baseline)) === null || i === void 0 ? void 0 : i.config, m = f?.baseline;
626
+ d.accessors = {
627
+ x: (s = this.components[0]) === null || s === void 0 ? void 0 : s.config.x,
628
+ y: Ot(u),
629
+ yStacked: Ot(p),
630
+ baseline: m
631
+ }, d.g.attr("transform", `translate(${c.left},${c.top})`).style("clip-path", `url(#${this._clipPathId})`).style("-webkit-clip-path", `url(#${this._clipPathId})`), d.render();
632
+ }
633
+ (o = r.annotations) === null || o === void 0 || o.g.attr("transform", `translate(${c.left},${c.top})`), (a = r.annotations) === null || a === void 0 || a.render(), this._firstRender = !1, (l = r.onRenderComplete) === null || l === void 0 || l.call(r, this.svg.node(), c, this._getBleed(this.components), this.containerWidth, this.containerHeight, this.width, this.height);
634
+ }
635
+ _updateScales(...t) {
636
+ const e = ot(t || this.components);
637
+ this._setScales(...e), this._updateScalesDomain(...e), this._updateScalesRange(...e);
638
+ }
639
+ _setScales(...t) {
640
+ const { config: e } = this;
641
+ t && (e.xScale && t.forEach((i) => i.setScale(M.X, e.xScale)), e.yScale && t.forEach((i) => i.setScale(M.Y, e.yScale)));
642
+ }
643
+ _updateScalesDomain(...t) {
644
+ const { config: e } = this;
645
+ if (!t)
646
+ return;
647
+ const i = t.filter((s) => !s.config.excludeFromDomainCalculation);
648
+ Object.values(M).forEach((s) => {
649
+ var o, a, l, r, c, h, d, u;
650
+ const [p, f] = si(oi(i.map((k) => k.getDataExtent(s, e.scaleByDomain)))), m = s === M.Y ? e.yDomain : e.xDomain, g = s === M.Y ? e.yDomainMinConstraint : e.xDomainMinConstraint, x = s === M.Y ? e.yDomainMaxConstraint : e.xDomainMaxConstraint, _ = (a = (o = m?.[0]) !== null && o !== void 0 ? o : p) !== null && a !== void 0 ? a : 0, y = (r = (l = m?.[1]) !== null && l !== void 0 ? l : f) !== null && r !== void 0 ? r : 1, b = [
651
+ I(_, (c = g?.[0]) !== null && c !== void 0 ? c : Number.NEGATIVE_INFINITY, (h = g?.[1]) !== null && h !== void 0 ? h : Number.POSITIVE_INFINITY),
652
+ I(y, (d = x?.[0]) !== null && d !== void 0 ? d : Number.NEGATIVE_INFINITY, (u = x?.[1]) !== null && u !== void 0 ? u : Number.POSITIVE_INFINITY)
653
+ ];
654
+ if (b[0] === b[1]) {
655
+ const k = i.some((C) => {
656
+ var $;
657
+ return (($ = C.datamodel.data) === null || $ === void 0 ? void 0 : $.length) > 0;
658
+ });
659
+ (e.preventEmptyDomain || e.preventEmptyDomain === null && (!k || s === M.Y)) && (b[1] = b[0] + 1);
660
+ }
661
+ t.forEach((k) => k.setScaleDomain(s, b));
662
+ });
663
+ }
664
+ _updateScalesRange(...t) {
665
+ var e, i, s, o, a, l;
666
+ const { config: r } = this;
667
+ if (!t)
668
+ return;
669
+ const c = r.yDirection === F.South, h = [(e = r.padding.left) !== null && e !== void 0 ? e : 0, this.width - ((i = r.padding.right) !== null && i !== void 0 ? i : 0)], d = [this.height - ((s = r.padding.bottom) !== null && s !== void 0 ? s : 0), (o = r.padding.top) !== null && o !== void 0 ? o : 0];
670
+ c && d.reverse();
671
+ for (const p of t)
672
+ p.setSize(this.width, this.height, this.containerWidth, this.containerHeight), p.setScaleRange(M.X, (a = r.xRange) !== null && a !== void 0 ? a : h), p.setScaleRange(M.Y, (l = r.yRange) !== null && l !== void 0 ? l : d);
673
+ const u = this._getBleed(t);
674
+ for (const p of t)
675
+ p.setScaleRange(M.X, [h[0] + u.left, h[1] - u.right]), p.setScaleRange(
676
+ M.Y,
677
+ c ? [d[0] + u.top, d[1] - u.bottom] : [d[0] - u.bottom, d[1] + u.top]
678
+ // if Y axis is directed upwards
679
+ );
680
+ }
681
+ _renderAxes(t) {
682
+ const { config: { xAxis: e, yAxis: i } } = this, s = this._getMargin();
683
+ ot([e, i]).forEach((a) => {
684
+ const l = a.getOffset(s);
685
+ a.g.attr("transform", `translate(${l.left},${l.top})`), a.render(t);
686
+ });
687
+ }
688
+ _setAutoMargin() {
689
+ const { config: { xAxis: t, yAxis: e } } = this, i = ot([...this.components, t, e]);
690
+ this._setScales(...i), this._updateScalesDomain(...i);
691
+ const s = this._firstRender ? 2 : 1;
692
+ for (let o = 0; o < s; o += 1) {
693
+ const a = { top: 0, bottom: 0, left: 0, right: 0 };
694
+ this._updateScalesRange(...i), ot([t, e]).forEach((r) => {
695
+ r.preRender();
696
+ const c = r.getRequiredMargin();
697
+ a.top < c.top && (a.top = c.top), a.bottom < c.bottom && (a.bottom = c.bottom), a.left < c.left && (a.left = c.left), a.right < c.right && (a.right = c.right);
698
+ }), this._axisMargin = a;
699
+ }
700
+ }
701
+ _getMargin() {
702
+ const { config: { margin: t } } = this;
703
+ return {
704
+ top: t.top + this._axisMargin.top,
705
+ bottom: t.bottom + this._axisMargin.bottom,
706
+ left: t.left + this._axisMargin.left,
707
+ right: t.right + this._axisMargin.right
708
+ };
709
+ }
710
+ _getBleed(t) {
711
+ return t.map((e) => e.bleed).reduce((e, i) => {
712
+ for (const s of Object.keys(e)) {
713
+ const o = s;
714
+ e[o] < i[o] && (e[o] = i[o]);
715
+ }
716
+ return e;
717
+ }, { top: 0, bottom: 0, left: 0, right: 0 });
718
+ }
719
+ destroy() {
720
+ const { components: t, config: { tooltip: e, crosshair: i, annotations: s, xAxis: o, yAxis: a } } = this;
721
+ super.destroy();
722
+ for (const l of t)
723
+ l?.destroy();
724
+ e?.destroy(), i?.destroy(), s?.destroy(), o?.destroy(), a?.destroy();
725
+ }
726
+ }
727
+ const qt = {
728
+ duration: 600,
729
+ events: {},
730
+ attributes: {}
731
+ };
732
+ class De {
733
+ constructor(t = ct.SVG) {
734
+ var e, i;
735
+ this.type = ct.SVG, this.datamodel = new jt(), this.sizing = Y.Fit, this.events = {}, this._defaultConfig = qt, this._width = 400, this._height = 200, this._containerWidth = void 0, this._containerHeight = void 0, this._containerMargin = { top: 0, bottom: 0, left: 0, right: 0 }, this._setUpComponentEventsThrottled = kt(this._setUpComponentEvents, 500), this._setCustomAttributesThrottled = kt(this._setCustomAttributes, 500), t === ct.SVG ? this.element = document.createElementNS("http://www.w3.org/2000/svg", "g") : this.element = document.createElement("div"), this.uid = Ae(), this.g = V(this.element);
736
+ const s = (i = (e = this.constructor) === null || e === void 0 ? void 0 : e.selectors) === null || i === void 0 ? void 0 : i.root;
737
+ s && this.g.attr("class", s);
738
+ }
739
+ /** Set the container margin. Called automatically by containers. */
740
+ setContainerMargin(t) {
741
+ this._containerMargin = t;
742
+ }
743
+ setConfig(t) {
744
+ this.prevConfig = this.config, this.config = tt(this._defaultConfig, t);
745
+ }
746
+ setData(t) {
747
+ this.datamodel.data = t;
748
+ }
749
+ setSize(t, e, i, s) {
750
+ isFinite(t) && (this._width = t), isFinite(e) && (this._height = e), isFinite(i) && (this._containerWidth = i), isFinite(s) && (this._containerHeight = s);
751
+ }
752
+ render(t = this.config.duration) {
753
+ this._render(t);
754
+ const e = "animating";
755
+ t && (this.g.attr(e, ""), this.g.transition(e).duration(t).on("end interrupt", () => {
756
+ this.g.attr(e, null);
757
+ })), this._setUpComponentEventsThrottled(), this._setCustomAttributesThrottled();
758
+ }
759
+ get bleed() {
760
+ return { top: 0, bottom: 0, left: 0, right: 0 };
761
+ }
762
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
763
+ _render(t = this.config.duration) {
764
+ }
765
+ _setCustomAttributes() {
766
+ const t = this.config.attributes;
767
+ Object.keys(t).forEach((e) => {
768
+ Object.keys(t[e]).forEach((i) => {
769
+ this.g.selectAll(`.${e}`).attr(i, t[e][i]);
770
+ });
771
+ });
772
+ }
773
+ _setUpComponentEvents() {
774
+ this._bindEvents(this.events), this._bindEvents(this.config.events, ".user");
775
+ }
776
+ _bindEvents(t = this.events, e = "") {
777
+ Object.keys(t).forEach((i) => {
778
+ Object.keys(t[i]).forEach((s) => {
779
+ const o = this.g.selectAll(`.${i}`);
780
+ o.on(s + e, (a, l) => {
781
+ const r = o.nodes(), c = r.indexOf(a.currentTarget), h = t[i][s];
782
+ return h?.(l, a, c, r);
783
+ });
784
+ });
785
+ });
786
+ }
787
+ destroy() {
788
+ var t;
789
+ (t = this.g) === null || t === void 0 || t.remove(), this.element = void 0;
790
+ }
791
+ isDestroyed() {
792
+ return !this.element;
793
+ }
794
+ }
795
+ class Me extends jt {
796
+ constructor(t) {
797
+ super(t);
798
+ }
799
+ get data() {
800
+ var t;
801
+ return (t = this._data) !== null && t !== void 0 ? t : [];
802
+ }
803
+ set data(t) {
804
+ Array.isArray(t) && (this._data = t);
805
+ }
806
+ }
807
+ const ht = Object.assign(Object.assign({}, qt), { x: void 0, y: void 0, id: (n, t) => {
808
+ var e;
809
+ return (e = n.id) !== null && e !== void 0 ? e : `${t}`;
810
+ }, color: (n) => n.color, xScale: void 0, yScale: void 0, excludeFromDomainCalculation: !1 });
811
+ class Tt extends De {
812
+ constructor() {
813
+ super(...arguments), this.datamodel = new Me(), this.clippable = !0, this.stacked = !1, this._defaultConfig = ht, this._xScale = ge.scaleLinear(), this._yScale = ge.scaleLinear();
814
+ }
815
+ get xScale() {
816
+ return this.config.xScale || this._xScale;
817
+ }
818
+ get yScale() {
819
+ return this.config.yScale || this._yScale;
820
+ }
821
+ setConfig(t) {
822
+ var e, i;
823
+ !((e = this.config) === null || e === void 0) && e.xScale && (t.xScale = this.config.xScale), !((i = this.config) === null || i === void 0) && i.yScale && (t.yScale = this.config.yScale), super.setConfig(t);
824
+ }
825
+ setScaleDomain(t, e) {
826
+ var i, s;
827
+ t === M.X && ((i = this._xScale) === null || i === void 0 || i.domain(e)), t === M.Y && ((s = this._yScale) === null || s === void 0 || s.domain(e));
828
+ }
829
+ setScaleRange(t, e) {
830
+ var i, s;
831
+ t === M.X && ((i = this._xScale) === null || i === void 0 || i.range(e)), t === M.Y && ((s = this._yScale) === null || s === void 0 || s.range(e));
832
+ }
833
+ setScale(t, e) {
834
+ e && t === M.X && (this._xScale = e), e && t === M.Y && (this._yScale = e);
835
+ }
836
+ getDataExtent(t, e) {
837
+ const { config: i, datamodel: s } = this;
838
+ switch (t) {
839
+ case M.X:
840
+ return this.getXDataExtent();
841
+ case M.Y:
842
+ return this.getYDataExtent(e);
843
+ default:
844
+ return ft(s.data, i[t]);
845
+ }
846
+ }
847
+ getXDataExtent() {
848
+ const { config: t, datamodel: e } = this;
849
+ return ft(e.data, t.x);
850
+ }
851
+ /** Some components override this method to provide custom data extent calculation */
852
+ getYDataExtent(t) {
853
+ const { config: e, datamodel: i } = this, s = this.xScale.domain(), o = t ? Ki(i.data, s, e.x, !0) : i.data, a = it(e.y) ? e.y : [e.y];
854
+ return ft(o, ...a);
855
+ }
856
+ }
857
+ var v;
858
+ (function(n) {
859
+ n.Top = "top", n.Bottom = "bottom", n.Left = "left", n.Right = "right", n.Center = "center", n.Auto = "auto";
860
+ })(v || (v = {}));
861
+ var pe;
862
+ (function(n) {
863
+ n.Absolute = "absolute", n.Fixed = "fixed";
864
+ })(pe || (pe = {}));
865
+ var ve;
866
+ (function(n) {
867
+ n.Inside = "inside", n.Outside = "outside", n.Center = "center";
868
+ })(ve || (ve = {}));
869
+ var At;
870
+ (function(n) {
871
+ n.Horizontal = "horizontal", n.Vertical = "vertical";
872
+ })(At || (At = {}));
873
+ const gn = {
874
+ components: [],
875
+ container: void 0,
876
+ followCursor: !0,
877
+ allowHover: !1,
878
+ horizontalPlacement: v.Auto,
879
+ horizontalShift: 0,
880
+ verticalPlacement: v.Top,
881
+ verticalShift: 0,
882
+ attributes: {},
883
+ triggers: {},
884
+ className: void 0,
885
+ showDelay: void 0,
886
+ hideDelay: void 0
887
+ }, $t = A`
888
+ label: tooltip;
889
+ display: inline-block;
890
+ left: 0;
891
+ bottom: 0;
892
+ min-width: max-content;
893
+ position: absolute;
894
+ opacity: 0;
895
+ transition: opacity;
896
+ transition-duration: var(--vis-tooltip-transition-duration);
897
+ z-index: 999999;
898
+ padding: var(--vis-tooltip-padding);
899
+ color: var(--vis-tooltip-text-color);
900
+ border-radius: var(--vis-tooltip-border-radius);
901
+ box-shadow: var(--vis-tooltip-box-shadow);
902
+ border: solid 1px var(--vis-tooltip-border-color);
903
+ background-color: var(--vis-tooltip-background-color);
904
+ backdrop-filter: var(--vis-tooltip-backdrop-filter);
905
+ `, pn = $t, vn = J`
906
+ :root {
907
+ --vis-tooltip-background-color: rgba(255, 255, 255, 0.95);
908
+ --vis-tooltip-border-color: #e5e9f7;
909
+ --vis-tooltip-text-color: #000;
910
+ --vis-tooltip-shadow-color: rgba(172, 179, 184, 0.35);
911
+ --vis-tooltip-backdrop-filter: none;
912
+ --vis-tooltip-padding: 10px 15px;
913
+ --vis-tooltip-border-radius: 5px;
914
+ --vis-tooltip-transition-duration: 300ms;
915
+ --vis-tooltip-box-shadow: none;
916
+
917
+ --vis-dark-tooltip-background-color: rgba(30,30,30, 0.95);
918
+ --vis-dark-tooltip-text-color: #e5e9f7;
919
+ --vis-dark-tooltip-border-color: var(--vis-color-grey);
920
+ --vis-dark-tooltip-shadow-color: rgba(0,0,0, 0.95);
921
+ }
922
+
923
+ body.theme-dark ${`.${$t}`} {
924
+ --vis-tooltip-background-color: var(--vis-dark-tooltip-background-color);
925
+ --vis-tooltip-text-color: var(--vis-dark-tooltip-text-color);
926
+ --vis-tooltip-border-color: var(--vis-dark-tooltip-border-color);
927
+ --vis-tooltip-shadow-color: var(--vis-dark-tooltip-shadow-color);
928
+ }
929
+
930
+ body.theme-dark {
931
+ --vis-tooltip-background-color: rgba(30,30,30, 0.95);
932
+ --vis-tooltip-text-color: #e5e9f7;
933
+ --vis-tooltip-border-color: var(--vis-color-grey);
934
+ --vis-tooltip-shadow-color: rgba(0,0,0, 0.95);
935
+ }
936
+ `, Ee = A`
937
+ bottom: unset;
938
+ position: fixed;
939
+ `, gt = A`
940
+ opacity: 1;
941
+ `, pt = A`
942
+ display: none;
943
+ `, Oe = A`
944
+ label: non-interactive;
945
+ pointer-events: none;
946
+ user-select: none;
947
+ `, mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
948
+ __proto__: null,
949
+ hidden: pt,
950
+ nonInteractive: Oe,
951
+ positionFixed: Ee,
952
+ root: $t,
953
+ show: gt,
954
+ tooltip: pn,
955
+ variables: vn
956
+ }, Symbol.toStringTag, { value: "Module" }));
957
+ class _n {
958
+ constructor(t = {}) {
959
+ this._defaultConfig = gn, this.config = this._defaultConfig, this._setUpEventsThrottled = kt(this._setUpEvents, 500), this._setContainerPositionThrottled = kt(this._setContainerPosition, 500), this._isShown = !1, this.element = document.createElement("div"), this.div = V(this.element).attr("class", $t).classed(gt, !1).classed(pt, !0), this.setConfig(t), this.components = this.config.components, this._mutationObserver = new MutationObserver(() => {
960
+ this._isShown && (!this.config.followCursor && this._hoveredElement ? this.placeByElement(this._hoveredElement) : this._position && this.place({ x: this._position[0], y: this._position[1] }));
961
+ }), this._mutationObserver.observe(this.div.node(), { childList: !0, subtree: !0 });
962
+ }
963
+ setConfig(t) {
964
+ var e;
965
+ this.prevConfig = this.config, this.config = tt(this._defaultConfig, t), this.prevConfig.horizontalPlacement !== this.config.horizontalPlacement && this.overrideHorizontalPlacement(void 0), this.config.container && this.config.container !== ((e = this.prevConfig) === null || e === void 0 ? void 0 : e.container) && this.setContainer(this.config.container), this._setUpAttributes();
966
+ }
967
+ setContainer(t) {
968
+ var e;
969
+ (e = this.element.parentNode) === null || e === void 0 || e.removeChild(this.element), this._container = t, this._container.appendChild(this.element), this._setContainerPositionThrottled();
970
+ }
971
+ getContainer() {
972
+ return this._container;
973
+ }
974
+ hasContainer() {
975
+ return !!this._container && this._container.isConnected;
976
+ }
977
+ setComponents(t) {
978
+ this.components = t;
979
+ }
980
+ update() {
981
+ this._container && this._setUpEventsThrottled();
982
+ }
983
+ /** Show the tooltip immediately by providing content and position */
984
+ show(t, e) {
985
+ this.render(t), this.place(e);
986
+ }
987
+ _hide() {
988
+ this.div.classed(gt, !1).on("transitionend", () => {
989
+ this.div.classed(pt, !this._isShown);
990
+ }), this._isShown = !1;
991
+ }
992
+ /** Hides the tooltip after `hideDelay` */
993
+ hide() {
994
+ window.clearTimeout(this._showDelayTimeoutId), this.config.hideDelay ? (window.clearTimeout(this._hideDelayTimeoutId), this._hideDelayTimeoutId = setTimeout(() => this._hide(), this.config.hideDelay)) : this._hide();
995
+ }
996
+ _display() {
997
+ window.clearTimeout(this._hideDelayTimeoutId), this.div.classed(pt, !1).classed(gt, !0), this._isShown = !0;
998
+ }
999
+ /** Simply display the tooltip with its previous content on position, taking into account `showDelay` */
1000
+ display() {
1001
+ this._isShown || (this.config.showDelay ? (window.clearTimeout(this._showDelayTimeoutId), this._showDelayTimeoutId = setTimeout(() => {
1002
+ this._display(), this.place({ x: this._position[0], y: this._position[1] });
1003
+ }, this.config.showDelay)) : this._display());
1004
+ }
1005
+ place(t) {
1006
+ if (this._position = [t.x, t.y], !this.hasContainer()) {
1007
+ console.warn("Unovis | Tooltip: Container was not set or is not initialized yet");
1008
+ return;
1009
+ }
1010
+ const { config: e } = this, i = this.element.offsetWidth, s = this.element.offsetHeight, o = this._overriddenHorizontalPlacement || (e.horizontalPlacement === v.Auto ? v.Center : e.horizontalPlacement), a = e.verticalPlacement === v.Auto ? t.y - s < 0 ? v.Bottom : v.Top : e.verticalPlacement, l = 5, r = o === v.Left ? -i - l - e.horizontalShift : o === v.Center ? -i / 2 : l + e.horizontalShift, c = a === v.Bottom ? l + e.verticalShift : a === v.Center ? -s / 2 : -l - e.verticalShift - s, [h, d] = this._constraintPosToContainer(t.x + r, t.y + c, i, s);
1011
+ this._applyPosition(h, d, s);
1012
+ }
1013
+ placeByElement(t) {
1014
+ const { config: e } = this;
1015
+ this._hoveredElement = t;
1016
+ const i = 5, s = this.element.offsetWidth, o = this.element.offsetHeight, a = this.isContainerBody(), l = a ? window.innerWidth : this._container.scrollWidth, r = t.getBoundingClientRect(), c = a ? [r.x, r.y] : bt({
1017
+ clientX: r.x,
1018
+ clientY: r.y,
1019
+ pageX: r.x,
1020
+ pageY: r.y
1021
+ }, this._container), h = this._overriddenHorizontalPlacement || (e.horizontalPlacement === v.Auto ? c[0] - s < 0 ? v.Right : c[0] + s > l ? v.Left : v.Center : e.horizontalPlacement);
1022
+ let d = 0;
1023
+ switch (h) {
1024
+ case v.Left:
1025
+ d = -s - i - e.horizontalShift;
1026
+ break;
1027
+ case v.Right:
1028
+ d = r.width + i + e.horizontalShift;
1029
+ break;
1030
+ case v.Center:
1031
+ default:
1032
+ d = (-s + r.width) / 2;
1033
+ break;
1034
+ }
1035
+ const u = e.verticalPlacement === v.Auto ? h !== v.Center ? v.Center : c[1] - o < 0 ? v.Bottom : v.Top : e.verticalPlacement;
1036
+ let p = -o;
1037
+ switch (u) {
1038
+ case v.Center:
1039
+ p += (o + r.height) / 2;
1040
+ break;
1041
+ case v.Bottom:
1042
+ p += o + r.height + i + e.verticalShift;
1043
+ break;
1044
+ case v.Top:
1045
+ default:
1046
+ p += -i - e.verticalShift;
1047
+ break;
1048
+ }
1049
+ const [f, m] = this._constraintPosToContainer(c[0] + d, c[1] + p, s, o);
1050
+ this._applyPosition(f, m, o);
1051
+ }
1052
+ isContainerBody() {
1053
+ return this._container === document.body;
1054
+ }
1055
+ /** Allows to override the horizontal placement of the tooltip which is useful when you want to define custom positioning behavior.
1056
+ * This method has been added for Crosshair to allow it position tooltip left or right of the crosshair line
1057
+ * (see the `_showTooltip` method of the Crosshair component).
1058
+ */
1059
+ overrideHorizontalPlacement(t) {
1060
+ this._overriddenHorizontalPlacement = t;
1061
+ }
1062
+ render(t) {
1063
+ var e;
1064
+ const { config: i, prevConfig: s } = this;
1065
+ t instanceof HTMLElement ? this.div.select(":first-child").node() !== t && this.div.html("").append(() => t) : t !== null && this.div.html(t || ""), this.div.classed((e = i.className) !== null && e !== void 0 ? e : "", !!i.className).classed(Oe, !i.allowHover), s?.className && s.className !== i.className && this.div.classed(s.className, !1), this.display();
1066
+ }
1067
+ _applyPosition(t, e, i) {
1068
+ const s = this.isContainerBody(), o = s ? window.innerHeight : this._container.scrollHeight;
1069
+ this.div.classed(Ee, s).style("top", s ? `${e}px` : "unset").style("bottom", s ? "unset" : `${o - e - i}px`).style("left", `${t}px`);
1070
+ }
1071
+ _constraintPosToContainer(t, e, i, s) {
1072
+ const o = this.isContainerBody(), a = o ? window.innerHeight : this._container.scrollHeight, l = o ? window.innerWidth : this._container.scrollWidth, r = 10, c = t > l - i - r, h = t < r, d = c ? l - i - r : h ? r : t, u = 10, p = e > a - s - u, f = e < u, m = p ? a - s - u : f ? u : e;
1073
+ return [
1074
+ l < i ? 0 : d,
1075
+ a < s ? 0 : m
1076
+ ];
1077
+ }
1078
+ _setContainerPosition() {
1079
+ var t;
1080
+ this._container !== document.body && ((t = getComputedStyle(this._container)) === null || t === void 0 ? void 0 : t.position) === "static" && (this._container.style.position = "relative");
1081
+ }
1082
+ _setUpEvents() {
1083
+ const { config: t } = this;
1084
+ this.components.forEach((e) => {
1085
+ const i = V(e.element);
1086
+ i.on("mousemove.tooltip", (s) => {
1087
+ const { config: o } = this, a = s.composedPath && s.composedPath() || s.path || [s.target];
1088
+ for (const l of Object.keys(o.triggers)) {
1089
+ const r = o.triggers[l];
1090
+ if (!r)
1091
+ continue;
1092
+ const c = i.selectAll(`.${l}`).nodes();
1093
+ for (const h of a) {
1094
+ if (h === i.node())
1095
+ break;
1096
+ if (h.classList.contains(l)) {
1097
+ const d = c.indexOf(h), u = V(h).datum(), p = r(u, d, c), [f, m] = this.isContainerBody() ? [s.clientX, s.clientY] : bt(s, this._container);
1098
+ p === null ? this.hide() : (this.render(p), o.followCursor ? this.place({ x: f, y: m }) : this.placeByElement(h)), s.stopPropagation();
1099
+ return;
1100
+ }
1101
+ }
1102
+ }
1103
+ this._isShown && this.hide();
1104
+ }).on("mouseleave.tooltip", (s) => {
1105
+ s.stopPropagation(), this.hide();
1106
+ });
1107
+ }), t.allowHover ? this.div.on("mouseenter.tooltip", this._display.bind(this)).on("mouseleave.tooltip", this.hide.bind(this)) : this.div.on("mouseenter.tooltip", null).on("mouseleave.tooltip", null);
1108
+ }
1109
+ _setUpAttributes() {
1110
+ const t = this.config.attributes;
1111
+ t && Object.keys(t).forEach((e) => {
1112
+ this.div.attr(e, t[e]);
1113
+ });
1114
+ }
1115
+ destroy() {
1116
+ var t;
1117
+ this._mutationObserver.disconnect(), window.clearTimeout(this._hideDelayTimeoutId), window.clearTimeout(this._showDelayTimeoutId), (t = this.div) === null || t === void 0 || t.remove();
1118
+ }
1119
+ }
1120
+ _n.selectors = mn;
1121
+ function z(n, t, e, i) {
1122
+ return Array.isArray(t) && isFinite(e) ? t[e % t.length] : St(n, t, e) || (B(e) ? `var(${U(e)})` : null);
1123
+ }
1124
+ var D;
1125
+ (function(n) {
1126
+ n.Basis = "basis", n.BasisClosed = "basisClosed", n.BasisOpen = "basisOpen", n.Bundle = "bundle", n.Cardinal = "cardinal", n.CardinalClosed = "cardinalClosed", n.CardinalOpen = "cardinalOpen", n.CatmullRom = "catmullRom", n.CatmullRomClosed = "catmullRomClosed", n.CatmullRomOpen = "catmullRomOpen", n.Linear = "linear", n.LinearClosed = "linearClosed", n.MonotoneX = "monotoneX", n.MonotoneY = "monotoneY", n.Natural = "natural", n.Step = "step", n.StepAfter = "stepAfter", n.StepBefore = "stepBefore";
1127
+ })(D || (D = {}));
1128
+ const me = {
1129
+ [D.Basis]: Ai,
1130
+ [D.BasisClosed]: wi,
1131
+ [D.BasisOpen]: Ci,
1132
+ [D.Bundle]: Si,
1133
+ [D.Cardinal]: ki,
1134
+ [D.CardinalClosed]: yi,
1135
+ [D.CardinalOpen]: xi,
1136
+ [D.CatmullRom]: bi,
1137
+ [D.CatmullRomClosed]: _i,
1138
+ [D.CatmullRomOpen]: mi,
1139
+ [D.Linear]: vi,
1140
+ [D.LinearClosed]: pi,
1141
+ [D.MonotoneX]: gi,
1142
+ [D.MonotoneY]: fi,
1143
+ [D.Natural]: ui,
1144
+ [D.Step]: hi,
1145
+ [D.StepAfter]: di,
1146
+ [D.StepBefore]: ci
1147
+ }, bn = Object.assign(Object.assign({}, ht), { curveType: D.MonotoneX, lineWidth: 2, lineDashArray: void 0, fallbackValue: void 0, highlightOnHover: !1, cursor: null, interpolateMissingData: !1 }), xn = J`
1148
+ :root {
1149
+ --vis-line-cursor: default;
1150
+ --vis-line-stroke-dasharray: none;
1151
+ --vis-line-stroke-dashoffset: 0;
1152
+
1153
+ --vis-line-gapfill-stroke-dasharray: 2 3;
1154
+ --vis-line-gapfill-stroke-opacity: 0.8;
1155
+ --vis-line-gapfill-stroke-dashoffset: 0;
1156
+ }
1157
+ `, yn = A`
1158
+ label: line-component;
1159
+ `, rt = A`
1160
+ label: line;
1161
+ transition: opacity 200ms;
1162
+ cursor: var(--vis-line-cursor);
1163
+ `, Bt = A`
1164
+ label: linePath;
1165
+ fill: none;
1166
+ stroke-dasharray: var(--vis-line-stroke-dasharray);
1167
+ stroke-dashoffset: var(--vis-line-stroke-dashoffset);
1168
+ `, Ft = A`
1169
+ label: lineSelectionHelper;
1170
+ fill: none;
1171
+ stroke: rgba(0, 0, 0, 0);
1172
+ stroke-width: 8px;
1173
+ `, zt = A`
1174
+ opacity: 0.2;
1175
+ `, Wt = A`
1176
+ label: interpolated-path;
1177
+ fill: none;
1178
+ stroke-dasharray: var(--vis-line-gapfill-stroke-dasharray);
1179
+ stroke-dashoffset: var(--vis-line-gapfill-stroke-dashoffset);
1180
+ stroke-opacity: var(--vis-line-gapfill-stroke-opacity);
1181
+ `, kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1182
+ __proto__: null,
1183
+ dim: zt,
1184
+ globalStyles: xn,
1185
+ interpolatedPath: Wt,
1186
+ line: rt,
1187
+ linePath: Bt,
1188
+ lineSelectionHelper: Ft,
1189
+ root: yn
1190
+ }, Symbol.toStringTag, { value: "Module" }));
1191
+ class Zt extends Tt {
1192
+ constructor(t) {
1193
+ super(), this._defaultConfig = bn, this.config = this._defaultConfig, this.curve = me[D.MonotoneX], this.events = {
1194
+ [Zt.selectors.line]: {
1195
+ mouseover: this._highlight.bind(this),
1196
+ mouseleave: this._resetHighlight.bind(this)
1197
+ }
1198
+ }, t && this.setConfig(t);
1199
+ }
1200
+ get bleed() {
1201
+ const { config: { lineWidth: t } } = this, e = this.yScale.domain(), s = (this.yScale.range()[0] > this.yScale.range()[1] ? F.North : F.South) === F.South, o = t > 3, a = t >= 10;
1202
+ return {
1203
+ top: !a && (!s && e[1] === 0 || s && e[0] === 0) ? 0 : t / 2,
1204
+ bottom: !a && (!s && e[0] === 0 || s && e[1] === 0) ? 0 : t / 2,
1205
+ left: o ? t / 2 : 0,
1206
+ right: o ? t / 2 : 0
1207
+ };
1208
+ }
1209
+ _render(t) {
1210
+ super._render(t);
1211
+ const { config: e, datamodel: { data: i } } = this, s = B(t) ? t : e.duration;
1212
+ this.curve = me[e.curveType], this.lineGen = Ti().x((d) => d.x).y((d) => d.y).defined((d) => d.defined).curve(this.curve);
1213
+ const o = it(e.y) ? e.y : [e.y], a = i.map((d, u) => this.xScale(R(d, e.x, u))), l = o.map((d) => {
1214
+ const u = i.map((x, _) => {
1215
+ const y = R(x, d, _), b = (B(y) || y === null) && isFinite(y) ? y : e.fallbackValue, k = e.interpolateMissingData ? (B(y) || y === null) && isFinite(y) : isFinite(b);
1216
+ return {
1217
+ x: a[_],
1218
+ y: this.yScale(b ?? 0),
1219
+ defined: k,
1220
+ value: b
1221
+ };
1222
+ }), p = u.reduce((x, _) => _.defined || x, !1);
1223
+ let f = !1;
1224
+ const m = u.reduce((x, _, y) => {
1225
+ !_.defined && isFinite(e.fallbackValue) && x.push(Object.assign(Object.assign({}, _), { defined: !0 })), !_.defined && !f && (f = !0);
1226
+ const b = y > 0 && !u[y - 1].defined || y < u.length - 1 && !u[y + 1].defined;
1227
+ return _.defined && b && (f || x.push(Object.assign(Object.assign({}, _), { defined: !1 })), x.push(_), f = !1), x;
1228
+ }, []), g = p && u.some((x) => x.value !== null);
1229
+ return {
1230
+ values: u,
1231
+ defined: p,
1232
+ gaps: m,
1233
+ visible: g
1234
+ };
1235
+ }), r = this.g.selectAll(`.${rt}`).data(l), c = r.enter().append("g").attr("class", rt);
1236
+ c.append("path").attr("class", Bt).attr("stroke", (d, u) => z(i, e.color, u)).attr("stroke-opacity", 0).attr("stroke-width", e.lineWidth), c.append("path").attr("class", Ft).attr("d", this._emptyPath()), c.append("path").attr("class", Wt).attr("d", this._emptyPath()).style("opacity", 0);
1237
+ const h = c.merge(r);
1238
+ h.style("cursor", (d, u) => St(i, e.cursor, u)), h.each((d, u, p) => {
1239
+ var f;
1240
+ const m = V(p[u]), g = m.select(`.${Bt}`), x = m.select(`.${Ft}`), _ = m.select(`.${Wt}`), y = d.visible, b = Yt(i, e.lineDashArray, u), k = O(g, s).attr("stroke", z(i, e.color, u)).attr("stroke-width", e.lineWidth).attr("stroke-opacity", y ? 1 : 0).style("stroke-dasharray", (f = b?.join(" ")) !== null && f !== void 0 ? f : null), C = d.values.some((E) => !E.defined), $ = this.lineGen(d.values);
1241
+ if (s && !C) {
1242
+ const E = g.attr("d") || this._emptyPath(), L = $ || this._emptyPath();
1243
+ k.attrTween("d", () => li(E, L));
1244
+ } else d.visible && k.attr("d", $);
1245
+ x.attr("d", $).attr("visibility", y ? null : "hidden"), C && e.interpolateMissingData ? O(_, s).attr("d", this.lineGen(d.gaps)).attr("stroke", z(i, e.color, u)).attr("stroke-width", e.lineWidth - 1).style("opacity", 1) : _.transition().duration(s).style("opacity", 0);
1246
+ }), O(r.exit(), s).style("opacity", 0).remove();
1247
+ }
1248
+ _emptyPath() {
1249
+ const t = this.xScale.range(), e = this.yScale.range();
1250
+ return `M${t[0]},${e[0]} L${t[1]},${e[0]}`;
1251
+ }
1252
+ _highlight(t) {
1253
+ const { config: e } = this;
1254
+ e.highlightOnHover && this.g.selectAll(`.${rt}`).classed(zt, (i) => i !== t);
1255
+ }
1256
+ _resetHighlight() {
1257
+ const { config: t } = this;
1258
+ t.highlightOnHover && this.g.selectAll(`.${rt}`).classed(zt, !1);
1259
+ }
1260
+ }
1261
+ Zt.selectors = kn;
1262
+ function Sn({ x: n, y: t, w: e, h: i, tl: s = !1, tr: o = !1, bl: a = !1, br: l = !1, r = 0 }) {
1263
+ let c;
1264
+ c = `M${n + r},${t}h${e - 2 * r}`;
1265
+ let h = o ? r : 0, d = o ? 0 : r;
1266
+ return c += `a${h},${h} 0 0 1 ${h},${h}`, c += `h${d}v${d}`, c += `v${i - 2 * r}`, h = l ? r : 0, d = l ? 0 : r, c += `a${h},${h} 0 0 1 ${-h},${h}`, c += `v${d}h${-d}`, c += `h${2 * r - e}`, h = a ? r : 0, d = a ? 0 : r, c += `a${h},${h} 0 0 1 ${-h},${-h}`, c += `h${-d}v${-d}`, c += `v${2 * r - i}`, h = s ? r : 0, d = s ? 0 : r, c += `a${h},${h} 0 0 1 ${h},${-h}`, c += `v${-d}h${d}`, c += "z", c;
1267
+ }
1268
+ const Cn = Object.assign(Object.assign({}, ht), { color: void 0, groupMaxWidth: void 0, groupWidth: void 0, dataStep: void 0, groupPadding: 0.05, barPadding: 0, roundedCorners: 2, barMinHeight: 2, cursor: null, orientation: At.Vertical }), Le = A`
1269
+ label: grouped-bar-component;
1270
+ `, wn = J`
1271
+ :root {
1272
+ --vis-grouped-bar-cursor: default;
1273
+ --vis-grouped-bar-fill-color: var(--vis-color-main);
1274
+ --vis-grouped-bar-stroke-color: none;
1275
+ --vis-grouped-bar-stroke-width: 0px;
1276
+ --vis-grouped-bar-hover-stroke-width: 1px;
1277
+ --vis-grouped-bar-hover-stroke-color: none;
1278
+
1279
+
1280
+ /* Dark Theme */
1281
+ --vis-dark-grouped-bar-stroke-color: none;
1282
+ }
1283
+
1284
+ body.theme-dark ${`.${Le}`} {
1285
+ --vis-grouped-bar-stroke-color: var(--vis-dark-grouped-bar-stroke-color);
1286
+ }
1287
+ `, vt = A`
1288
+ label: bar;
1289
+ fill: var(--vis-grouped-bar-fill-color);
1290
+ stroke: var(--vis-grouped-bar-stroke-color);
1291
+ stroke-width: var(--vis-grouped-bar-stroke-width);
1292
+ cursor: var(--vis-grouped-bar-cursor);
1293
+
1294
+ &:hover {
1295
+ stroke-width: var(--vis-grouped-bar-hover-stroke-width);
1296
+ stroke: var(--vis-grouped-bar-hover-stroke-color);
1297
+ }
1298
+ `, It = A`
1299
+ label: barGroup;
1300
+ `, Pe = A`
1301
+ label: barGroupExit;
1302
+ `, An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1303
+ __proto__: null,
1304
+ bar: vt,
1305
+ barGroup: It,
1306
+ barGroupExit: Pe,
1307
+ globalStyles: wn,
1308
+ root: Le
1309
+ }, Symbol.toStringTag, { value: "Module" }));
1310
+ class Tn extends Tt {
1311
+ constructor(t) {
1312
+ super(), this._defaultConfig = Cn, this.config = this._defaultConfig, this.getAccessors = () => it(this.config.y) ? this.config.y : [this.config.y], this.events = {}, this._barData = [], t && this.setConfig(t);
1313
+ }
1314
+ get bleed() {
1315
+ if (this._barData = this._getVisibleData(), this._barData.length === 0)
1316
+ return { top: 0, bottom: 0, left: 0, right: 0 };
1317
+ const t = !this.isVertical() && this.dataScale.range()[0] > this.dataScale.range()[1], e = this.dataScale.domain(), i = this._getGroupWidth() / 2, s = this._barData.map((p, f) => R(p, this.config.x, f)), o = lt(s), a = Et(s), l = this.dataScale(o), r = this.dataScale(a), c = this.dataScale.invert(l + (t ? i : -i)), h = this.dataScale.invert(r + (t ? -i : i)), d = c <= e[0] ? this.dataScale(e[0]) - this.dataScale(c) : 0, u = h > e[1] ? this.dataScale(h) - this.dataScale(e[1]) : 0;
1318
+ return {
1319
+ top: this.isVertical() ? 0 : t ? -u : d,
1320
+ bottom: this.isVertical() ? 0 : t ? -d : u,
1321
+ left: this.isVertical() ? d : 0,
1322
+ right: this.isVertical() ? u : 0
1323
+ };
1324
+ }
1325
+ get dataScale() {
1326
+ return this.isVertical() ? this.xScale : this.yScale;
1327
+ }
1328
+ get valueScale() {
1329
+ return this.isVertical() ? this.yScale : this.xScale;
1330
+ }
1331
+ isVertical() {
1332
+ return this.config.orientation === At.Vertical;
1333
+ }
1334
+ _render(t) {
1335
+ const { config: e } = this, i = B(t) ? t : e.duration, s = this._getGroupWidth(), o = this.getAccessors(), a = [-s / 2, s / 2], l = be().domain(ai(o.length)).range(a).paddingInner(e.barPadding).paddingOuter(e.barPadding), r = this.g.selectAll(`.${It}`).data(this._barData, (_, y) => {
1336
+ var b;
1337
+ return `${(b = St(_, e.id, y)) !== null && b !== void 0 ? b : y}`;
1338
+ }), c = (_, y) => {
1339
+ const b = this.dataScale(R(_, e.x, y)), k = this.isVertical() ? b : 0, C = this.isVertical() ? 0 : b;
1340
+ return `translate(${k},${C})`;
1341
+ }, d = r.enter().append("g").attr("class", It).attr("transform", c).style("opacity", 1).merge(r);
1342
+ O(d, i).attr("transform", c).style("opacity", 1);
1343
+ const u = r.exit().attr("class", Pe);
1344
+ O(u, i).style("opacity", 0).remove(), O(u.selectAll(`.${vt}`), i).attr("transform", (_, y, b) => this.isVertical() ? `translate(0,${this.yScale(0)}) scale(1,0)` : `translate(${this.xScale(0)},0) scale(0,1)`);
1345
+ const p = l.bandwidth(), f = d.selectAll(`.${vt}`).data((_) => o.map(() => _)), m = this._getValueAxisDirection(), x = f.enter().append("path").attr("class", vt).attr("d", (_, y) => {
1346
+ const b = l(y), k = this.valueScale(0), C = p;
1347
+ return this._getBarPath(b, k, C, 0, !1, m);
1348
+ }).style("fill", (_, y) => z(_, e.color, y)).merge(f);
1349
+ O(x, i).attr("d", (_, y) => {
1350
+ const b = l(y), k = p, C = R(_, o[y]), $ = C < 0;
1351
+ let E = $ ? this.valueScale(0) : this.valueScale(C || 0), L = Math.abs(this.valueScale(0) - this.valueScale(C)) || 0;
1352
+ if (L < e.barMinHeight) {
1353
+ const T = m === F.North ? -1 : 1;
1354
+ E = this.valueScale(0) + T * e.barMinHeight, L = e.barMinHeight;
1355
+ }
1356
+ return this._getBarPath(b, E, k, L, $, m);
1357
+ }).style("fill", (_, y) => z(_, e.color, y)).style("cursor", (_, y) => St(_, e.cursor, y)), O(f.exit(), i).remove();
1358
+ }
1359
+ _getValueAxisDirection() {
1360
+ return this.valueScale.range()[0] > this.valueScale.range()[1] ? F.North : F.South;
1361
+ }
1362
+ _getVisibleData() {
1363
+ const { config: t, datamodel: { data: e } } = this, i = this._getGroupWidth(), s = e.length < 2 ? 0 : i / 2, o = this.dataScale, a = Math.abs(o.invert(s) - o.invert(0));
1364
+ return e?.filter((r, c) => {
1365
+ const h = R(r, t.x, c), d = o.domain(), u = +d[0], p = +d[1];
1366
+ return h >= u - a && h <= p + a;
1367
+ });
1368
+ }
1369
+ _getBarPath(t, e, i, s, o, a) {
1370
+ const { config: l } = this, r = l.roundedCorners ? B(l.roundedCorners) ? +l.roundedCorners : i / 2 : 0, c = I(r, 0, Math.min(s, i) / 2), h = a === F.North, d = this.isVertical() && o !== h, u = this.isVertical() && o === h, p = !this.isVertical() && o, f = !this.isVertical() && !o;
1371
+ return Sn({
1372
+ x: this.isVertical() ? t : e + (h ? 0 : -s),
1373
+ y: this.isVertical() ? e + (h ? 0 : -s) : t,
1374
+ w: this.isVertical() ? i : s,
1375
+ h: this.isVertical() ? s : i,
1376
+ tl: d || p,
1377
+ tr: d || f,
1378
+ bl: u || p,
1379
+ br: u || f,
1380
+ r: c
1381
+ });
1382
+ }
1383
+ _getGroupWidth() {
1384
+ const { config: t, datamodel: { data: e } } = this;
1385
+ if (Qi(e))
1386
+ return 0;
1387
+ if (t.groupWidth)
1388
+ return lt([t.groupWidth, t.groupMaxWidth]);
1389
+ const i = this.dataScale.bandwidth, s = this.dataScale.domain ? this.dataScale.domain() : [];
1390
+ let a = 1 + (i ? s.length : s[1] - s[0]) / t.dataStep || !i && e.filter((c, h) => {
1391
+ const d = R(c, t.x, h);
1392
+ return d >= s[0] && d <= s[1];
1393
+ }).length || e.length;
1394
+ !i && a >= 2 && (a += 1);
1395
+ const r = (a < 2 ? 1 : 1 - t.groupPadding) * (this.isVertical() ? this._width : this._height) / a;
1396
+ return lt([r, t.groupMaxWidth]);
1397
+ }
1398
+ getValueScaleExtent(t) {
1399
+ const { datamodel: e } = this, i = this.getAccessors(), s = t ? this._getVisibleData() : e.data, o = Se(s, ...i), a = Ce(s, ...i);
1400
+ return [o > 0 ? 0 : o, a < 0 ? 0 : a];
1401
+ }
1402
+ getDataScaleExtent() {
1403
+ const { config: t, datamodel: e } = this;
1404
+ return ft(e.data, t.x);
1405
+ }
1406
+ getYDataExtent(t) {
1407
+ return this.isVertical() ? this.getValueScaleExtent(t) : this.getDataScaleExtent();
1408
+ }
1409
+ getXDataExtent() {
1410
+ return this.isVertical() ? this.getDataScaleExtent() : this.getValueScaleExtent(!1);
1411
+ }
1412
+ }
1413
+ Tn.selectors = An;
1414
+ var q;
1415
+ (function(n) {
1416
+ n.Start = "start", n.Middle = "middle", n.End = "end";
1417
+ })(q || (q = {}));
1418
+ var Q;
1419
+ (function(n) {
1420
+ n.Top = "top", n.Middle = "middle", n.Bottom = "bottom";
1421
+ })(Q || (Q = {}));
1422
+ var N;
1423
+ (function(n) {
1424
+ n.Wrap = "wrap", n.Trim = "trim";
1425
+ })(N || (N = {}));
1426
+ var W;
1427
+ (function(n) {
1428
+ n.Left = "left", n.Center = "center", n.Right = "right";
1429
+ })(W || (W = {}));
1430
+ function $n(n) {
1431
+ switch (n) {
1432
+ case W.Center:
1433
+ return "middle";
1434
+ case W.Right:
1435
+ return "end";
1436
+ case W.Left:
1437
+ default:
1438
+ return "start";
1439
+ }
1440
+ }
1441
+ const Rn = (n) => {
1442
+ switch (n) {
1443
+ case W.Left:
1444
+ return "start";
1445
+ case W.Right:
1446
+ return "end";
1447
+ case W.Center:
1448
+ return "middle";
1449
+ default:
1450
+ return null;
1451
+ }
1452
+ };
1453
+ function Dn(n) {
1454
+ return n.replace(/-([a-z])/g, (t, e) => e.toUpperCase());
1455
+ }
1456
+ function Mn(n) {
1457
+ var t;
1458
+ return (t = n.match(/[A-Z]{2,}(?=[A-Z][a-z0-9]*|\b)|[A-Z]?[a-z0-9]*|[A-Z]|[0-9]+/g)) === null || t === void 0 ? void 0 : t.filter(Boolean).map((e) => e.toLowerCase()).join("-");
1459
+ }
1460
+ function En(n) {
1461
+ return n.replace(/['"]/g, "&#39;").replace(/\u0000/g, "\\0").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\v/g, "\\v").replace(/\t/g, "\\t").replace(/\f/g, "\\f");
1462
+ }
1463
+ function On(n, t = 15) {
1464
+ return n ? n.length > t ? `…${n.substr(n.length - t, t)}` : n : "";
1465
+ }
1466
+ function Ln(n, t = 15) {
1467
+ if (!n)
1468
+ return "";
1469
+ const e = Math.floor((t - 3) / 2);
1470
+ return n.length > t ? `${n.substr(0, e)}…${n.substr(-e, e)}` : n;
1471
+ }
1472
+ function Pn(n, t = 15) {
1473
+ return n ? n.length > t ? `${n.substr(0, t)}…` : n : "";
1474
+ }
1475
+ function Bn(n, t = 15, e = q.Middle) {
1476
+ if (!n)
1477
+ return "";
1478
+ let i = Pn(n, t);
1479
+ return e === q.Start ? i = On(n, t) : e === q.Middle && (i = Ln(n, t)), i;
1480
+ }
1481
+ function Be(n, t = [" "]) {
1482
+ let e = [n];
1483
+ for (let i = 0; i < t.length; i++) {
1484
+ const s = t[i];
1485
+ e.forEach((o, a) => {
1486
+ const l = o.split(s), r = l.map((c, h) => `${c}${h === l.length - 1 ? "" : s}`);
1487
+ e[a] = r;
1488
+ }), e = Ot(e);
1489
+ }
1490
+ return e;
1491
+ }
1492
+ function Fe(n, t, e = [" ", "-", ".", ","]) {
1493
+ const i = n.text();
1494
+ if (!i)
1495
+ return;
1496
+ const s = it(e) ? e : [e], o = Be(i, s), a = parseFloat(n.attr("x")) || 0;
1497
+ n.text("");
1498
+ let l = n.append("tspan").attr("x", a), r = `${o[0]}`;
1499
+ l.text(r), o.forEach((c, h) => {
1500
+ if (h === 0)
1501
+ return;
1502
+ const d = `${r}${c}`;
1503
+ l.text(d), l.node().getComputedTextLength() > t ? (l.text(r.trim()), l = n.append("tspan").attr("x", a).attr("dy", "1.2em").text(c), r = c) : r += c;
1504
+ });
1505
+ }
1506
+ function _e(n, t, e, i, s, o) {
1507
+ var a;
1508
+ t === void 0 && (t = 50), e === void 0 && (e = q.Middle), s === void 0 && (s = +((a = window.getComputedStyle(n.node())) === null || a === void 0 ? void 0 : a.fontSize) || 0), o === void 0 && (o = Ut());
1509
+ const l = n.text() || "", r = l.length, c = s * r * o, d = Math.ceil(r * t / (1.1 * c));
1510
+ return d < r ? (n.text(Bn(l, d, e)), !0) : !1;
1511
+ }
1512
+ function mt(n, t, e = Ut()) {
1513
+ return n.length * t * e || 0;
1514
+ }
1515
+ function _t(n, t, e) {
1516
+ const i = "http://www.w3.org/2000/svg", s = document.createElementNS(i, "svg"), o = document.createElementNS(i, "text");
1517
+ o.textContent = n, o.setAttribute("font-size", `${e}`), o.setAttribute("font-family", t), s.appendChild(o), document.body.appendChild(s);
1518
+ const a = o.getComputedTextLength();
1519
+ return document.body.removeChild(s), a;
1520
+ }
1521
+ function Fn(n, t = void 0, e = !0, i = $e, s = !1) {
1522
+ var o, a, l;
1523
+ const r = `${n.text}`;
1524
+ if (!r)
1525
+ return [];
1526
+ const c = (o = n.fontSize) !== null && o !== void 0 ? o : dt.fontSize, h = (a = n.fontFamily) !== null && a !== void 0 ? a : dt.fontFamily, d = (l = n.fontWidthToHeightRatio) !== null && l !== void 0 ? l : dt.fontWidthToHeightRatio, u = Array.isArray(i) ? i : [i];
1527
+ return r.split(`
1528
+ `).map((f) => {
1529
+ const m = [];
1530
+ if (!t)
1531
+ return [f];
1532
+ const g = Be(f, u);
1533
+ let x = "";
1534
+ for (let _ = 0; _ < g.length; _ += 1) {
1535
+ (e ? mt(x + g[_], c, d) : _t(x + g[_], h, c)) < t || _ === 0 ? x += g[_] : (m.push(x.trim()), x = g[_]);
1536
+ const b = 2;
1537
+ if (s)
1538
+ for (; x.trim().length > b && (e ? mt(x, c, d) : _t(x, h, c)) > t; ) {
1539
+ let C = x.trim().length - b;
1540
+ for (; C > 0; ) {
1541
+ const $ = `${x.substring(0, C)}${Re}`;
1542
+ if ((e ? mt($, c, d) : _t($, h, c)) <= t || C === 1) {
1543
+ m.push($.trim()), x = x.substring(C);
1544
+ break;
1545
+ }
1546
+ C--;
1547
+ }
1548
+ }
1549
+ }
1550
+ return x && m.push(x.trim()), m;
1551
+ }).flat();
1552
+ }
1553
+ function zn(n, t = void 0, e = void 0, i = !0, s = $e, o = !1) {
1554
+ const a = Array.isArray(n) ? n.map((d) => tt(dt, d)) : [tt(dt, n)], l = a.map((d) => Fn(d, t, i, s, o)), r = a[0];
1555
+ let c = -r.fontSize * (r.lineHeight - 1);
1556
+ const h = [];
1557
+ return a.forEach((d, u) => {
1558
+ var p;
1559
+ let f = l[u];
1560
+ const m = u > 0 ? h[u - 1] : void 0, g = m ? m.marginBottom : 0, x = d.marginTop, _ = Math.max(g, x);
1561
+ c += _;
1562
+ const y = d.fontSize * d.lineHeight;
1563
+ let b = 0;
1564
+ for (let k = 0; k < f.length; k += 1) {
1565
+ let C = f[k];
1566
+ c += y;
1567
+ const $ = `${C} …`, E = i ? mt($, d.fontSize, d.fontWidthToHeightRatio) : _t($, d.fontFamily, d.fontSize);
1568
+ if (b = Math.max(E, b), e && c + y > e && k !== f.length - 1) {
1569
+ C.charAt(C.length - 1) === Re && (C = C.substr(0, f[k].length - 1)), E < t ? f[k] = $ : f[k] = `${f[k].substr(0, f[k].length - 2)}…`, f = f.slice(0, k + 1);
1570
+ break;
1571
+ }
1572
+ }
1573
+ h.push(Object.assign(Object.assign({}, d), { _lines: f, _estimatedHeight: c - (m?._estimatedHeight || 0), _maxWidth: Math.max(b, (p = m?._maxWidth) !== null && p !== void 0 ? p : 0) }));
1574
+ }), h;
1575
+ }
1576
+ function Wn(n, t = 0, e, i) {
1577
+ return n.map((s, o) => {
1578
+ const a = o > 0 ? n[o - 1] : void 0, l = a ? a.marginBottom / a.fontSize : 0, r = s.marginTop / s.fontSize, c = Math.max(l, r), h = {
1579
+ fontSize: s.fontSize,
1580
+ fontFamily: s.fontFamily,
1581
+ fontWeight: s.fontWeight,
1582
+ fill: s.color,
1583
+ y: o === 0 && e
1584
+ };
1585
+ return `<tspan xmlns="http://www.w3.org/2000/svg" ${Object.entries(h).filter(([u, p]) => p).map(([u, p]) => `${Mn(u)}="${En(p.toString())}"`).join(" ")}>${s._lines.map((u, p) => {
1586
+ let f;
1587
+ return o === 0 && p === 0 ? f = c : p === 0 ? f = c + s.lineHeight : f = s.lineHeight, `<tspan x="${t}" dy="${f}em" dominant-baseline="${i ?? "auto"}">${u.length ? u : " "}</tspan>`;
1588
+ }).join("")}</tspan>`;
1589
+ });
1590
+ }
1591
+ function In(n) {
1592
+ return ri(n, (t) => t._estimatedHeight);
1593
+ }
1594
+ const Vn = ["text", "tspan", "textPath", "altGlyph", "altGlyphDef", "altGlyphItem", "glyphRef", "textRef", "textArea"];
1595
+ function Hn(n, t, e, i) {
1596
+ var s, o;
1597
+ const a = zn(t, e.width, void 0, e.fastMode, e.separator, e.wordBreak), l = (s = e.x) !== null && s !== void 0 ? s : +n.getAttribute("x"), r = (o = e.y) !== null && o !== void 0 ? o : +n.getAttribute("y"), c = l ?? 0;
1598
+ let h = r ?? 0;
1599
+ if (e.textAlign && n.setAttribute("text-anchor", $n(e.textAlign)), e.verticalAlign && e.verticalAlign !== Q.Top) {
1600
+ const u = In(a), p = e.verticalAlign === Q.Middle ? -u / 2 : e.verticalAlign === Q.Bottom ? -u : 0;
1601
+ h += p;
1602
+ }
1603
+ e.textRotationAngle ? n.setAttribute("transform", `rotate(${e.textRotationAngle === 0 || e.textRotationAngle ? e.textRotationAngle : 0} ${c} ${h})`) : n.removeAttribute("transform");
1604
+ const d = new DOMParser();
1605
+ n.textContent = "", a.forEach((u) => {
1606
+ const p = Wn([u], c, h, i).join(""), f = Yi(p, Vn), m = d.parseFromString(f, "image/svg+xml").firstChild;
1607
+ n.appendChild(m);
1608
+ });
1609
+ }
1610
+ const Nn = Object.assign(Object.assign({}, ht), { position: void 0, type: void 0, label: void 0, labelFontSize: null, labelTextFitMode: N.Wrap, labelTextTrimType: q.Middle, gridLine: !0, tickLine: !0, domainLine: !0, numTicks: void 0, minMaxTicksOnly: !1, minMaxTicksOnlyWhenWidthIsLess: 250, minMaxTicksOnlyShowGridLines: !1, tickTextWidth: void 0, tickTextSeparator: void 0, tickTextForceWordBreak: !1, tickTextTrimType: q.Middle, tickTextFitMode: N.Wrap, tickTextFontSize: null, tickTextAlign: void 0, tickTextColor: null, tickTextAngle: void 0, labelMargin: 8, labelColor: null, tickFormat: void 0, tickValues: void 0, fullSize: !0, tickPadding: 8, tickTextHideOverlapping: void 0 });
1611
+ function Gn(n, t) {
1612
+ const e = "--vis-", i = Object.entries(n);
1613
+ return Object.fromEntries(i.map(([s]) => [Dn(s.replace(e, "")), s]));
1614
+ }
1615
+ function Yn(n, t) {
1616
+ J({
1617
+ ":root": n,
1618
+ [`body.theme-dark .${t}`]: Object.keys(n).filter((e) => e.includes("--vis-dark")).map((e) => ({
1619
+ [e.replace("--vis-dark", "--vis")]: `var(${e})`
1620
+ }))
1621
+ });
1622
+ }
1623
+ const ze = A`
1624
+ label: axis-component;
1625
+ `, Qt = {
1626
+ // Undefined by default to allow proper fallback to var(--vis-font-family)
1627
+ /* --vis-axis-font-family: */
1628
+ "--vis-axis-tick-color": "#e8e9ef",
1629
+ /* --vis-axis-domain-color: // Undefined by default to allow fallback to var(--vis-axis-tick-color) */
1630
+ "--vis-axis-grid-color": "#e8e9ef",
1631
+ "--vis-axis-grid-line-width": "1px",
1632
+ "--vis-axis-grid-line-dasharray": "none",
1633
+ "--vis-axis-label-font-size": "14px",
1634
+ "--vis-axis-label-color": "#6c778c",
1635
+ "--vis-axis-label-weight": "500",
1636
+ "--vis-axis-tick-label-color": "#6c778c",
1637
+ "--vis-axis-tick-label-font-size": "12px",
1638
+ "--vis-axis-tick-label-weight": "500",
1639
+ "--vis-axis-tick-label-cursor": "default",
1640
+ "--vis-axis-tick-label-text-decoration": "none",
1641
+ "--vis-axis-tick-line-width": "1px",
1642
+ "--vis-axis-tick-label-hide-transition": "opacity 400ms ease-in-out",
1643
+ /* --vis-axis-domain-line-width: // Undefined by default to allow fallback to var(--vis-axis-grid-line-width) */
1644
+ "--vis-dark-axis-tick-color": "#6c778c",
1645
+ /* --vis-dark-axis-domain-color: // Undefined by default to allow fallback to var(--vis-dark-axis-tick-color) */
1646
+ "--vis-dark-axis-tick-label-color": "#e8e9ef",
1647
+ "--vis-dark-axis-grid-color": "#6c778c",
1648
+ "--vis-dark-axis-label-color": "#fefefe"
1649
+ }, Xn = Gn(Qt);
1650
+ Yn(Qt, ze);
1651
+ const Jt = A`
1652
+ label: hide-tick-line;
1653
+ `, Kt = A`
1654
+ label: hide-domain;
1655
+ `, We = A`
1656
+ label: axis;
1657
+
1658
+ user-select: none;
1659
+
1660
+ .domain {
1661
+ stroke: var(--vis-axis-domain-color, var(--vis-axis-tick-color));
1662
+ stroke-width: var(--vis-axis-domain-line-width, var(--vis-axis-grid-line-width));
1663
+ stroke-dasharray: var(--vis-axis-domain-line-dasharray, var(--vis-axis-grid-line-dasharray));
1664
+ }
1665
+
1666
+ &${`.${Jt}`} {
1667
+ .tick > line {
1668
+ opacity: 0;
1669
+ }
1670
+ }
1671
+
1672
+ &${`.${Kt}`} {
1673
+ .domain {
1674
+ opacity: 0;
1675
+ }
1676
+ }
1677
+ `, Ie = A`
1678
+ label: grid;
1679
+
1680
+ .domain {
1681
+ opacity: 0;
1682
+ }
1683
+
1684
+ line {
1685
+ stroke: var(--vis-axis-grid-color);
1686
+ stroke-width: var(--vis-axis-grid-line-width);
1687
+ stroke-dasharray: var(--vis-axis-grid-line-dasharray);
1688
+ }
1689
+ `, Ve = A`
1690
+ label: tick;
1691
+
1692
+ stroke: none;
1693
+ font-size: var(--vis-axis-tick-label-font-size);
1694
+ font-weight: var(--vis-axis-tick-label-weight);
1695
+
1696
+ line {
1697
+ stroke: var(--vis-axis-tick-color);
1698
+ stroke-width: var(--vis-axis-tick-line-width);
1699
+ }
1700
+
1701
+ text {
1702
+ fill: var(--vis-axis-tick-label-color);
1703
+ cursor: var(--vis-axis-tick-label-cursor);
1704
+ font-family: var(--vis-axis-font-family, var(--vis-font-family));
1705
+ text-decoration: var(--vis-axis-tick-label-text-decoration);
1706
+ stroke: none;
1707
+ }
1708
+ `, Vt = A`
1709
+ label: tick-text-exiting;
1710
+ `, Ht = A`
1711
+ label: label;
1712
+ fill: var(--vis-axis-label-color);
1713
+ font-size: var(--vis-axis-label-font-size);
1714
+ font-weight: var(--vis-axis-label-weight);
1715
+ font-family: var(--vis-axis-font-family, var(--vis-font-family));
1716
+ text-anchor: middle;
1717
+ `, He = A`
1718
+ label: tick-label;
1719
+ `, Ne = A`
1720
+ label: tick-label-hideable;
1721
+ opacity: 0;
1722
+ transition: var(--vis-axis-tick-label-hide-transition);
1723
+ `, Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1724
+ __proto__: null,
1725
+ axis: We,
1726
+ cssVarDefaults: Qt,
1727
+ grid: Ie,
1728
+ hideDomain: Kt,
1729
+ hideTickLine: Jt,
1730
+ label: Ht,
1731
+ root: ze,
1732
+ tick: Ve,
1733
+ tickLabel: He,
1734
+ tickLabelHideable: Ne,
1735
+ tickTextExiting: Vt,
1736
+ variables: Xn
1737
+ }, Symbol.toStringTag, { value: "Module" }));
1738
+ class jn extends Tt {
1739
+ constructor(t) {
1740
+ super(), this._defaultConfig = Nn, this.config = this._defaultConfig, this._defaultNumTicks = 3, this.events = {}, t && this.setConfig(t), this.axisGroup = this.g.append("g"), this.gridGroup = this.g.append("g").attr("class", Ie);
1741
+ }
1742
+ /** Renders axis to an invisible grouped to calculate automatic chart margins */
1743
+ preRender() {
1744
+ const { config: t } = this, e = this.g.append("g").attr("opacity", 0);
1745
+ this._renderAxis(e, 0), this._axisRawBBox = e.node().getBBox(), t.tickTextAlign && this._alignTickLabels(), this._renderAxisLabel(e), this._axisSizeBBox = this._getAxisSize(e), this._requiredMargin = this._getRequiredMargin(this._axisSizeBBox), e.remove();
1746
+ }
1747
+ getPosition() {
1748
+ const { config: { type: t, position: e } } = this;
1749
+ return e ?? (t === w.X ? v.Bottom : v.Left);
1750
+ }
1751
+ _getAxisSize(t) {
1752
+ return t.node().getBBox();
1753
+ }
1754
+ _getRequiredMargin(t = this._axisSizeBBox) {
1755
+ const { config: { type: e, position: i } } = this;
1756
+ switch (e) {
1757
+ case w.X: {
1758
+ const o = this._axisSizeBBox.x + this._axisSizeBBox.width, a = this._axisSizeBBox.x < 0 ? Math.abs(this._axisSizeBBox.x) : 0, l = o - this._width > 1 ? o - this._width : 0;
1759
+ switch (i) {
1760
+ case v.Top:
1761
+ return { top: t.height, left: a, right: l };
1762
+ case v.Bottom:
1763
+ default:
1764
+ return { bottom: t.height, left: a, right: l };
1765
+ }
1766
+ }
1767
+ case w.Y: {
1768
+ const s = t.height > this._height ? (t.height - this._height) / 2 : 0, o = s, a = s;
1769
+ switch (i) {
1770
+ case v.Right:
1771
+ return { right: t.width, top: o, bottom: a };
1772
+ case v.Left:
1773
+ default:
1774
+ return { left: t.width, top: o, bottom: a };
1775
+ }
1776
+ }
1777
+ }
1778
+ }
1779
+ getRequiredMargin() {
1780
+ return this._requiredMargin;
1781
+ }
1782
+ /** Calculates axis transform:translate offset based on passed container margins */
1783
+ getOffset(t) {
1784
+ const { config: { type: e, position: i } } = this;
1785
+ switch (e) {
1786
+ case w.X:
1787
+ switch (i) {
1788
+ case v.Top:
1789
+ return { top: t.top, left: t.left };
1790
+ case v.Bottom:
1791
+ default:
1792
+ return { top: t.top + this._height, left: t.left };
1793
+ }
1794
+ case w.Y:
1795
+ switch (i) {
1796
+ case v.Right:
1797
+ return { top: t.top, left: t.left + this._width };
1798
+ case v.Left:
1799
+ default:
1800
+ return { top: t.top, left: t.left };
1801
+ }
1802
+ }
1803
+ }
1804
+ _render(t = this.config.duration, e = this.axisGroup) {
1805
+ const { config: i } = this;
1806
+ if (this._renderAxis(e, t), this._renderAxisLabel(e), i.gridLine) {
1807
+ const s = this._buildGrid();
1808
+ this.gridGroup.selectAll("*").interrupt(), O(this.gridGroup, t).call(s).style("opacity", 1);
1809
+ } else
1810
+ O(this.gridGroup, t).style("opacity", 0);
1811
+ i.tickTextAlign && this._alignTickLabels(), this._resolveTickLabelOverlap(e);
1812
+ }
1813
+ _buildAxis() {
1814
+ const { config: { type: t, position: e, tickPadding: i } } = this, s = this._getNumTicks();
1815
+ switch (t) {
1816
+ case w.X:
1817
+ switch (e) {
1818
+ case v.Top:
1819
+ return le(this.xScale).ticks(s).tickPadding(i);
1820
+ case v.Bottom:
1821
+ default:
1822
+ return re(this.xScale).ticks(s).tickPadding(i);
1823
+ }
1824
+ case w.Y:
1825
+ switch (e) {
1826
+ case v.Right:
1827
+ return ae(this.yScale).ticks(s).tickPadding(i);
1828
+ case v.Left:
1829
+ default:
1830
+ return oe(this.yScale).ticks(s).tickPadding(i);
1831
+ }
1832
+ }
1833
+ }
1834
+ _buildGrid() {
1835
+ const { config: t } = this;
1836
+ let e;
1837
+ switch (t.type) {
1838
+ case w.X:
1839
+ switch (t.position) {
1840
+ case v.Top: {
1841
+ e = le(this.xScale);
1842
+ break;
1843
+ }
1844
+ case v.Bottom:
1845
+ default: {
1846
+ e = re(this.xScale);
1847
+ break;
1848
+ }
1849
+ }
1850
+ e.tickSize(-this._height);
1851
+ break;
1852
+ case w.Y:
1853
+ switch (t.position) {
1854
+ case v.Right: {
1855
+ e = ae(this.yScale);
1856
+ break;
1857
+ }
1858
+ case v.Left:
1859
+ default: {
1860
+ e = oe(this.yScale);
1861
+ break;
1862
+ }
1863
+ }
1864
+ e.tickSize(-this._width);
1865
+ }
1866
+ e.tickSizeOuter(0).tickFormat(() => "");
1867
+ const i = this._getNumTicks() * 2, s = e.scale(), o = s.domain(), a = () => {
1868
+ if (!t.minMaxTicksOnlyShowGridLines)
1869
+ return o;
1870
+ const r = s.ticks(i);
1871
+ if (r.length < 2)
1872
+ return o;
1873
+ const c = +r[1] - +r[0], h = o[1];
1874
+ return +h - +r[r.length - 1] > c / 2 ? [...r, h] : r;
1875
+ }, l = t.tickValues ? this._getConfiguredTickValues() : this._shouldRenderMinMaxTicksOnly() ? a() : s.ticks(i);
1876
+ return e.tickValues(l), e;
1877
+ }
1878
+ _renderAxis(t = this.axisGroup, e = this.config.duration) {
1879
+ const { config: i } = this, s = this._buildAxis(), o = s.scale(), a = i.tickValues ? this._getConfiguredTickValues() : this._shouldRenderMinMaxTicksOnly() ? o.domain() : o.ticks(this._getNumTicks()), l = a.length;
1880
+ s.tickValues(a), t.selectAll("*").interrupt();
1881
+ const r = O(t, e).call(s);
1882
+ t.selectAll("text").attr("dy", null).attr("y", null), r.on("end", () => {
1883
+ this._resolveTickLabelOverlap(t);
1884
+ }), t.selectAll("g.tick").classed(Ve, !0).style("font-size", i.tickTextFontSize);
1885
+ const h = t.selectAll("g.tick > text").filter((f) => a.some((m) => K(f, m))).classed(He, !0).classed(Ne, !!i.tickTextHideOverlapping).style("fill", i.tickTextColor);
1886
+ t.selectAll("g.tick > text").filter((f) => !a.some((m) => K(f, m))).classed(Vt, !0), h.nodes().forEach((f) => xe(f));
1887
+ const d = s.tickSize(), u = this.getPosition(), p = i.tickTextWidth || (i.type === w.X ? this._containerWidth / (l + 1) : this._containerWidth / 5);
1888
+ if (h.each((f, m, g) => {
1889
+ var x, _;
1890
+ let y = (_ = (x = i.tickFormat) === null || x === void 0 ? void 0 : x.call(i, f, m, a)) !== null && _ !== void 0 ? _ : `${f}`;
1891
+ const b = g[m];
1892
+ if (!this._tickTextStyleCached) {
1893
+ const T = getComputedStyle(b);
1894
+ this._tickTextStyleCached = {
1895
+ fontSize: Number.parseFloat(T.fontSize),
1896
+ fontFamily: T.fontFamily,
1897
+ fontWidthToHeightRatio: Ut()
1898
+ };
1899
+ }
1900
+ const [k, C] = this._getTickTextOffset(u, d, this._tickTextStyleCached.fontSize), $ = {
1901
+ verticalAlign: i.type === w.X ? Q.Top : Q.Middle,
1902
+ width: p,
1903
+ textRotationAngle: i.tickTextAngle,
1904
+ separator: i.tickTextSeparator,
1905
+ wordBreak: i.tickTextForceWordBreak,
1906
+ x: k,
1907
+ y: C
1908
+ };
1909
+ if (i.tickTextFitMode === N.Trim) {
1910
+ const T = V(b).text(y);
1911
+ _e(T, p, i.tickTextTrimType, !0, this._tickTextStyleCached.fontSize, 0.58), y = V(b).text();
1912
+ }
1913
+ const E = Object.assign({ text: y }, this._tickTextStyleCached), L = i.type === w.X ? "central" : "hanging";
1914
+ Hn(b, E, $, L);
1915
+ }), t.classed(We, !0).classed(Jt, !i.tickLine).classed(Kt, !i.domainLine), i.fullSize) {
1916
+ const f = this._getFullDomainPath(0);
1917
+ O(t.select(".domain"), e).attr("d", f);
1918
+ }
1919
+ }
1920
+ _resolveTickLabelOverlap(t = this.axisGroup) {
1921
+ const { config: e } = this, i = t.selectAll(`g.tick > text:not(.${Vt})`);
1922
+ if (!e.tickTextHideOverlapping) {
1923
+ i.style("opacity", null);
1924
+ return;
1925
+ }
1926
+ cancelAnimationFrame(this._collideTickLabelsAnimFrameId), this._collideTickLabelsAnimFrameId = requestAnimationFrame(() => {
1927
+ this._collideTickLabels(i);
1928
+ });
1929
+ }
1930
+ _collideTickLabels(t) {
1931
+ t.each((i, s, o) => {
1932
+ const a = o[s];
1933
+ a._visible = !0;
1934
+ });
1935
+ const e = 3;
1936
+ for (let i = 0; i < e; i += 1)
1937
+ t.each((s, o, a) => {
1938
+ const l = a[o];
1939
+ if (!l._visible)
1940
+ return;
1941
+ const c = l.getBoundingClientRect();
1942
+ for (let h = o + 1; h < a.length; h += 1) {
1943
+ if (o === h)
1944
+ continue;
1945
+ const d = a[h];
1946
+ if (d._visible) {
1947
+ const p = d.getBoundingClientRect();
1948
+ if (on(c, p, -5)) {
1949
+ d._visible = !1;
1950
+ break;
1951
+ }
1952
+ }
1953
+ }
1954
+ });
1955
+ t.each((i, s, o) => {
1956
+ const a = o[s];
1957
+ V(a).style("opacity", a._visible ? 1 : 0);
1958
+ });
1959
+ }
1960
+ _getNumTicks() {
1961
+ const { config: { type: t, numTicks: e } } = this;
1962
+ if (e)
1963
+ return e;
1964
+ if (t === w.X) {
1965
+ const i = this.xScale.range(), s = i[1] - i[0];
1966
+ return Math.floor(s / 175);
1967
+ }
1968
+ if (t === w.Y) {
1969
+ const i = this.yScale.range(), s = Math.abs(i[0] - i[1]);
1970
+ return Math.pow(s, 0.85) / 25;
1971
+ }
1972
+ return this._defaultNumTicks;
1973
+ }
1974
+ _getConfiguredTickValues() {
1975
+ const { config: t } = this, e = t.type === w.X ? this.xScale : this.yScale, i = e?.domain();
1976
+ return t.tickValues ? t.tickValues.filter((s) => s >= i[0] && s <= i[1]) : null;
1977
+ }
1978
+ _shouldRenderMinMaxTicksOnly() {
1979
+ const { config: t } = this;
1980
+ return t.minMaxTicksOnly || t.type === w.X && this._width < t.minMaxTicksOnlyWhenWidthIsLess;
1981
+ }
1982
+ _getFullDomainPath(t = 0) {
1983
+ const { config: { type: e } } = this;
1984
+ switch (e) {
1985
+ case w.X:
1986
+ return `M0.5, ${t} V0.5 H${this._width + 0.5} V${t}`;
1987
+ case w.Y:
1988
+ return `M${-t}, ${this._height + 0.5} H0.5 V0.5 H${-t}`;
1989
+ }
1990
+ }
1991
+ _renderAxisLabel(t = this.axisGroup) {
1992
+ var e;
1993
+ const { type: i, label: s, labelMargin: o, labelFontSize: a, labelTextFitMode: l } = this.config;
1994
+ if (t.selectAll(`.${Ht}`).remove(), !s)
1995
+ return;
1996
+ const r = this.getPosition(), { width: c, height: h } = (e = this._axisRawBBox) !== null && e !== void 0 ? e : t.node().getBBox(), d = i === w.Y ? -90 : 0, u = t.append("text").attr("class", Ht).attr("dy", `${this._getLabelDY()}em`).style("font-size", a).style("fill", this.config.labelColor);
1997
+ u.text(s);
1998
+ let p = !1;
1999
+ if (l === N.Wrap) {
2000
+ const b = i === w.Y ? this._height : this._width;
2001
+ u.node().getComputedTextLength() > b && (Fe(u, b), p = !0);
2002
+ }
2003
+ let f = c, m = h;
2004
+ if (l === N.Wrap) {
2005
+ const b = u.node().getBBox();
2006
+ f = b.width, m = b.height;
2007
+ } else {
2008
+ const b = i === w.X ? f : m, k = getComputedStyle(u.node()), C = Number.parseFloat(k.fontSize);
2009
+ _e(u, b, this.config.labelTextTrimType, !0, C);
2010
+ const $ = u.node().getBBox();
2011
+ f = $.width, m = $.height;
2012
+ }
2013
+ const g = i === w.X ? this._width / 2 : i === w.Y && l === N.Wrap && p ? r === v.Left ? -c - m / 2 - 10 : c : Math.pow(-1, +(r === v.Left)) * c, x = i === w.Y ? this._height / 2 : i === w.X && l === N.Wrap ? r === v.Top ? -h - m / 2 : h : Math.pow(-1, +(r === v.Top)) * h, _ = i === w.X ? 0 : Math.pow(-1, +(r === v.Left)) * o, y = i === w.X ? Math.pow(-1, +(r === v.Top)) * o : 0;
2014
+ u.attr("transform", `translate(${g + _},${x + y}) rotate(${d})`);
2015
+ }
2016
+ _getLabelDY() {
2017
+ const { type: t, position: e } = this.config;
2018
+ switch (t) {
2019
+ case w.X:
2020
+ switch (e) {
2021
+ case v.Top:
2022
+ return 0;
2023
+ case v.Bottom:
2024
+ default:
2025
+ return 0.75;
2026
+ }
2027
+ case w.Y:
2028
+ switch (e) {
2029
+ case v.Right:
2030
+ return 0.75;
2031
+ case v.Left:
2032
+ default:
2033
+ return -0.25;
2034
+ }
2035
+ }
2036
+ }
2037
+ _getTickTextOffset(t, e, i) {
2038
+ var s;
2039
+ const { config: o } = this, a = ((s = o.tickTextAngle) !== null && s !== void 0 ? s : 0) / 180 * Math.PI, l = e + o.tickPadding;
2040
+ if (o.type === w.X) {
2041
+ const r = t === v.Bottom ? 1 : -1;
2042
+ return [
2043
+ r * l * Math.sin(a),
2044
+ r * (l + i / 2) * Math.cos(a)
2045
+ ];
2046
+ } else {
2047
+ const r = t === v.Right ? 1 : -1;
2048
+ return [
2049
+ r * l * Math.cos(a),
2050
+ r * l * Math.sin(a)
2051
+ ];
2052
+ }
2053
+ }
2054
+ _alignTickLabels() {
2055
+ const { config: { type: t, tickTextAlign: e, tickTextAngle: i, position: s } } = this, o = this.g.selectAll("g.tick > text"), a = Rn(e), l = t === w.X ? 0 : this._getYTickTextTranslate(e, s), r = i ? `translate(${l},0) rotate(${i})` : `translate(${l},0)`;
2056
+ o.attr("transform", r).attr("text-anchor", a);
2057
+ }
2058
+ _getYTickTextTranslate(t, e = v.Left) {
2059
+ var i, s, o, a;
2060
+ const l = this.config.tickPadding + 1, r = ((a = (s = (i = this._axisRawBBox) === null || i === void 0 ? void 0 : i.width) !== null && s !== void 0 ? s : (o = this.axisGroup.node()) === null || o === void 0 ? void 0 : o.getBBox().width) !== null && a !== void 0 ? a : 0) - l;
2061
+ switch (t) {
2062
+ case W.Left:
2063
+ return e === v.Left ? r * -1 : 0;
2064
+ case W.Right:
2065
+ return e === v.Left ? 0 : r;
2066
+ case W.Center:
2067
+ return e === v.Left ? r * -0.5 : r * 0.5;
2068
+ default:
2069
+ return 0;
2070
+ }
2071
+ }
2072
+ }
2073
+ jn.selectors = Un;
2074
+ const qn = Object.assign(Object.assign({}, ht), { yStacked: void 0, baseline: null, duration: 100, tooltip: void 0, template: (n, t, e, i) => "", hideWhenFarFromPointer: !0, hideWhenFarFromPointerDistance: 100, snapToData: !0, getCircles: void 0, color: void 0, strokeColor: void 0, strokeWidth: void 0, onCrosshairMove: void 0, forceShowAt: void 0, skipRangeCheck: !1 }), Zn = J`
2075
+ :root {
2076
+ --vis-crosshair-line-stroke-color: #888;
2077
+ --vis-crosshair-line-stroke-width: 1px;
2078
+ --vis-crosshair-line-stroke-opacity: 1;
2079
+ --vis-crosshair-circle-stroke-color: #fff;
2080
+ --vis-crosshair-circle-stroke-width: 1px;
2081
+ --vis-crosshair-circle-stroke-opacity: 0.75;
2082
+ }
2083
+ `, Qn = A`
2084
+ label: crosshair-component;
2085
+ `, Ge = A`
2086
+ stroke: var(--vis-crosshair-line-stroke-color);
2087
+ stroke-width: var(--vis-crosshair-line-stroke-width);
2088
+ stroke-opacity: var(--vis-crosshair-line-stroke-opacity);
2089
+ pointer-events: none;
2090
+ `, Ye = A`
2091
+ stroke: var(--vis-crosshair-circle-stroke-color);
2092
+ stroke-width: var(--vis-crosshair-circle-stroke-width);
2093
+ stroke-opacity: var(--vis-crosshair-circle-stroke-opacity);
2094
+ pointer-events: none;
2095
+ `, Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2096
+ __proto__: null,
2097
+ circle: Ye,
2098
+ globalStyles: Zn,
2099
+ line: Ge,
2100
+ root: Qn
2101
+ }, Symbol.toStringTag, { value: "Module" }));
2102
+ class Kn extends Tt {
2103
+ constructor(t) {
2104
+ super(), this.clippable = !0, this._defaultConfig = qn, this.config = this._defaultConfig, this._xPx = void 0, this._yPx = void 0, this._mouseEvent = void 0, this._animFrameId = null, this._accessors = {
2105
+ x: void 0,
2106
+ y: void 0,
2107
+ yStacked: void 0,
2108
+ baseline: void 0
2109
+ }, t && this.setConfig(t), this.g.style("opacity", 0), this.line = this.g.append("line").attr("class", Ge);
2110
+ }
2111
+ set accessors(t) {
2112
+ this._accessors = t;
2113
+ }
2114
+ get accessors() {
2115
+ var t;
2116
+ const { config: e } = this, i = !!(e.x || e.y || e.yStacked), s = i ? e.x : this._accessors.x, o = i ? e.y : this._accessors.y, a = o ? it(o) ? o : [o] : void 0, l = i ? e.yStacked : this._accessors.yStacked, r = (t = e.baseline) !== null && t !== void 0 ? t : this._accessors.baseline;
2117
+ return { x: s, y: a, yStacked: l, baseline: r };
2118
+ }
2119
+ _isContainerInViewport() {
2120
+ var t;
2121
+ if (!(!((t = this.container) === null || t === void 0) && t.node()))
2122
+ return !1;
2123
+ const e = this.container.node().getBoundingClientRect(), i = window.innerWidth || document.documentElement.clientWidth, s = window.innerHeight || document.documentElement.clientHeight, o = Math.max(0, Math.min(e.right, i) - Math.max(e.left, 0)), a = Math.max(0, Math.min(e.bottom, s) - Math.max(e.top, 0)), l = e.width * e.height, r = o * a;
2124
+ return l > 0 && r / l >= 0.35;
2125
+ }
2126
+ setContainer(t) {
2127
+ this.container !== t && (this.container = t, this.container.on("mousemove.crosshair", this._onMouseMove.bind(this)), this.container.on("mouseout.crosshair", this._onMouseOut.bind(this)), this.container.on("wheel.crosshair", this._onWheel.bind(this)));
2128
+ }
2129
+ _render(t) {
2130
+ var e, i, s, o, a;
2131
+ const { config: l, datamodel: r } = this, c = B(t) ? t : l.duration, h = l.forceShowAt !== void 0, d = h ? this.xScale(l.forceShowAt) : this._xPx, u = this.xScale.invert(d), p = !((e = r.data) === null || e === void 0) && e.length && this.accessors.x ? r.data.indexOf(Ct(r.data, u, this.accessors.x, G.Left)) : void 0;
2132
+ let f, m;
2133
+ l.snapToData && (!this.accessors.y && !this.accessors.yStacked && (!((i = r.data) === null || i === void 0) && i.length) && console.warn("Unovis | Crosshair: Y accessors have not been configured. Please check if they're present in the configuration object"), !(!((s = r.data) === null || s === void 0) && s.length) && this._mouseEvent && console.warn("Unovis | Crosshair: No data to snap to. Make sure the data has been passed to the container or to the crosshair itself"), f = Ct(r.data, u, this.accessors.x), m = r.data.indexOf(f));
2134
+ const g = this.xScale.range(), x = this.yScale.range(), _ = l.snapToData && f ? I(Math.round(this.xScale(R(f, this.accessors.x, m))), 0, this._width) : I(d, g[0], g[1]), y = d >= g[0] && d <= g[1], b = this._yPx >= Math.min(x[0], x[1]) && this._yPx <= Math.max(x[0], x[1]);
2135
+ let k = l.skipRangeCheck ? !!this._xPx : this._xPx ? y && b : y;
2136
+ l.hideWhenFarFromPointer && Math.abs(_ - +d) >= l.hideWhenFarFromPointerDistance && (k = !1);
2137
+ const C = (o = l.tooltip) !== null && o !== void 0 ? o : this.tooltip;
2138
+ if (k && C && this._isContainerInViewport()) {
2139
+ const T = C.getContainer() || this.container.node(), Z = C.isContainerBody(), X = this.accessors.x ? R(f, this.accessors.x, m) : void 0;
2140
+ if (h) {
2141
+ const P = this.container.node().getBoundingClientRect(), nt = (Z ? d + P.left : d) + this._containerMargin.left, st = this._height / 2 + (Z ? P.top : 0), ut = [nt, st];
2142
+ this._showTooltip(f, X, ut, p);
2143
+ } else if (this._mouseEvent) {
2144
+ const P = Z ? [this._mouseEvent.clientX, this._mouseEvent.clientY] : bt(this._mouseEvent, T);
2145
+ this._showTooltip(f, X, P, p);
2146
+ }
2147
+ } else
2148
+ this._hideTooltip();
2149
+ if (this._mouseEvent && ((a = l.onCrosshairMove) === null || a === void 0 || a.call(l, k ? this.xScale.invert(this._xPx) : void 0, f, m, this._mouseEvent), this._mouseEvent = void 0), O(this.g, c).style("opacity", k ? 1 : 0), !isFinite(d))
2150
+ return;
2151
+ this.line.attr("y1", 0).attr("y2", this._height), O(this.line, c, ce).attr("x1", _).attr("x2", _);
2152
+ const $ = Gt(l.getCircles) ? l.getCircles(u, r.data, this.yScale, p) : this.getCircleData(f, m), E = this.g.selectAll("circle").data($, (T, Z) => {
2153
+ var X;
2154
+ return (X = T.id) !== null && X !== void 0 ? X : Z;
2155
+ }), L = E.enter().append("circle").attr("class", Ye).attr("r", 0).attr("cx", _).attr("cy", (T) => T.y).style("fill", (T) => T.color).style("stroke", (T) => T.strokeColor).style("stroke-width", (T) => T.strokeWidth);
2156
+ O(L.merge(E), c, ce).attr("cx", _).attr("cy", (T) => T.y).attr("r", 4).style("opacity", (T) => T.opacity).style("fill", (T) => T.color).style("stroke", (T) => T.strokeColor).style("stroke-width", (T) => T.strokeWidth), E.exit().remove();
2157
+ }
2158
+ hide(t) {
2159
+ window.cancelAnimationFrame(this._animFrameId), this._animFrameId = window.requestAnimationFrame(() => {
2160
+ var e, i;
2161
+ this._xPx = void 0, this._yPx = void 0, this._mouseEvent = void 0, (i = (e = this.config).onCrosshairMove) === null || i === void 0 || i.call(e, void 0, void 0, void 0, t), this._render();
2162
+ });
2163
+ }
2164
+ _onMouseMove(t) {
2165
+ var e;
2166
+ const { datamodel: i, element: s } = this;
2167
+ !this.accessors.x && (!((e = i.data) === null || e === void 0) && e.length) && console.warn("Unovis | Crosshair: X accessor function has not been configured. Please check if it's present in the configuration object");
2168
+ const [o, a] = bt(t, s);
2169
+ this._xPx = o, this._yPx = a, this._mouseEvent = t, window.cancelAnimationFrame(this._animFrameId), this._animFrameId = window.requestAnimationFrame(() => {
2170
+ this._render();
2171
+ });
2172
+ }
2173
+ _onMouseOut(t) {
2174
+ var e;
2175
+ (!t || !(!((e = this.container) === null || e === void 0) && e.node().contains(t.relatedTarget))) && this.hide(t);
2176
+ }
2177
+ _onWheel(t) {
2178
+ this.hide(t);
2179
+ }
2180
+ _showTooltip(t, e, i, s) {
2181
+ var o;
2182
+ const { config: a, datamodel: l } = this, r = (o = a.tooltip) !== null && o !== void 0 ? o : this.tooltip;
2183
+ if (!r || !i)
2184
+ return;
2185
+ const [c, h] = i, d = a.template(t, e, l.data, s);
2186
+ if (r.config.followCursor = !0, !r.config.horizontalPlacement || r.config.horizontalPlacement === v.Auto) {
2187
+ const u = r.isContainerBody() ? c - this.container.node().getBoundingClientRect().left : c;
2188
+ r.overrideHorizontalPlacement(u > this._containerWidth / 2 ? v.Left : v.Right);
2189
+ }
2190
+ d && r.show(d, { x: c, y: h });
2191
+ }
2192
+ _hideTooltip() {
2193
+ var t;
2194
+ const { config: e } = this, i = (t = e.tooltip) !== null && t !== void 0 ? t : this.tooltip;
2195
+ i?.hide();
2196
+ }
2197
+ // We don't want Crosshair to be be taken in to account in domain calculations
2198
+ getYDataExtent() {
2199
+ return [void 0, void 0];
2200
+ }
2201
+ getCircleData(t, e) {
2202
+ var i, s;
2203
+ const { config: o } = this;
2204
+ if (o.snapToData && t) {
2205
+ const a = (i = this.accessors.y) !== null && i !== void 0 ? i : [], l = (s = this.accessors.yStacked) !== null && s !== void 0 ? s : [], r = R(t, this.accessors.baseline, e) || 0, c = Ji(t, e, ...l).map((d, u) => ({
2206
+ y: this.yScale(d + r),
2207
+ opacity: B(R(t, l[u], u)) ? 1 : 0,
2208
+ color: z(t, o.color, u),
2209
+ strokeColor: o.strokeColor ? z(t, o.strokeColor, u) : void 0,
2210
+ strokeWidth: o.strokeWidth ? R(t, o.strokeWidth, u) : void 0
2211
+ })), h = a.map((d, u) => {
2212
+ const p = R(t, d, e);
2213
+ return {
2214
+ y: this.yScale(p),
2215
+ opacity: B(p) ? 1 : 0,
2216
+ color: z(t, o.color, c.length + u),
2217
+ strokeColor: o.strokeColor ? z(t, o.strokeColor, u) : void 0,
2218
+ strokeWidth: o.strokeWidth ? R(t, o.strokeWidth, u) : void 0
2219
+ };
2220
+ });
2221
+ return c.concat(h);
2222
+ }
2223
+ return [];
2224
+ }
2225
+ }
2226
+ Kn.selectors = Jn;
2227
+ const ts = Object.assign(Object.assign({}, qt), { id: (n, t) => {
2228
+ var e;
2229
+ return (e = n.id) !== null && e !== void 0 ? e : t;
2230
+ }, value: void 0, angleRange: [0, 2 * Math.PI], padAngle: 0, sortFunction: void 0, cornerRadius: 0, color: void 0, radius: void 0, arcWidth: 20, centralLabel: void 0, centralSubLabel: void 0, centralSubLabelWrap: !0, showEmptySegments: !1, emptySegmentAngle: 0.5 * Math.PI / 180, showBackground: !0, backgroundAngleRange: void 0, centralLabelOffsetX: void 0, centralLabelOffsetY: void 0 });
2231
+ function es(n, t) {
2232
+ n.style("fill", (e) => z(e.data, t.color, e.index)).style("opacity", 0).each((e, i, s) => {
2233
+ const o = s[i], a = (e.startAngle + e.endAngle) / 2, l = (e.endAngle - e.startAngle) / 2;
2234
+ o._animState = {
2235
+ startAngle: a - l,
2236
+ endAngle: a + l,
2237
+ innerRadius: e.innerRadius,
2238
+ outerRadius: e.outerRadius,
2239
+ padAngle: e.padAngle
2240
+ };
2241
+ });
2242
+ }
2243
+ function is(n, t, e, i) {
2244
+ n.style("transition", `fill ${i}ms`).style("fill", (o) => z(o.data, t.color, o.index));
2245
+ const s = (o) => t.showEmptySegments || o.value ? 1 : 0;
2246
+ i ? O(n, i).style("opacity", s).attrTween("d", (a, l, r) => {
2247
+ const c = r[l], h = {
2248
+ startAngle: a.startAngle,
2249
+ endAngle: a.endAngle,
2250
+ innerRadius: a.innerRadius,
2251
+ outerRadius: a.outerRadius,
2252
+ padAngle: a.padAngle
2253
+ }, d = Xi(c._animState, h);
2254
+ return (u) => (c._animState = d(u), e(c._animState));
2255
+ }) : n.attr("d", e).style("opacity", s);
2256
+ }
2257
+ function ns(n, t) {
2258
+ O(n, t).style("opacity", 0).remove();
2259
+ }
2260
+ const Xe = Array.from({ length: 4 }, (n, t) => {
2261
+ const e = -Math.PI / 2 + t * Math.PI / 2;
2262
+ return [e, e + Math.PI];
2263
+ }), [As, Ts, $s, Rs] = Xe, Ue = A`
2264
+ label: donut-component;
2265
+ `, ss = J`
2266
+ :root {
2267
+ --vis-donut-central-label-font-size: 16px;
2268
+ --vis-donut-central-label-text-color: #5b5f6d;
2269
+ // Undefined by default to allow proper fallback to var(--vis-font-family)
2270
+ /* --vis-donut-central-label-font-family: */
2271
+ --vis-donut-central-label-font-weight: 600;
2272
+
2273
+ --vis-donut-central-sub-label-font-size: 12px;
2274
+ --vis-donut-central-sub-label-text-color: #5b5f6d;
2275
+ // Undefined by default to allow proper fallback to var(--vis-font-family)
2276
+ /* --vis-donut-central-sub-label-font-family: */
2277
+ --vis-donut-central-sub-label-font-weight: 500;
2278
+
2279
+ --vis-donut-background-color: #E7E9F3;
2280
+ --vis-donut-segment-stroke-width: 0;
2281
+ // The line segment color variable is not defined by default
2282
+ // to allow it to fallback to the donut background color
2283
+ /* --vis-donut-segment-stroke-color: none; */
2284
+
2285
+ --vis-dark-donut-central-label-text-color: #C2BECE;
2286
+ --vis-dark-donut-central-sub-label-text-color: #C2BECE;
2287
+ --vis-dark-donut-background-color: #18160C;
2288
+ }
2289
+
2290
+ body.theme-dark ${`.${Ue}`} {
2291
+ --vis-donut-central-label-text-color: var(--vis-dark-donut-central-label-text-color);
2292
+ --vis-donut-central-sub-label-text-color: var(--vis-dark-donut-central-sub-label-text-color);
2293
+ --vis-donut-background-color: var(--vis-dark-donut-background-color);
2294
+ }
2295
+ `, je = A`
2296
+ label: background;
2297
+ fill: var(--vis-donut-background-color);
2298
+ `, Nt = A`
2299
+ label: segment;
2300
+ stroke-width: var(--vis-donut-segment-stroke-width);
2301
+ stroke: var(--vis-donut-segment-stroke-color, var(--vis-donut-background-color));
2302
+ `, qe = A`
2303
+ label: segment-exit;
2304
+ `, Ze = A`
2305
+ label: central-label;
2306
+ text-anchor: middle;
2307
+ dominant-baseline: middle;
2308
+ font-size: var(--vis-donut-central-label-font-size);
2309
+ font-family: var(--vis-donut-central-label-font-family, var(--vis-font-family));
2310
+ font-weight: var(--vis-donut-central-label-font-weight);
2311
+ fill: var(--vis-donut-central-label-text-color);
2312
+ `, Qe = A`
2313
+ label: central-label;
2314
+ text-anchor: middle;
2315
+ dominant-baseline: middle;
2316
+ font-size: var(--vis-donut-central-sub-label-font-size);
2317
+ font-family: var(--vis-donut-central-sub-label-font-family, var(--vis-font-family));
2318
+ font-weight: var(--vis-donut-central-sub-label-font-weight);
2319
+ fill: var(--vis-donut-central-sub-label-text-color);
2320
+ `, os = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2321
+ __proto__: null,
2322
+ background: je,
2323
+ centralLabel: Ze,
2324
+ centralSubLabel: Qe,
2325
+ root: Ue,
2326
+ segment: Nt,
2327
+ segmentExit: qe,
2328
+ variables: ss
2329
+ }, Symbol.toStringTag, { value: "Module" }));
2330
+ class as extends De {
2331
+ constructor(t) {
2332
+ super(), this._defaultConfig = ts, this.config = this._defaultConfig, this.datamodel = new Me(), this.arcGen = $i(), this.events = {}, t && this.setConfig(t), this.arcBackground = this.g.append("path"), this.arcGroup = this.g.append("g"), this.centralLabel = this.g.append("text").attr("class", Ze), this.centralSubLabel = this.g.append("text").attr("class", Qe);
2333
+ }
2334
+ get bleed() {
2335
+ return { top: 0, bottom: 0, left: 0, right: 0 };
2336
+ }
2337
+ _render(t) {
2338
+ var e, i, s, o, a, l, r, c, h, d, u, p, f, m;
2339
+ const { config: g, datamodel: x, bleed: _ } = this, y = x.data.map((S, H) => ({
2340
+ index: H,
2341
+ datum: S
2342
+ })).filter((S) => g.showEmptySegments || R(S.datum, g.value, S.index)), b = B(t) ? t : g.duration, [k, C, $, E] = Xe.map((S) => g.angleRange && g.angleRange[0] === S[0] && g.angleRange[1] === S[1]), L = k || $, T = C || E, Z = this._width * (T ? 2 : 1), X = this._height * (L ? 2 : 1), P = g.radius || Math.min(Z - _.left - _.right, X - _.top - _.bottom) / 2, nt = g.arcWidth === 0 ? 0 : I(P - g.arcWidth, 0, P - 1), st = this._height / 2 + (k ? P / 2 : $ ? -P / 2 : 0), ut = this._width / 2 + (E ? P / 2 : C ? -P / 2 : 0), te = `translate(${ut},${st})`;
2343
+ this.arcGroup.attr("transform", te), this.arcGen.startAngle((S) => S.startAngle).endAngle((S) => S.endAngle).innerRadius((S) => S.innerRadius).outerRadius((S) => S.outerRadius).padAngle((S) => S.padAngle).cornerRadius(g.cornerRadius);
2344
+ const Je = Ri().startAngle((i = (e = g.angleRange) === null || e === void 0 ? void 0 : e[0]) !== null && i !== void 0 ? i : 0).endAngle((o = (s = g.angleRange) === null || s === void 0 ? void 0 : s[1]) !== null && o !== void 0 ? o : 2 * Math.PI).padAngle(g.padAngle).value((S) => R(S.datum, g.value, S.index) || 0).sort((S, H) => {
2345
+ var Dt;
2346
+ return (Dt = g.sortFunction) === null || Dt === void 0 ? void 0 : Dt.call(g, S.datum, H.datum);
2347
+ })(y).map((S) => {
2348
+ const H = Object.assign(Object.assign({}, S), {
2349
+ data: S.data.datum,
2350
+ index: S.data.index,
2351
+ innerRadius: nt,
2352
+ outerRadius: P
2353
+ });
2354
+ return g.showEmptySegments && S.endAngle - S.startAngle - S.padAngle <= Number.EPSILON && (H.endAngle = S.startAngle + Math.max(g.emptySegmentAngle, g.padAngle), H.padAngle = S.padAngle / 2), H;
2355
+ }), Rt = this.arcGroup.selectAll(`.${Nt}`).data(Je, (S) => g.id(S.data, S.index)), Ke = Rt.enter().append("path").attr("class", Nt).call(es, g), ee = Rt.merge(Ke);
2356
+ ee.call(is, g, this.arcGen, b), ee.sort((S, H) => H.value - S.value), Rt.exit().attr("class", qe).call(ns, b);
2357
+ const ie = C ? "start" : E ? "end" : "middle";
2358
+ this.centralLabel.attr("dy", g.centralSubLabel ? "-0.55em" : null).style("text-anchor", ie).text((a = g.centralLabel) !== null && a !== void 0 ? a : null), this.centralSubLabel.attr("dy", g.centralLabel ? "0.55em" : null).style("text-anchor", ie).text((l = g.centralSubLabel) !== null && l !== void 0 ? l : null), g.centralSubLabelWrap && Fe(this.centralSubLabel, nt * 1.9);
2359
+ const ti = (g.centralLabelOffsetX || 0) + ut;
2360
+ let ne = (g.centralLabelOffsetY || 0) + st;
2361
+ L && g.centralLabelOffsetX === void 0 && g.centralLabelOffsetY === void 0 && (ne = (k ? -this.centralSubLabel.node().getBoundingClientRect().height : $ ? this.centralLabel.node().getBoundingClientRect().height : 0) + st);
2362
+ const se = `translate(${ti},${ne})`;
2363
+ this.centralLabel.attr("transform", se), this.centralSubLabel.attr("transform", se), this.arcBackground.attr("class", je).attr("visibility", g.showBackground ? null : "hidden").attr("transform", te), O(this.arcBackground, b).attr("d", this.arcGen({
2364
+ startAngle: (d = (c = (r = g.backgroundAngleRange) === null || r === void 0 ? void 0 : r[0]) !== null && c !== void 0 ? c : (h = g.angleRange) === null || h === void 0 ? void 0 : h[0]) !== null && d !== void 0 ? d : 0,
2365
+ endAngle: (m = (p = (u = g.backgroundAngleRange) === null || u === void 0 ? void 0 : u[1]) !== null && p !== void 0 ? p : (f = g.angleRange) === null || f === void 0 ? void 0 : f[1]) !== null && m !== void 0 ? m : 2 * Math.PI,
2366
+ innerRadius: nt,
2367
+ outerRadius: P
2368
+ }));
2369
+ }
2370
+ }
2371
+ as.selectors = os;
2372
+ export {
2373
+ jn as A,
2374
+ Kn as C,
2375
+ as as D,
2376
+ Tn as G,
2377
+ Zt as L,
2378
+ Cs as S,
2379
+ _n as T,
2380
+ ws as X,
2381
+ K as i
2382
+ };