@autotaxatiepartners/ngx-gallery 1.0.0 → 2.0.2

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 (106) hide show
  1. package/fesm2022/autotaxatiepartners-ngx-gallery.mjs +1756 -0
  2. package/fesm2022/autotaxatiepartners-ngx-gallery.mjs.map +1 -0
  3. package/index.d.ts +591 -0
  4. package/package.json +36 -63
  5. package/.editorconfig +0 -13
  6. package/.eslintrc.json +0 -51
  7. package/.travis.yml +0 -38
  8. package/angular.json +0 -108
  9. package/projects/gallery/.eslintrc.json +0 -55
  10. package/projects/gallery/README.md +0 -24
  11. package/projects/gallery/karma.conf.js +0 -52
  12. package/projects/gallery/ng-package.json +0 -7
  13. package/projects/gallery/package.json +0 -32
  14. package/projects/gallery/src/lib/ngx-gallery-action/ngx-gallery-action.component.html +0 -4
  15. package/projects/gallery/src/lib/ngx-gallery-action/ngx-gallery-action.component.scss +0 -21
  16. package/projects/gallery/src/lib/ngx-gallery-action/ngx-gallery-action.component.spec.ts +0 -25
  17. package/projects/gallery/src/lib/ngx-gallery-action/ngx-gallery-action.component.ts +0 -28
  18. package/projects/gallery/src/lib/ngx-gallery-action.ts +0 -23
  19. package/projects/gallery/src/lib/ngx-gallery-animation.ts +0 -6
  20. package/projects/gallery/src/lib/ngx-gallery-arrows/ngx-gallery-arrows.component.html +0 -12
  21. package/projects/gallery/src/lib/ngx-gallery-arrows/ngx-gallery-arrows.component.scss +0 -45
  22. package/projects/gallery/src/lib/ngx-gallery-arrows/ngx-gallery-arrows.component.spec.ts +0 -25
  23. package/projects/gallery/src/lib/ngx-gallery-arrows/ngx-gallery-arrows.component.ts +0 -28
  24. package/projects/gallery/src/lib/ngx-gallery-bullets/ngx-gallery-bullets.component.html +0 -4
  25. package/projects/gallery/src/lib/ngx-gallery-bullets/ngx-gallery-bullets.component.scss +0 -26
  26. package/projects/gallery/src/lib/ngx-gallery-bullets/ngx-gallery-bullets.component.spec.ts +0 -25
  27. package/projects/gallery/src/lib/ngx-gallery-bullets/ngx-gallery-bullets.component.ts +0 -25
  28. package/projects/gallery/src/lib/ngx-gallery-image/ngx-gallery-image.component.html +0 -49
  29. package/projects/gallery/src/lib/ngx-gallery-image/ngx-gallery-image.component.scss +0 -106
  30. package/projects/gallery/src/lib/ngx-gallery-image/ngx-gallery-image.component.spec.ts +0 -35
  31. package/projects/gallery/src/lib/ngx-gallery-image/ngx-gallery-image.component.ts +0 -395
  32. package/projects/gallery/src/lib/ngx-gallery-image-size.ts +0 -4
  33. package/projects/gallery/src/lib/ngx-gallery-image.ts +0 -31
  34. package/projects/gallery/src/lib/ngx-gallery-layout.ts +0 -4
  35. package/projects/gallery/src/lib/ngx-gallery-options.ts +0 -255
  36. package/projects/gallery/src/lib/ngx-gallery-order.ts +0 -5
  37. package/projects/gallery/src/lib/ngx-gallery-ordered-image.ts +0 -19
  38. package/projects/gallery/src/lib/ngx-gallery-preview/ngx-gallery-preview.component.html +0 -66
  39. package/projects/gallery/src/lib/ngx-gallery-preview/ngx-gallery-preview.component.scss +0 -121
  40. package/projects/gallery/src/lib/ngx-gallery-preview/ngx-gallery-preview.component.spec.ts +0 -34
  41. package/projects/gallery/src/lib/ngx-gallery-preview/ngx-gallery-preview.component.ts +0 -486
  42. package/projects/gallery/src/lib/ngx-gallery-thumbnails/ngx-gallery-thumbnails.component.html +0 -44
  43. package/projects/gallery/src/lib/ngx-gallery-thumbnails/ngx-gallery-thumbnails.component.scss +0 -87
  44. package/projects/gallery/src/lib/ngx-gallery-thumbnails/ngx-gallery-thumbnails.component.spec.ts +0 -31
  45. package/projects/gallery/src/lib/ngx-gallery-thumbnails/ngx-gallery-thumbnails.component.ts +0 -297
  46. package/projects/gallery/src/lib/ngx-gallery.component.html +0 -53
  47. package/projects/gallery/src/lib/ngx-gallery.component.scss +0 -78
  48. package/projects/gallery/src/lib/ngx-gallery.component.spec.ts +0 -37
  49. package/projects/gallery/src/lib/ngx-gallery.component.ts +0 -337
  50. package/projects/gallery/src/lib/ngx-gallery.module.ts +0 -29
  51. package/projects/gallery/src/lib/ngx-gallery.service.spec.ts +0 -18
  52. package/projects/gallery/src/lib/ngx-gallery.service.ts +0 -71
  53. package/projects/gallery/src/public-api.ts +0 -20
  54. package/projects/gallery/src/test.ts +0 -17
  55. package/projects/gallery/tsconfig.lib.json +0 -14
  56. package/projects/gallery/tsconfig.lib.prod.json +0 -9
  57. package/projects/gallery/tsconfig.spec.json +0 -16
  58. package/projects/gallery-app/.browserslistrc +0 -12
  59. package/projects/gallery-app/.eslintrc.json +0 -40
  60. package/projects/gallery-app/e2e/protractor.conf.js +0 -32
  61. package/projects/gallery-app/e2e/src/app.e2e-spec.ts +0 -23
  62. package/projects/gallery-app/e2e/src/app.po.ts +0 -11
  63. package/projects/gallery-app/e2e/tsconfig.json +0 -13
  64. package/projects/gallery-app/karma.conf.js +0 -32
  65. package/projects/gallery-app/src/app/app-routing.module.ts +0 -11
  66. package/projects/gallery-app/src/app/app.component.html +0 -4
  67. package/projects/gallery-app/src/app/app.component.scss +0 -9
  68. package/projects/gallery-app/src/app/app.component.spec.ts +0 -35
  69. package/projects/gallery-app/src/app/app.component.ts +0 -76
  70. package/projects/gallery-app/src/app/app.module.ts +0 -21
  71. package/projects/gallery-app/src/assets/.gitkeep +0 -0
  72. package/projects/gallery-app/src/assets/img/gallery/1-big.jpeg +0 -0
  73. package/projects/gallery-app/src/assets/img/gallery/1-medium.jpeg +0 -0
  74. package/projects/gallery-app/src/assets/img/gallery/1-small.jpeg +0 -0
  75. package/projects/gallery-app/src/assets/img/gallery/2-big.jpeg +0 -0
  76. package/projects/gallery-app/src/assets/img/gallery/2-medium.jpeg +0 -0
  77. package/projects/gallery-app/src/assets/img/gallery/2-small.jpeg +0 -0
  78. package/projects/gallery-app/src/assets/img/gallery/3-big.jpeg +0 -0
  79. package/projects/gallery-app/src/assets/img/gallery/3-medium.jpeg +0 -0
  80. package/projects/gallery-app/src/assets/img/gallery/3-small.jpeg +0 -0
  81. package/projects/gallery-app/src/assets/img/gallery/4-big.jpeg +0 -0
  82. package/projects/gallery-app/src/assets/img/gallery/4-medium.jpeg +0 -0
  83. package/projects/gallery-app/src/assets/img/gallery/4-small.jpeg +0 -0
  84. package/projects/gallery-app/src/assets/img/gallery/5-big.jpeg +0 -0
  85. package/projects/gallery-app/src/assets/img/gallery/5-medium.jpeg +0 -0
  86. package/projects/gallery-app/src/assets/img/gallery/5-small.jpeg +0 -0
  87. package/projects/gallery-app/src/assets/img/gallery/6-big.jpeg +0 -0
  88. package/projects/gallery-app/src/assets/img/gallery/6-medium.jpeg +0 -0
  89. package/projects/gallery-app/src/assets/img/gallery/6-small.jpeg +0 -0
  90. package/projects/gallery-app/src/assets/img/gallery/7-big.jpeg +0 -0
  91. package/projects/gallery-app/src/assets/img/gallery/7-medium.jpeg +0 -0
  92. package/projects/gallery-app/src/assets/img/gallery/7-small.jpeg +0 -0
  93. package/projects/gallery-app/src/assets/img/gallery/8-big.jpeg +0 -0
  94. package/projects/gallery-app/src/assets/img/gallery/8-medium.jpeg +0 -0
  95. package/projects/gallery-app/src/assets/img/gallery/8-small.jpeg +0 -0
  96. package/projects/gallery-app/src/environments/environment.prod.ts +0 -3
  97. package/projects/gallery-app/src/environments/environment.ts +0 -16
  98. package/projects/gallery-app/src/favicon.ico +0 -0
  99. package/projects/gallery-app/src/index.html +0 -13
  100. package/projects/gallery-app/src/main.ts +0 -12
  101. package/projects/gallery-app/src/polyfills.ts +0 -53
  102. package/projects/gallery-app/src/styles.scss +0 -1
  103. package/projects/gallery-app/src/test.ts +0 -16
  104. package/projects/gallery-app/tsconfig.app.json +0 -17
  105. package/projects/gallery-app/tsconfig.spec.json +0 -18
  106. package/tsconfig.json +0 -43
@@ -0,0 +1,1756 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, HostListener, ViewChild, HostBinding, ViewEncapsulation, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/platform-browser';
4
+ import * as i3 from '@angular/common';
5
+ import { CommonModule } from '@angular/common';
6
+ import { trigger, state, transition, style, animate } from '@angular/animations';
7
+
8
+ class NgxGalleryService {
9
+ constructor(renderer) {
10
+ this.renderer = renderer;
11
+ this.swipeHandlers = new Map();
12
+ this.pointerData = new Map();
13
+ }
14
+ manageSwipe(status, element, id, nextHandler, prevHandler) {
15
+ const handlers = this.swipeHandlers.get(id);
16
+ if (status && !handlers) {
17
+ const el = element.nativeElement;
18
+ const pointerDown = this.renderer.listen(el, 'pointerdown', (event) => {
19
+ this.pointerData.set(id, { x: event.clientX });
20
+ });
21
+ const pointerUp = this.renderer.listen(el, 'pointerup', (event) => {
22
+ const start = this.pointerData.get(id);
23
+ const endX = event.clientX;
24
+ if (!start)
25
+ return;
26
+ const deltaX = endX - start.x;
27
+ const threshold = 40;
28
+ if (deltaX > threshold) {
29
+ prevHandler();
30
+ }
31
+ else if (deltaX < -threshold) {
32
+ nextHandler();
33
+ }
34
+ this.pointerData.delete(id);
35
+ });
36
+ const pointerCancel = this.renderer.listen(el, 'pointercancel', () => {
37
+ this.pointerData.delete(id);
38
+ });
39
+ const pointerLeave = this.renderer.listen(el, 'pointerleave', () => {
40
+ this.pointerData.delete(id);
41
+ });
42
+ this.swipeHandlers.set(id, [pointerDown, pointerUp, pointerCancel, pointerLeave]);
43
+ }
44
+ else if (!status && handlers) {
45
+ handlers.forEach(unlisten => unlisten());
46
+ this.swipeHandlers.delete(id);
47
+ }
48
+ }
49
+ validateUrl(url) {
50
+ return url?.replace(/ /g, '%20').replace(/'/g, '%27') ?? url;
51
+ }
52
+ getBackgroundUrl(image) {
53
+ return `url('${this.validateUrl(image)}')`;
54
+ }
55
+ getFileType(fileSource) {
56
+ const ext = fileSource.split('.').pop()?.toLowerCase();
57
+ return ['avi', 'flv', 'wmv', 'mov', 'mp4'].includes(ext ?? '') ? 'video' : 'image';
58
+ }
59
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryService, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable }); }
60
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryService, providedIn: 'root' }); }
61
+ }
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryService, decorators: [{
63
+ type: Injectable,
64
+ args: [{ providedIn: 'root' }]
65
+ }], ctorParameters: () => [{ type: i0.Renderer2 }] });
66
+
67
+ class NgxGalleryArrowsComponent {
68
+ constructor() {
69
+ this.prevClick = new EventEmitter();
70
+ this.nextClick = new EventEmitter();
71
+ }
72
+ handlePrevClick() {
73
+ this.prevClick.emit();
74
+ }
75
+ handleNextClick() {
76
+ this.nextClick.emit();
77
+ }
78
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryArrowsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
79
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: NgxGalleryArrowsComponent, isStandalone: false, selector: "ngx-gallery-arrows", inputs: { prevDisabled: "prevDisabled", nextDisabled: "nextDisabled", arrowPrevIcon: "arrowPrevIcon", arrowNextIcon: "arrowNextIcon" }, outputs: { prevClick: "prevClick", nextClick: "nextClick" }, ngImport: i0, template: "<div class=\"ngx-gallery-arrows-wrapper ngx-gallery-arrow-left\">\n <div class=\"ngx-gallery-icon ngx-gallery-arrow\" aria-hidden=\"true\" (click)=\"handlePrevClick()\"\n [class.ngx-gallery-disabled]=\"prevDisabled\">\n <i class=\"ngx-gallery-icon-content {{arrowPrevIcon}}\"></i>\n </div>\n</div>\n<div class=\"ngx-gallery-arrows-wrapper ngx-gallery-arrow-right\">\n <div class=\"ngx-gallery-icon ngx-gallery-arrow\" aria-hidden=\"true\" (click)=\"handleNextClick()\"\n [class.ngx-gallery-disabled]=\"nextDisabled\">\n <i class=\"ngx-gallery-icon-content {{arrowNextIcon}}\"></i>\n </div>\n</div>", styles: [".ngx-gallery-arrow-wrapper{position:absolute;height:100%;width:1px;display:table;table-layout:fixed}.ngx-gallery-preview-img-wrapper .ngx-gallery-arrow-wrapper{z-index:10001}.ngx-gallery-arrow-left{left:0}.ngx-gallery-arrow-right{right:0}.ngx-gallery-arrow{top:50%;transform:translateY(-50%);cursor:pointer}.ngx-gallery-arrow.ngx-gallery-disabled{opacity:.6;cursor:default}.ngx-gallery-arrow-left .ngx-gallery-arrow{left:10px}.ngx-gallery-arrow-right .ngx-gallery-arrow{right:10px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
80
+ }
81
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryArrowsComponent, decorators: [{
82
+ type: Component,
83
+ args: [{ selector: 'ngx-gallery-arrows', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"ngx-gallery-arrows-wrapper ngx-gallery-arrow-left\">\n <div class=\"ngx-gallery-icon ngx-gallery-arrow\" aria-hidden=\"true\" (click)=\"handlePrevClick()\"\n [class.ngx-gallery-disabled]=\"prevDisabled\">\n <i class=\"ngx-gallery-icon-content {{arrowPrevIcon}}\"></i>\n </div>\n</div>\n<div class=\"ngx-gallery-arrows-wrapper ngx-gallery-arrow-right\">\n <div class=\"ngx-gallery-icon ngx-gallery-arrow\" aria-hidden=\"true\" (click)=\"handleNextClick()\"\n [class.ngx-gallery-disabled]=\"nextDisabled\">\n <i class=\"ngx-gallery-icon-content {{arrowNextIcon}}\"></i>\n </div>\n</div>", styles: [".ngx-gallery-arrow-wrapper{position:absolute;height:100%;width:1px;display:table;table-layout:fixed}.ngx-gallery-preview-img-wrapper .ngx-gallery-arrow-wrapper{z-index:10001}.ngx-gallery-arrow-left{left:0}.ngx-gallery-arrow-right{right:0}.ngx-gallery-arrow{top:50%;transform:translateY(-50%);cursor:pointer}.ngx-gallery-arrow.ngx-gallery-disabled{opacity:.6;cursor:default}.ngx-gallery-arrow-left .ngx-gallery-arrow{left:10px}.ngx-gallery-arrow-right .ngx-gallery-arrow{right:10px}\n"] }]
84
+ }], ctorParameters: () => [], propDecorators: { prevDisabled: [{
85
+ type: Input
86
+ }], nextDisabled: [{
87
+ type: Input
88
+ }], arrowPrevIcon: [{
89
+ type: Input
90
+ }], arrowNextIcon: [{
91
+ type: Input
92
+ }], prevClick: [{
93
+ type: Output
94
+ }], nextClick: [{
95
+ type: Output
96
+ }] } });
97
+
98
+ class NgxGalleryActionComponent {
99
+ constructor() {
100
+ this.disabled = false;
101
+ this.titleText = '';
102
+ this.closeClick = new EventEmitter();
103
+ }
104
+ handleClick(event) {
105
+ if (!this.disabled) {
106
+ this.closeClick.emit(event);
107
+ }
108
+ event.stopPropagation();
109
+ event.preventDefault();
110
+ }
111
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
112
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: NgxGalleryActionComponent, isStandalone: false, selector: "ngx-gallery-action", inputs: { icon: "icon", disabled: "disabled", titleText: "titleText" }, outputs: { closeClick: "closeClick" }, ngImport: i0, template: "<div class=\"ngx-gallery-icon\" [class.ngx-gallery-icon-disabled]=\"disabled\" aria-hidden=\"true\" title=\"{{ titleText }}\"\n (click)=\"handleClick($event)\">\n <i class=\"ngx-gallery-icon-content {{ icon }}\"></i>\n</div>", styles: [".ngx-gallery-icon{color:#fff;font-size:25px;position:absolute;z-index:2000;display:inline-block}.ngx-gallery-icon{position:relative;margin-right:10px;margin-top:10px;font-size:25px;cursor:pointer;text-decoration:none}.ngx-gallery-icon .ngx-gallery-icon-content{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
113
+ }
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryActionComponent, decorators: [{
115
+ type: Component,
116
+ args: [{ selector: 'ngx-gallery-action', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"ngx-gallery-icon\" [class.ngx-gallery-icon-disabled]=\"disabled\" aria-hidden=\"true\" title=\"{{ titleText }}\"\n (click)=\"handleClick($event)\">\n <i class=\"ngx-gallery-icon-content {{ icon }}\"></i>\n</div>", styles: [".ngx-gallery-icon{color:#fff;font-size:25px;position:absolute;z-index:2000;display:inline-block}.ngx-gallery-icon{position:relative;margin-right:10px;margin-top:10px;font-size:25px;cursor:pointer;text-decoration:none}.ngx-gallery-icon .ngx-gallery-icon-content{display:block}\n"] }]
117
+ }], ctorParameters: () => [], propDecorators: { icon: [{
118
+ type: Input
119
+ }], disabled: [{
120
+ type: Input
121
+ }], titleText: [{
122
+ type: Input
123
+ }], closeClick: [{
124
+ type: Output
125
+ }] } });
126
+
127
+ class NgxGalleryBulletsComponent {
128
+ constructor() {
129
+ this.active = 0;
130
+ this.bulletChange = new EventEmitter();
131
+ }
132
+ getBullets() {
133
+ return Array(this.count);
134
+ }
135
+ handleChange(event, index) {
136
+ this.bulletChange.emit(index);
137
+ }
138
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryBulletsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
139
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: NgxGalleryBulletsComponent, isStandalone: false, selector: "ngx-gallery-bullets", inputs: { count: "count", active: "active" }, outputs: { bulletChange: "bulletChange" }, ngImport: i0, template: "@for (bullet of getBullets(); track bullet; let i = $index) {\n<div class=\"ngx-gallery-bullet\" (click)=\"handleChange($event, i)\" [ngClass]=\"{ 'ngx-gallery-active': i === active }\">\n</div>\n}", styles: [":host{position:absolute;z-index:2000;display:inline-flex;left:50%;transform:translate(-50%);bottom:0;padding:10px}.ngx-gallery-bullet{width:10px;height:10px;border-radius:50%;cursor:pointer;background:#fff}.ngx-gallery-bullet:not(:first-child){margin-left:5px}.ngx-gallery-bullet:hover,.ngx-gallery-bullet.ngx-gallery-active{background:#000}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
140
+ }
141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryBulletsComponent, decorators: [{
142
+ type: Component,
143
+ args: [{ selector: 'ngx-gallery-bullets', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "@for (bullet of getBullets(); track bullet; let i = $index) {\n<div class=\"ngx-gallery-bullet\" (click)=\"handleChange($event, i)\" [ngClass]=\"{ 'ngx-gallery-active': i === active }\">\n</div>\n}", styles: [":host{position:absolute;z-index:2000;display:inline-flex;left:50%;transform:translate(-50%);bottom:0;padding:10px}.ngx-gallery-bullet{width:10px;height:10px;border-radius:50%;cursor:pointer;background:#fff}.ngx-gallery-bullet:not(:first-child){margin-left:5px}.ngx-gallery-bullet:hover,.ngx-gallery-bullet.ngx-gallery-active{background:#000}\n"] }]
144
+ }], ctorParameters: () => [], propDecorators: { count: [{
145
+ type: Input
146
+ }], active: [{
147
+ type: Input
148
+ }], bulletChange: [{
149
+ type: Output
150
+ }] } });
151
+
152
+ class NgxGalleryPreviewComponent {
153
+ constructor(sanitization, elementRef, helperService, renderer, changeDetectorRef) {
154
+ this.sanitization = sanitization;
155
+ this.elementRef = elementRef;
156
+ this.helperService = helperService;
157
+ this.renderer = renderer;
158
+ this.changeDetectorRef = changeDetectorRef;
159
+ this.showSpinner = false;
160
+ this.positionLeft = 0;
161
+ this.positionTop = 0;
162
+ this.zoomValue = 1;
163
+ this.loading = false;
164
+ this.rotateValue = 0;
165
+ this.index = 0;
166
+ this.previewOpen = new EventEmitter();
167
+ this.previewClose = new EventEmitter();
168
+ this.activeChange = new EventEmitter();
169
+ this.isOpen = false;
170
+ this.initialX = 0;
171
+ this.initialY = 0;
172
+ this.initialLeft = 0;
173
+ this.initialTop = 0;
174
+ this.isMove = false;
175
+ }
176
+ ngOnInit() {
177
+ if (this.arrows && this.arrowsAutoHide) {
178
+ this.arrows = false;
179
+ }
180
+ }
181
+ ngAfterViewInit() {
182
+ if (this.swipe) {
183
+ this.helperService.manageSwipe(true, this.elementRef, 'preview', () => this.showNext(), () => this.showPrev());
184
+ }
185
+ }
186
+ ngOnDestroy() {
187
+ this.helperService.manageSwipe(false, this.elementRef, 'preview', () => { }, () => { });
188
+ if (this.keyDownListener) {
189
+ this.keyDownListener();
190
+ }
191
+ }
192
+ onMouseEnter() {
193
+ if (this.arrowsAutoHide && !this.arrows) {
194
+ this.arrows = true;
195
+ }
196
+ }
197
+ onMouseLeave() {
198
+ if (this.arrowsAutoHide && this.arrows) {
199
+ this.arrows = false;
200
+ }
201
+ }
202
+ onKeyDown(e) {
203
+ if (this.isOpen) {
204
+ if (this.keyboardNavigation) {
205
+ if (this.isKeyboardPrev(e)) {
206
+ this.showPrev();
207
+ }
208
+ else if (this.isKeyboardNext(e)) {
209
+ this.showNext();
210
+ }
211
+ }
212
+ if (this.closeOnEsc && this.isKeyboardEsc(e)) {
213
+ this.close();
214
+ }
215
+ }
216
+ }
217
+ open(index) {
218
+ this.previewOpen.emit();
219
+ this.index = index;
220
+ this.isOpen = true;
221
+ this.show(true);
222
+ if (this.forceFullscreen) {
223
+ this.manageFullscreen();
224
+ }
225
+ this.keyDownListener = this.renderer.listen('window', 'keydown', (e) => this.onKeyDown(e));
226
+ }
227
+ close() {
228
+ this.isOpen = false;
229
+ const video = this.previewImage.nativeElement;
230
+ if (video.currentTime > 0 &&
231
+ !video.paused &&
232
+ !video.ended &&
233
+ video.readyState > 2) {
234
+ video.pause();
235
+ }
236
+ this.closeFullscreen();
237
+ this.previewClose.emit();
238
+ this.stopAutoPlay();
239
+ if (this.keyDownListener) {
240
+ this.keyDownListener();
241
+ }
242
+ }
243
+ imageMouseEnter() {
244
+ if (this.autoPlay && this.autoPlayPauseOnHover) {
245
+ this.stopAutoPlay();
246
+ }
247
+ }
248
+ imageMouseLeave() {
249
+ if (this.autoPlay && this.autoPlayPauseOnHover) {
250
+ this.startAutoPlay();
251
+ }
252
+ }
253
+ startAutoPlay() {
254
+ if (this.autoPlay) {
255
+ this.stopAutoPlay();
256
+ this.timer = setTimeout(() => {
257
+ if (!this.showNext()) {
258
+ this.index = -1;
259
+ this.showNext();
260
+ }
261
+ }, this.autoPlayInterval);
262
+ }
263
+ }
264
+ stopAutoPlay() {
265
+ if (this.timer) {
266
+ clearTimeout(this.timer);
267
+ }
268
+ }
269
+ showAtIndex(index) {
270
+ this.index = index;
271
+ this.show();
272
+ }
273
+ showNext() {
274
+ if (this.canShowNext()) {
275
+ this.index++;
276
+ if (this.index === this.images.length) {
277
+ this.index = 0;
278
+ }
279
+ this.show();
280
+ return true;
281
+ }
282
+ else {
283
+ return false;
284
+ }
285
+ }
286
+ showPrev() {
287
+ if (this.canShowPrev()) {
288
+ this.index--;
289
+ if (this.index < 0) {
290
+ this.index = this.images.length - 1;
291
+ }
292
+ this.show();
293
+ }
294
+ }
295
+ canShowNext() {
296
+ if (this.loading) {
297
+ return false;
298
+ }
299
+ else if (this.images) {
300
+ return this.infinityMove || this.index < this.images.length - 1;
301
+ }
302
+ else {
303
+ return false;
304
+ }
305
+ }
306
+ canShowPrev() {
307
+ if (this.loading) {
308
+ return false;
309
+ }
310
+ else if (this.images) {
311
+ return this.infinityMove || this.index > 0;
312
+ }
313
+ else {
314
+ return false;
315
+ }
316
+ }
317
+ manageFullscreen() {
318
+ if (this.fullscreen || this.forceFullscreen) {
319
+ const doc = document;
320
+ if (!doc.fullscreenElement && !doc.mozFullScreenElement
321
+ && !doc.webkitFullscreenElement && !doc.msFullscreenElement) {
322
+ this.openFullscreen();
323
+ }
324
+ else {
325
+ this.closeFullscreen();
326
+ }
327
+ }
328
+ }
329
+ getSafeUrl(image) {
330
+ return this.sanitization.bypassSecurityTrustUrl(image);
331
+ }
332
+ getFileType(fileSource) {
333
+ return this.helperService.getFileType(fileSource);
334
+ }
335
+ zoomIn() {
336
+ if (this.canZoomIn()) {
337
+ this.zoomValue += this.zoomStep;
338
+ if (this.zoomValue > this.zoomMax) {
339
+ this.zoomValue = this.zoomMax;
340
+ }
341
+ }
342
+ }
343
+ zoomOut() {
344
+ if (this.canZoomOut()) {
345
+ this.zoomValue -= this.zoomStep;
346
+ if (this.zoomValue < this.zoomMin) {
347
+ this.zoomValue = this.zoomMin;
348
+ }
349
+ if (this.zoomValue <= 1) {
350
+ this.resetPosition();
351
+ }
352
+ }
353
+ }
354
+ rotateLeft() {
355
+ this.rotateValue -= 90;
356
+ }
357
+ rotateRight() {
358
+ this.rotateValue += 90;
359
+ }
360
+ getTransform() {
361
+ return this.sanitization.bypassSecurityTrustStyle('scale(' + this.zoomValue + ') rotate(' + this.rotateValue + 'deg)');
362
+ }
363
+ canZoomIn() {
364
+ return this.zoomValue < this.zoomMax;
365
+ }
366
+ canZoomOut() {
367
+ return this.zoomValue > this.zoomMin;
368
+ }
369
+ canDragOnZoom() {
370
+ return this.zoom && this.zoomValue > 1;
371
+ }
372
+ mouseDownHandler(e) {
373
+ if (this.canDragOnZoom()) {
374
+ this.initialX = this.getClientX(e);
375
+ this.initialY = this.getClientY(e);
376
+ this.initialLeft = this.positionLeft;
377
+ this.initialTop = this.positionTop;
378
+ this.isMove = true;
379
+ e.preventDefault();
380
+ }
381
+ }
382
+ mouseUpHandler(e) {
383
+ this.isMove = false;
384
+ }
385
+ mouseMoveHandler(e) {
386
+ if (this.isMove) {
387
+ this.positionLeft = this.initialLeft + (this.getClientX(e) - this.initialX);
388
+ this.positionTop = this.initialTop + (this.getClientY(e) - this.initialY);
389
+ }
390
+ }
391
+ getClientX(e) {
392
+ return e.touches && e.touches.length ? e.touches[0].clientX : e.clientX;
393
+ }
394
+ getClientY(e) {
395
+ return e.touches && e.touches.length ? e.touches[0].clientY : e.clientY;
396
+ }
397
+ resetPosition() {
398
+ if (this.zoom) {
399
+ this.positionLeft = 0;
400
+ this.positionTop = 0;
401
+ }
402
+ }
403
+ isKeyboardNext(e) {
404
+ return e.keyCode === 39;
405
+ }
406
+ isKeyboardPrev(e) {
407
+ return e.keyCode === 37;
408
+ }
409
+ isKeyboardEsc(e) {
410
+ return e.keyCode === 27;
411
+ }
412
+ openFullscreen() {
413
+ const element = document.documentElement;
414
+ if (element.requestFullscreen) {
415
+ element.requestFullscreen();
416
+ }
417
+ else if (element.msRequestFullscreen) {
418
+ element.msRequestFullscreen();
419
+ }
420
+ else if (element.mozRequestFullScreen) {
421
+ element.mozRequestFullScreen();
422
+ }
423
+ else if (element.webkitRequestFullscreen) {
424
+ element.webkitRequestFullscreen();
425
+ }
426
+ }
427
+ closeFullscreen() {
428
+ if (this.isFullscreen()) {
429
+ const doc = document;
430
+ if (doc.exitFullscreen) {
431
+ doc.exitFullscreen();
432
+ }
433
+ else if (doc.msExitFullscreen) {
434
+ doc.msExitFullscreen();
435
+ }
436
+ else if (doc.mozCancelFullScreen) {
437
+ doc.mozCancelFullScreen();
438
+ }
439
+ else if (doc.webkitExitFullscreen) {
440
+ doc.webkitExitFullscreen();
441
+ }
442
+ }
443
+ }
444
+ isFullscreen() {
445
+ const doc = document;
446
+ return doc.fullscreenElement || doc.webkitFullscreenElement
447
+ || doc.mozFullScreenElement || doc.msFullscreenElement;
448
+ }
449
+ show(first = false) {
450
+ this.loading = true;
451
+ this.stopAutoPlay();
452
+ this.activeChange.emit(this.index);
453
+ if (first || !this.animation) {
454
+ this._show();
455
+ }
456
+ else {
457
+ setTimeout(() => this._show(), 600);
458
+ }
459
+ }
460
+ _show() {
461
+ this.zoomValue = 1;
462
+ this.rotateValue = 0;
463
+ this.resetPosition();
464
+ this.src = this.getSafeUrl(this.images[this.index]);
465
+ this.type = this.getFileType(this.images[this.index]);
466
+ this.srcIndex = this.index;
467
+ this.description = this.descriptions[this.index];
468
+ this.changeDetectorRef.markForCheck();
469
+ setTimeout(() => {
470
+ if (this.isLoaded(this.previewImage.nativeElement) || this.type === 'video') {
471
+ this.loading = false;
472
+ this.startAutoPlay();
473
+ this.changeDetectorRef.markForCheck();
474
+ }
475
+ else if (this.type === 'video') {
476
+ }
477
+ else {
478
+ setTimeout(() => {
479
+ if (this.loading) {
480
+ this.showSpinner = true;
481
+ this.changeDetectorRef.markForCheck();
482
+ }
483
+ });
484
+ this.previewImage.nativeElement.onload = () => {
485
+ this.loading = false;
486
+ this.showSpinner = false;
487
+ this.previewImage.nativeElement.onload = null;
488
+ this.startAutoPlay();
489
+ this.changeDetectorRef.markForCheck();
490
+ };
491
+ }
492
+ });
493
+ }
494
+ isLoaded(img) {
495
+ if (!img.complete) {
496
+ return false;
497
+ }
498
+ return !(typeof img.naturalWidth !== 'undefined' && img.naturalWidth === 0);
499
+ }
500
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryPreviewComponent, deps: [{ token: i1.DomSanitizer }, { token: i0.ElementRef }, { token: NgxGalleryService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
501
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: NgxGalleryPreviewComponent, isStandalone: false, selector: "ngx-gallery-preview", inputs: { images: "images", descriptions: "descriptions", showDescription: "showDescription", arrows: "arrows", arrowsAutoHide: "arrowsAutoHide", swipe: "swipe", fullscreen: "fullscreen", forceFullscreen: "forceFullscreen", closeOnClick: "closeOnClick", closeOnEsc: "closeOnEsc", keyboardNavigation: "keyboardNavigation", arrowPrevIcon: "arrowPrevIcon", arrowNextIcon: "arrowNextIcon", closeIcon: "closeIcon", fullscreenIcon: "fullscreenIcon", spinnerIcon: "spinnerIcon", autoPlay: "autoPlay", autoPlayInterval: "autoPlayInterval", autoPlayPauseOnHover: "autoPlayPauseOnHover", infinityMove: "infinityMove", zoom: "zoom", zoomStep: "zoomStep", zoomMax: "zoomMax", zoomMin: "zoomMin", zoomInIcon: "zoomInIcon", zoomOutIcon: "zoomOutIcon", animation: "animation", actions: "actions", rotate: "rotate", rotateLeftIcon: "rotateLeftIcon", rotateRightIcon: "rotateRightIcon", download: "download", downloadIcon: "downloadIcon", bullets: "bullets" }, outputs: { previewOpen: "previewOpen", previewClose: "previewClose", activeChange: "activeChange" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, viewQueries: [{ propertyName: "previewImage", first: true, predicate: ["previewImage"], descendants: true }], ngImport: i0, template: "@if (arrows) {\n<ngx-gallery-arrows (prevClick)=\"showPrev()\" (nextClick)=\"showNext()\" [prevDisabled]=\"!canShowPrev()\"\n [nextDisabled]=\"!canShowNext()\" [arrowPrevIcon]=\"arrowPrevIcon\" [arrowNextIcon]=\"arrowNextIcon\"></ngx-gallery-arrows>\n}\n<div class=\"ngx-gallery-preview-top\">\n <div class=\"ngx-gallery-preview-icons\">\n @for (action of actions; track action) {\n <ngx-gallery-action [icon]=\"action.icon\" [disabled]=\"action.disabled\" [titleText]=\"action.titleText\"\n (closeClick)=\"action.onClick($event, index)\"></ngx-gallery-action>\n }\n @if (download && src) {\n <a [href]=\"src\" class=\"ngx-gallery-icon\" aria-hidden=\"true\" download>\n <i class=\"ngx-gallery-icon-content {{ downloadIcon }}\"></i>\n </a>\n }\n @if (zoom) {\n <ngx-gallery-action [icon]=\"zoomOutIcon\" [disabled]=\"!canZoomOut()\" (closeClick)=\"zoomOut()\"></ngx-gallery-action>\n }\n @if (zoom) {\n <ngx-gallery-action [icon]=\"zoomInIcon\" [disabled]=\"!canZoomIn()\" (closeClick)=\"zoomIn()\"></ngx-gallery-action>\n }\n @if (rotate) {\n <ngx-gallery-action [icon]=\"rotateLeftIcon\" (closeClick)=\"rotateLeft()\"></ngx-gallery-action>\n }\n @if (rotate) {\n <ngx-gallery-action [icon]=\"rotateRightIcon\" (closeClick)=\"rotateRight()\"></ngx-gallery-action>\n }\n @if (fullscreen) {\n <ngx-gallery-action [icon]=\"'ngx-gallery-fullscreen ' + fullscreenIcon\"\n (closeClick)=\"manageFullscreen()\"></ngx-gallery-action>\n }\n <ngx-gallery-action [icon]=\"'ngx-gallery-close ' + closeIcon\" (closeClick)=\"close()\"></ngx-gallery-action>\n </div>\n</div>\n<div class=\"ngx-spinner-wrapper ngx-gallery-center\" [class.ngx-gallery-active]=\"showSpinner\">\n <i class=\"ngx-gallery-icon ngx-gallery-spinner {{spinnerIcon}}\" aria-hidden=\"true\"></i>\n</div>\n<div class=\"ngx-gallery-preview-wrapper\" (click)=\"closeOnClick && close()\" (mouseup)=\"mouseUpHandler($event)\"\n (mousemove)=\"mouseMoveHandler($event)\" (touchend)=\"mouseUpHandler($event)\" (touchmove)=\"mouseMoveHandler($event)\">\n <div class=\"ngx-gallery-preview-img-wrapper\">\n @if (src && type === 'image') {\n <img #previewImage class=\"ngx-gallery-preview-img ngx-gallery-center\" [src]=\"src\" (click)=\"$event.stopPropagation()\"\n (mouseenter)=\"imageMouseEnter()\" (mouseleave)=\"imageMouseLeave()\" (mousedown)=\"mouseDownHandler($event)\"\n (touchstart)=\"mouseDownHandler($event)\" [class.ngx-gallery-active]=\"!loading\" [class.animation]=\"animation\"\n [class.ngx-gallery-grab]=\"canDragOnZoom()\" [style.transform]=\"getTransform()\" [style.left]=\"positionLeft + 'px'\"\n [style.top]=\"positionTop + 'px'\" />\n }\n @if (src && type === 'video') {\n <video #previewImage controls style=\"width: 100%; height: 100%;\" class=\"ngx-gallery-preview-img ngx-gallery-center\"\n (click)=\"$event.stopPropagation()\" (mouseenter)=\"imageMouseEnter()\" (mouseleave)=\"imageMouseLeave()\"\n (mousedown)=\"mouseDownHandler($event)\" (touchstart)=\"mouseDownHandler($event)\"\n [class.ngx-gallery-active]=\"!loading\" [class.animation]=\"animation\" [class.ngx-gallery-grab]=\"canDragOnZoom()\"\n [style.transform]=\"getTransform()\" [style.left]=\"positionLeft + 'px'\" [style.top]=\"positionTop + 'px'\">\n <source [src]=\"src\">\n Your browser does not support the video tag.\n </video>\n }\n @if (bullets) {\n <ngx-gallery-bullets [count]=\"images.length\" [active]=\"index\"\n (bulletChange)=\"showAtIndex($event)\"></ngx-gallery-bullets>\n }\n </div>\n @if (showDescription && description) {\n <div class=\"ngx-gallery-preview-text\" [innerHTML]=\"description\" (click)=\"$event.stopPropagation()\"></div>\n }\n</div>", styles: [":host.ngx-gallery-active{width:100%;height:100%;position:fixed;left:0;top:0;background:#000000b3;z-index:10000;display:inline-block;font-size:50px!important}:host{display:none;font-size:50px!important}:host .ngx-gallery-arrow{font-size:50px!important}ngx-gallery-bullets{height:5%;align-items:center;padding:0}.ngx-gallery-preview-img{opacity:0;max-width:90%;max-height:90%;-webkit-user-select:none;user-select:none;transition:transform .5s}.ngx-gallery-preview-img.animation{transition:opacity .5s linear,transform .5s}.ngx-gallery-preview-img.ngx-gallery-active{opacity:1}.ngx-gallery-preview-img.ngx-gallery-grab{cursor:grab}.ngx-gallery-icon.ngx-gallery-spinner{font-size:50px;left:0;display:inline-block}:host .ngx-gallery-preview-top{position:absolute;width:100%;-webkit-user-select:none;user-select:none;font-size:25px}.ngx-gallery-preview-icons{float:right}.ngx-gallery-preview-icons .ngx-gallery-icon{position:relative;margin-right:10px;margin-top:10px;font-size:25px;cursor:pointer;text-decoration:none}.ngx-gallery-preview-icons .ngx-gallery-icon.ngx-gallery-icon-disabled{cursor:default;opacity:.4}.ngx-spinner-wrapper{width:50px;height:50px;display:none}.ngx-spinner-wrapper.ngx-gallery-active{display:inline-block}.ngx-gallery-center{position:absolute;inset:0;margin:auto}.ngx-gallery-preview-text{width:100%;background:#000000b3;padding:10px;text-align:center;color:#fff;font-size:16px;flex:0 1 auto;z-index:10}.ngx-gallery-preview-wrapper{width:100%;height:100%;display:flex;flex-flow:column}.ngx-gallery-preview-img-wrapper{flex:1 1 auto;position:relative}\n"], dependencies: [{ kind: "component", type: NgxGalleryArrowsComponent, selector: "ngx-gallery-arrows", inputs: ["prevDisabled", "nextDisabled", "arrowPrevIcon", "arrowNextIcon"], outputs: ["prevClick", "nextClick"] }, { kind: "component", type: NgxGalleryActionComponent, selector: "ngx-gallery-action", inputs: ["icon", "disabled", "titleText"], outputs: ["closeClick"] }, { kind: "component", type: NgxGalleryBulletsComponent, selector: "ngx-gallery-bullets", inputs: ["count", "active"], outputs: ["bulletChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
502
+ }
503
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryPreviewComponent, decorators: [{
504
+ type: Component,
505
+ args: [{ selector: 'ngx-gallery-preview', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "@if (arrows) {\n<ngx-gallery-arrows (prevClick)=\"showPrev()\" (nextClick)=\"showNext()\" [prevDisabled]=\"!canShowPrev()\"\n [nextDisabled]=\"!canShowNext()\" [arrowPrevIcon]=\"arrowPrevIcon\" [arrowNextIcon]=\"arrowNextIcon\"></ngx-gallery-arrows>\n}\n<div class=\"ngx-gallery-preview-top\">\n <div class=\"ngx-gallery-preview-icons\">\n @for (action of actions; track action) {\n <ngx-gallery-action [icon]=\"action.icon\" [disabled]=\"action.disabled\" [titleText]=\"action.titleText\"\n (closeClick)=\"action.onClick($event, index)\"></ngx-gallery-action>\n }\n @if (download && src) {\n <a [href]=\"src\" class=\"ngx-gallery-icon\" aria-hidden=\"true\" download>\n <i class=\"ngx-gallery-icon-content {{ downloadIcon }}\"></i>\n </a>\n }\n @if (zoom) {\n <ngx-gallery-action [icon]=\"zoomOutIcon\" [disabled]=\"!canZoomOut()\" (closeClick)=\"zoomOut()\"></ngx-gallery-action>\n }\n @if (zoom) {\n <ngx-gallery-action [icon]=\"zoomInIcon\" [disabled]=\"!canZoomIn()\" (closeClick)=\"zoomIn()\"></ngx-gallery-action>\n }\n @if (rotate) {\n <ngx-gallery-action [icon]=\"rotateLeftIcon\" (closeClick)=\"rotateLeft()\"></ngx-gallery-action>\n }\n @if (rotate) {\n <ngx-gallery-action [icon]=\"rotateRightIcon\" (closeClick)=\"rotateRight()\"></ngx-gallery-action>\n }\n @if (fullscreen) {\n <ngx-gallery-action [icon]=\"'ngx-gallery-fullscreen ' + fullscreenIcon\"\n (closeClick)=\"manageFullscreen()\"></ngx-gallery-action>\n }\n <ngx-gallery-action [icon]=\"'ngx-gallery-close ' + closeIcon\" (closeClick)=\"close()\"></ngx-gallery-action>\n </div>\n</div>\n<div class=\"ngx-spinner-wrapper ngx-gallery-center\" [class.ngx-gallery-active]=\"showSpinner\">\n <i class=\"ngx-gallery-icon ngx-gallery-spinner {{spinnerIcon}}\" aria-hidden=\"true\"></i>\n</div>\n<div class=\"ngx-gallery-preview-wrapper\" (click)=\"closeOnClick && close()\" (mouseup)=\"mouseUpHandler($event)\"\n (mousemove)=\"mouseMoveHandler($event)\" (touchend)=\"mouseUpHandler($event)\" (touchmove)=\"mouseMoveHandler($event)\">\n <div class=\"ngx-gallery-preview-img-wrapper\">\n @if (src && type === 'image') {\n <img #previewImage class=\"ngx-gallery-preview-img ngx-gallery-center\" [src]=\"src\" (click)=\"$event.stopPropagation()\"\n (mouseenter)=\"imageMouseEnter()\" (mouseleave)=\"imageMouseLeave()\" (mousedown)=\"mouseDownHandler($event)\"\n (touchstart)=\"mouseDownHandler($event)\" [class.ngx-gallery-active]=\"!loading\" [class.animation]=\"animation\"\n [class.ngx-gallery-grab]=\"canDragOnZoom()\" [style.transform]=\"getTransform()\" [style.left]=\"positionLeft + 'px'\"\n [style.top]=\"positionTop + 'px'\" />\n }\n @if (src && type === 'video') {\n <video #previewImage controls style=\"width: 100%; height: 100%;\" class=\"ngx-gallery-preview-img ngx-gallery-center\"\n (click)=\"$event.stopPropagation()\" (mouseenter)=\"imageMouseEnter()\" (mouseleave)=\"imageMouseLeave()\"\n (mousedown)=\"mouseDownHandler($event)\" (touchstart)=\"mouseDownHandler($event)\"\n [class.ngx-gallery-active]=\"!loading\" [class.animation]=\"animation\" [class.ngx-gallery-grab]=\"canDragOnZoom()\"\n [style.transform]=\"getTransform()\" [style.left]=\"positionLeft + 'px'\" [style.top]=\"positionTop + 'px'\">\n <source [src]=\"src\">\n Your browser does not support the video tag.\n </video>\n }\n @if (bullets) {\n <ngx-gallery-bullets [count]=\"images.length\" [active]=\"index\"\n (bulletChange)=\"showAtIndex($event)\"></ngx-gallery-bullets>\n }\n </div>\n @if (showDescription && description) {\n <div class=\"ngx-gallery-preview-text\" [innerHTML]=\"description\" (click)=\"$event.stopPropagation()\"></div>\n }\n</div>", styles: [":host.ngx-gallery-active{width:100%;height:100%;position:fixed;left:0;top:0;background:#000000b3;z-index:10000;display:inline-block;font-size:50px!important}:host{display:none;font-size:50px!important}:host .ngx-gallery-arrow{font-size:50px!important}ngx-gallery-bullets{height:5%;align-items:center;padding:0}.ngx-gallery-preview-img{opacity:0;max-width:90%;max-height:90%;-webkit-user-select:none;user-select:none;transition:transform .5s}.ngx-gallery-preview-img.animation{transition:opacity .5s linear,transform .5s}.ngx-gallery-preview-img.ngx-gallery-active{opacity:1}.ngx-gallery-preview-img.ngx-gallery-grab{cursor:grab}.ngx-gallery-icon.ngx-gallery-spinner{font-size:50px;left:0;display:inline-block}:host .ngx-gallery-preview-top{position:absolute;width:100%;-webkit-user-select:none;user-select:none;font-size:25px}.ngx-gallery-preview-icons{float:right}.ngx-gallery-preview-icons .ngx-gallery-icon{position:relative;margin-right:10px;margin-top:10px;font-size:25px;cursor:pointer;text-decoration:none}.ngx-gallery-preview-icons .ngx-gallery-icon.ngx-gallery-icon-disabled{cursor:default;opacity:.4}.ngx-spinner-wrapper{width:50px;height:50px;display:none}.ngx-spinner-wrapper.ngx-gallery-active{display:inline-block}.ngx-gallery-center{position:absolute;inset:0;margin:auto}.ngx-gallery-preview-text{width:100%;background:#000000b3;padding:10px;text-align:center;color:#fff;font-size:16px;flex:0 1 auto;z-index:10}.ngx-gallery-preview-wrapper{width:100%;height:100%;display:flex;flex-flow:column}.ngx-gallery-preview-img-wrapper{flex:1 1 auto;position:relative}\n"] }]
506
+ }], ctorParameters: () => [{ type: i1.DomSanitizer }, { type: i0.ElementRef }, { type: NgxGalleryService }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }], propDecorators: { images: [{
507
+ type: Input
508
+ }], descriptions: [{
509
+ type: Input
510
+ }], showDescription: [{
511
+ type: Input
512
+ }], arrows: [{
513
+ type: Input
514
+ }], arrowsAutoHide: [{
515
+ type: Input
516
+ }], swipe: [{
517
+ type: Input
518
+ }], fullscreen: [{
519
+ type: Input
520
+ }], forceFullscreen: [{
521
+ type: Input
522
+ }], closeOnClick: [{
523
+ type: Input
524
+ }], closeOnEsc: [{
525
+ type: Input
526
+ }], keyboardNavigation: [{
527
+ type: Input
528
+ }], arrowPrevIcon: [{
529
+ type: Input
530
+ }], arrowNextIcon: [{
531
+ type: Input
532
+ }], closeIcon: [{
533
+ type: Input
534
+ }], fullscreenIcon: [{
535
+ type: Input
536
+ }], spinnerIcon: [{
537
+ type: Input
538
+ }], autoPlay: [{
539
+ type: Input
540
+ }], autoPlayInterval: [{
541
+ type: Input
542
+ }], autoPlayPauseOnHover: [{
543
+ type: Input
544
+ }], infinityMove: [{
545
+ type: Input
546
+ }], zoom: [{
547
+ type: Input
548
+ }], zoomStep: [{
549
+ type: Input
550
+ }], zoomMax: [{
551
+ type: Input
552
+ }], zoomMin: [{
553
+ type: Input
554
+ }], zoomInIcon: [{
555
+ type: Input
556
+ }], zoomOutIcon: [{
557
+ type: Input
558
+ }], animation: [{
559
+ type: Input
560
+ }], actions: [{
561
+ type: Input
562
+ }], rotate: [{
563
+ type: Input
564
+ }], rotateLeftIcon: [{
565
+ type: Input
566
+ }], rotateRightIcon: [{
567
+ type: Input
568
+ }], download: [{
569
+ type: Input
570
+ }], downloadIcon: [{
571
+ type: Input
572
+ }], bullets: [{
573
+ type: Input
574
+ }], previewOpen: [{
575
+ type: Output
576
+ }], previewClose: [{
577
+ type: Output
578
+ }], activeChange: [{
579
+ type: Output
580
+ }], previewImage: [{
581
+ type: ViewChild,
582
+ args: ['previewImage']
583
+ }], onMouseEnter: [{
584
+ type: HostListener,
585
+ args: ['mouseenter']
586
+ }], onMouseLeave: [{
587
+ type: HostListener,
588
+ args: ['mouseleave']
589
+ }] } });
590
+
591
+ class NgxGalleryAnimation {
592
+ static { this.Fade = 'fade'; }
593
+ static { this.Slide = 'slide'; }
594
+ static { this.Rotate = 'rotate'; }
595
+ static { this.Zoom = 'zoom'; }
596
+ }
597
+
598
+ class NgxGalleryImageComponent {
599
+ set selectedIndex(index) {
600
+ if (index > this._selectedIndex) {
601
+ let action;
602
+ if (this.animation === NgxGalleryAnimation.Slide) {
603
+ action = 'slideRight';
604
+ }
605
+ else if (this.animation === NgxGalleryAnimation.Fade) {
606
+ action = 'fade';
607
+ }
608
+ else if (this.animation === NgxGalleryAnimation.Rotate) {
609
+ action = 'rotateRight';
610
+ }
611
+ else if (this.animation === NgxGalleryAnimation.Zoom) {
612
+ action = 'zoom';
613
+ }
614
+ this.setAction(action);
615
+ }
616
+ else if (index < this._selectedIndex) {
617
+ let action;
618
+ if (this.animation === NgxGalleryAnimation.Slide) {
619
+ action = 'slideLeft';
620
+ }
621
+ else if (this.animation === NgxGalleryAnimation.Fade) {
622
+ action = 'fade';
623
+ }
624
+ else if (this.animation === NgxGalleryAnimation.Rotate) {
625
+ action = 'rotateLeft';
626
+ }
627
+ else if (this.animation === NgxGalleryAnimation.Zoom) {
628
+ action = 'zoom';
629
+ }
630
+ this.setAction(action);
631
+ }
632
+ this._selectedIndex = index;
633
+ }
634
+ constructor(sanitization, changeDetectorRef, elementRef, helperService) {
635
+ this.sanitization = sanitization;
636
+ this.changeDetectorRef = changeDetectorRef;
637
+ this.elementRef = elementRef;
638
+ this.helperService = helperService;
639
+ this.imageClick = new EventEmitter();
640
+ this.activeChange = new EventEmitter();
641
+ this.animating = new EventEmitter();
642
+ this.canChangeImage = true;
643
+ this.isAnimating = false;
644
+ this.changeDetectorRef = changeDetectorRef;
645
+ this.action = 'none';
646
+ }
647
+ // @HostBinding('style.display') public display = 'inline-block';
648
+ // @HostBinding('style.background-color') public color = 'lime';
649
+ ngOnInit() {
650
+ if (this.arrows && this.arrowsAutoHide) {
651
+ this.arrows = false;
652
+ }
653
+ if (this.autoPlay) {
654
+ this.startAutoPlay();
655
+ }
656
+ }
657
+ ngOnChanges(changes) {
658
+ if (changes['swipe']) {
659
+ this.helperService.manageSwipe(this.swipe, this.elementRef, 'image', () => this.showNext(), () => this.showPrev());
660
+ }
661
+ }
662
+ onMouseEnter() {
663
+ if (this.arrowsAutoHide && !this.arrows) {
664
+ this.arrows = true;
665
+ }
666
+ if (this.autoPlay && this.autoPlayPauseOnHover) {
667
+ this.stopAutoPlay();
668
+ }
669
+ }
670
+ onMouseLeave() {
671
+ if (this.arrowsAutoHide && this.arrows) {
672
+ this.arrows = false;
673
+ }
674
+ if (this.autoPlay && this.autoPlayPauseOnHover) {
675
+ this.startAutoPlay();
676
+ }
677
+ }
678
+ reset(index) {
679
+ this._selectedIndex = index;
680
+ this.action = 'none';
681
+ }
682
+ getImages() {
683
+ if (!this.images) {
684
+ return [];
685
+ }
686
+ if (this.lazyLoading) {
687
+ const indexes = [this._selectedIndex];
688
+ const prevIndex = this._selectedIndex - 1;
689
+ if (prevIndex === -1 && this.infinityMove) {
690
+ indexes.push(this.images.length - 1);
691
+ }
692
+ else if (prevIndex >= 0) {
693
+ indexes.push(prevIndex);
694
+ }
695
+ const nextIndex = this._selectedIndex + 1;
696
+ if (nextIndex === this.images.length && this.infinityMove) {
697
+ indexes.push(0);
698
+ }
699
+ else if (nextIndex < this.images.length) {
700
+ indexes.push(nextIndex);
701
+ }
702
+ return this.images.filter((img, i) => indexes.indexOf(i) !== -1);
703
+ }
704
+ else {
705
+ return this.images;
706
+ }
707
+ }
708
+ startAutoPlay() {
709
+ this.stopAutoPlay();
710
+ this.timer = setInterval(() => {
711
+ if (!this.showNext()) {
712
+ this._selectedIndex = -1;
713
+ this.showNext();
714
+ }
715
+ }, this.autoPlayInterval);
716
+ }
717
+ stopAutoPlay() {
718
+ if (this.timer) {
719
+ clearInterval(this.timer);
720
+ }
721
+ }
722
+ handleClick(event, index) {
723
+ if (this.clickable) {
724
+ this.imageClick.emit(index);
725
+ event.stopPropagation();
726
+ event.preventDefault();
727
+ }
728
+ }
729
+ show(index) {
730
+ if (this.isAnimating) {
731
+ return;
732
+ }
733
+ if (index > this._selectedIndex) {
734
+ let action;
735
+ if (this.animation === NgxGalleryAnimation.Slide) {
736
+ action = 'slideRight';
737
+ }
738
+ else if (this.animation === NgxGalleryAnimation.Fade) {
739
+ action = 'fade';
740
+ }
741
+ else if (this.animation === NgxGalleryAnimation.Rotate) {
742
+ action = 'rotateRight';
743
+ }
744
+ else if (this.animation === NgxGalleryAnimation.Zoom) {
745
+ action = 'zoom';
746
+ }
747
+ this.setAction(action);
748
+ }
749
+ else {
750
+ let action;
751
+ if (this.animation === NgxGalleryAnimation.Slide) {
752
+ action = 'slideLeft';
753
+ }
754
+ else if (this.animation === NgxGalleryAnimation.Fade) {
755
+ action = 'fade';
756
+ }
757
+ else if (this.animation === NgxGalleryAnimation.Rotate) {
758
+ action = 'rotateLeft';
759
+ }
760
+ else if (this.animation === NgxGalleryAnimation.Zoom) {
761
+ action = 'zoom';
762
+ }
763
+ this.setAction(action);
764
+ }
765
+ this._selectedIndex = index;
766
+ this.activeChange.emit(this._selectedIndex);
767
+ this.setChangeTimeout();
768
+ }
769
+ setAction(action) {
770
+ this.action = action;
771
+ this.changeDetectorRef.detectChanges();
772
+ }
773
+ showNext() {
774
+ if (this.isAnimating) {
775
+ return false;
776
+ }
777
+ if (this.canShowNext() && this.canChangeImage) {
778
+ let action;
779
+ if (this.animation === NgxGalleryAnimation.Slide) {
780
+ action = 'slideRight';
781
+ }
782
+ else if (this.animation === NgxGalleryAnimation.Fade) {
783
+ action = 'fade';
784
+ }
785
+ else if (this.animation === NgxGalleryAnimation.Rotate) {
786
+ action = 'rotateRight';
787
+ }
788
+ else if (this.animation === NgxGalleryAnimation.Zoom) {
789
+ action = 'zoom';
790
+ }
791
+ this.setAction(action);
792
+ this._selectedIndex++;
793
+ if (this._selectedIndex === this.images.length) {
794
+ this._selectedIndex = 0;
795
+ }
796
+ this.activeChange.emit(this._selectedIndex);
797
+ this.setChangeTimeout();
798
+ return true;
799
+ }
800
+ else {
801
+ return false;
802
+ }
803
+ }
804
+ showPrev() {
805
+ if (this.isAnimating) {
806
+ return;
807
+ }
808
+ if (this.canShowPrev() && this.canChangeImage) {
809
+ let action;
810
+ if (this.animation === NgxGalleryAnimation.Slide) {
811
+ action = 'slideLeft';
812
+ }
813
+ else if (this.animation === NgxGalleryAnimation.Fade) {
814
+ action = 'fade';
815
+ }
816
+ else if (this.animation === NgxGalleryAnimation.Rotate) {
817
+ action = 'rotateLeft';
818
+ }
819
+ else if (this.animation === NgxGalleryAnimation.Zoom) {
820
+ action = 'zoom';
821
+ }
822
+ this.setAction(action);
823
+ this._selectedIndex--;
824
+ if (this._selectedIndex < 0) {
825
+ this._selectedIndex = this.images.length - 1;
826
+ }
827
+ this.activeChange.emit(this._selectedIndex);
828
+ this.setChangeTimeout();
829
+ }
830
+ }
831
+ setChangeTimeout() {
832
+ this.canChangeImage = false;
833
+ let timeout = 1000;
834
+ if (this.animation === NgxGalleryAnimation.Slide
835
+ || this.animation === NgxGalleryAnimation.Fade) {
836
+ timeout = 500;
837
+ }
838
+ setTimeout(() => {
839
+ this.canChangeImage = true;
840
+ }, timeout);
841
+ }
842
+ canShowNext() {
843
+ if (this.images) {
844
+ return this.infinityMove || this._selectedIndex < this.images.length - 1;
845
+ }
846
+ else {
847
+ return false;
848
+ }
849
+ }
850
+ canShowPrev() {
851
+ if (this.images) {
852
+ return this.infinityMove || this._selectedIndex > 0;
853
+ }
854
+ else {
855
+ return false;
856
+ }
857
+ }
858
+ getSafeUrl(image) {
859
+ return this.sanitization.bypassSecurityTrustStyle(this.helperService.getBackgroundUrl(image.toString()));
860
+ }
861
+ getFileType(fileSource) {
862
+ return this.helperService.getFileType(fileSource);
863
+ }
864
+ onStart(event) {
865
+ this.isAnimating = true;
866
+ this.animating.emit(true);
867
+ }
868
+ onDone(event) {
869
+ this.isAnimating = false;
870
+ this.animating.emit(false);
871
+ }
872
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryImageComponent, deps: [{ token: i1.DomSanitizer }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: NgxGalleryService }], target: i0.ɵɵFactoryTarget.Component }); }
873
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: NgxGalleryImageComponent, isStandalone: false, selector: "ngx-gallery-image", inputs: { images: "images", clickable: "clickable", selectedIndex: "selectedIndex", arrows: "arrows", arrowsAutoHide: "arrowsAutoHide", swipe: "swipe", animation: "animation", size: "size", arrowPrevIcon: "arrowPrevIcon", arrowNextIcon: "arrowNextIcon", autoPlay: "autoPlay", autoPlayInterval: "autoPlayInterval", autoPlayPauseOnHover: "autoPlayPauseOnHover", infinityMove: "infinityMove", lazyLoading: "lazyLoading", actions: "actions", descriptions: "descriptions", showDescription: "showDescription", bullets: "bullets" }, outputs: { imageClick: "imageClick", activeChange: "activeChange", animating: "animating" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"ngx-gallery-image-wrapper ngx-gallery-animation-{{animation}} ngx-gallery-image-size-{{size}}\">\n @for (image of getImages(); track image; let i = $index) {\n @if (image.type === 'image' && image.index === _selectedIndex) {\n <div class=\"ngx-gallery-image\" [ngClass]=\"{'ngx-gallery-clickable': clickable }\"\n [style.background-image]=\"getSafeUrl(image.src)\" (click)=\"handleClick($event, image.index)\" [@animation]=\"action\"\n (@animation.start)=\"onStart($event)\" (@animation.done)=\"onDone($event)\">\n <div class=\"ngx-gallery-icons-wrapper\">\n @for (action of actions; track action) {\n <ngx-gallery-action [icon]=\"action.icon\" [disabled]=\"action.disabled\" [titleText]=\"action.titleText\"\n (closeClick)=\"action.onClick($event, image.index)\"></ngx-gallery-action>\n }\n </div>\n @if (showDescription && descriptions[image.index]) {\n <div class=\"ngx-gallery-image-text\" [innerHTML]=\"descriptions[image.index]\" (click)=\"$event.stopPropagation()\">\n </div>\n }\n </div>\n }\n @if (image.type === 'video' && image.index === _selectedIndex) {\n <div class=\"ngx-gallery-image\" [ngClass]=\"{'ngx-gallery-clickable': clickable }\"\n [style.background-image]=\"getSafeUrl(image.src)\" (click)=\"handleClick($event, image.index)\" [@animation]=\"action\"\n (@animation.start)=\"onStart($event)\" (@animation.done)=\"onDone($event)\">\n <video controls style=\"width:100%; height:100%; background: #000;\">\n <source [src]=\"image.src\">\n Your browser does not support the video tag.\n </video>\n <div class=\"ngx-gallery-icons-wrapper\">\n @for (action of actions; track action) {\n <ngx-gallery-action [icon]=\"action.icon\" [disabled]=\"action.disabled\" [titleText]=\"action.titleText\"\n (closeClick)=\"action.onClick($event, image.index)\"></ngx-gallery-action>\n }\n </div>\n @if (showDescription && descriptions[image.index]) {\n <div class=\"ngx-gallery-image-text\" [innerHTML]=\"descriptions[image.index]\" (click)=\"$event.stopPropagation()\">\n </div>\n }\n </div>\n }\n }\n @if (bullets) {\n <ngx-gallery-bullets [count]=\"images.length\" [active]=\"_selectedIndex\"\n (bulletChange)=\"show($event)\"></ngx-gallery-bullets>\n }\n @if (arrows) {\n <ngx-gallery-arrows class=\"ngx-gallery-image-size-{{size}}\" (prevClick)=\"showPrev()\" (nextClick)=\"showNext()\"\n [prevDisabled]=\"!canShowPrev()\" [nextDisabled]=\"!canShowNext()\" [arrowPrevIcon]=\"arrowPrevIcon\"\n [arrowNextIcon]=\"arrowNextIcon\"></ngx-gallery-arrows>\n }\n</div>", styles: [":host{width:100%;display:inline-block;position:relative;font-size:25px}.ngx-gallery-image-wrapper{width:100%;height:100%;position:absolute;left:0;top:0;overflow:hidden}.ngx-gallery-image{background-position:center;background-repeat:no-repeat;height:100%;width:100%;position:absolute;top:0}.ngx-gallery-image-size-cover .ngx-gallery-image{background-size:cover}.ngx-gallery-image-size-contain .ngx-gallery-image{background-size:contain}.ngx-gallery-animation-fade .ngx-gallery-image{left:0;opacity:1;transition:.5s ease-in-out}.ngx-gallery-animation-fade .ngx-gallery-image.ngx-gallery-active{opacity:1}.ngx-gallery-animation-rotate .ngx-gallery-image{transition:1s ease;transform:scale(1) rotate(0);left:0;opacity:1}.ngx-gallery-animation-zoom .ngx-gallery-image{transition:1s ease;transform:scale(1);left:0;opacity:1}.ngx-gallery-image-text{width:100%;background:#000000b3;padding:10px;text-align:center;color:#fff;font-size:16px;position:absolute;bottom:0;z-index:10}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: NgxGalleryArrowsComponent, selector: "ngx-gallery-arrows", inputs: ["prevDisabled", "nextDisabled", "arrowPrevIcon", "arrowNextIcon"], outputs: ["prevClick", "nextClick"] }, { kind: "component", type: NgxGalleryActionComponent, selector: "ngx-gallery-action", inputs: ["icon", "disabled", "titleText"], outputs: ["closeClick"] }, { kind: "component", type: NgxGalleryBulletsComponent, selector: "ngx-gallery-bullets", inputs: ["count", "active"], outputs: ["bulletChange"] }], animations: [
874
+ trigger('animation', [
875
+ // ...
876
+ state('slideRight', style({})),
877
+ state('slideLeft', style({})),
878
+ state('fade', style({})),
879
+ state('rotateLeft', style({})),
880
+ state('rotateRight', style({})),
881
+ state('zoom', style({})),
882
+ transition('slideRight => void', [
883
+ animate('500ms ease-in-out', style({ transform: 'translateX(-100%)' }))
884
+ ]),
885
+ transition('void => slideRight', [
886
+ style({ transform: 'translateX(100%)' }),
887
+ animate('500ms ease-in-out', style({ transform: 'translateX(0)' }))
888
+ ]),
889
+ transition('slideLeft => void', [
890
+ animate('500ms ease-in-out', style({ transform: 'translateX(100%)' }))
891
+ ]),
892
+ transition('void => slideLeft', [
893
+ style({ transform: 'translateX(-100%)' }),
894
+ animate('500ms ease-in-out', style({ transform: 'translateX(0)' }))
895
+ ]),
896
+ transition('fade => void', [
897
+ animate('500ms ease-in-out', style({ opacity: '0' }))
898
+ ]),
899
+ transition('void => fade', [
900
+ style({ opacity: '0' }),
901
+ animate('500ms ease-in-out', style({ opacity: '1' }))
902
+ ]),
903
+ transition('rotateLeft => void', [
904
+ animate('500ms ease-in-out', style({ transform: 'scale(1, 1) rotate(-90deg)', opacity: '0' }))
905
+ ]),
906
+ transition('void => rotateLeft', [
907
+ style({ transform: 'scale(1, 1) rotate(-90deg)', opacity: '0' }),
908
+ animate('500ms ease-in-out', style({ transform: 'scale(1, 1) rotate(0deg)', opacity: '1' }))
909
+ ]),
910
+ transition('rotateRight => void', [
911
+ animate('500ms ease-in-out', style({ transform: 'scale(1, 1) rotate(90deg)', opacity: '0' }))
912
+ ]),
913
+ transition('void => rotateRight', [
914
+ style({ transform: 'scale(1, 1) rotate(90deg)', opacity: '0' }),
915
+ animate('500ms ease-in-out', style({ transform: 'scale(1, 1) rotate(0deg)', opacity: '1' }))
916
+ ]),
917
+ transition('zoom => void', [
918
+ animate('500ms ease-in-out', style({ transform: 'scale(2.5,2.5)', opacity: '0' }))
919
+ ]),
920
+ transition('void => zoom', [
921
+ style({ transform: 'scale(2.5,2.5)', opacity: '0' }),
922
+ animate('500ms ease-in-out', style({ transform: 'scale(1, 1)', opacity: '1' }))
923
+ ]),
924
+ ]),
925
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
926
+ }
927
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryImageComponent, decorators: [{
928
+ type: Component,
929
+ args: [{ selector: 'ngx-gallery-image', changeDetection: ChangeDetectionStrategy.OnPush, animations: [
930
+ trigger('animation', [
931
+ // ...
932
+ state('slideRight', style({})),
933
+ state('slideLeft', style({})),
934
+ state('fade', style({})),
935
+ state('rotateLeft', style({})),
936
+ state('rotateRight', style({})),
937
+ state('zoom', style({})),
938
+ transition('slideRight => void', [
939
+ animate('500ms ease-in-out', style({ transform: 'translateX(-100%)' }))
940
+ ]),
941
+ transition('void => slideRight', [
942
+ style({ transform: 'translateX(100%)' }),
943
+ animate('500ms ease-in-out', style({ transform: 'translateX(0)' }))
944
+ ]),
945
+ transition('slideLeft => void', [
946
+ animate('500ms ease-in-out', style({ transform: 'translateX(100%)' }))
947
+ ]),
948
+ transition('void => slideLeft', [
949
+ style({ transform: 'translateX(-100%)' }),
950
+ animate('500ms ease-in-out', style({ transform: 'translateX(0)' }))
951
+ ]),
952
+ transition('fade => void', [
953
+ animate('500ms ease-in-out', style({ opacity: '0' }))
954
+ ]),
955
+ transition('void => fade', [
956
+ style({ opacity: '0' }),
957
+ animate('500ms ease-in-out', style({ opacity: '1' }))
958
+ ]),
959
+ transition('rotateLeft => void', [
960
+ animate('500ms ease-in-out', style({ transform: 'scale(1, 1) rotate(-90deg)', opacity: '0' }))
961
+ ]),
962
+ transition('void => rotateLeft', [
963
+ style({ transform: 'scale(1, 1) rotate(-90deg)', opacity: '0' }),
964
+ animate('500ms ease-in-out', style({ transform: 'scale(1, 1) rotate(0deg)', opacity: '1' }))
965
+ ]),
966
+ transition('rotateRight => void', [
967
+ animate('500ms ease-in-out', style({ transform: 'scale(1, 1) rotate(90deg)', opacity: '0' }))
968
+ ]),
969
+ transition('void => rotateRight', [
970
+ style({ transform: 'scale(1, 1) rotate(90deg)', opacity: '0' }),
971
+ animate('500ms ease-in-out', style({ transform: 'scale(1, 1) rotate(0deg)', opacity: '1' }))
972
+ ]),
973
+ transition('zoom => void', [
974
+ animate('500ms ease-in-out', style({ transform: 'scale(2.5,2.5)', opacity: '0' }))
975
+ ]),
976
+ transition('void => zoom', [
977
+ style({ transform: 'scale(2.5,2.5)', opacity: '0' }),
978
+ animate('500ms ease-in-out', style({ transform: 'scale(1, 1)', opacity: '1' }))
979
+ ]),
980
+ ]),
981
+ ], standalone: false, template: "<div class=\"ngx-gallery-image-wrapper ngx-gallery-animation-{{animation}} ngx-gallery-image-size-{{size}}\">\n @for (image of getImages(); track image; let i = $index) {\n @if (image.type === 'image' && image.index === _selectedIndex) {\n <div class=\"ngx-gallery-image\" [ngClass]=\"{'ngx-gallery-clickable': clickable }\"\n [style.background-image]=\"getSafeUrl(image.src)\" (click)=\"handleClick($event, image.index)\" [@animation]=\"action\"\n (@animation.start)=\"onStart($event)\" (@animation.done)=\"onDone($event)\">\n <div class=\"ngx-gallery-icons-wrapper\">\n @for (action of actions; track action) {\n <ngx-gallery-action [icon]=\"action.icon\" [disabled]=\"action.disabled\" [titleText]=\"action.titleText\"\n (closeClick)=\"action.onClick($event, image.index)\"></ngx-gallery-action>\n }\n </div>\n @if (showDescription && descriptions[image.index]) {\n <div class=\"ngx-gallery-image-text\" [innerHTML]=\"descriptions[image.index]\" (click)=\"$event.stopPropagation()\">\n </div>\n }\n </div>\n }\n @if (image.type === 'video' && image.index === _selectedIndex) {\n <div class=\"ngx-gallery-image\" [ngClass]=\"{'ngx-gallery-clickable': clickable }\"\n [style.background-image]=\"getSafeUrl(image.src)\" (click)=\"handleClick($event, image.index)\" [@animation]=\"action\"\n (@animation.start)=\"onStart($event)\" (@animation.done)=\"onDone($event)\">\n <video controls style=\"width:100%; height:100%; background: #000;\">\n <source [src]=\"image.src\">\n Your browser does not support the video tag.\n </video>\n <div class=\"ngx-gallery-icons-wrapper\">\n @for (action of actions; track action) {\n <ngx-gallery-action [icon]=\"action.icon\" [disabled]=\"action.disabled\" [titleText]=\"action.titleText\"\n (closeClick)=\"action.onClick($event, image.index)\"></ngx-gallery-action>\n }\n </div>\n @if (showDescription && descriptions[image.index]) {\n <div class=\"ngx-gallery-image-text\" [innerHTML]=\"descriptions[image.index]\" (click)=\"$event.stopPropagation()\">\n </div>\n }\n </div>\n }\n }\n @if (bullets) {\n <ngx-gallery-bullets [count]=\"images.length\" [active]=\"_selectedIndex\"\n (bulletChange)=\"show($event)\"></ngx-gallery-bullets>\n }\n @if (arrows) {\n <ngx-gallery-arrows class=\"ngx-gallery-image-size-{{size}}\" (prevClick)=\"showPrev()\" (nextClick)=\"showNext()\"\n [prevDisabled]=\"!canShowPrev()\" [nextDisabled]=\"!canShowNext()\" [arrowPrevIcon]=\"arrowPrevIcon\"\n [arrowNextIcon]=\"arrowNextIcon\"></ngx-gallery-arrows>\n }\n</div>", styles: [":host{width:100%;display:inline-block;position:relative;font-size:25px}.ngx-gallery-image-wrapper{width:100%;height:100%;position:absolute;left:0;top:0;overflow:hidden}.ngx-gallery-image{background-position:center;background-repeat:no-repeat;height:100%;width:100%;position:absolute;top:0}.ngx-gallery-image-size-cover .ngx-gallery-image{background-size:cover}.ngx-gallery-image-size-contain .ngx-gallery-image{background-size:contain}.ngx-gallery-animation-fade .ngx-gallery-image{left:0;opacity:1;transition:.5s ease-in-out}.ngx-gallery-animation-fade .ngx-gallery-image.ngx-gallery-active{opacity:1}.ngx-gallery-animation-rotate .ngx-gallery-image{transition:1s ease;transform:scale(1) rotate(0);left:0;opacity:1}.ngx-gallery-animation-zoom .ngx-gallery-image{transition:1s ease;transform:scale(1);left:0;opacity:1}.ngx-gallery-image-text{width:100%;background:#000000b3;padding:10px;text-align:center;color:#fff;font-size:16px;position:absolute;bottom:0;z-index:10}\n"] }]
982
+ }], ctorParameters: () => [{ type: i1.DomSanitizer }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: NgxGalleryService }], propDecorators: { images: [{
983
+ type: Input
984
+ }], clickable: [{
985
+ type: Input
986
+ }], selectedIndex: [{
987
+ type: Input
988
+ }], arrows: [{
989
+ type: Input
990
+ }], arrowsAutoHide: [{
991
+ type: Input
992
+ }], swipe: [{
993
+ type: Input
994
+ }], animation: [{
995
+ type: Input
996
+ }], size: [{
997
+ type: Input
998
+ }], arrowPrevIcon: [{
999
+ type: Input
1000
+ }], arrowNextIcon: [{
1001
+ type: Input
1002
+ }], autoPlay: [{
1003
+ type: Input
1004
+ }], autoPlayInterval: [{
1005
+ type: Input
1006
+ }], autoPlayPauseOnHover: [{
1007
+ type: Input
1008
+ }], infinityMove: [{
1009
+ type: Input
1010
+ }], lazyLoading: [{
1011
+ type: Input
1012
+ }], actions: [{
1013
+ type: Input
1014
+ }], descriptions: [{
1015
+ type: Input
1016
+ }], showDescription: [{
1017
+ type: Input
1018
+ }], bullets: [{
1019
+ type: Input
1020
+ }], imageClick: [{
1021
+ type: Output
1022
+ }], activeChange: [{
1023
+ type: Output
1024
+ }], animating: [{
1025
+ type: Output
1026
+ }], onMouseEnter: [{
1027
+ type: HostListener,
1028
+ args: ['mouseenter']
1029
+ }], onMouseLeave: [{
1030
+ type: HostListener,
1031
+ args: ['mouseleave']
1032
+ }] } });
1033
+
1034
+ class NgxGalleryOrder {
1035
+ static { this.Column = 1; }
1036
+ static { this.Row = 2; }
1037
+ static { this.Page = 3; }
1038
+ }
1039
+
1040
+ class NgxGalleryThumbnailsComponent {
1041
+ constructor(sanitization, elementRef, helperService) {
1042
+ this.sanitization = sanitization;
1043
+ this.elementRef = elementRef;
1044
+ this.helperService = helperService;
1045
+ this.minStopIndex = 0;
1046
+ this.activeChange = new EventEmitter();
1047
+ this.index = 0;
1048
+ }
1049
+ ngOnChanges(changes) {
1050
+ if (changes['selectedIndex']) {
1051
+ this.validateIndex();
1052
+ }
1053
+ if (changes['swipe']) {
1054
+ this.helperService.manageSwipe(this.swipe, this.elementRef, 'thumbnails', () => this.moveRight(), () => this.moveLeft());
1055
+ }
1056
+ if (this.images) {
1057
+ this.remainingCountValue = this.images.length - (this.rows * this.columns);
1058
+ }
1059
+ }
1060
+ onMouseEnter() {
1061
+ this.mouseenter = true;
1062
+ }
1063
+ onMouseLeave() {
1064
+ this.mouseenter = false;
1065
+ }
1066
+ reset(index) {
1067
+ this.selectedIndex = index;
1068
+ this.setDefaultPosition();
1069
+ this.index = 0;
1070
+ this.validateIndex();
1071
+ }
1072
+ getImages() {
1073
+ if (!this.images) {
1074
+ return [];
1075
+ }
1076
+ if (this.remainingCount) {
1077
+ return this.images.slice(0, this.rows * this.columns);
1078
+ }
1079
+ else if (this.lazyLoading && this.order !== NgxGalleryOrder.Row) {
1080
+ let stopIndex = 0;
1081
+ if (this.order === NgxGalleryOrder.Column) {
1082
+ stopIndex = (this.index + this.columns + this.moveSize) * this.rows;
1083
+ }
1084
+ else if (this.order === NgxGalleryOrder.Page) {
1085
+ stopIndex = this.index + ((this.columns * this.rows) * 2);
1086
+ }
1087
+ if (stopIndex <= this.minStopIndex) {
1088
+ stopIndex = this.minStopIndex;
1089
+ }
1090
+ else {
1091
+ this.minStopIndex = stopIndex;
1092
+ }
1093
+ return this.images.slice(0, stopIndex);
1094
+ }
1095
+ else {
1096
+ return this.images;
1097
+ }
1098
+ }
1099
+ handleClick(event, index) {
1100
+ if (!this.hasLink(index) && !this.isAnimating) {
1101
+ this.selectedIndex = index;
1102
+ this.activeChange.emit(index);
1103
+ }
1104
+ event.stopPropagation();
1105
+ event.preventDefault();
1106
+ }
1107
+ hasLink(index) {
1108
+ return !!(this.links && this.links.length && this.links[index]);
1109
+ }
1110
+ moveRight() {
1111
+ if (this.canMoveRight()) {
1112
+ this.index += this.moveSize;
1113
+ const maxIndex = this.getMaxIndex() - this.columns;
1114
+ if (this.index > maxIndex) {
1115
+ this.index = maxIndex;
1116
+ }
1117
+ this.setThumbnailsPosition();
1118
+ }
1119
+ }
1120
+ moveLeft() {
1121
+ if (this.canMoveLeft()) {
1122
+ this.index -= this.moveSize;
1123
+ if (this.index < 0) {
1124
+ this.index = 0;
1125
+ }
1126
+ this.setThumbnailsPosition();
1127
+ }
1128
+ }
1129
+ canMoveRight() {
1130
+ return this.index + this.columns < this.getMaxIndex();
1131
+ }
1132
+ canMoveLeft() {
1133
+ return this.index !== 0;
1134
+ }
1135
+ getThumbnailLeft(index) {
1136
+ let calculatedIndex;
1137
+ if (this.order === NgxGalleryOrder.Column) {
1138
+ calculatedIndex = Math.floor(index / this.rows);
1139
+ }
1140
+ else if (this.order === NgxGalleryOrder.Page) {
1141
+ calculatedIndex = (index % this.columns) + (Math.floor(index / (this.rows * this.columns)) * this.columns);
1142
+ }
1143
+ else if (this.order === NgxGalleryOrder.Row && this.remainingCount) {
1144
+ calculatedIndex = index % this.columns;
1145
+ }
1146
+ else {
1147
+ calculatedIndex = index % Math.ceil(this.images.length / this.rows);
1148
+ }
1149
+ return this.getThumbnailPosition(calculatedIndex, this.columns);
1150
+ }
1151
+ getThumbnailTop(index) {
1152
+ let calculatedIndex;
1153
+ if (this.order === NgxGalleryOrder.Column) {
1154
+ calculatedIndex = index % this.rows;
1155
+ }
1156
+ else if (this.order === NgxGalleryOrder.Page) {
1157
+ calculatedIndex = Math.floor(index / this.columns) - (Math.floor(index / (this.rows * this.columns)) * this.rows);
1158
+ }
1159
+ else if (this.order === NgxGalleryOrder.Row && this.remainingCount) {
1160
+ calculatedIndex = Math.floor(index / this.columns);
1161
+ }
1162
+ else {
1163
+ calculatedIndex = Math.floor(index / Math.ceil(this.images.length / this.rows));
1164
+ }
1165
+ return this.getThumbnailPosition(calculatedIndex, this.rows);
1166
+ }
1167
+ getThumbnailWidth() {
1168
+ return this.getThumbnailDimension(this.columns);
1169
+ }
1170
+ getThumbnailHeight() {
1171
+ return this.getThumbnailDimension(this.rows);
1172
+ }
1173
+ setThumbnailsPosition() {
1174
+ this.thumbnailsLeft = -((100 / this.columns) * this.index) + '%';
1175
+ this.thumbnailsMarginLeft = -((this.margin - (((this.columns - 1)
1176
+ * this.margin) / this.columns)) * this.index) + 'px';
1177
+ }
1178
+ setDefaultPosition() {
1179
+ this.thumbnailsLeft = '0px';
1180
+ this.thumbnailsMarginLeft = '0px';
1181
+ }
1182
+ canShowArrows() {
1183
+ if (this.remainingCount) {
1184
+ return false;
1185
+ }
1186
+ else {
1187
+ return this.arrows && this.images && this.images.length > this.getVisibleCount()
1188
+ && (!this.arrowsAutoHide || this.mouseenter);
1189
+ }
1190
+ }
1191
+ validateIndex() {
1192
+ if (this.images) {
1193
+ let newIndex;
1194
+ if (this.order === NgxGalleryOrder.Column) {
1195
+ newIndex = Math.floor(this.selectedIndex / this.rows);
1196
+ }
1197
+ else {
1198
+ newIndex = this.selectedIndex % Math.ceil(this.images.length / this.rows);
1199
+ }
1200
+ if (this.remainingCount) {
1201
+ newIndex = 0;
1202
+ }
1203
+ if (newIndex < this.index || newIndex >= this.index + this.columns) {
1204
+ const maxIndex = this.getMaxIndex() - this.columns;
1205
+ this.index = newIndex > maxIndex ? maxIndex : newIndex;
1206
+ this.setThumbnailsPosition();
1207
+ }
1208
+ }
1209
+ }
1210
+ getSafeUrl(image) {
1211
+ return this.sanitization.bypassSecurityTrustStyle(this.helperService.getBackgroundUrl(image.toString()));
1212
+ }
1213
+ getFileType(fileSource) {
1214
+ return this.helperService.getFileType(fileSource.toString());
1215
+ }
1216
+ getThumbnailPosition(index, count) {
1217
+ return this.getSafeStyle('calc(' + ((100 / count) * index) + '% + '
1218
+ + ((this.margin - (((count - 1) * this.margin) / count)) * index) + 'px)');
1219
+ }
1220
+ getThumbnailDimension(count) {
1221
+ if (this.margin !== 0) {
1222
+ return this.getSafeStyle('calc(' + (100 / count) + '% - '
1223
+ + (((count - 1) * this.margin) / count) + 'px)');
1224
+ }
1225
+ else {
1226
+ return this.getSafeStyle('calc(' + (100 / count) + '% + 1px)');
1227
+ }
1228
+ }
1229
+ getMaxIndex() {
1230
+ if (this.order === NgxGalleryOrder.Page) {
1231
+ let maxIndex = (Math.floor(this.images.length / this.getVisibleCount()) * this.columns);
1232
+ if (this.images.length % this.getVisibleCount() > this.columns) {
1233
+ maxIndex += this.columns;
1234
+ }
1235
+ else {
1236
+ maxIndex += this.images.length % this.getVisibleCount();
1237
+ }
1238
+ return maxIndex;
1239
+ }
1240
+ else {
1241
+ return Math.ceil(this.images.length / this.rows);
1242
+ }
1243
+ }
1244
+ getVisibleCount() {
1245
+ return this.columns * this.rows;
1246
+ }
1247
+ getSafeStyle(value) {
1248
+ return this.sanitization.bypassSecurityTrustStyle(value);
1249
+ }
1250
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryThumbnailsComponent, deps: [{ token: i1.DomSanitizer }, { token: i0.ElementRef }, { token: NgxGalleryService }], target: i0.ɵɵFactoryTarget.Component }); }
1251
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: NgxGalleryThumbnailsComponent, isStandalone: false, selector: "ngx-gallery-thumbnails", inputs: { images: "images", isAnimating: "isAnimating", links: "links", labels: "labels", linkTarget: "linkTarget", columns: "columns", rows: "rows", arrows: "arrows", arrowsAutoHide: "arrowsAutoHide", margin: "margin", selectedIndex: "selectedIndex", clickable: "clickable", swipe: "swipe", size: "size", arrowPrevIcon: "arrowPrevIcon", arrowNextIcon: "arrowNextIcon", moveSize: "moveSize", order: "order", remainingCount: "remainingCount", lazyLoading: "lazyLoading", actions: "actions" }, outputs: { activeChange: "activeChange" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"ngx-gallery-thumbnails-wrapper ngx-gallery-thumbnail-size-{{size}}\">\n <div class=\"ngx-gallery-thumbnails\" [style.transform]=\"'translateX(' + thumbnailsLeft + ')'\"\n [style.marginLeft]=\"thumbnailsMarginLeft\">\n @for (image of getImages(); track image; let i = $index) {\n <a [href]=\"hasLink(i) ? links[i] : '#'\" [target]=\"linkTarget\" class=\"ngx-gallery-thumbnail\"\n (click)=\"handleClick($event, i)\" [style.width]=\"getThumbnailWidth()\" [style.height]=\"getThumbnailHeight()\"\n [style.left]=\"getThumbnailLeft(i)\" [style.top]=\"getThumbnailTop(i)\"\n [ngClass]=\"{ 'ngx-gallery-active': i === selectedIndex, 'ngx-gallery-clickable': clickable }\"\n [attr.aria-label]=\"labels[i]\">\n @if (getFileType(image) === 'image') {\n <div [style.background-image]=\"getSafeUrl(image)\" class=\"ngx-gallery-thumbnail\"\n [ngClass]=\"{ 'ngx-gallery-active': i === selectedIndex, 'ngx-gallery-clickable': clickable }\"\n style=\"width: 100%; height: 100%; position:absolute;\"></div>\n }\n @if (getFileType(image) === 'video') {\n <div class=\"ngx-gallery-thumbnail-video\">\n <video class=\"ngx-gallery-thumbnail\" [ngClass]=\"{ 'ngx-gallery-active': i === selectedIndex, 'ngx-gallery-clickable': clickable }\"\n style=\"width: 100%; height: 100%; position:absolute; left:0; background:#000;\">\n <source [src]=\"image\">\n Your browser does not support the video tag.\n </video>\n </div>\n }\n <div class=\"ngx-gallery-icons-wrapper\">\n @for (action of actions; track action) {\n <ngx-gallery-action [icon]=\"action.icon\" [disabled]=\"action.disabled\"\n [titleText]=\"action.titleText\" (closeClick)=\"action.onClick($event, i)\"></ngx-gallery-action>\n }\n </div>\n @if (remainingCount && remainingCountValue && (i === (rows * columns) - 1)) {\n <div class=\"ngx-gallery-remaining-count-overlay\"\n >\n <span class=\"ngx-gallery-remaining-count\">+{{remainingCountValue}}</span>\n </div>\n }\n </a>\n }\n </div>\n</div>\n@if (canShowArrows()) {\n <ngx-gallery-arrows (prevClick)=\"moveLeft()\" (nextClick)=\"moveRight()\"\n [prevDisabled]=\"!canMoveLeft()\" [nextDisabled]=\"!canMoveRight()\" [arrowPrevIcon]=\"arrowPrevIcon\"\n [arrowNextIcon]=\"arrowNextIcon\"></ngx-gallery-arrows>\n}\n", styles: ["@charset \"UTF-8\";:host{width:100%;display:inline-block;position:relative;font-size:25px}.ngx-gallery-thumbnails-wrapper{width:100%;height:100%;position:absolute;overflow:hidden}.ngx-gallery-thumbnails{height:100%;width:100%;position:absolute;left:0;transform:translate(0);transition:transform .5s ease-in-out;will-change:transform}.ngx-gallery-thumbnails .ngx-gallery-thumbnail{position:absolute;height:100%;background-position:center;background-repeat:no-repeat;text-decoration:none;border:1px double black}.ngx-gallery-thumbnails .ngx-gallery-thumbnail .ngx-gallery-thumbnail-video:after{content:\"\\f144\";display:block;position:absolute;background:#0000;height:100%;width:100%;left:0;top:calc(50% - 20px);font-size:40px;color:#fff;margin:0;padding:0;font-family:fontawesome;text-shadow:0px 4px 3px rgba(0,0,0,.4),0px 8px 13px rgba(0,0,0,.1),0px 18px 23px rgba(0,0,0,.1)}.ngx-gallery-thumbnails .ngx-gallery-thumbnail .img{background-size:cover;height:100%}.ngx-gallery-thumbnails .ngx-gallery-thumbnail.ngx-gallery-active{border:1px double #cc4548}.ngx-gallery-thumbnail-size-cover .ngx-gallery-thumbnails .ngx-gallery-thumbnail{background-size:cover}.ngx-gallery-thumbnail-size-contain .ngx-gallery-thumbnails .ngx-gallery-thumbnail{background-size:contain}.ngx-gallery-remaining-count-overlay{width:100%;height:100%;position:absolute;left:0;top:0;background-color:#0006}.ngx-gallery-remaining-count{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:30px}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: NgxGalleryArrowsComponent, selector: "ngx-gallery-arrows", inputs: ["prevDisabled", "nextDisabled", "arrowPrevIcon", "arrowNextIcon"], outputs: ["prevClick", "nextClick"] }, { kind: "component", type: NgxGalleryActionComponent, selector: "ngx-gallery-action", inputs: ["icon", "disabled", "titleText"], outputs: ["closeClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1252
+ }
1253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryThumbnailsComponent, decorators: [{
1254
+ type: Component,
1255
+ args: [{ selector: 'ngx-gallery-thumbnails', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"ngx-gallery-thumbnails-wrapper ngx-gallery-thumbnail-size-{{size}}\">\n <div class=\"ngx-gallery-thumbnails\" [style.transform]=\"'translateX(' + thumbnailsLeft + ')'\"\n [style.marginLeft]=\"thumbnailsMarginLeft\">\n @for (image of getImages(); track image; let i = $index) {\n <a [href]=\"hasLink(i) ? links[i] : '#'\" [target]=\"linkTarget\" class=\"ngx-gallery-thumbnail\"\n (click)=\"handleClick($event, i)\" [style.width]=\"getThumbnailWidth()\" [style.height]=\"getThumbnailHeight()\"\n [style.left]=\"getThumbnailLeft(i)\" [style.top]=\"getThumbnailTop(i)\"\n [ngClass]=\"{ 'ngx-gallery-active': i === selectedIndex, 'ngx-gallery-clickable': clickable }\"\n [attr.aria-label]=\"labels[i]\">\n @if (getFileType(image) === 'image') {\n <div [style.background-image]=\"getSafeUrl(image)\" class=\"ngx-gallery-thumbnail\"\n [ngClass]=\"{ 'ngx-gallery-active': i === selectedIndex, 'ngx-gallery-clickable': clickable }\"\n style=\"width: 100%; height: 100%; position:absolute;\"></div>\n }\n @if (getFileType(image) === 'video') {\n <div class=\"ngx-gallery-thumbnail-video\">\n <video class=\"ngx-gallery-thumbnail\" [ngClass]=\"{ 'ngx-gallery-active': i === selectedIndex, 'ngx-gallery-clickable': clickable }\"\n style=\"width: 100%; height: 100%; position:absolute; left:0; background:#000;\">\n <source [src]=\"image\">\n Your browser does not support the video tag.\n </video>\n </div>\n }\n <div class=\"ngx-gallery-icons-wrapper\">\n @for (action of actions; track action) {\n <ngx-gallery-action [icon]=\"action.icon\" [disabled]=\"action.disabled\"\n [titleText]=\"action.titleText\" (closeClick)=\"action.onClick($event, i)\"></ngx-gallery-action>\n }\n </div>\n @if (remainingCount && remainingCountValue && (i === (rows * columns) - 1)) {\n <div class=\"ngx-gallery-remaining-count-overlay\"\n >\n <span class=\"ngx-gallery-remaining-count\">+{{remainingCountValue}}</span>\n </div>\n }\n </a>\n }\n </div>\n</div>\n@if (canShowArrows()) {\n <ngx-gallery-arrows (prevClick)=\"moveLeft()\" (nextClick)=\"moveRight()\"\n [prevDisabled]=\"!canMoveLeft()\" [nextDisabled]=\"!canMoveRight()\" [arrowPrevIcon]=\"arrowPrevIcon\"\n [arrowNextIcon]=\"arrowNextIcon\"></ngx-gallery-arrows>\n}\n", styles: ["@charset \"UTF-8\";:host{width:100%;display:inline-block;position:relative;font-size:25px}.ngx-gallery-thumbnails-wrapper{width:100%;height:100%;position:absolute;overflow:hidden}.ngx-gallery-thumbnails{height:100%;width:100%;position:absolute;left:0;transform:translate(0);transition:transform .5s ease-in-out;will-change:transform}.ngx-gallery-thumbnails .ngx-gallery-thumbnail{position:absolute;height:100%;background-position:center;background-repeat:no-repeat;text-decoration:none;border:1px double black}.ngx-gallery-thumbnails .ngx-gallery-thumbnail .ngx-gallery-thumbnail-video:after{content:\"\\f144\";display:block;position:absolute;background:#0000;height:100%;width:100%;left:0;top:calc(50% - 20px);font-size:40px;color:#fff;margin:0;padding:0;font-family:fontawesome;text-shadow:0px 4px 3px rgba(0,0,0,.4),0px 8px 13px rgba(0,0,0,.1),0px 18px 23px rgba(0,0,0,.1)}.ngx-gallery-thumbnails .ngx-gallery-thumbnail .img{background-size:cover;height:100%}.ngx-gallery-thumbnails .ngx-gallery-thumbnail.ngx-gallery-active{border:1px double #cc4548}.ngx-gallery-thumbnail-size-cover .ngx-gallery-thumbnails .ngx-gallery-thumbnail{background-size:cover}.ngx-gallery-thumbnail-size-contain .ngx-gallery-thumbnails .ngx-gallery-thumbnail{background-size:contain}.ngx-gallery-remaining-count-overlay{width:100%;height:100%;position:absolute;left:0;top:0;background-color:#0006}.ngx-gallery-remaining-count{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:30px}\n"] }]
1256
+ }], ctorParameters: () => [{ type: i1.DomSanitizer }, { type: i0.ElementRef }, { type: NgxGalleryService }], propDecorators: { images: [{
1257
+ type: Input
1258
+ }], isAnimating: [{
1259
+ type: Input
1260
+ }], links: [{
1261
+ type: Input
1262
+ }], labels: [{
1263
+ type: Input
1264
+ }], linkTarget: [{
1265
+ type: Input
1266
+ }], columns: [{
1267
+ type: Input
1268
+ }], rows: [{
1269
+ type: Input
1270
+ }], arrows: [{
1271
+ type: Input
1272
+ }], arrowsAutoHide: [{
1273
+ type: Input
1274
+ }], margin: [{
1275
+ type: Input
1276
+ }], selectedIndex: [{
1277
+ type: Input
1278
+ }], clickable: [{
1279
+ type: Input
1280
+ }], swipe: [{
1281
+ type: Input
1282
+ }], size: [{
1283
+ type: Input
1284
+ }], arrowPrevIcon: [{
1285
+ type: Input
1286
+ }], arrowNextIcon: [{
1287
+ type: Input
1288
+ }], moveSize: [{
1289
+ type: Input
1290
+ }], order: [{
1291
+ type: Input
1292
+ }], remainingCount: [{
1293
+ type: Input
1294
+ }], lazyLoading: [{
1295
+ type: Input
1296
+ }], actions: [{
1297
+ type: Input
1298
+ }], activeChange: [{
1299
+ type: Output
1300
+ }], onMouseEnter: [{
1301
+ type: HostListener,
1302
+ args: ['mouseenter']
1303
+ }], onMouseLeave: [{
1304
+ type: HostListener,
1305
+ args: ['mouseleave']
1306
+ }] } });
1307
+
1308
+ class NgxGalleryAction {
1309
+ constructor(action) {
1310
+ this.icon = action.icon;
1311
+ this.disabled = action.disabled ? action.disabled : false;
1312
+ this.titleText = action.titleText ? action.titleText : '';
1313
+ this.onClick = action.onClick;
1314
+ }
1315
+ }
1316
+
1317
+ class NgxGalleryLayout {
1318
+ static { this.ThumbnailsTop = 'thumbnails-top'; }
1319
+ static { this.ThumbnailsBottom = 'thumbnails-bottom'; }
1320
+ }
1321
+
1322
+ class NgxGalleryImageSize {
1323
+ static { this.Cover = 'cover'; }
1324
+ static { this.Contain = 'contain'; }
1325
+ }
1326
+
1327
+ class NgxGalleryOptions {
1328
+ constructor(obj) {
1329
+ const preventDefaults = obj.breakpoint === undefined ? false : true;
1330
+ function use(source, defaultValue) {
1331
+ return obj && (source !== undefined || preventDefaults) ? source : defaultValue;
1332
+ }
1333
+ this.breakpoint = use(obj.breakpoint, undefined);
1334
+ this.width = use(obj.width, '500px');
1335
+ this.height = use(obj.height, '400px');
1336
+ this.fullWidth = use(obj.fullWidth, false);
1337
+ this.layout = use(obj.layout, NgxGalleryLayout.ThumbnailsBottom);
1338
+ this.startIndex = use(obj.startIndex, 0);
1339
+ this.linkTarget = use(obj.linkTarget, '_blank');
1340
+ this.lazyLoading = use(obj.lazyLoading, true);
1341
+ this.image = use(obj.image, true);
1342
+ this.imagePercent = use(obj.imagePercent, 75);
1343
+ this.imageArrows = use(obj.imageArrows, true);
1344
+ this.imageArrowsAutoHide = use(obj.imageArrowsAutoHide, false);
1345
+ this.imageSwipe = use(obj.imageSwipe, false);
1346
+ this.imageAnimation = use(obj.imageAnimation, NgxGalleryAnimation.Fade);
1347
+ this.imageSize = use(obj.imageSize, NgxGalleryImageSize.Cover);
1348
+ this.imageAutoPlay = use(obj.imageAutoPlay, false);
1349
+ this.imageAutoPlayInterval = use(obj.imageAutoPlayInterval, 2000);
1350
+ this.imageAutoPlayPauseOnHover = use(obj.imageAutoPlayPauseOnHover, false);
1351
+ this.imageInfinityMove = use(obj.imageInfinityMove, false);
1352
+ if (obj && obj.imageActions && obj.imageActions.length) {
1353
+ obj.imageActions = obj.imageActions.map(action => new NgxGalleryAction(action));
1354
+ }
1355
+ this.imageActions = use(obj.imageActions, []);
1356
+ this.imageDescription = use(obj.imageDescription, false);
1357
+ this.imageBullets = use(obj.imageBullets, false);
1358
+ this.thumbnails = use(obj.thumbnails, true);
1359
+ this.thumbnailsColumns = use(obj.thumbnailsColumns, 4);
1360
+ this.thumbnailsRows = use(obj.thumbnailsRows, 1);
1361
+ this.thumbnailsPercent = use(obj.thumbnailsPercent, 25);
1362
+ this.thumbnailsMargin = use(obj.thumbnailsMargin, 10);
1363
+ this.thumbnailsArrows = use(obj.thumbnailsArrows, true);
1364
+ this.thumbnailsArrowsAutoHide = use(obj.thumbnailsArrowsAutoHide, false);
1365
+ this.thumbnailsSwipe = use(obj.thumbnailsSwipe, false);
1366
+ this.thumbnailsMoveSize = use(obj.thumbnailsMoveSize, 1);
1367
+ this.thumbnailsOrder = use(obj.thumbnailsOrder, NgxGalleryOrder.Column);
1368
+ this.thumbnailsRemainingCount = use(obj.thumbnailsRemainingCount, false);
1369
+ this.thumbnailsAsLinks = use(obj.thumbnailsAsLinks, false);
1370
+ this.thumbnailsAutoHide = use(obj.thumbnailsAutoHide, false);
1371
+ this.thumbnailMargin = use(obj.thumbnailMargin, 10);
1372
+ this.thumbnailSize = use(obj.thumbnailSize, NgxGalleryImageSize.Cover);
1373
+ if (obj && obj.thumbnailActions && obj.thumbnailActions.length) {
1374
+ obj.thumbnailActions = obj.thumbnailActions.map(action => new NgxGalleryAction(action));
1375
+ }
1376
+ this.thumbnailActions = use(obj.thumbnailActions, []);
1377
+ this.thumbnailClasses = use(obj.thumbnailClasses, []);
1378
+ this.preview = use(obj.preview, true);
1379
+ this.previewDescription = use(obj.previewDescription, true);
1380
+ this.previewArrows = use(obj.previewArrows, true);
1381
+ this.previewArrowsAutoHide = use(obj.previewArrowsAutoHide, false);
1382
+ this.previewSwipe = use(obj.previewSwipe, false);
1383
+ this.previewFullscreen = use(obj.previewFullscreen, false);
1384
+ this.previewForceFullscreen = use(obj.previewForceFullscreen, false);
1385
+ this.previewCloseOnClick = use(obj.previewCloseOnClick, false);
1386
+ this.previewCloseOnEsc = use(obj.previewCloseOnEsc, false);
1387
+ this.previewKeyboardNavigation = use(obj.previewKeyboardNavigation, false);
1388
+ this.previewAnimation = use(obj.previewAnimation, true);
1389
+ this.previewAutoPlay = use(obj.previewAutoPlay, false);
1390
+ this.previewAutoPlayInterval = use(obj.previewAutoPlayInterval, 2000);
1391
+ this.previewAutoPlayPauseOnHover = use(obj.previewAutoPlayPauseOnHover, false);
1392
+ this.previewInfinityMove = use(obj.previewInfinityMove, false);
1393
+ this.previewZoom = use(obj.previewZoom, false);
1394
+ this.previewZoomStep = use(obj.previewZoomStep, 0.1);
1395
+ this.previewZoomMax = use(obj.previewZoomMax, 2);
1396
+ this.previewZoomMin = use(obj.previewZoomMin, 0.5);
1397
+ this.previewRotate = use(obj.previewRotate, false);
1398
+ this.previewDownload = use(obj.previewDownload, false);
1399
+ this.previewCustom = use(obj.previewCustom, undefined);
1400
+ this.previewBullets = use(obj.previewBullets, false);
1401
+ this.arrowPrevIcon = use(obj.arrowPrevIcon, 'fa fa-arrow-circle-left');
1402
+ this.arrowNextIcon = use(obj.arrowNextIcon, 'fa fa-arrow-circle-right');
1403
+ this.closeIcon = use(obj.closeIcon, 'fa fa-times-circle');
1404
+ this.fullscreenIcon = use(obj.fullscreenIcon, 'fa fa-arrows-alt');
1405
+ this.spinnerIcon = use(obj.spinnerIcon, 'fa fa-spinner fa-pulse fa-3x fa-fw');
1406
+ this.zoomInIcon = use(obj.zoomInIcon, 'fa fa-search-plus');
1407
+ this.zoomOutIcon = use(obj.zoomOutIcon, 'fa fa-search-minus');
1408
+ this.rotateLeftIcon = use(obj.rotateLeftIcon, 'fa fa-undo');
1409
+ this.rotateRightIcon = use(obj.rotateRightIcon, 'fa fa-repeat');
1410
+ this.downloadIcon = use(obj.downloadIcon, 'fa fa-arrow-circle-down');
1411
+ if (obj && obj.actions && obj.actions.length) {
1412
+ obj.actions = obj.actions.map(action => new NgxGalleryAction(action));
1413
+ }
1414
+ this.actions = use(obj.actions, []);
1415
+ }
1416
+ }
1417
+
1418
+ class NgxGalleryOrderedImage {
1419
+ constructor(obj) {
1420
+ this.src = obj.src;
1421
+ this.type = obj.type;
1422
+ this.index = obj.index;
1423
+ }
1424
+ }
1425
+
1426
+ class NgxGalleryComponent {
1427
+ constructor(myElement, helperService) {
1428
+ this.myElement = myElement;
1429
+ this.helperService = helperService;
1430
+ this.options = [{}];
1431
+ this.imagesReady = new EventEmitter();
1432
+ // eslint-disable-next-line @angular-eslint/no-output-native
1433
+ this.change = new EventEmitter();
1434
+ this.previewOpen = new EventEmitter();
1435
+ this.previewClose = new EventEmitter();
1436
+ this.previewChange = new EventEmitter();
1437
+ this.oldImagesLength = 0;
1438
+ this.selectedIndex = 0;
1439
+ this.breakpoint = undefined;
1440
+ this.prevBreakpoint = undefined;
1441
+ }
1442
+ ngOnInit() {
1443
+ this.options = this.options.map((opt) => new NgxGalleryOptions(opt));
1444
+ this.sortOptions();
1445
+ this.setBreakpoint();
1446
+ this.setOptions();
1447
+ this.checkFullWidth();
1448
+ if (this.currentOptions) {
1449
+ this.selectedIndex = this.currentOptions.startIndex;
1450
+ }
1451
+ }
1452
+ ngDoCheck() {
1453
+ if (this.images !== undefined && (this.images.length !== this.oldImagesLength)
1454
+ || (this.images !== this.oldImages)) {
1455
+ this.oldImagesLength = this.images.length;
1456
+ this.oldImages = this.images;
1457
+ this.setOptions();
1458
+ this.setImages();
1459
+ if (this.images && this.images.length) {
1460
+ this.imagesReady.emit();
1461
+ }
1462
+ if (this.image) {
1463
+ this.image.reset(this.currentOptions.startIndex);
1464
+ }
1465
+ if (this.currentOptions.thumbnailsAutoHide && this.currentOptions.thumbnails
1466
+ && this.images.length <= 1) {
1467
+ this.currentOptions.thumbnails = false;
1468
+ this.currentOptions.imageArrows = false;
1469
+ }
1470
+ this.resetThumbnails();
1471
+ }
1472
+ }
1473
+ ngAfterViewInit() {
1474
+ this.checkFullWidth();
1475
+ }
1476
+ onResize() {
1477
+ this.setBreakpoint();
1478
+ if (this.prevBreakpoint !== this.breakpoint) {
1479
+ this.setOptions();
1480
+ this.resetThumbnails();
1481
+ }
1482
+ if (this.currentOptions && this.currentOptions.fullWidth) {
1483
+ if (this.fullWidthTimeout) {
1484
+ clearTimeout(this.fullWidthTimeout);
1485
+ }
1486
+ this.fullWidthTimeout = setTimeout(() => {
1487
+ this.checkFullWidth();
1488
+ }, 200);
1489
+ }
1490
+ }
1491
+ getImageHeight() {
1492
+ return (this.currentOptions && this.currentOptions.thumbnails) ?
1493
+ this.currentOptions.imagePercent + '%' : '100%';
1494
+ }
1495
+ getThumbnailsHeight() {
1496
+ if (this.currentOptions && this.currentOptions.image) {
1497
+ return 'calc(' + this.currentOptions.thumbnailsPercent + '% - '
1498
+ + this.currentOptions.thumbnailsMargin + 'px)';
1499
+ }
1500
+ else {
1501
+ return '100%';
1502
+ }
1503
+ }
1504
+ getThumbnailsMarginTop() {
1505
+ if (this.currentOptions && this.currentOptions.layout === NgxGalleryLayout.ThumbnailsBottom) {
1506
+ return this.currentOptions.thumbnailsMargin + 'px';
1507
+ }
1508
+ else {
1509
+ return '0px';
1510
+ }
1511
+ }
1512
+ getThumbnailsMarginBottom() {
1513
+ if (this.currentOptions && this.currentOptions.layout === NgxGalleryLayout.ThumbnailsTop) {
1514
+ return this.currentOptions.thumbnailsMargin + 'px';
1515
+ }
1516
+ else {
1517
+ return '0px';
1518
+ }
1519
+ }
1520
+ openPreview(index) {
1521
+ if (this.currentOptions.previewCustom) {
1522
+ this.currentOptions.previewCustom(index);
1523
+ }
1524
+ else {
1525
+ this.previewEnabled = true;
1526
+ this.preview.open(index);
1527
+ }
1528
+ }
1529
+ onPreviewOpen() {
1530
+ this.previewOpen.emit();
1531
+ if (this.image && this.image.autoPlay) {
1532
+ this.image.stopAutoPlay();
1533
+ }
1534
+ }
1535
+ onPreviewClose() {
1536
+ this.previewEnabled = false;
1537
+ this.previewClose.emit();
1538
+ if (this.image && this.image.autoPlay) {
1539
+ this.image.startAutoPlay();
1540
+ }
1541
+ }
1542
+ selectFromImage(index) {
1543
+ this.select(index);
1544
+ }
1545
+ selectFromThumbnails(index) {
1546
+ this.select(index);
1547
+ if (this.currentOptions && this.currentOptions.thumbnails && this.currentOptions.preview
1548
+ && (!this.currentOptions.image || this.currentOptions.thumbnailsRemainingCount)) {
1549
+ this.openPreview(this.selectedIndex);
1550
+ }
1551
+ }
1552
+ show(index) {
1553
+ this.select(index);
1554
+ }
1555
+ showNext() {
1556
+ this.image.showNext();
1557
+ }
1558
+ showPrev() {
1559
+ this.image.showPrev();
1560
+ }
1561
+ canShowNext() {
1562
+ if (this.images && this.currentOptions) {
1563
+ return !!(this.currentOptions.imageInfinityMove || this.selectedIndex < this.images.length - 1);
1564
+ }
1565
+ else {
1566
+ return false;
1567
+ }
1568
+ }
1569
+ canShowPrev() {
1570
+ if (this.images && this.currentOptions) {
1571
+ return !!(this.currentOptions.imageInfinityMove || this.selectedIndex > 0);
1572
+ }
1573
+ else {
1574
+ return false;
1575
+ }
1576
+ }
1577
+ previewSelect(index) {
1578
+ this.previewChange.emit({ index, image: this.images[index] });
1579
+ }
1580
+ moveThumbnailsRight() {
1581
+ this.thumbnails.moveRight();
1582
+ }
1583
+ moveThumbnailsLeft() {
1584
+ this.thumbnails.moveLeft();
1585
+ }
1586
+ canMoveThumbnailsRight() {
1587
+ return this.thumbnails.canMoveRight();
1588
+ }
1589
+ canMoveThumbnailsLeft() {
1590
+ return this.thumbnails.canMoveLeft();
1591
+ }
1592
+ resetThumbnails() {
1593
+ if (this.thumbnails) {
1594
+ this.thumbnails.reset(this.currentOptions.startIndex);
1595
+ }
1596
+ }
1597
+ select(index) {
1598
+ this.selectedIndex = index;
1599
+ this.change.emit({
1600
+ index,
1601
+ image: this.images[index]
1602
+ });
1603
+ }
1604
+ checkFullWidth() {
1605
+ if (this.currentOptions && this.currentOptions.fullWidth) {
1606
+ this.width = document.body.clientWidth + 'px';
1607
+ this.left = 'translateX(' + (-(document.body.clientWidth -
1608
+ this.myElement.nativeElement.parentNode.innerWidth) / 2) + 'px)';
1609
+ }
1610
+ }
1611
+ setImages() {
1612
+ this.images.forEach((img) => img.type = this.helperService.getFileType(img.url || img.big || img.medium || img.small || ''));
1613
+ this.smallImages = this.images.map((img) => img.small);
1614
+ this.mediumImages = this.images.map((img, i) => new NgxGalleryOrderedImage({
1615
+ src: img.medium,
1616
+ type: img.type,
1617
+ index: i
1618
+ }));
1619
+ this.bigImages = this.images.map((img) => img.big);
1620
+ this.descriptions = this.images.map((img) => img.description);
1621
+ this.links = this.images.map((img) => img.url);
1622
+ this.labels = this.images.map((img) => img.label);
1623
+ }
1624
+ setBreakpoint() {
1625
+ this.prevBreakpoint = this.breakpoint;
1626
+ let breakpoints;
1627
+ if (typeof window !== 'undefined') {
1628
+ breakpoints = this.options.filter((opt) => opt.breakpoint >= window.innerWidth)
1629
+ .map((opt) => opt.breakpoint);
1630
+ }
1631
+ if (breakpoints && breakpoints.length) {
1632
+ this.breakpoint = breakpoints.pop();
1633
+ }
1634
+ else {
1635
+ this.breakpoint = undefined;
1636
+ }
1637
+ }
1638
+ sortOptions() {
1639
+ this.options = [
1640
+ ...this.options.filter((a) => a.breakpoint === undefined),
1641
+ ...this.options
1642
+ .filter((a) => a.breakpoint !== undefined)
1643
+ .sort((a, b) => b.breakpoint - a.breakpoint)
1644
+ ];
1645
+ }
1646
+ setOptions() {
1647
+ this.currentOptions = new NgxGalleryOptions({});
1648
+ this.options
1649
+ .filter((opt) => opt.breakpoint === undefined || opt.breakpoint >= this.breakpoint)
1650
+ .map((opt) => this.combineOptions(this.currentOptions, opt));
1651
+ this.width = this.currentOptions.width;
1652
+ this.height = this.currentOptions.height;
1653
+ }
1654
+ combineOptions(first, second) {
1655
+ Object.keys(second).map((val) => first[val] = second[val] !== undefined ? second[val] : first[val]);
1656
+ }
1657
+ setAnimating(event) {
1658
+ this.isAnimating = event;
1659
+ }
1660
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryComponent, deps: [{ token: i0.ElementRef }, { token: NgxGalleryService }], target: i0.ɵɵFactoryTarget.Component }); }
1661
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: NgxGalleryComponent, isStandalone: false, selector: "ngx-gallery", inputs: { options: "options", images: "images" }, outputs: { imagesReady: "imagesReady", change: "change", previewOpen: "previewOpen", previewClose: "previewClose", previewChange: "previewChange" }, host: { listeners: { "window:resize": "onResize()" }, properties: { "style.width": "this.width", "style.height": "this.height", "style.transform": "this.left" } }, providers: [NgxGalleryService], viewQueries: [{ propertyName: "preview", first: true, predicate: NgxGalleryPreviewComponent, descendants: true }, { propertyName: "image", first: true, predicate: NgxGalleryImageComponent, descendants: true }, { propertyName: "thumbnails", first: true, predicate: NgxGalleryThumbnailsComponent, descendants: true }], ngImport: i0, template: "<div class=\"ngx-gallery-layout {{currentOptions?.layout}}\">\n @if (currentOptions?.image) {\n <ngx-gallery-image [style.height]=\"getImageHeight()\" [images]=\"mediumImages\" [clickable]=\"currentOptions?.preview\"\n [selectedIndex]=\"selectedIndex\" [arrows]=\"currentOptions?.imageArrows\"\n [arrowsAutoHide]=\"currentOptions?.imageArrowsAutoHide\" [arrowPrevIcon]=\"currentOptions?.arrowPrevIcon\"\n [arrowNextIcon]=\"currentOptions?.arrowNextIcon\" [swipe]=\"currentOptions?.imageSwipe\"\n [animation]=\"currentOptions?.imageAnimation\" [size]=\"currentOptions?.imageSize\"\n [autoPlay]=\"currentOptions?.imageAutoPlay\" [autoPlayInterval]=\"currentOptions?.imageAutoPlayInterval\"\n [autoPlayPauseOnHover]=\"currentOptions?.imageAutoPlayPauseOnHover\"\n [infinityMove]=\"currentOptions?.imageInfinityMove\" [lazyLoading]=\"currentOptions?.lazyLoading\"\n [actions]=\"currentOptions?.imageActions\" [descriptions]=\"descriptions\"\n [showDescription]=\"currentOptions?.imageDescription\" [bullets]=\"currentOptions?.imageBullets\"\n (imageClick)=\"openPreview($event)\" (activeChange)=\"selectFromImage($event)\"\n (animating)=\"setAnimating($event)\"></ngx-gallery-image>\n }\n\n @if (currentOptions?.thumbnails) {\n <ngx-gallery-thumbnails [style.marginTop]=\"getThumbnailsMarginTop()\"\n [style.marginBottom]=\"getThumbnailsMarginBottom()\" [style.height]=\"getThumbnailsHeight()\" [images]=\"smallImages\"\n [isAnimating]=\"isAnimating\" [links]=\"currentOptions?.thumbnailsAsLinks ? links : []\" [labels]=\"labels\"\n [linkTarget]=\"currentOptions?.linkTarget\" [selectedIndex]=\"selectedIndex\"\n [columns]=\"currentOptions?.thumbnailsColumns\" [rows]=\"currentOptions?.thumbnailsRows\"\n [margin]=\"currentOptions?.thumbnailMargin\" [arrows]=\"currentOptions?.thumbnailsArrows\"\n [arrowsAutoHide]=\"currentOptions?.thumbnailsArrowsAutoHide\" [arrowPrevIcon]=\"currentOptions?.arrowPrevIcon\"\n [arrowNextIcon]=\"currentOptions?.arrowNextIcon\" [clickable]=\"currentOptions?.image || currentOptions?.preview\"\n [swipe]=\"currentOptions?.thumbnailsSwipe\" [size]=\"currentOptions?.thumbnailSize\"\n [moveSize]=\"currentOptions?.thumbnailsMoveSize\" [order]=\"currentOptions?.thumbnailsOrder\"\n [remainingCount]=\"currentOptions?.thumbnailsRemainingCount\" [lazyLoading]=\"currentOptions?.lazyLoading\"\n [actions]=\"currentOptions?.thumbnailActions\" (activeChange)=\"selectFromThumbnails($event)\"\n [ngClass]=\"currentOptions?.thumbnailClasses\"></ngx-gallery-thumbnails>\n }\n\n <ngx-gallery-preview [images]=\"bigImages\" [descriptions]=\"descriptions\"\n [showDescription]=\"currentOptions?.previewDescription\" [arrowPrevIcon]=\"currentOptions?.arrowPrevIcon\"\n [arrowNextIcon]=\"currentOptions?.arrowNextIcon\" [closeIcon]=\"currentOptions?.closeIcon\"\n [fullscreenIcon]=\"currentOptions?.fullscreenIcon\" [spinnerIcon]=\"currentOptions?.spinnerIcon\"\n [arrows]=\"currentOptions?.previewArrows\" [arrowsAutoHide]=\"currentOptions?.previewArrowsAutoHide\"\n [swipe]=\"currentOptions?.previewSwipe\" [fullscreen]=\"currentOptions?.previewFullscreen\"\n [forceFullscreen]=\"currentOptions?.previewForceFullscreen\" [closeOnClick]=\"currentOptions?.previewCloseOnClick\"\n [closeOnEsc]=\"currentOptions?.previewCloseOnEsc\" [keyboardNavigation]=\"currentOptions?.previewKeyboardNavigation\"\n [animation]=\"currentOptions?.previewAnimation\" [autoPlay]=\"currentOptions?.previewAutoPlay\"\n [autoPlayInterval]=\"currentOptions?.previewAutoPlayInterval\"\n [autoPlayPauseOnHover]=\"currentOptions?.previewAutoPlayPauseOnHover\"\n [infinityMove]=\"currentOptions?.previewInfinityMove\" [zoom]=\"currentOptions?.previewZoom\"\n [zoomStep]=\"currentOptions?.previewZoomStep\" [zoomMax]=\"currentOptions?.previewZoomMax\"\n [zoomMin]=\"currentOptions?.previewZoomMin\" [zoomInIcon]=\"currentOptions?.zoomInIcon\"\n [zoomOutIcon]=\"currentOptions?.zoomOutIcon\" [actions]=\"currentOptions?.actions\"\n [rotate]=\"currentOptions?.previewRotate\" [rotateLeftIcon]=\"currentOptions?.rotateLeftIcon\"\n [rotateRightIcon]=\"currentOptions?.rotateRightIcon\" [download]=\"currentOptions?.previewDownload\"\n [downloadIcon]=\"currentOptions?.downloadIcon\" [bullets]=\"currentOptions?.previewBullets\"\n (previewClose)=\"onPreviewClose()\" (previewOpen)=\"onPreviewOpen()\" (activeChange)=\"previewSelect($event)\"\n [class.ngx-gallery-active]=\"previewEnabled\"></ngx-gallery-preview>\n</div>", styles: [":host{display:inline-block}:host>*{float:left}.ngx-gallery-layout{width:100%;height:100%;display:flex;flex-direction:column}.ngx-gallery-layout.thumbnails-top ngx-gallery-image{order:2}.ngx-gallery-layout.thumbnails-top ngx-gallery-thumbnails{order:1}.ngx-gallery-layout.thumbnails-bottom ngx-gallery-image{order:1}.ngx-gallery-layout.thumbnails-bottom ngx-gallery-thumbnails{order:2}*{box-sizing:border-box}.ngx-gallery-icon{color:#fff;position:absolute;display:inline-block}.ngx-gallery-icon .ngx-gallery-icon-content{display:block}ngx-gallery-preview{touch-action:pan-y;-webkit-user-select:none;user-select:none;display:block;width:100%;height:100%;font-size:25px}ngx-gallery-preview .ngx-gallery-icon{z-index:2000}.ngx-gallery-clickable{cursor:pointer}.ngx-gallery-icons-wrapper .ngx-gallery-icon{position:relative;margin-right:5px;margin-top:5px;font-size:20px;cursor:pointer}.ngx-gallery-icons-wrapper{float:right}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: NgxGalleryImageComponent, selector: "ngx-gallery-image", inputs: ["images", "clickable", "selectedIndex", "arrows", "arrowsAutoHide", "swipe", "animation", "size", "arrowPrevIcon", "arrowNextIcon", "autoPlay", "autoPlayInterval", "autoPlayPauseOnHover", "infinityMove", "lazyLoading", "actions", "descriptions", "showDescription", "bullets"], outputs: ["imageClick", "activeChange", "animating"] }, { kind: "component", type: NgxGalleryThumbnailsComponent, selector: "ngx-gallery-thumbnails", inputs: ["images", "isAnimating", "links", "labels", "linkTarget", "columns", "rows", "arrows", "arrowsAutoHide", "margin", "selectedIndex", "clickable", "swipe", "size", "arrowPrevIcon", "arrowNextIcon", "moveSize", "order", "remainingCount", "lazyLoading", "actions"], outputs: ["activeChange"] }, { kind: "component", type: NgxGalleryPreviewComponent, selector: "ngx-gallery-preview", inputs: ["images", "descriptions", "showDescription", "arrows", "arrowsAutoHide", "swipe", "fullscreen", "forceFullscreen", "closeOnClick", "closeOnEsc", "keyboardNavigation", "arrowPrevIcon", "arrowNextIcon", "closeIcon", "fullscreenIcon", "spinnerIcon", "autoPlay", "autoPlayInterval", "autoPlayPauseOnHover", "infinityMove", "zoom", "zoomStep", "zoomMax", "zoomMin", "zoomInIcon", "zoomOutIcon", "animation", "actions", "rotate", "rotateLeftIcon", "rotateRightIcon", "download", "downloadIcon", "bullets"], outputs: ["previewOpen", "previewClose", "activeChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1662
+ }
1663
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryComponent, decorators: [{
1664
+ type: Component,
1665
+ args: [{ selector: 'ngx-gallery', encapsulation: ViewEncapsulation.None, providers: [NgxGalleryService], changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"ngx-gallery-layout {{currentOptions?.layout}}\">\n @if (currentOptions?.image) {\n <ngx-gallery-image [style.height]=\"getImageHeight()\" [images]=\"mediumImages\" [clickable]=\"currentOptions?.preview\"\n [selectedIndex]=\"selectedIndex\" [arrows]=\"currentOptions?.imageArrows\"\n [arrowsAutoHide]=\"currentOptions?.imageArrowsAutoHide\" [arrowPrevIcon]=\"currentOptions?.arrowPrevIcon\"\n [arrowNextIcon]=\"currentOptions?.arrowNextIcon\" [swipe]=\"currentOptions?.imageSwipe\"\n [animation]=\"currentOptions?.imageAnimation\" [size]=\"currentOptions?.imageSize\"\n [autoPlay]=\"currentOptions?.imageAutoPlay\" [autoPlayInterval]=\"currentOptions?.imageAutoPlayInterval\"\n [autoPlayPauseOnHover]=\"currentOptions?.imageAutoPlayPauseOnHover\"\n [infinityMove]=\"currentOptions?.imageInfinityMove\" [lazyLoading]=\"currentOptions?.lazyLoading\"\n [actions]=\"currentOptions?.imageActions\" [descriptions]=\"descriptions\"\n [showDescription]=\"currentOptions?.imageDescription\" [bullets]=\"currentOptions?.imageBullets\"\n (imageClick)=\"openPreview($event)\" (activeChange)=\"selectFromImage($event)\"\n (animating)=\"setAnimating($event)\"></ngx-gallery-image>\n }\n\n @if (currentOptions?.thumbnails) {\n <ngx-gallery-thumbnails [style.marginTop]=\"getThumbnailsMarginTop()\"\n [style.marginBottom]=\"getThumbnailsMarginBottom()\" [style.height]=\"getThumbnailsHeight()\" [images]=\"smallImages\"\n [isAnimating]=\"isAnimating\" [links]=\"currentOptions?.thumbnailsAsLinks ? links : []\" [labels]=\"labels\"\n [linkTarget]=\"currentOptions?.linkTarget\" [selectedIndex]=\"selectedIndex\"\n [columns]=\"currentOptions?.thumbnailsColumns\" [rows]=\"currentOptions?.thumbnailsRows\"\n [margin]=\"currentOptions?.thumbnailMargin\" [arrows]=\"currentOptions?.thumbnailsArrows\"\n [arrowsAutoHide]=\"currentOptions?.thumbnailsArrowsAutoHide\" [arrowPrevIcon]=\"currentOptions?.arrowPrevIcon\"\n [arrowNextIcon]=\"currentOptions?.arrowNextIcon\" [clickable]=\"currentOptions?.image || currentOptions?.preview\"\n [swipe]=\"currentOptions?.thumbnailsSwipe\" [size]=\"currentOptions?.thumbnailSize\"\n [moveSize]=\"currentOptions?.thumbnailsMoveSize\" [order]=\"currentOptions?.thumbnailsOrder\"\n [remainingCount]=\"currentOptions?.thumbnailsRemainingCount\" [lazyLoading]=\"currentOptions?.lazyLoading\"\n [actions]=\"currentOptions?.thumbnailActions\" (activeChange)=\"selectFromThumbnails($event)\"\n [ngClass]=\"currentOptions?.thumbnailClasses\"></ngx-gallery-thumbnails>\n }\n\n <ngx-gallery-preview [images]=\"bigImages\" [descriptions]=\"descriptions\"\n [showDescription]=\"currentOptions?.previewDescription\" [arrowPrevIcon]=\"currentOptions?.arrowPrevIcon\"\n [arrowNextIcon]=\"currentOptions?.arrowNextIcon\" [closeIcon]=\"currentOptions?.closeIcon\"\n [fullscreenIcon]=\"currentOptions?.fullscreenIcon\" [spinnerIcon]=\"currentOptions?.spinnerIcon\"\n [arrows]=\"currentOptions?.previewArrows\" [arrowsAutoHide]=\"currentOptions?.previewArrowsAutoHide\"\n [swipe]=\"currentOptions?.previewSwipe\" [fullscreen]=\"currentOptions?.previewFullscreen\"\n [forceFullscreen]=\"currentOptions?.previewForceFullscreen\" [closeOnClick]=\"currentOptions?.previewCloseOnClick\"\n [closeOnEsc]=\"currentOptions?.previewCloseOnEsc\" [keyboardNavigation]=\"currentOptions?.previewKeyboardNavigation\"\n [animation]=\"currentOptions?.previewAnimation\" [autoPlay]=\"currentOptions?.previewAutoPlay\"\n [autoPlayInterval]=\"currentOptions?.previewAutoPlayInterval\"\n [autoPlayPauseOnHover]=\"currentOptions?.previewAutoPlayPauseOnHover\"\n [infinityMove]=\"currentOptions?.previewInfinityMove\" [zoom]=\"currentOptions?.previewZoom\"\n [zoomStep]=\"currentOptions?.previewZoomStep\" [zoomMax]=\"currentOptions?.previewZoomMax\"\n [zoomMin]=\"currentOptions?.previewZoomMin\" [zoomInIcon]=\"currentOptions?.zoomInIcon\"\n [zoomOutIcon]=\"currentOptions?.zoomOutIcon\" [actions]=\"currentOptions?.actions\"\n [rotate]=\"currentOptions?.previewRotate\" [rotateLeftIcon]=\"currentOptions?.rotateLeftIcon\"\n [rotateRightIcon]=\"currentOptions?.rotateRightIcon\" [download]=\"currentOptions?.previewDownload\"\n [downloadIcon]=\"currentOptions?.downloadIcon\" [bullets]=\"currentOptions?.previewBullets\"\n (previewClose)=\"onPreviewClose()\" (previewOpen)=\"onPreviewOpen()\" (activeChange)=\"previewSelect($event)\"\n [class.ngx-gallery-active]=\"previewEnabled\"></ngx-gallery-preview>\n</div>", styles: [":host{display:inline-block}:host>*{float:left}.ngx-gallery-layout{width:100%;height:100%;display:flex;flex-direction:column}.ngx-gallery-layout.thumbnails-top ngx-gallery-image{order:2}.ngx-gallery-layout.thumbnails-top ngx-gallery-thumbnails{order:1}.ngx-gallery-layout.thumbnails-bottom ngx-gallery-image{order:1}.ngx-gallery-layout.thumbnails-bottom ngx-gallery-thumbnails{order:2}*{box-sizing:border-box}.ngx-gallery-icon{color:#fff;position:absolute;display:inline-block}.ngx-gallery-icon .ngx-gallery-icon-content{display:block}ngx-gallery-preview{touch-action:pan-y;-webkit-user-select:none;user-select:none;display:block;width:100%;height:100%;font-size:25px}ngx-gallery-preview .ngx-gallery-icon{z-index:2000}.ngx-gallery-clickable{cursor:pointer}.ngx-gallery-icons-wrapper .ngx-gallery-icon{position:relative;margin-right:5px;margin-top:5px;font-size:20px;cursor:pointer}.ngx-gallery-icons-wrapper{float:right}\n"] }]
1666
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: NgxGalleryService }], propDecorators: { options: [{
1667
+ type: Input
1668
+ }], images: [{
1669
+ type: Input
1670
+ }], imagesReady: [{
1671
+ type: Output
1672
+ }], change: [{
1673
+ type: Output
1674
+ }], previewOpen: [{
1675
+ type: Output
1676
+ }], previewClose: [{
1677
+ type: Output
1678
+ }], previewChange: [{
1679
+ type: Output
1680
+ }], preview: [{
1681
+ type: ViewChild,
1682
+ args: [NgxGalleryPreviewComponent]
1683
+ }], image: [{
1684
+ type: ViewChild,
1685
+ args: [NgxGalleryImageComponent]
1686
+ }], thumbnails: [{
1687
+ type: ViewChild,
1688
+ args: [NgxGalleryThumbnailsComponent]
1689
+ }], width: [{
1690
+ type: HostBinding,
1691
+ args: ['style.width']
1692
+ }], height: [{
1693
+ type: HostBinding,
1694
+ args: ['style.height']
1695
+ }], left: [{
1696
+ type: HostBinding,
1697
+ args: ['style.transform']
1698
+ }], onResize: [{
1699
+ type: HostListener,
1700
+ args: ['window:resize']
1701
+ }] } });
1702
+
1703
+ class NgxGalleryModule {
1704
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryModule }); }
1705
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1706
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryModule, declarations: [NgxGalleryComponent,
1707
+ NgxGalleryImageComponent,
1708
+ NgxGalleryArrowsComponent,
1709
+ NgxGalleryThumbnailsComponent,
1710
+ NgxGalleryPreviewComponent,
1711
+ NgxGalleryActionComponent,
1712
+ NgxGalleryBulletsComponent], imports: [CommonModule], exports: [NgxGalleryComponent] }); }
1713
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryModule, imports: [CommonModule] }); }
1714
+ }
1715
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxGalleryModule, decorators: [{
1716
+ type: Injectable
1717
+ }, {
1718
+ type: NgModule,
1719
+ args: [{
1720
+ declarations: [
1721
+ NgxGalleryComponent,
1722
+ NgxGalleryImageComponent,
1723
+ NgxGalleryArrowsComponent,
1724
+ NgxGalleryThumbnailsComponent,
1725
+ NgxGalleryPreviewComponent,
1726
+ NgxGalleryActionComponent,
1727
+ NgxGalleryBulletsComponent
1728
+ ],
1729
+ imports: [CommonModule],
1730
+ exports: [NgxGalleryComponent],
1731
+ providers: []
1732
+ }]
1733
+ }] });
1734
+
1735
+ class NgxGalleryImage {
1736
+ constructor(obj) {
1737
+ this.small = obj.small;
1738
+ this.medium = obj.medium;
1739
+ this.big = obj.big;
1740
+ this.description = obj.description;
1741
+ this.url = obj.url;
1742
+ this.type = obj.type;
1743
+ this.label = obj.label;
1744
+ }
1745
+ }
1746
+
1747
+ /*
1748
+ * Public API Surface of ngx-gallery
1749
+ */
1750
+
1751
+ /**
1752
+ * Generated bundle index. Do not edit.
1753
+ */
1754
+
1755
+ export { NgxGalleryAction, NgxGalleryAnimation, NgxGalleryArrowsComponent, NgxGalleryBulletsComponent, NgxGalleryComponent, NgxGalleryImage, NgxGalleryImageSize, NgxGalleryLayout, NgxGalleryModule, NgxGalleryOptions, NgxGalleryOrder, NgxGalleryOrderedImage, NgxGalleryPreviewComponent, NgxGalleryService, NgxGalleryThumbnailsComponent };
1756
+ //# sourceMappingURL=autotaxatiepartners-ngx-gallery.mjs.map