@taiga-ui/kit 3.86.0 → 3.87.0-canary.95b57e0

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 (155) hide show
  1. package/bundles/taiga-ui-kit-components-accordion.umd.js +771 -625
  2. package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
  3. package/bundles/taiga-ui-kit-components-action.umd.js +598 -452
  4. package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
  5. package/bundles/taiga-ui-kit-components-avatar.umd.js +640 -494
  6. package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
  7. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +563 -417
  8. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
  9. package/bundles/taiga-ui-kit-components-calendar-month.umd.js +747 -601
  10. package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
  11. package/bundles/taiga-ui-kit-components-calendar-range.umd.js +725 -579
  12. package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
  13. package/bundles/taiga-ui-kit-components-carousel.umd.js +825 -679
  14. package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
  15. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +645 -499
  16. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
  17. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +585 -439
  18. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
  19. package/bundles/taiga-ui-kit-components-checkbox.umd.js +608 -462
  20. package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +1 -1
  21. package/bundles/taiga-ui-kit-components-combo-box.umd.js +834 -688
  22. package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
  23. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +656 -510
  24. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
  25. package/bundles/taiga-ui-kit-components-elastic-container.umd.js +587 -441
  26. package/bundles/taiga-ui-kit-components-elastic-container.umd.js.map +1 -1
  27. package/bundles/taiga-ui-kit-components-files.umd.js +806 -660
  28. package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
  29. package/bundles/taiga-ui-kit-components-filter.umd.js +607 -461
  30. package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
  31. package/bundles/taiga-ui-kit-components-input-copy.umd.js +706 -560
  32. package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
  33. package/bundles/taiga-ui-kit-components-input-count.umd.js +809 -663
  34. package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
  35. package/bundles/taiga-ui-kit-components-input-date-multi.umd.js +828 -682
  36. package/bundles/taiga-ui-kit-components-input-date-multi.umd.js.map +1 -1
  37. package/bundles/taiga-ui-kit-components-input-date-range.umd.js +973 -827
  38. package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
  39. package/bundles/taiga-ui-kit-components-input-date-time.umd.js +1042 -896
  40. package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
  41. package/bundles/taiga-ui-kit-components-input-date.umd.js +959 -813
  42. package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
  43. package/bundles/taiga-ui-kit-components-input-files.umd.js +975 -829
  44. package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
  45. package/bundles/taiga-ui-kit-components-input-inline.umd.js +612 -466
  46. package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
  47. package/bundles/taiga-ui-kit-components-input-month-range.umd.js +755 -609
  48. package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
  49. package/bundles/taiga-ui-kit-components-input-month.umd.js +788 -642
  50. package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
  51. package/bundles/taiga-ui-kit-components-input-number.umd.js +942 -796
  52. package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
  53. package/bundles/taiga-ui-kit-components-input-password.umd.js +720 -574
  54. package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
  55. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +811 -665
  56. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
  57. package/bundles/taiga-ui-kit-components-input-phone.umd.js +913 -767
  58. package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
  59. package/bundles/taiga-ui-kit-components-input-range.umd.js +796 -650
  60. package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
  61. package/bundles/taiga-ui-kit-components-input-slider.umd.js +737 -591
  62. package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
  63. package/bundles/taiga-ui-kit-components-input-tag.umd.js +1109 -963
  64. package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
  65. package/bundles/taiga-ui-kit-components-input-time.umd.js +1023 -877
  66. package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
  67. package/bundles/taiga-ui-kit-components-input-year.umd.js +705 -559
  68. package/bundles/taiga-ui-kit-components-input-year.umd.js.map +1 -1
  69. package/bundles/taiga-ui-kit-components-input.umd.js +661 -515
  70. package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
  71. package/bundles/taiga-ui-kit-components-items-with-more.umd.js +689 -543
  72. package/bundles/taiga-ui-kit-components-items-with-more.umd.js.map +1 -1
  73. package/bundles/taiga-ui-kit-components-line-clamp.umd.js +742 -596
  74. package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
  75. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +544 -398
  76. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js.map +1 -1
  77. package/bundles/taiga-ui-kit-components-multi-select.umd.js +1340 -1194
  78. package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
  79. package/bundles/taiga-ui-kit-components-pagination.umd.js +810 -664
  80. package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
  81. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js +152 -6
  82. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
  83. package/bundles/taiga-ui-kit-components-progress.umd.js +199 -32
  84. package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
  85. package/bundles/taiga-ui-kit-components-push.umd.js +152 -6
  86. package/bundles/taiga-ui-kit-components-push.umd.js.map +1 -1
  87. package/bundles/taiga-ui-kit-components-radio-block.umd.js +645 -499
  88. package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
  89. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +616 -470
  90. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
  91. package/bundles/taiga-ui-kit-components-radio-list.umd.js +628 -482
  92. package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +1 -1
  93. package/bundles/taiga-ui-kit-components-radio.umd.js +689 -543
  94. package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
  95. package/bundles/taiga-ui-kit-components-range.umd.js +811 -665
  96. package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
  97. package/bundles/taiga-ui-kit-components-rating.umd.js +646 -500
  98. package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
  99. package/bundles/taiga-ui-kit-components-routable-dialog.umd.js +586 -440
  100. package/bundles/taiga-ui-kit-components-routable-dialog.umd.js.map +1 -1
  101. package/bundles/taiga-ui-kit-components-select.umd.js +933 -787
  102. package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
  103. package/bundles/taiga-ui-kit-components-slider.umd.js +943 -797
  104. package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
  105. package/bundles/taiga-ui-kit-components-stepper.umd.js +764 -618
  106. package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
  107. package/bundles/taiga-ui-kit-components-tabs.umd.js +152 -6
  108. package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
  109. package/bundles/taiga-ui-kit-components-textarea.umd.js +969 -820
  110. package/bundles/taiga-ui-kit-components-textarea.umd.js.map +1 -1
  111. package/bundles/taiga-ui-kit-components-tiles.umd.js +839 -693
  112. package/bundles/taiga-ui-kit-components-tiles.umd.js.map +1 -1
  113. package/bundles/taiga-ui-kit-components-toggle.umd.js +711 -565
  114. package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
  115. package/bundles/taiga-ui-kit-constants.umd.js +152 -6
  116. package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
  117. package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js +637 -491
  118. package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js.map +1 -1
  119. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +605 -459
  120. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +1 -1
  121. package/bundles/taiga-ui-kit-directives-unmask-handler.umd.js +540 -394
  122. package/bundles/taiga-ui-kit-directives-unmask-handler.umd.js.map +1 -1
  123. package/bundles/taiga-ui-kit-pipes-field-error.umd.js +693 -547
  124. package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
  125. package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js +616 -470
  126. package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js.map +1 -1
  127. package/bundles/taiga-ui-kit-pipes-sort-countries.umd.js +524 -378
  128. package/bundles/taiga-ui-kit-pipes-sort-countries.umd.js.map +1 -1
  129. package/bundles/taiga-ui-kit-utils-mask.umd.js +152 -6
  130. package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
  131. package/bundles/taiga-ui-kit-utils-math.umd.js +152 -6
  132. package/bundles/taiga-ui-kit-utils-math.umd.js.map +1 -1
  133. package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js +152 -6
  134. package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
  135. package/components/progress/index.d.ts +1 -0
  136. package/components/progress/progress-bar/progress-bar.component.d.ts +6 -4
  137. package/components/progress/progress-circle/progress-circle.component.d.ts +3 -1
  138. package/components/progress/progress.options.d.ts +9 -0
  139. package/esm2015/components/checkbox-block/checkbox-block.component.js +1 -1
  140. package/esm2015/components/progress/index.js +2 -1
  141. package/esm2015/components/progress/progress-bar/progress-bar.component.js +11 -5
  142. package/esm2015/components/progress/progress-circle/progress-circle.component.js +10 -5
  143. package/esm2015/components/progress/progress.options.js +10 -0
  144. package/esm2015/components/radio-block/radio-block.component.js +1 -1
  145. package/esm2015/components/textarea/deprecated.js +7 -4
  146. package/esm2015/components/textarea/textarea.component.js +1 -1
  147. package/fesm2015/taiga-ui-kit-components-checkbox-block.js +1 -1
  148. package/fesm2015/taiga-ui-kit-components-checkbox-block.js.map +1 -1
  149. package/fesm2015/taiga-ui-kit-components-progress.js +28 -10
  150. package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
  151. package/fesm2015/taiga-ui-kit-components-radio-block.js +1 -1
  152. package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
  153. package/fesm2015/taiga-ui-kit-components-textarea.js +7 -4
  154. package/fesm2015/taiga-ui-kit-components-textarea.js.map +1 -1
  155. package/package.json +42 -42
@@ -1,815 +1,961 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@maskito/kit'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@tinkoff/ng-polymorpheus'), require('@taiga-ui/kit/directives'), require('@maskito/angular'), require('@angular/common')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-number', ['exports', '@angular/core', '@angular/forms', '@maskito/kit', '@taiga-ui/cdk', '@taiga-ui/core', '@tinkoff/ng-polymorpheus', '@taiga-ui/kit/directives', '@maskito/angular', '@angular/common'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].kit = global["taiga-ui"].kit || {}, global["taiga-ui"].kit.components = global["taiga-ui"].kit.components || {}, global["taiga-ui"].kit.components["input-number"] = {}), global.ng.core, global.ng.forms, global.kit, global.i7, global.i1, global.i5, global["taiga-ui"].kit.directives, global.i3, global.ng.common));
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@maskito/kit'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@tinkoff/ng-polymorpheus'), require('@taiga-ui/kit/directives'), require('@maskito/angular'), require('@angular/common')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-number', ['exports', '@angular/core', '@angular/forms', '@maskito/kit', '@taiga-ui/cdk', '@taiga-ui/core', '@tinkoff/ng-polymorpheus', '@taiga-ui/kit/directives', '@maskito/angular', '@angular/common'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].kit = global["taiga-ui"].kit || {}, global["taiga-ui"].kit.components = global["taiga-ui"].kit.components || {}, global["taiga-ui"].kit.components["input-number"] = {}), global.ng.core, global.ng.forms, global.kit, global.i7, global.i1, global.i5, global["taiga-ui"].kit.directives, global.i3, global.ng.common));
5
5
  })(this, (function (exports, i0, i6, kit, i7, i1, i5, i2, i3, i4) { '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
- });
18
- }
19
- });
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
+ });
20
18
  }
21
- n["default"] = e;
22
- return Object.freeze(n);
19
+ });
23
20
  }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
24
24
 
25
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
27
- var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
28
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
30
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
32
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
27
+ var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
28
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
30
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
32
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
33
33
 
34
- /*! *****************************************************************************
35
- Copyright (c) Microsoft Corporation.
34
+ /******************************************************************************
35
+ Copyright (c) Microsoft Corporation.
36
36
 
37
- Permission to use, copy, modify, and/or distribute this software for any
38
- purpose with or without fee is hereby granted.
37
+ Permission to use, copy, modify, and/or distribute this software for any
38
+ purpose with or without fee is hereby granted.
39
39
 
40
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
41
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
42
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
43
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
44
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
45
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
46
- PERFORMANCE OF THIS SOFTWARE.
47
- ***************************************************************************** */
48
- /* global Reflect, Promise */
49
- var extendStatics = function (d, b) {
50
- extendStatics = Object.setPrototypeOf ||
51
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52
- function (d, b) { for (var p in b)
53
- if (Object.prototype.hasOwnProperty.call(b, p))
54
- d[p] = b[p]; };
55
- return extendStatics(d, b);
56
- };
57
- function __extends(d, b) {
58
- if (typeof b !== "function" && b !== null)
59
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
60
- extendStatics(d, b);
61
- function __() { this.constructor = d; }
62
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
63
- }
64
- var __assign = function () {
65
- __assign = Object.assign || function __assign(t) {
66
- for (var s, i = 1, n = arguments.length; i < n; i++) {
67
- s = arguments[i];
68
- for (var p in s)
69
- if (Object.prototype.hasOwnProperty.call(s, p))
70
- t[p] = s[p];
71
- }
72
- return t;
73
- };
74
- return __assign.apply(this, arguments);
75
- };
76
- function __rest(s, e) {
77
- var t = {};
78
- for (var p in s)
79
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
80
- t[p] = s[p];
81
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
82
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
83
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
84
- t[p[i]] = s[p[i]];
85
- }
86
- return t;
87
- }
88
- function __decorate(decorators, target, key, desc) {
89
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
90
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
91
- r = Reflect.decorate(decorators, target, key, desc);
92
- else
93
- for (var i = decorators.length - 1; i >= 0; i--)
94
- if (d = decorators[i])
95
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
96
- return c > 3 && r && Object.defineProperty(target, key, r), r;
97
- }
98
- function __param(paramIndex, decorator) {
99
- return function (target, key) { decorator(target, key, paramIndex); };
100
- }
101
- function __metadata(metadataKey, metadataValue) {
102
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
103
- return Reflect.metadata(metadataKey, metadataValue);
104
- }
105
- function __awaiter(thisArg, _arguments, P, generator) {
106
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
107
- return new (P || (P = Promise))(function (resolve, reject) {
108
- function fulfilled(value) { try {
109
- step(generator.next(value));
110
- }
111
- catch (e) {
112
- reject(e);
113
- } }
114
- function rejected(value) { try {
115
- step(generator["throw"](value));
116
- }
117
- catch (e) {
118
- reject(e);
119
- } }
120
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
121
- step((generator = generator.apply(thisArg, _arguments || [])).next());
122
- });
123
- }
124
- function __generator(thisArg, body) {
125
- var _ = { label: 0, sent: function () { if (t[0] & 1)
126
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
127
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
128
- function verb(n) { return function (v) { return step([n, v]); }; }
129
- function step(op) {
130
- if (f)
131
- throw new TypeError("Generator is already executing.");
132
- while (_)
133
- try {
134
- 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)
135
- return t;
136
- if (y = 0, t)
137
- op = [op[0] & 2, t.value];
138
- switch (op[0]) {
139
- case 0:
140
- case 1:
141
- t = op;
142
- break;
143
- case 4:
144
- _.label++;
145
- return { value: op[1], done: false };
146
- case 5:
147
- _.label++;
148
- y = op[1];
149
- op = [0];
150
- continue;
151
- case 7:
152
- op = _.ops.pop();
153
- _.trys.pop();
154
- continue;
155
- default:
156
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
157
- _ = 0;
158
- continue;
159
- }
160
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
161
- _.label = op[1];
162
- break;
163
- }
164
- if (op[0] === 6 && _.label < t[1]) {
165
- _.label = t[1];
166
- t = op;
167
- break;
168
- }
169
- if (t && _.label < t[2]) {
170
- _.label = t[2];
171
- _.ops.push(op);
172
- break;
173
- }
174
- if (t[2])
175
- _.ops.pop();
176
- _.trys.pop();
177
- continue;
178
- }
179
- op = body.call(thisArg, _);
180
- }
181
- catch (e) {
182
- op = [6, e];
183
- y = 0;
184
- }
185
- finally {
186
- f = t = 0;
187
- }
188
- if (op[0] & 5)
189
- throw op[1];
190
- return { value: op[0] ? op[1] : void 0, done: true };
191
- }
192
- }
193
- var __createBinding = Object.create ? (function (o, m, k, k2) {
194
- if (k2 === undefined)
195
- k2 = k;
196
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
197
- }) : (function (o, m, k, k2) {
198
- if (k2 === undefined)
199
- k2 = k;
200
- o[k2] = m[k];
201
- });
202
- function __exportStar(m, o) {
203
- for (var p in m)
204
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
205
- __createBinding(o, m, p);
206
- }
207
- function __values(o) {
208
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
209
- if (m)
210
- return m.call(o);
211
- if (o && typeof o.length === "number")
212
- return {
213
- next: function () {
214
- if (o && i >= o.length)
215
- o = void 0;
216
- return { value: o && o[i++], done: !o };
217
- }
218
- };
219
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
220
- }
221
- function __read(o, n) {
222
- var m = typeof Symbol === "function" && o[Symbol.iterator];
223
- if (!m)
224
- return o;
225
- var i = m.call(o), r, ar = [], e;
226
- try {
227
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
228
- ar.push(r.value);
229
- }
230
- catch (error) {
231
- e = { error: error };
232
- }
233
- finally {
234
- try {
235
- if (r && !r.done && (m = i["return"]))
236
- m.call(i);
237
- }
238
- finally {
239
- if (e)
240
- throw e.error;
241
- }
242
- }
243
- return ar;
244
- }
245
- /** @deprecated */
246
- function __spread() {
247
- for (var ar = [], i = 0; i < arguments.length; i++)
248
- ar = ar.concat(__read(arguments[i]));
249
- return ar;
250
- }
251
- /** @deprecated */
252
- function __spreadArrays() {
253
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
254
- s += arguments[i].length;
255
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
256
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
257
- r[k] = a[j];
258
- return r;
259
- }
260
- function __spreadArray(to, from, pack) {
261
- if (pack || arguments.length === 2)
262
- for (var i = 0, l = from.length, ar; i < l; i++) {
263
- if (ar || !(i in from)) {
264
- if (!ar)
265
- ar = Array.prototype.slice.call(from, 0, i);
266
- ar[i] = from[i];
267
- }
268
- }
269
- return to.concat(ar || from);
270
- }
271
- function __await(v) {
272
- return this instanceof __await ? (this.v = v, this) : new __await(v);
273
- }
274
- function __asyncGenerator(thisArg, _arguments, generator) {
275
- if (!Symbol.asyncIterator)
276
- throw new TypeError("Symbol.asyncIterator is not defined.");
277
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
278
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
279
- function verb(n) { if (g[n])
280
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
281
- function resume(n, v) { try {
282
- step(g[n](v));
283
- }
284
- catch (e) {
285
- settle(q[0][3], e);
286
- } }
287
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
288
- function fulfill(value) { resume("next", value); }
289
- function reject(value) { resume("throw", value); }
290
- function settle(f, v) { if (f(v), q.shift(), q.length)
291
- resume(q[0][0], q[0][1]); }
292
- }
293
- function __asyncDelegator(o) {
294
- var i, p;
295
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
296
- 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; }
297
- }
298
- function __asyncValues(o) {
299
- if (!Symbol.asyncIterator)
300
- throw new TypeError("Symbol.asyncIterator is not defined.");
301
- var m = o[Symbol.asyncIterator], i;
302
- 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);
303
- 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); }); }; }
304
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
305
- }
306
- function __makeTemplateObject(cooked, raw) {
307
- if (Object.defineProperty) {
308
- Object.defineProperty(cooked, "raw", { value: raw });
309
- }
310
- else {
311
- cooked.raw = raw;
312
- }
313
- return cooked;
314
- }
315
- ;
316
- var __setModuleDefault = Object.create ? (function (o, v) {
317
- Object.defineProperty(o, "default", { enumerable: true, value: v });
318
- }) : function (o, v) {
319
- o["default"] = v;
320
- };
321
- function __importStar(mod) {
322
- if (mod && mod.__esModule)
323
- return mod;
324
- var result = {};
325
- if (mod != null)
326
- for (var k in mod)
327
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
328
- __createBinding(result, mod, k);
329
- __setModuleDefault(result, mod);
330
- return result;
331
- }
332
- function __importDefault(mod) {
333
- return (mod && mod.__esModule) ? mod : { default: mod };
334
- }
335
- function __classPrivateFieldGet(receiver, state, kind, f) {
336
- if (kind === "a" && !f)
337
- throw new TypeError("Private accessor was defined without a getter");
338
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
339
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
340
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
341
- }
342
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
343
- if (kind === "m")
344
- throw new TypeError("Private method is not writable");
345
- if (kind === "a" && !f)
346
- throw new TypeError("Private accessor was defined without a setter");
347
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
348
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
349
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
350
- }
40
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
41
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
42
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
43
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
44
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
45
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
46
+ PERFORMANCE OF THIS SOFTWARE.
47
+ ***************************************************************************** */
48
+ /* global Reflect, Promise, SuppressedError, Symbol */
49
+ var extendStatics = function (d, b) {
50
+ extendStatics = Object.setPrototypeOf ||
51
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52
+ function (d, b) { for (var p in b)
53
+ if (Object.prototype.hasOwnProperty.call(b, p))
54
+ d[p] = b[p]; };
55
+ return extendStatics(d, b);
56
+ };
57
+ function __extends(d, b) {
58
+ if (typeof b !== "function" && b !== null)
59
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
60
+ extendStatics(d, b);
61
+ function __() { this.constructor = d; }
62
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
63
+ }
64
+ var __assign = function () {
65
+ __assign = Object.assign || function __assign(t) {
66
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
67
+ s = arguments[i];
68
+ for (var p in s)
69
+ if (Object.prototype.hasOwnProperty.call(s, p))
70
+ t[p] = s[p];
71
+ }
72
+ return t;
73
+ };
74
+ return __assign.apply(this, arguments);
75
+ };
76
+ function __rest(s, e) {
77
+ var t = {};
78
+ for (var p in s)
79
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
80
+ t[p] = s[p];
81
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
82
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
83
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
84
+ t[p[i]] = s[p[i]];
85
+ }
86
+ return t;
87
+ }
88
+ function __decorate(decorators, target, key, desc) {
89
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
90
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
91
+ r = Reflect.decorate(decorators, target, key, desc);
92
+ else
93
+ for (var i = decorators.length - 1; i >= 0; i--)
94
+ if (d = decorators[i])
95
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
96
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
97
+ }
98
+ function __param(paramIndex, decorator) {
99
+ return function (target, key) { decorator(target, key, paramIndex); };
100
+ }
101
+ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
102
+ function accept(f) { if (f !== void 0 && typeof f !== "function")
103
+ throw new TypeError("Function expected"); return f; }
104
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
105
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
106
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
107
+ var _, done = false;
108
+ for (var i = decorators.length - 1; i >= 0; i--) {
109
+ var context = {};
110
+ for (var p in contextIn)
111
+ context[p] = p === "access" ? {} : contextIn[p];
112
+ for (var p in contextIn.access)
113
+ context.access[p] = contextIn.access[p];
114
+ context.addInitializer = function (f) { if (done)
115
+ throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
116
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
117
+ if (kind === "accessor") {
118
+ if (result === void 0)
119
+ continue;
120
+ if (result === null || typeof result !== "object")
121
+ throw new TypeError("Object expected");
122
+ if (_ = accept(result.get))
123
+ descriptor.get = _;
124
+ if (_ = accept(result.set))
125
+ descriptor.set = _;
126
+ if (_ = accept(result.init))
127
+ initializers.unshift(_);
128
+ }
129
+ else if (_ = accept(result)) {
130
+ if (kind === "field")
131
+ initializers.unshift(_);
132
+ else
133
+ descriptor[key] = _;
134
+ }
135
+ }
136
+ if (target)
137
+ Object.defineProperty(target, contextIn.name, descriptor);
138
+ done = true;
139
+ }
140
+ ;
141
+ function __runInitializers(thisArg, initializers, value) {
142
+ var useValue = arguments.length > 2;
143
+ for (var i = 0; i < initializers.length; i++) {
144
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
145
+ }
146
+ return useValue ? value : void 0;
147
+ }
148
+ ;
149
+ function __propKey(x) {
150
+ return typeof x === "symbol" ? x : "".concat(x);
151
+ }
152
+ ;
153
+ function __setFunctionName(f, name, prefix) {
154
+ if (typeof name === "symbol")
155
+ name = name.description ? "[".concat(name.description, "]") : "";
156
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
157
+ }
158
+ ;
159
+ function __metadata(metadataKey, metadataValue) {
160
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
161
+ return Reflect.metadata(metadataKey, metadataValue);
162
+ }
163
+ function __awaiter(thisArg, _arguments, P, generator) {
164
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
165
+ return new (P || (P = Promise))(function (resolve, reject) {
166
+ function fulfilled(value) { try {
167
+ step(generator.next(value));
168
+ }
169
+ catch (e) {
170
+ reject(e);
171
+ } }
172
+ function rejected(value) { try {
173
+ step(generator["throw"](value));
174
+ }
175
+ catch (e) {
176
+ reject(e);
177
+ } }
178
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
179
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
180
+ });
181
+ }
182
+ function __generator(thisArg, body) {
183
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
184
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
185
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
186
+ function verb(n) { return function (v) { return step([n, v]); }; }
187
+ function step(op) {
188
+ if (f)
189
+ throw new TypeError("Generator is already executing.");
190
+ while (g && (g = 0, op[0] && (_ = 0)), _)
191
+ try {
192
+ 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)
193
+ return t;
194
+ if (y = 0, t)
195
+ op = [op[0] & 2, t.value];
196
+ switch (op[0]) {
197
+ case 0:
198
+ case 1:
199
+ t = op;
200
+ break;
201
+ case 4:
202
+ _.label++;
203
+ return { value: op[1], done: false };
204
+ case 5:
205
+ _.label++;
206
+ y = op[1];
207
+ op = [0];
208
+ continue;
209
+ case 7:
210
+ op = _.ops.pop();
211
+ _.trys.pop();
212
+ continue;
213
+ default:
214
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
215
+ _ = 0;
216
+ continue;
217
+ }
218
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
219
+ _.label = op[1];
220
+ break;
221
+ }
222
+ if (op[0] === 6 && _.label < t[1]) {
223
+ _.label = t[1];
224
+ t = op;
225
+ break;
226
+ }
227
+ if (t && _.label < t[2]) {
228
+ _.label = t[2];
229
+ _.ops.push(op);
230
+ break;
231
+ }
232
+ if (t[2])
233
+ _.ops.pop();
234
+ _.trys.pop();
235
+ continue;
236
+ }
237
+ op = body.call(thisArg, _);
238
+ }
239
+ catch (e) {
240
+ op = [6, e];
241
+ y = 0;
242
+ }
243
+ finally {
244
+ f = t = 0;
245
+ }
246
+ if (op[0] & 5)
247
+ throw op[1];
248
+ return { value: op[0] ? op[1] : void 0, done: true };
249
+ }
250
+ }
251
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
252
+ if (k2 === undefined)
253
+ k2 = k;
254
+ var desc = Object.getOwnPropertyDescriptor(m, k);
255
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
256
+ desc = { enumerable: true, get: function () { return m[k]; } };
257
+ }
258
+ Object.defineProperty(o, k2, desc);
259
+ }) : (function (o, m, k, k2) {
260
+ if (k2 === undefined)
261
+ k2 = k;
262
+ o[k2] = m[k];
263
+ });
264
+ function __exportStar(m, o) {
265
+ for (var p in m)
266
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
267
+ __createBinding(o, m, p);
268
+ }
269
+ function __values(o) {
270
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
271
+ if (m)
272
+ return m.call(o);
273
+ if (o && typeof o.length === "number")
274
+ return {
275
+ next: function () {
276
+ if (o && i >= o.length)
277
+ o = void 0;
278
+ return { value: o && o[i++], done: !o };
279
+ }
280
+ };
281
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
282
+ }
283
+ function __read(o, n) {
284
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
285
+ if (!m)
286
+ return o;
287
+ var i = m.call(o), r, ar = [], e;
288
+ try {
289
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
290
+ ar.push(r.value);
291
+ }
292
+ catch (error) {
293
+ e = { error: error };
294
+ }
295
+ finally {
296
+ try {
297
+ if (r && !r.done && (m = i["return"]))
298
+ m.call(i);
299
+ }
300
+ finally {
301
+ if (e)
302
+ throw e.error;
303
+ }
304
+ }
305
+ return ar;
306
+ }
307
+ /** @deprecated */
308
+ function __spread() {
309
+ for (var ar = [], i = 0; i < arguments.length; i++)
310
+ ar = ar.concat(__read(arguments[i]));
311
+ return ar;
312
+ }
313
+ /** @deprecated */
314
+ function __spreadArrays() {
315
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
316
+ s += arguments[i].length;
317
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
318
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
319
+ r[k] = a[j];
320
+ return r;
321
+ }
322
+ function __spreadArray(to, from, pack) {
323
+ if (pack || arguments.length === 2)
324
+ for (var i = 0, l = from.length, ar; i < l; i++) {
325
+ if (ar || !(i in from)) {
326
+ if (!ar)
327
+ ar = Array.prototype.slice.call(from, 0, i);
328
+ ar[i] = from[i];
329
+ }
330
+ }
331
+ return to.concat(ar || Array.prototype.slice.call(from));
332
+ }
333
+ function __await(v) {
334
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
335
+ }
336
+ function __asyncGenerator(thisArg, _arguments, generator) {
337
+ if (!Symbol.asyncIterator)
338
+ throw new TypeError("Symbol.asyncIterator is not defined.");
339
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
340
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
341
+ function verb(n) { if (g[n])
342
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
343
+ function resume(n, v) { try {
344
+ step(g[n](v));
345
+ }
346
+ catch (e) {
347
+ settle(q[0][3], e);
348
+ } }
349
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
350
+ function fulfill(value) { resume("next", value); }
351
+ function reject(value) { resume("throw", value); }
352
+ function settle(f, v) { if (f(v), q.shift(), q.length)
353
+ resume(q[0][0], q[0][1]); }
354
+ }
355
+ function __asyncDelegator(o) {
356
+ var i, p;
357
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
358
+ 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; }
359
+ }
360
+ function __asyncValues(o) {
361
+ if (!Symbol.asyncIterator)
362
+ throw new TypeError("Symbol.asyncIterator is not defined.");
363
+ var m = o[Symbol.asyncIterator], i;
364
+ 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);
365
+ 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); }); }; }
366
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
367
+ }
368
+ function __makeTemplateObject(cooked, raw) {
369
+ if (Object.defineProperty) {
370
+ Object.defineProperty(cooked, "raw", { value: raw });
371
+ }
372
+ else {
373
+ cooked.raw = raw;
374
+ }
375
+ return cooked;
376
+ }
377
+ ;
378
+ var __setModuleDefault = Object.create ? (function (o, v) {
379
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
380
+ }) : function (o, v) {
381
+ o["default"] = v;
382
+ };
383
+ function __importStar(mod) {
384
+ if (mod && mod.__esModule)
385
+ return mod;
386
+ var result = {};
387
+ if (mod != null)
388
+ for (var k in mod)
389
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
390
+ __createBinding(result, mod, k);
391
+ __setModuleDefault(result, mod);
392
+ return result;
393
+ }
394
+ function __importDefault(mod) {
395
+ return (mod && mod.__esModule) ? mod : { default: mod };
396
+ }
397
+ function __classPrivateFieldGet(receiver, state, kind, f) {
398
+ if (kind === "a" && !f)
399
+ throw new TypeError("Private accessor was defined without a getter");
400
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
401
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
402
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
403
+ }
404
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
405
+ if (kind === "m")
406
+ throw new TypeError("Private method is not writable");
407
+ if (kind === "a" && !f)
408
+ throw new TypeError("Private accessor was defined without a setter");
409
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
410
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
411
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
412
+ }
413
+ function __classPrivateFieldIn(state, receiver) {
414
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
415
+ throw new TypeError("Cannot use 'in' operator on non-object");
416
+ return typeof state === "function" ? receiver === state : state.has(receiver);
417
+ }
418
+ function __addDisposableResource(env, value, async) {
419
+ if (value !== null && value !== void 0) {
420
+ if (typeof value !== "object" && typeof value !== "function")
421
+ throw new TypeError("Object expected.");
422
+ var dispose;
423
+ if (async) {
424
+ if (!Symbol.asyncDispose)
425
+ throw new TypeError("Symbol.asyncDispose is not defined.");
426
+ dispose = value[Symbol.asyncDispose];
427
+ }
428
+ if (dispose === void 0) {
429
+ if (!Symbol.dispose)
430
+ throw new TypeError("Symbol.dispose is not defined.");
431
+ dispose = value[Symbol.dispose];
432
+ }
433
+ if (typeof dispose !== "function")
434
+ throw new TypeError("Object not disposable.");
435
+ env.stack.push({ value: value, dispose: dispose, async: async });
436
+ }
437
+ else if (async) {
438
+ env.stack.push({ async: true });
439
+ }
440
+ return value;
441
+ }
442
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
443
+ var e = new Error(message);
444
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
445
+ };
446
+ function __disposeResources(env) {
447
+ function fail(e) {
448
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
449
+ env.hasError = true;
450
+ }
451
+ function next() {
452
+ while (env.stack.length) {
453
+ var rec = env.stack.pop();
454
+ try {
455
+ var result = rec.dispose && rec.dispose.call(rec.value);
456
+ if (rec.async)
457
+ return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
458
+ }
459
+ catch (e) {
460
+ fail(e);
461
+ }
462
+ }
463
+ if (env.hasError)
464
+ throw env.error;
465
+ }
466
+ return next();
467
+ }
468
+ var tslib_es6 = {
469
+ __extends: __extends,
470
+ __assign: __assign,
471
+ __rest: __rest,
472
+ __decorate: __decorate,
473
+ __param: __param,
474
+ __metadata: __metadata,
475
+ __awaiter: __awaiter,
476
+ __generator: __generator,
477
+ __createBinding: __createBinding,
478
+ __exportStar: __exportStar,
479
+ __values: __values,
480
+ __read: __read,
481
+ __spread: __spread,
482
+ __spreadArrays: __spreadArrays,
483
+ __spreadArray: __spreadArray,
484
+ __await: __await,
485
+ __asyncGenerator: __asyncGenerator,
486
+ __asyncDelegator: __asyncDelegator,
487
+ __asyncValues: __asyncValues,
488
+ __makeTemplateObject: __makeTemplateObject,
489
+ __importStar: __importStar,
490
+ __importDefault: __importDefault,
491
+ __classPrivateFieldGet: __classPrivateFieldGet,
492
+ __classPrivateFieldSet: __classPrivateFieldSet,
493
+ __classPrivateFieldIn: __classPrivateFieldIn,
494
+ __addDisposableResource: __addDisposableResource,
495
+ __disposeResources: __disposeResources,
496
+ };
351
497
 
352
- /** Default values for the input number options. */
353
- var TUI_INPUT_NUMBER_DEFAULT_OPTIONS = {
354
- icons: {
355
- up: 'tuiIconPlus',
356
- down: 'tuiIconMinus',
357
- },
358
- min: Number.MIN_SAFE_INTEGER,
359
- max: Number.MAX_SAFE_INTEGER,
360
- step: 0,
361
- decimal: 'not-zero',
362
- precision: 2,
363
- };
364
- /**
365
- * Default parameters for input count component
366
- */
367
- var TUI_INPUT_NUMBER_OPTIONS = i7.tuiCreateToken(TUI_INPUT_NUMBER_DEFAULT_OPTIONS);
368
- function tuiInputNumberOptionsProvider(options) {
369
- return i7.tuiProvideOptions(TUI_INPUT_NUMBER_OPTIONS, options, TUI_INPUT_NUMBER_DEFAULT_OPTIONS);
370
- }
498
+ /** Default values for the input number options. */
499
+ var TUI_INPUT_NUMBER_DEFAULT_OPTIONS = {
500
+ icons: {
501
+ up: 'tuiIconPlus',
502
+ down: 'tuiIconMinus',
503
+ },
504
+ min: Number.MIN_SAFE_INTEGER,
505
+ max: Number.MAX_SAFE_INTEGER,
506
+ step: 0,
507
+ decimal: 'not-zero',
508
+ precision: 2,
509
+ };
510
+ /**
511
+ * Default parameters for input count component
512
+ */
513
+ var TUI_INPUT_NUMBER_OPTIONS = i7.tuiCreateToken(TUI_INPUT_NUMBER_DEFAULT_OPTIONS);
514
+ function tuiInputNumberOptionsProvider(options) {
515
+ return i7.tuiProvideOptions(TUI_INPUT_NUMBER_OPTIONS, options, TUI_INPUT_NUMBER_DEFAULT_OPTIONS);
516
+ }
371
517
 
372
- var DEFAULT_MAX_LENGTH = 18;
373
- var TUI_NUMBER_VALUE_TRANSFORMER = new i0.InjectionToken('');
374
- var TuiInputNumberComponent = /** @class */ (function (_super) {
375
- __extends(TuiInputNumberComponent, _super);
376
- function TuiInputNumberComponent(control, cdr, transformer, options, numberFormat, isIOS, textfieldSize, controller) {
377
- var _this = _super.call(this, control, cdr, transformer) || this;
378
- _this.options = options;
379
- _this.numberFormat = numberFormat;
380
- _this.isIOS = isIOS;
381
- _this.textfieldSize = textfieldSize;
382
- _this.controller = controller;
383
- _this.unfinishedValue = '';
384
- _this.min = _this.options.min;
385
- _this.max = _this.options.max;
386
- _this.decimal = _this.options.decimal;
387
- _this.precision = _this.options.precision;
388
- _this.step = _this.options.step;
389
- /** @deprecated use `tuiTextfieldPrefix` from {@link TuiTextfieldControllerModule} instead */
390
- _this.prefix = '';
391
- /** @deprecated use `tuiTextfieldPostfix` from {@link TuiTextfieldControllerModule} instead */
392
- _this.postfix = '';
393
- _this.polymorpheusValueContent = i7.EMPTY_QUERY;
394
- return _this;
395
- }
396
- Object.defineProperty(TuiInputNumberComponent.prototype, "size", {
397
- get: function () {
398
- return this.textfieldSize.size;
399
- },
400
- enumerable: false,
401
- configurable: true
402
- });
403
- Object.defineProperty(TuiInputNumberComponent.prototype, "computedMin", {
404
- get: function () {
405
- return this.computeMin(this.min, this.max);
406
- },
407
- enumerable: false,
408
- configurable: true
409
- });
410
- Object.defineProperty(TuiInputNumberComponent.prototype, "computedMax", {
411
- get: function () {
412
- return this.computeMax(this.min, this.max);
413
- },
414
- enumerable: false,
415
- configurable: true
416
- });
417
- Object.defineProperty(TuiInputNumberComponent.prototype, "nativeFocusableElement", {
418
- get: function () {
419
- return !this.textfield || this.computedDisabled
420
- ? null
421
- : this.textfield.nativeFocusableElement;
422
- },
423
- enumerable: false,
424
- configurable: true
425
- });
426
- Object.defineProperty(TuiInputNumberComponent.prototype, "focused", {
427
- get: function () {
428
- var _a;
429
- return !!((_a = this.textfield) === null || _a === void 0 ? void 0 : _a.focused);
430
- },
431
- enumerable: false,
432
- configurable: true
433
- });
434
- Object.defineProperty(TuiInputNumberComponent.prototype, "isNegativeAllowed", {
435
- get: function () {
436
- return this.computedMin < 0;
437
- },
438
- enumerable: false,
439
- configurable: true
440
- });
441
- Object.defineProperty(TuiInputNumberComponent.prototype, "inputMode", {
442
- get: function () {
443
- if (this.isIOS && this.isNegativeAllowed) {
444
- // iPhone does not have minus sign if inputMode is equal to 'numeric' / 'decimal'
445
- return 'text';
446
- }
447
- return this.decimal === 'never' ? 'numeric' : 'decimal';
448
- },
449
- enumerable: false,
450
- configurable: true
451
- });
452
- Object.defineProperty(TuiInputNumberComponent.prototype, "calculatedMaxLength", {
453
- get: function () {
454
- var decimalPart = this.decimal !== 'never' &&
455
- this.nativeValue.includes(this.numberFormat.decimalSeparator);
456
- var precision = decimalPart ? Math.min(this.precision + 1, 20) : 0;
457
- var takeThousand = this.numberFormat.thousandSeparator.repeat(5).length;
458
- return DEFAULT_MAX_LENGTH + precision + takeThousand;
459
- },
460
- enumerable: false,
461
- configurable: true
462
- });
463
- Object.defineProperty(TuiInputNumberComponent.prototype, "formattedValue", {
464
- get: function () {
465
- return this.value !== null ? this.getFormattedValue(this.value || 0) : '';
466
- },
467
- enumerable: false,
468
- configurable: true
469
- });
470
- Object.defineProperty(TuiInputNumberComponent.prototype, "computedValue", {
471
- get: function () {
472
- return this.focused ? this.nativeValue : this.formattedValue;
473
- },
474
- enumerable: false,
475
- configurable: true
476
- });
477
- Object.defineProperty(TuiInputNumberComponent.prototype, "canDecrement", {
478
- get: function () {
479
- return this.interactive && (this.value || 0) > this.computedMin;
480
- },
481
- enumerable: false,
482
- configurable: true
483
- });
484
- Object.defineProperty(TuiInputNumberComponent.prototype, "canIncrement", {
485
- get: function () {
486
- return this.interactive && (this.value || 0) < this.computedMax;
487
- },
488
- enumerable: false,
489
- configurable: true
490
- });
491
- Object.defineProperty(TuiInputNumberComponent.prototype, "computedPrefix", {
492
- get: function () {
493
- return this.prefix || this.controller.prefix;
494
- },
495
- enumerable: false,
496
- configurable: true
497
- });
498
- Object.defineProperty(TuiInputNumberComponent.prototype, "computedPostfix", {
499
- get: function () {
500
- var postfix = this.postfix || this.controller.postfix;
501
- return postfix && " " + postfix;
502
- },
503
- enumerable: false,
504
- configurable: true
505
- });
506
- Object.defineProperty(TuiInputNumberComponent.prototype, "mask", {
507
- get: function () {
508
- return this.calculateMask(this.precision, this.decimal, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator, this.computedMin, this.computedMax, this.computedPrefix, this.computedPostfix);
509
- },
510
- enumerable: false,
511
- configurable: true
512
- });
513
- TuiInputNumberComponent.prototype.onArrow = function (step) {
514
- if (!step) {
515
- return;
516
- }
517
- this.value = i7.tuiClamp((this.value || 0) + step, this.computedMin, this.computedMax);
518
- this.nativeValue = this.formattedValue;
519
- };
520
- TuiInputNumberComponent.prototype.onValueChange = function (nativeValue) {
521
- var parsedValue = kit.maskitoParseNumber(nativeValue, this.numberFormat.decimalSeparator);
522
- this.unfinishedValue = null;
523
- if (Number.isNaN(parsedValue)) {
524
- this.value = null;
525
- return;
526
- }
527
- if (this.isNativeValueNotFinished) {
528
- this.unfinishedValue = nativeValue;
529
- this.cdr.markForCheck();
530
- return;
531
- }
532
- if (parsedValue < this.computedMin || parsedValue > this.computedMax) {
533
- return;
534
- }
535
- this.value = parsedValue;
536
- };
537
- TuiInputNumberComponent.prototype.onFocused = function (focused) {
538
- this.updateFocused(focused);
539
- var nativeNumberValue = this.unfinishedValue
540
- ? kit.maskitoParseNumber(this.unfinishedValue, this.numberFormat.decimalSeparator)
541
- : this.nativeNumberValue;
542
- this.unfinishedValue = null;
543
- if (Number.isNaN(nativeNumberValue)) {
544
- this.nativeValue = focused ? this.computedPrefix + this.computedPostfix : '';
545
- this.value = null;
546
- return;
547
- }
548
- if (!focused) {
549
- this.value = nativeNumberValue;
550
- this.nativeValue = this.formattedValue;
551
- }
552
- };
553
- TuiInputNumberComponent.prototype.getFormattedValue = function (value) {
554
- var absValue = Math.abs(value);
555
- var hasFraction = absValue % 1 > 0;
556
- var decimalLimit = this.decimal === 'always' || (hasFraction && this.decimal !== 'never')
557
- ? this.precision
558
- : 0;
559
- var fraction = hasFraction
560
- ? i1.tuiGetFractionPartPadded(value, this.precision)
561
- : '';
562
- if (this.focused && this.decimal !== 'always') {
563
- decimalLimit = fraction.length;
564
- }
565
- return (this.computedPrefix +
566
- i1.tuiFormatNumber(value, Object.assign(Object.assign({}, this.numberFormat), { decimalLimit: decimalLimit })).replace(i7.CHAR_HYPHEN, i7.CHAR_MINUS) +
567
- this.computedPostfix);
568
- };
569
- Object.defineProperty(TuiInputNumberComponent.prototype, "isNativeValueNotFinished", {
570
- get: function () {
571
- var nativeNumberValue = this.nativeNumberValue;
572
- return nativeNumberValue < 0
573
- ? nativeNumberValue > this.computedMax
574
- : nativeNumberValue < this.computedMin;
575
- },
576
- enumerable: false,
577
- configurable: true
578
- });
579
- Object.defineProperty(TuiInputNumberComponent.prototype, "nativeValue", {
580
- get: function () {
581
- var _a;
582
- return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.value) || '';
583
- },
584
- set: function (value) {
585
- if (!this.textfield || !this.nativeFocusableElement) {
586
- return;
587
- }
588
- this.textfield.value = value;
589
- this.nativeFocusableElement.value = value;
590
- },
591
- enumerable: false,
592
- configurable: true
593
- });
594
- TuiInputNumberComponent.prototype.writeValue = function (value) {
595
- _super.prototype.writeValue.call(this, value);
596
- this.nativeValue = this.formattedValue;
597
- };
598
- Object.defineProperty(TuiInputNumberComponent.prototype, "nativeNumberValue", {
599
- get: function () {
600
- return kit.maskitoParseNumber(this.nativeValue, this.numberFormat.decimalSeparator);
601
- },
602
- enumerable: false,
603
- configurable: true
604
- });
605
- TuiInputNumberComponent.prototype.computeMin = function (min, max) {
606
- var _a, _b, _c, _d, _e, _f;
607
- return Math.min((_c = (_b = (_a = this.valueTransformer) === null || _a === void 0 ? void 0 : _a.fromControlValue(min)) !== null && _b !== void 0 ? _b : min) !== null && _c !== void 0 ? _c : this.options.min, (_f = (_e = (_d = this.valueTransformer) === null || _d === void 0 ? void 0 : _d.fromControlValue(max)) !== null && _e !== void 0 ? _e : max) !== null && _f !== void 0 ? _f : this.options.max);
608
- };
609
- TuiInputNumberComponent.prototype.computeMax = function (min, max) {
610
- var _a, _b, _c, _d, _e, _f;
611
- return Math.max((_c = (_b = (_a = this.valueTransformer) === null || _a === void 0 ? void 0 : _a.fromControlValue(min)) !== null && _b !== void 0 ? _b : min) !== null && _c !== void 0 ? _c : this.options.min, (_f = (_e = (_d = this.valueTransformer) === null || _d === void 0 ? void 0 : _d.fromControlValue(max)) !== null && _e !== void 0 ? _e : max) !== null && _f !== void 0 ? _f : this.options.max);
612
- };
613
- TuiInputNumberComponent.prototype.calculateMask = function (precision, decimalMode, decimalSeparator, thousandSeparator, min, max, prefix, postfix) {
614
- var _a = kit.maskitoNumberOptionsGenerator({
615
- decimalSeparator: decimalSeparator,
616
- thousandSeparator: thousandSeparator,
617
- min: min,
618
- max: max,
619
- prefix: prefix,
620
- postfix: postfix,
621
- precision: decimalMode === 'never' ? 0 : precision,
622
- decimalZeroPadding: decimalMode === 'always',
623
- }), plugins = _a.plugins, options = __rest(_a, ["plugins"]);
624
- return Object.assign(Object.assign({}, options), { plugins: __spreadArray(__spreadArray([], __read(plugins)), [
625
- kit.maskitoCaretGuard(function (value) { return [
626
- prefix.length,
627
- value.length - postfix.length,
628
- ]; }),
629
- ]) });
630
- };
631
- return TuiInputNumberComponent;
632
- }(i7.AbstractTuiNullableControl));
633
- TuiInputNumberComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberComponent, deps: [{ token: i6.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: TUI_NUMBER_VALUE_TRANSFORMER, optional: true }, { token: TUI_INPUT_NUMBER_OPTIONS }, { token: i1.TUI_NUMBER_FORMAT }, { token: i7.TUI_IS_IOS }, { token: i1.TUI_TEXTFIELD_SIZE }, { token: i1.TUI_TEXTFIELD_WATCHED_CONTROLLER }], target: i0__namespace.ɵɵFactoryTarget.Component });
634
- TuiInputNumberComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputNumberComponent, selector: "tui-input-number", inputs: { min: "min", max: "max", decimal: "decimal", precision: "precision", step: "step", prefix: "prefix", postfix: "postfix" }, host: { listeners: { "keydown.arrowDown": "onArrow(-step)", "keydown.arrowUp": "onArrow(step)" }, properties: { "attr.data-size": "this.size" } }, providers: [
635
- i7.tuiAsFocusableItemAccessor(TuiInputNumberComponent),
636
- i7.tuiAsControl(TuiInputNumberComponent),
637
- i1.TEXTFIELD_CONTROLLER_PROVIDER,
638
- ], queries: [{ propertyName: "polymorpheusValueContent", predicate: i5.PolymorpheusOutletDirective, descendants: true }], viewQueries: [{ propertyName: "textfield", first: true, predicate: i1.TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<tui-primitive-textfield\n #textfield\n tuiTextfieldPostfix=\"\"\n tuiTextfieldPrefix=\"\"\n tuiValueAccessor\n class=\"t-textfield\"\n [disabled]=\"computedDisabled\"\n [focusable]=\"focusable\"\n [invalid]=\"computedInvalid\"\n [maskito]=\"mask\"\n [pseudoActive]=\"pseudoActive\"\n [pseudoFocus]=\"computedFocused\"\n [pseudoHover]=\"pseudoHover\"\n [readOnly]=\"readOnly\"\n [value]=\"computedValue\"\n (focusedChange)=\"onFocused($event)\"\n (valueChange)=\"onValueChange($event)\"\n>\n <ng-content></ng-content>\n <ng-content\n ngProjectAs=\"input\"\n select=\"input\"\n ></ng-content>\n <div\n *ngIf=\"polymorpheusValueContent.length\"\n ngProjectAs=\"tuiContent\"\n class=\"t-value-content\"\n >\n <ng-container *polymorpheusOutlet=\"valueContent as text\">\n {{ text }}\n </ng-container>\n </div>\n</tui-primitive-textfield>\n\n<section\n *ngIf=\"step\"\n class=\"t-buttons\"\n>\n <button\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"textfield.appearance\"\n [disabled]=\"!canIncrement\"\n [focusable]=\"false\"\n [icon]=\"options.icons.up\"\n (click.prevent)=\"onArrow(step)\"\n (mousedown.prevent)=\"nativeFocusableElement?.focus()\"\n >\n +\n </button>\n <button\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"textfield.appearance\"\n [disabled]=\"!canDecrement\"\n [focusable]=\"false\"\n [icon]=\"options.icons.down\"\n (click.prevent)=\"onArrow(-step)\"\n (mousedown.prevent)=\"nativeFocusableElement?.focus()\"\n >\n -\n </button>\n</section>\n\n<ng-container *ngIf=\"polymorpheusValueContent.changes | async\"></ng-container>\n\n<ng-template #valueContent>\n <ng-content select=\"tuiContent\"></ng-content>\n</ng-template>\n", styles: [":host{display:flex;border-radius:var(--tui-radius-m);text-align:left}.t-textfield{flex:1;max-width:100%;border-radius:inherit;text-align:inherit}.t-textfield:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.t-value-content{width:100%}.t-buttons{display:flex;flex-direction:column;align-items:stretch;margin-left:.125rem;border-radius:inherit}[data-size=s]+.t-buttons{flex-direction:row-reverse}[data-size=s]+.t-buttons .t-button:first-child{margin:0 0 0 .125rem;border-top-right-radius:inherit;border-bottom-right-radius:inherit}[data-size=s]+.t-buttons .t-button:last-child{border-radius:0}[data-size=m]+.t-buttons .t-button{width:calc(var(--tui-height-m) * .75)}[data-size=l]+.t-buttons .t-button{width:calc(var(--tui-height-l) * .75)}.t-buttons .t-button{display:flex;flex:1;height:auto;border-radius:0}.t-buttons .t-button:first-child{margin-bottom:.125rem;border-top-right-radius:inherit}.t-buttons .t-button:last-child{border-bottom-right-radius:inherit}\n"], components: [{ type: i1__namespace.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i1__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i1__namespace.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i1__namespace.TuiTextfieldPostfixDirective, selector: "[tuiTextfieldPostfix]", inputs: ["tuiTextfieldPostfix"] }, { type: i1__namespace.TuiTextfieldPrefixDirective, selector: "[tuiTextfieldPrefix]", inputs: ["tuiTextfieldPrefix"] }, { type: i2__namespace.TuiValueAccessorDirective, selector: "[tuiValueAccessor]" }, { type: i3__namespace.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
639
- __decorate([
640
- i7.tuiPure
641
- ], TuiInputNumberComponent.prototype, "computeMin", null);
642
- __decorate([
643
- i7.tuiPure
644
- ], TuiInputNumberComponent.prototype, "computeMax", null);
645
- __decorate([
646
- i7.tuiPure
647
- ], TuiInputNumberComponent.prototype, "calculateMask", null);
648
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberComponent, decorators: [{
649
- type: i0.Component,
650
- args: [{
651
- selector: 'tui-input-number',
652
- templateUrl: './input-number.template.html',
653
- styleUrls: ['./input-number.style.less'],
654
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
655
- providers: [
656
- i7.tuiAsFocusableItemAccessor(TuiInputNumberComponent),
657
- i7.tuiAsControl(TuiInputNumberComponent),
658
- i1.TEXTFIELD_CONTROLLER_PROVIDER,
659
- ],
660
- }]
661
- }], ctorParameters: function () {
662
- return [{ type: i6__namespace.NgControl, decorators: [{
663
- type: i0.Optional
664
- }, {
665
- type: i0.Self
666
- }, {
667
- type: i0.Inject,
668
- args: [i6.NgControl]
669
- }] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
670
- type: i0.Inject,
671
- args: [i0.ChangeDetectorRef]
672
- }] }, { type: i7__namespace.AbstractTuiValueTransformer, decorators: [{
673
- type: i0.Optional
674
- }, {
675
- type: i0.Inject,
676
- args: [TUI_NUMBER_VALUE_TRANSFORMER]
677
- }] }, { type: undefined, decorators: [{
678
- type: i0.Inject,
679
- args: [TUI_INPUT_NUMBER_OPTIONS]
680
- }] }, { type: undefined, decorators: [{
681
- type: i0.Inject,
682
- args: [i1.TUI_NUMBER_FORMAT]
683
- }] }, { type: undefined, decorators: [{
684
- type: i0.Inject,
685
- args: [i7.TUI_IS_IOS]
686
- }] }, { type: i1__namespace.TuiTextfieldSizeDirective, decorators: [{
687
- type: i0.Inject,
688
- args: [i1.TUI_TEXTFIELD_SIZE]
689
- }] }, { type: i1__namespace.TuiTextfieldController, decorators: [{
690
- type: i0.Inject,
691
- args: [i1.TUI_TEXTFIELD_WATCHED_CONTROLLER]
692
- }] }];
693
- }, propDecorators: { textfield: [{
694
- type: i0.ViewChild,
695
- args: [i1.TuiPrimitiveTextfieldComponent]
696
- }], min: [{
697
- type: i0.Input
698
- }], max: [{
699
- type: i0.Input
700
- }], decimal: [{
701
- type: i0.Input
702
- }], precision: [{
703
- type: i0.Input
704
- }], step: [{
705
- type: i0.Input
706
- }], prefix: [{
707
- type: i0.Input
708
- }], postfix: [{
709
- type: i0.Input
710
- }], polymorpheusValueContent: [{
711
- type: i0.ContentChildren,
712
- args: [i5.PolymorpheusOutletDirective, { descendants: true }]
713
- }], size: [{
714
- type: i0.HostBinding,
715
- args: ['attr.data-size']
716
- }], onArrow: [{
717
- type: i0.HostListener,
718
- args: ['keydown.arrowDown', ['-step']]
719
- }, {
720
- type: i0.HostListener,
721
- args: ['keydown.arrowUp', ['step']]
722
- }], computeMin: [], computeMax: [], calculateMask: [] } });
518
+ var DEFAULT_MAX_LENGTH = 18;
519
+ var TUI_NUMBER_VALUE_TRANSFORMER = new i0.InjectionToken('');
520
+ var TuiInputNumberComponent = /** @class */ (function (_super) {
521
+ __extends(TuiInputNumberComponent, _super);
522
+ function TuiInputNumberComponent(control, cdr, transformer, options, numberFormat, isIOS, textfieldSize, controller) {
523
+ var _this = _super.call(this, control, cdr, transformer) || this;
524
+ _this.options = options;
525
+ _this.numberFormat = numberFormat;
526
+ _this.isIOS = isIOS;
527
+ _this.textfieldSize = textfieldSize;
528
+ _this.controller = controller;
529
+ _this.unfinishedValue = '';
530
+ _this.min = _this.options.min;
531
+ _this.max = _this.options.max;
532
+ _this.decimal = _this.options.decimal;
533
+ _this.precision = _this.options.precision;
534
+ _this.step = _this.options.step;
535
+ /** @deprecated use `tuiTextfieldPrefix` from {@link TuiTextfieldControllerModule} instead */
536
+ _this.prefix = '';
537
+ /** @deprecated use `tuiTextfieldPostfix` from {@link TuiTextfieldControllerModule} instead */
538
+ _this.postfix = '';
539
+ _this.polymorpheusValueContent = i7.EMPTY_QUERY;
540
+ return _this;
541
+ }
542
+ Object.defineProperty(TuiInputNumberComponent.prototype, "size", {
543
+ get: function () {
544
+ return this.textfieldSize.size;
545
+ },
546
+ enumerable: false,
547
+ configurable: true
548
+ });
549
+ Object.defineProperty(TuiInputNumberComponent.prototype, "computedMin", {
550
+ get: function () {
551
+ return this.computeMin(this.min, this.max);
552
+ },
553
+ enumerable: false,
554
+ configurable: true
555
+ });
556
+ Object.defineProperty(TuiInputNumberComponent.prototype, "computedMax", {
557
+ get: function () {
558
+ return this.computeMax(this.min, this.max);
559
+ },
560
+ enumerable: false,
561
+ configurable: true
562
+ });
563
+ Object.defineProperty(TuiInputNumberComponent.prototype, "nativeFocusableElement", {
564
+ get: function () {
565
+ return !this.textfield || this.computedDisabled
566
+ ? null
567
+ : this.textfield.nativeFocusableElement;
568
+ },
569
+ enumerable: false,
570
+ configurable: true
571
+ });
572
+ Object.defineProperty(TuiInputNumberComponent.prototype, "focused", {
573
+ get: function () {
574
+ var _a;
575
+ return !!((_a = this.textfield) === null || _a === void 0 ? void 0 : _a.focused);
576
+ },
577
+ enumerable: false,
578
+ configurable: true
579
+ });
580
+ Object.defineProperty(TuiInputNumberComponent.prototype, "isNegativeAllowed", {
581
+ get: function () {
582
+ return this.computedMin < 0;
583
+ },
584
+ enumerable: false,
585
+ configurable: true
586
+ });
587
+ Object.defineProperty(TuiInputNumberComponent.prototype, "inputMode", {
588
+ get: function () {
589
+ if (this.isIOS && this.isNegativeAllowed) {
590
+ // iPhone does not have minus sign if inputMode is equal to 'numeric' / 'decimal'
591
+ return 'text';
592
+ }
593
+ return this.decimal === 'never' ? 'numeric' : 'decimal';
594
+ },
595
+ enumerable: false,
596
+ configurable: true
597
+ });
598
+ Object.defineProperty(TuiInputNumberComponent.prototype, "calculatedMaxLength", {
599
+ get: function () {
600
+ var decimalPart = this.decimal !== 'never' &&
601
+ this.nativeValue.includes(this.numberFormat.decimalSeparator);
602
+ var precision = decimalPart ? Math.min(this.precision + 1, 20) : 0;
603
+ var takeThousand = this.numberFormat.thousandSeparator.repeat(5).length;
604
+ return DEFAULT_MAX_LENGTH + precision + takeThousand;
605
+ },
606
+ enumerable: false,
607
+ configurable: true
608
+ });
609
+ Object.defineProperty(TuiInputNumberComponent.prototype, "formattedValue", {
610
+ get: function () {
611
+ return this.value !== null ? this.getFormattedValue(this.value || 0) : '';
612
+ },
613
+ enumerable: false,
614
+ configurable: true
615
+ });
616
+ Object.defineProperty(TuiInputNumberComponent.prototype, "computedValue", {
617
+ get: function () {
618
+ return this.focused ? this.nativeValue : this.formattedValue;
619
+ },
620
+ enumerable: false,
621
+ configurable: true
622
+ });
623
+ Object.defineProperty(TuiInputNumberComponent.prototype, "canDecrement", {
624
+ get: function () {
625
+ return this.interactive && (this.value || 0) > this.computedMin;
626
+ },
627
+ enumerable: false,
628
+ configurable: true
629
+ });
630
+ Object.defineProperty(TuiInputNumberComponent.prototype, "canIncrement", {
631
+ get: function () {
632
+ return this.interactive && (this.value || 0) < this.computedMax;
633
+ },
634
+ enumerable: false,
635
+ configurable: true
636
+ });
637
+ Object.defineProperty(TuiInputNumberComponent.prototype, "computedPrefix", {
638
+ get: function () {
639
+ return this.prefix || this.controller.prefix;
640
+ },
641
+ enumerable: false,
642
+ configurable: true
643
+ });
644
+ Object.defineProperty(TuiInputNumberComponent.prototype, "computedPostfix", {
645
+ get: function () {
646
+ var postfix = this.postfix || this.controller.postfix;
647
+ return postfix && " " + postfix;
648
+ },
649
+ enumerable: false,
650
+ configurable: true
651
+ });
652
+ Object.defineProperty(TuiInputNumberComponent.prototype, "mask", {
653
+ get: function () {
654
+ return this.calculateMask(this.precision, this.decimal, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator, this.computedMin, this.computedMax, this.computedPrefix, this.computedPostfix);
655
+ },
656
+ enumerable: false,
657
+ configurable: true
658
+ });
659
+ TuiInputNumberComponent.prototype.onArrow = function (step) {
660
+ if (!step) {
661
+ return;
662
+ }
663
+ this.value = i7.tuiClamp((this.value || 0) + step, this.computedMin, this.computedMax);
664
+ this.nativeValue = this.formattedValue;
665
+ };
666
+ TuiInputNumberComponent.prototype.onValueChange = function (nativeValue) {
667
+ var parsedValue = kit.maskitoParseNumber(nativeValue, this.numberFormat.decimalSeparator);
668
+ this.unfinishedValue = null;
669
+ if (Number.isNaN(parsedValue)) {
670
+ this.value = null;
671
+ return;
672
+ }
673
+ if (this.isNativeValueNotFinished) {
674
+ this.unfinishedValue = nativeValue;
675
+ this.cdr.markForCheck();
676
+ return;
677
+ }
678
+ if (parsedValue < this.computedMin || parsedValue > this.computedMax) {
679
+ return;
680
+ }
681
+ this.value = parsedValue;
682
+ };
683
+ TuiInputNumberComponent.prototype.onFocused = function (focused) {
684
+ this.updateFocused(focused);
685
+ var nativeNumberValue = this.unfinishedValue
686
+ ? kit.maskitoParseNumber(this.unfinishedValue, this.numberFormat.decimalSeparator)
687
+ : this.nativeNumberValue;
688
+ this.unfinishedValue = null;
689
+ if (Number.isNaN(nativeNumberValue)) {
690
+ this.nativeValue = focused ? this.computedPrefix + this.computedPostfix : '';
691
+ this.value = null;
692
+ return;
693
+ }
694
+ if (!focused) {
695
+ this.value = nativeNumberValue;
696
+ this.nativeValue = this.formattedValue;
697
+ }
698
+ };
699
+ TuiInputNumberComponent.prototype.getFormattedValue = function (value) {
700
+ var absValue = Math.abs(value);
701
+ var hasFraction = absValue % 1 > 0;
702
+ var decimalLimit = this.decimal === 'always' || (hasFraction && this.decimal !== 'never')
703
+ ? this.precision
704
+ : 0;
705
+ var fraction = hasFraction
706
+ ? i1.tuiGetFractionPartPadded(value, this.precision)
707
+ : '';
708
+ if (this.focused && this.decimal !== 'always') {
709
+ decimalLimit = fraction.length;
710
+ }
711
+ return (this.computedPrefix +
712
+ i1.tuiFormatNumber(value, Object.assign(Object.assign({}, this.numberFormat), { decimalLimit: decimalLimit })).replace(i7.CHAR_HYPHEN, i7.CHAR_MINUS) +
713
+ this.computedPostfix);
714
+ };
715
+ Object.defineProperty(TuiInputNumberComponent.prototype, "isNativeValueNotFinished", {
716
+ get: function () {
717
+ var nativeNumberValue = this.nativeNumberValue;
718
+ return nativeNumberValue < 0
719
+ ? nativeNumberValue > this.computedMax
720
+ : nativeNumberValue < this.computedMin;
721
+ },
722
+ enumerable: false,
723
+ configurable: true
724
+ });
725
+ Object.defineProperty(TuiInputNumberComponent.prototype, "nativeValue", {
726
+ get: function () {
727
+ var _a;
728
+ return ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.value) || '';
729
+ },
730
+ set: function (value) {
731
+ if (!this.textfield || !this.nativeFocusableElement) {
732
+ return;
733
+ }
734
+ this.textfield.value = value;
735
+ this.nativeFocusableElement.value = value;
736
+ },
737
+ enumerable: false,
738
+ configurable: true
739
+ });
740
+ TuiInputNumberComponent.prototype.writeValue = function (value) {
741
+ _super.prototype.writeValue.call(this, value);
742
+ this.nativeValue = this.formattedValue;
743
+ };
744
+ Object.defineProperty(TuiInputNumberComponent.prototype, "nativeNumberValue", {
745
+ get: function () {
746
+ return kit.maskitoParseNumber(this.nativeValue, this.numberFormat.decimalSeparator);
747
+ },
748
+ enumerable: false,
749
+ configurable: true
750
+ });
751
+ TuiInputNumberComponent.prototype.computeMin = function (min, max) {
752
+ var _a, _b, _c, _d, _e, _f;
753
+ return Math.min((_c = (_b = (_a = this.valueTransformer) === null || _a === void 0 ? void 0 : _a.fromControlValue(min)) !== null && _b !== void 0 ? _b : min) !== null && _c !== void 0 ? _c : this.options.min, (_f = (_e = (_d = this.valueTransformer) === null || _d === void 0 ? void 0 : _d.fromControlValue(max)) !== null && _e !== void 0 ? _e : max) !== null && _f !== void 0 ? _f : this.options.max);
754
+ };
755
+ TuiInputNumberComponent.prototype.computeMax = function (min, max) {
756
+ var _a, _b, _c, _d, _e, _f;
757
+ return Math.max((_c = (_b = (_a = this.valueTransformer) === null || _a === void 0 ? void 0 : _a.fromControlValue(min)) !== null && _b !== void 0 ? _b : min) !== null && _c !== void 0 ? _c : this.options.min, (_f = (_e = (_d = this.valueTransformer) === null || _d === void 0 ? void 0 : _d.fromControlValue(max)) !== null && _e !== void 0 ? _e : max) !== null && _f !== void 0 ? _f : this.options.max);
758
+ };
759
+ TuiInputNumberComponent.prototype.calculateMask = function (precision, decimalMode, decimalSeparator, thousandSeparator, min, max, prefix, postfix) {
760
+ var _a = kit.maskitoNumberOptionsGenerator({
761
+ decimalSeparator: decimalSeparator,
762
+ thousandSeparator: thousandSeparator,
763
+ min: min,
764
+ max: max,
765
+ prefix: prefix,
766
+ postfix: postfix,
767
+ precision: decimalMode === 'never' ? 0 : precision,
768
+ decimalZeroPadding: decimalMode === 'always',
769
+ }), plugins = _a.plugins, options = __rest(_a, ["plugins"]);
770
+ return Object.assign(Object.assign({}, options), { plugins: __spreadArray(__spreadArray([], __read(plugins)), [
771
+ kit.maskitoCaretGuard(function (value) { return [
772
+ prefix.length,
773
+ value.length - postfix.length,
774
+ ]; }),
775
+ ]) });
776
+ };
777
+ return TuiInputNumberComponent;
778
+ }(i7.AbstractTuiNullableControl));
779
+ TuiInputNumberComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberComponent, deps: [{ token: i6.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: TUI_NUMBER_VALUE_TRANSFORMER, optional: true }, { token: TUI_INPUT_NUMBER_OPTIONS }, { token: i1.TUI_NUMBER_FORMAT }, { token: i7.TUI_IS_IOS }, { token: i1.TUI_TEXTFIELD_SIZE }, { token: i1.TUI_TEXTFIELD_WATCHED_CONTROLLER }], target: i0__namespace.ɵɵFactoryTarget.Component });
780
+ TuiInputNumberComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputNumberComponent, selector: "tui-input-number", inputs: { min: "min", max: "max", decimal: "decimal", precision: "precision", step: "step", prefix: "prefix", postfix: "postfix" }, host: { listeners: { "keydown.arrowDown": "onArrow(-step)", "keydown.arrowUp": "onArrow(step)" }, properties: { "attr.data-size": "this.size" } }, providers: [
781
+ i7.tuiAsFocusableItemAccessor(TuiInputNumberComponent),
782
+ i7.tuiAsControl(TuiInputNumberComponent),
783
+ i1.TEXTFIELD_CONTROLLER_PROVIDER,
784
+ ], queries: [{ propertyName: "polymorpheusValueContent", predicate: i5.PolymorpheusOutletDirective, descendants: true }], viewQueries: [{ propertyName: "textfield", first: true, predicate: i1.TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<tui-primitive-textfield\n #textfield\n tuiTextfieldPostfix=\"\"\n tuiTextfieldPrefix=\"\"\n tuiValueAccessor\n class=\"t-textfield\"\n [disabled]=\"computedDisabled\"\n [focusable]=\"focusable\"\n [invalid]=\"computedInvalid\"\n [maskito]=\"mask\"\n [pseudoActive]=\"pseudoActive\"\n [pseudoFocus]=\"computedFocused\"\n [pseudoHover]=\"pseudoHover\"\n [readOnly]=\"readOnly\"\n [value]=\"computedValue\"\n (focusedChange)=\"onFocused($event)\"\n (valueChange)=\"onValueChange($event)\"\n>\n <ng-content></ng-content>\n <ng-content\n ngProjectAs=\"input\"\n select=\"input\"\n ></ng-content>\n <div\n *ngIf=\"polymorpheusValueContent.length\"\n ngProjectAs=\"tuiContent\"\n class=\"t-value-content\"\n >\n <ng-container *polymorpheusOutlet=\"valueContent as text\">\n {{ text }}\n </ng-container>\n </div>\n</tui-primitive-textfield>\n\n<section\n *ngIf=\"step\"\n class=\"t-buttons\"\n>\n <button\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"textfield.appearance\"\n [disabled]=\"!canIncrement\"\n [focusable]=\"false\"\n [icon]=\"options.icons.up\"\n (click.prevent)=\"onArrow(step)\"\n (mousedown.prevent)=\"nativeFocusableElement?.focus()\"\n >\n +\n </button>\n <button\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [appearance]=\"textfield.appearance\"\n [disabled]=\"!canDecrement\"\n [focusable]=\"false\"\n [icon]=\"options.icons.down\"\n (click.prevent)=\"onArrow(-step)\"\n (mousedown.prevent)=\"nativeFocusableElement?.focus()\"\n >\n -\n </button>\n</section>\n\n<ng-container *ngIf=\"polymorpheusValueContent.changes | async\"></ng-container>\n\n<ng-template #valueContent>\n <ng-content select=\"tuiContent\"></ng-content>\n</ng-template>\n", styles: [":host{display:flex;border-radius:var(--tui-radius-m);text-align:left}.t-textfield{flex:1;max-width:100%;border-radius:inherit;text-align:inherit}.t-textfield:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.t-value-content{width:100%}.t-buttons{display:flex;flex-direction:column;align-items:stretch;margin-left:.125rem;border-radius:inherit}[data-size=s]+.t-buttons{flex-direction:row-reverse}[data-size=s]+.t-buttons .t-button:first-child{margin:0 0 0 .125rem;border-top-right-radius:inherit;border-bottom-right-radius:inherit}[data-size=s]+.t-buttons .t-button:last-child{border-radius:0}[data-size=m]+.t-buttons .t-button{width:calc(var(--tui-height-m) * .75)}[data-size=l]+.t-buttons .t-button{width:calc(var(--tui-height-l) * .75)}.t-buttons .t-button{display:flex;flex:1;height:auto;border-radius:0}.t-buttons .t-button:first-child{margin-bottom:.125rem;border-top-right-radius:inherit}.t-buttons .t-button:last-child{border-bottom-right-radius:inherit}\n"], components: [{ type: i1__namespace.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i1__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i1__namespace.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i1__namespace.TuiTextfieldPostfixDirective, selector: "[tuiTextfieldPostfix]", inputs: ["tuiTextfieldPostfix"] }, { type: i1__namespace.TuiTextfieldPrefixDirective, selector: "[tuiTextfieldPrefix]", inputs: ["tuiTextfieldPrefix"] }, { type: i2__namespace.TuiValueAccessorDirective, selector: "[tuiValueAccessor]" }, { type: i3__namespace.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
785
+ __decorate([
786
+ i7.tuiPure
787
+ ], TuiInputNumberComponent.prototype, "computeMin", null);
788
+ __decorate([
789
+ i7.tuiPure
790
+ ], TuiInputNumberComponent.prototype, "computeMax", null);
791
+ __decorate([
792
+ i7.tuiPure
793
+ ], TuiInputNumberComponent.prototype, "calculateMask", null);
794
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberComponent, decorators: [{
795
+ type: i0.Component,
796
+ args: [{
797
+ selector: 'tui-input-number',
798
+ templateUrl: './input-number.template.html',
799
+ styleUrls: ['./input-number.style.less'],
800
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
801
+ providers: [
802
+ i7.tuiAsFocusableItemAccessor(TuiInputNumberComponent),
803
+ i7.tuiAsControl(TuiInputNumberComponent),
804
+ i1.TEXTFIELD_CONTROLLER_PROVIDER,
805
+ ],
806
+ }]
807
+ }], ctorParameters: function () {
808
+ return [{ type: i6__namespace.NgControl, decorators: [{
809
+ type: i0.Optional
810
+ }, {
811
+ type: i0.Self
812
+ }, {
813
+ type: i0.Inject,
814
+ args: [i6.NgControl]
815
+ }] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
816
+ type: i0.Inject,
817
+ args: [i0.ChangeDetectorRef]
818
+ }] }, { type: i7__namespace.AbstractTuiValueTransformer, decorators: [{
819
+ type: i0.Optional
820
+ }, {
821
+ type: i0.Inject,
822
+ args: [TUI_NUMBER_VALUE_TRANSFORMER]
823
+ }] }, { type: undefined, decorators: [{
824
+ type: i0.Inject,
825
+ args: [TUI_INPUT_NUMBER_OPTIONS]
826
+ }] }, { type: undefined, decorators: [{
827
+ type: i0.Inject,
828
+ args: [i1.TUI_NUMBER_FORMAT]
829
+ }] }, { type: undefined, decorators: [{
830
+ type: i0.Inject,
831
+ args: [i7.TUI_IS_IOS]
832
+ }] }, { type: i1__namespace.TuiTextfieldSizeDirective, decorators: [{
833
+ type: i0.Inject,
834
+ args: [i1.TUI_TEXTFIELD_SIZE]
835
+ }] }, { type: i1__namespace.TuiTextfieldController, decorators: [{
836
+ type: i0.Inject,
837
+ args: [i1.TUI_TEXTFIELD_WATCHED_CONTROLLER]
838
+ }] }];
839
+ }, propDecorators: { textfield: [{
840
+ type: i0.ViewChild,
841
+ args: [i1.TuiPrimitiveTextfieldComponent]
842
+ }], min: [{
843
+ type: i0.Input
844
+ }], max: [{
845
+ type: i0.Input
846
+ }], decimal: [{
847
+ type: i0.Input
848
+ }], precision: [{
849
+ type: i0.Input
850
+ }], step: [{
851
+ type: i0.Input
852
+ }], prefix: [{
853
+ type: i0.Input
854
+ }], postfix: [{
855
+ type: i0.Input
856
+ }], polymorpheusValueContent: [{
857
+ type: i0.ContentChildren,
858
+ args: [i5.PolymorpheusOutletDirective, { descendants: true }]
859
+ }], size: [{
860
+ type: i0.HostBinding,
861
+ args: ['attr.data-size']
862
+ }], onArrow: [{
863
+ type: i0.HostListener,
864
+ args: ['keydown.arrowDown', ['-step']]
865
+ }, {
866
+ type: i0.HostListener,
867
+ args: ['keydown.arrowUp', ['step']]
868
+ }], computeMin: [], computeMax: [], calculateMask: [] } });
723
869
 
724
- var TuiInputNumberDirective = /** @class */ (function (_super) {
725
- __extends(TuiInputNumberDirective, _super);
726
- function TuiInputNumberDirective() {
727
- return _super !== null && _super.apply(this, arguments) || this;
728
- }
729
- Object.defineProperty(TuiInputNumberDirective.prototype, "value", {
730
- get: function () {
731
- return this.host.computedValue;
732
- },
733
- enumerable: false,
734
- configurable: true
735
- });
736
- TuiInputNumberDirective.prototype.onValueChange = function (value) {
737
- this.host.onValueChange(value);
738
- };
739
- TuiInputNumberDirective.prototype.ngDoCheck = function () {
740
- if (!this.host.nativeFocusableElement) {
741
- return;
742
- }
743
- this.host.nativeFocusableElement.inputMode = this.host.inputMode;
744
- this.host.nativeFocusableElement.maxLength =
745
- this.host.nativeFocusableElement.maxLength > 0
746
- ? this.host.nativeFocusableElement.maxLength
747
- : this.host.calculatedMaxLength;
748
- };
749
- return TuiInputNumberDirective;
750
- }(i1.AbstractTuiTextfieldHost));
751
- TuiInputNumberDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
752
- TuiInputNumberDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputNumberDirective, selector: "tui-input-number", providers: [i1.tuiAsTextfieldHost(TuiInputNumberDirective)], usesInheritance: true, ngImport: i0__namespace });
753
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberDirective, decorators: [{
754
- type: i0.Directive,
755
- args: [{
756
- selector: 'tui-input-number',
757
- providers: [i1.tuiAsTextfieldHost(TuiInputNumberDirective)],
758
- }]
759
- }] });
870
+ var TuiInputNumberDirective = /** @class */ (function (_super) {
871
+ __extends(TuiInputNumberDirective, _super);
872
+ function TuiInputNumberDirective() {
873
+ return _super !== null && _super.apply(this, arguments) || this;
874
+ }
875
+ Object.defineProperty(TuiInputNumberDirective.prototype, "value", {
876
+ get: function () {
877
+ return this.host.computedValue;
878
+ },
879
+ enumerable: false,
880
+ configurable: true
881
+ });
882
+ TuiInputNumberDirective.prototype.onValueChange = function (value) {
883
+ this.host.onValueChange(value);
884
+ };
885
+ TuiInputNumberDirective.prototype.ngDoCheck = function () {
886
+ if (!this.host.nativeFocusableElement) {
887
+ return;
888
+ }
889
+ this.host.nativeFocusableElement.inputMode = this.host.inputMode;
890
+ this.host.nativeFocusableElement.maxLength =
891
+ this.host.nativeFocusableElement.maxLength > 0
892
+ ? this.host.nativeFocusableElement.maxLength
893
+ : this.host.calculatedMaxLength;
894
+ };
895
+ return TuiInputNumberDirective;
896
+ }(i1.AbstractTuiTextfieldHost));
897
+ TuiInputNumberDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
898
+ TuiInputNumberDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputNumberDirective, selector: "tui-input-number", providers: [i1.tuiAsTextfieldHost(TuiInputNumberDirective)], usesInheritance: true, ngImport: i0__namespace });
899
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberDirective, decorators: [{
900
+ type: i0.Directive,
901
+ args: [{
902
+ selector: 'tui-input-number',
903
+ providers: [i1.tuiAsTextfieldHost(TuiInputNumberDirective)],
904
+ }]
905
+ }] });
760
906
 
761
- var TuiInputNumberModule = /** @class */ (function () {
762
- function TuiInputNumberModule() {
763
- }
764
- return TuiInputNumberModule;
765
- }());
766
- TuiInputNumberModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
767
- TuiInputNumberModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, declarations: [TuiInputNumberComponent, TuiInputNumberDirective], imports: [i4.CommonModule,
768
- i3.MaskitoModule,
769
- i1.TuiPrimitiveTextfieldModule,
770
- i1.TuiTextfieldControllerModule,
771
- i2.TuiValueAccessorModule,
772
- i5.PolymorpheusModule,
773
- i1.TuiButtonModule], exports: [TuiInputNumberComponent, TuiInputNumberDirective, i1.TuiTextfieldComponent] });
774
- TuiInputNumberModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, imports: [[
775
- i4.CommonModule,
776
- i3.MaskitoModule,
777
- i1.TuiPrimitiveTextfieldModule,
778
- i1.TuiTextfieldControllerModule,
779
- i2.TuiValueAccessorModule,
780
- i5.PolymorpheusModule,
781
- i1.TuiButtonModule,
782
- ]] });
783
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, decorators: [{
784
- type: i0.NgModule,
785
- args: [{
786
- imports: [
787
- i4.CommonModule,
788
- i3.MaskitoModule,
789
- i1.TuiPrimitiveTextfieldModule,
790
- i1.TuiTextfieldControllerModule,
791
- i2.TuiValueAccessorModule,
792
- i5.PolymorpheusModule,
793
- i1.TuiButtonModule,
794
- ],
795
- declarations: [TuiInputNumberComponent, TuiInputNumberDirective],
796
- exports: [TuiInputNumberComponent, TuiInputNumberDirective, i1.TuiTextfieldComponent],
797
- }]
798
- }] });
907
+ var TuiInputNumberModule = /** @class */ (function () {
908
+ function TuiInputNumberModule() {
909
+ }
910
+ return TuiInputNumberModule;
911
+ }());
912
+ TuiInputNumberModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
913
+ TuiInputNumberModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, declarations: [TuiInputNumberComponent, TuiInputNumberDirective], imports: [i4.CommonModule,
914
+ i3.MaskitoModule,
915
+ i1.TuiPrimitiveTextfieldModule,
916
+ i1.TuiTextfieldControllerModule,
917
+ i2.TuiValueAccessorModule,
918
+ i5.PolymorpheusModule,
919
+ i1.TuiButtonModule], exports: [TuiInputNumberComponent, TuiInputNumberDirective, i1.TuiTextfieldComponent] });
920
+ TuiInputNumberModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, imports: [[
921
+ i4.CommonModule,
922
+ i3.MaskitoModule,
923
+ i1.TuiPrimitiveTextfieldModule,
924
+ i1.TuiTextfieldControllerModule,
925
+ i2.TuiValueAccessorModule,
926
+ i5.PolymorpheusModule,
927
+ i1.TuiButtonModule,
928
+ ]] });
929
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, decorators: [{
930
+ type: i0.NgModule,
931
+ args: [{
932
+ imports: [
933
+ i4.CommonModule,
934
+ i3.MaskitoModule,
935
+ i1.TuiPrimitiveTextfieldModule,
936
+ i1.TuiTextfieldControllerModule,
937
+ i2.TuiValueAccessorModule,
938
+ i5.PolymorpheusModule,
939
+ i1.TuiButtonModule,
940
+ ],
941
+ declarations: [TuiInputNumberComponent, TuiInputNumberDirective],
942
+ exports: [TuiInputNumberComponent, TuiInputNumberDirective, i1.TuiTextfieldComponent],
943
+ }]
944
+ }] });
799
945
 
800
- /**
801
- * Generated bundle index. Do not edit.
802
- */
946
+ /**
947
+ * Generated bundle index. Do not edit.
948
+ */
803
949
 
804
- exports.TUI_INPUT_NUMBER_DEFAULT_OPTIONS = TUI_INPUT_NUMBER_DEFAULT_OPTIONS;
805
- exports.TUI_INPUT_NUMBER_OPTIONS = TUI_INPUT_NUMBER_OPTIONS;
806
- exports.TUI_NUMBER_VALUE_TRANSFORMER = TUI_NUMBER_VALUE_TRANSFORMER;
807
- exports.TuiInputNumberComponent = TuiInputNumberComponent;
808
- exports.TuiInputNumberDirective = TuiInputNumberDirective;
809
- exports.TuiInputNumberModule = TuiInputNumberModule;
810
- exports.tuiInputNumberOptionsProvider = tuiInputNumberOptionsProvider;
950
+ exports.TUI_INPUT_NUMBER_DEFAULT_OPTIONS = TUI_INPUT_NUMBER_DEFAULT_OPTIONS;
951
+ exports.TUI_INPUT_NUMBER_OPTIONS = TUI_INPUT_NUMBER_OPTIONS;
952
+ exports.TUI_NUMBER_VALUE_TRANSFORMER = TUI_NUMBER_VALUE_TRANSFORMER;
953
+ exports.TuiInputNumberComponent = TuiInputNumberComponent;
954
+ exports.TuiInputNumberDirective = TuiInputNumberDirective;
955
+ exports.TuiInputNumberModule = TuiInputNumberModule;
956
+ exports.tuiInputNumberOptionsProvider = tuiInputNumberOptionsProvider;
811
957
 
812
- Object.defineProperty(exports, '__esModule', { value: true });
958
+ Object.defineProperty(exports, '__esModule', { value: true });
813
959
 
814
960
  }));
815
961
  //# sourceMappingURL=taiga-ui-kit-components-input-number.umd.js.map