@firestitch/common 12.3.1 → 12.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/app/directives/autofocus.directive.d.ts +9 -9
  2. package/app/directives/prevent-default.directive.d.ts +6 -6
  3. package/app/directives/stop-propagation.directive.d.ts +6 -6
  4. package/app/fs-common.module.d.ts +18 -18
  5. package/app/pipes/bytes.pipe.d.ts +7 -7
  6. package/app/pipes/currency.pipe.d.ts +9 -9
  7. package/app/pipes/number.pipe.d.ts +7 -7
  8. package/app/pipes/ordinal-number.pipe.d.ts +7 -7
  9. package/app/pipes/truncate.pipe.d.ts +8 -8
  10. package/app/pipes/util.pipe.d.ts +24 -24
  11. package/app/services/array.service.d.ts +61 -61
  12. package/app/services/math.service.d.ts +9 -9
  13. package/app/services/util.service.d.ts +89 -89
  14. package/app/services/vaildate.service.d.ts +16 -16
  15. package/bundles/firestitch-common.umd.js +1884 -1745
  16. package/bundles/firestitch-common.umd.js.map +1 -1
  17. package/esm2015/app/directives/autofocus.directive.js +20 -20
  18. package/esm2015/app/directives/prevent-default.directive.js +18 -18
  19. package/esm2015/app/directives/stop-propagation.directive.js +18 -18
  20. package/esm2015/app/fs-common.module.js +93 -93
  21. package/esm2015/app/pipes/bytes.pipe.js +17 -17
  22. package/esm2015/app/pipes/currency.pipe.js +22 -22
  23. package/esm2015/app/pipes/number.pipe.js +16 -16
  24. package/esm2015/app/pipes/ordinal-number.pipe.js +16 -16
  25. package/esm2015/app/pipes/truncate.pipe.js +17 -17
  26. package/esm2015/app/pipes/util.pipe.js +59 -59
  27. package/esm2015/app/services/array.service.js +224 -224
  28. package/esm2015/app/services/math.service.js +20 -20
  29. package/esm2015/app/services/util.service.js +250 -250
  30. package/esm2015/app/services/vaildate.service.js +27 -27
  31. package/esm2015/firestitch-common.js +4 -4
  32. package/esm2015/libs/array/compare/compare.js +7 -7
  33. package/esm2015/libs/array/compare/index.js +1 -1
  34. package/esm2015/libs/array/filter/filter.js +26 -26
  35. package/esm2015/libs/array/filter/index.js +1 -1
  36. package/esm2015/libs/array/find/find.js +5 -5
  37. package/esm2015/libs/array/find/index.js +1 -1
  38. package/esm2015/libs/array/inArray/inArray.js +11 -11
  39. package/esm2015/libs/array/inArray/index.js +1 -1
  40. package/esm2015/libs/array/index/index.js +7 -7
  41. package/esm2015/libs/array/index.js +13 -13
  42. package/esm2015/libs/array/indexOf/index.js +1 -1
  43. package/esm2015/libs/array/indexOf/indexOf.js +15 -15
  44. package/esm2015/libs/array/keyExists/index.js +1 -1
  45. package/esm2015/libs/array/keyExists/keyExists.js +3 -3
  46. package/esm2015/libs/array/ksort/index.js +1 -1
  47. package/esm2015/libs/array/ksort/ksort.js +7 -7
  48. package/esm2015/libs/array/list/index.js +1 -1
  49. package/esm2015/libs/array/list/list.js +12 -12
  50. package/esm2015/libs/array/nameValue/index.js +1 -1
  51. package/esm2015/libs/array/nameValue/nameValue.js +20 -20
  52. package/esm2015/libs/array/remove/index.js +1 -1
  53. package/esm2015/libs/array/remove/remove.js +8 -8
  54. package/esm2015/libs/array/rsort/index.js +1 -1
  55. package/esm2015/libs/array/rsort/rsort.js +4 -4
  56. package/esm2015/libs/array/sort/index.js +1 -1
  57. package/esm2015/libs/array/sort/sort.js +26 -26
  58. package/esm2015/libs/format/acronym/acronym.js +21 -21
  59. package/esm2015/libs/format/acronym/index.js +1 -1
  60. package/esm2015/libs/format/bytes/bytes.js +12 -18
  61. package/esm2015/libs/format/bytes/index.js +1 -1
  62. package/esm2015/libs/format/currency/currency.js +5 -5
  63. package/esm2015/libs/format/currency/index.js +1 -1
  64. package/esm2015/libs/format/index.js +5 -5
  65. package/esm2015/libs/format/number/index.js +1 -1
  66. package/esm2015/libs/format/number/number.js +3 -3
  67. package/esm2015/libs/format/truncate/index.js +1 -1
  68. package/esm2015/libs/format/truncate/truncate.js +11 -11
  69. package/esm2015/libs/index.js +5 -5
  70. package/esm2015/libs/rxjs/delayedRetry.js +19 -19
  71. package/esm2015/libs/rxjs/keyboard-shortcut.js +17 -17
  72. package/esm2015/libs/util/boolean/boolean.js +3 -3
  73. package/esm2015/libs/util/boolean/index.js +1 -1
  74. package/esm2015/libs/util/clone/clone.js +20 -20
  75. package/esm2015/libs/util/clone/index.js +1 -1
  76. package/esm2015/libs/util/debounce/debounce.js +16 -16
  77. package/esm2015/libs/util/debounce/index.js +1 -1
  78. package/esm2015/libs/util/get-normalized-path/get-normalized-path.js +5 -5
  79. package/esm2015/libs/util/get-normalized-path/index.js +1 -1
  80. package/esm2015/libs/util/guid/guid.js +18 -18
  81. package/esm2015/libs/util/guid/index.js +1 -1
  82. package/esm2015/libs/util/index.js +22 -21
  83. package/esm2015/libs/util/is-array-equal/is-array-equal.js +21 -21
  84. package/esm2015/libs/util/isClass/index.js +1 -1
  85. package/esm2015/libs/util/isClass/isClass.js +17 -17
  86. package/esm2015/libs/util/isEmpty/index.js +1 -1
  87. package/esm2015/libs/util/isEmpty/isEmpty.js +11 -11
  88. package/esm2015/libs/util/isNumeric/index.js +1 -1
  89. package/esm2015/libs/util/isNumeric/isNumeric.js +4 -4
  90. package/esm2015/libs/util/keys/index.js +1 -1
  91. package/esm2015/libs/util/keys/keys.js +37 -37
  92. package/esm2015/libs/util/length/index.js +1 -1
  93. package/esm2015/libs/util/length/length.js +9 -9
  94. package/esm2015/libs/util/ordinal-number/ordinal-number.js +7 -7
  95. package/esm2015/libs/util/queue/index.js +2 -2
  96. package/esm2015/libs/util/queue/operation.js +14 -14
  97. package/esm2015/libs/util/queue/queue.enum.js +5 -5
  98. package/esm2015/libs/util/queue/queue.js +136 -136
  99. package/esm2015/libs/util/remove-query-params/index.js +1 -1
  100. package/esm2015/libs/util/remove-query-params/remove-query-params.js +3 -3
  101. package/esm2015/libs/util/resolve/index.js +1 -1
  102. package/esm2015/libs/util/resolve/resolve.js +9 -9
  103. package/esm2015/libs/util/round/index.js +1 -1
  104. package/esm2015/libs/util/round/round.js +4 -4
  105. package/esm2015/libs/util/source-loader/source-loader.js +145 -0
  106. package/esm2015/libs/util/stringify/index.js +1 -1
  107. package/esm2015/libs/util/stringify/stringify.js +3 -3
  108. package/esm2015/libs/util/throttle/index.js +1 -1
  109. package/esm2015/libs/util/throttle/throttle.js +12 -12
  110. package/esm2015/libs/util/uuid/index.js +1 -1
  111. package/esm2015/libs/util/uuid/uuid.js +4 -4
  112. package/esm2015/libs/util/value/index.js +1 -1
  113. package/esm2015/libs/util/value/value.js +8 -8
  114. package/esm2015/libs/validate/email/email.js +3 -3
  115. package/esm2015/libs/validate/email/index.js +1 -1
  116. package/esm2015/libs/validate/index.js +3 -3
  117. package/esm2015/libs/validate/phone/index.js +1 -1
  118. package/esm2015/libs/validate/phone/phone.js +4 -4
  119. package/esm2015/libs/validate/url/index.js +1 -1
  120. package/esm2015/libs/validate/url/url.js +11 -11
  121. package/esm2015/public_api.js +21 -21
  122. package/fesm2015/firestitch-common.js +1464 -1326
  123. package/fesm2015/firestitch-common.js.map +1 -1
  124. package/firestitch-common.d.ts +5 -5
  125. package/libs/array/compare/compare.d.ts +1 -1
  126. package/libs/array/compare/index.d.ts +1 -1
  127. package/libs/array/filter/filter.d.ts +1 -1
  128. package/libs/array/filter/index.d.ts +1 -1
  129. package/libs/array/find/find.d.ts +1 -1
  130. package/libs/array/find/index.d.ts +1 -1
  131. package/libs/array/inArray/inArray.d.ts +1 -1
  132. package/libs/array/inArray/index.d.ts +1 -1
  133. package/libs/array/index/index.d.ts +1 -1
  134. package/libs/array/index.d.ts +13 -13
  135. package/libs/array/indexOf/index.d.ts +1 -1
  136. package/libs/array/indexOf/indexOf.d.ts +1 -1
  137. package/libs/array/keyExists/index.d.ts +1 -1
  138. package/libs/array/keyExists/keyExists.d.ts +1 -1
  139. package/libs/array/ksort/index.d.ts +1 -1
  140. package/libs/array/ksort/ksort.d.ts +1 -1
  141. package/libs/array/list/index.d.ts +1 -1
  142. package/libs/array/list/list.d.ts +1 -1
  143. package/libs/array/nameValue/index.d.ts +1 -1
  144. package/libs/array/nameValue/nameValue.d.ts +1 -1
  145. package/libs/array/remove/index.d.ts +1 -1
  146. package/libs/array/remove/remove.d.ts +1 -1
  147. package/libs/array/rsort/index.d.ts +1 -1
  148. package/libs/array/rsort/rsort.d.ts +1 -1
  149. package/libs/array/sort/index.d.ts +1 -1
  150. package/libs/array/sort/sort.d.ts +1 -1
  151. package/libs/format/acronym/acronym.d.ts +1 -1
  152. package/libs/format/acronym/index.d.ts +1 -1
  153. package/libs/format/bytes/bytes.d.ts +1 -1
  154. package/libs/format/bytes/index.d.ts +1 -1
  155. package/libs/format/currency/currency.d.ts +1 -1
  156. package/libs/format/currency/index.d.ts +1 -1
  157. package/libs/format/index.d.ts +5 -5
  158. package/libs/format/number/index.d.ts +1 -1
  159. package/libs/format/number/number.d.ts +1 -1
  160. package/libs/format/truncate/index.d.ts +1 -1
  161. package/libs/format/truncate/truncate.d.ts +1 -1
  162. package/libs/index.d.ts +5 -5
  163. package/libs/rxjs/delayedRetry.d.ts +2 -2
  164. package/libs/rxjs/keyboard-shortcut.d.ts +2 -2
  165. package/libs/util/boolean/boolean.d.ts +1 -1
  166. package/libs/util/boolean/index.d.ts +1 -1
  167. package/libs/util/clone/clone.d.ts +1 -1
  168. package/libs/util/clone/index.d.ts +1 -1
  169. package/libs/util/debounce/debounce.d.ts +1 -1
  170. package/libs/util/debounce/index.d.ts +1 -1
  171. package/libs/util/get-normalized-path/get-normalized-path.d.ts +2 -2
  172. package/libs/util/get-normalized-path/index.d.ts +1 -1
  173. package/libs/util/guid/guid.d.ts +1 -1
  174. package/libs/util/guid/index.d.ts +1 -1
  175. package/libs/util/index.d.ts +21 -20
  176. package/libs/util/is-array-equal/is-array-equal.d.ts +1 -1
  177. package/libs/util/isClass/index.d.ts +1 -1
  178. package/libs/util/isClass/isClass.d.ts +1 -1
  179. package/libs/util/isEmpty/index.d.ts +1 -1
  180. package/libs/util/isEmpty/isEmpty.d.ts +1 -1
  181. package/libs/util/isNumeric/index.d.ts +1 -1
  182. package/libs/util/isNumeric/isNumeric.d.ts +1 -1
  183. package/libs/util/keys/index.d.ts +1 -1
  184. package/libs/util/keys/keys.d.ts +37 -37
  185. package/libs/util/length/index.d.ts +1 -1
  186. package/libs/util/length/length.d.ts +1 -1
  187. package/libs/util/ordinal-number/ordinal-number.d.ts +1 -1
  188. package/libs/util/queue/index.d.ts +2 -2
  189. package/libs/util/queue/operation.d.ts +7 -7
  190. package/libs/util/queue/queue.d.ts +32 -32
  191. package/libs/util/queue/queue.enum.d.ts +4 -4
  192. package/libs/util/remove-query-params/index.d.ts +1 -1
  193. package/libs/util/remove-query-params/remove-query-params.d.ts +1 -1
  194. package/libs/util/resolve/index.d.ts +1 -1
  195. package/libs/util/resolve/resolve.d.ts +1 -1
  196. package/libs/util/round/index.d.ts +1 -1
  197. package/libs/util/round/round.d.ts +1 -1
  198. package/libs/util/source-loader/source-loader.d.ts +7 -0
  199. package/libs/util/stringify/index.d.ts +1 -1
  200. package/libs/util/stringify/stringify.d.ts +1 -1
  201. package/libs/util/throttle/index.d.ts +1 -1
  202. package/libs/util/throttle/throttle.d.ts +1 -1
  203. package/libs/util/uuid/index.d.ts +1 -1
  204. package/libs/util/uuid/uuid.d.ts +1 -1
  205. package/libs/util/value/index.d.ts +1 -1
  206. package/libs/util/value/value.d.ts +1 -1
  207. package/libs/validate/email/email.d.ts +1 -1
  208. package/libs/validate/email/index.d.ts +1 -1
  209. package/libs/validate/index.d.ts +3 -3
  210. package/libs/validate/phone/index.d.ts +1 -1
  211. package/libs/validate/phone/phone.d.ts +1 -1
  212. package/libs/validate/url/index.d.ts +1 -1
  213. package/libs/validate/url/url.d.ts +7 -7
  214. package/package.json +1 -1
  215. package/public_api.d.ts +16 -16
  216. package/app/pipes/index.d.ts +0 -2
  217. package/esm2015/app/pipes/index.js +0 -3
@@ -24,1867 +24,2005 @@
24
24
 
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
26
 
27
- var FsArray = /** @class */ (function () {
28
- function FsArray() {
29
- }
30
- /**
31
- * @deprecated use import { nameValue } from @firestitch/common/array; instead
32
- */
33
- FsArray.prototype.nameValue = function (array, name, value) {
34
- console.warn('@deprecated use import { nameValue } from @firestitch/common/array; instead');
35
- var list = [];
36
- if (name || value) {
37
- var nameFn_1 = typeof name === 'function' ? name : function (item) { return item[name]; };
38
- var valueFn_1 = typeof value === 'function' ? value : function (item) { return item[value]; };
39
- array.forEach(function (item) {
40
- list.push({ name: nameFn_1(item), value: valueFn_1(item) });
41
- });
42
- }
43
- else {
44
- array.forEach(function (name, value) {
45
- list.push({ name: name, value: value });
46
- });
47
- }
48
- return list;
49
- };
50
- /**
51
- * @deprecated use import { remove } from @firestitch/common/array; instead
52
- */
53
- FsArray.prototype.remove = function (array, query) {
54
- console.warn('@deprecated use import { remove } from @firestitch/common/array; instead');
55
- var idx = this.indexOf(array, query);
56
- if (idx >= 0) {
57
- return array.splice(idx, 1);
58
- }
59
- return idx;
60
- };
61
- /**
62
- * @deprecated use import { indexOf } from @firestitch/common/array; instead
63
- */
64
- FsArray.prototype.indexOf = function (array, query) {
65
- var _this = this;
66
- console.warn('@deprecated use import { indexOf } from @firestitch/common/array; instead');
67
- if (typeof query !== 'function') {
68
- var queryObj_1 = query;
69
- query = function (item) {
70
- return _this.compare(queryObj_1, item);
71
- };
72
- }
73
- for (var i = 0, len = array.length; i < len; i++) {
74
- if (query(array[i])) {
75
- return i;
76
- }
77
- }
78
- return -1;
79
- };
80
- /**
81
- * @deprecated use import { compare } from @firestitch/common/array; instead
82
- */
83
- FsArray.prototype.compare = function (query, item) {
84
- console.warn('@deprecated use import { compare } from @firestitch/common/array; instead');
85
- var value = true;
86
- for (var key in query) {
87
- value = value && item[key] == query[key];
88
- }
89
- return value;
90
- };
91
- /**
92
- * @deprecated use import { filter } from @firestitch/common/array; instead
93
- */
94
- FsArray.prototype.filter = function (array, query) {
95
- var _this = this;
96
- console.warn('@deprecated use import { filter } from @firestitch/common/array; instead');
97
- if (typeof query !== 'function') {
98
- var queryObj_2 = query;
99
- query = function (item) {
100
- return _this.compare(queryObj_2, item);
101
- };
102
- }
103
- var isarray = Array.isArray(array);
104
- var list = isarray ? [] : {};
105
- if (isarray)
106
- array.forEach(function (item, idx) {
107
- if (query(item)) {
108
- list.push(item);
109
- }
110
- });
111
- else
112
- Object.keys(array).forEach(function (key) {
113
- if (query(array[key])) {
114
- list[key] = array[key];
115
- }
116
- });
117
- return list;
118
- };
119
- /**
120
- * @deprecated use import { index } from @firestitch/common/array; instead
121
- */
122
- FsArray.prototype.index = function (array, property) {
123
- console.warn('@deprecated use import { index } from @firestitch/common/array; instead');
124
- var list = {};
125
- array.forEach(function (item, idx) {
126
- list[item[property]] = item;
127
- });
128
- return list;
129
- };
130
- /**
131
- * @deprecated use import { sort } from @firestitch/common/array; instead
132
- */
133
- FsArray.prototype.sort = function (array, query, reverse) {
134
- if (reverse === void 0) { reverse = false; }
135
- console.warn('@deprecated use import { sort } from @firestitch/common/array; instead');
136
- if (typeof query !== 'function') {
137
- var queryStr_1 = query;
138
- query = function (a, b) {
139
- if (reverse) {
140
- if (a[queryStr_1] < b[queryStr_1]) {
141
- return 1;
142
- }
143
- else if (a[queryStr_1] > b[queryStr_1]) {
144
- return -1;
145
- }
146
- }
147
- else {
148
- if (a[queryStr_1] > b[queryStr_1]) {
149
- return 1;
150
- }
151
- else if (a[queryStr_1] < b[queryStr_1]) {
152
- return -1;
153
- }
154
- }
155
- return 0;
156
- };
157
- }
158
- array.sort(query);
159
- return array;
160
- };
161
- /**
162
- * @deprecated use import { rsort } from @firestitch/common/array; instead
163
- */
164
- FsArray.prototype.rsort = function (array, query) {
165
- console.warn('@deprecated use import { rsort } from @firestitch/common/array; instead');
166
- return this.sort(array, query, true);
167
- };
168
- /**
169
- * @deprecated use import { list } from @firestitch/common/array; instead
170
- */
171
- FsArray.prototype.list = function (array, property, index) {
172
- if (index === void 0) { index = null; }
173
- console.warn('@deprecated use import { list } from @firestitch/common/array; instead');
174
- var list = index ? {} : [];
175
- array.forEach(function (item, idx) {
176
- if (index) {
177
- list[item[index]] = item[property];
178
- }
179
- else {
180
- list.push(item[property]);
181
- }
182
- });
183
- return list;
184
- };
185
- /**
186
- * @deprecated use import { applyDepth } from @firestitch/common/array; instead
187
- */
188
- FsArray.prototype.applyDepth = function (objects, parent_property, id_property, depth_property) {
189
- if (id_property === void 0) { id_property = 'id'; }
190
- if (depth_property === void 0) { depth_property = 'depth'; }
191
- console.warn('@deprecated use import { applyDepth } from @firestitch/common/array; instead');
192
- var keyed = {};
193
- objects.forEach(function (object) {
194
- if (!object[parent_property]) {
195
- object[depth_property] = 0;
196
- }
197
- keyed[object[id_property]] = object;
198
- });
199
- Object.keys(keyed).forEach(function (key) {
200
- Object.keys(keyed).forEach(function (key) {
201
- var object = keyed[key];
202
- if (!keyed[key][depth_property]) {
203
- if (keyed[key][parent_property]) {
204
- keyed[key][depth_property] = keyed[keyed[key][parent_property]][depth_property] + 1;
205
- }
206
- }
207
- });
208
- });
209
- return keyed;
210
- };
211
- /**
212
- * @deprecated use import { inArray } from @firestitch/common/array; instead
213
- */
214
- FsArray.prototype.inArray = function (values, array) {
215
- console.warn('@deprecated use import { inArray } from @firestitch/common/array; instead');
216
- if (!Array.isArray(values)) {
217
- values = [values];
218
- }
219
- for (var i = 0, len = values.length; i < len; i++) {
220
- if (array.indexOf(values[i]) >= 0) {
221
- return true;
222
- }
223
- }
224
- return false;
225
- };
226
- /**
227
- * @deprecated use import { keyExists } from @firestitch/common/array; instead
228
- */
229
- FsArray.prototype.keyExists = function (array, key) {
230
- console.warn('@deprecated use import { keyExists } from @firestitch/common/array; instead');
231
- return array.hasOwnProperty(key);
232
- };
233
- /**
234
- * @deprecated use import { length } from @firestitch/common/array; instead
235
- */
236
- FsArray.prototype.length = function (array) {
237
- console.warn('@deprecated use import { length } from @firestitch/common/array; instead');
238
- return array.length;
239
- };
240
- /**
241
- * @deprecated use import { ksort } from @firestitch/common/array; instead
242
- */
243
- FsArray.prototype.ksort = function (unordered) {
244
- console.warn('@deprecated use import { ksort } from @firestitch/common/array; instead');
245
- Object.keys(unordered).sort().forEach(function (key) {
246
- var value = unordered[key];
247
- delete unordered[key];
248
- unordered[key] = value;
249
- });
250
- };
251
- return FsArray;
252
- }());
253
- FsArray.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsArray, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
254
- FsArray.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsArray });
255
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsArray, decorators: [{
256
- type: i0.Injectable
27
+ var FsArray = /** @class */ (function () {
28
+ function FsArray() {
29
+ }
30
+ /**
31
+ * @deprecated use import { nameValue } from @firestitch/common/array; instead
32
+ */
33
+ FsArray.prototype.nameValue = function (array, name, value) {
34
+ console.warn('@deprecated use import { nameValue } from @firestitch/common/array; instead');
35
+ var list = [];
36
+ if (name || value) {
37
+ var nameFn_1 = typeof name === 'function' ? name : function (item) { return item[name]; };
38
+ var valueFn_1 = typeof value === 'function' ? value : function (item) { return item[value]; };
39
+ array.forEach(function (item) {
40
+ list.push({ name: nameFn_1(item), value: valueFn_1(item) });
41
+ });
42
+ }
43
+ else {
44
+ array.forEach(function (name, value) {
45
+ list.push({ name: name, value: value });
46
+ });
47
+ }
48
+ return list;
49
+ };
50
+ /**
51
+ * @deprecated use import { remove } from @firestitch/common/array; instead
52
+ */
53
+ FsArray.prototype.remove = function (array, query) {
54
+ console.warn('@deprecated use import { remove } from @firestitch/common/array; instead');
55
+ var idx = this.indexOf(array, query);
56
+ if (idx >= 0) {
57
+ return array.splice(idx, 1);
58
+ }
59
+ return idx;
60
+ };
61
+ /**
62
+ * @deprecated use import { indexOf } from @firestitch/common/array; instead
63
+ */
64
+ FsArray.prototype.indexOf = function (array, query) {
65
+ var _this = this;
66
+ console.warn('@deprecated use import { indexOf } from @firestitch/common/array; instead');
67
+ if (typeof query !== 'function') {
68
+ var queryObj_1 = query;
69
+ query = function (item) {
70
+ return _this.compare(queryObj_1, item);
71
+ };
72
+ }
73
+ for (var i = 0, len = array.length; i < len; i++) {
74
+ if (query(array[i])) {
75
+ return i;
76
+ }
77
+ }
78
+ return -1;
79
+ };
80
+ /**
81
+ * @deprecated use import { compare } from @firestitch/common/array; instead
82
+ */
83
+ FsArray.prototype.compare = function (query, item) {
84
+ console.warn('@deprecated use import { compare } from @firestitch/common/array; instead');
85
+ var value = true;
86
+ for (var key in query) {
87
+ value = value && item[key] == query[key];
88
+ }
89
+ return value;
90
+ };
91
+ /**
92
+ * @deprecated use import { filter } from @firestitch/common/array; instead
93
+ */
94
+ FsArray.prototype.filter = function (array, query) {
95
+ var _this = this;
96
+ console.warn('@deprecated use import { filter } from @firestitch/common/array; instead');
97
+ if (typeof query !== 'function') {
98
+ var queryObj_2 = query;
99
+ query = function (item) {
100
+ return _this.compare(queryObj_2, item);
101
+ };
102
+ }
103
+ var isarray = Array.isArray(array);
104
+ var list = isarray ? [] : {};
105
+ if (isarray)
106
+ array.forEach(function (item, idx) {
107
+ if (query(item)) {
108
+ list.push(item);
109
+ }
110
+ });
111
+ else
112
+ Object.keys(array).forEach(function (key) {
113
+ if (query(array[key])) {
114
+ list[key] = array[key];
115
+ }
116
+ });
117
+ return list;
118
+ };
119
+ /**
120
+ * @deprecated use import { index } from @firestitch/common/array; instead
121
+ */
122
+ FsArray.prototype.index = function (array, property) {
123
+ console.warn('@deprecated use import { index } from @firestitch/common/array; instead');
124
+ var list = {};
125
+ array.forEach(function (item, idx) {
126
+ list[item[property]] = item;
127
+ });
128
+ return list;
129
+ };
130
+ /**
131
+ * @deprecated use import { sort } from @firestitch/common/array; instead
132
+ */
133
+ FsArray.prototype.sort = function (array, query, reverse) {
134
+ if (reverse === void 0) { reverse = false; }
135
+ console.warn('@deprecated use import { sort } from @firestitch/common/array; instead');
136
+ if (typeof query !== 'function') {
137
+ var queryStr_1 = query;
138
+ query = function (a, b) {
139
+ if (reverse) {
140
+ if (a[queryStr_1] < b[queryStr_1]) {
141
+ return 1;
142
+ }
143
+ else if (a[queryStr_1] > b[queryStr_1]) {
144
+ return -1;
145
+ }
146
+ }
147
+ else {
148
+ if (a[queryStr_1] > b[queryStr_1]) {
149
+ return 1;
150
+ }
151
+ else if (a[queryStr_1] < b[queryStr_1]) {
152
+ return -1;
153
+ }
154
+ }
155
+ return 0;
156
+ };
157
+ }
158
+ array.sort(query);
159
+ return array;
160
+ };
161
+ /**
162
+ * @deprecated use import { rsort } from @firestitch/common/array; instead
163
+ */
164
+ FsArray.prototype.rsort = function (array, query) {
165
+ console.warn('@deprecated use import { rsort } from @firestitch/common/array; instead');
166
+ return this.sort(array, query, true);
167
+ };
168
+ /**
169
+ * @deprecated use import { list } from @firestitch/common/array; instead
170
+ */
171
+ FsArray.prototype.list = function (array, property, index) {
172
+ if (index === void 0) { index = null; }
173
+ console.warn('@deprecated use import { list } from @firestitch/common/array; instead');
174
+ var list = index ? {} : [];
175
+ array.forEach(function (item, idx) {
176
+ if (index) {
177
+ list[item[index]] = item[property];
178
+ }
179
+ else {
180
+ list.push(item[property]);
181
+ }
182
+ });
183
+ return list;
184
+ };
185
+ /**
186
+ * @deprecated use import { applyDepth } from @firestitch/common/array; instead
187
+ */
188
+ FsArray.prototype.applyDepth = function (objects, parent_property, id_property, depth_property) {
189
+ if (id_property === void 0) { id_property = 'id'; }
190
+ if (depth_property === void 0) { depth_property = 'depth'; }
191
+ console.warn('@deprecated use import { applyDepth } from @firestitch/common/array; instead');
192
+ var keyed = {};
193
+ objects.forEach(function (object) {
194
+ if (!object[parent_property]) {
195
+ object[depth_property] = 0;
196
+ }
197
+ keyed[object[id_property]] = object;
198
+ });
199
+ Object.keys(keyed).forEach(function (key) {
200
+ Object.keys(keyed).forEach(function (key) {
201
+ var object = keyed[key];
202
+ if (!keyed[key][depth_property]) {
203
+ if (keyed[key][parent_property]) {
204
+ keyed[key][depth_property] = keyed[keyed[key][parent_property]][depth_property] + 1;
205
+ }
206
+ }
207
+ });
208
+ });
209
+ return keyed;
210
+ };
211
+ /**
212
+ * @deprecated use import { inArray } from @firestitch/common/array; instead
213
+ */
214
+ FsArray.prototype.inArray = function (values, array) {
215
+ console.warn('@deprecated use import { inArray } from @firestitch/common/array; instead');
216
+ if (!Array.isArray(values)) {
217
+ values = [values];
218
+ }
219
+ for (var i = 0, len = values.length; i < len; i++) {
220
+ if (array.indexOf(values[i]) >= 0) {
221
+ return true;
222
+ }
223
+ }
224
+ return false;
225
+ };
226
+ /**
227
+ * @deprecated use import { keyExists } from @firestitch/common/array; instead
228
+ */
229
+ FsArray.prototype.keyExists = function (array, key) {
230
+ console.warn('@deprecated use import { keyExists } from @firestitch/common/array; instead');
231
+ return array.hasOwnProperty(key);
232
+ };
233
+ /**
234
+ * @deprecated use import { length } from @firestitch/common/array; instead
235
+ */
236
+ FsArray.prototype.length = function (array) {
237
+ console.warn('@deprecated use import { length } from @firestitch/common/array; instead');
238
+ return array.length;
239
+ };
240
+ /**
241
+ * @deprecated use import { ksort } from @firestitch/common/array; instead
242
+ */
243
+ FsArray.prototype.ksort = function (unordered) {
244
+ console.warn('@deprecated use import { ksort } from @firestitch/common/array; instead');
245
+ Object.keys(unordered).sort().forEach(function (key) {
246
+ var value = unordered[key];
247
+ delete unordered[key];
248
+ unordered[key] = value;
249
+ });
250
+ };
251
+ return FsArray;
252
+ }());
253
+ FsArray.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsArray, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
254
+ FsArray.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsArray });
255
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsArray, decorators: [{
256
+ type: i0.Injectable
257
257
  }] });
258
258
 
259
- var FsMath = /** @class */ (function () {
260
- function FsMath() {
261
- }
262
- /**
263
- * @deprecated use _.round() instead {@link https://lodash.com/docs/4.17.5#round}
264
- */
265
- FsMath.prototype.round = function (number, precision) {
266
- console.warn('@deprecated use _.round() instead {@link https://lodash.com/docs/4.17.5#round}');
267
- precision = precision || 0;
268
- var factor = Math.pow(10, precision);
269
- var tempNumber = number * factor;
270
- var roundedTempNumber = Math.round(tempNumber);
271
- return roundedTempNumber / factor;
272
- };
273
- return FsMath;
274
- }());
275
- FsMath.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsMath, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
276
- FsMath.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsMath });
277
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsMath, decorators: [{
278
- type: i0.Injectable
259
+ var FsMath = /** @class */ (function () {
260
+ function FsMath() {
261
+ }
262
+ /**
263
+ * @deprecated use _.round() instead {@link https://lodash.com/docs/4.17.5#round}
264
+ */
265
+ FsMath.prototype.round = function (number, precision) {
266
+ console.warn('@deprecated use _.round() instead {@link https://lodash.com/docs/4.17.5#round}');
267
+ precision = precision || 0;
268
+ var factor = Math.pow(10, precision);
269
+ var tempNumber = number * factor;
270
+ var roundedTempNumber = Math.round(tempNumber);
271
+ return roundedTempNumber / factor;
272
+ };
273
+ return FsMath;
274
+ }());
275
+ FsMath.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsMath, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
276
+ FsMath.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsMath });
277
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsMath, decorators: [{
278
+ type: i0.Injectable
279
279
  }] });
280
280
 
281
- var KEY_CANCEL$1 = 3, KEY_HELP$1 = 6, KEY_BACKSPACE$1 = 8, KEY_TAB$1 = 9, KEY_CLEAR$1 = 12, KEY_RETURN$1 = 13, KEY_ENTER$1 = 14, KEY_SHIFT$1 = 16, KEY_CONTROL$1 = 17, KEY_ALT$1 = 18, KEY_PAUSE$1 = 19, KEY_CAPS_LOCK$1 = 20, KEY_ESCAPE$1 = 27, KEY_SPACE$1 = 32, KEY_PAGE_UP$1 = 33, KEY_PAGE_DOWN$1 = 34, KEY_END$1 = 35, KEY_HOME$1 = 36, KEY_LEFT$1 = 37, KEY_UP$1 = 38, KEY_RIGHT$1 = 39, KEY_DOWN$1 = 40, KEY_PRINTSCREEN$1 = 44, KEY_INSERT$1 = 45, KEY_DELETE$1 = 46, KEY_0$1 = 48, KEY_1$1 = 49, KEY_2$1 = 50, KEY_3$1 = 51, KEY_4$1 = 52, KEY_5$1 = 53, KEY_6$1 = 54, KEY_7$1 = 55, KEY_8$1 = 56, KEY_9$1 = 57, KEY_SEMICOLON$1 = 59, KEY_EQUALS$1 = 61;
282
- /*
283
- Basically, just copy-pasted functionality from fs-boilerplate v1.x, with some small changes (like we dont have angular.bind anymore, had to go with a workaround)
284
- There might be a better way to organise constatns but I need to know use-cases
285
- */
286
- var FsUtil = /** @class */ (function () {
287
- function FsUtil() {
288
- this.intervals = {};
289
- }
290
- /**
291
- * @deprecated use @firestitch/common/util/guid instead
292
- */
293
- FsUtil.prototype.guid = function (pattern) {
294
- console.warn('@deprecated use @firestitch/common/util/guid instead');
295
- pattern = pattern || 'xxxxxx';
296
- return pattern.replace(/[xy]/g, function (c) {
297
- var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
298
- return v.toString(16);
299
- });
300
- };
301
- /**
302
- * @deprecated use import { uuid } from @firestitch/common/util; instead
303
- */
304
- FsUtil.prototype.uuid = function () {
305
- console.warn('@deprecated use @firestitch/common/util/uuid instead');
306
- return this.guid('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
307
- };
308
- /**
309
- * @deprecated use import { resolve } from @firestitch/common/util; instead
310
- */
311
- FsUtil.prototype.resolve = function (promise, defaults) {
312
- if (defaults === void 0) { defaults = []; }
313
- console.warn('@deprecated use @firestitch/common/util/resolve instead');
314
- var result = defaults;
315
- return new Promise(function (resolve) {
316
- promise.then(function (data) {
317
- Object.keys(data).forEach(function (key) { return result[key] = data[key]; });
318
- resolve(result);
319
- });
320
- });
321
- };
322
- /**
323
- * @deprecated use _.toInteger() instead
324
- */
325
- FsUtil.prototype.int = function (value) {
326
- console.warn('@deprecated use _.toInteger() instead');
327
- value = parseInt(value);
328
- if (isNaN(value)) {
329
- value = 0;
330
- }
331
- return value;
332
- };
333
- /**
334
- * @deprecated use _.toFinite() instead
335
- */
336
- FsUtil.prototype.float = function (value) {
337
- console.warn('@deprecated use _.toFinite() instead');
338
- value = parseFloat(value);
339
- if (isNaN(value)) {
340
- value = 0;
341
- }
342
- return value;
343
- };
344
- /**
345
- * @deprecated use _.toString() instead
346
- */
347
- FsUtil.prototype.string = function (string) {
348
- console.warn('@deprecated use _.toString() instead');
349
- if (string === null || string === undefined) {
350
- string = '';
351
- }
352
- return (string).toString();
353
- };
354
- /**
355
- * @deprecated use import { isEmpty } from @firestitch/common/util; instead
356
- */
357
- FsUtil.prototype.isEmpty = function (value, options) {
358
- console.warn('@deprecated use import { isEmpty } from @firestitch/common/util; instead');
359
- options = options || {};
360
- return value === undefined ||
361
- value === null ||
362
- value === false ||
363
- value === '' ||
364
- !this.string(value).length ||
365
- (this.isObject(value) &&
366
- (value.constructor.name === 'Object' && !Object.keys(value).length)) ||
367
- (!options.zero && (value === 0 || value === '0'));
368
- };
369
- /**
370
- * @deprecated use _.isInteger() instead
371
- */
372
- FsUtil.prototype.isInt = function (value, type) {
373
- console.warn('@deprecated use _.isInteger() instead');
374
- var int = !!this.string(value).match(/^\d+$/);
375
- if (!int) {
376
- return false;
377
- }
378
- if (type) {
379
- return Number.isInteger(value);
380
- }
381
- return true;
382
- };
383
- /**
384
- * @deprecated use _.each() instead {@link https://lodash.com/docs/4.17.5#forEach}
385
- */
386
- FsUtil.prototype.each = function (object, func) {
387
- console.warn('@deprecated use _.each() instead {@link https://lodash.com/docs/4.17.5#forEach}');
388
- if (!this.isArray(object) && !this.isObject(object)) {
389
- return;
390
- }
391
- Object.keys(object).forEach(function (key) {
392
- func(object[key], key);
393
- });
394
- };
395
- /**
396
- * @deprecated use _.isArrayLikeObject() {@link https://lodash.com/docs/4.17.5#isArrayLikeObject}
397
- * or _.isObject() {@link https://lodash.com/docs/4.17.5#isObject} instead
398
- */
399
- FsUtil.prototype.isObject = function (value) {
400
- console.warn('@deprecated use _.isArrayLikeObject() {@link https://lodash.com/docs/4.17.5#isArrayLikeObject} or _.isObject() {@link https://lodash.com/docs/4.17.5#isObject} instead');
401
- return value !== null && typeof value === 'object' && !this.isArray(value);
402
- };
403
- /**
404
- * @deprecated use _.isString() instead {@link https://lodash.com/docs/4.17.5#isString}
405
- */
406
- FsUtil.prototype.isString = function (value) {
407
- console.warn('@deprecated use _.isString() instead {@link https://lodash.com/docs/4.17.5#isString}');
408
- return typeof value === 'string' || value instanceof String;
409
- };
410
- /**
411
- * @deprecated use _.isArray() instead {@link https://lodash.com/docs/4.17.5#isArray}
412
- */
413
- FsUtil.prototype.isArray = function (value) {
414
- console.warn('@deprecated use _.isArray() instead {@link https://lodash.com/docs/4.17.5#isArray}');
415
- return value instanceof Array;
416
- };
417
- /**
418
- * @deprecated use import { isNumeric } from @firestitch/common/util; instead
419
- */
420
- FsUtil.prototype.isNumeric = function (value) {
421
- console.warn('@deprecated use import { isNumeric } from @firestitch/common/util; instead');
422
- return this.string(value).length && !!this.string(value).match(/^-?\d*\.?\d*$/);
423
- };
424
- /**
425
- * @deprecated use import { isClass } from @firestitch/common/util; instead
426
- */
427
- FsUtil.prototype.isClass = function (value, cls) {
428
- console.warn('@deprecated use import { isClass } from @firestitch/common/util; instead');
429
- if (this.isObject(value)) {
430
- if (this.isString(cls)) {
431
- if (value.constructor) {
432
- if (value.constructor.name === cls) {
433
- return true;
434
- }
435
- }
436
- }
437
- else {
438
- if (value instanceof cls) {
439
- return true;
440
- }
441
- }
442
- }
443
- return false;
444
- };
445
- /**
446
- * @deprecated use _.isBoolean() instead {@link https://lodash.com/docs/4.17.5#isBoolean}
447
- */
448
- FsUtil.prototype.isBoolean = function (value) {
449
- console.warn('@deprecated use _.isBoolean() instead {@link https://lodash.com/docs/4.17.5#isBoolean}');
450
- return value === true || value === false;
451
- };
452
- /**
453
- * @deprecated use import { value } from @firestitch/common/util; instead
454
- */
455
- FsUtil.prototype.value = function (object, key, def) {
456
- console.warn('@deprecated use import { value } from @firestitch/common/util; instead');
457
- if (this.isObject(object) || this.isArray(object)) {
458
- if (object.hasOwnProperty(key)) {
459
- return object[key];
460
- }
461
- }
462
- return def;
463
- };
464
- FsUtil.prototype.throttle = function (func, wait) {
465
- console.warn('@deprecated use import { throttle } from @firestitch/common/util; instead');
466
- var waiting = false; // Initially, we're not waiting
467
- return function () {
468
- if (!waiting) { // If we're not waiting
469
- func.apply(null, arguments); // Execute users function
470
- waiting = true; // Prevent future invocations
471
- setTimeout(function () {
472
- waiting = false; // And allow future invocations
473
- }, wait);
474
- }
475
- };
476
- };
477
- /**
478
- * @deprecated use import { debounce } from @firestitch/common/util; instead
479
- */
480
- FsUtil.prototype.debounce = function (func, wait, immediate) {
481
- console.warn('@deprecated use import { debounce } from @firestitch/common/util; instead');
482
- var timeout;
483
- return function () {
484
- var context = this, args = arguments;
485
- var later = function () {
486
- timeout = null;
487
- if (!immediate)
488
- func.apply(context, args);
489
- };
490
- var callNow = immediate && !timeout;
491
- clearTimeout(timeout);
492
- timeout = setTimeout(later, wait);
493
- if (callNow)
494
- func.apply(context, args);
495
- };
496
- };
497
- /**
498
- * @deprecated use import { length } from @firestitch/common/util; instead
499
- */
500
- FsUtil.prototype.length = function (object) {
501
- console.warn('@deprecated use import { length } from @firestitch/common/util; instead');
502
- if (this.isObject(object)) {
503
- return Object.keys(object).length;
504
- }
505
- if (this.isArray(object)) {
506
- return object.length;
507
- }
508
- return 0;
509
- };
510
- /**
511
- * @deprecated use import { boolean } from @firestitch/common/util; instead
512
- */
513
- FsUtil.prototype.boolean = function (value) {
514
- console.warn('@deprecated use import { boolean } from @firestitch/common/util; instead');
515
- return this.string(value).toLowerCase() !== 'false' && !!value;
516
- };
517
- /**
518
- * @deprecated use import { stringify } from @firestitch/common/util; instead
519
- */
520
- FsUtil.prototype.stringify = function (value) {
521
- console.warn('@deprecated use import { stringify } from @firestitch/common/util; instead');
522
- return JSON.stringify(value);
523
- };
524
- return FsUtil;
525
- }());
526
- FsUtil.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtil, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
527
- FsUtil.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtil });
528
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtil, decorators: [{
529
- type: i0.Injectable
281
+ var KEY_CANCEL$1 = 3, KEY_HELP$1 = 6, KEY_BACKSPACE$1 = 8, KEY_TAB$1 = 9, KEY_CLEAR$1 = 12, KEY_RETURN$1 = 13, KEY_ENTER$1 = 14, KEY_SHIFT$1 = 16, KEY_CONTROL$1 = 17, KEY_ALT$1 = 18, KEY_PAUSE$1 = 19, KEY_CAPS_LOCK$1 = 20, KEY_ESCAPE$1 = 27, KEY_SPACE$1 = 32, KEY_PAGE_UP$1 = 33, KEY_PAGE_DOWN$1 = 34, KEY_END$1 = 35, KEY_HOME$1 = 36, KEY_LEFT$1 = 37, KEY_UP$1 = 38, KEY_RIGHT$1 = 39, KEY_DOWN$1 = 40, KEY_PRINTSCREEN$1 = 44, KEY_INSERT$1 = 45, KEY_DELETE$1 = 46, KEY_0$1 = 48, KEY_1$1 = 49, KEY_2$1 = 50, KEY_3$1 = 51, KEY_4$1 = 52, KEY_5$1 = 53, KEY_6$1 = 54, KEY_7$1 = 55, KEY_8$1 = 56, KEY_9$1 = 57, KEY_SEMICOLON$1 = 59, KEY_EQUALS$1 = 61;
282
+ /*
283
+ Basically, just copy-pasted functionality from fs-boilerplate v1.x, with some small changes (like we dont have angular.bind anymore, had to go with a workaround)
284
+ There might be a better way to organise constatns but I need to know use-cases
285
+ */
286
+ var FsUtil = /** @class */ (function () {
287
+ function FsUtil() {
288
+ this.intervals = {};
289
+ }
290
+ /**
291
+ * @deprecated use @firestitch/common/util/guid instead
292
+ */
293
+ FsUtil.prototype.guid = function (pattern) {
294
+ console.warn('@deprecated use @firestitch/common/util/guid instead');
295
+ pattern = pattern || 'xxxxxx';
296
+ return pattern.replace(/[xy]/g, function (c) {
297
+ var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
298
+ return v.toString(16);
299
+ });
300
+ };
301
+ /**
302
+ * @deprecated use import { uuid } from @firestitch/common/util; instead
303
+ */
304
+ FsUtil.prototype.uuid = function () {
305
+ console.warn('@deprecated use @firestitch/common/util/uuid instead');
306
+ return this.guid('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
307
+ };
308
+ /**
309
+ * @deprecated use import { resolve } from @firestitch/common/util; instead
310
+ */
311
+ FsUtil.prototype.resolve = function (promise, defaults) {
312
+ if (defaults === void 0) { defaults = []; }
313
+ console.warn('@deprecated use @firestitch/common/util/resolve instead');
314
+ var result = defaults;
315
+ return new Promise(function (resolve) {
316
+ promise.then(function (data) {
317
+ Object.keys(data).forEach(function (key) { return result[key] = data[key]; });
318
+ resolve(result);
319
+ });
320
+ });
321
+ };
322
+ /**
323
+ * @deprecated use _.toInteger() instead
324
+ */
325
+ FsUtil.prototype.int = function (value) {
326
+ console.warn('@deprecated use _.toInteger() instead');
327
+ value = parseInt(value);
328
+ if (isNaN(value)) {
329
+ value = 0;
330
+ }
331
+ return value;
332
+ };
333
+ /**
334
+ * @deprecated use _.toFinite() instead
335
+ */
336
+ FsUtil.prototype.float = function (value) {
337
+ console.warn('@deprecated use _.toFinite() instead');
338
+ value = parseFloat(value);
339
+ if (isNaN(value)) {
340
+ value = 0;
341
+ }
342
+ return value;
343
+ };
344
+ /**
345
+ * @deprecated use _.toString() instead
346
+ */
347
+ FsUtil.prototype.string = function (string) {
348
+ console.warn('@deprecated use _.toString() instead');
349
+ if (string === null || string === undefined) {
350
+ string = '';
351
+ }
352
+ return (string).toString();
353
+ };
354
+ /**
355
+ * @deprecated use import { isEmpty } from @firestitch/common/util; instead
356
+ */
357
+ FsUtil.prototype.isEmpty = function (value, options) {
358
+ console.warn('@deprecated use import { isEmpty } from @firestitch/common/util; instead');
359
+ options = options || {};
360
+ return value === undefined ||
361
+ value === null ||
362
+ value === false ||
363
+ value === '' ||
364
+ !this.string(value).length ||
365
+ (this.isObject(value) &&
366
+ (value.constructor.name === 'Object' && !Object.keys(value).length)) ||
367
+ (!options.zero && (value === 0 || value === '0'));
368
+ };
369
+ /**
370
+ * @deprecated use _.isInteger() instead
371
+ */
372
+ FsUtil.prototype.isInt = function (value, type) {
373
+ console.warn('@deprecated use _.isInteger() instead');
374
+ var int = !!this.string(value).match(/^\d+$/);
375
+ if (!int) {
376
+ return false;
377
+ }
378
+ if (type) {
379
+ return Number.isInteger(value);
380
+ }
381
+ return true;
382
+ };
383
+ /**
384
+ * @deprecated use _.each() instead {@link https://lodash.com/docs/4.17.5#forEach}
385
+ */
386
+ FsUtil.prototype.each = function (object, func) {
387
+ console.warn('@deprecated use _.each() instead {@link https://lodash.com/docs/4.17.5#forEach}');
388
+ if (!this.isArray(object) && !this.isObject(object)) {
389
+ return;
390
+ }
391
+ Object.keys(object).forEach(function (key) {
392
+ func(object[key], key);
393
+ });
394
+ };
395
+ /**
396
+ * @deprecated use _.isArrayLikeObject() {@link https://lodash.com/docs/4.17.5#isArrayLikeObject}
397
+ * or _.isObject() {@link https://lodash.com/docs/4.17.5#isObject} instead
398
+ */
399
+ FsUtil.prototype.isObject = function (value) {
400
+ console.warn('@deprecated use _.isArrayLikeObject() {@link https://lodash.com/docs/4.17.5#isArrayLikeObject} or _.isObject() {@link https://lodash.com/docs/4.17.5#isObject} instead');
401
+ return value !== null && typeof value === 'object' && !this.isArray(value);
402
+ };
403
+ /**
404
+ * @deprecated use _.isString() instead {@link https://lodash.com/docs/4.17.5#isString}
405
+ */
406
+ FsUtil.prototype.isString = function (value) {
407
+ console.warn('@deprecated use _.isString() instead {@link https://lodash.com/docs/4.17.5#isString}');
408
+ return typeof value === 'string' || value instanceof String;
409
+ };
410
+ /**
411
+ * @deprecated use _.isArray() instead {@link https://lodash.com/docs/4.17.5#isArray}
412
+ */
413
+ FsUtil.prototype.isArray = function (value) {
414
+ console.warn('@deprecated use _.isArray() instead {@link https://lodash.com/docs/4.17.5#isArray}');
415
+ return value instanceof Array;
416
+ };
417
+ /**
418
+ * @deprecated use import { isNumeric } from @firestitch/common/util; instead
419
+ */
420
+ FsUtil.prototype.isNumeric = function (value) {
421
+ console.warn('@deprecated use import { isNumeric } from @firestitch/common/util; instead');
422
+ return this.string(value).length && !!this.string(value).match(/^-?\d*\.?\d*$/);
423
+ };
424
+ /**
425
+ * @deprecated use import { isClass } from @firestitch/common/util; instead
426
+ */
427
+ FsUtil.prototype.isClass = function (value, cls) {
428
+ console.warn('@deprecated use import { isClass } from @firestitch/common/util; instead');
429
+ if (this.isObject(value)) {
430
+ if (this.isString(cls)) {
431
+ if (value.constructor) {
432
+ if (value.constructor.name === cls) {
433
+ return true;
434
+ }
435
+ }
436
+ }
437
+ else {
438
+ if (value instanceof cls) {
439
+ return true;
440
+ }
441
+ }
442
+ }
443
+ return false;
444
+ };
445
+ /**
446
+ * @deprecated use _.isBoolean() instead {@link https://lodash.com/docs/4.17.5#isBoolean}
447
+ */
448
+ FsUtil.prototype.isBoolean = function (value) {
449
+ console.warn('@deprecated use _.isBoolean() instead {@link https://lodash.com/docs/4.17.5#isBoolean}');
450
+ return value === true || value === false;
451
+ };
452
+ /**
453
+ * @deprecated use import { value } from @firestitch/common/util; instead
454
+ */
455
+ FsUtil.prototype.value = function (object, key, def) {
456
+ console.warn('@deprecated use import { value } from @firestitch/common/util; instead');
457
+ if (this.isObject(object) || this.isArray(object)) {
458
+ if (object.hasOwnProperty(key)) {
459
+ return object[key];
460
+ }
461
+ }
462
+ return def;
463
+ };
464
+ FsUtil.prototype.throttle = function (func, wait) {
465
+ console.warn('@deprecated use import { throttle } from @firestitch/common/util; instead');
466
+ var waiting = false; // Initially, we're not waiting
467
+ return function () {
468
+ if (!waiting) { // If we're not waiting
469
+ func.apply(null, arguments); // Execute users function
470
+ waiting = true; // Prevent future invocations
471
+ setTimeout(function () {
472
+ waiting = false; // And allow future invocations
473
+ }, wait);
474
+ }
475
+ };
476
+ };
477
+ /**
478
+ * @deprecated use import { debounce } from @firestitch/common/util; instead
479
+ */
480
+ FsUtil.prototype.debounce = function (func, wait, immediate) {
481
+ console.warn('@deprecated use import { debounce } from @firestitch/common/util; instead');
482
+ var timeout;
483
+ return function () {
484
+ var context = this, args = arguments;
485
+ var later = function () {
486
+ timeout = null;
487
+ if (!immediate)
488
+ func.apply(context, args);
489
+ };
490
+ var callNow = immediate && !timeout;
491
+ clearTimeout(timeout);
492
+ timeout = setTimeout(later, wait);
493
+ if (callNow)
494
+ func.apply(context, args);
495
+ };
496
+ };
497
+ /**
498
+ * @deprecated use import { length } from @firestitch/common/util; instead
499
+ */
500
+ FsUtil.prototype.length = function (object) {
501
+ console.warn('@deprecated use import { length } from @firestitch/common/util; instead');
502
+ if (this.isObject(object)) {
503
+ return Object.keys(object).length;
504
+ }
505
+ if (this.isArray(object)) {
506
+ return object.length;
507
+ }
508
+ return 0;
509
+ };
510
+ /**
511
+ * @deprecated use import { boolean } from @firestitch/common/util; instead
512
+ */
513
+ FsUtil.prototype.boolean = function (value) {
514
+ console.warn('@deprecated use import { boolean } from @firestitch/common/util; instead');
515
+ return this.string(value).toLowerCase() !== 'false' && !!value;
516
+ };
517
+ /**
518
+ * @deprecated use import { stringify } from @firestitch/common/util; instead
519
+ */
520
+ FsUtil.prototype.stringify = function (value) {
521
+ console.warn('@deprecated use import { stringify } from @firestitch/common/util; instead');
522
+ return JSON.stringify(value);
523
+ };
524
+ return FsUtil;
525
+ }());
526
+ FsUtil.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtil, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
527
+ FsUtil.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtil });
528
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtil, decorators: [{
529
+ type: i0.Injectable
530
530
  }] });
531
531
 
532
- var FsValidate = /** @class */ (function () {
533
- function FsValidate(fsUtil) {
534
- this.fsUtil = fsUtil;
535
- }
536
- /**
537
- * @deprecated use import { email } from @firestitch/common/validate; instead
538
- */
539
- FsValidate.prototype.phone = function (value) {
540
- var valid = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/.test(value);
541
- return valid || !String(value).length;
542
- };
543
- /**
544
- * @deprecated use import { email } from @firestitch/common/validate; instead
545
- */
546
- FsValidate.prototype.email = function (value) {
547
- return !!this.fsUtil.string(value).match(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);
548
- };
549
- return FsValidate;
550
- }());
551
- FsValidate.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsValidate, deps: [{ token: FsUtil }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
552
- FsValidate.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsValidate });
553
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsValidate, decorators: [{
554
- type: i0.Injectable
532
+ var FsValidate = /** @class */ (function () {
533
+ function FsValidate(fsUtil) {
534
+ this.fsUtil = fsUtil;
535
+ }
536
+ /**
537
+ * @deprecated use import { email } from @firestitch/common/validate; instead
538
+ */
539
+ FsValidate.prototype.phone = function (value) {
540
+ var valid = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/.test(value);
541
+ return valid || !String(value).length;
542
+ };
543
+ /**
544
+ * @deprecated use import { email } from @firestitch/common/validate; instead
545
+ */
546
+ FsValidate.prototype.email = function (value) {
547
+ return !!this.fsUtil.string(value).match(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);
548
+ };
549
+ return FsValidate;
550
+ }());
551
+ FsValidate.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsValidate, deps: [{ token: FsUtil }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
552
+ FsValidate.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsValidate });
553
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsValidate, decorators: [{
554
+ type: i0.Injectable
555
555
  }], ctorParameters: function () { return [{ type: FsUtil }]; } });
556
556
 
557
- function stringify(value) {
558
- return JSON.stringify(value);
557
+ function stringify(value) {
558
+ return JSON.stringify(value);
559
559
  }
560
560
 
561
- function guid(pattern, options) {
562
- if (options === void 0) { options = { case: 'lower', numbers: true }; }
563
- pattern = pattern || 'xxxxxx';
564
- var s = '';
565
- if (options.numbers !== false) {
566
- s = '0123456789';
567
- }
568
- if (!options.case || options.case === 'lower' || options.case === 'mixed') {
569
- s = s.concat('abcdefghijklmnopqrstuvwxyz');
570
- }
571
- if (options.case === 'upper' || options.case === 'mixed') {
572
- s = s.concat('ABCDEFGHIJKLMNOPQRSTUVWXYZ');
573
- }
574
- var chars = s.match(/(.{1,1})/g);
575
- return pattern.replace(/[x]/g, function (c) {
576
- var i = (Math.random() * chars.length) | 0;
577
- return chars[i];
578
- });
561
+ function guid(pattern, options) {
562
+ if (options === void 0) { options = { case: 'lower', numbers: true }; }
563
+ pattern = pattern || 'xxxxxx';
564
+ var s = '';
565
+ if (options.numbers !== false) {
566
+ s = '0123456789';
567
+ }
568
+ if (!options.case || options.case === 'lower' || options.case === 'mixed') {
569
+ s = s.concat('abcdefghijklmnopqrstuvwxyz');
570
+ }
571
+ if (options.case === 'upper' || options.case === 'mixed') {
572
+ s = s.concat('ABCDEFGHIJKLMNOPQRSTUVWXYZ');
573
+ }
574
+ var chars = s.match(/(.{1,1})/g);
575
+ return pattern.replace(/[x]/g, function (c) {
576
+ var i = (Math.random() * chars.length) | 0;
577
+ return chars[i];
578
+ });
579
579
  }
580
580
 
581
- function isEmpty(value, options) {
582
- options = options || {};
583
- return value === undefined ||
584
- value === null ||
585
- value === false ||
586
- value === '' ||
587
- String(value).length === 0 ||
588
- (Array.isArray(value) && value.length === 0) ||
589
- (value instanceof Object && (value.constructor.name === 'Object' && !Object.keys(value).length)) ||
590
- (!options.zero && (value === 0 || value === '0'));
581
+ function isEmpty(value, options) {
582
+ options = options || {};
583
+ return value === undefined ||
584
+ value === null ||
585
+ value === false ||
586
+ value === '' ||
587
+ String(value).length === 0 ||
588
+ (Array.isArray(value) && value.length === 0) ||
589
+ (value instanceof Object && (value.constructor.name === 'Object' && !Object.keys(value).length)) ||
590
+ (!options.zero && (value === 0 || value === '0'));
591
591
  }
592
592
 
593
- var FsUtilStringifyPipe = /** @class */ (function () {
594
- function FsUtilStringifyPipe() {
595
- }
596
- FsUtilStringifyPipe.prototype.transform = function (value) {
597
- return stringify(value);
598
- };
599
- return FsUtilStringifyPipe;
600
- }());
601
- FsUtilStringifyPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilStringifyPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
602
- FsUtilStringifyPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilStringifyPipe, name: "fsUtilStringify" });
603
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilStringifyPipe, decorators: [{
604
- type: i0.Pipe,
605
- args: [{
606
- name: 'fsUtilStringify'
607
- }]
608
- }], ctorParameters: function () { return []; } });
609
- var FsUtilGuidPipe = /** @class */ (function () {
610
- function FsUtilGuidPipe() {
611
- }
612
- FsUtilGuidPipe.prototype.transform = function () {
613
- return guid();
614
- };
615
- return FsUtilGuidPipe;
616
- }());
617
- FsUtilGuidPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilGuidPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
618
- FsUtilGuidPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilGuidPipe, name: "fsUtilGuid" });
619
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilGuidPipe, decorators: [{
620
- type: i0.Pipe,
621
- args: [{
622
- name: 'fsUtilGuid'
623
- }]
624
- }], ctorParameters: function () { return []; } });
625
- var FsUtilIsEmptyPipe = /** @class */ (function () {
626
- function FsUtilIsEmptyPipe() {
627
- }
628
- FsUtilIsEmptyPipe.prototype.transform = function (value) {
629
- return isEmpty(value);
630
- };
631
- return FsUtilIsEmptyPipe;
632
- }());
633
- FsUtilIsEmptyPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilIsEmptyPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
634
- FsUtilIsEmptyPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilIsEmptyPipe, name: "fsUtilIsEmpty" });
635
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilIsEmptyPipe, decorators: [{
636
- type: i0.Pipe,
637
- args: [{
638
- name: 'fsUtilIsEmpty'
639
- }]
640
- }] });
641
- var FsUtilIsNotEmptyPipe = /** @class */ (function () {
642
- function FsUtilIsNotEmptyPipe() {
643
- }
644
- FsUtilIsNotEmptyPipe.prototype.transform = function (value) {
645
- return !isEmpty(value);
646
- };
647
- return FsUtilIsNotEmptyPipe;
648
- }());
649
- FsUtilIsNotEmptyPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilIsNotEmptyPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
650
- FsUtilIsNotEmptyPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilIsNotEmptyPipe, name: "fsUtilIsNotEmpty" });
651
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilIsNotEmptyPipe, decorators: [{
652
- type: i0.Pipe,
653
- args: [{
654
- name: 'fsUtilIsNotEmpty'
655
- }]
593
+ var FsUtilStringifyPipe = /** @class */ (function () {
594
+ function FsUtilStringifyPipe() {
595
+ }
596
+ FsUtilStringifyPipe.prototype.transform = function (value) {
597
+ return stringify(value);
598
+ };
599
+ return FsUtilStringifyPipe;
600
+ }());
601
+ FsUtilStringifyPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilStringifyPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
602
+ FsUtilStringifyPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilStringifyPipe, name: "fsUtilStringify" });
603
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilStringifyPipe, decorators: [{
604
+ type: i0.Pipe,
605
+ args: [{
606
+ name: 'fsUtilStringify'
607
+ }]
608
+ }], ctorParameters: function () { return []; } });
609
+ var FsUtilGuidPipe = /** @class */ (function () {
610
+ function FsUtilGuidPipe() {
611
+ }
612
+ FsUtilGuidPipe.prototype.transform = function () {
613
+ return guid();
614
+ };
615
+ return FsUtilGuidPipe;
616
+ }());
617
+ FsUtilGuidPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilGuidPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
618
+ FsUtilGuidPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilGuidPipe, name: "fsUtilGuid" });
619
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilGuidPipe, decorators: [{
620
+ type: i0.Pipe,
621
+ args: [{
622
+ name: 'fsUtilGuid'
623
+ }]
624
+ }], ctorParameters: function () { return []; } });
625
+ var FsUtilIsEmptyPipe = /** @class */ (function () {
626
+ function FsUtilIsEmptyPipe() {
627
+ }
628
+ FsUtilIsEmptyPipe.prototype.transform = function (value) {
629
+ return isEmpty(value);
630
+ };
631
+ return FsUtilIsEmptyPipe;
632
+ }());
633
+ FsUtilIsEmptyPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilIsEmptyPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
634
+ FsUtilIsEmptyPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilIsEmptyPipe, name: "fsUtilIsEmpty" });
635
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilIsEmptyPipe, decorators: [{
636
+ type: i0.Pipe,
637
+ args: [{
638
+ name: 'fsUtilIsEmpty'
639
+ }]
640
+ }] });
641
+ var FsUtilIsNotEmptyPipe = /** @class */ (function () {
642
+ function FsUtilIsNotEmptyPipe() {
643
+ }
644
+ FsUtilIsNotEmptyPipe.prototype.transform = function (value) {
645
+ return !isEmpty(value);
646
+ };
647
+ return FsUtilIsNotEmptyPipe;
648
+ }());
649
+ FsUtilIsNotEmptyPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilIsNotEmptyPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
650
+ FsUtilIsNotEmptyPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilIsNotEmptyPipe, name: "fsUtilIsNotEmpty" });
651
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsUtilIsNotEmptyPipe, decorators: [{
652
+ type: i0.Pipe,
653
+ args: [{
654
+ name: 'fsUtilIsNotEmpty'
655
+ }]
656
656
  }] });
657
657
 
658
- function number(value, decimals) {
659
- return Number(value || 0).toLocaleString(undefined, { maximumFractionDigits: decimals });
658
+ function number(value, decimals) {
659
+ return Number(value || 0).toLocaleString(undefined, { maximumFractionDigits: decimals });
660
660
  }
661
661
 
662
- var FsFormatNumberPipe = /** @class */ (function () {
663
- function FsFormatNumberPipe() {
664
- }
665
- FsFormatNumberPipe.prototype.transform = function (value, decimals) {
666
- return number(value, decimals);
667
- };
668
- return FsFormatNumberPipe;
669
- }());
670
- FsFormatNumberPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatNumberPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
671
- FsFormatNumberPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatNumberPipe, name: "fsFormatNumber" });
672
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatNumberPipe, decorators: [{
673
- type: i0.Pipe,
674
- args: [{
675
- name: 'fsFormatNumber'
676
- }]
662
+ var FsFormatNumberPipe = /** @class */ (function () {
663
+ function FsFormatNumberPipe() {
664
+ }
665
+ FsFormatNumberPipe.prototype.transform = function (value, decimals) {
666
+ return number(value, decimals);
667
+ };
668
+ return FsFormatNumberPipe;
669
+ }());
670
+ FsFormatNumberPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatNumberPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
671
+ FsFormatNumberPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatNumberPipe, name: "fsFormatNumber" });
672
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatNumberPipe, decorators: [{
673
+ type: i0.Pipe,
674
+ args: [{
675
+ name: 'fsFormatNumber'
676
+ }]
677
677
  }] });
678
678
 
679
- function currency(amount, precision, currencyCode, locale) {
680
- if (precision === void 0) { precision = [2, 10]; }
681
- if (currencyCode === void 0) { currencyCode = 'USD'; }
682
- if (locale === void 0) { locale = 'en-US'; }
683
- var digitsInfo = Array.isArray(precision) ? precision : [precision, precision];
684
- return new common.CurrencyPipe(locale).transform(amount, currencyCode, 'symbol', "1." + digitsInfo[0] + "-" + digitsInfo[1]);
679
+ function currency(amount, precision, currencyCode, locale) {
680
+ if (precision === void 0) { precision = [2, 10]; }
681
+ if (currencyCode === void 0) { currencyCode = 'USD'; }
682
+ if (locale === void 0) { locale = 'en-US'; }
683
+ var digitsInfo = Array.isArray(precision) ? precision : [precision, precision];
684
+ return new common.CurrencyPipe(locale).transform(amount, currencyCode, 'symbol', "1." + digitsInfo[0] + "-" + digitsInfo[1]);
685
685
  }
686
686
 
687
- var FsFormatCurrencyPipe = /** @class */ (function () {
688
- function FsFormatCurrencyPipe(locale) {
689
- this.locale = locale;
690
- }
691
- FsFormatCurrencyPipe.prototype.transform = function (amount, precision, currencyCode) {
692
- return currency(amount, precision, currencyCode);
693
- };
694
- return FsFormatCurrencyPipe;
695
- }());
696
- FsFormatCurrencyPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatCurrencyPipe, deps: [{ token: i0.LOCALE_ID }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
697
- FsFormatCurrencyPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatCurrencyPipe, name: "fsFormatCurrency" });
698
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatCurrencyPipe, decorators: [{
699
- type: i0.Pipe,
700
- args: [{
701
- name: 'fsFormatCurrency'
702
- }]
703
- }], ctorParameters: function () {
704
- return [{ type: undefined, decorators: [{
705
- type: i0.Inject,
706
- args: [i0.LOCALE_ID]
707
- }] }];
687
+ var FsFormatCurrencyPipe = /** @class */ (function () {
688
+ function FsFormatCurrencyPipe(locale) {
689
+ this.locale = locale;
690
+ }
691
+ FsFormatCurrencyPipe.prototype.transform = function (amount, precision, currencyCode) {
692
+ return currency(amount, precision, currencyCode);
693
+ };
694
+ return FsFormatCurrencyPipe;
695
+ }());
696
+ FsFormatCurrencyPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatCurrencyPipe, deps: [{ token: i0.LOCALE_ID }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
697
+ FsFormatCurrencyPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatCurrencyPipe, name: "fsFormatCurrency" });
698
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatCurrencyPipe, decorators: [{
699
+ type: i0.Pipe,
700
+ args: [{
701
+ name: 'fsFormatCurrency'
702
+ }]
703
+ }], ctorParameters: function () {
704
+ return [{ type: undefined, decorators: [{
705
+ type: i0.Inject,
706
+ args: [i0.LOCALE_ID]
707
+ }] }];
708
708
  } });
709
709
 
710
- function truncate(value, limit, completeWords, ellipsis) {
711
- if (limit === void 0) { limit = 100; }
712
- if (completeWords === void 0) { completeWords = false; }
713
- if (ellipsis === void 0) { ellipsis = '...'; }
714
- value = value || '';
715
- if (completeWords) {
716
- limit = value.substr(0, limit).lastIndexOf(' ');
717
- }
718
- var result = "" + value.substr(0, limit);
719
- if (result !== value) {
720
- result += ellipsis;
721
- }
722
- return result;
710
+ function truncate(value, limit, completeWords, ellipsis) {
711
+ if (limit === void 0) { limit = 100; }
712
+ if (completeWords === void 0) { completeWords = false; }
713
+ if (ellipsis === void 0) { ellipsis = '...'; }
714
+ value = value || '';
715
+ if (completeWords) {
716
+ limit = value.substr(0, limit).lastIndexOf(' ');
717
+ }
718
+ var result = "" + value.substr(0, limit);
719
+ if (result !== value) {
720
+ result += ellipsis;
721
+ }
722
+ return result;
723
723
  }
724
724
 
725
- var FsFormatTruncatePipe = /** @class */ (function () {
726
- function FsFormatTruncatePipe() {
727
- }
728
- FsFormatTruncatePipe.prototype.transform = function (value, limit, completeWords, ellipsis) {
729
- return truncate(value, limit, completeWords, ellipsis);
730
- };
731
- return FsFormatTruncatePipe;
732
- }());
733
- FsFormatTruncatePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatTruncatePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
734
- FsFormatTruncatePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatTruncatePipe, name: "fsFormatTruncate" });
735
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatTruncatePipe, decorators: [{
736
- type: i0.Pipe,
737
- args: [{
738
- name: 'fsFormatTruncate'
739
- }]
725
+ var FsFormatTruncatePipe = /** @class */ (function () {
726
+ function FsFormatTruncatePipe() {
727
+ }
728
+ FsFormatTruncatePipe.prototype.transform = function (value, limit, completeWords, ellipsis) {
729
+ return truncate(value, limit, completeWords, ellipsis);
730
+ };
731
+ return FsFormatTruncatePipe;
732
+ }());
733
+ FsFormatTruncatePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatTruncatePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
734
+ FsFormatTruncatePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatTruncatePipe, name: "fsFormatTruncate" });
735
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatTruncatePipe, decorators: [{
736
+ type: i0.Pipe,
737
+ args: [{
738
+ name: 'fsFormatTruncate'
739
+ }]
740
740
  }], ctorParameters: function () { return []; } });
741
741
 
742
- var FsStopPropagationDirective = /** @class */ (function () {
743
- function FsStopPropagationDirective() {
744
- }
745
- FsStopPropagationDirective.prototype.preventClick = function (event) {
746
- event.stopPropagation();
747
- };
748
- return FsStopPropagationDirective;
749
- }());
750
- FsStopPropagationDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsStopPropagationDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
751
- FsStopPropagationDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsStopPropagationDirective, selector: "[fsStopPropagation]", host: { listeners: { "click": "preventClick($event)" } }, ngImport: i0__namespace });
752
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsStopPropagationDirective, decorators: [{
753
- type: i0.Directive,
754
- args: [{
755
- selector: '[fsStopPropagation]',
756
- }]
757
- }], propDecorators: { preventClick: [{
758
- type: i0.HostListener,
759
- args: ['click', ['$event']]
742
+ function bytes(bytes) {
743
+ if (!bytes) {
744
+ return '0.00 B';
745
+ }
746
+ var e = Math.floor(Math.log(bytes) / Math.log(1024));
747
+ var decimals = (bytes / 1024) > 1000 ? 2 : 0;
748
+ console.log(bytes, (bytes / 1024), decimals);
749
+ return ("" + (bytes / Math.pow(1024, e)).toFixed(decimals)).replace(/\.00/, '')
750
+ + ' '
751
+ + (e ? ' KMGTP'.charAt(e) : '') + 'B';
752
+ }
753
+
754
+ var FsFormatBytesPipe = /** @class */ (function () {
755
+ function FsFormatBytesPipe() {
756
+ }
757
+ FsFormatBytesPipe.prototype.transform = function (value) {
758
+ return bytes(value);
759
+ };
760
+ return FsFormatBytesPipe;
761
+ }());
762
+ FsFormatBytesPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatBytesPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
763
+ FsFormatBytesPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatBytesPipe, name: "fsFormatBytes" });
764
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatBytesPipe, decorators: [{
765
+ type: i0.Pipe,
766
+ args: [{
767
+ name: 'fsFormatBytes',
768
+ }]
769
+ }] });
770
+
771
+ var FsStopPropagationDirective = /** @class */ (function () {
772
+ function FsStopPropagationDirective() {
773
+ }
774
+ FsStopPropagationDirective.prototype.preventClick = function (event) {
775
+ event.stopPropagation();
776
+ };
777
+ return FsStopPropagationDirective;
778
+ }());
779
+ FsStopPropagationDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsStopPropagationDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
780
+ FsStopPropagationDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsStopPropagationDirective, selector: "[fsStopPropagation]", host: { listeners: { "click": "preventClick($event)" } }, ngImport: i0__namespace });
781
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsStopPropagationDirective, decorators: [{
782
+ type: i0.Directive,
783
+ args: [{
784
+ selector: '[fsStopPropagation]',
785
+ }]
786
+ }], propDecorators: { preventClick: [{
787
+ type: i0.HostListener,
788
+ args: ['click', ['$event']]
760
789
  }] } });
761
790
 
762
- var FsPreventDefaultDirective = /** @class */ (function () {
763
- function FsPreventDefaultDirective() {
764
- }
765
- FsPreventDefaultDirective.prototype.preventClick = function (event) {
766
- event.preventDefault();
767
- };
768
- return FsPreventDefaultDirective;
769
- }());
770
- FsPreventDefaultDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPreventDefaultDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
771
- FsPreventDefaultDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsPreventDefaultDirective, selector: "[fsPreventDefault]", host: { listeners: { "click": "preventClick($event)" } }, ngImport: i0__namespace });
772
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPreventDefaultDirective, decorators: [{
773
- type: i0.Directive,
774
- args: [{
775
- selector: '[fsPreventDefault]',
776
- }]
777
- }], propDecorators: { preventClick: [{
778
- type: i0.HostListener,
779
- args: ['click', ['$event']]
791
+ var FsPreventDefaultDirective = /** @class */ (function () {
792
+ function FsPreventDefaultDirective() {
793
+ }
794
+ FsPreventDefaultDirective.prototype.preventClick = function (event) {
795
+ event.preventDefault();
796
+ };
797
+ return FsPreventDefaultDirective;
798
+ }());
799
+ FsPreventDefaultDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPreventDefaultDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
800
+ FsPreventDefaultDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsPreventDefaultDirective, selector: "[fsPreventDefault]", host: { listeners: { "click": "preventClick($event)" } }, ngImport: i0__namespace });
801
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPreventDefaultDirective, decorators: [{
802
+ type: i0.Directive,
803
+ args: [{
804
+ selector: '[fsPreventDefault]',
805
+ }]
806
+ }], propDecorators: { preventClick: [{
807
+ type: i0.HostListener,
808
+ args: ['click', ['$event']]
780
809
  }] } });
781
810
 
782
- var FsAutofocusDirective = /** @class */ (function () {
783
- function FsAutofocusDirective(_el) {
784
- this._el = _el;
785
- }
786
- FsAutofocusDirective.prototype.ngAfterViewInit = function () {
787
- var _this = this;
788
- setTimeout(function () {
789
- _this._el.nativeElement.focus();
790
- });
791
- };
792
- return FsAutofocusDirective;
793
- }());
794
- FsAutofocusDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAutofocusDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
795
- FsAutofocusDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsAutofocusDirective, selector: "[autofocus]", ngImport: i0__namespace });
796
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAutofocusDirective, decorators: [{
797
- type: i0.Directive,
798
- args: [{
799
- selector: '[autofocus]',
800
- }]
811
+ var FsAutofocusDirective = /** @class */ (function () {
812
+ function FsAutofocusDirective(_el) {
813
+ this._el = _el;
814
+ }
815
+ FsAutofocusDirective.prototype.ngAfterViewInit = function () {
816
+ var _this = this;
817
+ setTimeout(function () {
818
+ _this._el.nativeElement.focus();
819
+ });
820
+ };
821
+ return FsAutofocusDirective;
822
+ }());
823
+ FsAutofocusDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAutofocusDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
824
+ FsAutofocusDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsAutofocusDirective, selector: "[autofocus]", ngImport: i0__namespace });
825
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAutofocusDirective, decorators: [{
826
+ type: i0.Directive,
827
+ args: [{
828
+ selector: '[autofocus]',
829
+ }]
801
830
  }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; } });
802
831
 
803
- /*! *****************************************************************************
804
- Copyright (c) Microsoft Corporation.
805
-
806
- Permission to use, copy, modify, and/or distribute this software for any
807
- purpose with or without fee is hereby granted.
808
-
809
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
810
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
811
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
812
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
813
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
814
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
815
- PERFORMANCE OF THIS SOFTWARE.
816
- ***************************************************************************** */
817
- /* global Reflect, Promise */
818
- var extendStatics = function (d, b) {
819
- extendStatics = Object.setPrototypeOf ||
820
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
821
- function (d, b) { for (var p in b)
822
- if (Object.prototype.hasOwnProperty.call(b, p))
823
- d[p] = b[p]; };
824
- return extendStatics(d, b);
825
- };
826
- function __extends(d, b) {
827
- if (typeof b !== "function" && b !== null)
828
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
829
- extendStatics(d, b);
830
- function __() { this.constructor = d; }
831
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
832
- }
833
- var __assign = function () {
834
- __assign = Object.assign || function __assign(t) {
835
- for (var s, i = 1, n = arguments.length; i < n; i++) {
836
- s = arguments[i];
837
- for (var p in s)
838
- if (Object.prototype.hasOwnProperty.call(s, p))
839
- t[p] = s[p];
840
- }
841
- return t;
842
- };
843
- return __assign.apply(this, arguments);
844
- };
845
- function __rest(s, e) {
846
- var t = {};
847
- for (var p in s)
848
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
849
- t[p] = s[p];
850
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
851
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
852
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
853
- t[p[i]] = s[p[i]];
854
- }
855
- return t;
856
- }
857
- function __decorate(decorators, target, key, desc) {
858
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
859
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
860
- r = Reflect.decorate(decorators, target, key, desc);
861
- else
862
- for (var i = decorators.length - 1; i >= 0; i--)
863
- if (d = decorators[i])
864
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
865
- return c > 3 && r && Object.defineProperty(target, key, r), r;
866
- }
867
- function __param(paramIndex, decorator) {
868
- return function (target, key) { decorator(target, key, paramIndex); };
869
- }
870
- function __metadata(metadataKey, metadataValue) {
871
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
872
- return Reflect.metadata(metadataKey, metadataValue);
873
- }
874
- function __awaiter(thisArg, _arguments, P, generator) {
875
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
876
- return new (P || (P = Promise))(function (resolve, reject) {
877
- function fulfilled(value) { try {
878
- step(generator.next(value));
879
- }
880
- catch (e) {
881
- reject(e);
882
- } }
883
- function rejected(value) { try {
884
- step(generator["throw"](value));
885
- }
886
- catch (e) {
887
- reject(e);
888
- } }
889
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
890
- step((generator = generator.apply(thisArg, _arguments || [])).next());
891
- });
892
- }
893
- function __generator(thisArg, body) {
894
- var _ = { label: 0, sent: function () { if (t[0] & 1)
895
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
896
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
897
- function verb(n) { return function (v) { return step([n, v]); }; }
898
- function step(op) {
899
- if (f)
900
- throw new TypeError("Generator is already executing.");
901
- while (_)
902
- try {
903
- 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)
904
- return t;
905
- if (y = 0, t)
906
- op = [op[0] & 2, t.value];
907
- switch (op[0]) {
908
- case 0:
909
- case 1:
910
- t = op;
911
- break;
912
- case 4:
913
- _.label++;
914
- return { value: op[1], done: false };
915
- case 5:
916
- _.label++;
917
- y = op[1];
918
- op = [0];
919
- continue;
920
- case 7:
921
- op = _.ops.pop();
922
- _.trys.pop();
923
- continue;
924
- default:
925
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
926
- _ = 0;
927
- continue;
928
- }
929
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
930
- _.label = op[1];
931
- break;
932
- }
933
- if (op[0] === 6 && _.label < t[1]) {
934
- _.label = t[1];
935
- t = op;
936
- break;
937
- }
938
- if (t && _.label < t[2]) {
939
- _.label = t[2];
940
- _.ops.push(op);
941
- break;
942
- }
943
- if (t[2])
944
- _.ops.pop();
945
- _.trys.pop();
946
- continue;
947
- }
948
- op = body.call(thisArg, _);
949
- }
950
- catch (e) {
951
- op = [6, e];
952
- y = 0;
953
- }
954
- finally {
955
- f = t = 0;
956
- }
957
- if (op[0] & 5)
958
- throw op[1];
959
- return { value: op[0] ? op[1] : void 0, done: true };
960
- }
961
- }
962
- var __createBinding = Object.create ? (function (o, m, k, k2) {
963
- if (k2 === undefined)
964
- k2 = k;
965
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
966
- }) : (function (o, m, k, k2) {
967
- if (k2 === undefined)
968
- k2 = k;
969
- o[k2] = m[k];
970
- });
971
- function __exportStar(m, o) {
972
- for (var p in m)
973
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
974
- __createBinding(o, m, p);
975
- }
976
- function __values(o) {
977
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
978
- if (m)
979
- return m.call(o);
980
- if (o && typeof o.length === "number")
981
- return {
982
- next: function () {
983
- if (o && i >= o.length)
984
- o = void 0;
985
- return { value: o && o[i++], done: !o };
986
- }
987
- };
988
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
989
- }
990
- function __read(o, n) {
991
- var m = typeof Symbol === "function" && o[Symbol.iterator];
992
- if (!m)
993
- return o;
994
- var i = m.call(o), r, ar = [], e;
995
- try {
996
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
997
- ar.push(r.value);
998
- }
999
- catch (error) {
1000
- e = { error: error };
1001
- }
1002
- finally {
1003
- try {
1004
- if (r && !r.done && (m = i["return"]))
1005
- m.call(i);
1006
- }
1007
- finally {
1008
- if (e)
1009
- throw e.error;
1010
- }
1011
- }
1012
- return ar;
1013
- }
1014
- /** @deprecated */
1015
- function __spread() {
1016
- for (var ar = [], i = 0; i < arguments.length; i++)
1017
- ar = ar.concat(__read(arguments[i]));
1018
- return ar;
1019
- }
1020
- /** @deprecated */
1021
- function __spreadArrays() {
1022
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
1023
- s += arguments[i].length;
1024
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
1025
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
1026
- r[k] = a[j];
1027
- return r;
1028
- }
1029
- function __spreadArray(to, from, pack) {
1030
- if (pack || arguments.length === 2)
1031
- for (var i = 0, l = from.length, ar; i < l; i++) {
1032
- if (ar || !(i in from)) {
1033
- if (!ar)
1034
- ar = Array.prototype.slice.call(from, 0, i);
1035
- ar[i] = from[i];
1036
- }
1037
- }
1038
- return to.concat(ar || Array.prototype.slice.call(from));
1039
- }
1040
- function __await(v) {
1041
- return this instanceof __await ? (this.v = v, this) : new __await(v);
1042
- }
1043
- function __asyncGenerator(thisArg, _arguments, generator) {
1044
- if (!Symbol.asyncIterator)
1045
- throw new TypeError("Symbol.asyncIterator is not defined.");
1046
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
1047
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
1048
- function verb(n) { if (g[n])
1049
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
1050
- function resume(n, v) { try {
1051
- step(g[n](v));
1052
- }
1053
- catch (e) {
1054
- settle(q[0][3], e);
1055
- } }
1056
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
1057
- function fulfill(value) { resume("next", value); }
1058
- function reject(value) { resume("throw", value); }
1059
- function settle(f, v) { if (f(v), q.shift(), q.length)
1060
- resume(q[0][0], q[0][1]); }
1061
- }
1062
- function __asyncDelegator(o) {
1063
- var i, p;
1064
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
1065
- 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; }
1066
- }
1067
- function __asyncValues(o) {
1068
- if (!Symbol.asyncIterator)
1069
- throw new TypeError("Symbol.asyncIterator is not defined.");
1070
- var m = o[Symbol.asyncIterator], i;
1071
- 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);
1072
- 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); }); }; }
1073
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
1074
- }
1075
- function __makeTemplateObject(cooked, raw) {
1076
- if (Object.defineProperty) {
1077
- Object.defineProperty(cooked, "raw", { value: raw });
1078
- }
1079
- else {
1080
- cooked.raw = raw;
1081
- }
1082
- return cooked;
1083
- }
1084
- ;
1085
- var __setModuleDefault = Object.create ? (function (o, v) {
1086
- Object.defineProperty(o, "default", { enumerable: true, value: v });
1087
- }) : function (o, v) {
1088
- o["default"] = v;
1089
- };
1090
- function __importStar(mod) {
1091
- if (mod && mod.__esModule)
1092
- return mod;
1093
- var result = {};
1094
- if (mod != null)
1095
- for (var k in mod)
1096
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
1097
- __createBinding(result, mod, k);
1098
- __setModuleDefault(result, mod);
1099
- return result;
1100
- }
1101
- function __importDefault(mod) {
1102
- return (mod && mod.__esModule) ? mod : { default: mod };
1103
- }
1104
- function __classPrivateFieldGet(receiver, state, kind, f) {
1105
- if (kind === "a" && !f)
1106
- throw new TypeError("Private accessor was defined without a getter");
1107
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
1108
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
1109
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
1110
- }
1111
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
1112
- if (kind === "m")
1113
- throw new TypeError("Private method is not writable");
1114
- if (kind === "a" && !f)
1115
- throw new TypeError("Private accessor was defined without a setter");
1116
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
1117
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
1118
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
832
+ /*! *****************************************************************************
833
+ Copyright (c) Microsoft Corporation.
834
+
835
+ Permission to use, copy, modify, and/or distribute this software for any
836
+ purpose with or without fee is hereby granted.
837
+
838
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
839
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
840
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
841
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
842
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
843
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
844
+ PERFORMANCE OF THIS SOFTWARE.
845
+ ***************************************************************************** */
846
+ /* global Reflect, Promise */
847
+ var extendStatics = function (d, b) {
848
+ extendStatics = Object.setPrototypeOf ||
849
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
850
+ function (d, b) { for (var p in b)
851
+ if (Object.prototype.hasOwnProperty.call(b, p))
852
+ d[p] = b[p]; };
853
+ return extendStatics(d, b);
854
+ };
855
+ function __extends(d, b) {
856
+ if (typeof b !== "function" && b !== null)
857
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
858
+ extendStatics(d, b);
859
+ function __() { this.constructor = d; }
860
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
861
+ }
862
+ var __assign = function () {
863
+ __assign = Object.assign || function __assign(t) {
864
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
865
+ s = arguments[i];
866
+ for (var p in s)
867
+ if (Object.prototype.hasOwnProperty.call(s, p))
868
+ t[p] = s[p];
869
+ }
870
+ return t;
871
+ };
872
+ return __assign.apply(this, arguments);
873
+ };
874
+ function __rest(s, e) {
875
+ var t = {};
876
+ for (var p in s)
877
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
878
+ t[p] = s[p];
879
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
880
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
881
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
882
+ t[p[i]] = s[p[i]];
883
+ }
884
+ return t;
885
+ }
886
+ function __decorate(decorators, target, key, desc) {
887
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
888
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
889
+ r = Reflect.decorate(decorators, target, key, desc);
890
+ else
891
+ for (var i = decorators.length - 1; i >= 0; i--)
892
+ if (d = decorators[i])
893
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
894
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
895
+ }
896
+ function __param(paramIndex, decorator) {
897
+ return function (target, key) { decorator(target, key, paramIndex); };
898
+ }
899
+ function __metadata(metadataKey, metadataValue) {
900
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
901
+ return Reflect.metadata(metadataKey, metadataValue);
902
+ }
903
+ function __awaiter(thisArg, _arguments, P, generator) {
904
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
905
+ return new (P || (P = Promise))(function (resolve, reject) {
906
+ function fulfilled(value) { try {
907
+ step(generator.next(value));
908
+ }
909
+ catch (e) {
910
+ reject(e);
911
+ } }
912
+ function rejected(value) { try {
913
+ step(generator["throw"](value));
914
+ }
915
+ catch (e) {
916
+ reject(e);
917
+ } }
918
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
919
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
920
+ });
921
+ }
922
+ function __generator(thisArg, body) {
923
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
924
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
925
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
926
+ function verb(n) { return function (v) { return step([n, v]); }; }
927
+ function step(op) {
928
+ if (f)
929
+ throw new TypeError("Generator is already executing.");
930
+ while (_)
931
+ try {
932
+ 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)
933
+ return t;
934
+ if (y = 0, t)
935
+ op = [op[0] & 2, t.value];
936
+ switch (op[0]) {
937
+ case 0:
938
+ case 1:
939
+ t = op;
940
+ break;
941
+ case 4:
942
+ _.label++;
943
+ return { value: op[1], done: false };
944
+ case 5:
945
+ _.label++;
946
+ y = op[1];
947
+ op = [0];
948
+ continue;
949
+ case 7:
950
+ op = _.ops.pop();
951
+ _.trys.pop();
952
+ continue;
953
+ default:
954
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
955
+ _ = 0;
956
+ continue;
957
+ }
958
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
959
+ _.label = op[1];
960
+ break;
961
+ }
962
+ if (op[0] === 6 && _.label < t[1]) {
963
+ _.label = t[1];
964
+ t = op;
965
+ break;
966
+ }
967
+ if (t && _.label < t[2]) {
968
+ _.label = t[2];
969
+ _.ops.push(op);
970
+ break;
971
+ }
972
+ if (t[2])
973
+ _.ops.pop();
974
+ _.trys.pop();
975
+ continue;
976
+ }
977
+ op = body.call(thisArg, _);
978
+ }
979
+ catch (e) {
980
+ op = [6, e];
981
+ y = 0;
982
+ }
983
+ finally {
984
+ f = t = 0;
985
+ }
986
+ if (op[0] & 5)
987
+ throw op[1];
988
+ return { value: op[0] ? op[1] : void 0, done: true };
989
+ }
990
+ }
991
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
992
+ if (k2 === undefined)
993
+ k2 = k;
994
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
995
+ }) : (function (o, m, k, k2) {
996
+ if (k2 === undefined)
997
+ k2 = k;
998
+ o[k2] = m[k];
999
+ });
1000
+ function __exportStar(m, o) {
1001
+ for (var p in m)
1002
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
1003
+ __createBinding(o, m, p);
1004
+ }
1005
+ function __values(o) {
1006
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
1007
+ if (m)
1008
+ return m.call(o);
1009
+ if (o && typeof o.length === "number")
1010
+ return {
1011
+ next: function () {
1012
+ if (o && i >= o.length)
1013
+ o = void 0;
1014
+ return { value: o && o[i++], done: !o };
1015
+ }
1016
+ };
1017
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
1018
+ }
1019
+ function __read(o, n) {
1020
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
1021
+ if (!m)
1022
+ return o;
1023
+ var i = m.call(o), r, ar = [], e;
1024
+ try {
1025
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
1026
+ ar.push(r.value);
1027
+ }
1028
+ catch (error) {
1029
+ e = { error: error };
1030
+ }
1031
+ finally {
1032
+ try {
1033
+ if (r && !r.done && (m = i["return"]))
1034
+ m.call(i);
1035
+ }
1036
+ finally {
1037
+ if (e)
1038
+ throw e.error;
1039
+ }
1040
+ }
1041
+ return ar;
1042
+ }
1043
+ /** @deprecated */
1044
+ function __spread() {
1045
+ for (var ar = [], i = 0; i < arguments.length; i++)
1046
+ ar = ar.concat(__read(arguments[i]));
1047
+ return ar;
1048
+ }
1049
+ /** @deprecated */
1050
+ function __spreadArrays() {
1051
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
1052
+ s += arguments[i].length;
1053
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
1054
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
1055
+ r[k] = a[j];
1056
+ return r;
1057
+ }
1058
+ function __spreadArray(to, from, pack) {
1059
+ if (pack || arguments.length === 2)
1060
+ for (var i = 0, l = from.length, ar; i < l; i++) {
1061
+ if (ar || !(i in from)) {
1062
+ if (!ar)
1063
+ ar = Array.prototype.slice.call(from, 0, i);
1064
+ ar[i] = from[i];
1065
+ }
1066
+ }
1067
+ return to.concat(ar || Array.prototype.slice.call(from));
1068
+ }
1069
+ function __await(v) {
1070
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
1071
+ }
1072
+ function __asyncGenerator(thisArg, _arguments, generator) {
1073
+ if (!Symbol.asyncIterator)
1074
+ throw new TypeError("Symbol.asyncIterator is not defined.");
1075
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
1076
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
1077
+ function verb(n) { if (g[n])
1078
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
1079
+ function resume(n, v) { try {
1080
+ step(g[n](v));
1081
+ }
1082
+ catch (e) {
1083
+ settle(q[0][3], e);
1084
+ } }
1085
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
1086
+ function fulfill(value) { resume("next", value); }
1087
+ function reject(value) { resume("throw", value); }
1088
+ function settle(f, v) { if (f(v), q.shift(), q.length)
1089
+ resume(q[0][0], q[0][1]); }
1090
+ }
1091
+ function __asyncDelegator(o) {
1092
+ var i, p;
1093
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
1094
+ 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; }
1095
+ }
1096
+ function __asyncValues(o) {
1097
+ if (!Symbol.asyncIterator)
1098
+ throw new TypeError("Symbol.asyncIterator is not defined.");
1099
+ var m = o[Symbol.asyncIterator], i;
1100
+ 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);
1101
+ 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); }); }; }
1102
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
1103
+ }
1104
+ function __makeTemplateObject(cooked, raw) {
1105
+ if (Object.defineProperty) {
1106
+ Object.defineProperty(cooked, "raw", { value: raw });
1107
+ }
1108
+ else {
1109
+ cooked.raw = raw;
1110
+ }
1111
+ return cooked;
1112
+ }
1113
+ ;
1114
+ var __setModuleDefault = Object.create ? (function (o, v) {
1115
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
1116
+ }) : function (o, v) {
1117
+ o["default"] = v;
1118
+ };
1119
+ function __importStar(mod) {
1120
+ if (mod && mod.__esModule)
1121
+ return mod;
1122
+ var result = {};
1123
+ if (mod != null)
1124
+ for (var k in mod)
1125
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
1126
+ __createBinding(result, mod, k);
1127
+ __setModuleDefault(result, mod);
1128
+ return result;
1129
+ }
1130
+ function __importDefault(mod) {
1131
+ return (mod && mod.__esModule) ? mod : { default: mod };
1132
+ }
1133
+ function __classPrivateFieldGet(receiver, state, kind, f) {
1134
+ if (kind === "a" && !f)
1135
+ throw new TypeError("Private accessor was defined without a getter");
1136
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
1137
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
1138
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
1139
+ }
1140
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
1141
+ if (kind === "m")
1142
+ throw new TypeError("Private method is not writable");
1143
+ if (kind === "a" && !f)
1144
+ throw new TypeError("Private accessor was defined without a setter");
1145
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
1146
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
1147
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
1119
1148
  }
1120
1149
 
1121
- function ordinalNumber(value) {
1122
- value = String(value);
1123
- var index = value.match(templateObject_1 || (templateObject_1 = __makeTemplateObject(["1?.$"], ["1?.$"])));
1124
- var endings = [, 'st', 'nd', 'rd'];
1125
- var ending = endings[index] || 'th';
1126
- return value + ending;
1127
- }
1150
+ function ordinalNumber(value) {
1151
+ value = String(value);
1152
+ var index = value.match(templateObject_1 || (templateObject_1 = __makeTemplateObject(["1?.$"], ["1?.$"])));
1153
+ var endings = [, 'st', 'nd', 'rd'];
1154
+ var ending = endings[index] || 'th';
1155
+ return value + ending;
1156
+ }
1128
1157
  var templateObject_1;
1129
1158
 
1130
- var FsFormatOrdinalNumberPipe = /** @class */ (function () {
1131
- function FsFormatOrdinalNumberPipe() {
1132
- }
1133
- FsFormatOrdinalNumberPipe.prototype.transform = function (value) {
1134
- return ordinalNumber(value);
1135
- };
1136
- return FsFormatOrdinalNumberPipe;
1137
- }());
1138
- FsFormatOrdinalNumberPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatOrdinalNumberPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1139
- FsFormatOrdinalNumberPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatOrdinalNumberPipe, name: "fsFormatOrdinalNumber" });
1140
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatOrdinalNumberPipe, decorators: [{
1141
- type: i0.Pipe,
1142
- args: [{
1143
- name: 'fsFormatOrdinalNumber',
1144
- }]
1159
+ var FsFormatOrdinalNumberPipe = /** @class */ (function () {
1160
+ function FsFormatOrdinalNumberPipe() {
1161
+ }
1162
+ FsFormatOrdinalNumberPipe.prototype.transform = function (value) {
1163
+ return ordinalNumber(value);
1164
+ };
1165
+ return FsFormatOrdinalNumberPipe;
1166
+ }());
1167
+ FsFormatOrdinalNumberPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatOrdinalNumberPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1168
+ FsFormatOrdinalNumberPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatOrdinalNumberPipe, name: "fsFormatOrdinalNumber" });
1169
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatOrdinalNumberPipe, decorators: [{
1170
+ type: i0.Pipe,
1171
+ args: [{
1172
+ name: 'fsFormatOrdinalNumber',
1173
+ }]
1174
+ }] });
1175
+
1176
+ var FsCommonModule = /** @class */ (function () {
1177
+ function FsCommonModule() {
1178
+ }
1179
+ FsCommonModule.forRoot = function () {
1180
+ return {
1181
+ ngModule: FsCommonModule,
1182
+ providers: [
1183
+ FsArray,
1184
+ FsMath,
1185
+ FsUtil,
1186
+ FsValidate
1187
+ ]
1188
+ };
1189
+ };
1190
+ return FsCommonModule;
1191
+ }());
1192
+ FsCommonModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsCommonModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1193
+ FsCommonModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsCommonModule, declarations: [FsStopPropagationDirective,
1194
+ FsPreventDefaultDirective,
1195
+ FsAutofocusDirective,
1196
+ FsUtilGuidPipe,
1197
+ FsUtilIsEmptyPipe,
1198
+ FsUtilIsNotEmptyPipe,
1199
+ FsUtilStringifyPipe,
1200
+ FsFormatNumberPipe,
1201
+ FsFormatCurrencyPipe,
1202
+ FsFormatTruncatePipe,
1203
+ FsFormatBytesPipe,
1204
+ FsFormatOrdinalNumberPipe], imports: [common.CommonModule], exports: [FsStopPropagationDirective,
1205
+ FsPreventDefaultDirective,
1206
+ FsAutofocusDirective,
1207
+ FsUtilGuidPipe,
1208
+ FsUtilStringifyPipe,
1209
+ FsFormatNumberPipe,
1210
+ FsFormatCurrencyPipe,
1211
+ FsFormatTruncatePipe,
1212
+ FsUtilIsEmptyPipe,
1213
+ FsUtilIsNotEmptyPipe,
1214
+ FsFormatBytesPipe,
1215
+ FsFormatOrdinalNumberPipe] });
1216
+ FsCommonModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsCommonModule, imports: [[
1217
+ common.CommonModule,
1218
+ ]] });
1219
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsCommonModule, decorators: [{
1220
+ type: i0.NgModule,
1221
+ args: [{
1222
+ imports: [
1223
+ common.CommonModule,
1224
+ ],
1225
+ exports: [
1226
+ FsStopPropagationDirective,
1227
+ FsPreventDefaultDirective,
1228
+ FsAutofocusDirective,
1229
+ FsUtilGuidPipe,
1230
+ FsUtilStringifyPipe,
1231
+ FsFormatNumberPipe,
1232
+ FsFormatCurrencyPipe,
1233
+ FsFormatTruncatePipe,
1234
+ FsUtilIsEmptyPipe,
1235
+ FsUtilIsNotEmptyPipe,
1236
+ FsFormatBytesPipe,
1237
+ FsFormatOrdinalNumberPipe,
1238
+ ],
1239
+ declarations: [
1240
+ FsStopPropagationDirective,
1241
+ FsPreventDefaultDirective,
1242
+ FsAutofocusDirective,
1243
+ FsUtilGuidPipe,
1244
+ FsUtilIsEmptyPipe,
1245
+ FsUtilIsNotEmptyPipe,
1246
+ FsUtilStringifyPipe,
1247
+ FsFormatNumberPipe,
1248
+ FsFormatCurrencyPipe,
1249
+ FsFormatTruncatePipe,
1250
+ FsFormatBytesPipe,
1251
+ FsFormatOrdinalNumberPipe,
1252
+ ],
1253
+ }]
1145
1254
  }] });
1146
1255
 
1147
- function email(value) {
1148
- return !!String(value).match(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);
1256
+ function email(value) {
1257
+ return !!String(value).match(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);
1149
1258
  }
1150
1259
 
1151
- function phone(value) {
1152
- var valid = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4}/.test(value);
1153
- return valid || !String(value).length;
1260
+ function phone(value) {
1261
+ var valid = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4}/.test(value);
1262
+ return valid || !String(value).length;
1154
1263
  }
1155
1264
 
1156
- /**
1157
- * Check validity of the url.
1158
- * Protocol (http/https) isn't required.
1159
- * @param value
1160
- * @returns {boolean}
1161
- */
1162
- function url(value) {
1163
- var expression = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#%[\]@!\$&'\(\)\*\+,;=.]+$/gm;
1164
- var regexp = new RegExp(expression);
1165
- return !!String(value).match(regexp);
1265
+ /**
1266
+ * Check validity of the url.
1267
+ * Protocol (http/https) isn't required.
1268
+ * @param value
1269
+ * @returns {boolean}
1270
+ */
1271
+ function url(value) {
1272
+ var expression = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#%[\]@!\$&'\(\)\*\+,;=.]+$/gm;
1273
+ var regexp = new RegExp(expression);
1274
+ return !!String(value).match(regexp);
1166
1275
  }
1167
1276
 
1168
- function compare(query, item) {
1169
- var value = true;
1170
- for (var key in query) {
1171
- value = value && item[key] == query[key];
1172
- }
1173
- return value;
1277
+ function compare(query, item) {
1278
+ var value = true;
1279
+ for (var key in query) {
1280
+ value = value && item[key] == query[key];
1281
+ }
1282
+ return value;
1174
1283
  }
1175
1284
 
1176
- function filter(array, query) {
1177
- if (typeof query !== 'function') {
1178
- var queryObj_1 = query;
1179
- query = function (item) {
1180
- return compare(queryObj_1, item);
1181
- };
1182
- }
1183
- var isarray = Array.isArray(array);
1184
- var list = isarray ? [] : {};
1185
- if (isarray) {
1186
- array.forEach(function (item, idx) {
1187
- if (query(item)) {
1188
- list.push(item);
1189
- }
1190
- });
1191
- }
1192
- else {
1193
- Object.keys(array).forEach(function (key) {
1194
- if (query(array[key])) {
1195
- list[key] = array[key];
1196
- }
1197
- });
1198
- }
1199
- return list;
1285
+ function filter(array, query) {
1286
+ if (typeof query !== 'function') {
1287
+ var queryObj_1 = query;
1288
+ query = function (item) {
1289
+ return compare(queryObj_1, item);
1290
+ };
1291
+ }
1292
+ var isarray = Array.isArray(array);
1293
+ var list = isarray ? [] : {};
1294
+ if (isarray) {
1295
+ array.forEach(function (item, idx) {
1296
+ if (query(item)) {
1297
+ list.push(item);
1298
+ }
1299
+ });
1300
+ }
1301
+ else {
1302
+ Object.keys(array).forEach(function (key) {
1303
+ if (query(array[key])) {
1304
+ list[key] = array[key];
1305
+ }
1306
+ });
1307
+ }
1308
+ return list;
1200
1309
  }
1201
1310
 
1202
- function inArray(values, array) {
1203
- if (!Array.isArray(values)) {
1204
- values = [values];
1205
- }
1206
- for (var i = 0, len = values.length; i < len; i++) {
1207
- if (array.indexOf(values[i]) >= 0) {
1208
- return true;
1209
- }
1210
- }
1211
- return false;
1311
+ function inArray(values, array) {
1312
+ if (!Array.isArray(values)) {
1313
+ values = [values];
1314
+ }
1315
+ for (var i = 0, len = values.length; i < len; i++) {
1316
+ if (array.indexOf(values[i]) >= 0) {
1317
+ return true;
1318
+ }
1319
+ }
1320
+ return false;
1212
1321
  }
1213
1322
 
1214
- function index(array, name, value) {
1215
- if (value === void 0) { value = null; }
1216
- var list = {};
1217
- array.forEach(function (item) {
1218
- list[item[name]] = value ? item[value] : item;
1219
- });
1220
- return list;
1323
+ function index(array, name, value) {
1324
+ if (value === void 0) { value = null; }
1325
+ var list = {};
1326
+ array.forEach(function (item) {
1327
+ list[item[name]] = value ? item[value] : item;
1328
+ });
1329
+ return list;
1221
1330
  }
1222
1331
 
1223
- function indexOf(array, query) {
1224
- if (typeof query !== 'function') {
1225
- var queryObj_1 = query;
1226
- query = function (item) {
1227
- return compare(queryObj_1, item);
1228
- };
1229
- }
1230
- for (var i = 0, len = array.length; i < len; i++) {
1231
- if (query(array[i])) {
1232
- return i;
1233
- }
1234
- }
1235
- return -1;
1332
+ function indexOf(array, query) {
1333
+ if (typeof query !== 'function') {
1334
+ var queryObj_1 = query;
1335
+ query = function (item) {
1336
+ return compare(queryObj_1, item);
1337
+ };
1338
+ }
1339
+ for (var i = 0, len = array.length; i < len; i++) {
1340
+ if (query(array[i])) {
1341
+ return i;
1342
+ }
1343
+ }
1344
+ return -1;
1236
1345
  }
1237
1346
 
1238
- function keyExists(array, key) {
1239
- return array.hasOwnProperty(key);
1347
+ function keyExists(array, key) {
1348
+ return array.hasOwnProperty(key);
1240
1349
  }
1241
1350
 
1242
- function ksort(unordered) {
1243
- Object.keys(unordered).sort().forEach(function (key) {
1244
- var value = unordered[key];
1245
- delete unordered[key];
1246
- unordered[key] = value;
1247
- });
1351
+ function ksort(unordered) {
1352
+ Object.keys(unordered).sort().forEach(function (key) {
1353
+ var value = unordered[key];
1354
+ delete unordered[key];
1355
+ unordered[key] = value;
1356
+ });
1248
1357
  }
1249
1358
 
1250
- function list(array, property, index) {
1251
- if (index === void 0) { index = null; }
1252
- var resultList = index ? {} : [];
1253
- array.forEach(function (item, idx) {
1254
- if (index) {
1255
- resultList[item[index]] = item[property];
1256
- }
1257
- else {
1258
- resultList.push(item[property]);
1259
- }
1260
- });
1261
- return resultList;
1359
+ function list(array, property, index) {
1360
+ if (index === void 0) { index = null; }
1361
+ var resultList = index ? {} : [];
1362
+ array.forEach(function (item, idx) {
1363
+ if (index) {
1364
+ resultList[item[index]] = item[property];
1365
+ }
1366
+ else {
1367
+ resultList.push(item[property]);
1368
+ }
1369
+ });
1370
+ return resultList;
1262
1371
  }
1263
1372
 
1264
- function nameValue(array, name, value) {
1265
- var list = [];
1266
- if (name || value) {
1267
- var nameFn_1 = typeof name === 'function' ? name : function (item) {
1268
- return item[name];
1269
- };
1270
- var valueFn_1 = typeof value === 'function' ? value : function (item) {
1271
- return item[value];
1272
- };
1273
- array.forEach(function (item) {
1274
- list.push({ name: nameFn_1(item), value: valueFn_1(item) });
1275
- });
1276
- }
1277
- else {
1278
- array.forEach(function (n, v) {
1279
- list.push({ name: n, value: v });
1280
- });
1281
- }
1282
- return list;
1373
+ function nameValue(array, name, value) {
1374
+ var list = [];
1375
+ if (name || value) {
1376
+ var nameFn_1 = typeof name === 'function' ? name : function (item) {
1377
+ return item[name];
1378
+ };
1379
+ var valueFn_1 = typeof value === 'function' ? value : function (item) {
1380
+ return item[value];
1381
+ };
1382
+ array.forEach(function (item) {
1383
+ list.push({ name: nameFn_1(item), value: valueFn_1(item) });
1384
+ });
1385
+ }
1386
+ else {
1387
+ array.forEach(function (n, v) {
1388
+ list.push({ name: n, value: v });
1389
+ });
1390
+ }
1391
+ return list;
1283
1392
  }
1284
1393
 
1285
- function remove(array, query) {
1286
- var idx = indexOf(array, query);
1287
- if (idx >= 0) {
1288
- return array.splice(idx, 1);
1289
- }
1290
- return idx;
1394
+ function remove(array, query) {
1395
+ var idx = indexOf(array, query);
1396
+ if (idx >= 0) {
1397
+ return array.splice(idx, 1);
1398
+ }
1399
+ return idx;
1291
1400
  }
1292
1401
 
1293
- function sort(array, query, reverse) {
1294
- if (reverse === void 0) { reverse = false; }
1295
- if (typeof query !== 'function') {
1296
- var queryStr_1 = query;
1297
- query = function (a, b) {
1298
- if (reverse) {
1299
- if (a[queryStr_1] < b[queryStr_1]) {
1300
- return 1;
1301
- }
1302
- else if (a[queryStr_1] > b[queryStr_1]) {
1303
- return -1;
1304
- }
1305
- }
1306
- else {
1307
- if (a[queryStr_1] > b[queryStr_1]) {
1308
- return 1;
1309
- }
1310
- else if (a[queryStr_1] < b[queryStr_1]) {
1311
- return -1;
1312
- }
1313
- }
1314
- return 0;
1315
- };
1316
- }
1317
- array.sort(query);
1318
- return array;
1402
+ function sort(array, query, reverse) {
1403
+ if (reverse === void 0) { reverse = false; }
1404
+ if (typeof query !== 'function') {
1405
+ var queryStr_1 = query;
1406
+ query = function (a, b) {
1407
+ if (reverse) {
1408
+ if (a[queryStr_1] < b[queryStr_1]) {
1409
+ return 1;
1410
+ }
1411
+ else if (a[queryStr_1] > b[queryStr_1]) {
1412
+ return -1;
1413
+ }
1414
+ }
1415
+ else {
1416
+ if (a[queryStr_1] > b[queryStr_1]) {
1417
+ return 1;
1418
+ }
1419
+ else if (a[queryStr_1] < b[queryStr_1]) {
1420
+ return -1;
1421
+ }
1422
+ }
1423
+ return 0;
1424
+ };
1425
+ }
1426
+ array.sort(query);
1427
+ return array;
1319
1428
  }
1320
1429
 
1321
- function rsort(array, query) {
1322
- return sort(array, query, true);
1430
+ function rsort(array, query) {
1431
+ return sort(array, query, true);
1323
1432
  }
1324
1433
 
1325
- function find(array, query) {
1326
- var data = filter(array, query);
1327
- return data.length ? data[0] : null;
1434
+ function find(array, query) {
1435
+ var data = filter(array, query);
1436
+ return data.length ? data[0] : null;
1328
1437
  }
1329
1438
 
1330
- function boolean(value) {
1331
- return String(value).toLowerCase() !== 'false' && !!value;
1439
+ function boolean(value) {
1440
+ return String(value).toLowerCase() !== 'false' && !!value;
1332
1441
  }
1333
1442
 
1334
- function debounce(func, wait, immediate) {
1335
- var timeout;
1336
- return function () {
1337
- var context = this, args = arguments;
1338
- var later = function () {
1339
- timeout = null;
1340
- if (!immediate)
1341
- func.apply(context, args);
1342
- };
1343
- var callNow = immediate && !timeout;
1344
- clearTimeout(timeout);
1345
- timeout = setTimeout(later, wait);
1346
- if (callNow)
1347
- func.apply(context, args);
1348
- };
1443
+ function debounce(func, wait, immediate) {
1444
+ var timeout;
1445
+ return function () {
1446
+ var context = this, args = arguments;
1447
+ var later = function () {
1448
+ timeout = null;
1449
+ if (!immediate)
1450
+ func.apply(context, args);
1451
+ };
1452
+ var callNow = immediate && !timeout;
1453
+ clearTimeout(timeout);
1454
+ timeout = setTimeout(later, wait);
1455
+ if (callNow)
1456
+ func.apply(context, args);
1457
+ };
1349
1458
  }
1350
1459
 
1351
- var KEY_CANCEL = 3;
1352
- var KEY_HELP = 6;
1353
- var KEY_BACKSPACE = 8;
1354
- var KEY_TAB = 9;
1355
- var KEY_CLEAR = 12;
1356
- var KEY_RETURN = 13;
1357
- var KEY_ENTER = 14;
1358
- var KEY_SHIFT = 16;
1359
- var KEY_CONTROL = 17;
1360
- var KEY_ALT = 18;
1361
- var KEY_PAUSE = 19;
1362
- var KEY_CAPS_LOCK = 20;
1363
- var KEY_ESCAPE = 27;
1364
- var KEY_SPACE = 32;
1365
- var KEY_PAGE_UP = 33;
1366
- var KEY_PAGE_DOWN = 34;
1367
- var KEY_END = 35;
1368
- var KEY_HOME = 36;
1369
- var KEY_LEFT = 37;
1370
- var KEY_UP = 38;
1371
- var KEY_RIGHT = 39;
1372
- var KEY_DOWN = 40;
1373
- var KEY_PRINTSCREEN = 44;
1374
- var KEY_INSERT = 45;
1375
- var KEY_DELETE = 46;
1376
- var KEY_0 = 48;
1377
- var KEY_1 = 49;
1378
- var KEY_2 = 50;
1379
- var KEY_3 = 51;
1380
- var KEY_4 = 52;
1381
- var KEY_5 = 53;
1382
- var KEY_6 = 54;
1383
- var KEY_7 = 55;
1384
- var KEY_8 = 56;
1385
- var KEY_9 = 57;
1386
- var KEY_SEMICOLON = 59;
1460
+ var KEY_CANCEL = 3;
1461
+ var KEY_HELP = 6;
1462
+ var KEY_BACKSPACE = 8;
1463
+ var KEY_TAB = 9;
1464
+ var KEY_CLEAR = 12;
1465
+ var KEY_RETURN = 13;
1466
+ var KEY_ENTER = 14;
1467
+ var KEY_SHIFT = 16;
1468
+ var KEY_CONTROL = 17;
1469
+ var KEY_ALT = 18;
1470
+ var KEY_PAUSE = 19;
1471
+ var KEY_CAPS_LOCK = 20;
1472
+ var KEY_ESCAPE = 27;
1473
+ var KEY_SPACE = 32;
1474
+ var KEY_PAGE_UP = 33;
1475
+ var KEY_PAGE_DOWN = 34;
1476
+ var KEY_END = 35;
1477
+ var KEY_HOME = 36;
1478
+ var KEY_LEFT = 37;
1479
+ var KEY_UP = 38;
1480
+ var KEY_RIGHT = 39;
1481
+ var KEY_DOWN = 40;
1482
+ var KEY_PRINTSCREEN = 44;
1483
+ var KEY_INSERT = 45;
1484
+ var KEY_DELETE = 46;
1485
+ var KEY_0 = 48;
1486
+ var KEY_1 = 49;
1487
+ var KEY_2 = 50;
1488
+ var KEY_3 = 51;
1489
+ var KEY_4 = 52;
1490
+ var KEY_5 = 53;
1491
+ var KEY_6 = 54;
1492
+ var KEY_7 = 55;
1493
+ var KEY_8 = 56;
1494
+ var KEY_9 = 57;
1495
+ var KEY_SEMICOLON = 59;
1387
1496
  var KEY_EQUALS = 61;
1388
1497
 
1389
- function length(object) {
1390
- if (Array.isArray(object)) {
1391
- return object.length;
1392
- }
1393
- if (object instanceof Object) {
1394
- return Object.keys(object).length;
1395
- }
1396
- return 0;
1498
+ function length(object) {
1499
+ if (Array.isArray(object)) {
1500
+ return object.length;
1501
+ }
1502
+ if (object instanceof Object) {
1503
+ return Object.keys(object).length;
1504
+ }
1505
+ return 0;
1397
1506
  }
1398
1507
 
1399
- function resolve(promise, defaults) {
1400
- if (defaults === void 0) { defaults = []; }
1401
- var result = defaults;
1402
- return new Promise(function (resolve) {
1403
- promise.then(function (data) {
1404
- Object.keys(data).forEach(function (key) { return result[key] = data[key]; });
1405
- resolve(result);
1406
- });
1407
- });
1508
+ function resolve(promise, defaults) {
1509
+ if (defaults === void 0) { defaults = []; }
1510
+ var result = defaults;
1511
+ return new Promise(function (resolve) {
1512
+ promise.then(function (data) {
1513
+ Object.keys(data).forEach(function (key) { return result[key] = data[key]; });
1514
+ resolve(result);
1515
+ });
1516
+ });
1408
1517
  }
1409
1518
 
1410
- function uuid() {
1411
- return guid('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
1519
+ function uuid() {
1520
+ return guid('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
1412
1521
  }
1413
1522
 
1414
- function value(object, key, def) {
1415
- if (typeof object === 'object' || Array.isArray(object)) {
1416
- if (object.hasOwnProperty(key)) {
1417
- return object[key];
1418
- }
1419
- }
1420
- return def;
1523
+ function value(object, key, def) {
1524
+ if (typeof object === 'object' || Array.isArray(object)) {
1525
+ if (object.hasOwnProperty(key)) {
1526
+ return object[key];
1527
+ }
1528
+ }
1529
+ return def;
1421
1530
  }
1422
1531
 
1423
- function isClass(value, cls) {
1424
- if (typeof value === 'object') {
1425
- if (typeof cls === 'string') {
1426
- if (value.constructor) {
1427
- if (value.constructor.name === cls) {
1428
- return true;
1429
- }
1430
- }
1431
- }
1432
- else {
1433
- if (value instanceof cls) {
1434
- return true;
1435
- }
1436
- }
1437
- }
1438
- return false;
1532
+ function isClass(value, cls) {
1533
+ if (typeof value === 'object') {
1534
+ if (typeof cls === 'string') {
1535
+ if (value.constructor) {
1536
+ if (value.constructor.name === cls) {
1537
+ return true;
1538
+ }
1539
+ }
1540
+ }
1541
+ else {
1542
+ if (value instanceof cls) {
1543
+ return true;
1544
+ }
1545
+ }
1546
+ }
1547
+ return false;
1439
1548
  }
1440
1549
 
1441
- function isNumeric(value) {
1442
- var str = String(value);
1443
- return str.length && !!str.match(/^-?\d*\.?\d*$/);
1550
+ function isNumeric(value) {
1551
+ var str = String(value);
1552
+ return str.length && !!str.match(/^-?\d*\.?\d*$/);
1444
1553
  }
1445
1554
 
1446
- function throttle(func, wait) {
1447
- var waiting = false; // Initially, we're not waiting
1448
- return function () {
1449
- if (!waiting) { // If we're not waiting
1450
- func.apply(null, arguments); // Execute users function
1451
- waiting = true; // Prevent future invocations
1452
- setTimeout(function () {
1453
- waiting = false; // And allow future invocations
1454
- }, wait);
1455
- }
1456
- };
1555
+ function throttle(func, wait) {
1556
+ var waiting = false; // Initially, we're not waiting
1557
+ return function () {
1558
+ if (!waiting) { // If we're not waiting
1559
+ func.apply(null, arguments); // Execute users function
1560
+ waiting = true; // Prevent future invocations
1561
+ setTimeout(function () {
1562
+ waiting = false; // And allow future invocations
1563
+ }, wait);
1564
+ }
1565
+ };
1457
1566
  }
1458
1567
 
1459
- var Operation = /** @class */ (function () {
1460
- function Operation(target, name) {
1461
- this.ready$ = new rxjs.Subject();
1462
- this.name = name ? name : guid();
1463
- if (target instanceof rxjs.Observable) {
1464
- this.target = target;
1465
- }
1466
- else {
1467
- this.target = rxjs.of(target);
1468
- }
1469
- }
1470
- return Operation;
1568
+ var Operation = /** @class */ (function () {
1569
+ function Operation(target, name) {
1570
+ this.ready$ = new rxjs.Subject();
1571
+ this.name = name ? name : guid();
1572
+ if (target instanceof rxjs.Observable) {
1573
+ this.target = target;
1574
+ }
1575
+ else {
1576
+ this.target = rxjs.of(target);
1577
+ }
1578
+ }
1579
+ return Operation;
1471
1580
  }());
1472
1581
 
1473
- exports.QueueState = void 0;
1474
- (function (QueueState) {
1475
- QueueState["Idle"] = "idle";
1476
- QueueState["Processing"] = "processing";
1582
+ exports.QueueState = void 0;
1583
+ (function (QueueState) {
1584
+ QueueState["Idle"] = "idle";
1585
+ QueueState["Processing"] = "processing";
1477
1586
  })(exports.QueueState || (exports.QueueState = {}));
1478
1587
 
1479
- var Queue = /** @class */ (function () {
1480
- function Queue(_limit) {
1481
- if (_limit === void 0) { _limit = Infinity; }
1482
- this._limit = _limit;
1483
- this._done = new rxjs.Subject();
1484
- this._queue = [];
1485
- this._inProgress = [];
1486
- this._total = 0;
1487
- this._completed = 0;
1488
- this._errors = 0;
1489
- this._state = exports.QueueState.Idle;
1490
- this._destroy$ = new rxjs.Subject();
1491
- }
1492
- Object.defineProperty(Queue.prototype, "total", {
1493
- get: function () {
1494
- return this._total;
1495
- },
1496
- enumerable: false,
1497
- configurable: true
1498
- });
1499
- Object.defineProperty(Queue.prototype, "completed", {
1500
- get: function () {
1501
- return this._completed;
1502
- },
1503
- enumerable: false,
1504
- configurable: true
1505
- });
1506
- Object.defineProperty(Queue.prototype, "pending", {
1507
- get: function () {
1508
- return this._queue.length;
1509
- },
1510
- enumerable: false,
1511
- configurable: true
1512
- });
1513
- Object.defineProperty(Queue.prototype, "inProgress", {
1514
- get: function () {
1515
- return this._inProgress.length;
1516
- },
1517
- enumerable: false,
1518
- configurable: true
1519
- });
1520
- Object.defineProperty(Queue.prototype, "errors", {
1521
- get: function () {
1522
- return this._errors;
1523
- },
1524
- enumerable: false,
1525
- configurable: true
1526
- });
1527
- Object.defineProperty(Queue.prototype, "state", {
1528
- get: function () {
1529
- return this._state;
1530
- },
1531
- enumerable: false,
1532
- configurable: true
1533
- });
1534
- Object.defineProperty(Queue.prototype, "empty", {
1535
- get: function () {
1536
- return !this._queue.length && !this._inProgress.length;
1537
- },
1538
- enumerable: false,
1539
- configurable: true
1540
- });
1541
- Object.defineProperty(Queue.prototype, "pendingOperations", {
1542
- get: function () {
1543
- return this._queue
1544
- .map(function (operation) { return operation.name; });
1545
- },
1546
- enumerable: false,
1547
- configurable: true
1548
- });
1549
- Object.defineProperty(Queue.prototype, "inProgressOperations", {
1550
- get: function () {
1551
- return this._inProgress
1552
- .map(function (operation) { return operation.name; });
1553
- },
1554
- enumerable: false,
1555
- configurable: true
1556
- });
1557
- Queue.prototype.isProcessing = function () {
1558
- return this._state === exports.QueueState.Processing;
1559
- };
1560
- Queue.prototype.isIdle = function () {
1561
- return this._state === exports.QueueState.Idle;
1562
- };
1563
- Queue.prototype.setLimit = function (value) {
1564
- this._limit = value;
1565
- };
1566
- Queue.prototype.subscribe = function (fun, err, complete) {
1567
- this._done
1568
- .pipe(operators.takeUntil(this._destroy$))
1569
- .subscribe(fun, err, complete);
1570
- };
1571
- Queue.prototype.complete = function (fun, err, complete) {
1572
- var _this = this;
1573
- rxjs.Observable.create(function (observer) {
1574
- if (!_this.isProcessing()) {
1575
- observer.next();
1576
- observer.complete();
1577
- return;
1578
- }
1579
- _this.subscribe(function () {
1580
- observer.next();
1581
- observer.complete();
1582
- }, function (error) {
1583
- observer.error(error);
1584
- _this.clear();
1585
- });
1586
- }).subscribe(fun, err, complete);
1587
- };
1588
- Queue.prototype.push = function (target, name) {
1589
- var operation = new Operation(target, name);
1590
- this._total++;
1591
- this._state = exports.QueueState.Processing;
1592
- if (this._inProgress.length < this._limit) {
1593
- this._processOperation(operation);
1594
- }
1595
- else {
1596
- this._queue.push(operation);
1597
- }
1598
- return operation.ready$;
1599
- };
1600
- Queue.prototype.clear = function () {
1601
- this._queue = [];
1602
- this._total = 0;
1603
- this._errors = 0;
1604
- this._completed = 0;
1605
- this._state = exports.QueueState.Idle;
1606
- this._done = new rxjs.Subject();
1607
- };
1608
- Queue.prototype.destroy = function () {
1609
- this.clear();
1610
- this._done.complete();
1611
- };
1612
- Queue.prototype._processOperation = function (operation) {
1613
- var _this = this;
1614
- this._inProgress.push(operation);
1615
- operation.target
1616
- .pipe(operators.delay(200), // Hack to prevent extra quick proccess execution
1617
- operators.takeUntil(this._destroy$)).subscribe({
1618
- next: function (data) {
1619
- operation.ready$.next(data);
1620
- },
1621
- error: function (error) {
1622
- var opIndex = _this._inProgress.indexOf(operation);
1623
- _this._inProgress.splice(opIndex, 1);
1624
- _this._errors++;
1625
- operation.ready$.error(error);
1626
- if (_this.empty) {
1627
- _this._state = exports.QueueState.Idle;
1628
- _this._done.error(error);
1629
- }
1630
- },
1631
- complete: function () {
1632
- var opIndex = _this._inProgress.indexOf(operation);
1633
- _this._inProgress.splice(opIndex, 1);
1634
- _this._completed++;
1635
- operation.ready$.complete();
1636
- if (_this.empty) {
1637
- _this._state = exports.QueueState.Idle;
1638
- _this._done.next();
1639
- }
1640
- else {
1641
- if (_this._queue.length) {
1642
- var queueItem = _this._queue.shift();
1643
- _this._processOperation(queueItem);
1644
- }
1645
- }
1646
- }
1647
- });
1648
- };
1649
- return Queue;
1588
+ var Queue = /** @class */ (function () {
1589
+ function Queue(_limit) {
1590
+ if (_limit === void 0) { _limit = Infinity; }
1591
+ this._limit = _limit;
1592
+ this._done = new rxjs.Subject();
1593
+ this._queue = [];
1594
+ this._inProgress = [];
1595
+ this._total = 0;
1596
+ this._completed = 0;
1597
+ this._errors = 0;
1598
+ this._state = exports.QueueState.Idle;
1599
+ this._destroy$ = new rxjs.Subject();
1600
+ }
1601
+ Object.defineProperty(Queue.prototype, "total", {
1602
+ get: function () {
1603
+ return this._total;
1604
+ },
1605
+ enumerable: false,
1606
+ configurable: true
1607
+ });
1608
+ Object.defineProperty(Queue.prototype, "completed", {
1609
+ get: function () {
1610
+ return this._completed;
1611
+ },
1612
+ enumerable: false,
1613
+ configurable: true
1614
+ });
1615
+ Object.defineProperty(Queue.prototype, "pending", {
1616
+ get: function () {
1617
+ return this._queue.length;
1618
+ },
1619
+ enumerable: false,
1620
+ configurable: true
1621
+ });
1622
+ Object.defineProperty(Queue.prototype, "inProgress", {
1623
+ get: function () {
1624
+ return this._inProgress.length;
1625
+ },
1626
+ enumerable: false,
1627
+ configurable: true
1628
+ });
1629
+ Object.defineProperty(Queue.prototype, "errors", {
1630
+ get: function () {
1631
+ return this._errors;
1632
+ },
1633
+ enumerable: false,
1634
+ configurable: true
1635
+ });
1636
+ Object.defineProperty(Queue.prototype, "state", {
1637
+ get: function () {
1638
+ return this._state;
1639
+ },
1640
+ enumerable: false,
1641
+ configurable: true
1642
+ });
1643
+ Object.defineProperty(Queue.prototype, "empty", {
1644
+ get: function () {
1645
+ return !this._queue.length && !this._inProgress.length;
1646
+ },
1647
+ enumerable: false,
1648
+ configurable: true
1649
+ });
1650
+ Object.defineProperty(Queue.prototype, "pendingOperations", {
1651
+ get: function () {
1652
+ return this._queue
1653
+ .map(function (operation) { return operation.name; });
1654
+ },
1655
+ enumerable: false,
1656
+ configurable: true
1657
+ });
1658
+ Object.defineProperty(Queue.prototype, "inProgressOperations", {
1659
+ get: function () {
1660
+ return this._inProgress
1661
+ .map(function (operation) { return operation.name; });
1662
+ },
1663
+ enumerable: false,
1664
+ configurable: true
1665
+ });
1666
+ Queue.prototype.isProcessing = function () {
1667
+ return this._state === exports.QueueState.Processing;
1668
+ };
1669
+ Queue.prototype.isIdle = function () {
1670
+ return this._state === exports.QueueState.Idle;
1671
+ };
1672
+ Queue.prototype.setLimit = function (value) {
1673
+ this._limit = value;
1674
+ };
1675
+ Queue.prototype.subscribe = function (fun, err, complete) {
1676
+ this._done
1677
+ .pipe(operators.takeUntil(this._destroy$))
1678
+ .subscribe(fun, err, complete);
1679
+ };
1680
+ Queue.prototype.complete = function (fun, err, complete) {
1681
+ var _this = this;
1682
+ rxjs.Observable.create(function (observer) {
1683
+ if (!_this.isProcessing()) {
1684
+ observer.next();
1685
+ observer.complete();
1686
+ return;
1687
+ }
1688
+ _this.subscribe(function () {
1689
+ observer.next();
1690
+ observer.complete();
1691
+ }, function (error) {
1692
+ observer.error(error);
1693
+ _this.clear();
1694
+ });
1695
+ }).subscribe(fun, err, complete);
1696
+ };
1697
+ Queue.prototype.push = function (target, name) {
1698
+ var operation = new Operation(target, name);
1699
+ this._total++;
1700
+ this._state = exports.QueueState.Processing;
1701
+ if (this._inProgress.length < this._limit) {
1702
+ this._processOperation(operation);
1703
+ }
1704
+ else {
1705
+ this._queue.push(operation);
1706
+ }
1707
+ return operation.ready$;
1708
+ };
1709
+ Queue.prototype.clear = function () {
1710
+ this._queue = [];
1711
+ this._total = 0;
1712
+ this._errors = 0;
1713
+ this._completed = 0;
1714
+ this._state = exports.QueueState.Idle;
1715
+ this._done = new rxjs.Subject();
1716
+ };
1717
+ Queue.prototype.destroy = function () {
1718
+ this.clear();
1719
+ this._done.complete();
1720
+ };
1721
+ Queue.prototype._processOperation = function (operation) {
1722
+ var _this = this;
1723
+ this._inProgress.push(operation);
1724
+ operation.target
1725
+ .pipe(operators.delay(200), // Hack to prevent extra quick proccess execution
1726
+ operators.takeUntil(this._destroy$)).subscribe({
1727
+ next: function (data) {
1728
+ operation.ready$.next(data);
1729
+ },
1730
+ error: function (error) {
1731
+ var opIndex = _this._inProgress.indexOf(operation);
1732
+ _this._inProgress.splice(opIndex, 1);
1733
+ _this._errors++;
1734
+ operation.ready$.error(error);
1735
+ if (_this.empty) {
1736
+ _this._state = exports.QueueState.Idle;
1737
+ _this._done.error(error);
1738
+ }
1739
+ },
1740
+ complete: function () {
1741
+ var opIndex = _this._inProgress.indexOf(operation);
1742
+ _this._inProgress.splice(opIndex, 1);
1743
+ _this._completed++;
1744
+ operation.ready$.complete();
1745
+ if (_this.empty) {
1746
+ _this._state = exports.QueueState.Idle;
1747
+ _this._done.next();
1748
+ }
1749
+ else {
1750
+ if (_this._queue.length) {
1751
+ var queueItem = _this._queue.shift();
1752
+ _this._processOperation(queueItem);
1753
+ }
1754
+ }
1755
+ }
1756
+ });
1757
+ };
1758
+ return Queue;
1650
1759
  }());
1651
1760
 
1652
- function removeQueryParams(path) {
1653
- return path.split('?')[0];
1761
+ function removeQueryParams(path) {
1762
+ return path.split('?')[0];
1654
1763
  }
1655
1764
 
1656
- function getNormalizedPath(locationSrv) {
1657
- var path = locationSrv.prepareExternalUrl(locationSrv.path());
1658
- return removeQueryParams(path);
1765
+ function getNormalizedPath(locationSrv) {
1766
+ var path = locationSrv.prepareExternalUrl(locationSrv.path());
1767
+ return removeQueryParams(path);
1659
1768
  }
1660
1769
 
1661
- function round(num, decimalPlaces) {
1662
- if (decimalPlaces === void 0) { decimalPlaces = 0; }
1663
- var p = Math.pow(10, decimalPlaces);
1664
- return Math.round(num * p) / p;
1770
+ function round(num, decimalPlaces) {
1771
+ if (decimalPlaces === void 0) { decimalPlaces = 0; }
1772
+ var p = Math.pow(10, decimalPlaces);
1773
+ return Math.round(num * p) / p;
1665
1774
  }
1666
1775
 
1667
- function clone(obj) {
1668
- if (obj instanceof Date) {
1669
- return new Date(obj);
1670
- }
1671
- else if (Array.isArray(obj)) {
1672
- var arr = [];
1673
- for (var i = 0; i < obj.length; i++) {
1674
- arr[i] = clone(obj[i]);
1675
- }
1676
- return arr;
1677
- }
1678
- else if (typeof (obj) === 'object') {
1679
- var cloned = {};
1680
- for (var key in obj) {
1681
- cloned[key] = clone(obj[key]);
1682
- }
1683
- return cloned;
1684
- }
1685
- return obj;
1776
+ function clone(obj) {
1777
+ if (obj instanceof Date) {
1778
+ return new Date(obj);
1779
+ }
1780
+ else if (Array.isArray(obj)) {
1781
+ var arr = [];
1782
+ for (var i = 0; i < obj.length; i++) {
1783
+ arr[i] = clone(obj[i]);
1784
+ }
1785
+ return arr;
1786
+ }
1787
+ else if (typeof (obj) === 'object') {
1788
+ var cloned = {};
1789
+ for (var key in obj) {
1790
+ cloned[key] = clone(obj[key]);
1791
+ }
1792
+ return cloned;
1793
+ }
1794
+ return obj;
1686
1795
  }
1687
1796
 
1688
- function isArrayEqual(arr1, arr2) {
1689
- if (!Array.isArray(arr1) || !Array.isArray(arr2) || arr1.length !== arr2.length) {
1690
- return false;
1691
- }
1692
- var sortFn = function (a, b) {
1693
- if (a < b) {
1694
- return -1;
1695
- }
1696
- else if (a > b) {
1697
- return 1;
1698
- }
1699
- else {
1700
- return 0;
1701
- }
1702
- };
1703
- arr1 = __spreadArray([], __read(arr1)).sort(sortFn);
1704
- arr2 = __spreadArray([], __read(arr2)).sort(sortFn);
1705
- return arr1.every(function (value, index) {
1706
- return value === arr2[index];
1707
- });
1797
+ function isArrayEqual(arr1, arr2) {
1798
+ if (!Array.isArray(arr1) || !Array.isArray(arr2) || arr1.length !== arr2.length) {
1799
+ return false;
1800
+ }
1801
+ var sortFn = function (a, b) {
1802
+ if (a < b) {
1803
+ return -1;
1804
+ }
1805
+ else if (a > b) {
1806
+ return 1;
1807
+ }
1808
+ else {
1809
+ return 0;
1810
+ }
1811
+ };
1812
+ arr1 = __spreadArray([], __read(arr1)).sort(sortFn);
1813
+ arr2 = __spreadArray([], __read(arr2)).sort(sortFn);
1814
+ return arr1.every(function (value, index) {
1815
+ return value === arr2[index];
1816
+ });
1708
1817
  }
1709
1818
 
1710
- function acronym(str, length) {
1711
- if (length === void 0) { length = 2; }
1712
- var splittedString = str
1713
- .replace(/[^a-zA-Z0-9]+/g, ' ')
1714
- .split(' ');
1715
- var result = '';
1716
- for (var i = 0; i < length; i++) {
1717
- if (!splittedString[i]) {
1718
- if (splittedString.length === 1) {
1719
- for (var j = 1; j < length; j++) {
1720
- if (!splittedString[i - 1][j]) {
1721
- break;
1722
- }
1723
- result += splittedString[i - 1][j].toUpperCase();
1724
- }
1725
- }
1726
- break;
1727
- }
1728
- result += splittedString[i][0].toUpperCase();
1729
- }
1730
- return result;
1819
+ var fsSourceLoader = (function () {
1820
+ var _document;
1821
+ var _headElement;
1822
+ var _sources = new Map();
1823
+ var _loadedResources = new Map();
1824
+ // bad way but don't want to bother developer
1825
+ setDocument(document);
1826
+ // but developer can set document at any time
1827
+ function setDocument(document) {
1828
+ _document = document;
1829
+ _headElement = _document === null || _document === void 0 ? void 0 : _document.head;
1830
+ }
1831
+ /**
1832
+ * register a list of the resources for future loading
1833
+ *
1834
+ * example:
1835
+ * sourceLoader.registerResources({
1836
+ * froala: [
1837
+ * '/assets/js/froala/froala_editor.min.js',
1838
+ * '/assets/css/froala_editor.pkgd.min.css',
1839
+ * ],
1840
+ * froala_align: '/assets/js/froala/plugins/align.min.js',
1841
+ * froala_colors: '/assets/js/froala/plugins/colors.min.js',
1842
+ * froala_image: '/assets/js/froala/plugins/image.min.js',
1843
+ * });
1844
+ *
1845
+ */
1846
+ function registerResources(resources) {
1847
+ Object.entries(resources)
1848
+ .forEach(function (_a) {
1849
+ var _b = __read(_a, 2), name = _b[0], path = _b[1];
1850
+ if (typeof path === 'string') {
1851
+ path = [path];
1852
+ }
1853
+ if (!_sources.has(name)) {
1854
+ _sources.set(name, new Set());
1855
+ }
1856
+ var resourcesList = _sources.get(name);
1857
+ path.forEach(function (p) {
1858
+ resourcesList.add(p);
1859
+ });
1860
+ });
1861
+ }
1862
+ /**
1863
+ * load any resource previously registered
1864
+ *
1865
+ * sourceLoader.loadResource('froala')
1866
+ *
1867
+ * or load any js/css file
1868
+ *
1869
+ * sourceLoader.loadResource('/assets/my-source.js')
1870
+ *
1871
+ */
1872
+ function loadResource(name) {
1873
+ if (_loadedResources.has(name)) {
1874
+ return _loadedResources.get(name);
1875
+ }
1876
+ if (_sources.has(name)) {
1877
+ var sourcesForLoading = __spreadArray([], __read(_sources.get(name))).map(function (path) {
1878
+ return _loadResource(path);
1879
+ })
1880
+ .filter(function (v) { return !!v; });
1881
+ return rxjs.combineLatest(sourcesForLoading);
1882
+ }
1883
+ return _loadResource(name);
1884
+ }
1885
+ /**
1886
+ * the same as `loadResource` but you can pass list of the resources for loading
1887
+ */
1888
+ function loadResources(listOfResources) {
1889
+ var resourcesToLoad = listOfResources
1890
+ .reduce(function (acc, name) {
1891
+ var loading$ = loadResource(name);
1892
+ if (loading$) {
1893
+ acc.push(loading$);
1894
+ }
1895
+ return acc;
1896
+ }, []);
1897
+ return rxjs.combineLatest(resourcesToLoad);
1898
+ }
1899
+ ///
1900
+ function _loadResource(path) {
1901
+ if (_isStylesUrl(path)) {
1902
+ return _loadStyles(path);
1903
+ }
1904
+ if (_isJavascriptUrl(path)) {
1905
+ return _loadJs(path);
1906
+ }
1907
+ console.warn("Resource " + path + " can not be identified and loaded");
1908
+ return null;
1909
+ }
1910
+ function _loadJs(scriptPath) {
1911
+ if (!_loadedResources.has(scriptPath)) {
1912
+ var obs$ = new rxjs.Observable(function (obs) {
1913
+ var script = document.createElement('script');
1914
+ script.src = scriptPath;
1915
+ _headElement.appendChild(script);
1916
+ script.onload = function () {
1917
+ obs.next();
1918
+ obs.complete();
1919
+ };
1920
+ script.onerror = function (err) {
1921
+ obs.error(err);
1922
+ };
1923
+ }).pipe(operators.shareReplay(1));
1924
+ _loadedResources.set(scriptPath, obs$);
1925
+ }
1926
+ return _loadedResources.get(scriptPath);
1927
+ }
1928
+ function _loadStyles(stylePath) {
1929
+ if (!_loadedResources.has(stylePath)) {
1930
+ var obs$ = new rxjs.Observable(function (obs) {
1931
+ var style = document.createElement('link');
1932
+ style.id = stylePath;
1933
+ style.rel = 'stylesheet';
1934
+ style.href = "" + stylePath;
1935
+ _headElement.appendChild(style);
1936
+ style.onload = function () {
1937
+ obs.next();
1938
+ obs.complete();
1939
+ };
1940
+ style.onerror = function (err) {
1941
+ obs.error(err);
1942
+ };
1943
+ });
1944
+ _loadedResources.set(stylePath, obs$);
1945
+ }
1946
+ return _loadedResources.get(stylePath);
1947
+ }
1948
+ function _isJavascriptUrl(url) {
1949
+ return url.endsWith('.js');
1950
+ }
1951
+ function _isStylesUrl(url) {
1952
+ return url.endsWith('.css');
1953
+ }
1954
+ return {
1955
+ setDocument: setDocument,
1956
+ registerResources: registerResources,
1957
+ loadResource: loadResource,
1958
+ loadResources: loadResources,
1959
+ };
1960
+ })();
1961
+
1962
+ function acronym(str, length) {
1963
+ if (length === void 0) { length = 2; }
1964
+ var splittedString = str
1965
+ .replace(/[^a-zA-Z0-9]+/g, ' ')
1966
+ .split(' ');
1967
+ var result = '';
1968
+ for (var i = 0; i < length; i++) {
1969
+ if (!splittedString[i]) {
1970
+ if (splittedString.length === 1) {
1971
+ for (var j = 1; j < length; j++) {
1972
+ if (!splittedString[i - 1][j]) {
1973
+ break;
1974
+ }
1975
+ result += splittedString[i - 1][j].toUpperCase();
1976
+ }
1977
+ }
1978
+ break;
1979
+ }
1980
+ result += splittedString[i][0].toUpperCase();
1981
+ }
1982
+ return result;
1731
1983
  }
1732
1984
 
1733
- function delayedRetry(delayMs, maxRetry, message) {
1734
- if (maxRetry === void 0) { maxRetry = 5; }
1735
- var retries = 0;
1736
- return function (src) { return src.pipe(operators.retryWhen(function (errors) { return errors.pipe(operators.tap(function () {
1737
- retries++;
1738
- if (retries <= maxRetry) {
1739
- console.info("Failed to load Resource. Retry in " + delayMs / 1000 + " sec. " + retries + "/" + maxRetry + " times...");
1740
- }
1741
- }), operators.concatMap(function (error) { return rxjs.iif(function () { return retries > maxRetry; }, rxjs.throwError(getErrorMessage(maxRetry, message)), rxjs.timer(delayMs)); })); })); };
1742
- }
1743
- var getErrorMessage = function (maxRetry, defaultMessage) {
1744
- if (!defaultMessage) {
1745
- return "Failed to load Resource for " + maxRetry + " times. Giving up.";
1746
- }
1747
- else {
1748
- return defaultMessage;
1749
- }
1750
- };
1751
-
1752
- function bytes(bytes, decimals, unit) {
1753
- if (!bytes) {
1754
- return '0 MB';
1755
- }
1756
- var e = typeof unit === 'string' ?
1757
- 'KMGTP'.indexOf(unit.replace('B', '')) + 1 :
1758
- Math.floor(Math.log(bytes) / Math.log(1024));
1759
- if (!isNumeric(decimals)) {
1760
- decimals = (bytes / 1024) > 1000 ? 2 : 0;
1761
- }
1762
- return ("" + (bytes / Math.pow(1024, e))
1763
- .toFixed(decimals))
1764
- .replace(/\.00/, '')
1765
- + ' '
1766
- + (e ? ' KMGTP'.charAt(e) : '') + 'B';
1985
+ function delayedRetry(delayMs, maxRetry, message) {
1986
+ if (maxRetry === void 0) { maxRetry = 5; }
1987
+ var retries = 0;
1988
+ return function (src) { return src.pipe(operators.retryWhen(function (errors) { return errors.pipe(operators.tap(function () {
1989
+ retries++;
1990
+ if (retries <= maxRetry) {
1991
+ console.info("Failed to load Resource. Retry in " + delayMs / 1000 + " sec. " + retries + "/" + maxRetry + " times...");
1992
+ }
1993
+ }), operators.concatMap(function (error) { return rxjs.iif(function () { return retries > maxRetry; }, rxjs.throwError(getErrorMessage(maxRetry, message)), rxjs.timer(delayMs)); })); })); };
1767
1994
  }
1995
+ var getErrorMessage = function (maxRetry, defaultMessage) {
1996
+ if (!defaultMessage) {
1997
+ return "Failed to load Resource for " + maxRetry + " times. Giving up.";
1998
+ }
1999
+ else {
2000
+ return defaultMessage;
2001
+ }
2002
+ };
1768
2003
 
1769
- var FsFormatBytesPipe = /** @class */ (function () {
1770
- function FsFormatBytesPipe() {
1771
- }
1772
- FsFormatBytesPipe.prototype.transform = function (value, decimals, unit) {
1773
- return bytes(value, decimals, unit);
1774
- };
1775
- return FsFormatBytesPipe;
1776
- }());
1777
- FsFormatBytesPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatBytesPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1778
- FsFormatBytesPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatBytesPipe, name: "fsFormatBytes" });
1779
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormatBytesPipe, decorators: [{
1780
- type: i0.Pipe,
1781
- args: [{
1782
- name: 'fsFormatBytes',
1783
- }]
1784
- }] });
1785
-
1786
- var FsCommonModule = /** @class */ (function () {
1787
- function FsCommonModule() {
1788
- }
1789
- FsCommonModule.forRoot = function () {
1790
- return {
1791
- ngModule: FsCommonModule,
1792
- providers: [
1793
- FsArray,
1794
- FsMath,
1795
- FsUtil,
1796
- FsValidate
1797
- ]
1798
- };
1799
- };
1800
- return FsCommonModule;
1801
- }());
1802
- FsCommonModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsCommonModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1803
- FsCommonModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsCommonModule, declarations: [FsStopPropagationDirective,
1804
- FsPreventDefaultDirective,
1805
- FsAutofocusDirective,
1806
- FsUtilGuidPipe,
1807
- FsUtilIsEmptyPipe,
1808
- FsUtilIsNotEmptyPipe,
1809
- FsUtilStringifyPipe,
1810
- FsFormatNumberPipe,
1811
- FsFormatCurrencyPipe,
1812
- FsFormatTruncatePipe,
1813
- FsFormatBytesPipe,
1814
- FsFormatOrdinalNumberPipe], imports: [common.CommonModule], exports: [FsStopPropagationDirective,
1815
- FsPreventDefaultDirective,
1816
- FsAutofocusDirective,
1817
- FsUtilGuidPipe,
1818
- FsUtilStringifyPipe,
1819
- FsFormatNumberPipe,
1820
- FsFormatCurrencyPipe,
1821
- FsFormatTruncatePipe,
1822
- FsUtilIsEmptyPipe,
1823
- FsUtilIsNotEmptyPipe,
1824
- FsFormatBytesPipe,
1825
- FsFormatOrdinalNumberPipe] });
1826
- FsCommonModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsCommonModule, imports: [[
1827
- common.CommonModule,
1828
- ]] });
1829
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsCommonModule, decorators: [{
1830
- type: i0.NgModule,
1831
- args: [{
1832
- imports: [
1833
- common.CommonModule,
1834
- ],
1835
- exports: [
1836
- FsStopPropagationDirective,
1837
- FsPreventDefaultDirective,
1838
- FsAutofocusDirective,
1839
- FsUtilGuidPipe,
1840
- FsUtilStringifyPipe,
1841
- FsFormatNumberPipe,
1842
- FsFormatCurrencyPipe,
1843
- FsFormatTruncatePipe,
1844
- FsUtilIsEmptyPipe,
1845
- FsUtilIsNotEmptyPipe,
1846
- FsFormatBytesPipe,
1847
- FsFormatOrdinalNumberPipe,
1848
- ],
1849
- declarations: [
1850
- FsStopPropagationDirective,
1851
- FsPreventDefaultDirective,
1852
- FsAutofocusDirective,
1853
- FsUtilGuidPipe,
1854
- FsUtilIsEmptyPipe,
1855
- FsUtilIsNotEmptyPipe,
1856
- FsUtilStringifyPipe,
1857
- FsFormatNumberPipe,
1858
- FsFormatCurrencyPipe,
1859
- FsFormatTruncatePipe,
1860
- FsFormatBytesPipe,
1861
- FsFormatOrdinalNumberPipe,
1862
- ],
1863
- }]
1864
- }] });
1865
-
1866
- var keyboardShortcut = function (shortcut) {
1867
- // Observables for all keydown and keyup events
1868
- var keyDown$ = rxjs.fromEvent(document, 'keydown');
1869
- var keyUp$ = rxjs.fromEvent(document, 'keyup');
1870
- // All KeyboardEvents - emitted only when KeyboardEvent changes (key or type)
1871
- var keyEvents$ = rxjs.merge(keyDown$, keyUp$).pipe(operators.distinctUntilChanged(function (a, b) { return a.code === b.code && a.type === b.type; }), operators.share());
1872
- // Create KeyboardEvent Observable for specified KeyCode
1873
- var createKeyPressStream = function (charCode) { return keyEvents$.pipe(operators.filter(function (event) { return event.keyCode === charCode; })); };
1874
- // Create Event Stream for every KeyCode in shortcut
1875
- var keyCodeEvents$ = shortcut.map(function (s) { return createKeyPressStream(s); });
1876
- // Emit when specified keys are pressed (keydown).
1877
- // Emit only when all specified keys are pressed at the same time.
1878
- // More on combineLatest below
1879
- return rxjs.combineLatest(keyCodeEvents$).pipe(operators.filter(function (arr) { return arr.every(function (a) { return a.type === 'keydown'; }); }));
2004
+ var keyboardShortcut = function (shortcut) {
2005
+ // Observables for all keydown and keyup events
2006
+ var keyDown$ = rxjs.fromEvent(document, 'keydown');
2007
+ var keyUp$ = rxjs.fromEvent(document, 'keyup');
2008
+ // All KeyboardEvents - emitted only when KeyboardEvent changes (key or type)
2009
+ var keyEvents$ = rxjs.merge(keyDown$, keyUp$).pipe(operators.distinctUntilChanged(function (a, b) { return a.code === b.code && a.type === b.type; }), operators.share());
2010
+ // Create KeyboardEvent Observable for specified KeyCode
2011
+ var createKeyPressStream = function (charCode) { return keyEvents$.pipe(operators.filter(function (event) { return event.keyCode === charCode; })); };
2012
+ // Create Event Stream for every KeyCode in shortcut
2013
+ var keyCodeEvents$ = shortcut.map(function (s) { return createKeyPressStream(s); });
2014
+ // Emit when specified keys are pressed (keydown).
2015
+ // Emit only when all specified keys are pressed at the same time.
2016
+ // More on combineLatest below
2017
+ return rxjs.combineLatest(keyCodeEvents$).pipe(operators.filter(function (arr) { return arr.every(function (a) { return a.type === 'keydown'; }); }));
1880
2018
  };
1881
2019
 
1882
- /*
1883
- * Public API Surface of fs-menu
2020
+ /*
2021
+ * Public API Surface of fs-menu
1884
2022
  */
1885
2023
 
1886
- /**
1887
- * Generated bundle index. Do not edit.
2024
+ /**
2025
+ * Generated bundle index. Do not edit.
1888
2026
  */
1889
2027
 
1890
2028
  exports.FsArray = FsArray;
@@ -1953,6 +2091,7 @@
1953
2091
  exports.email = email;
1954
2092
  exports.filter = filter;
1955
2093
  exports.find = find;
2094
+ exports.fsSourceLoader = fsSourceLoader;
1956
2095
  exports.getNormalizedPath = getNormalizedPath;
1957
2096
  exports.guid = guid;
1958
2097
  exports.inArray = inArray;