@taiga-ui/cdk 3.60.0 → 3.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/bundles/taiga-ui-cdk-abstract.umd.js +971 -1117
  2. package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
  3. package/bundles/taiga-ui-cdk-coercion.umd.js +1 -1
  4. package/bundles/taiga-ui-cdk-coercion.umd.js.map +1 -1
  5. package/bundles/taiga-ui-cdk-components-dialog-host.umd.js +505 -651
  6. package/bundles/taiga-ui-cdk-components-dialog-host.umd.js.map +1 -1
  7. package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js +404 -550
  8. package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js.map +1 -1
  9. package/bundles/taiga-ui-cdk-components-scroll-controls.umd.js +590 -736
  10. package/bundles/taiga-ui-cdk-components-scroll-controls.umd.js.map +1 -1
  11. package/bundles/taiga-ui-cdk-constants.umd.js +80 -80
  12. package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
  13. package/bundles/taiga-ui-cdk-date-time.umd.js +33 -179
  14. package/bundles/taiga-ui-cdk-date-time.umd.js.map +1 -1
  15. package/bundles/taiga-ui-cdk-decorators.umd.js +10 -156
  16. package/bundles/taiga-ui-cdk-decorators.umd.js.map +1 -1
  17. package/bundles/taiga-ui-cdk-directives-active-zone.umd.js +434 -580
  18. package/bundles/taiga-ui-cdk-directives-active-zone.umd.js.map +1 -1
  19. package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js +706 -852
  20. package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
  21. package/bundles/taiga-ui-cdk-directives-for-async.umd.js +426 -572
  22. package/bundles/taiga-ui-cdk-directives-for-async.umd.js.map +1 -1
  23. package/bundles/taiga-ui-cdk-directives-hovered.umd.js +410 -556
  24. package/bundles/taiga-ui-cdk-directives-hovered.umd.js.map +1 -1
  25. package/bundles/taiga-ui-cdk-directives-resizer.umd.js +482 -628
  26. package/bundles/taiga-ui-cdk-directives-resizer.umd.js.map +1 -1
  27. package/bundles/taiga-ui-cdk-exceptions.umd.js +426 -572
  28. package/bundles/taiga-ui-cdk-exceptions.umd.js.map +1 -1
  29. package/bundles/taiga-ui-cdk-observables.umd.js +9 -9
  30. package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
  31. package/bundles/taiga-ui-cdk-pipes-filter.umd.js +373 -519
  32. package/bundles/taiga-ui-cdk-pipes-filter.umd.js.map +1 -1
  33. package/bundles/taiga-ui-cdk-pipes-is-present.umd.js +1 -1
  34. package/bundles/taiga-ui-cdk-pipes-is-present.umd.js.map +1 -1
  35. package/bundles/taiga-ui-cdk-pipes-keys.umd.js +1 -1
  36. package/bundles/taiga-ui-cdk-pipes-keys.umd.js.map +1 -1
  37. package/bundles/taiga-ui-cdk-pipes-mapper.umd.js +373 -519
  38. package/bundles/taiga-ui-cdk-pipes-mapper.umd.js.map +1 -1
  39. package/bundles/taiga-ui-cdk-pipes-replace.umd.js +2 -2
  40. package/bundles/taiga-ui-cdk-pipes-replace.umd.js.map +1 -1
  41. package/bundles/taiga-ui-cdk-services.umd.js +841 -984
  42. package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
  43. package/bundles/taiga-ui-cdk-tokens.umd.js +650 -796
  44. package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
  45. package/bundles/taiga-ui-cdk-utils-browser.umd.js +8 -8
  46. package/bundles/taiga-ui-cdk-utils-browser.umd.js.map +1 -1
  47. package/bundles/taiga-ui-cdk-utils-color.umd.js +26 -172
  48. package/bundles/taiga-ui-cdk-utils-color.umd.js.map +1 -1
  49. package/bundles/taiga-ui-cdk-utils-dom.umd.js +11 -11
  50. package/bundles/taiga-ui-cdk-utils-dom.umd.js.map +1 -1
  51. package/bundles/taiga-ui-cdk-utils-focus.umd.js +19 -19
  52. package/bundles/taiga-ui-cdk-utils-focus.umd.js.map +1 -1
  53. package/bundles/taiga-ui-cdk-utils-format.umd.js +1 -1
  54. package/bundles/taiga-ui-cdk-utils-format.umd.js.map +1 -1
  55. package/bundles/taiga-ui-cdk-utils-math.umd.js +7 -7
  56. package/bundles/taiga-ui-cdk-utils-math.umd.js.map +1 -1
  57. package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js +21 -167
  58. package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js.map +1 -1
  59. package/bundles/taiga-ui-cdk-utils-os.umd.js +1 -1
  60. package/bundles/taiga-ui-cdk-utils-os.umd.js.map +1 -1
  61. package/bundles/taiga-ui-cdk-utils-svg.umd.js +11 -11
  62. package/bundles/taiga-ui-cdk-utils-svg.umd.js.map +1 -1
  63. package/constants/version.d.ts +1 -1
  64. package/constants/version.js +1 -1
  65. package/esm2015/abstract/control.js +4 -4
  66. package/esm2015/abstract/interactive.js +7 -7
  67. package/esm2015/abstract/portal-host.js +2 -2
  68. package/esm2015/abstract/theme-switcher.js +2 -2
  69. package/esm2015/coercion/coerce-boolean-property.js +2 -2
  70. package/esm2015/components/dropdown-host/dropdown-portal.service.js +3 -3
  71. package/esm2015/constants/parent-animation.js +4 -4
  72. package/esm2015/constants/svg-node-filter.js +2 -2
  73. package/esm2015/constants/unicode-chars.js +13 -13
  74. package/esm2015/constants/used-icons.js +64 -64
  75. package/esm2015/constants/version.js +2 -2
  76. package/esm2015/date-time/date-format.js +2 -2
  77. package/esm2015/date-time/date-separator.js +2 -2
  78. package/esm2015/date-time/day-range.js +3 -3
  79. package/esm2015/date-time/day.js +14 -14
  80. package/esm2015/date-time/month.js +2 -2
  81. package/esm2015/date-time/time.js +7 -7
  82. package/esm2015/date-time/year.js +2 -2
  83. package/esm2015/decorators/pure.js +5 -5
  84. package/esm2015/directives/auto-focus/autofocus.options.js +2 -2
  85. package/esm2015/directives/auto-focus/handlers/abstract.handler.js +2 -2
  86. package/esm2015/directives/auto-focus/handlers/default.handler.js +2 -2
  87. package/esm2015/directives/auto-focus/handlers/ios.handler.js +28 -28
  88. package/esm2015/directives/hovered/hovered.service.js +3 -3
  89. package/esm2015/exceptions/computed-document.exception.js +2 -2
  90. package/esm2015/exceptions/document-selection.exception.js +2 -2
  91. package/esm2015/exceptions/invalid-day.exception.js +2 -2
  92. package/esm2015/exceptions/invalid-month.exception.js +2 -2
  93. package/esm2015/exceptions/invalid-year.exception.js +2 -2
  94. package/esm2015/exceptions/no-host.exception.js +2 -2
  95. package/esm2015/exceptions/owner-document.exception.js +2 -2
  96. package/esm2015/exceptions/pure.exception.js +2 -2
  97. package/esm2015/exceptions/table-sort-key.exception.js +2 -2
  98. package/esm2015/exceptions/ts-parser.exception.js +2 -2
  99. package/esm2015/exceptions/value-changes.exception.js +2 -2
  100. package/esm2015/exceptions/value-present.exception.js +2 -2
  101. package/esm2015/exceptions/xml-parsing.exception.js +2 -2
  102. package/esm2015/observables/drag-and-drop-from.js +2 -2
  103. package/esm2015/observables/focus-visible-observable.js +5 -5
  104. package/esm2015/observables/is-observed.js +2 -2
  105. package/esm2015/observables/mouse-drag-finish-from.js +2 -2
  106. package/esm2015/observables/pressed-observable.js +2 -2
  107. package/esm2015/observables/scroll-from.js +2 -2
  108. package/esm2015/pipes/filter/filter.pipe.js +2 -2
  109. package/esm2015/pipes/is-present/is-present.pipe.js +2 -2
  110. package/esm2015/pipes/keys/keys.pipe.js +2 -2
  111. package/esm2015/pipes/mapper/mapper.pipe.js +2 -2
  112. package/esm2015/pipes/replace/replace.pipe.js +3 -3
  113. package/esm2015/services/directive-styles.service.js +6 -3
  114. package/esm2015/services/id.service.js +4 -4
  115. package/esm2015/services/obscured.service.js +2 -2
  116. package/esm2015/services/pan.service.js +5 -5
  117. package/esm2015/services/parents-scroll.service.js +2 -2
  118. package/esm2015/services/scroll.service.js +8 -8
  119. package/esm2015/services/static-request.service.js +4 -4
  120. package/esm2015/services/swipe.service.js +2 -2
  121. package/esm2015/services/zoom.service.js +3 -3
  122. package/esm2015/tokens/active-element.js +9 -9
  123. package/esm2015/tokens/base-href.js +2 -2
  124. package/esm2015/tokens/ensure-base-href.js +4 -4
  125. package/esm2015/tokens/focusable-item-accessor.js +2 -2
  126. package/esm2015/tokens/fonts-ready.js +2 -2
  127. package/esm2015/tokens/is-firefox.js +2 -2
  128. package/esm2015/tokens/is-stackblitz.js +2 -2
  129. package/esm2015/tokens/platform.js +5 -5
  130. package/esm2015/tokens/touch-supported.js +2 -2
  131. package/esm2015/tokens/window-size.js +5 -5
  132. package/esm2015/utils/browser/is-edge-older-than.js +2 -2
  133. package/esm2015/utils/browser/is-edge.js +2 -2
  134. package/esm2015/utils/browser/is-firefox.js +2 -2
  135. package/esm2015/utils/browser/is-safari.js +6 -6
  136. package/esm2015/utils/color/hex-to-rgb.js +4 -4
  137. package/esm2015/utils/color/hex-to-rgba.js +5 -5
  138. package/esm2015/utils/color/parse-color.js +7 -7
  139. package/esm2015/utils/color/rgb-to-hex.js +2 -2
  140. package/esm2015/utils/color/rgba-to-hex.js +7 -7
  141. package/esm2015/utils/dom/element-checks.js +4 -4
  142. package/esm2015/utils/dom/get-clipboard-data-text.js +4 -4
  143. package/esm2015/utils/dom/get-document-or-shadow-root.js +2 -2
  144. package/esm2015/utils/dom/get-element-offset.js +2 -2
  145. package/esm2015/utils/dom/retarget-boundary-crossing.js +4 -4
  146. package/esm2015/utils/focus/is-native-keyboard-focusable.js +14 -14
  147. package/esm2015/utils/focus/is-native-mouse-focusable.js +3 -3
  148. package/esm2015/utils/focus/set-native-mouse-focused.js +5 -5
  149. package/esm2015/utils/format/px.js +2 -2
  150. package/esm2015/utils/math/round-with.js +4 -4
  151. package/esm2015/utils/math/round.js +5 -5
  152. package/esm2015/utils/miscellaneous/clean-object.js +2 -2
  153. package/esm2015/utils/miscellaneous/create-token.js +2 -2
  154. package/esm2015/utils/miscellaneous/ease-in-out-quad.js +2 -2
  155. package/esm2015/utils/miscellaneous/get-swipe-direction.js +3 -3
  156. package/esm2015/utils/miscellaneous/is-number.js +2 -2
  157. package/esm2015/utils/miscellaneous/is-object.js +2 -2
  158. package/esm2015/utils/miscellaneous/is-string.js +2 -2
  159. package/esm2015/utils/miscellaneous/is-valid-url.js +8 -8
  160. package/esm2015/utils/os/is-apple-platform.js +2 -2
  161. package/esm2015/utils/svg/svg-linear-gradient-processor.js +12 -12
  162. package/fesm2015/taiga-ui-cdk-abstract.js +11 -11
  163. package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
  164. package/fesm2015/taiga-ui-cdk-coercion.js +1 -1
  165. package/fesm2015/taiga-ui-cdk-coercion.js.map +1 -1
  166. package/fesm2015/taiga-ui-cdk-components-dropdown-host.js +2 -2
  167. package/fesm2015/taiga-ui-cdk-components-dropdown-host.js.map +1 -1
  168. package/fesm2015/taiga-ui-cdk-constants.js +80 -80
  169. package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
  170. package/fesm2015/taiga-ui-cdk-date-time.js +25 -25
  171. package/fesm2015/taiga-ui-cdk-date-time.js.map +1 -1
  172. package/fesm2015/taiga-ui-cdk-decorators.js +4 -4
  173. package/fesm2015/taiga-ui-cdk-decorators.js.map +1 -1
  174. package/fesm2015/taiga-ui-cdk-directives-auto-focus.js +30 -30
  175. package/fesm2015/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
  176. package/fesm2015/taiga-ui-cdk-directives-hovered.js +2 -2
  177. package/fesm2015/taiga-ui-cdk-directives-hovered.js.map +1 -1
  178. package/fesm2015/taiga-ui-cdk-exceptions.js +13 -13
  179. package/fesm2015/taiga-ui-cdk-exceptions.js.map +1 -1
  180. package/fesm2015/taiga-ui-cdk-observables.js +9 -9
  181. package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
  182. package/fesm2015/taiga-ui-cdk-pipes-filter.js +1 -1
  183. package/fesm2015/taiga-ui-cdk-pipes-filter.js.map +1 -1
  184. package/fesm2015/taiga-ui-cdk-pipes-is-present.js +1 -1
  185. package/fesm2015/taiga-ui-cdk-pipes-is-present.js.map +1 -1
  186. package/fesm2015/taiga-ui-cdk-pipes-keys.js +1 -1
  187. package/fesm2015/taiga-ui-cdk-pipes-keys.js.map +1 -1
  188. package/fesm2015/taiga-ui-cdk-pipes-mapper.js +1 -1
  189. package/fesm2015/taiga-ui-cdk-pipes-mapper.js.map +1 -1
  190. package/fesm2015/taiga-ui-cdk-pipes-replace.js +2 -2
  191. package/fesm2015/taiga-ui-cdk-pipes-replace.js.map +1 -1
  192. package/fesm2015/taiga-ui-cdk-services.js +27 -24
  193. package/fesm2015/taiga-ui-cdk-services.js.map +1 -1
  194. package/fesm2015/taiga-ui-cdk-tokens.js +25 -25
  195. package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
  196. package/fesm2015/taiga-ui-cdk-utils-browser.js +8 -8
  197. package/fesm2015/taiga-ui-cdk-utils-browser.js.map +1 -1
  198. package/fesm2015/taiga-ui-cdk-utils-color.js +20 -20
  199. package/fesm2015/taiga-ui-cdk-utils-color.js.map +1 -1
  200. package/fesm2015/taiga-ui-cdk-utils-dom.js +11 -11
  201. package/fesm2015/taiga-ui-cdk-utils-dom.js.map +1 -1
  202. package/fesm2015/taiga-ui-cdk-utils-focus.js +19 -19
  203. package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
  204. package/fesm2015/taiga-ui-cdk-utils-format.js +1 -1
  205. package/fesm2015/taiga-ui-cdk-utils-format.js.map +1 -1
  206. package/fesm2015/taiga-ui-cdk-utils-math.js +7 -7
  207. package/fesm2015/taiga-ui-cdk-utils-math.js.map +1 -1
  208. package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js +15 -15
  209. package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
  210. package/fesm2015/taiga-ui-cdk-utils-os.js +1 -1
  211. package/fesm2015/taiga-ui-cdk-utils-os.js.map +1 -1
  212. package/fesm2015/taiga-ui-cdk-utils-svg.js +11 -11
  213. package/fesm2015/taiga-ui-cdk-utils-svg.js.map +1 -1
  214. package/package.json +1 -1
  215. package/schematics/constants/file-globs.js +24 -24
  216. package/schematics/constants/taiga-styles.js +4 -4
  217. package/schematics/ng-add/constants/modules.js +12 -12
  218. package/schematics/ng-add/constants/packages.js +1 -1
  219. package/schematics/ng-add/constants/versions.js +3 -3
  220. package/schematics/ng-add/index.js +10 -10
  221. package/schematics/ng-add/steps/add-taiga-icons.js +4 -4
  222. package/schematics/ng-add/steps/add-taiga-modules.js +14 -14
  223. package/schematics/ng-add/steps/wrap-with-tui-root.js +12 -12
  224. package/schematics/ng-update/steps/icons/replace-imports.js +2 -2
  225. package/schematics/ng-update/steps/remove-module.js +2 -2
  226. package/schematics/ng-update/steps/rename-types.js +5 -5
  227. package/schematics/ng-update/steps/replace-deep-import.js +4 -4
  228. package/schematics/ng-update/steps/replace-enums.js +2 -2
  229. package/schematics/ng-update/steps/replace-identifier.js +2 -2
  230. package/schematics/ng-update/steps/replace-services.js +4 -4
  231. package/schematics/ng-update/steps/show-warnings.js +1 -1
  232. package/schematics/ng-update/utils/replace-text.js +1 -1
  233. package/schematics/ng-update/utils/templates/replace-tag.js +1 -1
  234. package/schematics/ng-update/v3/constants/breakpoints.js +27 -27
  235. package/schematics/ng-update/v3/constants/constants.js +187 -187
  236. package/schematics/ng-update/v3/constants/deprecated-functions.js +405 -405
  237. package/schematics/ng-update/v3/constants/enums.js +153 -153
  238. package/schematics/ng-update/v3/constants/modules.js +4 -4
  239. package/schematics/ng-update/v3/constants/services.js +16 -16
  240. package/schematics/ng-update/v3/constants/templates.js +295 -295
  241. package/schematics/ng-update/v3/constants/tui-interactive-selectors.js +50 -50
  242. package/schematics/ng-update/v3/constants/types.js +88 -88
  243. package/schematics/ng-update/v3/constants/warnings.js +62 -62
  244. package/schematics/ng-update/v3/index.js +7 -7
  245. package/schematics/ng-update/v3/steps/migrate-date-time.js +42 -42
  246. package/schematics/ng-update/v3/steps/migrate-polymorpheus.js +14 -14
  247. package/schematics/ng-update/v3/steps/migrate-progress.js +6 -6
  248. package/schematics/ng-update/v3/steps/migrate-sliders/index.js +4 -4
  249. package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-range.js +27 -27
  250. package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-slider.js +26 -26
  251. package/schematics/ng-update/v3/steps/migrate-taiga-proprietary-icons.js +7 -7
  252. package/schematics/ng-update/v3/steps/migrate-templates.js +18 -18
  253. package/schematics/ng-update/v3/steps/migrate-textfield-controller.js +33 -33
  254. package/schematics/ng-update/v3/steps/miscellaneous.js +16 -16
  255. package/schematics/ng-update/v3/steps/replace-functions.js +17 -17
  256. package/schematics/ng-update/v3/steps/replace-styles.js +12 -12
  257. package/schematics/ng-update/v3-30/constants/constants.js +2 -2
  258. package/schematics/ng-update/v3-30/constants/icons.js +494 -494
  259. package/schematics/ng-update/v3-30/index.js +4 -4
  260. package/schematics/ng-update/v3-35/constants/constants.js +2 -2
  261. package/schematics/ng-update/v3-35/constants/icons.js +1266 -1266
  262. package/schematics/ng-update/v3-35/index.js +5 -5
  263. package/schematics/ng-update/v3-36/index.js +6 -6
  264. package/schematics/ng-update/v3-40/index.js +11 -11
  265. package/schematics/ng-update/v3-5/index.js +1 -1
  266. package/schematics/ng-update/v3-5/steps/migrate-expand-templates.js +7 -7
  267. package/schematics/ng-update/v4/index.js +2 -2
  268. package/schematics/ng-update/v4/steps/constants/attr-to-directive-replace.js +19 -19
  269. package/schematics/ng-update/v4/steps/constants/attrs-to-replace.js +21 -21
  270. package/schematics/ng-update/v4/steps/constants/html-comments.js +9 -9
  271. package/schematics/ng-update/v4/steps/constants/identifiers-to-replace.js +21 -21
  272. package/schematics/ng-update/v4/steps/constants/inputs-to-remove.js +4 -4
  273. package/schematics/ng-update/v4/steps/constants/tags-to-replace.js +2 -2
  274. package/schematics/ng-update/v4/steps/migrate-templates.js +3 -3
  275. package/schematics/ng-update/v4/steps/restore-tui-mapper.js +6 -6
  276. package/schematics/ng-update/v4/steps/restore-tui-matcher.js +6 -6
  277. package/schematics/ng-update/v4/steps/templates/migrate-avatar.js +14 -14
  278. package/schematics/ng-update/v4/steps/templates/migrate-badge.js +3 -3
  279. package/schematics/ng-update/v4/steps/templates/toggles/common.js +5 -5
  280. package/schematics/ng-update/v4/steps/templates/toggles/migrate-checkbox.js +4 -4
  281. package/schematics/ng-update/v4/steps/templates/toggles/migrate-radio.js +4 -4
  282. package/schematics/ng-update/v4/steps/templates/toggles/migrate-toggle.js +4 -4
  283. package/schematics/utils/add-import-to-component.js +1 -1
  284. package/schematics/utils/angular/is-standalone-component.js +3 -3
  285. package/schematics/utils/angular/ng-component.js +1 -1
  286. package/schematics/utils/angular/ng-module.js +1 -1
  287. package/schematics/utils/angular-json-manipulations.js +5 -5
  288. package/schematics/utils/colored-log.js +11 -11
  289. package/schematics/utils/create-angular-json.js +3 -3
  290. package/schematics/utils/get-component-from-identifier.js +1 -1
  291. package/schematics/utils/get-named-import-references.js +1 -1
  292. package/schematics/utils/get-projects.js +2 -2
  293. package/schematics/utils/get-standalone-bootstrap-function.js +1 -1
  294. package/schematics/utils/insert-todo.js +1 -1
  295. package/schematics/utils/is-ci.js +1 -1
  296. package/schematics/utils/progress.js +2 -2
  297. package/schematics/utils/project-root.js +1 -1
  298. package/schematics/utils/push-to-array-property.js +1 -1
  299. package/schematics/utils/templates/elements.js +1 -1
  300. package/schematics/utils/templates/get-component-templates.js +5 -5
  301. package/schematics/utils/templates/ng-component-input-manipulations.js +5 -5
  302. package/schematics/utils/templates/template-resource.js +3 -3
  303. package/services/directive-styles.service.d.ts +3 -2
  304. package/utils/miscellaneous/is-string.js +1 -1
@@ -1,1011 +1,868 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@taiga-ui/cdk/observables'), require('rxjs/operators'), require('@ng-web-apis/common'), require('@taiga-ui/cdk/constants'), require('@taiga-ui/cdk/utils/dom'), require('@angular/common'), require('@ng-web-apis/resize-observer'), require('@taiga-ui/cdk/classes'), require('@taiga-ui/cdk/utils/math'), require('@taiga-ui/cdk/utils/miscellaneous'), require('rxjs/fetch'), require('@taiga-ui/cdk/tokens'), require('@taiga-ui/cdk/utils')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/cdk/services', ['exports', '@angular/core', 'rxjs', '@taiga-ui/cdk/observables', 'rxjs/operators', '@ng-web-apis/common', '@taiga-ui/cdk/constants', '@taiga-ui/cdk/utils/dom', '@angular/common', '@ng-web-apis/resize-observer', '@taiga-ui/cdk/classes', '@taiga-ui/cdk/utils/math', '@taiga-ui/cdk/utils/miscellaneous', 'rxjs/fetch', '@taiga-ui/cdk/tokens', '@taiga-ui/cdk/utils'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].cdk = global["taiga-ui"].cdk || {}, global["taiga-ui"].cdk.services = {}), global.ng.core, global.rxjs, global["taiga-ui"].cdk.observables, global.rxjs.operators, global.common, global["taiga-ui"].cdk.constants, global["taiga-ui"].cdk.utils.dom, global.ng.common, global.resizeObserver, global["taiga-ui"].cdk.classes, global["taiga-ui"].cdk.utils.math, global["taiga-ui"].cdk.utils.miscellaneous, global.rxjs.fetch, global["taiga-ui"].cdk.tokens, global["taiga-ui"].cdk.utils));
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@taiga-ui/cdk/observables'), require('rxjs/operators'), require('@ng-web-apis/common'), require('@taiga-ui/cdk/constants'), require('@taiga-ui/cdk/utils/dom'), require('@angular/common'), require('@ng-web-apis/resize-observer'), require('@taiga-ui/cdk/classes'), require('@taiga-ui/cdk/utils/math'), require('@taiga-ui/cdk/utils/miscellaneous'), require('rxjs/fetch'), require('@taiga-ui/cdk/tokens'), require('@taiga-ui/cdk/utils')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/cdk/services', ['exports', '@angular/core', 'rxjs', '@taiga-ui/cdk/observables', 'rxjs/operators', '@ng-web-apis/common', '@taiga-ui/cdk/constants', '@taiga-ui/cdk/utils/dom', '@angular/common', '@ng-web-apis/resize-observer', '@taiga-ui/cdk/classes', '@taiga-ui/cdk/utils/math', '@taiga-ui/cdk/utils/miscellaneous', 'rxjs/fetch', '@taiga-ui/cdk/tokens', '@taiga-ui/cdk/utils'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].cdk = global["taiga-ui"].cdk || {}, global["taiga-ui"].cdk.services = {}), global.ng.core, global.rxjs, global["taiga-ui"].cdk.observables, global.rxjs.operators, global.common, global["taiga-ui"].cdk.constants, global["taiga-ui"].cdk.utils.dom, global.ng.common, global.resizeObserver, global["taiga-ui"].cdk.classes, global["taiga-ui"].cdk.utils.math, global["taiga-ui"].cdk.utils.miscellaneous, global.rxjs.fetch, global["taiga-ui"].cdk.tokens, global["taiga-ui"].cdk.utils));
5
5
  })(this, (function (exports, i0, i1, observables, operators, common, constants, dom, common$1, resizeObserver, classes, math, miscellaneous, fetch$1, tokens, utils) { 'use strict';
6
6
 
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () { return e[k]; }
17
- });
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
18
20
  }
19
- });
21
+ n["default"] = e;
22
+ return Object.freeze(n);
20
23
  }
21
- n["default"] = e;
22
- return Object.freeze(n);
23
- }
24
24
 
25
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
27
27
 
28
- /******************************************************************************
29
- Copyright (c) Microsoft Corporation.
28
+ /*! *****************************************************************************
29
+ Copyright (c) Microsoft Corporation.
30
30
 
31
- Permission to use, copy, modify, and/or distribute this software for any
32
- purpose with or without fee is hereby granted.
31
+ Permission to use, copy, modify, and/or distribute this software for any
32
+ purpose with or without fee is hereby granted.
33
33
 
34
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
35
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
36
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
37
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
38
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
39
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
40
- PERFORMANCE OF THIS SOFTWARE.
41
- ***************************************************************************** */
42
- /* global Reflect, Promise, SuppressedError, Symbol */
43
- var extendStatics = function (d, b) {
44
- extendStatics = Object.setPrototypeOf ||
45
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
46
- function (d, b) { for (var p in b)
47
- if (Object.prototype.hasOwnProperty.call(b, p))
48
- d[p] = b[p]; };
49
- return extendStatics(d, b);
50
- };
51
- function __extends(d, b) {
52
- if (typeof b !== "function" && b !== null)
53
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
54
- extendStatics(d, b);
55
- function __() { this.constructor = d; }
56
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
57
- }
58
- var __assign = function () {
59
- __assign = Object.assign || function __assign(t) {
60
- for (var s, i = 1, n = arguments.length; i < n; i++) {
61
- s = arguments[i];
62
- for (var p in s)
63
- if (Object.prototype.hasOwnProperty.call(s, p))
64
- t[p] = s[p];
65
- }
66
- return t;
67
- };
68
- return __assign.apply(this, arguments);
69
- };
70
- function __rest(s, e) {
71
- var t = {};
72
- for (var p in s)
73
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
74
- t[p] = s[p];
75
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
76
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
77
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
78
- t[p[i]] = s[p[i]];
79
- }
80
- return t;
81
- }
82
- function __decorate(decorators, target, key, desc) {
83
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
84
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
85
- r = Reflect.decorate(decorators, target, key, desc);
86
- else
87
- for (var i = decorators.length - 1; i >= 0; i--)
88
- if (d = decorators[i])
89
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
90
- return c > 3 && r && Object.defineProperty(target, key, r), r;
91
- }
92
- function __param(paramIndex, decorator) {
93
- return function (target, key) { decorator(target, key, paramIndex); };
94
- }
95
- function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
96
- function accept(f) { if (f !== void 0 && typeof f !== "function")
97
- throw new TypeError("Function expected"); return f; }
98
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
99
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
100
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
101
- var _, done = false;
102
- for (var i = decorators.length - 1; i >= 0; i--) {
103
- var context = {};
104
- for (var p in contextIn)
105
- context[p] = p === "access" ? {} : contextIn[p];
106
- for (var p in contextIn.access)
107
- context.access[p] = contextIn.access[p];
108
- context.addInitializer = function (f) { if (done)
109
- throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
110
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
111
- if (kind === "accessor") {
112
- if (result === void 0)
113
- continue;
114
- if (result === null || typeof result !== "object")
115
- throw new TypeError("Object expected");
116
- if (_ = accept(result.get))
117
- descriptor.get = _;
118
- if (_ = accept(result.set))
119
- descriptor.set = _;
120
- if (_ = accept(result.init))
121
- initializers.unshift(_);
122
- }
123
- else if (_ = accept(result)) {
124
- if (kind === "field")
125
- initializers.unshift(_);
126
- else
127
- descriptor[key] = _;
128
- }
129
- }
130
- if (target)
131
- Object.defineProperty(target, contextIn.name, descriptor);
132
- done = true;
133
- }
134
- ;
135
- function __runInitializers(thisArg, initializers, value) {
136
- var useValue = arguments.length > 2;
137
- for (var i = 0; i < initializers.length; i++) {
138
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
139
- }
140
- return useValue ? value : void 0;
141
- }
142
- ;
143
- function __propKey(x) {
144
- return typeof x === "symbol" ? x : "".concat(x);
145
- }
146
- ;
147
- function __setFunctionName(f, name, prefix) {
148
- if (typeof name === "symbol")
149
- name = name.description ? "[".concat(name.description, "]") : "";
150
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
151
- }
152
- ;
153
- function __metadata(metadataKey, metadataValue) {
154
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
155
- return Reflect.metadata(metadataKey, metadataValue);
156
- }
157
- function __awaiter(thisArg, _arguments, P, generator) {
158
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
159
- return new (P || (P = Promise))(function (resolve, reject) {
160
- function fulfilled(value) { try {
161
- step(generator.next(value));
162
- }
163
- catch (e) {
164
- reject(e);
165
- } }
166
- function rejected(value) { try {
167
- step(generator["throw"](value));
168
- }
169
- catch (e) {
170
- reject(e);
171
- } }
172
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
173
- step((generator = generator.apply(thisArg, _arguments || [])).next());
174
- });
175
- }
176
- function __generator(thisArg, body) {
177
- var _ = { label: 0, sent: function () { if (t[0] & 1)
178
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
179
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
180
- function verb(n) { return function (v) { return step([n, v]); }; }
181
- function step(op) {
182
- if (f)
183
- throw new TypeError("Generator is already executing.");
184
- while (g && (g = 0, op[0] && (_ = 0)), _)
185
- try {
186
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
187
- return t;
188
- if (y = 0, t)
189
- op = [op[0] & 2, t.value];
190
- switch (op[0]) {
191
- case 0:
192
- case 1:
193
- t = op;
194
- break;
195
- case 4:
196
- _.label++;
197
- return { value: op[1], done: false };
198
- case 5:
199
- _.label++;
200
- y = op[1];
201
- op = [0];
202
- continue;
203
- case 7:
204
- op = _.ops.pop();
205
- _.trys.pop();
206
- continue;
207
- default:
208
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
209
- _ = 0;
210
- continue;
211
- }
212
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
213
- _.label = op[1];
214
- break;
215
- }
216
- if (op[0] === 6 && _.label < t[1]) {
217
- _.label = t[1];
218
- t = op;
219
- break;
220
- }
221
- if (t && _.label < t[2]) {
222
- _.label = t[2];
223
- _.ops.push(op);
224
- break;
225
- }
226
- if (t[2])
227
- _.ops.pop();
228
- _.trys.pop();
229
- continue;
230
- }
231
- op = body.call(thisArg, _);
232
- }
233
- catch (e) {
234
- op = [6, e];
235
- y = 0;
236
- }
237
- finally {
238
- f = t = 0;
239
- }
240
- if (op[0] & 5)
241
- throw op[1];
242
- return { value: op[0] ? op[1] : void 0, done: true };
243
- }
244
- }
245
- var __createBinding = Object.create ? (function (o, m, k, k2) {
246
- if (k2 === undefined)
247
- k2 = k;
248
- var desc = Object.getOwnPropertyDescriptor(m, k);
249
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
250
- desc = { enumerable: true, get: function () { return m[k]; } };
251
- }
252
- Object.defineProperty(o, k2, desc);
253
- }) : (function (o, m, k, k2) {
254
- if (k2 === undefined)
255
- k2 = k;
256
- o[k2] = m[k];
257
- });
258
- function __exportStar(m, o) {
259
- for (var p in m)
260
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
261
- __createBinding(o, m, p);
262
- }
263
- function __values(o) {
264
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
265
- if (m)
266
- return m.call(o);
267
- if (o && typeof o.length === "number")
268
- return {
269
- next: function () {
270
- if (o && i >= o.length)
271
- o = void 0;
272
- return { value: o && o[i++], done: !o };
273
- }
274
- };
275
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
276
- }
277
- function __read(o, n) {
278
- var m = typeof Symbol === "function" && o[Symbol.iterator];
279
- if (!m)
280
- return o;
281
- var i = m.call(o), r, ar = [], e;
282
- try {
283
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
284
- ar.push(r.value);
285
- }
286
- catch (error) {
287
- e = { error: error };
288
- }
289
- finally {
290
- try {
291
- if (r && !r.done && (m = i["return"]))
292
- m.call(i);
293
- }
294
- finally {
295
- if (e)
296
- throw e.error;
297
- }
298
- }
299
- return ar;
300
- }
301
- /** @deprecated */
302
- function __spread() {
303
- for (var ar = [], i = 0; i < arguments.length; i++)
304
- ar = ar.concat(__read(arguments[i]));
305
- return ar;
306
- }
307
- /** @deprecated */
308
- function __spreadArrays() {
309
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
310
- s += arguments[i].length;
311
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
312
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
313
- r[k] = a[j];
314
- return r;
315
- }
316
- function __spreadArray(to, from, pack) {
317
- if (pack || arguments.length === 2)
318
- for (var i = 0, l = from.length, ar; i < l; i++) {
319
- if (ar || !(i in from)) {
320
- if (!ar)
321
- ar = Array.prototype.slice.call(from, 0, i);
322
- ar[i] = from[i];
323
- }
324
- }
325
- return to.concat(ar || Array.prototype.slice.call(from));
326
- }
327
- function __await(v) {
328
- return this instanceof __await ? (this.v = v, this) : new __await(v);
329
- }
330
- function __asyncGenerator(thisArg, _arguments, generator) {
331
- if (!Symbol.asyncIterator)
332
- throw new TypeError("Symbol.asyncIterator is not defined.");
333
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
334
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
335
- function verb(n) { if (g[n])
336
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
337
- function resume(n, v) { try {
338
- step(g[n](v));
339
- }
340
- catch (e) {
341
- settle(q[0][3], e);
342
- } }
343
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
344
- function fulfill(value) { resume("next", value); }
345
- function reject(value) { resume("throw", value); }
346
- function settle(f, v) { if (f(v), q.shift(), q.length)
347
- resume(q[0][0], q[0][1]); }
348
- }
349
- function __asyncDelegator(o) {
350
- var i, p;
351
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
352
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
353
- }
354
- function __asyncValues(o) {
355
- if (!Symbol.asyncIterator)
356
- throw new TypeError("Symbol.asyncIterator is not defined.");
357
- var m = o[Symbol.asyncIterator], i;
358
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
359
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
360
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
361
- }
362
- function __makeTemplateObject(cooked, raw) {
363
- if (Object.defineProperty) {
364
- Object.defineProperty(cooked, "raw", { value: raw });
365
- }
366
- else {
367
- cooked.raw = raw;
368
- }
369
- return cooked;
370
- }
371
- ;
372
- var __setModuleDefault = Object.create ? (function (o, v) {
373
- Object.defineProperty(o, "default", { enumerable: true, value: v });
374
- }) : function (o, v) {
375
- o["default"] = v;
376
- };
377
- function __importStar(mod) {
378
- if (mod && mod.__esModule)
379
- return mod;
380
- var result = {};
381
- if (mod != null)
382
- for (var k in mod)
383
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
384
- __createBinding(result, mod, k);
385
- __setModuleDefault(result, mod);
386
- return result;
387
- }
388
- function __importDefault(mod) {
389
- return (mod && mod.__esModule) ? mod : { default: mod };
390
- }
391
- function __classPrivateFieldGet(receiver, state, kind, f) {
392
- if (kind === "a" && !f)
393
- throw new TypeError("Private accessor was defined without a getter");
394
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
395
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
396
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
397
- }
398
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
399
- if (kind === "m")
400
- throw new TypeError("Private method is not writable");
401
- if (kind === "a" && !f)
402
- throw new TypeError("Private accessor was defined without a setter");
403
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
404
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
405
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
406
- }
407
- function __classPrivateFieldIn(state, receiver) {
408
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
409
- throw new TypeError("Cannot use 'in' operator on non-object");
410
- return typeof state === "function" ? receiver === state : state.has(receiver);
411
- }
412
- function __addDisposableResource(env, value, async) {
413
- if (value !== null && value !== void 0) {
414
- if (typeof value !== "object" && typeof value !== "function")
415
- throw new TypeError("Object expected.");
416
- var dispose;
417
- if (async) {
418
- if (!Symbol.asyncDispose)
419
- throw new TypeError("Symbol.asyncDispose is not defined.");
420
- dispose = value[Symbol.asyncDispose];
421
- }
422
- if (dispose === void 0) {
423
- if (!Symbol.dispose)
424
- throw new TypeError("Symbol.dispose is not defined.");
425
- dispose = value[Symbol.dispose];
426
- }
427
- if (typeof dispose !== "function")
428
- throw new TypeError("Object not disposable.");
429
- env.stack.push({ value: value, dispose: dispose, async: async });
430
- }
431
- else if (async) {
432
- env.stack.push({ async: true });
433
- }
434
- return value;
435
- }
436
- var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
437
- var e = new Error(message);
438
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
439
- };
440
- function __disposeResources(env) {
441
- function fail(e) {
442
- env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
443
- env.hasError = true;
444
- }
445
- function next() {
446
- while (env.stack.length) {
447
- var rec = env.stack.pop();
448
- try {
449
- var result = rec.dispose && rec.dispose.call(rec.value);
450
- if (rec.async)
451
- return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
452
- }
453
- catch (e) {
454
- fail(e);
455
- }
456
- }
457
- if (env.hasError)
458
- throw env.error;
459
- }
460
- return next();
461
- }
462
- var tslib_es6 = {
463
- __extends: __extends,
464
- __assign: __assign,
465
- __rest: __rest,
466
- __decorate: __decorate,
467
- __param: __param,
468
- __metadata: __metadata,
469
- __awaiter: __awaiter,
470
- __generator: __generator,
471
- __createBinding: __createBinding,
472
- __exportStar: __exportStar,
473
- __values: __values,
474
- __read: __read,
475
- __spread: __spread,
476
- __spreadArrays: __spreadArrays,
477
- __spreadArray: __spreadArray,
478
- __await: __await,
479
- __asyncGenerator: __asyncGenerator,
480
- __asyncDelegator: __asyncDelegator,
481
- __asyncValues: __asyncValues,
482
- __makeTemplateObject: __makeTemplateObject,
483
- __importStar: __importStar,
484
- __importDefault: __importDefault,
485
- __classPrivateFieldGet: __classPrivateFieldGet,
486
- __classPrivateFieldSet: __classPrivateFieldSet,
487
- __classPrivateFieldIn: __classPrivateFieldIn,
488
- __addDisposableResource: __addDisposableResource,
489
- __disposeResources: __disposeResources,
490
- };
34
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
35
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
36
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
37
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
38
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
39
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
40
+ PERFORMANCE OF THIS SOFTWARE.
41
+ ***************************************************************************** */
42
+ /* global Reflect, Promise */
43
+ var extendStatics = function (d, b) {
44
+ extendStatics = Object.setPrototypeOf ||
45
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
46
+ function (d, b) { for (var p in b)
47
+ if (Object.prototype.hasOwnProperty.call(b, p))
48
+ d[p] = b[p]; };
49
+ return extendStatics(d, b);
50
+ };
51
+ function __extends(d, b) {
52
+ if (typeof b !== "function" && b !== null)
53
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
54
+ extendStatics(d, b);
55
+ function __() { this.constructor = d; }
56
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
57
+ }
58
+ var __assign = function () {
59
+ __assign = Object.assign || function __assign(t) {
60
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
61
+ s = arguments[i];
62
+ for (var p in s)
63
+ if (Object.prototype.hasOwnProperty.call(s, p))
64
+ t[p] = s[p];
65
+ }
66
+ return t;
67
+ };
68
+ return __assign.apply(this, arguments);
69
+ };
70
+ function __rest(s, e) {
71
+ var t = {};
72
+ for (var p in s)
73
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
74
+ t[p] = s[p];
75
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
76
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
77
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
78
+ t[p[i]] = s[p[i]];
79
+ }
80
+ return t;
81
+ }
82
+ function __decorate(decorators, target, key, desc) {
83
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
84
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
85
+ r = Reflect.decorate(decorators, target, key, desc);
86
+ else
87
+ for (var i = decorators.length - 1; i >= 0; i--)
88
+ if (d = decorators[i])
89
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
90
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
91
+ }
92
+ function __param(paramIndex, decorator) {
93
+ return function (target, key) { decorator(target, key, paramIndex); };
94
+ }
95
+ function __metadata(metadataKey, metadataValue) {
96
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
97
+ return Reflect.metadata(metadataKey, metadataValue);
98
+ }
99
+ function __awaiter(thisArg, _arguments, P, generator) {
100
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
101
+ return new (P || (P = Promise))(function (resolve, reject) {
102
+ function fulfilled(value) { try {
103
+ step(generator.next(value));
104
+ }
105
+ catch (e) {
106
+ reject(e);
107
+ } }
108
+ function rejected(value) { try {
109
+ step(generator["throw"](value));
110
+ }
111
+ catch (e) {
112
+ reject(e);
113
+ } }
114
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
115
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
116
+ });
117
+ }
118
+ function __generator(thisArg, body) {
119
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
120
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
121
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
122
+ function verb(n) { return function (v) { return step([n, v]); }; }
123
+ function step(op) {
124
+ if (f)
125
+ throw new TypeError("Generator is already executing.");
126
+ while (_)
127
+ try {
128
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
129
+ return t;
130
+ if (y = 0, t)
131
+ op = [op[0] & 2, t.value];
132
+ switch (op[0]) {
133
+ case 0:
134
+ case 1:
135
+ t = op;
136
+ break;
137
+ case 4:
138
+ _.label++;
139
+ return { value: op[1], done: false };
140
+ case 5:
141
+ _.label++;
142
+ y = op[1];
143
+ op = [0];
144
+ continue;
145
+ case 7:
146
+ op = _.ops.pop();
147
+ _.trys.pop();
148
+ continue;
149
+ default:
150
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
151
+ _ = 0;
152
+ continue;
153
+ }
154
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
155
+ _.label = op[1];
156
+ break;
157
+ }
158
+ if (op[0] === 6 && _.label < t[1]) {
159
+ _.label = t[1];
160
+ t = op;
161
+ break;
162
+ }
163
+ if (t && _.label < t[2]) {
164
+ _.label = t[2];
165
+ _.ops.push(op);
166
+ break;
167
+ }
168
+ if (t[2])
169
+ _.ops.pop();
170
+ _.trys.pop();
171
+ continue;
172
+ }
173
+ op = body.call(thisArg, _);
174
+ }
175
+ catch (e) {
176
+ op = [6, e];
177
+ y = 0;
178
+ }
179
+ finally {
180
+ f = t = 0;
181
+ }
182
+ if (op[0] & 5)
183
+ throw op[1];
184
+ return { value: op[0] ? op[1] : void 0, done: true };
185
+ }
186
+ }
187
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
188
+ if (k2 === undefined)
189
+ k2 = k;
190
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
191
+ }) : (function (o, m, k, k2) {
192
+ if (k2 === undefined)
193
+ k2 = k;
194
+ o[k2] = m[k];
195
+ });
196
+ function __exportStar(m, o) {
197
+ for (var p in m)
198
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
199
+ __createBinding(o, m, p);
200
+ }
201
+ function __values(o) {
202
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
203
+ if (m)
204
+ return m.call(o);
205
+ if (o && typeof o.length === "number")
206
+ return {
207
+ next: function () {
208
+ if (o && i >= o.length)
209
+ o = void 0;
210
+ return { value: o && o[i++], done: !o };
211
+ }
212
+ };
213
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
214
+ }
215
+ function __read(o, n) {
216
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
217
+ if (!m)
218
+ return o;
219
+ var i = m.call(o), r, ar = [], e;
220
+ try {
221
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
222
+ ar.push(r.value);
223
+ }
224
+ catch (error) {
225
+ e = { error: error };
226
+ }
227
+ finally {
228
+ try {
229
+ if (r && !r.done && (m = i["return"]))
230
+ m.call(i);
231
+ }
232
+ finally {
233
+ if (e)
234
+ throw e.error;
235
+ }
236
+ }
237
+ return ar;
238
+ }
239
+ /** @deprecated */
240
+ function __spread() {
241
+ for (var ar = [], i = 0; i < arguments.length; i++)
242
+ ar = ar.concat(__read(arguments[i]));
243
+ return ar;
244
+ }
245
+ /** @deprecated */
246
+ function __spreadArrays() {
247
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
248
+ s += arguments[i].length;
249
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
250
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
251
+ r[k] = a[j];
252
+ return r;
253
+ }
254
+ function __spreadArray(to, from, pack) {
255
+ if (pack || arguments.length === 2)
256
+ for (var i = 0, l = from.length, ar; i < l; i++) {
257
+ if (ar || !(i in from)) {
258
+ if (!ar)
259
+ ar = Array.prototype.slice.call(from, 0, i);
260
+ ar[i] = from[i];
261
+ }
262
+ }
263
+ return to.concat(ar || from);
264
+ }
265
+ function __await(v) {
266
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
267
+ }
268
+ function __asyncGenerator(thisArg, _arguments, generator) {
269
+ if (!Symbol.asyncIterator)
270
+ throw new TypeError("Symbol.asyncIterator is not defined.");
271
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
272
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
273
+ function verb(n) { if (g[n])
274
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
275
+ function resume(n, v) { try {
276
+ step(g[n](v));
277
+ }
278
+ catch (e) {
279
+ settle(q[0][3], e);
280
+ } }
281
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
282
+ function fulfill(value) { resume("next", value); }
283
+ function reject(value) { resume("throw", value); }
284
+ function settle(f, v) { if (f(v), q.shift(), q.length)
285
+ resume(q[0][0], q[0][1]); }
286
+ }
287
+ function __asyncDelegator(o) {
288
+ var i, p;
289
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
290
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
291
+ }
292
+ function __asyncValues(o) {
293
+ if (!Symbol.asyncIterator)
294
+ throw new TypeError("Symbol.asyncIterator is not defined.");
295
+ var m = o[Symbol.asyncIterator], i;
296
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
297
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
298
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
299
+ }
300
+ function __makeTemplateObject(cooked, raw) {
301
+ if (Object.defineProperty) {
302
+ Object.defineProperty(cooked, "raw", { value: raw });
303
+ }
304
+ else {
305
+ cooked.raw = raw;
306
+ }
307
+ return cooked;
308
+ }
309
+ ;
310
+ var __setModuleDefault = Object.create ? (function (o, v) {
311
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
312
+ }) : function (o, v) {
313
+ o["default"] = v;
314
+ };
315
+ function __importStar(mod) {
316
+ if (mod && mod.__esModule)
317
+ return mod;
318
+ var result = {};
319
+ if (mod != null)
320
+ for (var k in mod)
321
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
322
+ __createBinding(result, mod, k);
323
+ __setModuleDefault(result, mod);
324
+ return result;
325
+ }
326
+ function __importDefault(mod) {
327
+ return (mod && mod.__esModule) ? mod : { default: mod };
328
+ }
329
+ function __classPrivateFieldGet(receiver, state, kind, f) {
330
+ if (kind === "a" && !f)
331
+ throw new TypeError("Private accessor was defined without a getter");
332
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
333
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
334
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
335
+ }
336
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
337
+ if (kind === "m")
338
+ throw new TypeError("Private method is not writable");
339
+ if (kind === "a" && !f)
340
+ throw new TypeError("Private accessor was defined without a setter");
341
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
342
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
343
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
344
+ }
491
345
 
492
- /**
493
- * @note:
494
- * Observable abstraction over ngOnDestroy to use with takeUntil
495
- *
496
- * Why we use `ReplaySubject` instead of `Subject`?
497
- * Well, we’ll use ReplaySubject to emit the last message in case
498
- * the subscription is ended after the component is destroyed.
499
- */
500
- var TuiDestroyService = /** @class */ (function (_super) {
501
- __extends(TuiDestroyService, _super);
502
- function TuiDestroyService() {
503
- return _super.call(this, 1) || this;
504
- }
505
- TuiDestroyService.prototype.ngOnDestroy = function () {
506
- this.next();
507
- this.complete();
508
- };
509
- return TuiDestroyService;
510
- }(i1.ReplaySubject));
511
- TuiDestroyService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDestroyService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
512
- TuiDestroyService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDestroyService });
513
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDestroyService, decorators: [{
514
- type: i0.Injectable
515
- }], ctorParameters: function () { return []; } });
346
+ /**
347
+ * @note:
348
+ * Observable abstraction over ngOnDestroy to use with takeUntil
349
+ *
350
+ * Why we use `ReplaySubject` instead of `Subject`?
351
+ * Well, we’ll use ReplaySubject to emit the last message in case
352
+ * the subscription is ended after the component is destroyed.
353
+ */
354
+ var TuiDestroyService = /** @class */ (function (_super) {
355
+ __extends(TuiDestroyService, _super);
356
+ function TuiDestroyService() {
357
+ return _super.call(this, 1) || this;
358
+ }
359
+ TuiDestroyService.prototype.ngOnDestroy = function () {
360
+ this.next();
361
+ this.complete();
362
+ };
363
+ return TuiDestroyService;
364
+ }(i1.ReplaySubject));
365
+ TuiDestroyService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDestroyService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
366
+ TuiDestroyService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDestroyService });
367
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDestroyService, decorators: [{
368
+ type: i0.Injectable
369
+ }], ctorParameters: function () { return []; } });
516
370
 
517
- /**
518
- * Service to use styles with directives
519
- */
520
- var TuiDirectiveStylesService = /** @class */ (function () {
521
- function TuiDirectiveStylesService(resolver, injector) {
522
- this.resolver = resolver;
523
- this.injector = injector;
524
- this.map = new Map();
525
- }
526
- TuiDirectiveStylesService.prototype.addComponent = function (component) {
527
- if (!this.map.has(component)) {
528
- this.map.set(component, this.resolver.resolveComponentFactory(component).create(this.injector));
529
- }
530
- };
531
- return TuiDirectiveStylesService;
532
- }());
533
- TuiDirectiveStylesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDirectiveStylesService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.INJECTOR }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
534
- TuiDirectiveStylesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDirectiveStylesService, providedIn: "root" });
535
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDirectiveStylesService, decorators: [{
536
- type: i0.Injectable,
537
- args: [{
538
- providedIn: "root",
539
- }]
540
- }], ctorParameters: function () {
541
- return [{ type: i0__namespace.ComponentFactoryResolver, decorators: [{
542
- type: i0.Inject,
543
- args: [i0.ComponentFactoryResolver]
544
- }] }, { type: i0__namespace.Injector, decorators: [{
545
- type: i0.Inject,
546
- args: [i0.INJECTOR]
547
- }] }];
548
- } });
371
+ /**
372
+ * Service to use styles with directives
373
+ */
374
+ var TuiDirectiveStylesService = /** @class */ (function () {
375
+ function TuiDirectiveStylesService(resolver, injector) {
376
+ this.resolver = resolver;
377
+ this.injector = injector;
378
+ this.map = new Map();
379
+ }
380
+ TuiDirectiveStylesService.prototype.addComponent = function (component) {
381
+ if (!this.map.has(component)) {
382
+ this.map.set(component, this.resolver.resolveComponentFactory(component).create(this.injector));
383
+ }
384
+ };
385
+ TuiDirectiveStylesService.prototype.ngOnDestroy = function () {
386
+ this.map.forEach(function (value) { return value.destroy(); });
387
+ };
388
+ return TuiDirectiveStylesService;
389
+ }());
390
+ TuiDirectiveStylesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDirectiveStylesService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.INJECTOR }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
391
+ TuiDirectiveStylesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDirectiveStylesService, providedIn: 'root' });
392
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDirectiveStylesService, decorators: [{
393
+ type: i0.Injectable,
394
+ args: [{
395
+ providedIn: 'root',
396
+ }]
397
+ }], ctorParameters: function () {
398
+ return [{ type: i0__namespace.ComponentFactoryResolver, decorators: [{
399
+ type: i0.Inject,
400
+ args: [i0.ComponentFactoryResolver]
401
+ }] }, { type: i0__namespace.Injector, decorators: [{
402
+ type: i0.Inject,
403
+ args: [i0.INJECTOR]
404
+ }] }];
405
+ } });
549
406
 
550
- /**
551
- * Service to imitate :focus-visible
552
- * (https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible)
553
- * in browsers that do not support it
554
- */
555
- var TuiFocusVisibleService = /** @class */ (function (_super) {
556
- __extends(TuiFocusVisibleService, _super);
557
- function TuiFocusVisibleService(_a, cdr, destroy$) {
558
- var nativeElement = _a.nativeElement;
559
- var _this = _super.call(this, function (subscriber) { return _this.focusVisible$.subscribe(subscriber); }) || this;
560
- _this.focusVisible$ = observables.tuiFocusVisibleObservable(nativeElement).pipe(observables.tuiWatch(cdr), operators.takeUntil(destroy$));
561
- return _this;
562
- }
563
- return TuiFocusVisibleService;
564
- }(i1.Observable));
565
- TuiFocusVisibleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFocusVisibleService, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: TuiDestroyService, self: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
566
- TuiFocusVisibleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFocusVisibleService });
567
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFocusVisibleService, decorators: [{
568
- type: i0.Injectable
569
- }], ctorParameters: function () {
570
- return [{ type: i0__namespace.ElementRef, decorators: [{
571
- type: i0.Inject,
572
- args: [i0.ElementRef]
573
- }] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
574
- type: i0.Inject,
575
- args: [i0.ChangeDetectorRef]
576
- }] }, { type: i1__namespace.Observable, decorators: [{
577
- type: i0.Self
578
- }, {
579
- type: i0.Inject,
580
- args: [TuiDestroyService]
581
- }] }];
582
- } });
407
+ /**
408
+ * Service to imitate :focus-visible
409
+ * (https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible)
410
+ * in browsers that do not support it
411
+ */
412
+ var TuiFocusVisibleService = /** @class */ (function (_super) {
413
+ __extends(TuiFocusVisibleService, _super);
414
+ function TuiFocusVisibleService(_a, cdr, destroy$) {
415
+ var nativeElement = _a.nativeElement;
416
+ var _this = _super.call(this, function (subscriber) { return _this.focusVisible$.subscribe(subscriber); }) || this;
417
+ _this.focusVisible$ = observables.tuiFocusVisibleObservable(nativeElement).pipe(observables.tuiWatch(cdr), operators.takeUntil(destroy$));
418
+ return _this;
419
+ }
420
+ return TuiFocusVisibleService;
421
+ }(i1.Observable));
422
+ TuiFocusVisibleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFocusVisibleService, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: TuiDestroyService, self: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
423
+ TuiFocusVisibleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFocusVisibleService });
424
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFocusVisibleService, decorators: [{
425
+ type: i0.Injectable
426
+ }], ctorParameters: function () {
427
+ return [{ type: i0__namespace.ElementRef, decorators: [{
428
+ type: i0.Inject,
429
+ args: [i0.ElementRef]
430
+ }] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
431
+ type: i0.Inject,
432
+ args: [i0.ChangeDetectorRef]
433
+ }] }, { type: i1__namespace.Observable, decorators: [{
434
+ type: i0.Self
435
+ }, {
436
+ type: i0.Inject,
437
+ args: [TuiDestroyService]
438
+ }] }];
439
+ } });
583
440
 
584
- var TUI = "tui_";
585
- /**
586
- * Generates unique ids
587
- */
588
- var TuiIdService = /** @class */ (function () {
589
- function TuiIdService() {
590
- }
591
- TuiIdService.prototype.generate = function () {
592
- return "" + TUI + TuiIdService.autoId++ + Date.now();
593
- };
594
- return TuiIdService;
595
- }());
596
- TuiIdService.autoId = 0;
597
- TuiIdService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIdService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
598
- TuiIdService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIdService, providedIn: "root" });
599
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIdService, decorators: [{
600
- type: i0.Injectable,
601
- args: [{
602
- providedIn: "root",
603
- }]
604
- }] });
441
+ var TUI = 'tui_';
442
+ /**
443
+ * Generates unique ids
444
+ */
445
+ var TuiIdService = /** @class */ (function () {
446
+ function TuiIdService() {
447
+ }
448
+ TuiIdService.prototype.generate = function () {
449
+ return "" + TUI + TuiIdService.autoId++ + Date.now();
450
+ };
451
+ return TuiIdService;
452
+ }());
453
+ TuiIdService.autoId = 0;
454
+ TuiIdService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIdService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
455
+ TuiIdService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIdService, providedIn: 'root' });
456
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIdService, decorators: [{
457
+ type: i0.Injectable,
458
+ args: [{
459
+ providedIn: 'root',
460
+ }]
461
+ }] });
605
462
 
606
- /**
607
- * Service that subscribes to scroll events of all parent elements
608
- */
609
- var TuiParentsScrollService = /** @class */ (function (_super) {
610
- __extends(TuiParentsScrollService, _super);
611
- function TuiParentsScrollService(
612
- // Destructuring here causes memory leak
613
- el, win) {
614
- var _this = _super.call(this, function (subscriber) { return _this.callback$.subscribe(subscriber); }) || this;
615
- _this.callback$ = i1.defer(function () {
616
- var nativeElement = el.nativeElement;
617
- var eventTargets = [win, nativeElement];
618
- while (nativeElement.parentElement) {
619
- nativeElement = nativeElement.parentElement;
620
- eventTargets.push(nativeElement);
621
- }
622
- return i1.merge.apply(void 0, __spreadArray([], __read(eventTargets.map(function (element) { return observables.tuiTypedFromEvent(element, "scroll"); }))));
623
- });
624
- return _this;
625
- }
626
- return TuiParentsScrollService;
627
- }(i1.Observable));
628
- TuiParentsScrollService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiParentsScrollService, deps: [{ token: i0.ElementRef }, { token: common.WINDOW }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
629
- TuiParentsScrollService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiParentsScrollService });
630
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiParentsScrollService, decorators: [{
631
- type: i0.Injectable
632
- }], ctorParameters: function () {
633
- return [{ type: i0__namespace.ElementRef, decorators: [{
634
- type: i0.Inject,
635
- args: [i0.ElementRef]
636
- }] }, { type: Window, decorators: [{
637
- type: i0.Inject,
638
- args: [common.WINDOW]
639
- }] }];
640
- } });
463
+ /**
464
+ * Service that subscribes to scroll events of all parent elements
465
+ */
466
+ var TuiParentsScrollService = /** @class */ (function (_super) {
467
+ __extends(TuiParentsScrollService, _super);
468
+ function TuiParentsScrollService(
469
+ // Destructuring here causes memory leak
470
+ el, win) {
471
+ var _this = _super.call(this, function (subscriber) { return _this.callback$.subscribe(subscriber); }) || this;
472
+ _this.callback$ = i1.defer(function () {
473
+ var nativeElement = el.nativeElement;
474
+ var eventTargets = [win, nativeElement];
475
+ while (nativeElement.parentElement) {
476
+ nativeElement = nativeElement.parentElement;
477
+ eventTargets.push(nativeElement);
478
+ }
479
+ return i1.merge.apply(void 0, __spreadArray([], __read(eventTargets.map(function (element) { return observables.tuiTypedFromEvent(element, 'scroll'); }))));
480
+ });
481
+ return _this;
482
+ }
483
+ return TuiParentsScrollService;
484
+ }(i1.Observable));
485
+ TuiParentsScrollService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiParentsScrollService, deps: [{ token: i0.ElementRef }, { token: common.WINDOW }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
486
+ TuiParentsScrollService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiParentsScrollService });
487
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiParentsScrollService, decorators: [{
488
+ type: i0.Injectable
489
+ }], ctorParameters: function () {
490
+ return [{ type: i0__namespace.ElementRef, decorators: [{
491
+ type: i0.Inject,
492
+ args: [i0.ElementRef]
493
+ }] }, { type: Window, decorators: [{
494
+ type: i0.Inject,
495
+ args: [common.WINDOW]
496
+ }] }];
497
+ } });
641
498
 
642
- // @bad TODO: Consider Intersection Observer with fallback to current implementation
643
- /**
644
- * Service that monitors element visibility by subscribing to scrolls
645
- * and polling with set interval, returns either null or an array
646
- * of elements that overlap given element edges
647
- */
648
- var TuiObscuredService = /** @class */ (function (_super) {
649
- __extends(TuiObscuredService, _super);
650
- function TuiObscuredService(parentsScroll$, _a, zone, win, destroy$, animationFrame$) {
651
- var nativeElement = _a.nativeElement;
652
- var _this = _super.call(this, function (subscriber) { return _this.obscured$.subscribe(subscriber); }) || this;
653
- _this.obscured$ = i1.merge(
654
- // delay is added so it will not interfere with other listeners
655
- i1.merge(parentsScroll$, i1.fromEvent(win, "resize")).pipe(operators.delay(0)), animationFrame$.pipe(operators.throttleTime(constants.POLLING_TIME))).pipe(operators.map(function () { return dom.tuiGetElementObscures(nativeElement); }), operators.startWith(null), operators.distinctUntilChanged(), observables.tuiZoneOptimized(zone), operators.takeUntil(destroy$));
656
- return _this;
657
- }
658
- return TuiObscuredService;
659
- }(i1.Observable));
660
- TuiObscuredService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiObscuredService, deps: [{ token: TuiParentsScrollService, self: true }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: common.WINDOW }, { token: TuiDestroyService, self: true }, { token: common.ANIMATION_FRAME }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
661
- TuiObscuredService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiObscuredService });
662
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiObscuredService, decorators: [{
663
- type: i0.Injectable
664
- }], ctorParameters: function () {
665
- return [{ type: TuiParentsScrollService, decorators: [{
666
- type: i0.Inject,
667
- args: [TuiParentsScrollService]
668
- }, {
669
- type: i0.Self
670
- }] }, { type: i0__namespace.ElementRef, decorators: [{
671
- type: i0.Inject,
672
- args: [i0.ElementRef]
673
- }] }, { type: i0__namespace.NgZone, decorators: [{
674
- type: i0.Inject,
675
- args: [i0.NgZone]
676
- }] }, { type: Window, decorators: [{
677
- type: i0.Inject,
678
- args: [common.WINDOW]
679
- }] }, { type: i1__namespace.Observable, decorators: [{
680
- type: i0.Self
681
- }, {
682
- type: i0.Inject,
683
- args: [TuiDestroyService]
684
- }] }, { type: i1__namespace.Observable, decorators: [{
685
- type: i0.Inject,
686
- args: [common.ANIMATION_FRAME]
687
- }] }];
688
- } });
499
+ // @bad TODO: Consider Intersection Observer with fallback to current implementation
500
+ /**
501
+ * Service that monitors element visibility by subscribing to scrolls
502
+ * and polling with set interval, returns either null or an array
503
+ * of elements that overlap given element edges
504
+ */
505
+ var TuiObscuredService = /** @class */ (function (_super) {
506
+ __extends(TuiObscuredService, _super);
507
+ function TuiObscuredService(parentsScroll$, _a, zone, win, destroy$, animationFrame$) {
508
+ var nativeElement = _a.nativeElement;
509
+ var _this = _super.call(this, function (subscriber) { return _this.obscured$.subscribe(subscriber); }) || this;
510
+ _this.obscured$ = i1.merge(
511
+ // delay is added so it will not interfere with other listeners
512
+ i1.merge(parentsScroll$, i1.fromEvent(win, 'resize')).pipe(operators.delay(0)), animationFrame$.pipe(operators.throttleTime(constants.POLLING_TIME))).pipe(operators.map(function () { return dom.tuiGetElementObscures(nativeElement); }), operators.startWith(null), operators.distinctUntilChanged(), observables.tuiZoneOptimized(zone), operators.takeUntil(destroy$));
513
+ return _this;
514
+ }
515
+ return TuiObscuredService;
516
+ }(i1.Observable));
517
+ TuiObscuredService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiObscuredService, deps: [{ token: TuiParentsScrollService, self: true }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: common.WINDOW }, { token: TuiDestroyService, self: true }, { token: common.ANIMATION_FRAME }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
518
+ TuiObscuredService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiObscuredService });
519
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiObscuredService, decorators: [{
520
+ type: i0.Injectable
521
+ }], ctorParameters: function () {
522
+ return [{ type: TuiParentsScrollService, decorators: [{
523
+ type: i0.Inject,
524
+ args: [TuiParentsScrollService]
525
+ }, {
526
+ type: i0.Self
527
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
528
+ type: i0.Inject,
529
+ args: [i0.ElementRef]
530
+ }] }, { type: i0__namespace.NgZone, decorators: [{
531
+ type: i0.Inject,
532
+ args: [i0.NgZone]
533
+ }] }, { type: Window, decorators: [{
534
+ type: i0.Inject,
535
+ args: [common.WINDOW]
536
+ }] }, { type: i1__namespace.Observable, decorators: [{
537
+ type: i0.Self
538
+ }, {
539
+ type: i0.Inject,
540
+ args: [TuiDestroyService]
541
+ }] }, { type: i1__namespace.Observable, decorators: [{
542
+ type: i0.Inject,
543
+ args: [common.ANIMATION_FRAME]
544
+ }] }];
545
+ } });
689
546
 
690
- var TuiPanService = /** @class */ (function (_super) {
691
- __extends(TuiPanService, _super);
692
- function TuiPanService(_a, doc) {
693
- var nativeElement = _a.nativeElement;
694
- return _super.call(this, function (subscriber) {
695
- i1.merge(observables.tuiTypedFromEvent(nativeElement, "touchstart", { passive: true }), observables.tuiTypedFromEvent(nativeElement, "mousedown"))
696
- .pipe(operators.switchMap(function () { return i1.merge(observables.tuiTypedFromEvent(doc, "touchmove", {
697
- passive: true,
698
- }).pipe(operators.filter(function (_a) {
699
- var touches = _a.touches;
700
- return touches.length < 2;
701
- }), operators.map(function (_a) {
702
- var touches = _a.touches;
703
- return touches[0];
704
- })), observables.tuiTypedFromEvent(doc, "mousemove")); }), operators.pairwise(), operators.map(function (_a) {
705
- var _b = __read(_a, 2), first = _b[0], second = _b[1];
706
- var deltaX = second.clientX - first.clientX;
707
- var deltaY = second.clientY - first.clientY;
708
- return [deltaX, deltaY];
709
- }),
710
- // eslint-disable-next-line rxjs/no-unsafe-takeuntil
711
- operators.takeUntil(i1.merge(observables.tuiTypedFromEvent(doc, "touchend"), observables.tuiTypedFromEvent(doc, "mouseup"))), operators.repeat())
712
- .subscribe(subscriber);
713
- }) || this;
714
- }
715
- return TuiPanService;
716
- }(i1.Observable));
717
- TuiPanService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPanService, deps: [{ token: i0.ElementRef }, { token: common$1.DOCUMENT }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
718
- TuiPanService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPanService });
719
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPanService, decorators: [{
720
- type: i0.Injectable
721
- }], ctorParameters: function () {
722
- return [{ type: i0__namespace.ElementRef, decorators: [{
723
- type: i0.Inject,
724
- args: [i0.ElementRef]
725
- }] }, { type: Document, decorators: [{
726
- type: i0.Inject,
727
- args: [common$1.DOCUMENT]
728
- }] }];
729
- } });
547
+ var TuiPanService = /** @class */ (function (_super) {
548
+ __extends(TuiPanService, _super);
549
+ function TuiPanService(_a, doc) {
550
+ var nativeElement = _a.nativeElement;
551
+ return _super.call(this, function (subscriber) {
552
+ i1.merge(observables.tuiTypedFromEvent(nativeElement, 'touchstart', { passive: true }), observables.tuiTypedFromEvent(nativeElement, 'mousedown'))
553
+ .pipe(operators.switchMap(function () { return i1.merge(observables.tuiTypedFromEvent(doc, 'touchmove', {
554
+ passive: true,
555
+ }).pipe(operators.filter(function (_a) {
556
+ var touches = _a.touches;
557
+ return touches.length < 2;
558
+ }), operators.map(function (_a) {
559
+ var touches = _a.touches;
560
+ return touches[0];
561
+ })), observables.tuiTypedFromEvent(doc, 'mousemove')); }), operators.pairwise(), operators.map(function (_a) {
562
+ var _b = __read(_a, 2), first = _b[0], second = _b[1];
563
+ var deltaX = second.clientX - first.clientX;
564
+ var deltaY = second.clientY - first.clientY;
565
+ return [deltaX, deltaY];
566
+ }),
567
+ // eslint-disable-next-line rxjs/no-unsafe-takeuntil
568
+ operators.takeUntil(i1.merge(observables.tuiTypedFromEvent(doc, 'touchend'), observables.tuiTypedFromEvent(doc, 'mouseup'))), operators.repeat())
569
+ .subscribe(subscriber);
570
+ }) || this;
571
+ }
572
+ return TuiPanService;
573
+ }(i1.Observable));
574
+ TuiPanService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPanService, deps: [{ token: i0.ElementRef }, { token: common$1.DOCUMENT }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
575
+ TuiPanService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPanService });
576
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiPanService, decorators: [{
577
+ type: i0.Injectable
578
+ }], ctorParameters: function () {
579
+ return [{ type: i0__namespace.ElementRef, decorators: [{
580
+ type: i0.Inject,
581
+ args: [i0.ElementRef]
582
+ }] }, { type: Document, decorators: [{
583
+ type: i0.Inject,
584
+ args: [common$1.DOCUMENT]
585
+ }] }];
586
+ } });
730
587
 
731
- // TODO: Remove in 4.0 when Safari is bumped to 13
732
- var TuiResizeService = /** @class */ (function (_super) {
733
- __extends(TuiResizeService, _super);
734
- function TuiResizeService(el, zone, destroy$, support, box, animationFrame$) {
735
- var _this = _super.call(this, el, zone, support, box) || this;
736
- return _this.pipe(operators.catchError(function () {
737
- /**
738
- * @note: if not supported ResizeObserver
739
- * remove `catchError` after supports modern browsers
740
- */
741
- return animationFrame$.pipe(operators.throttleTime(constants.POLLING_TIME), operators.map(function () { return el.nativeElement.clientWidth + " " + el.nativeElement.clientHeight; }), operators.distinctUntilChanged(), operators.map(function () { return constants.EMPTY_ARRAY; }));
742
- }), operators.debounceTime(0), observables.tuiZonefree(zone), operators.share(), operators.takeUntil(destroy$));
743
- }
744
- return TuiResizeService;
745
- }(resizeObserver.ResizeObserverService));
746
- TuiResizeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiResizeService, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: TuiDestroyService, self: true }, { token: resizeObserver.RESIZE_OBSERVER_SUPPORT }, { token: resizeObserver.RESIZE_OPTION_BOX }, { token: common.ANIMATION_FRAME }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
747
- TuiResizeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiResizeService });
748
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiResizeService, decorators: [{
749
- type: i0.Injectable
750
- }], ctorParameters: function () {
751
- return [{ type: i0__namespace.ElementRef, decorators: [{
752
- type: i0.Inject,
753
- args: [i0.ElementRef]
754
- }] }, { type: i0__namespace.NgZone, decorators: [{
755
- type: i0.Inject,
756
- args: [i0.NgZone]
757
- }] }, { type: i1__namespace.Observable, decorators: [{
758
- type: i0.Self
759
- }, {
760
- type: i0.Inject,
761
- args: [TuiDestroyService]
762
- }] }, { type: undefined, decorators: [{
763
- type: i0.Inject,
764
- args: [resizeObserver.RESIZE_OBSERVER_SUPPORT]
765
- }] }, { type: undefined, decorators: [{
766
- type: i0.Inject,
767
- args: [resizeObserver.RESIZE_OPTION_BOX]
768
- }] }, { type: i1__namespace.Observable, decorators: [{
769
- type: i0.Inject,
770
- args: [common.ANIMATION_FRAME]
771
- }] }];
772
- } });
588
+ // TODO: Remove in 4.0 when Safari is bumped to 13
589
+ var TuiResizeService = /** @class */ (function (_super) {
590
+ __extends(TuiResizeService, _super);
591
+ function TuiResizeService(el, zone, destroy$, support, box, animationFrame$) {
592
+ var _this = _super.call(this, el, zone, support, box) || this;
593
+ return _this.pipe(operators.catchError(function () {
594
+ /**
595
+ * @note: if not supported ResizeObserver
596
+ * remove `catchError` after supports modern browsers
597
+ */
598
+ return animationFrame$.pipe(operators.throttleTime(constants.POLLING_TIME), operators.map(function () { return el.nativeElement.clientWidth + " " + el.nativeElement.clientHeight; }), operators.distinctUntilChanged(), operators.map(function () { return constants.EMPTY_ARRAY; }));
599
+ }), operators.debounceTime(0), observables.tuiZonefree(zone), operators.share(), operators.takeUntil(destroy$));
600
+ }
601
+ return TuiResizeService;
602
+ }(resizeObserver.ResizeObserverService));
603
+ TuiResizeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiResizeService, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: TuiDestroyService, self: true }, { token: resizeObserver.RESIZE_OBSERVER_SUPPORT }, { token: resizeObserver.RESIZE_OPTION_BOX }, { token: common.ANIMATION_FRAME }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
604
+ TuiResizeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiResizeService });
605
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiResizeService, decorators: [{
606
+ type: i0.Injectable
607
+ }], ctorParameters: function () {
608
+ return [{ type: i0__namespace.ElementRef, decorators: [{
609
+ type: i0.Inject,
610
+ args: [i0.ElementRef]
611
+ }] }, { type: i0__namespace.NgZone, decorators: [{
612
+ type: i0.Inject,
613
+ args: [i0.NgZone]
614
+ }] }, { type: i1__namespace.Observable, decorators: [{
615
+ type: i0.Self
616
+ }, {
617
+ type: i0.Inject,
618
+ args: [TuiDestroyService]
619
+ }] }, { type: undefined, decorators: [{
620
+ type: i0.Inject,
621
+ args: [resizeObserver.RESIZE_OBSERVER_SUPPORT]
622
+ }] }, { type: undefined, decorators: [{
623
+ type: i0.Inject,
624
+ args: [resizeObserver.RESIZE_OPTION_BOX]
625
+ }] }, { type: i1__namespace.Observable, decorators: [{
626
+ type: i0.Inject,
627
+ args: [common.ANIMATION_FRAME]
628
+ }] }];
629
+ } });
773
630
 
774
- var SCROLL_TIME = 300;
775
- function getX(elementOrWindow) {
776
- return "scrollX" in elementOrWindow
777
- ? elementOrWindow.scrollX
778
- : elementOrWindow.scrollLeft;
779
- }
780
- function getY(elementOrWindow) {
781
- return "scrollY" in elementOrWindow
782
- ? elementOrWindow.scrollY
783
- : elementOrWindow.scrollTop;
784
- }
785
- var TuiScrollService = /** @class */ (function () {
786
- function TuiScrollService(performanceRef, animationFrame$) {
787
- this.performanceRef = performanceRef;
788
- this.animationFrame$ = animationFrame$;
789
- }
790
- TuiScrollService.prototype.scroll$ = function (elementOrWindow, scrollTop, scrollLeft, duration) {
791
- var _this = this;
792
- if (scrollLeft === void 0) { scrollLeft = getX(elementOrWindow); }
793
- if (duration === void 0) { duration = SCROLL_TIME; }
794
- ngDevMode && classes.tuiAssert.assert(duration >= 0, "Duration cannot be negative");
795
- ngDevMode && classes.tuiAssert.assert(scrollTop >= 0, "scrollTop cannot be negative");
796
- ngDevMode && classes.tuiAssert.assert(scrollLeft >= 0, "scrollLeft cannot be negative");
797
- var initialTop = getY(elementOrWindow);
798
- var initialLeft = getX(elementOrWindow);
799
- var deltaTop = scrollTop - initialTop;
800
- var deltaLeft = scrollLeft - initialLeft;
801
- var observable = !duration
802
- ? i1.of([scrollTop, scrollLeft])
803
- : i1.defer(function () { return i1.of(_this.performanceRef.now()); }).pipe(operators.switchMap(function (start) { return _this.animationFrame$.pipe(operators.map(function (now) { return now - start; })); }), operators.map(function (elapsed) { return miscellaneous.tuiEaseInOutQuad(math.tuiClamp(elapsed / duration, 0, 1)); }), operators.map(function (percent) { return [
804
- initialTop + deltaTop * percent,
805
- initialLeft + deltaLeft * percent,
806
- ]; }), operators.endWith([scrollTop, scrollLeft]), operators.takeUntil(i1.timer(duration)));
807
- return observable.pipe(operators.tap(function (_b) {
808
- var _c = __read(_b, 2), scrollTop = _c[0], scrollLeft = _c[1];
809
- var _a;
810
- (_a = elementOrWindow.scrollTo) === null || _a === void 0 ? void 0 : _a.call(elementOrWindow, scrollLeft, scrollTop);
811
- }));
812
- };
813
- return TuiScrollService;
814
- }());
815
- TuiScrollService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiScrollService, deps: [{ token: common.PERFORMANCE }, { token: common.ANIMATION_FRAME }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
816
- TuiScrollService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiScrollService, providedIn: "root" });
817
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiScrollService, decorators: [{
818
- type: i0.Injectable,
819
- args: [{
820
- providedIn: "root",
821
- }]
822
- }], ctorParameters: function () {
823
- return [{ type: Performance, decorators: [{
824
- type: i0.Inject,
825
- args: [common.PERFORMANCE]
826
- }] }, { type: i1__namespace.Observable, decorators: [{
827
- type: i0.Inject,
828
- args: [common.ANIMATION_FRAME]
829
- }] }];
830
- } });
631
+ var SCROLL_TIME = 300;
632
+ function getX(elementOrWindow) {
633
+ return 'scrollX' in elementOrWindow
634
+ ? elementOrWindow.scrollX
635
+ : elementOrWindow.scrollLeft;
636
+ }
637
+ function getY(elementOrWindow) {
638
+ return 'scrollY' in elementOrWindow
639
+ ? elementOrWindow.scrollY
640
+ : elementOrWindow.scrollTop;
641
+ }
642
+ var TuiScrollService = /** @class */ (function () {
643
+ function TuiScrollService(performanceRef, animationFrame$) {
644
+ this.performanceRef = performanceRef;
645
+ this.animationFrame$ = animationFrame$;
646
+ }
647
+ TuiScrollService.prototype.scroll$ = function (elementOrWindow, scrollTop, scrollLeft, duration) {
648
+ var _this = this;
649
+ if (scrollLeft === void 0) { scrollLeft = getX(elementOrWindow); }
650
+ if (duration === void 0) { duration = SCROLL_TIME; }
651
+ ngDevMode && classes.tuiAssert.assert(duration >= 0, 'Duration cannot be negative');
652
+ ngDevMode && classes.tuiAssert.assert(scrollTop >= 0, 'scrollTop cannot be negative');
653
+ ngDevMode && classes.tuiAssert.assert(scrollLeft >= 0, 'scrollLeft cannot be negative');
654
+ var initialTop = getY(elementOrWindow);
655
+ var initialLeft = getX(elementOrWindow);
656
+ var deltaTop = scrollTop - initialTop;
657
+ var deltaLeft = scrollLeft - initialLeft;
658
+ var observable = !duration
659
+ ? i1.of([scrollTop, scrollLeft])
660
+ : i1.defer(function () { return i1.of(_this.performanceRef.now()); }).pipe(operators.switchMap(function (start) { return _this.animationFrame$.pipe(operators.map(function (now) { return now - start; })); }), operators.map(function (elapsed) { return miscellaneous.tuiEaseInOutQuad(math.tuiClamp(elapsed / duration, 0, 1)); }), operators.map(function (percent) { return [
661
+ initialTop + deltaTop * percent,
662
+ initialLeft + deltaLeft * percent,
663
+ ]; }), operators.endWith([scrollTop, scrollLeft]), operators.takeUntil(i1.timer(duration)));
664
+ return observable.pipe(operators.tap(function (_b) {
665
+ var _c = __read(_b, 2), scrollTop = _c[0], scrollLeft = _c[1];
666
+ var _a;
667
+ (_a = elementOrWindow.scrollTo) === null || _a === void 0 ? void 0 : _a.call(elementOrWindow, scrollLeft, scrollTop);
668
+ }));
669
+ };
670
+ return TuiScrollService;
671
+ }());
672
+ TuiScrollService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiScrollService, deps: [{ token: common.PERFORMANCE }, { token: common.ANIMATION_FRAME }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
673
+ TuiScrollService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiScrollService, providedIn: 'root' });
674
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiScrollService, decorators: [{
675
+ type: i0.Injectable,
676
+ args: [{
677
+ providedIn: 'root',
678
+ }]
679
+ }], ctorParameters: function () {
680
+ return [{ type: Performance, decorators: [{
681
+ type: i0.Inject,
682
+ args: [common.PERFORMANCE]
683
+ }] }, { type: i1__namespace.Observable, decorators: [{
684
+ type: i0.Inject,
685
+ args: [common.ANIMATION_FRAME]
686
+ }] }];
687
+ } });
831
688
 
832
- var TuiStaticRequestService = /** @class */ (function () {
833
- function TuiStaticRequestService(win, platformId) {
834
- this.win = win;
835
- this.platformId = platformId;
836
- this.cache = new Map();
837
- }
838
- TuiStaticRequestService.prototype.request = function (url) {
839
- var _this = this;
840
- var cache = this.cache.get(url);
841
- if (cache) {
842
- return cache;
843
- }
844
- var response$ = "AbortController" in this.win || common$1.isPlatformServer(this.platformId)
845
- ? fetch$1.fromFetch(url)
846
- : /**
847
- * Fallback for Firefox 55 and 56
848
- * TODO: drop after browser support bump
849
- */
850
- i1.defer(function () { return i1.from(fetch(url)); });
851
- var piped = response$.pipe(operators.switchMap(function (response) { return __awaiter(_this, void 0, void 0, function () {
852
- return __generator(this, function (_a) {
853
- if (response.ok) {
854
- return [2 /*return*/, response.text()];
855
- }
856
- throw new Error("Failed to load " + url + " (" + response.statusText + ")");
857
- });
858
- }); }), operators.shareReplay({ bufferSize: 1, refCount: false }));
859
- this.cache.set(url, piped);
860
- return piped;
861
- };
862
- return TuiStaticRequestService;
863
- }());
864
- TuiStaticRequestService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiStaticRequestService, deps: [{ token: common.WINDOW }, { token: i0.PLATFORM_ID }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
865
- TuiStaticRequestService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiStaticRequestService, providedIn: "root" });
866
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiStaticRequestService, decorators: [{
867
- type: i0.Injectable,
868
- args: [{
869
- providedIn: "root",
870
- }]
871
- }], ctorParameters: function () {
872
- return [{ type: Window, decorators: [{
873
- type: i0.Inject,
874
- args: [common.WINDOW]
875
- }] }, { type: undefined, decorators: [{
876
- type: i0.Inject,
877
- args: [i0.PLATFORM_ID]
878
- }] }];
879
- } });
689
+ var TuiStaticRequestService = /** @class */ (function () {
690
+ function TuiStaticRequestService(win, platformId) {
691
+ this.win = win;
692
+ this.platformId = platformId;
693
+ this.cache = new Map();
694
+ }
695
+ TuiStaticRequestService.prototype.request = function (url) {
696
+ var _this = this;
697
+ var cache = this.cache.get(url);
698
+ if (cache) {
699
+ return cache;
700
+ }
701
+ var response$ = 'AbortController' in this.win || common$1.isPlatformServer(this.platformId)
702
+ ? fetch$1.fromFetch(url)
703
+ : /**
704
+ * Fallback for Firefox 55 and 56
705
+ * TODO: drop after browser support bump
706
+ */
707
+ i1.defer(function () { return i1.from(fetch(url)); });
708
+ var piped = response$.pipe(operators.switchMap(function (response) { return __awaiter(_this, void 0, void 0, function () {
709
+ return __generator(this, function (_a) {
710
+ if (response.ok) {
711
+ return [2 /*return*/, response.text()];
712
+ }
713
+ throw new Error("Failed to load " + url + " (" + response.statusText + ")");
714
+ });
715
+ }); }), operators.shareReplay({ bufferSize: 1, refCount: false }));
716
+ this.cache.set(url, piped);
717
+ return piped;
718
+ };
719
+ return TuiStaticRequestService;
720
+ }());
721
+ TuiStaticRequestService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiStaticRequestService, deps: [{ token: common.WINDOW }, { token: i0.PLATFORM_ID }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
722
+ TuiStaticRequestService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiStaticRequestService, providedIn: 'root' });
723
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiStaticRequestService, decorators: [{
724
+ type: i0.Injectable,
725
+ args: [{
726
+ providedIn: 'root',
727
+ }]
728
+ }], ctorParameters: function () {
729
+ return [{ type: Window, decorators: [{
730
+ type: i0.Inject,
731
+ args: [common.WINDOW]
732
+ }] }, { type: undefined, decorators: [{
733
+ type: i0.Inject,
734
+ args: [i0.PLATFORM_ID]
735
+ }] }];
736
+ } });
880
737
 
881
- var TuiSwipeService = /** @class */ (function (_super) {
882
- __extends(TuiSwipeService, _super);
883
- function TuiSwipeService(_a, _b, doc) {
884
- var nativeElement = _a.nativeElement;
885
- var timeout = _b.timeout, threshold = _b.threshold;
886
- return _super.call(this, function (subscriber) {
887
- i1.merge(observables.tuiTypedFromEvent(nativeElement, "touchstart", { passive: true }), observables.tuiTypedFromEvent(doc, "touchend"))
888
- .pipe(operators.pairwise(), operators.filter(function (_a) {
889
- var _b = __read(_a, 2), first = _b[0], second = _b[1];
890
- return !!first.touches.length &&
891
- first.touches[0].identifier ===
892
- second.changedTouches[0].identifier;
893
- }), operators.map(function (_a) {
894
- var _b = __read(_a, 2), start = _b[0], end = _b[1];
895
- var startX = start.touches[0].clientX;
896
- var startY = start.touches[0].clientY;
897
- var endX = end.changedTouches[0].clientX;
898
- var endY = end.changedTouches[0].clientY;
899
- var distanceX = startX - endX;
900
- var distanceY = startY - endY;
901
- var duration = end.timeStamp - start.timeStamp;
902
- if ((Math.abs(distanceX) > threshold ||
903
- Math.abs(distanceY) > threshold) &&
904
- duration < timeout) {
905
- return {
906
- direction: miscellaneous.tuiGetSwipeDirection(distanceX, distanceY),
907
- events: [start, end],
908
- };
909
- }
910
- return null;
911
- }), operators.filter(miscellaneous.tuiIsPresent))
912
- .subscribe(subscriber);
913
- }) || this;
914
- }
915
- return TuiSwipeService;
916
- }(i1.Observable));
917
- TuiSwipeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSwipeService, deps: [{ token: i0.ElementRef }, { token: tokens.TUI_SWIPE_OPTIONS }, { token: common$1.DOCUMENT }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
918
- TuiSwipeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSwipeService });
919
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSwipeService, decorators: [{
920
- type: i0.Injectable
921
- }], ctorParameters: function () {
922
- return [{ type: i0__namespace.ElementRef, decorators: [{
923
- type: i0.Inject,
924
- args: [i0.ElementRef]
925
- }] }, { type: undefined, decorators: [{
926
- type: i0.Inject,
927
- args: [tokens.TUI_SWIPE_OPTIONS]
928
- }] }, { type: Document, decorators: [{
929
- type: i0.Inject,
930
- args: [common$1.DOCUMENT]
931
- }] }];
932
- } });
738
+ var TuiSwipeService = /** @class */ (function (_super) {
739
+ __extends(TuiSwipeService, _super);
740
+ function TuiSwipeService(_a, _b, doc) {
741
+ var nativeElement = _a.nativeElement;
742
+ var timeout = _b.timeout, threshold = _b.threshold;
743
+ return _super.call(this, function (subscriber) {
744
+ i1.merge(observables.tuiTypedFromEvent(nativeElement, 'touchstart', { passive: true }), observables.tuiTypedFromEvent(doc, 'touchend'))
745
+ .pipe(operators.pairwise(), operators.filter(function (_a) {
746
+ var _b = __read(_a, 2), first = _b[0], second = _b[1];
747
+ return !!first.touches.length &&
748
+ first.touches[0].identifier ===
749
+ second.changedTouches[0].identifier;
750
+ }), operators.map(function (_a) {
751
+ var _b = __read(_a, 2), start = _b[0], end = _b[1];
752
+ var startX = start.touches[0].clientX;
753
+ var startY = start.touches[0].clientY;
754
+ var endX = end.changedTouches[0].clientX;
755
+ var endY = end.changedTouches[0].clientY;
756
+ var distanceX = startX - endX;
757
+ var distanceY = startY - endY;
758
+ var duration = end.timeStamp - start.timeStamp;
759
+ if ((Math.abs(distanceX) > threshold ||
760
+ Math.abs(distanceY) > threshold) &&
761
+ duration < timeout) {
762
+ return {
763
+ direction: miscellaneous.tuiGetSwipeDirection(distanceX, distanceY),
764
+ events: [start, end],
765
+ };
766
+ }
767
+ return null;
768
+ }), operators.filter(miscellaneous.tuiIsPresent))
769
+ .subscribe(subscriber);
770
+ }) || this;
771
+ }
772
+ return TuiSwipeService;
773
+ }(i1.Observable));
774
+ TuiSwipeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSwipeService, deps: [{ token: i0.ElementRef }, { token: tokens.TUI_SWIPE_OPTIONS }, { token: common$1.DOCUMENT }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
775
+ TuiSwipeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSwipeService });
776
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiSwipeService, decorators: [{
777
+ type: i0.Injectable
778
+ }], ctorParameters: function () {
779
+ return [{ type: i0__namespace.ElementRef, decorators: [{
780
+ type: i0.Inject,
781
+ args: [i0.ElementRef]
782
+ }] }, { type: undefined, decorators: [{
783
+ type: i0.Inject,
784
+ args: [tokens.TUI_SWIPE_OPTIONS]
785
+ }] }, { type: Document, decorators: [{
786
+ type: i0.Inject,
787
+ args: [common$1.DOCUMENT]
788
+ }] }];
789
+ } });
933
790
 
934
- var TOUCH_SENSITIVITY = 0.01;
935
- var TuiZoomService = /** @class */ (function (_super) {
936
- __extends(TuiZoomService, _super);
937
- function TuiZoomService(_a, _b) {
938
- var nativeElement = _a.nativeElement;
939
- var wheelSensitivity = _b.wheelSensitivity;
940
- return _super.call(this, function (subscriber) {
941
- i1.merge(observables.tuiTypedFromEvent(nativeElement, "touchstart", { passive: true }).pipe(operators.filter(function (_a) {
942
- var touches = _a.touches;
943
- return touches.length > 1;
944
- }), operators.switchMap(function (startEvent) { return observables.tuiTypedFromEvent(nativeElement, "touchmove", {
945
- passive: true,
946
- }).pipe(observables.tuiPreventDefault(), operators.scan(function (prev, event) {
947
- var distance = utils.tuiDistanceBetweenTouches(event);
948
- return {
949
- event: event,
950
- distance: distance,
951
- delta: (distance - prev.distance) *
952
- TOUCH_SENSITIVITY,
953
- };
954
- }, {
955
- event: startEvent,
956
- distance: utils.tuiDistanceBetweenTouches(startEvent),
957
- delta: 0,
958
- }), operators.map(function (_a) {
959
- var event = _a.event, delta = _a.delta;
960
- var clientX = (event.touches[0].clientX +
961
- event.touches[1].clientX) /
962
- 2;
963
- var clientY = (event.touches[0].clientY +
964
- event.touches[1].clientY) /
965
- 2;
966
- return { clientX: clientX, clientY: clientY, delta: delta, event: event };
967
- }), operators.takeUntil(observables.tuiTypedFromEvent(nativeElement, "touchend"))); })), observables.tuiTypedFromEvent(nativeElement, "wheel", { passive: false }).pipe(observables.tuiPreventDefault(), operators.map(function (wheel) { return ({
968
- clientX: wheel.clientX,
969
- clientY: wheel.clientY,
970
- delta: -wheel.deltaY * wheelSensitivity,
971
- event: wheel,
972
- }); }))).subscribe(subscriber);
973
- }) || this;
974
- }
975
- return TuiZoomService;
976
- }(i1.Observable));
977
- TuiZoomService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiZoomService, deps: [{ token: i0.ElementRef }, { token: tokens.TUI_ZOOM_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
978
- TuiZoomService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiZoomService });
979
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiZoomService, decorators: [{
980
- type: i0.Injectable
981
- }], ctorParameters: function () {
982
- return [{ type: i0__namespace.ElementRef, decorators: [{
983
- type: i0.Inject,
984
- args: [i0.ElementRef]
985
- }] }, { type: undefined, decorators: [{
986
- type: i0.Inject,
987
- args: [tokens.TUI_ZOOM_OPTIONS]
988
- }] }];
989
- } });
791
+ var TOUCH_SENSITIVITY = 0.01;
792
+ var TuiZoomService = /** @class */ (function (_super) {
793
+ __extends(TuiZoomService, _super);
794
+ function TuiZoomService(_a, _b) {
795
+ var nativeElement = _a.nativeElement;
796
+ var wheelSensitivity = _b.wheelSensitivity;
797
+ return _super.call(this, function (subscriber) {
798
+ i1.merge(observables.tuiTypedFromEvent(nativeElement, 'touchstart', { passive: true }).pipe(operators.filter(function (_a) {
799
+ var touches = _a.touches;
800
+ return touches.length > 1;
801
+ }), operators.switchMap(function (startEvent) { return observables.tuiTypedFromEvent(nativeElement, 'touchmove', {
802
+ passive: true,
803
+ }).pipe(observables.tuiPreventDefault(), operators.scan(function (prev, event) {
804
+ var distance = utils.tuiDistanceBetweenTouches(event);
805
+ return {
806
+ event: event,
807
+ distance: distance,
808
+ delta: (distance - prev.distance) *
809
+ TOUCH_SENSITIVITY,
810
+ };
811
+ }, {
812
+ event: startEvent,
813
+ distance: utils.tuiDistanceBetweenTouches(startEvent),
814
+ delta: 0,
815
+ }), operators.map(function (_a) {
816
+ var event = _a.event, delta = _a.delta;
817
+ var clientX = (event.touches[0].clientX +
818
+ event.touches[1].clientX) /
819
+ 2;
820
+ var clientY = (event.touches[0].clientY +
821
+ event.touches[1].clientY) /
822
+ 2;
823
+ return { clientX: clientX, clientY: clientY, delta: delta, event: event };
824
+ }), operators.takeUntil(observables.tuiTypedFromEvent(nativeElement, 'touchend'))); })), observables.tuiTypedFromEvent(nativeElement, 'wheel', { passive: false }).pipe(observables.tuiPreventDefault(), operators.map(function (wheel) { return ({
825
+ clientX: wheel.clientX,
826
+ clientY: wheel.clientY,
827
+ delta: -wheel.deltaY * wheelSensitivity,
828
+ event: wheel,
829
+ }); }))).subscribe(subscriber);
830
+ }) || this;
831
+ }
832
+ return TuiZoomService;
833
+ }(i1.Observable));
834
+ TuiZoomService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiZoomService, deps: [{ token: i0.ElementRef }, { token: tokens.TUI_ZOOM_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
835
+ TuiZoomService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiZoomService });
836
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiZoomService, decorators: [{
837
+ type: i0.Injectable
838
+ }], ctorParameters: function () {
839
+ return [{ type: i0__namespace.ElementRef, decorators: [{
840
+ type: i0.Inject,
841
+ args: [i0.ElementRef]
842
+ }] }, { type: undefined, decorators: [{
843
+ type: i0.Inject,
844
+ args: [tokens.TUI_ZOOM_OPTIONS]
845
+ }] }];
846
+ } });
990
847
 
991
- /**
992
- * Generated bundle index. Do not edit.
993
- */
848
+ /**
849
+ * Generated bundle index. Do not edit.
850
+ */
994
851
 
995
- exports.TuiDestroyService = TuiDestroyService;
996
- exports.TuiDirectiveStylesService = TuiDirectiveStylesService;
997
- exports.TuiFocusVisibleService = TuiFocusVisibleService;
998
- exports.TuiIdService = TuiIdService;
999
- exports.TuiObscuredService = TuiObscuredService;
1000
- exports.TuiPanService = TuiPanService;
1001
- exports.TuiParentsScrollService = TuiParentsScrollService;
1002
- exports.TuiResizeService = TuiResizeService;
1003
- exports.TuiScrollService = TuiScrollService;
1004
- exports.TuiStaticRequestService = TuiStaticRequestService;
1005
- exports.TuiSwipeService = TuiSwipeService;
1006
- exports.TuiZoomService = TuiZoomService;
852
+ exports.TuiDestroyService = TuiDestroyService;
853
+ exports.TuiDirectiveStylesService = TuiDirectiveStylesService;
854
+ exports.TuiFocusVisibleService = TuiFocusVisibleService;
855
+ exports.TuiIdService = TuiIdService;
856
+ exports.TuiObscuredService = TuiObscuredService;
857
+ exports.TuiPanService = TuiPanService;
858
+ exports.TuiParentsScrollService = TuiParentsScrollService;
859
+ exports.TuiResizeService = TuiResizeService;
860
+ exports.TuiScrollService = TuiScrollService;
861
+ exports.TuiStaticRequestService = TuiStaticRequestService;
862
+ exports.TuiSwipeService = TuiSwipeService;
863
+ exports.TuiZoomService = TuiZoomService;
1007
864
 
1008
- Object.defineProperty(exports, '__esModule', { value: true });
865
+ Object.defineProperty(exports, '__esModule', { value: true });
1009
866
 
1010
867
  }));
1011
868
  //# sourceMappingURL=taiga-ui-cdk-services.umd.js.map