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