PluginProbe
Elementor Website Builder – more than just a page builder / 3.23.0-dev3
Elementor Website Builder – more than just a page builder v3.23.0-dev3
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 / frontend.js

frontend.js in Elementor Website Builder – more than just a page builder 3.23.0-dev3, at assets/js/frontend.js

2,804 lines 101.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.23.0 - 01-07-2024 */
2 "use strict";
3 (self["webpackChunkelementor"] = self["webpackChunkelementor"] || []).push([["frontend"],{
4
5 /***/ "../assets/dev/js/frontend/documents-manager.js":
6 /*!******************************************************!*\
7 !*** ../assets/dev/js/frontend/documents-manager.js ***!
8 \******************************************************/
9 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10
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 _document = _interopRequireDefault(__webpack_require__(/*! ./document */ "../assets/dev/js/frontend/document.js"));
19 class _default extends elementorModules.ViewModule {
20 constructor() {
21 super(...arguments);
22 this.documents = {};
23 this.initDocumentClasses();
24 this.attachDocumentsClasses();
25 }
26 getDefaultSettings() {
27 return {
28 selectors: {
29 document: '.elementor'
30 }
31 };
32 }
33 getDefaultElements() {
34 const selectors = this.getSettings('selectors');
35 return {
36 $documents: jQuery(selectors.document)
37 };
38 }
39 initDocumentClasses() {
40 this.documentClasses = {
41 base: _document.default
42 };
43 elementorFrontend.hooks.doAction('elementor/frontend/documents-manager/init-classes', this);
44 }
45 addDocumentClass(documentType, documentClass) {
46 this.documentClasses[documentType] = documentClass;
47 }
48 attachDocumentsClasses() {
49 this.elements.$documents.each((index, document) => this.attachDocumentClass(jQuery(document)));
50 }
51 attachDocumentClass($document) {
52 const documentData = $document.data(),
53 documentID = documentData.elementorId,
54 documentType = documentData.elementorType,
55 DocumentClass = this.documentClasses[documentType] || this.documentClasses.base;
56 this.documents[documentID] = new DocumentClass({
57 $element: $document,
58 id: documentID
59 });
60 }
61 }
62 exports["default"] = _default;
63
64 /***/ }),
65
66 /***/ "../assets/dev/js/frontend/elements-handlers-manager.js":
67 /*!**************************************************************!*\
68 !*** ../assets/dev/js/frontend/elements-handlers-manager.js ***!
69 \**************************************************************/
70 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
71
72
73
74 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
75 var _global = _interopRequireDefault(__webpack_require__(/*! ./handlers/global */ "../assets/dev/js/frontend/handlers/global.js"));
76 var _background = _interopRequireDefault(__webpack_require__(/*! ./handlers/background */ "../assets/dev/js/frontend/handlers/background.js"));
77 var _container = _interopRequireDefault(__webpack_require__(/*! ./handlers/container/container */ "../assets/dev/js/frontend/handlers/container/container.js"));
78 var _column = _interopRequireDefault(__webpack_require__(/*! ./handlers/column */ "../assets/dev/js/frontend/handlers/column.js"));
79 var _handlesPosition = _interopRequireDefault(__webpack_require__(/*! ./handlers/section/handles-position */ "../assets/dev/js/frontend/handlers/section/handles-position.js"));
80 var _stretchedSection = _interopRequireDefault(__webpack_require__(/*! ./handlers/section/stretched-section */ "../assets/dev/js/frontend/handlers/section/stretched-section.js"));
81 var _shapes = _interopRequireDefault(__webpack_require__(/*! ./handlers/section/shapes */ "../assets/dev/js/frontend/handlers/section/shapes.js"));
82 // Section handlers.
83
84 /* global elementorFrontendConfig */
85
86 module.exports = function ($) {
87 var _this = this;
88 const handlersInstances = {};
89 this.elementsHandlers = {
90 'accordion.default': () => __webpack_require__.e(/*! import() | accordion */ "accordion").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/accordion */ "../assets/dev/js/frontend/handlers/accordion.js")),
91 'alert.default': () => __webpack_require__.e(/*! import() | alert */ "alert").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/alert */ "../assets/dev/js/frontend/handlers/alert.js")),
92 'counter.default': () => __webpack_require__.e(/*! import() | counter */ "counter").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/counter */ "../assets/dev/js/frontend/handlers/counter.js")),
93 'progress.default': () => __webpack_require__.e(/*! import() | progress */ "progress").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/progress */ "../assets/dev/js/frontend/handlers/progress.js")),
94 'tabs.default': () => __webpack_require__.e(/*! import() | tabs */ "tabs").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/tabs */ "../assets/dev/js/frontend/handlers/tabs.js")),
95 'toggle.default': () => __webpack_require__.e(/*! import() | toggle */ "toggle").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/toggle */ "../assets/dev/js/frontend/handlers/toggle.js")),
96 'video.default': () => __webpack_require__.e(/*! import() | video */ "video").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/video */ "../assets/dev/js/frontend/handlers/video.js")),
97 'image-carousel.default': () => __webpack_require__.e(/*! import() | image-carousel */ "image-carousel").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/image-carousel */ "../assets/dev/js/frontend/handlers/image-carousel.js")),
98 'text-editor.default': () => __webpack_require__.e(/*! import() | text-editor */ "text-editor").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/text-editor */ "../assets/dev/js/frontend/handlers/text-editor.js")),
99 'wp-widget-media_audio.default': () => __webpack_require__.e(/*! import() | wp-audio */ "wp-audio").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/wp-audio */ "../assets/dev/js/frontend/handlers/wp-audio.js"))
100 };
101 if (elementorFrontendConfig.experimentalFeatures['nested-elements']) {
102 this.elementsHandlers['nested-tabs.default'] = () => Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! elementor/modules/nested-tabs/assets/js/frontend/handlers/nested-tabs */ "../modules/nested-tabs/assets/js/frontend/handlers/nested-tabs.js"));
103 }
104 if (elementorFrontendConfig.experimentalFeatures['nested-elements']) {
105 this.elementsHandlers['nested-accordion.default'] = () => Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! elementor/modules/nested-accordion/assets/js/frontend/handlers/nested-accordion */ "../modules/nested-accordion/assets/js/frontend/handlers/nested-accordion.js"));
106 }
107 if (elementorFrontendConfig.experimentalFeatures['floating-buttons']) {
108 this.elementsHandlers['contact-buttons.default'] = () => Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! elementor/modules/floating-buttons/assets/js/frontend/handlers/contact-buttons */ "../modules/floating-buttons/assets/js/frontend/handlers/contact-buttons.js"));
109 }
110 const addGlobalHandlers = () => elementorFrontend.hooks.addAction('frontend/element_ready/global', _global.default);
111 const addElementsHandlers = () => {
112 this.elementsHandlers.section = [_stretchedSection.default,
113 // Must run before background handlers to init the slideshow only after the stretch.
114 ..._background.default, _handlesPosition.default, _shapes.default];
115 this.elementsHandlers.container = [..._background.default];
116
117 // Add editor-only handlers.
118 if (elementorFrontend.isEditMode()) {
119 this.elementsHandlers.container.push(..._container.default);
120 }
121 this.elementsHandlers.column = _column.default;
122 $.each(this.elementsHandlers, (elementName, Handlers) => {
123 const elementData = elementName.split('.');
124 elementName = elementData[0];
125 const skin = elementData[1] || null;
126 this.attachHandler(elementName, Handlers, skin);
127 });
128 };
129 const isClassHandler = Handler => Handler.prototype?.getUniqueHandlerID;
130 const addHandlerWithHook = function (elementBaseName, Handler) {
131 let skin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'default';
132 skin = skin ? '.' + skin : '';
133 const elementName = elementBaseName + skin;
134 elementorFrontend.hooks.addAction(`frontend/element_ready/${elementName}`, $element => {
135 if (isClassHandler(Handler)) {
136 _this.addHandler(Handler, {
137 $element,
138 elementName
139 }, true);
140 } else {
141 const handlerValue = Handler();
142 if (!handlerValue) {
143 return;
144 }
145 if (handlerValue instanceof Promise) {
146 handlerValue.then(_ref => {
147 let {
148 default: dynamicHandler
149 } = _ref;
150 _this.addHandler(dynamicHandler, {
151 $element,
152 elementName
153 }, true);
154 });
155 } else {
156 _this.addHandler(handlerValue, {
157 $element,
158 elementName
159 }, true);
160 }
161 }
162 });
163 };
164 this.addHandler = function (HandlerClass, options) {
165 const elementID = options.$element.data('model-cid');
166 let handlerID;
167
168 // If element is in edit mode
169 if (elementID) {
170 handlerID = HandlerClass.prototype.getConstructorID();
171 if (!handlersInstances[elementID]) {
172 handlersInstances[elementID] = {};
173 }
174 const oldHandler = handlersInstances[elementID][handlerID];
175 if (oldHandler) {
176 oldHandler.onDestroy();
177 }
178 }
179 const newHandler = new HandlerClass(options);
180 elementorFrontend.hooks.doAction(`frontend/element_handler_ready/${options.elementName}`, options.$element, $);
181 if (elementID) {
182 handlersInstances[elementID][handlerID] = newHandler;
183 }
184 };
185 this.attachHandler = (elementName, Handlers, skin) => {
186 if (!Array.isArray(Handlers)) {
187 Handlers = [Handlers];
188 }
189 Handlers.forEach(Handler => addHandlerWithHook(elementName, Handler, skin));
190 };
191 this.getHandler = function (handlerName) {
192 const elementHandler = this.elementsHandlers[handlerName];
193 if (isClassHandler(elementHandler)) {
194 return elementHandler;
195 }
196 return new Promise(res => {
197 elementHandler().then(_ref2 => {
198 let {
199 default: dynamicHandler
200 } = _ref2;
201 res(dynamicHandler);
202 });
203 });
204 };
205
206 /**
207 * @param {string} handlerName
208 * @deprecated since 3.1.0, use `elementorFrontend.elementsHandler.getHandler` instead.
209 */
210 this.getHandlers = function (handlerName) {
211 elementorDevTools.deprecation.deprecated('getHandlers', '3.1.0', 'elementorFrontend.elementsHandler.getHandler');
212 if (handlerName) {
213 return this.getHandler(handlerName);
214 }
215 return this.elementsHandlers;
216 };
217 this.runReadyTrigger = function (scope) {
218 const isDelayChildHandlers = !!scope.closest('[data-delay-child-handlers="true"]') && 0 !== scope.closest('[data-delay-child-handlers="true"]').length;
219 if (elementorFrontend.config.is_static || isDelayChildHandlers) {
220 return;
221 }
222
223 // Initializing the `$scope` as frontend jQuery instance
224 const $scope = jQuery(scope),
225 elementType = $scope.attr('data-element_type');
226 if (!elementType) {
227 return;
228 }
229 elementorFrontend.hooks.doAction('frontend/element_ready/global', $scope, $);
230 elementorFrontend.hooks.doAction(`frontend/element_ready/${elementType}`, $scope, $);
231 if ('widget' === elementType) {
232 const widgetType = $scope.attr('data-widget_type');
233 elementorFrontend.hooks.doAction(`frontend/element_ready/${widgetType}`, $scope, $);
234 }
235 };
236 this.init = () => {
237 addGlobalHandlers();
238 addElementsHandlers();
239 };
240 };
241
242 /***/ }),
243
244 /***/ "../assets/dev/js/frontend/frontend.js":
245 /*!*********************************************!*\
246 !*** ../assets/dev/js/frontend/frontend.js ***!
247 \*********************************************/
248 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
249
250
251
252 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
253 Object.defineProperty(exports, "__esModule", ({
254 value: true
255 }));
256 exports["default"] = void 0;
257 __webpack_require__(/*! ../public-path */ "../assets/dev/js/public-path.js");
258 var _documentsManager = _interopRequireDefault(__webpack_require__(/*! ./documents-manager */ "../assets/dev/js/frontend/documents-manager.js"));
259 var _storage = _interopRequireDefault(__webpack_require__(/*! elementor-common/utils/storage */ "../core/common/assets/js/utils/storage.js"));
260 var _environment = _interopRequireDefault(__webpack_require__(/*! elementor-common/utils/environment */ "../core/common/assets/js/utils/environment.js"));
261 var _youtubeLoader = _interopRequireDefault(__webpack_require__(/*! ./utils/video-api/youtube-loader */ "../assets/dev/js/frontend/utils/video-api/youtube-loader.js"));
262 var _vimeoLoader = _interopRequireDefault(__webpack_require__(/*! ./utils/video-api/vimeo-loader */ "../assets/dev/js/frontend/utils/video-api/vimeo-loader.js"));
263 var _baseLoader = _interopRequireDefault(__webpack_require__(/*! ./utils/video-api/base-loader */ "../assets/dev/js/frontend/utils/video-api/base-loader.js"));
264 var _urlActions = _interopRequireDefault(__webpack_require__(/*! ./utils/url-actions */ "../assets/dev/js/frontend/utils/url-actions.js"));
265 var _swiper = _interopRequireDefault(__webpack_require__(/*! ./utils/swiper */ "../assets/dev/js/frontend/utils/swiper.js"));
266 var _lightboxManager = _interopRequireDefault(__webpack_require__(/*! ./utils/lightbox/lightbox-manager */ "../assets/dev/js/frontend/utils/lightbox/lightbox-manager.js"));
267 var _assetsLoader = _interopRequireDefault(__webpack_require__(/*! ./utils/assets-loader */ "../assets/dev/js/frontend/utils/assets-loader.js"));
268 var _breakpoints = _interopRequireDefault(__webpack_require__(/*! elementor-utils/breakpoints */ "../assets/dev/js/utils/breakpoints.js"));
269 var _events = _interopRequireDefault(__webpack_require__(/*! elementor-utils/events */ "../assets/dev/js/utils/events.js"));
270 var _frontend = _interopRequireDefault(__webpack_require__(/*! elementor/modules/shapes/assets/js/frontend/frontend */ "../modules/shapes/assets/js/frontend/frontend.js"));
271 var _controls = _interopRequireDefault(__webpack_require__(/*! ./utils/controls */ "../assets/dev/js/frontend/utils/controls.js"));
272 var _utils = __webpack_require__(/*! elementor-frontend/utils/utils */ "../assets/dev/js/frontend/utils/utils.js");
273 /* global elementorFrontendConfig */
274
275 const EventManager = __webpack_require__(/*! elementor-utils/hooks */ "../assets/dev/js/utils/hooks.js"),
276 ElementsHandler = __webpack_require__(/*! elementor-frontend/elements-handlers-manager */ "../assets/dev/js/frontend/elements-handlers-manager.js"),
277 AnchorsModule = __webpack_require__(/*! elementor-frontend/utils/anchors */ "../assets/dev/js/frontend/utils/anchors.js");
278 class Frontend extends elementorModules.ViewModule {
279 constructor() {
280 super(...arguments);
281 this.config = elementorFrontendConfig;
282 this.config.legacyMode = {
283 /**
284 * @deprecated since 3.1.0
285 */
286 get elementWrappers() {
287 if (elementorFrontend.isEditMode()) {
288 window.top.elementorDevTools.deprecation.deprecated('elementorFrontend.config.legacyMode.elementWrappers', '3.1.0');
289 }
290 return false;
291 }
292 };
293 this.populateActiveBreakpointsConfig();
294 }
295
296 /**
297 * @deprecated since 2.5.0, use `elementorModules.frontend.handlers.Base` instead.
298 */
299 get Module() {
300 if (this.isEditMode()) {
301 parent.elementorDevTools.deprecation.deprecated('elementorFrontend.Module', '2.5.0', 'elementorModules.frontend.handlers.Base');
302 }
303 return elementorModules.frontend.handlers.Base;
304 }
305 getDefaultSettings() {
306 return {
307 selectors: {
308 elementor: '.elementor',
309 adminBar: '#wpadminbar'
310 }
311 };
312 }
313 getDefaultElements() {
314 const defaultElements = {
315 window,
316 $window: jQuery(window),
317 $document: jQuery(document),
318 $head: jQuery(document.head),
319 $body: jQuery(document.body),
320 $deviceMode: jQuery('<span>', {
321 id: 'elementor-device-mode',
322 class: 'elementor-screen-only'
323 })
324 };
325 defaultElements.$body.append(defaultElements.$deviceMode);
326 return defaultElements;
327 }
328 bindEvents() {
329 this.elements.$window.on('resize', () => this.setDeviceModeData());
330 }
331
332 /**
333 * @param {string} elementName
334 * @deprecated since 2.4.0, use `this.elements` instead.
335 */
336 getElements(elementName) {
337 return this.getItems(this.elements, elementName);
338 }
339
340 /**
341 * @param {string} settingName
342 * @deprecated since 2.4.0, this method was never in use.
343 */
344 getPageSettings(settingName) {
345 const settingsObject = this.isEditMode() ? elementor.settings.page.model.attributes : this.config.settings.page;
346 return this.getItems(settingsObject, settingName);
347 }
348
349 /**
350 * @param {string} settingName
351 * @deprecated since 3.0.0, use `getKitSettings()` instead and remove the `elementor_` prefix.
352 */
353 getGeneralSettings(settingName) {
354 if (this.isEditMode()) {
355 parent.elementorDevTools.deprecation.deprecated('getGeneralSettings()', '3.0.0', 'getKitSettings() and remove the `elementor_` prefix');
356 }
357 return this.getKitSettings(`elementor_${settingName}`);
358 }
359 getKitSettings(settingName) {
360 // TODO: use Data API.
361 return this.getItems(this.config.kit, settingName);
362 }
363 getCurrentDeviceMode() {
364 return getComputedStyle(this.elements.$deviceMode[0], ':after').content.replace(/"/g, '');
365 }
366 getDeviceSetting(deviceMode, settings, settingKey) {
367 // Add specific handling for widescreen since it is larger than desktop.
368 if ('widescreen' === deviceMode) {
369 return this.getWidescreenSetting(settings, settingKey);
370 }
371 const devices = elementorFrontend.breakpoints.getActiveBreakpointsList({
372 largeToSmall: true,
373 withDesktop: true
374 });
375 let deviceIndex = devices.indexOf(deviceMode);
376 while (deviceIndex > 0) {
377 const currentDevice = devices[deviceIndex],
378 fullSettingKey = settingKey + '_' + currentDevice,
379 deviceValue = settings[fullSettingKey];
380
381 // Accept 0 as value.
382 if (deviceValue || 0 === deviceValue) {
383 return deviceValue;
384 }
385 deviceIndex--;
386 }
387 return settings[settingKey];
388 }
389 getWidescreenSetting(settings, settingKey) {
390 const deviceMode = 'widescreen',
391 widescreenSettingKey = settingKey + '_' + deviceMode;
392 let settingToReturn;
393
394 // If the device mode is 'widescreen', and the setting exists - return it.
395 if (settings[widescreenSettingKey]) {
396 settingToReturn = settings[widescreenSettingKey];
397 } else {
398 // Otherwise, return the desktop setting
399 settingToReturn = settings[settingKey];
400 }
401 return settingToReturn;
402 }
403 getCurrentDeviceSetting(settings, settingKey) {
404 return this.getDeviceSetting(elementorFrontend.getCurrentDeviceMode(), settings, settingKey);
405 }
406 isEditMode() {
407 return this.config.environmentMode.edit;
408 }
409 isWPPreviewMode() {
410 return this.config.environmentMode.wpPreview;
411 }
412 initDialogsManager() {
413 let dialogsManager;
414 this.getDialogsManager = () => {
415 if (!dialogsManager) {
416 dialogsManager = new DialogsManager.Instance();
417 }
418 return dialogsManager;
419 };
420 }
421 initOnReadyComponents() {
422 this.utils = {
423 youtube: new _youtubeLoader.default(),
424 vimeo: new _vimeoLoader.default(),
425 baseVideoLoader: new _baseLoader.default(),
426 anchors: new AnchorsModule(),
427 get lightbox() {
428 return _lightboxManager.default.getLightbox();
429 },
430 urlActions: new _urlActions.default(),
431 swiper: _swiper.default,
432 environment: _environment.default,
433 assetsLoader: new _assetsLoader.default(),
434 escapeHTML: _utils.escapeHTML,
435 events: _events.default,
436 controls: new _controls.default()
437 };
438
439 // TODO: BC since 2.4.0
440 this.modules = {
441 StretchElement: elementorModules.frontend.tools.StretchElement,
442 Masonry: elementorModules.utils.Masonry
443 };
444 this.elementsHandler.init();
445 if (this.isEditMode()) {
446 elementor.once('document:loaded', () => this.onDocumentLoaded());
447 } else {
448 this.onDocumentLoaded();
449 }
450 }
451 initOnReadyElements() {
452 this.elements.$wpAdminBar = this.elements.$document.find(this.getSettings('selectors.adminBar'));
453 }
454 addUserAgentClasses() {
455 for (const [key, value] of Object.entries(_environment.default)) {
456 if (value) {
457 this.elements.$body.addClass('e--ua-' + key);
458 }
459 }
460 }
461 setDeviceModeData() {
462 this.elements.$body.attr('data-elementor-device-mode', this.getCurrentDeviceMode());
463 }
464 addListenerOnce(listenerID, event, callback, to) {
465 if (!to) {
466 to = this.elements.$window;
467 }
468 if (!this.isEditMode()) {
469 to.on(event, callback);
470 return;
471 }
472 this.removeListeners(listenerID, event, to);
473 if (to instanceof jQuery) {
474 const eventNS = event + '.' + listenerID;
475 to.on(eventNS, callback);
476 } else {
477 to.on(event, callback, listenerID);
478 }
479 }
480 removeListeners(listenerID, event, callback, from) {
481 if (!from) {
482 from = this.elements.$window;
483 }
484 if (from instanceof jQuery) {
485 const eventNS = event + '.' + listenerID;
486 from.off(eventNS, callback);
487 } else {
488 from.off(event, callback, listenerID);
489 }
490 }
491
492 // Based on underscore function
493 debounce(func, wait) {
494 let timeout;
495 return function () {
496 const context = this,
497 args = arguments;
498 const later = () => {
499 timeout = null;
500 func.apply(context, args);
501 };
502 const callNow = !timeout;
503 clearTimeout(timeout);
504 timeout = setTimeout(later, wait);
505 if (callNow) {
506 func.apply(context, args);
507 }
508 };
509 }
510 waypoint($element, callback, options) {
511 const defaultOptions = {
512 offset: '100%',
513 triggerOnce: true
514 };
515 options = jQuery.extend(defaultOptions, options);
516 const correctCallback = function () {
517 const element = this.element || this,
518 result = callback.apply(element, arguments);
519
520 // If is Waypoint new API and is frontend
521 if (options.triggerOnce && this.destroy) {
522 this.destroy();
523 }
524 return result;
525 };
526 return $element.elementorWaypoint(correctCallback, options);
527 }
528 muteMigrationTraces() {
529 jQuery.migrateMute = true;
530 jQuery.migrateTrace = false;
531 }
532
533 /**
534 * Initialize the modules' widgets handlers.
535 */
536 initModules() {
537 const handlers = {
538 shapes: _frontend.default
539 };
540
541 // TODO: BC - Deprecated since 3.5.0
542 elementorFrontend.trigger('elementor/modules/init:before');
543
544 // TODO: Use this instead.
545 elementorFrontend.trigger('elementor/modules/init/before');
546 Object.entries(handlers).forEach(_ref => {
547 let [moduleName, ModuleClass] = _ref;
548 this.modulesHandlers[moduleName] = new ModuleClass();
549 });
550 }
551 populateActiveBreakpointsConfig() {
552 this.config.responsive.activeBreakpoints = {};
553 Object.entries(this.config.responsive.breakpoints).forEach(_ref2 => {
554 let [breakpointKey, breakpointData] = _ref2;
555 if (breakpointData.is_enabled) {
556 this.config.responsive.activeBreakpoints[breakpointKey] = breakpointData;
557 }
558 });
559 }
560 init() {
561 this.hooks = new EventManager();
562 this.breakpoints = new _breakpoints.default(this.config.responsive);
563 this.storage = new _storage.default();
564 this.elementsHandler = new ElementsHandler(jQuery);
565 this.modulesHandlers = {};
566 this.addUserAgentClasses();
567 this.setDeviceModeData();
568 this.initDialogsManager();
569 if (this.isEditMode()) {
570 this.muteMigrationTraces();
571 }
572
573 // Keep this line before `initOnReadyComponents` call
574 _events.default.dispatch(this.elements.$window, 'elementor/frontend/init');
575 this.initModules();
576 this.initOnReadyElements();
577 this.initOnReadyComponents();
578 }
579 onDocumentLoaded() {
580 this.documentsManager = new _documentsManager.default();
581 this.trigger('components:init');
582 new _lightboxManager.default();
583 }
584 }
585 exports["default"] = Frontend;
586 window.elementorFrontend = new Frontend();
587 if (!elementorFrontend.isEditMode()) {
588 jQuery(() => elementorFrontend.init());
589 }
590
591 /***/ }),
592
593 /***/ "../assets/dev/js/frontend/handlers/background-slideshow.js":
594 /*!******************************************************************!*\
595 !*** ../assets/dev/js/frontend/handlers/background-slideshow.js ***!
596 \******************************************************************/
597 /***/ ((__unused_webpack_module, exports) => {
598
599
600
601 Object.defineProperty(exports, "__esModule", ({
602 value: true
603 }));
604 exports["default"] = void 0;
605 class BackgroundSlideshow extends elementorModules.frontend.handlers.SwiperBase {
606 getDefaultSettings() {
607 return {
608 classes: {
609 swiperContainer: `elementor-background-slideshow ${elementorFrontend.config.swiperClass}`,
610 swiperWrapper: 'swiper-wrapper',
611 swiperSlide: 'elementor-background-slideshow__slide swiper-slide',
612 swiperPreloader: 'swiper-lazy-preloader',
613 slideBackground: 'elementor-background-slideshow__slide__image',
614 kenBurns: 'elementor-ken-burns',
615 kenBurnsActive: 'elementor-ken-burns--active',
616 kenBurnsIn: 'elementor-ken-burns--in',
617 kenBurnsOut: 'elementor-ken-burns--out'
618 }
619 };
620 }
621 getSwiperOptions() {
622 const elementSettings = this.getElementSettings(),
623 swiperOptions = {
624 grabCursor: false,
625 slidesPerView: 1,
626 slidesPerGroup: 1,
627 loop: 'yes' === elementSettings.background_slideshow_loop,
628 speed: elementSettings.background_slideshow_transition_duration,
629 autoplay: {
630 delay: elementSettings.background_slideshow_slide_duration,
631 stopOnLastSlide: !elementSettings.background_slideshow_loop
632 },
633 handleElementorBreakpoints: true,
634 on: {
635 slideChange: () => {
636 if (elementSettings.background_slideshow_ken_burns) {
637 this.handleKenBurns();
638 }
639 }
640 }
641 };
642 if ('yes' === elementSettings.background_slideshow_loop) {
643 swiperOptions.loopedSlides = this.getSlidesCount();
644 }
645 switch (elementSettings.background_slideshow_slide_transition) {
646 case 'fade':
647 swiperOptions.effect = 'fade';
648 swiperOptions.fadeEffect = {
649 crossFade: true
650 };
651 break;
652 case 'slide_down':
653 swiperOptions.autoplay.reverseDirection = true;
654 swiperOptions.direction = 'vertical';
655 break;
656 case 'slide_up':
657 swiperOptions.direction = 'vertical';
658 break;
659 }
660 if ('yes' === elementSettings.background_slideshow_lazyload) {
661 swiperOptions.lazy = {
662 loadPrevNext: true,
663 loadPrevNextAmount: 1
664 };
665 }
666 return swiperOptions;
667 }
668 buildSwiperElements() {
669 const classes = this.getSettings('classes'),
670 elementSettings = this.getElementSettings(),
671 direction = 'slide_left' === elementSettings.background_slideshow_slide_transition ? 'ltr' : 'rtl',
672 $container = jQuery('<div>', {
673 class: classes.swiperContainer,
674 dir: direction
675 }),
676 $wrapper = jQuery('<div>', {
677 class: classes.swiperWrapper
678 }),
679 kenBurnsActive = elementSettings.background_slideshow_ken_burns,
680 lazyload = 'yes' === elementSettings.background_slideshow_lazyload;
681 let slideInnerClass = classes.slideBackground;
682 if (kenBurnsActive) {
683 slideInnerClass += ' ' + classes.kenBurns;
684 const kenBurnsDirection = 'in' === elementSettings.background_slideshow_ken_burns_zoom_direction ? 'kenBurnsIn' : 'kenBurnsOut';
685 slideInnerClass += ' ' + classes[kenBurnsDirection];
686 }
687 if (lazyload) {
688 slideInnerClass += ' swiper-lazy';
689 }
690 this.elements.$slides = jQuery();
691 elementSettings.background_slideshow_gallery.forEach(slide => {
692 const $slide = jQuery('<div>', {
693 class: classes.swiperSlide
694 });
695 let $slidebg;
696 if (lazyload) {
697 const $slideloader = jQuery('<div>', {
698 class: classes.swiperPreloader
699 });
700 $slidebg = jQuery('<div>', {
701 class: slideInnerClass,
702 'data-background': slide.url
703 });
704 $slidebg.append($slideloader);
705 } else {
706 $slidebg = jQuery('<div>', {
707 class: slideInnerClass,
708 style: 'background-image: url("' + slide.url + '");'
709 });
710 }
711 $slide.append($slidebg);
712 $wrapper.append($slide);
713 this.elements.$slides = this.elements.$slides.add($slide);
714 });
715 $container.append($wrapper);
716 this.$element.prepend($container);
717 this.elements.$backgroundSlideShowContainer = $container;
718 }
719 async initSlider() {
720 if (1 >= this.getSlidesCount()) {
721 return;
722 }
723 const elementSettings = this.getElementSettings();
724 const Swiper = elementorFrontend.utils.swiper;
725 this.swiper = await new Swiper(this.elements.$backgroundSlideShowContainer, this.getSwiperOptions());
726
727 // Expose the swiper instance in the frontend
728 this.elements.$backgroundSlideShowContainer.data('swiper', this.swiper);
729 if (elementSettings.background_slideshow_ken_burns) {
730 this.handleKenBurns();
731 }
732 }
733 activate() {
734 this.buildSwiperElements();
735 this.initSlider();
736 }
737 deactivate() {
738 if (this.swiper) {
739 this.swiper.destroy();
740 this.elements.$backgroundSlideShowContainer.remove();
741 }
742 }
743 run() {
744 if ('slideshow' === this.getElementSettings('background_background')) {
745 this.activate();
746 } else {
747 this.deactivate();
748 }
749 }
750 onInit() {
751 super.onInit();
752 if (this.getElementSettings('background_slideshow_gallery')) {
753 this.run();
754 }
755 }
756 onDestroy() {
757 super.onDestroy();
758 this.deactivate();
759 }
760 onElementChange(propertyName) {
761 if ('background_background' === propertyName) {
762 this.run();
763 }
764 }
765 }
766 exports["default"] = BackgroundSlideshow;
767
768 /***/ }),
769
770 /***/ "../assets/dev/js/frontend/handlers/background-video.js":
771 /*!**************************************************************!*\
772 !*** ../assets/dev/js/frontend/handlers/background-video.js ***!
773 \**************************************************************/
774 /***/ ((__unused_webpack_module, exports) => {
775
776
777
778 Object.defineProperty(exports, "__esModule", ({
779 value: true
780 }));
781 exports["default"] = void 0;
782 class BackgroundVideo extends elementorModules.frontend.handlers.Base {
783 getDefaultSettings() {
784 return {
785 selectors: {
786 backgroundVideoContainer: '.elementor-background-video-container',
787 backgroundVideoEmbed: '.elementor-background-video-embed',
788 backgroundVideoHosted: '.elementor-background-video-hosted'
789 }
790 };
791 }
792 getDefaultElements() {
793 const selectors = this.getSettings('selectors'),
794 elements = {
795 $backgroundVideoContainer: this.$element.find(selectors.backgroundVideoContainer)
796 };
797 elements.$backgroundVideoEmbed = elements.$backgroundVideoContainer.children(selectors.backgroundVideoEmbed);
798 elements.$backgroundVideoHosted = elements.$backgroundVideoContainer.children(selectors.backgroundVideoHosted);
799 return elements;
800 }
801 calcVideosSize($video) {
802 let aspectRatioSetting = '16:9';
803 if ('vimeo' === this.videoType) {
804 aspectRatioSetting = $video[0].width + ':' + $video[0].height;
805 }
806 const containerWidth = this.elements.$backgroundVideoContainer.outerWidth(),
807 containerHeight = this.elements.$backgroundVideoContainer.outerHeight(),
808 aspectRatioArray = aspectRatioSetting.split(':'),
809 aspectRatio = aspectRatioArray[0] / aspectRatioArray[1],
810 ratioWidth = containerWidth / aspectRatio,
811 ratioHeight = containerHeight * aspectRatio,
812 isWidthFixed = containerWidth / containerHeight > aspectRatio;
813 return {
814 width: isWidthFixed ? containerWidth : ratioHeight,
815 height: isWidthFixed ? ratioWidth : containerHeight
816 };
817 }
818 changeVideoSize() {
819 if (!('hosted' === this.videoType) && !this.player) {
820 return;
821 }
822 let $video;
823 if ('youtube' === this.videoType) {
824 $video = jQuery(this.player.getIframe());
825 } else if ('vimeo' === this.videoType) {
826 $video = jQuery(this.player.element);
827 } else if ('hosted' === this.videoType) {
828 $video = this.elements.$backgroundVideoHosted;
829 }
830 if (!$video) {
831 return;
832 }
833 const size = this.calcVideosSize($video);
834 $video.width(size.width).height(size.height);
835 }
836 startVideoLoop(firstTime) {
837 // If the section has been removed
838 if (!this.player.getIframe().contentWindow) {
839 return;
840 }
841 const elementSettings = this.getElementSettings(),
842 startPoint = elementSettings.background_video_start || 0,
843 endPoint = elementSettings.background_video_end;
844 if (elementSettings.background_play_once && !firstTime) {
845 this.player.stopVideo();
846 return;
847 }
848 this.player.seekTo(startPoint);
849 if (endPoint) {
850 const durationToEnd = endPoint - startPoint + 1;
851 setTimeout(() => {
852 this.startVideoLoop(false);
853 }, durationToEnd * 1000);
854 }
855 }
856 prepareVimeoVideo(Vimeo, videoLink) {
857 const elementSettings = this.getElementSettings(),
858 videoSize = this.elements.$backgroundVideoContainer.outerWidth(),
859 vimeoOptions = {
860 url: videoLink,
861 width: videoSize.width,
862 autoplay: true,
863 loop: !elementSettings.background_play_once,
864 transparent: true,
865 background: true,
866 muted: true
867 };
868 if (elementSettings.background_privacy_mode) {
869 vimeoOptions.dnt = true;
870 }
871 this.player = new Vimeo.Player(this.elements.$backgroundVideoContainer, vimeoOptions);
872
873 // Handle user-defined start/end times
874 this.handleVimeoStartEndTimes(elementSettings);
875 this.player.ready().then(() => {
876 jQuery(this.player.element).addClass('elementor-background-video-embed');
877 this.changeVideoSize();
878 });
879 }
880 handleVimeoStartEndTimes(elementSettings) {
881 // If a start time is defined, set the start time
882 if (elementSettings.background_video_start) {
883 this.player.on('play', data => {
884 if (0 === data.seconds) {
885 this.player.setCurrentTime(elementSettings.background_video_start);
886 }
887 });
888 }
889 this.player.on('timeupdate', data => {
890 // If an end time is defined, handle ending the video
891 if (elementSettings.background_video_end && elementSettings.background_video_end < data.seconds) {
892 if (elementSettings.background_play_once) {
893 // Stop at user-defined end time if not loop
894 this.player.pause();
895 } else {
896 // Go to start time if loop
897 this.player.setCurrentTime(elementSettings.background_video_start);
898 }
899 }
900
901 // If start time is defined but an end time is not, go to user-defined start time at video end.
902 // Vimeo JS API has an 'ended' event, but it never fires when infinite loop is defined, so we
903 // get the video duration (returns a promise) then use duration-0.5s as end time
904 this.player.getDuration().then(duration => {
905 if (elementSettings.background_video_start && !elementSettings.background_video_end && data.seconds > duration - 0.5) {
906 this.player.setCurrentTime(elementSettings.background_video_start);
907 }
908 });
909 });
910 }
911 prepareYTVideo(YT, videoID) {
912 const $backgroundVideoContainer = this.elements.$backgroundVideoContainer,
913 elementSettings = this.getElementSettings();
914 let startStateCode = YT.PlayerState.PLAYING;
915
916 // Since version 67, Chrome doesn't fire the `PLAYING` state at start time
917 if (window.chrome) {
918 startStateCode = YT.PlayerState.UNSTARTED;
919 }
920 const playerOptions = {
921 videoId: videoID,
922 events: {
923 onReady: () => {
924 this.player.mute();
925 this.changeVideoSize();
926 this.startVideoLoop(true);
927 this.player.playVideo();
928 },
929 onStateChange: event => {
930 switch (event.data) {
931 case startStateCode:
932 $backgroundVideoContainer.removeClass('elementor-invisible elementor-loading');
933 break;
934 case YT.PlayerState.ENDED:
935 if ('function' === typeof this.player.seekTo) {
936 this.player.seekTo(elementSettings.background_video_start || 0);
937 }
938 if (elementSettings.background_play_once) {
939 this.player.destroy();
940 }
941 }
942 }
943 },
944 playerVars: {
945 controls: 0,
946 rel: 0,
947 playsinline: 1
948 }
949 };
950
951 // To handle CORS issues, when the default host is changed, the origin parameter has to be set.
952 if (elementSettings.background_privacy_mode) {
953 playerOptions.host = 'https://www.youtube-nocookie.com';
954 playerOptions.origin = window.location.hostname;
955 }
956 $backgroundVideoContainer.addClass('elementor-loading elementor-invisible');
957 this.player = new YT.Player(this.elements.$backgroundVideoEmbed[0], playerOptions);
958 }
959 activate() {
960 let videoLink = this.getElementSettings('background_video_link'),
961 videoID;
962 const playOnce = this.getElementSettings('background_play_once');
963 if (-1 !== videoLink.indexOf('vimeo.com')) {
964 this.videoType = 'vimeo';
965 this.apiProvider = elementorFrontend.utils.vimeo;
966 } else if (videoLink.match(/^(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com)/)) {
967 this.videoType = 'youtube';
968 this.apiProvider = elementorFrontend.utils.youtube;
969 }
970 if (this.apiProvider) {
971 videoID = this.apiProvider.getVideoIDFromURL(videoLink);
972 this.apiProvider.onApiReady(apiObject => {
973 if ('youtube' === this.videoType) {
974 this.prepareYTVideo(apiObject, videoID);
975 }
976 if ('vimeo' === this.videoType) {
977 this.prepareVimeoVideo(apiObject, videoLink);
978 }
979 });
980 } else {
981 this.videoType = 'hosted';
982 const startTime = this.getElementSettings('background_video_start'),
983 endTime = this.getElementSettings('background_video_end');
984 if (startTime || endTime) {
985 videoLink += '#t=' + (startTime || 0) + (endTime ? ',' + endTime : '');
986 }
987 this.elements.$backgroundVideoHosted.attr('src', videoLink).one('canplay', this.changeVideoSize.bind(this));
988 if (playOnce) {
989 this.elements.$backgroundVideoHosted.on('ended', () => {
990 this.elements.$backgroundVideoHosted.hide();
991 });
992 }
993 }
994 elementorFrontend.elements.$window.on('resize elementor/bg-video/recalc', this.changeVideoSize);
995 }
996 deactivate() {
997 if ('youtube' === this.videoType && this.player.getIframe() || 'vimeo' === this.videoType) {
998 this.player.destroy();
999 } else {
1000 this.elements.$backgroundVideoHosted.removeAttr('src').off('ended');
1001 }
1002 elementorFrontend.elements.$window.off('resize', this.changeVideoSize);
1003 }
1004 run() {
1005 const elementSettings = this.getElementSettings();
1006 if (!elementSettings.background_play_on_mobile && 'mobile' === elementorFrontend.getCurrentDeviceMode()) {
1007 return;
1008 }
1009 if ('video' === elementSettings.background_background && elementSettings.background_video_link) {
1010 this.activate();
1011 } else {
1012 this.deactivate();
1013 }
1014 }
1015 onInit() {
1016 super.onInit(...arguments);
1017 this.changeVideoSize = this.changeVideoSize.bind(this);
1018 this.run();
1019 }
1020 onElementChange(propertyName) {
1021 if ('background_background' === propertyName) {
1022 this.run();
1023 }
1024 }
1025 }
1026 exports["default"] = BackgroundVideo;
1027
1028 /***/ }),
1029
1030 /***/ "../assets/dev/js/frontend/handlers/background.js":
1031 /*!********************************************************!*\
1032 !*** ../assets/dev/js/frontend/handlers/background.js ***!
1033 \********************************************************/
1034 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1035
1036
1037
1038 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1039 Object.defineProperty(exports, "__esModule", ({
1040 value: true
1041 }));
1042 exports["default"] = void 0;
1043 var _backgroundSlideshow = _interopRequireDefault(__webpack_require__(/*! ./background-slideshow */ "../assets/dev/js/frontend/handlers/background-slideshow.js"));
1044 var _backgroundVideo = _interopRequireDefault(__webpack_require__(/*! ./background-video */ "../assets/dev/js/frontend/handlers/background-video.js"));
1045 var _default = [_backgroundSlideshow.default, _backgroundVideo.default];
1046 exports["default"] = _default;
1047
1048 /***/ }),
1049
1050 /***/ "../assets/dev/js/frontend/handlers/column.js":
1051 /*!****************************************************!*\
1052 !*** ../assets/dev/js/frontend/handlers/column.js ***!
1053 \****************************************************/
1054 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1055
1056
1057
1058 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1059 Object.defineProperty(exports, "__esModule", ({
1060 value: true
1061 }));
1062 exports["default"] = void 0;
1063 var _backgroundSlideshow = _interopRequireDefault(__webpack_require__(/*! ./background-slideshow */ "../assets/dev/js/frontend/handlers/background-slideshow.js"));
1064 var _default = [_backgroundSlideshow.default];
1065 exports["default"] = _default;
1066
1067 /***/ }),
1068
1069 /***/ "../assets/dev/js/frontend/handlers/container/container.js":
1070 /*!*****************************************************************!*\
1071 !*** ../assets/dev/js/frontend/handlers/container/container.js ***!
1072 \*****************************************************************/
1073 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1074
1075
1076
1077 Object.defineProperty(exports, "__esModule", ({
1078 value: true
1079 }));
1080 exports["default"] = void 0;
1081 var _default = [() => __webpack_require__.e(/*! import() | container */ "container").then(__webpack_require__.bind(__webpack_require__, /*! ./handles-position */ "../assets/dev/js/frontend/handlers/container/handles-position.js")), () => __webpack_require__.e(/*! import() | container */ "container").then(__webpack_require__.bind(__webpack_require__, /*! ./shapes */ "../assets/dev/js/frontend/handlers/container/shapes.js")), () => __webpack_require__.e(/*! import() | container */ "container").then(__webpack_require__.bind(__webpack_require__, /*! ./grid-container */ "../assets/dev/js/frontend/handlers/container/grid-container.js"))];
1082 exports["default"] = _default;
1083
1084 /***/ }),
1085
1086 /***/ "../assets/dev/js/frontend/handlers/global.js":
1087 /*!****************************************************!*\
1088 !*** ../assets/dev/js/frontend/handlers/global.js ***!
1089 \****************************************************/
1090 /***/ ((__unused_webpack_module, exports) => {
1091
1092
1093
1094 Object.defineProperty(exports, "__esModule", ({
1095 value: true
1096 }));
1097 exports["default"] = void 0;
1098 class GlobalHandler extends elementorModules.frontend.handlers.Base {
1099 getWidgetType() {
1100 return 'global';
1101 }
1102 animate() {
1103 const $element = this.$element,
1104 animation = this.getAnimation();
1105 if ('none' === animation) {
1106 $element.removeClass('elementor-invisible');
1107 return;
1108 }
1109 const elementSettings = this.getElementSettings(),
1110 animationDelay = elementSettings._animation_delay || elementSettings.animation_delay || 0;
1111 $element.removeClass(animation);
1112 if (this.currentAnimation) {
1113 $element.removeClass(this.currentAnimation);
1114 }
1115 this.currentAnimation = animation;
1116 setTimeout(() => {
1117 $element.removeClass('elementor-invisible').addClass('animated ' + animation);
1118 }, animationDelay);
1119 }
1120 getAnimation() {
1121 return this.getCurrentDeviceSetting('animation') || this.getCurrentDeviceSetting('_animation');
1122 }
1123 onInit() {
1124 super.onInit(...arguments);
1125 if (this.getAnimation()) {
1126 const observer = elementorModules.utils.Scroll.scrollObserver({
1127 callback: event => {
1128 if (event.isInViewport) {
1129 this.animate();
1130 observer.unobserve(this.$element[0]);
1131 }
1132 }
1133 });
1134 observer.observe(this.$element[0]);
1135 }
1136 }
1137 onElementChange(propertyName) {
1138 if (/^_?animation/.test(propertyName)) {
1139 this.animate();
1140 }
1141 }
1142 }
1143 var _default = $scope => {
1144 elementorFrontend.elementsHandler.addHandler(GlobalHandler, {
1145 $element: $scope
1146 });
1147 };
1148 exports["default"] = _default;
1149
1150 /***/ }),
1151
1152 /***/ "../assets/dev/js/frontend/handlers/section/handles-position.js":
1153 /*!**********************************************************************!*\
1154 !*** ../assets/dev/js/frontend/handlers/section/handles-position.js ***!
1155 \**********************************************************************/
1156 /***/ ((__unused_webpack_module, exports) => {
1157
1158
1159
1160 Object.defineProperty(exports, "__esModule", ({
1161 value: true
1162 }));
1163 exports["default"] = void 0;
1164 class HandlesPosition extends elementorModules.frontend.handlers.Base {
1165 isActive() {
1166 return elementorFrontend.isEditMode();
1167 }
1168 isFirstSection() {
1169 return this.$element[0] === document.querySelector('.elementor-edit-mode .elementor-top-section');
1170 }
1171 isOverflowHidden() {
1172 return 'hidden' === this.$element.css('overflow');
1173 }
1174 getOffset() {
1175 if ('body' === elementor.config.document.container) {
1176 return this.$element.offset().top;
1177 }
1178 const $container = jQuery(elementor.config.document.container);
1179 return this.$element.offset().top - $container.offset().top;
1180 }
1181 setHandlesPosition() {
1182 const document = elementor.documents.getCurrent();
1183 if (!document || !document.container.isEditable()) {
1184 return;
1185 }
1186 const insideHandleClass = 'elementor-section--handles-inside';
1187 if (elementor.settings.page.model.attributes.scroll_snap) {
1188 this.$element.addClass(insideHandleClass);
1189 return;
1190 }
1191 const isOverflowHidden = this.isOverflowHidden();
1192 if (!isOverflowHidden && !this.isFirstSection()) {
1193 return;
1194 }
1195 const offset = isOverflowHidden ? 0 : this.getOffset();
1196 if (offset < 25) {
1197 this.$element.addClass(insideHandleClass);
1198 const $handlesElement = this.$element.find('> .elementor-element-overlay > .elementor-editor-section-settings');
1199 if (offset < -5) {
1200 $handlesElement.css('top', -offset);
1201 } else {
1202 $handlesElement.css('top', '');
1203 }
1204 } else {
1205 this.$element.removeClass(insideHandleClass);
1206 }
1207 }
1208 onInit() {
1209 if (!this.isActive()) {
1210 return;
1211 }
1212 this.setHandlesPosition();
1213 this.$element.on('mouseenter', this.setHandlesPosition.bind(this));
1214 }
1215 }
1216 exports["default"] = HandlesPosition;
1217
1218 /***/ }),
1219
1220 /***/ "../assets/dev/js/frontend/handlers/section/shapes.js":
1221 /*!************************************************************!*\
1222 !*** ../assets/dev/js/frontend/handlers/section/shapes.js ***!
1223 \************************************************************/
1224 /***/ ((__unused_webpack_module, exports) => {
1225
1226
1227
1228 Object.defineProperty(exports, "__esModule", ({
1229 value: true
1230 }));
1231 exports["default"] = void 0;
1232 class Shapes extends elementorModules.frontend.handlers.Base {
1233 getDefaultSettings() {
1234 return {
1235 selectors: {
1236 container: '> .elementor-shape-%s'
1237 },
1238 svgURL: elementorFrontend.config.urls.assets + 'shapes/'
1239 };
1240 }
1241 getDefaultElements() {
1242 const elements = {},
1243 selectors = this.getSettings('selectors');
1244 elements.$topContainer = this.$element.find(selectors.container.replace('%s', 'top'));
1245 elements.$bottomContainer = this.$element.find(selectors.container.replace('%s', 'bottom'));
1246 return elements;
1247 }
1248 isActive() {
1249 return elementorFrontend.isEditMode();
1250 }
1251 getSvgURL(shapeType, fileName) {
1252 let svgURL = this.getSettings('svgURL') + fileName + '.svg';
1253 if (elementor.config.additional_shapes && shapeType in elementor.config.additional_shapes) {
1254 svgURL = elementor.config.additional_shapes[shapeType];
1255 if (-1 < fileName.indexOf('-negative')) {
1256 svgURL = svgURL.replace('.svg', '-negative.svg');
1257 }
1258 }
1259 return svgURL;
1260 }
1261 buildSVG(side) {
1262 const baseSettingKey = 'shape_divider_' + side,
1263 shapeType = this.getElementSettings(baseSettingKey),
1264 $svgContainer = this.elements['$' + side + 'Container'];
1265 $svgContainer.attr('data-shape', shapeType);
1266 if (!shapeType) {
1267 $svgContainer.empty(); // Shape-divider set to 'none'
1268 return;
1269 }
1270 let fileName = shapeType;
1271 if (this.getElementSettings(baseSettingKey + '_negative')) {
1272 fileName += '-negative';
1273 }
1274 const svgURL = this.getSvgURL(shapeType, fileName);
1275 jQuery.get(svgURL, data => {
1276 $svgContainer.empty().append(data.childNodes[0]);
1277 });
1278 this.setNegative(side);
1279 }
1280 setNegative(side) {
1281 this.elements['$' + side + 'Container'].attr('data-negative', !!this.getElementSettings('shape_divider_' + side + '_negative'));
1282 }
1283 onInit() {
1284 if (!this.isActive(this.getSettings())) {
1285 return;
1286 }
1287 super.onInit(...arguments);
1288 ['top', 'bottom'].forEach(side => {
1289 if (this.getElementSettings('shape_divider_' + side)) {
1290 this.buildSVG(side);
1291 }
1292 });
1293 }
1294 onElementChange(propertyName) {
1295 const shapeChange = propertyName.match(/^shape_divider_(top|bottom)$/);
1296 if (shapeChange) {
1297 this.buildSVG(shapeChange[1]);
1298 return;
1299 }
1300 const negativeChange = propertyName.match(/^shape_divider_(top|bottom)_negative$/);
1301 if (negativeChange) {
1302 this.buildSVG(negativeChange[1]);
1303 this.setNegative(negativeChange[1]);
1304 }
1305 }
1306 }
1307 exports["default"] = Shapes;
1308
1309 /***/ }),
1310
1311 /***/ "../assets/dev/js/frontend/handlers/section/stretched-section.js":
1312 /*!***********************************************************************!*\
1313 !*** ../assets/dev/js/frontend/handlers/section/stretched-section.js ***!
1314 \***********************************************************************/
1315 /***/ ((__unused_webpack_module, exports) => {
1316
1317
1318
1319 Object.defineProperty(exports, "__esModule", ({
1320 value: true
1321 }));
1322 exports["default"] = void 0;
1323 class StretchedSection extends elementorModules.frontend.handlers.StretchedElement {
1324 getStretchedClass() {
1325 return 'elementor-section-stretched';
1326 }
1327 getStretchSettingName() {
1328 return 'stretch_section';
1329 }
1330 getStretchActiveValue() {
1331 return 'section-stretched';
1332 }
1333 }
1334 exports["default"] = StretchedSection;
1335
1336 /***/ }),
1337
1338 /***/ "../assets/dev/js/frontend/utils/anchors.js":
1339 /*!**************************************************!*\
1340 !*** ../assets/dev/js/frontend/utils/anchors.js ***!
1341 \**************************************************/
1342 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1343
1344
1345
1346 var _utils = __webpack_require__(/*! ./utils */ "../assets/dev/js/frontend/utils/utils.js");
1347 module.exports = elementorModules.ViewModule.extend({
1348 getDefaultSettings() {
1349 return {
1350 scrollDuration: 500,
1351 selectors: {
1352 links: 'a[href*="#"]',
1353 targets: '.elementor-element, .elementor-menu-anchor',
1354 scrollable: (0, _utils.isScrollSnapActive)() ? 'body' : 'html, body'
1355 }
1356 };
1357 },
1358 getDefaultElements() {
1359 var $ = jQuery,
1360 selectors = this.getSettings('selectors');
1361 return {
1362 $scrollable: $(selectors.scrollable)
1363 };
1364 },
1365 bindEvents() {
1366 elementorFrontend.elements.$document.on('click', this.getSettings('selectors.links'), this.handleAnchorLinks);
1367 },
1368 handleAnchorLinks(event) {
1369 var clickedLink = event.currentTarget,
1370 isSamePathname = location.pathname === clickedLink.pathname,
1371 isSameHostname = location.hostname === clickedLink.hostname,
1372 $anchor;
1373 if (!isSameHostname || !isSamePathname || clickedLink.hash.length < 2) {
1374 return;
1375 }
1376 try {
1377 $anchor = jQuery(clickedLink.hash).filter(this.getSettings('selectors.targets'));
1378 } catch (e) {
1379 return;
1380 }
1381 if (!$anchor.length) {
1382 return;
1383 }
1384 var scrollTop = $anchor.offset().top,
1385 $wpAdminBar = elementorFrontend.elements.$wpAdminBar,
1386 $activeStickies = jQuery('.elementor-section.elementor-sticky--active:visible'),
1387 maxStickyHeight = 0;
1388 if ($wpAdminBar.length > 0) {
1389 scrollTop -= $wpAdminBar.height();
1390 }
1391
1392 // Offset height of tallest sticky
1393 if ($activeStickies.length > 0) {
1394 maxStickyHeight = Math.max.apply(null, $activeStickies.map(function () {
1395 return jQuery(this).outerHeight();
1396 }).get());
1397 scrollTop -= maxStickyHeight;
1398 }
1399 event.preventDefault();
1400 scrollTop = elementorFrontend.hooks.applyFilters('frontend/handlers/menu_anchor/scroll_top_distance', scrollTop);
1401
1402 // On scroll animation start: remove scroll-snap.
1403 if ((0, _utils.isScrollSnapActive)()) {
1404 elementorFrontend.elements.$body.css('scroll-snap-type', 'none');
1405 }
1406 this.elements.$scrollable.animate({
1407 scrollTop
1408 }, this.getSettings('scrollDuration'), 'linear', () => {
1409 // On scroll animation complete: add scroll-snap back.
1410 if ((0, _utils.isScrollSnapActive)()) {
1411 elementorFrontend.elements.$body.css('scroll-snap-type', '');
1412 }
1413 });
1414 },
1415 onInit() {
1416 elementorModules.ViewModule.prototype.onInit.apply(this, arguments);
1417 }
1418 });
1419
1420 /***/ }),
1421
1422 /***/ "../assets/dev/js/frontend/utils/assets-loader.js":
1423 /*!********************************************************!*\
1424 !*** ../assets/dev/js/frontend/utils/assets-loader.js ***!
1425 \********************************************************/
1426 /***/ ((__unused_webpack_module, exports) => {
1427
1428
1429
1430 Object.defineProperty(exports, "__esModule", ({
1431 value: true
1432 }));
1433 exports["default"] = void 0;
1434 class AssetsLoader {
1435 getScriptElement(src) {
1436 const scriptElement = document.createElement('script');
1437 scriptElement.src = src;
1438 return scriptElement;
1439 }
1440 getStyleElement(src) {
1441 const styleElement = document.createElement('link');
1442 styleElement.rel = 'stylesheet';
1443 styleElement.href = src;
1444 return styleElement;
1445 }
1446 load(type, key) {
1447 const assetData = AssetsLoader.assets[type][key];
1448 if (!assetData.loader) {
1449 assetData.loader = new Promise(resolve => {
1450 const element = 'style' === type ? this.getStyleElement(assetData.src) : this.getScriptElement(assetData.src);
1451 element.onload = () => resolve(true);
1452 const parent = 'head' === assetData.parent ? assetData.parent : 'body';
1453 document[parent].appendChild(element);
1454 });
1455 }
1456 return assetData.loader;
1457 }
1458 }
1459 exports["default"] = AssetsLoader;
1460 const fileSuffix = elementorFrontendConfig.environmentMode.isScriptDebug ? '' : '.min';
1461 const swiperSource = elementorFrontendConfig.experimentalFeatures.e_swiper_latest ? `${elementorFrontendConfig.urls.assets}lib/swiper/v8/swiper${fileSuffix}.js?ver=8.4.5` : `${elementorFrontendConfig.urls.assets}lib/swiper/swiper${fileSuffix}.js?ver=5.3.6`;
1462 AssetsLoader.assets = {
1463 script: {
1464 dialog: {
1465 src: `${elementorFrontendConfig.urls.assets}lib/dialog/dialog${fileSuffix}.js?ver=4.9.0`
1466 },
1467 'share-link': {
1468 src: `${elementorFrontendConfig.urls.assets}lib/share-link/share-link${fileSuffix}.js?ver=${elementorFrontendConfig.version}`
1469 },
1470 swiper: {
1471 src: swiperSource
1472 }
1473 },
1474 style: {}
1475 };
1476
1477 /***/ }),
1478
1479 /***/ "../assets/dev/js/frontend/utils/controls.js":
1480 /*!***************************************************!*\
1481 !*** ../assets/dev/js/frontend/utils/controls.js ***!
1482 \***************************************************/
1483 /***/ ((__unused_webpack_module, exports) => {
1484
1485
1486
1487 Object.defineProperty(exports, "__esModule", ({
1488 value: true
1489 }));
1490 exports["default"] = void 0;
1491 class Controls {
1492 /**
1493 * Get Control Value
1494 *
1495 * Retrieves a control value.
1496 * This function has been copied from `elementor/assets/dev/js/editor/utils/conditions.js`.
1497 *
1498 * @since 3.11.0
1499 *
1500 * @param {{}} controlSettings A settings object (e.g. element settings - keys and values)
1501 * @param {string} controlKey The control key name
1502 * @param {string} controlSubKey A specific property of the control object.
1503 * @return {*} Control Value
1504 */
1505 getControlValue(controlSettings, controlKey, controlSubKey) {
1506 let value;
1507 if ('object' === typeof controlSettings[controlKey] && controlSubKey) {
1508 value = controlSettings[controlKey][controlSubKey];
1509 } else {
1510 value = controlSettings[controlKey];
1511 }
1512 return value;
1513 }
1514
1515 /**
1516 * Get the value of a responsive control.
1517 *
1518 * Retrieves the value of a responsive control for the current device or for this first parent device which has a control value.
1519 *
1520 * @since 3.11.0
1521 *
1522 * @param {{}} controlSettings A settings object (e.g. element settings - keys and values)
1523 * @param {string} controlKey The control key name
1524 * @param {string} controlSubKey A specific property of the control object.
1525 * @param {string} device If we want to get a value for a specific device mode.
1526 * @return {*} Control Value
1527 */
1528 getResponsiveControlValue(controlSettings, controlKey) {
1529 let controlSubKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
1530 let device = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
1531 const currentDeviceMode = device || elementorFrontend.getCurrentDeviceMode(),
1532 controlValueDesktop = this.getControlValue(controlSettings, controlKey, controlSubKey);
1533
1534 // Set the control value for the current device mode.
1535 // First check the widescreen device mode.
1536 if ('widescreen' === currentDeviceMode) {
1537 const controlValueWidescreen = this.getControlValue(controlSettings, `${controlKey}_widescreen`, controlSubKey);
1538 return !!controlValueWidescreen || 0 === controlValueWidescreen ? controlValueWidescreen : controlValueDesktop;
1539 }
1540
1541 // Loop through all responsive and desktop device modes.
1542 const activeBreakpoints = elementorFrontend.breakpoints.getActiveBreakpointsList({
1543 withDesktop: true
1544 });
1545 let parentDeviceMode = currentDeviceMode,
1546 deviceIndex = activeBreakpoints.indexOf(currentDeviceMode),
1547 controlValue = '';
1548 while (deviceIndex <= activeBreakpoints.length) {
1549 if ('desktop' === parentDeviceMode) {
1550 controlValue = controlValueDesktop;
1551 break;
1552 }
1553 const responsiveControlKey = `${controlKey}_${parentDeviceMode}`,
1554 responsiveControlValue = this.getControlValue(controlSettings, responsiveControlKey, controlSubKey);
1555 if (!!responsiveControlValue || 0 === responsiveControlValue) {
1556 controlValue = responsiveControlValue;
1557 break;
1558 }
1559
1560 // If no control value has been set for the current device mode, then check the parent device mode.
1561 deviceIndex++;
1562 parentDeviceMode = activeBreakpoints[deviceIndex];
1563 }
1564 return controlValue;
1565 }
1566 }
1567 exports["default"] = Controls;
1568
1569 /***/ }),
1570
1571 /***/ "../assets/dev/js/frontend/utils/lightbox/lightbox-manager.js":
1572 /*!********************************************************************!*\
1573 !*** ../assets/dev/js/frontend/utils/lightbox/lightbox-manager.js ***!
1574 \********************************************************************/
1575 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1576
1577
1578
1579 Object.defineProperty(exports, "__esModule", ({
1580 value: true
1581 }));
1582 exports["default"] = void 0;
1583 class LightboxManager extends elementorModules.ViewModule {
1584 static getLightbox() {
1585 const lightboxPromise = new Promise(resolveLightbox => {
1586 __webpack_require__.e(/*! import() | lightbox */ "lightbox").then(__webpack_require__.t.bind(__webpack_require__, /*! elementor-frontend/utils/lightbox/lightbox */ "../assets/dev/js/frontend/utils/lightbox/lightbox.js", 23)).then(_ref => {
1587 let {
1588 default: LightboxModule
1589 } = _ref;
1590 return resolveLightbox(new LightboxModule());
1591 });
1592 }),
1593 dialogPromise = elementorFrontend.utils.assetsLoader.load('script', 'dialog'),
1594 shareLinkPromise = elementorFrontend.utils.assetsLoader.load('script', 'share-link');
1595 return Promise.all([lightboxPromise, dialogPromise, shareLinkPromise]).then(() => lightboxPromise);
1596 }
1597 getDefaultSettings() {
1598 return {
1599 selectors: {
1600 links: 'a, [data-elementor-lightbox]'
1601 }
1602 };
1603 }
1604 getDefaultElements() {
1605 return {
1606 $links: jQuery(this.getSettings('selectors.links'))
1607 };
1608 }
1609 isLightboxLink(element) {
1610 // Check for lowercase `a` to make sure it works also for links inside SVGs.
1611 if ('a' === element.tagName.toLowerCase() && (element.hasAttribute('download') || !/^[^?]+\.(png|jpe?g|gif|svg|webp)(\?.*)?$/i.test(element.href)) && !element.dataset.elementorLightboxVideo) {
1612 return false;
1613 }
1614 const generalOpenInLightbox = elementorFrontend.getKitSettings('global_image_lightbox'),
1615 currentLinkOpenInLightbox = element.dataset.elementorOpenLightbox;
1616 return 'yes' === currentLinkOpenInLightbox || generalOpenInLightbox && 'no' !== currentLinkOpenInLightbox;
1617 }
1618 async onLinkClick(event) {
1619 const element = event.currentTarget,
1620 $target = jQuery(event.target),
1621 editMode = elementorFrontend.isEditMode(),
1622 isColorPickingMode = editMode && elementor.$previewContents.find('body').hasClass('elementor-editor__ui-state__color-picker'),
1623 isClickInsideElementor = !!$target.closest('.elementor-edit-area').length;
1624 if (!this.isLightboxLink(element)) {
1625 if (editMode && isClickInsideElementor) {
1626 event.preventDefault();
1627 }
1628 return;
1629 }
1630 event.preventDefault();
1631 if (editMode && !elementor.getPreferences('lightbox_in_editor')) {
1632 return;
1633 }
1634
1635 // Disable lightbox on color picking mode.
1636 if (isColorPickingMode) {
1637 return;
1638 }
1639 const lightbox = await LightboxManager.getLightbox();
1640 lightbox.createLightbox(element);
1641 }
1642 bindEvents() {
1643 elementorFrontend.elements.$document.on('click', this.getSettings('selectors.links'), event => this.onLinkClick(event));
1644 }
1645 onInit() {
1646 super.onInit(...arguments);
1647 if (elementorFrontend.isEditMode()) {
1648 return;
1649 }
1650
1651 // Detecting lightbox links on init will reduce the time of waiting to the lightbox to be display on slow connections.
1652 this.elements.$links.each((index, element) => {
1653 if (this.isLightboxLink(element)) {
1654 LightboxManager.getLightbox();
1655
1656 // Breaking the iteration when the library loading has already been triggered.
1657 return false;
1658 }
1659 });
1660 }
1661 }
1662 exports["default"] = LightboxManager;
1663
1664 /***/ }),
1665
1666 /***/ "../assets/dev/js/frontend/utils/swiper.js":
1667 /*!*************************************************!*\
1668 !*** ../assets/dev/js/frontend/utils/swiper.js ***!
1669 \*************************************************/
1670 /***/ ((__unused_webpack_module, exports) => {
1671
1672
1673
1674 Object.defineProperty(exports, "__esModule", ({
1675 value: true
1676 }));
1677 exports["default"] = void 0;
1678 class Swiper {
1679 constructor(container, config) {
1680 this.config = config;
1681 if (this.config.breakpoints) {
1682 // The config is passed as a param to allow adjustConfig to be called outside of this wrapper
1683 this.config = this.adjustConfig(config);
1684 }
1685 if (container instanceof jQuery) {
1686 container = container[0];
1687 }
1688
1689 // The Swiper will overlap the column width when applying custom margin values on the column.
1690 container.closest('.elementor-widget-wrap')?.classList.add('e-swiper-container');
1691 container.closest('.elementor-widget')?.classList.add('e-widget-swiper');
1692 return new Promise(resolve => {
1693 elementorFrontend.utils.assetsLoader.load('script', 'swiper').then(() => resolve(this.createSwiperInstance(container, this.config)));
1694 });
1695 }
1696 createSwiperInstance(container, config) {
1697 const SwiperSource = window.Swiper;
1698 SwiperSource.prototype.adjustConfig = this.adjustConfig;
1699 return new SwiperSource(container, config);
1700 }
1701
1702 // Backwards compatibility for Elementor Pro <2.9.0 (old Swiper version - <5.0.0)
1703 // In Swiper 5.0.0 and up, breakpoints changed from acting as max-width to acting as min-width
1704 adjustConfig(config) {
1705 // Only reverse the breakpoints if the handle param has been defined
1706 if (!config.handleElementorBreakpoints) {
1707 return config;
1708 }
1709 const elementorBreakpoints = elementorFrontend.config.responsive.activeBreakpoints,
1710 elementorBreakpointValues = elementorFrontend.breakpoints.getBreakpointValues();
1711 Object.keys(config.breakpoints).forEach(configBPKey => {
1712 const configBPKeyInt = parseInt(configBPKey);
1713 let breakpointToUpdate;
1714
1715 // The `configBPKeyInt + 1` is a BC Fix for Elementor Pro Carousels from 2.8.0-2.8.3 used with Elementor >= 2.9.0
1716 if (configBPKeyInt === elementorBreakpoints.mobile.value || configBPKeyInt + 1 === elementorBreakpoints.mobile.value) {
1717 // This handles the mobile breakpoint. Elementor's default sm breakpoint is never actually used,
1718 // so the mobile breakpoint (md) needs to be handled separately and set to the 0 breakpoint (xs)
1719 breakpointToUpdate = 0;
1720 } else if (elementorBreakpoints.widescreen && (configBPKeyInt === elementorBreakpoints.widescreen.value || configBPKeyInt + 1 === elementorBreakpoints.widescreen.value)) {
1721 // Widescreen is a min-width breakpoint. Since in Swiper >5.0 the breakpoint system is min-width based,
1722 // the value we pass to the Swiper instance in this case is the breakpoint from the user, unchanged.
1723 breakpointToUpdate = configBPKeyInt;
1724 } else {
1725 // Find the index of the current config breakpoint in the Elementor Breakpoints array
1726 const currentBPIndexInElementorBPs = elementorBreakpointValues.findIndex(elementorBP => {
1727 // BC Fix for Elementor Pro Carousels from 2.8.0-2.8.3 used with Elementor >= 2.9.0
1728 return configBPKeyInt === elementorBP || configBPKeyInt + 1 === elementorBP;
1729 });
1730
1731 // For all other Swiper config breakpoints, move them one breakpoint down on the breakpoint list,
1732 // according to the array of Elementor's global breakpoints
1733 breakpointToUpdate = elementorBreakpointValues[currentBPIndexInElementorBPs - 1];
1734 }
1735 config.breakpoints[breakpointToUpdate] = config.breakpoints[configBPKey];
1736
1737 // Then reset the settings in the original breakpoint key to the default values
1738 config.breakpoints[configBPKey] = {
1739 slidesPerView: config.slidesPerView,
1740 slidesPerGroup: config.slidesPerGroup ? config.slidesPerGroup : 1
1741 };
1742 });
1743 return config;
1744 }
1745 }
1746 exports["default"] = Swiper;
1747
1748 /***/ }),
1749
1750 /***/ "../assets/dev/js/frontend/utils/url-actions.js":
1751 /*!******************************************************!*\
1752 !*** ../assets/dev/js/frontend/utils/url-actions.js ***!
1753 \******************************************************/
1754 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1755
1756
1757
1758 Object.defineProperty(exports, "__esModule", ({
1759 value: true
1760 }));
1761 exports["default"] = void 0;
1762 __webpack_require__(/*! core-js/modules/web.dom-exception.stack.js */ "../node_modules/core-js/modules/web.dom-exception.stack.js");
1763 class _default extends elementorModules.ViewModule {
1764 getDefaultSettings() {
1765 return {
1766 selectors: {
1767 links: 'a[href^="%23elementor-action"], a[href^="#elementor-action"]'
1768 }
1769 };
1770 }
1771 bindEvents() {
1772 elementorFrontend.elements.$document.on('click', this.getSettings('selectors.links'), this.runLinkAction.bind(this));
1773 }
1774 initActions() {
1775 this.actions = {
1776 lightbox: async settings => {
1777 const lightbox = await elementorFrontend.utils.lightbox;
1778 if (settings.slideshow) {
1779 // Handle slideshow display
1780 lightbox.openSlideshow(settings.slideshow, settings.url);
1781 } else {
1782 // If the settings has an ID - the lightbox target content is an image - the ID is an attachment ID.
1783 if (settings.id) {
1784 settings.type = 'image';
1785 }
1786 lightbox.showModal(settings);
1787 }
1788 }
1789 };
1790 }
1791 addAction(name, callback) {
1792 this.actions[name] = callback;
1793 }
1794 runAction(url) {
1795 url = decodeURIComponent(url);
1796 const actionMatch = url.match(/action=(.+?)&/);
1797 if (!actionMatch) {
1798 return;
1799 }
1800 const action = this.actions[actionMatch[1]];
1801 if (!action) {
1802 return;
1803 }
1804 let settings = {};
1805 const settingsMatch = url.match(/settings=(.+)/);
1806 if (settingsMatch) {
1807 settings = JSON.parse(atob(settingsMatch[1]));
1808 }
1809 settings.previousEvent = event;
1810 for (var _len = arguments.length, restArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1811 restArgs[_key - 1] = arguments[_key];
1812 }
1813 action(settings, ...restArgs);
1814 }
1815 runLinkAction(event) {
1816 event.preventDefault();
1817 this.runAction(jQuery(event.currentTarget).attr('href'), event);
1818 }
1819 runHashAction() {
1820 if (!location.hash) {
1821 return;
1822 }
1823
1824 // Only if an element with this action hash exists on the page do we allow running the action.
1825 const elementWithHash = document.querySelector(`[data-e-action-hash="${location.hash}"], a[href*="${location.hash}"]`);
1826 if (elementWithHash) {
1827 this.runAction(elementWithHash.getAttribute('data-e-action-hash'));
1828 }
1829 }
1830 createActionHash(action, settings) {
1831 // We need to encode the hash tag (#) here, in order to support share links for a variety of providers
1832 return encodeURIComponent(`#elementor-action:action=${action}&settings=${btoa(JSON.stringify(settings))}`);
1833 }
1834 onInit() {
1835 super.onInit();
1836 this.initActions();
1837 elementorFrontend.on('components:init', this.runHashAction.bind(this));
1838 }
1839 }
1840 exports["default"] = _default;
1841
1842 /***/ }),
1843
1844 /***/ "../assets/dev/js/frontend/utils/utils.js":
1845 /*!************************************************!*\
1846 !*** ../assets/dev/js/frontend/utils/utils.js ***!
1847 \************************************************/
1848 /***/ ((__unused_webpack_module, exports) => {
1849
1850
1851
1852 Object.defineProperty(exports, "__esModule", ({
1853 value: true
1854 }));
1855 exports.isScrollSnapActive = exports.escapeHTML = void 0;
1856 // Escape HTML special chars to prevent XSS.
1857 const escapeHTML = str => {
1858 const specialChars = {
1859 '&': '&amp;',
1860 '<': '&lt;',
1861 '>': '&gt;',
1862 "'": '&#39;',
1863 '"': '&quot;'
1864 };
1865 return str.replace(/[&<>'"]/g, tag => specialChars[tag] || tag);
1866 };
1867
1868 // Check if Scroll-Snap is active.
1869 exports.escapeHTML = escapeHTML;
1870 const isScrollSnapActive = () => {
1871 const scrollSnapStatus = elementorFrontend.isEditMode() ? elementor.settings.page.model.attributes?.scroll_snap : elementorFrontend.config.settings.page?.scroll_snap;
1872 return 'yes' === scrollSnapStatus ? true : false;
1873 };
1874 exports.isScrollSnapActive = isScrollSnapActive;
1875
1876 /***/ }),
1877
1878 /***/ "../assets/dev/js/frontend/utils/video-api/base-loader.js":
1879 /*!****************************************************************!*\
1880 !*** ../assets/dev/js/frontend/utils/video-api/base-loader.js ***!
1881 \****************************************************************/
1882 /***/ ((__unused_webpack_module, exports) => {
1883
1884
1885
1886 Object.defineProperty(exports, "__esModule", ({
1887 value: true
1888 }));
1889 exports["default"] = void 0;
1890 class BaseLoader extends elementorModules.ViewModule {
1891 getDefaultSettings() {
1892 return {
1893 isInserted: false,
1894 selectors: {
1895 firstScript: 'script:first'
1896 }
1897 };
1898 }
1899 getDefaultElements() {
1900 return {
1901 $firstScript: jQuery(this.getSettings('selectors.firstScript'))
1902 };
1903 }
1904 insertAPI() {
1905 this.elements.$firstScript.before(jQuery('<script>', {
1906 src: this.getApiURL()
1907 }));
1908 this.setSettings('isInserted', true);
1909 }
1910 getVideoIDFromURL(url) {
1911 const videoIDParts = url.match(this.getURLRegex());
1912 return videoIDParts && videoIDParts[1];
1913 }
1914 onApiReady(callback) {
1915 if (!this.getSettings('isInserted')) {
1916 this.insertAPI();
1917 }
1918 if (this.isApiLoaded()) {
1919 callback(this.getApiObject());
1920 } else {
1921 // If not ready check again by timeout..
1922 setTimeout(() => {
1923 this.onApiReady(callback);
1924 }, 350);
1925 }
1926 }
1927 getAutoplayURL(videoURL) {
1928 return videoURL.replace('&autoplay=0', '') + '&autoplay=1';
1929 }
1930 }
1931 exports["default"] = BaseLoader;
1932
1933 /***/ }),
1934
1935 /***/ "../assets/dev/js/frontend/utils/video-api/vimeo-loader.js":
1936 /*!*****************************************************************!*\
1937 !*** ../assets/dev/js/frontend/utils/video-api/vimeo-loader.js ***!
1938 \*****************************************************************/
1939 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1940
1941
1942
1943 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1944 Object.defineProperty(exports, "__esModule", ({
1945 value: true
1946 }));
1947 exports["default"] = void 0;
1948 var _baseLoader = _interopRequireDefault(__webpack_require__(/*! ./base-loader */ "../assets/dev/js/frontend/utils/video-api/base-loader.js"));
1949 class VimeoLoader extends _baseLoader.default {
1950 getApiURL() {
1951 return 'https://player.vimeo.com/api/player.js';
1952 }
1953 getURLRegex() {
1954 return /^(?:https?:\/\/)?(?:www|player\.)?(?:vimeo\.com\/)?(?:video\/|external\/)?(\d+)([^.?&#"'>]?)/;
1955 }
1956 isApiLoaded() {
1957 return window.Vimeo;
1958 }
1959 getApiObject() {
1960 return Vimeo;
1961 }
1962 getAutoplayURL(videoURL) {
1963 // Vimeo requires the '#t=' param to be last in the URL.
1964 const timeMatch = videoURL.match(/#t=[^&]*/);
1965 return videoURL.replace(timeMatch[0], '') + timeMatch;
1966 }
1967 }
1968 exports["default"] = VimeoLoader;
1969
1970 /***/ }),
1971
1972 /***/ "../assets/dev/js/frontend/utils/video-api/youtube-loader.js":
1973 /*!*******************************************************************!*\
1974 !*** ../assets/dev/js/frontend/utils/video-api/youtube-loader.js ***!
1975 \*******************************************************************/
1976 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1977
1978
1979
1980 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1981 Object.defineProperty(exports, "__esModule", ({
1982 value: true
1983 }));
1984 exports["default"] = void 0;
1985 var _baseLoader = _interopRequireDefault(__webpack_require__(/*! ./base-loader */ "../assets/dev/js/frontend/utils/video-api/base-loader.js"));
1986 class YoutubeLoader extends _baseLoader.default {
1987 getApiURL() {
1988 return 'https://www.youtube.com/iframe_api';
1989 }
1990 getURLRegex() {
1991 return /^(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?vi?=|(?:embed|v|vi|user)\/))([^?&"'>]+)/;
1992 }
1993 isApiLoaded() {
1994 return window.YT && YT.loaded;
1995 }
1996 getApiObject() {
1997 return YT;
1998 }
1999 }
2000 exports["default"] = YoutubeLoader;
2001
2002 /***/ }),
2003
2004 /***/ "../assets/dev/js/public-path.js":
2005 /*!***************************************!*\
2006 !*** ../assets/dev/js/public-path.js ***!
2007 \***************************************/
2008 /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
2009
2010
2011
2012 /* eslint-disable camelcase */
2013 __webpack_require__.p = elementorFrontendConfig.urls.assets + 'js/';
2014
2015 /***/ }),
2016
2017 /***/ "../assets/dev/js/utils/breakpoints.js":
2018 /*!*********************************************!*\
2019 !*** ../assets/dev/js/utils/breakpoints.js ***!
2020 \*********************************************/
2021 /***/ ((__unused_webpack_module, exports) => {
2022
2023
2024
2025 Object.defineProperty(exports, "__esModule", ({
2026 value: true
2027 }));
2028 exports["default"] = void 0;
2029 /**
2030 * Breakpoints
2031 *
2032 * This utility class contains helper functions relating to Elementor's breakpoints system.
2033 *
2034 * @since 3.4.0
2035 */
2036 class Breakpoints extends elementorModules.Module {
2037 constructor(responsiveConfig) {
2038 super();
2039
2040 // The passed config is either `elementor.config.responsive` or `elementorFrontend.config.responsive`
2041 this.responsiveConfig = responsiveConfig;
2042 }
2043
2044 /**
2045 * Get Active Breakpoints List
2046 *
2047 * Returns a flat array containing the active breakpoints/devices. By default, it returns the li
2048 * the list ordered from smallest to largest breakpoint. If `true` is passed as a parameter, it reverses the order.
2049 *
2050 * @since 3.4.0
2051 *
2052 * @param {Object} args
2053 */
2054 getActiveBreakpointsList() {
2055 let args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2056 const defaultArgs = {
2057 largeToSmall: false,
2058 withDesktop: false
2059 };
2060 args = {
2061 ...defaultArgs,
2062 ...args
2063 };
2064 const breakpointKeys = Object.keys(this.responsiveConfig.activeBreakpoints);
2065 if (args.withDesktop) {
2066 // If there is an active 'widescreen' breakpoint, insert the artificial 'desktop' device below it.
2067 const widescreenIndex = breakpointKeys.indexOf('widescreen'),
2068 indexToInsertDesktopDevice = -1 === widescreenIndex ? breakpointKeys.length : breakpointKeys.length - 1;
2069 breakpointKeys.splice(indexToInsertDesktopDevice, 0, 'desktop');
2070 }
2071 if (args.largeToSmall) {
2072 breakpointKeys.reverse();
2073 }
2074 return breakpointKeys;
2075 }
2076
2077 /**
2078 * Get Active Breakpoint Values
2079 *
2080 * Returns a flat array containing the list of active breakpoint values, from smallest to largest.
2081 *
2082 * @since 3.4.0
2083 */
2084 getBreakpointValues() {
2085 const {
2086 activeBreakpoints
2087 } = this.responsiveConfig,
2088 breakpointValues = [];
2089 Object.values(activeBreakpoints).forEach(breakpointConfig => {
2090 breakpointValues.push(breakpointConfig.value);
2091 });
2092 return breakpointValues;
2093 }
2094
2095 /**
2096 * Get Desktop Previous Device Key
2097 *
2098 * Returns the key of the device directly under desktop (can be 'tablet', 'tablet_extra', 'laptop').
2099 *
2100 * @since 3.4.0
2101 *
2102 * @return {string} device key
2103 */
2104 getDesktopPreviousDeviceKey() {
2105 let desktopPreviousDevice = '';
2106 const {
2107 activeBreakpoints
2108 } = this.responsiveConfig,
2109 breakpointKeys = Object.keys(activeBreakpoints),
2110 numOfDevices = breakpointKeys.length;
2111 if ('min' === activeBreakpoints[breakpointKeys[numOfDevices - 1]].direction) {
2112 // If the widescreen breakpoint is active, the device that's previous to desktop is the last one before
2113 // widescreen.
2114 desktopPreviousDevice = breakpointKeys[numOfDevices - 2];
2115 } else {
2116 // If the widescreen breakpoint isn't active, we just take the last device returned by the config.
2117 desktopPreviousDevice = breakpointKeys[numOfDevices - 1];
2118 }
2119 return desktopPreviousDevice;
2120 }
2121
2122 /**
2123 * Get Device Minimum Breakpoint
2124 *
2125 * Returns the minimum point in the device's display range. For each device, the minimum point of its display range
2126 * is the max point of the device below it + 1px. For example, if the active devices are mobile, tablet,
2127 * and desktop, and the mobile breakpoint is 767px, the minimum display point for tablet devices is 768px.
2128 *
2129 * @since 3.4.0
2130 *
2131 * @return {number|*} minimum breakpoint
2132 */
2133 getDesktopMinPoint() {
2134 const {
2135 activeBreakpoints
2136 } = this.responsiveConfig,
2137 desktopPreviousDevice = this.getDesktopPreviousDeviceKey();
2138 return activeBreakpoints[desktopPreviousDevice].value + 1;
2139 }
2140
2141 /**
2142 * Get Device Minimum Breakpoint
2143 *
2144 * Returns the minimum point in the device's display range. For each device, the minimum point of its display range
2145 * is the max point of the device below it + 1px. For example, if the active devices are mobile, tablet,
2146 * and desktop, and the mobile breakpoint is 767px, the minimum display point for tablet devices is 768px.
2147 *
2148 * @since 3.4.0
2149 *
2150 * @param {string} device
2151 * @return {number|*} minimum breakpoint
2152 */
2153 getDeviceMinBreakpoint(device) {
2154 if ('desktop' === device) {
2155 return this.getDesktopMinPoint();
2156 }
2157 const {
2158 activeBreakpoints
2159 } = this.responsiveConfig,
2160 breakpointNames = Object.keys(activeBreakpoints);
2161 let minBreakpoint;
2162 if (breakpointNames[0] === device) {
2163 // For the lowest breakpoint, the min point is always 320.
2164 minBreakpoint = 320;
2165 } else if ('widescreen' === device) {
2166 // Widescreen only has a minimum point. In this case, the breakpoint
2167 // value in the Breakpoints config is itself the device min point.
2168 if (activeBreakpoints[device]) {
2169 minBreakpoint = activeBreakpoints[device].value;
2170 } else {
2171 // If the widescreen breakpoint does not exist in the active breakpoints config (for example, in the
2172 // case this method runs as the breakpoint is being added), get the value from the full config.
2173 minBreakpoint = this.responsiveConfig.breakpoints.widescreen;
2174 }
2175 } else {
2176 const deviceNameIndex = breakpointNames.indexOf(device),
2177 previousIndex = deviceNameIndex - 1;
2178 minBreakpoint = activeBreakpoints[breakpointNames[previousIndex]].value + 1;
2179 }
2180 return minBreakpoint;
2181 }
2182
2183 /**
2184 * Get Active Match Regex
2185 *
2186 * Returns a regular expression containing all active breakpoints prefixed with an underscore.
2187 *
2188 * @return {RegExp} Active Match Regex
2189 */
2190 getActiveMatchRegex() {
2191 return new RegExp(this.getActiveBreakpointsList().map(device => '_' + device).join('|') + '$');
2192 }
2193 }
2194 exports["default"] = Breakpoints;
2195
2196 /***/ }),
2197
2198 /***/ "../assets/dev/js/utils/events.js":
2199 /*!****************************************!*\
2200 !*** ../assets/dev/js/utils/events.js ***!
2201 \****************************************/
2202 /***/ ((__unused_webpack_module, exports) => {
2203
2204
2205
2206 Object.defineProperty(exports, "__esModule", ({
2207 value: true
2208 }));
2209 exports["default"] = exports.Events = void 0;
2210 class Events {
2211 /**
2212 * Dispatch an Elementor event.
2213 *
2214 * Will dispatch both native event & jQuery event (as BC).
2215 * By default, `bcEvent` is `null`.
2216 *
2217 * @param {Object} context - The context that will dispatch the event.
2218 * @param {string} event - Event to dispatch.
2219 * @param {*} data - Data to pass to the event, default to `null`.
2220 * @param {string|null} bcEvent - BC event to dispatch, default to `null`.
2221 *
2222 * @return {void}
2223 */
2224 static dispatch(context, event) {
2225 let data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
2226 let bcEvent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
2227 // Make sure to use the native context if it's a jQuery instance.
2228 context = context instanceof jQuery ? context[0] : context;
2229
2230 // Dispatch the BC event only if exists.
2231 if (bcEvent) {
2232 context.dispatchEvent(new CustomEvent(bcEvent, {
2233 detail: data
2234 }));
2235 }
2236
2237 // jQuery's `.on()` listens also to native custom events, so there is no need
2238 // to dispatch also a jQuery event.
2239 context.dispatchEvent(new CustomEvent(event, {
2240 detail: data
2241 }));
2242 }
2243 }
2244 exports.Events = Events;
2245 var _default = Events;
2246 exports["default"] = _default;
2247
2248 /***/ }),
2249
2250 /***/ "../assets/dev/js/utils/hooks.js":
2251 /*!***************************************!*\
2252 !*** ../assets/dev/js/utils/hooks.js ***!
2253 \***************************************/
2254 /***/ ((module) => {
2255
2256
2257
2258 /**
2259 * Handles managing all events for whatever you plug it into. Priorities for hooks are based on lowest to highest in
2260 * that, lowest priority hooks are fired first.
2261 */
2262 var EventManager = function () {
2263 var slice = Array.prototype.slice,
2264 MethodsAvailable;
2265
2266 /**
2267 * Contains the hooks that get registered with this EventManager. The array for storage utilizes a "flat"
2268 * object literal such that looking up the hook utilizes the native object literal hash.
2269 */
2270 var STORAGE = {
2271 actions: {},
2272 filters: {}
2273 };
2274
2275 /**
2276 * Removes the specified hook by resetting the value of it.
2277 *
2278 * @param {string} type Type of hook, either 'actions' or 'filters'
2279 * @param {Function} hook The hook (namespace.identifier) to remove
2280 * @param {Function} callback
2281 * @param {*} context
2282 * @private
2283 */
2284 function _removeHook(type, hook, callback, context) {
2285 var handlers, handler, i;
2286 if (!STORAGE[type][hook]) {
2287 return;
2288 }
2289 if (!callback) {
2290 STORAGE[type][hook] = [];
2291 } else {
2292 handlers = STORAGE[type][hook];
2293 if (!context) {
2294 for (i = handlers.length; i--;) {
2295 if (handlers[i].callback === callback) {
2296 handlers.splice(i, 1);
2297 }
2298 }
2299 } else {
2300 for (i = handlers.length; i--;) {
2301 handler = handlers[i];
2302 if (handler.callback === callback && handler.context === context) {
2303 handlers.splice(i, 1);
2304 }
2305 }
2306 }
2307 }
2308 }
2309
2310 /**
2311 * Use an insert sort for keeping our hooks organized based on priority. This function is ridiculously faster
2312 * than bubble sort, etc: http://jsperf.com/javascript-sort
2313 *
2314 * @param {Array<*>} hooks The custom array containing all of the appropriate hooks to perform an insert sort on.
2315 * @private
2316 */
2317 function _hookInsertSort(hooks) {
2318 var tmpHook, j, prevHook;
2319 for (var i = 1, len = hooks.length; i < len; i++) {
2320 tmpHook = hooks[i];
2321 j = i;
2322 while ((prevHook = hooks[j - 1]) && prevHook.priority > tmpHook.priority) {
2323 hooks[j] = hooks[j - 1];
2324 --j;
2325 }
2326 hooks[j] = tmpHook;
2327 }
2328 return hooks;
2329 }
2330
2331 /**
2332 * Adds the hook to the appropriate storage container
2333 *
2334 * @param {string} type 'actions' or 'filters'
2335 * @param {Array<*>} hook The hook (namespace.identifier) to add to our event manager
2336 * @param {Function} callback The function that will be called when the hook is executed.
2337 * @param {number} priority The priority of this hook. Must be an integer.
2338 * @param {*} [context] A value to be used for this
2339 * @private
2340 */
2341 function _addHook(type, hook, callback, priority, context) {
2342 var hookObject = {
2343 callback,
2344 priority,
2345 context
2346 };
2347
2348 // Utilize 'prop itself' : http://jsperf.com/hasownproperty-vs-in-vs-undefined/19
2349 var hooks = STORAGE[type][hook];
2350 if (hooks) {
2351 // TEMP FIX BUG
2352 var hasSameCallback = false;
2353 jQuery.each(hooks, function () {
2354 if (this.callback === callback) {
2355 hasSameCallback = true;
2356 return false;
2357 }
2358 });
2359 if (hasSameCallback) {
2360 return;
2361 }
2362 // END TEMP FIX BUG
2363
2364 hooks.push(hookObject);
2365 hooks = _hookInsertSort(hooks);
2366 } else {
2367 hooks = [hookObject];
2368 }
2369 STORAGE[type][hook] = hooks;
2370 }
2371
2372 /**
2373 * Runs the specified hook. If it is an action, the value is not modified but if it is a filter, it is.
2374 *
2375 * @param {string} type 'actions' or 'filters'
2376 * @param {*} hook The hook ( namespace.identifier ) to be ran.
2377 * @param {Array<*>} args Arguments to pass to the action/filter. If it's a filter, args is actually a single parameter.
2378 * @private
2379 */
2380 function _runHook(type, hook, args) {
2381 var handlers = STORAGE[type][hook],
2382 i,
2383 len;
2384 if (!handlers) {
2385 return 'filters' === type ? args[0] : false;
2386 }
2387 len = handlers.length;
2388 if ('filters' === type) {
2389 for (i = 0; i < len; i++) {
2390 args[0] = handlers[i].callback.apply(handlers[i].context, args);
2391 }
2392 } else {
2393 for (i = 0; i < len; i++) {
2394 handlers[i].callback.apply(handlers[i].context, args);
2395 }
2396 }
2397 return 'filters' === type ? args[0] : true;
2398 }
2399
2400 /**
2401 * Adds an action to the event manager.
2402 *
2403 * @param {string} action Must contain namespace.identifier
2404 * @param {Function} callback Must be a valid callback function before this action is added
2405 * @param {number} [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook
2406 * @param {*} [context] Supply a value to be used for this
2407 */
2408 function addAction(action, callback, priority, context) {
2409 if ('string' === typeof action && 'function' === typeof callback) {
2410 priority = parseInt(priority || 10, 10);
2411 _addHook('actions', action, callback, priority, context);
2412 }
2413 return MethodsAvailable;
2414 }
2415
2416 /**
2417 * Performs an action if it exists. You can pass as many arguments as you want to this function; the only rule is
2418 * that the first argument must always be the action.
2419 */
2420 function doAction( /* Action, arg1, arg2, ... */
2421 ) {
2422 var args = slice.call(arguments);
2423 var action = args.shift();
2424 if ('string' === typeof action) {
2425 _runHook('actions', action, args);
2426 }
2427 return MethodsAvailable;
2428 }
2429
2430 /**
2431 * Removes the specified action if it contains a namespace.identifier & exists.
2432 *
2433 * @param {string} action The action to remove
2434 * @param {Function} [callback] Callback function to remove
2435 */
2436 function removeAction(action, callback) {
2437 if ('string' === typeof action) {
2438 _removeHook('actions', action, callback);
2439 }
2440 return MethodsAvailable;
2441 }
2442
2443 /**
2444 * Adds a filter to the event manager.
2445 *
2446 * @param {string} filter Must contain namespace.identifier
2447 * @param {Function} callback Must be a valid callback function before this action is added
2448 * @param {number} [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook
2449 * @param {*} [context] Supply a value to be used for this
2450 */
2451 function addFilter(filter, callback, priority, context) {
2452 if ('string' === typeof filter && 'function' === typeof callback) {
2453 priority = parseInt(priority || 10, 10);
2454 _addHook('filters', filter, callback, priority, context);
2455 }
2456 return MethodsAvailable;
2457 }
2458
2459 /**
2460 * Performs a filter if it exists. You should only ever pass 1 argument to be filtered. The only rule is that
2461 * the first argument must always be the filter.
2462 */
2463 function applyFilters( /* Filter, filtered arg, arg2, ... */
2464 ) {
2465 var args = slice.call(arguments);
2466 var filter = args.shift();
2467 if ('string' === typeof filter) {
2468 return _runHook('filters', filter, args);
2469 }
2470 return MethodsAvailable;
2471 }
2472
2473 /**
2474 * Removes the specified filter if it contains a namespace.identifier & exists.
2475 *
2476 * @param {string} filter The action to remove
2477 * @param {Function} [callback] Callback function to remove
2478 */
2479 function removeFilter(filter, callback) {
2480 if ('string' === typeof filter) {
2481 _removeHook('filters', filter, callback);
2482 }
2483 return MethodsAvailable;
2484 }
2485
2486 /**
2487 * Maintain a reference to the object scope so our public methods never get confusing.
2488 */
2489 MethodsAvailable = {
2490 removeFilter,
2491 applyFilters,
2492 addFilter,
2493 removeAction,
2494 doAction,
2495 addAction
2496 };
2497
2498 // Return all of the publicly available methods
2499 return MethodsAvailable;
2500 };
2501 module.exports = EventManager;
2502
2503 /***/ }),
2504
2505 /***/ "../core/common/assets/js/utils/environment.js":
2506 /*!*****************************************************!*\
2507 !*** ../core/common/assets/js/utils/environment.js ***!
2508 \*****************************************************/
2509 /***/ ((__unused_webpack_module, exports) => {
2510
2511
2512
2513 Object.defineProperty(exports, "__esModule", ({
2514 value: true
2515 }));
2516 exports["default"] = void 0;
2517 const matchUserAgent = UserAgentStr => {
2518 return userAgent.indexOf(UserAgentStr) >= 0;
2519 },
2520 userAgent = navigator.userAgent,
2521 // Solution influenced by https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser
2522
2523 // Opera 8.0+
2524 isOpera = !!window.opr && !!opr.addons || !!window.opera || matchUserAgent(' OPR/'),
2525 // Firefox 1.0+
2526 isFirefox = matchUserAgent('Firefox'),
2527 // Safari 3.0+ "[object HTMLElementConstructor]"
2528 isSafari = /^((?!chrome|android).)*safari/i.test(userAgent) || /constructor/i.test(window.HTMLElement) || (p => {
2529 return '[object SafariRemoteNotification]' === p.toString();
2530 })(!window.safari || typeof safari !== 'undefined' && safari.pushNotification),
2531 // Internet Explorer 6-11
2532 isIE = /Trident|MSIE/.test(userAgent) && ( /* @cc_on!@*/ false || !!document.documentMode),
2533 // Edge 20+
2534 isEdge = !isIE && !!window.StyleMedia || matchUserAgent('Edg'),
2535 // Google Chrome (Not accurate)
2536 isChrome = !!window.chrome && matchUserAgent('Chrome') && !(isEdge || isOpera),
2537 // Blink engine
2538 isBlink = matchUserAgent('Chrome') && !!window.CSS,
2539 // Apple Webkit engine
2540 isAppleWebkit = matchUserAgent('AppleWebKit') && !isBlink,
2541 isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0,
2542 environment = {
2543 isTouchDevice,
2544 appleWebkit: isAppleWebkit,
2545 blink: isBlink,
2546 chrome: isChrome,
2547 edge: isEdge,
2548 firefox: isFirefox,
2549 ie: isIE,
2550 mac: matchUserAgent('Macintosh'),
2551 opera: isOpera,
2552 safari: isSafari,
2553 webkit: matchUserAgent('AppleWebKit')
2554 };
2555 var _default = environment;
2556 exports["default"] = _default;
2557
2558 /***/ }),
2559
2560 /***/ "../core/common/assets/js/utils/storage.js":
2561 /*!*************************************************!*\
2562 !*** ../core/common/assets/js/utils/storage.js ***!
2563 \*************************************************/
2564 /***/ ((__unused_webpack_module, exports) => {
2565
2566
2567
2568 Object.defineProperty(exports, "__esModule", ({
2569 value: true
2570 }));
2571 exports["default"] = void 0;
2572 class _default extends elementorModules.Module {
2573 get(key, options) {
2574 options = options || {};
2575 let storage;
2576 try {
2577 storage = options.session ? sessionStorage : localStorage;
2578 } catch (e) {
2579 return key ? undefined : {};
2580 }
2581 let elementorStorage = storage.getItem('elementor');
2582 if (elementorStorage) {
2583 elementorStorage = JSON.parse(elementorStorage);
2584 } else {
2585 elementorStorage = {};
2586 }
2587 if (!elementorStorage.__expiration) {
2588 elementorStorage.__expiration = {};
2589 }
2590 const expiration = elementorStorage.__expiration;
2591 let expirationToCheck = [];
2592 if (key) {
2593 if (expiration[key]) {
2594 expirationToCheck = [key];
2595 }
2596 } else {
2597 expirationToCheck = Object.keys(expiration);
2598 }
2599 let entryExpired = false;
2600 expirationToCheck.forEach(expirationKey => {
2601 if (new Date(expiration[expirationKey]) < new Date()) {
2602 delete elementorStorage[expirationKey];
2603 delete expiration[expirationKey];
2604 entryExpired = true;
2605 }
2606 });
2607 if (entryExpired) {
2608 this.save(elementorStorage, options.session);
2609 }
2610 if (key) {
2611 return elementorStorage[key];
2612 }
2613 return elementorStorage;
2614 }
2615 set(key, value, options) {
2616 options = options || {};
2617 const elementorStorage = this.get(null, options);
2618 elementorStorage[key] = value;
2619 if (options.lifetimeInSeconds) {
2620 const date = new Date();
2621 date.setTime(date.getTime() + options.lifetimeInSeconds * 1000);
2622 elementorStorage.__expiration[key] = date.getTime();
2623 }
2624 this.save(elementorStorage, options.session);
2625 }
2626 save(object, session) {
2627 let storage;
2628 try {
2629 storage = session ? sessionStorage : localStorage;
2630 } catch (e) {
2631 return;
2632 }
2633 storage.setItem('elementor', JSON.stringify(object));
2634 }
2635 }
2636 exports["default"] = _default;
2637
2638 /***/ }),
2639
2640 /***/ "../modules/shapes/assets/js/frontend/frontend.js":
2641 /*!********************************************************!*\
2642 !*** ../modules/shapes/assets/js/frontend/frontend.js ***!
2643 \********************************************************/
2644 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2645
2646
2647
2648 Object.defineProperty(exports, "__esModule", ({
2649 value: true
2650 }));
2651 exports["default"] = void 0;
2652 class _default extends elementorModules.Module {
2653 constructor() {
2654 super();
2655 elementorFrontend.elementsHandler.attachHandler('text-path', () => __webpack_require__.e(/*! import() | text-path */ "text-path").then(__webpack_require__.bind(__webpack_require__, /*! ./handlers/text-path */ "../modules/shapes/assets/js/frontend/handlers/text-path.js")));
2656 }
2657 }
2658 exports["default"] = _default;
2659
2660 /***/ }),
2661
2662 /***/ "../node_modules/core-js/internals/an-instance.js":
2663 /*!********************************************************!*\
2664 !*** ../node_modules/core-js/internals/an-instance.js ***!
2665 \********************************************************/
2666 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2667
2668
2669 var isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ "../node_modules/core-js/internals/object-is-prototype-of.js");
2670
2671 var $TypeError = TypeError;
2672
2673 module.exports = function (it, Prototype) {
2674 if (isPrototypeOf(Prototype, it)) return it;
2675 throw $TypeError('Incorrect invocation');
2676 };
2677
2678
2679 /***/ }),
2680
2681 /***/ "../node_modules/core-js/internals/dom-exception-constants.js":
2682 /*!********************************************************************!*\
2683 !*** ../node_modules/core-js/internals/dom-exception-constants.js ***!
2684 \********************************************************************/
2685 /***/ ((module) => {
2686
2687
2688 module.exports = {
2689 IndexSizeError: { s: 'INDEX_SIZE_ERR', c: 1, m: 1 },
2690 DOMStringSizeError: { s: 'DOMSTRING_SIZE_ERR', c: 2, m: 0 },
2691 HierarchyRequestError: { s: 'HIERARCHY_REQUEST_ERR', c: 3, m: 1 },
2692 WrongDocumentError: { s: 'WRONG_DOCUMENT_ERR', c: 4, m: 1 },
2693 InvalidCharacterError: { s: 'INVALID_CHARACTER_ERR', c: 5, m: 1 },
2694 NoDataAllowedError: { s: 'NO_DATA_ALLOWED_ERR', c: 6, m: 0 },
2695 NoModificationAllowedError: { s: 'NO_MODIFICATION_ALLOWED_ERR', c: 7, m: 1 },
2696 NotFoundError: { s: 'NOT_FOUND_ERR', c: 8, m: 1 },
2697 NotSupportedError: { s: 'NOT_SUPPORTED_ERR', c: 9, m: 1 },
2698 InUseAttributeError: { s: 'INUSE_ATTRIBUTE_ERR', c: 10, m: 1 },
2699 InvalidStateError: { s: 'INVALID_STATE_ERR', c: 11, m: 1 },
2700 SyntaxError: { s: 'SYNTAX_ERR', c: 12, m: 1 },
2701 InvalidModificationError: { s: 'INVALID_MODIFICATION_ERR', c: 13, m: 1 },
2702 NamespaceError: { s: 'NAMESPACE_ERR', c: 14, m: 1 },
2703 InvalidAccessError: { s: 'INVALID_ACCESS_ERR', c: 15, m: 1 },
2704 ValidationError: { s: 'VALIDATION_ERR', c: 16, m: 0 },
2705 TypeMismatchError: { s: 'TYPE_MISMATCH_ERR', c: 17, m: 1 },
2706 SecurityError: { s: 'SECURITY_ERR', c: 18, m: 1 },
2707 NetworkError: { s: 'NETWORK_ERR', c: 19, m: 1 },
2708 AbortError: { s: 'ABORT_ERR', c: 20, m: 1 },
2709 URLMismatchError: { s: 'URL_MISMATCH_ERR', c: 21, m: 1 },
2710 QuotaExceededError: { s: 'QUOTA_EXCEEDED_ERR', c: 22, m: 1 },
2711 TimeoutError: { s: 'TIMEOUT_ERR', c: 23, m: 1 },
2712 InvalidNodeTypeError: { s: 'INVALID_NODE_TYPE_ERR', c: 24, m: 1 },
2713 DataCloneError: { s: 'DATA_CLONE_ERR', c: 25, m: 1 }
2714 };
2715
2716
2717 /***/ }),
2718
2719 /***/ "../node_modules/core-js/modules/web.dom-exception.stack.js":
2720 /*!******************************************************************!*\
2721 !*** ../node_modules/core-js/modules/web.dom-exception.stack.js ***!
2722 \******************************************************************/
2723 /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
2724
2725
2726 var $ = __webpack_require__(/*! ../internals/export */ "../node_modules/core-js/internals/export.js");
2727 var global = __webpack_require__(/*! ../internals/global */ "../node_modules/core-js/internals/global.js");
2728 var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "../node_modules/core-js/internals/get-built-in.js");
2729 var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "../node_modules/core-js/internals/create-property-descriptor.js");
2730 var defineProperty = (__webpack_require__(/*! ../internals/object-define-property */ "../node_modules/core-js/internals/object-define-property.js").f);
2731 var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "../node_modules/core-js/internals/has-own-property.js");
2732 var anInstance = __webpack_require__(/*! ../internals/an-instance */ "../node_modules/core-js/internals/an-instance.js");
2733 var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "../node_modules/core-js/internals/inherit-if-required.js");
2734 var normalizeStringArgument = __webpack_require__(/*! ../internals/normalize-string-argument */ "../node_modules/core-js/internals/normalize-string-argument.js");
2735 var DOMExceptionConstants = __webpack_require__(/*! ../internals/dom-exception-constants */ "../node_modules/core-js/internals/dom-exception-constants.js");
2736 var clearErrorStack = __webpack_require__(/*! ../internals/error-stack-clear */ "../node_modules/core-js/internals/error-stack-clear.js");
2737 var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "../node_modules/core-js/internals/descriptors.js");
2738 var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "../node_modules/core-js/internals/is-pure.js");
2739
2740 var DOM_EXCEPTION = 'DOMException';
2741 var Error = getBuiltIn('Error');
2742 var NativeDOMException = getBuiltIn(DOM_EXCEPTION);
2743
2744 var $DOMException = function DOMException() {
2745 anInstance(this, DOMExceptionPrototype);
2746 var argumentsLength = arguments.length;
2747 var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]);
2748 var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error');
2749 var that = new NativeDOMException(message, name);
2750 var error = Error(message);
2751 error.name = DOM_EXCEPTION;
2752 defineProperty(that, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1)));
2753 inheritIfRequired(that, this, $DOMException);
2754 return that;
2755 };
2756
2757 var DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototype;
2758
2759 var ERROR_HAS_STACK = 'stack' in Error(DOM_EXCEPTION);
2760 var DOM_EXCEPTION_HAS_STACK = 'stack' in new NativeDOMException(1, 2);
2761
2762 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
2763 var descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(global, DOM_EXCEPTION);
2764
2765 // Bun ~ 0.1.1 DOMException have incorrect descriptor and we can't redefine it
2766 // https://github.com/Jarred-Sumner/bun/issues/399
2767 var BUGGY_DESCRIPTOR = !!descriptor && !(descriptor.writable && descriptor.configurable);
2768
2769 var FORCED_CONSTRUCTOR = ERROR_HAS_STACK && !BUGGY_DESCRIPTOR && !DOM_EXCEPTION_HAS_STACK;
2770
2771 // `DOMException` constructor patch for `.stack` where it's required
2772 // https://webidl.spec.whatwg.org/#es-DOMException-specialness
2773 $({ global: true, constructor: true, forced: IS_PURE || FORCED_CONSTRUCTOR }, { // TODO: fix export logic
2774 DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException
2775 });
2776
2777 var PolyfilledDOMException = getBuiltIn(DOM_EXCEPTION);
2778 var PolyfilledDOMExceptionPrototype = PolyfilledDOMException.prototype;
2779
2780 if (PolyfilledDOMExceptionPrototype.constructor !== PolyfilledDOMException) {
2781 if (!IS_PURE) {
2782 defineProperty(PolyfilledDOMExceptionPrototype, 'constructor', createPropertyDescriptor(1, PolyfilledDOMException));
2783 }
2784
2785 for (var key in DOMExceptionConstants) if (hasOwn(DOMExceptionConstants, key)) {
2786 var constant = DOMExceptionConstants[key];
2787 var constantName = constant.s;
2788 if (!hasOwn(PolyfilledDOMException, constantName)) {
2789 defineProperty(PolyfilledDOMException, constantName, createPropertyDescriptor(6, constant.c));
2790 }
2791 }
2792 }
2793
2794
2795 /***/ })
2796
2797 },
2798 /******/ __webpack_require__ => { // webpackRuntimeModules
2799 /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
2800 /******/ __webpack_require__.O(0, ["frontend-modules"], () => (__webpack_exec__("../assets/dev/js/frontend/frontend.js")));
2801 /******/ var __webpack_exports__ = __webpack_require__.O();
2802 /******/ }
2803 ]);
2804 //# sourceMappingURL=frontend.js.map