PluginProbe
Elementor Website Builder – more than just a page builder / 3.11.2
Elementor Website Builder – more than just a page builder v3.11.2
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 4.0.7 All 451 releases
elementor / assets / js / preloaded-modules.js

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

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