@ngstarter-ui/components 22.3.5 → 22.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (476) hide show
  1. package/README.md +27 -0
  2. package/ai/component-registry.json +186 -101
  3. package/fesm2022/attachment-block-BK9QxVjq.mjs +163 -0
  4. package/fesm2022/attachment-block-BK9QxVjq.mjs.map +1 -0
  5. package/fesm2022/callout-block-Bl4GZYz8.mjs +196 -0
  6. package/fesm2022/callout-block-Bl4GZYz8.mjs.map +1 -0
  7. package/fesm2022/code-block.component-DCRD-9iP.mjs +393 -0
  8. package/fesm2022/code-block.component-DCRD-9iP.mjs.map +1 -0
  9. package/fesm2022/content-builder.store-D622mHxt.mjs +328 -0
  10. package/fesm2022/content-builder.store-D622mHxt.mjs.map +1 -0
  11. package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs +1110 -0
  12. package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs.map +1 -0
  13. package/fesm2022/cursor-controller-DKfBII1n.mjs +55 -0
  14. package/fesm2022/cursor-controller-DKfBII1n.mjs.map +1 -0
  15. package/fesm2022/default-converters-9oSKDsXP.mjs +140 -0
  16. package/fesm2022/default-converters-9oSKDsXP.mjs.map +1 -0
  17. package/fesm2022/divider-block.component-Dvgeq_D0.mjs +148 -0
  18. package/fesm2022/divider-block.component-Dvgeq_D0.mjs.map +1 -0
  19. package/fesm2022/embed-block-CYkOv4Wt.mjs +565 -0
  20. package/fesm2022/embed-block-CYkOv4Wt.mjs.map +1 -0
  21. package/fesm2022/extra-block-defs-Cn_hfM3c.mjs +122 -0
  22. package/fesm2022/extra-block-defs-Cn_hfM3c.mjs.map +1 -0
  23. package/fesm2022/gallery-block-DT3uIURY.mjs +365 -0
  24. package/fesm2022/gallery-block-DT3uIURY.mjs.map +1 -0
  25. package/fesm2022/grid-block-ZVDT3m8-.mjs +504 -0
  26. package/fesm2022/grid-block-ZVDT3m8-.mjs.map +1 -0
  27. package/fesm2022/heading-block.component-iCpJGTMh.mjs +274 -0
  28. package/fesm2022/heading-block.component-iCpJGTMh.mjs.map +1 -0
  29. package/fesm2022/html-utils-DywL8gGa.mjs +24 -0
  30. package/fesm2022/html-utils-DywL8gGa.mjs.map +1 -0
  31. package/fesm2022/image-block.component-DJ7-HCR8.mjs +285 -0
  32. package/fesm2022/image-block.component-DJ7-HCR8.mjs.map +1 -0
  33. package/fesm2022/list-block.component-qFIebEBO.mjs +312 -0
  34. package/fesm2022/list-block.component-qFIebEBO.mjs.map +1 -0
  35. package/fesm2022/nested-blocks-CXhgXJ1H.mjs +345 -0
  36. package/fesm2022/nested-blocks-CXhgXJ1H.mjs.map +1 -0
  37. package/fesm2022/ngstarter-ui-components-action-required.mjs +150 -45
  38. package/fesm2022/ngstarter-ui-components-action-required.mjs.map +1 -1
  39. package/fesm2022/ngstarter-ui-components-alert.mjs +318 -133
  40. package/fesm2022/ngstarter-ui-components-alert.mjs.map +1 -1
  41. package/fesm2022/ngstarter-ui-components-announcement.mjs +280 -88
  42. package/fesm2022/ngstarter-ui-components-announcement.mjs.map +1 -1
  43. package/fesm2022/ngstarter-ui-components-autocomplete.mjs +647 -386
  44. package/fesm2022/ngstarter-ui-components-autocomplete.mjs.map +1 -1
  45. package/fesm2022/ngstarter-ui-components-avatar.mjs +715 -482
  46. package/fesm2022/ngstarter-ui-components-avatar.mjs.map +1 -1
  47. package/fesm2022/ngstarter-ui-components-badge.mjs +308 -97
  48. package/fesm2022/ngstarter-ui-components-badge.mjs.map +1 -1
  49. package/fesm2022/ngstarter-ui-components-block-loader.mjs +164 -47
  50. package/fesm2022/ngstarter-ui-components-block-loader.mjs.map +1 -1
  51. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs +278 -315
  52. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs.map +1 -1
  53. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs +707 -205
  54. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs.map +1 -1
  55. package/fesm2022/ngstarter-ui-components-button-toggle.mjs +518 -175
  56. package/fesm2022/ngstarter-ui-components-button-toggle.mjs.map +1 -1
  57. package/fesm2022/ngstarter-ui-components-button.mjs +294 -68
  58. package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
  59. package/fesm2022/ngstarter-ui-components-calendar.mjs +442 -250
  60. package/fesm2022/ngstarter-ui-components-calendar.mjs.map +1 -1
  61. package/fesm2022/ngstarter-ui-components-card-overlay.mjs +159 -47
  62. package/fesm2022/ngstarter-ui-components-card-overlay.mjs.map +1 -1
  63. package/fesm2022/ngstarter-ui-components-card.mjs +619 -194
  64. package/fesm2022/ngstarter-ui-components-card.mjs.map +1 -1
  65. package/fesm2022/ngstarter-ui-components-carousel.mjs +1012 -634
  66. package/fesm2022/ngstarter-ui-components-carousel.mjs.map +1 -1
  67. package/fesm2022/ngstarter-ui-components-checkbox.mjs +715 -308
  68. package/fesm2022/ngstarter-ui-components-checkbox.mjs.map +1 -1
  69. package/fesm2022/ngstarter-ui-components-chips.mjs +1397 -667
  70. package/fesm2022/ngstarter-ui-components-chips.mjs.map +1 -1
  71. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs +519 -357
  72. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs.map +1 -1
  73. package/fesm2022/ngstarter-ui-components-color-picker.mjs +1218 -604
  74. package/fesm2022/ngstarter-ui-components-color-picker.mjs.map +1 -1
  75. package/fesm2022/ngstarter-ui-components-color-scheme.mjs +265 -134
  76. package/fesm2022/ngstarter-ui-components-color-scheme.mjs.map +1 -1
  77. package/fesm2022/ngstarter-ui-components-color-switcher.mjs +190 -71
  78. package/fesm2022/ngstarter-ui-components-color-switcher.mjs.map +1 -1
  79. package/fesm2022/ngstarter-ui-components-command-bar.mjs +197 -58
  80. package/fesm2022/ngstarter-ui-components-command-bar.mjs.map +1 -1
  81. package/fesm2022/ngstarter-ui-components-comment-editor.mjs +2212 -1128
  82. package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -1
  83. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs +269 -183
  84. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs.map +1 -1
  85. package/fesm2022/ngstarter-ui-components-confirm.mjs +164 -86
  86. package/fesm2022/ngstarter-ui-components-confirm.mjs.map +1 -1
  87. package/fesm2022/ngstarter-ui-components-content-editor.mjs +6240 -2
  88. package/fesm2022/ngstarter-ui-components-content-editor.mjs.map +1 -1
  89. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs +244 -108
  90. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs.map +1 -1
  91. package/fesm2022/ngstarter-ui-components-core.mjs +2110 -1592
  92. package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
  93. package/fesm2022/ngstarter-ui-components-country-select.mjs +1970 -588
  94. package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -1
  95. package/fesm2022/ngstarter-ui-components-crop.mjs +249 -191
  96. package/fesm2022/ngstarter-ui-components-crop.mjs.map +1 -1
  97. package/fesm2022/ngstarter-ui-components-currency-select.mjs +1658 -452
  98. package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -1
  99. package/fesm2022/ngstarter-ui-components-data-view.mjs +4538 -2497
  100. package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
  101. package/fesm2022/ngstarter-ui-components-date-format-select.mjs +357 -157
  102. package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -1
  103. package/fesm2022/ngstarter-ui-components-datepicker.mjs +2587 -1264
  104. package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
  105. package/fesm2022/ngstarter-ui-components-dialog.mjs +681 -385
  106. package/fesm2022/ngstarter-ui-components-dialog.mjs.map +1 -1
  107. package/fesm2022/ngstarter-ui-components-digit-roller.mjs +1000 -750
  108. package/fesm2022/ngstarter-ui-components-digit-roller.mjs.map +1 -1
  109. package/fesm2022/ngstarter-ui-components-divider.mjs +164 -41
  110. package/fesm2022/ngstarter-ui-components-divider.mjs.map +1 -1
  111. package/fesm2022/ngstarter-ui-components-drawer.mjs +218 -143
  112. package/fesm2022/ngstarter-ui-components-drawer.mjs.map +1 -1
  113. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs +345 -247
  114. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs.map +1 -1
  115. package/fesm2022/ngstarter-ui-components-empty-state.mjs +244 -74
  116. package/fesm2022/ngstarter-ui-components-empty-state.mjs.map +1 -1
  117. package/fesm2022/ngstarter-ui-components-events.mjs +467 -126
  118. package/fesm2022/ngstarter-ui-components-events.mjs.map +1 -1
  119. package/fesm2022/ngstarter-ui-components-expand.mjs +191 -59
  120. package/fesm2022/ngstarter-ui-components-expand.mjs.map +1 -1
  121. package/fesm2022/ngstarter-ui-components-expansion.mjs +529 -193
  122. package/fesm2022/ngstarter-ui-components-expansion.mjs.map +1 -1
  123. package/fesm2022/ngstarter-ui-components-file-type.mjs +270 -171
  124. package/fesm2022/ngstarter-ui-components-file-type.mjs.map +1 -1
  125. package/fesm2022/ngstarter-ui-components-filter-builder.mjs +741 -352
  126. package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
  127. package/fesm2022/ngstarter-ui-components-form-builder.mjs +9032 -6964
  128. package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
  129. package/fesm2022/ngstarter-ui-components-form-field.mjs +741 -276
  130. package/fesm2022/ngstarter-ui-components-form-field.mjs.map +1 -1
  131. package/fesm2022/ngstarter-ui-components-gauge.mjs +155 -43
  132. package/fesm2022/ngstarter-ui-components-gauge.mjs.map +1 -1
  133. package/fesm2022/ngstarter-ui-components-grid.mjs +197 -81
  134. package/fesm2022/ngstarter-ui-components-grid.mjs.map +1 -1
  135. package/fesm2022/ngstarter-ui-components-guided-tour.mjs +881 -740
  136. package/fesm2022/ngstarter-ui-components-guided-tour.mjs.map +1 -1
  137. package/fesm2022/ngstarter-ui-components-headless-editor.mjs +3573 -3656
  138. package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
  139. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs +277 -204
  140. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs.map +1 -1
  141. package/fesm2022/ngstarter-ui-components-icon.mjs +209 -182
  142. package/fesm2022/ngstarter-ui-components-icon.mjs.map +1 -1
  143. package/fesm2022/ngstarter-ui-components-image-designer.mjs +5096 -4066
  144. package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
  145. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs +45 -19
  146. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs.map +1 -1
  147. package/fesm2022/ngstarter-ui-components-image-resizer.mjs +333 -154
  148. package/fesm2022/ngstarter-ui-components-image-resizer.mjs.map +1 -1
  149. package/fesm2022/ngstarter-ui-components-image-viewer.mjs +564 -358
  150. package/fesm2022/ngstarter-ui-components-image-viewer.mjs.map +1 -1
  151. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs +246 -167
  152. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs.map +1 -1
  153. package/fesm2022/ngstarter-ui-components-incidents.mjs +732 -258
  154. package/fesm2022/ngstarter-ui-components-incidents.mjs.map +1 -1
  155. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs +244 -182
  156. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs.map +1 -1
  157. package/fesm2022/ngstarter-ui-components-input-mask.mjs +314 -174
  158. package/fesm2022/ngstarter-ui-components-input-mask.mjs.map +1 -1
  159. package/fesm2022/ngstarter-ui-components-input-validator.mjs +45 -69
  160. package/fesm2022/ngstarter-ui-components-input-validator.mjs.map +1 -1
  161. package/fesm2022/ngstarter-ui-components-input.mjs +303 -161
  162. package/fesm2022/ngstarter-ui-components-input.mjs.map +1 -1
  163. package/fesm2022/ngstarter-ui-components-kanban-board.mjs +504 -159
  164. package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
  165. package/fesm2022/ngstarter-ui-components-kbd.mjs +86 -30
  166. package/fesm2022/ngstarter-ui-components-kbd.mjs.map +1 -1
  167. package/fesm2022/ngstarter-ui-components-layout.mjs +681 -220
  168. package/fesm2022/ngstarter-ui-components-layout.mjs.map +1 -1
  169. package/fesm2022/ngstarter-ui-components-list.mjs +968 -281
  170. package/fesm2022/ngstarter-ui-components-list.mjs.map +1 -1
  171. package/fesm2022/ngstarter-ui-components-logo.mjs +181 -51
  172. package/fesm2022/ngstarter-ui-components-logo.mjs.map +1 -1
  173. package/fesm2022/ngstarter-ui-components-marquee.mjs +226 -147
  174. package/fesm2022/ngstarter-ui-components-marquee.mjs.map +1 -1
  175. package/fesm2022/ngstarter-ui-components-menu.mjs +1686 -1091
  176. package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
  177. package/fesm2022/ngstarter-ui-components-micro-chart.mjs +1541 -943
  178. package/fesm2022/ngstarter-ui-components-micro-chart.mjs.map +1 -1
  179. package/fesm2022/ngstarter-ui-components-navigation.mjs +1035 -455
  180. package/fesm2022/ngstarter-ui-components-navigation.mjs.map +1 -1
  181. package/fesm2022/ngstarter-ui-components-notifications.mjs +678 -230
  182. package/fesm2022/ngstarter-ui-components-notifications.mjs.map +1 -1
  183. package/fesm2022/ngstarter-ui-components-number-input.mjs +616 -316
  184. package/fesm2022/ngstarter-ui-components-number-input.mjs.map +1 -1
  185. package/fesm2022/ngstarter-ui-components-option.mjs +405 -163
  186. package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -1
  187. package/fesm2022/ngstarter-ui-components-overlay.mjs +107 -111
  188. package/fesm2022/ngstarter-ui-components-overlay.mjs.map +1 -1
  189. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs +131 -76
  190. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs.map +1 -1
  191. package/fesm2022/ngstarter-ui-components-paginator.mjs +543 -295
  192. package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -1
  193. package/fesm2022/ngstarter-ui-components-password-strength.mjs +785 -340
  194. package/fesm2022/ngstarter-ui-components-password-strength.mjs.map +1 -1
  195. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +3705 -2695
  196. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
  197. package/fesm2022/ngstarter-ui-components-pdf-signer.mjs +1179 -851
  198. package/fesm2022/ngstarter-ui-components-pdf-signer.mjs.map +1 -1
  199. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +2973 -2070
  200. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
  201. package/fesm2022/ngstarter-ui-components-phone-input.mjs +2081 -770
  202. package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
  203. package/fesm2022/ngstarter-ui-components-pin-input.mjs +366 -198
  204. package/fesm2022/ngstarter-ui-components-pin-input.mjs.map +1 -1
  205. package/fesm2022/ngstarter-ui-components-popover.mjs +558 -308
  206. package/fesm2022/ngstarter-ui-components-popover.mjs.map +1 -1
  207. package/fesm2022/ngstarter-ui-components-progress-bar.mjs +178 -73
  208. package/fesm2022/ngstarter-ui-components-progress-bar.mjs.map +1 -1
  209. package/fesm2022/ngstarter-ui-components-radio-card.mjs +301 -105
  210. package/fesm2022/ngstarter-ui-components-radio-card.mjs.map +1 -1
  211. package/fesm2022/ngstarter-ui-components-radio.mjs +417 -157
  212. package/fesm2022/ngstarter-ui-components-radio.mjs.map +1 -1
  213. package/fesm2022/ngstarter-ui-components-rail-nav.mjs +208 -88
  214. package/fesm2022/ngstarter-ui-components-rail-nav.mjs.map +1 -1
  215. package/fesm2022/ngstarter-ui-components-resizable-container.mjs +123 -74
  216. package/fesm2022/ngstarter-ui-components-resizable-container.mjs.map +1 -1
  217. package/fesm2022/ngstarter-ui-components-screen-loader.mjs +197 -95
  218. package/fesm2022/ngstarter-ui-components-screen-loader.mjs.map +1 -1
  219. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs +383 -245
  220. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs.map +1 -1
  221. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs +705 -581
  222. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs.map +1 -1
  223. package/fesm2022/ngstarter-ui-components-segmented.mjs +422 -220
  224. package/fesm2022/ngstarter-ui-components-segmented.mjs.map +1 -1
  225. package/fesm2022/ngstarter-ui-components-select.mjs +1862 -1159
  226. package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -1
  227. package/fesm2022/ngstarter-ui-components-side-panel.mjs +313 -118
  228. package/fesm2022/ngstarter-ui-components-side-panel.mjs.map +1 -1
  229. package/fesm2022/ngstarter-ui-components-sidebar.mjs +1239 -470
  230. package/fesm2022/ngstarter-ui-components-sidebar.mjs.map +1 -1
  231. package/fesm2022/ngstarter-ui-components-sidenav.mjs +664 -354
  232. package/fesm2022/ngstarter-ui-components-sidenav.mjs.map +1 -1
  233. package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1092 -643
  234. package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
  235. package/fesm2022/ngstarter-ui-components-skeleton.mjs +153 -43
  236. package/fesm2022/ngstarter-ui-components-skeleton.mjs.map +1 -1
  237. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs +425 -108
  238. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs.map +1 -1
  239. package/fesm2022/ngstarter-ui-components-slider.mjs +645 -487
  240. package/fesm2022/ngstarter-ui-components-slider.mjs.map +1 -1
  241. package/fesm2022/ngstarter-ui-components-snack-bar.mjs +372 -354
  242. package/fesm2022/ngstarter-ui-components-snack-bar.mjs.map +1 -1
  243. package/fesm2022/ngstarter-ui-components-sort.mjs +378 -147
  244. package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
  245. package/fesm2022/ngstarter-ui-components-spinner.mjs +242 -76
  246. package/fesm2022/ngstarter-ui-components-spinner.mjs.map +1 -1
  247. package/fesm2022/ngstarter-ui-components-splash-screen.mjs +142 -91
  248. package/fesm2022/ngstarter-ui-components-splash-screen.mjs.map +1 -1
  249. package/fesm2022/ngstarter-ui-components-split.mjs +1067 -929
  250. package/fesm2022/ngstarter-ui-components-split.mjs.map +1 -1
  251. package/fesm2022/ngstarter-ui-components-step-tracker.mjs +617 -331
  252. package/fesm2022/ngstarter-ui-components-step-tracker.mjs.map +1 -1
  253. package/fesm2022/ngstarter-ui-components-stepper.mjs +357 -126
  254. package/fesm2022/ngstarter-ui-components-stepper.mjs.map +1 -1
  255. package/fesm2022/ngstarter-ui-components-suggestions.mjs +259 -72
  256. package/fesm2022/ngstarter-ui-components-suggestions.mjs.map +1 -1
  257. package/fesm2022/ngstarter-ui-components-tab-panel.mjs +674 -267
  258. package/fesm2022/ngstarter-ui-components-tab-panel.mjs.map +1 -1
  259. package/fesm2022/ngstarter-ui-components-table.mjs +1144 -662
  260. package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
  261. package/fesm2022/ngstarter-ui-components-tabs.mjs +1236 -615
  262. package/fesm2022/ngstarter-ui-components-tabs.mjs.map +1 -1
  263. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs +414 -216
  264. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs.map +1 -1
  265. package/fesm2022/ngstarter-ui-components-tiles.mjs +939 -647
  266. package/fesm2022/ngstarter-ui-components-tiles.mjs.map +1 -1
  267. package/fesm2022/ngstarter-ui-components-timeline.mjs +418 -122
  268. package/fesm2022/ngstarter-ui-components-timeline.mjs.map +1 -1
  269. package/fesm2022/ngstarter-ui-components-timepicker.mjs +870 -508
  270. package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -1
  271. package/fesm2022/ngstarter-ui-components-timezone-select.mjs +651 -371
  272. package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -1
  273. package/fesm2022/ngstarter-ui-components-toolbar.mjs +727 -320
  274. package/fesm2022/ngstarter-ui-components-toolbar.mjs.map +1 -1
  275. package/fesm2022/ngstarter-ui-components-tooltip.mjs +601 -521
  276. package/fesm2022/ngstarter-ui-components-tooltip.mjs.map +1 -1
  277. package/fesm2022/ngstarter-ui-components-tree-select.mjs +1197 -434
  278. package/fesm2022/ngstarter-ui-components-tree-select.mjs.map +1 -1
  279. package/fesm2022/ngstarter-ui-components-tree.mjs +1821 -1262
  280. package/fesm2022/ngstarter-ui-components-tree.mjs.map +1 -1
  281. package/fesm2022/ngstarter-ui-components-upload.mjs +1059 -345
  282. package/fesm2022/ngstarter-ui-components-upload.mjs.map +1 -1
  283. package/fesm2022/ngstarter-ui-components-video-player.mjs +763 -533
  284. package/fesm2022/ngstarter-ui-components-video-player.mjs.map +1 -1
  285. package/fesm2022/ngstarter-ui-components-video-viewer.mjs +630 -229
  286. package/fesm2022/ngstarter-ui-components-video-viewer.mjs.map +1 -1
  287. package/fesm2022/ngstarter-ui-components-visual-builder.mjs +40 -17
  288. package/fesm2022/ngstarter-ui-components-visual-builder.mjs.map +1 -1
  289. package/fesm2022/ngstarter-ui-components-whiteboard.mjs +3039 -1803
  290. package/fesm2022/ngstarter-ui-components-whiteboard.mjs.map +1 -1
  291. package/fesm2022/ngstarter-ui-components.mjs +3 -5
  292. package/fesm2022/ngstarter-ui-components.mjs.map +1 -1
  293. package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs +264 -0
  294. package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs.map +1 -0
  295. package/fesm2022/plain-text-settings-BnxCxLhA.mjs +354 -0
  296. package/fesm2022/plain-text-settings-BnxCxLhA.mjs.map +1 -0
  297. package/fesm2022/quote-block.component-tRmrU97F.mjs +309 -0
  298. package/fesm2022/quote-block.component-tRmrU97F.mjs.map +1 -0
  299. package/fesm2022/table-block.component-BuzRRggv.mjs +1859 -0
  300. package/fesm2022/table-block.component-BuzRRggv.mjs.map +1 -0
  301. package/fesm2022/toggle-block-C5Jo2YDf.mjs +150 -0
  302. package/fesm2022/toggle-block-C5Jo2YDf.mjs.map +1 -0
  303. package/fesm2022/upload-status-tZ0x0BUB.mjs +107 -0
  304. package/fesm2022/upload-status-tZ0x0BUB.mjs.map +1 -0
  305. package/fesm2022/video-block.component-CpAXibm6.mjs +312 -0
  306. package/fesm2022/video-block.component-CpAXibm6.mjs.map +1 -0
  307. package/package.json +11 -10
  308. package/styles/_tokens.scss +1 -0
  309. package/types/ngstarter-ui-components-action-required.d.ts +34 -14
  310. package/types/ngstarter-ui-components-alert.d.ts +53 -44
  311. package/types/ngstarter-ui-components-announcement.d.ts +74 -53
  312. package/types/ngstarter-ui-components-autocomplete.d.ts +141 -84
  313. package/types/ngstarter-ui-components-avatar.d.ts +113 -66
  314. package/types/ngstarter-ui-components-badge.d.ts +73 -37
  315. package/types/ngstarter-ui-components-block-loader.d.ts +32 -20
  316. package/types/ngstarter-ui-components-bottom-sheet.d.ts +125 -132
  317. package/types/ngstarter-ui-components-breadcrumbs.d.ts +93 -88
  318. package/types/ngstarter-ui-components-button-toggle.d.ts +124 -54
  319. package/types/ngstarter-ui-components-button.d.ts +69 -27
  320. package/types/ngstarter-ui-components-calendar.d.ts +123 -71
  321. package/types/ngstarter-ui-components-card-overlay.d.ts +31 -19
  322. package/types/ngstarter-ui-components-card.d.ts +75 -71
  323. package/types/ngstarter-ui-components-carousel.d.ts +115 -69
  324. package/types/ngstarter-ui-components-checkbox.d.ts +183 -86
  325. package/types/ngstarter-ui-components-chips.d.ts +288 -195
  326. package/types/ngstarter-ui-components-code-highlighter.d.ts +71 -28
  327. package/types/ngstarter-ui-components-color-picker.d.ts +140 -89
  328. package/types/ngstarter-ui-components-color-scheme.d.ts +43 -52
  329. package/types/ngstarter-ui-components-color-switcher.d.ts +46 -26
  330. package/types/ngstarter-ui-components-command-bar.d.ts +40 -26
  331. package/types/ngstarter-ui-components-comment-editor.d.ts +311 -235
  332. package/types/ngstarter-ui-components-comparison-slider.d.ts +41 -40
  333. package/types/ngstarter-ui-components-confirm.d.ts +24 -29
  334. package/types/ngstarter-ui-components-content-editor.d.ts +1482 -998
  335. package/types/ngstarter-ui-components-cookie-popup.d.ts +43 -38
  336. package/types/ngstarter-ui-components-core.d.ts +513 -467
  337. package/types/ngstarter-ui-components-country-select.d.ts +170 -97
  338. package/types/ngstarter-ui-components-crop.d.ts +67 -52
  339. package/types/ngstarter-ui-components-currency-select.d.ts +127 -90
  340. package/types/ngstarter-ui-components-data-view.d.ts +811 -567
  341. package/types/ngstarter-ui-components-date-format-select.d.ts +90 -58
  342. package/types/ngstarter-ui-components-datepicker.d.ts +589 -373
  343. package/types/ngstarter-ui-components-dialog.d.ts +138 -116
  344. package/types/ngstarter-ui-components-digit-roller.d.ts +228 -131
  345. package/types/ngstarter-ui-components-divider.d.ts +29 -17
  346. package/types/ngstarter-ui-components-drawer.d.ts +39 -30
  347. package/types/ngstarter-ui-components-emoji-picker.d.ts +69 -47
  348. package/types/ngstarter-ui-components-empty-state.d.ts +20 -28
  349. package/types/ngstarter-ui-components-events.d.ts +73 -57
  350. package/types/ngstarter-ui-components-expand.d.ts +55 -25
  351. package/types/ngstarter-ui-components-expansion.d.ts +93 -64
  352. package/types/ngstarter-ui-components-file-type.d.ts +53 -27
  353. package/types/ngstarter-ui-components-filter-builder.d.ts +131 -100
  354. package/types/ngstarter-ui-components-form-builder.d.ts +1094 -881
  355. package/types/ngstarter-ui-components-form-field.d.ts +116 -105
  356. package/types/ngstarter-ui-components-gauge.d.ts +32 -20
  357. package/types/ngstarter-ui-components-grid.d.ts +66 -50
  358. package/types/ngstarter-ui-components-guided-tour.d.ts +250 -222
  359. package/types/ngstarter-ui-components-headless-editor.d.ts +708 -658
  360. package/types/ngstarter-ui-components-headless-stepper.d.ts +84 -64
  361. package/types/ngstarter-ui-components-icon.d.ts +39 -38
  362. package/types/ngstarter-ui-components-image-designer.d.ts +422 -341
  363. package/types/ngstarter-ui-components-image-placeholder.d.ts +5 -8
  364. package/types/ngstarter-ui-components-image-resizer.d.ts +40 -33
  365. package/types/ngstarter-ui-components-image-viewer.d.ts +67 -54
  366. package/types/ngstarter-ui-components-image-zoom-viewer.d.ts +29 -33
  367. package/types/ngstarter-ui-components-incidents.d.ts +97 -104
  368. package/types/ngstarter-ui-components-inline-text-edit.d.ts +54 -39
  369. package/types/ngstarter-ui-components-input-mask.d.ts +54 -34
  370. package/types/ngstarter-ui-components-input-validator.d.ts +7 -11
  371. package/types/ngstarter-ui-components-input.d.ts +82 -54
  372. package/types/ngstarter-ui-components-kanban-board.d.ts +76 -63
  373. package/types/ngstarter-ui-components-kbd.d.ts +8 -12
  374. package/types/ngstarter-ui-components-layout.d.ts +131 -87
  375. package/types/ngstarter-ui-components-list.d.ts +123 -88
  376. package/types/ngstarter-ui-components-logo.d.ts +21 -21
  377. package/types/ngstarter-ui-components-marquee.d.ts +41 -34
  378. package/types/ngstarter-ui-components-menu.d.ts +329 -221
  379. package/types/ngstarter-ui-components-micro-chart.d.ts +385 -186
  380. package/types/ngstarter-ui-components-navigation.d.ts +186 -125
  381. package/types/ngstarter-ui-components-notifications.d.ts +104 -89
  382. package/types/ngstarter-ui-components-number-input.d.ts +138 -96
  383. package/types/ngstarter-ui-components-option.d.ts +102 -68
  384. package/types/ngstarter-ui-components-overlay.d.ts +7 -12
  385. package/types/ngstarter-ui-components-page-loading-bar.d.ts +23 -20
  386. package/types/ngstarter-ui-components-paginator.d.ts +171 -129
  387. package/types/ngstarter-ui-components-password-strength.d.ts +217 -102
  388. package/types/ngstarter-ui-components-pdf-builder.d.ts +717 -649
  389. package/types/ngstarter-ui-components-pdf-signer.d.ts +202 -142
  390. package/types/ngstarter-ui-components-pdf-viewer.d.ts +544 -385
  391. package/types/ngstarter-ui-components-phone-input.d.ts +175 -115
  392. package/types/ngstarter-ui-components-pin-input.d.ts +83 -45
  393. package/types/ngstarter-ui-components-popover.d.ts +128 -89
  394. package/types/ngstarter-ui-components-progress-bar.d.ts +49 -30
  395. package/types/ngstarter-ui-components-radio-card.d.ts +50 -34
  396. package/types/ngstarter-ui-components-radio.d.ts +100 -47
  397. package/types/ngstarter-ui-components-rail-nav.d.ts +36 -29
  398. package/types/ngstarter-ui-components-resizable-container.d.ts +30 -25
  399. package/types/ngstarter-ui-components-screen-loader.d.ts +38 -32
  400. package/types/ngstarter-ui-components-scroll-spy.d.ts +56 -60
  401. package/types/ngstarter-ui-components-scrollbar-area.d.ts +116 -86
  402. package/types/ngstarter-ui-components-segmented.d.ts +93 -61
  403. package/types/ngstarter-ui-components-select.d.ts +366 -266
  404. package/types/ngstarter-ui-components-side-panel.d.ts +59 -40
  405. package/types/ngstarter-ui-components-sidebar.d.ts +208 -154
  406. package/types/ngstarter-ui-components-sidenav.d.ts +136 -78
  407. package/types/ngstarter-ui-components-signature-pad.d.ts +165 -92
  408. package/types/ngstarter-ui-components-skeleton.d.ts +18 -17
  409. package/types/ngstarter-ui-components-slide-toggle.d.ts +113 -44
  410. package/types/ngstarter-ui-components-slider.d.ts +123 -82
  411. package/types/ngstarter-ui-components-snack-bar.d.ts +126 -134
  412. package/types/ngstarter-ui-components-sort.d.ts +99 -63
  413. package/types/ngstarter-ui-components-spinner.d.ts +49 -27
  414. package/types/ngstarter-ui-components-splash-screen.d.ts +34 -29
  415. package/types/ngstarter-ui-components-split.d.ts +276 -195
  416. package/types/ngstarter-ui-components-step-tracker.d.ts +102 -83
  417. package/types/ngstarter-ui-components-stepper.d.ts +57 -43
  418. package/types/ngstarter-ui-components-suggestions.d.ts +41 -28
  419. package/types/ngstarter-ui-components-tab-panel.d.ts +110 -83
  420. package/types/ngstarter-ui-components-table.d.ts +256 -228
  421. package/types/ngstarter-ui-components-tabs.d.ts +231 -138
  422. package/types/ngstarter-ui-components-thumbnail-maker.d.ts +40 -34
  423. package/types/ngstarter-ui-components-tiles.d.ts +166 -104
  424. package/types/ngstarter-ui-components-timeline.d.ts +45 -57
  425. package/types/ngstarter-ui-components-timepicker.d.ts +166 -111
  426. package/types/ngstarter-ui-components-timezone-select.d.ts +110 -70
  427. package/types/ngstarter-ui-components-toolbar.d.ts +89 -72
  428. package/types/ngstarter-ui-components-tooltip.d.ts +89 -52
  429. package/types/ngstarter-ui-components-tree-select.d.ts +182 -105
  430. package/types/ngstarter-ui-components-tree.d.ts +355 -229
  431. package/types/ngstarter-ui-components-upload.d.ts +216 -131
  432. package/types/ngstarter-ui-components-video-player.d.ts +130 -67
  433. package/types/ngstarter-ui-components-video-viewer.d.ts +140 -91
  434. package/types/ngstarter-ui-components-visual-builder.d.ts +5 -8
  435. package/types/ngstarter-ui-components-whiteboard.d.ts +412 -339
  436. package/types/ngstarter-ui-components.d.ts +2 -2
  437. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-8OmuepvH.mjs +0 -35
  438. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-8OmuepvH.mjs.map +0 -1
  439. package/fesm2022/ngstarter-ui-components-content-editor-callout-block-Dp5tISk3.mjs +0 -26
  440. package/fesm2022/ngstarter-ui-components-content-editor-callout-block-Dp5tISk3.mjs.map +0 -1
  441. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-BbBs-R_y.mjs +0 -220
  442. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-BbBs-R_y.mjs.map +0 -1
  443. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs +0 -99
  444. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs.map +0 -1
  445. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs +0 -40
  446. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs.map +0 -1
  447. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-DGCCeU-Y.mjs +0 -375
  448. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-DGCCeU-Y.mjs.map +0 -1
  449. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-BJfRgtaA.mjs +0 -80
  450. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-BJfRgtaA.mjs.map +0 -1
  451. package/fesm2022/ngstarter-ui-components-content-editor-grid-block-C_L7hF2G.mjs +0 -65
  452. package/fesm2022/ngstarter-ui-components-content-editor-grid-block-C_L7hF2G.mjs.map +0 -1
  453. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-durrPUhm.mjs +0 -137
  454. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-durrPUhm.mjs.map +0 -1
  455. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-BoL1jZpT.mjs +0 -113
  456. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-BoL1jZpT.mjs.map +0 -1
  457. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-ChZpgXO5.mjs +0 -235
  458. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-ChZpgXO5.mjs.map +0 -1
  459. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-DwyNFnII.mjs +0 -117
  460. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-DwyNFnII.mjs.map +0 -1
  461. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BWpJv6CO.mjs +0 -4464
  462. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BWpJv6CO.mjs.map +0 -1
  463. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-BvNvkqTO.mjs +0 -132
  464. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-BvNvkqTO.mjs.map +0 -1
  465. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-tgNKltfK.mjs +0 -171
  466. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-tgNKltfK.mjs.map +0 -1
  467. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-BcAlqmh8.mjs +0 -1653
  468. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-BcAlqmh8.mjs.map +0 -1
  469. package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-S474I51r.mjs +0 -20
  470. package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-S474I51r.mjs.map +0 -1
  471. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs +0 -19
  472. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs.map +0 -1
  473. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-Dj82fxTI.mjs +0 -134
  474. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-Dj82fxTI.mjs.map +0 -1
  475. package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs +0 -159
  476. package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs.map +0 -1
@@ -1,772 +1,1022 @@
1
- import { isPlatformBrowser } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { InjectionToken, input, output, signal, computed, inject, PLATFORM_ID, ElementRef, DestroyRef, effect, untracked, afterEveryRender, ChangeDetectionStrategy, Component, contentChildren, forwardRef, Directive } from '@angular/core';
4
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, InjectionToken, PLATFORM_ID, afterEveryRender, computed, contentChildren, effect, forwardRef, inject, input, output, signal, untracked } from "@angular/core";
3
+ import { isPlatformBrowser } from "@angular/common";
5
4
  let staticCapable;
6
5
  let prefersReducedMotion;
7
6
  function isStaticallyCapable() {
8
- if (staticCapable !== undefined) {
9
- return staticCapable;
10
- }
11
- staticCapable =
12
- typeof window !== 'undefined' &&
13
- typeof window.CSS !== 'undefined' &&
14
- typeof window.Element !== 'undefined' &&
15
- typeof window.Element.prototype.animate === 'function' &&
16
- typeof window.CSS.registerProperty === 'function' &&
17
- window.CSS.supports('width', 'calc(mod(2, 10) * 1px)') &&
18
- supportsLinearEasing();
19
- return staticCapable;
7
+ if (staticCapable !== void 0) return staticCapable;
8
+ staticCapable = typeof window !== "undefined" && typeof window.CSS !== "undefined" && typeof window.Element !== "undefined" && typeof window.Element.prototype.animate === "function" && typeof window.CSS.registerProperty === "function" && window.CSS.supports("width", "calc(mod(2, 10) * 1px)") && supportsLinearEasing();
9
+ return staticCapable;
20
10
  }
21
11
  function getPrefersReducedMotion() {
22
- if (prefersReducedMotion !== undefined) {
23
- return prefersReducedMotion;
24
- }
25
- if (typeof window === 'undefined' || !window.matchMedia) {
26
- return false;
27
- }
28
- const mediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
29
- prefersReducedMotion = mediaQuery.matches;
30
- if (typeof mediaQuery.addEventListener === 'function') {
31
- mediaQuery.addEventListener('change', (event) => {
32
- prefersReducedMotion = event.matches;
33
- });
34
- }
35
- return prefersReducedMotion;
36
- }
37
- function resetDigitRollerCapabilityCache() {
38
- staticCapable = undefined;
39
- prefersReducedMotion = undefined;
12
+ if (prefersReducedMotion !== void 0) return prefersReducedMotion;
13
+ if (typeof window === "undefined" || !window.matchMedia) return false;
14
+ const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
15
+ prefersReducedMotion = mediaQuery.matches;
16
+ if (typeof mediaQuery.addEventListener === "function") mediaQuery.addEventListener("change", (event) => {
17
+ prefersReducedMotion = event.matches;
18
+ });
19
+ return prefersReducedMotion;
40
20
  }
41
21
  function canAnimateDigitRoller(options = {}) {
42
- if (!isStaticallyCapable()) {
43
- return false;
44
- }
45
- return options.respectMotionPreference === false || !getPrefersReducedMotion();
22
+ if (!isStaticallyCapable()) return false;
23
+ return options.respectMotionPreference === false || !getPrefersReducedMotion();
46
24
  }
47
25
  function supportsLinearEasing() {
48
- try {
49
- document.createElement('div').animate({ opacity: 0 }, { easing: 'linear(0, 1)' });
50
- return true;
51
- }
52
- catch {
53
- return false;
54
- }
26
+ try {
27
+ document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
28
+ return true;
29
+ } catch {
30
+ return false;
31
+ }
55
32
  }
56
-
57
- const PRE_TYPES = new Set(['currency', 'literal', 'minusSign', 'plusSign', 'nan', 'infinity']);
58
- const POST_TYPES = new Set(['percentSign', 'unit']);
59
- const formatterCache = new Map();
33
+ const PRE_TYPES = /* @__PURE__ */ new Set([
34
+ "currency",
35
+ "literal",
36
+ "minusSign",
37
+ "plusSign",
38
+ "nan",
39
+ "infinity"
40
+ ]);
41
+ const POST_TYPES = /* @__PURE__ */ new Set(["percentSign", "unit"]);
42
+ const formatterCache = /* @__PURE__ */ new Map();
60
43
  function getCachedFormatter(locales, options) {
61
- const key = JSON.stringify(locales) + ':' + JSON.stringify(options);
62
- let formatter = formatterCache.get(key);
63
- if (!formatter) {
64
- formatter = new Intl.NumberFormat(locales, options);
65
- formatterCache.set(key, formatter);
66
- }
67
- return formatter;
44
+ const key = JSON.stringify(locales) + ":" + JSON.stringify(options);
45
+ let formatter = formatterCache.get(key);
46
+ if (!formatter) {
47
+ formatter = new Intl.NumberFormat(locales, options);
48
+ formatterCache.set(key, formatter);
49
+ }
50
+ return formatter;
68
51
  }
69
52
  function getDigitRollerGlyphs(locales, options = {}) {
70
- const formatter = getCachedFormatter(locales, {
71
- numberingSystem: options.numberingSystem,
72
- useGrouping: false,
73
- maximumFractionDigits: 0,
74
- });
75
- return Array.from({ length: 10 }, (_, value) => ({
76
- value,
77
- glyph: formatter.format(value),
78
- }));
53
+ const formatter = getCachedFormatter(locales, {
54
+ numberingSystem: options.numberingSystem,
55
+ useGrouping: false,
56
+ maximumFractionDigits: 0
57
+ });
58
+ return Array.from({ length: 10 }, (_, value) => ({
59
+ value,
60
+ glyph: formatter.format(value)
61
+ }));
79
62
  }
80
63
  function getDigitValueMap(locales, options = {}) {
81
- return new Map(getDigitRollerGlyphs(locales, options).map(({ glyph, value }) => [glyph, value]));
64
+ return new Map(getDigitRollerGlyphs(locales, options).map(({ glyph, value }) => [glyph, value]));
82
65
  }
83
- function formatDigitRollerValue(value, options = {}, locales, prefix = '', suffix = '') {
84
- const formatter = getCachedFormatter(locales, options);
85
- const digitValues = getDigitValueMap(locales, options);
86
- const parts = formatter.formatToParts(value);
87
- const pre = [];
88
- const rawInteger = [];
89
- const fraction = [];
90
- const post = [];
91
- let seenInteger = false;
92
- let seenDecimal = false;
93
- for (const part of parts) {
94
- if (part.type === 'integer' || part.type === 'group') {
95
- seenInteger = true;
96
- rawInteger.push(part);
97
- }
98
- else if (part.type === 'decimal' || part.type === 'fraction') {
99
- seenDecimal = true;
100
- fraction.push({ type: part.type, value: part.value, key: '' });
101
- }
102
- else if (!seenInteger && PRE_TYPES.has(part.type)) {
103
- pre.push({ type: part.type, value: part.value, key: `pre-${pre.length}` });
104
- }
105
- else if (seenInteger && POST_TYPES.has(part.type)) {
106
- post.push({ type: part.type, value: part.value, key: `post-${post.length}` });
107
- }
108
- else if (seenDecimal || seenInteger) {
109
- post.push({ type: part.type, value: part.value, key: `post-${post.length}` });
110
- }
111
- else {
112
- pre.push({ type: part.type, value: part.value, key: `pre-${pre.length}` });
113
- }
114
- }
115
- if (prefix) {
116
- pre.unshift({ type: 'prefix', value: prefix, key: '__prefix' });
117
- }
118
- if (suffix) {
119
- post.push({ type: 'suffix', value: suffix, key: '__suffix' });
120
- }
121
- const splitInteger = [];
122
- for (const part of rawInteger) {
123
- if (part.type === 'integer') {
124
- for (const char of part.value) {
125
- splitInteger.push({ type: 'integer', value: char });
126
- }
127
- }
128
- else {
129
- splitInteger.push(part);
130
- }
131
- }
132
- let digitIndex = 0;
133
- const reversedInteger = [];
134
- for (let i = splitInteger.length - 1; i >= 0; i--) {
135
- const part = splitInteger[i];
136
- if (part.type === 'integer') {
137
- reversedInteger.push({
138
- type: 'integer',
139
- value: part.value,
140
- key: `i${digitIndex}`,
141
- numericValue: digitValues.get(part.value) ?? Number(part.value),
142
- });
143
- digitIndex++;
144
- }
145
- else {
146
- reversedInteger.push({ type: 'group', value: part.value, key: `g${digitIndex}` });
147
- }
148
- }
149
- let fractionDigitIndex = 0;
150
- const keyedFraction = [];
151
- for (const part of fraction) {
152
- if (part.type === 'fraction') {
153
- for (const char of part.value) {
154
- keyedFraction.push({
155
- type: 'fraction',
156
- value: char,
157
- key: `f${++fractionDigitIndex}`,
158
- numericValue: digitValues.get(char) ?? Number(char),
159
- });
160
- }
161
- }
162
- else {
163
- keyedFraction.push({ ...part, key: 'decimal' });
164
- }
165
- }
166
- return { pre, integer: reversedInteger.reverse(), fraction: keyedFraction, post };
66
+ function formatDigitRollerValue(value, options = {}, locales, prefix = "", suffix = "") {
67
+ const formatter = getCachedFormatter(locales, options);
68
+ const digitValues = getDigitValueMap(locales, options);
69
+ const parts = formatter.formatToParts(value);
70
+ const pre = [];
71
+ const rawInteger = [];
72
+ const fraction = [];
73
+ const post = [];
74
+ let seenInteger = false;
75
+ let seenDecimal = false;
76
+ for (const part of parts) if (part.type === "integer" || part.type === "group") {
77
+ seenInteger = true;
78
+ rawInteger.push(part);
79
+ } else if (part.type === "decimal" || part.type === "fraction") {
80
+ seenDecimal = true;
81
+ fraction.push({
82
+ type: part.type,
83
+ value: part.value,
84
+ key: ""
85
+ });
86
+ } else if (!seenInteger && PRE_TYPES.has(part.type)) pre.push({
87
+ type: part.type,
88
+ value: part.value,
89
+ key: `pre-${pre.length}`
90
+ });
91
+ else if (seenInteger && POST_TYPES.has(part.type)) post.push({
92
+ type: part.type,
93
+ value: part.value,
94
+ key: `post-${post.length}`
95
+ });
96
+ else if (seenDecimal || seenInteger) post.push({
97
+ type: part.type,
98
+ value: part.value,
99
+ key: `post-${post.length}`
100
+ });
101
+ else pre.push({
102
+ type: part.type,
103
+ value: part.value,
104
+ key: `pre-${pre.length}`
105
+ });
106
+ if (prefix) pre.unshift({
107
+ type: "prefix",
108
+ value: prefix,
109
+ key: "__prefix"
110
+ });
111
+ if (suffix) post.push({
112
+ type: "suffix",
113
+ value: suffix,
114
+ key: "__suffix"
115
+ });
116
+ const splitInteger = [];
117
+ for (const part of rawInteger) if (part.type === "integer") for (const char of part.value) splitInteger.push({
118
+ type: "integer",
119
+ value: char
120
+ });
121
+ else splitInteger.push(part);
122
+ let digitIndex = 0;
123
+ const reversedInteger = [];
124
+ for (let i = splitInteger.length - 1; i >= 0; i--) {
125
+ const part = splitInteger[i];
126
+ if (part.type === "integer") {
127
+ reversedInteger.push({
128
+ type: "integer",
129
+ value: part.value,
130
+ key: `i${digitIndex}`,
131
+ numericValue: digitValues.get(part.value) ?? Number(part.value)
132
+ });
133
+ digitIndex++;
134
+ } else reversedInteger.push({
135
+ type: "group",
136
+ value: part.value,
137
+ key: `g${digitIndex}`
138
+ });
139
+ }
140
+ let fractionDigitIndex = 0;
141
+ const keyedFraction = [];
142
+ for (const part of fraction) if (part.type === "fraction") for (const char of part.value) keyedFraction.push({
143
+ type: "fraction",
144
+ value: char,
145
+ key: `f${++fractionDigitIndex}`,
146
+ numericValue: digitValues.get(char) ?? Number(char)
147
+ });
148
+ else keyedFraction.push({
149
+ ...part,
150
+ key: "decimal"
151
+ });
152
+ return {
153
+ pre,
154
+ integer: reversedInteger.reverse(),
155
+ fraction: keyedFraction,
156
+ post
157
+ };
167
158
  }
168
-
169
- const DIGIT_ROLLER_GROUP = new InjectionToken('DIGIT_ROLLER_GROUP');
170
-
159
+ const DIGIT_ROLLER_GROUP = new InjectionToken("DIGIT_ROLLER_GROUP");
171
160
  const DIGIT_ROLLER_EMPTY_FORMATTED = {
172
- pre: [],
173
- integer: [],
174
- fraction: [],
175
- post: [],
161
+ pre: [],
162
+ integer: [],
163
+ fraction: [],
164
+ post: []
176
165
  };
177
-
178
- const SPIN_EASING = 'linear(0,.005,.019,.039,.066,.096,.129,.165,.202,.24,.278,.316,.354,.39,.426,.461,' +
179
- '.494,.526,.557,.586,.614,.64,.665,.689,.711,.731,.751,.769,.786,.802,.817,.831,.844,' +
180
- '.856,.867,.877,.887,.896,.904,.912,.919,.925,.931,.937,.942,.947,.951,.955,.959,.962,' +
181
- '.965,.968,.971,.973,.976,.978,.98,.981,.983,.984,.986,.987,.988,.989,.99,.991,.992,' +
182
- '.992,.993,.994,.994,.995,.995,.996,.996,.9963,.9967,.9969,.9972,.9975,.9977,.9979,' +
183
- '.9981,.9982,.9984,.9985,.9987,.9988,.9989,1)';
166
+ const SPIN_EASING = "linear(0,.005,.019,.039,.066,.096,.129,.165,.202,.24,.278,.316,.354,.39,.426,.461,.494,.526,.557,.586,.614,.64,.665,.689,.711,.731,.751,.769,.786,.802,.817,.831,.844,.856,.867,.877,.887,.896,.904,.912,.919,.925,.931,.937,.942,.947,.951,.955,.959,.962,.965,.968,.971,.973,.976,.978,.98,.981,.983,.984,.986,.987,.988,.989,.99,.991,.992,.992,.993,.994,.994,.995,.995,.996,.996,.9963,.9967,.9969,.9972,.9975,.9977,.9979,.9981,.9982,.9984,.9985,.9987,.9988,.9989,1)";
184
167
  const EASING_PRESETS = {
185
- default: SPIN_EASING,
186
- spring: SPIN_EASING,
187
- overshoot: 'cubic-bezier(0.34, 1.56, 0.64, 1)',
168
+ default: SPIN_EASING,
169
+ spring: SPIN_EASING,
170
+ overshoot: "cubic-bezier(0.34, 1.56, 0.64, 1)"
188
171
  };
189
- class DigitRoller {
190
- value = input.required(/* @ts-ignore */
191
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
192
- format = input({}, /* @ts-ignore */
193
- ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
194
- locales = input(undefined, /* @ts-ignore */
195
- ...(ngDevMode ? [{ debugName: "locales" }] : /* istanbul ignore next */ []));
196
- prefix = input('', /* @ts-ignore */
197
- ...(ngDevMode ? [{ debugName: "prefix" }] : /* istanbul ignore next */ []));
198
- suffix = input('', /* @ts-ignore */
199
- ...(ngDevMode ? [{ debugName: "suffix" }] : /* istanbul ignore next */ []));
200
- animated = input(true, /* @ts-ignore */
201
- ...(ngDevMode ? [{ debugName: "animated" }] : /* istanbul ignore next */ []));
202
- duration = input(undefined, /* @ts-ignore */
203
- ...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
204
- opacityDuration = input(undefined, /* @ts-ignore */
205
- ...(ngDevMode ? [{ debugName: "opacityDuration" }] : /* istanbul ignore next */ []));
206
- transformTiming = input(undefined, /* @ts-ignore */
207
- ...(ngDevMode ? [{ debugName: "transformTiming" }] : /* istanbul ignore next */ []));
208
- spinTiming = input(undefined, /* @ts-ignore */
209
- ...(ngDevMode ? [{ debugName: "spinTiming" }] : /* istanbul ignore next */ []));
210
- opacityTiming = input(undefined, /* @ts-ignore */
211
- ...(ngDevMode ? [{ debugName: "opacityTiming" }] : /* istanbul ignore next */ []));
212
- spinEasing = input(undefined, /* @ts-ignore */
213
- ...(ngDevMode ? [{ debugName: "spinEasing" }] : /* istanbul ignore next */ []));
214
- flipEasing = input(undefined, /* @ts-ignore */
215
- ...(ngDevMode ? [{ debugName: "flipEasing" }] : /* istanbul ignore next */ []));
216
- trend = input(undefined, /* @ts-ignore */
217
- ...(ngDevMode ? [{ debugName: "trend" }] : /* istanbul ignore next */ []));
218
- continuous = input(false, /* @ts-ignore */
219
- ...(ngDevMode ? [{ debugName: "continuous" }] : /* istanbul ignore next */ []));
220
- digits = input({}, /* @ts-ignore */
221
- ...(ngDevMode ? [{ debugName: "digits" }] : /* istanbul ignore next */ []));
222
- respectMotionPreference = input(true, /* @ts-ignore */
223
- ...(ngDevMode ? [{ debugName: "respectMotionPreference" }] : /* istanbul ignore next */ []));
224
- stagger = input(0, /* @ts-ignore */
225
- ...(ngDevMode ? [{ debugName: "stagger" }] : /* istanbul ignore next */ []));
226
- colorOnIncrease = input(undefined, /* @ts-ignore */
227
- ...(ngDevMode ? [{ debugName: "colorOnIncrease" }] : /* istanbul ignore next */ []));
228
- colorOnDecrease = input(undefined, /* @ts-ignore */
229
- ...(ngDevMode ? [{ debugName: "colorOnDecrease" }] : /* istanbul ignore next */ []));
230
- animationsStart = output();
231
- animationsFinish = output();
232
- data = signal(DIGIT_ROLLER_EMPTY_FORMATTED, /* @ts-ignore */
233
- ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
234
- digitGlyphs = computed(() => getDigitRollerGlyphs(this.locales(), this.format()), /* @ts-ignore */
235
- ...(ngDevMode ? [{ debugName: "digitGlyphs" }] : /* istanbul ignore next */ []));
236
- formattedPlainText = computed(() => new Intl.NumberFormat(this.locales(), this.format()).format(this.value()), /* @ts-ignore */
237
- ...(ngDevMode ? [{ debugName: "formattedPlainText" }] : /* istanbul ignore next */ []));
238
- effectiveSettings = computed(() => {
239
- const duration = this.duration() ?? 900;
240
- return {
241
- duration,
242
- opacityDuration: this.opacityDuration() ?? 450,
243
- spinEasing: this.resolveEasing(this.spinEasing()),
244
- flipEasing: this.resolveEasing(this.flipEasing()),
245
- transformTiming: this.transformTiming(),
246
- spinTiming: this.spinTiming(),
247
- opacityTiming: this.opacityTiming(),
248
- };
249
- }, /* @ts-ignore */
250
- ...(ngDevMode ? [{ debugName: "effectiveSettings" }] : /* istanbul ignore next */ []));
251
- platformId = inject(PLATFORM_ID);
252
- elementRef = inject(ElementRef);
253
- destroyRef = inject(DestroyRef);
254
- group = inject(DIGIT_ROLLER_GROUP, { optional: true });
255
- prevRects = new Map();
256
- prevInnerHTML = new Map();
257
- prevDigitD = new Map();
258
- prevDigitCurrent = new Map();
259
- prevDigitValues = new Map();
260
- prevDigitOrder = [];
261
- prevNumberLeft = 0;
262
- prevNumberWidth = 0;
263
- prevNumericValue = 0;
264
- animCount = 0;
265
- pending = false;
266
- destroyed = false;
267
- hasRenderedValue = false;
268
- liveAnimations = [];
269
- spinCount = new Map();
270
- animationsFinishAbort;
271
- pendingCanAnimate = false;
272
- pendingHostFont = '';
273
- pendingHostColor = '';
274
- pendingKeyedEls = [];
275
- pendingNumberRect = null;
276
- pendingNumberOffsetWidth = 0;
277
- isNearViewport = true;
278
- viewportObserver;
279
- constructor() {
280
- this.destroyRef.onDestroy(() => {
281
- this.destroyed = true;
282
- this.animationsFinishAbort?.abort();
283
- this.viewportObserver?.disconnect();
284
- for (const animation of this.liveAnimations) {
285
- try {
286
- animation.cancel();
287
- }
288
- catch {
289
- /* Animation cancellation can throw AbortError in some browsers. */
290
- }
291
- }
292
- this.liveAnimations = [];
293
- });
294
- effect(() => {
295
- const value = this.value();
296
- const format = this.format();
297
- const locales = this.locales();
298
- const prefix = this.prefix();
299
- const suffix = this.suffix();
300
- if (!this.hasRenderedValue) {
301
- untracked(() => this.data.set(formatDigitRollerValue(value, format, locales, prefix, suffix)));
302
- this.prevNumericValue = value;
303
- this.hasRenderedValue = true;
304
- return;
305
- }
306
- const canAnimateThisUpdate = isPlatformBrowser(this.platformId) && this.animated() && this.canAnimateNow();
307
- if (canAnimateThisUpdate) {
308
- const handledByGroup = this.group?.requestGroupedUpdate(this, () => {
309
- untracked(() => this.data.set(formatDigitRollerValue(value, format, locales, prefix, suffix)));
310
- });
311
- if (handledByGroup) {
312
- return;
313
- }
314
- this.snapshot();
315
- untracked(() => this.data.set(formatDigitRollerValue(value, format, locales, prefix, suffix)));
316
- this.pending = true;
317
- }
318
- else {
319
- untracked(() => this.data.set(formatDigitRollerValue(value, format, locales, prefix, suffix)));
320
- this.prevNumericValue = value;
321
- }
322
- });
323
- if (isPlatformBrowser(this.platformId)) {
324
- if (typeof IntersectionObserver !== 'undefined') {
325
- this.viewportObserver = new IntersectionObserver((entries) => {
326
- this.isNearViewport = entries[entries.length - 1].isIntersecting;
327
- }, { rootMargin: '240px' });
328
- this.viewportObserver.observe(this.elementRef.nativeElement);
329
- }
330
- afterEveryRender({
331
- earlyRead: () => {
332
- if (this.pending) {
333
- this.readAnimationState();
334
- }
335
- },
336
- write: () => {
337
- if (this.pending) {
338
- this.pending = false;
339
- this.fireAnimations();
340
- }
341
- },
342
- });
343
- }
344
- }
345
- canGroupAnimateNow() {
346
- return isPlatformBrowser(this.platformId) && this.animated() && this.canAnimateNow();
347
- }
348
- prepareGroupedUpdate() {
349
- this.snapshot();
350
- }
351
- queueGroupedAnimation() {
352
- this.pending = true;
353
- }
354
- snapshot() {
355
- const host = this.elementRef.nativeElement;
356
- this.prevRects.clear();
357
- this.prevInnerHTML.clear();
358
- this.prevDigitD.clear();
359
- this.prevDigitCurrent.clear();
360
- this.prevDigitValues.clear();
361
- this.prevDigitOrder = [];
362
- const number = host.querySelector('.ngs-digit-roller__number');
363
- if (number) {
364
- const numberRect = number.getBoundingClientRect();
365
- this.prevNumberLeft = numberRect.left;
366
- this.prevNumberWidth = numberRect.width;
367
- }
368
- untracked(() => {
369
- [...this.data().integer, ...this.data().fraction].forEach((part) => {
370
- if (part.type === 'integer' || part.type === 'fraction') {
371
- this.prevDigitValues.set(part.key, this.getPartDigitValue(part));
372
- this.prevDigitOrder.push(part.key);
373
- }
374
- });
375
- });
376
- host.querySelectorAll('[data-key]').forEach((element) => {
377
- const key = element.getAttribute('data-key');
378
- this.prevRects.set(key, element.getBoundingClientRect());
379
- this.prevInnerHTML.set(key, element.innerHTML);
380
- if (element.classList.contains('ngs-digit-roller__digit')) {
381
- const styles = getComputedStyle(element);
382
- this.prevDigitD.set(key, styles.getPropertyValue('--_ngs-digit-roller-d').trim() || '0');
383
- this.prevDigitCurrent.set(key, (element.style.getPropertyValue('--_ngs-digit-roller-current') || '0').trim());
384
- }
385
- });
386
- }
387
- readAnimationState() {
388
- if (this.destroyed || !this.canAnimateNow()) {
389
- this.pendingCanAnimate = false;
390
- return;
391
- }
392
- this.pendingCanAnimate = true;
393
- const host = this.elementRef.nativeElement;
394
- const hostStyles = getComputedStyle(host);
395
- this.pendingHostFont = hostStyles.font;
396
- this.pendingHostColor = hostStyles.color;
397
- this.pendingKeyedEls = [];
398
- host.querySelectorAll('[data-key]').forEach((element) => {
399
- this.pendingKeyedEls.push({
400
- el: element,
401
- key: element.getAttribute('data-key'),
402
- newRect: element.getBoundingClientRect(),
403
- });
404
- });
405
- const number = host.querySelector('.ngs-digit-roller__number');
406
- this.pendingNumberRect = number ? number.getBoundingClientRect() : null;
407
- this.pendingNumberOffsetWidth = number ? number.offsetWidth : 0;
408
- }
409
- fireAnimations() {
410
- if (this.destroyed) {
411
- return;
412
- }
413
- const host = this.elementRef.nativeElement;
414
- const newNumericValue = untracked(() => this.value());
415
- if (!this.pendingCanAnimate) {
416
- this.prevNumericValue = newNumericValue;
417
- return;
418
- }
419
- const settings = this.effectiveSettings();
420
- const duration = settings.duration;
421
- const opacityDuration = settings.opacityDuration;
422
- const trend = this.resolveTrend(this.prevNumericValue, newNumericValue);
423
- const staggerMs = this.stagger();
424
- const baseTransformTiming = settings.transformTiming ?? {
425
- duration,
426
- easing: settings.flipEasing,
427
- };
428
- const spinOptions = {
429
- ...baseTransformTiming,
430
- easing: settings.spinEasing,
431
- ...(settings.spinTiming ?? {}),
432
- duration: settings.spinTiming?.duration ?? baseTransformTiming.duration,
433
- fill: 'none',
434
- composite: 'accumulate',
435
- };
436
- const flipOptions = {
437
- ...baseTransformTiming,
438
- duration: baseTransformTiming.duration,
439
- fill: 'none',
440
- composite: 'accumulate',
441
- };
442
- const fadeOptions = {
443
- duration: opacityDuration,
444
- easing: 'ease-out',
445
- fill: 'none',
446
- composite: 'accumulate',
447
- ...(settings.opacityTiming ?? {}),
448
- };
449
- const continuousStartPosition = this.continuous() && duration > 0 && trend !== 0 ? this.getContinuousStartPosition() : undefined;
450
- const batch = [];
451
- const newKeys = new Set();
452
- let elementIndex = 0;
453
- const number = host.querySelector('.ngs-digit-roller__number');
454
- for (const { el, key, newRect } of this.pendingKeyedEls) {
455
- newKeys.add(key);
456
- const prevRect = this.prevRects.get(key);
457
- const staggerDelay = staggerMs > 0 ? elementIndex * staggerMs : 0;
458
- elementIndex++;
459
- if (el.classList.contains('ngs-digit-roller__digit')) {
460
- const digit = this.getDigitValue(key);
461
- const fromDigit = this.prevDigitValues.has(key) ? this.prevDigitValues.get(key) : 0;
462
- const rawDelta = this.getTrendDelta(fromDigit, digit, trend, this.getDigitLength(key));
463
- const digitPosition = this.getDigitPosition(key);
464
- const isLowerUnchanged = this.continuous() &&
465
- rawDelta === 0 &&
466
- continuousStartPosition !== undefined &&
467
- digitPosition !== undefined &&
468
- continuousStartPosition >= digitPosition;
469
- const delta = isLowerUnchanged ? this.getDigitLength(key) * trend : rawDelta;
470
- if (delta !== 0 && duration > 0) {
471
- this.incrementSpin(el);
472
- const animation = el.animate({ '--_ngs-digit-roller-d': [-delta, 0] }, spinOptions);
473
- batch.push(animation);
474
- animation.finished.then(() => this.decrementSpin(el)).catch(() => this.decrementSpin(el));
475
- }
476
- this.animatePositionOrFade(el, prevRect, newRect, flipOptions, fadeOptions, staggerDelay, batch);
477
- }
478
- else {
479
- this.animatePositionOrFade(el, prevRect, newRect, flipOptions, fadeOptions, staggerDelay, batch);
480
- }
481
- }
482
- let exitIndex = 0;
483
- this.prevRects.forEach((rect, key) => {
484
- if (newKeys.has(key)) {
485
- return;
486
- }
487
- const ghost = this.buildGhost(key, rect, this.pendingHostFont, this.pendingHostColor);
488
- host.appendChild(ghost);
489
- ghost.style.setProperty('--_ngs-digit-roller-d-opacity', '-0.999');
490
- const staggerDelay = staggerMs > 0 ? exitIndex * staggerMs : 0;
491
- exitIndex++;
492
- const animation = ghost.animate({ '--_ngs-digit-roller-d-opacity': [0.999, 0] }, this.addStaggerDelay(fadeOptions, staggerDelay));
493
- batch.push(animation);
494
- animation.finished.then(() => ghost.remove()).catch(() => ghost.remove());
495
- });
496
- if (number && this.pendingNumberRect) {
497
- const rect = this.pendingNumberRect;
498
- const dx = this.prevNumberLeft - rect.left;
499
- const width = rect.width || this.pendingNumberOffsetWidth;
500
- const dWidth = this.prevNumberWidth - width;
501
- number.style.setProperty('--_ngs-digit-roller-width', String(width || this.prevNumberWidth || 1));
502
- if (Math.abs(dx) > 0.5 || Math.abs(dWidth) > 0.5) {
503
- batch.push(number.animate({
504
- '--_ngs-digit-roller-dx': [`${dx}px`, '0px'],
505
- '--_ngs-digit-roller-d-width': [dWidth, 0],
506
- }, flipOptions));
507
- }
508
- }
509
- if (duration > 0) {
510
- const colorIncrease = this.colorOnIncrease();
511
- const colorDecrease = this.colorOnDecrease();
512
- if (trend > 0 && colorIncrease) {
513
- batch.push(host.animate([{ color: colorIncrease }, { color: '' }], {
514
- duration: Math.max(duration, 400),
515
- easing: 'ease-out',
516
- fill: 'none',
517
- }));
518
- }
519
- else if (trend < 0 && colorDecrease) {
520
- batch.push(host.animate([{ color: colorDecrease }, { color: '' }], {
521
- duration: Math.max(duration, 400),
522
- easing: 'ease-out',
523
- fill: 'none',
524
- }));
525
- }
526
- }
527
- this.prevNumericValue = newNumericValue;
528
- if (batch.length === 0) {
529
- return;
530
- }
531
- this.liveAnimations.push(...batch);
532
- this.animCount++;
533
- if (this.animationsFinishAbort) {
534
- this.animationsFinishAbort.abort();
535
- }
536
- else {
537
- this.animationsStart.emit();
538
- }
539
- const finishController = new AbortController();
540
- this.animationsFinishAbort = finishController;
541
- Promise.allSettled(batch.map((animation) => animation.finished)).then(() => {
542
- const batchSet = new Set(batch);
543
- this.liveAnimations = this.liveAnimations.filter((animation) => !batchSet.has(animation));
544
- this.animCount--;
545
- if (this.animCount === 0 && !this.destroyed && this.animationsFinishAbort) {
546
- this.animationsFinish.emit();
547
- this.animationsFinishAbort = undefined;
548
- }
549
- });
550
- }
551
- animatePositionOrFade(element, prevRect, newRect, flipOptions, fadeOptions, staggerDelay, batch) {
552
- if (prevRect) {
553
- const dx = prevRect.left - newRect.left;
554
- if (Math.abs(dx) > 0.5) {
555
- batch.push(element.animate([{ transform: `translateX(${dx}px)` }, { transform: 'translateX(0)' }], flipOptions));
556
- }
557
- }
558
- else {
559
- batch.push(element.animate({ '--_ngs-digit-roller-d-opacity': [-0.9999, 0] }, this.addStaggerDelay(fadeOptions, staggerDelay)));
560
- }
561
- }
562
- getDigitValue(key) {
563
- const part = [...this.data().integer, ...this.data().fraction].find((item) => item.key === key);
564
- return part ? this.getPartDigitValue(part) : 0;
565
- }
566
- getPartDigitValue(part) {
567
- return part.numericValue ?? Number(part.value);
568
- }
569
- resolveTrend(oldValue, newValue) {
570
- const configured = this.trend();
571
- const trend = typeof configured === 'function'
572
- ? configured(oldValue, newValue)
573
- : (configured ?? Math.sign(newValue - oldValue));
574
- return Math.sign(trend);
575
- }
576
- canAnimateNow() {
577
- const host = this.elementRef.nativeElement;
578
- return (canAnimateDigitRoller({ respectMotionPreference: this.respectMotionPreference() }) &&
579
- this.animated() &&
580
- host.ownerDocument.visibilityState === 'visible' &&
581
- this.isHostNearViewport(host));
582
- }
583
- isHostNearViewport(host) {
584
- if (this.viewportObserver) {
585
- return this.isNearViewport;
586
- }
587
- const rect = host.getBoundingClientRect();
588
- if (rect.width <= 0 || rect.height <= 0) {
589
- return false;
590
- }
591
- const windowRef = host.ownerDocument.defaultView;
592
- if (!windowRef) {
593
- return true;
594
- }
595
- const margin = 240;
596
- return (rect.bottom >= -margin &&
597
- rect.right >= -margin &&
598
- rect.top <= windowRef.innerHeight + margin &&
599
- rect.left <= windowRef.innerWidth + margin);
600
- }
601
- resolveEasing(easing) {
602
- return easing ? (EASING_PRESETS[easing] ?? easing) : SPIN_EASING;
603
- }
604
- getContinuousStartPosition() {
605
- const current = new Map();
606
- const currentOrder = [];
607
- untracked(() => {
608
- [...this.data().integer, ...this.data().fraction].forEach((part) => {
609
- if (part.type === 'integer' || part.type === 'fraction') {
610
- current.set(part.key, this.getPartDigitValue(part));
611
- currentOrder.push(part.key);
612
- }
613
- });
614
- });
615
- const firstChangedPrev = this.prevDigitOrder.find((key) => current.get(key) !== this.prevDigitValues.get(key));
616
- const firstChangedCurrent = currentOrder.find((key) => current.get(key) !== this.prevDigitValues.get(key));
617
- const start = Math.max(this.getDigitPosition(firstChangedPrev) ?? -Infinity, this.getDigitPosition(firstChangedCurrent) ?? -Infinity);
618
- return Number.isFinite(start) ? start : undefined;
619
- }
620
- getDigitPosition(key) {
621
- if (!key) {
622
- return undefined;
623
- }
624
- if (key.startsWith('i')) {
625
- return Number(key.slice(1));
626
- }
627
- if (key.startsWith('f')) {
628
- return -Number(key.slice(1));
629
- }
630
- return undefined;
631
- }
632
- getDigitLength(key) {
633
- if (!key.startsWith('i')) {
634
- return 10;
635
- }
636
- const position = Number(key.slice(1));
637
- const max = this.digits()[position]?.max;
638
- return max !== undefined ? max + 1 : 10;
639
- }
640
- digitLengthForKey(key) {
641
- return this.getDigitLength(key);
642
- }
643
- digitGlyphsForKey(key) {
644
- return this.digitGlyphs().slice(0, this.getDigitLength(key));
645
- }
646
- addStaggerDelay(options, staggerDelay) {
647
- const currentDelay = typeof options.delay === 'number' ? options.delay : 0;
648
- return { ...options, delay: currentDelay + staggerDelay };
649
- }
650
- getTrendDelta(from, to, trend, length = 10) {
651
- const diff = to - from;
652
- const resolvedTrend = trend || Math.sign(diff);
653
- if (resolvedTrend > 0 && to < from) {
654
- return length - from + to;
655
- }
656
- if (resolvedTrend < 0 && to > from) {
657
- return to - length - from;
658
- }
659
- return diff;
660
- }
661
- incrementSpin(element) {
662
- const count = (this.spinCount.get(element) ?? 0) + 1;
663
- this.spinCount.set(element, count);
664
- if (count === 1) {
665
- element.classList.add('ngs-digit-roller__digit--spinning');
666
- }
667
- }
668
- decrementSpin(element) {
669
- const count = Math.max(0, (this.spinCount.get(element) ?? 1) - 1);
670
- if (count === 0) {
671
- this.spinCount.delete(element);
672
- element.classList.remove('ngs-digit-roller__digit--spinning');
673
- }
674
- else {
675
- this.spinCount.set(element, count);
676
- }
677
- }
678
- buildGhost(key, rect, font, color) {
679
- const ghost = document.createElement('span');
680
- ghost.style.cssText =
681
- `position:fixed;left:${rect.left}px;top:${rect.top}px;` +
682
- `width:${rect.width}px;height:${rect.height}px;` +
683
- `pointer-events:none;overflow:hidden;display:inline-flex;` +
684
- `align-items:center;font:${font};color:${color}`;
685
- ghost.className = 'ngs-digit-roller__ghost';
686
- const savedHTML = this.prevInnerHTML.get(key);
687
- if (savedHTML) {
688
- ghost.innerHTML = savedHTML;
689
- const savedD = this.prevDigitD.get(key);
690
- const savedCurrent = this.prevDigitCurrent.get(key);
691
- if (savedD !== undefined) {
692
- ghost.style.setProperty('--_ngs-digit-roller-d', savedD);
693
- }
694
- if (savedCurrent !== undefined) {
695
- ghost.style.setProperty('--_ngs-digit-roller-current', savedCurrent);
696
- }
697
- ghost.querySelectorAll('[inert]').forEach((element) => {
698
- element.style.display = 'none';
699
- });
700
- }
701
- return ghost;
702
- }
703
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DigitRoller, deps: [], target: i0.ɵɵFactoryTarget.Component });
704
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: DigitRoller, isStandalone: true, selector: "ngs-digit-roller", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, locales: { classPropertyName: "locales", publicName: "locales", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, animated: { classPropertyName: "animated", publicName: "animated", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, opacityDuration: { classPropertyName: "opacityDuration", publicName: "opacityDuration", isSignal: true, isRequired: false, transformFunction: null }, transformTiming: { classPropertyName: "transformTiming", publicName: "transformTiming", isSignal: true, isRequired: false, transformFunction: null }, spinTiming: { classPropertyName: "spinTiming", publicName: "spinTiming", isSignal: true, isRequired: false, transformFunction: null }, opacityTiming: { classPropertyName: "opacityTiming", publicName: "opacityTiming", isSignal: true, isRequired: false, transformFunction: null }, spinEasing: { classPropertyName: "spinEasing", publicName: "spinEasing", isSignal: true, isRequired: false, transformFunction: null }, flipEasing: { classPropertyName: "flipEasing", publicName: "flipEasing", isSignal: true, isRequired: false, transformFunction: null }, trend: { classPropertyName: "trend", publicName: "trend", isSignal: true, isRequired: false, transformFunction: null }, continuous: { classPropertyName: "continuous", publicName: "continuous", isSignal: true, isRequired: false, transformFunction: null }, digits: { classPropertyName: "digits", publicName: "digits", isSignal: true, isRequired: false, transformFunction: null }, respectMotionPreference: { classPropertyName: "respectMotionPreference", publicName: "respectMotionPreference", isSignal: true, isRequired: false, transformFunction: null }, stagger: { classPropertyName: "stagger", publicName: "stagger", isSignal: true, isRequired: false, transformFunction: null }, colorOnIncrease: { classPropertyName: "colorOnIncrease", publicName: "colorOnIncrease", isSignal: true, isRequired: false, transformFunction: null }, colorOnDecrease: { classPropertyName: "colorOnDecrease", publicName: "colorOnDecrease", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { animationsStart: "animationsStart", animationsFinish: "animationsFinish" }, host: { properties: { "attr.data-animated": "animated()" }, classAttribute: "ngs-digit-roller" }, exportAs: ["ngsDigitRoller"], ngImport: i0, template: "<span class=\"ngs-digit-roller__number\" aria-hidden=\"true\">\n <span class=\"ngs-digit-roller__number-inner\">\n @if (data().pre.length) {\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--pre\">\n @for (part of data().pre; track part.key) {\n <span class=\"ngs-digit-roller__literal\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n </span>\n }\n\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--integer\">\n @for (part of data().integer; track part.key) {\n @if (part.type === 'integer') {\n <span\n class=\"ngs-digit-roller__digit\"\n [attr.data-key]=\"part.key\"\n [style.--_ngs-digit-roller-current]=\"part.numericValue\"\n [style.--_ngs-digit-roller-len]=\"digitLengthForKey(part.key)\"\n >\n @for (digit of digitGlyphsForKey(part.key); track digit.value) {\n <span\n class=\"ngs-digit-roller__digit-number\"\n [style.--_ngs-digit-roller-n]=\"digit.value\"\n [attr.inert]=\"digit.value !== part.numericValue ? '' : null\"\n >\n {{ digit.glyph }}\n </span>\n }\n </span>\n } @else {\n <span class=\"ngs-digit-roller__separator\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n }\n </span>\n\n @if (data().fraction.length) {\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--fraction\">\n @for (part of data().fraction; track part.key) {\n @if (part.type === 'fraction') {\n <span\n class=\"ngs-digit-roller__digit\"\n [attr.data-key]=\"part.key\"\n [style.--_ngs-digit-roller-current]=\"part.numericValue\"\n [style.--_ngs-digit-roller-len]=\"digitLengthForKey(part.key)\"\n >\n @for (digit of digitGlyphsForKey(part.key); track digit.value) {\n <span\n class=\"ngs-digit-roller__digit-number\"\n [style.--_ngs-digit-roller-n]=\"digit.value\"\n [attr.inert]=\"digit.value !== part.numericValue ? '' : null\"\n >\n {{ digit.glyph }}\n </span>\n }\n </span>\n } @else {\n <span class=\"ngs-digit-roller__separator\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n }\n </span>\n }\n\n @if (data().post.length) {\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--post\">\n @for (part of data().post; track part.key) {\n <span class=\"ngs-digit-roller__literal\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n </span>\n }\n </span>\n</span>\n\n<span class=\"ngs-digit-roller__sr-only\">{{ formattedPlainText() }}</span>\n", styles: ["@layer properties;@property --_ngs-digit-roller-d{syntax: \"<number>\"; inherits: true; initial-value: 0;}@property --_ngs-digit-roller-d-opacity{syntax: \"<number>\"; inherits: false; initial-value: 0;}@property --_ngs-digit-roller-d-width{syntax: \"<number>\"; inherits: false; initial-value: 0;}@property --_ngs-digit-roller-dx{syntax: \"<length>\"; inherits: true; initial-value: 0px;}:host{--ngs-digit-roller-mask-height: .25em;--ngs-digit-roller-mask-width: .5em;--ngs-digit-roller-min-digit-width: .6em;display:inline-block;position:relative;direction:ltr;isolation:isolate;line-height:1;white-space:nowrap}:host .ngs-digit-roller__number{--_ngs-digit-roller-width: 1;--_ngs-digit-roller-scale-x: calc( 1 + var(--_ngs-digit-roller-d-width) / var(--_ngs-digit-roller-width) );--_ngs-digit-roller-half-mask-height: round( nearest, calc(var(--ngs-digit-roller-mask-height) / 2), 1px );--_ngs-digit-roller-resolved-mask-height: calc(var(--_ngs-digit-roller-half-mask-height) * 2);--_ngs-digit-roller-scaled-mask-width: calc( var(--ngs-digit-roller-mask-width) / var(--_ngs-digit-roller-scale-x) );display:inline-block;line-height:1;font-variant-numeric:tabular-nums;font-feature-settings:\"tnum\";position:relative;transform-origin:left top;transform:translate(var(--_ngs-digit-roller-dx)) scaleX(var(--_ngs-digit-roller-scale-x));margin:0 calc(-1 * var(--ngs-digit-roller-mask-width));-webkit-mask-image:linear-gradient(to right,transparent 0,#000 var(--_ngs-digit-roller-scaled-mask-width),#000 calc(100% - var(--_ngs-digit-roller-scaled-mask-width)),transparent 100%),linear-gradient(to bottom,transparent 0,#000 var(--_ngs-digit-roller-resolved-mask-height),#000 calc(100% - var(--_ngs-digit-roller-resolved-mask-height)),transparent 100%),radial-gradient(at bottom right,#000 0,transparent 71%),radial-gradient(at bottom left,#000 0,transparent 71%),radial-gradient(at top left,#000 0,transparent 71%),radial-gradient(at top right,#000 0,transparent 71%);mask-image:linear-gradient(to right,transparent 0,#000 var(--_ngs-digit-roller-scaled-mask-width),#000 calc(100% - var(--_ngs-digit-roller-scaled-mask-width)),transparent 100%),linear-gradient(to bottom,transparent 0,#000 var(--_ngs-digit-roller-resolved-mask-height),#000 calc(100% - var(--_ngs-digit-roller-resolved-mask-height)),transparent 100%),radial-gradient(at bottom right,#000 0,transparent 71%),radial-gradient(at bottom left,#000 0,transparent 71%),radial-gradient(at top left,#000 0,transparent 71%),radial-gradient(at top right,#000 0,transparent 71%);-webkit-mask-size:100% calc(100% - var(--_ngs-digit-roller-resolved-mask-height) * 2),calc(100% - var(--_ngs-digit-roller-scaled-mask-width) * 2) 100%,var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height);mask-size:100% calc(100% - var(--_ngs-digit-roller-resolved-mask-height) * 2),calc(100% - var(--_ngs-digit-roller-scaled-mask-width) * 2) 100%,var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height);-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}:host .ngs-digit-roller__number-inner{display:inline-flex;align-items:baseline;padding:var(--_ngs-digit-roller-half-mask-height) var(--ngs-digit-roller-mask-width);transform-origin:left top;transform:scaleX(calc(1 / var(--_ngs-digit-roller-scale-x))) translate(calc(-1 * var(--_ngs-digit-roller-dx)))}:host .ngs-digit-roller__section{display:inline-flex;align-items:baseline}:host .ngs-digit-roller__digit{display:inline-block;position:relative;height:calc(1em + var(--_ngs-digit-roller-resolved-mask-height, .25em));clip-path:inset(0 -.2em);vertical-align:top;--_ngs-digit-roller-c: var(--_ngs-digit-roller-current, 0) + var(--_ngs-digit-roller-d);--_ngs-digit-roller-len: 10}:host .ngs-digit-roller__digit,:host .ngs-digit-roller__separator,:host .ngs-digit-roller__literal,:host .ngs-digit-roller__ghost{opacity:calc(1 + var(--_ngs-digit-roller-d-opacity, 0))}:host .ngs-digit-roller__digit-number{display:inline-block;height:1em;line-height:1;text-align:center;min-width:var(--ngs-digit-roller-min-digit-width);padding:var(--_ngs-digit-roller-half-mask-height, .125em) 0;box-sizing:content-box;--_ngs-digit-roller-offset-raw: mod( var(--_ngs-digit-roller-len) + var(--_ngs-digit-roller-n) - mod(var(--_ngs-digit-roller-c), var(--_ngs-digit-roller-len)), var(--_ngs-digit-roller-len) );--_ngs-digit-roller-offset: calc( var(--_ngs-digit-roller-offset-raw) - var(--_ngs-digit-roller-len) * round(down, var(--_ngs-digit-roller-offset-raw) / (var(--_ngs-digit-roller-len) / 2), 1) );--_ngs-digit-roller-y: clamp(-100%, var(--_ngs-digit-roller-offset) * 100%, 100%);transform:translateY(var(--_ngs-digit-roller-y))}:host .ngs-digit-roller__digit-number[inert]{position:absolute;top:0;left:50%;transform:translate(-50%) translateY(var(--_ngs-digit-roller-y))}:host .ngs-digit-roller__digit:not(.ngs-digit-roller__digit--spinning) .ngs-digit-roller__digit-number[inert]{display:none}:host .ngs-digit-roller__separator,:host .ngs-digit-roller__literal{display:inline-block}:host .ngs-digit-roller__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}:host[data-animated=false] .ngs-digit-roller__digit-number,:host[data-animated=false] .ngs-digit-roller__digit,:host[data-animated=false] .ngs-digit-roller__separator,:host[data-animated=false] .ngs-digit-roller__literal{transition:none!important;animation:none!important}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){:root,:host{--_ngs-digit-roller-d: 0;--_ngs-digit-roller-dx: 0px}*,:before,:after,::backdrop{--_ngs-digit-roller-d-opacity: 0;--_ngs-digit-roller-d-width: 0}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
705
- }
706
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DigitRoller, decorators: [{
707
- type: Component,
708
- args: [{ selector: 'ngs-digit-roller', exportAs: 'ngsDigitRoller', changeDetection: ChangeDetectionStrategy.OnPush, host: {
709
- class: 'ngs-digit-roller',
710
- '[attr.data-animated]': 'animated()',
711
- }, template: "<span class=\"ngs-digit-roller__number\" aria-hidden=\"true\">\n <span class=\"ngs-digit-roller__number-inner\">\n @if (data().pre.length) {\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--pre\">\n @for (part of data().pre; track part.key) {\n <span class=\"ngs-digit-roller__literal\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n </span>\n }\n\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--integer\">\n @for (part of data().integer; track part.key) {\n @if (part.type === 'integer') {\n <span\n class=\"ngs-digit-roller__digit\"\n [attr.data-key]=\"part.key\"\n [style.--_ngs-digit-roller-current]=\"part.numericValue\"\n [style.--_ngs-digit-roller-len]=\"digitLengthForKey(part.key)\"\n >\n @for (digit of digitGlyphsForKey(part.key); track digit.value) {\n <span\n class=\"ngs-digit-roller__digit-number\"\n [style.--_ngs-digit-roller-n]=\"digit.value\"\n [attr.inert]=\"digit.value !== part.numericValue ? '' : null\"\n >\n {{ digit.glyph }}\n </span>\n }\n </span>\n } @else {\n <span class=\"ngs-digit-roller__separator\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n }\n </span>\n\n @if (data().fraction.length) {\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--fraction\">\n @for (part of data().fraction; track part.key) {\n @if (part.type === 'fraction') {\n <span\n class=\"ngs-digit-roller__digit\"\n [attr.data-key]=\"part.key\"\n [style.--_ngs-digit-roller-current]=\"part.numericValue\"\n [style.--_ngs-digit-roller-len]=\"digitLengthForKey(part.key)\"\n >\n @for (digit of digitGlyphsForKey(part.key); track digit.value) {\n <span\n class=\"ngs-digit-roller__digit-number\"\n [style.--_ngs-digit-roller-n]=\"digit.value\"\n [attr.inert]=\"digit.value !== part.numericValue ? '' : null\"\n >\n {{ digit.glyph }}\n </span>\n }\n </span>\n } @else {\n <span class=\"ngs-digit-roller__separator\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n }\n </span>\n }\n\n @if (data().post.length) {\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--post\">\n @for (part of data().post; track part.key) {\n <span class=\"ngs-digit-roller__literal\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n </span>\n }\n </span>\n</span>\n\n<span class=\"ngs-digit-roller__sr-only\">{{ formattedPlainText() }}</span>\n", styles: ["@layer properties;@property --_ngs-digit-roller-d{syntax: \"<number>\"; inherits: true; initial-value: 0;}@property --_ngs-digit-roller-d-opacity{syntax: \"<number>\"; inherits: false; initial-value: 0;}@property --_ngs-digit-roller-d-width{syntax: \"<number>\"; inherits: false; initial-value: 0;}@property --_ngs-digit-roller-dx{syntax: \"<length>\"; inherits: true; initial-value: 0px;}:host{--ngs-digit-roller-mask-height: .25em;--ngs-digit-roller-mask-width: .5em;--ngs-digit-roller-min-digit-width: .6em;display:inline-block;position:relative;direction:ltr;isolation:isolate;line-height:1;white-space:nowrap}:host .ngs-digit-roller__number{--_ngs-digit-roller-width: 1;--_ngs-digit-roller-scale-x: calc( 1 + var(--_ngs-digit-roller-d-width) / var(--_ngs-digit-roller-width) );--_ngs-digit-roller-half-mask-height: round( nearest, calc(var(--ngs-digit-roller-mask-height) / 2), 1px );--_ngs-digit-roller-resolved-mask-height: calc(var(--_ngs-digit-roller-half-mask-height) * 2);--_ngs-digit-roller-scaled-mask-width: calc( var(--ngs-digit-roller-mask-width) / var(--_ngs-digit-roller-scale-x) );display:inline-block;line-height:1;font-variant-numeric:tabular-nums;font-feature-settings:\"tnum\";position:relative;transform-origin:left top;transform:translate(var(--_ngs-digit-roller-dx)) scaleX(var(--_ngs-digit-roller-scale-x));margin:0 calc(-1 * var(--ngs-digit-roller-mask-width));-webkit-mask-image:linear-gradient(to right,transparent 0,#000 var(--_ngs-digit-roller-scaled-mask-width),#000 calc(100% - var(--_ngs-digit-roller-scaled-mask-width)),transparent 100%),linear-gradient(to bottom,transparent 0,#000 var(--_ngs-digit-roller-resolved-mask-height),#000 calc(100% - var(--_ngs-digit-roller-resolved-mask-height)),transparent 100%),radial-gradient(at bottom right,#000 0,transparent 71%),radial-gradient(at bottom left,#000 0,transparent 71%),radial-gradient(at top left,#000 0,transparent 71%),radial-gradient(at top right,#000 0,transparent 71%);mask-image:linear-gradient(to right,transparent 0,#000 var(--_ngs-digit-roller-scaled-mask-width),#000 calc(100% - var(--_ngs-digit-roller-scaled-mask-width)),transparent 100%),linear-gradient(to bottom,transparent 0,#000 var(--_ngs-digit-roller-resolved-mask-height),#000 calc(100% - var(--_ngs-digit-roller-resolved-mask-height)),transparent 100%),radial-gradient(at bottom right,#000 0,transparent 71%),radial-gradient(at bottom left,#000 0,transparent 71%),radial-gradient(at top left,#000 0,transparent 71%),radial-gradient(at top right,#000 0,transparent 71%);-webkit-mask-size:100% calc(100% - var(--_ngs-digit-roller-resolved-mask-height) * 2),calc(100% - var(--_ngs-digit-roller-scaled-mask-width) * 2) 100%,var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height);mask-size:100% calc(100% - var(--_ngs-digit-roller-resolved-mask-height) * 2),calc(100% - var(--_ngs-digit-roller-scaled-mask-width) * 2) 100%,var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height);-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}:host .ngs-digit-roller__number-inner{display:inline-flex;align-items:baseline;padding:var(--_ngs-digit-roller-half-mask-height) var(--ngs-digit-roller-mask-width);transform-origin:left top;transform:scaleX(calc(1 / var(--_ngs-digit-roller-scale-x))) translate(calc(-1 * var(--_ngs-digit-roller-dx)))}:host .ngs-digit-roller__section{display:inline-flex;align-items:baseline}:host .ngs-digit-roller__digit{display:inline-block;position:relative;height:calc(1em + var(--_ngs-digit-roller-resolved-mask-height, .25em));clip-path:inset(0 -.2em);vertical-align:top;--_ngs-digit-roller-c: var(--_ngs-digit-roller-current, 0) + var(--_ngs-digit-roller-d);--_ngs-digit-roller-len: 10}:host .ngs-digit-roller__digit,:host .ngs-digit-roller__separator,:host .ngs-digit-roller__literal,:host .ngs-digit-roller__ghost{opacity:calc(1 + var(--_ngs-digit-roller-d-opacity, 0))}:host .ngs-digit-roller__digit-number{display:inline-block;height:1em;line-height:1;text-align:center;min-width:var(--ngs-digit-roller-min-digit-width);padding:var(--_ngs-digit-roller-half-mask-height, .125em) 0;box-sizing:content-box;--_ngs-digit-roller-offset-raw: mod( var(--_ngs-digit-roller-len) + var(--_ngs-digit-roller-n) - mod(var(--_ngs-digit-roller-c), var(--_ngs-digit-roller-len)), var(--_ngs-digit-roller-len) );--_ngs-digit-roller-offset: calc( var(--_ngs-digit-roller-offset-raw) - var(--_ngs-digit-roller-len) * round(down, var(--_ngs-digit-roller-offset-raw) / (var(--_ngs-digit-roller-len) / 2), 1) );--_ngs-digit-roller-y: clamp(-100%, var(--_ngs-digit-roller-offset) * 100%, 100%);transform:translateY(var(--_ngs-digit-roller-y))}:host .ngs-digit-roller__digit-number[inert]{position:absolute;top:0;left:50%;transform:translate(-50%) translateY(var(--_ngs-digit-roller-y))}:host .ngs-digit-roller__digit:not(.ngs-digit-roller__digit--spinning) .ngs-digit-roller__digit-number[inert]{display:none}:host .ngs-digit-roller__separator,:host .ngs-digit-roller__literal{display:inline-block}:host .ngs-digit-roller__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}:host[data-animated=false] .ngs-digit-roller__digit-number,:host[data-animated=false] .ngs-digit-roller__digit,:host[data-animated=false] .ngs-digit-roller__separator,:host[data-animated=false] .ngs-digit-roller__literal{transition:none!important;animation:none!important}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){:root,:host{--_ngs-digit-roller-d: 0;--_ngs-digit-roller-dx: 0px}*,:before,:after,::backdrop{--_ngs-digit-roller-d-opacity: 0;--_ngs-digit-roller-d-width: 0}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
712
- }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], locales: [{ type: i0.Input, args: [{ isSignal: true, alias: "locales", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], animated: [{ type: i0.Input, args: [{ isSignal: true, alias: "animated", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "duration", required: false }] }], opacityDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "opacityDuration", required: false }] }], transformTiming: [{ type: i0.Input, args: [{ isSignal: true, alias: "transformTiming", required: false }] }], spinTiming: [{ type: i0.Input, args: [{ isSignal: true, alias: "spinTiming", required: false }] }], opacityTiming: [{ type: i0.Input, args: [{ isSignal: true, alias: "opacityTiming", required: false }] }], spinEasing: [{ type: i0.Input, args: [{ isSignal: true, alias: "spinEasing", required: false }] }], flipEasing: [{ type: i0.Input, args: [{ isSignal: true, alias: "flipEasing", required: false }] }], trend: [{ type: i0.Input, args: [{ isSignal: true, alias: "trend", required: false }] }], continuous: [{ type: i0.Input, args: [{ isSignal: true, alias: "continuous", required: false }] }], digits: [{ type: i0.Input, args: [{ isSignal: true, alias: "digits", required: false }] }], respectMotionPreference: [{ type: i0.Input, args: [{ isSignal: true, alias: "respectMotionPreference", required: false }] }], stagger: [{ type: i0.Input, args: [{ isSignal: true, alias: "stagger", required: false }] }], colorOnIncrease: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorOnIncrease", required: false }] }], colorOnDecrease: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorOnDecrease", required: false }] }], animationsStart: [{ type: i0.Output, args: ["animationsStart"] }], animationsFinish: [{ type: i0.Output, args: ["animationsFinish"] }] } });
713
-
714
- class DigitRollerGroupDirective {
715
- children = contentChildren(DigitRoller, { ...(ngDevMode ? { debugName: "children" } : /* istanbul ignore next */ {}), descendants: true });
716
- pendingUpdates = new Map();
717
- flushQueued = false;
718
- requestGroupedUpdate(member, applyUpdate) {
719
- if (!member.canGroupAnimateNow()) {
720
- return false;
721
- }
722
- this.pendingUpdates.set(member, applyUpdate);
723
- if (!this.flushQueued) {
724
- this.flushQueued = true;
725
- queueMicrotask(() => this.flushGroupedUpdates());
726
- }
727
- return true;
728
- }
729
- flushGroupedUpdates() {
730
- this.flushQueued = false;
731
- if (this.pendingUpdates.size === 0) {
732
- return;
733
- }
734
- const members = this.children().filter((child) => child.canGroupAnimateNow());
735
- for (const member of members) {
736
- member.prepareGroupedUpdate();
737
- }
738
- for (const applyUpdate of this.pendingUpdates.values()) {
739
- applyUpdate();
740
- }
741
- this.pendingUpdates.clear();
742
- for (const member of members) {
743
- member.queueGroupedAnimation();
744
- }
745
- }
746
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DigitRollerGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
747
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.1.7", type: DigitRollerGroupDirective, isStandalone: true, selector: "[ngsDigitRollerGroup]", providers: [
748
- {
749
- provide: DIGIT_ROLLER_GROUP,
750
- useExisting: forwardRef(() => DigitRollerGroupDirective),
751
- },
752
- ], queries: [{ propertyName: "children", predicate: DigitRoller, descendants: true, isSignal: true }], ngImport: i0 });
753
- }
754
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DigitRollerGroupDirective, decorators: [{
755
- type: Directive,
756
- args: [{
757
- selector: '[ngsDigitRollerGroup]',
758
- providers: [
759
- {
760
- provide: DIGIT_ROLLER_GROUP,
761
- useExisting: forwardRef(() => DigitRollerGroupDirective),
762
- },
763
- ],
764
- }]
765
- }], propDecorators: { children: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => DigitRoller), { ...{ descendants: true }, isSignal: true }] }] } });
766
-
767
- /**
768
- * Generated bundle index. Do not edit.
769
- */
770
-
172
+ var DigitRoller = class DigitRoller {
173
+ value = input.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
174
+ format = input({}, ...ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []);
175
+ locales = input(void 0, ...ngDevMode ? [{ debugName: "locales" }] : /* istanbul ignore next */ []);
176
+ prefix = input("", ...ngDevMode ? [{ debugName: "prefix" }] : /* istanbul ignore next */ []);
177
+ suffix = input("", ...ngDevMode ? [{ debugName: "suffix" }] : /* istanbul ignore next */ []);
178
+ animated = input(true, ...ngDevMode ? [{ debugName: "animated" }] : /* istanbul ignore next */ []);
179
+ duration = input(void 0, ...ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []);
180
+ opacityDuration = input(void 0, ...ngDevMode ? [{ debugName: "opacityDuration" }] : /* istanbul ignore next */ []);
181
+ transformTiming = input(void 0, ...ngDevMode ? [{ debugName: "transformTiming" }] : /* istanbul ignore next */ []);
182
+ spinTiming = input(void 0, ...ngDevMode ? [{ debugName: "spinTiming" }] : /* istanbul ignore next */ []);
183
+ opacityTiming = input(void 0, ...ngDevMode ? [{ debugName: "opacityTiming" }] : /* istanbul ignore next */ []);
184
+ spinEasing = input(void 0, ...ngDevMode ? [{ debugName: "spinEasing" }] : /* istanbul ignore next */ []);
185
+ flipEasing = input(void 0, ...ngDevMode ? [{ debugName: "flipEasing" }] : /* istanbul ignore next */ []);
186
+ trend = input(void 0, ...ngDevMode ? [{ debugName: "trend" }] : /* istanbul ignore next */ []);
187
+ continuous = input(false, ...ngDevMode ? [{ debugName: "continuous" }] : /* istanbul ignore next */ []);
188
+ digits = input({}, ...ngDevMode ? [{ debugName: "digits" }] : /* istanbul ignore next */ []);
189
+ respectMotionPreference = input(true, ...ngDevMode ? [{ debugName: "respectMotionPreference" }] : /* istanbul ignore next */ []);
190
+ stagger = input(0, ...ngDevMode ? [{ debugName: "stagger" }] : /* istanbul ignore next */ []);
191
+ colorOnIncrease = input(void 0, ...ngDevMode ? [{ debugName: "colorOnIncrease" }] : /* istanbul ignore next */ []);
192
+ colorOnDecrease = input(void 0, ...ngDevMode ? [{ debugName: "colorOnDecrease" }] : /* istanbul ignore next */ []);
193
+ animationsStart = output();
194
+ animationsFinish = output();
195
+ data = signal(DIGIT_ROLLER_EMPTY_FORMATTED, ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
196
+ digitGlyphs = computed(() => getDigitRollerGlyphs(this.locales(), this.format()), ...ngDevMode ? [{ debugName: "digitGlyphs" }] : /* istanbul ignore next */ []);
197
+ formattedPlainText = computed(() => new Intl.NumberFormat(this.locales(), this.format()).format(this.value()), ...ngDevMode ? [{ debugName: "formattedPlainText" }] : /* istanbul ignore next */ []);
198
+ effectiveSettings = computed(() => {
199
+ return {
200
+ duration: this.duration() ?? 900,
201
+ opacityDuration: this.opacityDuration() ?? 450,
202
+ spinEasing: this.resolveEasing(this.spinEasing()),
203
+ flipEasing: this.resolveEasing(this.flipEasing()),
204
+ transformTiming: this.transformTiming(),
205
+ spinTiming: this.spinTiming(),
206
+ opacityTiming: this.opacityTiming()
207
+ };
208
+ }, ...ngDevMode ? [{ debugName: "effectiveSettings" }] : /* istanbul ignore next */ []);
209
+ platformId = inject(PLATFORM_ID);
210
+ elementRef = inject(ElementRef);
211
+ destroyRef = inject(DestroyRef);
212
+ group = inject(DIGIT_ROLLER_GROUP, { optional: true });
213
+ prevRects = /* @__PURE__ */ new Map();
214
+ prevInnerHTML = /* @__PURE__ */ new Map();
215
+ prevDigitD = /* @__PURE__ */ new Map();
216
+ prevDigitCurrent = /* @__PURE__ */ new Map();
217
+ prevDigitValues = /* @__PURE__ */ new Map();
218
+ prevDigitOrder = [];
219
+ prevNumberLeft = 0;
220
+ prevNumberWidth = 0;
221
+ prevNumericValue = 0;
222
+ animCount = 0;
223
+ pending = false;
224
+ destroyed = false;
225
+ hasRenderedValue = false;
226
+ liveAnimations = [];
227
+ spinCount = /* @__PURE__ */ new Map();
228
+ animationsFinishAbort;
229
+ pendingCanAnimate = false;
230
+ pendingHostFont = "";
231
+ pendingHostColor = "";
232
+ pendingKeyedEls = [];
233
+ pendingNumberRect = null;
234
+ pendingNumberOffsetWidth = 0;
235
+ isNearViewport = true;
236
+ viewportObserver;
237
+ constructor() {
238
+ this.destroyRef.onDestroy(() => {
239
+ this.destroyed = true;
240
+ this.animationsFinishAbort?.abort();
241
+ this.viewportObserver?.disconnect();
242
+ for (const animation of this.liveAnimations) try {
243
+ animation.cancel();
244
+ } catch {}
245
+ this.liveAnimations = [];
246
+ });
247
+ effect(() => {
248
+ const value = this.value();
249
+ const format = this.format();
250
+ const locales = this.locales();
251
+ const prefix = this.prefix();
252
+ const suffix = this.suffix();
253
+ if (!this.hasRenderedValue) {
254
+ untracked(() => this.data.set(formatDigitRollerValue(value, format, locales, prefix, suffix)));
255
+ this.prevNumericValue = value;
256
+ this.hasRenderedValue = true;
257
+ return;
258
+ }
259
+ if (isPlatformBrowser(this.platformId) && this.animated() && this.canAnimateNow()) {
260
+ if (this.group?.requestGroupedUpdate(this, () => {
261
+ untracked(() => this.data.set(formatDigitRollerValue(value, format, locales, prefix, suffix)));
262
+ })) return;
263
+ this.snapshot();
264
+ untracked(() => this.data.set(formatDigitRollerValue(value, format, locales, prefix, suffix)));
265
+ this.pending = true;
266
+ } else {
267
+ untracked(() => this.data.set(formatDigitRollerValue(value, format, locales, prefix, suffix)));
268
+ this.prevNumericValue = value;
269
+ }
270
+ });
271
+ if (isPlatformBrowser(this.platformId)) {
272
+ if (typeof IntersectionObserver !== "undefined") {
273
+ this.viewportObserver = new IntersectionObserver((entries) => {
274
+ this.isNearViewport = entries[entries.length - 1].isIntersecting;
275
+ }, { rootMargin: "240px" });
276
+ this.viewportObserver.observe(this.elementRef.nativeElement);
277
+ }
278
+ afterEveryRender({
279
+ earlyRead: () => {
280
+ if (this.pending) this.readAnimationState();
281
+ },
282
+ write: () => {
283
+ if (this.pending) {
284
+ this.pending = false;
285
+ this.fireAnimations();
286
+ }
287
+ }
288
+ });
289
+ }
290
+ }
291
+ canGroupAnimateNow() {
292
+ return isPlatformBrowser(this.platformId) && this.animated() && this.canAnimateNow();
293
+ }
294
+ prepareGroupedUpdate() {
295
+ this.snapshot();
296
+ }
297
+ queueGroupedAnimation() {
298
+ this.pending = true;
299
+ }
300
+ snapshot() {
301
+ const host = this.elementRef.nativeElement;
302
+ this.prevRects.clear();
303
+ this.prevInnerHTML.clear();
304
+ this.prevDigitD.clear();
305
+ this.prevDigitCurrent.clear();
306
+ this.prevDigitValues.clear();
307
+ this.prevDigitOrder = [];
308
+ const number = host.querySelector(".ngs-digit-roller__number");
309
+ if (number) {
310
+ const numberRect = number.getBoundingClientRect();
311
+ this.prevNumberLeft = numberRect.left;
312
+ this.prevNumberWidth = numberRect.width;
313
+ }
314
+ untracked(() => {
315
+ [...this.data().integer, ...this.data().fraction].forEach((part) => {
316
+ if (part.type === "integer" || part.type === "fraction") {
317
+ this.prevDigitValues.set(part.key, this.getPartDigitValue(part));
318
+ this.prevDigitOrder.push(part.key);
319
+ }
320
+ });
321
+ });
322
+ host.querySelectorAll("[data-key]").forEach((element) => {
323
+ const key = element.getAttribute("data-key");
324
+ this.prevRects.set(key, element.getBoundingClientRect());
325
+ this.prevInnerHTML.set(key, element.innerHTML);
326
+ if (element.classList.contains("ngs-digit-roller__digit")) {
327
+ const styles = getComputedStyle(element);
328
+ this.prevDigitD.set(key, styles.getPropertyValue("--_ngs-digit-roller-d").trim() || "0");
329
+ this.prevDigitCurrent.set(key, (element.style.getPropertyValue("--_ngs-digit-roller-current") || "0").trim());
330
+ }
331
+ });
332
+ }
333
+ readAnimationState() {
334
+ if (this.destroyed || !this.canAnimateNow()) {
335
+ this.pendingCanAnimate = false;
336
+ return;
337
+ }
338
+ this.pendingCanAnimate = true;
339
+ const host = this.elementRef.nativeElement;
340
+ const hostStyles = getComputedStyle(host);
341
+ this.pendingHostFont = hostStyles.font;
342
+ this.pendingHostColor = hostStyles.color;
343
+ this.pendingKeyedEls = [];
344
+ host.querySelectorAll("[data-key]").forEach((element) => {
345
+ this.pendingKeyedEls.push({
346
+ el: element,
347
+ key: element.getAttribute("data-key"),
348
+ newRect: element.getBoundingClientRect()
349
+ });
350
+ });
351
+ const number = host.querySelector(".ngs-digit-roller__number");
352
+ this.pendingNumberRect = number ? number.getBoundingClientRect() : null;
353
+ this.pendingNumberOffsetWidth = number ? number.offsetWidth : 0;
354
+ }
355
+ fireAnimations() {
356
+ if (this.destroyed) return;
357
+ const host = this.elementRef.nativeElement;
358
+ const newNumericValue = untracked(() => this.value());
359
+ if (!this.pendingCanAnimate) {
360
+ this.prevNumericValue = newNumericValue;
361
+ return;
362
+ }
363
+ const settings = this.effectiveSettings();
364
+ const duration = settings.duration;
365
+ const opacityDuration = settings.opacityDuration;
366
+ const trend = this.resolveTrend(this.prevNumericValue, newNumericValue);
367
+ const staggerMs = this.stagger();
368
+ const baseTransformTiming = settings.transformTiming ?? {
369
+ duration,
370
+ easing: settings.flipEasing
371
+ };
372
+ const spinOptions = {
373
+ ...baseTransformTiming,
374
+ easing: settings.spinEasing,
375
+ ...settings.spinTiming ?? {},
376
+ duration: settings.spinTiming?.duration ?? baseTransformTiming.duration,
377
+ fill: "none",
378
+ composite: "accumulate"
379
+ };
380
+ const flipOptions = {
381
+ ...baseTransformTiming,
382
+ duration: baseTransformTiming.duration,
383
+ fill: "none",
384
+ composite: "accumulate"
385
+ };
386
+ const fadeOptions = {
387
+ duration: opacityDuration,
388
+ easing: "ease-out",
389
+ fill: "none",
390
+ composite: "accumulate",
391
+ ...settings.opacityTiming ?? {}
392
+ };
393
+ const continuousStartPosition = this.continuous() && duration > 0 && trend !== 0 ? this.getContinuousStartPosition() : void 0;
394
+ const batch = [];
395
+ const newKeys = /* @__PURE__ */ new Set();
396
+ let elementIndex = 0;
397
+ const number = host.querySelector(".ngs-digit-roller__number");
398
+ for (const { el, key, newRect } of this.pendingKeyedEls) {
399
+ newKeys.add(key);
400
+ const prevRect = this.prevRects.get(key);
401
+ const staggerDelay = staggerMs > 0 ? elementIndex * staggerMs : 0;
402
+ elementIndex++;
403
+ if (el.classList.contains("ngs-digit-roller__digit")) {
404
+ const digit = this.getDigitValue(key);
405
+ const fromDigit = this.prevDigitValues.has(key) ? this.prevDigitValues.get(key) : 0;
406
+ const rawDelta = this.getTrendDelta(fromDigit, digit, trend, this.getDigitLength(key));
407
+ const digitPosition = this.getDigitPosition(key);
408
+ const delta = this.continuous() && rawDelta === 0 && continuousStartPosition !== void 0 && digitPosition !== void 0 && continuousStartPosition >= digitPosition ? this.getDigitLength(key) * trend : rawDelta;
409
+ if (delta !== 0 && duration > 0) {
410
+ this.incrementSpin(el);
411
+ const animation = el.animate({ "--_ngs-digit-roller-d": [-delta, 0] }, spinOptions);
412
+ batch.push(animation);
413
+ animation.finished.then(() => this.decrementSpin(el)).catch(() => this.decrementSpin(el));
414
+ }
415
+ this.animatePositionOrFade(el, prevRect, newRect, flipOptions, fadeOptions, staggerDelay, batch);
416
+ } else this.animatePositionOrFade(el, prevRect, newRect, flipOptions, fadeOptions, staggerDelay, batch);
417
+ }
418
+ let exitIndex = 0;
419
+ this.prevRects.forEach((rect, key) => {
420
+ if (newKeys.has(key)) return;
421
+ const ghost = this.buildGhost(key, rect, this.pendingHostFont, this.pendingHostColor);
422
+ host.appendChild(ghost);
423
+ ghost.style.setProperty("--_ngs-digit-roller-d-opacity", "-0.999");
424
+ const staggerDelay = staggerMs > 0 ? exitIndex * staggerMs : 0;
425
+ exitIndex++;
426
+ const animation = ghost.animate({ "--_ngs-digit-roller-d-opacity": [.999, 0] }, this.addStaggerDelay(fadeOptions, staggerDelay));
427
+ batch.push(animation);
428
+ animation.finished.then(() => ghost.remove()).catch(() => ghost.remove());
429
+ });
430
+ if (number && this.pendingNumberRect) {
431
+ const rect = this.pendingNumberRect;
432
+ const dx = this.prevNumberLeft - rect.left;
433
+ const width = rect.width || this.pendingNumberOffsetWidth;
434
+ const dWidth = this.prevNumberWidth - width;
435
+ number.style.setProperty("--_ngs-digit-roller-width", String(width || this.prevNumberWidth || 1));
436
+ if (Math.abs(dx) > .5 || Math.abs(dWidth) > .5) batch.push(number.animate({
437
+ "--_ngs-digit-roller-dx": [`${dx}px`, "0px"],
438
+ "--_ngs-digit-roller-d-width": [dWidth, 0]
439
+ }, flipOptions));
440
+ }
441
+ if (duration > 0) {
442
+ const colorIncrease = this.colorOnIncrease();
443
+ const colorDecrease = this.colorOnDecrease();
444
+ if (trend > 0 && colorIncrease) batch.push(host.animate([{ color: colorIncrease }, { color: "" }], {
445
+ duration: Math.max(duration, 400),
446
+ easing: "ease-out",
447
+ fill: "none"
448
+ }));
449
+ else if (trend < 0 && colorDecrease) batch.push(host.animate([{ color: colorDecrease }, { color: "" }], {
450
+ duration: Math.max(duration, 400),
451
+ easing: "ease-out",
452
+ fill: "none"
453
+ }));
454
+ }
455
+ this.prevNumericValue = newNumericValue;
456
+ if (batch.length === 0) return;
457
+ this.liveAnimations.push(...batch);
458
+ this.animCount++;
459
+ if (this.animationsFinishAbort) this.animationsFinishAbort.abort();
460
+ else this.animationsStart.emit();
461
+ const finishController = new AbortController();
462
+ this.animationsFinishAbort = finishController;
463
+ Promise.allSettled(batch.map((animation) => animation.finished)).then(() => {
464
+ const batchSet = new Set(batch);
465
+ this.liveAnimations = this.liveAnimations.filter((animation) => !batchSet.has(animation));
466
+ this.animCount--;
467
+ if (this.animCount === 0 && !this.destroyed && this.animationsFinishAbort) {
468
+ this.animationsFinish.emit();
469
+ this.animationsFinishAbort = void 0;
470
+ }
471
+ });
472
+ }
473
+ animatePositionOrFade(element, prevRect, newRect, flipOptions, fadeOptions, staggerDelay, batch) {
474
+ if (prevRect) {
475
+ const dx = prevRect.left - newRect.left;
476
+ if (Math.abs(dx) > .5) batch.push(element.animate([{ transform: `translateX(${dx}px)` }, { transform: "translateX(0)" }], flipOptions));
477
+ } else batch.push(element.animate({ "--_ngs-digit-roller-d-opacity": [-.9999, 0] }, this.addStaggerDelay(fadeOptions, staggerDelay)));
478
+ }
479
+ getDigitValue(key) {
480
+ const part = [...this.data().integer, ...this.data().fraction].find((item) => item.key === key);
481
+ return part ? this.getPartDigitValue(part) : 0;
482
+ }
483
+ getPartDigitValue(part) {
484
+ return part.numericValue ?? Number(part.value);
485
+ }
486
+ resolveTrend(oldValue, newValue) {
487
+ const configured = this.trend();
488
+ const trend = typeof configured === "function" ? configured(oldValue, newValue) : configured ?? Math.sign(newValue - oldValue);
489
+ return Math.sign(trend);
490
+ }
491
+ canAnimateNow() {
492
+ const host = this.elementRef.nativeElement;
493
+ return canAnimateDigitRoller({ respectMotionPreference: this.respectMotionPreference() }) && this.animated() && host.ownerDocument.visibilityState === "visible" && this.isHostNearViewport(host);
494
+ }
495
+ isHostNearViewport(host) {
496
+ if (this.viewportObserver) return this.isNearViewport;
497
+ const rect = host.getBoundingClientRect();
498
+ if (rect.width <= 0 || rect.height <= 0) return false;
499
+ const windowRef = host.ownerDocument.defaultView;
500
+ if (!windowRef) return true;
501
+ const margin = 240;
502
+ return rect.bottom >= -240 && rect.right >= -240 && rect.top <= windowRef.innerHeight + margin && rect.left <= windowRef.innerWidth + margin;
503
+ }
504
+ resolveEasing(easing) {
505
+ return easing ? EASING_PRESETS[easing] ?? easing : SPIN_EASING;
506
+ }
507
+ getContinuousStartPosition() {
508
+ const current = /* @__PURE__ */ new Map();
509
+ const currentOrder = [];
510
+ untracked(() => {
511
+ [...this.data().integer, ...this.data().fraction].forEach((part) => {
512
+ if (part.type === "integer" || part.type === "fraction") {
513
+ current.set(part.key, this.getPartDigitValue(part));
514
+ currentOrder.push(part.key);
515
+ }
516
+ });
517
+ });
518
+ const firstChangedPrev = this.prevDigitOrder.find((key) => current.get(key) !== this.prevDigitValues.get(key));
519
+ const firstChangedCurrent = currentOrder.find((key) => current.get(key) !== this.prevDigitValues.get(key));
520
+ const start = Math.max(this.getDigitPosition(firstChangedPrev) ?? -Infinity, this.getDigitPosition(firstChangedCurrent) ?? -Infinity);
521
+ return Number.isFinite(start) ? start : void 0;
522
+ }
523
+ getDigitPosition(key) {
524
+ if (!key) return;
525
+ if (key.startsWith("i")) return Number(key.slice(1));
526
+ if (key.startsWith("f")) return -Number(key.slice(1));
527
+ }
528
+ getDigitLength(key) {
529
+ if (!key.startsWith("i")) return 10;
530
+ const position = Number(key.slice(1));
531
+ const max = this.digits()[position]?.max;
532
+ return max !== void 0 ? max + 1 : 10;
533
+ }
534
+ digitLengthForKey(key) {
535
+ return this.getDigitLength(key);
536
+ }
537
+ digitGlyphsForKey(key) {
538
+ return this.digitGlyphs().slice(0, this.getDigitLength(key));
539
+ }
540
+ addStaggerDelay(options, staggerDelay) {
541
+ const currentDelay = typeof options.delay === "number" ? options.delay : 0;
542
+ return {
543
+ ...options,
544
+ delay: currentDelay + staggerDelay
545
+ };
546
+ }
547
+ getTrendDelta(from, to, trend, length = 10) {
548
+ const diff = to - from;
549
+ const resolvedTrend = trend || Math.sign(diff);
550
+ if (resolvedTrend > 0 && to < from) return length - from + to;
551
+ if (resolvedTrend < 0 && to > from) return to - length - from;
552
+ return diff;
553
+ }
554
+ incrementSpin(element) {
555
+ const count = (this.spinCount.get(element) ?? 0) + 1;
556
+ this.spinCount.set(element, count);
557
+ if (count === 1) element.classList.add("ngs-digit-roller__digit--spinning");
558
+ }
559
+ decrementSpin(element) {
560
+ const count = Math.max(0, (this.spinCount.get(element) ?? 1) - 1);
561
+ if (count === 0) {
562
+ this.spinCount.delete(element);
563
+ element.classList.remove("ngs-digit-roller__digit--spinning");
564
+ } else this.spinCount.set(element, count);
565
+ }
566
+ buildGhost(key, rect, font, color) {
567
+ const ghost = document.createElement("span");
568
+ ghost.style.cssText = `position:fixed;left:${rect.left}px;top:${rect.top}px;width:${rect.width}px;height:${rect.height}px;pointer-events:none;overflow:hidden;display:inline-flex;align-items:center;font:${font};color:${color}`;
569
+ ghost.className = "ngs-digit-roller__ghost";
570
+ const savedHTML = this.prevInnerHTML.get(key);
571
+ if (savedHTML) {
572
+ ghost.innerHTML = savedHTML;
573
+ const savedD = this.prevDigitD.get(key);
574
+ const savedCurrent = this.prevDigitCurrent.get(key);
575
+ if (savedD !== void 0) ghost.style.setProperty("--_ngs-digit-roller-d", savedD);
576
+ if (savedCurrent !== void 0) ghost.style.setProperty("--_ngs-digit-roller-current", savedCurrent);
577
+ ghost.querySelectorAll("[inert]").forEach((element) => {
578
+ element.style.display = "none";
579
+ });
580
+ }
581
+ return ghost;
582
+ }
583
+ static ɵfac = i0.ɵɵngDeclareFactory({
584
+ minVersion: "12.0.0",
585
+ version: "22.3.0",
586
+ ngImport: i0,
587
+ type: DigitRoller,
588
+ deps: [],
589
+ target: i0.ɵɵFactoryTarget.Component
590
+ });
591
+ static ɵcmp = i0.ɵɵngDeclareComponent({
592
+ minVersion: "17.0.0",
593
+ version: "22.3.0",
594
+ type: DigitRoller,
595
+ isStandalone: true,
596
+ selector: "ngs-digit-roller",
597
+ inputs: {
598
+ value: {
599
+ classPropertyName: "value",
600
+ publicName: "value",
601
+ isSignal: true,
602
+ isRequired: true,
603
+ transformFunction: null
604
+ },
605
+ format: {
606
+ classPropertyName: "format",
607
+ publicName: "format",
608
+ isSignal: true,
609
+ isRequired: false,
610
+ transformFunction: null
611
+ },
612
+ locales: {
613
+ classPropertyName: "locales",
614
+ publicName: "locales",
615
+ isSignal: true,
616
+ isRequired: false,
617
+ transformFunction: null
618
+ },
619
+ prefix: {
620
+ classPropertyName: "prefix",
621
+ publicName: "prefix",
622
+ isSignal: true,
623
+ isRequired: false,
624
+ transformFunction: null
625
+ },
626
+ suffix: {
627
+ classPropertyName: "suffix",
628
+ publicName: "suffix",
629
+ isSignal: true,
630
+ isRequired: false,
631
+ transformFunction: null
632
+ },
633
+ animated: {
634
+ classPropertyName: "animated",
635
+ publicName: "animated",
636
+ isSignal: true,
637
+ isRequired: false,
638
+ transformFunction: null
639
+ },
640
+ duration: {
641
+ classPropertyName: "duration",
642
+ publicName: "duration",
643
+ isSignal: true,
644
+ isRequired: false,
645
+ transformFunction: null
646
+ },
647
+ opacityDuration: {
648
+ classPropertyName: "opacityDuration",
649
+ publicName: "opacityDuration",
650
+ isSignal: true,
651
+ isRequired: false,
652
+ transformFunction: null
653
+ },
654
+ transformTiming: {
655
+ classPropertyName: "transformTiming",
656
+ publicName: "transformTiming",
657
+ isSignal: true,
658
+ isRequired: false,
659
+ transformFunction: null
660
+ },
661
+ spinTiming: {
662
+ classPropertyName: "spinTiming",
663
+ publicName: "spinTiming",
664
+ isSignal: true,
665
+ isRequired: false,
666
+ transformFunction: null
667
+ },
668
+ opacityTiming: {
669
+ classPropertyName: "opacityTiming",
670
+ publicName: "opacityTiming",
671
+ isSignal: true,
672
+ isRequired: false,
673
+ transformFunction: null
674
+ },
675
+ spinEasing: {
676
+ classPropertyName: "spinEasing",
677
+ publicName: "spinEasing",
678
+ isSignal: true,
679
+ isRequired: false,
680
+ transformFunction: null
681
+ },
682
+ flipEasing: {
683
+ classPropertyName: "flipEasing",
684
+ publicName: "flipEasing",
685
+ isSignal: true,
686
+ isRequired: false,
687
+ transformFunction: null
688
+ },
689
+ trend: {
690
+ classPropertyName: "trend",
691
+ publicName: "trend",
692
+ isSignal: true,
693
+ isRequired: false,
694
+ transformFunction: null
695
+ },
696
+ continuous: {
697
+ classPropertyName: "continuous",
698
+ publicName: "continuous",
699
+ isSignal: true,
700
+ isRequired: false,
701
+ transformFunction: null
702
+ },
703
+ digits: {
704
+ classPropertyName: "digits",
705
+ publicName: "digits",
706
+ isSignal: true,
707
+ isRequired: false,
708
+ transformFunction: null
709
+ },
710
+ respectMotionPreference: {
711
+ classPropertyName: "respectMotionPreference",
712
+ publicName: "respectMotionPreference",
713
+ isSignal: true,
714
+ isRequired: false,
715
+ transformFunction: null
716
+ },
717
+ stagger: {
718
+ classPropertyName: "stagger",
719
+ publicName: "stagger",
720
+ isSignal: true,
721
+ isRequired: false,
722
+ transformFunction: null
723
+ },
724
+ colorOnIncrease: {
725
+ classPropertyName: "colorOnIncrease",
726
+ publicName: "colorOnIncrease",
727
+ isSignal: true,
728
+ isRequired: false,
729
+ transformFunction: null
730
+ },
731
+ colorOnDecrease: {
732
+ classPropertyName: "colorOnDecrease",
733
+ publicName: "colorOnDecrease",
734
+ isSignal: true,
735
+ isRequired: false,
736
+ transformFunction: null
737
+ }
738
+ },
739
+ outputs: {
740
+ animationsStart: "animationsStart",
741
+ animationsFinish: "animationsFinish"
742
+ },
743
+ host: {
744
+ properties: { "attr.data-animated": "animated()" },
745
+ classAttribute: "ngs-digit-roller"
746
+ },
747
+ exportAs: ["ngsDigitRoller"],
748
+ ngImport: i0,
749
+ template: "<span class=\"ngs-digit-roller__number\" aria-hidden=\"true\">\n <span class=\"ngs-digit-roller__number-inner\">\n @if (data().pre.length) {\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--pre\">\n @for (part of data().pre; track part.key) {\n <span class=\"ngs-digit-roller__literal\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n </span>\n }\n\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--integer\">\n @for (part of data().integer; track part.key) {\n @if (part.type === 'integer') {\n <span\n class=\"ngs-digit-roller__digit\"\n [attr.data-key]=\"part.key\"\n [style.--_ngs-digit-roller-current]=\"part.numericValue\"\n [style.--_ngs-digit-roller-len]=\"digitLengthForKey(part.key)\"\n >\n @for (digit of digitGlyphsForKey(part.key); track digit.value) {\n <span\n class=\"ngs-digit-roller__digit-number\"\n [style.--_ngs-digit-roller-n]=\"digit.value\"\n [attr.inert]=\"digit.value !== part.numericValue ? '' : null\"\n >\n {{ digit.glyph }}\n </span>\n }\n </span>\n } @else {\n <span class=\"ngs-digit-roller__separator\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n }\n </span>\n\n @if (data().fraction.length) {\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--fraction\">\n @for (part of data().fraction; track part.key) {\n @if (part.type === 'fraction') {\n <span\n class=\"ngs-digit-roller__digit\"\n [attr.data-key]=\"part.key\"\n [style.--_ngs-digit-roller-current]=\"part.numericValue\"\n [style.--_ngs-digit-roller-len]=\"digitLengthForKey(part.key)\"\n >\n @for (digit of digitGlyphsForKey(part.key); track digit.value) {\n <span\n class=\"ngs-digit-roller__digit-number\"\n [style.--_ngs-digit-roller-n]=\"digit.value\"\n [attr.inert]=\"digit.value !== part.numericValue ? '' : null\"\n >\n {{ digit.glyph }}\n </span>\n }\n </span>\n } @else {\n <span class=\"ngs-digit-roller__separator\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n }\n </span>\n }\n\n @if (data().post.length) {\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--post\">\n @for (part of data().post; track part.key) {\n <span class=\"ngs-digit-roller__literal\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n </span>\n }\n </span>\n</span>\n\n<span class=\"ngs-digit-roller__sr-only\">{{ formattedPlainText() }}</span>\n",
750
+ styles: ["@layer properties;@property --_ngs-digit-roller-d{syntax: \"<number>\"; inherits: true; initial-value: 0;}@property --_ngs-digit-roller-d-opacity{syntax: \"<number>\"; inherits: false; initial-value: 0;}@property --_ngs-digit-roller-d-width{syntax: \"<number>\"; inherits: false; initial-value: 0;}@property --_ngs-digit-roller-dx{syntax: \"<length>\"; inherits: true; initial-value: 0px;}:host{--ngs-digit-roller-mask-height: .25em;--ngs-digit-roller-mask-width: .5em;--ngs-digit-roller-min-digit-width: .6em;display:inline-block;position:relative;direction:ltr;isolation:isolate;line-height:1;white-space:nowrap}:host .ngs-digit-roller__number{--_ngs-digit-roller-width: 1;--_ngs-digit-roller-scale-x: calc( 1 + var(--_ngs-digit-roller-d-width) / var(--_ngs-digit-roller-width) );--_ngs-digit-roller-half-mask-height: round( nearest, calc(var(--ngs-digit-roller-mask-height) / 2), 1px );--_ngs-digit-roller-resolved-mask-height: calc(var(--_ngs-digit-roller-half-mask-height) * 2);--_ngs-digit-roller-scaled-mask-width: calc( var(--ngs-digit-roller-mask-width) / var(--_ngs-digit-roller-scale-x) );display:inline-block;line-height:1;font-variant-numeric:tabular-nums;font-feature-settings:\"tnum\";position:relative;transform-origin:left top;transform:translate(var(--_ngs-digit-roller-dx)) scaleX(var(--_ngs-digit-roller-scale-x));margin:0 calc(-1 * var(--ngs-digit-roller-mask-width));-webkit-mask-image:linear-gradient(to right,transparent 0,#000 var(--_ngs-digit-roller-scaled-mask-width),#000 calc(100% - var(--_ngs-digit-roller-scaled-mask-width)),transparent 100%),linear-gradient(to bottom,transparent 0,#000 var(--_ngs-digit-roller-resolved-mask-height),#000 calc(100% - var(--_ngs-digit-roller-resolved-mask-height)),transparent 100%),radial-gradient(at bottom right,#000 0,transparent 71%),radial-gradient(at bottom left,#000 0,transparent 71%),radial-gradient(at top left,#000 0,transparent 71%),radial-gradient(at top right,#000 0,transparent 71%);mask-image:linear-gradient(to right,transparent 0,#000 var(--_ngs-digit-roller-scaled-mask-width),#000 calc(100% - var(--_ngs-digit-roller-scaled-mask-width)),transparent 100%),linear-gradient(to bottom,transparent 0,#000 var(--_ngs-digit-roller-resolved-mask-height),#000 calc(100% - var(--_ngs-digit-roller-resolved-mask-height)),transparent 100%),radial-gradient(at bottom right,#000 0,transparent 71%),radial-gradient(at bottom left,#000 0,transparent 71%),radial-gradient(at top left,#000 0,transparent 71%),radial-gradient(at top right,#000 0,transparent 71%);-webkit-mask-size:100% calc(100% - var(--_ngs-digit-roller-resolved-mask-height) * 2),calc(100% - var(--_ngs-digit-roller-scaled-mask-width) * 2) 100%,var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height);mask-size:100% calc(100% - var(--_ngs-digit-roller-resolved-mask-height) * 2),calc(100% - var(--_ngs-digit-roller-scaled-mask-width) * 2) 100%,var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height);-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}:host .ngs-digit-roller__number-inner{display:inline-flex;align-items:baseline;padding:var(--_ngs-digit-roller-half-mask-height) var(--ngs-digit-roller-mask-width);transform-origin:left top;transform:scaleX(calc(1 / var(--_ngs-digit-roller-scale-x))) translate(calc(-1 * var(--_ngs-digit-roller-dx)))}:host .ngs-digit-roller__section{display:inline-flex;align-items:baseline}:host .ngs-digit-roller__digit{display:inline-block;position:relative;height:calc(1em + var(--_ngs-digit-roller-resolved-mask-height, .25em));clip-path:inset(0 -.2em);vertical-align:top;--_ngs-digit-roller-c: var(--_ngs-digit-roller-current, 0) + var(--_ngs-digit-roller-d);--_ngs-digit-roller-len: 10}:host .ngs-digit-roller__digit,:host .ngs-digit-roller__separator,:host .ngs-digit-roller__literal,:host .ngs-digit-roller__ghost{opacity:calc(1 + var(--_ngs-digit-roller-d-opacity, 0))}:host .ngs-digit-roller__digit-number{display:inline-block;height:1em;line-height:1;text-align:center;min-width:var(--ngs-digit-roller-min-digit-width);padding:var(--_ngs-digit-roller-half-mask-height, .125em) 0;box-sizing:content-box;--_ngs-digit-roller-offset-raw: mod( var(--_ngs-digit-roller-len) + var(--_ngs-digit-roller-n) - mod(var(--_ngs-digit-roller-c), var(--_ngs-digit-roller-len)), var(--_ngs-digit-roller-len) );--_ngs-digit-roller-offset: calc( var(--_ngs-digit-roller-offset-raw) - var(--_ngs-digit-roller-len) * round(down, var(--_ngs-digit-roller-offset-raw) / (var(--_ngs-digit-roller-len) / 2), 1) );--_ngs-digit-roller-y: clamp(-100%, var(--_ngs-digit-roller-offset) * 100%, 100%);transform:translateY(var(--_ngs-digit-roller-y))}:host .ngs-digit-roller__digit-number[inert]{position:absolute;top:0;left:50%;transform:translate(-50%) translateY(var(--_ngs-digit-roller-y))}:host .ngs-digit-roller__digit:not(.ngs-digit-roller__digit--spinning) .ngs-digit-roller__digit-number[inert]{display:none}:host .ngs-digit-roller__separator,:host .ngs-digit-roller__literal{display:inline-block}:host .ngs-digit-roller__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}:host[data-animated=false] .ngs-digit-roller__digit-number,:host[data-animated=false] .ngs-digit-roller__digit,:host[data-animated=false] .ngs-digit-roller__separator,:host[data-animated=false] .ngs-digit-roller__literal{transition:none!important;animation:none!important}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){:root,:host{--_ngs-digit-roller-d: 0;--_ngs-digit-roller-dx: 0px}*,:before,:after,::backdrop{--_ngs-digit-roller-d-opacity: 0;--_ngs-digit-roller-d-width: 0}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
751
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
752
+ });
753
+ };
754
+ i0.ɵɵngDeclareClassMetadata({
755
+ minVersion: "12.0.0",
756
+ version: "22.3.0",
757
+ ngImport: i0,
758
+ type: DigitRoller,
759
+ decorators: [{
760
+ type: Component,
761
+ args: [{
762
+ selector: "ngs-digit-roller",
763
+ exportAs: "ngsDigitRoller",
764
+ changeDetection: ChangeDetectionStrategy.OnPush,
765
+ host: {
766
+ class: "ngs-digit-roller",
767
+ "[attr.data-animated]": "animated()"
768
+ },
769
+ template: "<span class=\"ngs-digit-roller__number\" aria-hidden=\"true\">\n <span class=\"ngs-digit-roller__number-inner\">\n @if (data().pre.length) {\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--pre\">\n @for (part of data().pre; track part.key) {\n <span class=\"ngs-digit-roller__literal\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n </span>\n }\n\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--integer\">\n @for (part of data().integer; track part.key) {\n @if (part.type === 'integer') {\n <span\n class=\"ngs-digit-roller__digit\"\n [attr.data-key]=\"part.key\"\n [style.--_ngs-digit-roller-current]=\"part.numericValue\"\n [style.--_ngs-digit-roller-len]=\"digitLengthForKey(part.key)\"\n >\n @for (digit of digitGlyphsForKey(part.key); track digit.value) {\n <span\n class=\"ngs-digit-roller__digit-number\"\n [style.--_ngs-digit-roller-n]=\"digit.value\"\n [attr.inert]=\"digit.value !== part.numericValue ? '' : null\"\n >\n {{ digit.glyph }}\n </span>\n }\n </span>\n } @else {\n <span class=\"ngs-digit-roller__separator\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n }\n </span>\n\n @if (data().fraction.length) {\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--fraction\">\n @for (part of data().fraction; track part.key) {\n @if (part.type === 'fraction') {\n <span\n class=\"ngs-digit-roller__digit\"\n [attr.data-key]=\"part.key\"\n [style.--_ngs-digit-roller-current]=\"part.numericValue\"\n [style.--_ngs-digit-roller-len]=\"digitLengthForKey(part.key)\"\n >\n @for (digit of digitGlyphsForKey(part.key); track digit.value) {\n <span\n class=\"ngs-digit-roller__digit-number\"\n [style.--_ngs-digit-roller-n]=\"digit.value\"\n [attr.inert]=\"digit.value !== part.numericValue ? '' : null\"\n >\n {{ digit.glyph }}\n </span>\n }\n </span>\n } @else {\n <span class=\"ngs-digit-roller__separator\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n }\n </span>\n }\n\n @if (data().post.length) {\n <span class=\"ngs-digit-roller__section ngs-digit-roller__section--post\">\n @for (part of data().post; track part.key) {\n <span class=\"ngs-digit-roller__literal\" [attr.data-key]=\"part.key\">{{ part.value }}</span>\n }\n </span>\n }\n </span>\n</span>\n\n<span class=\"ngs-digit-roller__sr-only\">{{ formattedPlainText() }}</span>\n",
770
+ styles: ["@layer properties;@property --_ngs-digit-roller-d{syntax: \"<number>\"; inherits: true; initial-value: 0;}@property --_ngs-digit-roller-d-opacity{syntax: \"<number>\"; inherits: false; initial-value: 0;}@property --_ngs-digit-roller-d-width{syntax: \"<number>\"; inherits: false; initial-value: 0;}@property --_ngs-digit-roller-dx{syntax: \"<length>\"; inherits: true; initial-value: 0px;}:host{--ngs-digit-roller-mask-height: .25em;--ngs-digit-roller-mask-width: .5em;--ngs-digit-roller-min-digit-width: .6em;display:inline-block;position:relative;direction:ltr;isolation:isolate;line-height:1;white-space:nowrap}:host .ngs-digit-roller__number{--_ngs-digit-roller-width: 1;--_ngs-digit-roller-scale-x: calc( 1 + var(--_ngs-digit-roller-d-width) / var(--_ngs-digit-roller-width) );--_ngs-digit-roller-half-mask-height: round( nearest, calc(var(--ngs-digit-roller-mask-height) / 2), 1px );--_ngs-digit-roller-resolved-mask-height: calc(var(--_ngs-digit-roller-half-mask-height) * 2);--_ngs-digit-roller-scaled-mask-width: calc( var(--ngs-digit-roller-mask-width) / var(--_ngs-digit-roller-scale-x) );display:inline-block;line-height:1;font-variant-numeric:tabular-nums;font-feature-settings:\"tnum\";position:relative;transform-origin:left top;transform:translate(var(--_ngs-digit-roller-dx)) scaleX(var(--_ngs-digit-roller-scale-x));margin:0 calc(-1 * var(--ngs-digit-roller-mask-width));-webkit-mask-image:linear-gradient(to right,transparent 0,#000 var(--_ngs-digit-roller-scaled-mask-width),#000 calc(100% - var(--_ngs-digit-roller-scaled-mask-width)),transparent 100%),linear-gradient(to bottom,transparent 0,#000 var(--_ngs-digit-roller-resolved-mask-height),#000 calc(100% - var(--_ngs-digit-roller-resolved-mask-height)),transparent 100%),radial-gradient(at bottom right,#000 0,transparent 71%),radial-gradient(at bottom left,#000 0,transparent 71%),radial-gradient(at top left,#000 0,transparent 71%),radial-gradient(at top right,#000 0,transparent 71%);mask-image:linear-gradient(to right,transparent 0,#000 var(--_ngs-digit-roller-scaled-mask-width),#000 calc(100% - var(--_ngs-digit-roller-scaled-mask-width)),transparent 100%),linear-gradient(to bottom,transparent 0,#000 var(--_ngs-digit-roller-resolved-mask-height),#000 calc(100% - var(--_ngs-digit-roller-resolved-mask-height)),transparent 100%),radial-gradient(at bottom right,#000 0,transparent 71%),radial-gradient(at bottom left,#000 0,transparent 71%),radial-gradient(at top left,#000 0,transparent 71%),radial-gradient(at top right,#000 0,transparent 71%);-webkit-mask-size:100% calc(100% - var(--_ngs-digit-roller-resolved-mask-height) * 2),calc(100% - var(--_ngs-digit-roller-scaled-mask-width) * 2) 100%,var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height);mask-size:100% calc(100% - var(--_ngs-digit-roller-resolved-mask-height) * 2),calc(100% - var(--_ngs-digit-roller-scaled-mask-width) * 2) 100%,var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height),var(--_ngs-digit-roller-scaled-mask-width) var(--_ngs-digit-roller-resolved-mask-height);-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}:host .ngs-digit-roller__number-inner{display:inline-flex;align-items:baseline;padding:var(--_ngs-digit-roller-half-mask-height) var(--ngs-digit-roller-mask-width);transform-origin:left top;transform:scaleX(calc(1 / var(--_ngs-digit-roller-scale-x))) translate(calc(-1 * var(--_ngs-digit-roller-dx)))}:host .ngs-digit-roller__section{display:inline-flex;align-items:baseline}:host .ngs-digit-roller__digit{display:inline-block;position:relative;height:calc(1em + var(--_ngs-digit-roller-resolved-mask-height, .25em));clip-path:inset(0 -.2em);vertical-align:top;--_ngs-digit-roller-c: var(--_ngs-digit-roller-current, 0) + var(--_ngs-digit-roller-d);--_ngs-digit-roller-len: 10}:host .ngs-digit-roller__digit,:host .ngs-digit-roller__separator,:host .ngs-digit-roller__literal,:host .ngs-digit-roller__ghost{opacity:calc(1 + var(--_ngs-digit-roller-d-opacity, 0))}:host .ngs-digit-roller__digit-number{display:inline-block;height:1em;line-height:1;text-align:center;min-width:var(--ngs-digit-roller-min-digit-width);padding:var(--_ngs-digit-roller-half-mask-height, .125em) 0;box-sizing:content-box;--_ngs-digit-roller-offset-raw: mod( var(--_ngs-digit-roller-len) + var(--_ngs-digit-roller-n) - mod(var(--_ngs-digit-roller-c), var(--_ngs-digit-roller-len)), var(--_ngs-digit-roller-len) );--_ngs-digit-roller-offset: calc( var(--_ngs-digit-roller-offset-raw) - var(--_ngs-digit-roller-len) * round(down, var(--_ngs-digit-roller-offset-raw) / (var(--_ngs-digit-roller-len) / 2), 1) );--_ngs-digit-roller-y: clamp(-100%, var(--_ngs-digit-roller-offset) * 100%, 100%);transform:translateY(var(--_ngs-digit-roller-y))}:host .ngs-digit-roller__digit-number[inert]{position:absolute;top:0;left:50%;transform:translate(-50%) translateY(var(--_ngs-digit-roller-y))}:host .ngs-digit-roller__digit:not(.ngs-digit-roller__digit--spinning) .ngs-digit-roller__digit-number[inert]{display:none}:host .ngs-digit-roller__separator,:host .ngs-digit-roller__literal{display:inline-block}:host .ngs-digit-roller__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}:host[data-animated=false] .ngs-digit-roller__digit-number,:host[data-animated=false] .ngs-digit-roller__digit,:host[data-animated=false] .ngs-digit-roller__separator,:host[data-animated=false] .ngs-digit-roller__literal{transition:none!important;animation:none!important}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){:root,:host{--_ngs-digit-roller-d: 0;--_ngs-digit-roller-dx: 0px}*,:before,:after,::backdrop{--_ngs-digit-roller-d-opacity: 0;--_ngs-digit-roller-d-width: 0}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
771
+ }]
772
+ }],
773
+ ctorParameters: () => [],
774
+ propDecorators: {
775
+ value: [{
776
+ type: i0.Input,
777
+ args: [{
778
+ isSignal: true,
779
+ alias: "value",
780
+ required: true
781
+ }]
782
+ }],
783
+ format: [{
784
+ type: i0.Input,
785
+ args: [{
786
+ isSignal: true,
787
+ alias: "format",
788
+ required: false
789
+ }]
790
+ }],
791
+ locales: [{
792
+ type: i0.Input,
793
+ args: [{
794
+ isSignal: true,
795
+ alias: "locales",
796
+ required: false
797
+ }]
798
+ }],
799
+ prefix: [{
800
+ type: i0.Input,
801
+ args: [{
802
+ isSignal: true,
803
+ alias: "prefix",
804
+ required: false
805
+ }]
806
+ }],
807
+ suffix: [{
808
+ type: i0.Input,
809
+ args: [{
810
+ isSignal: true,
811
+ alias: "suffix",
812
+ required: false
813
+ }]
814
+ }],
815
+ animated: [{
816
+ type: i0.Input,
817
+ args: [{
818
+ isSignal: true,
819
+ alias: "animated",
820
+ required: false
821
+ }]
822
+ }],
823
+ duration: [{
824
+ type: i0.Input,
825
+ args: [{
826
+ isSignal: true,
827
+ alias: "duration",
828
+ required: false
829
+ }]
830
+ }],
831
+ opacityDuration: [{
832
+ type: i0.Input,
833
+ args: [{
834
+ isSignal: true,
835
+ alias: "opacityDuration",
836
+ required: false
837
+ }]
838
+ }],
839
+ transformTiming: [{
840
+ type: i0.Input,
841
+ args: [{
842
+ isSignal: true,
843
+ alias: "transformTiming",
844
+ required: false
845
+ }]
846
+ }],
847
+ spinTiming: [{
848
+ type: i0.Input,
849
+ args: [{
850
+ isSignal: true,
851
+ alias: "spinTiming",
852
+ required: false
853
+ }]
854
+ }],
855
+ opacityTiming: [{
856
+ type: i0.Input,
857
+ args: [{
858
+ isSignal: true,
859
+ alias: "opacityTiming",
860
+ required: false
861
+ }]
862
+ }],
863
+ spinEasing: [{
864
+ type: i0.Input,
865
+ args: [{
866
+ isSignal: true,
867
+ alias: "spinEasing",
868
+ required: false
869
+ }]
870
+ }],
871
+ flipEasing: [{
872
+ type: i0.Input,
873
+ args: [{
874
+ isSignal: true,
875
+ alias: "flipEasing",
876
+ required: false
877
+ }]
878
+ }],
879
+ trend: [{
880
+ type: i0.Input,
881
+ args: [{
882
+ isSignal: true,
883
+ alias: "trend",
884
+ required: false
885
+ }]
886
+ }],
887
+ continuous: [{
888
+ type: i0.Input,
889
+ args: [{
890
+ isSignal: true,
891
+ alias: "continuous",
892
+ required: false
893
+ }]
894
+ }],
895
+ digits: [{
896
+ type: i0.Input,
897
+ args: [{
898
+ isSignal: true,
899
+ alias: "digits",
900
+ required: false
901
+ }]
902
+ }],
903
+ respectMotionPreference: [{
904
+ type: i0.Input,
905
+ args: [{
906
+ isSignal: true,
907
+ alias: "respectMotionPreference",
908
+ required: false
909
+ }]
910
+ }],
911
+ stagger: [{
912
+ type: i0.Input,
913
+ args: [{
914
+ isSignal: true,
915
+ alias: "stagger",
916
+ required: false
917
+ }]
918
+ }],
919
+ colorOnIncrease: [{
920
+ type: i0.Input,
921
+ args: [{
922
+ isSignal: true,
923
+ alias: "colorOnIncrease",
924
+ required: false
925
+ }]
926
+ }],
927
+ colorOnDecrease: [{
928
+ type: i0.Input,
929
+ args: [{
930
+ isSignal: true,
931
+ alias: "colorOnDecrease",
932
+ required: false
933
+ }]
934
+ }],
935
+ animationsStart: [{
936
+ type: i0.Output,
937
+ args: ["animationsStart"]
938
+ }],
939
+ animationsFinish: [{
940
+ type: i0.Output,
941
+ args: ["animationsFinish"]
942
+ }]
943
+ }
944
+ });
945
+ var DigitRollerGroupDirective = class DigitRollerGroupDirective {
946
+ children = contentChildren(DigitRoller, {
947
+ ...ngDevMode ? { debugName: "children" } : /* istanbul ignore next */ {},
948
+ descendants: true
949
+ });
950
+ pendingUpdates = /* @__PURE__ */ new Map();
951
+ flushQueued = false;
952
+ requestGroupedUpdate(member, applyUpdate) {
953
+ if (!member.canGroupAnimateNow()) return false;
954
+ this.pendingUpdates.set(member, applyUpdate);
955
+ if (!this.flushQueued) {
956
+ this.flushQueued = true;
957
+ queueMicrotask(() => this.flushGroupedUpdates());
958
+ }
959
+ return true;
960
+ }
961
+ flushGroupedUpdates() {
962
+ this.flushQueued = false;
963
+ if (this.pendingUpdates.size === 0) return;
964
+ const members = this.children().filter((child) => child.canGroupAnimateNow());
965
+ for (const member of members) member.prepareGroupedUpdate();
966
+ for (const applyUpdate of this.pendingUpdates.values()) applyUpdate();
967
+ this.pendingUpdates.clear();
968
+ for (const member of members) member.queueGroupedAnimation();
969
+ }
970
+ static ɵfac = i0.ɵɵngDeclareFactory({
971
+ minVersion: "12.0.0",
972
+ version: "22.3.0",
973
+ ngImport: i0,
974
+ type: DigitRollerGroupDirective,
975
+ deps: [],
976
+ target: i0.ɵɵFactoryTarget.Directive
977
+ });
978
+ static ɵdir = i0.ɵɵngDeclareDirective({
979
+ minVersion: "17.2.0",
980
+ version: "22.3.0",
981
+ type: DigitRollerGroupDirective,
982
+ isStandalone: true,
983
+ selector: "[ngsDigitRollerGroup]",
984
+ providers: [{
985
+ provide: DIGIT_ROLLER_GROUP,
986
+ useExisting: forwardRef(() => DigitRollerGroupDirective)
987
+ }],
988
+ queries: [{
989
+ propertyName: "children",
990
+ predicate: DigitRoller,
991
+ descendants: true,
992
+ isSignal: true
993
+ }],
994
+ ngImport: i0
995
+ });
996
+ };
997
+ i0.ɵɵngDeclareClassMetadata({
998
+ minVersion: "12.0.0",
999
+ version: "22.3.0",
1000
+ ngImport: i0,
1001
+ type: DigitRollerGroupDirective,
1002
+ decorators: [{
1003
+ type: Directive,
1004
+ args: [{
1005
+ selector: "[ngsDigitRollerGroup]",
1006
+ providers: [{
1007
+ provide: DIGIT_ROLLER_GROUP,
1008
+ useExisting: forwardRef(() => DigitRollerGroupDirective)
1009
+ }]
1010
+ }]
1011
+ }],
1012
+ propDecorators: { children: [{
1013
+ type: i0.ContentChildren,
1014
+ args: [i0.forwardRef(() => DigitRoller), {
1015
+ descendants: true,
1016
+ isSignal: true
1017
+ }]
1018
+ }] }
1019
+ });
771
1020
  export { DIGIT_ROLLER_EMPTY_FORMATTED, DigitRoller, DigitRollerGroupDirective };
772
- //# sourceMappingURL=ngstarter-ui-components-digit-roller.mjs.map
1021
+
1022
+ //# sourceMappingURL=ngstarter-ui-components-digit-roller.mjs.map