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