@progress/kendo-angular-upload 9.0.4-dev.202211170816 → 11.0.0-develop.100

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 (136) hide show
  1. package/LICENSE.md +1 -1
  2. package/NOTICE.txt +4 -4
  3. package/README.md +1 -1
  4. package/common/action-buttons-layout.d.ts +1 -1
  5. package/common/util.d.ts +1 -1
  6. package/common/validation-util.d.ts +1 -1
  7. package/dropzone-base.d.ts +2 -2
  8. package/dropzone-external.directive.d.ts +1 -1
  9. package/dropzone-internal.directive.d.ts +1 -1
  10. package/dropzone.component.d.ts +11 -3
  11. package/dropzone.service.d.ts +1 -1
  12. package/{esm2015/types/chunk-metadata.js → esm2020/common/action-buttons-layout.mjs} +1 -1
  13. package/{esm2015/common/util.js → esm2020/common/util.mjs} +13 -10
  14. package/{esm2015/common/validation-util.js → esm2020/common/validation-util.mjs} +2 -2
  15. package/{esm2015/dropzone-base.js → esm2020/dropzone-base.mjs} +5 -5
  16. package/{esm2015/dropzone-external.directive.js → esm2020/dropzone-external.directive.mjs} +5 -5
  17. package/{esm2015/dropzone-internal.directive.js → esm2020/dropzone-internal.directive.mjs} +11 -7
  18. package/esm2020/dropzone.component.mjs +134 -0
  19. package/{esm2015/dropzone.service.js → esm2020/dropzone.service.mjs} +5 -5
  20. package/{esm2015/events/cancel-event.js → esm2020/events/cancel-event.mjs} +1 -1
  21. package/{esm2015/events/clear-event.js → esm2020/events/clear-event.mjs} +1 -1
  22. package/{esm2015/events/error-event.js → esm2020/events/error-event.mjs} +1 -1
  23. package/{esm2015/events/pause-event.js → esm2020/events/pause-event.mjs} +1 -1
  24. package/{esm2015/events/preventable-event.js → esm2020/events/preventable-event.mjs} +1 -1
  25. package/{esm2015/events/remove-event.js → esm2020/events/remove-event.mjs} +1 -1
  26. package/{esm2015/events/resume-event.js → esm2020/events/resume-event.mjs} +1 -1
  27. package/{esm2015/events/select-event.js → esm2020/events/select-event.mjs} +1 -1
  28. package/{esm2015/events/success-event.js → esm2020/events/success-event.mjs} +1 -1
  29. package/{esm2015/events/upload-event.js → esm2020/events/upload-event.mjs} +1 -1
  30. package/{esm2015/events/upload-progress-event.js → esm2020/events/upload-progress-event.mjs} +1 -1
  31. package/{esm2015/events.js → esm2020/events.mjs} +1 -1
  32. package/{esm2015/file-select.directive.js → esm2020/file-select.directive.mjs} +7 -5
  33. package/{esm2015/fileselect.component.js → esm2020/fileselect.component.mjs} +100 -60
  34. package/{esm2015/fileselect.module.js → esm2020/fileselect.module.mjs} +7 -6
  35. package/{esm2015/main.js → esm2020/index.mjs} +2 -1
  36. package/{esm2015/localization/custom-messages.component.js → esm2020/localization/custom-messages.component.mjs} +5 -4
  37. package/{esm2015/localization/localized-messages.directive.js → esm2020/localization/localized-messages.directive.mjs} +5 -4
  38. package/{esm2015/localization/messages.js → esm2020/localization/messages.mjs} +4 -4
  39. package/{esm2015/navigation.service.js → esm2020/navigation.service.mjs} +56 -40
  40. package/{esm2015/package-metadata.js → esm2020/package-metadata.mjs} +3 -3
  41. package/{esm2015/kendo-angular-upload.js → esm2020/progress-kendo-angular-upload.mjs} +2 -2
  42. package/esm2020/rendering/file-list-item-action-button.component.mjs +262 -0
  43. package/{esm2015/rendering/file-list-item-base.js → esm2020/rendering/file-list-item-base.mjs} +5 -4
  44. package/{esm2015/rendering/file-list-item.js → esm2020/rendering/file-list-item.mjs} +7 -5
  45. package/esm2020/rendering/file-list-multiple-items.component.mjs +186 -0
  46. package/esm2020/rendering/file-list-single-item.component.mjs +185 -0
  47. package/{esm2015/rendering/file-list.component.js → esm2020/rendering/file-list.component.mjs} +16 -11
  48. package/{esm2015/rendering/upload-action-buttons.component.js → esm2020/rendering/upload-action-buttons.component.mjs} +8 -5
  49. package/{esm2015/rendering/upload-status-total.component.js → esm2020/rendering/upload-status-total.component.mjs} +51 -22
  50. package/{esm2015/shared.module.js → esm2020/shared.module.mjs} +15 -9
  51. package/{esm2015/templates/file-info-template.directive.js → esm2020/templates/file-info-template.directive.mjs} +5 -5
  52. package/{esm2015/templates/file-template.directive.js → esm2020/templates/file-template.directive.mjs} +5 -5
  53. package/{esm2015/templates/template-context.directive.js → esm2020/templates/template-context.directive.mjs} +5 -5
  54. package/{esm2015/common/action-buttons-layout.js → esm2020/types/async-settings.mjs} +1 -1
  55. package/{esm2015/types/chunk-info.js → esm2020/types/chunk-info.mjs} +1 -1
  56. package/{esm2015/types/chunk-map.js → esm2020/types/chunk-map.mjs} +1 -1
  57. package/{esm2015/types/async-settings.js → esm2020/types/chunk-metadata.mjs} +1 -1
  58. package/esm2020/types/chunk-settings.mjs +5 -0
  59. package/esm2020/types/direction.mjs +5 -0
  60. package/{esm2015/types/file-groups.js → esm2020/types/file-groups.mjs} +19 -1
  61. package/esm2020/types/file-info.mjs +5 -0
  62. package/{esm2015/types/file-map.js → esm2020/types/file-map.mjs} +26 -26
  63. package/esm2020/types/file-restrictions.mjs +5 -0
  64. package/{esm2015/types/file-state.js → esm2020/types/file-state.mjs} +1 -1
  65. package/esm2020/types/operation-type.mjs +5 -0
  66. package/{esm2015/types.js → esm2020/types.mjs} +1 -1
  67. package/{esm2015/upload.component.js → esm2020/upload.component.mjs} +125 -80
  68. package/{esm2015/upload.module.js → esm2020/upload.module.mjs} +8 -7
  69. package/{esm2015/upload.service.js → esm2020/upload.service.mjs} +35 -35
  70. package/{esm2015/uploads.module.js → esm2020/uploads.module.mjs} +5 -5
  71. package/events/cancel-event.d.ts +1 -1
  72. package/events/clear-event.d.ts +1 -1
  73. package/events/error-event.d.ts +1 -1
  74. package/events/pause-event.d.ts +1 -1
  75. package/events/preventable-event.d.ts +1 -1
  76. package/events/remove-event.d.ts +1 -1
  77. package/events/resume-event.d.ts +1 -1
  78. package/events/select-event.d.ts +1 -1
  79. package/events/success-event.d.ts +1 -1
  80. package/events/upload-event.d.ts +1 -1
  81. package/events/upload-progress-event.d.ts +3 -3
  82. package/events.d.ts +1 -1
  83. package/fesm2015/progress-kendo-angular-upload.mjs +4997 -0
  84. package/{fesm2015/kendo-angular-upload.js → fesm2020/progress-kendo-angular-upload.mjs} +829 -592
  85. package/file-select.directive.d.ts +1 -1
  86. package/fileselect.component.d.ts +13 -8
  87. package/fileselect.module.d.ts +8 -7
  88. package/{main.d.ts → index.d.ts} +2 -1
  89. package/localization/custom-messages.component.d.ts +1 -1
  90. package/localization/localized-messages.directive.d.ts +1 -1
  91. package/localization/messages.d.ts +1 -1
  92. package/navigation.service.d.ts +4 -3
  93. package/package-metadata.d.ts +1 -1
  94. package/package.json +30 -55
  95. package/{kendo-angular-upload.d.ts → progress-kendo-angular-upload.d.ts} +2 -2
  96. package/rendering/file-list-item-action-button.component.d.ts +8 -2
  97. package/rendering/file-list-item-base.d.ts +2 -2
  98. package/rendering/file-list-item.d.ts +1 -1
  99. package/rendering/file-list-multiple-items.component.d.ts +3 -1
  100. package/rendering/file-list-single-item.component.d.ts +3 -1
  101. package/rendering/file-list.component.d.ts +1 -1
  102. package/rendering/upload-action-buttons.component.d.ts +1 -1
  103. package/rendering/upload-status-total.component.d.ts +8 -1
  104. package/schematics/ngAdd/index.js +8 -6
  105. package/shared.module.d.ts +5 -2
  106. package/templates/file-info-template.directive.d.ts +1 -1
  107. package/templates/file-template.directive.d.ts +1 -1
  108. package/templates/template-context.directive.d.ts +1 -1
  109. package/types/async-settings.d.ts +1 -1
  110. package/types/chunk-info.d.ts +1 -1
  111. package/types/chunk-map.d.ts +1 -1
  112. package/types/chunk-metadata.d.ts +1 -1
  113. package/types/chunk-settings.d.ts +1 -1
  114. package/types/direction.d.ts +1 -1
  115. package/types/file-groups.d.ts +22 -1
  116. package/types/file-info.d.ts +1 -1
  117. package/types/file-map.d.ts +1 -1
  118. package/types/file-restrictions.d.ts +1 -1
  119. package/types/file-state.d.ts +1 -1
  120. package/types/operation-type.d.ts +1 -1
  121. package/types.d.ts +1 -1
  122. package/upload.component.d.ts +15 -10
  123. package/upload.module.d.ts +8 -7
  124. package/upload.service.d.ts +1 -1
  125. package/uploads.module.d.ts +1 -1
  126. package/bundles/kendo-angular-upload.umd.js +0 -5
  127. package/esm2015/dropzone.component.js +0 -112
  128. package/esm2015/rendering/file-list-item-action-button.component.js +0 -226
  129. package/esm2015/rendering/file-list-multiple-items.component.js +0 -172
  130. package/esm2015/rendering/file-list-single-item.component.js +0 -154
  131. package/esm2015/types/chunk-settings.js +0 -5
  132. package/esm2015/types/direction.js +0 -5
  133. package/esm2015/types/file-info.js +0 -5
  134. package/esm2015/types/file-restrictions.js +0 -5
  135. package/esm2015/types/operation-type.js +0 -5
  136. package/schematics/ngAdd/index.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { FileInfo, FileState } from '../types';
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
package/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  export { ChunkSettings } from './types/chunk-settings';
@@ -1,9 +1,9 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { HttpHeaders } from '@angular/common/http';
6
- import { ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, Renderer2, ChangeDetectorRef } from '@angular/core';
6
+ import { ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, Renderer2, ChangeDetectorRef, AfterViewInit } from '@angular/core';
7
7
  import { ControlValueAccessor } from '@angular/forms';
8
8
  import { LocalizationService } from '@progress/kendo-angular-l10n';
9
9
  import { Direction } from './types/direction';
@@ -25,12 +25,12 @@ export declare const UPLOAD_VALUE_ACCESSOR: any;
25
25
  /**
26
26
  * Represents the [Kendo UI Upload component for Angular]({% slug overview_upload %}).
27
27
  */
28
- export declare class UploadComponent implements OnInit, OnDestroy, ControlValueAccessor {
28
+ export declare class UploadComponent implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor {
29
29
  private uploadService;
30
30
  private localization;
31
31
  private navigation;
32
32
  private dropZoneService;
33
- private _ngZone;
33
+ private zone;
34
34
  private renderer;
35
35
  private cdr;
36
36
  /**
@@ -174,7 +174,7 @@ export declare class UploadComponent implements OnInit, OnDestroy, ControlValueA
174
174
  actionsLayout: ActionsLayout;
175
175
  fileTemplate: FileTemplateDirective;
176
176
  fileInfoTemplate: FileInfoTemplateDirective;
177
- fileSelect: ElementRef;
177
+ fileSelectInput: ElementRef;
178
178
  fileSelectButton: ElementRef;
179
179
  /**
180
180
  * Fires when the user navigates outside the component.
@@ -254,14 +254,11 @@ export declare class UploadComponent implements OnInit, OnDestroy, ControlValueA
254
254
  private selectButtonFocusSubscription;
255
255
  private localizationChangeSubscription;
256
256
  private subs;
257
- constructor(uploadService: UploadService, localization: LocalizationService, navigation: NavigationService, dropZoneService: DropZoneService, _ngZone: NgZone, renderer: Renderer2, cdr: ChangeDetectorRef, wrapper: ElementRef);
257
+ constructor(uploadService: UploadService, localization: LocalizationService, navigation: NavigationService, dropZoneService: DropZoneService, zone: NgZone, renderer: Renderer2, cdr: ChangeDetectorRef, wrapper: ElementRef);
258
258
  ngOnInit(): void;
259
+ ngAfterViewInit(): void;
259
260
  ngOnChanges(changes: any): void;
260
261
  ngOnDestroy(): void;
261
- /**
262
- * @hidden
263
- */
264
- handleKeydown(event: any): void;
265
262
  /**
266
263
  * @hidden
267
264
  */
@@ -304,6 +301,13 @@ export declare class UploadComponent implements OnInit, OnDestroy, ControlValueA
304
301
  * @hidden
305
302
  */
306
303
  textFor(key: string): string;
304
+ /**
305
+ * @hidden
306
+ */
307
+ getIds(): {
308
+ buttonId: string;
309
+ inputId: string;
310
+ };
307
311
  /**
308
312
  * Focuses the underlying input element.
309
313
  */
@@ -371,6 +375,7 @@ export declare class UploadComponent implements OnInit, OnDestroy, ControlValueA
371
375
  isEmpty(): boolean;
372
376
  private verifySettings;
373
377
  private subscribeBlur;
378
+ private handleKeydown;
374
379
  private subscribeFocus;
375
380
  private attachEventHandlers;
376
381
  static ɵfac: i0.ɵɵFactoryDeclaration<UploadComponent, never>;
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from "@angular/core";
@@ -7,16 +7,17 @@ import * as i1 from "./upload.component";
7
7
  import * as i2 from "./rendering/upload-action-buttons.component";
8
8
  import * as i3 from "./rendering/upload-status-total.component";
9
9
  import * as i4 from "./shared.module";
10
- import * as i5 from "./templates/file-template.directive";
11
- import * as i6 from "./templates/file-info-template.directive";
12
- import * as i7 from "./localization/custom-messages.component";
13
- import * as i8 from "./dropzone-external.directive";
14
- import * as i9 from "./dropzone.component";
10
+ import * as i5 from "@progress/kendo-angular-icons";
11
+ import * as i6 from "./templates/file-template.directive";
12
+ import * as i7 from "./templates/file-info-template.directive";
13
+ import * as i8 from "./localization/custom-messages.component";
14
+ import * as i9 from "./dropzone-external.directive";
15
+ import * as i10 from "./dropzone.component";
15
16
  /**
16
17
  * Represents the [NgModule](https://angular.io/api/core/NgModule) definition for the Upload component.
17
18
  */
18
19
  export declare class UploadModule {
19
20
  static ɵfac: i0.ɵɵFactoryDeclaration<UploadModule, never>;
20
- static ɵmod: i0.ɵɵNgModuleDeclaration<UploadModule, [typeof i1.UploadComponent, typeof i2.UploadActionButtonsComponent, typeof i3.UploadStatusTotalComponent], [typeof i4.SharedModule], [typeof i5.FileTemplateDirective, typeof i6.FileInfoTemplateDirective, typeof i7.CustomMessagesComponent, typeof i8.UploadDropZoneDirective, typeof i9.UploadDropZoneComponent, typeof i1.UploadComponent, typeof i2.UploadActionButtonsComponent, typeof i3.UploadStatusTotalComponent]>;
21
+ static ɵmod: i0.ɵɵNgModuleDeclaration<UploadModule, [typeof i1.UploadComponent, typeof i2.UploadActionButtonsComponent, typeof i3.UploadStatusTotalComponent], [typeof i4.SharedModule, typeof i5.IconsModule], [typeof i6.FileTemplateDirective, typeof i7.FileInfoTemplateDirective, typeof i8.CustomMessagesComponent, typeof i9.UploadDropZoneDirective, typeof i10.UploadDropZoneComponent, typeof i1.UploadComponent, typeof i2.UploadActionButtonsComponent, typeof i3.UploadStatusTotalComponent]>;
21
22
  static ɵinj: i0.ɵɵInjectorDeclaration<UploadModule>;
22
23
  }
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { HttpClient } from '@angular/common/http';
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from "@angular/core";
@@ -1,5 +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(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common/http"),require("@angular/core"),require("@progress/kendo-angular-common"),require("@angular/forms"),require("@progress/kendo-angular-l10n"),require("rxjs"),require("rxjs/operators"),require("@progress/kendo-licensing"),require("@angular/animations"),require("@angular/common")):"function"==typeof define&&define.amd?define("KendoAngularUpload",["exports","@angular/common/http","@angular/core","@progress/kendo-angular-common","@angular/forms","@progress/kendo-angular-l10n","rxjs","rxjs/operators","@progress/kendo-licensing","@angular/animations","@angular/common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularUpload={},e.ng.common.http,e.ng.core,e.KendoAngularCommon,e.ng.forms,e.KendoAngularL10N,e.rxjs,e.rxjs.operators,e.KendoLicensing,e.ng.animations,e.ng.common)}(this,function(p,M,c,u,e,t,R,V,j,n,i){"use strict";function H(n){var i;return n&&n.__esModule?n:(i=Object.create(null),n&&Object.keys(n).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(i,e,t.get?t:{enumerable:!0,get:function(){return n[e]}}))}),i.default=n,Object.freeze(i))}var A=H(M),o=H(c),s=H(t),a=H(i),N=function(e,t){return(N=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}N(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function d(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;p.FileState=void 0,(f=p.FileState||(p.FileState={}))[f.Failed=0]="Failed",f[f.Initial=1]="Initial",f[f.Selected=2]="Selected",f[f.Uploaded=3]="Uploaded",f[f.Uploading=4]="Uploading",f[f.Paused=5]="Paused";l.prototype.add=function(e){var t=e.uid;this.has(t)?e.validationErrors&&0<e.validationErrors.length?this._files[t].unshift(e):this._files[t].push(e):this._files[t]=[e]},l.prototype.remove=function(e){this.has(e)&&(this._files[e]=null,delete this._files[e])},l.prototype.clear=function(){var t,e,n,i=this._files;for(n in i)if(i.hasOwnProperty(n)){try{t=void 0;for(var o=d(i[n]),s=o.next();!s.done;s=o.next()){var a=s.value;a.httpSubscription&&a.httpSubscription.unsubscribe()}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}i[n]=null,delete i[n]}},l.prototype.has=function(e){return e in this._files},l.prototype.get=function(e){return this._files[e]},l.prototype.setFilesState=function(e,t){var n,i;try{for(var o=d(e),s=o.next();!s.done;s=o.next()){var a=s.value;this.setFilesStateByUid(a.uid,t)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},l.prototype.setFilesStateByUid=function(e,t){this.get(e).forEach(function(e){e.state=t})},Object.defineProperty(l.prototype,"count",{get:function(){return Object.getOwnPropertyNames(this._files).length},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"files",{get:function(){var e,t=this._files,n=[];for(e in t)t.hasOwnProperty(e)&&n.push(t[e]);return n},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"filesFlat",{get:function(){var e,t=this._files,n=[];for(e in t)t.hasOwnProperty(e)&&t[e].forEach(function(e){n.push(e)});return n},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"filesToUpload",{get:function(){var t,e,n,i=this._files,o=[];for(n in i)if(i.hasOwnProperty(n)){var s=i[n],a=!0;try{t=void 0;for(var r=d(s),l=r.next();!l.done;l=r.next()){var c=l.value;(c.state!==p.FileState.Selected||c.validationErrors&&0<c.validationErrors.length)&&(a=!1)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}a&&o.push(s)}return o},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"firstFileToUpload",{get:function(){var t,e,n,i=this._files;for(n in i)if(i.hasOwnProperty(n)){var o=i[n],s=!0;try{t=void 0;for(var a=d(o),r=a.next();!r.done;r=a.next()){var l=r.value;(l.state!==p.FileState.Selected||l.validationErrors&&0<l.validationErrors.length)&&(s=!1)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}if(s)return o}return null},enumerable:!1,configurable:!0}),l.prototype.getFilesWithState=function(t){return this.filesFlat.filter(function(e){return e.state===t})},l.prototype.hasFileWithState=function(e){var t,n,i,o=this._files;for(i in o)if(o.hasOwnProperty(i)){var s=o[i];try{t=void 0;for(var a=d(s),r=a.next();!r.done;r=a.next()){var l=r.value;if(0<=e.indexOf(l.state))return!0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}return!1};var _=l;function l(){this._files={}}var Z=function(e){this.files=e},f=(K.prototype.preventDefault=function(){this.prevented=!0},K.prototype.isDefaultPrevented=function(){return this.prevented},K);function K(){this.prevented=!1}r(W,$=f);var $,q=W;function W(){return $.call(this)||this}var G,X=function(e,t,n){this.files=e,this.operation=t,this.response=n},Q=function(e){this.file=e},Y=(r(J,G=f),J);function J(e,t){var n=G.call(this)||this;return n.files=e,n.headers=t,n}var ee,te=function(e){this.file=e},ne=(r(ie,ee=f),ie);function ie(e){var t=ee.call(this)||this;return t.files=e,t}r(ae,oe=f);var oe,se=ae;function ae(e,t,n){var i=oe.call(this)||this;return i.files=e,i.operation=t,i.response=n,i}r(ce,re=f);var re,le=ce;function ce(e,t){var n=re.call(this)||this;return n.files=e,n.headers=t,n}function pe(e){return!!(e instanceof Object&&e.hasOwnProperty("name"))}function ue(e){return e.extension=e.extension||Ce(e.name),e.name=e.name,e.size=e.size||0,e.hasOwnProperty("state")||(e.state=p.FileState.Initial),e.hasOwnProperty("uid")||(e.uid=u.guid()),e}function de(e){var t=e.name,n=e.size;return{extension:Ce(t),name:t,rawFile:e,size:n,state:p.FileState.Selected}}function fe(e){for(var t=new Array,n=0;n<e.length;n++)t.push(de(e[n]));return t}function he(e){return!!(e.validationErrors&&0<e.validationErrors.length)}function me(e){var t,n;try{for(var i=d(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(he(s))return!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!1}function ge(e){return e.files?fe(e.files):e.value.split("|").map(function(e,t){var n,e=e.trim();return{extension:Ce(e),name:-1!==(n=(e=e).lastIndexOf("\\"))?e.substr(n+1):e,rawFile:null,size:1e3*(t+1),state:p.FileState.Selected}})}function ye(e,t){var n=u.guid();return e.map(function(e){return e.uid=t?u.guid():n,e})}function ve(e){return String(e).trim().split(" ")}function be(e,t){var n=ve(t);return Boolean(ve(e.className).find(function(e){return 0<=n.indexOf(e)}))}function ke(e,t){var n,i;return void 0===t&&(t=!0),!(!e.tagName||(n=e.tagName.toLowerCase(),i=null!==(i=e.getAttribute("tabIndex"))&&!isNaN(i)&&-1<i,xe.test(n)?e.disabled:!i)||t&&(!(i=(n=e).getBoundingClientRect()).width||!i.height||"hidden"===window.getComputedStyle(n).visibility))}function Fe(e){return null!=e}var Se=function(e,t){this.files=e,this.percentComplete=t},Ie={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"]},Ce=function(e){e=e.match(/\.([^\.]+)$/);return e?e[0]:""},xe=/^(?:a|input|select|textarea|button|object)$/i,Ee="k-icon k-select k-input k-multiselect-wrap",De="k-upload-button k-clear-selected k-upload-selected k-upload-action",Te=(we.prototype.add=function(e,t){t={index:0,position:0,retries:0,totalChunks:t};return this._files[e]=t},we.prototype.remove=function(e){this.has(e)&&(this._files[e]=null,delete this._files[e])},we.prototype.has=function(e){return e in this._files},we.prototype.get=function(e){return this._files[e]},we);function we(){this._files={}}Object.defineProperty(m.prototype,"files",{get:function(){return this.fileList},enumerable:!1,configurable:!0}),m.prototype.setChunkSettings=function(e){!1!==e&&(this.async.chunk=!0,"object"==typeof e)&&(this.chunk=Object.assign({},this.chunk,e))},m.prototype.onChange=function(){var e=this.fileList.filesFlat.filter(function(e){return e.state===p.FileState.Initial||e.state===p.FileState.Uploaded});this.changeEvent.emit(0<e.length?e:null)},m.prototype.addFiles=function(e){var t,n,i=new ne(e);if(this.selectEvent.emit(i),!i.isDefaultPrevented()){try{for(var o=d(e),s=o.next();!s.done;s=o.next()){var a=s.value;this.fileList.add(a)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}this.async.autoUpload&&this.uploadFiles()}"FileSelect"===this.component&&(i=this.fileList.filesFlat,this.changeEvent.emit(0<i.length?i:null))},m.prototype.addInitialFiles=function(e){var t=this;this.fileList.clear(),e.forEach(function(e){e=ue(e);t.fileList.add(e)})},m.prototype.addInitialFileSelectFiles=function(e){var t=this;this.fileList.clear(),e.forEach(function(e){e instanceof File?t.fileList.add(function(e){e=de(e);return e.uid=u.guid(),e.state=p.FileState.Selected,e}(e)):t.fileList.add(ue(e))})},m.prototype.resumeFile=function(e){var t=this.fileList.get(e);this.resumeEvent.emit(new te(t[0])),this.fileList.setFilesStateByUid(e,p.FileState.Uploading),this._uploadFiles([t])},m.prototype.pauseFile=function(e){var t=this.fileList.get(e)[0];this.pauseEvent.emit(new Q(t)),this.fileList.setFilesStateByUid(e,p.FileState.Paused)},m.prototype.removeFiles=function(e){var t=this.fileList.get(e),n=new Y(t,this.cloneRequestHeaders(this.async.removeHeaders));this.removeEvent.emit(n),n.isDefaultPrevented()||("Upload"!==this.component||t[0].state!==p.FileState.Uploaded&&t[0].state!==p.FileState.Initial?(this.fileList.remove(e),"FileSelect"===this.component&&(e=this.fileList.filesFlat,this.changeEvent.emit(0<e.length?e:null))):this.performRemove(t,n))},m.prototype.cancelFiles=function(e){var t,n,i=this.fileList.get(e),o=new Z(i);this.cancelEvent.emit(o);try{for(var s=d(i),a=s.next();!a.done;a=s.next()){var r=a.value;r.httpSubscription&&r.httpSubscription.unsubscribe()}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}this.fileList.remove(e),this.checkAllComplete()},m.prototype.clearFiles=function(){var e=new q;this.clearEvent.emit(e),e.isDefaultPrevented()||(e=this.fileList.hasFileWithState([p.FileState.Initial,p.FileState.Uploaded]),this.fileList.clear(),e&&this.onChange())},m.prototype.uploadFiles=function(){var e=[];this.async.concurrent&&(e=this.fileList.filesToUpload),(e=this.async.concurrent||this.fileList.hasFileWithState([p.FileState.Uploading])?e:this.fileList.firstFileToUpload?[this.fileList.firstFileToUpload]:[])&&0<e.length&&this._uploadFiles(e)},m.prototype.retryFiles=function(e){e=[this.fileList.get(e)];this._uploadFiles(e)},m.prototype._uploadFiles=function(e){var t,n,i=this;try{for(var o=d(e),s=o.next();!s.done;s=o.next()){var a=function(e){if(e[0].state===p.FileState.Paused)return{value:void 0};var t,n=new le(e,i.cloneRequestHeaders(i.async.saveHeaders));i.uploadEvent.emit(n),n.isDefaultPrevented()?i.fileList.remove(e[0].uid):(i.fileList.setFilesState(e,p.FileState.Uploading),t=i.performUpload(e,n),e.forEach(function(e){e.httpSubscription=t}))}(s.value);if("object"==typeof a)return a.value}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},m.prototype.performRemove=function(t,e){var n=this,i=this.async,o=t.map(function(e){return e.name}),o=this.populateRemoveFormData(o,e.data),e=this.populateRequestOptions(e.headers,!1),i=new M.HttpRequest(i.removeMethod,i.removeUrl,o,e);this.http.request(i).subscribe(function(e){n.onSuccess(e,t,"remove")},function(e){n.onError(e,t,"remove")})},m.prototype.performUpload=function(t,e){var n=this,i=this.async,o=this.populateUploadFormData(t,e.data),e=this.populateRequestOptions(e.headers),i=new M.HttpRequest(i.saveMethod,i.saveUrl,o,e);return this.http.request(i).subscribe(function(e){e.type!==M.HttpEventType.UploadProgress||n.async.chunk?e instanceof M.HttpResponse&&(n.onSuccess(e,t,"upload"),n.checkAllComplete()):n.onProgress(e,t)},function(e){n.onError(e,t,"upload"),n.checkAllComplete()})},m.prototype.onSuccess=function(e,t,n){if("upload"===n&&this.async.chunk){if(this.onChunkProgress(t),!this.isChunkUploadComplete(t[0].uid))return this.updateChunkInfo(t[0].uid),void this._uploadFiles([t]);this.removeChunkInfo(t[0].uid)}e=new se(t,n,e);this.successEvent.emit(e),"upload"===n?this.fileList.setFilesState(t,e.isDefaultPrevented()?p.FileState.Failed:p.FileState.Uploaded):e.isDefaultPrevented()||this.fileList.remove(t[0].uid),e.isDefaultPrevented()||this.onChange()},m.prototype.onError=function(e,t,n){var i=this;if("upload"===n&&this.async.chunk){var o=this.chunk.maxAutoRetries,s=this.chunkMap.get(t[0].uid);if(s.retries<o)return s.retries+=1,void setTimeout(function(){i.retryFiles(t[0].uid)},this.chunk.autoRetryAfter)}o=new X(t,n,e);this.errorEvent.emit(o),"upload"===n&&this.fileList.setFilesState(t,p.FileState.Failed)},m.prototype.onProgress=function(e,t){e=Math.round(100*e.loaded/e.total),t=new Se(t,e<100?e:100);this.uploadProgressEvent.emit(t)},m.prototype.onChunkProgress=function(e){var t=this.chunkMap.get(e[0].uid),n=0,t=(t&&(n=t.index===t.totalChunks-1?100:Math.round((t.index+1)/t.totalChunks*100)),new Se(e,n<100?n:100));this.uploadProgressEvent.emit(t)},m.prototype.checkAllComplete=function(){!this.fileList.hasFileWithState([p.FileState.Uploading,p.FileState.Paused])&&this.areAllSelectedFilesHandled()?this.completeEvent.emit():this.shouldUploadNextFile()&&this.uploadFiles()},m.prototype.shouldUploadNextFile=function(){return!this.async.concurrent&&this.fileList.hasFileWithState([p.FileState.Selected])&&!this.fileList.hasFileWithState([p.FileState.Uploading])},m.prototype.areAllSelectedFilesHandled=function(){return 0===this.fileList.getFilesWithState(p.FileState.Selected).filter(function(e){return!e.validationErrors}).length},m.prototype.cloneRequestHeaders=function(t){var n={};return t&&t.keys().forEach(function(e){n[e]=t.get(e)}),new M.HttpHeaders(n)},m.prototype.populateRequestOptions=function(e,t){return{headers:e,reportProgress:t=void 0===t?!0:t,responseType:this.async.responseType,withCredentials:this.async.withCredentials}},m.prototype.populateUploadFormData=function(e,t){var n,i,o=this.async.saveField,s=new FormData;if(this.populateClientFormData(s,t),this.async.chunk)s.append(o,this.getNextChunk(e[0])),s.append("metadata",this.getChunkMetadata(e[0]));else try{for(var a=d(e),r=a.next();!r.done;r=a.next()){var l=r.value;s.append(o,l.rawFile)}}catch(e){n={error:e}}finally{try{r&&!r.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return s},m.prototype.populateRemoveFormData=function(e,t){var n,i,o=new FormData;this.populateClientFormData(o,t);try{for(var s=d(e),a=s.next();!a.done;a=s.next()){var r=a.value;o.append(this.async.removeField,r)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o},m.prototype.populateClientFormData=function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.append(n,t[n])},m.prototype.getNextChunk=function(e){var t=this.getChunkInfo(e),n=t.position+this.chunk.size;return e.rawFile.slice(t.position,n)},m.prototype.getChunkInfo=function(e){var t,n=this.chunkMap.get(e.uid);return n||(t=Math.ceil(e.size/this.chunk.size),n=this.chunkMap.add(e.uid,t)),n},m.prototype.updateChunkInfo=function(e){e=this.chunkMap.get(e);e.index<e.totalChunks-1&&(e.index+=1,e.position+=this.chunk.size,e.retries=0)},m.prototype.removeChunkInfo=function(e){this.chunkMap.remove(e)},m.prototype.getChunkMetadata=function(e){var t=this.chunkMap.get(e.uid),e={chunkIndex:t.index,contentType:e.rawFile.type,fileName:e.name,fileSize:e.size,fileUid:e.uid,totalChunks:t.totalChunks};return JSON.stringify(e)},m.prototype.isChunkUploadComplete=function(e){e=this.chunkMap.get(e);return!!e&&e.index+1===e.totalChunks};var h=m;function m(e){this.http=e,this.cancelEvent=new c.EventEmitter,this.clearEvent=new c.EventEmitter,this.completeEvent=new c.EventEmitter,this.errorEvent=new c.EventEmitter,this.pauseEvent=new c.EventEmitter,this.removeEvent=new c.EventEmitter,this.resumeEvent=new c.EventEmitter,this.selectEvent=new c.EventEmitter,this.successEvent=new c.EventEmitter,this.uploadEvent=new c.EventEmitter,this.uploadProgressEvent=new c.EventEmitter,this.changeEvent=new c.EventEmitter,this.async={autoUpload:!0,batch:!1,chunk:!1,concurrent:!0,removeField:"fileNames",removeHeaders:new M.HttpHeaders,removeMethod:"POST",removeUrl:"",responseType:"json",saveField:"files",saveHeaders:new M.HttpHeaders,saveMethod:"POST",saveUrl:"",withCredentials:!0},this.chunk={autoRetryAfter:100,size:1048576,maxAutoRetries:1,resumable:!0},this.component="Upload",this.chunkMap=new Te,this.fileList=new _}h.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:h,deps:[{token:A.HttpClient}],target:o.ɵɵFactoryTarget.Injectable}),h.ɵprov=o.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:h}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:h,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:A.HttpClient}]}});y.prototype.action=function(e){e=e.keyCode;return this.keyBindings[e]},y.prototype.process=function(e){var t=this.action(e);t&&t(e.shiftKey)},y.prototype.computeKeys=function(e){var t,n=this;this.keyBindings=((t={})[u.Keys.Enter]=function(){return n.handleEnter()},t[u.Keys.Escape]=function(){return n.handleEscape()},t[u.Keys.Delete]=function(){return n.handleDelete()},t[u.Keys.Tab]=function(e){return n.handleTab(e)},t[u.Keys.ArrowUp]=function(){return n.handleUp()},t[u.Keys.ArrowDown]=function(){return n.handleDown()},t[this.invertKeys(e,u.Keys.ArrowLeft,u.Keys.ArrowRight)]=function(){return n.handleLeft()},t[this.invertKeys(e,u.Keys.ArrowRight,u.Keys.ArrowLeft)]=function(){return n.handleRight()},t)},y.prototype.invertKeys=function(e,t,n){return"rtl"===e?n:t},y.prototype.focusSelectButton=function(){this.focused=!0,this._focusedIndex=-1,this.onSelectButtonFocus.emit()},y.prototype.handleEnter=function(){0<=this.lastIndex&&(this.focusedIndex<=this.lastFileIndex?this.onFileAction.emit(u.Keys.Enter):this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&this.onActionButtonAction.emit(this.focusedIndex<this.lastIndex?"clear":"upload"))},y.prototype.handleDelete=function(){0<=this.focusedIndex&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(u.Keys.Delete)},y.prototype.handleEscape=function(){0<=this.focusedIndex&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(u.Keys.Escape)},y.prototype.handleLeft=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex&&(--this.focusedIndex,this.onActionButtonFocus.emit("clear"))},y.prototype.handleRight=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex-1&&(this.focusedIndex+=1,this.onActionButtonFocus.emit("upload"))},y.prototype.handleTab=function(e){0<=this.focusedIndex&&e?this.focusedIndex=-1:this.onTab.emit()},y.prototype.handleDown=function(){0<=this.lastIndex&&this.focusedIndex<this.lastIndex&&(this.focusedIndex<this.lastFileIndex?(this.focusedIndex+=1,this.onFileFocus.emit(this.focusedIndex)):this.actionButtonsVisible&&this.focusedIndex===this.lastFileIndex&&(this.focusedIndex+=1,this.onActionButtonFocus.emit("clear")))},y.prototype.handleUp=function(){0<=this.lastIndex&&-1<this.focusedIndex&&(--this.focusedIndex,-1===this.focusedIndex?this.onSelectButtonFocus.emit():this.focusedIndex<=this.lastFileIndex?this.onFileFocus.emit(this.focusedIndex):this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&(this.focusedIndex=this.lastFileIndex,this.onFileFocus.emit(this.focusedIndex)))},Object.defineProperty(y.prototype,"focusedIndex",{get:function(){return this._focusedIndex},set:function(e){this.focused||this.onWrapperFocus.emit(),this._focusedIndex=e,this.focused=!0,0<=this._focusedIndex&&this._focusedIndex<=this.lastFileIndex&&this.onFileFocus.emit(e)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"lastFileIndex",{get:function(){return this.actionButtonsVisible?this.lastIndex-2:this.lastIndex},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"lastIndex",{get:function(){var e=this.uploadService.files.count;return this.actionButtonsVisible?e+1:e-1},enumerable:!1,configurable:!0});var g=y;function y(e){this.uploadService=e,this.onActionButtonAction=new c.EventEmitter,this.onActionButtonFocus=new c.EventEmitter,this.onFileAction=new c.EventEmitter,this.onFileFocus=new c.EventEmitter,this.onTab=new c.EventEmitter,this.onWrapperFocus=new c.EventEmitter,this.onSelectButtonFocus=new c.EventEmitter,this.actionButtonsVisible=!1,this.focused=!1,this._focusedIndex=-1}g.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:g,deps:[{token:h}],target:o.ɵɵFactoryTarget.Injectable}),g.ɵprov=o.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:g}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:g,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:h}]}});var Ue={name:"@progress/kendo-angular-upload",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1668672965,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"},f=function(e){this.templateRef=e},Be=(f.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:f,deps:[{token:o.TemplateRef}],target:o.ɵɵFactoryTarget.Directive}),f.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:f,selector:"[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]",ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:f,decorators:[{type:c.Directive,args:[{selector:"[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]"}]}],ctorParameters:function(){return[{type:o.TemplateRef}]}}),{}),v=(ze.prototype.addComponent=function(e,t){this.has(t)?Be[t].push(e):Be[t]=[e]},ze.prototype.getComponents=function(e){return Be[e]},ze.prototype.has=function(e){return e in Be},ze);function ze(){}v.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:v,deps:[],target:o.ɵɵFactoryTarget.Injectable}),v.ɵprov=o.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:v}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:v,decorators:[{type:c.Injectable}]});var b=function(e){this.templateRef=e},k=(b.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:b,deps:[{token:o.TemplateRef}],target:o.ɵɵFactoryTarget.Directive}),b.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:b,selector:"[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]",ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:b,decorators:[{type:c.Directive,args:[{selector:"[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]"}]}],ctorParameters:function(){return[{type:o.TemplateRef}]}}),F.prototype.focus=function(){this.element.nativeElement.focus()},Object.defineProperty(F.prototype,"uidAttribute",{get:function(){return this.files[0].uid},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"tabIndex",{get:function(){return"-1"},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"kFileError",{get:function(){return this.files[0].state===p.FileState.Failed},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"kFileInvalid",{get:function(){return me(this.files)},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"kFileProgress",{get:function(){return this.files[0].state===p.FileState.Uploading||this.files[0].state===p.FileState.Paused},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"kFileSuccess",{get:function(){return"Upload"===this.uploadService.component&&(this.files[0].state===p.FileState.Uploaded||this.files[0].state===p.FileState.Initial)},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"kStateFocused",{get:function(){return this.focused},enumerable:!1,configurable:!0}),F.prototype.onFocus=function(){this.focused=!0},F.prototype.onBlur=function(){this.focused=!1},F.prototype.onClick=function(e){ke(e.target)||be(e.target,Ee)||(this.navigationService.focusedIndex=this.index)},F);function F(e,t,n){this.navigationService=t,this.uploadService=n,this.fileClass=!0,this.focused=!1,this.element=e}k.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,deps:[{token:o.ElementRef},{token:g},{token:h}],target:o.ɵɵFactoryTarget.Directive}),k.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:k,selector:"[kendoUploadFileListItem]",inputs:{files:"files",index:"index"},host:{listeners:{focus:"onFocus()",blur:"onBlur()",click:"onClick($event)"},properties:{"class.k-file":"this.fileClass","attr.data-uid":"this.uidAttribute","attr.tabIndex":"this.tabIndex","class.k-file-error":"this.kFileError","class.k-file-invalid":"this.kFileInvalid","class.k-file-progress":"this.kFileProgress","class.k-file-success":"this.kFileSuccess","class.k-focus":"this.kStateFocused"}},ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,decorators:[{type:c.Directive,args:[{selector:"[kendoUploadFileListItem]"}]}],ctorParameters:function(){return[{type:o.ElementRef},{type:g},{type:h}]},propDecorators:{files:[{type:c.Input}],index:[{type:c.Input}],fileClass:[{type:c.HostBinding,args:["class.k-file"]}],uidAttribute:[{type:c.HostBinding,args:["attr.data-uid"]}],tabIndex:[{type:c.HostBinding,args:["attr.tabIndex"]}],kFileError:[{type:c.HostBinding,args:["class.k-file-error"]}],kFileInvalid:[{type:c.HostBinding,args:["class.k-file-invalid"]}],kFileProgress:[{type:c.HostBinding,args:["class.k-file-progress"]}],kFileSuccess:[{type:c.HostBinding,args:["class.k-file-success"]}],kStateFocused:[{type:c.HostBinding,args:["class.k-focus"]}],onFocus:[{type:c.HostListener,args:["focus"]}],onBlur:[{type:c.HostListener,args:["blur"]}],onClick:[{type:c.HostListener,args:["click",["$event"]]}]}});Pe.prototype.subscribeUploadProgress=function(e){this.uploadProgressSubscription=this.uploadService.uploadProgressEvent.subscribe(e)},Pe.prototype.fileHasValidationErrors=he,Pe.prototype.filesHaveValidationErrors=me,Pe.prototype.ngOnDestroy=function(){this.uploadProgressSubscription.unsubscribe()},Pe.prototype.getFileValidationMessage=function(e){var t;return t=e.validationErrors&&0<e.validationErrors.length?this.localization.get(e.validationErrors[0]):t},Pe.prototype.getTotalFilesSizeMessage=function(e){var t,n=e,i=0;if("number"!=typeof n[0].size)return"";for(t=0;t<n.length;t++)n[t].size&&(i+=n[t].size);return(i/=1024)<1024?i.toFixed(2)+" KB":(i/1024).toFixed(2)+" MB"},Pe.prototype.textFor=function(e){return this.localization.get(e)};var Le=Pe;function Pe(e){this.uploadService=e,this.progressComplete=0}Le.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Le,deps:[{token:h}],target:o.ɵɵFactoryTarget.Component}),Le.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Le,selector:"ng-component",ngImport:o,template:"",isInline:!0}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Le,decorators:[{type:c.Component,args:[{template:""}]}],ctorParameters:function(){return[{type:h}]}});S.prototype.onFocus=function(e){"action"===e&&(this.actionFocused=!0),"retry"===e&&(this.retryFocused=!0),"pauseResume"===e&&(this.pauseResumeFocused=!0)},S.prototype.onBlur=function(e){"retry"===e&&(this.retryFocused=!1),"action"===e&&(this.actionFocused=!1),"pauseResume"===e&&(this.pauseResumeFocused=!1)},S.prototype.onRetryClick=function(){this.disabled||this.uploadService.retryFiles(this.file.uid)},S.prototype.onRemoveCancelClick=function(e){this.disabled||(e.stopImmediatePropagation(),e=this.file.uid,this.file.state===p.FileState.Uploading?this.uploadService.cancelFiles(e):this.uploadService.removeFiles(e),this.navigation.focusSelectButton())},S.prototype.onPauseResumeClick=function(){var e;this.disabled||(e=this.file.uid,this.file.state===p.FileState.Paused?this.uploadService.resumeFile(e):this.uploadService.pauseFile(e))},Object.defineProperty(S.prototype,"actionButtonTitle",{get:function(){return this.file.state===p.FileState.Uploading?this.localization.get("cancel"):this.localization.get("remove")},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"retryButtonTitle",{get:function(){return this.localization.get("retry")},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"pauseResumeButtonTitle",{get:function(){return this.file.state===p.FileState.Uploading?this.localization.get("pause"):this.localization.get("resume")},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isUploading",{get:function(){return this.file.state===p.FileState.Uploading},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isFailed",{get:function(){return this.file.state===p.FileState.Failed},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isPaused",{get:function(){return this.file.state===p.FileState.Paused},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isResumable",{get:function(){var e=this.uploadService,e=e.async.chunk&&e.chunk.resumable,t=this.file.state===p.FileState.Paused||this.file.state===p.FileState.Uploading;return e&&t},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isActionButtonVisible",{get:function(){return!!(this.file.state!==p.FileState.Uploaded&&this.file.state!==p.FileState.Initial||this.uploadService.async.removeUrl||"Upload"!==this.uploadService.component)},enumerable:!1,configurable:!0});var Oe=S;function S(e,t,n){this.uploadService=e,this.localization=t,this.navigation=n,this.actionFocused=!1,this.retryFocused=!1,this.pauseResumeFocused=!1}Oe.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Oe,deps:[{token:h},{token:s.LocalizationService},{token:g}],target:o.ɵɵFactoryTarget.Component}),Oe.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Oe,selector:"kendo-upload-file-list-item-action-button",inputs:{file:"file",disabled:"disabled",progress:"progress"},ngImport:o,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 ',isInline:!0,directives:[{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:a.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Oe,decorators:[{type:c.Component,args:[{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 '}]}],ctorParameters:function(){return[{type:h},{type:s.LocalizationService},{type:g}]},propDecorators:{file:[{type:c.Input}],disabled:[{type:c.Input}],progress:[{type:c.Input}]}});Object.defineProperty(Me.prototype,"templateContext",{set:function(e){this.insertedViewRef&&(this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef)),this.insertedViewRef=void 0),e.templateRef&&(this.insertedViewRef=this.viewContainerRef.createEmbeddedView(e.templateRef,e))},enumerable:!1,configurable:!0});var I=Me;function Me(e){this.viewContainerRef=e}I.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:I,deps:[{token:o.ViewContainerRef}],target:o.ɵɵFactoryTarget.Directive}),I.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:I,selector:"[templateContext]",inputs:{templateContext:"templateContext"},ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:I,decorators:[{type:c.Directive,args:[{selector:"[templateContext]"}]}],ctorParameters:function(){return[{type:o.ViewContainerRef}]},propDecorators:{templateContext:[{type:c.Input}]}});r(je,Re=Le),Object.defineProperty(je.prototype,"fileStatusText",{get:function(){var e=this.file.validationErrors;return this.file.state===p.FileState.Uploaded?""+this.textFor("fileStatusUploaded"):this.file.state===p.FileState.Failed?""+this.textFor("fileStatusFailed"):Fe(e)?this.getFileValidationMessage(this.file):this.getTotalFilesSizeMessage([this.file])},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"showProgress",{get:function(){return this.file.state===p.FileState.Uploading||this.file.state===p.FileState.Paused?"active":"inactive"},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"fileGroupClass",{get:function(){var e,t=this.file.extension||"",n="k-i-file";for(e in Ie)if(0<=Ie[e].indexOf(t))return n+"-"+e;return n},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"isUploadSuccessful",{get:function(){return this.file.state===p.FileState.Uploaded},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"isUploadFailed",{get:function(){return this.file.state===p.FileState.Failed},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"isNotYetUploaded",{get:function(){return!this.isUploadFailed&&!this.isUploadSuccessful},enumerable:!1,configurable:!0});var Re,Ve=je;function je(e,t){var n=Re.call(this,t)||this;return n.localization=e,n.subscribeUploadProgress(function(e){e.files[0].uid===n.file.uid&&(n.progressComplete=e.percentComplete)}),n}Ve.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Ve,deps:[{token:s.LocalizationService},{token:h}],target:o.ɵɵFactoryTarget.Component}),Ve.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Ve,selector:"kendo-upload-file-list-single-item",inputs:{disabled:"disabled",file:"file",fileInfoTemplate:"fileInfoTemplate"},usesInheritance:!0,ngImport:o,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 ',isInline:!0,components:[{type:Oe,selector:"kendo-upload-file-list-item-action-button",inputs:["file","disabled","progress"]}],directives:[{type:a.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:I,selector:"[templateContext]",inputs:["templateContext"]}],animations:[n.trigger("progressState",[n.state("active",n.style({opacity:1})),n.state("inactive",n.style({opacity:0})),n.transition("void => active",n.style({opacity:0})),n.transition("inactive => active",n.style({opacity:1})),n.transition("active => inactive",n.animate("1s 2s ease-out"))])]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Ve,decorators:[{type:c.Component,args:[{animations:[n.trigger("progressState",[n.state("active",n.style({opacity:1})),n.state("inactive",n.style({opacity:0})),n.transition("void => active",n.style({opacity:0})),n.transition("inactive => active",n.style({opacity:1})),n.transition("active => inactive",n.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 '}]}],ctorParameters:function(){return[{type:s.LocalizationService},{type:h}]},propDecorators:{disabled:[{type:c.Input}],file:[{type:c.Input}],fileInfoTemplate:[{type:c.Input}]}});r(Ne,He=Le),Object.defineProperty(Ne.prototype,"showProgress",{get:function(){return this.files[0].state===p.FileState.Uploading||this.files[0].state===p.FileState.Paused?"active":"inactive"},enumerable:!1,configurable:!0}),Ne.prototype.ngOnInit=function(){this.filesHaveErrors=He.prototype.filesHaveValidationErrors.call(this,this.files)},Ne.prototype.fileStatusText=function(e){var t=e.validationErrors;return Fe(t)?this.getFileValidationMessage(e):this.getTotalFilesSizeMessage([e])},Object.defineProperty(Ne.prototype,"batchStatusText",{get:function(){var e=this.files[0].state,t=this.files.length;return e===p.FileState.Uploaded?t+" "+this.textFor("filesBatchStatusUploaded"):e===p.FileState.Failed?t+" "+this.textFor("filesBatchStatusFailed"):t+" "+this.textFor("filesBatchStatus")},enumerable:!1,configurable:!0}),Object.defineProperty(Ne.prototype,"isUploadSuccessful",{get:function(){return this.files[0].state===p.FileState.Uploaded},enumerable:!1,configurable:!0}),Object.defineProperty(Ne.prototype,"isUploadFailed",{get:function(){return this.files[0].state===p.FileState.Failed},enumerable:!1,configurable:!0});var He,Ae=Ne;function Ne(e,t){var n=He.call(this,t)||this;return n.localization=e,n.subscribeUploadProgress(function(e){e.files[0].uid===n.files[0].uid&&(n.progressComplete=e.percentComplete)}),n}Ae.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Ae,deps:[{token:s.LocalizationService},{token:h}],target:o.ɵɵFactoryTarget.Component}),Ae.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Ae,selector:"kendo-upload-file-list-multiple-items",inputs:{disabled:"disabled",files:"files",fileInfoTemplate:"fileInfoTemplate"},usesInheritance:!0,ngImport:o,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 ',isInline:!0,components:[{type:Oe,selector:"kendo-upload-file-list-item-action-button",inputs:["file","disabled","progress"]}],directives:[{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:a.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:a.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:I,selector:"[templateContext]",inputs:["templateContext"]}],animations:[n.trigger("progressState",[n.state("active",n.style({opacity:1})),n.state("inactive",n.style({opacity:0})),n.transition("void => active",n.style({opacity:0})),n.transition("inactive => active",n.style({opacity:1})),n.transition("active => inactive",n.animate("1s 2s ease-out"))])]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Ae,decorators:[{type:c.Component,args:[{animations:[n.trigger("progressState",[n.state("active",n.style({opacity:1})),n.state("inactive",n.style({opacity:0})),n.transition("void => active",n.style({opacity:0})),n.transition("inactive => active",n.style({opacity:1})),n.transition("active => inactive",n.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 '}]}],ctorParameters:function(){return[{type:s.LocalizationService},{type:h}]},propDecorators:{disabled:[{type:c.Input}],files:[{type:c.Input}],fileInfoTemplate:[{type:c.Input}]}});_e.prototype.onItemFocus=function(){var t=this;this.focusSubscription=this.navigation.onFileFocus.subscribe(function(e){t.fileListItems.toArray()[e].focus()})},_e.prototype.onItemAction=function(){var t=this;this.actionSubscription=this.navigation.onFileAction.subscribe(function(e){t.itemActionHandler(e)})},_e.prototype.itemActionHandler=function(e){var t=this.navigation.focusedIndex,t=this.fileListItems.toArray()[t],n=t.uidAttribute,i=this.uploadService.files.get(n);e===u.Keys.Escape&&i[0].state===p.FileState.Uploading?(this.uploadService.cancelFiles(n),this.navigation.focusSelectButton()):e===u.Keys.Enter&&i[0].state===p.FileState.Failed?this.uploadService.retryFiles(n):e===u.Keys.Delete&&(i[0].state===p.FileState.Uploading?this.uploadService.cancelFiles(n):this.hasDelete(t)&&this.uploadService.removeFiles(n),this.navigation.focusSelectButton())},_e.prototype.hasDelete=function(e){return 0<e.element.nativeElement.getElementsByClassName("k-delete").length},_e.prototype.ngOnDestroy=function(){this.focusSubscription.unsubscribe(),this.actionSubscription.unsubscribe()};n=_e;function _e(e,t){this.uploadService=e,this.navigation=t,this.onItemFocus(),this.onItemAction()}n.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:n,deps:[{token:h},{token:g}],target:o.ɵɵFactoryTarget.Component}),n.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:n,selector:"[kendo-upload-file-list]",inputs:{disabled:"disabled",fileList:"fileList",fileTemplate:"fileTemplate",fileInfoTemplate:"fileInfoTemplate"},viewQueries:[{propertyName:"fileListItems",predicate:k,descendants:!0}],ngImport:o,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 ",isInline:!0,components:[{type:Ve,selector:"kendo-upload-file-list-single-item",inputs:["disabled","file","fileInfoTemplate"]},{type:Ae,selector:"kendo-upload-file-list-multiple-items",inputs:["disabled","files","fileInfoTemplate"]}],directives:[{type:a.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:k,selector:"[kendoUploadFileListItem]",inputs:["files","index"]},{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:I,selector:"[templateContext]",inputs:["templateContext"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:n,decorators:[{type:c.Component,args:[{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 "}]}],ctorParameters:function(){return[{type:h},{type:g}]},propDecorators:{disabled:[{type:c.Input}],fileList:[{type:c.Input}],fileTemplate:[{type:c.Input}],fileInfoTemplate:[{type:c.Input}],fileListItems:[{type:c.ViewChildren,args:[k]}]}});r(Ke,Ze=t.ComponentMessages);var Ze,C=Ke;function Ke(){return null!==Ze&&Ze.apply(this,arguments)||this}C.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:C,deps:null,target:o.ɵɵFactoryTarget.Directive}),C.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:C,inputs:{cancel:"cancel",clearSelectedFiles:"clearSelectedFiles",dropFilesHere:"dropFilesHere",externalDropFilesHere:"externalDropFilesHere",filesBatchStatus:"filesBatchStatus",filesBatchStatusFailed:"filesBatchStatusFailed",filesBatchStatusUploaded:"filesBatchStatusUploaded",fileStatusFailed:"fileStatusFailed",fileStatusUploaded:"fileStatusUploaded",headerStatusPaused:"headerStatusPaused",headerStatusUploaded:"headerStatusUploaded",headerStatusUploading:"headerStatusUploading",invalidFileExtension:"invalidFileExtension",invalidMaxFileSize:"invalidMaxFileSize",invalidMinFileSize:"invalidMinFileSize",pause:"pause",remove:"remove",resume:"resume",retry:"retry",select:"select",uploadSelectedFiles:"uploadSelectedFiles"},usesInheritance:!0,ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:C,decorators:[{type:c.Directive}],propDecorators:{cancel:[{type:c.Input}],clearSelectedFiles:[{type:c.Input}],dropFilesHere:[{type:c.Input}],externalDropFilesHere:[{type:c.Input}],filesBatchStatus:[{type:c.Input}],filesBatchStatusFailed:[{type:c.Input}],filesBatchStatusUploaded:[{type:c.Input}],fileStatusFailed:[{type:c.Input}],fileStatusUploaded:[{type:c.Input}],headerStatusPaused:[{type:c.Input}],headerStatusUploaded:[{type:c.Input}],headerStatusUploading:[{type:c.Input}],invalidFileExtension:[{type:c.Input}],invalidMaxFileSize:[{type:c.Input}],invalidMinFileSize:[{type:c.Input}],pause:[{type:c.Input}],remove:[{type:c.Input}],resume:[{type:c.Input}],retry:[{type:c.Input}],select:[{type:c.Input}],uploadSelectedFiles:[{type:c.Input}]}});r(qe,$e=C);var $e,x=qe;function qe(e){var t=$e.call(this)||this;return t.service=e,t}x.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:x,deps:[{token:s.LocalizationService}],target:o.ɵɵFactoryTarget.Directive}),x.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:x,selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n ",providers:[{provide:C,useExisting:c.forwardRef(function(){return x})}],usesInheritance:!0,ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:x,decorators:[{type:c.Directive,args:[{providers:[{provide:C,useExisting:c.forwardRef(function(){return x})}],selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "}]}],ctorParameters:function(){return[{type:s.LocalizationService}]}});function We(e,t){for(var n,i,o,s=t.allowedExtensions.map(function(e){return("."===e.substring(0,1)?e:"."+e).toLowerCase()}),a=t.maxFileSize,r=t.minFileSize,l=0;l<e.length;l++)i=e[l],0<(o=s).length&&o.indexOf(i.extension.toLowerCase())<0&&(i.validationErrors=i.validationErrors||[],i.validationErrors.indexOf(Qe)<0)&&i.validationErrors.push(Qe),o=e[l],i=a,0!==(n=r)&&o.size<n&&(o.validationErrors=o.validationErrors||[],o.validationErrors.indexOf(Xe)<0)&&o.validationErrors.push(Xe),0!==i&&o.size>i&&(o.validationErrors=o.validationErrors||[],o.validationErrors.indexOf(Ge)<0)&&o.validationErrors.push(Ge)}var Ge="invalidMaxFileSize",Xe="invalidMinFileSize",Qe="invalidFileExtension",E=(Ye.prototype.onElementDragEnterListener=function(){var e=this;return this.addClass(this.hoverClass),this.lastDragElement=new Date,this.hideIntervalElement||(this.hideIntervalElement=setInterval(function(){e.calculateTimeDiff(e.lastDragElement)<100||(e.removeClass(e.hoverClass),clearInterval(e.hideIntervalElement),e.hideIntervalElement=null)},100)),!1},Ye.prototype.onElementDragOverListener=function(){return this.lastDragElement=new Date,!1},Ye.prototype.calculateTimeDiff=function(e){return(new Date).getTime()-e.getTime()},Ye.prototype.addClass=function(e){this.renderer.addClass(this.element.nativeElement,e)},Ye.prototype.removeClass=function(e){this.renderer.removeClass(this.element.nativeElement,e)},Ye);function Ye(e,t,n){this.element=e,this.renderer=t,this.hideIntervalElement=null,this.hoverClass=n}E.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:E,deps:[{token:o.ElementRef},{token:o.Renderer2},{token:"hoverClass"}],target:o.ɵɵFactoryTarget.Directive}),E.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:E,host:{listeners:{dragenter:"onElementDragEnterListener()",dragover:"onElementDragOverListener()"}},ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:E,decorators:[{type:c.Directive}],ctorParameters:function(){return[{type:o.ElementRef},{type:o.Renderer2},{type:void 0,decorators:[{type:c.Inject,args:["hoverClass"]}]}]},propDecorators:{onElementDragEnterListener:[{type:c.HostListener,args:["dragenter"]}],onElementDragOverListener:[{type:c.HostListener,args:["dragover"]}]}});r(et,Je=E),et.prototype.ngOnDestroy=function(){var e=this;this.ngZone.runOutsideAngular(function(){e.unsubscribeDocumentDragEnter&&e.unsubscribeDocumentDragEnter(),e.unsubscribeDocumentDragOver&&e.unsubscribeDocumentDragOver()})},et.prototype.onDocumentDragEnter=function(){var e=this;return this.addClass(this.activeClass),this.lastDragDocument=new Date,this.hideIntervalDocument||(this.hideIntervalDocument=setInterval(function(){e.calculateTimeDiff(e.lastDragDocument)<100||(e.removeClass(e.activeClass),clearInterval(e.hideIntervalDocument),e.hideIntervalDocument=null)},100)),!1},et.prototype.onDocumentDragOver=function(){return this.lastDragDocument=new Date,!1},et.prototype.onDropListener=function(e){var e=e.dataTransfer.files;return 0<e.length&&!this.disabled&&(e=fe(e),e=ye(e,!this.uploadService.async.batch),this.multiple||(e.splice(1,e.length-1),this.uploadService.clearFiles()),We(e,this.restrictions),this.uploadService.addFiles(e)),!1};var Je,D=et;function et(e,t,n,i){var o=Je.call(this,e,t,"k-dropzone-hover")||this;return o.ngZone=n,o.uploadService=i,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}D.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,deps:[{token:o.ElementRef},{token:o.Renderer2},{token:o.NgZone},{token:h}],target:o.ɵɵFactoryTarget.Directive}),D.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:D,selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ",inputs:{disabled:"disabled",multiple:"multiple",restrictions:"restrictions"},host:{listeners:{drop:"onDropListener($event)"},properties:{"class.k-dropzone":"this.initialClassName"}},usesInheritance:!0,ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,decorators:[{type:c.Directive,args:[{selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n "}]}],ctorParameters:function(){return[{type:o.ElementRef},{type:o.Renderer2},{type:o.NgZone},{type:h}]},propDecorators:{disabled:[{type:c.Input}],multiple:[{type:c.Input}],restrictions:[{type:c.Input}],initialClassName:[{type:c.HostBinding,args:["class.k-dropzone"]}],onDropListener:[{type:c.HostListener,args:["drop",["$event"]]}]}});Object.defineProperty(nt.prototype,"nameAttribute",{get:function(){return this.uploadService.async.saveField},enumerable:!1,configurable:!0}),Object.defineProperty(nt.prototype,"multipleAttribute",{get:function(){return this.multiple?"multiple":null},enumerable:!1,configurable:!0}),Object.defineProperty(nt.prototype,"dirAttribute",{get:function(){return this.dir},enumerable:!1,configurable:!0}),Object.defineProperty(nt.prototype,"disabledAttribute",{get:function(){return this.disabled?"true":null},enumerable:!1,configurable:!0}),nt.prototype.onInputChange=function(e){var t=this,n=navigator.userAgent,e=ge(e.target),e=ye(e,!this.uploadService.async.batch),e=(We(e,this.restrictions),this.multiple||this.uploadService.clearFiles(),this.uploadService.addFiles(e),this.element.nativeElement);(n.match(/(webkit)[ \/]([\w.]+)/i)||n.match(/(windows)[ \/]([\w.]+)/i))&&(e.type="",e.type="file"),setTimeout(function(){t.navigation.focusedIndex=-1})};var tt=nt;function nt(e,t,n){this.uploadService=e,this.navigation=t,this.type="file",this.autocomplete="off",this.tabIndex=-1,this.element=n}tt.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:tt,deps:[{token:h},{token:g},{token:o.ElementRef}],target:o.ɵɵFactoryTarget.Directive}),tt.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:tt,selector:"[kendoFileSelect]",inputs:{dir:"dir",disabled:"disabled",multiple:"multiple",restrictions:"restrictions"},host:{listeners:{change:"onInputChange($event)"},properties:{"attr.type":"this.type","attr.autocomplete":"this.autocomplete","attr.tabindex":"this.tabIndex","attr.name":"this.nameAttribute","attr.multiple":"this.multipleAttribute","attr.dir":"this.dirAttribute","attr.disabled":"this.disabledAttribute"}},ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:tt,decorators:[{type:c.Directive,args:[{selector:"[kendoFileSelect]"}]}],ctorParameters:function(){return[{type:h},{type:g},{type:o.ElementRef}]},propDecorators:{dir:[{type:c.Input}],disabled:[{type:c.Input}],multiple:[{type:c.Input}],restrictions:[{type:c.Input}],type:[{type:c.HostBinding,args:["attr.type"]}],autocomplete:[{type:c.HostBinding,args:["attr.autocomplete"]}],tabIndex:[{type:c.HostBinding,args:["attr.tabindex"]}],nameAttribute:[{type:c.HostBinding,args:["attr.name"]}],multipleAttribute:[{type:c.HostBinding,args:["attr.multiple"]}],dirAttribute:[{type:c.HostBinding,args:["attr.dir"]}],disabledAttribute:[{type:c.HostBinding,args:["attr.disabled"]}],onInputChange:[{type:c.HostListener,args:["change",["$event"]]}]}});var T={multi:!0,provide:e.NG_VALUE_ACCESSOR,useExisting:c.forwardRef(function(){return w})},w=(Object.defineProperty(U.prototype,"name",{get:function(){return this.uploadService.async.saveField},set:function(e){this.uploadService.async.saveField=e},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"restrictions",{get:function(){return this._restrictions},set:function(e){e=Object.assign({},this._restrictions,e);this._restrictions=e},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"dir",{get:function(){return this.direction},enumerable:!1,configurable:!0}),U.prototype.ngOnInit=function(){this.renderer.removeAttribute(this.wrapper,"tabindex"),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},U.prototype.textFor=function(e){return this.localization.get(e)},U.prototype.focus=function(){var e=this;setTimeout(function(){e.fileSelectButton.nativeElement.focus()})},U.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()},U.prototype.handleKeydown=function(e){this.disabled||(e.keyCode!==u.Keys.Enter&&e.keyCode!==u.Keys.Space||e.target!==this.fileSelectButton.nativeElement?!be(e.target,De)&&(ke(e.target)||be(e.target,Ee))||this.navigation.process(e):(e.preventDefault(),this.fileSelect.nativeElement.click()))},U.prototype.writeValue=function(e){var t=!0;e instanceof Array&&(e.forEach(function(e){(e=e)instanceof File||pe(e)||(t=!1)}),t)&&this.uploadService.addInitialFileSelectFiles(e),null===e&&this.fileList.clear(),this.cdr.markForCheck()},U.prototype.registerOnChange=function(e){this.onChangeCallback=e},U.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},U.prototype.setDisabledState=function(e){this.disabled=e},U.prototype.removeFileByUid=function(e){this.uploadService.removeFiles(e)},U.prototype.clearFiles=function(){this.uploadService.clearFiles()},U.prototype.isEmpty=function(){return!1},U.prototype.addFiles=function(e){this.uploadService.addFiles(e)},Object.defineProperty(U.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabindex},enumerable:!1,configurable:!0}),U.prototype.onFileSelectButtonFocus=function(e){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-focus"),this.navigation.focused||(this.navigation.focusedIndex=-1)},U.prototype.onFileSelectButtonBlur=function(e){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-focus")},U.prototype.subscribeBlur=function(){var t=this;u.isDocumentAvailable()&&this.ngZone.runOutsideAngular(function(){t.documentClick=R.fromEvent(document,"click").pipe(V.filter(function(e){return!(t.wrapper!==e.target&&t.wrapper.contains(e.target))})),t.blurSubscription=R.merge(t.documentClick,t.navigation.onTab).subscribe(function(){t.navigation.focused&&t.ngZone.run(function(){t.navigation.focused=!1,t.onTouchedCallback(),t.onBlur.emit()})})})},U.prototype.subscribeFocus=function(){var e=this;this.wrapperFocusSubscription=this.navigation.onWrapperFocus.subscribe(function(){e.onFocus.emit()}),this.selectButtonFocusSubscription=this.navigation.onSelectButtonFocus.subscribe(function(){e.fileSelectButton.nativeElement.focus()})},U.prototype.attachEventHandlers=function(){var n=this;this.subs=this.uploadService.changeEvent.subscribe(function(e){var t=[];null!==e&&e.forEach(function(e){e.state===p.FileState.Initial&&t.push(e),e.state===p.FileState.Selected&&e.rawFile&&!e.validationErrors&&t.push(e.rawFile)}),0===t.length&&(t=null),n.onChangeCallback(t),n.valueChange.emit(t)}),this.subs.add(this.uploadService.removeEvent.subscribe(function(e){n.remove.emit(e)})),this.subs.add(this.uploadService.selectEvent.subscribe(function(e){n.select.emit(e)}))},U.prototype.setDefaultSettings=function(){this.uploadService.async.autoUpload=!1,this.uploadService.component="FileSelect"},U);function U(e,t,n,i,o,s,a,r){var l=this;this.uploadService=e,this.localization=t,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 c.EventEmitter,this.onFocus=new c.EventEmitter,this.select=new c.EventEmitter,this.remove=new c.EventEmitter,this.valueChange=new c.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(e){},this.onChangeCallback=function(e){},j.validatePackage(Ue),this.wrapper=r.nativeElement,this.direction=t.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.fileList=this.uploadService.files,this.localizationChangeSubscription=t.changes.subscribe(function(e){e=e.rtl;l.direction=e?"rtl":"ltr",l.navigation.computeKeys(l.direction)}),this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers(),this.setDefaultSettings()}w.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:w,deps:[{token:h},{token:s.LocalizationService},{token:g},{token:v},{token:o.NgZone},{token:o.Renderer2},{token:o.ChangeDetectorRef},{token:o.ElementRef}],target:o.ɵɵFactoryTarget.Component}),w.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:w,selector:"kendo-fileselect",inputs:{accept:"accept",disabled:"disabled",multiple:"multiple",name:"name",showFileList:"showFileList",tabindex:"tabindex",restrictions:"restrictions",zoneId:"zoneId",focusableId:"focusableId"},outputs:{onBlur:"blur",onFocus:"focus",select:"select",remove:"remove",valueChange:"valueChange"},host:{listeners:{keydown:"handleKeydown($event)"},properties:{"class.k-widget":"this.hostDefaultClasses","class.k-upload":"this.hostDefaultClasses","class.k-disabled":"this.hostDisabledClass","attr.dir":"this.dir"}},providers:[t.LocalizationService,g,h,v,T,{provide:t.L10N_PREFIX,useValue:"kendo.fileselect"},{provide:u.KendoInput,useExisting:c.forwardRef(function(){return w})}],queries:[{propertyName:"fileTemplate",first:!0,predicate:f,descendants:!0},{propertyName:"fileInfoTemplate",first:!0,predicate:b,descendants:!0}],viewQueries:[{propertyName:"fileSelect",first:!0,predicate:["fileSelect"],descendants:!0,static:!0},{propertyName:"fileSelectButton",first:!0,predicate:["fileSelectButton"],descendants:!0,static:!0}],exportAs:["kendoFileSelect"],ngImport:o,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 ',isInline:!0,components:[{type:n,selector:"[kendo-upload-file-list]",inputs:["disabled","fileList","fileTemplate","fileInfoTemplate"]}],directives:[{type:x,selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "},{type:D,selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ",inputs:["disabled","multiple","restrictions"]},{type:tt,selector:"[kendoFileSelect]",inputs:["dir","disabled","multiple","restrictions"]},{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:w,decorators:[{type:c.Component,args:[{exportAs:"kendoFileSelect",providers:[t.LocalizationService,g,h,v,T,{provide:t.L10N_PREFIX,useValue:"kendo.fileselect"},{provide:u.KendoInput,useExisting:c.forwardRef(function(){return w})}],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 '}]}],ctorParameters:function(){return[{type:h},{type:s.LocalizationService},{type:g},{type:v},{type:o.NgZone},{type:o.Renderer2},{type:o.ChangeDetectorRef},{type:o.ElementRef}]},propDecorators:{accept:[{type:c.Input}],disabled:[{type:c.Input}],multiple:[{type:c.Input}],name:[{type:c.Input}],showFileList:[{type:c.Input}],tabindex:[{type:c.Input}],restrictions:[{type:c.Input}],zoneId:[{type:c.Input}],focusableId:[{type:c.Input}],fileTemplate:[{type:c.ContentChild,args:[f,{static:!1}]}],fileInfoTemplate:[{type:c.ContentChild,args:[b,{static:!1}]}],fileSelect:[{type:c.ViewChild,args:["fileSelect",{static:!0}]}],fileSelectButton:[{type:c.ViewChild,args:["fileSelectButton",{static:!0}]}],onBlur:[{type:c.Output,args:["blur"]}],onFocus:[{type:c.Output,args:["focus"]}],select:[{type:c.Output}],remove:[{type:c.Output}],valueChange:[{type:c.Output}],hostDefaultClasses:[{type:c.HostBinding,args:["class.k-widget"]},{type:c.HostBinding,args:["class.k-upload"]}],hostDisabledClass:[{type:c.HostBinding,args:["class.k-disabled"]}],dir:[{type:c.HostBinding,args:["attr.dir"]}],handleKeydown:[{type:c.HostListener,args:["keydown",["$event"]]}]}});r(ot,it=C),Object.defineProperty(ot.prototype,"override",{get:function(){return!0},enumerable:!1,configurable:!0});var it,B=ot;function ot(e){var t=it.call(this)||this;return t.service=e,t}B.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:B,deps:[{token:s.LocalizationService}],target:o.ɵɵFactoryTarget.Component}),B.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:B,selector:"kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages",providers:[{provide:C,useExisting:c.forwardRef(function(){return B})}],usesInheritance:!0,ngImport:o,template:"",isInline:!0}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:B,decorators:[{type:c.Component,args:[{providers:[{provide:C,useExisting:c.forwardRef(function(){return B})}],selector:"kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages",template:""}]}],ctorParameters:function(){return[{type:s.LocalizationService}]}});st.prototype.ngDoCheck=function(){this.isPaused=this.fileList.hasFileWithState([p.FileState.Paused]),this.isFailed=this.fileList.hasFileWithState([p.FileState.Failed]),this.isUploading=this.fileList.hasFileWithState([p.FileState.Uploading]),this.isPaused&&!this.isUploading?this.statusText=this.localization.get("headerStatusPaused"):this.statusText=this.isUploading?this.localization.get("headerStatusUploading"):this.localization.get("headerStatusUploaded")};T=st;function st(e){this.localization=e}T.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:T,deps:[{token:s.LocalizationService}],target:o.ɵɵFactoryTarget.Component}),T.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:T,selector:"kendo-upload-status-total",inputs:{fileList:"fileList"},ngImport:o,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 ",isInline:!0,directives:[{type:a.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:T,decorators:[{type:c.Component,args:[{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 "}]}],ctorParameters:function(){return[{type:s.LocalizationService}]},propDecorators:{fileList:[{type:c.Input}]}});Object.defineProperty(z.prototype,"actionButtonsEndClassName",{get:function(){return"end"===this.actionsLayout},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"actionButtonsStretchedClassName",{get:function(){return"stretched"===this.actionsLayout},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"actionButtonsStartClassName",{get:function(){return"start"===this.actionsLayout},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"actionButtonsCenterClassName",{get:function(){return"center"===this.actionsLayout},enumerable:!1,configurable:!0}),z.prototype.onAction=function(){var t=this;this.actionSubscription=this.navigation.onActionButtonAction.subscribe(function(e){"clear"===e?t.clearFiles():t.performUpload()})},z.prototype.onFocus=function(){var t=this;this.focusSubscription=this.navigation.onActionButtonFocus.subscribe(function(e){t.focusButton(e)})},z.prototype.focusButton=function(e){("clear"===e?this.clearButton:this.uploadButton).nativeElement.focus()},z.prototype.ngOnDestroy=function(){this.actionSubscription.unsubscribe(),this.focusSubscription.unsubscribe()},z.prototype.onUploadButtonClick=function(e){e.stopImmediatePropagation(),this.performUpload()},z.prototype.performUpload=function(){this.disabled||(this.uploadService.uploadFiles(),this.navigation.focusSelectButton())},z.prototype.onClearButtonClick=function(e){e.stopImmediatePropagation(),this.clearFiles()},z.prototype.clearFiles=function(){this.disabled||(this.uploadService.clearFiles(),this.navigation.focusSelectButton())},z.prototype.textFor=function(e){return this.localization.get(e)};C=z;function z(e,t,n){this.uploadService=e,this.localization=t,this.navigation=n,this.hostDefaultClass=!0,this.onAction(),this.onFocus()}C.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:C,deps:[{token:h},{token:s.LocalizationService},{token:g}],target:o.ɵɵFactoryTarget.Component}),C.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:C,selector:"kendo-upload-action-buttons",inputs:{disabled:"disabled",actionsLayout:"actionsLayout"},host:{properties:{"class.k-actions":"this.hostDefaultClass","class.k-actions-end":"this.actionButtonsEndClassName","class.k-actions-stretched":"this.actionButtonsStretchedClassName","class.k-actions-start":"this.actionButtonsStartClassName","class.k-actions-center":"this.actionButtonsCenterClassName"}},viewQueries:[{propertyName:"clearButton",first:!0,predicate:["clearButton"],descendants:!0,static:!0},{propertyName:"uploadButton",first:!0,predicate:["uploadButton"],descendants:!0,static:!0}],ngImport:o,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 ',isInline:!0}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:C,decorators:[{type:c.Component,args:[{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 '}]}],ctorParameters:function(){return[{type:h},{type:s.LocalizationService},{type:g}]},propDecorators:{disabled:[{type:c.Input}],actionsLayout:[{type:c.Input}],clearButton:[{type:c.ViewChild,args:["clearButton",{static:!0}]}],uploadButton:[{type:c.ViewChild,args:["uploadButton",{static:!0}]}],hostDefaultClass:[{type:c.HostBinding,args:["class.k-actions"]}],actionButtonsEndClassName:[{type:c.HostBinding,args:["class.k-actions-end"]}],actionButtonsStretchedClassName:[{type:c.HostBinding,args:["class.k-actions-stretched"]}],actionButtonsStartClassName:[{type:c.HostBinding,args:["class.k-actions-start"]}],actionButtonsCenterClassName:[{type:c.HostBinding,args:["class.k-actions-center"]}]}});var e={multi:!0,provide:e.NG_VALUE_ACCESSOR,useExisting:c.forwardRef(function(){return L})},L=(Object.defineProperty(P.prototype,"autoUpload",{get:function(){return this.uploadService.async.autoUpload},set:function(e){this.uploadService.async.autoUpload=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"batch",{get:function(){return this.uploadService.async.batch},set:function(e){this.uploadService.async.batch=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"withCredentials",{get:function(){return this.uploadService.async.withCredentials},set:function(e){this.uploadService.async.withCredentials=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"saveField",{get:function(){return this.uploadService.async.saveField},set:function(e){this.uploadService.async.saveField=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"saveHeaders",{get:function(){return this.uploadService.async.saveHeaders},set:function(e){this.uploadService.async.saveHeaders=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"saveMethod",{get:function(){return this.uploadService.async.saveMethod},set:function(e){this.uploadService.async.saveMethod=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"saveUrl",{get:function(){return this.uploadService.async.saveUrl},set:function(e){this.uploadService.async.saveUrl=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"responseType",{get:function(){return this.uploadService.async.responseType},set:function(e){this.uploadService.async.responseType=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"removeField",{get:function(){return this.uploadService.async.removeField},set:function(e){this.uploadService.async.removeField=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"removeHeaders",{get:function(){return this.uploadService.async.removeHeaders},set:function(e){this.uploadService.async.removeHeaders=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"removeMethod",{get:function(){return this.uploadService.async.removeMethod},set:function(e){this.uploadService.async.removeMethod=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"removeUrl",{get:function(){return this.uploadService.async.removeUrl},set:function(e){this.uploadService.async.removeUrl=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"concurrent",{get:function(){return this.uploadService.async.concurrent},set:function(e){this.uploadService.async.concurrent=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"tabIndex",{get:function(){return this.tabindex},set:function(e){this.tabindex=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"restrictions",{get:function(){return this._restrictions},set:function(e){e=Object.assign({},this._restrictions,e);this._restrictions=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"dir",{get:function(){return this.direction},enumerable:!1,configurable:!0}),P.prototype.ngOnInit=function(){this.verifySettings(),this.renderer.removeAttribute(this.wrapper,"tabindex"),this.uploadService.setChunkSettings(this.chunkable),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},P.prototype.ngOnChanges=function(e){u.isChanged("chunkable",e)&&("boolean"==typeof(e=e.chunkable.currentValue)&&(this.uploadService.async.chunk=e),"object"==typeof e)&&null!==e&&(this.uploadService.async.chunk=!0,this.uploadService.chunk=Object.assign({},this.uploadService.chunk,e))},P.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()},P.prototype.handleKeydown=function(e){this.disabled||(e.keyCode!==u.Keys.Enter&&e.keyCode!==u.Keys.Space||e.target!==this.fileSelectButton.nativeElement?!be(e.target,De)&&(ke(e.target)||be(e.target,Ee))||this.navigation.process(e):(e.preventDefault(),this.fileSelect.nativeElement.click()))},P.prototype.writeValue=function(e){var t=!0;e instanceof Array&&(e.forEach(function(e){pe(e)||(t=!1)}),t)&&this.uploadService.addInitialFiles(e),null===e&&this.fileList.clear(),this.cdr.markForCheck()},P.prototype.registerOnChange=function(e){this.onChangeCallback=e},P.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},P.prototype.setDisabledState=function(e){this.disabled=e},Object.defineProperty(P.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabIndex},enumerable:!1,configurable:!0}),P.prototype.onFileSelectButtonFocus=function(e){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-focus"),this.navigation.focused||(this.navigation.focusedIndex=-1)},P.prototype.onFileSelectButtonBlur=function(e){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-focus")},Object.defineProperty(P.prototype,"showActionButtons",{get:function(){var e,t,n=!1;return this.autoUpload||(e=0<this.fileList.filesToUpload.length,t=this.fileList.hasFileWithState([p.FileState.Uploading]),this.concurrent&&e&&(n=!0),this.concurrent)||!e||t||(n=!0),this.navigation.actionButtonsVisible=n},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"showTotalStatus",{get:function(){var e=[p.FileState.Uploaded,p.FileState.Uploading,p.FileState.Failed,p.FileState.Paused];return!!this.fileList.hasFileWithState(e)},enumerable:!1,configurable:!0}),P.prototype.textFor=function(e){return this.localization.get(e)},P.prototype.focus=function(){var e=this;setTimeout(function(){e.fileSelectButton.nativeElement.focus()})},P.prototype.focusComponent=function(){this.focus()},P.prototype.blur=function(){this.navigation.focused&&(this.navigation.focused=!1,document.activeElement.blur(),this.onBlur.emit())},P.prototype.blurComponent=function(){this.blur()},P.prototype.pauseFileByUid=function(e){this.uploadService.pauseFile(e)},P.prototype.resumeFileByUid=function(e){this.uploadService.resumeFile(e)},P.prototype.removeFilesByUid=function(e){this.uploadService.removeFiles(e)},P.prototype.retryUploadByUid=function(e){this.uploadService.retryFiles(e)},P.prototype.cancelUploadByUid=function(e){this.uploadService.cancelFiles(e)},P.prototype.uploadFiles=function(){this.fileList.filesToUpload.length&&this.uploadService.uploadFiles()},P.prototype.clearFiles=function(){this.uploadService.clearFiles()},P.prototype.addFiles=function(e){this.uploadService.addFiles(e)},P.prototype.isEmpty=function(){return!1},P.prototype.verifySettings=function(){if(c.isDevMode()&&this.batch&&!1!==this.chunkable)throw new Error("The file chunking functionality requires the batch setting to be disabled.")},P.prototype.subscribeBlur=function(){var t=this;u.isDocumentAvailable()&&this._ngZone.runOutsideAngular(function(){t.documentClick=R.fromEvent(document,"click").pipe(V.filter(function(e){return!(t.wrapper!==e.target&&t.wrapper.contains(e.target))})),t.blurSubscription=R.merge(t.documentClick,t.navigation.onTab).subscribe(function(){t.navigation.focused&&t._ngZone.run(function(){t.navigation.focused=!1,t.onTouchedCallback(),t.onBlur.emit()})})})},P.prototype.subscribeFocus=function(){var e=this;this.wrapperFocusSubscription=this.navigation.onWrapperFocus.subscribe(function(){e.onFocus.emit()}),this.selectButtonFocusSubscription=this.navigation.onSelectButtonFocus.subscribe(function(){e.fileSelectButton.nativeElement.focus()})},P.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)}))},P);function P(e,t,n,i,o,s,a,r){var l=this;this.uploadService=e,this.localization=t,this.navigation=n,this.dropZoneService=i,this._ngZone=o,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 c.EventEmitter,this.cancel=new c.EventEmitter,this.clear=new c.EventEmitter,this.complete=new c.EventEmitter,this.error=new c.EventEmitter,this.onFocus=new c.EventEmitter,this.pause=new c.EventEmitter,this.remove=new c.EventEmitter,this.resume=new c.EventEmitter,this.select=new c.EventEmitter,this.success=new c.EventEmitter,this.upload=new c.EventEmitter,this.uploadProgress=new c.EventEmitter,this.valueChange=new c.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(e){},this.onChangeCallback=function(e){},j.validatePackage(Ue),this.fileList=this.uploadService.files,this.localizationChangeSubscription=t.changes.subscribe(function(e){e=e.rtl;l.direction=e?"rtl":"ltr",l.navigation.computeKeys(l.direction)}),this.direction=t.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.wrapper=r.nativeElement,this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers()}L.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:L,deps:[{token:h},{token:s.LocalizationService},{token:g},{token:v},{token:o.NgZone},{token:o.Renderer2},{token:o.ChangeDetectorRef},{token:o.ElementRef}],target:o.ɵɵFactoryTarget.Component}),L.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:L,selector:"kendo-upload",inputs:{autoUpload:"autoUpload",batch:"batch",withCredentials:"withCredentials",saveField:"saveField",saveHeaders:"saveHeaders",saveMethod:"saveMethod",saveUrl:"saveUrl",responseType:"responseType",removeField:"removeField",removeHeaders:"removeHeaders",removeMethod:"removeMethod",removeUrl:"removeUrl",chunkable:"chunkable",concurrent:"concurrent",multiple:"multiple",disabled:"disabled",showFileList:"showFileList",tabindex:"tabindex",zoneId:"zoneId",tabIndex:"tabIndex",accept:"accept",restrictions:"restrictions",focusableId:"focusableId",actionsLayout:"actionsLayout"},outputs:{onBlur:"blur",cancel:"cancel",clear:"clear",complete:"complete",error:"error",onFocus:"focus",pause:"pause",remove:"remove",resume:"resume",select:"select",success:"success",upload:"upload",uploadProgress:"uploadProgress",valueChange:"valueChange"},host:{listeners:{keydown:"handleKeydown($event)"},properties:{"class.k-widget":"this.hostDefaultClasses","class.k-upload":"this.hostDefaultClasses","class.k-disabled":"this.hostDisabledClass","attr.dir":"this.dir"}},providers:[t.LocalizationService,g,h,v,e,{provide:t.L10N_PREFIX,useValue:"kendo.upload"},{provide:u.KendoInput,useExisting:c.forwardRef(function(){return L})}],queries:[{propertyName:"fileTemplate",first:!0,predicate:f,descendants:!0},{propertyName:"fileInfoTemplate",first:!0,predicate:b,descendants:!0}],viewQueries:[{propertyName:"fileSelect",first:!0,predicate:["fileSelect"],descendants:!0,static:!0},{propertyName:"fileSelectButton",first:!0,predicate:["fileSelectButton"],descendants:!0,static:!0}],exportAs:["kendoUpload"],usesOnChanges:!0,ngImport:o,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 ',isInline:!0,components:[{type:T,selector:"kendo-upload-status-total",inputs:["fileList"]},{type:n,selector:"[kendo-upload-file-list]",inputs:["disabled","fileList","fileTemplate","fileInfoTemplate"]},{type:C,selector:"kendo-upload-action-buttons",inputs:["disabled","actionsLayout"]}],directives:[{type:x,selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "},{type:D,selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ",inputs:["disabled","multiple","restrictions"]},{type:tt,selector:"[kendoFileSelect]",inputs:["dir","disabled","multiple","restrictions"]},{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:L,decorators:[{type:c.Component,args:[{exportAs:"kendoUpload",providers:[t.LocalizationService,g,h,v,e,{provide:t.L10N_PREFIX,useValue:"kendo.upload"},{provide:u.KendoInput,useExisting:c.forwardRef(function(){return L})}],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 '}]}],ctorParameters:function(){return[{type:h},{type:s.LocalizationService},{type:g},{type:v},{type:o.NgZone},{type:o.Renderer2},{type:o.ChangeDetectorRef},{type:o.ElementRef}]},propDecorators:{autoUpload:[{type:c.Input}],batch:[{type:c.Input}],withCredentials:[{type:c.Input}],saveField:[{type:c.Input}],saveHeaders:[{type:c.Input}],saveMethod:[{type:c.Input}],saveUrl:[{type:c.Input}],responseType:[{type:c.Input}],removeField:[{type:c.Input}],removeHeaders:[{type:c.Input}],removeMethod:[{type:c.Input}],removeUrl:[{type:c.Input}],chunkable:[{type:c.Input}],concurrent:[{type:c.Input}],multiple:[{type:c.Input}],disabled:[{type:c.Input}],showFileList:[{type:c.Input}],tabindex:[{type:c.Input}],zoneId:[{type:c.Input}],tabIndex:[{type:c.Input,args:["tabIndex"]}],accept:[{type:c.Input}],restrictions:[{type:c.Input}],focusableId:[{type:c.Input}],actionsLayout:[{type:c.Input}],fileTemplate:[{type:c.ContentChild,args:[f,{static:!1}]}],fileInfoTemplate:[{type:c.ContentChild,args:[b,{static:!1}]}],fileSelect:[{type:c.ViewChild,args:["fileSelect",{static:!0}]}],fileSelectButton:[{type:c.ViewChild,args:["fileSelectButton",{static:!0}]}],onBlur:[{type:c.Output,args:["blur"]}],cancel:[{type:c.Output}],clear:[{type:c.Output}],complete:[{type:c.Output}],error:[{type:c.Output}],onFocus:[{type:c.Output,args:["focus"]}],pause:[{type:c.Output}],remove:[{type:c.Output}],resume:[{type:c.Output}],select:[{type:c.Output}],success:[{type:c.Output}],upload:[{type:c.Output}],uploadProgress:[{type:c.Output}],valueChange:[{type:c.Output}],hostDefaultClasses:[{type:c.HostBinding,args:["class.k-widget"]},{type:c.HostBinding,args:["class.k-upload"]}],hostDisabledClass:[{type:c.HostBinding,args:["class.k-disabled"]}],dir:[{type:c.HostBinding,args:["attr.dir"]}],handleKeydown:[{type:c.HostListener,args:["keydown",["$event"]]}]}});at.prototype.onElementDragEnter=function(){return!1},at.prototype.onElementDragOver=function(){return!1},at.prototype.onDropListener=function(n){var e=this.componentInstance;if(Fe(e))return e.forEach(function(e){var t=n.dataTransfer.files;0<t.length&&!e.disabled&&(t=fe(t),t=e instanceof L?ye(t,!e.batch):ye(t,!0),e.multiple||(t.splice(1,t.length-1),e.clearFiles()),We(t,e.restrictions),e.addFiles(t))}),!1},Object.defineProperty(at.prototype,"componentInstance",{get:function(){return this.dropZoneService.getComponents(this.zoneId)},enumerable:!1,configurable:!0});e=at;function at(e){this.dropZoneService=e}e.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:e,deps:[{token:v}],target:o.ɵɵFactoryTarget.Directive}),e.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:e,selector:"[kendoUploadDropZone], [kendoFileSelectDropZone]",inputs:{zoneId:["kendoUploadDropZone","zoneId"]},host:{listeners:{dragenter:"onElementDragEnter()",dragover:"onElementDragOver()",drop:"onDropListener($event)"}},providers:[v],ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:e,decorators:[{type:c.Directive,args:[{providers:[v],selector:"[kendoUploadDropZone], [kendoFileSelectDropZone]"}]}],ctorParameters:function(){return[{type:v}]},propDecorators:{zoneId:[{type:c.Input,args:["kendoUploadDropZone"]}],onElementDragEnter:[{type:c.HostListener,args:["dragenter"]}],onElementDragOver:[{type:c.HostListener,args:["dragover"]}],onDropListener:[{type:c.HostListener,args:["drop",["$event"]]}]}});r(lt,rt=E),Object.defineProperty(lt.prototype,"dirAttribute",{get:function(){return this.direction},enumerable:!1,configurable:!0}),lt.prototype.textFor=function(e){return this.localization.get(e)},Object.defineProperty(lt.prototype,"iconClasses",{get:function(){return this.icon?"k-icon k-i-"+this.icon:this.iconClass?""+this.iconClass:"k-icon k-i-upload"},enumerable:!1,configurable:!0}),lt.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()};var rt,E=lt;function lt(e,t,n){var i=rt.call(this,e,t,"k-external-dropzone-hover")||this;return i.localization=n,i.hostClass=!0,i.localizationChangeSubscription=i.localization.changes.subscribe(function(e){e=e.rtl;i.direction=e?"rtl":"ltr"}),i}E.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:E,deps:[{token:o.ElementRef},{token:o.Renderer2},{token:s.LocalizationService}],target:o.ɵɵFactoryTarget.Component}),E.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:E,selector:"kendo-uploaddropzone",inputs:{zoneId:"zoneId",icon:"icon",iconClass:"iconClass"},host:{properties:{"class.k-external-dropzone":"this.hostClass","attr.dir":"this.dirAttribute"}},providers:[t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.uploaddropzone"}],exportAs:["kendoUploadDropZone"],usesInheritance:!0,ngImport:o,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 ",isInline:!0,directives:[{type:x,selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "},{type:e,selector:"[kendoUploadDropZone], [kendoFileSelectDropZone]",inputs:["kendoUploadDropZone"]},{type:a.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:E,decorators:[{type:c.Component,args:[{exportAs:"kendoUploadDropZone",providers:[t.LocalizationService,{provide:t.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 "}]}],ctorParameters:function(){return[{type:o.ElementRef},{type:o.Renderer2},{type:s.LocalizationService}]},propDecorators:{hostClass:[{type:c.HostBinding,args:["class.k-external-dropzone"]}],dirAttribute:[{type:c.HostBinding,args:["attr.dir"]}],zoneId:[{type:c.Input}],icon:[{type:c.Input}],iconClass:[{type:c.Input}]}});var a=[D,n,k,Oe,Ae,Ve,tt,x,I],t=[f,b,B,e,E],O=function(){},D=(O.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:O,deps:[],target:o.ɵɵFactoryTarget.NgModule}),O.ɵmod=o.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:O,declarations:[f,b,B,e,E,D,n,k,Oe,Ae,Ve,tt,x,I],imports:[i.CommonModule],exports:[f,b,B,e,E,D,n,k,Oe,Ae,Ve,tt,x,I,i.CommonModule]}),O.ɵinj=o.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:O,imports:[[i.CommonModule],i.CommonModule]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:O,decorators:[{type:c.NgModule,args:[{declarations:[t,a],exports:[t,a,i.CommonModule],imports:[i.CommonModule]}]}]}),[w]),k=function(){},a=(k.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,deps:[],target:o.ɵɵFactoryTarget.NgModule}),k.ɵmod=o.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,declarations:[w],imports:[O],exports:[f,b,B,e,E,w]}),k.ɵinj=o.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,imports:[[O]]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,decorators:[{type:c.NgModule,args:[{declarations:[D],exports:[t,D],imports:[O]}]}]}),[L,C,T]),i=function(){},D=(i.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:i,deps:[],target:o.ɵɵFactoryTarget.NgModule}),i.ɵmod=o.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:i,declarations:[L,C,T],imports:[O],exports:[f,b,B,e,E,L,C,T]}),i.ɵinj=o.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:i,imports:[[O]]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:i,decorators:[{type:c.NgModule,args:[{declarations:[a],exports:[t,a],imports:[O]}]}]}),function(){});D.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,deps:[],target:o.ɵɵFactoryTarget.NgModule}),D.ɵmod=o.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,exports:[k,i]}),D.ɵinj=o.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,imports:[k,i]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,decorators:[{type:c.NgModule,args:[{exports:[k,i]}]}]}),p.CancelEvent=Z,p.ClearEvent=q,p.CustomMessagesComponent=B,p.ErrorEvent=X,p.FileInfoTemplateDirective=b,p.FileListComponent=n,p.FileListItemActionButtonComponent=Oe,p.FileListItemBase=Le,p.FileListMultipleItemsComponent=Ae,p.FileListSingleItemComponent=Ve,p.FileMap=_,p.FileSelectComponent=w,p.FileSelectDirective=tt,p.FileSelectModule=k,p.FileTemplateDirective=f,p.NavigationService=g,p.PauseEvent=Q,p.RemoveEvent=Y,p.ResumeEvent=te,p.SelectEvent=ne,p.SuccessEvent=se,p.TemplateContextDirective=I,p.UploadActionButtonsComponent=C,p.UploadComponent=L,p.UploadDropZoneComponent=E,p.UploadDropZoneDirective=e,p.UploadEvent=le,p.UploadModule=i,p.UploadProgressEvent=Se,p.UploadService=h,p.UploadStatusTotalComponent=T,p.UploadsModule=D,Object.defineProperty(p,"__esModule",{value:!0})});
@@ -1,112 +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
- import { Component, HostBinding, Input } from '@angular/core';
6
- import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
7
- import { DropZoneBase } from './dropzone-base';
8
- import * as i0 from "@angular/core";
9
- import * as i1 from "@progress/kendo-angular-l10n";
10
- import * as i2 from "./localization/localized-messages.directive";
11
- import * as i3 from "./dropzone-external.directive";
12
- import * as i4 from "@angular/common";
13
- /**
14
- * Represents the [Kendo UI UploadDropZone component for Angular]({% slug overview_upload %}).
15
- */
16
- export class UploadDropZoneComponent extends DropZoneBase {
17
- constructor(element, renderer, localization) {
18
- super(element, renderer, 'k-external-dropzone-hover');
19
- this.localization = localization;
20
- this.hostClass = true;
21
- this.localizationChangeSubscription = this.localization.changes.subscribe(({ rtl }) => {
22
- this.direction = rtl ? 'rtl' : 'ltr';
23
- });
24
- }
25
- get dirAttribute() {
26
- return this.direction;
27
- }
28
- /**
29
- * @hidden
30
- */
31
- textFor(key) {
32
- return this.localization.get(key);
33
- }
34
- /**
35
- * @hidden
36
- */
37
- get iconClasses() {
38
- if (this.icon) {
39
- return `k-icon k-i-${this.icon}`;
40
- }
41
- if (this.iconClass) {
42
- return `${this.iconClass}`;
43
- }
44
- return 'k-icon k-i-upload';
45
- }
46
- ngOnDestroy() {
47
- if (this.localizationChangeSubscription) {
48
- this.localizationChangeSubscription.unsubscribe();
49
- }
50
- }
51
- }
52
- UploadDropZoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UploadDropZoneComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
53
- UploadDropZoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: UploadDropZoneComponent, selector: "kendo-uploaddropzone", inputs: { zoneId: "zoneId", icon: "icon", iconClass: "iconClass" }, host: { properties: { "class.k-external-dropzone": "this.hostClass", "attr.dir": "this.dirAttribute" } }, providers: [
54
- LocalizationService,
55
- {
56
- provide: L10N_PREFIX,
57
- useValue: 'kendo.uploaddropzone'
58
- }
59
- ], exportAs: ["kendoUploadDropZone"], usesInheritance: true, ngImport: i0, template: `
60
- <ng-container kendoUploadDropZoneLocalizedMessages
61
- i18n-externalDropFilesHere='kendo.uploaddropzone.externalDropFilesHere|Sets the external drop-zone hint'
62
- externalDropFilesHere='Drag and drop files here to upload'
63
- >
64
- </ng-container>
65
- <div class='k-dropzone-inner' [kendoUploadDropZone]="zoneId">
66
- <span [ngClass]="iconClasses"></span>
67
- <span class="k-dropzone-hint">{{ textFor('externalDropFilesHere') }}</span>
68
- <span class="k-dropzone-note">
69
- <ng-content></ng-content>
70
- </span>
71
- </div>
72
- `, isInline: true, directives: [{ type: i2.LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: i3.UploadDropZoneDirective, selector: "[kendoUploadDropZone], [kendoFileSelectDropZone]", inputs: ["kendoUploadDropZone"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UploadDropZoneComponent, decorators: [{
74
- type: Component,
75
- args: [{
76
- exportAs: 'kendoUploadDropZone',
77
- providers: [
78
- LocalizationService,
79
- {
80
- provide: L10N_PREFIX,
81
- useValue: 'kendo.uploaddropzone'
82
- }
83
- ],
84
- selector: 'kendo-uploaddropzone',
85
- template: `
86
- <ng-container kendoUploadDropZoneLocalizedMessages
87
- i18n-externalDropFilesHere='kendo.uploaddropzone.externalDropFilesHere|Sets the external drop-zone hint'
88
- externalDropFilesHere='Drag and drop files here to upload'
89
- >
90
- </ng-container>
91
- <div class='k-dropzone-inner' [kendoUploadDropZone]="zoneId">
92
- <span [ngClass]="iconClasses"></span>
93
- <span class="k-dropzone-hint">{{ textFor('externalDropFilesHere') }}</span>
94
- <span class="k-dropzone-note">
95
- <ng-content></ng-content>
96
- </span>
97
- </div>
98
- `
99
- }]
100
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.LocalizationService }]; }, propDecorators: { hostClass: [{
101
- type: HostBinding,
102
- args: ['class.k-external-dropzone']
103
- }], dirAttribute: [{
104
- type: HostBinding,
105
- args: ['attr.dir']
106
- }], zoneId: [{
107
- type: Input
108
- }], icon: [{
109
- type: Input
110
- }], iconClass: [{
111
- type: Input
112
- }] } });