PluginProbe
Elementor Website Builder – more than just a page builder / 3.34.0-beta1
Elementor Website Builder – more than just a page builder v3.34.0-beta1
4.3.4 4.3.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 All 457 releases
← All changes | assets/js/common.js +96 -720 4.1.0 → 3.34.0-beta1 View file →
@@ -1,391 +1,7 @@
1 1 /******/ (() => { // webpackBootstrap
2 2 /******/ var __webpack_modules__ = ({
3 3
4 -/***/ "../assets/dev/js/editor/utils/editor-one-events.js":
5 -/*!**********************************************************!*\
6 - !*** ../assets/dev/js/editor/utils/editor-one-events.js ***!
7 - \**********************************************************/
8 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9 -
10 -"use strict";
11 -
12 -
13 -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
14 -Object.defineProperty(exports, "__esModule", ({
15 - value: true
16 -}));
17 -exports["default"] = exports.createDebouncedWidgetPanelSearch = exports.createDebouncedFinderSearch = exports.EditorOneEventManager = void 0;
18 -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
19 -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
20 -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
21 -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22 -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
23 -var EditorOneEventManager = exports.EditorOneEventManager = /*#__PURE__*/function () {
24 - function EditorOneEventManager() {
25 - (0, _classCallCheck2.default)(this, EditorOneEventManager);
26 - }
27 - return (0, _createClass2.default)(EditorOneEventManager, null, [{
28 - key: "getEventsManager",
29 - value: function getEventsManager() {
30 - var _elementorCommon;
31 - return (_elementorCommon = elementorCommon) === null || _elementorCommon === void 0 ? void 0 : _elementorCommon.eventsManager;
32 - }
33 - }, {
34 - key: "getConfig",
35 - value: function getConfig() {
36 - var _this$getEventsManage;
37 - return (_this$getEventsManage = this.getEventsManager()) === null || _this$getEventsManage === void 0 ? void 0 : _this$getEventsManage.config;
38 - }
39 - }, {
40 - key: "canSendEvents",
41 - value: function canSendEvents() {
42 - var _elementorCommon2;
43 - return ((_elementorCommon2 = elementorCommon) === null || _elementorCommon2 === void 0 || (_elementorCommon2 = _elementorCommon2.config) === null || _elementorCommon2 === void 0 || (_elementorCommon2 = _elementorCommon2.editor_events) === null || _elementorCommon2 === void 0 ? void 0 : _elementorCommon2.can_send_events) || false;
44 - }
45 - }, {
46 - key: "isEventsManagerAvailable",
47 - value: function isEventsManagerAvailable() {
48 - var eventsManager = this.getEventsManager();
49 - return eventsManager && 'function' === typeof eventsManager.dispatchEvent;
50 - }
51 - }, {
52 - key: "dispatchEvent",
53 - value: function dispatchEvent(eventName, payload) {
54 - if (!this.isEventsManagerAvailable() || !this.canSendEvents()) {
55 - return false;
56 - }
57 - try {
58 - return this.getEventsManager().dispatchEvent(eventName, payload);
59 - } catch (error) {
60 - return false;
61 - }
62 - }
63 - }, {
64 - key: "toLowerSnake",
65 - value: function toLowerSnake(value) {
66 - if (!value || 'string' !== typeof value) {
67 - return value;
68 - }
69 - return value.replace(/\s+/g, '_').toLowerCase();
70 - }
71 - }, {
72 - key: "decodeHtmlEntities",
73 - value: function decodeHtmlEntities(text) {
74 - if (!text || 'string' !== typeof text) {
75 - return text;
76 - }
77 - var doc = new DOMParser().parseFromString(text, 'text/html');
78 - return doc.body.textContent || text;
79 - }
80 - }, {
81 - key: "isInEditorContext",
82 - value: function isInEditorContext() {
83 - var _window$elementor;
84 - return 'undefined' !== typeof window.elementor && !!((_window$elementor = window.elementor) !== null && _window$elementor !== void 0 && _window$elementor.documents);
85 - }
86 - }, {
87 - key: "getFinderContext",
88 - value: function getFinderContext() {
89 - var _config$appTypes, _config$appTypes2, _config$locations, _config$locations2;
90 - var config = this.getConfig();
91 - var isEditor = this.isInEditorContext();
92 - return {
93 - windowName: isEditor ? config === null || config === void 0 || (_config$appTypes = config.appTypes) === null || _config$appTypes === void 0 ? void 0 : _config$appTypes.editor : config === null || config === void 0 || (_config$appTypes2 = config.appTypes) === null || _config$appTypes2 === void 0 ? void 0 : _config$appTypes2.wpAdmin,
94 - targetLocation: this.toLowerSnake(isEditor ? config === null || config === void 0 || (_config$locations = config.locations) === null || _config$locations === void 0 ? void 0 : _config$locations.topBar : config === null || config === void 0 || (_config$locations2 = config.locations) === null || _config$locations2 === void 0 ? void 0 : _config$locations2.sidebar)
95 - };
96 - }
97 - }, {
98 - key: "createBasePayload",
99 - value: function createBasePayload() {
100 - var _config$appTypes$edit, _config$appTypes3, _config$appTypes$edit2, _config$appTypes4;
101 - var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
102 - var config = this.getConfig();
103 - return _objectSpread({
104 - app_type: (_config$appTypes$edit = config === null || config === void 0 || (_config$appTypes3 = config.appTypes) === null || _config$appTypes3 === void 0 ? void 0 : _config$appTypes3.editor) !== null && _config$appTypes$edit !== void 0 ? _config$appTypes$edit : 'editor',
105 - window_name: (_config$appTypes$edit2 = config === null || config === void 0 || (_config$appTypes4 = config.appTypes) === null || _config$appTypes4 === void 0 ? void 0 : _config$appTypes4.editor) !== null && _config$appTypes$edit2 !== void 0 ? _config$appTypes$edit2 : 'editor'
106 - }, overrides);
107 - }
108 - }, {
109 - key: "sendTopBarPublishDropdown",
110 - value: function sendTopBarPublishDropdown(targetName) {
111 - var _config$names, _config$triggers, _config$targetTypes, _config$interactionRe, _config$locations3, _config$secondaryLoca, _config$targetTypes2;
112 - var config = this.getConfig();
113 - return this.dispatchEvent(config === null || config === void 0 || (_config$names = config.names) === null || _config$names === void 0 || (_config$names = _config$names.editorOne) === null || _config$names === void 0 ? void 0 : _config$names.topBarPublishDropdown, this.createBasePayload({
114 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers = config.triggers) === null || _config$triggers === void 0 ? void 0 : _config$triggers.click),
115 - target_type: config === null || config === void 0 || (_config$targetTypes = config.targetTypes) === null || _config$targetTypes === void 0 ? void 0 : _config$targetTypes.dropdownItem,
116 - target_name: targetName,
117 - interaction_result: config === null || config === void 0 || (_config$interactionRe = config.interactionResults) === null || _config$interactionRe === void 0 ? void 0 : _config$interactionRe.actionSelected,
118 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations3 = config.locations) === null || _config$locations3 === void 0 ? void 0 : _config$locations3.topBar),
119 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca = config.secondaryLocations) === null || _config$secondaryLoca === void 0 ? void 0 : _config$secondaryLoca.publishDropdown),
120 - location_l2: config === null || config === void 0 || (_config$targetTypes2 = config.targetTypes) === null || _config$targetTypes2 === void 0 ? void 0 : _config$targetTypes2.dropdownItem,
121 - interaction_description: 'User selected an action from the publish dropdown'
122 - }));
123 - }
124 - }, {
125 - key: "sendTopBarPageList",
126 - value: function sendTopBarPageList(targetName) {
127 - var _config$names2, _config$triggers2, _config$targetTypes3, _config$interactionRe2, _config$interactionRe3, _config$locations4, _config$secondaryLoca2, _config$targetTypes4;
128 - var isCreate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
129 - var config = this.getConfig();
130 - return this.dispatchEvent(config === null || config === void 0 || (_config$names2 = config.names) === null || _config$names2 === void 0 || (_config$names2 = _config$names2.editorOne) === null || _config$names2 === void 0 ? void 0 : _config$names2.topBarPageList, this.createBasePayload({
131 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers2 = config.triggers) === null || _config$triggers2 === void 0 ? void 0 : _config$triggers2.click),
132 - target_type: config === null || config === void 0 || (_config$targetTypes3 = config.targetTypes) === null || _config$targetTypes3 === void 0 ? void 0 : _config$targetTypes3.dropdownItem,
133 - target_name: targetName,
134 - interaction_result: isCreate ? config === null || config === void 0 || (_config$interactionRe2 = config.interactionResults) === null || _config$interactionRe2 === void 0 ? void 0 : _config$interactionRe2.create : config === null || config === void 0 || (_config$interactionRe3 = config.interactionResults) === null || _config$interactionRe3 === void 0 ? void 0 : _config$interactionRe3.navigate,
135 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations4 = config.locations) === null || _config$locations4 === void 0 ? void 0 : _config$locations4.topBar),
136 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca2 = config.secondaryLocations) === null || _config$secondaryLoca2 === void 0 ? void 0 : _config$secondaryLoca2.pageListDropdown),
137 - location_l2: config === null || config === void 0 || (_config$targetTypes4 = config.targetTypes) === null || _config$targetTypes4 === void 0 ? void 0 : _config$targetTypes4.dropdownItem,
138 - interaction_description: 'User selected an action from the page list dropdown'
139 - }));
140 - }
141 - }, {
142 - key: "sendSiteSettingsSession",
143 - value: function sendSiteSettingsSession(_ref) {
144 - var _config$names3, _config$triggers3, _config$interactionRe4, _config$locations5, _config$secondaryLoca3;
145 - var targetType = _ref.targetType,
146 - _ref$visitedItems = _ref.visitedItems,
147 - visitedItems = _ref$visitedItems === void 0 ? [] : _ref$visitedItems,
148 - _ref$savedItems = _ref.savedItems,
149 - savedItems = _ref$savedItems === void 0 ? [] : _ref$savedItems,
150 - state = _ref.state;
151 - var config = this.getConfig();
152 - return this.dispatchEvent(config === null || config === void 0 || (_config$names3 = config.names) === null || _config$names3 === void 0 || (_config$names3 = _config$names3.editorOne) === null || _config$names3 === void 0 ? void 0 : _config$names3.siteSettingsSession, this.createBasePayload({
153 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers3 = config.triggers) === null || _config$triggers3 === void 0 ? void 0 : _config$triggers3.click),
154 - target_type: targetType,
155 - target_name: 'site_settings',
156 - interaction_result: config === null || config === void 0 || (_config$interactionRe4 = config.interactionResults) === null || _config$interactionRe4 === void 0 ? void 0 : _config$interactionRe4.sessionEnd,
157 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations5 = config.locations) === null || _config$locations5 === void 0 ? void 0 : _config$locations5.leftPanel),
158 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca3 = config.secondaryLocations) === null || _config$secondaryLoca3 === void 0 ? void 0 : _config$secondaryLoca3.siteSettings),
159 - interaction_description: 'Records areas visited as part of the site setting session',
160 - metadata: {
161 - visited_items: visitedItems,
162 - saved_items: savedItems
163 - },
164 - state: state
165 - }));
166 - }
167 - }, {
168 - key: "sendELibraryNav",
169 - value: function sendELibraryNav(tabName) {
170 - var _config$names4, _config$triggers4, _config$targetTypes5, _config$interactionRe5, _config$locations6, _config$secondaryLoca4;
171 - var config = this.getConfig();
172 - return this.dispatchEvent(config === null || config === void 0 || (_config$names4 = config.names) === null || _config$names4 === void 0 || (_config$names4 = _config$names4.editorOne) === null || _config$names4 === void 0 ? void 0 : _config$names4.eLibraryNav, this.createBasePayload({
173 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers4 = config.triggers) === null || _config$triggers4 === void 0 ? void 0 : _config$triggers4.tabSelect),
174 - target_type: config === null || config === void 0 || (_config$targetTypes5 = config.targetTypes) === null || _config$targetTypes5 === void 0 ? void 0 : _config$targetTypes5.tab,
175 - target_name: this.toLowerSnake(tabName),
176 - interaction_result: config === null || config === void 0 || (_config$interactionRe5 = config.interactionResults) === null || _config$interactionRe5 === void 0 ? void 0 : _config$interactionRe5.tabChanged,
177 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations6 = config.locations) === null || _config$locations6 === void 0 ? void 0 : _config$locations6.elementorLibrary),
178 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca4 = config.secondaryLocations) === null || _config$secondaryLoca4 === void 0 ? void 0 : _config$secondaryLoca4.libraryTabs),
179 - interaction_description: 'User navigates within elementor library'
180 - }));
181 - }
182 - }, {
183 - key: "sendELibraryInsert",
184 - value: function sendELibraryInsert(_ref2) {
185 - var _config$triggers5, _config$targetTypes6, _config$interactionRe6, _config$locations7, _config$secondaryLoca5, _config$names5;
186 - var assetId = _ref2.assetId,
187 - assetName = _ref2.assetName,
188 - libraryType = _ref2.libraryType,
189 - _ref2$proRequired = _ref2.proRequired,
190 - proRequired = _ref2$proRequired === void 0 ? false : _ref2$proRequired;
191 - var config = this.getConfig();
192 - var payload = this.createBasePayload({
193 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers5 = config.triggers) === null || _config$triggers5 === void 0 ? void 0 : _config$triggers5.insert),
194 - target_type: config === null || config === void 0 || (_config$targetTypes6 = config.targetTypes) === null || _config$targetTypes6 === void 0 ? void 0 : _config$targetTypes6.button,
195 - target_name: String(assetId),
196 - interaction_result: config === null || config === void 0 || (_config$interactionRe6 = config.interactionResults) === null || _config$interactionRe6 === void 0 ? void 0 : _config$interactionRe6.assetInserted,
197 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations7 = config.locations) === null || _config$locations7 === void 0 ? void 0 : _config$locations7.elementorLibrary),
198 - location_l1: this.toLowerSnake(libraryType),
199 - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca5 = config.secondaryLocations) === null || _config$secondaryLoca5 === void 0 ? void 0 : _config$secondaryLoca5.assetCard),
200 - interaction_description: 'User inserts block/pages from elementor library',
201 - metadata: {
202 - template_id: String(assetId),
203 - template_name: this.decodeHtmlEntities(assetName) || ''
204 - }
205 - });
206 - if (proRequired) {
207 - payload.state = 'pro_plan_required';
208 - }
209 - return this.dispatchEvent(config === null || config === void 0 || (_config$names5 = config.names) === null || _config$names5 === void 0 || (_config$names5 = _config$names5.editorOne) === null || _config$names5 === void 0 ? void 0 : _config$names5.eLibraryInsert, payload);
210 - }
211 - }, {
212 - key: "sendELibraryFavorite",
213 - value: function sendELibraryFavorite(_ref3) {
214 - var _config$triggers6, _config$targetTypes7, _config$interactionRe7, _config$locations8, _config$secondaryLoca6, _config$names6;
215 - var assetId = _ref3.assetId,
216 - assetName = _ref3.assetName,
217 - libraryType = _ref3.libraryType,
218 - isFavorite = _ref3.isFavorite,
219 - _ref3$proRequired = _ref3.proRequired,
220 - proRequired = _ref3$proRequired === void 0 ? false : _ref3$proRequired;
221 - var config = this.getConfig();
222 - var payload = this.createBasePayload({
223 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers6 = config.triggers) === null || _config$triggers6 === void 0 ? void 0 : _config$triggers6.click),
224 - target_type: config === null || config === void 0 || (_config$targetTypes7 = config.targetTypes) === null || _config$targetTypes7 === void 0 ? void 0 : _config$targetTypes7.toggle,
225 - target_name: String(assetId),
226 - interaction_result: config === null || config === void 0 || (_config$interactionRe7 = config.interactionResults) === null || _config$interactionRe7 === void 0 ? void 0 : _config$interactionRe7.assetFavorite,
227 - target_value: Boolean(isFavorite),
228 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations8 = config.locations) === null || _config$locations8 === void 0 ? void 0 : _config$locations8.elementorLibrary),
229 - location_l1: this.toLowerSnake(libraryType),
230 - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca6 = config.secondaryLocations) === null || _config$secondaryLoca6 === void 0 ? void 0 : _config$secondaryLoca6.assetCard),
231 - interaction_description: 'User favorite block/pages from elementor library',
232 - metadata: {
233 - template_id: String(assetId),
234 - template_name: this.decodeHtmlEntities(assetName) || ''
235 - }
236 - });
237 - if (proRequired) {
238 - payload.state = 'pro_plan_required';
239 - }
240 - return this.dispatchEvent(config === null || config === void 0 || (_config$names6 = config.names) === null || _config$names6 === void 0 || (_config$names6 = _config$names6.editorOne) === null || _config$names6 === void 0 ? void 0 : _config$names6.eLibraryFavorite, payload);
241 - }
242 - }, {
243 - key: "sendELibraryGenerateAi",
244 - value: function sendELibraryGenerateAi(_ref4) {
245 - var _config$names7, _config$triggers7, _config$targetTypes8, _config$interactionRe8, _config$locations9, _config$secondaryLoca7;
246 - var assetId = _ref4.assetId,
247 - assetName = _ref4.assetName,
248 - libraryType = _ref4.libraryType;
249 - var config = this.getConfig();
250 - return this.dispatchEvent(config === null || config === void 0 || (_config$names7 = config.names) === null || _config$names7 === void 0 || (_config$names7 = _config$names7.editorOne) === null || _config$names7 === void 0 ? void 0 : _config$names7.eLibraryGenerateAi, this.createBasePayload({
251 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers7 = config.triggers) === null || _config$triggers7 === void 0 ? void 0 : _config$triggers7.click),
252 - target_type: config === null || config === void 0 || (_config$targetTypes8 = config.targetTypes) === null || _config$targetTypes8 === void 0 ? void 0 : _config$targetTypes8.button,
253 - target_name: String(assetId),
254 - interaction_result: config === null || config === void 0 || (_config$interactionRe8 = config.interactionResults) === null || _config$interactionRe8 === void 0 ? void 0 : _config$interactionRe8.aiGenerate,
255 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations9 = config.locations) === null || _config$locations9 === void 0 ? void 0 : _config$locations9.elementorLibrary),
256 - location_l1: this.toLowerSnake(libraryType),
257 - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca7 = config.secondaryLocations) === null || _config$secondaryLoca7 === void 0 ? void 0 : _config$secondaryLoca7.assetCard),
258 - interaction_description: 'User generated block/page based on a library asset',
259 - metadata: {
260 - template_id: String(assetId),
261 - template_name: this.decodeHtmlEntities(assetName) || ''
262 - }
263 - }));
264 - }
265 - }, {
266 - key: "sendFinderSearchInput",
267 - value: function sendFinderSearchInput(_ref5) {
268 - var _config$triggers8, _config$targetTypes9, _config$interactionRe9, _config$interactionRe0, _config$secondaryLoca8, _config$names8;
269 - var resultsCount = _ref5.resultsCount,
270 - _ref5$searchTerm = _ref5.searchTerm,
271 - searchTerm = _ref5$searchTerm === void 0 ? null : _ref5$searchTerm;
272 - var config = this.getConfig();
273 - var hasResults = resultsCount > 0;
274 - var finderContext = this.getFinderContext();
275 - var payload = this.createBasePayload({
276 - window_name: finderContext.windowName,
277 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers8 = config.triggers) === null || _config$triggers8 === void 0 ? void 0 : _config$triggers8.typing),
278 - target_type: config === null || config === void 0 || (_config$targetTypes9 = config.targetTypes) === null || _config$targetTypes9 === void 0 ? void 0 : _config$targetTypes9.searchInput,
279 - target_name: 'finder',
280 - interaction_result: hasResults ? config === null || config === void 0 || (_config$interactionRe9 = config.interactionResults) === null || _config$interactionRe9 === void 0 ? void 0 : _config$interactionRe9.resultsUpdated : config === null || config === void 0 || (_config$interactionRe0 = config.interactionResults) === null || _config$interactionRe0 === void 0 ? void 0 : _config$interactionRe0.noResults,
281 - target_location: finderContext.targetLocation,
282 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca8 = config.secondaryLocations) === null || _config$secondaryLoca8 === void 0 ? void 0 : _config$secondaryLoca8.finder),
283 - interaction_description: 'Finder search input, follows debounce behavior',
284 - metadata: {
285 - results_count: resultsCount
286 - }
287 - });
288 - if (!hasResults && searchTerm) {
289 - payload.metadata.search_term = searchTerm;
290 - }
291 - return this.dispatchEvent(config === null || config === void 0 || (_config$names8 = config.names) === null || _config$names8 === void 0 || (_config$names8 = _config$names8.editorOne) === null || _config$names8 === void 0 ? void 0 : _config$names8.finderSearchInput, payload);
292 - }
293 - }, {
294 - key: "sendFinderResultSelect",
295 - value: function sendFinderResultSelect(choice) {
296 - var _config$names9, _config$triggers9, _config$targetTypes0, _config$interactionRe1, _config$secondaryLoca9, _config$secondaryLoca0;
297 - var config = this.getConfig();
298 - var finderContext = this.getFinderContext();
299 - return this.dispatchEvent(config === null || config === void 0 || (_config$names9 = config.names) === null || _config$names9 === void 0 || (_config$names9 = _config$names9.editorOne) === null || _config$names9 === void 0 ? void 0 : _config$names9.finderResultSelect, this.createBasePayload({
300 - window_name: finderContext.windowName,
301 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers9 = config.triggers) === null || _config$triggers9 === void 0 ? void 0 : _config$triggers9.click),
302 - target_type: config === null || config === void 0 || (_config$targetTypes0 = config.targetTypes) === null || _config$targetTypes0 === void 0 ? void 0 : _config$targetTypes0.searchResult,
303 - target_name: choice,
304 - interaction_result: config === null || config === void 0 || (_config$interactionRe1 = config.interactionResults) === null || _config$interactionRe1 === void 0 ? void 0 : _config$interactionRe1.selected,
305 - target_location: finderContext.targetLocation,
306 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca9 = config.secondaryLocations) === null || _config$secondaryLoca9 === void 0 ? void 0 : _config$secondaryLoca9.finder),
307 - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca0 = config.secondaryLocations) === null || _config$secondaryLoca0 === void 0 ? void 0 : _config$secondaryLoca0.finderResults),
308 - interaction_description: 'Finder search results was selected'
309 - }));
310 - }
311 - }, {
312 - key: "sendCanvasEmptyBoxAction",
313 - value: function sendCanvasEmptyBoxAction(_ref6) {
314 - var _config$triggers0, _config$targetTypes1, _config$interactionRe10, _config$locations0, _config$secondaryLoca1, _config$names0;
315 - var targetName = _ref6.targetName,
316 - _ref6$metadata = _ref6.metadata,
317 - metadata = _ref6$metadata === void 0 ? {} : _ref6$metadata,
318 - _ref6$containerCreate = _ref6.containerCreated,
319 - containerCreated = _ref6$containerCreate === void 0 ? null : _ref6$containerCreate;
320 - var config = this.getConfig();
321 - var payload = this.createBasePayload({
322 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers0 = config.triggers) === null || _config$triggers0 === void 0 ? void 0 : _config$triggers0.click),
323 - target_type: config === null || config === void 0 || (_config$targetTypes1 = config.targetTypes) === null || _config$targetTypes1 === void 0 ? void 0 : _config$targetTypes1.buttons,
324 - target_name: targetName,
325 - interaction_result: config === null || config === void 0 || (_config$interactionRe10 = config.interactionResults) === null || _config$interactionRe10 === void 0 ? void 0 : _config$interactionRe10.selected,
326 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations0 = config.locations) === null || _config$locations0 === void 0 ? void 0 : _config$locations0.canvas),
327 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca1 = config.secondaryLocations) === null || _config$secondaryLoca1 === void 0 ? void 0 : _config$secondaryLoca1.emptyBox),
328 - interaction_description: 'Empty box on canvas actions'
329 - });
330 - if (Object.keys(metadata).length > 0) {
331 - payload.metadata = metadata;
332 - }
333 - if (containerCreated !== null) {
334 - payload.state = containerCreated;
335 - }
336 - return this.dispatchEvent(config === null || config === void 0 || (_config$names0 = config.names) === null || _config$names0 === void 0 || (_config$names0 = _config$names0.editorOne) === null || _config$names0 === void 0 ? void 0 : _config$names0.canvasEmptyBoxAction, payload);
337 - }
338 - }, {
339 - key: "sendWidgetPanelSearch",
340 - value: function sendWidgetPanelSearch(_ref7) {
341 - var _config$triggers1, _config$targetTypes10, _config$interactionRe11, _config$interactionRe12, _config$locations1, _config$locations10, _config$secondaryLoca10, _config$names1;
342 - var resultsCount = _ref7.resultsCount,
343 - _ref7$userInput = _ref7.userInput,
344 - userInput = _ref7$userInput === void 0 ? null : _ref7$userInput;
345 - var config = this.getConfig();
346 - var hasResults = resultsCount > 0;
347 - var payload = this.createBasePayload({
348 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers1 = config.triggers) === null || _config$triggers1 === void 0 ? void 0 : _config$triggers1.typing),
349 - target_type: config === null || config === void 0 || (_config$targetTypes10 = config.targetTypes) === null || _config$targetTypes10 === void 0 ? void 0 : _config$targetTypes10.searchWidget,
350 - target_name: 'search_widget',
351 - interaction_result: hasResults ? config === null || config === void 0 || (_config$interactionRe11 = config.interactionResults) === null || _config$interactionRe11 === void 0 ? void 0 : _config$interactionRe11.resultsUpdated : config === null || config === void 0 || (_config$interactionRe12 = config.interactionResults) === null || _config$interactionRe12 === void 0 ? void 0 : _config$interactionRe12.noResults,
352 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations1 = config.locations) === null || _config$locations1 === void 0 ? void 0 : _config$locations1.leftPanel),
353 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$locations10 = config.locations) === null || _config$locations10 === void 0 ? void 0 : _config$locations10.widgetPanel),
354 - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca10 = config.secondaryLocations) === null || _config$secondaryLoca10 === void 0 ? void 0 : _config$secondaryLoca10.searchBar),
355 - interaction_description: 'Widget search input, follows debounce behavior'
356 - });
357 - if (!hasResults && userInput) {
358 - payload.metadata = {
359 - user_input: userInput
360 - };
361 - }
362 - return this.dispatchEvent(config === null || config === void 0 || (_config$names1 = config.names) === null || _config$names1 === void 0 || (_config$names1 = _config$names1.editorOne) === null || _config$names1 === void 0 ? void 0 : _config$names1.widgetPanelSearch, payload);
363 - }
364 - }]);
365 -}();
366 -var createDebouncedFinderSearch = exports.createDebouncedFinderSearch = function createDebouncedFinderSearch() {
367 - var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 300;
368 - return _.debounce(function (resultsCount, searchTerm) {
369 - EditorOneEventManager.sendFinderSearchInput({
370 - resultsCount: resultsCount,
371 - searchTerm: searchTerm
372 - });
373 - }, delay);
374 -};
375 -var createDebouncedWidgetPanelSearch = exports.createDebouncedWidgetPanelSearch = function createDebouncedWidgetPanelSearch() {
376 - var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2000;
377 - return _.debounce(function (resultsCount, userInput) {
378 - EditorOneEventManager.sendWidgetPanelSearch({
379 - resultsCount: resultsCount,
380 - userInput: userInput
381 - });
382 - }, delay);
383 -};
384 -var _default = exports["default"] = EditorOneEventManager;
385 -
386 -/***/ }),
387 -
388 4 /***/ "../assets/dev/js/editor/utils/files-upload-handler.js":
389 5 /*!*************************************************************!*\
390 6 !*** ../assets/dev/js/editor/utils/files-upload-handler.js ***!
391 7 \*************************************************************/
@@ -973,18 +589,11 @@
973 589 });
974 590 }
975 591 },
976 592 button: {
977 - tag: 'button'
593 + tag: 'div'
978 594 }
979 595 });
980 -
981 - // Add role="status" and aria-live for screen reader announcement
982 - toast.getElements('widget').attr({
983 - role: 'status',
984 - 'aria-live': 'polite',
985 - 'aria-atomic': 'true'
986 - });
987 596 this.getToast = function () {
988 597 return toast;
989 598 };
990 599 },
@@ -991,10 +600,8 @@
991 600 showToast: function showToast(options) {
992 601 var toast = this.getToast();
993 602 toast.setMessage(options.message);
994 603 toast.getElements('buttonsWrapper').empty();
995 - toast.focusedButton = null;
996 - toast.buttons = [];
997 604 var isPositionValid = this.isPositionValid(options === null || options === void 0 ? void 0 : options.position);
998 605 if (!isPositionValid) {
999 606 this.positionToWindow();
1000 607 }
@@ -1721,16 +1328,14 @@
1721 1328 var cacheKey = this.getCacheKey(request);
1722 1329 if (_.has(this.cache, cacheKey)) {
1723 1330 deferred = jQuery.Deferred().done(request.success).resolve(this.cache[cacheKey]);
1724 1331 } else {
1725 - var _request$error;
1726 1332 deferred = this.addRequest(request.action, {
1727 1333 data: request.data,
1728 1334 unique_id: request.unique_id,
1729 1335 success: function success(data) {
1730 1336 return _this3.cache[cacheKey] = data;
1731 - },
1732 - error: (_request$error = request.error) !== null && _request$error !== void 0 ? _request$error : function () {}
1337 + }
1733 1338 }, immediately).done(request.success);
1734 1339 }
1735 1340 return deferred;
1736 1341 }
@@ -2130,48 +1735,8 @@
2130 1735 value: true
2131 1736 }));
2132 1737 exports["default"] = void 0;
2133 1738 var eventsConfig = {
2134 - appTypes: {
2135 - editor: 'editor',
2136 - wpAdmin: 'wpadmin'
2137 - },
2138 - targetTypes: {
2139 - dropdownItem: 'dropdown_item',
2140 - button: 'button',
2141 - tab: 'tab',
2142 - toggle: 'toggle',
2143 - searchInput: 'search_input',
2144 - searchResult: 'search_result',
2145 - buttons: 'buttons',
2146 - searchWidget: 'search_widget'
2147 - },
2148 - interactionResults: {
2149 - actionSelected: 'action_selected',
2150 - navigate: 'navigate',
2151 - create: 'create',
2152 - sessionEnd: 'session_end',
2153 - tabChanged: 'tab_changed',
2154 - assetInserted: 'asset_inserted',
2155 - assetFavorite: 'asset_favorite',
2156 - aiGenerate: 'ai_generate',
2157 - resultsUpdated: 'results_updated',
2158 - noResults: 'no_results',
2159 - selected: 'selected',
2160 - promotionViewed: 'promotion_viewed',
2161 - upgradeNow: 'upgrade_now'
2162 - },
2163 - targetNames: {
2164 - publishDropdown: {
2165 - saveDraft: 'save_draft',
2166 - saveAsTemplate: 'save_as_template',
2167 - viewPage: 'view_page',
2168 - copyAndShare: 'copy_and_share'
2169 - },
2170 - pageList: {
2171 - addNewPage: 'add_new_page'
2172 - }
2173 - },
2174 1739 triggers: {
2175 1740 click: 'Click',
2176 1741 rightClick: 'Right Click',
2177 1742 doubleClick: 'Double Click',
@@ -2179,17 +1744,13 @@
2179 1744 toggleClick: 'Toggle Click',
2180 1745 dropdownClick: 'Click Dropdown',
2181 1746 editorLoaded: 'Editor Loaded',
2182 1747 visible: 'Visible',
2183 - pageLoaded: 'Page Loaded',
2184 - typing: 'Typing',
2185 - tabSelect: 'Tab Select',
2186 - insert: 'Insert'
1748 + pageLoaded: 'Page Loaded'
2187 1749 },
2188 1750 locations: {
2189 1751 widgetPanel: 'Widget Panel',
2190 1752 topBar: 'Top Bar',
2191 - sidebar: 'Sidebar',
2192 1753 elementorEditor: 'Elementor Editor',
2193 1754 templatesLibrary: {
2194 1755 library: 'Templates Library'
2195 1756 },
@@ -2202,14 +1763,9 @@
2202 1763 variables: 'Variables Panel',
2203 1764 variablesManager: 'Variables Manager',
2204 1765 admin: 'WP admin',
2205 1766 structurePanel: 'Structure Panel',
2206 - canvas: 'Canvas',
2207 - leftPanel: 'Left Panel',
2208 - elementorLibrary: 'Elementor Library',
2209 - components: {
2210 - instanceEditingPanel: 'Instance Editing Panel'
2211 - }
1767 + canvas: 'Canvas'
2212 1768 },
2213 1769 secondaryLocations: {
2214 1770 layout: 'Layout Section',
2215 1771 basic: 'Basic Section',
@@ -2282,16 +1838,9 @@
2282 1838 pluginToolsTab: 'plugin_tools_tab',
2283 1839 pluginWebsiteTemplatesTab: 'plugin_website_templates_tab'
2284 1840 },
2285 1841 componentsTab: 'Components Tab',
2286 - canvasElement: 'Canvas Element',
2287 - publishDropdown: 'Publish Dropdown',
2288 - pageListDropdown: 'Page List Dropdown',
2289 - emptyBox: 'Empty Box',
2290 - searchBar: 'Search Bar',
2291 - finderResults: 'Finder Results',
2292 - libraryTabs: 'Library Tabs',
2293 - assetCard: 'Asset Card'
1842 + canvasElement: 'Canvas Element'
2294 1843 },
2295 1844 elements: {
2296 1845 accordionSection: 'Accordion section',
2297 1846 buttonIcon: 'Button Icon',
@@ -2340,9 +1889,8 @@
2340 1889 accountConnected: 'account_connected'
2341 1890 },
2342 1891 // ChecklistSteps event names are generated dynamically, based on stepId and action type taken: title, action, done, undone, upgrade
2343 1892 elementorEditor: {
2344 - editorLoaded: 'editor_loaded',
2345 1893 checklist: {
2346 1894 checklistHeaderClose: 'checklist_header_close_icon',
2347 1895 checklistFirstPopup: 'checklist popup triggered'
2348 1896 },
@@ -2357,31 +1905,16 @@
2357 1905 connect: 'connect_variable',
2358 1906 save: 'save_new_variable',
2359 1907 openManager: 'open_variables_manager',
2360 1908 saveChanges: 'save_variables_changes',
2361 - delete: 'delete_variable',
2362 - variableSyncToV3: 'variable_sync_to_v3'
1909 + delete: 'delete_variable'
2363 1910 },
2364 - design_system: {
2365 - importOpened: 'design_system_import_opened',
2366 - fileSelected: 'design_system_file_selected',
2367 - validationFailed: 'design_system_validation_failed',
2368 - conflictChoice: 'design_system_conflict_choice',
2369 - confirmed: 'design_system_import_confirmed',
2370 - imported: 'design_system_imported',
2371 - importFailed: 'design_system_import_failed'
2372 - },
2373 1911 components: {
2374 1912 createClicked: 'component_create_clicked',
2375 1913 createCancelled: 'component_creation_cancelled',
2376 1914 created: 'component_created',
2377 1915 instanceAdded: 'component_instance_added',
2378 - edited: 'component_edited',
2379 - propertiesPanelOpened: 'component_properties_panel_opened',
2380 - propertiesGroupCreated: 'component_properties_group_created',
2381 - propertyExposed: 'component_property_exposed',
2382 - propertyRemoved: 'component_property_removed',
2383 - detached: 'component_detached'
1916 + edited: 'component_edited'
2384 1917 },
2385 1918 global_classes: {
2386 1919 classApplied: 'class_applied',
2387 1920 classRemoved: 'class_removed',
@@ -2399,32 +1932,9 @@
2399 1932 classUsageHovered: 'class_usage_hovered',
2400 1933 classStyled: 'class_styled',
2401 1934 classStateClicked: 'class_state_clicked',
2402 1935 classUsageClicked: 'class_usage_clicked',
2403 - classDuplicate: 'class_duplicate',
2404 - classSyncToV3PopupShown: 'class_sync_to_v3_popup_shown',
2405 - classSyncToV3: 'class_sync_to_v3',
2406 - classSyncToV3PopupClick: 'class_sync_to_v3_popup_click'
2407 - },
2408 - editorOne: {
2409 - topBarPublishDropdown: 'top_bar_publish_dropdown',
2410 - topBarPageList: 'top_bar_page_list',
2411 - siteSettingsSession: 'site_settings_session',
2412 - eLibraryNav: 'e_library_nav',
2413 - eLibraryInsert: 'e_library_insert',
2414 - eLibraryFavorite: 'e_library_favorite',
2415 - eLibraryGenerateAi: 'e_library_generate_ai',
2416 - finderSearchInput: 'finder_search_input',
2417 - finderResultSelect: 'finder_result_select',
2418 - canvasEmptyBoxAction: 'canvas_empty_box_action',
2419 - widgetPanelSearch: 'widget_panel_search'
2420 - },
2421 - interactions: {
2422 - created: 'interactions_created'
2423 - },
2424 - promotions: {
2425 - viewPromotion: 'view_promotion',
2426 - upgradePromotionClick: 'upgrade_promotion_click'
1936 + classDuplicate: 'class_duplicate'
2427 1937 }
2428 1938 }
2429 1939 };
2430 1940 var _default = exports["default"] = eventsConfig;
@@ -2440,9 +1950,8 @@
2440 1950 "use strict";
2441 1951
2442 1952
2443 1953 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2444 -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
2445 1954 Object.defineProperty(exports, "__esModule", ({
2446 1955 value: true
2447 1956 }));
2448 1957 exports["default"] = void 0;
@@ -2454,18 +1963,20 @@
2454 1963 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
2455 1964 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
2456 1965 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
2457 1966 var _eventsConfig = _interopRequireDefault(__webpack_require__(/*! ./events-config */ "../core/common/modules/events-manager/assets/js/events-config.js"));
2458 -var _mixpanelBrowser = _interopRequireWildcard(__webpack_require__(/*! mixpanel-browser */ "../node_modules/mixpanel-browser/dist/mixpanel.module.js"));
1967 +var _mixpanelBrowser = _interopRequireDefault(__webpack_require__(/*! mixpanel-browser */ "../node_modules/mixpanel-browser/dist/mixpanel.module.js"));
2459 1968 var _tiers = __webpack_require__(/*! elementor-utils/tiers */ "../assets/dev/js/utils/tiers.js");
2460 -var _sessionRecording = __webpack_require__(/*! ./session-recording */ "../core/common/modules/events-manager/assets/js/session-recording.js");
2461 -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
2462 1969 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2463 1970 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2464 1971 function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
2465 1972 function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
2466 -/** @type {Mixpanel | null} */
2467 -var mixpanelInstance = null;
1973 +function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
1974 +function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
1975 +function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
1976 +function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
1977 +function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
1978 +var _sessionRecordingInProgress = /*#__PURE__*/new WeakMap();
2468 1979 var _default = exports["default"] = /*#__PURE__*/function (_elementorModules$Mod) {
2469 1980 function _default() {
2470 1981 var _this;
2471 1982 (0, _classCallCheck2.default)(this, _default);
@@ -2473,9 +1984,9 @@
2473 1984 args[_key] = arguments[_key];
2474 1985 }
2475 1986 _this = _callSuper(this, _default, [].concat(args));
2476 1987 (0, _defineProperty2.default)(_this, "trackingEnabled", false);
2477 - (0, _defineProperty2.default)(_this, "availableExperiments", []);
1988 + _classPrivateFieldInitSpec(_this, _sessionRecordingInProgress, false);
2478 1989 return _this;
2479 1990 }
2480 1991 (0, _inherits2.default)(_default, _elementorModules$Mod);
2481 1992 return (0, _createClass2.default)(_default, [{
@@ -2480,59 +1991,38 @@
2480 1991 (0, _inherits2.default)(_default, _elementorModules$Mod);
2481 1992 return (0, _createClass2.default)(_default, [{
2482 1993 key: "onInit",
2483 1994 value: function onInit() {
2484 - var _elementorCommon$conf,
2485 - _this2 = this;
1995 + var _elementorCommon$conf, _elementorCommon$conf2;
2486 1996 this.config = _eventsConfig.default;
2487 - if (!this.canSendEvents()) {
2488 - return;
2489 - }
2490 - (0, _sessionRecording.configureSessionRecording)((_elementorCommon$conf = elementorCommon.config.editor_events) === null || _elementorCommon$conf === void 0 ? void 0 : _elementorCommon$conf.session_recording_events);
2491 - this.initializeMixpanel(function () {
2492 - return _this2.enableTracking();
1997 + _mixpanelBrowser.default.init((_elementorCommon$conf = elementorCommon.config.editor_events) === null || _elementorCommon$conf === void 0 ? void 0 : _elementorCommon$conf.token, {
1998 + persistence: 'localStorage',
1999 + autocapture: false,
2000 + record_sessions_percent: 0,
2001 + record_idle_timeout_ms: 60000,
2002 + record_max_ms: 300000,
2003 + record_mask_text_selector: '',
2004 + flags: true,
2005 + api_hosts: {
2006 + flags: 'https://api-eu.mixpanel.com'
2007 + }
2493 2008 });
2494 - }
2495 - }, {
2496 - key: "initializeMixpanel",
2497 - value: function initializeMixpanel(onLoaded) {
2498 - if (mixpanelInstance && mixpanelInstance.isInitialized) {
2499 - onLoaded(mixpanelInstance);
2500 - } else {
2501 - var _elementorCommon$conf2;
2502 - mixpanelInstance = _mixpanelBrowser.default.init((_elementorCommon$conf2 = elementorCommon.config.editor_events) === null || _elementorCommon$conf2 === void 0 ? void 0 : _elementorCommon$conf2.token, {
2503 - persistence: 'localStorage',
2504 - autocapture: false,
2505 - flags: true,
2506 - api_host: 'https://api-eu.mixpanel.com',
2507 - loaded: onLoaded,
2508 - record_sessions_percent: 0,
2509 - record_idle_timeout_ms: 60 * 1000,
2510 - // 60 Seconds
2511 - record_min_ms: 5 * 1000,
2512 - // 5 Seconds
2513 - record_max_ms: 30 * 1000,
2514 - // 30 Seconds
2515 - record_mask_text_selector: ''
2516 - }, 'elementor-editor');
2009 + if ((_elementorCommon$conf2 = elementorCommon.config.editor_events) !== null && _elementorCommon$conf2 !== void 0 && _elementorCommon$conf2.can_send_events) {
2010 + this.enableTracking();
2517 2011 }
2518 - elementorCommon.config.editor_events.mixpanelInstance = mixpanelInstance;
2519 2012 }
2520 2013 }, {
2521 2014 key: "enableTracking",
2522 2015 value: function enableTracking() {
2523 2016 var _elementorCommon$conf3;
2524 - if (!this.isMixpanelReady()) {
2525 - return;
2526 - }
2527 - var userId = (_elementorCommon$conf3 = elementorCommon.config.editor_events) === null || _elementorCommon$conf3 === void 0 ? void 0 : _elementorCommon$conf3.user_id;
2528 - mixpanelInstance.register({
2529 - appType: 'Editor'
2530 - });
2017 + var userId = (_elementorCommon$conf3 = elementorCommon.config.library_connect) === null || _elementorCommon$conf3 === void 0 ? void 0 : _elementorCommon$conf3.user_id;
2531 2018 if (userId) {
2532 2019 var _elementorCommon$conf4;
2533 - mixpanelInstance.identify(userId);
2534 - mixpanelInstance.people.set_once({
2020 + _mixpanelBrowser.default.identify(userId);
2021 + _mixpanelBrowser.default.register({
2022 + appType: 'Editor'
2023 + });
2024 + _mixpanelBrowser.default.people.set_once({
2535 2025 $user_id: userId,
2536 2026 $last_login: new Date().toISOString(),
2537 2027 $plan_type: ((_elementorCommon$conf4 = elementorCommon.config.library_connect) === null || _elementorCommon$conf4 === void 0 ? void 0 : _elementorCommon$conf4.plan_type) || _tiers.TIERS.free
2538 2028 });
@@ -2537,16 +2027,15 @@
2537 2027 $plan_type: ((_elementorCommon$conf4 = elementorCommon.config.library_connect) === null || _elementorCommon$conf4 === void 0 ? void 0 : _elementorCommon$conf4.plan_type) || _tiers.TIERS.free
2538 2028 });
2539 2029 }
2540 2030 this.trackingEnabled = true;
2541 - this.availableExperiments = Object.keys(elementorCommon.config.experimentalFeatures || {});
2542 2031 }
2543 2032 }, {
2544 2033 key: "dispatchEvent",
2545 2034 value: function dispatchEvent(name, data) {
2546 - var _elementorCommon$conf5, _elementorCommon$conf6, _elementorCommon$conf7, _elementorCommon$conf8, _elementorCommon$conf9, _elementorCommon$conf0, _elementorCommon$conf1, _elementorCommon$conf10, _elementorCommon$conf11;
2035 + var _elementorCommon$conf5, _elementorCommon$conf6, _elementorCommon$conf7, _elementorCommon$conf8, _elementorCommon$conf9, _elementorCommon$conf0, _elementorCommon$conf1, _elementorCommon$conf10, _elementorCommon$conf11, _elementorCommon$conf12;
2547 2036 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
2548 - if (!this.canSendEvents()) {
2037 + if (!((_elementorCommon$conf5 = elementorCommon.config.editor_events) !== null && _elementorCommon$conf5 !== void 0 && _elementorCommon$conf5.can_send_events)) {
2549 2038 return;
2550 2039 }
2551 2040 if (!this.trackingEnabled) {
2552 2041 this.enableTracking();
@@ -2551,35 +2040,66 @@
2551 2040 if (!this.trackingEnabled) {
2552 2041 this.enableTracking();
2553 2042 }
2554 2043 var eventData = _objectSpread({
2555 - user_id: ((_elementorCommon$conf5 = elementorCommon.config.editor_events) === null || _elementorCommon$conf5 === void 0 ? void 0 : _elementorCommon$conf5.user_id) || null,
2556 - user_roles: ((_elementorCommon$conf6 = elementorCommon.config.library_connect) === null || _elementorCommon$conf6 === void 0 ? void 0 : _elementorCommon$conf6.user_roles) || [],
2557 - subscription_id: ((_elementorCommon$conf7 = elementorCommon.config.editor_events) === null || _elementorCommon$conf7 === void 0 ? void 0 : _elementorCommon$conf7.subscription_id) || null,
2558 - user_tier: ((_elementorCommon$conf8 = elementorCommon.config.library_connect) === null || _elementorCommon$conf8 === void 0 ? void 0 : _elementorCommon$conf8.current_access_tier) || null,
2559 - url: (_elementorCommon$conf9 = elementorCommon.config.editor_events) === null || _elementorCommon$conf9 === void 0 ? void 0 : _elementorCommon$conf9.site_url,
2560 - wp_version: (_elementorCommon$conf0 = elementorCommon.config.editor_events) === null || _elementorCommon$conf0 === void 0 ? void 0 : _elementorCommon$conf0.wp_version,
2561 - client_id: (_elementorCommon$conf1 = elementorCommon.config.editor_events) === null || _elementorCommon$conf1 === void 0 ? void 0 : _elementorCommon$conf1.site_key,
2562 - app_version: (_elementorCommon$conf10 = elementorCommon.config.editor_events) === null || _elementorCommon$conf10 === void 0 ? void 0 : _elementorCommon$conf10.elementor_version,
2563 - site_language: (_elementorCommon$conf11 = elementorCommon.config.editor_events) === null || _elementorCommon$conf11 === void 0 ? void 0 : _elementorCommon$conf11.site_language,
2564 - experiments: this.availableExperiments
2044 + user_id: ((_elementorCommon$conf6 = elementorCommon.config.library_connect) === null || _elementorCommon$conf6 === void 0 ? void 0 : _elementorCommon$conf6.user_id) || null,
2045 + user_roles: ((_elementorCommon$conf7 = elementorCommon.config.library_connect) === null || _elementorCommon$conf7 === void 0 ? void 0 : _elementorCommon$conf7.user_roles) || [],
2046 + subscription_id: ((_elementorCommon$conf8 = elementorCommon.config.editor_events) === null || _elementorCommon$conf8 === void 0 ? void 0 : _elementorCommon$conf8.subscription_id) || null,
2047 + user_tier: ((_elementorCommon$conf9 = elementorCommon.config.library_connect) === null || _elementorCommon$conf9 === void 0 ? void 0 : _elementorCommon$conf9.current_access_tier) || null,
2048 + url: (_elementorCommon$conf0 = elementorCommon.config.editor_events) === null || _elementorCommon$conf0 === void 0 ? void 0 : _elementorCommon$conf0.site_url,
2049 + wp_version: (_elementorCommon$conf1 = elementorCommon.config.editor_events) === null || _elementorCommon$conf1 === void 0 ? void 0 : _elementorCommon$conf1.wp_version,
2050 + client_id: (_elementorCommon$conf10 = elementorCommon.config.editor_events) === null || _elementorCommon$conf10 === void 0 ? void 0 : _elementorCommon$conf10.site_key,
2051 + app_version: (_elementorCommon$conf11 = elementorCommon.config.editor_events) === null || _elementorCommon$conf11 === void 0 ? void 0 : _elementorCommon$conf11.elementor_version,
2052 + site_language: (_elementorCommon$conf12 = elementorCommon.config.editor_events) === null || _elementorCommon$conf12 === void 0 ? void 0 : _elementorCommon$conf12.site_language
2565 2053 }, data);
2566 - mixpanelInstance.track(name, eventData, options);
2567 - var recordingDecision = (0, _sessionRecording.handleSessionRecording)(name, mixpanelInstance);
2568 - if (recordingDecision) {
2569 - mixpanelInstance.track(recordingDecision, eventData);
2054 + _mixpanelBrowser.default.track(name, eventData, options);
2055 + }
2056 + }, {
2057 + key: "startSessionRecording",
2058 + value: function startSessionRecording() {
2059 + var _elementorCommon$conf13;
2060 + if (!((_elementorCommon$conf13 = elementorCommon.config.editor_events) !== null && _elementorCommon$conf13 !== void 0 && _elementorCommon$conf13.can_send_events) || this.isSessionRecordingInProgress()) {
2061 + return;
2570 2062 }
2063 + if (!this.trackingEnabled) {
2064 + this.enableTracking();
2065 + }
2066 + _mixpanelBrowser.default.start_session_recording();
2067 + this.setSessionRecordingInProgress(true);
2571 2068 }
2572 2069 }, {
2070 + key: "stopSessionRecording",
2071 + value: function stopSessionRecording() {
2072 + var _elementorCommon$conf14;
2073 + if (!((_elementorCommon$conf14 = elementorCommon.config.editor_events) !== null && _elementorCommon$conf14 !== void 0 && _elementorCommon$conf14.can_send_events) || !this.isSessionRecordingInProgress()) {
2074 + return;
2075 + }
2076 + _mixpanelBrowser.default.stop_session_recording();
2077 + this.setSessionRecordingInProgress(false);
2078 + }
2079 + }, {
2080 + key: "setSessionRecordingInProgress",
2081 + value: function setSessionRecordingInProgress(value) {
2082 + if ('boolean' !== typeof value) {
2083 + return;
2084 + }
2085 + _classPrivateFieldSet(_sessionRecordingInProgress, this, value);
2086 + }
2087 + }, {
2088 + key: "isSessionRecordingInProgress",
2089 + value: function isSessionRecordingInProgress() {
2090 + return _classPrivateFieldGet(_sessionRecordingInProgress, this);
2091 + }
2092 + }, {
2573 2093 key: "featureFlagIsActive",
2574 2094 value: function () {
2575 2095 var _featureFlagIsActive = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(flagName) {
2576 - var _mixpanelInstance;
2096 + var _mixpanel$flags;
2577 2097 var isEnabled;
2578 2098 return _regenerator.default.wrap(function (_context) {
2579 2099 while (1) switch (_context.prev = _context.next) {
2580 2100 case 0:
2581 - if (!('function' !== typeof ((_mixpanelInstance = mixpanelInstance) === null || _mixpanelInstance === void 0 || (_mixpanelInstance = _mixpanelInstance.flags) === null || _mixpanelInstance === void 0 ? void 0 : _mixpanelInstance.is_enabled))) {
2101 + if (!('function' !== typeof (_mixpanelBrowser.default === null || _mixpanelBrowser.default === void 0 || (_mixpanel$flags = _mixpanelBrowser.default.flags) === null || _mixpanel$flags === void 0 ? void 0 : _mixpanel$flags.is_enabled))) {
2582 2102 _context.next = 1;
2583 2103 break;
2584 2104 }
2585 2105 return _context.abrupt("return", false);
@@ -2584,9 +2104,9 @@
2584 2104 }
2585 2105 return _context.abrupt("return", false);
2586 2106 case 1:
2587 2107 _context.next = 2;
2588 - return mixpanelInstance.flags.is_enabled(flagName, false);
2108 + return _mixpanelBrowser.default.flags.is_enabled(flagName, false);
2589 2109 case 2:
2590 2110 isEnabled = _context.sent;
2591 2111 return _context.abrupt("return", true === isEnabled);
2592 2112 case 3:
@@ -2604,10 +2124,10 @@
2604 2124 key: "getExperimentVariant",
2605 2125 value: function () {
2606 2126 var _getExperimentVariant = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(experimentName) {
2607 2127 var defaultValue,
2608 - _elementorCommon$conf12,
2609 - _elementorCommon$conf13,
2128 + _elementorCommon$conf15,
2129 + _elementorCommon$conf16,
2610 2130 isAbTestingEnabled,
2611 2131 variant,
2612 2132 _args2 = arguments,
2613 2133 _t;
@@ -2615,37 +2135,34 @@
2615 2135 while (1) switch (_context2.prev = _context2.next) {
2616 2136 case 0:
2617 2137 defaultValue = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : 'control';
2618 2138 _context2.prev = 1;
2619 - if (this.canSendEvents()) {
2139 + isAbTestingEnabled = (_elementorCommon$conf15 = (_elementorCommon$conf16 = elementorCommon.config.editor_events) === null || _elementorCommon$conf16 === void 0 ? void 0 : _elementorCommon$conf16.flags_enabled) !== null && _elementorCommon$conf15 !== void 0 ? _elementorCommon$conf15 : false;
2140 + if (isAbTestingEnabled) {
2620 2141 _context2.next = 2;
2621 2142 break;
2622 2143 }
2623 2144 return _context2.abrupt("return", defaultValue);
2624 2145 case 2:
2625 - isAbTestingEnabled = (_elementorCommon$conf12 = (_elementorCommon$conf13 = elementorCommon.config.editor_events) === null || _elementorCommon$conf13 === void 0 ? void 0 : _elementorCommon$conf13.flags_enabled) !== null && _elementorCommon$conf12 !== void 0 ? _elementorCommon$conf12 : false;
2626 - if (isAbTestingEnabled) {
2146 + if (_mixpanelBrowser.default) {
2627 2147 _context2.next = 3;
2628 2148 break;
2629 2149 }
2630 2150 return _context2.abrupt("return", defaultValue);
2631 2151 case 3:
2632 - if (mixpanelInstance) {
2152 + if (this.trackingEnabled) {
2633 2153 _context2.next = 4;
2634 2154 break;
2635 2155 }
2636 2156 return _context2.abrupt("return", defaultValue);
2637 2157 case 4:
2638 - if (!this.trackingEnabled) {
2639 - this.enableTracking();
2640 - }
2641 - if (mixpanelInstance.flags) {
2158 + if (_mixpanelBrowser.default.flags) {
2642 2159 _context2.next = 5;
2643 2160 break;
2644 2161 }
2645 2162 return _context2.abrupt("return", defaultValue);
2646 2163 case 5:
2647 - if (!('function' !== typeof mixpanelInstance.flags.get_variant_value)) {
2164 + if (!('function' !== typeof _mixpanelBrowser.default.flags.get_variant_value)) {
2648 2165 _context2.next = 6;
2649 2166 break;
2650 2167 }
2651 2168 return _context2.abrupt("return", defaultValue);
@@ -2650,9 +2167,9 @@
2650 2167 }
2651 2168 return _context2.abrupt("return", defaultValue);
2652 2169 case 6:
2653 2170 _context2.next = 7;
2654 - return mixpanelInstance.flags.get_variant_value(experimentName, defaultValue);
2171 + return _mixpanelBrowser.default.flags.get_variant_value(experimentName, defaultValue);
2655 2172 case 7:
2656 2173 variant = _context2.sent;
2657 2174 if (!(undefined === variant || null === variant)) {
2658 2175 _context2.next = 8;
@@ -2681,121 +2198,18 @@
2681 2198 value: function startExperiment(experimentName, experimentVariant) {
2682 2199 if (!this.trackingEnabled) {
2683 2200 return;
2684 2201 }
2685 - mixpanelInstance.track('$experiment_started', {
2202 + _mixpanelBrowser.default.track('$experiment_started', {
2686 2203 'Experiment name': experimentName,
2687 2204 'Variant name': experimentVariant
2688 2205 });
2689 2206 }
2690 - }, {
2691 - key: "isMixpanelReady",
2692 - value: function isMixpanelReady() {
2693 - if ('undefined' === typeof mixpanelInstance || !mixpanelInstance) {
2694 - return false;
2695 - }
2696 - try {
2697 - var distinctId = mixpanelInstance.get_distinct_id();
2698 - return distinctId !== undefined && distinctId !== null;
2699 - } catch (error) {
2700 - return false;
2701 - }
2702 - }
2703 - }, {
2704 - key: "canSendEvents",
2705 - value: function canSendEvents() {
2706 - var _elementorCommon;
2707 - return !!((_elementorCommon = elementorCommon) !== null && _elementorCommon !== void 0 && (_elementorCommon = _elementorCommon.config) !== null && _elementorCommon !== void 0 && (_elementorCommon = _elementorCommon.editor_events) !== null && _elementorCommon !== void 0 && _elementorCommon.can_send_events);
2708 - }
2709 - }, {
2710 - key: "getMixpanelInstance",
2711 - value: function getMixpanelInstance() {
2712 - return this.isMixpanelReady() ? mixpanelInstance : undefined;
2713 - }
2714 2207 }]);
2715 2208 }(elementorModules.Module);
2716 2209
2717 2210 /***/ }),
2718 2211
2719 -/***/ "../core/common/modules/events-manager/assets/js/session-recording.js":
2720 -/*!****************************************************************************!*\
2721 - !*** ../core/common/modules/events-manager/assets/js/session-recording.js ***!
2722 - \****************************************************************************/
2723 -/***/ ((__unused_webpack_module, exports) => {
2724 -
2725 -"use strict";
2726 -
2727 -
2728 -Object.defineProperty(exports, "__esModule", ({
2729 - value: true
2730 -}));
2731 -exports.configureSessionRecording = configureSessionRecording;
2732 -exports.getIsRecording = getIsRecording;
2733 -exports.handleSessionRecording = handleSessionRecording;
2734 -var RECORD_SESSION_PERCENT = 1;
2735 -var sessionRecordingPairs = [];
2736 -var activeEndEvent = null;
2737 -var isRecording = false;
2738 -function shouldRecordSession(distinctId, percent) {
2739 - var fraction = Math.min(Math.max(percent / 100, 0), 1);
2740 - var hash = 0;
2741 - for (var i = 0; i < distinctId.length; i++) {
2742 - // eslint-disable-next-line no-bitwise
2743 - hash = hash * 31 + distinctId.charCodeAt(i) >>> 0;
2744 - }
2745 - return hash / 4294967295 < fraction;
2746 -}
2747 -
2748 -/**
2749 - * @param {Array<{start: string, end?: string|null}>} pairs
2750 - */
2751 -function configureSessionRecording(pairs) {
2752 - if (!Array.isArray(pairs)) {
2753 - return;
2754 - }
2755 - sessionRecordingPairs = pairs.filter(function (pair) {
2756 - return 'string' === typeof (pair === null || pair === void 0 ? void 0 : pair.start) && pair.start;
2757 - });
2758 -}
2759 -
2760 -/**
2761 - * Evaluates whether to start/stop recording based on the event name.
2762 - *
2763 - * @param {string} name
2764 - * @param {import('mixpanel-browser').Mixpanel} mixpanelInstance
2765 - * @return {'recording_started'|'recording_skipped'|'recording_stopped'|null} The recording decision, or null if no action taken.
2766 - */
2767 -function handleSessionRecording(name, mixpanelInstance) {
2768 - var matchedPair = sessionRecordingPairs.find(function (pair) {
2769 - return pair.start === name;
2770 - });
2771 - if (matchedPair) {
2772 - var distinctId = mixpanelInstance.get_distinct_id();
2773 - if (shouldRecordSession(distinctId, RECORD_SESSION_PERCENT)) {
2774 - var _matchedPair$end;
2775 - mixpanelInstance.start_session_recording();
2776 - isRecording = true;
2777 - activeEndEvent = (_matchedPair$end = matchedPair.end) !== null && _matchedPair$end !== void 0 ? _matchedPair$end : null;
2778 - return 'recording_started';
2779 - }
2780 - isRecording = false;
2781 - activeEndEvent = null;
2782 - return 'recording_skipped';
2783 - }
2784 - if (activeEndEvent && name === activeEndEvent) {
2785 - mixpanelInstance.stop_session_recording();
2786 - isRecording = false;
2787 - activeEndEvent = null;
2788 - return 'recording_stopped';
2789 - }
2790 - return null;
2791 -}
2792 -function getIsRecording() {
2793 - return isRecording;
2794 -}
2795 -
2796 -/***/ }),
2797 -
2798 2212 /***/ "../core/common/modules/finder/assets/js/commands/index.js":
2799 2213 /*!*****************************************************************!*\
2800 2214 !*** ../core/common/modules/finder/assets/js/commands/index.js ***!
2801 2215 \*****************************************************************/
@@ -3395,12 +2809,10 @@
3395 2809 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
3396 2810 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
3397 2811 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
3398 2812 var _categories = _interopRequireDefault(__webpack_require__(/*! ./categories */ "../core/common/modules/finder/assets/js/modal/views/categories.js"));
3399 -var _editorOneEvents = __webpack_require__(/*! elementor-editor-utils/editor-one-events */ "../assets/dev/js/editor/utils/editor-one-events.js");
3400 2813 function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
3401 2814 function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
3402 -var FINDER_SEARCH_DEBOUNCE_MS = 300;
3403 2815 var _default = exports["default"] = /*#__PURE__*/function (_Marionette$LayoutVie) {
3404 2816 function _default() {
3405 2817 (0, _classCallCheck2.default)(this, _default);
3406 2818 return _callSuper(this, _default, arguments);
@@ -3437,30 +2849,15 @@
3437 2849 content: '#elementor-finder__content'
3438 2850 };
3439 2851 }
3440 2852 }, {
3441 - key: "initialize",
3442 - value: function initialize() {
3443 - this.debouncedTrackSearch = (0, _editorOneEvents.createDebouncedFinderSearch)(FINDER_SEARCH_DEBOUNCE_MS);
3444 - }
3445 - }, {
3446 2853 key: "showCategoriesView",
3447 2854 value: function showCategoriesView() {
3448 2855 this.content.show(new _categories.default());
3449 2856 }
3450 2857 }, {
3451 - key: "getResultsCount",
3452 - value: function getResultsCount() {
3453 - if (!this.content.currentView) {
3454 - return 0;
3455 - }
3456 - var $visibleItems = this.content.currentView.$el.find('.elementor-finder__results__item:visible');
3457 - return $visibleItems.length;
3458 - }
3459 - }, {
3460 2858 key: "onSearchInputInput",
3461 2859 value: function onSearchInputInput() {
3462 - var _this = this;
3463 2860 var value = this.ui.searchInput.val();
3464 2861 if (value) {
3465 2862 elementorCommon.finder.channel.reply('filter:text', value).trigger('filter:change');
3466 2863 if (!(this.content.currentView instanceof _categories.default)) {
@@ -3465,23 +2862,11 @@
3465 2862 elementorCommon.finder.channel.reply('filter:text', value).trigger('filter:change');
3466 2863 if (!(this.content.currentView instanceof _categories.default)) {
3467 2864 this.showCategoriesView();
3468 2865 }
3469 - setTimeout(function () {
3470 - var resultsCount = _this.getResultsCount();
3471 - _this.debouncedTrackSearch(resultsCount, value);
3472 - }, 50);
3473 2866 }
3474 2867 this.content.currentView.$el.toggle(!!value);
3475 2868 }
3476 - }, {
3477 - key: "onDestroy",
3478 - value: function onDestroy() {
3479 - var _this$debouncedTrackS;
3480 - if ((_this$debouncedTrackS = this.debouncedTrackSearch) !== null && _this$debouncedTrackS !== void 0 && _this$debouncedTrackS.cancel) {
3481 - this.debouncedTrackSearch.cancel();
3482 - }
3483 - }
3484 2869 }]);
3485 2870 }(Marionette.LayoutView);
3486 2871
3487 2872 /***/ }),
@@ -3592,9 +2977,8 @@
3592 2977 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
3593 2978 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
3594 2979 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
3595 2980 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
3596 -var _editorOneEvents = __webpack_require__(/*! elementor-editor-utils/editor-one-events */ "../assets/dev/js/editor/utils/editor-one-events.js");
3597 2981 function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
3598 2982 function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
3599 2983 var _default = exports["default"] = /*#__PURE__*/function (_Marionette$ItemView) {
3600 2984 function _default() {
@@ -3617,20 +3001,13 @@
3617 3001 value: function events() {
3618 3002 this.$el[0].addEventListener('click', this.onClick.bind(this), true);
3619 3003 }
3620 3004 }, {
3621 - key: "trackResultSelect",
3622 - value: function trackResultSelect() {
3623 - var title = this.model.get('title');
3624 - _editorOneEvents.EditorOneEventManager.sendFinderResultSelect(title);
3625 - }
3626 - }, {
3627 3005 key: "onClick",
3628 3006 value: function onClick(e) {
3629 3007 var _this = this;
3630 3008 var lockOptions = this.model.get('lock');
3631 3009 if (!(lockOptions !== null && lockOptions !== void 0 && lockOptions.is_locked)) {
3632 - this.trackResultSelect();
3633 3010 return;
3634 3011 }
3635 3012 e.preventDefault();
3636 3013 e.stopImmediatePropagation();
@@ -3646,9 +3023,8 @@
3646 3023 confirm: lockOptions.button.text,
3647 3024 cancel: __('Cancel', 'elementor')
3648 3025 },
3649 3026 onConfirm: function onConfirm() {
3650 - _this.trackResultSelect();
3651 3027 var link = _this.replaceLockLinkPlaceholders(lockOptions.button.url);
3652 3028 window.open(link, '_blank');
3653 3029 }
3654 3030 }).show();