PluginProbe
Elementor Website Builder – more than just a page builder / 3.6.6
Elementor Website Builder – more than just a page builder v3.6.6
4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
elementor / assets / js / preloaded-modules.js

preloaded-modules.js in Elementor Website Builder – more than just a page builder 3.6.6, at assets/js/preloaded-modules.js

2,457 lines 79.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.6.6 - 08-06-2022 */
2 (self["webpackChunkelementor"] = self["webpackChunkelementor"] || []).push([["preloaded-modules"],{
3
4 /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
5 /*!****************************************************************!*\
6 !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
7 \****************************************************************/
8 /***/ ((module) => {
9
10 function _defineProperty(obj, key, value) {
11 if (key in obj) {
12 Object.defineProperty(obj, key, {
13 value: value,
14 enumerable: true,
15 configurable: true,
16 writable: true
17 });
18 } else {
19 obj[key] = value;
20 }
21
22 return obj;
23 }
24
25 module.exports = _defineProperty;
26 module.exports["default"] = module.exports, module.exports.__esModule = true;
27
28 /***/ }),
29
30 /***/ "../assets/dev/js/frontend/handlers/accordion.js":
31 /*!*******************************************************!*\
32 !*** ../assets/dev/js/frontend/handlers/accordion.js ***!
33 \*******************************************************/
34 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
35
36 "use strict";
37
38
39 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
40
41 Object.defineProperty(exports, "__esModule", ({
42 value: true
43 }));
44 exports["default"] = void 0;
45
46 var _baseTabs = _interopRequireDefault(__webpack_require__(/*! ./base-tabs */ "../assets/dev/js/frontend/handlers/base-tabs.js"));
47
48 class Accordion extends _baseTabs.default {
49 getDefaultSettings() {
50 const defaultSettings = super.getDefaultSettings();
51 return { ...defaultSettings,
52 showTabFn: 'slideDown',
53 hideTabFn: 'slideUp'
54 };
55 }
56
57 }
58
59 exports["default"] = Accordion;
60
61 /***/ }),
62
63 /***/ "../assets/dev/js/frontend/handlers/alert.js":
64 /*!***************************************************!*\
65 !*** ../assets/dev/js/frontend/handlers/alert.js ***!
66 \***************************************************/
67 /***/ ((__unused_webpack_module, exports) => {
68
69 "use strict";
70
71
72 Object.defineProperty(exports, "__esModule", ({
73 value: true
74 }));
75 exports["default"] = void 0;
76
77 class Alert extends elementorModules.frontend.handlers.Base {
78 getDefaultSettings() {
79 return {
80 selectors: {
81 dismissButton: '.elementor-alert-dismiss'
82 }
83 };
84 }
85
86 getDefaultElements() {
87 const selectors = this.getSettings('selectors');
88 return {
89 $dismissButton: this.$element.find(selectors.dismissButton)
90 };
91 }
92
93 bindEvents() {
94 this.elements.$dismissButton.on('click', this.onDismissButtonClick.bind(this));
95 }
96
97 onDismissButtonClick() {
98 this.$element.fadeOut();
99 }
100
101 }
102
103 exports["default"] = Alert;
104
105 /***/ }),
106
107 /***/ "../assets/dev/js/frontend/handlers/base-tabs.js":
108 /*!*******************************************************!*\
109 !*** ../assets/dev/js/frontend/handlers/base-tabs.js ***!
110 \*******************************************************/
111 /***/ ((__unused_webpack_module, exports) => {
112
113 "use strict";
114
115
116 Object.defineProperty(exports, "__esModule", ({
117 value: true
118 }));
119 exports["default"] = void 0;
120
121 class baseTabs extends elementorModules.frontend.handlers.Base {
122 getDefaultSettings() {
123 return {
124 selectors: {
125 tablist: '[role="tablist"]',
126 tabTitle: '.elementor-tab-title',
127 tabContent: '.elementor-tab-content'
128 },
129 classes: {
130 active: 'elementor-active'
131 },
132 showTabFn: 'show',
133 hideTabFn: 'hide',
134 toggleSelf: true,
135 hidePrevious: true,
136 autoExpand: true,
137 keyDirection: {
138 ArrowLeft: elementorFrontendConfig.is_rtl ? 1 : -1,
139 ArrowUp: -1,
140 ArrowRight: elementorFrontendConfig.is_rtl ? -1 : 1,
141 ArrowDown: 1
142 }
143 };
144 }
145
146 getDefaultElements() {
147 const selectors = this.getSettings('selectors');
148 return {
149 $tabTitles: this.findElement(selectors.tabTitle),
150 $tabContents: this.findElement(selectors.tabContent)
151 };
152 }
153
154 activateDefaultTab() {
155 const settings = this.getSettings();
156
157 if (!settings.autoExpand || 'editor' === settings.autoExpand && !this.isEdit) {
158 return;
159 }
160
161 const defaultActiveTab = this.getEditSettings('activeItemIndex') || 1,
162 originalToggleMethods = {
163 showTabFn: settings.showTabFn,
164 hideTabFn: settings.hideTabFn
165 }; // Toggle tabs without animation to avoid jumping
166
167 this.setSettings({
168 showTabFn: 'show',
169 hideTabFn: 'hide'
170 });
171 this.changeActiveTab(defaultActiveTab); // Return back original toggle effects
172
173 this.setSettings(originalToggleMethods);
174 }
175
176 handleKeyboardNavigation(event) {
177 const tab = event.currentTarget,
178 $tabList = jQuery(tab.closest(this.getSettings('selectors').tablist)),
179 $tabs = $tabList.find(this.getSettings('selectors').tabTitle),
180 isVertical = 'vertical' === $tabList.attr('aria-orientation');
181
182 switch (event.key) {
183 case 'ArrowLeft':
184 case 'ArrowRight':
185 if (isVertical) {
186 return;
187 }
188
189 break;
190
191 case 'ArrowUp':
192 case 'ArrowDown':
193 if (!isVertical) {
194 return;
195 }
196
197 event.preventDefault();
198 break;
199
200 case 'Home':
201 event.preventDefault();
202 $tabs.first().trigger('focus');
203 return;
204
205 case 'End':
206 event.preventDefault();
207 $tabs.last().trigger('focus');
208 return;
209
210 default:
211 return;
212 }
213
214 const tabIndex = tab.getAttribute('data-tab') - 1,
215 direction = this.getSettings('keyDirection')[event.key],
216 nextTab = $tabs[tabIndex + direction];
217
218 if (nextTab) {
219 nextTab.focus();
220 } else if (-1 === tabIndex + direction) {
221 $tabs.last().trigger('focus');
222 } else {
223 $tabs.first().trigger('focus');
224 }
225 }
226
227 deactivateActiveTab(tabIndex) {
228 const settings = this.getSettings(),
229 activeClass = settings.classes.active,
230 activeFilter = tabIndex ? '[data-tab="' + tabIndex + '"]' : '.' + activeClass,
231 $activeTitle = this.elements.$tabTitles.filter(activeFilter),
232 $activeContent = this.elements.$tabContents.filter(activeFilter);
233 $activeTitle.add($activeContent).removeClass(activeClass);
234 $activeTitle.attr({
235 tabindex: '-1',
236 'aria-selected': 'false',
237 'aria-expanded': 'false'
238 });
239 $activeContent[settings.hideTabFn]();
240 $activeContent.attr('hidden', 'hidden');
241 }
242
243 activateTab(tabIndex) {
244 const settings = this.getSettings(),
245 activeClass = settings.classes.active,
246 $requestedTitle = this.elements.$tabTitles.filter('[data-tab="' + tabIndex + '"]'),
247 $requestedContent = this.elements.$tabContents.filter('[data-tab="' + tabIndex + '"]'),
248 animationDuration = 'show' === settings.showTabFn ? 0 : 400;
249 $requestedTitle.add($requestedContent).addClass(activeClass);
250 $requestedTitle.attr({
251 tabindex: '0',
252 'aria-selected': 'true',
253 'aria-expanded': 'true'
254 });
255 $requestedContent[settings.showTabFn](animationDuration, () => elementorFrontend.elements.$window.trigger('elementor-pro/motion-fx/recalc'));
256 $requestedContent.removeAttr('hidden');
257 }
258
259 isActiveTab(tabIndex) {
260 return this.elements.$tabTitles.filter('[data-tab="' + tabIndex + '"]').hasClass(this.getSettings('classes.active'));
261 }
262
263 bindEvents() {
264 this.elements.$tabTitles.on({
265 keydown: event => {
266 // Support for old markup that includes an `<a>` tag in the tab
267 if (jQuery(event.target).is('a') && `Enter` === event.key) {
268 event.preventDefault();
269 } // We listen to keydowon event for these keys in order to prevent undesired page scrolling
270
271
272 if (['End', 'Home', 'ArrowUp', 'ArrowDown'].includes(event.key)) {
273 this.handleKeyboardNavigation(event);
274 }
275 },
276 keyup: event => {
277 switch (event.key) {
278 case 'ArrowLeft':
279 case 'ArrowRight':
280 this.handleKeyboardNavigation(event);
281 break;
282
283 case 'Enter':
284 case 'Space':
285 event.preventDefault();
286 this.changeActiveTab(event.currentTarget.getAttribute('data-tab'));
287 break;
288 }
289 },
290 click: event => {
291 event.preventDefault();
292 this.changeActiveTab(event.currentTarget.getAttribute('data-tab'));
293 }
294 });
295 }
296
297 onInit(...args) {
298 super.onInit(...args);
299 this.activateDefaultTab();
300 }
301
302 onEditSettingsChange(propertyName) {
303 if ('activeItemIndex' === propertyName) {
304 this.activateDefaultTab();
305 }
306 }
307
308 changeActiveTab(tabIndex) {
309 const isActiveTab = this.isActiveTab(tabIndex),
310 settings = this.getSettings();
311
312 if ((settings.toggleSelf || !isActiveTab) && settings.hidePrevious) {
313 this.deactivateActiveTab();
314 }
315
316 if (!settings.hidePrevious && isActiveTab) {
317 this.deactivateActiveTab(tabIndex);
318 }
319
320 if (!isActiveTab) {
321 this.activateTab(tabIndex);
322 }
323 }
324
325 }
326
327 exports["default"] = baseTabs;
328
329 /***/ }),
330
331 /***/ "../assets/dev/js/frontend/handlers/counter.js":
332 /*!*****************************************************!*\
333 !*** ../assets/dev/js/frontend/handlers/counter.js ***!
334 \*****************************************************/
335 /***/ ((__unused_webpack_module, exports) => {
336
337 "use strict";
338
339
340 Object.defineProperty(exports, "__esModule", ({
341 value: true
342 }));
343 exports["default"] = void 0;
344
345 class Counter extends elementorModules.frontend.handlers.Base {
346 getDefaultSettings() {
347 return {
348 selectors: {
349 counterNumber: '.elementor-counter-number'
350 }
351 };
352 }
353
354 getDefaultElements() {
355 const selectors = this.getSettings('selectors');
356 return {
357 $counterNumber: this.$element.find(selectors.counterNumber)
358 };
359 }
360
361 onInit() {
362 super.onInit();
363 this.intersectionObserver = elementorModules.utils.Scroll.scrollObserver({
364 callback: event => {
365 if (event.isInViewport) {
366 this.intersectionObserver.unobserve(this.elements.$counterNumber[0]);
367 const data = this.elements.$counterNumber.data(),
368 decimalDigits = data.toValue.toString().match(/\.(.*)/);
369
370 if (decimalDigits) {
371 data.rounding = decimalDigits[1].length;
372 }
373
374 this.elements.$counterNumber.numerator(data);
375 }
376 }
377 });
378 this.intersectionObserver.observe(this.elements.$counterNumber[0]);
379 }
380
381 }
382
383 exports["default"] = Counter;
384
385 /***/ }),
386
387 /***/ "../assets/dev/js/frontend/handlers/image-carousel.js":
388 /*!************************************************************!*\
389 !*** ../assets/dev/js/frontend/handlers/image-carousel.js ***!
390 \************************************************************/
391 /***/ ((__unused_webpack_module, exports) => {
392
393 "use strict";
394
395
396 Object.defineProperty(exports, "__esModule", ({
397 value: true
398 }));
399 exports["default"] = void 0;
400
401 class ImageCarousel extends elementorModules.frontend.handlers.SwiperBase {
402 getDefaultSettings() {
403 return {
404 selectors: {
405 carousel: '.elementor-image-carousel-wrapper',
406 slideContent: '.swiper-slide'
407 }
408 };
409 }
410
411 getDefaultElements() {
412 const selectors = this.getSettings('selectors');
413 const elements = {
414 $swiperContainer: this.$element.find(selectors.carousel)
415 };
416 elements.$slides = elements.$swiperContainer.find(selectors.slideContent);
417 return elements;
418 }
419
420 getSwiperSettings() {
421 const elementSettings = this.getElementSettings(),
422 slidesToShow = +elementSettings.slides_to_show || 3,
423 isSingleSlide = 1 === slidesToShow,
424 elementorBreakpoints = elementorFrontend.config.responsive.activeBreakpoints,
425 defaultSlidesToShowMap = {
426 mobile: 1,
427 tablet: isSingleSlide ? 1 : 2
428 };
429 const swiperOptions = {
430 slidesPerView: slidesToShow,
431 loop: 'yes' === elementSettings.infinite,
432 speed: elementSettings.speed,
433 handleElementorBreakpoints: true
434 };
435 swiperOptions.breakpoints = {};
436 let lastBreakpointSlidesToShowValue = slidesToShow;
437 Object.keys(elementorBreakpoints).reverse().forEach(breakpointName => {
438 // Tablet has a specific default `slides_to_show`.
439 const defaultSlidesToShow = defaultSlidesToShowMap[breakpointName] ? defaultSlidesToShowMap[breakpointName] : lastBreakpointSlidesToShowValue;
440 swiperOptions.breakpoints[elementorBreakpoints[breakpointName].value] = {
441 slidesPerView: +elementSettings['slides_to_show_' + breakpointName] || defaultSlidesToShow,
442 slidesPerGroup: +elementSettings['slides_to_scroll_' + breakpointName] || 1
443 };
444 lastBreakpointSlidesToShowValue = +elementSettings['slides_to_show_' + breakpointName] || defaultSlidesToShow;
445 });
446
447 if ('yes' === elementSettings.autoplay) {
448 swiperOptions.autoplay = {
449 delay: elementSettings.autoplay_speed,
450 disableOnInteraction: 'yes' === elementSettings.pause_on_interaction
451 };
452 }
453
454 if (isSingleSlide) {
455 swiperOptions.effect = elementSettings.effect;
456
457 if ('fade' === elementSettings.effect) {
458 swiperOptions.fadeEffect = {
459 crossFade: true
460 };
461 }
462 } else {
463 swiperOptions.slidesPerGroup = +elementSettings.slides_to_scroll || 1;
464 }
465
466 if (elementSettings.image_spacing_custom) {
467 swiperOptions.spaceBetween = elementSettings.image_spacing_custom.size;
468 }
469
470 const showArrows = 'arrows' === elementSettings.navigation || 'both' === elementSettings.navigation,
471 showDots = 'dots' === elementSettings.navigation || 'both' === elementSettings.navigation;
472
473 if (showArrows) {
474 swiperOptions.navigation = {
475 prevEl: '.elementor-swiper-button-prev',
476 nextEl: '.elementor-swiper-button-next'
477 };
478 }
479
480 if (showDots) {
481 swiperOptions.pagination = {
482 el: '.swiper-pagination',
483 type: 'bullets',
484 clickable: true
485 };
486 }
487
488 if ('yes' === elementSettings.lazyload) {
489 swiperOptions.lazy = {
490 loadPrevNext: true,
491 loadPrevNextAmount: 1
492 };
493 }
494
495 return swiperOptions;
496 }
497
498 async onInit(...args) {
499 super.onInit(...args);
500 const elementSettings = this.getElementSettings();
501
502 if (!this.elements.$swiperContainer.length || 2 > this.elements.$slides.length) {
503 return;
504 }
505
506 const Swiper = elementorFrontend.utils.swiper;
507 this.swiper = await new Swiper(this.elements.$swiperContainer, this.getSwiperSettings()); // Expose the swiper instance in the frontend
508
509 this.elements.$swiperContainer.data('swiper', this.swiper);
510
511 if ('yes' === elementSettings.pause_on_hover) {
512 this.togglePauseOnHover(true);
513 }
514 }
515
516 updateSwiperOption(propertyName) {
517 const elementSettings = this.getElementSettings(),
518 newSettingValue = elementSettings[propertyName],
519 params = this.swiper.params; // Handle special cases where the value to update is not the value that the Swiper library accepts.
520
521 switch (propertyName) {
522 case 'image_spacing_custom':
523 params.spaceBetween = newSettingValue.size || 0;
524 break;
525
526 case 'autoplay_speed':
527 params.autoplay.delay = newSettingValue;
528 break;
529
530 case 'speed':
531 params.speed = newSettingValue;
532 break;
533 }
534
535 this.swiper.update();
536 }
537
538 getChangeableProperties() {
539 return {
540 pause_on_hover: 'pauseOnHover',
541 autoplay_speed: 'delay',
542 speed: 'speed',
543 image_spacing_custom: 'spaceBetween'
544 };
545 }
546
547 onElementChange(propertyName) {
548 const changeableProperties = this.getChangeableProperties();
549
550 if (changeableProperties[propertyName]) {
551 // 'pause_on_hover' is implemented by the handler with event listeners, not the Swiper library.
552 if ('pause_on_hover' === propertyName) {
553 const newSettingValue = this.getElementSettings('pause_on_hover');
554 this.togglePauseOnHover('yes' === newSettingValue);
555 } else {
556 this.updateSwiperOption(propertyName);
557 }
558 }
559 }
560
561 onEditSettingsChange(propertyName) {
562 if ('activeItemIndex' === propertyName) {
563 this.swiper.slideToLoop(this.getEditSettings('activeItemIndex') - 1);
564 }
565 }
566
567 }
568
569 exports["default"] = ImageCarousel;
570
571 /***/ }),
572
573 /***/ "../assets/dev/js/frontend/handlers/progress.js":
574 /*!******************************************************!*\
575 !*** ../assets/dev/js/frontend/handlers/progress.js ***!
576 \******************************************************/
577 /***/ ((__unused_webpack_module, exports) => {
578
579 "use strict";
580
581
582 Object.defineProperty(exports, "__esModule", ({
583 value: true
584 }));
585 exports["default"] = void 0;
586
587 class Progress extends elementorModules.frontend.handlers.Base {
588 getDefaultSettings() {
589 return {
590 selectors: {
591 progressNumber: '.elementor-progress-bar'
592 }
593 };
594 }
595
596 getDefaultElements() {
597 const selectors = this.getSettings('selectors');
598 return {
599 $progressNumber: this.$element.find(selectors.progressNumber)
600 };
601 }
602
603 onInit() {
604 super.onInit();
605 elementorFrontend.waypoint(this.elements.$progressNumber, () => {
606 const $progressbar = this.elements.$progressNumber;
607 $progressbar.css('width', $progressbar.data('max') + '%');
608 });
609 }
610
611 }
612
613 exports["default"] = Progress;
614
615 /***/ }),
616
617 /***/ "../assets/dev/js/frontend/handlers/tabs.js":
618 /*!**************************************************!*\
619 !*** ../assets/dev/js/frontend/handlers/tabs.js ***!
620 \**************************************************/
621 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
622
623 "use strict";
624
625
626 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
627
628 Object.defineProperty(exports, "__esModule", ({
629 value: true
630 }));
631 exports["default"] = void 0;
632
633 var _baseTabs = _interopRequireDefault(__webpack_require__(/*! ./base-tabs */ "../assets/dev/js/frontend/handlers/base-tabs.js"));
634
635 class Tabs extends _baseTabs.default {
636 getDefaultSettings() {
637 const defaultSettings = super.getDefaultSettings();
638 return { ...defaultSettings,
639 toggleSelf: false
640 };
641 }
642
643 }
644
645 exports["default"] = Tabs;
646
647 /***/ }),
648
649 /***/ "../assets/dev/js/frontend/handlers/text-editor.js":
650 /*!*********************************************************!*\
651 !*** ../assets/dev/js/frontend/handlers/text-editor.js ***!
652 \*********************************************************/
653 /***/ ((__unused_webpack_module, exports) => {
654
655 "use strict";
656
657
658 Object.defineProperty(exports, "__esModule", ({
659 value: true
660 }));
661 exports["default"] = void 0;
662
663 class TextEditor extends elementorModules.frontend.handlers.Base {
664 getDefaultSettings() {
665 return {
666 selectors: {
667 paragraph: 'p:first'
668 },
669 classes: {
670 dropCap: 'elementor-drop-cap',
671 dropCapLetter: 'elementor-drop-cap-letter'
672 }
673 };
674 }
675
676 getDefaultElements() {
677 const selectors = this.getSettings('selectors'),
678 classes = this.getSettings('classes'),
679 $dropCap = jQuery('<span>', {
680 class: classes.dropCap
681 }),
682 $dropCapLetter = jQuery('<span>', {
683 class: classes.dropCapLetter
684 });
685 $dropCap.append($dropCapLetter);
686 return {
687 $paragraph: this.$element.find(selectors.paragraph),
688 $dropCap: $dropCap,
689 $dropCapLetter: $dropCapLetter
690 };
691 }
692
693 wrapDropCap() {
694 const isDropCapEnabled = this.getElementSettings('drop_cap');
695
696 if (!isDropCapEnabled) {
697 // If there is an old drop cap inside the paragraph
698 if (this.dropCapLetter) {
699 this.elements.$dropCap.remove();
700 this.elements.$paragraph.prepend(this.dropCapLetter);
701 this.dropCapLetter = '';
702 }
703
704 return;
705 }
706
707 const $paragraph = this.elements.$paragraph;
708
709 if (!$paragraph.length) {
710 return;
711 }
712
713 const paragraphContent = $paragraph.html().replace(/&nbsp;/g, ' '),
714 firstLetterMatch = paragraphContent.match(/^ *([^ ] ?)/);
715
716 if (!firstLetterMatch) {
717 return;
718 }
719
720 const firstLetter = firstLetterMatch[1],
721 trimmedFirstLetter = firstLetter.trim(); // Don't apply drop cap when the content starting with an HTML tag
722
723 if ('<' === trimmedFirstLetter) {
724 return;
725 }
726
727 this.dropCapLetter = firstLetter;
728 this.elements.$dropCapLetter.text(trimmedFirstLetter);
729 const restoredParagraphContent = paragraphContent.slice(firstLetter.length).replace(/^ */, match => {
730 return new Array(match.length + 1).join('&nbsp;');
731 });
732 $paragraph.html(restoredParagraphContent).prepend(this.elements.$dropCap);
733 }
734
735 onInit(...args) {
736 super.onInit(...args);
737 this.wrapDropCap();
738 }
739
740 onElementChange(propertyName) {
741 if ('drop_cap' === propertyName) {
742 this.wrapDropCap();
743 }
744 }
745
746 }
747
748 exports["default"] = TextEditor;
749
750 /***/ }),
751
752 /***/ "../assets/dev/js/frontend/handlers/toggle.js":
753 /*!****************************************************!*\
754 !*** ../assets/dev/js/frontend/handlers/toggle.js ***!
755 \****************************************************/
756 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
757
758 "use strict";
759
760
761 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
762
763 Object.defineProperty(exports, "__esModule", ({
764 value: true
765 }));
766 exports["default"] = void 0;
767
768 var _baseTabs = _interopRequireDefault(__webpack_require__(/*! ./base-tabs */ "../assets/dev/js/frontend/handlers/base-tabs.js"));
769
770 class Toggle extends _baseTabs.default {
771 getDefaultSettings() {
772 const defaultSettings = super.getDefaultSettings();
773 return { ...defaultSettings,
774 showTabFn: 'slideDown',
775 hideTabFn: 'slideUp',
776 hidePrevious: false,
777 autoExpand: 'editor'
778 };
779 }
780
781 }
782
783 exports["default"] = Toggle;
784
785 /***/ }),
786
787 /***/ "../assets/dev/js/frontend/handlers/video.js":
788 /*!***************************************************!*\
789 !*** ../assets/dev/js/frontend/handlers/video.js ***!
790 \***************************************************/
791 /***/ ((__unused_webpack_module, exports) => {
792
793 "use strict";
794
795
796 Object.defineProperty(exports, "__esModule", ({
797 value: true
798 }));
799 exports["default"] = void 0;
800
801 class Video extends elementorModules.frontend.handlers.Base {
802 getDefaultSettings() {
803 return {
804 selectors: {
805 imageOverlay: '.elementor-custom-embed-image-overlay',
806 video: '.elementor-video',
807 videoIframe: '.elementor-video-iframe',
808 playIcon: '.elementor-custom-embed-play'
809 }
810 };
811 }
812
813 getDefaultElements() {
814 const selectors = this.getSettings('selectors');
815 return {
816 $imageOverlay: this.$element.find(selectors.imageOverlay),
817 $video: this.$element.find(selectors.video),
818 $videoIframe: this.$element.find(selectors.videoIframe),
819 $playIcon: this.$element.find(selectors.playIcon)
820 };
821 }
822
823 handleVideo() {
824 if (this.getElementSettings('lightbox')) {
825 return;
826 }
827
828 if ('youtube' === this.getElementSettings('video_type')) {
829 this.apiProvider.onApiReady(apiObject => {
830 this.elements.$imageOverlay.remove();
831 this.prepareYTVideo(apiObject, true);
832 });
833 } else {
834 this.elements.$imageOverlay.remove();
835 this.playVideo();
836 }
837 }
838
839 playVideo() {
840 if (this.elements.$video.length) {
841 // this.youtubePlayer exists only for YouTube videos, and its play function is different.
842 if (this.youtubePlayer) {
843 this.youtubePlayer.playVideo();
844 } else {
845 this.elements.$video[0].play();
846 }
847
848 return;
849 }
850
851 const $videoIframe = this.elements.$videoIframe,
852 lazyLoad = $videoIframe.data('lazy-load');
853
854 if (lazyLoad) {
855 $videoIframe.attr('src', lazyLoad);
856 }
857
858 $videoIframe[0].src = this.apiProvider.getAutoplayURL($videoIframe[0].src);
859 }
860
861 async animateVideo() {
862 const lightbox = await elementorFrontend.utils.lightbox;
863 lightbox.setEntranceAnimation(this.getCurrentDeviceSetting('lightbox_content_animation'));
864 }
865
866 async handleAspectRatio() {
867 const lightbox = await elementorFrontend.utils.lightbox;
868 lightbox.setVideoAspectRatio(this.getElementSettings('aspect_ratio'));
869 }
870
871 async hideLightbox() {
872 const lightbox = await elementorFrontend.utils.lightbox;
873 lightbox.getModal().hide();
874 }
875
876 prepareYTVideo(YT, onOverlayClick) {
877 const elementSettings = this.getElementSettings(),
878 playerOptions = {
879 videoId: this.videoID,
880 events: {
881 onReady: () => {
882 if (elementSettings.mute) {
883 this.youtubePlayer.mute();
884 }
885
886 if (elementSettings.autoplay || onOverlayClick) {
887 this.youtubePlayer.playVideo();
888 }
889 },
890 onStateChange: event => {
891 if (event.data === YT.PlayerState.ENDED && elementSettings.loop) {
892 this.youtubePlayer.seekTo(elementSettings.start || 0);
893 }
894 }
895 },
896 playerVars: {
897 controls: elementSettings.controls ? 1 : 0,
898 rel: elementSettings.rel ? 1 : 0,
899 playsinline: elementSettings.play_on_mobile ? 1 : 0,
900 modestbranding: elementSettings.modestbranding ? 1 : 0,
901 autoplay: elementSettings.autoplay ? 1 : 0,
902 start: elementSettings.start,
903 end: elementSettings.end
904 }
905 }; // To handle CORS issues, when the default host is changed, the origin parameter has to be set.
906
907 if (elementSettings.yt_privacy) {
908 playerOptions.host = 'https://www.youtube-nocookie.com';
909 playerOptions.origin = window.location.hostname;
910 }
911
912 this.youtubePlayer = new YT.Player(this.elements.$video[0], playerOptions);
913 }
914
915 bindEvents() {
916 this.elements.$imageOverlay.on('click', this.handleVideo.bind(this));
917 this.elements.$playIcon.on('keydown', event => {
918 const playKeys = [13, // Enter key.
919 32 // Space bar key.
920 ];
921
922 if (playKeys.includes(event.keyCode)) {
923 this.handleVideo();
924 }
925 });
926 }
927
928 onInit() {
929 super.onInit();
930 const elementSettings = this.getElementSettings();
931
932 if (elementorFrontend.utils[elementSettings.video_type]) {
933 this.apiProvider = elementorFrontend.utils[elementSettings.video_type];
934 } else {
935 this.apiProvider = elementorFrontend.utils.baseVideoLoader;
936 }
937
938 if ('youtube' !== elementSettings.video_type) {
939 // Currently the only API integration in the Video widget is for the YT API
940 return;
941 }
942
943 this.videoID = this.apiProvider.getVideoIDFromURL(elementSettings.youtube_url); // If there is an image overlay, the YouTube video prep method will be triggered on click
944
945 if (!this.videoID) {
946 return;
947 } // If the user is using an image overlay, loading the API happens on overlay click instead of on init.
948
949
950 if (elementSettings.show_image_overlay && elementSettings.image_overlay.url) {
951 return;
952 }
953
954 if (elementSettings.lazy_load) {
955 this.intersectionObserver = elementorModules.utils.Scroll.scrollObserver({
956 callback: event => {
957 if (event.isInViewport) {
958 this.intersectionObserver.unobserve(this.elements.$video.parent()[0]);
959 this.apiProvider.onApiReady(apiObject => this.prepareYTVideo(apiObject));
960 }
961 }
962 }); // We observe the parent, since the video container has a height of 0.
963
964 this.intersectionObserver.observe(this.elements.$video.parent()[0]);
965 return;
966 } // When Optimized asset loading is set to off, the video type is set to 'Youtube', and 'Privacy Mode' is set
967 // to 'On', there might be a conflict with other videos that are loaded WITHOUT privacy mode, such as a
968 // video bBackground in a section. In these cases, to avoid the conflict, a timeout is added to postpone the
969 // initialization of the Youtube API object.
970
971
972 if (!elementorFrontend.config.experimentalFeatures['e_optimized_assets_loading']) {
973 setTimeout(() => {
974 this.apiProvider.onApiReady(apiObject => this.prepareYTVideo(apiObject));
975 }, 0);
976 } else {
977 this.apiProvider.onApiReady(apiObject => this.prepareYTVideo(apiObject));
978 }
979 }
980
981 onElementChange(propertyName) {
982 if (0 === propertyName.indexOf('lightbox_content_animation')) {
983 this.animateVideo();
984 return;
985 }
986
987 const isLightBoxEnabled = this.getElementSettings('lightbox');
988
989 if ('lightbox' === propertyName && !isLightBoxEnabled) {
990 this.hideLightbox();
991 return;
992 }
993
994 if ('aspect_ratio' === propertyName && isLightBoxEnabled) {
995 this.handleAspectRatio();
996 }
997 }
998
999 }
1000
1001 exports["default"] = Video;
1002
1003 /***/ }),
1004
1005 /***/ "../assets/dev/js/frontend/preloaded-modules.js":
1006 /*!******************************************************!*\
1007 !*** ../assets/dev/js/frontend/preloaded-modules.js ***!
1008 \******************************************************/
1009 /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
1010
1011 "use strict";
1012
1013
1014 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1015
1016 var _accordion = _interopRequireDefault(__webpack_require__(/*! ./handlers/accordion */ "../assets/dev/js/frontend/handlers/accordion.js"));
1017
1018 var _alert = _interopRequireDefault(__webpack_require__(/*! ./handlers/alert */ "../assets/dev/js/frontend/handlers/alert.js"));
1019
1020 var _counter = _interopRequireDefault(__webpack_require__(/*! ./handlers/counter */ "../assets/dev/js/frontend/handlers/counter.js"));
1021
1022 var _progress = _interopRequireDefault(__webpack_require__(/*! ./handlers/progress */ "../assets/dev/js/frontend/handlers/progress.js"));
1023
1024 var _tabs = _interopRequireDefault(__webpack_require__(/*! ./handlers/tabs */ "../assets/dev/js/frontend/handlers/tabs.js"));
1025
1026 var _toggle = _interopRequireDefault(__webpack_require__(/*! ./handlers/toggle */ "../assets/dev/js/frontend/handlers/toggle.js"));
1027
1028 var _video = _interopRequireDefault(__webpack_require__(/*! ./handlers/video */ "../assets/dev/js/frontend/handlers/video.js"));
1029
1030 var _imageCarousel = _interopRequireDefault(__webpack_require__(/*! ./handlers/image-carousel */ "../assets/dev/js/frontend/handlers/image-carousel.js"));
1031
1032 var _textEditor = _interopRequireDefault(__webpack_require__(/*! ./handlers/text-editor */ "../assets/dev/js/frontend/handlers/text-editor.js"));
1033
1034 var _lightbox = _interopRequireDefault(__webpack_require__(/*! elementor-frontend/utils/lightbox/lightbox */ "../assets/dev/js/frontend/utils/lightbox/lightbox.js"));
1035
1036 elementorFrontend.elements.$window.on('elementor/frontend/init', () => {
1037 elementorFrontend.elementsHandler.elementsHandlers = {
1038 'accordion.default': _accordion.default,
1039 'alert.default': _alert.default,
1040 'counter.default': _counter.default,
1041 'progress.default': _progress.default,
1042 'tabs.default': _tabs.default,
1043 'toggle.default': _toggle.default,
1044 'video.default': _video.default,
1045 'image-carousel.default': _imageCarousel.default,
1046 'text-editor.default': _textEditor.default
1047 };
1048 elementorFrontend.on('components:init', () => {
1049 // We first need to delete the property because by default it's a getter function that cannot be overwritten.
1050 delete elementorFrontend.utils.lightbox;
1051 elementorFrontend.utils.lightbox = new _lightbox.default();
1052 });
1053 });
1054
1055 /***/ }),
1056
1057 /***/ "../assets/dev/js/frontend/utils/icons/e-icons.js":
1058 /*!********************************************************!*\
1059 !*** ../assets/dev/js/frontend/utils/icons/e-icons.js ***!
1060 \********************************************************/
1061 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1062
1063 "use strict";
1064
1065
1066 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1067
1068 Object.defineProperty(exports, "__esModule", ({
1069 value: true
1070 }));
1071 exports.zoomOutBold = exports.zoomInBold = exports.twitter = exports.shareArrow = exports.pinterest = exports.loading = exports.frameMinimize = exports.frameExpand = exports.facebook = exports.downloadBold = exports.close = exports.chevronRight = exports.chevronLeft = void 0;
1072
1073 var _manager = _interopRequireDefault(__webpack_require__(/*! ./manager */ "../assets/dev/js/frontend/utils/icons/manager.js"));
1074
1075 // This file is automatically generated, please don't change anything in this file.
1076 const iconsManager = new _manager.default('eicon');
1077 const chevronLeft = {
1078 get element() {
1079 const svgData = {
1080 path: 'M646 125C629 125 613 133 604 142L308 442C296 454 292 471 292 487 292 504 296 521 308 533L604 854C617 867 629 875 646 875 663 875 679 871 692 858 704 846 713 829 713 812 713 796 708 779 692 767L438 487 692 225C700 217 708 204 708 187 708 171 704 154 692 142 675 129 663 125 646 125Z',
1081 width: 1000,
1082 height: 1000
1083 };
1084 return iconsManager.createSvgElement('chevron-left', svgData);
1085 }
1086
1087 };
1088 exports.chevronLeft = chevronLeft;
1089 const chevronRight = {
1090 get element() {
1091 const svgData = {
1092 path: 'M696 533C708 521 713 504 713 487 713 471 708 454 696 446L400 146C388 133 375 125 354 125 338 125 325 129 313 142 300 154 292 171 292 187 292 204 296 221 308 233L563 492 304 771C292 783 288 800 288 817 288 833 296 850 308 863 321 871 338 875 354 875 371 875 388 867 400 854L696 533Z',
1093 width: 1000,
1094 height: 1000
1095 };
1096 return iconsManager.createSvgElement('chevron-right', svgData);
1097 }
1098
1099 };
1100 exports.chevronRight = chevronRight;
1101 const close = {
1102 get element() {
1103 const svgData = {
1104 path: 'M742 167L500 408 258 167C246 154 233 150 217 150 196 150 179 158 167 167 154 179 150 196 150 212 150 229 154 242 171 254L408 500 167 742C138 771 138 800 167 829 196 858 225 858 254 829L496 587 738 829C750 842 767 846 783 846 800 846 817 842 829 829 842 817 846 804 846 783 846 767 842 750 829 737L588 500 833 258C863 229 863 200 833 171 804 137 775 137 742 167Z',
1105 width: 1000,
1106 height: 1000
1107 };
1108 return iconsManager.createSvgElement('close', svgData);
1109 }
1110
1111 };
1112 exports.close = close;
1113 const downloadBold = {
1114 get element() {
1115 const svgData = {
1116 path: 'M572 42H428C405 42 385 61 385 85V385H228C197 385 180 424 203 447L475 719C489 732 511 732 524 719L797 447C819 424 803 385 771 385H614V85C615 61 595 42 572 42ZM958 915V715C958 691 939 672 915 672H653L565 760C529 796 471 796 435 760L347 672H85C61 672 42 691 42 715V915C42 939 61 958 85 958H915C939 958 958 939 958 915ZM736 873C736 853 720 837 700 837 681 837 665 853 665 873 665 892 681 908 700 908 720 908 736 892 736 873ZM815 837C835 837 851 853 851 873 851 892 835 908 815 908 795 908 779 892 779 873 779 853 795 837 815 837Z',
1117 width: 1000,
1118 height: 1000
1119 };
1120 return iconsManager.createSvgElement('download-bold', svgData);
1121 }
1122
1123 };
1124 exports.downloadBold = downloadBold;
1125 const facebook = {
1126 get element() {
1127 const svgData = {
1128 path: 'M858 42H142C88 42 42 87 42 142V863C42 913 88 958 142 958H421V646H292V500H421V387C421 258 496 192 613 192 667 192 725 200 725 200V325H663C600 325 579 362 579 404V500H721L700 646H583V958H863C917 958 963 913 963 858V142C958 87 913 42 858 42L858 42Z',
1129 width: 1000,
1130 height: 1000
1131 };
1132 return iconsManager.createSvgElement('facebook', svgData);
1133 }
1134
1135 };
1136 exports.facebook = facebook;
1137 const frameExpand = {
1138 get element() {
1139 const svgData = {
1140 path: 'M863 583C890 583 914 605 916 632L917 637V863L916 868C914 893 893 914 868 916L863 917H638L632 916C607 914 586 893 584 868L583 863 584 857C586 832 607 811 632 809L638 808H808V637L809 632C811 605 835 583 863 583ZM138 583C165 583 189 605 191 632L192 637V808H363C390 808 414 830 416 857L417 863C417 890 395 914 368 916L363 917H138C110 917 86 895 84 868L83 863V637C83 607 108 583 138 583ZM863 83C890 83 914 105 916 132L917 137V362C917 392 893 417 863 417 835 417 811 395 809 368L808 362V192H638C610 192 586 170 584 143L583 137C583 110 605 86 632 84L638 83H863ZM363 83L368 84C393 86 414 107 416 132L417 137 416 143C414 168 393 189 368 191L363 192H192V362L191 368C189 395 165 417 138 417S86 395 84 368L83 362V137L84 132C86 107 107 86 132 84L138 83H363Z',
1141 width: 1000,
1142 height: 1000
1143 };
1144 return iconsManager.createSvgElement('frame-expand', svgData);
1145 }
1146
1147 };
1148 exports.frameExpand = frameExpand;
1149 const frameMinimize = {
1150 get element() {
1151 const svgData = {
1152 path: 'M363 583C392 583 413 604 417 633L417 637V863C417 892 392 917 363 917 333 917 313 896 308 867L308 863V692H138C108 692 88 671 83 642L83 637C83 608 104 587 133 583L138 583H363ZM638 583C608 583 588 604 583 633L583 637V863C583 892 608 917 638 917 667 917 688 896 692 867L692 863V692H863C892 692 913 671 917 642L917 637C917 608 896 587 867 583L863 583H638ZM363 417C392 417 413 396 417 367L417 362V137C417 108 392 83 363 83 333 83 313 104 308 133L308 137V308H138C108 308 88 329 83 358L83 362C83 392 104 412 133 417L138 417H363ZM638 417C608 417 588 396 583 367L583 362V137C583 108 608 83 638 83 667 83 688 104 692 133L692 137V308H863C892 308 913 329 917 358L917 362C917 392 896 412 867 417L863 417H638Z',
1153 width: 1000,
1154 height: 1000
1155 };
1156 return iconsManager.createSvgElement('frame-minimize', svgData);
1157 }
1158
1159 };
1160 exports.frameMinimize = frameMinimize;
1161 const loading = {
1162 get element() {
1163 const svgData = {
1164 path: 'M500 975V858C696 858 858 696 858 500S696 142 500 142 142 304 142 500H25C25 237 238 25 500 25S975 237 975 500 763 975 500 975Z',
1165 width: 1000,
1166 height: 1000
1167 };
1168 return iconsManager.createSvgElement('loading', svgData);
1169 }
1170
1171 };
1172 exports.loading = loading;
1173 const pinterest = {
1174 get element() {
1175 const svgData = {
1176 path: 'M950 496C950 746 746 950 496 950 450 950 404 942 363 929 379 900 408 850 421 808 425 787 450 700 450 700 467 729 508 754 554 754 692 754 792 629 792 471 792 321 671 208 513 208 317 208 213 342 213 483 213 550 250 633 304 658 313 662 317 662 321 654 321 650 329 617 333 604 333 600 333 596 329 592 313 567 296 525 296 487 288 387 367 292 496 292 608 292 688 367 688 475 688 600 625 683 546 683 500 683 467 646 479 600 492 546 517 487 517 450 517 417 500 387 458 387 413 387 375 433 375 496 375 537 388 562 388 562S342 754 333 787C325 825 329 883 333 917 163 854 42 687 42 496 42 246 246 42 496 42S950 246 950 496Z',
1177 width: 1000,
1178 height: 1000
1179 };
1180 return iconsManager.createSvgElement('pinterest', svgData);
1181 }
1182
1183 };
1184 exports.pinterest = pinterest;
1185 const shareArrow = {
1186 get element() {
1187 const svgData = {
1188 path: 'M946 383L667 133C642 112 604 129 604 162V292C238 296 71 637 42 812 238 587 363 521 604 517V658C604 692 642 708 667 687L946 442C963 425 963 400 946 383Z',
1189 width: 1000,
1190 height: 1000
1191 };
1192 return iconsManager.createSvgElement('share-arrow', svgData);
1193 }
1194
1195 };
1196 exports.shareArrow = shareArrow;
1197 const twitter = {
1198 get element() {
1199 const svgData = {
1200 path: 'M863 312C863 321 863 329 863 337 863 587 675 871 329 871 221 871 125 842 42 787 58 787 71 792 88 792 175 792 254 762 321 712 238 712 171 658 146 583 158 583 171 587 183 587 200 587 217 583 233 579 146 562 83 487 83 396V387C108 400 138 408 167 412 117 379 83 321 83 254 83 221 92 187 108 158 200 271 342 346 496 354 492 342 492 325 492 312 492 208 575 125 679 125 733 125 783 146 817 183 858 175 900 158 938 137 925 179 896 217 854 242 892 237 929 229 963 212 933 250 900 283 863 312Z',
1201 width: 1000,
1202 height: 1000
1203 };
1204 return iconsManager.createSvgElement('twitter', svgData);
1205 }
1206
1207 };
1208 exports.twitter = twitter;
1209 const zoomInBold = {
1210 get element() {
1211 const svgData = {
1212 path: 'M388 383V312C388 283 413 258 442 258 471 258 496 283 496 312V383H567C596 383 621 408 621 437S596 492 567 492H496V562C496 592 471 617 442 617 413 617 388 592 388 562V492H317C288 492 263 467 263 437S288 383 317 383H388ZM654 733C592 779 517 804 438 804 233 804 71 642 71 437S233 71 438 71 804 233 804 437C804 521 779 596 733 654L896 817C917 837 917 871 896 892 875 913 842 913 821 892L654 733ZM438 696C579 696 696 579 696 437S579 179 438 179 179 296 179 437 296 696 438 696Z',
1213 width: 1000,
1214 height: 1000
1215 };
1216 return iconsManager.createSvgElement('zoom-in-bold', svgData);
1217 }
1218
1219 };
1220 exports.zoomInBold = zoomInBold;
1221 const zoomOutBold = {
1222 get element() {
1223 const svgData = {
1224 path: 'M750 683L946 879C963 896 963 929 946 946 929 963 896 967 879 946L683 750C617 804 533 833 438 833 221 833 42 654 42 437S221 42 438 42 833 221 833 437C833 529 800 612 750 683ZM296 392H575C600 392 621 412 621 442 621 467 600 487 575 487H296C271 487 250 467 250 442 250 412 271 392 296 392ZM438 737C604 737 738 604 738 437S604 137 438 137 138 271 138 437 271 737 438 737Z',
1225 width: 1000,
1226 height: 1000
1227 };
1228 return iconsManager.createSvgElement('zoom-out-bold', svgData);
1229 }
1230
1231 };
1232 exports.zoomOutBold = zoomOutBold;
1233
1234 /***/ }),
1235
1236 /***/ "../assets/dev/js/frontend/utils/icons/manager.js":
1237 /*!********************************************************!*\
1238 !*** ../assets/dev/js/frontend/utils/icons/manager.js ***!
1239 \********************************************************/
1240 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1241
1242 "use strict";
1243
1244
1245 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1246
1247 Object.defineProperty(exports, "__esModule", ({
1248 value: true
1249 }));
1250 exports["default"] = void 0;
1251
1252 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
1253
1254 class IconsManager {
1255 constructor(elementsPrefix) {
1256 this.prefix = `${elementsPrefix}-`;
1257 this.createSvgSymbolsContainer();
1258 }
1259
1260 createSvgElement(name, {
1261 path,
1262 width,
1263 height
1264 }) {
1265 const iconName = this.prefix + name,
1266 iconSelector = '#' + this.prefix + name; // Create symbol if not exist yet.
1267
1268 if (!IconsManager.iconsUsageList.includes(iconName)) {
1269 if (!IconsManager.symbolsContainer.querySelector(iconSelector)) {
1270 const symbol = this.createSymbolElement({
1271 id: iconName,
1272 path,
1273 width,
1274 height
1275 });
1276 IconsManager.symbolsContainer.appendChild(symbol);
1277 }
1278
1279 IconsManager.iconsUsageList.push(iconName);
1280 }
1281
1282 return this.createSvgIconElement({
1283 iconName,
1284 iconSelector
1285 });
1286 }
1287
1288 createSvgNode(tag, {
1289 props = {},
1290 attrs = {}
1291 }) {
1292 const node = document.createElementNS('http://www.w3.org/2000/svg', tag);
1293 Object.keys(props).map(key => node[key] = props[key]);
1294 Object.keys(attrs).map(key => node.setAttributeNS(null, key, attrs[key]));
1295 return node;
1296 }
1297
1298 createSvgIconElement({
1299 iconName,
1300 iconSelector
1301 }) {
1302 return this.createSvgNode('svg', {
1303 props: {
1304 innerHTML: '<use xlink:href="' + iconSelector + '" />'
1305 },
1306 attrs: {
1307 class: 'e-font-icon-svg e-' + iconName
1308 }
1309 });
1310 }
1311
1312 createSvgSymbolsContainer() {
1313 if (!IconsManager.symbolsContainer) {
1314 const symbolsContainerId = 'e-font-icon-svg-symbols';
1315 IconsManager.symbolsContainer = document.getElementById(symbolsContainerId);
1316
1317 if (!IconsManager.symbolsContainer) {
1318 IconsManager.symbolsContainer = this.createSvgNode('svg', {
1319 attrs: {
1320 style: 'display: none;',
1321 class: symbolsContainerId
1322 }
1323 });
1324 document.body.appendChild(IconsManager.symbolsContainer);
1325 }
1326 }
1327 }
1328
1329 createSymbolElement({
1330 id,
1331 path,
1332 width,
1333 height
1334 }) {
1335 return this.createSvgNode('symbol', {
1336 props: {
1337 innerHTML: '<path d="' + path + '"></path>',
1338 id
1339 },
1340 attrs: {
1341 viewBox: '0 0 ' + width + ' ' + height
1342 }
1343 });
1344 }
1345
1346 }
1347
1348 exports["default"] = IconsManager;
1349 (0, _defineProperty2.default)(IconsManager, "symbolsContainer", void 0);
1350 (0, _defineProperty2.default)(IconsManager, "iconsUsageList", []);
1351
1352 /***/ }),
1353
1354 /***/ "../assets/dev/js/frontend/utils/lightbox/lightbox.js":
1355 /*!************************************************************!*\
1356 !*** ../assets/dev/js/frontend/utils/lightbox/lightbox.js ***!
1357 \************************************************************/
1358 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1359
1360 "use strict";
1361
1362
1363 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1364
1365 var _screenfull = _interopRequireDefault(__webpack_require__(/*! ./screenfull */ "../assets/dev/js/frontend/utils/lightbox/screenfull.js"));
1366
1367 var _eIcons = __webpack_require__(/*! @elementor/e-icons */ "../assets/dev/js/frontend/utils/icons/e-icons.js");
1368
1369 module.exports = elementorModules.ViewModule.extend({
1370 oldAspectRatio: null,
1371 oldAnimation: null,
1372 swiper: null,
1373 player: null,
1374 isFontIconSvgExperiment: elementorFrontend.config.experimentalFeatures.e_font_icon_svg,
1375 getDefaultSettings: function () {
1376 return {
1377 classes: {
1378 aspectRatio: 'elementor-aspect-ratio-%s',
1379 item: 'elementor-lightbox-item',
1380 image: 'elementor-lightbox-image',
1381 videoContainer: 'elementor-video-container',
1382 videoWrapper: 'elementor-fit-aspect-ratio',
1383 playButton: 'elementor-custom-embed-play',
1384 playButtonIcon: 'fa',
1385 playing: 'elementor-playing',
1386 hidden: 'elementor-hidden',
1387 invisible: 'elementor-invisible',
1388 preventClose: 'elementor-lightbox-prevent-close',
1389 slideshow: {
1390 container: 'swiper-container',
1391 slidesWrapper: 'swiper-wrapper',
1392 prevButton: 'elementor-swiper-button elementor-swiper-button-prev',
1393 nextButton: 'elementor-swiper-button elementor-swiper-button-next',
1394 prevButtonIcon: 'eicon-chevron-left',
1395 nextButtonIcon: 'eicon-chevron-right',
1396 slide: 'swiper-slide',
1397 header: 'elementor-slideshow__header',
1398 footer: 'elementor-slideshow__footer',
1399 title: 'elementor-slideshow__title',
1400 description: 'elementor-slideshow__description',
1401 counter: 'elementor-slideshow__counter',
1402 iconExpand: 'eicon-frame-expand',
1403 iconShrink: 'eicon-frame-minimize',
1404 iconZoomIn: 'eicon-zoom-in-bold',
1405 iconZoomOut: 'eicon-zoom-out-bold',
1406 iconShare: 'eicon-share-arrow',
1407 shareMenu: 'elementor-slideshow__share-menu',
1408 shareLinks: 'elementor-slideshow__share-links',
1409 hideUiVisibility: 'elementor-slideshow--ui-hidden',
1410 shareMode: 'elementor-slideshow--share-mode',
1411 fullscreenMode: 'elementor-slideshow--fullscreen-mode',
1412 zoomMode: 'elementor-slideshow--zoom-mode'
1413 }
1414 },
1415 selectors: {
1416 image: '.elementor-lightbox-image',
1417 links: 'a, [data-elementor-lightbox]',
1418 slideshow: {
1419 activeSlide: '.swiper-slide-active',
1420 prevSlide: '.swiper-slide-prev',
1421 nextSlide: '.swiper-slide-next'
1422 }
1423 },
1424 modalOptions: {
1425 id: 'elementor-lightbox',
1426 entranceAnimation: 'zoomIn',
1427 videoAspectRatio: 169,
1428 position: {
1429 enable: false
1430 }
1431 }
1432 };
1433 },
1434 getModal: function () {
1435 if (!module.exports.modal) {
1436 this.initModal();
1437 }
1438
1439 return module.exports.modal;
1440 },
1441 initModal: function () {
1442 const closeIcon = {}; // If the experiment is active the closeIcon should be an entire SVG element otherwise it should pass the eicon class name.
1443
1444 if (this.isFontIconSvgExperiment) {
1445 closeIcon.iconElement = _eIcons.close.element;
1446 } else {
1447 closeIcon.iconClass = 'eicon-close';
1448 }
1449
1450 const modal = module.exports.modal = elementorFrontend.getDialogsManager().createWidget('lightbox', {
1451 className: 'elementor-lightbox',
1452 closeButton: true,
1453 closeButtonOptions: { ...closeIcon,
1454 attributes: {
1455 tabindex: 0,
1456 role: 'button',
1457 'aria-label': elementorFrontend.config.i18n.close + ' (Esc)'
1458 }
1459 },
1460 selectors: {
1461 preventClose: '.' + this.getSettings('classes.preventClose')
1462 },
1463 hide: {
1464 onClick: true
1465 }
1466 });
1467 modal.on('hide', function () {
1468 modal.setMessage('');
1469 });
1470 },
1471 showModal: function (options) {
1472 if (options.url && !options.url.startsWith('http')) {
1473 return;
1474 }
1475
1476 this.elements.$closeButton = this.getModal().getElements('closeButton');
1477 this.$buttons = this.elements.$closeButton;
1478 this.focusedButton = null;
1479 const self = this,
1480 defaultOptions = self.getDefaultSettings().modalOptions;
1481 self.id = options.id;
1482 self.setSettings('modalOptions', jQuery.extend(defaultOptions, options.modalOptions));
1483 const modal = self.getModal();
1484 modal.setID(self.getSettings('modalOptions.id'));
1485
1486 modal.onShow = function () {
1487 DialogsManager.getWidgetType('lightbox').prototype.onShow.apply(modal, arguments);
1488 self.setEntranceAnimation();
1489 };
1490
1491 modal.onHide = function () {
1492 DialogsManager.getWidgetType('lightbox').prototype.onHide.apply(modal, arguments);
1493 modal.getElements('message').removeClass('animated');
1494
1495 if (_screenfull.default.isFullscreen) {
1496 self.deactivateFullscreen();
1497 }
1498
1499 self.unbindHotKeys();
1500 };
1501
1502 switch (options.type) {
1503 case 'video':
1504 self.setVideoContent(options);
1505 break;
1506
1507 case 'image':
1508 const slides = [{
1509 image: options.url,
1510 index: 0,
1511 title: options.title,
1512 description: options.description,
1513 hash: options.hash
1514 }];
1515 options.slideshow = {
1516 slides,
1517 swiper: {
1518 loop: false,
1519 pagination: false
1520 }
1521 };
1522
1523 case 'slideshow':
1524 self.setSlideshowContent(options.slideshow);
1525 break;
1526
1527 default:
1528 self.setHTMLContent(options.html);
1529 }
1530
1531 modal.show();
1532 },
1533 createLightbox: function (element) {
1534 let lightboxData = {};
1535
1536 if (element.dataset.elementorLightbox) {
1537 lightboxData = JSON.parse(element.dataset.elementorLightbox);
1538 }
1539
1540 if (lightboxData.type && 'slideshow' !== lightboxData.type) {
1541 this.showModal(lightboxData);
1542 return;
1543 }
1544
1545 if (!element.dataset.elementorLightboxSlideshow) {
1546 const slideshowID = 'single-img';
1547 this.showModal({
1548 type: 'image',
1549 id: slideshowID,
1550 url: element.href,
1551 hash: element.getAttribute('e-action-hash'),
1552 title: element.dataset.elementorLightboxTitle,
1553 description: element.dataset.elementorLightboxDescription,
1554 modalOptions: {
1555 id: 'elementor-lightbox-slideshow-' + slideshowID
1556 }
1557 });
1558 return;
1559 }
1560
1561 const initialSlideURL = element.dataset.elementorLightboxVideo || element.href;
1562 this.openSlideshow(element.dataset.elementorLightboxSlideshow, initialSlideURL);
1563 },
1564 setHTMLContent: function (html) {
1565 if (window.elementorCommon) {
1566 elementorCommon.helpers.hardDeprecated('elementorFrontend.utils.lightbox.setHTMLContent', '3.1.4');
1567 }
1568
1569 this.getModal().setMessage(html);
1570 },
1571 setVideoContent: function (options) {
1572 const $ = jQuery,
1573 classes = this.getSettings('classes'),
1574 $videoContainer = $('<div>', {
1575 class: `${classes.videoContainer} ${classes.preventClose}`
1576 }),
1577 $videoWrapper = $('<div>', {
1578 class: classes.videoWrapper
1579 }),
1580 modal = this.getModal();
1581 let $videoElement;
1582
1583 if ('hosted' === options.videoType) {
1584 const videoParams = $.extend({
1585 src: options.url,
1586 autoplay: ''
1587 }, options.videoParams);
1588 $videoElement = $('<video>', videoParams);
1589 } else {
1590 let apiProvider;
1591
1592 if (-1 !== options.url.indexOf('vimeo.com')) {
1593 apiProvider = elementorFrontend.utils.vimeo;
1594 } else if (options.url.match(/^(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com|youtube-nocookie\.com)/)) {
1595 apiProvider = elementorFrontend.utils.youtube;
1596 } else {
1597 return;
1598 }
1599
1600 $videoElement = $('<iframe>', {
1601 src: apiProvider.getAutoplayURL(options.url),
1602 allowfullscreen: 1
1603 });
1604 }
1605
1606 $videoContainer.append($videoWrapper);
1607 $videoWrapper.append($videoElement);
1608 modal.setMessage($videoContainer);
1609 this.setVideoAspectRatio();
1610 const onHideMethod = modal.onHide;
1611
1612 modal.onHide = function () {
1613 onHideMethod();
1614 this.$buttons = jQuery();
1615 this.focusedButton = null;
1616 modal.getElements('message').removeClass('elementor-fit-aspect-ratio');
1617 };
1618 },
1619 getShareLinks: function () {
1620 const {
1621 i18n
1622 } = elementorFrontend.config,
1623 socialNetworks = {
1624 facebook: {
1625 label: i18n.shareOnFacebook,
1626 iconElement: _eIcons.facebook
1627 },
1628 twitter: {
1629 label: i18n.shareOnTwitter,
1630 iconElement: _eIcons.twitter
1631 },
1632 pinterest: {
1633 label: i18n.pinIt,
1634 iconElement: _eIcons.pinterest
1635 }
1636 },
1637 $ = jQuery,
1638 classes = this.getSettings('classes'),
1639 selectors = this.getSettings('selectors'),
1640 $linkList = $('<div>', {
1641 class: classes.slideshow.shareLinks
1642 }),
1643 $activeSlide = this.getSlide('active'),
1644 $image = $activeSlide.find(selectors.image),
1645 videoUrl = $activeSlide.data('elementor-slideshow-video');
1646 let itemUrl;
1647
1648 if (videoUrl) {
1649 itemUrl = videoUrl;
1650 } else {
1651 itemUrl = $image.attr('src');
1652 }
1653
1654 $.each(socialNetworks, (key, data) => {
1655 const networkLabel = data.label,
1656 $link = $('<a>', {
1657 href: this.createShareLink(key, itemUrl, $activeSlide.attr('e-action-hash')),
1658 target: '_blank'
1659 }).text(networkLabel),
1660 $socialNetworkIconElement = this.isFontIconSvgExperiment ? $(data.iconElement.element) : $('<i>', {
1661 class: 'eicon-' + key
1662 });
1663 $link.prepend($socialNetworkIconElement);
1664 $linkList.append($link);
1665 });
1666
1667 if (!videoUrl) {
1668 const $downloadIcon = this.isFontIconSvgExperiment ? $(_eIcons.downloadBold.element) : $('<i>', {
1669 class: 'eicon-download-bold'
1670 });
1671 $downloadIcon.attr('aria-label', i18n.download);
1672 $linkList.append($('<a>', {
1673 href: itemUrl,
1674 download: ''
1675 }).text(i18n.downloadImage).prepend($downloadIcon));
1676 }
1677
1678 return $linkList;
1679 },
1680 createShareLink: function (networkName, itemUrl, hash = null) {
1681 const options = {};
1682
1683 if ('pinterest' === networkName) {
1684 options.image = encodeURIComponent(itemUrl);
1685 } else {
1686 options.url = encodeURIComponent(location.href.replace(/#.*/, '') + hash);
1687 }
1688
1689 return ShareLink.getNetworkLink(networkName, options);
1690 },
1691 getSlideshowHeader: function () {
1692 const {
1693 i18n
1694 } = elementorFrontend.config,
1695 $ = jQuery,
1696 showCounter = 'yes' === elementorFrontend.getKitSettings('lightbox_enable_counter'),
1697 showFullscreen = 'yes' === elementorFrontend.getKitSettings('lightbox_enable_fullscreen'),
1698 showZoom = 'yes' === elementorFrontend.getKitSettings('lightbox_enable_zoom'),
1699 showShare = 'yes' === elementorFrontend.getKitSettings('lightbox_enable_share'),
1700 classes = this.getSettings('classes'),
1701 slideshowClasses = classes.slideshow,
1702 elements = this.elements;
1703
1704 if (!(showCounter || showFullscreen || showZoom || showShare)) {
1705 return;
1706 }
1707
1708 elements.$header = $('<header>', {
1709 class: slideshowClasses.header + ' ' + classes.preventClose
1710 });
1711
1712 if (showShare) {
1713 const iconElement = this.isFontIconSvgExperiment ? _eIcons.shareArrow.element : '<i>';
1714 elements.$iconShare = $(iconElement, {
1715 class: slideshowClasses.iconShare,
1716 role: 'button',
1717 'aria-label': i18n.share,
1718 'aria-expanded': false
1719 }).append($('<span>'));
1720 const $shareLinks = $('<div>');
1721 $shareLinks.on('click', e => {
1722 e.stopPropagation();
1723 });
1724 elements.$shareMenu = $('<div>', {
1725 class: slideshowClasses.shareMenu
1726 }).append($shareLinks);
1727 elements.$iconShare.add(elements.$shareMenu).on('click', this.toggleShareMenu);
1728 elements.$header.append(elements.$iconShare, elements.$shareMenu);
1729 this.$buttons = this.$buttons.add(elements.$iconShare);
1730 }
1731
1732 if (showZoom) {
1733 const iconElement = this.isFontIconSvgExperiment ? _eIcons.zoomInBold.element : '<i>',
1734 showZoomElements = [],
1735 showZoomAttrs = {
1736 role: 'switch',
1737 'aria-checked': false,
1738 'aria-label': i18n.zoom
1739 },
1740 zoomAttrs = { ...showZoomAttrs
1741 };
1742
1743 if (!this.isFontIconSvgExperiment) {
1744 zoomAttrs.class = slideshowClasses.iconZoomIn;
1745 }
1746
1747 elements.$iconZoom = $(iconElement).attr(zoomAttrs).on('click', this.toggleZoomMode);
1748 showZoomElements.push(elements.$iconZoom);
1749
1750 if (this.isFontIconSvgExperiment) {
1751 elements.$iconZoomOut = $(_eIcons.zoomOutBold.element).attr(showZoomAttrs).addClass(classes.hidden).on('click', this.toggleZoomMode);
1752 showZoomElements.push(elements.$iconZoomOut);
1753 }
1754
1755 elements.$header.append(showZoomElements);
1756 this.$buttons = this.$buttons.add(showZoomElements);
1757 }
1758
1759 if (showFullscreen) {
1760 const iconElement = this.isFontIconSvgExperiment ? _eIcons.frameExpand.element : '<i>',
1761 fullScreenElements = [],
1762 fullScreenAttrs = {
1763 role: 'switch',
1764 'aria-checked': false,
1765 'aria-label': i18n.fullscreen
1766 },
1767 expandAttrs = { ...fullScreenAttrs
1768 }; // Only if the experiment is not active, we use the class-name in order to render the icon.
1769
1770 if (!this.isFontIconSvgExperiment) {
1771 expandAttrs.class = slideshowClasses.iconExpand;
1772 }
1773
1774 elements.$iconExpand = $(iconElement).append($('<span>'), $('<span>')).attr(expandAttrs).on('click', this.toggleFullscreen);
1775 fullScreenElements.push(elements.$iconExpand);
1776
1777 if (this.isFontIconSvgExperiment) {
1778 elements.$iconMinimize = $(_eIcons.frameMinimize.element).attr(fullScreenAttrs).addClass(classes.hidden).on('click', this.toggleFullscreen);
1779 fullScreenElements.push(elements.$iconMinimize);
1780 }
1781
1782 elements.$header.append(fullScreenElements);
1783 this.$buttons = this.$buttons.add(fullScreenElements);
1784 }
1785
1786 if (showCounter) {
1787 elements.$counter = $('<span>', {
1788 class: slideshowClasses.counter
1789 });
1790 elements.$header.append(elements.$counter);
1791 }
1792
1793 return elements.$header;
1794 },
1795 toggleFullscreen: function () {
1796 if (_screenfull.default.isFullscreen) {
1797 this.deactivateFullscreen();
1798 } else if (_screenfull.default.isEnabled) {
1799 this.activateFullscreen();
1800 }
1801 },
1802 toggleZoomMode: function () {
1803 if (1 !== this.swiper.zoom.scale) {
1804 this.deactivateZoom();
1805 } else {
1806 this.activateZoom();
1807 }
1808 },
1809 toggleShareMenu: function () {
1810 if (this.shareMode) {
1811 this.deactivateShareMode();
1812 } else {
1813 this.elements.$shareMenu.html(this.getShareLinks());
1814 this.activateShareMode();
1815 }
1816 },
1817 activateShareMode: function () {
1818 const classes = this.getSettings('classes');
1819 this.elements.$container.addClass(classes.slideshow.shareMode);
1820 this.elements.$iconShare.attr('aria-expanded', true); // Prevent swiper interactions while in share mode
1821
1822 this.swiper.detachEvents(); // Temporarily replace tabbable buttons with share-menu items
1823
1824 this.$originalButtons = this.$buttons;
1825 this.$buttons = this.elements.$iconShare.add(this.elements.$shareMenu.find('a'));
1826 this.shareMode = true;
1827 },
1828 deactivateShareMode: function () {
1829 const classes = this.getSettings('classes');
1830 this.elements.$container.removeClass(classes.slideshow.shareMode);
1831 this.elements.$iconShare.attr('aria-expanded', false);
1832 this.swiper.attachEvents();
1833 this.$buttons = this.$originalButtons;
1834 this.shareMode = false;
1835 },
1836 activateFullscreen: function () {
1837 const classes = this.getSettings('classes');
1838
1839 _screenfull.default.request(this.elements.$container.parents('.dialog-widget')[0]);
1840
1841 if (this.isFontIconSvgExperiment) {
1842 this.elements.$iconExpand.addClass(classes.hidden).attr('aria-checked', 'false');
1843 this.elements.$iconMinimize.removeClass(classes.hidden).attr('aria-checked', 'true');
1844 } else {
1845 this.elements.$iconExpand.removeClass(classes.slideshow.iconExpand).addClass(classes.slideshow.iconShrink).attr('aria-checked', 'true');
1846 }
1847
1848 this.elements.$container.addClass(classes.slideshow.fullscreenMode);
1849 },
1850 deactivateFullscreen: function () {
1851 const classes = this.getSettings('classes');
1852
1853 _screenfull.default.exit();
1854
1855 if (this.isFontIconSvgExperiment) {
1856 this.elements.$iconExpand.removeClass(classes.hidden).attr('aria-checked', 'true');
1857 this.elements.$iconMinimize.addClass(classes.hidden).attr('aria-checked', 'false');
1858 } else {
1859 this.elements.$iconExpand.removeClass(classes.slideshow.iconShrink).addClass(classes.slideshow.iconExpand).attr('aria-checked', 'false');
1860 }
1861
1862 this.elements.$container.removeClass(classes.slideshow.fullscreenMode);
1863 },
1864 activateZoom: function () {
1865 const swiper = this.swiper,
1866 elements = this.elements,
1867 classes = this.getSettings('classes');
1868 swiper.zoom.in();
1869 swiper.allowSlideNext = false;
1870 swiper.allowSlidePrev = false;
1871 swiper.allowTouchMove = false;
1872 elements.$container.addClass(classes.slideshow.zoomMode);
1873
1874 if (this.isFontIconSvgExperiment) {
1875 elements.$iconZoom.addClass(classes.hidden).attr('aria-checked', 'false');
1876 elements.$iconZoomOut.removeClass(classes.hidden).attr('aria-checked', 'true');
1877 } else {
1878 elements.$iconZoom.removeClass(classes.slideshow.iconZoomIn).addClass(classes.slideshow.iconZoomOut);
1879 }
1880 },
1881 deactivateZoom: function () {
1882 const swiper = this.swiper,
1883 elements = this.elements,
1884 classes = this.getSettings('classes');
1885 swiper.zoom.out();
1886 swiper.allowSlideNext = true;
1887 swiper.allowSlidePrev = true;
1888 swiper.allowTouchMove = true;
1889 elements.$container.removeClass(classes.slideshow.zoomMode);
1890
1891 if (this.isFontIconSvgExperiment) {
1892 elements.$iconZoom.removeClass(classes.hidden).attr('aria-checked', 'true');
1893 elements.$iconZoomOut.addClass(classes.hidden).attr('aria-checked', 'false');
1894 } else {
1895 elements.$iconZoom.removeClass(classes.slideshow.iconZoomOut).addClass(classes.slideshow.iconZoomIn);
1896 }
1897 },
1898 getSlideshowFooter: function () {
1899 const $ = jQuery,
1900 classes = this.getSettings('classes'),
1901 $footer = $('<footer>', {
1902 class: classes.slideshow.footer + ' ' + classes.preventClose
1903 }),
1904 $title = $('<div>', {
1905 class: classes.slideshow.title
1906 }),
1907 $description = $('<div>', {
1908 class: classes.slideshow.description
1909 });
1910 $footer.append($title, $description);
1911 return $footer;
1912 },
1913 setSlideshowContent: function (options) {
1914 const {
1915 i18n
1916 } = elementorFrontend.config,
1917 $ = jQuery,
1918 isSingleSlide = 1 === options.slides.length,
1919 hasTitle = '' !== elementorFrontend.getKitSettings('lightbox_title_src'),
1920 hasDescription = '' !== elementorFrontend.getKitSettings('lightbox_description_src'),
1921 showFooter = hasTitle || hasDescription,
1922 classes = this.getSettings('classes'),
1923 slideshowClasses = classes.slideshow,
1924 $container = $('<div>', {
1925 class: slideshowClasses.container
1926 }),
1927 $slidesWrapper = $('<div>', {
1928 class: slideshowClasses.slidesWrapper
1929 });
1930 let $prevButton, $nextButton;
1931 options.slides.forEach(slide => {
1932 let slideClass = slideshowClasses.slide + ' ' + classes.item;
1933
1934 if (slide.video) {
1935 slideClass += ' ' + classes.video;
1936 }
1937
1938 const $slide = $('<div>', {
1939 class: slideClass
1940 });
1941
1942 if (slide.video) {
1943 $slide.attr('data-elementor-slideshow-video', slide.video);
1944 const playVideoLoadingElement = this.isFontIconSvgExperiment ? _eIcons.loading.element : '<i>',
1945 $playIcon = $('<div>', {
1946 class: classes.playButton
1947 }).html($(playVideoLoadingElement).attr('aria-label', i18n.playVideo).addClass(classes.playButtonIcon));
1948 $slide.append($playIcon);
1949 } else {
1950 const $zoomContainer = $('<div>', {
1951 class: 'swiper-zoom-container'
1952 }),
1953 $slidePlaceholder = $('<div class="swiper-lazy-preloader"></div>'),
1954 imageAttributes = {
1955 'data-src': slide.image,
1956 class: classes.image + ' ' + classes.preventClose + ' swiper-lazy'
1957 };
1958
1959 if (slide.title) {
1960 imageAttributes['data-title'] = slide.title;
1961 imageAttributes.alt = slide.title;
1962 }
1963
1964 if (slide.description) {
1965 imageAttributes['data-description'] = slide.description;
1966 imageAttributes.alt += ' - ' + slide.description;
1967 }
1968
1969 const $slideImage = $('<img>', imageAttributes);
1970 $zoomContainer.append([$slideImage, $slidePlaceholder]);
1971 $slide.append($zoomContainer);
1972 }
1973
1974 if (slide.hash) {
1975 $slide.attr('e-action-hash', slide.hash);
1976 }
1977
1978 $slidesWrapper.append($slide);
1979 });
1980 this.elements.$container = $container;
1981 this.elements.$header = this.getSlideshowHeader();
1982 $container.prepend(this.elements.$header).append($slidesWrapper);
1983
1984 if (!isSingleSlide) {
1985 const $prevButtonIcon = this.isFontIconSvgExperiment ? $(_eIcons.chevronLeft.element) : $('<i>', {
1986 class: slideshowClasses.prevButtonIcon
1987 }),
1988 $nextButtonIcon = this.isFontIconSvgExperiment ? $(_eIcons.chevronRight.element) : $('<i>', {
1989 class: slideshowClasses.nextButtonIcon
1990 });
1991 $prevButton = $('<div>', {
1992 class: slideshowClasses.prevButton + ' ' + classes.preventClose,
1993 'aria-label': i18n.previous
1994 }).html($prevButtonIcon);
1995 $nextButton = $('<div>', {
1996 class: slideshowClasses.nextButton + ' ' + classes.preventClose,
1997 'aria-label': i18n.next
1998 }).html($nextButtonIcon);
1999 $container.append($nextButton, $prevButton);
2000 this.$buttons = this.$buttons.add($nextButton).add($prevButton);
2001 }
2002
2003 if (showFooter) {
2004 this.elements.$footer = this.getSlideshowFooter();
2005 $container.append(this.elements.$footer);
2006 }
2007
2008 this.setSettings('hideUiTimeout', '');
2009 $container.on('click mousemove keypress', this.showLightboxUi);
2010 const modal = this.getModal();
2011 modal.setMessage($container);
2012 const onShowMethod = modal.onShow;
2013
2014 modal.onShow = async () => {
2015 onShowMethod();
2016 const swiperOptions = {
2017 pagination: {
2018 el: '.' + slideshowClasses.counter,
2019 type: 'fraction'
2020 },
2021 on: {
2022 slideChangeTransitionEnd: this.onSlideChange
2023 },
2024 lazy: {
2025 loadPrevNext: true
2026 },
2027 zoom: true,
2028 spaceBetween: 100,
2029 grabCursor: true,
2030 runCallbacksOnInit: false,
2031 loop: true,
2032 keyboard: true,
2033 handleElementorBreakpoints: true
2034 };
2035
2036 if (!isSingleSlide) {
2037 swiperOptions.navigation = {
2038 prevEl: $prevButton,
2039 nextEl: $nextButton
2040 };
2041 }
2042
2043 if (options.swiper) {
2044 $.extend(swiperOptions, options.swiper);
2045 }
2046
2047 const Swiper = elementorFrontend.utils.swiper;
2048 this.swiper = await new Swiper($container, swiperOptions); // Expose the swiper instance in the frontend
2049
2050 $container.data('swiper', this.swiper);
2051 this.setVideoAspectRatio();
2052 this.playSlideVideo();
2053
2054 if (showFooter) {
2055 this.updateFooterText();
2056 }
2057
2058 this.bindHotKeys();
2059 this.makeButtonsAccessible();
2060 };
2061 },
2062 makeButtonsAccessible: function () {
2063 this.$buttons.attr('tabindex', 0).on('keypress', event => {
2064 const ENTER_KEY = 13,
2065 SPACE_KEY = 32;
2066
2067 if (ENTER_KEY === event.which || SPACE_KEY === event.which) {
2068 jQuery(event.currentTarget).trigger('click');
2069 }
2070 });
2071 },
2072 showLightboxUi: function () {
2073 const slideshowClasses = this.getSettings('classes').slideshow;
2074 this.elements.$container.removeClass(slideshowClasses.hideUiVisibility);
2075 clearTimeout(this.getSettings('hideUiTimeout'));
2076 this.setSettings('hideUiTimeout', setTimeout(() => {
2077 if (!this.shareMode) {
2078 this.elements.$container.addClass(slideshowClasses.hideUiVisibility);
2079 }
2080 }, 3500));
2081 },
2082 bindHotKeys: function () {
2083 this.getModal().getElements('window').on('keydown', this.activeKeyDown);
2084 },
2085 unbindHotKeys: function () {
2086 this.getModal().getElements('window').off('keydown', this.activeKeyDown);
2087 },
2088 activeKeyDown: function (event) {
2089 this.showLightboxUi();
2090 const TAB_KEY = 9;
2091
2092 if (event.which === TAB_KEY) {
2093 const $buttons = this.$buttons;
2094 let focusedButton,
2095 isFirst = false,
2096 isLast = false;
2097 $buttons.each(index => {
2098 const item = $buttons[index];
2099
2100 if (jQuery(item).is(':focus')) {
2101 focusedButton = item;
2102 isFirst = 0 === index;
2103 isLast = $buttons.length - 1 === index;
2104 return false;
2105 }
2106 });
2107
2108 if (event.shiftKey) {
2109 if (isFirst) {
2110 event.preventDefault();
2111 $buttons.last().trigger('focus');
2112 }
2113 } else if (isLast || !focusedButton) {
2114 event.preventDefault();
2115 $buttons.first().trigger('focus');
2116 }
2117 }
2118 },
2119 setVideoAspectRatio: function (aspectRatio) {
2120 aspectRatio = aspectRatio || this.getSettings('modalOptions.videoAspectRatio');
2121 const $widgetContent = this.getModal().getElements('widgetContent'),
2122 oldAspectRatio = this.oldAspectRatio,
2123 aspectRatioClass = this.getSettings('classes.aspectRatio');
2124 this.oldAspectRatio = aspectRatio;
2125
2126 if (oldAspectRatio) {
2127 $widgetContent.removeClass(aspectRatioClass.replace('%s', oldAspectRatio));
2128 }
2129
2130 if (aspectRatio) {
2131 $widgetContent.addClass(aspectRatioClass.replace('%s', aspectRatio));
2132 }
2133 },
2134 getSlide: function (slideState) {
2135 return jQuery(this.swiper.slides).filter(this.getSettings('selectors.slideshow.' + slideState + 'Slide'));
2136 },
2137 updateFooterText: function () {
2138 if (!this.elements.$footer) {
2139 return;
2140 }
2141
2142 const classes = this.getSettings('classes'),
2143 $activeSlide = this.getSlide('active'),
2144 $image = $activeSlide.find('.elementor-lightbox-image'),
2145 titleText = $image.data('title'),
2146 descriptionText = $image.data('description'),
2147 $title = this.elements.$footer.find('.' + classes.slideshow.title),
2148 $description = this.elements.$footer.find('.' + classes.slideshow.description);
2149 $title.text(titleText || '');
2150 $description.text(descriptionText || '');
2151 },
2152 playSlideVideo: function () {
2153 const $activeSlide = this.getSlide('active'),
2154 videoURL = $activeSlide.data('elementor-slideshow-video');
2155
2156 if (!videoURL) {
2157 return;
2158 }
2159
2160 const classes = this.getSettings('classes'),
2161 $videoContainer = jQuery('<div>', {
2162 class: classes.videoContainer + ' ' + classes.invisible
2163 }),
2164 $videoWrapper = jQuery('<div>', {
2165 class: classes.videoWrapper
2166 }),
2167 $playIcon = $activeSlide.children('.' + classes.playButton);
2168 let videoType, apiProvider;
2169 $videoContainer.append($videoWrapper);
2170 $activeSlide.append($videoContainer);
2171
2172 if (-1 !== videoURL.indexOf('vimeo.com')) {
2173 videoType = 'vimeo';
2174 apiProvider = elementorFrontend.utils.vimeo;
2175 } else if (videoURL.match(/^(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com)/)) {
2176 videoType = 'youtube';
2177 apiProvider = elementorFrontend.utils.youtube;
2178 }
2179
2180 const videoID = apiProvider.getVideoIDFromURL(videoURL);
2181 apiProvider.onApiReady(apiObject => {
2182 if ('youtube' === videoType) {
2183 this.prepareYTVideo(apiObject, videoID, $videoContainer, $videoWrapper, $playIcon);
2184 } else if ('vimeo' === videoType) {
2185 this.prepareVimeoVideo(apiObject, videoURL, $videoContainer, $videoWrapper, $playIcon);
2186 }
2187 });
2188 $playIcon.addClass(classes.playing).removeClass(classes.hidden);
2189 },
2190 prepareYTVideo: function (YT, videoID, $videoContainer, $videoWrapper, $playIcon) {
2191 const classes = this.getSettings('classes'),
2192 $videoPlaceholderElement = jQuery('<div>');
2193 let startStateCode = YT.PlayerState.PLAYING;
2194 $videoWrapper.append($videoPlaceholderElement); // Since version 67, Chrome doesn't fire the `PLAYING` state at start time
2195
2196 if (window.chrome) {
2197 startStateCode = YT.PlayerState.UNSTARTED;
2198 }
2199
2200 $videoContainer.addClass('elementor-loading' + ' ' + classes.invisible);
2201 this.player = new YT.Player($videoPlaceholderElement[0], {
2202 videoId: videoID,
2203 events: {
2204 onReady: () => {
2205 $playIcon.addClass(classes.hidden);
2206 $videoContainer.removeClass(classes.invisible);
2207 this.player.playVideo();
2208 },
2209 onStateChange: event => {
2210 if (event.data === startStateCode) {
2211 $videoContainer.removeClass('elementor-loading' + ' ' + classes.invisible);
2212 }
2213 }
2214 },
2215 playerVars: {
2216 controls: 0,
2217 rel: 0
2218 }
2219 });
2220 },
2221 prepareVimeoVideo: function (Vimeo, videoURL, $videoContainer, $videoWrapper, $playIcon) {
2222 const classes = this.getSettings('classes'),
2223 vimeoOptions = {
2224 url: videoURL,
2225 autoplay: true,
2226 transparent: false,
2227 playsinline: false
2228 };
2229 this.player = new Vimeo.Player($videoWrapper, vimeoOptions);
2230 this.player.ready().then(() => {
2231 $playIcon.addClass(classes.hidden);
2232 $videoContainer.removeClass(classes.invisible);
2233 });
2234 },
2235 setEntranceAnimation: function (animation) {
2236 animation = animation || elementorFrontend.getCurrentDeviceSetting(this.getSettings('modalOptions'), 'entranceAnimation');
2237 const $widgetMessage = this.getModal().getElements('message');
2238
2239 if (this.oldAnimation) {
2240 $widgetMessage.removeClass(this.oldAnimation);
2241 }
2242
2243 this.oldAnimation = animation;
2244
2245 if (animation) {
2246 $widgetMessage.addClass('animated ' + animation);
2247 }
2248 },
2249 openSlideshow: function (slideshowID, initialSlideURL) {
2250 const $allSlideshowLinks = jQuery(this.getSettings('selectors.links')).filter((index, element) => {
2251 const $element = jQuery(element);
2252 return slideshowID === element.dataset.elementorLightboxSlideshow && !$element.parent('.swiper-slide-duplicate').length && !$element.parents('.slick-cloned').length;
2253 });
2254 const slides = [];
2255 let initialSlideIndex = 0;
2256 $allSlideshowLinks.each(function () {
2257 const slideVideo = this.dataset.elementorLightboxVideo;
2258 let slideIndex = this.dataset.elementorLightboxIndex;
2259
2260 if (undefined === slideIndex) {
2261 slideIndex = $allSlideshowLinks.index(this);
2262 }
2263
2264 if (initialSlideURL === this.href || slideVideo && initialSlideURL === slideVideo) {
2265 initialSlideIndex = slideIndex;
2266 }
2267
2268 const slideData = {
2269 image: this.href,
2270 index: slideIndex,
2271 title: this.dataset.elementorLightboxTitle,
2272 description: this.dataset.elementorLightboxDescription,
2273 hash: this.getAttribute('e-action-hash')
2274 };
2275
2276 if (slideVideo) {
2277 slideData.video = slideVideo;
2278 }
2279
2280 slides.push(slideData);
2281 });
2282 slides.sort((a, b) => a.index - b.index);
2283 this.showModal({
2284 type: 'slideshow',
2285 id: slideshowID,
2286 modalOptions: {
2287 id: 'elementor-lightbox-slideshow-' + slideshowID
2288 },
2289 slideshow: {
2290 slides: slides,
2291 swiper: {
2292 initialSlide: +initialSlideIndex
2293 }
2294 }
2295 });
2296 },
2297 onSlideChange: function () {
2298 this.getSlide('prev').add(this.getSlide('next')).add(this.getSlide('active')).find('.' + this.getSettings('classes.videoWrapper')).remove();
2299 this.playSlideVideo();
2300 this.updateFooterText();
2301 }
2302 });
2303
2304 /***/ }),
2305
2306 /***/ "../assets/dev/js/frontend/utils/lightbox/screenfull.js":
2307 /*!**************************************************************!*\
2308 !*** ../assets/dev/js/frontend/utils/lightbox/screenfull.js ***!
2309 \**************************************************************/
2310 /***/ ((module) => {
2311
2312 "use strict";
2313
2314
2315 (function () {
2316 'use strict';
2317
2318 var document = typeof window !== 'undefined' && typeof window.document !== 'undefined' ? window.document : {};
2319 var isCommonjs = true && module.exports;
2320
2321 var fn = function () {
2322 var val;
2323 var fnMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror'], // New WebKit
2324 ['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror'], // Old WebKit
2325 ['webkitRequestFullScreen', 'webkitCancelFullScreen', 'webkitCurrentFullScreenElement', 'webkitCancelFullScreen', 'webkitfullscreenchange', 'webkitfullscreenerror'], ['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror'], ['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError']];
2326 var i = 0;
2327 var l = fnMap.length;
2328 var ret = {};
2329
2330 for (; i < l; i++) {
2331 val = fnMap[i];
2332
2333 if (val && val[1] in document) {
2334 var valLength = val.length;
2335
2336 for (i = 0; i < valLength; i++) {
2337 ret[fnMap[0][i]] = val[i];
2338 }
2339
2340 return ret;
2341 }
2342 }
2343
2344 return false;
2345 }();
2346
2347 var eventNameMap = {
2348 change: fn.fullscreenchange,
2349 error: fn.fullscreenerror
2350 };
2351 var screenfull = {
2352 request: function (element) {
2353 return new Promise(function (resolve, reject) {
2354 var onFullScreenEntered = function () {
2355 this.off('change', onFullScreenEntered);
2356 resolve();
2357 }.bind(this);
2358
2359 this.on('change', onFullScreenEntered);
2360 element = element || document.documentElement;
2361 Promise.resolve(element[fn.requestFullscreen]()).catch(reject);
2362 }.bind(this));
2363 },
2364 exit: function () {
2365 return new Promise(function (resolve, reject) {
2366 if (!this.isFullscreen) {
2367 resolve();
2368 return;
2369 }
2370
2371 var onFullScreenExit = function () {
2372 this.off('change', onFullScreenExit);
2373 resolve();
2374 }.bind(this);
2375
2376 this.on('change', onFullScreenExit);
2377 Promise.resolve(document[fn.exitFullscreen]()).catch(reject);
2378 }.bind(this));
2379 },
2380 toggle: function (element) {
2381 return this.isFullscreen ? this.exit() : this.request(element);
2382 },
2383 onchange: function (callback) {
2384 this.on('change', callback);
2385 },
2386 onerror: function (callback) {
2387 this.on('error', callback);
2388 },
2389 on: function (event, callback) {
2390 var eventName = eventNameMap[event];
2391
2392 if (eventName) {
2393 document.addEventListener(eventName, callback, false);
2394 }
2395 },
2396 off: function (event, callback) {
2397 var eventName = eventNameMap[event];
2398
2399 if (eventName) {
2400 document.removeEventListener(eventName, callback, false);
2401 }
2402 },
2403 raw: fn
2404 };
2405
2406 if (!fn) {
2407 if (isCommonjs) {
2408 module.exports = {
2409 isEnabled: false
2410 };
2411 } else {
2412 window.screenfull = {
2413 isEnabled: false
2414 };
2415 }
2416
2417 return;
2418 }
2419
2420 Object.defineProperties(screenfull, {
2421 isFullscreen: {
2422 get: function () {
2423 return Boolean(document[fn.fullscreenElement]);
2424 }
2425 },
2426 element: {
2427 enumerable: true,
2428 get: function () {
2429 return document[fn.fullscreenElement];
2430 }
2431 },
2432 isEnabled: {
2433 enumerable: true,
2434 get: function () {
2435 // Coerce to boolean in case of old WebKit
2436 return Boolean(document[fn.fullscreenEnabled]);
2437 }
2438 }
2439 });
2440
2441 if (isCommonjs) {
2442 module.exports = screenfull;
2443 } else {
2444 window.screenfull = screenfull;
2445 }
2446 })();
2447
2448 /***/ })
2449
2450 },
2451 /******/ __webpack_require__ => { // webpackRuntimeModules
2452 /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
2453 /******/ __webpack_require__.O(0, ["frontend","frontend-modules"], () => (__webpack_exec__("../assets/dev/js/frontend/preloaded-modules.js")));
2454 /******/ var __webpack_exports__ = __webpack_require__.O();
2455 /******/ }
2456 ]);
2457 //# sourceMappingURL=preloaded-modules.js.map