@progress/kendo-angular-upload 8.0.2 → 9.0.0-dev.202204191139

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 (265) hide show
  1. package/bundles/kendo-angular-upload.umd.js +5 -0
  2. package/{dist/es2015/common → common}/action-buttons-layout.d.ts +0 -0
  3. package/{dist/es2015/common → common}/util.d.ts +0 -0
  4. package/{dist/es2015/common → common}/validation-util.d.ts +0 -0
  5. package/{dist/es2015/dropzone-base.d.ts → dropzone-base.d.ts} +4 -1
  6. package/{dist/es2015/dropzone-external.directive.d.ts → dropzone-external.directive.d.ts} +4 -1
  7. package/{dist/es2015/dropzone-internal.directive.d.ts → dropzone-internal.directive.d.ts} +3 -0
  8. package/{dist/es2015/dropzone.component.d.ts → dropzone.component.d.ts} +5 -2
  9. package/{dist/es2015/dropzone.service.d.ts → dropzone.service.d.ts} +3 -0
  10. package/{dist/es2015 → esm2015}/common/action-buttons-layout.js +1 -0
  11. package/{dist/es2015 → esm2015}/common/util.js +1 -7
  12. package/{dist/es2015 → esm2015}/common/validation-util.js +0 -4
  13. package/{dist/es2015 → esm2015}/dropzone-base.js +18 -16
  14. package/{dist/es2015 → esm2015}/dropzone-external.directive.js +29 -35
  15. package/{dist/es2015 → esm2015}/dropzone-internal.directive.js +25 -37
  16. package/esm2015/dropzone.component.js +112 -0
  17. package/{dist/es2015 → esm2015}/dropzone.service.js +8 -7
  18. package/{dist/es2015 → esm2015}/events/cancel-event.js +1 -0
  19. package/{dist/es2015 → esm2015}/events/clear-event.js +1 -0
  20. package/{dist/es2015 → esm2015}/events/error-event.js +1 -0
  21. package/{dist/es2015 → esm2015}/events/pause-event.js +1 -0
  22. package/{dist/es2015 → esm2015}/events/preventable-event.js +0 -0
  23. package/{dist/es2015 → esm2015}/events/remove-event.js +1 -0
  24. package/{dist/es2015 → esm2015}/events/resume-event.js +1 -0
  25. package/{dist/es2015 → esm2015}/events/select-event.js +1 -0
  26. package/{dist/es2015 → esm2015}/events/success-event.js +1 -0
  27. package/{dist/es2015 → esm2015}/events/upload-event.js +1 -0
  28. package/{dist/es2015 → esm2015}/events/upload-progress-event.js +1 -0
  29. package/{dist/es → esm2015}/events.js +0 -0
  30. package/esm2015/file-select.directive.js +100 -0
  31. package/{dist/es2015 → esm2015}/fileselect.component.js +160 -132
  32. package/esm2015/fileselect.module.js +35 -0
  33. package/{dist/es/types/chunk-info.js → esm2015/kendo-angular-upload.js} +4 -0
  34. package/esm2015/localization/custom-messages.component.js +50 -0
  35. package/esm2015/localization/localized-messages.directive.js +40 -0
  36. package/esm2015/localization/messages.js +59 -0
  37. package/{dist/es → esm2015}/main.js +0 -0
  38. package/{dist/es2015 → esm2015}/navigation.service.js +9 -9
  39. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  40. package/{dist/es2015 → esm2015}/rendering/file-list-item-action-button.component.js +70 -28
  41. package/{dist/es2015 → esm2015}/rendering/file-list-item-base.js +9 -0
  42. package/esm2015/rendering/file-list-item.js +107 -0
  43. package/esm2015/rendering/file-list-multiple-items.component.js +172 -0
  44. package/esm2015/rendering/file-list-single-item.component.js +154 -0
  45. package/esm2015/rendering/file-list.component.js +145 -0
  46. package/esm2015/rendering/upload-action-buttons.component.js +136 -0
  47. package/esm2015/rendering/upload-status-total.component.js +60 -0
  48. package/{dist/es2015 → esm2015}/shared.module.js +45 -18
  49. package/esm2015/templates/file-info-template.directive.js +22 -0
  50. package/esm2015/templates/file-template.directive.js +22 -0
  51. package/esm2015/templates/template-context.directive.js +34 -0
  52. package/{dist/es2015 → esm2015}/types/async-settings.js +1 -0
  53. package/{dist/es2015 → esm2015}/types/chunk-info.js +1 -0
  54. package/{dist/es2015 → esm2015}/types/chunk-map.js +0 -0
  55. package/{dist/es → esm2015}/types/chunk-metadata.js +1 -0
  56. package/{dist/es → esm2015}/types/chunk-settings.js +1 -0
  57. package/{dist/es → esm2015}/types/direction.js +1 -0
  58. package/{dist/es2015 → esm2015}/types/file-groups.js +3 -5
  59. package/{dist/es → esm2015}/types/file-info.js +1 -0
  60. package/{dist/es2015 → esm2015}/types/file-map.js +0 -0
  61. package/{dist/es → esm2015}/types/file-restrictions.js +1 -0
  62. package/{dist/es → esm2015}/types/file-state.js +0 -0
  63. package/{dist/es → esm2015}/types/operation-type.js +1 -0
  64. package/{dist/es → esm2015}/types.js +0 -0
  65. package/{dist/es2015 → esm2015}/upload.component.js +262 -243
  66. package/esm2015/upload.module.js +43 -0
  67. package/{dist/es2015 → esm2015}/upload.service.js +10 -9
  68. package/{dist/es2015 → esm2015}/uploads.module.js +17 -12
  69. package/{dist/es2015/events → events}/cancel-event.d.ts +4 -0
  70. package/{dist/es2015/events → events}/clear-event.d.ts +1 -0
  71. package/{dist/es2015/events → events}/error-event.d.ts +10 -0
  72. package/{dist/es2015/events → events}/pause-event.d.ts +4 -0
  73. package/{dist/es2015/events → events}/preventable-event.d.ts +0 -0
  74. package/{dist/es2015/events → events}/remove-event.d.ts +9 -2
  75. package/{dist/es2015/events → events}/resume-event.d.ts +4 -0
  76. package/{dist/es2015/events → events}/select-event.d.ts +4 -0
  77. package/{dist/es2015/events → events}/success-event.d.ts +10 -0
  78. package/{dist/es2015/events → events}/upload-event.d.ts +9 -2
  79. package/{dist/es2015/events → events}/upload-progress-event.d.ts +7 -0
  80. package/{dist/es2015/events.d.ts → events.d.ts} +0 -0
  81. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-upload.js} +2192 -2010
  82. package/{dist/es2015/file-select.directive.d.ts → file-select.directive.d.ts} +7 -4
  83. package/{dist/es2015/fileselect.component.d.ts → fileselect.component.d.ts} +14 -6
  84. package/fileselect.module.d.ts +20 -0
  85. package/{dist/es/common/action-buttons-layout.js → kendo-angular-upload.d.ts} +5 -0
  86. package/{dist/es2015/localization → localization}/custom-messages.component.d.ts +4 -1
  87. package/{dist/es2015/localization → localization}/localized-messages.directive.d.ts +3 -0
  88. package/{dist/es2015/localization → localization}/messages.d.ts +3 -0
  89. package/{dist/es2015/main.d.ts → main.d.ts} +0 -0
  90. package/{dist/es2015/navigation.service.d.ts → navigation.service.d.ts} +7 -3
  91. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  92. package/package.json +32 -102
  93. package/{dist/es2015/rendering → rendering}/file-list-item-action-button.component.d.ts +11 -8
  94. package/{dist/es2015/rendering → rendering}/file-list-item-base.d.ts +3 -0
  95. package/{dist/es2015/rendering → rendering}/file-list-item.d.ts +10 -7
  96. package/{dist/es2015/rendering → rendering}/file-list-multiple-items.component.d.ts +7 -4
  97. package/{dist/es2015/rendering → rendering}/file-list-single-item.component.d.ts +9 -6
  98. package/{dist/es2015/rendering → rendering}/file-list.component.d.ts +3 -0
  99. package/{dist/es2015/rendering → rendering}/upload-action-buttons.component.d.ts +7 -4
  100. package/{dist/es2015/rendering → rendering}/upload-status-total.component.d.ts +3 -0
  101. package/schematics/ngAdd/index.js +5 -2
  102. package/schematics/ngAdd/index.js.map +1 -1
  103. package/shared.module.d.ts +36 -0
  104. package/{dist/es2015/templates → templates}/file-info-template.directive.d.ts +3 -0
  105. package/{dist/es2015/templates → templates}/file-template.directive.d.ts +3 -0
  106. package/{dist/es2015/templates → templates}/template-context.directive.d.ts +4 -1
  107. package/{dist/es2015/types → types}/async-settings.d.ts +0 -0
  108. package/{dist/es2015/types → types}/chunk-info.d.ts +0 -0
  109. package/{dist/es2015/types → types}/chunk-map.d.ts +0 -0
  110. package/{dist/es2015/types → types}/chunk-metadata.d.ts +0 -0
  111. package/{dist/es2015/types → types}/chunk-settings.d.ts +0 -0
  112. package/{dist/es2015/types → types}/direction.d.ts +0 -0
  113. package/{dist/es2015/types → types}/file-groups.d.ts +0 -0
  114. package/{dist/es2015/types → types}/file-info.d.ts +0 -0
  115. package/{dist/es2015/types → types}/file-map.d.ts +5 -5
  116. package/{dist/es2015/types → types}/file-restrictions.d.ts +0 -0
  117. package/{dist/es2015/types → types}/file-state.d.ts +0 -0
  118. package/{dist/es2015/types → types}/operation-type.d.ts +0 -0
  119. package/{dist/es2015/types.d.ts → types.d.ts} +0 -0
  120. package/{dist/es2015/upload.component.d.ts → upload.component.d.ts} +42 -21
  121. package/upload.module.d.ts +22 -0
  122. package/{dist/es2015/upload.service.d.ts → upload.service.d.ts} +4 -1
  123. package/{dist/es2015/uploads.module.d.ts → uploads.module.d.ts} +6 -0
  124. package/dist/cdn/js/kendo-angular-upload.js +0 -20
  125. package/dist/cdn/main.js +0 -5
  126. package/dist/es/common/util.js +0 -234
  127. package/dist/es/common/validation-util.js +0 -64
  128. package/dist/es/dropzone-base.js +0 -66
  129. package/dist/es/dropzone-external.directive.js +0 -98
  130. package/dist/es/dropzone-internal.directive.js +0 -110
  131. package/dist/es/dropzone.component.js +0 -99
  132. package/dist/es/dropzone.service.js +0 -33
  133. package/dist/es/events/cancel-event.js +0 -41
  134. package/dist/es/events/clear-event.js +0 -43
  135. package/dist/es/events/error-event.js +0 -45
  136. package/dist/es/events/pause-event.js +0 -42
  137. package/dist/es/events/preventable-event.js +0 -29
  138. package/dist/es/events/remove-event.js +0 -47
  139. package/dist/es/events/resume-event.js +0 -42
  140. package/dist/es/events/select-event.js +0 -45
  141. package/dist/es/events/success-event.js +0 -49
  142. package/dist/es/events/upload-event.js +0 -47
  143. package/dist/es/events/upload-progress-event.js +0 -42
  144. package/dist/es/file-select.directive.js +0 -141
  145. package/dist/es/fileselect.component.js +0 -484
  146. package/dist/es/fileselect.module.js +0 -30
  147. package/dist/es/index.js +0 -21
  148. package/dist/es/localization/custom-messages.component.js +0 -53
  149. package/dist/es/localization/localized-messages.directive.js +0 -35
  150. package/dist/es/localization/messages.js +0 -102
  151. package/dist/es/navigation.service.js +0 -166
  152. package/dist/es/package-metadata.js +0 -15
  153. package/dist/es/rendering/file-list-item-action-button.component.js +0 -169
  154. package/dist/es/rendering/file-list-item-base.js +0 -41
  155. package/dist/es/rendering/file-list-item.js +0 -165
  156. package/dist/es/rendering/file-list-multiple-items.component.js +0 -107
  157. package/dist/es/rendering/file-list-single-item.component.js +0 -112
  158. package/dist/es/rendering/file-list.component.js +0 -98
  159. package/dist/es/rendering/upload-action-buttons.component.js +0 -149
  160. package/dist/es/rendering/upload-status-total.component.js +0 -42
  161. package/dist/es/shared.module.js +0 -68
  162. package/dist/es/templates/file-info-template.directive.js +0 -22
  163. package/dist/es/templates/file-template.directive.js +0 -22
  164. package/dist/es/templates/template-context.directive.js +0 -40
  165. package/dist/es/types/async-settings.js +0 -4
  166. package/dist/es/types/chunk-map.js +0 -36
  167. package/dist/es/types/file-groups.js +0 -45
  168. package/dist/es/types/file-map.js +0 -170
  169. package/dist/es/upload.component.js +0 -967
  170. package/dist/es/upload.module.js +0 -34
  171. package/dist/es/upload.service.js +0 -448
  172. package/dist/es/uploads.module.js +0 -47
  173. package/dist/es2015/dropzone.component.js +0 -100
  174. package/dist/es2015/events.js +0 -14
  175. package/dist/es2015/file-select.directive.js +0 -123
  176. package/dist/es2015/fileselect.module.d.ts +0 -9
  177. package/dist/es2015/fileselect.module.js +0 -27
  178. package/dist/es2015/index.d.ts +0 -21
  179. package/dist/es2015/index.js +0 -21
  180. package/dist/es2015/index.metadata.json +0 -1
  181. package/dist/es2015/localization/custom-messages.component.js +0 -45
  182. package/dist/es2015/localization/localized-messages.directive.js +0 -35
  183. package/dist/es2015/localization/messages.js +0 -96
  184. package/dist/es2015/main.js +0 -24
  185. package/dist/es2015/rendering/file-list-item.js +0 -136
  186. package/dist/es2015/rendering/file-list-multiple-items.component.js +0 -128
  187. package/dist/es2015/rendering/file-list-single-item.component.js +0 -117
  188. package/dist/es2015/rendering/file-list.component.js +0 -123
  189. package/dist/es2015/rendering/upload-action-buttons.component.js +0 -141
  190. package/dist/es2015/rendering/upload-status-total.component.js +0 -51
  191. package/dist/es2015/shared.module.d.ts +0 -17
  192. package/dist/es2015/templates/file-info-template.directive.js +0 -21
  193. package/dist/es2015/templates/file-template.directive.js +0 -21
  194. package/dist/es2015/templates/template-context.directive.js +0 -35
  195. package/dist/es2015/types/chunk-metadata.js +0 -4
  196. package/dist/es2015/types/chunk-settings.js +0 -4
  197. package/dist/es2015/types/direction.js +0 -4
  198. package/dist/es2015/types/file-info.js +0 -4
  199. package/dist/es2015/types/file-restrictions.js +0 -4
  200. package/dist/es2015/types/file-state.js +0 -34
  201. package/dist/es2015/types/operation-type.js +0 -4
  202. package/dist/es2015/types.js +0 -5
  203. package/dist/es2015/upload.module.d.ts +0 -9
  204. package/dist/es2015/upload.module.js +0 -31
  205. package/dist/fesm5/index.js +0 -4653
  206. package/dist/npm/common/action-buttons-layout.js +0 -6
  207. package/dist/npm/common/util.js +0 -240
  208. package/dist/npm/common/validation-util.js +0 -68
  209. package/dist/npm/dropzone-base.js +0 -68
  210. package/dist/npm/dropzone-external.directive.js +0 -100
  211. package/dist/npm/dropzone-internal.directive.js +0 -112
  212. package/dist/npm/dropzone.component.js +0 -101
  213. package/dist/npm/dropzone.service.js +0 -35
  214. package/dist/npm/events/cancel-event.js +0 -43
  215. package/dist/npm/events/clear-event.js +0 -45
  216. package/dist/npm/events/error-event.js +0 -47
  217. package/dist/npm/events/pause-event.js +0 -44
  218. package/dist/npm/events/preventable-event.js +0 -31
  219. package/dist/npm/events/remove-event.js +0 -49
  220. package/dist/npm/events/resume-event.js +0 -44
  221. package/dist/npm/events/select-event.js +0 -47
  222. package/dist/npm/events/success-event.js +0 -51
  223. package/dist/npm/events/upload-event.js +0 -49
  224. package/dist/npm/events/upload-progress-event.js +0 -44
  225. package/dist/npm/events.js +0 -26
  226. package/dist/npm/file-select.directive.js +0 -143
  227. package/dist/npm/fileselect.component.js +0 -486
  228. package/dist/npm/fileselect.module.js +0 -32
  229. package/dist/npm/index.js +0 -39
  230. package/dist/npm/localization/custom-messages.component.js +0 -55
  231. package/dist/npm/localization/localized-messages.directive.js +0 -37
  232. package/dist/npm/localization/messages.js +0 -104
  233. package/dist/npm/main.js +0 -45
  234. package/dist/npm/navigation.service.js +0 -168
  235. package/dist/npm/package-metadata.js +0 -17
  236. package/dist/npm/rendering/file-list-item-action-button.component.js +0 -171
  237. package/dist/npm/rendering/file-list-item-base.js +0 -43
  238. package/dist/npm/rendering/file-list-item.js +0 -167
  239. package/dist/npm/rendering/file-list-multiple-items.component.js +0 -109
  240. package/dist/npm/rendering/file-list-single-item.component.js +0 -114
  241. package/dist/npm/rendering/file-list.component.js +0 -100
  242. package/dist/npm/rendering/upload-action-buttons.component.js +0 -151
  243. package/dist/npm/rendering/upload-status-total.component.js +0 -44
  244. package/dist/npm/shared.module.js +0 -70
  245. package/dist/npm/templates/file-info-template.directive.js +0 -24
  246. package/dist/npm/templates/file-template.directive.js +0 -24
  247. package/dist/npm/templates/template-context.directive.js +0 -42
  248. package/dist/npm/types/async-settings.js +0 -6
  249. package/dist/npm/types/chunk-info.js +0 -6
  250. package/dist/npm/types/chunk-map.js +0 -38
  251. package/dist/npm/types/chunk-metadata.js +0 -6
  252. package/dist/npm/types/chunk-settings.js +0 -6
  253. package/dist/npm/types/direction.js +0 -6
  254. package/dist/npm/types/file-groups.js +0 -47
  255. package/dist/npm/types/file-info.js +0 -6
  256. package/dist/npm/types/file-map.js +0 -172
  257. package/dist/npm/types/file-restrictions.js +0 -6
  258. package/dist/npm/types/file-state.js +0 -36
  259. package/dist/npm/types/operation-type.js +0 -6
  260. package/dist/npm/types.js +0 -8
  261. package/dist/npm/upload.component.js +0 -969
  262. package/dist/npm/upload.module.js +0 -36
  263. package/dist/npm/upload.service.js +0 -450
  264. package/dist/npm/uploads.module.js +0 -49
  265. package/dist/systemjs/kendo-angular-upload.js +0 -5
@@ -1,20 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-common"),require("@angular/forms"),require("rxjs"),require("@progress/kendo-licensing"),require("@angular/common/http"),require("@angular/animations"),require("@angular/common")):"function"==typeof define&&define.amd?define([,,,,,,,,],e):"object"==typeof exports?exports.KendoAngularUpload=e(require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-common"),require("@angular/forms"),require("rxjs"),require("@progress/kendo-licensing"),require("@angular/common/http"),require("@angular/animations"),require("@angular/common")):t.KendoAngularUpload=e(t.ng.core,t.KendoAngularL10N,t.KendoAngularCommon,t.ng.forms,t.rxjs,t.KendoLicensing,t.ng.common.http,t.ng.animations,t.ng.common)}(window,(function(t,e,n,i,r,o,s,u,a){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=43)}([function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return r})),n.d(e,"__assign",(function(){return o})),n.d(e,"__rest",(function(){return s})),n.d(e,"__decorate",(function(){return u})),n.d(e,"__param",(function(){return a})),n.d(e,"__metadata",(function(){return c})),n.d(e,"__awaiter",(function(){return l})),n.d(e,"__generator",(function(){return p})),n.d(e,"__createBinding",(function(){return d})),n.d(e,"__exportStar",(function(){return f})),n.d(e,"__values",(function(){return h})),n.d(e,"__read",(function(){return v})),n.d(e,"__spread",(function(){return y})),n.d(e,"__spreadArrays",(function(){return b})),n.d(e,"__await",(function(){return _})),n.d(e,"__asyncGenerator",(function(){return m})),n.d(e,"__asyncDelegator",(function(){return g})),n.d(e,"__asyncValues",(function(){return S})),n.d(e,"__makeTemplateObject",(function(){return x})),n.d(e,"__importStar",(function(){return w})),n.d(e,"__importDefault",(function(){return F})),n.d(e,"__classPrivateFieldGet",(function(){return E})),n.d(e,"__classPrivateFieldSet",(function(){return I}));
6
- /*! *****************************************************************************
7
- Copyright (c) Microsoft Corporation.
8
-
9
- Permission to use, copy, modify, and/or distribute this software for any
10
- purpose with or without fee is hereby granted.
11
-
12
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
13
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
14
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
15
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
16
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
17
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18
- PERFORMANCE OF THIS SOFTWARE.
19
- ***************************************************************************** */
20
- var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function s(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}function u(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s}function a(t,e){return function(n,i){e(n,i,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{a(i.next(t))}catch(t){o(t)}}function u(t){try{a(i.throw(t))}catch(t){o(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((i=i.apply(t,e||[])).next())}))}function p(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}function d(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}function f(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||(e[n]=t[n])}function h(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(v(arguments[e]));return t}function b(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],s=0,u=o.length;s<u;s++,r++)i[r]=o[s];return i}function _(t){return this instanceof _?(this.v=t,this):new _(t)}function m(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=n.apply(t,e||[]),o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(t){r[t]&&(i[t]=function(e){return new Promise((function(n,i){o.push([t,e,n,i])>1||u(t,e)}))})}function u(t,e){try{(n=r[t](e)).value instanceof _?Promise.resolve(n.value.v).then(a,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function a(t){u("next",t)}function c(t){u("throw",t)}function l(t,e){t(e),o.shift(),o.length&&u(o[0][0],o[0][1])}}function g(t){var e,n;return e={},i("next"),i("throw",(function(t){throw t})),i("return"),e[Symbol.iterator]=function(){return this},e;function i(i,r){e[i]=t[i]?function(e){return(n=!n)?{value:_(t[i](e)),done:"return"===i}:r?r(e):e}:r}}function S(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=h(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,r){(function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)})(i,r,(e=t[n](e)).done,e.value)}))}}}function x(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function F(t){return t&&t.__esModule?t:{default:t}}function E(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function I(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(20),o=n(1),s=n(4),u=n(22),a=n(23),c=n(5),l=n(55),p=function(){function t(t){this.http=t,this.cancelEvent=new o.EventEmitter,this.clearEvent=new o.EventEmitter,this.completeEvent=new o.EventEmitter,this.errorEvent=new o.EventEmitter,this.pauseEvent=new o.EventEmitter,this.removeEvent=new o.EventEmitter,this.resumeEvent=new o.EventEmitter,this.selectEvent=new o.EventEmitter,this.successEvent=new o.EventEmitter,this.uploadEvent=new o.EventEmitter,this.uploadProgressEvent=new o.EventEmitter,this.changeEvent=new o.EventEmitter,this.async={autoUpload:!0,batch:!1,chunk:!1,concurrent:!0,removeField:"fileNames",removeHeaders:new r.HttpHeaders,removeMethod:"POST",removeUrl:"",responseType:"json",saveField:"files",saveHeaders:new r.HttpHeaders,saveMethod:"POST",saveUrl:"",withCredentials:!0},this.chunk={autoRetryAfter:100,size:1048576,maxAutoRetries:1,resumable:!0},this.component="Upload",this.chunkMap=new l.ChunkMap,this.fileList=new u.FileMap}return Object.defineProperty(t.prototype,"files",{get:function(){return this.fileList},enumerable:!0,configurable:!0}),t.prototype.setChunkSettings=function(t){!1!==t&&(this.async.chunk=!0,"object"==typeof t&&(this.chunk=Object.assign({},this.chunk,t)))},t.prototype.onChange=function(){var t=this.fileList.filesFlat.filter((function(t){return t.state===s.FileState.Initial||t.state===s.FileState.Uploaded}));this.changeEvent.emit(t.length>0?t:null)},t.prototype.addFiles=function(t){var e=new a.SelectEvent(t);if(this.selectEvent.emit(e),!e.isDefaultPrevented()){for(var n=0,i=t;n<i.length;n++){var r=i[n];this.fileList.add(r)}this.async.autoUpload&&this.uploadFiles()}if("FileSelect"===this.component){var o=this.fileList.filesFlat;this.changeEvent.emit(o.length>0?o:null)}},t.prototype.addInitialFiles=function(t){var e=this;this.fileList.clear(),t.forEach((function(t){var n=c.getInitialFileInfo(t);e.fileList.add(n)}))},t.prototype.addInitialFileSelectFiles=function(t){var e=this;this.fileList.clear(),t.forEach((function(t){t instanceof File?e.fileList.add(c.convertFileToFileInfo(t)):e.fileList.add(c.getInitialFileInfo(t))}))},t.prototype.resumeFile=function(t){var e=this.fileList.get(t);this.resumeEvent.emit(new a.ResumeEvent(e[0])),this.fileList.setFilesStateByUid(t,s.FileState.Uploading),this._uploadFiles([e])},t.prototype.pauseFile=function(t){var e=this.fileList.get(t)[0];this.pauseEvent.emit(new a.PauseEvent(e)),this.fileList.setFilesStateByUid(t,s.FileState.Paused)},t.prototype.removeFiles=function(t){var e=this.fileList.get(t),n=new a.RemoveEvent(e,this.cloneRequestHeaders(this.async.removeHeaders));if(this.removeEvent.emit(n),!n.isDefaultPrevented())if("Upload"!==this.component||e[0].state!==s.FileState.Uploaded&&e[0].state!==s.FileState.Initial){if(this.fileList.remove(t),"FileSelect"===this.component){var i=this.fileList.filesFlat;this.changeEvent.emit(i.length>0?i:null)}}else this.performRemove(e,n)},t.prototype.cancelFiles=function(t){var e=this.fileList.get(t),n=new a.CancelEvent(e);this.cancelEvent.emit(n);for(var i=0,r=e;i<r.length;i++){var o=r[i];o.httpSubscription&&o.httpSubscription.unsubscribe()}this.fileList.remove(t),this.checkAllComplete()},t.prototype.clearFiles=function(){var t=new a.ClearEvent;if(this.clearEvent.emit(t),!t.isDefaultPrevented()){var e=this.fileList.hasFileWithState([s.FileState.Initial,s.FileState.Uploaded]);this.fileList.clear(),e&&this.onChange()}},t.prototype.uploadFiles=function(){var t=[];this.async.concurrent&&(t=this.fileList.filesToUpload),this.async.concurrent||this.fileList.hasFileWithState([s.FileState.Uploading])||(t=this.fileList.firstFileToUpload?[this.fileList.firstFileToUpload]:[]),t&&t.length>0&&this._uploadFiles(t)},t.prototype.retryFiles=function(t){var e=[this.fileList.get(t)];e&&this._uploadFiles(e)},t.prototype._uploadFiles=function(t){for(var e=function(t){if(t[0].state===s.FileState.Paused)return{value:void 0};var e=new a.UploadEvent(t,n.cloneRequestHeaders(n.async.saveHeaders));if(n.uploadEvent.emit(e),e.isDefaultPrevented())n.fileList.remove(t[0].uid);else{n.fileList.setFilesState(t,s.FileState.Uploading);var i=n.performUpload(t,e);t.forEach((function(t){t.httpSubscription=i}))}},n=this,i=0,r=t;i<r.length;i++){var o=e(r[i]);if("object"==typeof o)return o.value}},t.prototype.performRemove=function(t,e){var n=this,i=this.async,o=t.map((function(t){return t.name})),s=this.populateRemoveFormData(o,e.data),u=this.populateRequestOptions(e.headers),a=new r.HttpRequest(i.removeMethod,i.removeUrl,s,u);this.http.request(a).subscribe((function(e){n.onSuccess(e,t,"remove")}),(function(e){n.onError(e,t,"remove")}))},t.prototype.performUpload=function(t,e){var n=this,i=this.async,o=this.populateUploadFormData(t,e.data),s=this.populateRequestOptions(e.headers),u=new r.HttpRequest(i.saveMethod,i.saveUrl,o,s);return this.http.request(u).subscribe((function(e){e.type!==r.HttpEventType.UploadProgress||n.async.chunk?e instanceof r.HttpResponse&&(n.onSuccess(e,t,"upload"),n.checkAllComplete()):n.onProgress(e,t)}),(function(e){n.onError(e,t,"upload"),n.checkAllComplete()}))},t.prototype.onSuccess=function(t,e,n){if("upload"===n&&this.async.chunk){if(this.onChunkProgress(e),!this.isChunkUploadComplete(e[0].uid))return this.updateChunkInfo(e[0].uid),void this._uploadFiles([e]);this.removeChunkInfo(e[0].uid)}var i=new a.SuccessEvent(e,n,t);this.successEvent.emit(i),"upload"===n?this.fileList.setFilesState(e,i.isDefaultPrevented()?s.FileState.Failed:s.FileState.Uploaded):i.isDefaultPrevented()||this.fileList.remove(e[0].uid),i.isDefaultPrevented()||this.onChange()},t.prototype.onError=function(t,e,n){var i=this;if("upload"===n&&this.async.chunk){var r=this.chunk.maxAutoRetries,o=this.chunkMap.get(e[0].uid);if(o.retries<r)return o.retries+=1,void setTimeout((function(){i.retryFiles(e[0].uid)}),this.chunk.autoRetryAfter)}var u=new a.ErrorEvent(e,n,t);this.errorEvent.emit(u),"upload"===n&&this.fileList.setFilesState(e,s.FileState.Failed)},t.prototype.onProgress=function(t,e){var n=Math.round(100*t.loaded/t.total),i=new a.UploadProgressEvent(e,n<100?n:100);this.uploadProgressEvent.emit(i)},t.prototype.onChunkProgress=function(t){var e=this.chunkMap.get(t[0].uid),n=0;e&&(n=e.index===e.totalChunks-1?100:Math.round((e.index+1)/e.totalChunks*100));var i=new a.UploadProgressEvent(t,n<100?n:100);this.uploadProgressEvent.emit(i)},t.prototype.checkAllComplete=function(){!this.fileList.hasFileWithState([s.FileState.Uploading,s.FileState.Paused])&&this.areAllSelectedFilesHandled()?this.completeEvent.emit():this.shouldUploadNextFile()&&this.uploadFiles()},t.prototype.shouldUploadNextFile=function(){return!this.async.concurrent&&this.fileList.hasFileWithState([s.FileState.Selected])&&!this.fileList.hasFileWithState([s.FileState.Uploading])},t.prototype.areAllSelectedFilesHandled=function(){return 0===this.fileList.getFilesWithState(s.FileState.Selected).filter((function(t){return!t.validationErrors})).length},t.prototype.cloneRequestHeaders=function(t){var e={};return t&&t.keys().forEach((function(n){e[n]=t.get(n)})),new r.HttpHeaders(e)},t.prototype.populateRequestOptions=function(t){return{headers:t,reportProgress:!0,responseType:this.async.responseType,withCredentials:this.async.withCredentials}},t.prototype.populateUploadFormData=function(t,e){var n=this.async.saveField,i=new FormData;if(this.populateClientFormData(i,e),this.async.chunk)i.append(n,this.getNextChunk(t[0])),i.append("metadata",this.getChunkMetadata(t[0]));else for(var r=0,o=t;r<o.length;r++){var s=o[r];i.append(n,s.rawFile)}return i},t.prototype.populateRemoveFormData=function(t,e){var n=new FormData;this.populateClientFormData(n,e);for(var i=0,r=t;i<r.length;i++){var o=r[i];n.append(this.async.removeField,o)}return n},t.prototype.populateClientFormData=function(t,e){for(var n in e)e.hasOwnProperty(n)&&t.append(n,e[n])},t.prototype.getNextChunk=function(t){var e=this.getChunkInfo(t),n=e.position+this.chunk.size;return t.rawFile.slice(e.position,n)},t.prototype.getChunkInfo=function(t){var e=this.chunkMap.get(t.uid);if(!e){var n=Math.ceil(t.size/this.chunk.size);e=this.chunkMap.add(t.uid,n)}return e},t.prototype.updateChunkInfo=function(t){var e=this.chunkMap.get(t);e.index<e.totalChunks-1&&(e.index+=1,e.position+=this.chunk.size,e.retries=0)},t.prototype.removeChunkInfo=function(t){this.chunkMap.remove(t)},t.prototype.getChunkMetadata=function(t){var e=this.chunkMap.get(t.uid),n={chunkIndex:e.index,contentType:t.rawFile.type,fileName:t.name,fileSize:t.size,fileUid:t.uid,totalChunks:e.totalChunks};return JSON.stringify(n)},t.prototype.isChunkUploadComplete=function(t){var e=this.chunkMap.get(t);return!!e&&e.index+1===e.totalChunks},t=i.__decorate([o.Injectable(),i.__metadata("design:paramtypes",[r.HttpClient])],t)}();e.UploadService=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(21);e.FileState=i.FileState},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(4),r=n(8),o=n(54);e.getTotalFilesSizeMessage=function(t){var e,n=0;if("number"!=typeof t[0].size)return"";for(e=0;e<t.length;e++)t[e].size&&(n+=t[e].size);return(n/=1024)<1024?n.toFixed(2)+" KB":(n/1024).toFixed(2)+" MB"};var s=function(t){var e=t.match(/\.([^\.]+)$/);return e?e[0]:""};e.validateInitialFileInfo=function(t){return!!(t instanceof Object&&t.hasOwnProperty("name"))},e.validateInitialFileSelectFile=function(t){return!!(t instanceof File||e.validateInitialFileInfo(t))},e.getInitialFileInfo=function(t){return t.extension=t.extension||s(t.name),t.name=t.name,t.size=t.size||0,t.hasOwnProperty("state")||(t.state=i.FileState.Initial),t.hasOwnProperty("uid")||(t.uid=r.guid()),t},e.convertFileToFileInfo=function(t){var e=u(t);return e.uid=r.guid(),e.state=i.FileState.Selected,e};var u=function(t){var e=t.name,n=t.size;return{extension:s(e),name:e,rawFile:t,size:n,state:i.FileState.Selected}};e.getAllFileInfo=function(t){var e,n=new Array;for(e=0;e<t.length;e++)n.push(u(t[e]));return n},e.fileHasValidationErrors=function(t){return!!(t.validationErrors&&t.validationErrors.length>0)},e.filesHaveValidationErrors=function(t){for(var n=0,i=t;n<i.length;n++){var r=i[n];if(e.fileHasValidationErrors(r))return!0}return!1},e.inputFiles=function(t){return t.files?e.getAllFileInfo(t.files):t.value.split("|").map((function(t,e){var n,r,o=t.trim();return{extension:s(o),name:(n=o,r=n.lastIndexOf("\\"),-1!==r?n.substr(r+1):n),rawFile:null,size:1e3*(e+1),state:i.FileState.Selected}}))},e.assignGuidToFiles=function(t,e){var n=r.guid();return t.map((function(t){return t.uid=e?r.guid():n,t}))},e.supportsFormData=function(){return"undefined"!=typeof FormData},e.userAgent=function(){return navigator.userAgent};var a=/^(?:a|input|select|textarea|button|object)$/i;e.IGNORE_TARGET_CLASSES="k-icon k-select k-input k-multiselect-wrap",e.UPLOAD_CLASSES="k-upload-button k-clear-selected k-upload-selected k-upload-action";var c=function(t){return String(t).trim().split(" ")};e.hasClasses=function(t,e){var n=c(e);return Boolean(c(t.className).find((function(t){return n.indexOf(t)>=0})))},e.isFocusable=function(t,e){if(void 0===e&&(e=!0),t.tagName){var n=t.tagName.toLowerCase(),i=t.getAttribute("tabIndex"),r=null!==i&&!isNaN(i)&&i>-1;return(a.test(n)?!t.disabled:r)&&(!e||function(t){var e=t.getBoundingClientRect();return!(!e.width||!e.height)&&"hidden"!==window.getComputedStyle(t).visibility}(t))}return!1},e.getFileGroupCssClass=function(t){for(var e in o.fileGroupMap)if(o.fileGroupMap[e].indexOf(t)>=0)return"k-i-file-"+e;return"k-i-file"},e.isPresent=function(t){return null!=t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(3),s=n(8),u=function(){function t(t){this.uploadService=t,this.onActionButtonAction=new r.EventEmitter,this.onActionButtonFocus=new r.EventEmitter,this.onFileAction=new r.EventEmitter,this.onFileFocus=new r.EventEmitter,this.onTab=new r.EventEmitter,this.onWrapperFocus=new r.EventEmitter,this.onSelectButtonFocus=new r.EventEmitter,this.actionButtonsVisible=!1,this.focused=!1,this._focusedIndex=-1}return t.prototype.action=function(t){var e=t.keyCode;return this.keyBindings[e]},t.prototype.process=function(t){var e=this.action(t);e&&e(t.shiftKey)},t.prototype.computeKeys=function(t){var e,n=this;this.keyBindings=((e={})[s.Keys.Enter]=function(){return n.handleEnter()},e[s.Keys.Escape]=function(){return n.handleEscape()},e[s.Keys.Delete]=function(){return n.handleDelete()},e[s.Keys.Tab]=function(t){return n.handleTab(t)},e[s.Keys.ArrowUp]=function(){return n.handleUp()},e[s.Keys.ArrowDown]=function(){return n.handleDown()},e[this.invertKeys(t,s.Keys.ArrowLeft,s.Keys.ArrowRight)]=function(){return n.handleLeft()},e[this.invertKeys(t,s.Keys.ArrowRight,s.Keys.ArrowLeft)]=function(){return n.handleRight()},e)},t.prototype.invertKeys=function(t,e,n){return"rtl"===t?n:e},t.prototype.focusSelectButton=function(){this.focused=!0,this._focusedIndex=-1,this.onSelectButtonFocus.emit()},t.prototype.handleEnter=function(){if(this.lastIndex>=0){if(this.focusedIndex<=this.lastFileIndex)return void this.onFileAction.emit(s.Keys.Enter);this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&this.onActionButtonAction.emit(this.focusedIndex<this.lastIndex?"clear":"upload")}},t.prototype.handleDelete=function(){this.focusedIndex>=0&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(s.Keys.Delete)},t.prototype.handleEscape=function(){this.focusedIndex>=0&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(s.Keys.Escape)},t.prototype.handleLeft=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex&&(this.focusedIndex-=1,this.onActionButtonFocus.emit("clear"))},t.prototype.handleRight=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex-1&&(this.focusedIndex+=1,this.onActionButtonFocus.emit("upload"))},t.prototype.handleTab=function(t){this.focusedIndex>=0&&t?this.focusedIndex=-1:this.onTab.emit()},t.prototype.handleDown=function(){if(this.lastIndex>=0&&this.focusedIndex<this.lastIndex){if(this.focusedIndex<this.lastFileIndex)return this.focusedIndex+=1,void this.onFileFocus.emit(this.focusedIndex);this.actionButtonsVisible&&this.focusedIndex===this.lastFileIndex&&(this.focusedIndex+=1,this.onActionButtonFocus.emit("clear"))}},t.prototype.handleUp=function(){if(this.lastIndex>=0&&this.focusedIndex>-1){if(this.focusedIndex-=1,-1===this.focusedIndex)return void this.onSelectButtonFocus.emit();if(this.focusedIndex<=this.lastFileIndex)return void this.onFileFocus.emit(this.focusedIndex);this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&(this.focusedIndex=this.lastFileIndex,this.onFileFocus.emit(this.focusedIndex))}},Object.defineProperty(t.prototype,"focusedIndex",{get:function(){return this._focusedIndex},set:function(t){this.focused||this.onWrapperFocus.emit(),this._focusedIndex=t,this.focused=!0,this._focusedIndex>=0&&this._focusedIndex<=this.lastFileIndex&&this.onFileFocus.emit(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastFileIndex",{get:function(){return this.actionButtonsVisible?this.lastIndex-2:this.lastIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastIndex",{get:function(){var t=this.uploadService.files.count;return this.actionButtonsVisible?t+1:t-1},enumerable:!0,configurable:!0}),t=i.__decorate([r.Injectable(),i.__metadata("design:paramtypes",[o.UploadService])],t)}();e.NavigationService=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=function(){function t(t){this.templateRef=t}return t=i.__decorate([r.Directive({selector:"[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]"}),i.__metadata("design:paramtypes",[r.TemplateRef])],t)}();e.FileInfoTemplateDirective=o},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this.prevented=!1}return t.prototype.preventDefault=function(){this.prevented=!0},t.prototype.isDefaultPrevented=function(){return this.prevented},t}();e.PreventableEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=function(){function t(t){this.templateRef=t}return t=i.__decorate([r.Directive({selector:"[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]"}),i.__metadata("design:paramtypes",[r.TemplateRef])],t)}();e.FileTemplateDirective=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o={},s=function(){function t(){}return t.prototype.addComponent=function(t,e){this.has(e)?o[e].push(t):o[e]=[t]},t.prototype.getComponents=function(t){return o[t]},t.prototype.has=function(t){return t in o},t=i.__decorate([r.Injectable()],t)}();e.DropZoneService=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INVALIDMAXFILESIZE="invalidMaxFileSize",e.INVALIDMINFILESIZE="invalidMinFileSize",e.INVALIDFILEEXTENSION="invalidFileExtension";var i=function(t,n){n.length>0&&n.indexOf(t.extension.toLowerCase())<0&&(t.validationErrors=t.validationErrors||[],t.validationErrors.indexOf(e.INVALIDFILEEXTENSION)<0&&t.validationErrors.push(e.INVALIDFILEEXTENSION))},r=function(t,n,i){0!==n&&t.size<n&&(t.validationErrors=t.validationErrors||[],t.validationErrors.indexOf(e.INVALIDMINFILESIZE)<0&&t.validationErrors.push(e.INVALIDMINFILESIZE)),0!==i&&t.size>i&&(t.validationErrors=t.validationErrors||[],t.validationErrors.indexOf(e.INVALIDMAXFILESIZE)<0&&t.validationErrors.push(e.INVALIDMAXFILESIZE))};e.validateFiles=function(t,e){var n,o=e.allowedExtensions.map((function(t){return("."===t.substring(0,1)?t:"."+t).toLowerCase()})),s=e.maxFileSize,u=e.minFileSize;for(n=0;n<t.length;n++)i(t[n],o),r(t[n],u,s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(20),o=n(1),s=n(16),u=n(8),a=n(2),c=n(17),l=n(42),p=n(18),d=n(19),f=n(4),h=n(6),v=n(10),y=n(3),b=n(5),_=n(11),m=n(7);e.UPLOAD_VALUE_ACCESSOR={multi:!0,provide:s.NG_VALUE_ACCESSOR,useExisting:o.forwardRef((function(){return g}))};var g=function(){function t(t,e,n,i,r,s,a,c){var l=this;this.uploadService=t,this.localization=e,this.navigation=n,this.dropZoneService=i,this._ngZone=r,this.renderer=s,this.cdr=a,this.chunkable=!1,this.multiple=!0,this.disabled=!1,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+u.guid(),this.actionsLayout="end",this.onBlur=new o.EventEmitter,this.cancel=new o.EventEmitter,this.clear=new o.EventEmitter,this.complete=new o.EventEmitter,this.error=new o.EventEmitter,this.onFocus=new o.EventEmitter,this.pause=new o.EventEmitter,this.remove=new o.EventEmitter,this.resume=new o.EventEmitter,this.select=new o.EventEmitter,this.success=new o.EventEmitter,this.upload=new o.EventEmitter,this.uploadProgress=new o.EventEmitter,this.valueChange=new o.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(t){},this.onChangeCallback=function(t){},p.validatePackage(d.packageMetadata),this.fileList=this.uploadService.files,this.localizationChangeSubscription=e.changes.subscribe((function(t){var e=t.rtl;l.direction=e?"rtl":"ltr",l.navigation.computeKeys(l.direction)})),this.direction=e.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.wrapper=c.nativeElement,this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers()}var n;return n=t,Object.defineProperty(t.prototype,"autoUpload",{get:function(){return this.uploadService.async.autoUpload},set:function(t){this.uploadService.async.autoUpload=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"batch",{get:function(){return this.uploadService.async.batch},set:function(t){this.uploadService.async.batch=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"withCredentials",{get:function(){return this.uploadService.async.withCredentials},set:function(t){this.uploadService.async.withCredentials=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"saveField",{get:function(){return this.uploadService.async.saveField},set:function(t){this.uploadService.async.saveField=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"saveHeaders",{get:function(){return this.uploadService.async.saveHeaders},set:function(t){this.uploadService.async.saveHeaders=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"saveMethod",{get:function(){return this.uploadService.async.saveMethod},set:function(t){this.uploadService.async.saveMethod=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"saveUrl",{get:function(){return this.uploadService.async.saveUrl},set:function(t){this.uploadService.async.saveUrl=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"responseType",{get:function(){return this.uploadService.async.responseType},set:function(t){this.uploadService.async.responseType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"removeField",{get:function(){return this.uploadService.async.removeField},set:function(t){this.uploadService.async.removeField=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"removeHeaders",{get:function(){return this.uploadService.async.removeHeaders},set:function(t){this.uploadService.async.removeHeaders=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"removeMethod",{get:function(){return this.uploadService.async.removeMethod},set:function(t){this.uploadService.async.removeMethod=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"removeUrl",{get:function(){return this.uploadService.async.removeUrl},set:function(t){this.uploadService.async.removeUrl=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"concurrent",{get:function(){return this.uploadService.async.concurrent},set:function(t){this.uploadService.async.concurrent=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabIndex",{get:function(){return this.tabindex},set:function(t){this.tabindex=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"restrictions",{get:function(){return this._restrictions},set:function(t){var e=Object.assign({},this._restrictions,t);this._restrictions=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dir",{get:function(){return this.direction},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.verifySettings(),this.renderer.removeAttribute(this.wrapper,"tabindex"),this.uploadService.setChunkSettings(this.chunkable),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},t.prototype.ngOnChanges=function(t){if(u.isChanged("chunkable",t)){var e=t.chunkable.currentValue;"boolean"==typeof e&&(this.uploadService.async.chunk=e),"object"==typeof e&&null!==e&&(this.uploadService.async.chunk=!0,this.uploadService.chunk=Object.assign({},this.uploadService.chunk,e))}},t.prototype.ngOnDestroy=function(){this.fileList.clear(),this.blurSubscription&&this.blurSubscription.unsubscribe(),this.wrapperFocusSubscription&&this.wrapperFocusSubscription.unsubscribe(),this.selectButtonFocusSubscription&&this.selectButtonFocusSubscription.unsubscribe(),this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe(),this.subs&&this.subs.unsubscribe()},t.prototype.handleKeydown=function(t){if(!this.disabled)return t.keyCode!==u.Keys.Enter&&t.keyCode!==u.Keys.Space||t.target!==this.fileSelectButton.nativeElement?void((b.hasClasses(t.target,b.UPLOAD_CLASSES)||!b.isFocusable(t.target)&&!b.hasClasses(t.target,b.IGNORE_TARGET_CLASSES))&&this.navigation.process(t)):(t.preventDefault(),void this.fileSelect.nativeElement.click())},t.prototype.writeValue=function(t){var e=!0;t instanceof Array&&(t.forEach((function(t){b.validateInitialFileInfo(t)||(e=!1)})),e&&this.uploadService.addInitialFiles(t)),null===t&&this.fileList.clear(),this.cdr.markForCheck()},t.prototype.registerOnChange=function(t){this.onChangeCallback=t},t.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},t.prototype.setDisabledState=function(t){this.disabled=t},Object.defineProperty(t.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabIndex},enumerable:!0,configurable:!0}),t.prototype.onFileSelectButtonFocus=function(t){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-focus"),this.navigation.focused||(this.navigation.focusedIndex=-1)},t.prototype.onFileSelectButtonBlur=function(t){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-focus")},Object.defineProperty(t.prototype,"showActionButtons",{get:function(){var t=!1;if(!this.autoUpload){var e=this.fileList.filesToUpload.length>0,n=this.fileList.hasFileWithState([f.FileState.Uploading]);this.concurrent&&e&&(t=!0),this.concurrent||!e||n||(t=!0)}return this.navigation.actionButtonsVisible=t,t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showTotalStatus",{get:function(){var t=[f.FileState.Uploaded,f.FileState.Uploading,f.FileState.Failed,f.FileState.Paused];return!!this.fileList.hasFileWithState(t)},enumerable:!0,configurable:!0}),t.prototype.textFor=function(t){return this.localization.get(t)},t.prototype.focus=function(){var t=this;setTimeout((function(){t.fileSelectButton.nativeElement.focus()}))},t.prototype.focusComponent=function(){this.focus()},t.prototype.blur=function(){this.navigation.focused&&(this.navigation.focused=!1,document.activeElement.blur(),this.onBlur.emit())},t.prototype.blurComponent=function(){this.blur()},t.prototype.pauseFileByUid=function(t){this.uploadService.pauseFile(t)},t.prototype.resumeFileByUid=function(t){this.uploadService.resumeFile(t)},t.prototype.removeFilesByUid=function(t){this.uploadService.removeFiles(t)},t.prototype.retryUploadByUid=function(t){this.uploadService.retryFiles(t)},t.prototype.cancelUploadByUid=function(t){this.uploadService.cancelFiles(t)},t.prototype.uploadFiles=function(){this.fileList.filesToUpload.length&&this.uploadService.uploadFiles()},t.prototype.clearFiles=function(){this.uploadService.clearFiles()},t.prototype.addFiles=function(t){this.uploadService.addFiles(t)},t.prototype.isEmpty=function(){return!1},t.prototype.verifySettings=function(){if(o.isDevMode()&&this.batch&&!1!==this.chunkable)throw new Error("The file chunking functionality requires the batch setting to be disabled.")},t.prototype.subscribeBlur=function(){var t=this;u.isDocumentAvailable()&&this._ngZone.runOutsideAngular((function(){t.documentClick=c.fromEvent(document,"click").pipe(l.filter((function(e){return!(t.wrapper!==e.target&&t.wrapper.contains(e.target))}))),t.blurSubscription=c.merge(t.documentClick,t.navigation.onTab).subscribe((function(){t.navigation.focused&&t._ngZone.run((function(){t.navigation.focused=!1,t.onTouchedCallback(),t.onBlur.emit()}))}))}))},t.prototype.subscribeFocus=function(){var t=this;this.wrapperFocusSubscription=this.navigation.onWrapperFocus.subscribe((function(){t.onFocus.emit()})),this.selectButtonFocusSubscription=this.navigation.onSelectButtonFocus.subscribe((function(){t.fileSelectButton.nativeElement.focus()}))},t.prototype.attachEventHandlers=function(){var t=this;this.subs=this.uploadService.cancelEvent.subscribe((function(e){t.cancel.emit(e)})),this.subs.add(this.uploadService.changeEvent.subscribe((function(e){t.onChangeCallback(e),t.valueChange.emit(e)}))),this.subs.add(this.uploadService.clearEvent.subscribe((function(e){t.clear.emit(e)}))),this.subs.add(this.uploadService.completeEvent.subscribe((function(){t.complete.emit()}))),this.subs.add(this.uploadService.errorEvent.subscribe((function(e){t.error.emit(e)}))),this.subs.add(this.uploadService.pauseEvent.subscribe((function(e){t.pause.emit(e)}))),this.subs.add(this.uploadService.removeEvent.subscribe((function(e){t.remove.emit(e)}))),this.subs.add(this.uploadService.resumeEvent.subscribe((function(e){t.resume.emit(e)}))),this.subs.add(this.uploadService.selectEvent.subscribe((function(e){t.select.emit(e)}))),this.subs.add(this.uploadService.successEvent.subscribe((function(e){t.success.emit(e)}))),this.subs.add(this.uploadService.uploadEvent.subscribe((function(e){t.upload.emit(e)}))),this.subs.add(this.uploadService.uploadProgressEvent.subscribe((function(e){t.uploadProgress.emit(e)})))},i.__decorate([o.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"autoUpload",null),i.__decorate([o.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"batch",null),i.__decorate([o.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"withCredentials",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"saveField",null),i.__decorate([o.Input(),i.__metadata("design:type",r.HttpHeaders),i.__metadata("design:paramtypes",[r.HttpHeaders])],t.prototype,"saveHeaders",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"saveMethod",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"saveUrl",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"responseType",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"removeField",null),i.__decorate([o.Input(),i.__metadata("design:type",r.HttpHeaders),i.__metadata("design:paramtypes",[r.HttpHeaders])],t.prototype,"removeHeaders",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"removeMethod",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"removeUrl",null),i.__decorate([o.Input(),i.__metadata("design:type",Object)],t.prototype,"chunkable",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"concurrent",null),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],t.prototype,"multiple",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],t.prototype,"showFileList",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Number)],t.prototype,"tabindex",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"zoneId",void 0),i.__decorate([o.Input("tabIndex"),i.__metadata("design:type",Number),i.__metadata("design:paramtypes",[Number])],t.prototype,"tabIndex",null),i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"accept",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[Object])],t.prototype,"restrictions",null),i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"focusableId",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"actionsLayout",void 0),i.__decorate([o.ContentChild(v.FileTemplateDirective,{static:!1}),i.__metadata("design:type",v.FileTemplateDirective)],t.prototype,"fileTemplate",void 0),i.__decorate([o.ContentChild(m.FileInfoTemplateDirective,{static:!1}),i.__metadata("design:type",m.FileInfoTemplateDirective)],t.prototype,"fileInfoTemplate",void 0),i.__decorate([o.ViewChild("fileSelect",{static:!0}),i.__metadata("design:type",o.ElementRef)],t.prototype,"fileSelect",void 0),i.__decorate([o.ViewChild("fileSelectButton",{static:!0}),i.__metadata("design:type",o.ElementRef)],t.prototype,"fileSelectButton",void 0),i.__decorate([o.Output("blur"),i.__metadata("design:type",o.EventEmitter)],t.prototype,"onBlur",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"cancel",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"clear",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"complete",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"error",void 0),i.__decorate([o.Output("focus"),i.__metadata("design:type",o.EventEmitter)],t.prototype,"onFocus",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"pause",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"remove",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"resume",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"select",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"success",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"upload",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"uploadProgress",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"valueChange",void 0),i.__decorate([o.HostBinding("class.k-widget"),o.HostBinding("class.k-upload"),i.__metadata("design:type",Boolean)],t.prototype,"hostDefaultClasses",void 0),i.__decorate([o.HostBinding("class.k-disabled"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"hostDisabledClass",null),i.__decorate([o.HostBinding("attr.dir"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"dir",null),i.__decorate([o.HostListener("keydown",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleKeydown",null),t=n=i.__decorate([o.Component({exportAs:"kendoUpload",providers:[a.LocalizationService,h.NavigationService,y.UploadService,_.DropZoneService,e.UPLOAD_VALUE_ACCESSOR,{provide:a.L10N_PREFIX,useValue:"kendo.upload"},{provide:u.KendoInput,useExisting:o.forwardRef((function(){return n}))}],selector:"kendo-upload",template:'\n <ng-container kendoUploadLocalizedMessages\n i18n-cancel="kendo.upload.cancel|The text for the Cancel button"\n cancel="Cancel"\n\n i18n-clearSelectedFiles="kendo.upload.clearSelectedFiles|The text for the Clear button"\n clearSelectedFiles="Clear"\n\n i18n-dropFilesHere="kendo.upload.dropFilesHere|The drop zone hint"\n dropFilesHere="Drop files here to upload"\n\n i18n-filesBatchStatus="kendo.upload.filesBatchStatus|The status message for a batch of files"\n filesBatchStatus="files"\n\n i18n-filesBatchStatusFailed="kendo.upload.filesBatchStatusFailed|The status message for a batch of files after failed upload"\n filesBatchStatusFailed="files failed to upload."\n\n i18n-filesBatchStatusUploaded="kendo.upload.filesBatchStatusUploaded|The status message for a batch of files after successful upload"\n filesBatchStatusUploaded="files successfully uploaded."\n\n i18n-fileStatusFailed="kendo.upload.fileStatusFailed|The file status message after failed upload"\n fileStatusFailed="File failed to upload."\n\n i18n-fileStatusUploaded="kendo.upload.fileStatusUploaded|The file status message after successful upload"\n fileStatusUploaded="File successfully uploaded."\n\n i18n-headerStatusPaused="kendo.upload.headerStatusPaused|The header status message when the file upload is paused"\n headerStatusPaused="Paused"\n\n i18n-headerStatusUploaded="kendo.upload.headerStatusUploaded|The header status message after file upload completion"\n headerStatusUploaded="Done"\n\n i18n-headerStatusUploading="kendo.upload.headerStatusUploading|The header status message during file upload"\n headerStatusUploading="Uploading..."\n\n i18n-invalidFileExtension="kendo.upload.invalidFileExtension|The text for the invalid allowed extensions restriction message"\n invalidFileExtension="File type not allowed."\n\n i18n-invalidMaxFileSize="kendo.upload.invalidMaxFileSize|The text for the invalid max file size restriction message"\n invalidMaxFileSize="File size too large."\n\n i18n-invalidMinFileSize="kendo.upload.invalidMinFileSize|The text for the invalid min file size restriction message"\n invalidMinFileSize="File size too small."\n\n i18n-pause="kendo.upload.pause|The text for the Pause button"\n pause="Pause"\n\n i18n-remove="kendo.upload.remove|The text for the Remove button"\n remove="Remove"\n\n i18n-resume="kendo.upload.resume|The text for the Resume button"\n resume="Resume"\n\n i18n-retry="kendo.upload.retry|The text for the Retry button"\n retry="Retry"\n\n i18n-select="kendo.upload.select|The text for the Select button"\n select="Select files..."\n\n i18n-uploadSelectedFiles="kendo.upload.uploadSelectedFiles|The text for the Upload files button"\n uploadSelectedFiles="Upload"\n >\n </ng-container>\n <div kendoUploadInternalDropZone\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled">\n <div role="button" #fileSelectButton\n [id]="focusableId"\n [attr.aria-label]="textFor(\'select\')"\n [attr.tabindex]="selectButtonTabIndex"\n (focus)="onFileSelectButtonFocus($event)"\n (blur)="onFileSelectButtonBlur($event)"\n class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-upload-button">\n <input #fileSelect kendoFileSelect\n [attr.accept]="accept ? accept : null"\n [attr.aria-hidden]="true"\n [dir]="direction"\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled" />\n <span>{{textFor(\'select\')}}</span>\n </div>\n <kendo-upload-status-total *ngIf="showTotalStatus"\n class="k-upload-status k-upload-status-total"\n [fileList]="fileList">\n </kendo-upload-status-total>\n <div class="k-dropzone-hint">{{textFor(\'dropFilesHere\')}}</div>\n </div>\n <ul kendo-upload-file-list *ngIf="showFileList && fileList.count > 0"\n class="k-upload-files k-reset"\n [disabled]="disabled"\n [fileList]="fileList.files"\n [fileTemplate]="fileTemplate"\n [fileInfoTemplate]="fileInfoTemplate">\n </ul>\n <kendo-upload-action-buttons\n *ngIf="showActionButtons"\n [disabled]="disabled"\n [actionsLayout]="actionsLayout">\n </kendo-upload-action-buttons>\n '}),i.__metadata("design:paramtypes",[y.UploadService,a.LocalizationService,h.NavigationService,_.DropZoneService,o.NgZone,o.Renderer2,o.ChangeDetectorRef,o.ElementRef])],t)}();e.UploadComponent=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(15),s=n(24),u=[o.FileSelectComponent],a=function(){function t(){}return t=i.__decorate([r.NgModule({declarations:[u],exports:[s.PUBLIC_DIRECTIVES,u],imports:[s.SharedModule]})],t)}();e.FileSelectModule=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(16),s=n(2),u=n(8),a=n(17),c=n(42),l=n(18),p=n(19),d=n(3),f=n(6),h=n(5),v=n(10),y=n(21),b=n(11),_=n(7);e.FILESELECT_VALUE_ACCESSOR={multi:!0,provide:o.NG_VALUE_ACCESSOR,useExisting:r.forwardRef((function(){return m}))};var m=function(){function t(t,e,n,i,o,s,a,c){var d=this;this.uploadService=t,this.localization=e,this.navigation=n,this.dropZoneService=i,this.ngZone=o,this.renderer=s,this.cdr=a,this.disabled=!1,this.multiple=!0,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+u.guid(),this.onBlur=new r.EventEmitter,this.onFocus=new r.EventEmitter,this.select=new r.EventEmitter,this.remove=new r.EventEmitter,this.valueChange=new r.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(t){},this.onChangeCallback=function(t){},l.validatePackage(p.packageMetadata),this.wrapper=c.nativeElement,this.direction=e.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.fileList=this.uploadService.files,this.localizationChangeSubscription=e.changes.subscribe((function(t){var e=t.rtl;d.direction=e?"rtl":"ltr",d.navigation.computeKeys(d.direction)})),this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers(),this.setDefaultSettings()}var n;return n=t,Object.defineProperty(t.prototype,"name",{get:function(){return this.uploadService.async.saveField},set:function(t){this.uploadService.async.saveField=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"restrictions",{get:function(){return this._restrictions},set:function(t){var e=Object.assign({},this._restrictions,t);this._restrictions=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dir",{get:function(){return this.direction},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.renderer.removeAttribute(this.wrapper,"tabindex"),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},t.prototype.textFor=function(t){return this.localization.get(t)},t.prototype.focus=function(){var t=this;setTimeout((function(){t.fileSelectButton.nativeElement.focus()}))},t.prototype.ngOnDestroy=function(){this.fileList.clear(),this.blurSubscription&&this.blurSubscription.unsubscribe(),this.wrapperFocusSubscription&&this.wrapperFocusSubscription.unsubscribe(),this.selectButtonFocusSubscription&&this.selectButtonFocusSubscription.unsubscribe(),this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe(),this.subs&&this.subs.unsubscribe()},t.prototype.handleKeydown=function(t){if(!this.disabled)return t.keyCode!==u.Keys.Enter&&t.keyCode!==u.Keys.Space||t.target!==this.fileSelectButton.nativeElement?void((h.hasClasses(t.target,h.UPLOAD_CLASSES)||!h.isFocusable(t.target)&&!h.hasClasses(t.target,h.IGNORE_TARGET_CLASSES))&&this.navigation.process(t)):(t.preventDefault(),void this.fileSelect.nativeElement.click())},t.prototype.writeValue=function(t){var e=!0;t instanceof Array&&(t.forEach((function(t){h.validateInitialFileSelectFile(t)||(e=!1)})),e&&this.uploadService.addInitialFileSelectFiles(t)),null===t&&this.fileList.clear(),this.cdr.markForCheck()},t.prototype.registerOnChange=function(t){this.onChangeCallback=t},t.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},t.prototype.setDisabledState=function(t){this.disabled=t},t.prototype.removeFileByUid=function(t){this.uploadService.removeFiles(t)},t.prototype.clearFiles=function(){this.uploadService.clearFiles()},t.prototype.isEmpty=function(){return!1},t.prototype.addFiles=function(t){this.uploadService.addFiles(t)},Object.defineProperty(t.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabindex},enumerable:!0,configurable:!0}),t.prototype.onFileSelectButtonFocus=function(t){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-focus"),this.navigation.focused||(this.navigation.focusedIndex=-1)},t.prototype.onFileSelectButtonBlur=function(t){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-focus")},t.prototype.subscribeBlur=function(){var t=this;u.isDocumentAvailable()&&this.ngZone.runOutsideAngular((function(){t.documentClick=a.fromEvent(document,"click").pipe(c.filter((function(e){return!(t.wrapper!==e.target&&t.wrapper.contains(e.target))}))),t.blurSubscription=a.merge(t.documentClick,t.navigation.onTab).subscribe((function(){t.navigation.focused&&t.ngZone.run((function(){t.navigation.focused=!1,t.onTouchedCallback(),t.onBlur.emit()}))}))}))},t.prototype.subscribeFocus=function(){var t=this;this.wrapperFocusSubscription=this.navigation.onWrapperFocus.subscribe((function(){t.onFocus.emit()})),this.selectButtonFocusSubscription=this.navigation.onSelectButtonFocus.subscribe((function(){t.fileSelectButton.nativeElement.focus()}))},t.prototype.attachEventHandlers=function(){var t=this;this.subs=this.uploadService.changeEvent.subscribe((function(e){var n=[];null!==e&&e.forEach((function(t){t.state===y.FileState.Initial&&n.push(t),t.state===y.FileState.Selected&&t.rawFile&&!t.validationErrors&&n.push(t.rawFile)})),0===n.length&&(n=null),t.onChangeCallback(n),t.valueChange.emit(n)})),this.subs.add(this.uploadService.removeEvent.subscribe((function(e){t.remove.emit(e)}))),this.subs.add(this.uploadService.selectEvent.subscribe((function(e){t.select.emit(e)})))},t.prototype.setDefaultSettings=function(){this.uploadService.async.autoUpload=!1,this.uploadService.component="FileSelect"},i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"accept",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"multiple",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"name",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"showFileList",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Number)],t.prototype,"tabindex",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[Object])],t.prototype,"restrictions",null),i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"zoneId",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"focusableId",void 0),i.__decorate([r.ContentChild(v.FileTemplateDirective,{static:!1}),i.__metadata("design:type",v.FileTemplateDirective)],t.prototype,"fileTemplate",void 0),i.__decorate([r.ContentChild(_.FileInfoTemplateDirective,{static:!1}),i.__metadata("design:type",_.FileInfoTemplateDirective)],t.prototype,"fileInfoTemplate",void 0),i.__decorate([r.ViewChild("fileSelect",{static:!0}),i.__metadata("design:type",r.ElementRef)],t.prototype,"fileSelect",void 0),i.__decorate([r.ViewChild("fileSelectButton",{static:!0}),i.__metadata("design:type",r.ElementRef)],t.prototype,"fileSelectButton",void 0),i.__decorate([r.Output("blur"),i.__metadata("design:type",r.EventEmitter)],t.prototype,"onBlur",void 0),i.__decorate([r.Output("focus"),i.__metadata("design:type",r.EventEmitter)],t.prototype,"onFocus",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"select",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"remove",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"valueChange",void 0),i.__decorate([r.HostBinding("class.k-widget"),r.HostBinding("class.k-upload"),i.__metadata("design:type",Boolean)],t.prototype,"hostDefaultClasses",void 0),i.__decorate([r.HostBinding("class.k-disabled"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"hostDisabledClass",null),i.__decorate([r.HostBinding("attr.dir"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"dir",null),i.__decorate([r.HostListener("keydown",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleKeydown",null),t=n=i.__decorate([r.Component({exportAs:"kendoFileSelect",providers:[s.LocalizationService,f.NavigationService,d.UploadService,b.DropZoneService,e.FILESELECT_VALUE_ACCESSOR,{provide:s.L10N_PREFIX,useValue:"kendo.fileselect"},{provide:u.KendoInput,useExisting:r.forwardRef((function(){return n}))}],selector:"kendo-fileselect",template:'\n <ng-container kendoFileSelectLocalizedMessages\n i18n-dropFilesHere="kendo.fileselect.dropFilesHere|The drop zone hint"\n dropFilesHere="Drop files here to select"\n\n i18n-invalidFileExtension="kendo.fileselect.invalidFileExtension|The text for the invalid allowed extensions restriction message"\n invalidFileExtension="File type not allowed."\n\n i18n-invalidMaxFileSize="kendo.fileselect.invalidMaxFileSize|The text for the invalid max file size restriction message"\n invalidMaxFileSize="File size too large."\n\n i18n-invalidMinFileSize="kendo.fileselect.invalidMinFileSize|The text for the invalid min file size restriction message"\n invalidMinFileSize="File size too small."\n\n i18n-remove="kendo.fileselect.remove|The text for the Remove button"\n remove="Remove"\n\n i18n-select="kendo.fileselect.select|The text for the Select button"\n select="Select files..."\n >\n </ng-container>\n <div kendoFileSelectInternalDropZone\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled">\n <div role="button" #fileSelectButton\n [id]="focusableId"\n [attr.aria-label]="textFor(\'select\')"\n [attr.tabindex]="selectButtonTabIndex"\n (focus)="onFileSelectButtonFocus($event)"\n (blur)="onFileSelectButtonBlur($event)"\n class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-upload-button">\n <input #fileSelect kendoFileSelect\n [attr.accept]="accept ? accept : null"\n [dir]="direction"\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled" />\n <span>{{textFor(\'select\')}}</span>\n </div>\n <div class="k-dropzone-hint">{{textFor(\'dropFilesHere\')}}</div>\n </div>\n <ul kendo-upload-file-list\n class="k-upload-files k-reset"\n *ngIf="showFileList && fileList.count > 0"\n [disabled]="disabled"\n [fileList]="fileList.files"\n [fileTemplate]="fileTemplate"\n [fileInfoTemplate]="fileInfoTemplate">\n </ul>\n '}),i.__metadata("design:paramtypes",[d.UploadService,s.LocalizationService,f.NavigationService,b.DropZoneService,r.NgZone,r.Renderer2,r.ChangeDetectorRef,r.ElementRef])],t)}();e.FileSelectComponent=m},function(t,e){t.exports=i},function(t,e){t.exports=r},function(t,e){t.exports=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packageMetadata={name:"@progress/kendo-angular-upload",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1646671545,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(t,e){t.exports=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.Failed=0]="Failed",t[t.Initial=1]="Initial",t[t.Selected=2]="Selected",t[t.Uploaded=3]="Uploaded",t[t.Uploading=4]="Uploading",t[t.Paused=5]="Paused"}(e.FileState||(e.FileState={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(4),r=function(){function t(){this._files={}}return t.prototype.add=function(t){var e=t.uid;this.has(e)?t.validationErrors&&t.validationErrors.length>0?this._files[e].unshift(t):this._files[e].push(t):this._files[e]=[t]},t.prototype.remove=function(t){this.has(t)&&(this._files[t]=null,delete this._files[t])},t.prototype.clear=function(){var t=this._files;for(var e in t)if(t.hasOwnProperty(e)){for(var n=0,i=t[e];n<i.length;n++){var r=i[n];r.httpSubscription&&r.httpSubscription.unsubscribe()}t[e]=null,delete t[e]}},t.prototype.has=function(t){return t in this._files},t.prototype.get=function(t){return this._files[t]},t.prototype.setFilesState=function(t,e){for(var n=0,i=t;n<i.length;n++){var r=i[n];this.setFilesStateByUid(r.uid,e)}},t.prototype.setFilesStateByUid=function(t,e){this.get(t).forEach((function(t){t.state=e}))},Object.defineProperty(t.prototype,"count",{get:function(){return Object.getOwnPropertyNames(this._files).length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"files",{get:function(){var t=this._files,e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filesFlat",{get:function(){var t=this._files,e=[];for(var n in t){if(t.hasOwnProperty(n))t[n].forEach((function(t){e.push(t)}))}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filesToUpload",{get:function(){var t=this._files,e=[];for(var n in t)if(t.hasOwnProperty(n)){for(var r=t[n],o=!0,s=0,u=r;s<u.length;s++){var a=u[s];(a.state!==i.FileState.Selected||a.validationErrors&&a.validationErrors.length>0)&&(o=!1)}o&&e.push(r)}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstFileToUpload",{get:function(){var t=this._files;for(var e in t)if(t.hasOwnProperty(e)){for(var n=t[e],r=!0,o=0,s=n;o<s.length;o++){var u=s[o];(u.state!==i.FileState.Selected||u.validationErrors&&u.validationErrors.length>0)&&(r=!1)}if(r)return n}return null},enumerable:!0,configurable:!0}),t.prototype.getFilesWithState=function(t){return this.filesFlat.filter((function(e){return e.state===t}))},t.prototype.hasFileWithState=function(t){var e=this._files;for(var n in e)if(e.hasOwnProperty(n))for(var i=0,r=e[n];i<r.length;i++){var o=r[i];if(t.indexOf(o.state)>=0)return!0}return!1},t}();e.FileMap=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(44);e.CancelEvent=i.CancelEvent;var r=n(45);e.ClearEvent=r.ClearEvent;var o=n(46);e.ErrorEvent=o.ErrorEvent;var s=n(47);e.PauseEvent=s.PauseEvent;var u=n(48);e.RemoveEvent=u.RemoveEvent;var a=n(49);e.ResumeEvent=a.ResumeEvent;var c=n(50);e.SelectEvent=c.SelectEvent;var l=n(51);e.SuccessEvent=l.SuccessEvent;var p=n(52);e.UploadEvent=p.UploadEvent;var d=n(53);e.UploadProgressEvent=d.UploadProgressEvent},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(7),o=n(1),s=n(56),u=n(25),a=n(57),c=n(28),l=n(29),p=n(30),d=n(31),f=n(34),h=n(35),v=n(10),y=n(58),b=n(36),_=n(37),m=n(38);e.SHARED_DECLARATIONS=[a.DropZoneInternalDirective,c.FileListComponent,l.FileListItemDirective,p.FileListItemActionButtonComponent,d.FileListMultipleItemsComponent,f.FileListSingleItemComponent,h.FileSelectDirective,y.LocalizedMessagesDirective,b.TemplateContextDirective],e.PUBLIC_DIRECTIVES=[v.FileTemplateDirective,r.FileInfoTemplateDirective,u.CustomMessagesComponent,_.UploadDropZoneDirective,m.UploadDropZoneComponent];var g=function(){function t(){}return t=i.__decorate([o.NgModule({declarations:[e.PUBLIC_DIRECTIVES,e.SHARED_DECLARATIONS],exports:[e.PUBLIC_DIRECTIVES,e.SHARED_DECLARATIONS,s.CommonModule],imports:[s.CommonModule]})],t)}();e.SharedModule=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(26),s=n(2),u=function(t){function e(e){var n=t.call(this)||this;return n.service=e,n}var n;return i.__extends(e,t),n=e,Object.defineProperty(e.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),e=n=i.__decorate([r.Component({providers:[{provide:o.Messages,useExisting:r.forwardRef((function(){return n}))}],selector:"kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages",template:""}),i.__metadata("design:paramtypes",[s.LocalizationService])],e)}(o.Messages);e.CustomMessagesComponent=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"cancel",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"clearSelectedFiles",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"dropFilesHere",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"externalDropFilesHere",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"filesBatchStatus",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"filesBatchStatusFailed",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"filesBatchStatusUploaded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"fileStatusFailed",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"fileStatusUploaded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"headerStatusPaused",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"headerStatusUploaded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"headerStatusUploading",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"invalidFileExtension",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"invalidMaxFileSize",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"invalidMinFileSize",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"pause",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"remove",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"resume",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"retry",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"select",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"uploadSelectedFiles",void 0),e}(n(2).ComponentMessages);e.Messages=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=function(){function t(t,e,n){this.element=t,this.renderer=e,this.hideIntervalElement=null,this.hoverClass=n}return t.prototype.onElementDragEnterListener=function(){var t=this;return this.addClass(this.hoverClass),this.lastDragElement=new Date,this.hideIntervalElement||(this.hideIntervalElement=setInterval((function(){t.calculateTimeDiff(t.lastDragElement)<100||(t.removeClass(t.hoverClass),clearInterval(t.hideIntervalElement),t.hideIntervalElement=null)}),100)),!1},t.prototype.onElementDragOverListener=function(){return this.lastDragElement=new Date,!1},t.prototype.calculateTimeDiff=function(t){return(new Date).getTime()-t.getTime()},t.prototype.addClass=function(t){this.renderer.addClass(this.element.nativeElement,t)},t.prototype.removeClass=function(t){this.renderer.removeClass(this.element.nativeElement,t)},i.__decorate([r.HostListener("dragenter"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Boolean)],t.prototype,"onElementDragEnterListener",null),i.__decorate([r.HostListener("dragover"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Boolean)],t.prototype,"onElementDragOverListener",null),t}();e.DropZoneBase=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(8),s=n(4),u=n(10),a=n(29),c=n(6),l=n(3),p=n(7),d=function(){function t(t,e){this.uploadService=t,this.navigation=e,this.onItemFocus(),this.onItemAction()}return t.prototype.onItemFocus=function(){var t=this;this.focusSubscription=this.navigation.onFileFocus.subscribe((function(e){t.fileListItems.toArray()[e].focus()}))},t.prototype.onItemAction=function(){var t=this;this.actionSubscription=this.navigation.onFileAction.subscribe((function(e){t.itemActionHandler(e)}))},t.prototype.itemActionHandler=function(t){var e=this.navigation.focusedIndex,n=this.fileListItems.toArray()[e],i=n.uidAttribute,r=this.uploadService.files.get(i);if(t===o.Keys.Escape&&r[0].state===s.FileState.Uploading)return this.uploadService.cancelFiles(i),void this.navigation.focusSelectButton();t!==o.Keys.Enter||r[0].state!==s.FileState.Failed?t===o.Keys.Delete&&(r[0].state===s.FileState.Uploading?this.uploadService.cancelFiles(i):this.hasDelete(n)&&this.uploadService.removeFiles(i),this.navigation.focusSelectButton()):this.uploadService.retryFiles(i)},t.prototype.hasDelete=function(t){return t.element.nativeElement.getElementsByClassName("k-delete").length>0},t.prototype.ngOnDestroy=function(){this.focusSubscription.unsubscribe(),this.actionSubscription.unsubscribe()},i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],t.prototype,"fileList",void 0),i.__decorate([r.Input(),i.__metadata("design:type",u.FileTemplateDirective)],t.prototype,"fileTemplate",void 0),i.__decorate([r.Input(),i.__metadata("design:type",p.FileInfoTemplateDirective)],t.prototype,"fileInfoTemplate",void 0),i.__decorate([r.ViewChildren(a.FileListItemDirective),i.__metadata("design:type",r.QueryList)],t.prototype,"fileListItems",void 0),t=i.__decorate([r.Component({selector:"[kendo-upload-file-list]",template:"\n <ng-template ngFor\n [ngForOf]=\"fileList\"\n let-files\n let-index=\"index\">\n <li kendoUploadFileListItem [files]='files' [index]='index'>\n <kendo-upload-file-list-single-item\n class='k-file-single'\n *ngIf='files.length === 1 && !fileTemplate'\n [disabled]='disabled'\n [file]='files[0]'\n [fileInfoTemplate]=\"fileInfoTemplate\">\n </kendo-upload-file-list-single-item>\n <kendo-upload-file-list-multiple-items\n class='k-file-multiple'\n *ngIf='files.length > 1 && !fileTemplate'\n [disabled]='disabled'\n [files]='files'\n [fileInfoTemplate]=\"fileInfoTemplate\">\n </kendo-upload-file-list-multiple-items>\n <ng-template *ngIf=\"fileTemplate\"\n [templateContext]=\"{\n templateRef: fileTemplate.templateRef,\n state: files[0].state,\n $implicit: files\n }\"></ng-template>\n </li>\n </ng-template>\n "}),i.__metadata("design:paramtypes",[l.UploadService,c.NavigationService])],t)}();e.FileListComponent=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(4),s=n(6),u=n(5),a=n(3),c=function(){function t(t,e,n){this.navigationService=e,this.uploadService=n,this.fileClass=!0,this.focused=!1,this.element=t}return t.prototype.focus=function(){this.element.nativeElement.focus()},Object.defineProperty(t.prototype,"uidAttribute",{get:function(){return this.files[0].uid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabIndex",{get:function(){return"-1"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kFileError",{get:function(){return this.files[0].state===o.FileState.Failed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kFileInvalid",{get:function(){return u.filesHaveValidationErrors(this.files)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kFileProgress",{get:function(){return this.files[0].state===o.FileState.Uploading||this.files[0].state===o.FileState.Paused},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kFileSuccess",{get:function(){return"Upload"===this.uploadService.component&&(this.files[0].state===o.FileState.Uploaded||this.files[0].state===o.FileState.Initial)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kStateFocused",{get:function(){return this.focused},enumerable:!0,configurable:!0}),t.prototype.onFocus=function(){this.focused=!0},t.prototype.onBlur=function(){this.focused=!1},t.prototype.onClick=function(t){u.isFocusable(t.target)||u.hasClasses(t.target,u.IGNORE_TARGET_CLASSES)||(this.navigationService.focusedIndex=this.index)},i.__decorate([r.Input(),i.__metadata("design:type",Array)],t.prototype,"files",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Number)],t.prototype,"index",void 0),i.__decorate([r.HostBinding("class.k-file"),i.__metadata("design:type",Boolean)],t.prototype,"fileClass",void 0),i.__decorate([r.HostBinding("attr.data-uid"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"uidAttribute",null),i.__decorate([r.HostBinding("attr.tabIndex"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"tabIndex",null),i.__decorate([r.HostBinding("class.k-file-error"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"kFileError",null),i.__decorate([r.HostBinding("class.k-file-invalid"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"kFileInvalid",null),i.__decorate([r.HostBinding("class.k-file-progress"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"kFileProgress",null),i.__decorate([r.HostBinding("class.k-file-success"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"kFileSuccess",null),i.__decorate([r.HostBinding("class.k-state-focused"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"kStateFocused",null),i.__decorate([r.HostListener("focus"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"onFocus",null),i.__decorate([r.HostListener("blur"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"onBlur",null),i.__decorate([r.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"onClick",null),t=i.__decorate([r.Directive({selector:"[kendoUploadFileListItem]"}),i.__metadata("design:paramtypes",[r.ElementRef,s.NavigationService,a.UploadService])],t)}();e.FileListItemDirective=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(4),s=n(3),u=n(2),a=n(6),c=function(){function t(t,e,n){this.uploadService=t,this.localization=e,this.navigation=n,this.actionFocused=!1,this.retryFocused=!1,this.pauseResumeFocused=!1}return t.prototype.onFocus=function(t){"action"===t&&(this.actionFocused=!0),"retry"===t&&(this.retryFocused=!0),"pauseResume"===t&&(this.pauseResumeFocused=!0)},t.prototype.onBlur=function(t){"retry"===t&&(this.retryFocused=!1),"action"===t&&(this.actionFocused=!1),"pauseResume"===t&&(this.pauseResumeFocused=!1)},t.prototype.onRetryClick=function(){this.disabled||this.uploadService.retryFiles(this.file.uid)},t.prototype.onRemoveCancelClick=function(t){if(!this.disabled){t.stopImmediatePropagation();var e=this.file.uid;this.file.state===o.FileState.Uploading?this.uploadService.cancelFiles(e):this.uploadService.removeFiles(e),this.navigation.focusSelectButton()}},t.prototype.onPauseResumeClick=function(){if(!this.disabled){var t=this.file.uid;this.file.state===o.FileState.Paused?this.uploadService.resumeFile(t):this.uploadService.pauseFile(t)}},Object.defineProperty(t.prototype,"actionButtonTitle",{get:function(){return this.file.state===o.FileState.Uploading?this.localization.get("cancel"):this.localization.get("remove")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"retryButtonTitle",{get:function(){return this.localization.get("retry")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pauseResumeButtonTitle",{get:function(){return this.file.state===o.FileState.Uploading?this.localization.get("pause"):this.localization.get("resume")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUploading",{get:function(){return this.file.state===o.FileState.Uploading},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isFailed",{get:function(){return this.file.state===o.FileState.Failed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPaused",{get:function(){return this.file.state===o.FileState.Paused},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isResumable",{get:function(){var t=this.uploadService,e=t.async.chunk&&t.chunk.resumable,n=this.file.state===o.FileState.Paused||this.file.state===o.FileState.Uploading;return e&&n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isActionButtonVisible",{get:function(){return!!(this.file.state!==o.FileState.Uploaded&&this.file.state!==o.FileState.Initial||this.uploadService.async.removeUrl||"Upload"!==this.uploadService.component)},enumerable:!0,configurable:!0}),i.__decorate([r.Input(),i.__metadata("design:type",Object)],t.prototype,"file",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Number)],t.prototype,"progress",void 0),t=i.__decorate([r.Component({selector:"kendo-upload-file-list-item-action-button",template:'\n <strong class="k-upload-status">\n <span class="k-upload-pct" *ngIf="isUploading || isPaused">{{progress}}%</span>\n\n <button type="button" *ngIf="isFailed" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.retryFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'retry\')"\n (blur)="onBlur(\'retry\')"\n (click)="onRetryClick()">\n <span class="k-icon k-button-icon k-retry k-i-refresh-sm"\n [attr.aria-label]="retryButtonTitle"\n [attr.title]="retryButtonTitle">\n </span>\n </button>\n\n <button *ngIf="isResumable" type="button" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.pauseResumeFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'pauseResume\')"\n (blur)="onBlur(\'pauseResume\')"\n (click)="onPauseResumeClick()">\n <span class="k-icon k-button-icon"\n [ngClass]="{\n \'k-i-play-sm\': isPaused,\n \'k-i-pause-sm\': !isPaused\n }"\n [attr.aria-label]=\'pauseResumeButtonTitle\'\n [attr.title]=\'pauseResumeButtonTitle\'>\n </span>\n </button>\n\n <button type="button" *ngIf="isActionButtonVisible" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.actionFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'action\')"\n (blur)="onBlur(\'action\')"\n (click)="onRemoveCancelClick($event)">\n <span class="k-icon k-button-icon"\n [ngClass]="{\n \'k-i-cancel\': isUploading,\n \'k-delete k-i-x\': !isUploading\n }"\n [attr.aria-label]=\'actionButtonTitle\'\n [attr.title]=\'actionButtonTitle\'>\n </span>\n </button>\n </strong>\n '}),i.__metadata("design:paramtypes",[s.UploadService,u.LocalizationService,a.NavigationService])],t)}();e.FileListItemActionButtonComponent=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(32),s=n(4),u=n(33),a=n(2),c=n(3),l=n(5),p=n(7),d=function(t){function e(e,n){var i=t.call(this,n)||this;return i.localization=e,i.subscribeUploadProgress((function(t){t.files[0].uid===i.files[0].uid&&(i.progressComplete=t.percentComplete)})),i}return i.__extends(e,t),Object.defineProperty(e.prototype,"showProgress",{get:function(){return this.files[0].state===s.FileState.Uploading||this.files[0].state===s.FileState.Paused?"active":"inactive"},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.filesHaveErrors=t.prototype.filesHaveValidationErrors.call(this,this.files)},e.prototype.fileStatusText=function(t){var e=t.validationErrors;return l.isPresent(e)?this.getFileValidationMessage(t):this.getTotalFilesSizeMessage([t])},Object.defineProperty(e.prototype,"batchStatusText",{get:function(){var t=this.files[0].state,e=this.files.length;return t===s.FileState.Uploaded?e+" "+this.textFor("filesBatchStatusUploaded"):t===s.FileState.Failed?e+" "+this.textFor("filesBatchStatusFailed"):e+" "+this.textFor("filesBatchStatus")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUploadSuccessful",{get:function(){return this.files[0].state===s.FileState.Uploaded},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUploadFailed",{get:function(){return this.files[0].state===s.FileState.Failed},enumerable:!0,configurable:!0}),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],e.prototype,"files",void 0),i.__decorate([r.Input(),i.__metadata("design:type",p.FileInfoTemplateDirective)],e.prototype,"fileInfoTemplate",void 0),e=i.__decorate([r.Component({animations:[o.trigger("progressState",[o.state("active",o.style({opacity:1})),o.state("inactive",o.style({opacity:0})),o.transition("void => active",o.style({opacity:0})),o.transition("inactive => active",o.style({opacity:1})),o.transition("active => inactive",o.animate("1s 2s ease-out"))])],selector:"kendo-upload-file-list-multiple-items",template:'\n <div class="k-progressbar" [@progressState]="showProgress">\n <span class="k-progress" [style.width]="progressComplete + \'%\'"></span>\n </div>\n <span class="k-multiple-files-group-wrapper">\n <span class="k-file-group k-icon k-i-copy"></span>\n </span>\n <span class="k-multiple-files-wrapper">\n <ng-container *ngIf="!fileInfoTemplate">\n <span *ngFor="let file of files" class="k-file-name-size-wrapper">\n <span [title]="file.name" class="k-file-name">\n {{file.name}}\n </span>\n <span [ngClass]="{\n \'k-text-error\': file.validationErrors,\n \'k-file-validation-message\': file.validationErrors,\n \'k-file-size\': !file.validationErrors\n }"\n >{{fileStatusText(file)}}</span>\n </span>\n <span class="k-file-information"\n [ngClass]="{\n \'k-text-success\': isUploadSuccessful,\n \'k-text-error\': isUploadFailed\n }"\n >{{batchStatusText}}</span>\n </ng-container>\n <ng-template *ngIf="fileInfoTemplate"\n [templateContext]="{\n templateRef: fileInfoTemplate.templateRef,\n state: files[0].state,\n $implicit: files\n }">\n </ng-template>\n </span>\n <kendo-upload-file-list-item-action-button\n [file]=\'files[0]\'\n [disabled]=\'disabled\'\n [progress]=\'progressComplete\'>\n </kendo-upload-file-list-item-action-button>\n '}),i.__metadata("design:paramtypes",[a.LocalizationService,c.UploadService])],e)}(u.FileListItemBase);e.FileListMultipleItemsComponent=d},function(t,e){t.exports=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),r=function(){function t(t){this.uploadService=t,this.progressComplete=0}return t.prototype.subscribeUploadProgress=function(t){this.uploadProgressSubscription=this.uploadService.uploadProgressEvent.subscribe(t)},t.prototype.fileHasValidationErrors=function(t){return i.fileHasValidationErrors(t)},t.prototype.filesHaveValidationErrors=function(t){return i.filesHaveValidationErrors(t)},t.prototype.ngOnDestroy=function(){this.uploadProgressSubscription.unsubscribe()},t.prototype.getFileValidationMessage=function(t){var e;return t.validationErrors&&t.validationErrors.length>0&&(e=this.localization.get(t.validationErrors[0])),e},t.prototype.getTotalFilesSizeMessage=function(t){return i.getTotalFilesSizeMessage(t)},t.prototype.textFor=function(t){return this.localization.get(t)},t}();e.FileListItemBase=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(32),s=n(4),u=n(33),a=n(2),c=n(3),l=n(5),p=n(7),d=function(t){function e(e,n){var i=t.call(this,n)||this;return i.localization=e,i.subscribeUploadProgress((function(t){t.files[0].uid===i.file.uid&&(i.progressComplete=t.percentComplete)})),i}return i.__extends(e,t),Object.defineProperty(e.prototype,"fileStatusText",{get:function(){var t=this.file.validationErrors;return this.file.state===s.FileState.Uploaded?""+this.textFor("fileStatusUploaded"):this.file.state===s.FileState.Failed?""+this.textFor("fileStatusFailed"):l.isPresent(t)?this.getFileValidationMessage(this.file):this.getTotalFilesSizeMessage([this.file])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showProgress",{get:function(){return this.file.state===s.FileState.Uploading||this.file.state===s.FileState.Paused?"active":"inactive"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fileGroupClass",{get:function(){return l.getFileGroupCssClass(this.file.extension?this.file.extension:"")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUploadSuccessful",{get:function(){return this.file.state===s.FileState.Uploaded},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUploadFailed",{get:function(){return this.file.state===s.FileState.Failed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isNotYetUploaded",{get:function(){return!this.isUploadFailed&&!this.isUploadSuccessful},enumerable:!0,configurable:!0}),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"file",void 0),i.__decorate([r.Input(),i.__metadata("design:type",p.FileInfoTemplateDirective)],e.prototype,"fileInfoTemplate",void 0),e=i.__decorate([r.Component({animations:[o.trigger("progressState",[o.state("active",o.style({opacity:1})),o.state("inactive",o.style({opacity:0})),o.transition("void => active",o.style({opacity:0})),o.transition("inactive => active",o.style({opacity:1})),o.transition("active => inactive",o.animate("1s 2s ease-out"))])],selector:"kendo-upload-file-list-single-item",template:'\n <div class="k-progressbar" [@progressState]="showProgress">\n <span class="k-progress" [style.width]="progressComplete + \'%\'"></span>\n </div>\n <span class="k-file-group-wrapper">\n <span class="k-file-group k-icon" [ngClass]="fileGroupClass"></span>\n </span>\n <span class="k-file-name-size-wrapper">\n <ng-container *ngIf="!fileInfoTemplate">\n <span class="k-file-name" [title]="file.name">{{ file.name }}</span>\n <span [ngClass]="{\n \'k-file-validation-message\': file.validationErrors,\n \'k-file-size\': !file.validationErrors && isNotYetUploaded,\n \'k-text-success\': isUploadSuccessful,\n \'k-text-error\': file.validationErrors || isUploadFailed,\n \'k-file-information\': isUploadSuccessful || isUploadFailed\n }"\n >{{fileStatusText}}</span>\n </ng-container>\n <ng-template *ngIf="fileInfoTemplate"\n [templateContext]="{\n templateRef: fileInfoTemplate.templateRef,\n state: file.state,\n $implicit: [file]\n }">\n </ng-template>\n </span>\n <kendo-upload-file-list-item-action-button\n [file]=\'file\'\n [disabled]=\'disabled\'\n [progress]=\'progressComplete\'>\n </kendo-upload-file-list-item-action-button>\n '}),i.__metadata("design:paramtypes",[a.LocalizationService,c.UploadService])],e)}(u.FileListItemBase);e.FileListSingleItemComponent=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(6),s=n(3),u=n(5),a=n(12),c=function(){function t(t,e,n){this.uploadService=t,this.navigation=e,this.type="file",this.autocomplete="off",this.tabIndex=-1,this.element=n}return Object.defineProperty(t.prototype,"nameAttribute",{get:function(){return this.uploadService.async.saveField},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"multipleAttribute",{get:function(){return this.multiple?"multiple":null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirAttribute",{get:function(){return this.dir},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabledAttribute",{get:function(){return this.disabled?"true":null},enumerable:!0,configurable:!0}),t.prototype.onInputChange=function(t){var e=this,n=navigator.userAgent,i=u.inputFiles(t.target);i=u.assignGuidToFiles(i,!this.uploadService.async.batch),a.validateFiles(i,this.restrictions),this.multiple||this.uploadService.clearFiles(),this.uploadService.addFiles(i);var r=this.element.nativeElement;(n.match(/(webkit)[ \/]([\w.]+)/i)||n.match(/(windows)[ \/]([\w.]+)/i))&&(r.type="",r.type="file"),setTimeout((function(){e.navigation.focusedIndex=-1}))},i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"dir",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"multiple",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],t.prototype,"restrictions",void 0),i.__decorate([r.HostBinding("attr.type"),i.__metadata("design:type",String)],t.prototype,"type",void 0),i.__decorate([r.HostBinding("attr.autocomplete"),i.__metadata("design:type",String)],t.prototype,"autocomplete",void 0),i.__decorate([r.HostBinding("attr.tabindex"),i.__metadata("design:type",Number)],t.prototype,"tabIndex",void 0),i.__decorate([r.HostBinding("attr.name"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"nameAttribute",null),i.__decorate([r.HostBinding("attr.multiple"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"multipleAttribute",null),i.__decorate([r.HostBinding("attr.dir"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"dirAttribute",null),i.__decorate([r.HostBinding("attr.disabled"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"disabledAttribute",null),i.__decorate([r.HostListener("change",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"onInputChange",null),t=i.__decorate([r.Directive({selector:"[kendoFileSelect]"}),i.__metadata("design:paramtypes",[s.UploadService,o.NavigationService,r.ElementRef])],t)}();e.FileSelectDirective=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=function(){function t(t){this.viewContainerRef=t}return Object.defineProperty(t.prototype,"templateContext",{set:function(t){this.insertedViewRef&&(this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef)),this.insertedViewRef=void 0),t.templateRef&&(this.insertedViewRef=this.viewContainerRef.createEmbeddedView(t.templateRef,t))},enumerable:!0,configurable:!0}),i.__decorate([r.Input(),i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[Object])],t.prototype,"templateContext",null),t=i.__decorate([r.Directive({selector:"[templateContext]"}),i.__metadata("design:paramtypes",[r.ViewContainerRef])],t)}();e.TemplateContextDirective=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(5),s=n(12),u=n(11),a=n(13),c=function(){function t(t){this.dropZoneService=t}return t.prototype.onElementDragEnter=function(){return!1},t.prototype.onElementDragOver=function(){return!1},t.prototype.onDropListener=function(t){var e=this.componentInstance;if(o.isPresent(e))return e.forEach((function(e){var n=t.dataTransfer.files;if(n.length>0&&!e.disabled){var i=o.getAllFileInfo(n);i=e instanceof a.UploadComponent?o.assignGuidToFiles(i,!e.batch):o.assignGuidToFiles(i,!0),e.multiple||(i.splice(1,i.length-1),e.clearFiles()),s.validateFiles(i,e.restrictions),e.addFiles(i)}})),!1},Object.defineProperty(t.prototype,"componentInstance",{get:function(){return this.dropZoneService.getComponents(this.zoneId)},enumerable:!0,configurable:!0}),i.__decorate([r.Input("kendoUploadDropZone"),i.__metadata("design:type",String)],t.prototype,"zoneId",void 0),i.__decorate([r.HostListener("dragenter"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Boolean)],t.prototype,"onElementDragEnter",null),i.__decorate([r.HostListener("dragover"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Boolean)],t.prototype,"onElementDragOver",null),i.__decorate([r.HostListener("drop",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",Boolean)],t.prototype,"onDropListener",null),t=i.__decorate([r.Directive({providers:[u.DropZoneService],selector:"[kendoUploadDropZone], [kendoFileSelectDropZone]"}),i.__metadata("design:paramtypes",[u.DropZoneService])],t)}();e.UploadDropZoneDirective=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(2),s=function(t){function e(e,n,i){var r=t.call(this,e,n,"k-external-dropzone-hover")||this;return r.localization=i,r.hostClass=!0,r.localizationChangeSubscription=r.localization.changes.subscribe((function(t){var e=t.rtl;r.direction=e?"rtl":"ltr"})),r}return i.__extends(e,t),Object.defineProperty(e.prototype,"dirAttribute",{get:function(){return this.direction},enumerable:!0,configurable:!0}),e.prototype.textFor=function(t){return this.localization.get(t)},Object.defineProperty(e.prototype,"iconClasses",{get:function(){return this.icon?"k-icon k-i-"+this.icon:this.iconClass?""+this.iconClass:"k-icon k-i-upload"},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},i.__decorate([r.HostBinding("class.k-external-dropzone"),i.__metadata("design:type",Boolean)],e.prototype,"hostClass",void 0),i.__decorate([r.HostBinding("attr.dir"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],e.prototype,"dirAttribute",null),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"zoneId",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"icon",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"iconClass",void 0),e=i.__decorate([r.Component({exportAs:"kendoUploadDropZone",providers:[o.LocalizationService,{provide:o.L10N_PREFIX,useValue:"kendo.uploaddropzone"}],selector:"kendo-uploaddropzone",template:"\n <ng-container kendoUploadDropZoneLocalizedMessages\n i18n-externalDropFilesHere='kendo.uploaddropzone.externalDropFilesHere|Sets the external drop-zone hint'\n externalDropFilesHere='Drag and drop files here to upload'\n >\n </ng-container>\n <div class='k-dropzone-inner' [kendoUploadDropZone]=\"zoneId\">\n <span [ngClass]=\"iconClasses\"></span>\n <span class=\"k-dropzone-hint\">{{ textFor('externalDropFilesHere') }}</span>\n <span class=\"k-dropzone-note\">\n <ng-content></ng-content>\n </span>\n </div>\n "}),i.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2,o.LocalizationService])],e)}(n(27).DropZoneBase);e.UploadDropZoneComponent=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(13),s=n(40),u=n(41),a=n(24),c=[o.UploadComponent,s.UploadActionButtonsComponent,u.UploadStatusTotalComponent],l=function(){function t(){}return t=i.__decorate([r.NgModule({declarations:[c],exports:[a.PUBLIC_DIRECTIVES,c],imports:[a.SharedModule]})],t)}();e.UploadModule=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(3),s=n(2),u=n(6),a=function(){function t(t,e,n){this.uploadService=t,this.localization=e,this.navigation=n,this.hostDefaultClass=!0,this.onAction(),this.onFocus()}return Object.defineProperty(t.prototype,"actionButtonsEndClassName",{get:function(){return"end"===this.actionsLayout},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionButtonsStretchedClassName",{get:function(){return"stretched"===this.actionsLayout},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionButtonsStartClassName",{get:function(){return"start"===this.actionsLayout},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionButtonsCenterClassName",{get:function(){return"center"===this.actionsLayout},enumerable:!0,configurable:!0}),t.prototype.onAction=function(){var t=this;this.actionSubscription=this.navigation.onActionButtonAction.subscribe((function(e){"clear"===e?t.clearFiles():t.performUpload()}))},t.prototype.onFocus=function(){var t=this;this.focusSubscription=this.navigation.onActionButtonFocus.subscribe((function(e){t.focusButton(e)}))},t.prototype.focusButton=function(t){("clear"===t?this.clearButton:this.uploadButton).nativeElement.focus()},t.prototype.ngOnDestroy=function(){this.actionSubscription.unsubscribe(),this.focusSubscription.unsubscribe()},t.prototype.onUploadButtonClick=function(t){t.stopImmediatePropagation(),this.performUpload()},t.prototype.performUpload=function(){this.disabled||(this.uploadService.uploadFiles(),this.navigation.focusSelectButton())},t.prototype.onClearButtonClick=function(t){t.stopImmediatePropagation(),this.clearFiles()},t.prototype.clearFiles=function(){this.disabled||(this.uploadService.clearFiles(),this.navigation.focusSelectButton())},t.prototype.textFor=function(t){return this.localization.get(t)},i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"actionsLayout",void 0),i.__decorate([r.ViewChild("clearButton",{static:!0}),i.__metadata("design:type",r.ElementRef)],t.prototype,"clearButton",void 0),i.__decorate([r.ViewChild("uploadButton",{static:!0}),i.__metadata("design:type",r.ElementRef)],t.prototype,"uploadButton",void 0),i.__decorate([r.HostBinding("class.k-actions"),i.__metadata("design:type",Boolean)],t.prototype,"hostDefaultClass",void 0),i.__decorate([r.HostBinding("class.k-actions-end"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"actionButtonsEndClassName",null),i.__decorate([r.HostBinding("class.k-actions-stretched"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"actionButtonsStretchedClassName",null),i.__decorate([r.HostBinding("class.k-actions-start"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"actionButtonsStartClassName",null),i.__decorate([r.HostBinding("class.k-actions-center"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"actionButtonsCenterClassName",null),t=i.__decorate([r.Component({selector:"kendo-upload-action-buttons",template:'\n <button #clearButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"\n [attr.tabIndex]="-1"\n (click)="onClearButtonClick($event)">\n {{textFor(\'clearSelectedFiles\')}}\n </button>\n <button #uploadButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"\n [attr.tabIndex]="-1"\n (click)="onUploadButtonClick($event)">\n {{textFor(\'uploadSelectedFiles\')}}\n </button>\n '}),i.__metadata("design:paramtypes",[o.UploadService,s.LocalizationService,u.NavigationService])],t)}();e.UploadActionButtonsComponent=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(22),s=n(4),u=n(2),a=function(){function t(t){this.localization=t}return t.prototype.ngDoCheck=function(){this.isPaused=this.fileList.hasFileWithState([s.FileState.Paused]),this.isFailed=this.fileList.hasFileWithState([s.FileState.Failed]),this.isUploading=this.fileList.hasFileWithState([s.FileState.Uploading]),this.isPaused&&!this.isUploading?this.statusText=this.localization.get("headerStatusPaused"):this.statusText=this.isUploading?this.localization.get("headerStatusUploading"):this.localization.get("headerStatusUploaded")},i.__decorate([r.Input(),i.__metadata("design:type",o.FileMap)],t.prototype,"fileList",void 0),t=i.__decorate([r.Component({selector:"kendo-upload-status-total",template:"\n <span class=\"k-icon\"\n [ngClass]=\"{\n 'k-i-checkmark': !this.isUploading && !this.isFailed,\n 'k-i-exception': !this.isUploading && this.isFailed,\n 'k-i-upload': this.isUploading,\n 'k-i-pause-sm': this.isPaused\n }\">\n </span>\n {{statusText}}\n "}),i.__metadata("design:paramtypes",[u.LocalizationService])],t)}();e.UploadStatusTotalComponent=a},function(t,e,n){"use strict";n.r(e),n.d(e,"audit",(function(){return N})),n.d(e,"auditTime",(function(){return K})),n.d(e,"buffer",(function(){return q})),n.d(e,"bufferCount",(function(){return $})),n.d(e,"bufferTime",(function(){return tt})),n.d(e,"bufferToggle",(function(){return ut})),n.d(e,"bufferWhen",(function(){return lt})),n.d(e,"catchError",(function(){return ft})),n.d(e,"combineAll",(function(){return gt})),n.d(e,"combineLatest",(function(){return xt})),n.d(e,"concat",(function(){return At})),n.d(e,"concatAll",(function(){return Ut})),n.d(e,"concatMap",(function(){return Lt})),n.d(e,"concatMapTo",(function(){return Mt})),n.d(e,"count",(function(){return Vt})),n.d(e,"debounce",(function(){return Ht})),n.d(e,"debounceTime",(function(){return Kt})),n.d(e,"defaultIfEmpty",(function(){return $t})),n.d(e,"delay",(function(){return re})),n.d(e,"delayWhen",(function(){return ae})),n.d(e,"dematerialize",(function(){return fe})),n.d(e,"distinct",(function(){return ye})),n.d(e,"distinctUntilChanged",(function(){return me})),n.d(e,"distinctUntilKeyChanged",(function(){return xe})),n.d(e,"elementAt",(function(){return Le})),n.d(e,"endWith",(function(){return Me})),n.d(e,"every",(function(){return Ve})),n.d(e,"exhaust",(function(){return He})),n.d(e,"exhaustMap",(function(){return Ke})),n.d(e,"expand",(function(){return Ye})),n.d(e,"filter",(function(){return Ee})),n.d(e,"finalize",(function(){return Je})),n.d(e,"find",(function(){return en})),n.d(e,"findIndex",(function(){return on})),n.d(e,"first",(function(){return sn})),n.d(e,"groupBy",(function(){return fn})),n.d(e,"ignoreElements",(function(){return mn})),n.d(e,"isEmpty",(function(){return xn})),n.d(e,"last",(function(){return kn})),n.d(e,"map",(function(){return Ct})),n.d(e,"mapTo",(function(){return Tn})),n.d(e,"materialize",(function(){return Bn})),n.d(e,"max",(function(){return Mn})),n.d(e,"merge",(function(){return zn})),n.d(e,"mergeAll",(function(){return Dt})),n.d(e,"mergeMap",(function(){return Ot})),n.d(e,"flatMap",(function(){return Ot})),n.d(e,"mergeMapTo",(function(){return Rn})),n.d(e,"mergeScan",(function(){return Hn})),n.d(e,"min",(function(){return Kn})),n.d(e,"multicast",(function(){return Qn})),n.d(e,"observeOn",(function(){return ei})),n.d(e,"onErrorResumeNext",(function(){return oi})),n.d(e,"pairwise",(function(){return ai})),n.d(e,"partition",(function(){return di})),n.d(e,"pluck",(function(){return fi})),n.d(e,"publish",(function(){return vi})),n.d(e,"publishBehavior",(function(){return bi})),n.d(e,"publishLast",(function(){return mi})),n.d(e,"publishReplay",(function(){return Fi})),n.d(e,"race",(function(){return ki})),n.d(e,"reduce",(function(){return Ln})),n.d(e,"repeat",(function(){return Ti})),n.d(e,"repeatWhen",(function(){return Bi})),n.d(e,"retry",(function(){return Ui})),n.d(e,"retryWhen",(function(){return Li})),n.d(e,"refCount",(function(){return qn})),n.d(e,"sample",(function(){return zi})),n.d(e,"sampleTime",(function(){return Wi})),n.d(e,"scan",(function(){return Un})),n.d(e,"sequenceEqual",(function(){return Gi})),n.d(e,"share",(function(){return Qi})),n.d(e,"shareReplay",(function(){return tr})),n.d(e,"single",(function(){return er})),n.d(e,"skip",(function(){return rr})),n.d(e,"skipLast",(function(){return ur})),n.d(e,"skipUntil",(function(){return lr})),n.d(e,"skipWhile",(function(){return fr})),n.d(e,"startWith",(function(){return yr})),n.d(e,"subscribeOn",(function(){return Fr})),n.d(e,"switchAll",(function(){return Tr})),n.d(e,"switchMap",(function(){return Ir})),n.d(e,"switchMapTo",(function(){return Or})),n.d(e,"take",(function(){return Ue})),n.d(e,"takeLast",(function(){return En})),n.d(e,"takeUntil",(function(){return Pr})),n.d(e,"takeWhile",(function(){return Dr})),n.d(e,"tap",(function(){return ke})),n.d(e,"throttle",(function(){return Lr})),n.d(e,"throttleTime",(function(){return zr})),n.d(e,"throwIfEmpty",(function(){return je})),n.d(e,"timeInterval",(function(){return Zr})),n.d(e,"timeout",(function(){return Jr})),n.d(e,"timeoutWith",(function(){return Yr})),n.d(e,"timestamp",(function(){return Qr})),n.d(e,"toArray",(function(){return no})),n.d(e,"window",(function(){return io})),n.d(e,"windowCount",(function(){return so})),n.d(e,"windowTime",(function(){return co})),n.d(e,"windowToggle",(function(){return bo})),n.d(e,"windowWhen",(function(){return go})),n.d(e,"withLatestFrom",(function(){return wo})),n.d(e,"zip",(function(){return Bo})),n.d(e,"zipAll",(function(){return jo}));var i=n(0);function r(t){return"function"==typeof t}var o=!1,s={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;o=t},get useDeprecatedSynchronousErrorHandling(){return o}};function u(t){setTimeout((function(){throw t}))}var a={closed:!0,next:function(t){},error:function(t){if(s.useDeprecatedSynchronousErrorHandling)throw t;u(t)},complete:function(){}},c=Array.isArray||function(t){return t&&"number"==typeof t.length};function l(t){return null!==t&&"object"==typeof t}function p(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}p.prototype=Object.create(Error.prototype);var d=p,f=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,i=this._parents,o=this._unsubscribe,s=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var u=-1,a=i?i.length:0;n;)n.remove(this),n=++u<a&&i[u]||null;if(r(o))try{o.call(this)}catch(n){e=!0,t=n instanceof d?h(n.errors):[n]}if(c(s))for(u=-1,a=s.length;++u<a;){var p=s[u];if(l(p))try{p.unsubscribe()}catch(n){e=!0,t=t||[],n instanceof d?t=t.concat(h(n.errors)):t.push(n)}}if(e)throw new d(t)}},t.prototype.add=function(e){var n=e;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var i=n;(n=new t)._subscriptions=[i]}break;default:if(!e)return t.EMPTY;throw new Error("unrecognized teardown "+e+" added to Subscription.")}if(n._addParent(this)){var r=this._subscriptions;r?r.push(n):this._subscriptions=[n]}return n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.prototype._addParent=function(t){var e=this._parent,n=this._parents;return e!==t&&(e?n?-1===n.indexOf(t)&&(n.push(t),!0):(this._parents=[t],!0):(this._parent=t,!0))},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}();function h(t){return t.reduce((function(t,e){return t.concat(e instanceof d?e.errors:e)}),[])}var v="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),y=function(t){function e(n,i,r){var o=t.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=a;break;case 1:if(!n){o.destination=a;break}if("object"==typeof n){n instanceof e?(o.syncErrorThrowable=n.syncErrorThrowable,o.destination=n,n.add(o)):(o.syncErrorThrowable=!0,o.destination=new b(o,n));break}default:o.syncErrorThrowable=!0,o.destination=new b(o,n,i,r)}return o}return i.__extends(e,t),e.prototype[v]=function(){return this},e.create=function(t,n,i){var r=new e(t,n,i);return r.syncErrorThrowable=!1,r},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(f),b=function(t){function e(e,n,i,o){var s,u=t.call(this)||this;u._parentSubscriber=e;var c=u;return r(n)?s=n:n&&(s=n.next,i=n.error,o=n.complete,n!==a&&(r((c=Object.create(n)).unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=s,u._error=i,u._complete=o,u}return i.__extends(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;s.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=s.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):u(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;u(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};s.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),s.useDeprecatedSynchronousErrorHandling)throw t;u(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!s.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return s.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(u(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(y),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(y),m=function(t){function e(e,n,i){var r=t.call(this)||this;return r.parent=e,r.outerValue=n,r.outerIndex=i,r.index=0,r}return i.__extends(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(y);var g="function"==typeof Symbol&&Symbol.observable||"@@observable";function S(){}function x(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return w(t)}function w(t){return t?1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}:S}var F=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var i=this.operator,r=function(t,e,n){if(t){if(t instanceof y)return t;if(t[v])return t[v]()}return t||e||n?new y(t,e,n):new y(a)}(t,e,n);if(i?r.add(i.call(r,this.source)):r.add(this.source||s.useDeprecatedSynchronousErrorHandling&&!r.syncErrorThrowable?this._subscribe(r):this._trySubscribe(r)),s.useDeprecatedSynchronousErrorHandling&&r.syncErrorThrowable&&(r.syncErrorThrowable=!1,r.syncErrorThrown))throw r.syncErrorValue;return r},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){s.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),!function(t){for(;t;){var e=t,n=e.closed,i=e.destination,r=e.isStopped;if(n||r)return!1;t=i&&i instanceof y?i:null}return!0}(t)?console.warn(e):t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=E(e))((function(e,i){var r;r=n.subscribe((function(e){try{t(e)}catch(t){i(t),r&&r.unsubscribe()}}),i,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[g]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:w(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=E(t))((function(t,n){var i;e.subscribe((function(t){return i=t}),(function(t){return n(t)}),(function(){return t(i)}))}))},t.create=function(e){return new t(e)},t}();function E(t){if(t||(t=s.Promise||Promise),!t)throw new Error("no Promise impl found");return t}var I=function(t){return function(e){for(var n=0,i=t.length;n<i&&!e.closed;n++)e.next(t[n]);e.closed||e.complete()}},C=function(t){return function(e){return t.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,u),e}};function k(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}var T=k(),O=function(t){return function(e){for(var n=t[T]();;){var i=n.next();if(i.done){e.complete();break}if(e.next(i.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e}},P=function(t){return function(e){var n=t[g]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)}},B=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function j(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}var D=function(t){if(t instanceof F)return function(e){return t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e)};if(t&&"function"==typeof t[g])return P(t);if(B(t))return I(t);if(j(t))return C(t);if(t&&"function"==typeof t[T])return O(t);var e=l(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+e+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function U(t,e,n,i,r){if(void 0===r&&(r=new m(t,n,i)),!r.closed)return D(e)(r)}function N(t){return function(e){return e.lift(new A(t))}}var A=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new L(t,this.durationSelector))},t}(),L=function(t){function e(e,n){var i=t.call(this,e)||this;return i.durationSelector=n,i.hasValue=!1,i}return i.__extends(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(t){return this.destination.error(t)}var n=U(this,e);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,i){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(_),M=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.pending=!1,i}return i.__extends(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,i=void 0;try{this.work(t)}catch(t){n=!0,i=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),i},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return i.__extends(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(f)),V=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}(),z=function(t){function e(n,i){void 0===i&&(i=V.now);var r=t.call(this,n,(function(){return e.delegate&&e.delegate!==r?e.delegate.now():i()}))||this;return r.actions=[],r.active=!1,r.scheduled=void 0,r}return i.__extends(e,t),e.prototype.schedule=function(n,i,r){return void 0===i&&(i=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,i,r):t.prototype.schedule.call(this,n,i,r)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(V),R=new z(M);function H(t){return!c(t)&&t-parseFloat(t)+1>=0}function W(t){return t&&"function"==typeof t.schedule}function Z(t){var e=t.index,n=t.period,i=t.subscriber;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function K(t,e){return void 0===e&&(e=R),N((function(){return function(t,e,n){void 0===t&&(t=0);var i=-1;return H(e)?i=Number(e)<1?1:Number(e):W(e)&&(n=e),W(n)||(n=R),new F((function(e){var r=H(t)?t:+t-n.now();return n.schedule(Z,r,{index:0,period:i,subscriber:e})}))}(t,e)}))}function q(t){return function(e){return e.lift(new G(t))}}var G=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Y(t,this.closingNotifier))},t}(),Y=function(t){function e(e,n){var i=t.call(this,e)||this;return i.buffer=[],i.add(U(i,n)),i}return i.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(t,e,n,i,r){var o=this.buffer;this.buffer=[],this.destination.next(o)},e}(_);function $(t,e){return void 0===e&&(e=null),function(n){return n.lift(new X(t,e))}}var X=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?Q:J}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),J=function(t){function e(e,n){var i=t.call(this,e)||this;return i.bufferSize=n,i.buffer=[],i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(y),Q=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.bufferSize=n,r.startBufferEvery=i,r.buffers=[],r.count=0,r}return i.__extends(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,i=this.buffers,r=this.count;this.count++,r%n==0&&i.push([]);for(var o=i.length;o--;){var s=i[o];s.push(t),s.length===e&&(i.splice(o,1),this.destination.next(s))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var i=e.shift();i.length>0&&n.next(i)}t.prototype._complete.call(this)},e}(y);function tt(t){var e=arguments.length,n=R;W(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var i=null;e>=2&&(i=arguments[1]);var r=Number.POSITIVE_INFINITY;return e>=3&&(r=arguments[2]),function(e){return e.lift(new et(t,i,r,n))}}var et=function(){function t(t,e,n,i){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=i}return t.prototype.call=function(t,e){return e.subscribe(new it(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),nt=function(){return function(){this.buffer=[]}}(),it=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=i,s.maxBufferSize=r,s.scheduler=o,s.contexts=[];var u=s.openContext();if(s.timespanOnly=null==i||i<0,s.timespanOnly){var a={subscriber:s,context:u,bufferTimeSpan:n};s.add(u.closeAction=o.schedule(rt,n,a))}else{var c={subscriber:s,context:u},l={bufferTimeSpan:n,bufferCreationInterval:i,subscriber:s,scheduler:o};s.add(u.closeAction=o.schedule(st,n,c)),s.add(o.schedule(ot,i,l))}return s}return i.__extends(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,i=n.length,r=0;r<i;r++){var o=n[r],s=o.buffer;s.push(t),s.length==this.maxBufferSize&&(e=o)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var i=e.shift();n.next(i.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,i={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(rt,n,i))}},e.prototype.openContext=function(){var t=new nt;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(y);function rt(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function ot(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,i=t.subscriber,r=t.scheduler,o=i.openContext();i.closed||(i.add(o.closeAction=r.schedule(st,n,{subscriber:i,context:o})),this.schedule(t,e))}function st(t){var e=t.subscriber,n=t.context;e.closeContext(n)}function ut(t,e){return function(n){return n.lift(new at(t,e))}}var at=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new ct(t,this.openings,this.closingSelector))},t}(),ct=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.openings=n,r.closingSelector=i,r.contexts=[],r.add(U(r,n)),r}return i.__extends(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,i=0;i<n;i++)e[i].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var i=n.shift();i.subscription.unsubscribe(),i.buffer=null,i.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,i,r){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,i=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(i),i.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new f,i={buffer:[],subscription:n};e.push(i);var r=U(this,t,i);!r||r.closed?this.closeBuffer(i):(r.context=i,this.add(r),n.add(r))},e}(_);function lt(t){return function(e){return e.lift(new pt(t))}}var pt=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new dt(t,this.closingSelector))},t}(),dt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.closingSelector=n,i.subscribing=!1,i.openBuffer(),i}return i.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},e.prototype.notifyNext=function(t,e,n,i,r){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new f,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(U(this,e)),this.subscribing=!1},e}(_);function ft(t){return function(e){var n=new ht(t),i=e.lift(n);return n.caught=i}}var ht=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new vt(t,this.selector,this.caught))},t}(),vt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.selector=n,r.caught=i,r}return i.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var i=new m(this,void 0,void 0);this.add(i),U(this,n,void 0,void 0,i)}},e}(_);function yt(t,e){return new F(e?function(n){var i=new f,r=0;return i.add(e.schedule((function(){r!==t.length?(n.next(t[r++]),n.closed||i.add(this.schedule())):n.complete()}))),i}:I(t))}var bt={};var _t=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new mt(t,this.resultSelector))},t}(),mt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.resultSelector=n,i.active=0,i.values=[],i.observables=[],i}return i.__extends(e,t),e.prototype._next=function(t){this.values.push(bt),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var i=t[n];this.add(U(this,i,i,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,i,r){var o=this.values,s=o[n],u=this.toRespond?s===bt?--this.toRespond:this.toRespond:0;o[n]=e,0===u&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(_);function gt(t){return function(e){return e.lift(new _t(t))}}function St(t,e){if(!e)return t instanceof F?t:new F(D(t));if(null!=t){if(function(t){return t&&"function"==typeof t[g]}(t))return function(t,e){return new F(e?function(n){var i=new f;return i.add(e.schedule((function(){var r=t[g]();i.add(r.subscribe({next:function(t){i.add(e.schedule((function(){return n.next(t)})))},error:function(t){i.add(e.schedule((function(){return n.error(t)})))},complete:function(){i.add(e.schedule((function(){return n.complete()})))}}))}))),i}:P(t))}(t,e);if(j(t))return function(t,e){return new F(e?function(n){var i=new f;return i.add(e.schedule((function(){return t.then((function(t){i.add(e.schedule((function(){n.next(t),i.add(e.schedule((function(){return n.complete()})))})))}),(function(t){i.add(e.schedule((function(){return n.error(t)})))}))}))),i}:C(t))}(t,e);if(B(t))return yt(t,e);if(function(t){return t&&"function"==typeof t[T]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new F(e?function(n){var i,r=new f;return r.add((function(){i&&"function"==typeof i.return&&i.return()})),r.add(e.schedule((function(){i=t[T](),r.add(e.schedule((function(){if(!n.closed){var t,e;try{var r=i.next();t=r.value,e=r.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}})))}))),r}:O(t))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}function xt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null;return"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&c(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(St([e].concat(t)),new _t(n))}}var wt=new F((function(t){return t.complete()}));function Ft(t){return t?function(t){return new F((function(e){return t.schedule((function(){return e.complete()}))}))}(t):wt}function Et(t){var e=new F((function(e){e.next(t),e.complete()}));return e._isScalar=!0,e.value=t,e}function It(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];switch(W(n)?t.pop():n=void 0,t.length){case 0:return Ft(n);case 1:return n?yt(t,n):Et(t[0]);default:return yt(t,n)}}function Ct(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new kt(t,e))}}var kt=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Tt(t,this.project,this.thisArg))},t}(),Tt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.project=n,r.count=0,r.thisArg=i||r,r}return i.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(y);function Ot(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(i){return i.pipe(Ot((function(n,i){return St(t(n,i)).pipe(Ct((function(t,r){return e(n,t,i,r)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new Pt(t,n))})}var Pt=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new Bt(t,this.project,this.concurrent))},t}(),Bt=function(t){function e(e,n,i){void 0===i&&(i=Number.POSITIVE_INFINITY);var r=t.call(this,e)||this;return r.project=n,r.concurrent=i,r.hasCompleted=!1,r.buffer=[],r.active=0,r.index=0,r}return i.__extends(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var i=new m(this,void 0,void 0);this.destination.add(i),U(this,t,e,n,i)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(_);function jt(t){return t}function Dt(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Ot(jt,t)}function Ut(){return Dt(1)}function Nt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ut()(It.apply(void 0,t))}function At(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Nt.apply(void 0,[e].concat(t)))}}function Lt(t,e){return Ot(t,e,1)}function Mt(t,e){return Lt((function(){return t}),e)}function Vt(t){return function(e){return e.lift(new zt(t,e))}}var zt=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Rt(t,this.predicate,this.source))},t}(),Rt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.source=i,r.count=0,r.index=0,r}return i.__extends(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(y);function Ht(t){return function(e){return e.lift(new Wt(t))}}var Wt=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Zt(t,this.durationSelector))},t}(),Zt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.durationSelector=n,i.hasValue=!1,i.durationSubscription=null,i}return i.__extends(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=U(this,e))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(t,e,n,i,r){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=null,n.unsubscribe(),this.remove(n)),this.value=null,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(_);function Kt(t,e){return void 0===e&&(e=R),function(n){return n.lift(new qt(t,e))}}var qt=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Gt(t,this.dueTime,this.scheduler))},t}(),Gt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.dueTime=n,r.scheduler=i,r.debouncedSubscription=null,r.lastValue=null,r.hasValue=!1,r}return i.__extends(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Yt,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(y);function Yt(t){t.debouncedNext()}function $t(t){return void 0===t&&(t=null),function(e){return e.lift(new Jt(t))}}var Xt,Jt=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new Qt(t,this.defaultValue))},t}(),Qt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.defaultValue=n,i.isEmpty=!0,i}return i.__extends(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(y);function te(t){return t instanceof Date&&!isNaN(+t)}function ee(t,e){return new F(e?function(n){return e.schedule(ne,0,{error:t,subscriber:n})}:function(e){return e.error(t)})}function ne(t){var e=t.error;t.subscriber.error(e)}Xt||(Xt={});var ie=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return It(this.value);case"E":return ee(this.error);case"C":return Ft()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();function re(t,e){void 0===e&&(e=R);var n=te(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new oe(n,e))}}var oe=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new se(t,this.delay,this.scheduler))},t}(),se=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.delay=n,r.scheduler=i,r.queue=[],r.active=!1,r.errored=!1,r}return i.__extends(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,i=t.scheduler,r=t.destination;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){var o=Math.max(0,n[0].time-i.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new ue(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(ie.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(ie.createComplete()),this.unsubscribe()},e}(y),ue=function(){return function(t,e){this.time=t,this.notification=e}}();function ae(t,e){return e?function(n){return new pe(n,e).lift(new ce(t))}:function(e){return e.lift(new ce(t))}}var ce=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new le(t,this.delayDurationSelector))},t}(),le=function(t){function e(e,n){var i=t.call(this,e)||this;return i.delayDurationSelector=n,i.completed=!1,i.delayNotifierSubscriptions=[],i.index=0,i}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(t),this.removeSubscription(r),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=U(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(_),pe=function(t){function e(e,n){var i=t.call(this)||this;return i.source=e,i.subscriptionDelay=n,i}return i.__extends(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new de(t,this.source))},e}(F),de=function(t){function e(e,n){var i=t.call(this)||this;return i.parent=e,i.source=n,i.sourceSubscribed=!1,i}return i.__extends(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(y);function fe(){return function(t){return t.lift(new he)}}var he=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ve(t))},t}(),ve=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(y);function ye(t,e){return function(n){return n.lift(new be(t,e))}}var be=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new _e(t,this.keySelector,this.flushes))},t}(),_e=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.keySelector=n,r.values=new Set,i&&r.add(U(r,i)),r}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.values.clear()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(_);function me(t,e){return function(n){return n.lift(new ge(t,e))}}var ge=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Se(t,this.compare,this.keySelector))},t}(),Se=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.keySelector=i,r.hasKey=!1,"function"==typeof n&&(r.compare=n),r}return i.__extends(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var i=!1;if(this.hasKey)try{i=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;i||(this.key=e,this.destination.next(t))},e}(y);function xe(t,e){return me((function(n,i){return e?e(n[t],i[t]):n[t]===i[t]}))}function we(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}we.prototype=Object.create(Error.prototype);var Fe=we;function Ee(t,e){return function(n){return n.lift(new Ie(t,e))}}var Ie=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Ce(t,this.predicate,this.thisArg))},t}(),Ce=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.thisArg=i,r.count=0,r}return i.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(y);function ke(t,e,n){return function(i){return i.lift(new Te(t,e,n))}}var Te=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new Oe(t,this.nextOrObserver,this.error,this.complete))},t}(),Oe=function(t){function e(e,n,i,o){var s=t.call(this,e)||this;return s._tapNext=S,s._tapError=S,s._tapComplete=S,s._tapError=i||S,s._tapComplete=o||S,r(n)?(s._context=s,s._tapNext=n):n&&(s._context=n,s._tapNext=n.next||S,s._tapError=n.error||S,s._tapComplete=n.complete||S),s}return i.__extends(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(y);function Pe(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}Pe.prototype=Object.create(Error.prototype);var Be=Pe,je=function(t){return void 0===t&&(t=De),ke({hasValue:!1,next:function(){this.hasValue=!0},complete:function(){if(!this.hasValue)throw t()}})};function De(){return new Be}function Ue(t){return function(e){return 0===t?Ft():e.lift(new Ne(t))}}var Ne=function(){function t(t){if(this.total=t,this.total<0)throw new Fe}return t.prototype.call=function(t,e){return e.subscribe(new Ae(t,this.total))},t}(),Ae=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.count=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(y);function Le(t,e){if(t<0)throw new Fe;var n=arguments.length>=2;return function(i){return i.pipe(Ee((function(e,n){return n===t})),Ue(1),n?$t(e):je((function(){return new Fe})))}}function Me(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n=t[t.length-1];W(n)?t.pop():n=null;var i=t.length;return Nt(e,1!==i||n?i>0?yt(t,n):Ft(n):Et(t[0]))}}function Ve(t,e){return function(n){return n.lift(new ze(t,e,n))}}var ze=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new Re(t,this.predicate,this.thisArg,this.source))},t}(),Re=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=i,o.source=r,o.index=0,o.thisArg=i||o,o}return i.__extends(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(y);function He(){return function(t){return t.lift(new We)}}var We=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ze(t))},t}(),Ze=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return i.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(U(this,t)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(_);function Ke(t,e){return e?function(n){return n.pipe(Ke((function(n,i){return St(t(n,i)).pipe(Ct((function(t,r){return e(n,t,i,r)})))})))}:function(e){return e.lift(new qe(t))}}var qe=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new Ge(t,this.project))},t}(),Ge=function(t){function e(e,n){var i=t.call(this,e)||this;return i.project=n,i.hasSubscription=!1,i.hasCompleted=!1,i.index=0,i}return i.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.hasSubscription=!0,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var i=new m(this,void 0,void 0);this.destination.add(i),U(this,t,e,n,i)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(_);function Ye(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=void 0),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(i){return i.lift(new $e(t,e,n))}}var $e=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new Xe(t,this.project,this.concurrent,this.scheduler))},t}(),Xe=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.project=n,o.concurrent=i,o.scheduler=r,o.index=0,o.active=0,o.hasCompleted=!1,i<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}return i.__extends(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,i=t.value,r=t.index;e.subscribeToProjection(n,i,r)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var i=this.index++;if(this.active<this.concurrent){n.next(t);try{var r=(0,this.project)(t,i);if(this.scheduler){var o={subscriber:this,result:r,value:t,index:i};this.destination.add(this.scheduler.schedule(e.dispatch,0,o))}else this.subscribeToProjection(r,t,i)}catch(t){n.error(t)}}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(U(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){this._next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(_);function Je(t){return function(e){return e.lift(new Qe(t))}}var Qe=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new tn(t,this.callback))},t}(),tn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.add(new f(n)),i}return i.__extends(e,t),e}(y);function en(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new nn(t,n,!1,e))}}var nn=function(){function t(t,e,n,i){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=i}return t.prototype.call=function(t,e){return e.subscribe(new rn(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),rn=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.predicate=n,s.source=i,s.yieldIndex=r,s.thisArg=o,s.index=0,s}return i.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,i=this.index++;try{e.call(n||this,t,i,this.source)&&this.notifyComplete(this.yieldIndex?i:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(y);function on(t,e){return function(n){return n.lift(new nn(t,n,!0,e))}}function sn(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?Ee((function(e,n){return t(e,n,i)})):jt,Ue(1),n?$t(e):je((function(){return new Be})))}}function un(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}un.prototype=Object.create(Error.prototype);var an=un,cn=function(t){function e(e,n){var i=t.call(this)||this;return i.subject=e,i.subscriber=n,i.closed=!1,i}return i.__extends(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(f),ln=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return i.__extends(e,t),e}(y),pn=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return i.__extends(e,t),e.prototype[v]=function(){return new ln(this)},e.prototype.lift=function(t){var e=new dn(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new an;if(!this.isStopped)for(var e=this.observers,n=e.length,i=e.slice(),r=0;r<n;r++)i[r].next(t)},e.prototype.error=function(t){if(this.closed)throw new an;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,i=e.slice(),r=0;r<n;r++)i[r].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new an;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),i=0;i<e;i++)n[i].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new an;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new an;return this.hasError?(t.error(this.thrownError),f.EMPTY):this.isStopped?(t.complete(),f.EMPTY):(this.observers.push(t),new cn(this,t))},e.prototype.asObservable=function(){var t=new F;return t.source=this,t},e.create=function(t,e){return new dn(t,e)},e}(F),dn=function(t){function e(e,n){var i=t.call(this)||this;return i.destination=e,i.source=n,i}return i.__extends(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):f.EMPTY},e}(pn);function fn(t,e,n,i){return function(r){return r.lift(new hn(t,e,n,i))}}var hn=function(){function t(t,e,n,i){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=i}return t.prototype.call=function(t,e){return e.subscribe(new vn(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),vn=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=i,s.durationSelector=r,s.subjectSelector=o,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return i.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var i,r=n.get(e);if(this.elementSelector)try{i=this.elementSelector(t)}catch(t){this.error(t)}else i=t;if(!r){r=this.subjectSelector?this.subjectSelector():new pn,n.set(e,r);var o=new bn(e,r,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new bn(e,r))}catch(t){return void this.error(t)}this.add(s.subscribe(new yn(e,r,this)))}}r.closed||r.next(i)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t)})),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete()})),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(y),yn=function(t){function e(e,n,i){var r=t.call(this,n)||this;return r.key=e,r.group=n,r.parent=i,r}return i.__extends(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(y),bn=function(t){function e(e,n,i){var r=t.call(this)||this;return r.key=e,r.groupSubject=n,r.refCountSubscription=i,r}return i.__extends(e,t),e.prototype._subscribe=function(t){var e=new f,n=this.refCountSubscription,i=this.groupSubject;return n&&!n.closed&&e.add(new _n(n)),e.add(i.subscribe(t)),e},e}(F),_n=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return i.__extends(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(f);function mn(){return function(t){return t.lift(new gn)}}var gn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Sn(t))},t}(),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype._next=function(t){},e}(y);function xn(){return function(t){return t.lift(new wn)}}var wn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Fn(t))},t}(),Fn=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(y);function En(t){return function(e){return 0===t?Ft():e.lift(new In(t))}}var In=function(){function t(t){if(this.total=t,this.total<0)throw new Fe}return t.prototype.call=function(t,e){return e.subscribe(new Cn(t,this.total))},t}(),Cn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.ring=new Array,i.count=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,i=this.count++;e.length<n?e.push(t):e[i%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,i=this.ring,r=0;r<n;r++){var o=e++%n;t.next(i[o])}t.complete()},e}(y);function kn(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?Ee((function(e,n){return t(e,n,i)})):jt,En(1),n?$t(e):je((function(){return new Be})))}}function Tn(t){return function(e){return e.lift(new On(t))}}var On=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new Pn(t,this.value))},t}(),Pn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.value=n,i}return i.__extends(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(y);function Bn(){return function(t){return t.lift(new jn)}}var jn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Dn(t))},t}(),Dn=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.prototype._next=function(t){this.destination.next(ie.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(ie.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(ie.createComplete()),t.complete()},e}(y);function Un(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new Nn(t,e,n))}}var Nn=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new An(t,this.accumulator,this.seed,this.hasSeed))},t}(),An=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=i,o.hasSeed=r,o.index=0,o}return i.__extends(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(y);function Ln(t,e){return arguments.length>=2?function(n){return x(Un(t,e),En(1),$t(e))(n)}:function(e){return x(Un((function(e,n,i){return t(e,n,i+1)})),En(1))(e)}}function Mn(t){return Ln("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}function Vn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,i=null,r=t[t.length-1];return W(r)?(i=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof r&&(n=t.pop()),null===i&&1===t.length&&t[0]instanceof F?t[0]:Dt(n)(yt(t,i))}function zn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Vn.apply(void 0,[e].concat(t)))}}function Rn(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?Ot((function(){return t}),e,n):("number"==typeof e&&(n=e),Ot((function(){return t}),n))}function Hn(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(i){return i.lift(new Wn(t,e,n))}}var Wn=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new Zn(t,this.accumulator,this.seed,this.concurrent))},t}(),Zn=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.accumulator=n,o.acc=i,o.concurrent=r,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return i.__extends(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=this.destination,i=void 0;try{i=(0,this.accumulator)(this.acc,t,e)}catch(t){return n.error(t)}this.active++,this._innerSub(i,t,e)}else this.buffer.push(t)},e.prototype._innerSub=function(t,e,n){var i=new m(this,void 0,void 0);this.destination.add(i),U(this,t,e,n,i)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){var o=this.destination;this.acc=e,this.hasValue=!0,o.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(_);function Kn(t){return Ln("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}function qn(){return function(t){return t.lift(new Gn(t))}}var Gn=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var i=new Yn(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r},t}(),Yn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.connectable=n,i}return i.__extends(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}else this.connection=null},e}(y),$n=function(t){function e(e,n){var i=t.call(this)||this;return i.source=e,i.subjectFactory=n,i._refCount=0,i._isComplete=!1,i}return i.__extends(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new f).add(this.source.subscribe(new Jn(this.getSubject(),this))),t.closed?(this._connection=null,t=f.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return qn()(this)},e}(F).prototype,Xn={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:$n._subscribe},_isComplete:{value:$n._isComplete,writable:!0},getSubject:{value:$n.getSubject},connect:{value:$n.connect},refCount:{value:$n.refCount}},Jn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.connectable=n,i}return i.__extends(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(ln);function Qn(t,e){return function(n){var i;if(i="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new ti(i,e));var r=Object.create(n,Xn);return r.source=n,r.subjectFactory=i,r}}var ti=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,i=this.subjectFactory(),r=n(i).subscribe(t);return r.add(e.subscribe(i)),r},t}();function ei(t,e){return void 0===e&&(e=0),function(n){return n.lift(new ni(t,e))}}var ni=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new ii(t,this.scheduler,this.delay))},t}(),ii=function(t){function e(e,n,i){void 0===i&&(i=0);var r=t.call(this,e)||this;return r.scheduler=n,r.delay=i,r}return i.__extends(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new ri(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(ie.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(ie.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(ie.createComplete()),this.unsubscribe()},e}(y),ri=function(){return function(t,e){this.notification=t,this.destination=e}}();function oi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&c(t[0])&&(t=t[0]),function(e){return e.lift(new si(t))}}var si=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new ui(t,this.nextSources))},t}(),ui=function(t){function e(e,n){var i=t.call(this,e)||this;return i.destination=e,i.nextSources=n,i}return i.__extends(e,t),e.prototype.notifyError=function(t,e){this.subscribeToNextSource()},e.prototype.notifyComplete=function(t){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new m(this,void 0,void 0);this.destination.add(e),U(this,t,void 0,void 0,e)}else this.destination.complete()},e}(_);function ai(){return function(t){return t.lift(new ci)}}var ci=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new li(t))},t}(),li=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return i.__extends(e,t),e.prototype._next=function(t){this.hasPrev?this.destination.next([this.prev,t]):this.hasPrev=!0,this.prev=t},e}(y);function pi(t,e){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}function di(t,e){return function(n){return[Ee(t,e)(n),Ee(pi(t,e))(n)]}}function fi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Ct(hi(t,n))(e)}}function hi(t,e){return function(n){for(var i=n,r=0;r<e;r++){var o=i[t[r]];if(void 0===o)return;i=o}return i}}function vi(t){return t?Qn((function(){return new pn}),t):Qn(new pn)}var yi=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return i.__extends(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new an;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(pn);function bi(t){return function(e){return Qn(new yi(t))(e)}}var _i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return i.__extends(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),f.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),f.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(pn);function mi(){return function(t){return Qn(new _i)(t)}}var gi=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return i.__extends(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,i){return void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,i):e.flush(this)},e}(M),Si=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e}(z))(gi),xi=function(t){function e(e,n,i){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this)||this;return r.scheduler=i,r._events=[],r._infiniteTimeWindow=!1,r._bufferSize=e<1?1:e,r._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(r._infiniteTimeWindow=!0,r.next=r.nextInfiniteTimeWindow):r.next=r.nextTimeWindow,r}return i.__extends(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new wi(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,i=n?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,o=i.length;if(this.closed)throw new an;if(this.isStopped||this.hasError?e=f.EMPTY:(this.observers.push(t),e=new cn(this,t)),r&&t.add(t=new ii(t,r)),n)for(var s=0;s<o&&!t.closed;s++)t.next(i[s]);else for(s=0;s<o&&!t.closed;s++)t.next(i[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||Si).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,i=this._events,r=i.length,o=0;o<r&&!(t-i[o].time<n);)o++;return r>e&&(o=Math.max(o,r-e)),o>0&&i.splice(0,o),i},e}(pn),wi=function(){return function(t,e){this.time=t,this.value=e}}();function Fi(t,e,n,i){n&&"function"!=typeof n&&(i=n);var r="function"==typeof n?n:void 0,o=new xi(t,e,i);return function(t){return Qn((function(){return o}),r)(t)}}function Ei(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!c(t[0]))return t[0];t=t[0]}return yt(t,void 0).lift(new Ii)}var Ii=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ci(t))},t}(),Ci=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return i.__extends(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var i=t[n],r=U(this,i,i,n);this.subscriptions&&this.subscriptions.push(r),this.add(r)}this.observables=null}},e.prototype.notifyNext=function(t,e,n,i,r){if(!this.hasFirst){this.hasFirst=!0;for(var o=0;o<this.subscriptions.length;o++)if(o!==n){var s=this.subscriptions[o];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(e)},e}(_);function ki(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&c(t[0])&&(t=t[0]),e.lift.call(Ei.apply(void 0,[e].concat(t)))}}function Ti(t){return void 0===t&&(t=-1),function(e){return 0===t?Ft():t<0?e.lift(new Oi(-1,e)):e.lift(new Oi(t-1,e))}}var Oi=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Pi(t,this.count,this.source))},t}(),Pi=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.count=n,r.source=i,r}return i.__extends(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(y);function Bi(t){return function(e){return e.lift(new ji(t))}}var ji=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Di(t,this.notifier,e))},t}(),Di=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.notifier=n,r.source=i,r.sourceIsBeingSubscribedTo=!0,r}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(e){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new pn;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=U(this,e)},e}(_);function Ui(t){return void 0===t&&(t=-1),function(e){return e.lift(new Ni(t,e))}}var Ni=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Ai(t,this.count,this.source))},t}(),Ai=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.count=n,r.source=i,r}return i.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,i=this.count;if(0===i)return t.prototype.error.call(this,e);i>-1&&(this.count=i-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(y);function Li(t){return function(e){return e.lift(new Mi(t,e))}}var Mi=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Vi(t,this.notifier,this.source))},t}(),Vi=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.notifier=n,r.source=i,r}return i.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,i=this.retries,r=this.retriesSubscription;if(i)this.errors=null,this.retriesSubscription=null;else{n=new pn;try{i=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}r=U(this,i)}this._unsubscribeAndRecycle(),this.errors=n,this.retries=i,this.retriesSubscription=r,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,e,n,i,r){var o=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=o,this.source.subscribe(this)},e}(_);function zi(t){return function(e){return e.lift(new Ri(t))}}var Ri=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Hi(t),i=e.subscribe(n);return i.add(U(n,this.notifier)),i},t}(),Hi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return i.__extends(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(t,e,n,i,r){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(_);function Wi(t,e){return void 0===e&&(e=R),function(n){return n.lift(new Zi(t,e))}}var Zi=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Ki(t,this.period,this.scheduler))},t}(),Ki=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.period=n,r.scheduler=i,r.hasValue=!1,r.add(i.schedule(qi,n,{subscriber:r,period:n})),r}return i.__extends(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(y);function qi(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Gi(t,e){return function(n){return n.lift(new Yi(t,e))}}var Yi=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new $i(t,this.compareTo,this.comparator))},t}(),$i=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.compareTo=n,r.comparator=i,r._a=[],r._b=[],r._oneComplete=!1,r.destination.add(n.subscribe(new Xi(e,r))),r}return i.__extends(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this._a,e=this._b,n=this.comparator;t.length>0&&e.length>0;){var i=t.shift(),r=e.shift(),o=!1;try{o=n?n(i,r):i===r}catch(t){this.destination.error(t)}o||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(y),Xi=function(t){function e(e,n){var i=t.call(this,e)||this;return i.parent=n,i}return i.__extends(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(y);function Ji(){return new pn}function Qi(){return function(t){return qn()(Qn(Ji)(t))}}function tr(t,e,n){var i;return i=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,i=t.bufferSize,r=void 0===i?Number.POSITIVE_INFINITY:i,o=t.windowTime,s=void 0===o?Number.POSITIVE_INFINITY:o,u=t.refCount,a=t.scheduler,c=0,l=!1,p=!1;return function(t){c++,e&&!l||(l=!1,e=new xi(r,s,a),n=t.subscribe({next:function(t){e.next(t)},error:function(t){l=!0,e.error(t)},complete:function(){p=!0,e.complete()}}));var i=e.subscribe(this);this.add((function(){c--,i.unsubscribe(),n&&!p&&u&&0===c&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(i))}}function er(t){return function(e){return e.lift(new nr(t,e))}}var nr=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new ir(t,this.predicate,this.source))},t}(),ir=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.source=i,r.seenValue=!1,r.index=0,r}return i.__extends(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new Be)},e}(y);function rr(t){return function(e){return e.lift(new or(t))}}var or=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new sr(t,this.total))},t}(),sr=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.count=0,i}return i.__extends(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(y);function ur(t){return function(e){return e.lift(new ar(t))}}var ar=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new Fe}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new y(t)):e.subscribe(new cr(t,this._skipCount))},t}(),cr=function(t){function e(e,n){var i=t.call(this,e)||this;return i._skipCount=n,i._count=0,i._ring=new Array(n),i}return i.__extends(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var i=n%e,r=this._ring,o=r[i];r[i]=t,this.destination.next(o)}},e}(y);function lr(t){return function(e){return e.lift(new pr(t))}}var pr=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new dr(t,this.notifier))},t}(),dr=function(t){function e(e,n){var i=t.call(this,e)||this;i.hasValue=!1;var r=new m(i,void 0,void 0);return i.add(r),i.innerSubscription=r,U(i,n,void 0,void 0,r),i}return i.__extends(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(t,e,n,i,r){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(_);function fr(t){return function(e){return e.lift(new hr(t))}}var hr=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new vr(t,this.predicate))},t}(),vr=function(t){function e(e,n){var i=t.call(this,e)||this;return i.predicate=n,i.skipping=!0,i.index=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(t){this.destination.error(t)}},e}(y);function yr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n=t[t.length-1];W(n)?t.pop():n=null;var i=t.length;return Nt(1!==i||n?i>0?yt(t,n):Ft(n):Et(t[0]),e)}}var br=1,_r={};var mr=function(t){var e=br++;return _r[e]=t,Promise.resolve().then((function(){return function(t){var e=_r[t];e&&e()}(e)})),e},gr=function(t){delete _r[t]},Sr=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return i.__extends(e,t),e.prototype.requestAsyncId=function(e,n,i){return void 0===i&&(i=0),null!==i&&i>0?t.prototype.requestAsyncId.call(this,e,n,i):(e.actions.push(this),e.scheduled||(e.scheduled=mr(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,i){if(void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,i);0===e.actions.length&&(gr(n),e.scheduled=void 0)},e}(M),xr=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,r=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i<r&&(t=n.shift()));if(this.active=!1,e){for(;++i<r&&(t=n.shift());)t.unsubscribe();throw e}},e}(z))(Sr),wr=function(t){function e(e,n,i){void 0===n&&(n=0),void 0===i&&(i=xr);var r=t.call(this)||this;return r.source=e,r.delayTime=n,r.scheduler=i,(!H(n)||n<0)&&(r.delayTime=0),i&&"function"==typeof i.schedule||(r.scheduler=xr),r}return i.__extends(e,t),e.create=function(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=xr),new e(t,n,i)},e.dispatch=function(t){var e=t.source,n=t.subscriber;return this.add(e.subscribe(n))},e.prototype._subscribe=function(t){var n=this.delayTime,i=this.source;return this.scheduler.schedule(e.dispatch,n,{source:i,subscriber:t})},e}(F);function Fr(t,e){return void 0===e&&(e=0),function(n){return n.lift(new Er(t,e))}}var Er=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new wr(e,this.delay,this.scheduler).subscribe(t)},t}();function Ir(t,e){return"function"==typeof e?function(n){return n.pipe(Ir((function(n,i){return St(t(n,i)).pipe(Ct((function(t,r){return e(n,t,i,r)})))})))}:function(e){return e.lift(new Cr(t))}}var Cr=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new kr(t,this.project))},t}(),kr=function(t){function e(e,n){var i=t.call(this,e)||this;return i.project=n,i.index=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var i=this.innerSubscription;i&&i.unsubscribe();var r=new m(this,void 0,void 0);this.destination.add(r),this.innerSubscription=U(this,t,e,n,r)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e}(_);function Tr(){return Ir(jt)}function Or(t,e){return e?Ir((function(){return t}),e):Ir((function(){return t}))}function Pr(t){return function(e){return e.lift(new Br(t))}}var Br=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new jr(t),i=U(n,this.notifier);return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n},t}(),jr=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(_);function Dr(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new Ur(t,e))}}var Ur=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new Nr(t,this.predicate,this.inclusive))},t}(),Nr=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.inclusive=i,r.index=0,r}return i.__extends(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void n.error(t)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())},e}(y),Ar={leading:!0,trailing:!1};function Lr(t,e){return void 0===e&&(e=Ar),function(n){return n.lift(new Mr(t,e.leading,e.trailing))}}var Mr=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new Vr(t,this.durationSelector,this.leading,this.trailing))},t}(),Vr=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.destination=e,o.durationSelector=n,o._leading=i,o._trailing=r,o._hasValue=!1,o}return i.__extends(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=null},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=U(this,e))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=null,e&&this.send()},e.prototype.notifyNext=function(t,e,n,i,r){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(_);function zr(t,e,n){return void 0===e&&(e=R),void 0===n&&(n=Ar),function(i){return i.lift(new Rr(t,e,n.leading,n.trailing))}}var Rr=function(){function t(t,e,n,i){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=i}return t.prototype.call=function(t,e){return e.subscribe(new Hr(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),Hr=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.duration=n,s.scheduler=i,s.leading=r,s.trailing=o,s._hasTrailingValue=!1,s._trailingValue=null,s}return i.__extends(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Wr,this.duration,{subscriber:this})),this.leading&&this.destination.next(t))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(y);function Wr(t){t.subscriber.clearThrottle()}function Zr(t){return void 0===t&&(t=R),function(e){return n=function(){return e.pipe(Un((function(e,n){var i=e.current;return{value:n,current:t.now(),last:i}}),{current:t.now(),value:void 0,last:void 0}),Ct((function(t){var e=t.current,n=t.last,i=t.value;return new Kr(i,e-n)})))},new F((function(t){var e;try{e=n()}catch(e){return void t.error(e)}return(e?St(e):Ft()).subscribe(t)}));var n}}var Kr=function(){return function(t,e){this.value=t,this.interval=e}}();function qr(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}qr.prototype=Object.create(Error.prototype);var Gr=qr;function Yr(t,e,n){return void 0===n&&(n=R),function(i){var r=te(t),o=r?+t-n.now():Math.abs(t);return i.lift(new $r(o,r,e,n))}}var $r=function(){function t(t,e,n,i){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=i}return t.prototype.call=function(t,e){return e.subscribe(new Xr(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Xr=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.absoluteTimeout=n,s.waitFor=i,s.withObservable=r,s.scheduler=o,s.action=null,s.scheduleTimeout(),s}return i.__extends(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(U(t,e))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null},e}(_);function Jr(t,e){return void 0===e&&(e=R),Yr(t,ee(new Gr),e)}function Qr(t){return void 0===t&&(t=R),Ct((function(e){return new to(e,t.now())}))}var to=function(){return function(t,e){this.value=t,this.timestamp=e}}();function eo(t,e,n){return 0===n?[e]:(t.push(e),t)}function no(){return Ln(eo,[])}function io(t){return function(e){return e.lift(new ro(t))}}var ro=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new oo(t),i=e.subscribe(n);return i.closed||n.add(U(n,this.windowBoundaries)),i},t}(),oo=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new pn,e.next(n.window),n}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.openWindow()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new pn;e.next(n)},e}(_);function so(t,e){return void 0===e&&(e=0),function(n){return n.lift(new uo(t,e))}}var uo=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new ao(t,this.windowSize,this.startWindowEvery))},t}(),ao=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.destination=e,r.windowSize=n,r.startWindowEvery=i,r.windows=[new pn],r.count=0,e.next(r.windows[0]),r}return i.__extends(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,i=this.windowSize,r=this.windows,o=r.length,s=0;s<o&&!this.closed;s++)r[s].next(t);var u=this.count-i+1;if(u>=0&&u%e==0&&!this.closed&&r.shift().complete(),++this.count%e==0&&!this.closed){var a=new pn;r.push(a),n.next(a)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(y);function co(t){var e=R,n=null,i=Number.POSITIVE_INFINITY;return W(arguments[3])&&(e=arguments[3]),W(arguments[2])?e=arguments[2]:H(arguments[2])&&(i=arguments[2]),W(arguments[1])?e=arguments[1]:H(arguments[1])&&(n=arguments[1]),function(r){return r.lift(new lo(t,n,i,e))}}var lo=function(){function t(t,e,n,i){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=i}return t.prototype.call=function(t,e){return e.subscribe(new fo(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),po=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return i.__extends(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(pn),fo=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=i,s.maxWindowSize=r,s.scheduler=o,s.windows=[];var u=s.openWindow();if(null!==i&&i>=0){var a={subscriber:s,window:u,context:null},c={windowTimeSpan:n,windowCreationInterval:i,subscriber:s,scheduler:o};s.add(o.schedule(yo,n,a)),s.add(o.schedule(vo,i,c))}else{var l={subscriber:s,window:u,windowTimeSpan:n};s.add(o.schedule(ho,n,l))}return s}return i.__extends(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,i=0;i<n;i++){var r=e[i];r.closed||(r.next(t),r.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(r))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new po;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(y);function ho(t){var e=t.subscriber,n=t.windowTimeSpan,i=t.window;i&&e.closeWindow(i),t.window=e.openWindow(),this.schedule(t,n)}function vo(t){var e=t.windowTimeSpan,n=t.subscriber,i=t.scheduler,r=t.windowCreationInterval,o=n.openWindow(),s={action:this,subscription:null},u={subscriber:n,window:o,context:s};s.subscription=i.schedule(yo,e,u),this.add(s.subscription),this.schedule(t,r)}function yo(t){var e=t.subscriber,n=t.window,i=t.context;i&&i.action&&i.subscription&&i.action.remove(i.subscription),e.closeWindow(n)}function bo(t,e){return function(n){return n.lift(new _o(t,e))}}var _o=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new mo(t,this.openings,this.closingSelector))},t}(),mo=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.openings=n,r.closingSelector=i,r.contexts=[],r.add(r.openSubscription=U(r,n,n)),r}return i.__extends(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,i=0;i<n;i++)e[i].window.next(t)},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var i=n.length,r=-1;++r<i;){var o=n[r];o.window.error(e),o.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,i=-1;++i<n;){var r=e[i];r.window.complete(),r.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var i=t[n];i.window.unsubscribe(),i.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,i,r){if(t===this.openings){var o=void 0;try{o=(0,this.closingSelector)(e)}catch(t){return this.error(t)}var s=new pn,u=new f,a={window:s,subscription:u};this.contexts.push(a);var c=U(this,o,a);c.closed?this.closeWindow(this.contexts.length-1):(c.context=a,u.add(c)),this.destination.next(s)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],i=n.window,r=n.subscription;e.splice(t,1),i.complete(),r.unsubscribe()}},e}(_);function go(t){return function(e){return e.lift(new So(t))}}var So=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new xo(t,this.closingSelector))},t}(),xo=function(t){function e(e,n){var i=t.call(this,e)||this;return i.destination=e,i.closingSelector=n,i.openWindow(),i}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.openWindow(r)},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n,i=this.window=new pn;this.destination.next(i);try{n=(0,this.closingSelector)()}catch(t){return this.destination.error(t),void this.window.error(t)}this.add(this.closingNotification=U(this,n))},e}(_);function wo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"==typeof t[t.length-1]&&(n=t.pop());var i=t;return e.lift(new Fo(i,n))}}var Fo=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new Eo(t,this.observables,this.project))},t}(),Eo=function(t){function e(e,n,i){var r=t.call(this,e)||this;r.observables=n,r.project=i,r.toRespond=[];var o=n.length;r.values=new Array(o);for(var s=0;s<o;s++)r.toRespond.push(s);for(s=0;s<o;s++){var u=n[s];r.add(U(r,u,u,s))}return r}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.values[n]=e;var o=this.toRespond;if(o.length>0){var s=o.indexOf(n);-1!==s&&o.splice(s,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(_);function Io(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return"function"==typeof n&&t.pop(),yt(t,void 0).lift(new Co(n))}var Co=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new ko(t,this.resultSelector))},t}(),ko=function(t){function e(e,n,i){void 0===i&&(i=Object.create(null));var r=t.call(this,e)||this;return r.iterators=[],r.active=0,r.resultSelector="function"==typeof n?n:null,r.values=i,r}return i.__extends(e,t),e.prototype._next=function(t){var e=this.iterators;c(t)?e.push(new Oo(t)):"function"==typeof t[T]?e.push(new To(t[T]())):e.push(new Po(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var i=t[n];if(i.stillUnsubscribed)this.destination.add(i.subscribe(i,n));else this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,i=0;i<e;i++){if("function"==typeof(s=t[i]).hasValue&&!s.hasValue())return}var r=!1,o=[];for(i=0;i<e;i++){var s,u=(s=t[i]).next();if(s.hasCompleted()&&(r=!0),u.done)return void n.complete();o.push(u.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),r&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(y),To=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return t&&t.done},t}(),Oo=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[T]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),Po=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.parent=n,r.observable=i,r.stillUnsubscribed=!0,r.buffer=[],r.isComplete=!1,r}return i.__extends(e,t),e.prototype[T]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,e,n,i,r){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return U(this,this.observable,this,e)},e}(_);function Bo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Io.apply(void 0,[e].concat(t)))}}function jo(t){return function(e){return e.lift(new Co(t))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(14);e.FileSelectModule=r.FileSelectModule;var o=n(39);e.UploadModule=o.UploadModule;var s=n(59);e.UploadsModule=s.UploadsModule;var u=n(13);e.UploadComponent=u.UploadComponent;var a=n(15);e.FileSelectComponent=a.FileSelectComponent;var c=n(38);e.UploadDropZoneComponent=c.UploadDropZoneComponent;var l=n(35);e.FileSelectDirective=l.FileSelectDirective;var p=n(28);e.FileListComponent=p.FileListComponent;var d=n(34);e.FileListSingleItemComponent=d.FileListSingleItemComponent;var f=n(30);e.FileListItemActionButtonComponent=f.FileListItemActionButtonComponent;var h=n(31);e.FileListMultipleItemsComponent=h.FileListMultipleItemsComponent;var v=n(10);e.FileTemplateDirective=v.FileTemplateDirective;var y=n(7);e.FileInfoTemplateDirective=y.FileInfoTemplateDirective;var b=n(36);e.TemplateContextDirective=b.TemplateContextDirective;var _=n(41);e.UploadStatusTotalComponent=_.UploadStatusTotalComponent;var m=n(40);e.UploadActionButtonsComponent=m.UploadActionButtonsComponent;var g=n(37);e.UploadDropZoneDirective=g.UploadDropZoneDirective;var S=n(25);e.CustomMessagesComponent=S.CustomMessagesComponent,i.__exportStar(n(23),e),i.__exportStar(n(4),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){this.files=t};e.CancelEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(t){function e(){return t.call(this)||this}return i.__extends(e,t),e}(n(9).PreventableEvent);e.ClearEvent=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e,n){this.files=t,this.operation=e,this.response=n};e.ErrorEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){this.file=t};e.PauseEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(t){function e(e,n){var i=t.call(this)||this;return i.files=e,i.headers=n,i}return i.__extends(e,t),e}(n(9).PreventableEvent);e.RemoveEvent=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){this.file=t};e.ResumeEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(t){function e(e){var n=t.call(this)||this;return n.files=e,n}return i.__extends(e,t),e}(n(9).PreventableEvent);e.SelectEvent=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(t){function e(e,n,i){var r=t.call(this)||this;return r.files=e,r.operation=n,r.response=i,r}return i.__extends(e,t),e}(n(9).PreventableEvent);e.SuccessEvent=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(t){function e(e,n){var i=t.call(this)||this;return i.files=e,i.headers=n,i}return i.__extends(e,t),e}(n(9).PreventableEvent);e.UploadEvent=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){this.files=t,this.percentComplete=e};e.UploadProgressEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fileGroupMap={audio:[".aif",".iff",".m3u",".m4a",".mid",".mp3",".mpa",".wav",".wma",".ogg",".wav",".wma",".wpl"],video:[".3g2",".3gp",".avi",".asf",".flv",".m4u",".rm",".h264",".m4v",".mkv",".mov",".mp4",".mpg",".rm",".swf",".vob",".wmv"],image:[".ai",".dds",".heic",".jpe","jfif",".jif",".jp2",".jps",".eps",".bmp",".gif",".jpeg",".jpg",".png",".ps",".psd",".svg",".svgz",".tif",".tiff"],txt:[".doc",".docx",".log",".pages",".tex",".wpd",".wps",".odt",".rtf",".text",".txt",".wks"],presentation:[".key",".odp",".pps",".ppt",".pptx"],data:[".xlr",".xls",".xlsx"],programming:[".tmp",".bak",".msi",".cab",".cpl",".cur",".dll",".dmp",".drv",".icns",".ico",".link",".sys",".cfg",".ini",".asp",".aspx",".cer",".csr",".css",".dcr",".htm",".html",".js",".php",".rss",".xhtml"],pdf:[".pdf"],config:[".apk",".app",".bat",".cgi",".com",".exe",".gadget",".jar",".wsf"],zip:[".7z",".cbr",".gz",".sitx",".arj",".deb",".pkg",".rar",".rpm",".tar.gz",".z",".zip",".zipx"],discImage:[".dmg",".iso",".toast",".vcd",".bin",".cue",".mdf"]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this._files={}}return t.prototype.add=function(t,e){var n={index:0,position:0,retries:0,totalChunks:e};return this._files[t]=n,n},t.prototype.remove=function(t){this.has(t)&&(this._files[t]=null,delete this._files[t])},t.prototype.has=function(t){return t in this._files},t.prototype.get=function(t){return this._files[t]},t}();e.ChunkMap=i},function(t,e){t.exports=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(5),s=n(12),u=n(27),a=n(3),c=function(t){function e(e,n,i,r){var o=t.call(this,e,n,"k-dropzone-hover")||this;return o.ngZone=i,o.uploadService=r,o.initialClassName=!0,o.hideIntervalDocument=null,o.activeClass="k-dropzone-active",o.ngZone.runOutsideAngular((function(){o.unsubscribeDocumentDragEnter=o.renderer.listen("document","dragenter",(function(){return o.onDocumentDragEnter()})),o.unsubscribeDocumentDragOver=o.renderer.listen("document","dragover",(function(){return o.onDocumentDragOver()}))})),o}return i.__extends(e,t),e.prototype.ngOnDestroy=function(){var t=this;this.ngZone.runOutsideAngular((function(){t.unsubscribeDocumentDragEnter&&t.unsubscribeDocumentDragEnter(),t.unsubscribeDocumentDragOver&&t.unsubscribeDocumentDragOver()}))},e.prototype.onDocumentDragEnter=function(){var t=this;return this.addClass(this.activeClass),this.lastDragDocument=new Date,this.hideIntervalDocument||(this.hideIntervalDocument=setInterval((function(){t.calculateTimeDiff(t.lastDragDocument)<100||(t.removeClass(t.activeClass),clearInterval(t.hideIntervalDocument),t.hideIntervalDocument=null)}),100)),!1},e.prototype.onDocumentDragOver=function(){return this.lastDragDocument=new Date,!1},e.prototype.onDropListener=function(t){var e=t.dataTransfer.files;if(e.length>0&&!this.disabled){var n=o.getAllFileInfo(e);n=o.assignGuidToFiles(n,!this.uploadService.async.batch),this.multiple||(n.splice(1,n.length-1),this.uploadService.clearFiles()),s.validateFiles(n,this.restrictions),this.uploadService.addFiles(n)}return!1},i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"multiple",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"restrictions",void 0),i.__decorate([r.HostBinding("class.k-dropzone"),i.__metadata("design:type",Boolean)],e.prototype,"initialClassName",void 0),i.__decorate([r.HostListener("drop",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",Boolean)],e.prototype,"onDropListener",null),e=i.__decorate([r.Directive({selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n "}),i.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2,r.NgZone,a.UploadService])],e)}(u.DropZoneBase);e.DropZoneInternalDirective=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(26),s=n(2),u=function(t){function e(e){var n=t.call(this)||this;return n.service=e,n}var n;return i.__extends(e,t),n=e,e=n=i.__decorate([r.Directive({providers:[{provide:o.Messages,useExisting:r.forwardRef((function(){return n}))}],selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "}),i.__metadata("design:paramtypes",[s.LocalizationService])],e)}(o.Messages);e.LocalizedMessagesDirective=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(14),s=n(39),u=function(){function t(){}return t=i.__decorate([r.NgModule({exports:[o.FileSelectModule,s.UploadModule]})],t)}();e.UploadsModule=u}])}));