@ids-group-ltd/ids-design-system 1.1.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/CHANGELOG.md +755 -0
  2. package/agent/INDEX.md +8 -7
  3. package/agent/charts/ds-scatter-chart.md +1 -1
  4. package/agent/feedback/ds-badge.md +2 -2
  5. package/agent/feedback/ds-chat-message.md +1 -1
  6. package/agent/feedback/ds-chat-step.md +2 -2
  7. package/agent/feedback/ds-chat-thread.md +1 -1
  8. package/agent/feedback/ds-stat.md +1 -1
  9. package/agent/feedback/ds-toast.md +2 -2
  10. package/agent/feedback/ds-tree.md +1 -1
  11. package/agent/forms/ds-button.md +3 -3
  12. package/agent/forms/ds-dropzone.md +1 -1
  13. package/agent/forms/ds-icon-button.md +3 -3
  14. package/agent/forms/ds-number-stepper.md +3 -3
  15. package/agent/forms/ds-search.md +1 -1
  16. package/agent/forms/ds-split-button.md +1 -1
  17. package/agent/foundations/tokens.md +4 -3
  18. package/agent/navigation/ds-app-layout.md +1 -1
  19. package/agent/navigation/ds-nav-divider.md +6 -0
  20. package/agent/navigation/{ds-sidenav-footer.md → ds-nav-footer.md} +3 -3
  21. package/agent/navigation/{ds-sidenav-group.md → ds-nav-group.md} +2 -2
  22. package/agent/navigation/{ds-sidenav-item.md → ds-nav-item.md} +6 -6
  23. package/agent/navigation/ds-nav.md +15 -0
  24. package/agent/overlays/ds-drawer.md +1 -1
  25. package/agent/platform/toast-service.md +1 -1
  26. package/components/README.md +24 -24
  27. package/components.md +51 -45
  28. package/design-system.md +8 -7
  29. package/eslint/deprecated-api.json +108 -7
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +2 -2
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +2 -2
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +4 -4
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +4 -4
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -1
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +2 -2
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +2 -2
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-badge-badge-count-roll.component-BDNXADJZ.mjs +182 -0
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-badge-badge-count-roll.component-BDNXADJZ.mjs.map +1 -0
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +37 -8
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -1
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +5 -2
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -1
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs +2 -2
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs.map +1 -1
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +76 -5
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +2 -2
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +2 -2
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +2 -2
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs +77 -18
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs.map +1 -1
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +2 -2
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -2
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +2 -2
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-definition-term.mjs +2 -2
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-definition-term.mjs.map +1 -1
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +2 -2
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
  71. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +65 -4
  72. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
  73. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +76 -9
  74. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
  75. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +2 -2
  76. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
  77. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +2 -2
  78. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +2 -2
  79. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
  80. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +6 -4
  81. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
  82. package/fesm2022/ids-group-ltd-ids-design-system-components-info-hint.mjs +2 -2
  83. package/fesm2022/ids-group-ltd-ids-design-system-components-info-hint.mjs.map +1 -1
  84. package/fesm2022/ids-group-ltd-ids-design-system-components-inline-edit.mjs +2 -2
  85. package/fesm2022/ids-group-ltd-ids-design-system-components-inline-edit.mjs.map +1 -1
  86. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -2
  87. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
  88. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -2
  89. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +4 -4
  90. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
  91. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +2 -2
  92. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  93. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +2 -2
  94. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  95. package/fesm2022/ids-group-ltd-ids-design-system-components-nav-footer.mjs +113 -0
  96. package/fesm2022/ids-group-ltd-ids-design-system-components-nav-footer.mjs.map +1 -0
  97. package/fesm2022/ids-group-ltd-ids-design-system-components-nav.mjs +228 -0
  98. package/fesm2022/ids-group-ltd-ids-design-system-components-nav.mjs.map +1 -0
  99. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +61 -10
  100. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
  101. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -2
  102. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
  103. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +36 -4
  104. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
  105. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +2 -2
  106. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +2 -2
  107. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
  108. package/fesm2022/ids-group-ltd-ids-design-system-components-reveal.mjs +56 -0
  109. package/fesm2022/ids-group-ltd-ids-design-system-components-reveal.mjs.map +1 -0
  110. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +10 -39
  111. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
  112. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +7 -4
  113. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
  114. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +33 -6
  115. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
  116. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +2 -2
  117. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  118. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +4 -98
  119. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -1
  120. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +11 -179
  121. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
  122. package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +2 -2
  123. package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -1
  124. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +2 -2
  125. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
  126. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +3 -2
  127. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -1
  128. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +68 -5
  129. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
  130. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +2 -2
  131. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
  132. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +2 -2
  133. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
  134. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +2 -2
  135. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
  136. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  137. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  138. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +41 -3
  139. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
  140. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +2 -2
  141. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
  142. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +6 -4
  143. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
  144. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +4 -4
  145. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  146. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +27 -7
  147. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
  148. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +54 -19
  149. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
  150. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +2 -2
  151. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -1
  152. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +8 -7
  153. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
  154. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +21 -11
  155. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
  156. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +2 -2
  157. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -1
  158. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +153 -1
  159. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  160. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +11 -0
  161. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  162. package/fesm2022/ids-group-ltd-ids-design-system.mjs +4 -1
  163. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  164. package/migrations/1.1.1.json +14 -4
  165. package/migrations/1.1.2.json +11 -3
  166. package/migrations/1.2.0.json +1433 -0
  167. package/migrations/README.md +8 -1
  168. package/package.json +25 -1
  169. package/schematics/check-overrides/index.cjs +28 -3
  170. package/schematics/check-overrides/scan.cjs +151 -2
  171. package/schematics/check-overrides/schema.json +4 -0
  172. package/schematics/check-overrides/surface.json +389 -74
  173. package/schematics/collection.json +1 -1
  174. package/stylelint/deprecated-tokens.json +7 -0
  175. package/styles/_check-box.scss +4 -3
  176. package/styles/_dropdown-overlay.scss +6 -8
  177. package/styles/_ds-color.scss +7 -2
  178. package/styles/_field-state.scss +4 -2
  179. package/styles/_focus.scss +12 -5
  180. package/styles/_link.scss +4 -4
  181. package/styles/_optical-center.scss +29 -0
  182. package/styles/_reveal.scss +8 -0
  183. package/styles/_status.scss +17 -7
  184. package/styles/_step-marker.scss +192 -6
  185. package/styles/_surface-level.scss +16 -0
  186. package/styles/_text-shimmer.scss +21 -0
  187. package/styles/_theme-activation.scss +17 -4
  188. package/styles/_tokens.scss +26 -7
  189. package/styles/ds.scss +1 -0
  190. package/themes/README.md +16 -21
  191. package/themes/_semantic.scss +129 -64
  192. package/themes/dark/_theme.scss +17 -25
  193. package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +3 -3
  194. package/types/ids-group-ltd-ids-design-system-components-auth-layout.d.ts +2 -2
  195. package/types/ids-group-ltd-ids-design-system-components-badge.d.ts +20 -1
  196. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +14 -3
  197. package/types/ids-group-ltd-ids-design-system-components-chat.d.ts +49 -4
  198. package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +9 -1
  199. package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +28 -2
  200. package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +8 -5
  201. package/types/ids-group-ltd-ids-design-system-components-nav-footer.d.ts +88 -0
  202. package/types/ids-group-ltd-ids-design-system-components-nav.d.ts +152 -0
  203. package/types/ids-group-ltd-ids-design-system-components-number-stepper.d.ts +21 -3
  204. package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +1 -0
  205. package/types/ids-group-ltd-ids-design-system-components-reveal.d.ts +31 -0
  206. package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +2 -8
  207. package/types/ids-group-ltd-ids-design-system-components-search.d.ts +4 -1
  208. package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +3 -0
  209. package/types/ids-group-ltd-ids-design-system-components-sidenav-footer.d.ts +12 -83
  210. package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +21 -131
  211. package/types/ids-group-ltd-ids-design-system-components-split-button.d.ts +1 -1
  212. package/types/ids-group-ltd-ids-design-system-components-stat.d.ts +10 -1
  213. package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +1 -0
  214. package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +1 -1
  215. package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +3 -1
  216. package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +27 -6
  217. package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +9 -5
  218. package/types/ids-group-ltd-ids-design-system-components.d.ts +26 -1
  219. package/types/ids-group-ltd-ids-design-system-core.d.ts +19 -1
  220. package/types/ids-group-ltd-ids-design-system.d.ts +7 -4
  221. package/agent/navigation/ds-sidenav.md +0 -13
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components.mjs","sources":["../../../src/lib/components/brand-defaults.ts","../../../src/lib/components/chart-palette.generated.ts","../../../src/lib/components/charts-format.ts","../../../src/lib/components/charts-measure.ts","../../../src/lib/components/charts-render-gate.ts","../../../src/lib/components/charts-label-fit.ts","../../../src/lib/components/charts-decimate.ts","../../../src/lib/components/charts-path.ts","../../../src/lib/components/charts-scale.ts","../../../src/lib/components/charts-motion.ts","../../../src/lib/components/charts-skeleton.ts","../../../src/lib/components/charts-dwell.ts","../../../src/lib/components/charts-roving.ts","../../../src/lib/components/charts-summary.ts","../../../src/lib/components/chip-overflow.ts","../../../src/lib/components/chip-template.directive.ts","../../../src/lib/components/field-defaults.ts","../../../src/lib/components/field-errors.ts","../../../src/lib/components/message-base.ts","../../../src/lib/components/field-base.ts","../../../src/lib/components/control-value-accessor.ts","../../../src/lib/components/create-template.directive.ts","../../../src/lib/components/destination.ts","../../../src/lib/components/empty-template.directive.ts","../../../src/lib/components/charts-defaults.ts","../../../src/lib/components/charts-base.ts","../../../src/lib/components/field-click-focus.directive.ts","../../../src/lib/components/focus-rescue.ts","../../../src/lib/components/field-ids.ts","../../../src/lib/components/group-label-template.directive.ts","../../../src/lib/components/option-template.directive.ts","../../../src/lib/components/overlay-motion.ts","../../../src/lib/components/panel-footer-template.directive.ts","../../../src/lib/components/panel-header-template.directive.ts","../../../src/lib/components/picker-announcer.ts","../../../src/lib/components/picker-trigger.directive.ts","../../../src/lib/components/projection-dropped.directive.ts","../../../src/lib/components/scroll-active-option.ts","../../../src/lib/components/static-preview.directive.ts","../../../src/lib/components/type-ahead.ts","../../../src/lib/components/ids-group-ltd-ids-design-system-components.ts"],"sourcesContent":["import { Signal, computed, inject } from '@angular/core';\nimport { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';\n\n/**\n * Resolves one brand string against the app-level default. `null` means unset;\n * `''` is an explicit \"this screen has no brand\". Each field resolves on its own.\n * @internal\n */\nexport function resolveBrandValue(\n value: Signal<string | null>,\n key: 'name' | 'logoLetter' | 'tagline',\n): Signal<string> {\n const config = inject(DS_CONFIG);\n\n return computed(() => value() ?? config.brand?.[key] ?? '');\n}\n","// GENERATED by tools/generate-chart-palette.mjs. Do not edit. Values are var()\n// references, not resolved colours, so a consumer overriding the token still wins\n// at runtime.\n\n/** @internal Exported for the chart entry points that import it across the boundary;\n * not part of the package surface. */\nexport const chartColors = {\n series1: 'var(--ds-chart-series-1-color)',\n series2: 'var(--ds-chart-series-2-color)',\n series3: 'var(--ds-chart-series-3-color)',\n series4: 'var(--ds-chart-series-4-color)',\n series5: 'var(--ds-chart-series-5-color)',\n series6: 'var(--ds-chart-series-6-color)',\n series7: 'var(--ds-chart-series-7-color)',\n series8: 'var(--ds-chart-series-8-color)',\n seriesDefault: 'var(--ds-chart-series-default-color)',\n seriesAccent: 'var(--ds-chart-series-accent-color)',\n ramp1: 'var(--ds-chart-ramp-1-color)',\n ramp2: 'var(--ds-chart-ramp-2-color)',\n ramp3: 'var(--ds-chart-ramp-3-color)',\n ramp4: 'var(--ds-chart-ramp-4-color)',\n ramp5: 'var(--ds-chart-ramp-5-color)',\n ramp6: 'var(--ds-chart-ramp-6-color)',\n ramp7: 'var(--ds-chart-ramp-7-color)',\n ramp8: 'var(--ds-chart-ramp-8-color)',\n heat1: 'var(--ds-chart-heat-1-color)',\n heat2: 'var(--ds-chart-heat-2-color)',\n heat3: 'var(--ds-chart-heat-3-color)',\n heat4: 'var(--ds-chart-heat-4-color)',\n heat5: 'var(--ds-chart-heat-5-color)',\n heat6: 'var(--ds-chart-heat-6-color)',\n heat7: 'var(--ds-chart-heat-7-color)',\n heat8: 'var(--ds-chart-heat-8-color)',\n} as const;\n\n/** @internal See chartColors. */\nexport const CHART_SERIES_COLORS: readonly string[] = [\n chartColors.series1,\n chartColors.series2,\n chartColors.series3,\n chartColors.series4,\n chartColors.series5,\n chartColors.series6,\n chartColors.series7,\n chartColors.series8,\n];\n\n/** @internal See chartColors. */\nexport const CHART_RAMP_COLORS: readonly string[] = [\n chartColors.ramp1,\n chartColors.ramp2,\n chartColors.ramp3,\n chartColors.ramp4,\n chartColors.ramp5,\n chartColors.ramp6,\n chartColors.ramp7,\n chartColors.ramp8,\n];\n\n/** @internal See chartColors. */\nexport const CHART_HEAT_COLORS: readonly string[] = [\n chartColors.heat1,\n chartColors.heat2,\n chartColors.heat3,\n chartColors.heat4,\n chartColors.heat5,\n chartColors.heat6,\n chartColors.heat7,\n chartColors.heat8,\n];\n","import type { ChartValueFormat } from '@ids-group-ltd/ids-design-system/core';\n\nconst numberFormatters = new Map<string, Intl.NumberFormat>();\n\nfunction numberFormatter(locale: string | undefined): Intl.NumberFormat {\n const key = locale ?? 'default';\n let formatter = numberFormatters.get(key);\n if (!formatter) {\n formatter = new Intl.NumberFormat(locale);\n numberFormatters.set(key, formatter);\n }\n\n return formatter;\n}\n\n/** @internal */\nexport function formatValue(value: number, locale?: string): string {\n if (!Number.isFinite(value)) {\n return '—';\n }\n\n return numberFormatter(locale).format(value);\n}\n\nconst chartFormats = new Map<string, ChartValueFormat>();\n\n/** The built-in `valueFormat` in one locale: compact on a tick (`1.2M`), spelled out everywhere\n * else (`1,248,392`). A caller-supplied formatter receives the same `location`.\n *\n * @internal */\nexport function chartValueFormat(locale: string): ChartValueFormat {\n let format = chartFormats.get(locale);\n if (!format) {\n const compact = new Intl.NumberFormat(locale, {\n notation: 'compact',\n maximumFractionDigits: 1,\n });\n const full = new Intl.NumberFormat(locale);\n format = (value, location) =>\n !Number.isFinite(value)\n ? '—'\n : location === 'tick'\n ? compact.format(value)\n : full.format(value);\n chartFormats.set(locale, format);\n }\n\n return format;\n}\n\nconst percentFormatters = new Map<string, Intl.NumberFormat>();\n\nfunction percentFormatter(locale: string, digits: 0 | 1): Intl.NumberFormat {\n const key = `${locale}|${digits}`;\n let formatter = percentFormatters.get(key);\n if (!formatter) {\n formatter = new Intl.NumberFormat(locale, {\n style: 'percent',\n minimumFractionDigits: digits,\n maximumFractionDigits: digits,\n });\n percentFormatters.set(key, formatter);\n }\n\n return formatter;\n}\n\n/** @internal */\nexport function formatPercent(\n value: number,\n total: number,\n locale: string,\n): string {\n if (!total || !Number.isFinite(value) || !Number.isFinite(total)) {\n return '—';\n }\n const fraction = value / total;\n const formatter = percentFormatter(locale, 1);\n // A real share must never print as an exact zero.\n if (fraction !== 0 && Math.abs(fraction) < 0.0005) {\n return fraction > 0\n ? `<${formatter.format(0.001)}`\n : `>${formatter.format(-0.001)}`;\n }\n\n return formatter.format(fraction);\n}\n\n/** A whole-number percentage (the pie's largest-remainder shares), in `locale`.\n *\n * @internal */\nexport function formatWholePercent(percent: number, locale: string): string {\n return percentFormatter(locale, 0).format(percent / 100);\n}\n\n/** Whole percentages that sum to exactly 100 (rounding each alone gives 33/33/33).\n *\n * @internal */\nexport function largestRemainder(values: readonly number[]): number[] {\n const total = values.reduce((sum, value) => sum + value, 0);\n if (!total) {\n return values.map(() => 0);\n }\n const exact = values.map((value) => (value / total) * 100);\n const floors = exact.map(Math.floor);\n let remaining = 100 - floors.reduce((sum, value) => sum + value, 0);\n const order = exact\n .map((value, index) => ({ index, fraction: value - Math.floor(value) }))\n .sort((a, b) => b.fraction - a.fraction);\n const result = [...floors];\n for (const { index } of order) {\n if (remaining <= 0) {\n break;\n }\n result[index]++;\n remaining--;\n }\n\n return result;\n}\n\n/** @internal */\nexport function formatTick(value: number, step: number): string {\n if (!Number.isFinite(value)) {\n return '';\n }\n if (Math.abs(value) < 1000) {\n return String(value);\n }\n\n // The unit follows the step, not the value, so every label on an axis shares a suffix.\n const units = [\n { suffix: 'B', scale: 1e9 },\n { suffix: 'M', scale: 1e6 },\n { suffix: 'K', scale: 1e3 },\n ];\n const unit =\n units.find((candidate) => Math.abs(step) >= candidate.scale) ?? units[2];\n const scaled = value / unit.scale;\n\n // A step that divides its unit evenly needs no decimal; otherwise exactly one on every label.\n // Rounding the whole branch keeps a raw datum from printing 987.654321M.\n return step % unit.scale === 0\n ? `${Math.round(scaled)}${unit.suffix}`\n : `${scaled.toFixed(1)}${unit.suffix}`;\n}\n\n/** One mark's share of the total its siblings add up to, as a bare percentage; empty for a lone mark,\n * and for a negative or non-finite reading (excluded from the total, not subtracted).\n *\n * @internal */\nexport function shareOfTotal(\n values: readonly number[],\n index: number,\n locale: string,\n): string {\n const value = values[index];\n if (values.length < 2 || !Number.isFinite(value) || value <= 0) {\n return '';\n }\n const total = values\n .filter((entry) => Number.isFinite(entry) && entry > 0)\n .reduce((sum, entry) => sum + entry, 0);\n\n return total > 0 ? formatPercent(value, total, locale) : '';\n}\n\n/** The same share, phrased for a tooltip line.\n *\n * @internal */\nexport function describeShare(\n values: readonly number[],\n index: number,\n locale: string,\n phrase: (share: string) => string,\n): string {\n const share = shareOfTotal(values, index, locale);\n\n return share ? phrase(share) : '';\n}\n","import {\n DestroyRef,\n ElementRef,\n PLATFORM_ID,\n Signal,\n WritableSignal,\n effect,\n inject,\n signal,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\n/** Container width as a signal; 0 under SSR, while `display: none`, and before the first observation.\n *\n * @internal */\nexport function elementWidth(host: ElementRef<HTMLElement>): Signal<number> {\n const width = signal(0);\n if (!isPlatformBrowser(inject(PLATFORM_ID))) {\n return width.asReadonly();\n }\n\n inject(DestroyRef).onDestroy(watchElementWidth(host.nativeElement, width));\n\n return width.asReadonly();\n}\n\n/** Writes `element`'s rounded content width into `width` on every change, through the one observer\n * every chart shares. Returns the call that stops it.\n *\n * @internal */\nexport function watchElementWidth(\n element: Element,\n width: WritableSignal<number>,\n): () => void {\n widths.set(element, width);\n sharedObserver().observe(element);\n\n return () => {\n sharedObserver().unobserve(element);\n widths.delete(element);\n };\n}\n\n/** `read(host)` as a signal, re-read whenever the host's width changes, so a geometry token re-pointed\n * at a breakpoint reaches the chart. `initial` until the host is laid out, and under SSR.\n *\n * @internal */\nexport function readOnHostResize<T>(\n host: ElementRef<HTMLElement>,\n read: (element: HTMLElement) => T,\n initial: T,\n equal: (previous: T, next: T) => boolean,\n): Signal<T> {\n const width = elementWidth(host);\n const value = signal(initial, { equal });\n effect(() => {\n if (width() > 0) {\n value.set(read(host.nativeElement));\n }\n });\n\n return value.asReadonly();\n}\n\nconst fontsReady = signal(false);\nlet fontsWatched = false;\n\n/** `true` once the page's web fonts have loaded, for an effect that measures rendered text: reading\n * it re-runs the measure taken against the fallback face. The wait starts on the first call, so\n * call it in the browser, after the text it measures has rendered.\n *\n * @internal */\nexport function fontsLoaded(): boolean {\n if (!fontsWatched) {\n fontsWatched = true;\n void document.fonts?.ready.then(() => fontsReady.set(true));\n }\n\n return fontsReady();\n}\n\nconst widths = new WeakMap<Element, WritableSignal<number>>();\nlet observer: ResizeObserver | null = null;\n\n// One observer for every chart on the page: a resize is one callback carrying every entry.\nfunction sharedObserver(): ResizeObserver {\n observer ??= new ResizeObserver((entries) => {\n for (const entry of entries) {\n widths.get(entry.target)?.set(Math.round(entry.contentRect.width));\n }\n });\n\n return observer;\n}\n","import {\n DestroyRef,\n ElementRef,\n InjectionToken,\n PLATFORM_ID,\n Signal,\n afterNextRender,\n inject,\n signal,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';\n\n/** Provided by a chart that has already waited for the viewport, so its `ds-chart` builds at once.\n *\n * @internal */\nexport const CHART_RENDER_GATE_PASSED = new InjectionToken<boolean>(\n 'CHART_RENDER_GATE_PASSED',\n);\n\ntype Build = () => void;\n\nconst builders = new WeakMap<Element, Build>();\nconst near = new Map<Element, Build>();\nconst ahead = new Map<Element, Build>();\nconst observers = new Map<Element | null, Map<string, IntersectionObserver>>();\nlet draining = false;\nlet idleScheduled = false;\nlet budgetMs = 8;\n\nfunction drain(): void {\n const start = performance.now();\n for (const [host, build] of near) {\n if (performance.now() - start > budgetMs) {\n setTimeout(drain);\n\n return;\n }\n near.delete(host);\n build();\n }\n draining = false;\n}\n\n// An idle period with less than this left would run a build into the next frame.\nconst IDLE_ROOM_MS = 12;\n\nfunction buildWhileIdle(deadline: IdleDeadline): void {\n idleScheduled = false;\n for (const [host, build] of ahead) {\n if (deadline.timeRemaining() < IDLE_ROOM_MS) {\n break;\n }\n ahead.delete(host);\n build();\n }\n scheduleIdle();\n}\n\nfunction scheduleIdle(): void {\n if (\n idleScheduled ||\n !ahead.size ||\n typeof requestIdleCallback === 'undefined'\n ) {\n return;\n }\n idleScheduled = true;\n requestIdleCallback(buildWhileIdle);\n}\n\nfunction observer(\n root: Element | null,\n margin: string,\n queue: Map<Element, Build>,\n schedule: () => void,\n): IntersectionObserver {\n let byMargin = observers.get(root);\n if (!byMargin) {\n byMargin = new Map();\n observers.set(root, byMargin);\n }\n const key = `${queue === near ? 'near' : 'ahead'} ${margin}`;\n let found = byMargin.get(key);\n if (!found) {\n found = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n const build = builders.get(entry.target);\n if (build && entry.isIntersecting) {\n queue.set(entry.target, build);\n } else {\n queue.delete(entry.target);\n }\n }\n schedule();\n },\n { root, rootMargin: margin },\n );\n byMargin.set(key, found);\n }\n\n return found;\n}\n\nfunction scheduleDrain(): void {\n if (near.size && !draining) {\n draining = true;\n setTimeout(drain);\n }\n}\n\n// A margin on the root only widens the root: an element in a scrolling container is clipped by it\n// first, so the container must be the root. Overflow alone is not enough (a sideways-only scroller\n// computes `overflow-y: auto` too), so it must also be taller inside than out.\nfunction scrollRoot(host: Element): Element | null {\n for (let node = host.parentElement; node; node = node.parentElement) {\n const overflow = getComputedStyle(node).overflowY;\n if (\n (overflow === 'auto' ||\n overflow === 'scroll' ||\n overflow === 'overlay') &&\n node.scrollHeight > node.clientHeight\n ) {\n return node;\n }\n }\n\n return null;\n}\n\n/** Whether a chart may build its plot yet, under `DS_CONFIG.chart.rendering`. `true` from the start\n * unless `deferUntilVisible` is on; then `true` once the chart nears the viewport or is built ahead\n * while the page is idle, and it stays `true`. Call from an injection context.\n *\n * @internal */\nexport function chartRenderGate(): Signal<boolean> {\n const rendering = inject(DS_CONFIG).chart?.rendering;\n // `skipSelf`: a preset provides the token to its own view and must not read it back.\n const passed = inject(CHART_RENDER_GATE_PASSED, {\n optional: true,\n skipSelf: true,\n });\n if (\n !rendering?.deferUntilVisible ||\n passed ||\n !isPlatformBrowser(inject(PLATFORM_ID)) ||\n typeof IntersectionObserver === 'undefined'\n ) {\n return signal(true).asReadonly();\n }\n\n const ready = signal(false);\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n budgetMs = rendering.frameBudgetMs ?? budgetMs;\n const skipWhileOffscreen = rendering.skipWhileOffscreen ?? true;\n let release: () => void = () => undefined;\n\n afterNextRender(() => {\n const root = scrollRoot(host);\n const watchers = [\n observer(root, rendering.visibleMargin ?? '10% 0px', near, scheduleDrain),\n ];\n if (rendering.buildAheadWhileIdle ?? true) {\n watchers.push(\n observer(\n root,\n rendering.buildAheadMargin ?? '100% 0px',\n ahead,\n scheduleIdle,\n ),\n );\n }\n release = () => {\n for (const watcher of watchers) {\n watcher.unobserve(host);\n }\n near.delete(host);\n ahead.delete(host);\n };\n builders.set(host, () => {\n release();\n if (skipWhileOffscreen) {\n // `auto` remembers the last rendered height, so skipping moves nothing.\n host.style.contentVisibility = 'auto';\n host.style.containIntrinsicBlockSize = 'auto 300px';\n }\n ready.set(true);\n });\n for (const watcher of watchers) {\n watcher.observe(host);\n }\n });\n inject(DestroyRef).onDestroy(() => release());\n\n return ready.asReadonly();\n}\n","/** A label turned 45 degrees takes this fraction of its width across the axis. */\nconst ROTATED_FOOTPRINT = Math.sin(Math.PI / 4);\n\n/** Labels that merely fail to overlap read as one run, so a footprint is its width plus this. */\nconst LABEL_GAP = 16;\n\n/** The widest label decides for all.\n *\n * @internal */\nexport function labelInterval(\n labelWidths: readonly number[],\n step: number,\n rotated: boolean,\n): number {\n const usable = labelWidths.filter((width) => Number.isFinite(width));\n if (usable.length === 0 || !Number.isFinite(step) || step <= 0) {\n return 1;\n }\n const widest = usable.reduce((max, width) => Math.max(max, width), 0);\n const footprint = (rotated ? widest * ROTATED_FOOTPRINT : widest) + LABEL_GAP;\n\n return Math.max(1, Math.ceil(footprint / step));\n}\n\n/** Asked before thinning: a tilt is spent before a reading.\n *\n * @internal */\nexport function rotationWouldFit(\n labelWidths: readonly number[],\n step: number,\n): boolean {\n return (\n labelInterval(labelWidths, step, false) > 1 &&\n labelInterval(labelWidths, step, true) === 1\n );\n}\n","/** One reading on two continuous scales. Structural, so the shared entry point names no chart's own type. */\ninterface Reading {\n readonly x: number;\n readonly y: number;\n}\n\n/** A series only decimates past four times the target: below that the saving is invisible and the loss of detail is not. */\nconst DECIMATION_HEADROOM = 4;\n\n/** How many marks the plot can carry: one per pixel of its width.\n *\n * @internal */\nexport function decimationTarget(plotWidth: number): number {\n return Number.isFinite(plotWidth) && plotWidth > 0\n ? Math.floor(plotWidth)\n : 0;\n}\n\n/** @internal */\nexport function needsDecimating(count: number, target: number): boolean {\n return target > 0 && count > target * DECIMATION_HEADROOM;\n}\n\n/** Buckets the series by position and keeps each bucket's highest and lowest reading.\n *\n * The default: a bucket's extremum is in the output by construction, so a spike cannot be dropped,\n * and the result is stable while panning.\n *\n * @internal */\nexport function minMaxDecimate(\n points: readonly Reading[],\n target: number,\n): readonly Reading[] {\n if (target <= 0 || points.length <= target) {\n return points;\n }\n const buckets = Math.max(1, Math.floor(target / 2));\n const size = points.length / buckets;\n const kept: Reading[] = [];\n\n for (let bucket = 0; bucket < buckets; bucket++) {\n const from = Math.floor(bucket * size);\n const to = Math.min(points.length, Math.floor((bucket + 1) * size));\n if (from >= to) {\n continue;\n }\n let lowest = points[from];\n let highest = points[from];\n for (let index = from + 1; index < to; index++) {\n if (points[index].y < lowest.y) {\n lowest = points[index];\n }\n if (points[index].y > highest.y) {\n highest = points[index];\n }\n }\n const [first, second] =\n lowest.x <= highest.x ? [lowest, highest] : [highest, lowest];\n kept.push(first);\n if (second !== first) {\n kept.push(second);\n }\n }\n\n return kept;\n}\n\n/** Largest Triangle Three Buckets: keeps the reading in each bucket that makes the biggest triangle\n * with the point already kept and the next bucket's centre of mass.\n *\n * Draws a truer shape than MinMax at the same budget but does not promise the extremum: use where\n * the outline is the reading.\n *\n * @internal */\nexport function lttbDecimate(\n points: readonly Reading[],\n target: number,\n): readonly Reading[] {\n if (target <= 2 || points.length <= target) {\n return points;\n }\n const kept: Reading[] = [points[0]];\n const size = (points.length - 2) / (target - 2);\n let previous = points[0];\n\n for (let bucket = 0; bucket < target - 2; bucket++) {\n const from = Math.floor(bucket * size) + 1;\n const to = Math.min(points.length - 1, Math.floor((bucket + 1) * size) + 1);\n const nextFrom = to;\n const nextTo = Math.min(\n points.length - 1,\n Math.floor((bucket + 2) * size) + 1,\n );\n\n let averageX = 0;\n let averageY = 0;\n const span = Math.max(1, nextTo - nextFrom);\n for (let index = nextFrom; index < nextTo; index++) {\n averageX += points[index].x;\n averageY += points[index].y;\n }\n averageX /= span;\n averageY /= span;\n\n let best = points[from];\n let bestArea = -1;\n for (let index = from; index < to; index++) {\n const area = Math.abs(\n (previous.x - averageX) * (points[index].y - previous.y) -\n (previous.x - points[index].x) * (averageY - previous.y),\n );\n if (area > bestArea) {\n bestArea = area;\n best = points[index];\n }\n }\n kept.push(best);\n previous = best;\n }\n\n kept.push(points[points.length - 1]);\n\n return kept;\n}\n","import type { ChartCurve } from '@ids-group-ltd/ids-design-system/core';\n\n/** One plotted reading, in the canvas's own coordinates.\n *\n * @internal */\nexport interface LinePoint {\n readonly categoryIndex: number;\n readonly x: number;\n readonly y: number;\n readonly value: number;\n}\n\nconst COORDINATE_DECIMALS = 2;\n\nfunction roundTo(value: number, decimals: number): number {\n if (!Number.isFinite(value)) {\n return 0;\n }\n\n return Number(value.toFixed(decimals));\n}\n\nfunction isPlottable(point: LinePoint): boolean {\n return Number.isFinite(point.x) && Number.isFinite(point.y);\n}\n\nfunction coordinatePair(point: LinePoint): string {\n return `${roundTo(point.x, COORDINATE_DECIMALS)},${roundTo(point.y, COORDINATE_DECIMALS)}`;\n}\n\n/** The unbroken runs of a series: a missing reading ends one run and starts the next.\n *\n * @internal */\nexport function lineSegments(\n points: readonly (LinePoint | null)[],\n): LinePoint[][] {\n const segments: LinePoint[][] = [];\n let current: LinePoint[] = [];\n for (const point of points) {\n if (point === null) {\n if (current.length > 0) {\n segments.push(current);\n }\n current = [];\n } else {\n current.push(point);\n }\n }\n if (current.length > 0) {\n segments.push(current);\n }\n\n return segments;\n}\n\n/** Fritsch-Carlson tangents: the slope at each reading, clamped so no segment turns back on itself.\n * A zero slope on either side pins the tangent flat, keeping a plateau flat. */\nfunction monotoneTangents(segment: readonly LinePoint[]): number[] {\n const count = segment.length;\n const secants: number[] = [];\n for (let index = 0; index < count - 1; index++) {\n const run = segment[index + 1].x - segment[index].x;\n secants.push(\n run === 0 ? 0 : (segment[index + 1].y - segment[index].y) / run,\n );\n }\n\n const tangents = [secants[0]];\n for (let index = 1; index < count - 1; index++) {\n const before = secants[index - 1];\n const after = secants[index];\n tangents.push(before * after <= 0 ? 0 : (before + after) / 2);\n }\n tangents.push(secants[count - 2]);\n\n for (let index = 0; index < count - 1; index++) {\n const secant = secants[index];\n if (secant === 0) {\n tangents[index] = 0;\n tangents[index + 1] = 0;\n continue;\n }\n // Tangent within three times its secant keeps the cubic monotone on that span.\n const alpha = tangents[index] / secant;\n const beta = tangents[index + 1] / secant;\n const magnitude = Math.hypot(alpha, beta);\n if (magnitude > 3) {\n tangents[index] = (3 / magnitude) * alpha * secant;\n tangents[index + 1] = (3 / magnitude) * beta * secant;\n }\n }\n\n return tangents;\n}\n\nfunction smoothPath(segment: readonly LinePoint[]): string {\n const tangents = monotoneTangents(segment);\n let path = `M ${coordinatePair(segment[0])}`;\n for (let index = 0; index < segment.length - 1; index++) {\n const from = segment[index];\n const to = segment[index + 1];\n const third = (to.x - from.x) / 3;\n const firstControl = {\n x: from.x + third,\n y: from.y + tangents[index] * third,\n };\n const secondControl = {\n x: to.x - third,\n y: to.y - tangents[index + 1] * third,\n };\n path +=\n ` C ${roundTo(firstControl.x, COORDINATE_DECIMALS)},${roundTo(firstControl.y, COORDINATE_DECIMALS)}` +\n ` ${roundTo(secondControl.x, COORDINATE_DECIMALS)},${roundTo(secondControl.y, COORDINATE_DECIMALS)}` +\n ` ${coordinatePair(to)}`;\n }\n\n return path;\n}\n\n/** One unbroken run as a path `d`. `''` when a coordinate is unplottable (one `NaN` voids the attribute).\n *\n * @internal */\nexport function linePath(\n segment: readonly LinePoint[],\n curve: ChartCurve = 'linear',\n): string {\n if (segment.length === 0 || !segment.every(isPlottable)) {\n return '';\n }\n if (segment.length === 1 || curve === 'linear') {\n return `M ${segment.map((point) => coordinatePair(point)).join(' L ')}`;\n }\n if (curve === 'step') {\n let path = `M ${coordinatePair(segment[0])}`;\n for (const point of segment.slice(1)) {\n path += ` H ${roundTo(point.x, COORDINATE_DECIMALS)} V ${roundTo(point.y, COORDINATE_DECIMALS)}`;\n }\n\n return path;\n }\n\n return smoothPath(segment);\n}\n\n/** The filled band between two edges. The lower edge is walked backwards, so its curve is rebuilt\n * from the reversed points: a monotone cubic is not symmetric.\n *\n * @internal */\nexport function bandPath(\n upper: readonly LinePoint[],\n lower: readonly LinePoint[],\n curve: ChartCurve = 'linear',\n): string {\n if (\n upper.length < 2 ||\n upper.length !== lower.length ||\n !upper.every(isPlottable) ||\n !lower.every(isPlottable)\n ) {\n return '';\n }\n const back = linePath([...lower].reverse(), curve);\n\n return `${linePath(upper, curve)} L ${back.slice('M '.length)} Z`;\n}\n\n/** The same run as `linePath`, closed down to the baseline. It takes the curve so a fill and its\n * line share one edge.\n *\n * @internal */\nexport function areaPath(\n segment: readonly LinePoint[],\n baselineY: number,\n curve: ChartCurve = 'linear',\n): string {\n if (\n segment.length < 2 ||\n !Number.isFinite(baselineY) ||\n !segment.every(isPlottable)\n ) {\n return '';\n }\n const first = segment[0];\n const last = segment[segment.length - 1];\n const baseline = roundTo(baselineY, COORDINATE_DECIMALS);\n\n return `${linePath(segment, curve)} L ${roundTo(last.x, COORDINATE_DECIMALS)},${baseline} L ${roundTo(first.x, COORDINATE_DECIMALS)},${baseline} Z`;\n}\n","const E10 = Math.sqrt(50);\nconst E5 = Math.sqrt(10);\nconst E2 = Math.sqrt(2);\n\n/** d3's tick-increment rule: snaps to 1, 2, 5 or 10 times a power of ten, not `span / count` steps like 482. */\nfunction tickIncrement(span: number, targetCount: number): number {\n const step = span / Math.max(1, targetCount);\n const power = Math.floor(Math.log10(step));\n const error = step / Math.pow(10, power);\n const factor = error >= E10 ? 10 : error >= E5 ? 5 : error >= E2 ? 2 : 1;\n\n return factor * Math.pow(10, power);\n}\n\n/** The floor of a domain that has to include zero: zero for an all-positive series, else the most negative reading.\n *\n * @internal */\nexport function domainMinOf(values: readonly number[]): number {\n return values.reduce((min, value) => Math.min(min, value), 0);\n}\n\n/** @internal */\nexport function tickValues(\n domainMin: number,\n domainMax: number,\n targetCount: number,\n): number[] {\n const span = domainMax - domainMin;\n if (!Number.isFinite(span) || span <= 0) {\n return [0];\n }\n const step = tickIncrement(span, targetCount);\n const first = Math.floor(domainMin / step);\n const last = Math.ceil(domainMax / step);\n const out: number[] = [];\n for (let i = first; i <= last; i++) {\n out.push(i * step);\n }\n\n return out;\n}\n\n/** @internal */\nexport interface NiceDomain {\n readonly min: number;\n readonly max: number;\n}\n\n/** @internal */\nexport function niceDomain(\n domainMin: number,\n domainMax: number,\n targetCount: number,\n): NiceDomain {\n const span = domainMax - domainMin;\n if (!Number.isFinite(span) || span <= 0) {\n return { min: 0, max: 0 };\n }\n const step = tickIncrement(span, targetCount);\n\n return {\n min: Math.floor(domainMin / step) * step,\n max: Math.ceil(domainMax / step) * step,\n };\n}\n\n/** @internal */\nexport function linearScale(\n domainMin: number,\n domainMax: number,\n rangeSize: number,\n): (value: number) => number {\n const span = domainMax - domainMin;\n if (!Number.isFinite(span) || span <= 0) {\n return () => 0;\n }\n\n return (value) => ((value - domainMin) / span) * rangeSize;\n}\n\n/** @internal */\nexport interface BandScale {\n readonly bandWidth: number;\n /** Centre to centre; exceeds `bandWidth` by the padding. */\n readonly step: number;\n readonly count: number;\n position(index: number): number;\n /** The band an offset falls in, clamped at both ends. `-1` when there are no bands. */\n indexAt(offset: number): number;\n}\n\n/** @internal */\nexport function bandScale(\n count: number,\n rangeSize: number,\n paddingRatio: number,\n): BandScale {\n if (count <= 0) {\n return {\n bandWidth: 0,\n step: 0,\n count: 0,\n position: () => 0,\n indexAt: () => -1,\n };\n }\n const step = rangeSize / count;\n const bandWidth = step * (1 - paddingRatio);\n\n return {\n bandWidth,\n step,\n count,\n position: (index) => step * index + (step - bandWidth) / 2,\n indexAt: (offset) =>\n Math.min(count - 1, Math.max(0, Math.floor(offset / step))),\n };\n}\n\nconst ROUND_STEP_FACTORS = [1, 2, 5, 10];\n// A step divided out and multiplied back rarely lands on itself: a candidate equal to the minimum\n// can compare smaller by one bit and push the axis up a rung.\nconst ROUND_STEP_TOLERANCE = 1 - 1e-12;\n\n/** The smallest 1/2/5/10 x power-of-ten step not below `minimumStep`. `niceDomain` picks its own\n * interval count, so it cannot answer this.\n *\n * @internal */\nexport function roundStepAtLeast(minimumStep: number): number {\n if (!Number.isFinite(minimumStep) || minimumStep <= 0) {\n return 0;\n }\n const base = Math.pow(10, Math.floor(Math.log10(minimumStep)));\n for (const factor of ROUND_STEP_FACTORS) {\n const candidate = factor * base;\n if (candidate >= minimumStep * ROUND_STEP_TOLERANCE) {\n return candidate;\n }\n }\n\n return 10 * base;\n}\n","import type { AnimationCallbackEvent, NgZone } from '@angular/core';\n\n// The whole spread of a series' arrival; past it the entrance reads as a queue, not one gesture.\nconst STAGGER_BUDGET_MS = 260;\n\n/** Entrance delay for the mark at `index` of `count`, in milliseconds: `stepMs` apart, narrowed so\n * the last mark starts within the budget. `stepMs` of `0` means no stagger.\n *\n * @internal */\nexport function staggerDelay(\n index: number,\n count: number,\n stepMs: number,\n): number {\n if (!(stepMs > 0) || !Number.isFinite(index) || index <= 0 || count <= 1) {\n return 0;\n }\n\n return index * Math.min(stepMs, STAGGER_BUDGET_MS / (count - 1));\n}\n\n/** Starts a mark's exit, bound as `(animate.leave)=\"leaveMark($event)\"`. The function form, not\n * `animate.leave=\"mark-leave\"`: the class form calls `getAnimations()` once per leaving mark.\n *\n * @internal */\nexport function leaveMark(event: AnimationCallbackEvent): void {\n event.target.classList.add('mark-leave');\n}\n\n// A CSS duration (`300ms`, `0.3s`) in milliseconds; anything unparsable is `0`.\nfunction cssDurationMs(duration: string): number {\n const value = parseFloat(duration);\n if (!Number.isFinite(value)) {\n return 0;\n }\n\n return duration.trim().endsWith('ms') ? value : value * 1000;\n}\n\n/** How far a glide starts in. A glide re-aimed every frame, as a fast pointer re-aims it, otherwise\n * draws its zero-progress frame each time and stands still until the pointer stops. @internal */\nexport const CHART_GLIDE_HEAD_START_MS = 1000 / 30;\n\n/** A chart motion timing, read from `--ds-motion-chart-<timing>-duration` and `-easing`. @internal */\nexport type ChartMotionTiming = 'mark' | 'mark-grow' | 'state' | 'tooltip-move';\n\n/** The duration and easing `element` inherits from `--ds-motion-chart-<timing>-*`, or `null` when the\n * duration is zero, as under reduced motion.\n *\n * @internal */\nexport function chartTiming(\n element: Element,\n timing: ChartMotionTiming,\n): { duration: number; easing: string } | null {\n const style = getComputedStyle(element);\n const duration = cssDurationMs(\n style.getPropertyValue(`--ds-motion-chart-${timing}-duration`),\n );\n if (duration <= 0) {\n return null;\n }\n\n return {\n duration,\n easing:\n style.getPropertyValue(`--ds-motion-chart-${timing}-easing`).trim() ||\n 'ease',\n };\n}\n\n/** A chart motion delay, read from `--ds-motion-chart-<delay>-delay`. @internal */\nexport type ChartMotionDelay = 'scale-marker';\n\n/** The delay `element` inherits from `--ds-motion-chart-<delay>-delay`, in milliseconds; `0` under\n * reduced motion.\n *\n * @internal */\nexport function chartDelay(element: Element, delay: ChartMotionDelay): number {\n return cssDurationMs(\n getComputedStyle(element).getPropertyValue(\n `--ds-motion-chart-${delay}-delay`,\n ),\n );\n}\n\n/** Eases `apply` from `from` to `to` on the timing `element` inherits (`--ds-motion-chart-<timing>-*`),\n * for geometry CSS cannot interpolate. A zero duration, as under reduced motion, applies `to` at once.\n * `onDone` runs after the last apply, inside this call when there is no motion. Returns the cancel;\n * a caller starting the next tween cancels this one and passes what it last applied.\n *\n * Frames run in whatever zone the call runs in: call it outside Angular's zone, or every frame is\n * an application tick.\n *\n * @internal */\nexport function tweenMarks(\n element: Element,\n from: readonly number[],\n to: readonly number[],\n apply: (values: readonly number[]) => void,\n timing: ChartMotionTiming = 'mark',\n onDone: () => void = () => undefined,\n): () => void {\n const eased = chartTiming(element, timing);\n if (\n !eased ||\n from.length !== to.length ||\n typeof KeyframeEffect === 'undefined'\n ) {\n apply(to);\n onDone();\n\n return () => undefined;\n }\n // A target-less effect is only a clock: it eases by the token's own curve, whatever its form.\n const clock = new Animation(\n new KeyframeEffect(null, null, {\n ...eased,\n delay: -CHART_GLIDE_HEAD_START_MS,\n fill: 'forwards',\n }),\n );\n let frame = 0;\n const step = (): void => {\n const progress = clock.effect?.getComputedTiming().progress ?? 1;\n apply(\n to.map((value, index) => from[index] + (value - from[index]) * progress),\n );\n if (clock.playState !== 'finished') {\n frame = requestAnimationFrame(step);\n\n return;\n }\n onDone();\n };\n clock.play();\n frame = requestAnimationFrame(step);\n\n return () => {\n cancelAnimationFrame(frame);\n clock.cancel();\n };\n}\n\n/** Runs `run` two frames from now, outside Angular's zone; returns the cancel.\n *\n * @internal */\nexport function afterTwoFrames(zone: NgZone, run: () => void): () => void {\n let first = 0;\n let second = 0;\n // Outside the zone: under zone.js each frame callback is a full application tick.\n zone.runOutsideAngular(() => {\n first = requestAnimationFrame(() => {\n second = requestAnimationFrame(run);\n });\n });\n\n return () => {\n cancelAnimationFrame(first);\n cancelAnimationFrame(second);\n };\n}\n","/** Marks a chart's skeleton draws when nothing is known about the data. @internal */\nexport const CHART_SKELETON_COUNT = 5;\n\nconst COLUMN_HEIGHTS = [0.45, 0.62, 0.52, 0.75, 0.9, 0.68, 0.58] as const;\nconst LINE_HEIGHTS = [0.42, 0.52, 0.47, 0.62, 0.58, 0.72, 0.68] as const;\n// Sums to zero, so a long run keeps returning to the opening total instead of sinking to the axis.\nconst STEP_DELTAS = [-0.16, -0.14, 0.08, -0.1, 0.2, 0.12] as const;\n\nconst percent = (fraction: number): string =>\n `${Math.round(fraction * 10000) / 100}%`;\n\n/** How many marks the skeleton draws: the data's own count once it is known, else the input. @internal */\nexport function skeletonMarkCount(\n dataLength: number,\n skeletonCount: number,\n): number {\n if (dataLength > 0) {\n return dataLength;\n }\n\n return Number.isFinite(skeletonCount) && skeletonCount >= 1\n ? Math.floor(skeletonCount)\n : CHART_SKELETON_COUNT;\n}\n\n/** Column heights as fractions of the plot, a fixed rise and fall that reads as a column chart. @internal */\nexport function skeletonColumnHeights(count: number): number[] {\n return Array.from(\n { length: count },\n (unused, index) => COLUMN_HEIGHTS[index % COLUMN_HEIGHTS.length],\n );\n}\n\n/** A 4px band through one point per category centre, as a `clip-path` over the whole plot. @internal */\nexport function skeletonLineClip(count: number): string {\n const length = Math.max(count, 2);\n const points = Array.from({ length }, (unused, index) => ({\n x: percent((index + 0.5) / length),\n y: percent(1 - LINE_HEIGHTS[index % LINE_HEIGHTS.length]),\n }));\n const top = points.map(({ x, y }) => `${x} calc(${y} - 2px)`);\n const bottom = points.reverse().map(({ x, y }) => `${x} calc(${y} + 2px)`);\n\n return `polygon(${[...top, ...bottom].join(', ')})`;\n}\n\n/** Waterfall steps as fractions of the plot: a total, floating deltas off the running total, and\n * the closing total standing on the axis. @internal */\nexport function skeletonWaterfallSteps(\n count: number,\n): { bottom: number; height: number }[] {\n if (count <= 1) {\n return count === 1 ? [{ bottom: 0, height: 0.85 }] : [];\n }\n\n let running = 0.9;\n const steps = [{ bottom: 0, height: running }];\n\n for (let index = 1; index < count - 1; index++) {\n const next = Math.min(\n 0.9,\n Math.max(0.2, running + STEP_DELTAS[(index - 1) % STEP_DELTAS.length]),\n );\n steps.push({\n bottom: Math.min(running, next),\n height: Math.abs(running - next),\n });\n running = next;\n }\n\n steps.push({ bottom: 0, height: running });\n\n return steps.map(({ bottom, height }) => ({\n bottom: Math.round(bottom * 100) / 100,\n height: Math.round(height * 100) / 100,\n }));\n}\n\n/** One `clip-path` per funnel stage: equal steps narrowing to 40% of the width at the bottom. @internal */\nexport function skeletonFunnelClips(count: number): string[] {\n const step = 0.3 / Math.max(count, 1);\n\n return Array.from({ length: count }, (unused, index) => {\n const top = percent(index * step);\n const bottom = percent((index + 1) * step);\n const topEnd = percent(1 - index * step);\n const bottomEnd = percent(1 - (index + 1) * step);\n\n return `polygon(${top} 0, ${topEnd} 0, ${bottomEnd} 100%, ${bottom} 100%)`;\n });\n}\n","import { DestroyRef, inject, type WritableSignal } from '@angular/core';\n\n/** Delays a chart's answer to a resting pointer.\n *\n * @internal */\nexport interface ChartDwell {\n /** Runs `answer` once the pointer has rested on `target` for the delay; focus, touch and a chart\n * that has already answered run it at once. Asking again for the same `target` keeps the running\n * wait and swaps in the newer `answer`. */\n schedule(target: unknown, answer: () => void, event: Event): void;\n /** Drops a wait that has not run yet. */\n cancel(): void;\n}\n\n// A chart stays warm from its first answer until the pointer leaves it; one set for the page, as a legend and its plot are one chart.\nconst warmCharts = new WeakSet<Element>();\n\n/** The chart `element` sits in.\n *\n * @internal */\nexport function chartOf(element: Element | null): Element | null {\n return element ? element.closest('figure') : null;\n}\n\nfunction warmUp(chart: Element): void {\n if (warmCharts.has(chart)) {\n return;\n }\n warmCharts.add(chart);\n const coolOnLeave = (event: PointerEvent): void => {\n if (!(event.target instanceof Node) || !chart.contains(event.target)) {\n warmCharts.delete(chart);\n document.removeEventListener('pointerover', coolOnLeave, true);\n }\n };\n document.addEventListener('pointerover', coolOnLeave, true);\n}\n\n/** Call from an injection context; the caller's own `leave` cancels the wait, and so does destroying\n * the context. `delayMs` is read at each `schedule`.\n *\n * @internal */\nexport function chartDwell(delayMs: () => number): ChartDwell {\n let waiting: {\n readonly target: unknown;\n answer: () => void;\n readonly timer: ReturnType<typeof setTimeout>;\n } | null = null;\n\n const cancel = (): void => {\n if (waiting) {\n clearTimeout(waiting.timer);\n waiting = null;\n }\n };\n\n inject(DestroyRef).onDestroy(cancel);\n\n return {\n schedule(target, answer, event) {\n const pointer =\n typeof PointerEvent !== 'undefined' &&\n event instanceof PointerEvent &&\n event.pointerType !== 'touch';\n const node = event.currentTarget ?? event.target;\n const chart = chartOf(node instanceof Element ? node : null);\n const delay = Math.max(delayMs(), 0);\n if (!pointer || delay === 0 || (chart && warmCharts.has(chart))) {\n cancel();\n answer();\n if (pointer && chart) {\n warmUp(chart);\n }\n\n return;\n }\n if (waiting && waiting.target === target) {\n waiting.answer = answer;\n\n return;\n }\n cancel();\n const timer = setTimeout(() => {\n const ready = waiting;\n waiting = null;\n ready?.answer();\n if (chart) {\n warmUp(chart);\n }\n }, delay);\n waiting = { target, answer, timer };\n },\n cancel,\n };\n}\n\n/** Sets `highlighted` to the item the pointer rests on, after the dwell, and back to `null` when it\n * leaves. Call from an injection context.\n *\n * @internal */\nexport function dwellHighlight<T>(\n highlighted: WritableSignal<T | null>,\n delayMs: () => number,\n): { enter(item: T, event: Event): void; leave(): void } {\n const dwell = chartDwell(delayMs);\n\n return {\n enter(item, event) {\n dwell.schedule(item, () => highlighted.set(item), event);\n },\n leave() {\n dwell.cancel();\n highlighted.set(null);\n },\n };\n}\n","import {\n DestroyRef,\n NgZone,\n afterNextRender,\n computed,\n inject,\n signal,\n} from '@angular/core';\nimport type { ElementRef, Signal } from '@angular/core';\n\n/** Where a roving tabindex lands after `key`, or `null` when the key does not traverse.\n * The ends wrap, as in `ds-radio-group`; Home and End jump to either extreme.\n *\n * @internal */\nexport function nextRovingIndex(\n key: string,\n current: number,\n count: number,\n): number | null {\n if (!Number.isFinite(count) || count <= 0) {\n return null;\n }\n switch (key) {\n case 'ArrowRight':\n case 'ArrowDown':\n return (current + 1) % count;\n case 'ArrowLeft':\n case 'ArrowUp':\n return (current - 1 + count) % count;\n case 'Home':\n return 0;\n case 'End':\n return count - 1;\n default:\n return null;\n }\n}\n\n/** The mark `index` within `scope`. `within` narrows the search for a chart whose marks repeat an index per series.\n *\n * @internal */\nexport function markAt(\n scope: Element | null,\n index: number,\n within = '',\n): Element | null {\n return scope?.querySelector(`${within}[data-mark-index=\"${index}\"]`) ?? null;\n}\n\n/** Moves DOM focus to the mark `index` within `scope`.\n *\n * @internal */\nexport function focusMark(\n scope: Element | null,\n index: number,\n within = '',\n): void {\n const target = markAt(scope, index, within);\n if (target instanceof HTMLElement || target instanceof SVGElement) {\n target.focus();\n }\n}\n\n/** A chart's roving tab stop: one per chart, not one per mark.\n *\n * @internal */\nexport interface RovingMarks {\n /** The index of the mark that carries `tabindex=\"0\"`. */\n readonly tabStop: Signal<number>;\n /** Makes `index` the tab stop. */\n focus(index: number): void;\n /** Handles an arrow, Home or End on the mark at `index`: moves the tab stop and DOM focus within `scope`. */\n navigate(event: KeyboardEvent, index: number, scope: Element | null): void;\n}\n\n/** @internal */\nexport function rovingMarks(count: () => number): RovingMarks {\n const roving = signal(0);\n\n return {\n tabStop: computed(() => Math.min(roving(), Math.max(0, count() - 1))),\n focus: (index) => roving.set(index),\n navigate(event, index, scope) {\n const next = nextRovingIndex(event.key, index, count());\n if (next === null) {\n return;\n }\n event.preventDefault();\n roving.set(next);\n focusMark(scope, next);\n },\n };\n}\n\n/** @internal */\nexport interface MarkHit {\n readonly element: Element;\n readonly index: number;\n}\n\n/** Whether a `pointerout` from `hit` left the mark, rather than crossing into another part of it.\n *\n * @internal */\nexport function leftMark(event: PointerEvent, hit: MarkHit): boolean {\n const next =\n event.relatedTarget instanceof Element\n ? event.relatedTarget.closest('[data-mark-index]')\n : null;\n\n return next !== hit.element;\n}\n\n/** The mark an event on the marks' parent came from (the nearest `[data-mark-index]`), or `null`.\n *\n * @internal */\nexport function markOf(\n event: Event,\n scope: EventTarget | null = event.currentTarget,\n): MarkHit | null {\n const target = event.target;\n if (!(scope instanceof Element) || !(target instanceof Element)) {\n return null;\n }\n const element = target.closest('[data-mark-index]');\n if (!element || !scope.contains(element)) {\n return null;\n }\n\n return { element, index: Number(element.getAttribute('data-mark-index')) };\n}\n\n/** Focus arriving on and leaving a mark inside `scope`, heard from the document, not the marks' group:\n * Chromium makes an SVG element focusable once it has a focus listener, so a listening group would\n * take focus on a click and ring every mark it holds. Call from an injection context.\n *\n * @internal */\nexport function listenForMarkFocus(\n scope: ElementRef<Element>,\n onFocus: (event: FocusEvent, mark: MarkHit) => void,\n onBlur?: (event: FocusEvent, mark: MarkHit) => void,\n): void {\n const zone = inject(NgZone);\n const destroyRef = inject(DestroyRef);\n afterNextRender(() => {\n const host = scope.nativeElement;\n const document = host.ownerDocument;\n const forward =\n (handler?: (event: FocusEvent, mark: MarkHit) => void) =>\n (event: FocusEvent): void => {\n const hit = handler && markOf(event, host);\n if (hit) {\n handler(event, hit);\n }\n };\n const focusIn = forward(onFocus);\n const focusOut = forward(onBlur);\n // Outside the zone: every focus change reaches every series.\n zone.runOutsideAngular(() => {\n document.addEventListener('focusin', focusIn);\n document.addEventListener('focusout', focusOut);\n });\n destroyRef.onDestroy(() => {\n document.removeEventListener('focusin', focusIn);\n document.removeEventListener('focusout', focusOut);\n });\n });\n}\n","import type {\n ChartThreshold,\n DsIntl,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { formatValue } from './charts-format';\n\n/** @internal */\nexport interface SummaryPoint {\n readonly label: string;\n readonly value: number;\n}\n\nfunction trendOf(values: readonly number[], words: DsIntl['chart']): string {\n const first = values[0];\n const last = values[values.length - 1];\n const rose = values.every(\n (value, index) => index === 0 || value > values[index - 1],\n );\n const fell = values.every(\n (value, index) => index === 0 || value < values[index - 1],\n );\n if (rose) {\n return words.trendRisingThroughout;\n }\n if (fell) {\n return words.trendFallingThroughout;\n }\n if (last > first) {\n return words.trendRisingOverall;\n }\n if (last < first) {\n return words.trendFallingOverall;\n }\n\n return words.trendFlat;\n}\n\n/** Where the readings sit against each reference line, appended to the description. */\nfunction describeThresholds(\n thresholds: readonly ChartThreshold[],\n points: readonly SummaryPoint[],\n format: (value: number) => string,\n words: DsIntl['chart'],\n): string {\n const total = points.length;\n\n return thresholds\n .map((threshold) => {\n const name = threshold.label ?? words.threshold;\n if (threshold.to == null) {\n const above = points.filter(\n (point) => point.value > threshold.value,\n ).length;\n\n return ` ${words.thresholdAbove(name, format(threshold.value), above, total)}`;\n }\n const low = Math.min(threshold.value, threshold.to);\n const high = Math.max(threshold.value, threshold.to);\n const inside = points.filter(\n (point) => point.value >= low && point.value <= high,\n ).length;\n\n return ` ${words.thresholdInside(name, format(low), format(high), inside, total)}`;\n })\n .join('');\n}\n\n/** The sentence a screen reader gets as the chart's accessible name. Generated, not required: a\n * required one is left at the component's default and lies.\n *\n * The order is the contract: what the chart is and its scale, the trend, the extremes, then where\n * the numbers are.\n *\n * @internal */\nexport function describeSeries(\n words: DsIntl['chart'],\n label: string,\n points: readonly SummaryPoint[],\n format: (value: number) => string = formatValue,\n tableFollows = true,\n thresholds: readonly ChartThreshold[] = [],\n): string {\n if (points.length === 0) {\n return words.noData(label);\n }\n const pointer =\n describeThresholds(thresholds, points, format, words) +\n (tableFollows ? ` ${words.tableFollows}` : '');\n if (points.length === 1) {\n return `${words.onePoint(label, format(points[0].value), points[0].label)}${pointer}`;\n }\n const lowest = points.reduce((min, point) =>\n point.value < min.value ? point : min,\n );\n const highest = points.reduce((max, point) =>\n point.value > max.value ? point : max,\n );\n\n return (\n `${words.range(label, points.length, format(lowest.value), format(highest.value))} ` +\n `${trendOf(\n points.map((point) => point.value),\n words,\n )}. ` +\n `${words.extremes(highest.label, format(highest.value), lowest.label, format(lowest.value))}${pointer}`\n );\n}\n","import {\n ElementRef,\n Signal,\n afterRenderEffect,\n computed,\n signal,\n untracked,\n} from '@angular/core';\n\n/**\n * @fileoverview How many chips fit one line of a trigger.\n *\n * INVARIANT: nothing here may measure something the cut itself changes, or the\n * measurement feeds back into its own input and never settles (a hung page).\n * The budget comes off the trigger's PARENT content box, and the \"+N more\"\n * marker gets a fixed reserve rather than a measurement.\n *\n * Chips carry `data-chip` and sit in a row that is a direct child of the trigger.\n */\n\n/**\n * Null when the host cannot supply a budget: a detached node, an inline one with no content box,\n * or one whose own width DEPENDS on the trigger.\n *\n * The dependency is tested by pinning the trigger to zero and re-reading the host, because\n * `getComputedStyle().width` is a used pixel value and the `fit-content` a consumer wrote is not\n * readable back. Costs a second forced layout.\n */\nfunction hostContentWidth(\n host: HTMLElement | null,\n trigger: HTMLElement,\n): number | null {\n if (!host || host.clientWidth === 0) {\n return null;\n }\n const styles = getComputedStyle(host);\n if (styles.display === 'inline') {\n return null;\n }\n\n const before = host.clientWidth;\n const pinned = trigger.style.width;\n trigger.style.width = '0px';\n const dependsOnTrigger = host.clientWidth !== before;\n trigger.style.width = pinned;\n if (dependsOnTrigger) {\n return null;\n }\n\n return (\n before - parseFloat(styles.paddingLeft) - parseFloat(styles.paddingRight)\n );\n}\n\n/** Room held for \"+N more\" (4.5em with three digits, rounded up). */\nconst MARKER_RESERVE_EM = 5;\n\n/** A sibling that can grow gives back what it does not use, so only its floor is owed. */\nfunction reservedWidth(element: HTMLElement): number {\n const styles = getComputedStyle(element);\n\n return parseFloat(styles.flexGrow) > 0\n ? parseFloat(styles.minWidth) || 0\n : element.offsetWidth;\n}\n\n/** @internal */\nexport function chipFit(\n count: Signal<number>,\n chipRow: Signal<ElementRef<HTMLElement> | undefined>,\n enabled: Signal<boolean>,\n /** The whole selection; `count` may cap it. */\n selectionSize: Signal<number> = count,\n): Signal<number> {\n const available = signal(0);\n const gap = signal(0);\n const markerReserve = signal(0);\n /** Widths of ALL chips, from the last render that held all of them. */\n const chipWidths = signal<readonly number[]>([]);\n const measuredFor = signal(-1);\n /** A repeat of the last geometry is skipped: each measure forces layout. */\n let lastWidth = -1;\n let lastCount = -1;\n\n const measure = (row: HTMLElement): void => {\n const trigger = row.parentElement;\n if (!trigger) {\n return;\n }\n\n // A `fit-content` trigger is sized by the chips this cut removes; the parent's\n // content box is not. The trigger-width fallback is that feedback loop.\n const host = trigger.parentElement;\n const budget = hostContentWidth(host, trigger) ?? trigger.clientWidth;\n\n const width = budget;\n const currentCount = untracked(count);\n const cacheIsCurrent = untracked(measuredFor) === currentCount;\n if (width === lastWidth && currentCount === lastCount && cacheIsCurrent) {\n return;\n }\n lastWidth = width;\n lastCount = currentCount;\n\n const triggerStyles = getComputedStyle(trigger);\n const columnGap = parseFloat(triggerStyles.columnGap) || 0;\n let free =\n budget -\n parseFloat(triggerStyles.paddingLeft) -\n parseFloat(triggerStyles.paddingRight) -\n parseFloat(triggerStyles.borderLeftWidth) -\n parseFloat(triggerStyles.borderRightWidth);\n for (const sibling of trigger.children) {\n if (sibling !== row) {\n free -= reservedWidth(sibling as HTMLElement) + columnGap;\n }\n }\n\n gap.set(columnGap);\n available.set(free);\n markerReserve.set(\n MARKER_RESERVE_EM * parseFloat(getComputedStyle(row).fontSize),\n );\n\n const chips = row.querySelectorAll<HTMLElement>('[data-chip]');\n // A partial render is the previous cut, not the selection: caching it would\n // keep only the survivors' widths, and the row could never grow back.\n if (chips.length === untracked(count)) {\n chipWidths.set([...chips].map((chip) => chip.offsetWidth));\n measuredFor.set(untracked(count));\n }\n };\n\n afterRenderEffect((onCleanup) => {\n const row = chipRow()?.nativeElement;\n if (!enabled() || !row) {\n return;\n }\n const observer = new ResizeObserver(() => measure(row));\n // The trigger, not the row: the row's box follows the cut, so observing it\n // would report this function's own output back to it.\n observer.observe(row.parentElement ?? row);\n onCleanup(() => observer.disconnect());\n });\n\n // A selection change does not resize the trigger, so it drives its own measure.\n afterRenderEffect(() => {\n count();\n const row = chipRow()?.nativeElement;\n if (enabled() && row) {\n measure(row);\n }\n });\n\n return computed<number>(() => {\n const total = count();\n if (!enabled()) {\n return total;\n }\n const widths = chipWidths();\n // Until widths for THIS selection are in, render all: that render is measured.\n if (measuredFor() !== total || available() <= 0) {\n return total;\n }\n\n let used = 0;\n for (let index = 0; index < widths.length; index++) {\n const next = used + widths[index] + (index > 0 ? gap() : 0);\n // The marker needs room only if something is hidden; a capped slice's last\n // chip is not the end of the selection.\n const isLast =\n index === widths.length - 1 && selectionSize() <= widths.length;\n const budget = isLast\n ? available()\n : available() - markerReserve() - gap();\n if (next > budget) {\n // At least one chip: 0 would render a bare \"+N\".\n return Math.max(1, index);\n }\n used = next;\n }\n\n return total;\n });\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Fills a selected chip's content in the trigger of `ds-multi-select` and\n * `ds-autocomplete`. The chip stays a library-owned `ds-tag`: its close button,\n * remove label and overflow cap are not projected.\n */\n@Directive({\n selector: '[dsChipTemplate]',\n standalone: true,\n})\nexport class DsChipTemplateDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { Signal, computed, inject } from '@angular/core';\nimport { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';\n\n/**\n * Resolves a field's `reserveMessage`: the input, then `DS_CONFIG.field.reserveMessage`, then\n * `false`. The input is `boolean | null` because a signal input cannot report whether it was bound.\n *\n * `appWideDefaultApplies` is read lazily and drops the middle step for a control that is not a\n * form row (`ds-button`).\n *\n * Call from a field initializer (an injection context).\n */\nexport function resolveReserveMessage(\n reserveMessage: Signal<boolean | null>,\n appWideDefaultApplies: () => boolean = () => true,\n): Signal<boolean> {\n const config = inject(DS_CONFIG);\n\n return computed(\n () =>\n reserveMessage() ??\n (appWideDefaultApplies()\n ? (config.field?.reserveMessage ?? false)\n : false),\n );\n}\n\n/**\n * Resolves a field's `showDirty`: the input, then `DS_CONFIG.field.showDirty`, then `false`.\n *\n * Call from a field initializer (an injection context).\n */\nexport function resolveShowDirty(\n showDirty: Signal<boolean | null>,\n): Signal<boolean> {\n const config = inject(DS_CONFIG);\n\n return computed(() => showDirty() ?? config.field?.showDirty ?? false);\n}\n","import {\n DestroyRef,\n Injector,\n Signal,\n afterNextRender,\n computed,\n inject,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n FormGroupDirective,\n NgControl,\n NgForm,\n type ValidationErrors,\n} from '@angular/forms';\nimport { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';\nimport { reportDevWarning } from '@ids-group-ltd/ids-design-system/core';\nimport type { FieldMessageState } from '@ids-group-ltd/ids-design-system/components/field-message';\n\n/**\n * One validation error, structurally identical to Angular's signal-forms `ValidationError`.\n *\n * Declared here because `@angular/forms/signals` is `@experimental`. Signal forms binds by\n * input NAME and assigns its own `ValidationError[]`, which this shape accepts.\n */\nexport interface DsFieldError {\n /** Identifies the kind of error, e.g. `required`, `minlength`, `server`. */\n readonly kind: string;\n /** Human-readable text. */\n readonly message?: string;\n}\n\n/** What a field's `errors` input accepts before normalization. */\nexport type DsFieldErrorsInput =\n | string\n | DsFieldError\n | readonly DsFieldError[]\n | null\n | undefined;\n\nconst NO_ERRORS: readonly DsFieldError[] = [];\n\n/**\n * The one reserved `DsFieldError.kind`. An error carrying it is advisory: it shows in the\n * warning state and does NOT make the control invalid.\n */\nexport const DS_FIELD_WARNING_KIND = 'warning';\n\n/**\n * `errors` input transform. Accepts a bare string, a single error, or the array signal forms\n * assigns.\n */\nexport function normalizeFieldErrors(\n value: DsFieldErrorsInput,\n): readonly DsFieldError[] {\n if (!value) {\n return NO_ERRORS;\n }\n if (typeof value === 'string') {\n return value.trim() ? [{ kind: 'custom', message: value }] : NO_ERRORS;\n }\n\n return Array.isArray(value) ? value : [value as DsFieldError];\n}\n\n/** @internal */\nexport function trimmedText(value: string | null | undefined): string {\n return value?.trim() ?? '';\n}\n\n/** The single line a field shows below itself, already resolved.\n * @internal\n */\nexport interface DsFieldMessage {\n readonly text: string;\n readonly state: FieldMessageState;\n}\n\nexport interface DsFieldMessageSources {\n hint: Signal<string>;\n warning: Signal<string>;\n error: Signal<string>;\n errors: Signal<readonly DsFieldError[]>;\n invalid: Signal<boolean>;\n /** The control's own disabled state (a disabled control is not announced as invalid). A getter,\n * not a `Signal`, so a caller can hand it over before its own `isDisabled` is initialised. */\n disabled?: () => boolean;\n success?: Signal<string>;\n /** The field's own touched state, if it tracks one (CVA blur). */\n touchedSelf?: Signal<boolean>;\n /** Bound by signal forms as part of the `FormUiControl` contract. */\n touched?: Signal<boolean>;\n /** Bound by signal forms; an async validator is running. */\n pending?: Signal<boolean>;\n /** Bound by signal forms; the user changed the value. */\n dirty?: Signal<boolean>;\n /** The field's resolved `showDirty`: whether a changed value is marked. */\n showDirty?: Signal<boolean>;\n}\n\nexport interface DsFieldMessageResolution {\n readonly message: Signal<DsFieldMessage>;\n readonly invalid: Signal<boolean>;\n /** The state the CONTROL paints, for `[attr.data-field-state]`; not `message().state`, which can differ. */\n readonly controlState: Signal<FieldMessageState | null>;\n /** An async validator is running: from `pending`, or the `NgControl`'s status. */\n readonly pending: Signal<boolean>;\n /** The value was changed and the field marks it (`showDirty`). */\n readonly changed: Signal<boolean>;\n}\n\nconst EMPTY_MESSAGE: DsFieldMessage = { text: '', state: 'default' };\n\ninterface ControlState {\n readonly errors: readonly DsFieldError[];\n readonly touched: boolean;\n readonly pending: boolean;\n readonly dirty: boolean;\n}\n\nconst NO_CONTROL: ControlState = {\n errors: NO_ERRORS,\n touched: false,\n pending: false,\n dirty: false,\n};\n\n/**\n * Resolves the one message a field shows, from every source that can supply one.\n *\n * Precedence, highest first:\n *\n * 1. `error` - an explicit string. Shown immediately: the consumer decided.\n * 2. `errors` - validation errors. Shown once the user has interacted, so a\n * `required` error does not greet an untouched form.\n * 3. `warning` - advisory, not blocking.\n * 4. `errors` whose kind is `DS_FIELD_WARNING_KIND` - the same, raised by the form model.\n * 5. `success` - confirmation.\n * 6. `hint` - helper text.\n *\n * Signal forms binds `errors` and `touched` by input name (`FormUiControl`); reactive and\n * template-driven forms expose the same through `NgControl`, read here.\n *\n * Every rung carries its OWN text; `hint` is never recoloured into another state. `invalid` has\n * no text: it paints the control and sets `aria-invalid`.\n *\n * Call from a field initializer (an injection context).\n * @internal\n */\nexport function resolveFieldMessage(\n sources: DsFieldMessageSources,\n): DsFieldMessageResolution {\n const config = inject(DS_CONFIG);\n const controlState = watchNgControl();\n\n const errors = computed(() => {\n const own = sources.errors();\n\n return own.length ? own : controlState().errors;\n });\n\n const interacted = computed(\n () =>\n (sources.touched?.() ?? false) ||\n (sources.touchedSelf?.() ?? false) ||\n controlState().touched,\n );\n\n const blocking = computed(() =>\n errors().filter((error) => error.kind !== DS_FIELD_WARNING_KIND),\n );\n const advisory = computed(() =>\n errors().filter((error) => error.kind === DS_FIELD_WARNING_KIND),\n );\n\n const errorText = computed(() => {\n const current = blocking();\n if (!current.length || !interacted()) {\n return '';\n }\n\n return textFor(current, config.field?.errorMessages);\n });\n\n const advisoryText = computed(() => {\n const current = advisory();\n if (!current.length || !interacted()) {\n return '';\n }\n\n return textFor(current, config.field?.errorMessages);\n });\n\n // Advisory errors are deliberately absent: a warning never sets aria-invalid.\n // Disabled wins: `aria-invalid` on a NATIVELY disabled input still reports invalid in\n // Chrome's accessibility tree.\n const invalid = computed(\n () =>\n !(sources.disabled?.() ?? false) &&\n (sources.invalid() ||\n sources.error().length > 0 ||\n (blocking().length > 0 && interacted())),\n );\n\n // Relies on message inputs trimming via `trimmedText`; one declared without it breaks this quietly.\n const message = computed<DsFieldMessage>(() => {\n const explicit = sources.error();\n if (explicit) {\n return { text: explicit, state: 'error' };\n }\n const fromErrors = errorText();\n if (fromErrors) {\n return { text: fromErrors, state: 'error' };\n }\n const warning = sources.warning();\n if (warning) {\n return { text: warning, state: 'warning' };\n }\n const fromAdvisory = advisoryText();\n if (fromAdvisory) {\n return { text: fromAdvisory, state: 'warning' };\n }\n const success = sources.success?.();\n if (success) {\n return { text: success, state: 'success' };\n }\n const hint = sources.hint();\n\n return hint ? { text: hint, state: 'default' } : EMPTY_MESSAGE;\n });\n\n const paintedState = computed<FieldMessageState | null>(() => {\n if (invalid()) {\n return 'error';\n }\n if (sources.warning() || advisoryText()) {\n return 'warning';\n }\n\n return sources.success?.() ? 'success' : null;\n });\n\n const pending = computed(\n () => (sources.pending?.() ?? false) || controlState().pending,\n );\n const changed = computed(\n () =>\n (sources.showDirty?.() ?? false) &&\n ((sources.dirty?.() ?? false) || controlState().dirty),\n );\n\n return { message, invalid, controlState: paintedState, pending, changed };\n}\n\n/**\n * `NgControl` cannot be injected in the constructor (`NG_VALUE_ACCESSOR` points at the field\n * itself: a DI cycle), so it is resolved after first render.\n *\n * `events`, not `statusChanges`: touching a control emits `TouchedChangeEvent`, not a status change.\n */\nfunction watchNgControl(): Signal<ControlState> {\n const injector = inject(Injector);\n const destroyRef = inject(DestroyRef);\n // Submitting a form does not reach the child control's own `events` (it goes onto the\n // ROOT form's stream), so the parent is read directly.\n const parentForm = inject(NgForm, { optional: true });\n const parentFormGroup = inject(FormGroupDirective, { optional: true });\n const state = signal<ControlState>(NO_CONTROL);\n\n afterNextRender(() => {\n const control = injector.get(NgControl, null)?.control;\n if (!control) {\n return;\n }\n const submitted = (): boolean =>\n parentFormGroup?.submitted || parentForm?.submitted || false;\n const sync = (): void =>\n state.set({\n errors: fromValidationErrors(control.errors),\n touched: control.touched || submitted(),\n pending: control.pending,\n dirty: control.dirty,\n });\n\n // Signal forms bridges an NgControl whose `control` has no `events` stream. Staying at\n // NO_CONTROL is deliberate: the component's own inputs carry errors and touched there.\n if (typeof control.events?.pipe !== 'function') {\n return;\n }\n\n sync();\n control.events.pipe(takeUntilDestroyed(destroyRef)).subscribe(sync);\n const parentSubmit = parentFormGroup?.ngSubmit ?? parentForm?.ngSubmit;\n parentSubmit?.pipe(takeUntilDestroyed(destroyRef)).subscribe(sync);\n });\n\n return state;\n}\n\n/**\n * A message is picked up from `{ myError: 'text' }` and `{ myError: { message: 'text' } }`.\n * Angular's built-ins carry detail objects with no message (`{ minlength: { requiredLength } }`);\n * those resolve through `DS_CONFIG.field.errorMessages`.\n */\nfunction fromValidationErrors(\n errors: ValidationErrors | null,\n): readonly DsFieldError[] {\n if (!errors) {\n return NO_ERRORS;\n }\n\n return Object.keys(errors).map((kind) => {\n const detail: unknown = errors[kind];\n if (typeof detail === 'string') {\n return { kind, message: detail };\n }\n const message = (detail as { message?: unknown } | null)?.message;\n\n return typeof message === 'string' ? { kind, message } : { kind };\n });\n}\n\nfunction textFor(\n errors: readonly DsFieldError[],\n messages: Record<string, string> | undefined,\n): string {\n for (const error of errors) {\n const text = error.message ?? messages?.[error.kind];\n if (text) {\n return text;\n }\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n reportDevWarning(\n `[ds-field] The control is invalid but no message could be resolved for ${errors\n .map((error) => `\"${error.kind}\"`)\n .join(\n ', ',\n )}, so the field paints the state with NO message under it. Give the validator a message — required(path, { message: '…' }) or { myError: 'text' } — or map the kind in provideDsConfig({ field: { errorMessages: … } }).`,\n );\n }\n\n return '';\n}\n","import { Directive, booleanAttribute, input } from '@angular/core';\nimport { resolveReserveMessage } from './field-defaults';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { trimmedText } from './field-errors';\n\n/**\n * The inputs of anything that renders a `ds-field-message` line. Split from `DsFieldBase` so\n * `ds-button` can take it without `errors`, `invalid` and `touched`.\n * @internal\n */\n@Directive()\nexport abstract class DsMessageBase {\n /** Helper text shown below the control. */\n readonly hint = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Error text. Shown immediately; takes precedence over `errors`. */\n readonly error = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Advisory text, shown when there is no error. */\n readonly warning = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Reserve the message-row height even when empty, so a hint/error does not shift the layout.\n * Unset falls back to `DS_CONFIG.field.reserveMessage` for a field, not for a button. */\n readonly reserveMessage = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n /** Glyph on the message line, overriding what the state resolves to. Unset\n * follows `DS_CONFIG.field.stateIcons`; `false` removes the glyph here alone. */\n readonly messageIcon = input<IconName | false | null>(null);\n\n /** Whether an unset `reserveMessage` falls back to `DS_CONFIG.field.reserveMessage`.\n * Read lazily, so a subclass initializer running later still decides it. */\n protected readonly reserveFollowsFieldDefault: boolean = true;\n\n readonly reserveMessageResolved = resolveReserveMessage(\n this.reserveMessage,\n () => this.reserveFollowsFieldDefault,\n );\n}\n","import { Directive, booleanAttribute, input } from '@angular/core';\nimport { resolveShowDirty } from './field-defaults';\nimport { DsMessageBase } from './message-base';\nimport {\n normalizeFieldErrors,\n type DsFieldError,\n type DsFieldErrorsInput,\n} from './field-errors';\n\n/**\n * The inputs every DS form field has, declared once. Only UNIVERSAL inputs belong\n * here: lifting `success` or `label` would add them to controls that never had them.\n * @internal\n */\n@Directive()\nexport abstract class DsFieldBase extends DsMessageBase {\n /** Validation errors, shown once the user has interacted. Bound by signal forms;\n * reactive and template-driven forms are read through `NgControl`. */\n readonly errors = input<readonly DsFieldError[], DsFieldErrorsInput>([], {\n transform: normalizeFieldErrors,\n });\n /** Paints the error state and sets `aria-invalid` WITHOUT a message; use `error` to show text. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has interacted with the field. Bound by signal forms; gates `errors`. */\n readonly touched = input(false, { transform: booleanAttribute });\n}\n\n/**\n * The form-state inputs of a DS value control: what signal forms binds by name beyond `errors`\n * and `touched`. Reactive and template-driven forms are read through `NgControl` instead.\n * @internal\n */\n@Directive()\nexport abstract class DsFormControlBase extends DsFieldBase {\n /** Whether an async validator is running. Bound by signal forms; shows a trailing spinner. */\n readonly pending = input(false, { transform: booleanAttribute });\n /** Whether the user has changed the value. Bound by signal forms; drawn only under `showDirty`. */\n readonly dirty = input(false, { transform: booleanAttribute });\n /** Marks a changed value with a dot and a \"Changed\" line. Unset falls back to\n * `DS_CONFIG.field.showDirty`, then `false`. */\n readonly showDirty = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n readonly showDirtyResolved = resolveShowDirty(this.showDirty);\n}\n","import {\n Directive,\n ElementRef,\n booleanAttribute,\n effect,\n inject,\n input,\n signal,\n type ModelSignal,\n type WritableSignal,\n} from '@angular/core';\nimport type { ControlValueAccessor } from '@angular/forms';\nimport { DsFormControlBase } from './field-base';\n\n/**\n * Value elements are searched FIRST: the number stepper renders its decrement button before its\n * input. `tabindex=\"-1\"` is excluded so a roving-tabindex group yields the tabbable radio.\n */\nconst NOT_ROVED = ':not([tabindex=\"-1\"]):not([disabled])';\nconst VALUE_ELEMENTS = `input:not([type=\"hidden\"])${NOT_ROVED}, textarea${NOT_ROVED}`;\nconst TRIGGER_ELEMENTS = `button${NOT_ROVED}, [tabindex=\"0\"]${NOT_ROVED}`;\n\n/**\n * The `ControlValueAccessor` half of a DS value control, with no message API (`ds-search`).\n *\n * The model arrives as a THUNK: `value` is abstract on a base class and a field initialiser on\n * a component, so it does not exist yet when this runs.\n *\n * Must be called from an injection context (it owns an `effect`).\n * @internal\n */\nexport function valueControlBridge<T>(model: () => ModelSignal<T>): {\n readonly formDisabled: WritableSignal<boolean>;\n readonly touchedSelf: WritableSignal<boolean>;\n markTouched(): void;\n writeValue(next: T): void;\n registerOnChange(fn: (next: T) => void): void;\n registerOnTouched(fn: () => void): void;\n setDisabledState(isDisabled: boolean): void;\n} {\n const formDisabled = signal(false);\n const touchedSelf = signal(false);\n let onChange: (next: T) => void = () => {};\n let onTouched: () => void = () => {};\n // Stops the effect echoing a form-driven write back as a user change.\n let synced: T | undefined;\n let hasSynced = false;\n\n effect(() => {\n const next = model()();\n if (!hasSynced) {\n hasSynced = true;\n synced = next;\n\n return;\n }\n if (Object.is(next, synced)) {\n return;\n }\n synced = next;\n onChange(next);\n });\n\n return {\n formDisabled,\n touchedSelf,\n markTouched: () => {\n touchedSelf.set(true);\n onTouched();\n },\n writeValue: (next: T) => {\n hasSynced = true;\n synced = next;\n model().set(next);\n },\n registerOnChange: (fn: (next: T) => void) => {\n onChange = fn;\n },\n registerOnTouched: (fn: () => void) => {\n onTouched = fn;\n },\n setDisabledState: (isDisabled: boolean) => {\n formDisabled.set(isDisabled);\n },\n };\n}\n\n// Signal forms takes the ControlValueAccessor path for every DS control, and\n// focusBoundControl() then calls focus() on the unfocusable HOST.\nfunction delegateHostFocus(\n host: HTMLElement,\n focus: (options?: FocusOptions) => void,\n): void {\n host.focus = focus;\n}\n\nfunction focusOwnControl(host: HTMLElement, options?: FocusOptions): void {\n const target =\n host.querySelector<HTMLElement>(VALUE_ELEMENTS) ??\n host.querySelector<HTMLElement>(TRIGGER_ELEMENTS);\n target?.focus(options);\n}\n\nfunction blurOwnControl(host: HTMLElement): void {\n const active = host.ownerDocument.activeElement;\n if (active instanceof HTMLElement && host.contains(active)) {\n active.blur();\n }\n}\n\n/**\n * Shared `ControlValueAccessor` for DS form controls whose value is a signal `model()`.\n * A subclass must OR `formDisabled()` into its effective disabled state so\n * `FormControl.disable()` reaches the control, and call `markTouched()` from a blur handler.\n * @internal\n */\n@Directive({\n host: { '[style.display]': 'hidden() ? \"none\" : null' },\n})\nexport abstract class DsControlValueAccessor<T>\n extends DsFormControlBase\n implements ControlValueAccessor\n{\n abstract readonly value: ModelSignal<T>;\n\n /** Hides the control. Inline `display`: the `hidden` attribute loses to each control's `:host` display. */\n readonly hidden = input(false, { transform: booleanAttribute });\n private readonly hostElement = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n super();\n delegateHostFocus(this.hostElement.nativeElement, (options) =>\n this.focus(options),\n );\n }\n\n /** Focuses the control's own input or trigger; `focusBoundControl()` reaches it through the host. */\n focus(options?: FocusOptions): void {\n focusOwnControl(this.hostElement.nativeElement, options);\n }\n\n /** Drops focus from anywhere inside this control; a portaled panel is left alone. */\n blur(): void {\n blurOwnControl(this.hostElement.nativeElement);\n }\n\n private readonly bridge = valueControlBridge<T>(() => this.value);\n\n protected readonly formDisabled = this.bridge.formDisabled;\n\n // Separate from the control's `touched`, which only exists once `NgControl`\n // resolves: too late to gate the first blur.\n protected readonly touchedSelf = this.bridge.touchedSelf;\n\n protected markTouched(): void {\n this.bridge.markTouched();\n }\n\n writeValue(value: T): void {\n this.bridge.writeValue(value);\n }\n\n registerOnChange(fn: (value: T) => void): void {\n this.bridge.registerOnChange(fn);\n }\n\n registerOnTouched(fn: () => void): void {\n this.bridge.registerOnTouched(fn);\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.bridge.setDisabledState(isDisabled);\n }\n}\n\n/**\n * Shared `ControlValueAccessor` for DS boolean controls (checkbox, switch) whose state lives\n * in a `checked` model. Subclasses must OR `formDisabled()` into their effective disabled\n * state and call `markTouched()` from a blur handler.\n * @internal\n */\n@Directive({\n host: { '[style.display]': 'hidden() ? \"none\" : null' },\n})\nexport abstract class DsBooleanControlValueAccessor\n extends DsFormControlBase\n implements ControlValueAccessor\n{\n abstract readonly checked: ModelSignal<boolean>;\n\n /** Hides the control; see `DsControlValueAccessor.hidden`. */\n readonly hidden = input(false, { transform: booleanAttribute });\n private readonly hostElement = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** See `DsControlValueAccessor.focus`. */\n focus(options?: FocusOptions): void {\n focusOwnControl(this.hostElement.nativeElement, options);\n }\n\n /** See `DsControlValueAccessor.blur`. */\n blur(): void {\n blurOwnControl(this.hostElement.nativeElement);\n }\n\n protected readonly formDisabled = signal(false);\n protected readonly touchedSelf = signal(false);\n\n private onChange: (value: boolean) => void = () => {};\n private onTouched: () => void = () => {};\n\n private synced: boolean | undefined;\n private hasSynced = false;\n\n constructor() {\n super();\n delegateHostFocus(this.hostElement.nativeElement, (options) =>\n this.focus(options),\n );\n effect(() => {\n const next = this.checked();\n if (!this.hasSynced) {\n this.hasSynced = true;\n this.synced = next;\n\n return;\n }\n if (Object.is(next, this.synced)) {\n return;\n }\n this.synced = next;\n this.onChange(next);\n });\n }\n\n protected markTouched(): void {\n this.touchedSelf.set(true);\n this.onTouched();\n }\n\n writeValue(value: boolean): void {\n this.hasSynced = true;\n this.synced = value;\n this.checked.set(value);\n }\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Replaces `ds-autocomplete`'s \"Create «…»\" row.\n *\n * Context: `query` is the typed text the row would create.\n *\n * The row stays a `role=\"option\"` the keyboard can reach, and picking it still\n * emits `create` - the template fills the row, it does not become the action.\n */\n@Directive({\n selector: '[dsCreateTemplate]',\n standalone: true,\n})\nexport class DsCreateTemplateDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { computed, inject, type Signal } from '@angular/core';\nimport {\n ActivatedRoute,\n Router,\n UrlTree,\n type IsActiveMatchOptions,\n type Params,\n type QueryParamsHandling,\n} from '@angular/router';\n\nexport type DsDestination = 'routerLink' | 'href' | 'button';\n\n// Query is a subset match and fragment is ignored: sort order or page number is not another page.\nconst EXACT_PATH: Partial<IsActiveMatchOptions> = {\n paths: 'exact',\n queryParams: 'subset',\n fragment: 'ignored',\n matrixParams: 'ignored',\n};\nconst PREFIX_PATH: Partial<IsActiveMatchOptions> = {\n ...EXACT_PATH,\n paths: 'subset',\n};\n\n/** What a `routerLink` input accepts. A `UrlTree` carries the fragment, query and relative base the other forms cannot. */\nexport type DsRouterLink = string | readonly unknown[] | UrlTree | null;\n\n/** The values `aria-current` may take; `true` (not `'true'`) fits `RouterLinkActive.ariaCurrentWhenActive`. */\nexport type DsAriaCurrent =\n | 'page'\n | 'step'\n | 'location'\n | 'date'\n | 'time'\n | true;\n\n/** The `UrlCreationOptions` a navigating control forwards. */\nexport interface DsLinkModifiers {\n fragment?: string;\n queryParams?: Params | null;\n queryParamsHandling?: QueryParamsHandling | null;\n}\n\n/**\n * No destination is a `<button>`, never an `<a href=\"#\">`: a `#` href rewrites the URL and\n * discards the scroll position.\n *\n * @internal\n */\nexport function dsDestination(\n routerLink: Signal<DsRouterLink>,\n href: Signal<string>,\n): Signal<DsDestination> {\n return computed(() => {\n if (routerLink() !== null) {\n return 'routerLink';\n }\n\n return href() ? 'href' : 'button';\n });\n}\n\n/**\n * What a navigating control announces: an exact match is `page`, a prefix match is `true` (the\n * current section or an ancestor), anything else stays silent. `routerLinkActive` matches by\n * PREFIX, so deriving `page` from it makes a \"back to the section\" link claim to be the current page.\n *\n * Feed the result to `RouterLinkActive.ariaCurrentWhenActive`, never to `[attr.aria-current]`: the\n * directive removes that attribute in a microtask whenever its own input is unset, wiping a\n * template binding. A narrowed `routerLinkActiveOptions` therefore narrows the announcement too.\n *\n * Must be called from an injection context. Outside a router it returns the override or\n * `undefined`.\n *\n * @internal\n */\nexport function dsAriaCurrent(\n routerLink: Signal<DsRouterLink>,\n modifiers: Signal<DsLinkModifiers>,\n override: Signal<DsAriaCurrent | null | undefined>,\n): Signal<DsAriaCurrent | undefined> {\n const router = inject(Router, { optional: true });\n // Same base as `RouterLink`: otherwise `.` lands on `/`, a prefix of every page.\n const route = inject(ActivatedRoute, { optional: true });\n\n return computed<DsAriaCurrent | undefined>(() => {\n // `null` means \"announce nothing\"; the directive spells that `undefined`.\n const explicit = override();\n if (explicit !== undefined) {\n return explicit ?? undefined;\n }\n\n const link = routerLink();\n if (!router || link === null) {\n return undefined;\n }\n\n const tree =\n link instanceof UrlTree\n ? link\n : router.createUrlTree(Array.isArray(link) ? [...link] : [link], {\n relativeTo: route ?? undefined,\n ...modifiers(),\n });\n\n // `lastSuccessfulNavigation` is only the reactive trigger. `Router.isActive` (deprecated in\n // 21.1, no replacement) reads the LIVE url; the standalone `isActive()` uses the navigation's\n // `finalUrl` and goes stale when the path is rewritten without navigating.\n router.lastSuccessfulNavigation();\n\n return router.isActive(tree, EXACT_PATH)\n ? 'page'\n : router.isActive(tree, PREFIX_PATH)\n ? true\n : undefined;\n });\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Replaces a picker panel's \"no matches\" row.\n *\n * Context: `query` is the text that matched nothing.\n *\n * The row keeps `role=\"status\"`, so a reader is told the list emptied whatever\n * the template puts inside it.\n */\n@Directive({\n selector: '[dsEmptyTemplate]',\n standalone: true,\n})\nexport class DsEmptyTemplateDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { computed, inject, signal, type Signal } from '@angular/core';\nimport {\n DS_INTL,\n injectDsLocale,\n resolveWithConfig,\n} from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { chartValueFormat } from './charts-format';\n\n/** The inputs every chart carries for app-wide decisions. @internal */\nexport interface ChartDefaultInputs {\n readonly frame: Signal<ChartFrame | null>;\n readonly dataTable?: Signal<ChartDataTable | null>;\n readonly emptyText: Signal<string | null>;\n readonly errorText: Signal<string | null>;\n readonly valueFormat: Signal<ChartValueFormat | null>;\n readonly tooltipLingerMs?: Signal<number | null>;\n readonly pinOnClick?: Signal<boolean | null>;\n readonly highlightActive?: Signal<boolean | null>;\n readonly tooltipSwatches?: Signal<boolean | null>;\n}\n\nconst NO_HOVER_DELAY_INPUT = signal<number | null>(null);\n\n// Lazy: a chart's own optional inputs are declared after the base that calls this, so they do not exist yet.\nfunction optional<T>(\n input: () => Signal<T | null> | undefined,\n): Signal<T | null> {\n return computed(() => input()?.() ?? null);\n}\n\nconst CHART_HOVER_DELAY_MS = 0;\n\n/** How long a pointer rests on a mark before the chart answers, in milliseconds:\n * `DS_CONFIG.chart.hoverDelayMs`, else `0`. Call from an injection context. @internal */\nexport function chartHoverDelayMs(): Signal<number> {\n return resolveWithConfig(\n NO_HOVER_DELAY_INPUT,\n (config) => config.chart?.hoverDelayMs,\n CHART_HOVER_DELAY_MS,\n );\n}\n\n/** Default tooltip linger, in milliseconds; long enough to cross to the next mark. @internal */\nexport const CHART_TOOLTIP_LINGER_MS = 500;\n\n/** Resolves each input, then `DS_CONFIG.chart`, then the built-in; copy resolves input, then `DS_INTL.chart`.\n * Call from an injection context. @internal */\nexport function resolveChartDefaults(inputs: ChartDefaultInputs) {\n const locale = injectDsLocale();\n const intl = inject(DS_INTL);\n\n return {\n locale,\n frame: resolveWithConfig(\n inputs.frame,\n (config) => config.chart?.frame,\n 'auto' as ChartFrame,\n ),\n dataTable: resolveWithConfig(\n optional(() => inputs.dataTable),\n (config) => config.chart?.dataTable,\n 'none' as ChartDataTable,\n ),\n emptyText: computed(() => inputs.emptyText() ?? intl().chart.empty),\n errorText: computed(() => inputs.errorText() ?? intl().chart.error),\n valueFormat: resolveWithConfig(\n inputs.valueFormat,\n (config) => config.chart?.valueFormat,\n chartValueFormat(locale),\n ),\n tooltipLingerMs: resolveWithConfig(\n optional(() => inputs.tooltipLingerMs),\n (config) => config.chart?.tooltipLingerMs,\n CHART_TOOLTIP_LINGER_MS,\n ),\n pinOnClick: resolveWithConfig(\n optional(() => inputs.pinOnClick),\n (config) => config.chart?.pinOnClick,\n true,\n ),\n hoverDelayMs: chartHoverDelayMs(),\n highlightActive: resolveWithConfig(\n optional(() => inputs.highlightActive),\n (config) => config.chart?.highlightActive,\n true,\n ),\n tooltipSwatches: resolveWithConfig<boolean | 'auto'>(\n optional(() => inputs.tooltipSwatches),\n (config) => config.chart?.tooltipSwatches,\n 'auto',\n ),\n };\n}\n","import {\n Directive,\n booleanAttribute,\n inject,\n input,\n numberAttribute,\n type Signal,\n} from '@angular/core';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { resolveChartDefaults } from './charts-defaults';\n\n/** The inputs every chart has, declared once. Inputs only some charts have stay on those charts. @internal */\n@Directive({\n host: {\n '[style.--_chart-highlight]': \"highlightActiveResolved() ? null : 'none'\",\n },\n})\nexport abstract class DsChartBase {\n /** `'auto'` draws the chart's own bordered, padded box; `'none'` leaves it bare, for a chart\n * inside a card. Unset falls back to `DS_CONFIG.chart.frame`, then `'auto'`. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** Visible title above the plot, reused as the annex table's caption. */\n readonly caption = input<string | null>(null);\n\n /** Accessible name. Generated from the data when omitted. */\n readonly summary = input<string | null>(null);\n\n /** With no data, draws a skeleton in the chart's shape: `skeletonCount` marks where the chart has\n * it, the data's count once known. With data on screen, keeps the plot under `ds-loading-overlay`. */\n readonly loading = input(false, { transform: booleanAttribute });\n\n /** Shows `errorText` in place of the plot. Separate from `loading` and from empty data. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** Shown when there is no data. Unset falls back to `DS_INTL.chart.empty`. */\n readonly emptyText = input<string | null>(null);\n\n /** The message the error state prints. Unset falls back to `DS_INTL.chart.error`. */\n readonly errorText = input<string | null>(null);\n\n /** Formats every printed value, including the annex table and generated description. Unset\n * falls back to `DS_CONFIG.chart.valueFormat`, then `DS_CONFIG.locale` / `LOCALE_ID`. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n /** Turns on the click affordance: pointer cursor and hover tint. The click output fires\n * whether or not this is set. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** Whether the tooltip draws a colour dot beside each reading. Unset falls back to\n * `DS_CONFIG.chart.tooltipSwatches`, then shows them for two to four readings. */\n readonly tooltipSwatches = input<boolean | null>(null, {\n transform: (value: unknown) =>\n value == null ? null : booleanAttribute(value),\n });\n\n /** How long the tooltip stays after the pointer leaves the mark for another part of the chart,\n * in milliseconds; zero closes it at once. A pointer that leaves the chart closes it at once\n * whatever this says. Unset falls back to `DS_CONFIG.chart.tooltipLingerMs`, then 500. */\n readonly tooltipLingerMs = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Holds the clicked mark and its tooltip until a second click, Escape or a press outside.\n * Unset falls back to `DS_CONFIG.chart.pinOnClick`, then `true`. The click output fires either way. */\n readonly pinOnClick = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n /** Whether the hovered or focused column, bar or heatmap cell brightens. Unset falls back\n * to `DS_CONFIG.chart.highlightActive`, then `true`. */\n readonly highlightActive = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n protected readonly defaults = resolveChartDefaults(this);\n protected readonly intl = inject(DS_INTL);\n readonly frameResolved = this.defaults.frame;\n readonly emptyTextResolved = this.defaults.emptyText;\n readonly errorTextResolved = this.defaults.errorText;\n readonly valueFormatResolved = this.defaults.valueFormat;\n readonly highlightActiveResolved = this.defaults.highlightActive;\n}\n\n/** Whether the marks keyed `key` fade while `highlighted` is singled out: only under `dimOthers`,\n * and never the highlighted marks themselves.\n *\n * @internal */\nexport function dimmedBy<T>(\n dimOthers: boolean,\n highlighted: T | null,\n key: T,\n): boolean {\n return dimOthers && highlighted !== null && highlighted !== key;\n}\n\n/** A chart that can fade every mark but the one it is answering. @internal */\nexport interface ChartDimmable {\n readonly dimOthers: Signal<boolean>;\n}\n\n/** A chart whose marks arrive one after another. @internal */\nexport interface ChartStaggered {\n readonly staggerMs: Signal<number>;\n}\n\n/** A chart with an annex table it may leave out. @internal */\nexport interface ChartWithDataTable {\n readonly dataTable: Signal<ChartDataTable | null>;\n}\n\n/** A chart whose tooltip trigger can be chosen or turned off. @internal */\nexport interface ChartWithTooltipTrigger {\n readonly tooltip: Signal<'item' | 'axis' | 'none'>;\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\n\n/**\n * Focuses the field's inner `input`/`textarea` when the click lands on the frame chrome\n * (padding, an icon, an addon slot). Applied to a field's wrapper element.\n *\n * `preventDefault` on that mousedown stops focus bouncing off the chrome. Clicks on the\n * control or a nested button/link/input are left alone.\n */\n@Directive({\n selector: '[dsFieldClickFocus]',\n standalone: true,\n host: {\n '(mousedown)': 'onMousedown($event)',\n },\n})\nexport class FieldClickFocusDirective {\n private readonly host: HTMLElement = inject(ElementRef).nativeElement;\n\n protected onMousedown(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n if (\n target.closest('input, textarea, button, a, select, [contenteditable]')\n ) {\n return;\n }\n const field = this.host.querySelector<\n HTMLInputElement | HTMLTextAreaElement\n >('input, textarea');\n if (field && !field.disabled && !field.readOnly) {\n event.preventDefault();\n field.focus();\n }\n }\n}\n","import { DOCUMENT, Injector, afterNextRender, inject } from '@angular/core';\n\nconst TABBABLE_CANDIDATES =\n 'a[href], button, input, select, textarea, [tabindex], [contenteditable=\"true\"]';\n\nfunction isTabbable(element: HTMLElement): boolean {\n return (\n element.isConnected &&\n element.tabIndex >= 0 &&\n !(element as HTMLButtonElement).disabled &&\n !element.closest('[inert]') &&\n element.checkVisibility()\n );\n}\n\nfunction tabbableNeighbour(\n leaving: HTMLElement,\n within: HTMLElement,\n): HTMLElement | null {\n const candidates = Array.from(\n within.querySelectorAll<HTMLElement>(TABBABLE_CANDIDATES),\n ).filter((element) => !leaving.contains(element) && isTabbable(element));\n const following = candidates.find(\n (element) =>\n leaving.compareDocumentPosition(element) &\n Node.DOCUMENT_POSITION_FOLLOWING,\n );\n\n return following ?? candidates.at(-1) ?? null;\n}\n\n/**\n * When focus is inside `leaving`, which is about to be removed, moves it to the nearest tabbable\n * element inside `within`: the next one in document order, else the previous one, else `fallback`.\n * @internal\n */\nexport function moveFocusOutOf(\n leaving: HTMLElement,\n within: HTMLElement,\n fallback: HTMLElement | null = null,\n): void {\n if (!leaving.contains(leaving.ownerDocument.activeElement)) {\n return;\n }\n const target =\n tabbableNeighbour(leaving, within) ??\n (fallback && isTabbable(fallback) ? fallback : null);\n target?.focus();\n}\n\n/**\n * Returns a function that, after the next render, focuses `target()` when focus has fallen to\n * `<body>` - its element was removed or disabled under it. Focus the app moved elsewhere is left alone.\n *\n * Must be called from an injection context.\n * @internal\n */\nexport function focusRescue(): (\n target: () => HTMLElement | null | undefined,\n) => void {\n const injector = inject(Injector);\n const documentRef = inject(DOCUMENT);\n\n return (target) =>\n afterNextRender(\n () => {\n const active = documentRef.activeElement as HTMLElement | null;\n // A focused control that turns disabled still reads as active until the browser's focus fixup.\n const lost =\n !active ||\n active === documentRef.body ||\n !active.isConnected ||\n (active as HTMLButtonElement).disabled === true;\n if (lost) {\n target()?.focus();\n }\n },\n { injector },\n );\n}\n","let nextId = 0;\n\n/** Process-wide counter for SSR-safe control ids (no DOM dependency).\n * @internal\n */\nexport function nextControlId(prefix: string): string {\n return `${prefix}-${++nextId}`;\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Fills an option group's heading.\n *\n * Context: `$implicit` and `group` are the group itself, `count` how many of its\n * options survived the filter.\n *\n * The heading element stays the library's, keeping the id the group's `aria-labelledby`\n * points at.\n */\n@Directive({\n selector: '[dsGroupLabelTemplate]',\n standalone: true,\n})\nexport class DsGroupLabelTemplateDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Fills an option row's LABEL AREA in `ds-select`, `ds-multi-select` and\n * `ds-autocomplete`.\n *\n * ```html\n * <ds-multi-select [options]=\"assignees()\">\n * <ng-template dsOptionTemplate let-option>\n * <ds-avatar size=\"xs\" [seed]=\"option.label\" /> {{ option.label }}\n * </ng-template>\n * </ds-multi-select>\n * ```\n *\n * The row stays library-owned: `role=\"option\"`, `aria-selected`, the active-row class,\n * the checkbox and the check glyph are not projected.\n */\n@Directive({\n selector: '[dsOptionTemplate]',\n standalone: true,\n})\nexport class DsOptionTemplateDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import type {\n ConnectionPositionPair,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n} from '@angular/cdk/overlay';\n\n/** Where a connected panel sits relative to its trigger; the panel enters FROM the trigger. */\nexport type DsOverlayPlacement = 'top' | 'bottom' | 'left' | 'right';\n\n/** The theme's role layer, forwarded onto every portaled pane. */\nconst ROLE_TOKENS = [\n '--ds-radius-inner',\n '--ds-radius-control',\n '--ds-radius-panel',\n '--ds-radius-pill',\n '--ds-elevation-raised',\n '--ds-elevation-overlay',\n '--ds-elevation-floating',\n '--ds-elevation-modal',\n] as const;\n\n/** Public enter-motion tokens read by every `ds-overlay-pane`. */\nconst OVERLAY_MOTION_TOKENS = [\n '--ds-overlay-enter-keyframes',\n '--ds-overlay-enter-duration',\n '--ds-overlay-enter-easing',\n '--ds-overlay-enter-offset',\n '--ds-overlay-enter-scale',\n] as const;\n\n/** Styles the `ds-dropdown-panel` class every `dropdownOverlay()` pane carries. */\nconst DROPDOWN_PANEL_TOKENS = [\n '--ds-dropdown-panel-radius',\n '--ds-dropdown-panel-max-height',\n '--ds-dropdown-panel-border-color',\n '--ds-dropdown-panel-shadow',\n '--ds-option-padding',\n '--ds-option-gap',\n '--ds-option-radius',\n '--ds-option-row-gap',\n '--ds-option-bg-color-active',\n '--ds-option-font-weight',\n '--ds-option-font-size',\n '--ds-option-line-height',\n '--ds-option-font-family',\n] as const;\n\n/**\n * Why a panel is closing. `'select'` is a deliberate action (option chosen, trigger pressed\n * again, Tab moving on); `'dismiss'` is ambient (Escape, a press outside, scrolling away).\n * @internal\n */\nexport type DsOverlayCloseCause = 'select' | 'dismiss';\n\nconst DROPDOWN_GAP = 4;\n\n/**\n * One panel-class input as an array; spreading the raw string would give a per-letter class list.\n * @internal\n */\nexport function panelClassesOf(\n panelClass: string | readonly string[],\n): readonly string[] {\n return typeof panelClass === 'string'\n ? panelClass.split(' ').filter((className) => className.length > 0)\n : panelClass;\n}\n\n/** The pane's floor: the trigger, or `--ds-dropdown-panel-min-width` when that is wider. Set on the\n * pane, not the panel inside it, so the overlay is placed by the width it is drawn at.\n * @internal\n */\nexport function dropdownMinWidth(triggerWidth: number): string {\n return `max(${triggerWidth}px, var(--_dropdown-panel-min-width))`;\n}\n\n/**\n * The geometry every DS dropdown shares. Width is NOT set here: each caller has its own policy.\n * @internal\n */\nexport function dropdownOverlay(\n overlay: Overlay,\n trigger: HTMLElement,\n extraPanelClass: string | readonly string[] = [],\n): {\n positionStrategy: FlexibleConnectedPositionStrategy;\n config: OverlayConfig;\n} {\n const positionStrategy = overlay\n .position()\n .flexibleConnectedTo(trigger)\n .withPositions([\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetY: DROPDOWN_GAP,\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetY: -DROPDOWN_GAP,\n },\n ]);\n\n return {\n positionStrategy,\n config: {\n positionStrategy,\n hasBackdrop: false,\n // The panel skin is global CSS: `:host ::ng-deep` cannot reach a portaled node.\n panelClass: [\n 'ds-dropdown-panel',\n 'ds-overlay-pane',\n ...panelClassesOf(extraPanelClass),\n ],\n scrollStrategy: overlay.scrollStrategies.reposition(),\n },\n };\n}\n\n// Teardown fallback: a display:none pane, a removed animation or a 0s reduced-motion duration\n// (animationend is not reliably delivered) all end here. Past --ds-motion-exit-duration.\nconst LEAVE_TIMEOUT_MS = 400;\n\n/**\n * Closes a DS overlay panel instantly on a `'select'`, with a short fade on a `'dismiss'`.\n *\n * NOTE: teardown paths dispose directly; `ModalService` owns its own leave.\n * @internal\n */\nexport function disposeWithLeave(\n overlayRef: OverlayRef | null | undefined,\n cause: DsOverlayCloseCause = 'select',\n): void {\n if (!overlayRef) {\n return;\n }\n if (cause === 'select') {\n overlayRef.dispose();\n\n return;\n }\n\n const pane = overlayRef.overlayElement;\n let disposed = false;\n const finish = (): void => {\n if (disposed) {\n return;\n }\n disposed = true;\n clearTimeout(timer);\n pane.removeEventListener('animationend', onAnimationEnd);\n overlayRef.dispose();\n };\n // The pane's ROOT CHILD animates (CDK owns transforms on the pane), so the event bubbles up.\n const onAnimationEnd = (event: AnimationEvent): void => {\n if (event.animationName.endsWith('ds-overlay-out')) {\n finish();\n }\n };\n const timer = setTimeout(finish, LEAVE_TIMEOUT_MS);\n pane.addEventListener('animationend', onAnimationEnd);\n pane.classList.add('ds-leaving');\n}\n\n/**\n * Forwards a portaled panel's public `--ds-*` override tokens from the component host onto\n * the overlay pane (in `document.body`, outside `:host`). Only non-empty values are set, so an\n * unset token falls through to the panel's `var(--ds-*, <default>)`. Call once per open.\n * @internal\n */\nexport function forwardOverlayTokens(\n overlayRef: OverlayRef,\n host: HTMLElement,\n tokens: readonly string[],\n): void {\n const hostStyle = getComputedStyle(host);\n const paneStyle = overlayRef.overlayElement.style;\n for (const token of tokens) {\n const value = hostStyle.getPropertyValue(token).trim();\n if (value) {\n paneStyle.setProperty(token, value);\n }\n }\n\n // Roles resolve at :root; pinning them unconditionally would freeze an open panel against a\n // theme switch. Forward only where the host declares the role ITSELF, compared against the\n // PARENT (custom properties inherit) so an inline pin never outranks `.ds-overlay-pane`.\n const inheritedStyle = getComputedStyle(\n host.parentElement ?? host.ownerDocument.documentElement,\n );\n for (const token of ROLE_TOKENS) {\n const value = hostStyle.getPropertyValue(token).trim();\n if (value && value !== inheritedStyle.getPropertyValue(token).trim()) {\n paneStyle.setProperty(token, value);\n }\n }\n}\n\n/** The side of the trigger a connection pair puts the panel on. An axis decides only where the\n * pair pins opposite edges together: a side pair aligning top edges keeps `overlayY: 'top'`.\n * A pair covering the trigger falls back to `overlayY`, so `top` means it hangs BELOW.\n * @internal\n */\nexport function overlayPlacementOf({\n originX,\n originY,\n overlayX,\n overlayY,\n}: Pick<\n ConnectionPositionPair,\n 'originX' | 'originY' | 'overlayX' | 'overlayY'\n>): DsOverlayPlacement {\n const opposite = (origin: string, overlay: string) =>\n origin !== overlay && origin !== 'center' && overlay !== 'center';\n if (opposite(originY, overlayY)) {\n return overlayY === 'top' ? 'bottom' : 'top';\n }\n if (opposite(originX, overlayX)) {\n return overlayX === 'start' ? 'right' : 'left';\n }\n if (overlayY === 'top') {\n return 'bottom';\n }\n if (overlayY === 'bottom') {\n return 'top';\n }\n if (overlayX === 'start') {\n return 'right';\n }\n\n return 'left';\n}\n\n// Sets `--_overlay-arrow-x/y` on the panel: the trigger's centre in the panel's padding box.\n// positionChanges skips a re-apply that only pushes the pane; the styles CDK writes do not.\n// The pane is measured, not the panel: the panel's enter animation scales it.\n/** @internal */\nexport function pointArrowAtHost(\n ref: OverlayRef,\n panel: HTMLElement,\n host: HTMLElement,\n): void {\n const pane = ref.overlayElement;\n const point = () => {\n const trigger = host.getBoundingClientRect();\n const box = pane.getBoundingClientRect();\n panel.style.setProperty(\n '--_overlay-arrow-x',\n `${trigger.left + trigger.width / 2 - box.left - panel.clientLeft}px`,\n );\n panel.style.setProperty(\n '--_overlay-arrow-y',\n `${trigger.top + trigger.height / 2 - box.top - panel.clientTop}px`,\n );\n };\n const observer = new MutationObserver(point);\n observer.observe(ref.hostElement, { attributeFilter: ['style'] });\n observer.observe(pane, { attributeFilter: ['style'] });\n ref.detachments().subscribe({ complete: () => observer.disconnect() });\n}\n\n/**\n * Primes a `ds-overlay-pane` for its enter animation. Call right after `overlay.create()`:\n * CDK positions in `afterNextRender`, so the placement stamp lands before the first painted\n * frame. Until then (or with no strategy) the CSS default enters from above.\n *\n * No teardown needed: disposing the overlay completes `positionChanges`.\n * @internal\n */\nexport function prepareOverlayEnter(\n overlayRef: OverlayRef,\n host: HTMLElement,\n positionStrategy?: FlexibleConnectedPositionStrategy,\n): void {\n forwardOverlayTokens(overlayRef, host, OVERLAY_MOTION_TOKENS);\n forwardOverlayTokens(overlayRef, host, DROPDOWN_PANEL_TOKENS);\n positionStrategy?.positionChanges.subscribe(({ connectionPair }) => {\n overlayRef.overlayElement.dataset['dsPlacement'] =\n overlayPlacementOf(connectionPair);\n });\n}\n\n/** Closes a non-modal overlay on a pointer press outside it, EXCEPT on its trigger. Use with `hasBackdrop: false`.\n * @internal\n */\nexport function closeOnOutsidePointer(\n overlayRef: OverlayRef,\n isInsideTrigger: (target: Node) => boolean,\n close: () => void,\n): void {\n overlayRef.outsidePointerEvents().subscribe((event) => {\n const target = event.target as Node | null;\n if (target && isInsideTrigger(target)) {\n return;\n }\n close();\n });\n}\n\n/** Closes a non-modal overlay when the page scrolls. CDK's scroll strategies miss a plain\n * `overflow:auto` container, so this listens on the document in the CAPTURE phase (`scroll`\n * does not bubble). A scroll inside the panel is ignored.\n * @internal\n */\nexport function closeOnScroll(\n overlayRef: OverlayRef,\n close: () => void,\n): () => void {\n const onScroll = (event: Event): void => {\n const target = event.target as Node | null;\n if (target && overlayRef.overlayElement.contains(target)) {\n return;\n }\n if (\n target instanceof HTMLElement &&\n (target.tagName === 'INPUT' ||\n target.tagName === 'TEXTAREA' ||\n target.tagName === 'SELECT')\n ) {\n return;\n }\n close();\n };\n const doc = overlayRef.overlayElement.ownerDocument;\n doc.addEventListener('scroll', onScroll, true);\n\n return () => doc.removeEventListener('scroll', onScroll, true);\n}\n\n/** Calls `onEscape` when `Escape` is pressed anywhere on `target`, in the CAPTURE phase so a handler\n * further down cannot swallow it. Returns the removal. A null target (no document, as on the\n * server) listens to nothing.\n * @internal\n */\nexport function listenForEscape(\n target: Pick<Document, 'addEventListener' | 'removeEventListener'> | null,\n onEscape: () => void,\n): () => void {\n if (!target) {\n return () => undefined;\n }\n const onKeydown = (event: KeyboardEvent): void => {\n if (event.key === 'Escape') {\n onEscape();\n }\n };\n target.addEventListener('keydown', onKeydown as EventListener, true);\n\n return () =>\n target.removeEventListener('keydown', onKeydown as EventListener, true);\n}\n\n/**\n * Syncs a component's \"which overlay is mine, and is it open\" state when THIS overlay detaches,\n * skipping the write when a newer one has taken over.\n *\n * `disposeWithLeave` defers the dispose until the exit animation ends, so a dismiss followed\n * by a re-open delivers the OLD overlay's detachment while the NEW one is live. Clearing\n * unconditionally would leave that panel on screen with its component believing it closed.\n * @internal\n */\nexport function clearOnDetach(\n overlayRef: OverlayRef,\n {\n current,\n clear,\n always,\n }: {\n /** Reads the ref the component considers live right now. */\n current: () => OverlayRef | null;\n /** Drops the stored ref and marks the component closed. */\n clear: () => void;\n /** Teardown that must run for every detachment, current or superseded. */\n always?: () => void;\n },\n): void {\n overlayRef.detachments().subscribe(() => {\n always?.();\n if (current() !== overlayRef) {\n return;\n }\n clear();\n });\n}\n\n/** True when keyboard focus sits inside the overlay pane. Read it BEFORE disposing, to decide\n * whether the close must refocus the trigger rather than strand focus on `<body>`.\n * @internal\n */\nexport function focusIsInside(overlayRef: OverlayRef): boolean {\n const doc = overlayRef.overlayElement.ownerDocument;\n\n return overlayRef.overlayElement.contains(doc.activeElement);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Fills a strip below a picker panel's option list.\n *\n * Context: the same as the header slot: `count`, `total`, `query`.\n *\n * Like the header it sits OUTSIDE the `listbox` and does not scroll with the options.\n * Anything focusable here is reached by Tab, so give it an accessible name.\n */\n@Directive({\n selector: '[dsPanelFooterTemplate]',\n standalone: true,\n})\nexport class DsPanelFooterTemplateDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Fills a strip above a picker panel's option list.\n *\n * Context: `count` is how many options are visible after filtering, `total` how\n * many were given, and `query` the text that narrowed them.\n *\n * It sits OUTSIDE the `listbox`, so it is not counted as an option in a screen\n * reader's \"N of M\" position. It stays put while the list scrolls.\n */\n@Directive({\n selector: '[dsPanelHeaderTemplate]',\n standalone: true,\n})\nexport class DsPanelHeaderTemplateDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import {\n type Signal,\n DestroyRef,\n effect,\n inject,\n DOCUMENT,\n} from '@angular/core';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\n\n/**\n * Announces how many options survived the filter.\n *\n * NOT a row inside the listbox (a live region there is an invalid child). The node is created\n * once, empty, and only its text changes: a region created with its text is not reliably announced.\n * @internal\n */\nexport function announceOptionCount(\n count: Signal<number>,\n active: Signal<boolean>,\n): void {\n const documentRef = inject(DOCUMENT);\n const intl = inject(DS_INTL);\n const region = documentRef.createElement('div');\n region.setAttribute('aria-live', 'polite');\n region.setAttribute('aria-atomic', 'true');\n // Off-screen, not `display: none`, which would remove it from the accessibility tree.\n // glyph-clip-guard: visually hidden live region\n region.style.cssText =\n 'position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;margin:-1px;padding:0';\n documentRef.body.appendChild(region);\n inject(DestroyRef).onDestroy(() => region.remove());\n\n effect(() => {\n if (!active()) {\n region.textContent = '';\n\n return;\n }\n region.textContent = intl().picker.resultCount(count());\n });\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Replaces the CONTENTS of a picker's trigger (chips, value, placeholder) with your own\n * markup. The trigger ELEMENT stays library-owned: its ARIA attributes and\n * Enter/Space/ArrowDown/Escape handling are kept.\n *\n * ```html\n * <ds-multi-select [options]=\"labels()\" [(value)]=\"picked\">\n * <ng-template dsPickerTrigger let-count=\"count\">\n * Labels @if (count) { <ds-badge [count]=\"count\" /> }\n * </ng-template>\n * </ds-multi-select>\n * ```\n *\n * Context: `$implicit` and `selected` are the selected options, `count` their\n * number, `open` whether the panel is showing, `disabled` the control's state.\n *\n * A projected template WINS over `triggerDisplay`, which is then not read at all.\n */\n@Directive({\n selector: '[dsPickerTrigger]',\n standalone: true,\n})\nexport class DsPickerTriggerDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import {\n Directive,\n ElementRef,\n afterNextRender,\n inject,\n input,\n} from '@angular/core';\nimport { reportDevWarning } from '@ids-group-ltd/ids-design-system/core';\n\n/**\n * Dev-only guard for a component that DROPS whatever is projected into it: warns instead of\n * staying silent. Put it on a probe around the `<ng-content>`, gated on dev mode:\n *\n * ```html\n * @if (devMode) {\n * <span dsProjectionDropped=\"ds-filter-bar\"><ng-content></ng-content></span>\n * }\n * ```\n *\n * It is NOT projection support: the probe only detects that content arrived, then hides it.\n * `reason` replaces the default `[label]` wording.\n * @internal\n */\n@Directive({\n selector: '[dsProjectionDropped]',\n standalone: true,\n host: { style: 'display: none' },\n})\nexport class ProjectionDroppedDirective {\n readonly dsProjectionDropped = input.required<string>();\n /** Overrides the `[label]` explanation; appended after \"Projected content renders nothing\". */\n readonly reason = input<string>('');\n\n private readonly probe = inject(ElementRef<HTMLElement>);\n\n constructor() {\n afterNextRender(() => {\n if (!this.probe.nativeElement.textContent?.trim()) {\n return;\n }\n const selector = this.dsProjectionDropped();\n const reason =\n this.reason() ||\n `the caption comes from the [label] input only, so \\`<${selector}>Some text</${selector}>\\` shows no caption at all. Move the text into [label].`;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n reportDevWarning(\n `[${selector}] Projected content renders nothing — ${reason}`,\n );\n }\n });\n }\n}\n","import {\n type Signal,\n afterRenderEffect,\n inject,\n DOCUMENT,\n} from '@angular/core';\n\n/**\n * Keeps the keyboard cursor's row visible inside a scrolling panel.\n *\n * KEYBOARD ONLY (`armed`): rows also set the active index on `mouseenter`, and reacting to\n * that would pull a partially visible row up under the pointer.\n *\n * Rows are looked up by id, not `viewChildren`, because they live in a portaled template.\n * @internal\n */\nexport function scrollActiveOptionIntoView(\n activeDescendantId: Signal<string | null>,\n enabled: Signal<boolean>,\n armed: Signal<boolean>,\n): void {\n const documentRef = inject(DOCUMENT);\n\n afterRenderEffect(() => {\n const id = activeDescendantId();\n if (!enabled() || !armed() || !id) {\n return;\n }\n documentRef\n .getElementById(id)\n ?.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n });\n}\n","import { Directive, booleanAttribute, input } from '@angular/core';\n\n/** Showcase-only: renders the component's open/overlay surface inline in normal\n * flow instead of its real overlay mechanics (for static docs specimens).\n * Not part of the production contract. */\n@Directive({ standalone: true })\nexport class DsStaticPreview {\n readonly staticPreview = input(false, { transform: booleanAttribute });\n}\n","/**\n * Jump-to-option-by-typing, as a native `<select>` does. 500ms is the native and APG\n * interval separating \"ba\" from two separate presses.\n */\nconst RESET_AFTER_MS = 500;\n\nexport interface DsTypeAhead {\n /** Feed it a keypress. Returns the index to move to, or -1 when the key is not\n * a character or nothing matches. */\n match: (key: string, labels: readonly string[], from: number) => number;\n}\n\n/** @internal */\nexport function createTypeAhead(): DsTypeAhead {\n let buffer = '';\n let last = 0;\n\n return {\n match(key, labels, from) {\n if (key.length !== 1 || !/\\S/.test(key)) {\n return -1;\n }\n\n const now = Date.now();\n buffer = now - last > RESET_AFTER_MS ? key : buffer + key;\n last = now;\n\n const query = buffer.toLowerCase();\n const cycling =\n buffer.length > 1 &&\n [...buffer].every((character) => character === buffer[0]);\n const needle = cycling ? buffer[0].toLowerCase() : query;\n const start = cycling || buffer.length === 1 ? from + 1 : 0;\n\n for (let offset = 0; offset < labels.length; offset += 1) {\n const index = (start + offset + labels.length) % labels.length;\n if (labels[index].toLowerCase().startsWith(needle)) {\n return index;\n }\n }\n\n return -1;\n },\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["observer"],"mappings":";;;;;;;;AAGA;;;;AAIG;AACG,SAAU,iBAAiB,CAC/B,KAA4B,EAC5B,GAAsC,EAAA;AAEtC,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC;AAEhC,IAAA,OAAO,QAAQ,CAAC,MAAM,KAAK,EAAE,IAAI,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;AAC7D;;ACfA;AACA;AACA;AAEA;AACuC;AAChC,MAAM,WAAW,GAAG;AACzB,IAAA,OAAO,EAAE,gCAAgC;AACzC,IAAA,OAAO,EAAE,gCAAgC;AACzC,IAAA,OAAO,EAAE,gCAAgC;AACzC,IAAA,OAAO,EAAE,gCAAgC;AACzC,IAAA,OAAO,EAAE,gCAAgC;AACzC,IAAA,OAAO,EAAE,gCAAgC;AACzC,IAAA,OAAO,EAAE,gCAAgC;AACzC,IAAA,OAAO,EAAE,gCAAgC;AACzC,IAAA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EAAE;AACxD,gBAAA,MAAM,KAAK,GAAG,CAAC,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM;AAC9D,gBAAA,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;AAClD,oBAAA,OAAO,KAAK;gBACd;YACF;YAEA,OAAO,CAAC,CAAC;QACX,CAAC;KACF;AACH;;AC5CA;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components.mjs","sources":["../../../src/lib/components/brand-defaults.ts","../../../src/lib/components/chart-palette.generated.ts","../../../src/lib/components/charts-format.ts","../../../src/lib/components/charts-measure.ts","../../../src/lib/components/charts-render-gate.ts","../../../src/lib/components/charts-label-fit.ts","../../../src/lib/components/charts-decimate.ts","../../../src/lib/components/charts-path.ts","../../../src/lib/components/charts-scale.ts","../../../src/lib/components/charts-motion.ts","../../../src/lib/components/charts-skeleton.ts","../../../src/lib/components/charts-dwell.ts","../../../src/lib/components/charts-roving.ts","../../../src/lib/components/charts-summary.ts","../../../src/lib/components/chip-overflow.ts","../../../src/lib/components/chip-template.directive.ts","../../../src/lib/components/field-defaults.ts","../../../src/lib/components/field-errors.ts","../../../src/lib/components/message-base.ts","../../../src/lib/components/field-base.ts","../../../src/lib/components/control-value-accessor.ts","../../../src/lib/components/create-template.directive.ts","../../../src/lib/components/destination.ts","../../../src/lib/components/empty-template.directive.ts","../../../src/lib/components/charts-defaults.ts","../../../src/lib/components/charts-base.ts","../../../src/lib/components/field-click-focus.directive.ts","../../../src/lib/components/focus-rescue.ts","../../../src/lib/components/marker-glyph.ts","../../../src/lib/components/field-ids.ts","../../../src/lib/components/group-label-template.directive.ts","../../../src/lib/components/option-template.directive.ts","../../../src/lib/components/overlay-motion.ts","../../../src/lib/components/panel-footer-template.directive.ts","../../../src/lib/components/panel-header-template.directive.ts","../../../src/lib/components/picker-announcer.ts","../../../src/lib/components/picker-trigger.directive.ts","../../../src/lib/components/projection-dropped.directive.ts","../../../src/lib/components/scroll-active-option.ts","../../../src/lib/components/static-preview.directive.ts","../../../src/lib/components/type-ahead.ts","../../../src/lib/components/ids-group-ltd-ids-design-system-components.ts"],"sourcesContent":["import { Signal, computed, inject } from '@angular/core';\nimport { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';\n\n/**\n * Resolves one brand string against the app-level default. `null` means unset;\n * `''` is an explicit \"this screen has no brand\". Each field resolves on its own.\n * @internal\n */\nexport function resolveBrandValue(\n value: Signal<string | null>,\n key: 'name' | 'logoLetter' | 'tagline',\n): Signal<string> {\n const config = inject(DS_CONFIG);\n\n return computed(() => value() ?? config.brand?.[key] ?? '');\n}\n","// GENERATED by tools/generate-chart-palette.mjs. Do not edit. Values are var()\n// references, not resolved colours, so a consumer overriding the token still wins\n// at runtime.\n\n/** @internal Exported for the chart entry points that import it across the boundary;\n * not part of the package surface. */\nexport const chartColors = {\n series1: 'var(--ds-chart-series-1-color)',\n series2: 'var(--ds-chart-series-2-color)',\n series3: 'var(--ds-chart-series-3-color)',\n series4: 'var(--ds-chart-series-4-color)',\n series5: 'var(--ds-chart-series-5-color)',\n series6: 'var(--ds-chart-series-6-color)',\n series7: 'var(--ds-chart-series-7-color)',\n series8: 'var(--ds-chart-series-8-color)',\n seriesDefault: 'var(--ds-chart-series-default-color)',\n seriesAccent: 'var(--ds-chart-series-accent-color)',\n ramp1: 'var(--ds-chart-ramp-1-color)',\n ramp2: 'var(--ds-chart-ramp-2-color)',\n ramp3: 'var(--ds-chart-ramp-3-color)',\n ramp4: 'var(--ds-chart-ramp-4-color)',\n ramp5: 'var(--ds-chart-ramp-5-color)',\n ramp6: 'var(--ds-chart-ramp-6-color)',\n ramp7: 'var(--ds-chart-ramp-7-color)',\n ramp8: 'var(--ds-chart-ramp-8-color)',\n heat1: 'var(--ds-chart-heat-1-color)',\n heat2: 'var(--ds-chart-heat-2-color)',\n heat3: 'var(--ds-chart-heat-3-color)',\n heat4: 'var(--ds-chart-heat-4-color)',\n heat5: 'var(--ds-chart-heat-5-color)',\n heat6: 'var(--ds-chart-heat-6-color)',\n heat7: 'var(--ds-chart-heat-7-color)',\n heat8: 'var(--ds-chart-heat-8-color)',\n} as const;\n\n/** @internal See chartColors. */\nexport const CHART_SERIES_COLORS: readonly string[] = [\n chartColors.series1,\n chartColors.series2,\n chartColors.series3,\n chartColors.series4,\n chartColors.series5,\n chartColors.series6,\n chartColors.series7,\n chartColors.series8,\n];\n\n/** @internal See chartColors. */\nexport const CHART_RAMP_COLORS: readonly string[] = [\n chartColors.ramp1,\n chartColors.ramp2,\n chartColors.ramp3,\n chartColors.ramp4,\n chartColors.ramp5,\n chartColors.ramp6,\n chartColors.ramp7,\n chartColors.ramp8,\n];\n\n/** @internal See chartColors. */\nexport const CHART_HEAT_COLORS: readonly string[] = [\n chartColors.heat1,\n chartColors.heat2,\n chartColors.heat3,\n chartColors.heat4,\n chartColors.heat5,\n chartColors.heat6,\n chartColors.heat7,\n chartColors.heat8,\n];\n","import type { ChartValueFormat } from '@ids-group-ltd/ids-design-system/core';\n\nconst numberFormatters = new Map<string, Intl.NumberFormat>();\n\nfunction numberFormatter(locale: string | undefined): Intl.NumberFormat {\n const key = locale ?? 'default';\n let formatter = numberFormatters.get(key);\n if (!formatter) {\n formatter = new Intl.NumberFormat(locale);\n numberFormatters.set(key, formatter);\n }\n\n return formatter;\n}\n\n/** @internal */\nexport function formatValue(value: number, locale?: string): string {\n if (!Number.isFinite(value)) {\n return '—';\n }\n\n return numberFormatter(locale).format(value);\n}\n\nconst chartFormats = new Map<string, ChartValueFormat>();\n\n/** The built-in `valueFormat` in one locale: compact on a tick (`1.2M`), spelled out everywhere\n * else (`1,248,392`). A caller-supplied formatter receives the same `location`.\n *\n * @internal */\nexport function chartValueFormat(locale: string): ChartValueFormat {\n let format = chartFormats.get(locale);\n if (!format) {\n const compact = new Intl.NumberFormat(locale, {\n notation: 'compact',\n maximumFractionDigits: 1,\n });\n const full = new Intl.NumberFormat(locale);\n format = (value, location) =>\n !Number.isFinite(value)\n ? '—'\n : location === 'tick'\n ? compact.format(value)\n : full.format(value);\n chartFormats.set(locale, format);\n }\n\n return format;\n}\n\nconst percentFormatters = new Map<string, Intl.NumberFormat>();\n\nfunction percentFormatter(locale: string, digits: 0 | 1): Intl.NumberFormat {\n const key = `${locale}|${digits}`;\n let formatter = percentFormatters.get(key);\n if (!formatter) {\n formatter = new Intl.NumberFormat(locale, {\n style: 'percent',\n minimumFractionDigits: digits,\n maximumFractionDigits: digits,\n });\n percentFormatters.set(key, formatter);\n }\n\n return formatter;\n}\n\n/** @internal */\nexport function formatPercent(\n value: number,\n total: number,\n locale: string,\n): string {\n if (!total || !Number.isFinite(value) || !Number.isFinite(total)) {\n return '—';\n }\n const fraction = value / total;\n const formatter = percentFormatter(locale, 1);\n // A real share must never print as an exact zero.\n if (fraction !== 0 && Math.abs(fraction) < 0.0005) {\n return fraction > 0\n ? `<${formatter.format(0.001)}`\n : `>${formatter.format(-0.001)}`;\n }\n\n return formatter.format(fraction);\n}\n\n/** A whole-number percentage (the pie's largest-remainder shares), in `locale`.\n *\n * @internal */\nexport function formatWholePercent(percent: number, locale: string): string {\n return percentFormatter(locale, 0).format(percent / 100);\n}\n\n/** Whole percentages that sum to exactly 100 (rounding each alone gives 33/33/33).\n *\n * @internal */\nexport function largestRemainder(values: readonly number[]): number[] {\n const total = values.reduce((sum, value) => sum + value, 0);\n if (!total) {\n return values.map(() => 0);\n }\n const exact = values.map((value) => (value / total) * 100);\n const floors = exact.map(Math.floor);\n let remaining = 100 - floors.reduce((sum, value) => sum + value, 0);\n const order = exact\n .map((value, index) => ({ index, fraction: value - Math.floor(value) }))\n .sort((a, b) => b.fraction - a.fraction);\n const result = [...floors];\n for (const { index } of order) {\n if (remaining <= 0) {\n break;\n }\n result[index]++;\n remaining--;\n }\n\n return result;\n}\n\n/** @internal */\nexport function formatTick(value: number, step: number): string {\n if (!Number.isFinite(value)) {\n return '';\n }\n if (Math.abs(value) < 1000) {\n return String(value);\n }\n\n // The unit follows the step, not the value, so every label on an axis shares a suffix.\n const units = [\n { suffix: 'B', scale: 1e9 },\n { suffix: 'M', scale: 1e6 },\n { suffix: 'K', scale: 1e3 },\n ];\n const unit =\n units.find((candidate) => Math.abs(step) >= candidate.scale) ?? units[2];\n const scaled = value / unit.scale;\n\n // A step that divides its unit evenly needs no decimal; otherwise exactly one on every label.\n // Rounding the whole branch keeps a raw datum from printing 987.654321M.\n return step % unit.scale === 0\n ? `${Math.round(scaled)}${unit.suffix}`\n : `${scaled.toFixed(1)}${unit.suffix}`;\n}\n\n/** One mark's share of the total its siblings add up to, as a bare percentage; empty for a lone mark,\n * and for a negative or non-finite reading (excluded from the total, not subtracted).\n *\n * @internal */\nexport function shareOfTotal(\n values: readonly number[],\n index: number,\n locale: string,\n): string {\n const value = values[index];\n if (values.length < 2 || !Number.isFinite(value) || value <= 0) {\n return '';\n }\n const total = values\n .filter((entry) => Number.isFinite(entry) && entry > 0)\n .reduce((sum, entry) => sum + entry, 0);\n\n return total > 0 ? formatPercent(value, total, locale) : '';\n}\n\n/** The same share, phrased for a tooltip line.\n *\n * @internal */\nexport function describeShare(\n values: readonly number[],\n index: number,\n locale: string,\n phrase: (share: string) => string,\n): string {\n const share = shareOfTotal(values, index, locale);\n\n return share ? phrase(share) : '';\n}\n","import {\n DestroyRef,\n ElementRef,\n PLATFORM_ID,\n Signal,\n WritableSignal,\n effect,\n inject,\n signal,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\n/** Container width as a signal; 0 under SSR, while `display: none`, and before the first observation.\n *\n * @internal */\nexport function elementWidth(host: ElementRef<HTMLElement>): Signal<number> {\n const width = signal(0);\n if (!isPlatformBrowser(inject(PLATFORM_ID))) {\n return width.asReadonly();\n }\n\n inject(DestroyRef).onDestroy(watchElementWidth(host.nativeElement, width));\n\n return width.asReadonly();\n}\n\n/** Writes `element`'s rounded content width into `width` on every change, through the one observer\n * every chart shares. Returns the call that stops it.\n *\n * @internal */\nexport function watchElementWidth(\n element: Element,\n width: WritableSignal<number>,\n): () => void {\n widths.set(element, width);\n sharedObserver().observe(element);\n\n return () => {\n sharedObserver().unobserve(element);\n widths.delete(element);\n };\n}\n\n/** `read(host)` as a signal, re-read whenever the host's width changes, so a geometry token re-pointed\n * at a breakpoint reaches the chart. `initial` until the host is laid out, and under SSR.\n *\n * @internal */\nexport function readOnHostResize<T>(\n host: ElementRef<HTMLElement>,\n read: (element: HTMLElement) => T,\n initial: T,\n equal: (previous: T, next: T) => boolean,\n): Signal<T> {\n const width = elementWidth(host);\n const value = signal(initial, { equal });\n effect(() => {\n if (width() > 0) {\n value.set(read(host.nativeElement));\n }\n });\n\n return value.asReadonly();\n}\n\nconst fontsReady = signal(false);\nlet fontsWatched = false;\n\n/** `true` once the page's web fonts have loaded, for an effect that measures rendered text: reading\n * it re-runs the measure taken against the fallback face. The wait starts on the first call, so\n * call it in the browser, after the text it measures has rendered.\n *\n * @internal */\nexport function fontsLoaded(): boolean {\n if (!fontsWatched) {\n fontsWatched = true;\n void document.fonts?.ready.then(() => fontsReady.set(true));\n }\n\n return fontsReady();\n}\n\nconst widths = new WeakMap<Element, WritableSignal<number>>();\nlet observer: ResizeObserver | null = null;\n\n// One observer for every chart on the page: a resize is one callback carrying every entry.\nfunction sharedObserver(): ResizeObserver {\n observer ??= new ResizeObserver((entries) => {\n for (const entry of entries) {\n widths.get(entry.target)?.set(Math.round(entry.contentRect.width));\n }\n });\n\n return observer;\n}\n","import {\n DestroyRef,\n ElementRef,\n InjectionToken,\n PLATFORM_ID,\n Signal,\n afterNextRender,\n inject,\n signal,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';\n\n/** Provided by a chart that has already waited for the viewport, so its `ds-chart` builds at once.\n *\n * @internal */\nexport const CHART_RENDER_GATE_PASSED = new InjectionToken<boolean>(\n 'CHART_RENDER_GATE_PASSED',\n);\n\ntype Build = () => void;\n\nconst builders = new WeakMap<Element, Build>();\nconst near = new Map<Element, Build>();\nconst ahead = new Map<Element, Build>();\nconst observers = new Map<Element | null, Map<string, IntersectionObserver>>();\nlet draining = false;\nlet idleScheduled = false;\nlet budgetMs = 8;\n\nfunction drain(): void {\n const start = performance.now();\n for (const [host, build] of near) {\n if (performance.now() - start > budgetMs) {\n setTimeout(drain);\n\n return;\n }\n near.delete(host);\n build();\n }\n draining = false;\n}\n\n// An idle period with less than this left would run a build into the next frame.\nconst IDLE_ROOM_MS = 12;\n\nfunction buildWhileIdle(deadline: IdleDeadline): void {\n idleScheduled = false;\n for (const [host, build] of ahead) {\n if (deadline.timeRemaining() < IDLE_ROOM_MS) {\n break;\n }\n ahead.delete(host);\n build();\n }\n scheduleIdle();\n}\n\nfunction scheduleIdle(): void {\n if (\n idleScheduled ||\n !ahead.size ||\n typeof requestIdleCallback === 'undefined'\n ) {\n return;\n }\n idleScheduled = true;\n requestIdleCallback(buildWhileIdle);\n}\n\nfunction observer(\n root: Element | null,\n margin: string,\n queue: Map<Element, Build>,\n schedule: () => void,\n): IntersectionObserver {\n let byMargin = observers.get(root);\n if (!byMargin) {\n byMargin = new Map();\n observers.set(root, byMargin);\n }\n const key = `${queue === near ? 'near' : 'ahead'} ${margin}`;\n let found = byMargin.get(key);\n if (!found) {\n found = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n const build = builders.get(entry.target);\n if (build && entry.isIntersecting) {\n queue.set(entry.target, build);\n } else {\n queue.delete(entry.target);\n }\n }\n schedule();\n },\n { root, rootMargin: margin },\n );\n byMargin.set(key, found);\n }\n\n return found;\n}\n\nfunction scheduleDrain(): void {\n if (near.size && !draining) {\n draining = true;\n setTimeout(drain);\n }\n}\n\n// A margin on the root only widens the root: an element in a scrolling container is clipped by it\n// first, so the container must be the root. Overflow alone is not enough (a sideways-only scroller\n// computes `overflow-y: auto` too), so it must also be taller inside than out.\nfunction scrollRoot(host: Element): Element | null {\n for (let node = host.parentElement; node; node = node.parentElement) {\n const overflow = getComputedStyle(node).overflowY;\n if (\n (overflow === 'auto' ||\n overflow === 'scroll' ||\n overflow === 'overlay') &&\n node.scrollHeight > node.clientHeight\n ) {\n return node;\n }\n }\n\n return null;\n}\n\n/** Whether a chart may build its plot yet, under `DS_CONFIG.chart.rendering`. `true` from the start\n * unless `deferUntilVisible` is on; then `true` once the chart nears the viewport or is built ahead\n * while the page is idle, and it stays `true`. Call from an injection context.\n *\n * @internal */\nexport function chartRenderGate(): Signal<boolean> {\n const rendering = inject(DS_CONFIG).chart?.rendering;\n // `skipSelf`: a preset provides the token to its own view and must not read it back.\n const passed = inject(CHART_RENDER_GATE_PASSED, {\n optional: true,\n skipSelf: true,\n });\n if (\n !rendering?.deferUntilVisible ||\n passed ||\n !isPlatformBrowser(inject(PLATFORM_ID)) ||\n typeof IntersectionObserver === 'undefined'\n ) {\n return signal(true).asReadonly();\n }\n\n const ready = signal(false);\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n budgetMs = rendering.frameBudgetMs ?? budgetMs;\n const skipWhileOffscreen = rendering.skipWhileOffscreen ?? true;\n let release: () => void = () => undefined;\n\n afterNextRender(() => {\n const root = scrollRoot(host);\n const watchers = [\n observer(root, rendering.visibleMargin ?? '10% 0px', near, scheduleDrain),\n ];\n if (rendering.buildAheadWhileIdle ?? true) {\n watchers.push(\n observer(\n root,\n rendering.buildAheadMargin ?? '100% 0px',\n ahead,\n scheduleIdle,\n ),\n );\n }\n release = () => {\n for (const watcher of watchers) {\n watcher.unobserve(host);\n }\n near.delete(host);\n ahead.delete(host);\n };\n builders.set(host, () => {\n release();\n if (skipWhileOffscreen) {\n // `auto` remembers the last rendered height, so skipping moves nothing.\n host.style.contentVisibility = 'auto';\n host.style.containIntrinsicBlockSize = 'auto 300px';\n }\n ready.set(true);\n });\n for (const watcher of watchers) {\n watcher.observe(host);\n }\n });\n inject(DestroyRef).onDestroy(() => release());\n\n return ready.asReadonly();\n}\n","/** A label turned 45 degrees takes this fraction of its width across the axis. */\nconst ROTATED_FOOTPRINT = Math.sin(Math.PI / 4);\n\n/** Labels that merely fail to overlap read as one run, so a footprint is its width plus this. */\nconst LABEL_GAP = 16;\n\n/** The widest label decides for all.\n *\n * @internal */\nexport function labelInterval(\n labelWidths: readonly number[],\n step: number,\n rotated: boolean,\n): number {\n const usable = labelWidths.filter((width) => Number.isFinite(width));\n if (usable.length === 0 || !Number.isFinite(step) || step <= 0) {\n return 1;\n }\n const widest = usable.reduce((max, width) => Math.max(max, width), 0);\n const footprint = (rotated ? widest * ROTATED_FOOTPRINT : widest) + LABEL_GAP;\n\n return Math.max(1, Math.ceil(footprint / step));\n}\n\n/** Asked before thinning: a tilt is spent before a reading.\n *\n * @internal */\nexport function rotationWouldFit(\n labelWidths: readonly number[],\n step: number,\n): boolean {\n return (\n labelInterval(labelWidths, step, false) > 1 &&\n labelInterval(labelWidths, step, true) === 1\n );\n}\n","/** One reading on two continuous scales. Structural, so the shared entry point names no chart's own type. */\ninterface Reading {\n readonly x: number;\n readonly y: number;\n}\n\n/** A series only decimates past four times the target: below that the saving is invisible and the loss of detail is not. */\nconst DECIMATION_HEADROOM = 4;\n\n/** How many marks the plot can carry: one per pixel of its width.\n *\n * @internal */\nexport function decimationTarget(plotWidth: number): number {\n return Number.isFinite(plotWidth) && plotWidth > 0\n ? Math.floor(plotWidth)\n : 0;\n}\n\n/** @internal */\nexport function needsDecimating(count: number, target: number): boolean {\n return target > 0 && count > target * DECIMATION_HEADROOM;\n}\n\n/** Buckets the series by position and keeps each bucket's highest and lowest reading.\n *\n * The default: a bucket's extremum is in the output by construction, so a spike cannot be dropped,\n * and the result is stable while panning.\n *\n * @internal */\nexport function minMaxDecimate(\n points: readonly Reading[],\n target: number,\n): readonly Reading[] {\n if (target <= 0 || points.length <= target) {\n return points;\n }\n const buckets = Math.max(1, Math.floor(target / 2));\n const size = points.length / buckets;\n const kept: Reading[] = [];\n\n for (let bucket = 0; bucket < buckets; bucket++) {\n const from = Math.floor(bucket * size);\n const to = Math.min(points.length, Math.floor((bucket + 1) * size));\n if (from >= to) {\n continue;\n }\n let lowest = points[from];\n let highest = points[from];\n for (let index = from + 1; index < to; index++) {\n if (points[index].y < lowest.y) {\n lowest = points[index];\n }\n if (points[index].y > highest.y) {\n highest = points[index];\n }\n }\n const [first, second] =\n lowest.x <= highest.x ? [lowest, highest] : [highest, lowest];\n kept.push(first);\n if (second !== first) {\n kept.push(second);\n }\n }\n\n return kept;\n}\n\n/** Largest Triangle Three Buckets: keeps the reading in each bucket that makes the biggest triangle\n * with the point already kept and the next bucket's centre of mass.\n *\n * Draws a truer shape than MinMax at the same budget but does not promise the extremum: use where\n * the outline is the reading.\n *\n * @internal */\nexport function lttbDecimate(\n points: readonly Reading[],\n target: number,\n): readonly Reading[] {\n if (target <= 2 || points.length <= target) {\n return points;\n }\n const kept: Reading[] = [points[0]];\n const size = (points.length - 2) / (target - 2);\n let previous = points[0];\n\n for (let bucket = 0; bucket < target - 2; bucket++) {\n const from = Math.floor(bucket * size) + 1;\n const to = Math.min(points.length - 1, Math.floor((bucket + 1) * size) + 1);\n const nextFrom = to;\n const nextTo = Math.min(\n points.length - 1,\n Math.floor((bucket + 2) * size) + 1,\n );\n\n let averageX = 0;\n let averageY = 0;\n const span = Math.max(1, nextTo - nextFrom);\n for (let index = nextFrom; index < nextTo; index++) {\n averageX += points[index].x;\n averageY += points[index].y;\n }\n averageX /= span;\n averageY /= span;\n\n let best = points[from];\n let bestArea = -1;\n for (let index = from; index < to; index++) {\n const area = Math.abs(\n (previous.x - averageX) * (points[index].y - previous.y) -\n (previous.x - points[index].x) * (averageY - previous.y),\n );\n if (area > bestArea) {\n bestArea = area;\n best = points[index];\n }\n }\n kept.push(best);\n previous = best;\n }\n\n kept.push(points[points.length - 1]);\n\n return kept;\n}\n","import type { ChartCurve } from '@ids-group-ltd/ids-design-system/core';\n\n/** One plotted reading, in the canvas's own coordinates.\n *\n * @internal */\nexport interface LinePoint {\n readonly categoryIndex: number;\n readonly x: number;\n readonly y: number;\n readonly value: number;\n}\n\nconst COORDINATE_DECIMALS = 2;\n\nfunction roundTo(value: number, decimals: number): number {\n if (!Number.isFinite(value)) {\n return 0;\n }\n\n return Number(value.toFixed(decimals));\n}\n\nfunction isPlottable(point: LinePoint): boolean {\n return Number.isFinite(point.x) && Number.isFinite(point.y);\n}\n\nfunction coordinatePair(point: LinePoint): string {\n return `${roundTo(point.x, COORDINATE_DECIMALS)},${roundTo(point.y, COORDINATE_DECIMALS)}`;\n}\n\n/** The unbroken runs of a series: a missing reading ends one run and starts the next.\n *\n * @internal */\nexport function lineSegments(\n points: readonly (LinePoint | null)[],\n): LinePoint[][] {\n const segments: LinePoint[][] = [];\n let current: LinePoint[] = [];\n for (const point of points) {\n if (point === null) {\n if (current.length > 0) {\n segments.push(current);\n }\n current = [];\n } else {\n current.push(point);\n }\n }\n if (current.length > 0) {\n segments.push(current);\n }\n\n return segments;\n}\n\n/** Fritsch-Carlson tangents: the slope at each reading, clamped so no segment turns back on itself.\n * A zero slope on either side pins the tangent flat, keeping a plateau flat. */\nfunction monotoneTangents(segment: readonly LinePoint[]): number[] {\n const count = segment.length;\n const secants: number[] = [];\n for (let index = 0; index < count - 1; index++) {\n const run = segment[index + 1].x - segment[index].x;\n secants.push(\n run === 0 ? 0 : (segment[index + 1].y - segment[index].y) / run,\n );\n }\n\n const tangents = [secants[0]];\n for (let index = 1; index < count - 1; index++) {\n const before = secants[index - 1];\n const after = secants[index];\n tangents.push(before * after <= 0 ? 0 : (before + after) / 2);\n }\n tangents.push(secants[count - 2]);\n\n for (let index = 0; index < count - 1; index++) {\n const secant = secants[index];\n if (secant === 0) {\n tangents[index] = 0;\n tangents[index + 1] = 0;\n continue;\n }\n // Tangent within three times its secant keeps the cubic monotone on that span.\n const alpha = tangents[index] / secant;\n const beta = tangents[index + 1] / secant;\n const magnitude = Math.hypot(alpha, beta);\n if (magnitude > 3) {\n tangents[index] = (3 / magnitude) * alpha * secant;\n tangents[index + 1] = (3 / magnitude) * beta * secant;\n }\n }\n\n return tangents;\n}\n\nfunction smoothPath(segment: readonly LinePoint[]): string {\n const tangents = monotoneTangents(segment);\n let path = `M ${coordinatePair(segment[0])}`;\n for (let index = 0; index < segment.length - 1; index++) {\n const from = segment[index];\n const to = segment[index + 1];\n const third = (to.x - from.x) / 3;\n const firstControl = {\n x: from.x + third,\n y: from.y + tangents[index] * third,\n };\n const secondControl = {\n x: to.x - third,\n y: to.y - tangents[index + 1] * third,\n };\n path +=\n ` C ${roundTo(firstControl.x, COORDINATE_DECIMALS)},${roundTo(firstControl.y, COORDINATE_DECIMALS)}` +\n ` ${roundTo(secondControl.x, COORDINATE_DECIMALS)},${roundTo(secondControl.y, COORDINATE_DECIMALS)}` +\n ` ${coordinatePair(to)}`;\n }\n\n return path;\n}\n\n/** One unbroken run as a path `d`. `''` when a coordinate is unplottable (one `NaN` voids the attribute).\n *\n * @internal */\nexport function linePath(\n segment: readonly LinePoint[],\n curve: ChartCurve = 'linear',\n): string {\n if (segment.length === 0 || !segment.every(isPlottable)) {\n return '';\n }\n if (segment.length === 1 || curve === 'linear') {\n return `M ${segment.map((point) => coordinatePair(point)).join(' L ')}`;\n }\n if (curve === 'step') {\n let path = `M ${coordinatePair(segment[0])}`;\n for (const point of segment.slice(1)) {\n path += ` H ${roundTo(point.x, COORDINATE_DECIMALS)} V ${roundTo(point.y, COORDINATE_DECIMALS)}`;\n }\n\n return path;\n }\n\n return smoothPath(segment);\n}\n\n/** The filled band between two edges. The lower edge is walked backwards, so its curve is rebuilt\n * from the reversed points: a monotone cubic is not symmetric.\n *\n * @internal */\nexport function bandPath(\n upper: readonly LinePoint[],\n lower: readonly LinePoint[],\n curve: ChartCurve = 'linear',\n): string {\n if (\n upper.length < 2 ||\n upper.length !== lower.length ||\n !upper.every(isPlottable) ||\n !lower.every(isPlottable)\n ) {\n return '';\n }\n const back = linePath([...lower].reverse(), curve);\n\n return `${linePath(upper, curve)} L ${back.slice('M '.length)} Z`;\n}\n\n/** The same run as `linePath`, closed down to the baseline. It takes the curve so a fill and its\n * line share one edge.\n *\n * @internal */\nexport function areaPath(\n segment: readonly LinePoint[],\n baselineY: number,\n curve: ChartCurve = 'linear',\n): string {\n if (\n segment.length < 2 ||\n !Number.isFinite(baselineY) ||\n !segment.every(isPlottable)\n ) {\n return '';\n }\n const first = segment[0];\n const last = segment[segment.length - 1];\n const baseline = roundTo(baselineY, COORDINATE_DECIMALS);\n\n return `${linePath(segment, curve)} L ${roundTo(last.x, COORDINATE_DECIMALS)},${baseline} L ${roundTo(first.x, COORDINATE_DECIMALS)},${baseline} Z`;\n}\n","const E10 = Math.sqrt(50);\nconst E5 = Math.sqrt(10);\nconst E2 = Math.sqrt(2);\n\n/** d3's tick-increment rule: snaps to 1, 2, 5 or 10 times a power of ten, not `span / count` steps like 482. */\nfunction tickIncrement(span: number, targetCount: number): number {\n const step = span / Math.max(1, targetCount);\n const power = Math.floor(Math.log10(step));\n const error = step / Math.pow(10, power);\n const factor = error >= E10 ? 10 : error >= E5 ? 5 : error >= E2 ? 2 : 1;\n\n return factor * Math.pow(10, power);\n}\n\n/** The floor of a domain that has to include zero: zero for an all-positive series, else the most negative reading.\n *\n * @internal */\nexport function domainMinOf(values: readonly number[]): number {\n return values.reduce((min, value) => Math.min(min, value), 0);\n}\n\n/** @internal */\nexport function tickValues(\n domainMin: number,\n domainMax: number,\n targetCount: number,\n): number[] {\n const span = domainMax - domainMin;\n if (!Number.isFinite(span) || span <= 0) {\n return [0];\n }\n const step = tickIncrement(span, targetCount);\n const first = Math.floor(domainMin / step);\n const last = Math.ceil(domainMax / step);\n const out: number[] = [];\n for (let i = first; i <= last; i++) {\n out.push(i * step);\n }\n\n return out;\n}\n\n/** @internal */\nexport interface NiceDomain {\n readonly min: number;\n readonly max: number;\n}\n\n/** @internal */\nexport function niceDomain(\n domainMin: number,\n domainMax: number,\n targetCount: number,\n): NiceDomain {\n const span = domainMax - domainMin;\n if (!Number.isFinite(span) || span <= 0) {\n return { min: 0, max: 0 };\n }\n const step = tickIncrement(span, targetCount);\n\n return {\n min: Math.floor(domainMin / step) * step,\n max: Math.ceil(domainMax / step) * step,\n };\n}\n\n/** @internal */\nexport function linearScale(\n domainMin: number,\n domainMax: number,\n rangeSize: number,\n): (value: number) => number {\n const span = domainMax - domainMin;\n if (!Number.isFinite(span) || span <= 0) {\n return () => 0;\n }\n\n return (value) => ((value - domainMin) / span) * rangeSize;\n}\n\n/** @internal */\nexport interface BandScale {\n readonly bandWidth: number;\n /** Centre to centre; exceeds `bandWidth` by the padding. */\n readonly step: number;\n readonly count: number;\n position(index: number): number;\n /** The band an offset falls in, clamped at both ends. `-1` when there are no bands. */\n indexAt(offset: number): number;\n}\n\n/** @internal */\nexport function bandScale(\n count: number,\n rangeSize: number,\n paddingRatio: number,\n): BandScale {\n if (count <= 0) {\n return {\n bandWidth: 0,\n step: 0,\n count: 0,\n position: () => 0,\n indexAt: () => -1,\n };\n }\n const step = rangeSize / count;\n const bandWidth = step * (1 - paddingRatio);\n\n return {\n bandWidth,\n step,\n count,\n position: (index) => step * index + (step - bandWidth) / 2,\n indexAt: (offset) =>\n Math.min(count - 1, Math.max(0, Math.floor(offset / step))),\n };\n}\n\nconst ROUND_STEP_FACTORS = [1, 2, 5, 10];\n// A step divided out and multiplied back rarely lands on itself: a candidate equal to the minimum\n// can compare smaller by one bit and push the axis up a rung.\nconst ROUND_STEP_TOLERANCE = 1 - 1e-12;\n\n/** The smallest 1/2/5/10 x power-of-ten step not below `minimumStep`. `niceDomain` picks its own\n * interval count, so it cannot answer this.\n *\n * @internal */\nexport function roundStepAtLeast(minimumStep: number): number {\n if (!Number.isFinite(minimumStep) || minimumStep <= 0) {\n return 0;\n }\n const base = Math.pow(10, Math.floor(Math.log10(minimumStep)));\n for (const factor of ROUND_STEP_FACTORS) {\n const candidate = factor * base;\n if (candidate >= minimumStep * ROUND_STEP_TOLERANCE) {\n return candidate;\n }\n }\n\n return 10 * base;\n}\n","import type { AnimationCallbackEvent, NgZone } from '@angular/core';\n\n// The whole spread of a series' arrival; past it the entrance reads as a queue, not one gesture.\nconst STAGGER_BUDGET_MS = 260;\n\n/** Entrance delay for the mark at `index` of `count`, in milliseconds: `stepMs` apart, narrowed so\n * the last mark starts within the budget. `stepMs` of `0` means no stagger.\n *\n * @internal */\nexport function staggerDelay(\n index: number,\n count: number,\n stepMs: number,\n): number {\n if (!(stepMs > 0) || !Number.isFinite(index) || index <= 0 || count <= 1) {\n return 0;\n }\n\n return index * Math.min(stepMs, STAGGER_BUDGET_MS / (count - 1));\n}\n\n/** Starts a mark's exit, bound as `(animate.leave)=\"leaveMark($event)\"`. The function form, not\n * `animate.leave=\"mark-leave\"`: the class form calls `getAnimations()` once per leaving mark.\n *\n * @internal */\nexport function leaveMark(event: AnimationCallbackEvent): void {\n event.target.classList.add('mark-leave');\n}\n\n// A CSS duration (`300ms`, `0.3s`) in milliseconds; anything unparsable is `0`.\nfunction cssDurationMs(duration: string): number {\n const value = parseFloat(duration);\n if (!Number.isFinite(value)) {\n return 0;\n }\n\n return duration.trim().endsWith('ms') ? value : value * 1000;\n}\n\n/** How far a glide starts in. A glide re-aimed every frame, as a fast pointer re-aims it, otherwise\n * draws its zero-progress frame each time and stands still until the pointer stops. @internal */\nexport const CHART_GLIDE_HEAD_START_MS = 1000 / 30;\n\n/** A chart motion timing, read from `--ds-motion-chart-<timing>-duration` and `-easing`. @internal */\nexport type ChartMotionTiming = 'mark' | 'mark-grow' | 'state' | 'tooltip-move';\n\n/** The duration and easing `element` inherits from `--ds-motion-chart-<timing>-*`, or `null` when the\n * duration is zero, as under reduced motion.\n *\n * @internal */\nexport function chartTiming(\n element: Element,\n timing: ChartMotionTiming,\n): { duration: number; easing: string } | null {\n const style = getComputedStyle(element);\n const duration = cssDurationMs(\n style.getPropertyValue(`--ds-motion-chart-${timing}-duration`),\n );\n if (duration <= 0) {\n return null;\n }\n\n return {\n duration,\n easing:\n style.getPropertyValue(`--ds-motion-chart-${timing}-easing`).trim() ||\n 'ease',\n };\n}\n\n/** A chart motion delay, read from `--ds-motion-chart-<delay>-delay`. @internal */\nexport type ChartMotionDelay = 'scale-marker';\n\n/** The delay `element` inherits from `--ds-motion-chart-<delay>-delay`, in milliseconds; `0` under\n * reduced motion.\n *\n * @internal */\nexport function chartDelay(element: Element, delay: ChartMotionDelay): number {\n return cssDurationMs(\n getComputedStyle(element).getPropertyValue(\n `--ds-motion-chart-${delay}-delay`,\n ),\n );\n}\n\n/** Eases `apply` from `from` to `to` on the timing `element` inherits (`--ds-motion-chart-<timing>-*`),\n * for geometry CSS cannot interpolate. A zero duration, as under reduced motion, applies `to` at once.\n * `onDone` runs after the last apply, inside this call when there is no motion. Returns the cancel;\n * a caller starting the next tween cancels this one and passes what it last applied.\n *\n * Frames run in whatever zone the call runs in: call it outside Angular's zone, or every frame is\n * an application tick.\n *\n * @internal */\nexport function tweenMarks(\n element: Element,\n from: readonly number[],\n to: readonly number[],\n apply: (values: readonly number[]) => void,\n timing: ChartMotionTiming = 'mark',\n onDone: () => void = () => undefined,\n): () => void {\n const eased = chartTiming(element, timing);\n if (\n !eased ||\n from.length !== to.length ||\n typeof KeyframeEffect === 'undefined'\n ) {\n apply(to);\n onDone();\n\n return () => undefined;\n }\n // A target-less effect is only a clock: it eases by the token's own curve, whatever its form.\n const clock = new Animation(\n new KeyframeEffect(null, null, {\n ...eased,\n delay: -CHART_GLIDE_HEAD_START_MS,\n fill: 'forwards',\n }),\n );\n let frame = 0;\n const step = (): void => {\n const progress = clock.effect?.getComputedTiming().progress ?? 1;\n apply(\n to.map((value, index) => from[index] + (value - from[index]) * progress),\n );\n if (clock.playState !== 'finished') {\n frame = requestAnimationFrame(step);\n\n return;\n }\n onDone();\n };\n clock.play();\n frame = requestAnimationFrame(step);\n\n return () => {\n cancelAnimationFrame(frame);\n clock.cancel();\n };\n}\n\n/** Runs `run` two frames from now, outside Angular's zone; returns the cancel.\n *\n * @internal */\nexport function afterTwoFrames(zone: NgZone, run: () => void): () => void {\n let first = 0;\n let second = 0;\n // Outside the zone: under zone.js each frame callback is a full application tick.\n zone.runOutsideAngular(() => {\n first = requestAnimationFrame(() => {\n second = requestAnimationFrame(run);\n });\n });\n\n return () => {\n cancelAnimationFrame(first);\n cancelAnimationFrame(second);\n };\n}\n","/** Marks a chart's skeleton draws when nothing is known about the data. @internal */\nexport const CHART_SKELETON_COUNT = 5;\n\nconst COLUMN_HEIGHTS = [0.45, 0.62, 0.52, 0.75, 0.9, 0.68, 0.58] as const;\nconst LINE_HEIGHTS = [0.42, 0.52, 0.47, 0.62, 0.58, 0.72, 0.68] as const;\n// Sums to zero, so a long run keeps returning to the opening total instead of sinking to the axis.\nconst STEP_DELTAS = [-0.16, -0.14, 0.08, -0.1, 0.2, 0.12] as const;\n\nconst percent = (fraction: number): string =>\n `${Math.round(fraction * 10000) / 100}%`;\n\n/** How many marks the skeleton draws: the data's own count once it is known, else the input. @internal */\nexport function skeletonMarkCount(\n dataLength: number,\n skeletonCount: number,\n): number {\n if (dataLength > 0) {\n return dataLength;\n }\n\n return Number.isFinite(skeletonCount) && skeletonCount >= 1\n ? Math.floor(skeletonCount)\n : CHART_SKELETON_COUNT;\n}\n\n/** Column heights as fractions of the plot, a fixed rise and fall that reads as a column chart. @internal */\nexport function skeletonColumnHeights(count: number): number[] {\n return Array.from(\n { length: count },\n (unused, index) => COLUMN_HEIGHTS[index % COLUMN_HEIGHTS.length],\n );\n}\n\n/** A 4px band through one point per category centre, as a `clip-path` over the whole plot. @internal */\nexport function skeletonLineClip(count: number): string {\n const length = Math.max(count, 2);\n const points = Array.from({ length }, (unused, index) => ({\n x: percent((index + 0.5) / length),\n y: percent(1 - LINE_HEIGHTS[index % LINE_HEIGHTS.length]),\n }));\n const top = points.map(({ x, y }) => `${x} calc(${y} - 2px)`);\n const bottom = points.reverse().map(({ x, y }) => `${x} calc(${y} + 2px)`);\n\n return `polygon(${[...top, ...bottom].join(', ')})`;\n}\n\n/** Waterfall steps as fractions of the plot: a total, floating deltas off the running total, and\n * the closing total standing on the axis. @internal */\nexport function skeletonWaterfallSteps(\n count: number,\n): { bottom: number; height: number }[] {\n if (count <= 1) {\n return count === 1 ? [{ bottom: 0, height: 0.85 }] : [];\n }\n\n let running = 0.9;\n const steps = [{ bottom: 0, height: running }];\n\n for (let index = 1; index < count - 1; index++) {\n const next = Math.min(\n 0.9,\n Math.max(0.2, running + STEP_DELTAS[(index - 1) % STEP_DELTAS.length]),\n );\n steps.push({\n bottom: Math.min(running, next),\n height: Math.abs(running - next),\n });\n running = next;\n }\n\n steps.push({ bottom: 0, height: running });\n\n return steps.map(({ bottom, height }) => ({\n bottom: Math.round(bottom * 100) / 100,\n height: Math.round(height * 100) / 100,\n }));\n}\n\n/** One `clip-path` per funnel stage: equal steps narrowing to 40% of the width at the bottom. @internal */\nexport function skeletonFunnelClips(count: number): string[] {\n const step = 0.3 / Math.max(count, 1);\n\n return Array.from({ length: count }, (unused, index) => {\n const top = percent(index * step);\n const bottom = percent((index + 1) * step);\n const topEnd = percent(1 - index * step);\n const bottomEnd = percent(1 - (index + 1) * step);\n\n return `polygon(${top} 0, ${topEnd} 0, ${bottomEnd} 100%, ${bottom} 100%)`;\n });\n}\n","import { DestroyRef, inject, type WritableSignal } from '@angular/core';\n\n/** Delays a chart's answer to a resting pointer.\n *\n * @internal */\nexport interface ChartDwell {\n /** Runs `answer` once the pointer has rested on `target` for the delay; focus, touch and a chart\n * that has already answered run it at once. Asking again for the same `target` keeps the running\n * wait and swaps in the newer `answer`. */\n schedule(target: unknown, answer: () => void, event: Event): void;\n /** Drops a wait that has not run yet. */\n cancel(): void;\n}\n\n// A chart stays warm from its first answer until the pointer leaves it; one set for the page, as a legend and its plot are one chart.\nconst warmCharts = new WeakSet<Element>();\n\n/** The chart `element` sits in.\n *\n * @internal */\nexport function chartOf(element: Element | null): Element | null {\n return element ? element.closest('figure') : null;\n}\n\nfunction warmUp(chart: Element): void {\n if (warmCharts.has(chart)) {\n return;\n }\n warmCharts.add(chart);\n const coolOnLeave = (event: PointerEvent): void => {\n if (!(event.target instanceof Node) || !chart.contains(event.target)) {\n warmCharts.delete(chart);\n document.removeEventListener('pointerover', coolOnLeave, true);\n }\n };\n document.addEventListener('pointerover', coolOnLeave, true);\n}\n\n/** Call from an injection context; the caller's own `leave` cancels the wait, and so does destroying\n * the context. `delayMs` is read at each `schedule`.\n *\n * @internal */\nexport function chartDwell(delayMs: () => number): ChartDwell {\n let waiting: {\n readonly target: unknown;\n answer: () => void;\n readonly timer: ReturnType<typeof setTimeout>;\n } | null = null;\n\n const cancel = (): void => {\n if (waiting) {\n clearTimeout(waiting.timer);\n waiting = null;\n }\n };\n\n inject(DestroyRef).onDestroy(cancel);\n\n return {\n schedule(target, answer, event) {\n const pointer =\n typeof PointerEvent !== 'undefined' &&\n event instanceof PointerEvent &&\n event.pointerType !== 'touch';\n const node = event.currentTarget ?? event.target;\n const chart = chartOf(node instanceof Element ? node : null);\n const delay = Math.max(delayMs(), 0);\n if (!pointer || delay === 0 || (chart && warmCharts.has(chart))) {\n cancel();\n answer();\n if (pointer && chart) {\n warmUp(chart);\n }\n\n return;\n }\n if (waiting && waiting.target === target) {\n waiting.answer = answer;\n\n return;\n }\n cancel();\n const timer = setTimeout(() => {\n const ready = waiting;\n waiting = null;\n ready?.answer();\n if (chart) {\n warmUp(chart);\n }\n }, delay);\n waiting = { target, answer, timer };\n },\n cancel,\n };\n}\n\n/** Sets `highlighted` to the item the pointer rests on, after the dwell, and back to `null` when it\n * leaves. Call from an injection context.\n *\n * @internal */\nexport function dwellHighlight<T>(\n highlighted: WritableSignal<T | null>,\n delayMs: () => number,\n): { enter(item: T, event: Event): void; leave(): void } {\n const dwell = chartDwell(delayMs);\n\n return {\n enter(item, event) {\n dwell.schedule(item, () => highlighted.set(item), event);\n },\n leave() {\n dwell.cancel();\n highlighted.set(null);\n },\n };\n}\n","import {\n DestroyRef,\n NgZone,\n afterNextRender,\n computed,\n inject,\n signal,\n} from '@angular/core';\nimport type { ElementRef, Signal } from '@angular/core';\n\n/** Where a roving tabindex lands after `key`, or `null` when the key does not traverse.\n * The ends wrap, as in `ds-radio-group`; Home and End jump to either extreme.\n *\n * @internal */\nexport function nextRovingIndex(\n key: string,\n current: number,\n count: number,\n): number | null {\n if (!Number.isFinite(count) || count <= 0) {\n return null;\n }\n switch (key) {\n case 'ArrowRight':\n case 'ArrowDown':\n return (current + 1) % count;\n case 'ArrowLeft':\n case 'ArrowUp':\n return (current - 1 + count) % count;\n case 'Home':\n return 0;\n case 'End':\n return count - 1;\n default:\n return null;\n }\n}\n\n/** The mark `index` within `scope`. `within` narrows the search for a chart whose marks repeat an index per series.\n *\n * @internal */\nexport function markAt(\n scope: Element | null,\n index: number,\n within = '',\n): Element | null {\n return scope?.querySelector(`${within}[data-mark-index=\"${index}\"]`) ?? null;\n}\n\n/** Moves DOM focus to the mark `index` within `scope`.\n *\n * @internal */\nexport function focusMark(\n scope: Element | null,\n index: number,\n within = '',\n): void {\n const target = markAt(scope, index, within);\n if (target instanceof HTMLElement || target instanceof SVGElement) {\n target.focus();\n }\n}\n\n/** A chart's roving tab stop: one per chart, not one per mark.\n *\n * @internal */\nexport interface RovingMarks {\n /** The index of the mark that carries `tabindex=\"0\"`. */\n readonly tabStop: Signal<number>;\n /** Makes `index` the tab stop. */\n focus(index: number): void;\n /** Handles an arrow, Home or End on the mark at `index`: moves the tab stop and DOM focus within `scope`. */\n navigate(event: KeyboardEvent, index: number, scope: Element | null): void;\n}\n\n/** @internal */\nexport function rovingMarks(count: () => number): RovingMarks {\n const roving = signal(0);\n\n return {\n tabStop: computed(() => Math.min(roving(), Math.max(0, count() - 1))),\n focus: (index) => roving.set(index),\n navigate(event, index, scope) {\n const next = nextRovingIndex(event.key, index, count());\n if (next === null) {\n return;\n }\n event.preventDefault();\n roving.set(next);\n focusMark(scope, next);\n },\n };\n}\n\n/** @internal */\nexport interface MarkHit {\n readonly element: Element;\n readonly index: number;\n}\n\n/** Whether a `pointerout` from `hit` left the mark, rather than crossing into another part of it.\n *\n * @internal */\nexport function leftMark(event: PointerEvent, hit: MarkHit): boolean {\n const next =\n event.relatedTarget instanceof Element\n ? event.relatedTarget.closest('[data-mark-index]')\n : null;\n\n return next !== hit.element;\n}\n\n/** The mark an event on the marks' parent came from (the nearest `[data-mark-index]`), or `null`.\n *\n * @internal */\nexport function markOf(\n event: Event,\n scope: EventTarget | null = event.currentTarget,\n): MarkHit | null {\n const target = event.target;\n if (!(scope instanceof Element) || !(target instanceof Element)) {\n return null;\n }\n const element = target.closest('[data-mark-index]');\n if (!element || !scope.contains(element)) {\n return null;\n }\n\n return { element, index: Number(element.getAttribute('data-mark-index')) };\n}\n\n/** Focus arriving on and leaving a mark inside `scope`, heard from the document, not the marks' group:\n * Chromium makes an SVG element focusable once it has a focus listener, so a listening group would\n * take focus on a click and ring every mark it holds. Call from an injection context.\n *\n * @internal */\nexport function listenForMarkFocus(\n scope: ElementRef<Element>,\n onFocus: (event: FocusEvent, mark: MarkHit) => void,\n onBlur?: (event: FocusEvent, mark: MarkHit) => void,\n): void {\n const zone = inject(NgZone);\n const destroyRef = inject(DestroyRef);\n afterNextRender(() => {\n const host = scope.nativeElement;\n const document = host.ownerDocument;\n const forward =\n (handler?: (event: FocusEvent, mark: MarkHit) => void) =>\n (event: FocusEvent): void => {\n const hit = handler && markOf(event, host);\n if (hit) {\n handler(event, hit);\n }\n };\n const focusIn = forward(onFocus);\n const focusOut = forward(onBlur);\n // Outside the zone: every focus change reaches every series.\n zone.runOutsideAngular(() => {\n document.addEventListener('focusin', focusIn);\n document.addEventListener('focusout', focusOut);\n });\n destroyRef.onDestroy(() => {\n document.removeEventListener('focusin', focusIn);\n document.removeEventListener('focusout', focusOut);\n });\n });\n}\n","import type {\n ChartThreshold,\n DsIntl,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { formatValue } from './charts-format';\n\n/** @internal */\nexport interface SummaryPoint {\n readonly label: string;\n readonly value: number;\n}\n\nfunction trendOf(values: readonly number[], words: DsIntl['chart']): string {\n const first = values[0];\n const last = values[values.length - 1];\n const rose = values.every(\n (value, index) => index === 0 || value > values[index - 1],\n );\n const fell = values.every(\n (value, index) => index === 0 || value < values[index - 1],\n );\n if (rose) {\n return words.trendRisingThroughout;\n }\n if (fell) {\n return words.trendFallingThroughout;\n }\n if (last > first) {\n return words.trendRisingOverall;\n }\n if (last < first) {\n return words.trendFallingOverall;\n }\n\n return words.trendFlat;\n}\n\n/** Where the readings sit against each reference line, appended to the description. */\nfunction describeThresholds(\n thresholds: readonly ChartThreshold[],\n points: readonly SummaryPoint[],\n format: (value: number) => string,\n words: DsIntl['chart'],\n): string {\n const total = points.length;\n\n return thresholds\n .map((threshold) => {\n const name = threshold.label ?? words.threshold;\n if (threshold.to == null) {\n const above = points.filter(\n (point) => point.value > threshold.value,\n ).length;\n\n return ` ${words.thresholdAbove(name, format(threshold.value), above, total)}`;\n }\n const low = Math.min(threshold.value, threshold.to);\n const high = Math.max(threshold.value, threshold.to);\n const inside = points.filter(\n (point) => point.value >= low && point.value <= high,\n ).length;\n\n return ` ${words.thresholdInside(name, format(low), format(high), inside, total)}`;\n })\n .join('');\n}\n\n/** The sentence a screen reader gets as the chart's accessible name. Generated, not required: a\n * required one is left at the component's default and lies.\n *\n * The order is the contract: what the chart is and its scale, the trend, the extremes, then where\n * the numbers are.\n *\n * @internal */\nexport function describeSeries(\n words: DsIntl['chart'],\n label: string,\n points: readonly SummaryPoint[],\n format: (value: number) => string = formatValue,\n tableFollows = true,\n thresholds: readonly ChartThreshold[] = [],\n): string {\n if (points.length === 0) {\n return words.noData(label);\n }\n const pointer =\n describeThresholds(thresholds, points, format, words) +\n (tableFollows ? ` ${words.tableFollows}` : '');\n if (points.length === 1) {\n return `${words.onePoint(label, format(points[0].value), points[0].label)}${pointer}`;\n }\n const lowest = points.reduce((min, point) =>\n point.value < min.value ? point : min,\n );\n const highest = points.reduce((max, point) =>\n point.value > max.value ? point : max,\n );\n\n return (\n `${words.range(label, points.length, format(lowest.value), format(highest.value))} ` +\n `${trendOf(\n points.map((point) => point.value),\n words,\n )}. ` +\n `${words.extremes(highest.label, format(highest.value), lowest.label, format(lowest.value))}${pointer}`\n );\n}\n","import {\n ElementRef,\n Signal,\n afterRenderEffect,\n computed,\n signal,\n untracked,\n} from '@angular/core';\n\n/**\n * @fileoverview How many chips fit one line of a trigger.\n *\n * INVARIANT: nothing here may measure something the cut itself changes, or the\n * measurement feeds back into its own input and never settles (a hung page).\n * The budget comes off the trigger's PARENT content box, and the \"+N more\"\n * marker gets a fixed reserve rather than a measurement.\n *\n * Chips carry `data-chip` and sit in a row that is a direct child of the trigger.\n */\n\n/**\n * Null when the host cannot supply a budget: a detached node, an inline one with no content box,\n * or one whose own width DEPENDS on the trigger.\n *\n * The dependency is tested by pinning the trigger to zero and re-reading the host, because\n * `getComputedStyle().width` is a used pixel value and the `fit-content` a consumer wrote is not\n * readable back. Costs a second forced layout.\n */\nfunction hostContentWidth(\n host: HTMLElement | null,\n trigger: HTMLElement,\n): number | null {\n if (!host || host.clientWidth === 0) {\n return null;\n }\n const styles = getComputedStyle(host);\n if (styles.display === 'inline') {\n return null;\n }\n\n const before = host.clientWidth;\n const pinned = trigger.style.width;\n trigger.style.width = '0px';\n const dependsOnTrigger = host.clientWidth !== before;\n trigger.style.width = pinned;\n if (dependsOnTrigger) {\n return null;\n }\n\n return (\n before - parseFloat(styles.paddingLeft) - parseFloat(styles.paddingRight)\n );\n}\n\n/** Room held for \"+N more\" (4.5em with three digits, rounded up). */\nconst MARKER_RESERVE_EM = 5;\n\n/** A sibling that can grow gives back what it does not use, so only its floor is owed. */\nfunction reservedWidth(element: HTMLElement): number {\n const styles = getComputedStyle(element);\n\n return parseFloat(styles.flexGrow) > 0\n ? parseFloat(styles.minWidth) || 0\n : element.offsetWidth;\n}\n\n/** @internal */\nexport function chipFit(\n count: Signal<number>,\n chipRow: Signal<ElementRef<HTMLElement> | undefined>,\n enabled: Signal<boolean>,\n /** The whole selection; `count` may cap it. */\n selectionSize: Signal<number> = count,\n): Signal<number> {\n const available = signal(0);\n const gap = signal(0);\n const markerReserve = signal(0);\n /** Widths of ALL chips, from the last render that held all of them. */\n const chipWidths = signal<readonly number[]>([]);\n const measuredFor = signal(-1);\n /** A repeat of the last geometry is skipped: each measure forces layout. */\n let lastWidth = -1;\n let lastCount = -1;\n\n const measure = (row: HTMLElement): void => {\n const trigger = row.parentElement;\n if (!trigger) {\n return;\n }\n\n // A `fit-content` trigger is sized by the chips this cut removes; the parent's\n // content box is not. The trigger-width fallback is that feedback loop.\n const host = trigger.parentElement;\n const budget = hostContentWidth(host, trigger) ?? trigger.clientWidth;\n\n const width = budget;\n const currentCount = untracked(count);\n const cacheIsCurrent = untracked(measuredFor) === currentCount;\n if (width === lastWidth && currentCount === lastCount && cacheIsCurrent) {\n return;\n }\n lastWidth = width;\n lastCount = currentCount;\n\n const triggerStyles = getComputedStyle(trigger);\n const columnGap = parseFloat(triggerStyles.columnGap) || 0;\n let free =\n budget -\n parseFloat(triggerStyles.paddingLeft) -\n parseFloat(triggerStyles.paddingRight) -\n parseFloat(triggerStyles.borderLeftWidth) -\n parseFloat(triggerStyles.borderRightWidth);\n for (const sibling of trigger.children) {\n if (sibling !== row) {\n free -= reservedWidth(sibling as HTMLElement) + columnGap;\n }\n }\n\n gap.set(columnGap);\n available.set(free);\n markerReserve.set(\n MARKER_RESERVE_EM * parseFloat(getComputedStyle(row).fontSize),\n );\n\n const chips = row.querySelectorAll<HTMLElement>('[data-chip]');\n // A partial render is the previous cut, not the selection: caching it would\n // keep only the survivors' widths, and the row could never grow back.\n if (chips.length === untracked(count)) {\n chipWidths.set([...chips].map((chip) => chip.offsetWidth));\n measuredFor.set(untracked(count));\n }\n };\n\n afterRenderEffect((onCleanup) => {\n const row = chipRow()?.nativeElement;\n if (!enabled() || !row) {\n return;\n }\n const observer = new ResizeObserver(() => measure(row));\n // The trigger, not the row: the row's box follows the cut, so observing it\n // would report this function's own output back to it.\n observer.observe(row.parentElement ?? row);\n onCleanup(() => observer.disconnect());\n });\n\n // A selection change does not resize the trigger, so it drives its own measure.\n afterRenderEffect(() => {\n count();\n const row = chipRow()?.nativeElement;\n if (enabled() && row) {\n measure(row);\n }\n });\n\n return computed<number>(() => {\n const total = count();\n if (!enabled()) {\n return total;\n }\n const widths = chipWidths();\n // Until widths for THIS selection are in, render all: that render is measured.\n if (measuredFor() !== total || available() <= 0) {\n return total;\n }\n\n let used = 0;\n for (let index = 0; index < widths.length; index++) {\n const next = used + widths[index] + (index > 0 ? gap() : 0);\n // The marker needs room only if something is hidden; a capped slice's last\n // chip is not the end of the selection.\n const isLast =\n index === widths.length - 1 && selectionSize() <= widths.length;\n const budget = isLast\n ? available()\n : available() - markerReserve() - gap();\n if (next > budget) {\n // At least one chip: 0 would render a bare \"+N\".\n return Math.max(1, index);\n }\n used = next;\n }\n\n return total;\n });\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Fills a selected chip's content in the trigger of `ds-multi-select` and\n * `ds-autocomplete`. The chip stays a library-owned `ds-tag`: its close button,\n * remove label and overflow cap are not projected.\n */\n@Directive({\n selector: '[dsChipTemplate]',\n standalone: true,\n})\nexport class DsChipTemplateDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { Signal, computed, inject } from '@angular/core';\nimport { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';\n\n/**\n * Resolves a field's `reserveMessage`: the input, then `DS_CONFIG.field.reserveMessage`, then\n * `false`. The input is `boolean | null` because a signal input cannot report whether it was bound.\n *\n * `appWideDefaultApplies` is read lazily and drops the middle step for a control that is not a\n * form row (`ds-button`).\n *\n * Call from a field initializer (an injection context).\n */\nexport function resolveReserveMessage(\n reserveMessage: Signal<boolean | null>,\n appWideDefaultApplies: () => boolean = () => true,\n): Signal<boolean> {\n const config = inject(DS_CONFIG);\n\n return computed(\n () =>\n reserveMessage() ??\n (appWideDefaultApplies()\n ? (config.field?.reserveMessage ?? false)\n : false),\n );\n}\n\n/**\n * Resolves a field's `showDirty`: the input, then `DS_CONFIG.field.showDirty`, then `false`.\n *\n * Call from a field initializer (an injection context).\n */\nexport function resolveShowDirty(\n showDirty: Signal<boolean | null>,\n): Signal<boolean> {\n const config = inject(DS_CONFIG);\n\n return computed(() => showDirty() ?? config.field?.showDirty ?? false);\n}\n","import {\n DestroyRef,\n Injector,\n Signal,\n afterNextRender,\n computed,\n inject,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n FormGroupDirective,\n NgControl,\n NgForm,\n type ValidationErrors,\n} from '@angular/forms';\nimport { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';\nimport { reportDevWarning } from '@ids-group-ltd/ids-design-system/core';\nimport type { FieldMessageState } from '@ids-group-ltd/ids-design-system/components/field-message';\n\n/**\n * One validation error, structurally identical to Angular's signal-forms `ValidationError`.\n *\n * Declared here because `@angular/forms/signals` is `@experimental`. Signal forms binds by\n * input NAME and assigns its own `ValidationError[]`, which this shape accepts.\n */\nexport interface DsFieldError {\n /** Identifies the kind of error, e.g. `required`, `minlength`, `server`. */\n readonly kind: string;\n /** Human-readable text. */\n readonly message?: string;\n}\n\n/** What a field's `errors` input accepts before normalization. */\nexport type DsFieldErrorsInput =\n | string\n | DsFieldError\n | readonly DsFieldError[]\n | null\n | undefined;\n\nconst NO_ERRORS: readonly DsFieldError[] = [];\n\n/**\n * The one reserved `DsFieldError.kind`. An error carrying it is advisory: it shows in the\n * warning state and does NOT make the control invalid.\n */\nexport const DS_FIELD_WARNING_KIND = 'warning';\n\n/**\n * `errors` input transform. Accepts a bare string, a single error, or the array signal forms\n * assigns.\n */\nexport function normalizeFieldErrors(\n value: DsFieldErrorsInput,\n): readonly DsFieldError[] {\n if (!value) {\n return NO_ERRORS;\n }\n if (typeof value === 'string') {\n return value.trim() ? [{ kind: 'custom', message: value }] : NO_ERRORS;\n }\n\n return Array.isArray(value) ? value : [value as DsFieldError];\n}\n\n/** @internal */\nexport function trimmedText(value: string | null | undefined): string {\n return value?.trim() ?? '';\n}\n\n/** The single line a field shows below itself, already resolved.\n * @internal\n */\nexport interface DsFieldMessage {\n readonly text: string;\n readonly state: FieldMessageState;\n}\n\nexport interface DsFieldMessageSources {\n hint: Signal<string>;\n warning: Signal<string>;\n error: Signal<string>;\n errors: Signal<readonly DsFieldError[]>;\n invalid: Signal<boolean>;\n /** The control's own disabled state (a disabled control is not announced as invalid). A getter,\n * not a `Signal`, so a caller can hand it over before its own `isDisabled` is initialised. */\n disabled?: () => boolean;\n success?: Signal<string>;\n /** The field's own touched state, if it tracks one (CVA blur). */\n touchedSelf?: Signal<boolean>;\n /** Bound by signal forms as part of the `FormUiControl` contract. */\n touched?: Signal<boolean>;\n /** Bound by signal forms; an async validator is running. */\n pending?: Signal<boolean>;\n /** Bound by signal forms; the user changed the value. */\n dirty?: Signal<boolean>;\n /** The field's resolved `showDirty`: whether a changed value is marked. */\n showDirty?: Signal<boolean>;\n}\n\nexport interface DsFieldMessageResolution {\n readonly message: Signal<DsFieldMessage>;\n readonly invalid: Signal<boolean>;\n /** The state the CONTROL paints, for `[attr.data-field-state]`; not `message().state`, which can differ. */\n readonly controlState: Signal<FieldMessageState | null>;\n /** An async validator is running: from `pending`, or the `NgControl`'s status. */\n readonly pending: Signal<boolean>;\n /** The value was changed and the field marks it (`showDirty`). */\n readonly changed: Signal<boolean>;\n}\n\nconst EMPTY_MESSAGE: DsFieldMessage = { text: '', state: 'default' };\n\ninterface ControlState {\n readonly errors: readonly DsFieldError[];\n readonly touched: boolean;\n readonly pending: boolean;\n readonly dirty: boolean;\n}\n\nconst NO_CONTROL: ControlState = {\n errors: NO_ERRORS,\n touched: false,\n pending: false,\n dirty: false,\n};\n\n/**\n * Resolves the one message a field shows, from every source that can supply one.\n *\n * Precedence, highest first:\n *\n * 1. `error` - an explicit string. Shown immediately: the consumer decided.\n * 2. `errors` - validation errors. Shown once the user has interacted, so a\n * `required` error does not greet an untouched form.\n * 3. `warning` - advisory, not blocking.\n * 4. `errors` whose kind is `DS_FIELD_WARNING_KIND` - the same, raised by the form model.\n * 5. `success` - confirmation.\n * 6. `hint` - helper text.\n *\n * Signal forms binds `errors` and `touched` by input name (`FormUiControl`); reactive and\n * template-driven forms expose the same through `NgControl`, read here.\n *\n * Every rung carries its OWN text; `hint` is never recoloured into another state. `invalid` has\n * no text: it paints the control and sets `aria-invalid`.\n *\n * Call from a field initializer (an injection context).\n * @internal\n */\nexport function resolveFieldMessage(\n sources: DsFieldMessageSources,\n): DsFieldMessageResolution {\n const config = inject(DS_CONFIG);\n const controlState = watchNgControl();\n\n const errors = computed(() => {\n const own = sources.errors();\n\n return own.length ? own : controlState().errors;\n });\n\n const interacted = computed(\n () =>\n (sources.touched?.() ?? false) ||\n (sources.touchedSelf?.() ?? false) ||\n controlState().touched,\n );\n\n const blocking = computed(() =>\n errors().filter((error) => error.kind !== DS_FIELD_WARNING_KIND),\n );\n const advisory = computed(() =>\n errors().filter((error) => error.kind === DS_FIELD_WARNING_KIND),\n );\n\n const errorText = computed(() => {\n const current = blocking();\n if (!current.length || !interacted()) {\n return '';\n }\n\n return textFor(current, config.field?.errorMessages);\n });\n\n const advisoryText = computed(() => {\n const current = advisory();\n if (!current.length || !interacted()) {\n return '';\n }\n\n return textFor(current, config.field?.errorMessages);\n });\n\n // Advisory errors are deliberately absent: a warning never sets aria-invalid.\n // Disabled wins: `aria-invalid` on a NATIVELY disabled input still reports invalid in\n // Chrome's accessibility tree.\n const invalid = computed(\n () =>\n !(sources.disabled?.() ?? false) &&\n (sources.invalid() ||\n sources.error().length > 0 ||\n (blocking().length > 0 && interacted())),\n );\n\n // Relies on message inputs trimming via `trimmedText`; one declared without it breaks this quietly.\n const message = computed<DsFieldMessage>(() => {\n const explicit = sources.error();\n if (explicit) {\n return { text: explicit, state: 'error' };\n }\n const fromErrors = errorText();\n if (fromErrors) {\n return { text: fromErrors, state: 'error' };\n }\n const warning = sources.warning();\n if (warning) {\n return { text: warning, state: 'warning' };\n }\n const fromAdvisory = advisoryText();\n if (fromAdvisory) {\n return { text: fromAdvisory, state: 'warning' };\n }\n const success = sources.success?.();\n if (success) {\n return { text: success, state: 'success' };\n }\n const hint = sources.hint();\n\n return hint ? { text: hint, state: 'default' } : EMPTY_MESSAGE;\n });\n\n const paintedState = computed<FieldMessageState | null>(() => {\n if (invalid()) {\n return 'error';\n }\n if (sources.warning() || advisoryText()) {\n return 'warning';\n }\n\n return sources.success?.() ? 'success' : null;\n });\n\n const pending = computed(\n () => (sources.pending?.() ?? false) || controlState().pending,\n );\n const changed = computed(\n () =>\n (sources.showDirty?.() ?? false) &&\n ((sources.dirty?.() ?? false) || controlState().dirty),\n );\n\n return { message, invalid, controlState: paintedState, pending, changed };\n}\n\n/**\n * `NgControl` cannot be injected in the constructor (`NG_VALUE_ACCESSOR` points at the field\n * itself: a DI cycle), so it is resolved after first render.\n *\n * `events`, not `statusChanges`: touching a control emits `TouchedChangeEvent`, not a status change.\n */\nfunction watchNgControl(): Signal<ControlState> {\n const injector = inject(Injector);\n const destroyRef = inject(DestroyRef);\n // Submitting a form does not reach the child control's own `events` (it goes onto the\n // ROOT form's stream), so the parent is read directly.\n const parentForm = inject(NgForm, { optional: true });\n const parentFormGroup = inject(FormGroupDirective, { optional: true });\n const state = signal<ControlState>(NO_CONTROL);\n\n afterNextRender(() => {\n const control = injector.get(NgControl, null)?.control;\n if (!control) {\n return;\n }\n const submitted = (): boolean =>\n parentFormGroup?.submitted || parentForm?.submitted || false;\n const sync = (): void =>\n state.set({\n errors: fromValidationErrors(control.errors),\n touched: control.touched || submitted(),\n pending: control.pending,\n dirty: control.dirty,\n });\n\n // Signal forms bridges an NgControl whose `control` has no `events` stream. Staying at\n // NO_CONTROL is deliberate: the component's own inputs carry errors and touched there.\n if (typeof control.events?.pipe !== 'function') {\n return;\n }\n\n sync();\n control.events.pipe(takeUntilDestroyed(destroyRef)).subscribe(sync);\n const parentSubmit = parentFormGroup?.ngSubmit ?? parentForm?.ngSubmit;\n parentSubmit?.pipe(takeUntilDestroyed(destroyRef)).subscribe(sync);\n });\n\n return state;\n}\n\n/**\n * A message is picked up from `{ myError: 'text' }` and `{ myError: { message: 'text' } }`.\n * Angular's built-ins carry detail objects with no message (`{ minlength: { requiredLength } }`);\n * those resolve through `DS_CONFIG.field.errorMessages`.\n */\nfunction fromValidationErrors(\n errors: ValidationErrors | null,\n): readonly DsFieldError[] {\n if (!errors) {\n return NO_ERRORS;\n }\n\n return Object.keys(errors).map((kind) => {\n const detail: unknown = errors[kind];\n if (typeof detail === 'string') {\n return { kind, message: detail };\n }\n const message = (detail as { message?: unknown } | null)?.message;\n\n return typeof message === 'string' ? { kind, message } : { kind };\n });\n}\n\nfunction textFor(\n errors: readonly DsFieldError[],\n messages: Record<string, string> | undefined,\n): string {\n for (const error of errors) {\n const text = error.message ?? messages?.[error.kind];\n if (text) {\n return text;\n }\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n reportDevWarning(\n `[ds-field] The control is invalid but no message could be resolved for ${errors\n .map((error) => `\"${error.kind}\"`)\n .join(\n ', ',\n )}, so the field paints the state with NO message under it. Give the validator a message — required(path, { message: '…' }) or { myError: 'text' } — or map the kind in provideDsConfig({ field: { errorMessages: … } }).`,\n );\n }\n\n return '';\n}\n","import { Directive, booleanAttribute, input } from '@angular/core';\nimport { resolveReserveMessage } from './field-defaults';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { trimmedText } from './field-errors';\n\n/**\n * The inputs of anything that renders a `ds-field-message` line. Split from `DsFieldBase` so\n * `ds-button` can take it without `errors`, `invalid` and `touched`.\n * @internal\n */\n@Directive()\nexport abstract class DsMessageBase {\n /** Helper text shown below the control. */\n readonly hint = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Error text. Shown immediately; takes precedence over `errors`. */\n readonly error = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Advisory text, shown when there is no error. */\n readonly warning = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Reserve the message-row height even when empty, so a hint/error does not shift the layout.\n * Unset falls back to `DS_CONFIG.field.reserveMessage` for a field, not for a button. */\n readonly reserveMessage = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n /** Glyph on the message line, overriding what the state resolves to. Unset\n * follows `DS_CONFIG.field.stateIcons`; `false` removes the glyph here alone. */\n readonly messageIcon = input<IconName | false | null>(null);\n\n /** Whether an unset `reserveMessage` falls back to `DS_CONFIG.field.reserveMessage`.\n * Read lazily, so a subclass initializer running later still decides it. */\n protected readonly reserveFollowsFieldDefault: boolean = true;\n\n readonly reserveMessageResolved = resolveReserveMessage(\n this.reserveMessage,\n () => this.reserveFollowsFieldDefault,\n );\n}\n","import { Directive, booleanAttribute, input } from '@angular/core';\nimport { resolveShowDirty } from './field-defaults';\nimport { DsMessageBase } from './message-base';\nimport {\n normalizeFieldErrors,\n type DsFieldError,\n type DsFieldErrorsInput,\n} from './field-errors';\n\n/**\n * The inputs every DS form field has, declared once. Only UNIVERSAL inputs belong\n * here: lifting `success` or `label` would add them to controls that never had them.\n * @internal\n */\n@Directive()\nexport abstract class DsFieldBase extends DsMessageBase {\n /** Validation errors, shown once the user has interacted. Bound by signal forms;\n * reactive and template-driven forms are read through `NgControl`. */\n readonly errors = input<readonly DsFieldError[], DsFieldErrorsInput>([], {\n transform: normalizeFieldErrors,\n });\n /** Paints the error state and sets `aria-invalid` WITHOUT a message; use `error` to show text. */\n readonly invalid = input(false, { transform: booleanAttribute });\n /** Whether the user has interacted with the field. Bound by signal forms; gates `errors`. */\n readonly touched = input(false, { transform: booleanAttribute });\n}\n\n/**\n * The form-state inputs of a DS value control: what signal forms binds by name beyond `errors`\n * and `touched`. Reactive and template-driven forms are read through `NgControl` instead.\n * @internal\n */\n@Directive()\nexport abstract class DsFormControlBase extends DsFieldBase {\n /** Whether an async validator is running. Bound by signal forms; shows a trailing spinner. */\n readonly pending = input(false, { transform: booleanAttribute });\n /** Whether the user has changed the value. Bound by signal forms; drawn only under `showDirty`. */\n readonly dirty = input(false, { transform: booleanAttribute });\n /** Marks a changed value with a dot and a \"Changed\" line. Unset falls back to\n * `DS_CONFIG.field.showDirty`, then `false`. */\n readonly showDirty = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n readonly showDirtyResolved = resolveShowDirty(this.showDirty);\n}\n","import {\n Directive,\n ElementRef,\n booleanAttribute,\n effect,\n inject,\n input,\n signal,\n type ModelSignal,\n type WritableSignal,\n} from '@angular/core';\nimport type { ControlValueAccessor } from '@angular/forms';\nimport { DsFormControlBase } from './field-base';\n\n/**\n * Value elements are searched FIRST: the number stepper renders its decrement button before its\n * input. `tabindex=\"-1\"` is excluded so a roving-tabindex group yields the tabbable radio.\n */\nconst NOT_ROVED = ':not([tabindex=\"-1\"]):not([disabled])';\nconst VALUE_ELEMENTS = `input:not([type=\"hidden\"])${NOT_ROVED}, textarea${NOT_ROVED}`;\nconst TRIGGER_ELEMENTS = `button${NOT_ROVED}, [tabindex=\"0\"]${NOT_ROVED}`;\n\n/**\n * The `ControlValueAccessor` half of a DS value control, with no message API (`ds-search`).\n *\n * The model arrives as a THUNK: `value` is abstract on a base class and a field initialiser on\n * a component, so it does not exist yet when this runs.\n *\n * Must be called from an injection context (it owns an `effect`).\n * @internal\n */\nexport function valueControlBridge<T>(model: () => ModelSignal<T>): {\n readonly formDisabled: WritableSignal<boolean>;\n readonly touchedSelf: WritableSignal<boolean>;\n markTouched(): void;\n writeValue(next: T): void;\n registerOnChange(fn: (next: T) => void): void;\n registerOnTouched(fn: () => void): void;\n setDisabledState(isDisabled: boolean): void;\n} {\n const formDisabled = signal(false);\n const touchedSelf = signal(false);\n let onChange: (next: T) => void = () => {};\n let onTouched: () => void = () => {};\n // Stops the effect echoing a form-driven write back as a user change.\n let synced: T | undefined;\n let hasSynced = false;\n\n effect(() => {\n const next = model()();\n if (!hasSynced) {\n hasSynced = true;\n synced = next;\n\n return;\n }\n if (Object.is(next, synced)) {\n return;\n }\n synced = next;\n onChange(next);\n });\n\n return {\n formDisabled,\n touchedSelf,\n markTouched: () => {\n touchedSelf.set(true);\n onTouched();\n },\n writeValue: (next: T) => {\n hasSynced = true;\n synced = next;\n model().set(next);\n },\n registerOnChange: (fn: (next: T) => void) => {\n onChange = fn;\n },\n registerOnTouched: (fn: () => void) => {\n onTouched = fn;\n },\n setDisabledState: (isDisabled: boolean) => {\n formDisabled.set(isDisabled);\n },\n };\n}\n\n// Signal forms takes the ControlValueAccessor path for every DS control, and\n// focusBoundControl() then calls focus() on the unfocusable HOST.\nfunction delegateHostFocus(\n host: HTMLElement,\n focus: (options?: FocusOptions) => void,\n): void {\n host.focus = focus;\n}\n\nfunction focusOwnControl(host: HTMLElement, options?: FocusOptions): void {\n const target =\n host.querySelector<HTMLElement>(VALUE_ELEMENTS) ??\n host.querySelector<HTMLElement>(TRIGGER_ELEMENTS);\n target?.focus(options);\n}\n\nfunction blurOwnControl(host: HTMLElement): void {\n const active = host.ownerDocument.activeElement;\n if (active instanceof HTMLElement && host.contains(active)) {\n active.blur();\n }\n}\n\n/**\n * Shared `ControlValueAccessor` for DS form controls whose value is a signal `model()`.\n * A subclass must OR `formDisabled()` into its effective disabled state so\n * `FormControl.disable()` reaches the control, and call `markTouched()` from a blur handler.\n * @internal\n */\n@Directive({\n host: { '[style.display]': 'hidden() ? \"none\" : null' },\n})\nexport abstract class DsControlValueAccessor<T>\n extends DsFormControlBase\n implements ControlValueAccessor\n{\n abstract readonly value: ModelSignal<T>;\n\n /** Hides the control. Inline `display`: the `hidden` attribute loses to each control's `:host` display. */\n readonly hidden = input(false, { transform: booleanAttribute });\n private readonly hostElement = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n super();\n delegateHostFocus(this.hostElement.nativeElement, (options) =>\n this.focus(options),\n );\n }\n\n /** Focuses the control's own input or trigger; `focusBoundControl()` reaches it through the host. */\n focus(options?: FocusOptions): void {\n focusOwnControl(this.hostElement.nativeElement, options);\n }\n\n /** Drops focus from anywhere inside this control; a portaled panel is left alone. */\n blur(): void {\n blurOwnControl(this.hostElement.nativeElement);\n }\n\n private readonly bridge = valueControlBridge<T>(() => this.value);\n\n protected readonly formDisabled = this.bridge.formDisabled;\n\n // Separate from the control's `touched`, which only exists once `NgControl`\n // resolves: too late to gate the first blur.\n protected readonly touchedSelf = this.bridge.touchedSelf;\n\n protected markTouched(): void {\n this.bridge.markTouched();\n }\n\n writeValue(value: T): void {\n this.bridge.writeValue(value);\n }\n\n registerOnChange(fn: (value: T) => void): void {\n this.bridge.registerOnChange(fn);\n }\n\n registerOnTouched(fn: () => void): void {\n this.bridge.registerOnTouched(fn);\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.bridge.setDisabledState(isDisabled);\n }\n}\n\n/**\n * Shared `ControlValueAccessor` for DS boolean controls (checkbox, switch) whose state lives\n * in a `checked` model. Subclasses must OR `formDisabled()` into their effective disabled\n * state and call `markTouched()` from a blur handler.\n * @internal\n */\n@Directive({\n host: { '[style.display]': 'hidden() ? \"none\" : null' },\n})\nexport abstract class DsBooleanControlValueAccessor\n extends DsFormControlBase\n implements ControlValueAccessor\n{\n abstract readonly checked: ModelSignal<boolean>;\n\n /** Hides the control; see `DsControlValueAccessor.hidden`. */\n readonly hidden = input(false, { transform: booleanAttribute });\n private readonly hostElement = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** See `DsControlValueAccessor.focus`. */\n focus(options?: FocusOptions): void {\n focusOwnControl(this.hostElement.nativeElement, options);\n }\n\n /** See `DsControlValueAccessor.blur`. */\n blur(): void {\n blurOwnControl(this.hostElement.nativeElement);\n }\n\n protected readonly formDisabled = signal(false);\n protected readonly touchedSelf = signal(false);\n\n private onChange: (value: boolean) => void = () => {};\n private onTouched: () => void = () => {};\n\n private synced: boolean | undefined;\n private hasSynced = false;\n\n constructor() {\n super();\n delegateHostFocus(this.hostElement.nativeElement, (options) =>\n this.focus(options),\n );\n effect(() => {\n const next = this.checked();\n if (!this.hasSynced) {\n this.hasSynced = true;\n this.synced = next;\n\n return;\n }\n if (Object.is(next, this.synced)) {\n return;\n }\n this.synced = next;\n this.onChange(next);\n });\n }\n\n protected markTouched(): void {\n this.touchedSelf.set(true);\n this.onTouched();\n }\n\n writeValue(value: boolean): void {\n this.hasSynced = true;\n this.synced = value;\n this.checked.set(value);\n }\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Replaces `ds-autocomplete`'s \"Create «…»\" row.\n *\n * Context: `query` is the typed text the row would create.\n *\n * The row stays a `role=\"option\"` the keyboard can reach, and picking it still\n * emits `create` - the template fills the row, it does not become the action.\n */\n@Directive({\n selector: '[dsCreateTemplate]',\n standalone: true,\n})\nexport class DsCreateTemplateDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { computed, inject, type Signal } from '@angular/core';\nimport {\n ActivatedRoute,\n Router,\n UrlTree,\n type IsActiveMatchOptions,\n type Params,\n type QueryParamsHandling,\n} from '@angular/router';\n\nexport type DsDestination = 'routerLink' | 'href' | 'button';\n\n// Query is a subset match and fragment is ignored: sort order or page number is not another page.\nconst EXACT_PATH: Partial<IsActiveMatchOptions> = {\n paths: 'exact',\n queryParams: 'subset',\n fragment: 'ignored',\n matrixParams: 'ignored',\n};\nconst PREFIX_PATH: Partial<IsActiveMatchOptions> = {\n ...EXACT_PATH,\n paths: 'subset',\n};\n\n/** What a `routerLink` input accepts. A `UrlTree` carries the fragment, query and relative base the other forms cannot. */\nexport type DsRouterLink = string | readonly unknown[] | UrlTree | null;\n\n/** The values `aria-current` may take; `true` (not `'true'`) fits `RouterLinkActive.ariaCurrentWhenActive`. */\nexport type DsAriaCurrent =\n | 'page'\n | 'step'\n | 'location'\n | 'date'\n | 'time'\n | true;\n\n/** The `UrlCreationOptions` a navigating control forwards. */\nexport interface DsLinkModifiers {\n fragment?: string;\n queryParams?: Params | null;\n queryParamsHandling?: QueryParamsHandling | null;\n}\n\n/**\n * No destination is a `<button>`, never an `<a href=\"#\">`: a `#` href rewrites the URL and\n * discards the scroll position.\n *\n * @internal\n */\nexport function dsDestination(\n routerLink: Signal<DsRouterLink>,\n href: Signal<string>,\n): Signal<DsDestination> {\n return computed(() => {\n if (routerLink() !== null) {\n return 'routerLink';\n }\n\n return href() ? 'href' : 'button';\n });\n}\n\n/**\n * What a navigating control announces: an exact match is `page`, a prefix match is `true` (the\n * current section or an ancestor), anything else stays silent. `routerLinkActive` matches by\n * PREFIX, so deriving `page` from it makes a \"back to the section\" link claim to be the current page.\n *\n * Feed the result to `RouterLinkActive.ariaCurrentWhenActive`, never to `[attr.aria-current]`: the\n * directive removes that attribute in a microtask whenever its own input is unset, wiping a\n * template binding. A narrowed `routerLinkActiveOptions` therefore narrows the announcement too.\n *\n * Must be called from an injection context. Outside a router it returns the override or\n * `undefined`.\n *\n * @internal\n */\nexport function dsAriaCurrent(\n routerLink: Signal<DsRouterLink>,\n modifiers: Signal<DsLinkModifiers>,\n override: Signal<DsAriaCurrent | null | undefined>,\n): Signal<DsAriaCurrent | undefined> {\n const router = inject(Router, { optional: true });\n // Same base as `RouterLink`: otherwise `.` lands on `/`, a prefix of every page.\n const route = inject(ActivatedRoute, { optional: true });\n\n return computed<DsAriaCurrent | undefined>(() => {\n // `null` means \"announce nothing\"; the directive spells that `undefined`.\n const explicit = override();\n if (explicit !== undefined) {\n return explicit ?? undefined;\n }\n\n const link = routerLink();\n if (!router || link === null) {\n return undefined;\n }\n\n const tree =\n link instanceof UrlTree\n ? link\n : router.createUrlTree(Array.isArray(link) ? [...link] : [link], {\n relativeTo: route ?? undefined,\n ...modifiers(),\n });\n\n // `lastSuccessfulNavigation` is only the reactive trigger. `Router.isActive` (deprecated in\n // 21.1, no replacement) reads the LIVE url; the standalone `isActive()` uses the navigation's\n // `finalUrl` and goes stale when the path is rewritten without navigating.\n router.lastSuccessfulNavigation();\n\n return router.isActive(tree, EXACT_PATH)\n ? 'page'\n : router.isActive(tree, PREFIX_PATH)\n ? true\n : undefined;\n });\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Replaces a picker panel's \"no matches\" row.\n *\n * Context: `query` is the text that matched nothing.\n *\n * The row keeps `role=\"status\"`, so a reader is told the list emptied whatever\n * the template puts inside it.\n */\n@Directive({\n selector: '[dsEmptyTemplate]',\n standalone: true,\n})\nexport class DsEmptyTemplateDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { computed, inject, signal, type Signal } from '@angular/core';\nimport {\n DS_INTL,\n injectDsLocale,\n resolveWithConfig,\n} from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { chartValueFormat } from './charts-format';\n\n/** The inputs every chart carries for app-wide decisions. @internal */\nexport interface ChartDefaultInputs {\n readonly frame: Signal<ChartFrame | null>;\n readonly dataTable?: Signal<ChartDataTable | null>;\n readonly emptyText: Signal<string | null>;\n readonly errorText: Signal<string | null>;\n readonly valueFormat: Signal<ChartValueFormat | null>;\n readonly tooltipLingerMs?: Signal<number | null>;\n readonly pinOnClick?: Signal<boolean | null>;\n readonly highlightActive?: Signal<boolean | null>;\n readonly tooltipSwatches?: Signal<boolean | null>;\n}\n\nconst NO_HOVER_DELAY_INPUT = signal<number | null>(null);\n\n// Lazy: a chart's own optional inputs are declared after the base that calls this, so they do not exist yet.\nfunction optional<T>(\n input: () => Signal<T | null> | undefined,\n): Signal<T | null> {\n return computed(() => input()?.() ?? null);\n}\n\nconst CHART_HOVER_DELAY_MS = 0;\n\n/** How long a pointer rests on a mark before the chart answers, in milliseconds:\n * `DS_CONFIG.chart.hoverDelayMs`, else `0`. Call from an injection context. @internal */\nexport function chartHoverDelayMs(): Signal<number> {\n return resolveWithConfig(\n NO_HOVER_DELAY_INPUT,\n (config) => config.chart?.hoverDelayMs,\n CHART_HOVER_DELAY_MS,\n );\n}\n\n/** Default tooltip linger, in milliseconds; long enough to cross to the next mark. @internal */\nexport const CHART_TOOLTIP_LINGER_MS = 500;\n\n/** Resolves each input, then `DS_CONFIG.chart`, then the built-in; copy resolves input, then `DS_INTL.chart`.\n * Call from an injection context. @internal */\nexport function resolveChartDefaults(inputs: ChartDefaultInputs) {\n const locale = injectDsLocale();\n const intl = inject(DS_INTL);\n\n return {\n locale,\n frame: resolveWithConfig(\n inputs.frame,\n (config) => config.chart?.frame,\n 'auto' as ChartFrame,\n ),\n dataTable: resolveWithConfig(\n optional(() => inputs.dataTable),\n (config) => config.chart?.dataTable,\n 'none' as ChartDataTable,\n ),\n emptyText: computed(() => inputs.emptyText() ?? intl().chart.empty),\n errorText: computed(() => inputs.errorText() ?? intl().chart.error),\n valueFormat: resolveWithConfig(\n inputs.valueFormat,\n (config) => config.chart?.valueFormat,\n chartValueFormat(locale),\n ),\n tooltipLingerMs: resolveWithConfig(\n optional(() => inputs.tooltipLingerMs),\n (config) => config.chart?.tooltipLingerMs,\n CHART_TOOLTIP_LINGER_MS,\n ),\n pinOnClick: resolveWithConfig(\n optional(() => inputs.pinOnClick),\n (config) => config.chart?.pinOnClick,\n true,\n ),\n hoverDelayMs: chartHoverDelayMs(),\n highlightActive: resolveWithConfig(\n optional(() => inputs.highlightActive),\n (config) => config.chart?.highlightActive,\n true,\n ),\n tooltipSwatches: resolveWithConfig<boolean | 'auto'>(\n optional(() => inputs.tooltipSwatches),\n (config) => config.chart?.tooltipSwatches,\n 'auto',\n ),\n };\n}\n","import {\n Directive,\n booleanAttribute,\n inject,\n input,\n numberAttribute,\n type Signal,\n} from '@angular/core';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { resolveChartDefaults } from './charts-defaults';\n\n/** The inputs every chart has, declared once. Inputs only some charts have stay on those charts. @internal */\n@Directive({\n host: {\n '[style.--_chart-highlight]': \"highlightActiveResolved() ? null : 'none'\",\n },\n})\nexport abstract class DsChartBase {\n /** `'auto'` draws the chart's own bordered, padded box; `'none'` leaves it bare, for a chart\n * inside a card. Unset falls back to `DS_CONFIG.chart.frame`, then `'auto'`. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** Visible title above the plot, reused as the annex table's caption. */\n readonly caption = input<string | null>(null);\n\n /** Accessible name. Generated from the data when omitted. */\n readonly summary = input<string | null>(null);\n\n /** With no data, draws a skeleton in the chart's shape: `skeletonCount` marks where the chart has\n * it, the data's count once known. With data on screen, keeps the plot under `ds-loading-overlay`. */\n readonly loading = input(false, { transform: booleanAttribute });\n\n /** Shows `errorText` in place of the plot. Separate from `loading` and from empty data. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** Shown when there is no data. Unset falls back to `DS_INTL.chart.empty`. */\n readonly emptyText = input<string | null>(null);\n\n /** The message the error state prints. Unset falls back to `DS_INTL.chart.error`. */\n readonly errorText = input<string | null>(null);\n\n /** Formats every printed value, including the annex table and generated description. Unset\n * falls back to `DS_CONFIG.chart.valueFormat`, then `DS_CONFIG.locale` / `LOCALE_ID`. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n /** Turns on the click affordance: pointer cursor and hover tint. The click output fires\n * whether or not this is set. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** Whether the tooltip draws a colour dot beside each reading. Unset falls back to\n * `DS_CONFIG.chart.tooltipSwatches`, then shows them for two to four readings. */\n readonly tooltipSwatches = input<boolean | null>(null, {\n transform: (value: unknown) =>\n value == null ? null : booleanAttribute(value),\n });\n\n /** How long the tooltip stays after the pointer leaves the mark for another part of the chart,\n * in milliseconds; zero closes it at once. A pointer that leaves the chart closes it at once\n * whatever this says. Unset falls back to `DS_CONFIG.chart.tooltipLingerMs`, then 500. */\n readonly tooltipLingerMs = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Holds the clicked mark and its tooltip until a second click, Escape or a press outside.\n * Unset falls back to `DS_CONFIG.chart.pinOnClick`, then `true`. The click output fires either way. */\n readonly pinOnClick = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n /** Whether the hovered or focused column, bar or heatmap cell brightens. Unset falls back\n * to `DS_CONFIG.chart.highlightActive`, then `true`. */\n readonly highlightActive = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n protected readonly defaults = resolveChartDefaults(this);\n protected readonly intl = inject(DS_INTL);\n readonly frameResolved = this.defaults.frame;\n readonly emptyTextResolved = this.defaults.emptyText;\n readonly errorTextResolved = this.defaults.errorText;\n readonly valueFormatResolved = this.defaults.valueFormat;\n readonly highlightActiveResolved = this.defaults.highlightActive;\n}\n\n/** Whether the marks keyed `key` fade while `highlighted` is singled out: only under `dimOthers`,\n * and never the highlighted marks themselves.\n *\n * @internal */\nexport function dimmedBy<T>(\n dimOthers: boolean,\n highlighted: T | null,\n key: T,\n): boolean {\n return dimOthers && highlighted !== null && highlighted !== key;\n}\n\n/** A chart that can fade every mark but the one it is answering. @internal */\nexport interface ChartDimmable {\n readonly dimOthers: Signal<boolean>;\n}\n\n/** A chart whose marks arrive one after another. @internal */\nexport interface ChartStaggered {\n readonly staggerMs: Signal<number>;\n}\n\n/** A chart with an annex table it may leave out. @internal */\nexport interface ChartWithDataTable {\n readonly dataTable: Signal<ChartDataTable | null>;\n}\n\n/** A chart whose tooltip trigger can be chosen or turned off. @internal */\nexport interface ChartWithTooltipTrigger {\n readonly tooltip: Signal<'item' | 'axis' | 'none'>;\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\n\n/**\n * Focuses the field's inner `input`/`textarea` when the click lands on the frame chrome\n * (padding, an icon, an addon slot). Applied to a field's wrapper element.\n *\n * `preventDefault` on that mousedown stops focus bouncing off the chrome. Clicks on the\n * control or a nested button/link/input are left alone.\n */\n@Directive({\n selector: '[dsFieldClickFocus]',\n standalone: true,\n host: {\n '(mousedown)': 'onMousedown($event)',\n },\n})\nexport class FieldClickFocusDirective {\n private readonly host: HTMLElement = inject(ElementRef).nativeElement;\n\n protected onMousedown(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n if (\n target.closest('input, textarea, button, a, select, [contenteditable]')\n ) {\n return;\n }\n const field = this.host.querySelector<\n HTMLInputElement | HTMLTextAreaElement\n >('input, textarea');\n if (field && !field.disabled && !field.readOnly) {\n event.preventDefault();\n field.focus();\n }\n }\n}\n","import { DOCUMENT, Injector, afterNextRender, inject } from '@angular/core';\n\nconst TABBABLE_CANDIDATES =\n 'a[href], button, input, select, textarea, [tabindex], [contenteditable=\"true\"]';\n\nfunction isTabbable(element: HTMLElement): boolean {\n return (\n element.isConnected &&\n element.tabIndex >= 0 &&\n !(element as HTMLButtonElement).disabled &&\n !element.closest('[inert]') &&\n element.checkVisibility()\n );\n}\n\nfunction tabbableNeighbour(\n leaving: HTMLElement,\n within: HTMLElement,\n): HTMLElement | null {\n const candidates = Array.from(\n within.querySelectorAll<HTMLElement>(TABBABLE_CANDIDATES),\n ).filter((element) => !leaving.contains(element) && isTabbable(element));\n const following = candidates.find(\n (element) =>\n leaving.compareDocumentPosition(element) &\n Node.DOCUMENT_POSITION_FOLLOWING,\n );\n\n return following ?? candidates.at(-1) ?? null;\n}\n\n/**\n * When focus is inside `leaving`, which is about to be removed, moves it to the nearest tabbable\n * element inside `within`: the next one in document order, else the previous one, else `fallback`.\n * @internal\n */\nexport function moveFocusOutOf(\n leaving: HTMLElement,\n within: HTMLElement,\n fallback: HTMLElement | null = null,\n): void {\n if (!leaving.contains(leaving.ownerDocument.activeElement)) {\n return;\n }\n const target =\n tabbableNeighbour(leaving, within) ??\n (fallback && isTabbable(fallback) ? fallback : null);\n target?.focus();\n}\n\n/**\n * Returns a function that, after the next render, focuses `target()` when focus has fallen to\n * `<body>` - its element was removed or disabled under it. Focus the app moved elsewhere is left alone.\n *\n * Must be called from an injection context.\n * @internal\n */\nexport function focusRescue(): (\n target: () => HTMLElement | null | undefined,\n) => void {\n const injector = inject(Injector);\n const documentRef = inject(DOCUMENT);\n\n return (target) =>\n afterNextRender(\n () => {\n const active = documentRef.activeElement as HTMLElement | null;\n // A focused control that turns disabled still reads as active until the browser's focus fixup.\n const lost =\n !active ||\n active === documentRef.body ||\n !active.isConnected ||\n (active as HTMLButtonElement).disabled === true;\n if (lost) {\n target()?.focus();\n }\n },\n { injector },\n );\n}\n","const SHAPES = 'path, line, polyline, polygon, circle, ellipse, rect';\n\n// A glyph centred by its box looks off inside a circle when its strokes are heavier on one side (a\n// flag, a folder, a check). Each glyph is centred on the point midway between the centre of the box\n// its strokes span and the centre of their length, so a symmetric glyph lands on its box centre and a\n// lopsided one moves half the way toward balancing its weight.\nfunction opticalOffset(glyph: SVGSVGElement): { x: number; y: number } | null {\n const viewBox = glyph.viewBox.baseVal;\n const size = glyph.width.baseVal.value;\n if (!viewBox?.width || !size) {\n return null;\n }\n let left = Infinity;\n let top = Infinity;\n let right = -Infinity;\n let bottom = -Infinity;\n let length = 0;\n let sumX = 0;\n let sumY = 0;\n for (const shape of glyph.querySelectorAll<SVGGeometryElement>(SHAPES)) {\n const box = shape.getBBox();\n left = Math.min(left, box.x);\n top = Math.min(top, box.y);\n right = Math.max(right, box.x + box.width);\n bottom = Math.max(bottom, box.y + box.height);\n const total = shape.getTotalLength();\n const steps = Math.max(8, Math.ceil(total * 2));\n for (let step = 0; step < steps; step++) {\n const point = shape.getPointAtLength(((step + 0.5) * total) / steps);\n sumX += (point.x * total) / steps;\n sumY += (point.y * total) / steps;\n }\n length += total;\n }\n if (!length) {\n return null;\n }\n const scale = size / viewBox.width;\n const opticalX = ((left + right) / 2 + sumX / length) / 2;\n const opticalY = ((top + bottom) / 2 + sumY / length) / 2;\n\n return {\n x: (viewBox.x + viewBox.width / 2 - opticalX) * scale,\n y: (viewBox.y + viewBox.height / 2 - opticalY) * scale,\n };\n}\n\n/**\n * Moves each `ds-icon` inside the host's `.node` marker so its optical centre sits on the marker's centre.\n * @internal\n */\nexport function centreMarkerGlyphs(host: HTMLElement): void {\n for (const icon of host.querySelectorAll<HTMLElement>('.node ds-icon')) {\n const glyph = icon.querySelector('svg');\n let offset: { x: number; y: number } | null = null;\n try {\n offset = glyph ? opticalOffset(glyph) : null;\n } catch {\n // getBBox throws on a glyph that is not rendered (Firefox, display: none).\n }\n icon.style.translate = offset\n ? `${offset.x.toFixed(2)}px ${offset.y.toFixed(2)}px`\n : '';\n }\n}\n\n/**\n * Splits each `ds-icon` path inside the host's `.node` marker into one path per stroke and gives every\n * shape `pathLength=\"1\"`, so the marker can draw its glyph stroke by stroke with a dash offset.\n * @internal\n */\nexport function prepareMarkerStrokes(host: HTMLElement): void {\n for (const glyph of host.querySelectorAll<SVGSVGElement>(\n '.node ds-icon svg',\n )) {\n for (const path of glyph.querySelectorAll('path')) {\n // Only an absolute moveto starts a stroke that stands on its own.\n const strokes = (path.getAttribute('d') ?? '')\n .split(/(?=M)/)\n .filter((part) => part.trim());\n let last: SVGPathElement = path;\n for (const stroke of strokes.slice(1)) {\n const next = path.cloneNode() as SVGPathElement;\n next.setAttribute('d', stroke);\n last.after(next);\n last = next;\n }\n if (strokes.length > 1) {\n path.setAttribute('d', strokes[0]);\n }\n }\n for (const shape of glyph.querySelectorAll(SHAPES)) {\n shape.setAttribute('pathLength', '1');\n }\n }\n}\n\nconst heldArcs = new WeakMap<\n HTMLElement,\n { angle: number; clock: number; period: number }\n>();\n\n/**\n * Reads the running spinner's angle and arc length inside the host's `.node` marker, so the arc that\n * closes in its place goes on from where the spinner is. Call before the spinner leaves the DOM, then\n * `startMarkerArc` once the arc renders.\n * @internal\n */\nexport function holdMarkerArc(host: HTMLElement): void {\n const spinner = host.querySelector<HTMLElement>('.node ds-spinner');\n const turn = spinner\n ?.getAnimations()\n .find(\n (animation) =>\n animation.effect?.getComputedTiming().iterations === Infinity,\n );\n const period = Number(turn?.effect?.getComputedTiming().duration);\n if (!spinner || !turn || !period) {\n host.style.removeProperty('--_step-arc-from');\n host.style.removeProperty('--_step-arc-length');\n heldArcs.delete(host);\n\n return;\n }\n heldArcs.set(host, {\n angle: ((Number(turn.currentTime) % period) / period) * 360,\n clock: Number(document.timeline.currentTime),\n period,\n });\n host.style.setProperty(\n '--_step-arc-length',\n getComputedStyle(spinner).getPropertyValue('--_step-arc-sweep'),\n );\n}\n\n/**\n * Starts the closing arc at the angle the spinner has turned to since `holdMarkerArc` read it, in the\n * frame the arc first renders.\n * @internal\n */\nexport function startMarkerArc(host: HTMLElement): void {\n const held = heldArcs.get(host);\n const node = host.querySelector('.node');\n heldArcs.delete(host);\n if (!held || !node) {\n return;\n }\n const start = (): boolean => {\n const arcs = node\n .getAnimations({ subtree: true })\n .filter((animation) =>\n (animation as CSSAnimation).animationName?.includes('ds-step-arc'),\n );\n if (!arcs.length) {\n return false;\n }\n const now = Number(document.timeline.currentTime);\n host.style.setProperty(\n '--_step-arc-from',\n `${(held.angle + ((now - held.clock) / held.period) * 360) % 360}deg`,\n );\n for (const arc of arcs) {\n arc.startTime = now;\n }\n\n return true;\n };\n if (start()) {\n return;\n }\n // Angular adds the enter class that draws the arc a task after the render.\n const observer = new MutationObserver(() => start() && observer.disconnect());\n observer.observe(node, { subtree: true, attributeFilter: ['class'] });\n setTimeout(() => observer.disconnect(), 1000);\n}\n","let nextId = 0;\n\n/** Process-wide counter for SSR-safe control ids (no DOM dependency).\n * @internal\n */\nexport function nextControlId(prefix: string): string {\n return `${prefix}-${++nextId}`;\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Fills an option group's heading.\n *\n * Context: `$implicit` and `group` are the group itself, `count` how many of its\n * options survived the filter.\n *\n * The heading element stays the library's, keeping the id the group's `aria-labelledby`\n * points at.\n */\n@Directive({\n selector: '[dsGroupLabelTemplate]',\n standalone: true,\n})\nexport class DsGroupLabelTemplateDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Fills an option row's LABEL AREA in `ds-select`, `ds-multi-select` and\n * `ds-autocomplete`.\n *\n * ```html\n * <ds-multi-select [options]=\"assignees()\">\n * <ng-template dsOptionTemplate let-option>\n * <ds-avatar size=\"xs\" [seed]=\"option.label\" /> {{ option.label }}\n * </ng-template>\n * </ds-multi-select>\n * ```\n *\n * The row stays library-owned: `role=\"option\"`, `aria-selected`, the active-row class,\n * the checkbox and the check glyph are not projected.\n */\n@Directive({\n selector: '[dsOptionTemplate]',\n standalone: true,\n})\nexport class DsOptionTemplateDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import type {\n ConnectionPositionPair,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n} from '@angular/cdk/overlay';\n\n/** Where a connected panel sits relative to its trigger; the panel enters FROM the trigger. */\nexport type DsOverlayPlacement = 'top' | 'bottom' | 'left' | 'right';\n\n/** The theme's role layer, forwarded onto every portaled pane. */\nconst ROLE_TOKENS = [\n '--ds-radius-inner',\n '--ds-radius-control',\n '--ds-radius-panel',\n '--ds-radius-pill',\n '--ds-elevation-raised',\n '--ds-elevation-overlay',\n '--ds-elevation-floating',\n '--ds-elevation-modal',\n] as const;\n\n/** Public enter-motion tokens read by every `ds-overlay-pane`. */\nconst OVERLAY_MOTION_TOKENS = [\n '--ds-overlay-enter-keyframes',\n '--ds-overlay-enter-duration',\n '--ds-overlay-enter-easing',\n '--ds-overlay-enter-offset',\n '--ds-overlay-enter-scale',\n] as const;\n\n/** Styles the `ds-dropdown-panel` class every `dropdownOverlay()` pane carries. */\nconst DROPDOWN_PANEL_TOKENS = [\n '--ds-dropdown-panel-radius',\n '--ds-dropdown-panel-max-height',\n '--ds-dropdown-panel-border-color',\n '--ds-dropdown-panel-shadow',\n '--ds-option-padding',\n '--ds-option-gap',\n '--ds-option-radius',\n '--ds-option-row-gap',\n '--ds-option-bg-color-active',\n '--ds-option-font-weight',\n '--ds-option-font-size',\n '--ds-option-line-height',\n '--ds-option-font-family',\n] as const;\n\n/**\n * Why a panel is closing. `'select'` is a deliberate action (option chosen, trigger pressed\n * again, Tab moving on); `'dismiss'` is ambient (Escape, a press outside, scrolling away).\n * @internal\n */\nexport type DsOverlayCloseCause = 'select' | 'dismiss';\n\nconst DROPDOWN_GAP = 4;\n\n/**\n * One panel-class input as an array; spreading the raw string would give a per-letter class list.\n * @internal\n */\nexport function panelClassesOf(\n panelClass: string | readonly string[],\n): readonly string[] {\n return typeof panelClass === 'string'\n ? panelClass.split(' ').filter((className) => className.length > 0)\n : panelClass;\n}\n\n/** The pane's floor: the trigger, or `--ds-dropdown-panel-min-width` when that is wider. Set on the\n * pane, not the panel inside it, so the overlay is placed by the width it is drawn at.\n * @internal\n */\nexport function dropdownMinWidth(triggerWidth: number): string {\n return `max(${triggerWidth}px, var(--_dropdown-panel-min-width))`;\n}\n\n/**\n * The geometry every DS dropdown shares. Width is NOT set here: each caller has its own policy.\n * @internal\n */\nexport function dropdownOverlay(\n overlay: Overlay,\n trigger: HTMLElement,\n extraPanelClass: string | readonly string[] = [],\n): {\n positionStrategy: FlexibleConnectedPositionStrategy;\n config: OverlayConfig;\n} {\n const positionStrategy = overlay\n .position()\n .flexibleConnectedTo(trigger)\n .withPositions([\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetY: DROPDOWN_GAP,\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetY: -DROPDOWN_GAP,\n },\n ]);\n\n return {\n positionStrategy,\n config: {\n positionStrategy,\n hasBackdrop: false,\n // The panel skin is global CSS: `:host ::ng-deep` cannot reach a portaled node.\n panelClass: [\n 'ds-dropdown-panel',\n 'ds-overlay-pane',\n ...panelClassesOf(extraPanelClass),\n ],\n scrollStrategy: overlay.scrollStrategies.reposition(),\n },\n };\n}\n\n// Teardown fallback: a display:none pane, a removed animation or a 0s reduced-motion duration\n// (animationend is not reliably delivered) all end here. Past --ds-motion-exit-duration.\nconst LEAVE_TIMEOUT_MS = 400;\n\n/**\n * Closes a DS overlay panel instantly on a `'select'`, with a short fade on a `'dismiss'`.\n *\n * NOTE: teardown paths dispose directly; `ModalService` owns its own leave.\n * @internal\n */\nexport function disposeWithLeave(\n overlayRef: OverlayRef | null | undefined,\n cause: DsOverlayCloseCause = 'select',\n): void {\n if (!overlayRef) {\n return;\n }\n if (cause === 'select') {\n overlayRef.dispose();\n\n return;\n }\n\n const pane = overlayRef.overlayElement;\n let disposed = false;\n const finish = (): void => {\n if (disposed) {\n return;\n }\n disposed = true;\n clearTimeout(timer);\n pane.removeEventListener('animationend', onAnimationEnd);\n overlayRef.dispose();\n };\n // The pane's ROOT CHILD animates (CDK owns transforms on the pane), so the event bubbles up.\n const onAnimationEnd = (event: AnimationEvent): void => {\n if (event.animationName.endsWith('ds-overlay-out')) {\n finish();\n }\n };\n const timer = setTimeout(finish, LEAVE_TIMEOUT_MS);\n pane.addEventListener('animationend', onAnimationEnd);\n pane.classList.add('ds-leaving');\n}\n\n/**\n * Forwards a portaled panel's public `--ds-*` override tokens from the component host onto\n * the overlay pane (in `document.body`, outside `:host`). Only non-empty values are set, so an\n * unset token falls through to the panel's `var(--ds-*, <default>)`. Call once per open.\n * @internal\n */\nexport function forwardOverlayTokens(\n overlayRef: OverlayRef,\n host: HTMLElement,\n tokens: readonly string[],\n): void {\n const hostStyle = getComputedStyle(host);\n const paneStyle = overlayRef.overlayElement.style;\n for (const token of tokens) {\n const value = hostStyle.getPropertyValue(token).trim();\n if (value) {\n paneStyle.setProperty(token, value);\n }\n }\n\n // Roles resolve at :root; pinning them unconditionally would freeze an open panel against a\n // theme switch. Forward only where the host declares the role ITSELF, compared against the\n // PARENT (custom properties inherit) so an inline pin never outranks `.ds-overlay-pane`.\n const inheritedStyle = getComputedStyle(\n host.parentElement ?? host.ownerDocument.documentElement,\n );\n for (const token of ROLE_TOKENS) {\n const value = hostStyle.getPropertyValue(token).trim();\n if (value && value !== inheritedStyle.getPropertyValue(token).trim()) {\n paneStyle.setProperty(token, value);\n }\n }\n}\n\n/** The side of the trigger a connection pair puts the panel on. An axis decides only where the\n * pair pins opposite edges together: a side pair aligning top edges keeps `overlayY: 'top'`.\n * A pair covering the trigger falls back to `overlayY`, so `top` means it hangs BELOW.\n * @internal\n */\nexport function overlayPlacementOf({\n originX,\n originY,\n overlayX,\n overlayY,\n}: Pick<\n ConnectionPositionPair,\n 'originX' | 'originY' | 'overlayX' | 'overlayY'\n>): DsOverlayPlacement {\n const opposite = (origin: string, overlay: string) =>\n origin !== overlay && origin !== 'center' && overlay !== 'center';\n if (opposite(originY, overlayY)) {\n return overlayY === 'top' ? 'bottom' : 'top';\n }\n if (opposite(originX, overlayX)) {\n return overlayX === 'start' ? 'right' : 'left';\n }\n if (overlayY === 'top') {\n return 'bottom';\n }\n if (overlayY === 'bottom') {\n return 'top';\n }\n if (overlayX === 'start') {\n return 'right';\n }\n\n return 'left';\n}\n\n// Sets `--_overlay-arrow-x/y` on the panel: the trigger's centre in the panel's padding box.\n// positionChanges skips a re-apply that only pushes the pane; the styles CDK writes do not.\n// The pane is measured, not the panel: the panel's enter animation scales it.\n/** @internal */\nexport function pointArrowAtHost(\n ref: OverlayRef,\n panel: HTMLElement,\n host: HTMLElement,\n): void {\n const pane = ref.overlayElement;\n const point = () => {\n const trigger = host.getBoundingClientRect();\n const box = pane.getBoundingClientRect();\n panel.style.setProperty(\n '--_overlay-arrow-x',\n `${trigger.left + trigger.width / 2 - box.left - panel.clientLeft}px`,\n );\n panel.style.setProperty(\n '--_overlay-arrow-y',\n `${trigger.top + trigger.height / 2 - box.top - panel.clientTop}px`,\n );\n };\n const observer = new MutationObserver(point);\n observer.observe(ref.hostElement, { attributeFilter: ['style'] });\n observer.observe(pane, { attributeFilter: ['style'] });\n ref.detachments().subscribe({ complete: () => observer.disconnect() });\n}\n\n/**\n * Primes a `ds-overlay-pane` for its enter animation. Call right after `overlay.create()`:\n * CDK positions in `afterNextRender`, so the placement stamp lands before the first painted\n * frame. Until then (or with no strategy) the CSS default enters from above.\n *\n * No teardown needed: disposing the overlay completes `positionChanges`.\n * @internal\n */\nexport function prepareOverlayEnter(\n overlayRef: OverlayRef,\n host: HTMLElement,\n positionStrategy?: FlexibleConnectedPositionStrategy,\n): void {\n forwardOverlayTokens(overlayRef, host, OVERLAY_MOTION_TOKENS);\n forwardOverlayTokens(overlayRef, host, DROPDOWN_PANEL_TOKENS);\n positionStrategy?.positionChanges.subscribe(({ connectionPair }) => {\n overlayRef.overlayElement.dataset['dsPlacement'] =\n overlayPlacementOf(connectionPair);\n });\n}\n\n/** Closes a non-modal overlay on a pointer press outside it, EXCEPT on its trigger. Use with `hasBackdrop: false`.\n * @internal\n */\nexport function closeOnOutsidePointer(\n overlayRef: OverlayRef,\n isInsideTrigger: (target: Node) => boolean,\n close: () => void,\n): void {\n overlayRef.outsidePointerEvents().subscribe((event) => {\n const target = event.target as Node | null;\n if (target && isInsideTrigger(target)) {\n return;\n }\n close();\n });\n}\n\n/** Closes a non-modal overlay when the page scrolls. CDK's scroll strategies miss a plain\n * `overflow:auto` container, so this listens on the document in the CAPTURE phase (`scroll`\n * does not bubble). A scroll inside the panel is ignored.\n * @internal\n */\nexport function closeOnScroll(\n overlayRef: OverlayRef,\n close: () => void,\n): () => void {\n const onScroll = (event: Event): void => {\n const target = event.target as Node | null;\n if (target && overlayRef.overlayElement.contains(target)) {\n return;\n }\n if (\n target instanceof HTMLElement &&\n (target.tagName === 'INPUT' ||\n target.tagName === 'TEXTAREA' ||\n target.tagName === 'SELECT')\n ) {\n return;\n }\n close();\n };\n const doc = overlayRef.overlayElement.ownerDocument;\n doc.addEventListener('scroll', onScroll, true);\n\n return () => doc.removeEventListener('scroll', onScroll, true);\n}\n\n/** Calls `onEscape` when `Escape` is pressed anywhere on `target`, in the CAPTURE phase so a handler\n * further down cannot swallow it. Returns the removal. A null target (no document, as on the\n * server) listens to nothing.\n * @internal\n */\nexport function listenForEscape(\n target: Pick<Document, 'addEventListener' | 'removeEventListener'> | null,\n onEscape: () => void,\n): () => void {\n if (!target) {\n return () => undefined;\n }\n const onKeydown = (event: KeyboardEvent): void => {\n if (event.key === 'Escape') {\n onEscape();\n }\n };\n target.addEventListener('keydown', onKeydown as EventListener, true);\n\n return () =>\n target.removeEventListener('keydown', onKeydown as EventListener, true);\n}\n\n/**\n * Syncs a component's \"which overlay is mine, and is it open\" state when THIS overlay detaches,\n * skipping the write when a newer one has taken over.\n *\n * `disposeWithLeave` defers the dispose until the exit animation ends, so a dismiss followed\n * by a re-open delivers the OLD overlay's detachment while the NEW one is live. Clearing\n * unconditionally would leave that panel on screen with its component believing it closed.\n * @internal\n */\nexport function clearOnDetach(\n overlayRef: OverlayRef,\n {\n current,\n clear,\n always,\n }: {\n /** Reads the ref the component considers live right now. */\n current: () => OverlayRef | null;\n /** Drops the stored ref and marks the component closed. */\n clear: () => void;\n /** Teardown that must run for every detachment, current or superseded. */\n always?: () => void;\n },\n): void {\n overlayRef.detachments().subscribe(() => {\n always?.();\n if (current() !== overlayRef) {\n return;\n }\n clear();\n });\n}\n\n/** True when keyboard focus sits inside the overlay pane. Read it BEFORE disposing, to decide\n * whether the close must refocus the trigger rather than strand focus on `<body>`.\n * @internal\n */\nexport function focusIsInside(overlayRef: OverlayRef): boolean {\n const doc = overlayRef.overlayElement.ownerDocument;\n\n return overlayRef.overlayElement.contains(doc.activeElement);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Fills a strip below a picker panel's option list.\n *\n * Context: the same as the header slot: `count`, `total`, `query`.\n *\n * Like the header it sits OUTSIDE the `listbox` and does not scroll with the options.\n * Anything focusable here is reached by Tab, so give it an accessible name.\n */\n@Directive({\n selector: '[dsPanelFooterTemplate]',\n standalone: true,\n})\nexport class DsPanelFooterTemplateDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Fills a strip above a picker panel's option list.\n *\n * Context: `count` is how many options are visible after filtering, `total` how\n * many were given, and `query` the text that narrowed them.\n *\n * It sits OUTSIDE the `listbox`, so it is not counted as an option in a screen\n * reader's \"N of M\" position. It stays put while the list scrolls.\n */\n@Directive({\n selector: '[dsPanelHeaderTemplate]',\n standalone: true,\n})\nexport class DsPanelHeaderTemplateDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import {\n type Signal,\n DestroyRef,\n effect,\n inject,\n DOCUMENT,\n} from '@angular/core';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\n\n/**\n * Announces how many options survived the filter.\n *\n * NOT a row inside the listbox (a live region there is an invalid child). The node is created\n * once, empty, and only its text changes: a region created with its text is not reliably announced.\n * @internal\n */\nexport function announceOptionCount(\n count: Signal<number>,\n active: Signal<boolean>,\n): void {\n const documentRef = inject(DOCUMENT);\n const intl = inject(DS_INTL);\n const region = documentRef.createElement('div');\n region.setAttribute('aria-live', 'polite');\n region.setAttribute('aria-atomic', 'true');\n // Off-screen, not `display: none`, which would remove it from the accessibility tree.\n // glyph-clip-guard: visually hidden live region\n region.style.cssText =\n 'position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;margin:-1px;padding:0';\n documentRef.body.appendChild(region);\n inject(DestroyRef).onDestroy(() => region.remove());\n\n effect(() => {\n if (!active()) {\n region.textContent = '';\n\n return;\n }\n region.textContent = intl().picker.resultCount(count());\n });\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Replaces the CONTENTS of a picker's trigger (chips, value, placeholder) with your own\n * markup. The trigger ELEMENT stays library-owned: its ARIA attributes and\n * Enter/Space/ArrowDown/Escape handling are kept.\n *\n * ```html\n * <ds-multi-select [options]=\"labels()\" [(value)]=\"picked\">\n * <ng-template dsPickerTrigger let-count=\"count\">\n * Labels @if (count) { <ds-badge [count]=\"count\" /> }\n * </ng-template>\n * </ds-multi-select>\n * ```\n *\n * Context: `$implicit` and `selected` are the selected options, `count` their\n * number, `open` whether the panel is showing, `disabled` the control's state.\n *\n * A projected template WINS over `triggerDisplay`, which is then not read at all.\n */\n@Directive({\n selector: '[dsPickerTrigger]',\n standalone: true,\n})\nexport class DsPickerTriggerDirective {\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import {\n Directive,\n ElementRef,\n afterNextRender,\n inject,\n input,\n} from '@angular/core';\nimport { reportDevWarning } from '@ids-group-ltd/ids-design-system/core';\n\n/**\n * Dev-only guard for a component that DROPS whatever is projected into it: warns instead of\n * staying silent. Put it on a probe around the `<ng-content>`, gated on dev mode:\n *\n * ```html\n * @if (devMode) {\n * <span dsProjectionDropped=\"ds-filter-bar\"><ng-content></ng-content></span>\n * }\n * ```\n *\n * It is NOT projection support: the probe only detects that content arrived, then hides it.\n * `reason` replaces the default `[label]` wording.\n * @internal\n */\n@Directive({\n selector: '[dsProjectionDropped]',\n standalone: true,\n host: { style: 'display: none' },\n})\nexport class ProjectionDroppedDirective {\n readonly dsProjectionDropped = input.required<string>();\n /** Overrides the `[label]` explanation; appended after \"Projected content renders nothing\". */\n readonly reason = input<string>('');\n\n private readonly probe = inject(ElementRef<HTMLElement>);\n\n constructor() {\n afterNextRender(() => {\n if (!this.probe.nativeElement.textContent?.trim()) {\n return;\n }\n const selector = this.dsProjectionDropped();\n const reason =\n this.reason() ||\n `the caption comes from the [label] input only, so \\`<${selector}>Some text</${selector}>\\` shows no caption at all. Move the text into [label].`;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n reportDevWarning(\n `[${selector}] Projected content renders nothing — ${reason}`,\n );\n }\n });\n }\n}\n","import {\n type Signal,\n afterRenderEffect,\n inject,\n DOCUMENT,\n} from '@angular/core';\n\n/**\n * Keeps the keyboard cursor's row visible inside a scrolling panel.\n *\n * KEYBOARD ONLY (`armed`): rows also set the active index on `mouseenter`, and reacting to\n * that would pull a partially visible row up under the pointer.\n *\n * Rows are looked up by id, not `viewChildren`, because they live in a portaled template.\n * @internal\n */\nexport function scrollActiveOptionIntoView(\n activeDescendantId: Signal<string | null>,\n enabled: Signal<boolean>,\n armed: Signal<boolean>,\n): void {\n const documentRef = inject(DOCUMENT);\n\n afterRenderEffect(() => {\n const id = activeDescendantId();\n if (!enabled() || !armed() || !id) {\n return;\n }\n documentRef\n .getElementById(id)\n ?.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n });\n}\n","import { Directive, booleanAttribute, input } from '@angular/core';\n\n/** Showcase-only: renders the component's open/overlay surface inline in normal\n * flow instead of its real overlay mechanics (for static docs specimens).\n * Not part of the production contract. */\n@Directive({ standalone: true })\nexport class DsStaticPreview {\n readonly staticPreview = input(false, { transform: booleanAttribute });\n}\n","/**\n * Jump-to-option-by-typing, as a native `<select>` does. 500ms is the native and APG\n * interval separating \"ba\" from two separate presses.\n */\nconst RESET_AFTER_MS = 500;\n\nexport interface DsTypeAhead {\n /** Feed it a keypress. Returns the index to move to, or -1 when the key is not\n * a character or nothing matches. */\n match: (key: string, labels: readonly string[], from: number) => number;\n}\n\n/** @internal */\nexport function createTypeAhead(): DsTypeAhead {\n let buffer = '';\n let last = 0;\n\n return {\n match(key, labels, from) {\n if (key.length !== 1 || !/\\S/.test(key)) {\n return -1;\n }\n\n const now = Date.now();\n buffer = now - last > RESET_AFTER_MS ? key : buffer + key;\n last = now;\n\n const query = buffer.toLowerCase();\n const cycling =\n buffer.length > 1 &&\n [...buffer].every((character) => character === buffer[0]);\n const needle = cycling ? buffer[0].toLowerCase() : query;\n const start = cycling || buffer.length === 1 ? from + 1 : 0;\n\n for (let offset = 0; offset < labels.length; offset += 1) {\n const index = (start + offset + labels.length) % labels.length;\n if (labels[index].toLowerCase().startsWith(needle)) {\n return index;\n }\n }\n\n return -1;\n },\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names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