| @@ -1,1744 +1,377 @@ | ||
| 1 | +/*! elementor - v3.6.7 - 03-07-2022 */ | |
| 1 | 2 | /******/ (() => { // webpackBootstrap |
| 2 | 3 | /******/ var __webpack_modules__ = ({ |
| 3 | 4 | |
| 4 | -/***/ "../app/assets/js/event-track/dashboard/action-controls.js": | |
| 5 | -/*!*****************************************************************!*\ | |
| 6 | - !*** ../app/assets/js/event-track/dashboard/action-controls.js ***! | |
| 7 | - \*****************************************************************/ | |
| 8 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 5 | +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 6 | +/*!******************************************************************!*\ | |
| 7 | + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 8 | + \******************************************************************/ | |
| 9 | +/***/ ((module) => { | |
| 9 | 10 | |
| 10 | -"use strict"; | |
| 11 | +function _arrayLikeToArray(arr, len) { | |
| 12 | + if (len == null || len > arr.length) len = arr.length; | |
| 11 | 13 | |
| 14 | + for (var i = 0, arr2 = new Array(len); i < len; i++) { | |
| 15 | + arr2[i] = arr[i]; | |
| 16 | + } | |
| 12 | 17 | |
| 13 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 14 | -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 15 | -Object.defineProperty(exports, "__esModule", ({ | |
| 16 | - value: true | |
| 17 | -})); | |
| 18 | -exports["default"] = void 0; | |
| 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 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 22 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 23 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 24 | -var _wpDashboardTracking = _interopRequireWildcard(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); | |
| 25 | -var _utils = __webpack_require__(/*! ./utils */ "../app/assets/js/event-track/dashboard/utils.js"); | |
| 26 | -var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); | |
| 27 | -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 _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 28 | -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } | |
| 29 | -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } | |
| 30 | -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } | |
| 31 | -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)); } | |
| 32 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 33 | -var EXCLUDED_SELECTORS = { | |
| 34 | - ADMIN_MENU: '#adminmenu', | |
| 35 | - TOP_BAR: '.e-admin-top-bar', | |
| 36 | - TOP_BAR_EDITOR_ONE: '#editor-one-top-bar', | |
| 37 | - WP_ADMIN_BAR: '#wpadminbar', | |
| 38 | - SUBMENU: '.wp-submenu', | |
| 39 | - PROMO_PAGE: '.e-feature-promotion', | |
| 40 | - PROMO_BLANK_STATE: '.elementor-blank_state', | |
| 41 | - APP: '.e-app', | |
| 42 | - SIDEBAR_NAVIGATION: '#editor-one-sidebar-navigation', | |
| 43 | - FLYOUT_MENU: '.elementor-submenu-flyout' | |
| 44 | -}; | |
| 45 | -var ActionControlTracking = /*#__PURE__*/function (_BaseTracking) { | |
| 46 | - function ActionControlTracking() { | |
| 47 | - (0, _classCallCheck2.default)(this, ActionControlTracking); | |
| 48 | - return _callSuper(this, ActionControlTracking, arguments); | |
| 49 | - } | |
| 50 | - (0, _inherits2.default)(ActionControlTracking, _BaseTracking); | |
| 51 | - return (0, _createClass2.default)(ActionControlTracking, null, [{ | |
| 52 | - key: "init", | |
| 53 | - value: function init() { | |
| 54 | - if (!_utils.DashboardUtils.isElementorPage()) { | |
| 55 | - return; | |
| 56 | - } | |
| 57 | - this.attachDelegatedHandlers(); | |
| 58 | - this.addTrackingAttributesToFilterButtons(); | |
| 59 | - this.initializeLinkDataIds(); | |
| 60 | - } | |
| 61 | - }, { | |
| 62 | - key: "initializeLinkDataIds", | |
| 63 | - value: function initializeLinkDataIds() { | |
| 64 | - var _this = this; | |
| 65 | - var initializeLinks = function initializeLinks() { | |
| 66 | - var links = document.querySelectorAll('a[href]'); | |
| 67 | - links.forEach(function (link) { | |
| 68 | - if (_this.isExcludedElement(link) || _this.isNavigationLink(link) || link.hasAttribute('data-id')) { | |
| 69 | - return; | |
| 70 | - } | |
| 71 | - var href = link.getAttribute('href'); | |
| 72 | - if (!href) { | |
| 73 | - return; | |
| 74 | - } | |
| 75 | - var cleanedHref = _this.removeNonceFromUrl(href); | |
| 76 | - if (cleanedHref) { | |
| 77 | - link.setAttribute('data-id', cleanedHref); | |
| 78 | - } | |
| 79 | - }); | |
| 80 | - }; | |
| 81 | - if ('loading' === document.readyState) { | |
| 82 | - document.addEventListener('DOMContentLoaded', initializeLinks); | |
| 83 | - } else { | |
| 84 | - initializeLinks(); | |
| 85 | - } | |
| 86 | - } | |
| 87 | - }, { | |
| 88 | - key: "addTrackingAttributesToFilterButtons", | |
| 89 | - value: function addTrackingAttributesToFilterButtons() { | |
| 90 | - var body = document.body; | |
| 91 | - if (!body) { | |
| 92 | - return; | |
| 93 | - } | |
| 94 | - var screenPrefix = ''; | |
| 95 | - switch (true) { | |
| 96 | - case body.classList.contains('post-type-elementor_library'): | |
| 97 | - screenPrefix = 'elementor_library-library'; | |
| 98 | - break; | |
| 99 | - case body.classList.contains('post-type-e-floating-buttons'): | |
| 100 | - screenPrefix = 'e-floating-buttons'; | |
| 101 | - break; | |
| 102 | - default: | |
| 103 | - return; | |
| 104 | - } | |
| 105 | - var addDataIdToListTableButtons = function addDataIdToListTableButtons() { | |
| 106 | - var buttonConfigs = [{ | |
| 107 | - id: 'post-query-submit', | |
| 108 | - suffix: 'filter' | |
| 109 | - }, { | |
| 110 | - id: 'search-submit', | |
| 111 | - suffix: 'search' | |
| 112 | - }, { | |
| 113 | - id: 'doaction', | |
| 114 | - suffix: 'apply' | |
| 115 | - }, { | |
| 116 | - id: 'doaction2', | |
| 117 | - suffix: 'apply-bottom' | |
| 118 | - }]; | |
| 119 | - buttonConfigs.forEach(function (config) { | |
| 120 | - var button = document.getElementById(config.id); | |
| 121 | - if (!button || button.hasAttribute('data-id')) { | |
| 122 | - return; | |
| 123 | - } | |
| 124 | - button.setAttribute('data-id', "".concat(screenPrefix, "-button-").concat(config.suffix)); | |
| 125 | - }); | |
| 126 | - }; | |
| 127 | - if ('loading' === document.readyState) { | |
| 128 | - document.addEventListener('DOMContentLoaded', addDataIdToListTableButtons); | |
| 129 | - } else { | |
| 130 | - addDataIdToListTableButtons(); | |
| 131 | - } | |
| 132 | - } | |
| 133 | - }, { | |
| 134 | - key: "isExcludedElement", | |
| 135 | - value: function isExcludedElement(element) { | |
| 136 | - for (var _i = 0, _Object$values = Object.values(EXCLUDED_SELECTORS); _i < _Object$values.length; _i++) { | |
| 137 | - var selector = _Object$values[_i]; | |
| 138 | - if (element.closest(selector)) { | |
| 139 | - return true; | |
| 140 | - } | |
| 141 | - } | |
| 142 | - if (element.classList.contains('go-pro')) { | |
| 143 | - return true; | |
| 144 | - } | |
| 145 | - return false; | |
| 146 | - } | |
| 147 | - }, { | |
| 148 | - key: "attachDelegatedHandlers", | |
| 149 | - value: function attachDelegatedHandlers() { | |
| 150 | - var _this2 = this; | |
| 151 | - var FILTER_BUTTON_IDS = ['search-submit', 'post-query-submit']; | |
| 152 | - this.addEventListenerTracked(document, 'click', function (event) { | |
| 153 | - var _event$target; | |
| 154 | - var base = event.target && 1 === event.target.nodeType ? event.target : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.parentElement; | |
| 155 | - if (!base) { | |
| 156 | - return; | |
| 157 | - } | |
| 158 | - var toggle = base.closest('.elementor-role-toggle'); | |
| 159 | - if (toggle && !_this2.isExcludedElement(toggle)) { | |
| 160 | - _this2.trackControl(toggle, _wpDashboardTracking.CONTROL_TYPES.TOGGLE); | |
| 161 | - return; | |
| 162 | - } | |
| 163 | - var button = base.closest('button, input[type="submit"], input[type="button"], .button, .e-btn'); | |
| 164 | - if (button && !_this2.isExcludedElement(button)) { | |
| 165 | - if (FILTER_BUTTON_IDS.includes(button.id)) { | |
| 166 | - _this2.trackControl(button, _wpDashboardTracking.CONTROL_TYPES.FILTER); | |
| 167 | - return; | |
| 168 | - } | |
| 169 | - _this2.trackControl(button, _wpDashboardTracking.CONTROL_TYPES.BUTTON); | |
| 170 | - return; | |
| 171 | - } | |
| 172 | - var link = base.closest('a'); | |
| 173 | - if (link && !_this2.isExcludedElement(link) && !_this2.isNavigationLink(link)) { | |
| 174 | - _this2.trackControl(link, _wpDashboardTracking.CONTROL_TYPES.LINK); | |
| 175 | - } | |
| 176 | - }, { | |
| 177 | - capture: false | |
| 178 | - }); | |
| 179 | - this.addEventListenerTracked(document, 'change', function (event) { | |
| 180 | - var _event$target2; | |
| 181 | - var base = event.target && 1 === event.target.nodeType ? event.target : (_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.parentElement; | |
| 182 | - if (!base) { | |
| 183 | - return; | |
| 184 | - } | |
| 185 | - var toggle = null; | |
| 186 | - if (_wpDashboardTracking.default.isEditorOneActive()) { | |
| 187 | - toggle = base.closest('.MuiSwitch-switchBase'); | |
| 188 | - } else { | |
| 189 | - toggle = base.closest('.components-toggle-control'); | |
| 190 | - } | |
| 191 | - if (toggle && !_this2.isExcludedElement(toggle)) { | |
| 192 | - _this2.trackControl(toggle, _wpDashboardTracking.CONTROL_TYPES.TOGGLE); | |
| 193 | - return; | |
| 194 | - } | |
| 195 | - var checkbox = base.closest('input[type="checkbox"]'); | |
| 196 | - if (checkbox && !_this2.isExcludedElement(checkbox)) { | |
| 197 | - _this2.trackControl(checkbox, _wpDashboardTracking.CONTROL_TYPES.CHECKBOX); | |
| 198 | - return; | |
| 199 | - } | |
| 200 | - var radio = base.closest('input[type="radio"]'); | |
| 201 | - if (radio && !_this2.isExcludedElement(radio)) { | |
| 202 | - _this2.trackControl(radio, _wpDashboardTracking.CONTROL_TYPES.RADIO); | |
| 203 | - return; | |
| 204 | - } | |
| 205 | - var select = base.closest('select'); | |
| 206 | - if (select && !_this2.isExcludedElement(select)) { | |
| 207 | - _this2.trackControl(select, _wpDashboardTracking.CONTROL_TYPES.SELECT); | |
| 208 | - } | |
| 209 | - }); | |
| 210 | - } | |
| 211 | - }, { | |
| 212 | - key: "isNavigationLink", | |
| 213 | - value: function isNavigationLink(link) { | |
| 214 | - var href = link.getAttribute('href'); | |
| 215 | - if (!href) { | |
| 216 | - return false; | |
| 217 | - } | |
| 218 | - if (href.startsWith('#') && href.includes('tab')) { | |
| 219 | - return true; | |
| 220 | - } | |
| 221 | - if (link.classList.contains('nav-tab')) { | |
| 222 | - return true; | |
| 223 | - } | |
| 224 | - var isInNavigation = link.closest('.wp-submenu, #adminmenu, .e-admin-top-bar, #wpadminbar'); | |
| 225 | - return !!isInNavigation; | |
| 226 | - } | |
| 227 | - }, { | |
| 228 | - key: "trackControl", | |
| 229 | - value: function trackControl(element, controlType) { | |
| 230 | - var controlIdentifier = this.extractControlIdentifier(element, controlType); | |
| 231 | - if (!controlIdentifier) { | |
| 232 | - return; | |
| 233 | - } | |
| 234 | - _wpDashboardTracking.default.trackActionControl(controlIdentifier, controlType); | |
| 235 | - } | |
| 236 | - }, { | |
| 237 | - key: "extractControlIdentifier", | |
| 238 | - value: function extractControlIdentifier(element, controlType) { | |
| 239 | - if (_wpDashboardTracking.CONTROL_TYPES.RADIO === controlType) { | |
| 240 | - var name = element.getAttribute('name'); | |
| 241 | - var value = element.value || element.getAttribute('value'); | |
| 242 | - if (name && value) { | |
| 243 | - return "".concat(name, "-").concat(value); | |
| 244 | - } | |
| 245 | - if (name) { | |
| 246 | - return name; | |
| 247 | - } | |
| 248 | - } | |
| 249 | - if (_wpDashboardTracking.CONTROL_TYPES.SELECT === controlType) { | |
| 250 | - var _name = element.getAttribute('name'); | |
| 251 | - if (_name) { | |
| 252 | - return _name; | |
| 253 | - } | |
| 254 | - } | |
| 255 | - if (_wpDashboardTracking.CONTROL_TYPES.CHECKBOX === controlType) { | |
| 256 | - var _name2 = element.getAttribute('name'); | |
| 257 | - if (_name2) { | |
| 258 | - var checkboxesWithSameName = document.querySelectorAll("input[type=\"checkbox\"][name=\"".concat(CSS.escape(_name2), "\"]")); | |
| 259 | - if (checkboxesWithSameName.length > 1) { | |
| 260 | - var _value = element.value || element.getAttribute('value'); | |
| 261 | - if (_value) { | |
| 262 | - return "".concat(_name2, "-").concat(_value); | |
| 263 | - } | |
| 264 | - } | |
| 265 | - return _name2; | |
| 266 | - } | |
| 267 | - } | |
| 268 | - if (_wpDashboardTracking.CONTROL_TYPES.LINK === controlType) { | |
| 269 | - var dataId = element.getAttribute('data-id'); | |
| 270 | - if (dataId) { | |
| 271 | - return dataId; | |
| 272 | - } | |
| 273 | - var href = element.getAttribute('href'); | |
| 274 | - if (href) { | |
| 275 | - return this.removeNonceFromUrl(href); | |
| 276 | - } | |
| 277 | - } | |
| 278 | - if (_wpDashboardTracking.CONTROL_TYPES.BUTTON === controlType || _wpDashboardTracking.CONTROL_TYPES.TOGGLE === controlType || _wpDashboardTracking.CONTROL_TYPES.FILTER === controlType) { | |
| 279 | - var _dataId = element.getAttribute('data-id'); | |
| 280 | - if (_dataId) { | |
| 281 | - return _dataId; | |
| 282 | - } | |
| 283 | - var classIdMatch = this.extractClassId(element); | |
| 284 | - if (classIdMatch) { | |
| 285 | - return classIdMatch; | |
| 286 | - } | |
| 287 | - } | |
| 288 | - return ''; | |
| 289 | - } | |
| 290 | - }, { | |
| 291 | - key: "extractClassId", | |
| 292 | - value: function extractClassId(element) { | |
| 293 | - var classes = element.className; | |
| 294 | - if (!classes || 'string' !== typeof classes) { | |
| 295 | - return ''; | |
| 296 | - } | |
| 297 | - var classList = classes.split(' '); | |
| 298 | - var _iterator = _createForOfIteratorHelper(classList), | |
| 299 | - _step; | |
| 300 | - try { | |
| 301 | - for (_iterator.s(); !(_step = _iterator.n()).done;) { | |
| 302 | - var cls = _step.value; | |
| 303 | - if (cls.startsWith('e-id-')) { | |
| 304 | - return cls.substring(5); | |
| 305 | - } | |
| 306 | - } | |
| 307 | - } catch (err) { | |
| 308 | - _iterator.e(err); | |
| 309 | - } finally { | |
| 310 | - _iterator.f(); | |
| 311 | - } | |
| 312 | - return ''; | |
| 313 | - } | |
| 314 | - }, { | |
| 315 | - key: "removeNonceFromUrl", | |
| 316 | - value: function removeNonceFromUrl(url) { | |
| 317 | - try { | |
| 318 | - var urlObj = new URL(url, window.location.origin); | |
| 319 | - urlObj.searchParams.delete('_wpnonce'); | |
| 320 | - var postParam = urlObj.searchParams.get('post'); | |
| 321 | - if (postParam !== null && /^[0-9]+$/.test(postParam)) { | |
| 322 | - urlObj.searchParams.delete('post'); | |
| 323 | - } | |
| 324 | - return urlObj.pathname + urlObj.search + urlObj.hash; | |
| 325 | - } catch (e) { | |
| 326 | - return url; | |
| 327 | - } | |
| 328 | - } | |
| 329 | - }]); | |
| 330 | -}(_baseTracking.default); | |
| 331 | -var _default = exports["default"] = ActionControlTracking; | |
| 18 | + return arr2; | |
| 19 | +} | |
| 332 | 20 | |
| 21 | +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 22 | + | |
| 333 | 23 | /***/ }), |
| 334 | 24 | |
| 335 | -/***/ "../app/assets/js/event-track/dashboard/base-tracking.js": | |
| 336 | -/*!***************************************************************!*\ | |
| 337 | - !*** ../app/assets/js/event-track/dashboard/base-tracking.js ***! | |
| 338 | - \***************************************************************/ | |
| 339 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 25 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 26 | +/*!****************************************************************!*\ | |
| 27 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 28 | + \****************************************************************/ | |
| 29 | +/***/ ((module) => { | |
| 340 | 30 | |
| 341 | -"use strict"; | |
| 31 | +function _arrayWithHoles(arr) { | |
| 32 | + if (Array.isArray(arr)) return arr; | |
| 33 | +} | |
| 342 | 34 | |
| 35 | +module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 343 | 36 | |
| 344 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 345 | -Object.defineProperty(exports, "__esModule", ({ | |
| 346 | - value: true | |
| 347 | -})); | |
| 348 | -exports["default"] = void 0; | |
| 349 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 350 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 351 | -var BaseTracking = /*#__PURE__*/function () { | |
| 352 | - function BaseTracking() { | |
| 353 | - (0, _classCallCheck2.default)(this, BaseTracking); | |
| 37 | +/***/ }), | |
| 38 | + | |
| 39 | +/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 40 | +/*!***********************************************************************!*\ | |
| 41 | + !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 42 | + \***********************************************************************/ | |
| 43 | +/***/ ((module) => { | |
| 44 | + | |
| 45 | +function _assertThisInitialized(self) { | |
| 46 | + if (self === void 0) { | |
| 47 | + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 354 | 48 | } |
| 355 | - return (0, _createClass2.default)(BaseTracking, null, [{ | |
| 356 | - key: "ensureOwnArrays", | |
| 357 | - value: function ensureOwnArrays() { | |
| 358 | - if (!Object.prototype.hasOwnProperty.call(this, 'observers')) { | |
| 359 | - this.observers = []; | |
| 360 | - } | |
| 361 | - if (!Object.prototype.hasOwnProperty.call(this, 'eventListeners')) { | |
| 362 | - this.eventListeners = []; | |
| 363 | - } | |
| 364 | - } | |
| 365 | - }, { | |
| 366 | - key: "destroy", | |
| 367 | - value: function destroy() { | |
| 368 | - this.ensureOwnArrays(); | |
| 369 | - this.observers.forEach(function (observer) { | |
| 370 | - return observer.disconnect(); | |
| 371 | - }); | |
| 372 | - this.observers = []; | |
| 373 | - this.eventListeners.forEach(function (_ref) { | |
| 374 | - var target = _ref.target, | |
| 375 | - type = _ref.type, | |
| 376 | - handler = _ref.handler, | |
| 377 | - options = _ref.options; | |
| 378 | - target.removeEventListener(type, handler, options); | |
| 379 | - }); | |
| 380 | - this.eventListeners = []; | |
| 381 | - } | |
| 382 | - }, { | |
| 383 | - key: "addObserver", | |
| 384 | - value: function addObserver(target, options, callback) { | |
| 385 | - this.ensureOwnArrays(); | |
| 386 | - var observer = new MutationObserver(callback); | |
| 387 | - observer.observe(target, options); | |
| 388 | - this.observers.push(observer); | |
| 389 | - return observer; | |
| 390 | - } | |
| 391 | - }, { | |
| 392 | - key: "addEventListenerTracked", | |
| 393 | - value: function addEventListenerTracked(target, type, handler) { | |
| 394 | - var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; | |
| 395 | - this.ensureOwnArrays(); | |
| 396 | - target.addEventListener(type, handler, options); | |
| 397 | - this.eventListeners.push({ | |
| 398 | - target: target, | |
| 399 | - type: type, | |
| 400 | - handler: handler, | |
| 401 | - options: options | |
| 402 | - }); | |
| 403 | - } | |
| 404 | - }]); | |
| 405 | -}(); | |
| 406 | -var _default = exports["default"] = BaseTracking; | |
| 407 | 49 | |
| 50 | + return self; | |
| 51 | +} | |
| 52 | + | |
| 53 | +module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 54 | + | |
| 408 | 55 | /***/ }), |
| 409 | 56 | |
| 410 | -/***/ "../app/assets/js/event-track/dashboard/menu-promotion.js": | |
| 57 | +/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 411 | 58 | /*!****************************************************************!*\ |
| 412 | - !*** ../app/assets/js/event-track/dashboard/menu-promotion.js ***! | |
| 59 | + !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 413 | 60 | \****************************************************************/ |
| 414 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 61 | +/***/ ((module) => { | |
| 415 | 62 | |
| 416 | -"use strict"; | |
| 63 | +function _classCallCheck(instance, Constructor) { | |
| 64 | + if (!(instance instanceof Constructor)) { | |
| 65 | + throw new TypeError("Cannot call a class as a function"); | |
| 66 | + } | |
| 67 | +} | |
| 417 | 68 | |
| 69 | +module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 418 | 70 | |
| 419 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 420 | -Object.defineProperty(exports, "__esModule", ({ | |
| 421 | - value: true | |
| 422 | -})); | |
| 423 | -exports["default"] = void 0; | |
| 424 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 425 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 426 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 427 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 428 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 429 | -var _wpDashboardTracking = _interopRequireDefault(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); | |
| 430 | -var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); | |
| 431 | -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)); } | |
| 432 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 433 | -var PROMO_MENU_ITEMS = { | |
| 434 | - go_elementor_pro: 'Upgrade' | |
| 435 | -}; | |
| 436 | -var MenuPromotionTracking = /*#__PURE__*/function (_BaseTracking) { | |
| 437 | - function MenuPromotionTracking() { | |
| 438 | - (0, _classCallCheck2.default)(this, MenuPromotionTracking); | |
| 439 | - return _callSuper(this, MenuPromotionTracking, arguments); | |
| 71 | +/***/ }), | |
| 72 | + | |
| 73 | +/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 74 | +/*!*************************************************************!*\ | |
| 75 | + !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 76 | + \*************************************************************/ | |
| 77 | +/***/ ((module) => { | |
| 78 | + | |
| 79 | +function _defineProperties(target, props) { | |
| 80 | + for (var i = 0; i < props.length; i++) { | |
| 81 | + var descriptor = props[i]; | |
| 82 | + descriptor.enumerable = descriptor.enumerable || false; | |
| 83 | + descriptor.configurable = true; | |
| 84 | + if ("value" in descriptor) descriptor.writable = true; | |
| 85 | + Object.defineProperty(target, descriptor.key, descriptor); | |
| 440 | 86 | } |
| 441 | - (0, _inherits2.default)(MenuPromotionTracking, _BaseTracking); | |
| 442 | - return (0, _createClass2.default)(MenuPromotionTracking, null, [{ | |
| 443 | - key: "init", | |
| 444 | - value: function init() { | |
| 445 | - this.attachDelegatedTracking(); | |
| 446 | - } | |
| 447 | - }, { | |
| 448 | - key: "attachDelegatedTracking", | |
| 449 | - value: function attachDelegatedTracking() { | |
| 450 | - var _this = this; | |
| 451 | - this.addEventListenerTracked(document, 'click', function (event) { | |
| 452 | - var target = event.target; | |
| 453 | - if (!target) { | |
| 454 | - return; | |
| 455 | - } | |
| 456 | - var link = target.closest('a'); | |
| 457 | - if (!link) { | |
| 458 | - return; | |
| 459 | - } | |
| 460 | - var href = link.getAttribute('href'); | |
| 461 | - if (!href) { | |
| 462 | - return; | |
| 463 | - } | |
| 464 | - var menuItemKey = _this.extractPromoMenuKey(href); | |
| 465 | - if (!menuItemKey) { | |
| 466 | - return; | |
| 467 | - } | |
| 468 | - _this.handleMenuPromoClick(link, menuItemKey); | |
| 469 | - }, { | |
| 470 | - capture: true | |
| 471 | - }); | |
| 472 | - } | |
| 473 | - }, { | |
| 474 | - key: "extractPromoMenuKey", | |
| 475 | - value: function extractPromoMenuKey(href) { | |
| 476 | - for (var _i = 0, _Object$keys = Object.keys(PROMO_MENU_ITEMS); _i < _Object$keys.length; _i++) { | |
| 477 | - var menuItemKey = _Object$keys[_i]; | |
| 478 | - if (href.includes("page=".concat(menuItemKey))) { | |
| 479 | - return menuItemKey; | |
| 480 | - } | |
| 481 | - } | |
| 482 | - return null; | |
| 483 | - } | |
| 484 | - }, { | |
| 485 | - key: "handleMenuPromoClick", | |
| 486 | - value: function handleMenuPromoClick(menuItem, menuItemKey) { | |
| 487 | - var destination = menuItem.getAttribute('href'); | |
| 488 | - var promoName = PROMO_MENU_ITEMS[menuItemKey]; | |
| 489 | - var path = menuItemKey.replace('elementor_', '').replace(/_/g, '/'); | |
| 490 | - _wpDashboardTracking.default.trackPromoClicked(promoName, destination, path); | |
| 491 | - } | |
| 492 | - }]); | |
| 493 | -}(_baseTracking.default); | |
| 494 | -var _default = exports["default"] = MenuPromotionTracking; | |
| 87 | +} | |
| 495 | 88 | |
| 89 | +function _createClass(Constructor, protoProps, staticProps) { | |
| 90 | + if (protoProps) _defineProperties(Constructor.prototype, protoProps); | |
| 91 | + if (staticProps) _defineProperties(Constructor, staticProps); | |
| 92 | + Object.defineProperty(Constructor, "prototype", { | |
| 93 | + writable: false | |
| 94 | + }); | |
| 95 | + return Constructor; | |
| 96 | +} | |
| 97 | + | |
| 98 | +module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 99 | + | |
| 496 | 100 | /***/ }), |
| 497 | 101 | |
| 498 | -/***/ "../app/assets/js/event-track/dashboard/navigation.js": | |
| 499 | -/*!************************************************************!*\ | |
| 500 | - !*** ../app/assets/js/event-track/dashboard/navigation.js ***! | |
| 501 | - \************************************************************/ | |
| 502 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 102 | +/***/ "../node_modules/@babel/runtime/helpers/get.js": | |
| 103 | +/*!*****************************************************!*\ | |
| 104 | + !*** ../node_modules/@babel/runtime/helpers/get.js ***! | |
| 105 | + \*****************************************************/ | |
| 106 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 503 | 107 | |
| 504 | -"use strict"; | |
| 108 | +var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js"); | |
| 505 | 109 | |
| 110 | +function _get() { | |
| 111 | + if (typeof Reflect !== "undefined" && Reflect.get) { | |
| 112 | + module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 113 | + } else { | |
| 114 | + module.exports = _get = function _get(target, property, receiver) { | |
| 115 | + var base = superPropBase(target, property); | |
| 116 | + if (!base) return; | |
| 117 | + var desc = Object.getOwnPropertyDescriptor(base, property); | |
| 506 | 118 | |
| 507 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 508 | -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 509 | -Object.defineProperty(exports, "__esModule", ({ | |
| 510 | - value: true | |
| 511 | -})); | |
| 512 | -exports["default"] = void 0; | |
| 513 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 514 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 515 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 516 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 517 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 518 | -var _wpDashboardTracking = _interopRequireWildcard(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); | |
| 519 | -var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); | |
| 520 | -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 _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 521 | -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)); } | |
| 522 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 523 | -var ELEMENTOR_MENU_SELECTORS = { | |
| 524 | - ELEMENTOR_TOP_LEVEL: 'li#toplevel_page_elementor', | |
| 525 | - TEMPLATES_TOP_LEVEL: 'li#menu-posts-elementor_library', | |
| 526 | - ELEMENTOR_HOME_TOP_LEVEL: 'li#toplevel_page_elementor-home', | |
| 527 | - ADMIN_MENU: '#adminmenu', | |
| 528 | - TOP_LEVEL_LINK: '.wp-menu-name', | |
| 529 | - SUBMENU_CONTAINER: '.wp-submenu', | |
| 530 | - SUBMENU_ITEM: '.wp-submenu li a', | |
| 531 | - SUBMENU_ITEM_TOP_LEVEL: '.wp-has-submenu', | |
| 532 | - SIDEBAR_NAVIGATION: '#editor-one-sidebar-navigation' | |
| 533 | -}; | |
| 534 | -var NavigationTracking = /*#__PURE__*/function (_BaseTracking) { | |
| 535 | - function NavigationTracking() { | |
| 536 | - (0, _classCallCheck2.default)(this, NavigationTracking); | |
| 537 | - return _callSuper(this, NavigationTracking, arguments); | |
| 119 | + if (desc.get) { | |
| 120 | + return desc.get.call(arguments.length < 3 ? target : receiver); | |
| 121 | + } | |
| 122 | + | |
| 123 | + return desc.value; | |
| 124 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 538 | 125 | } |
| 539 | - (0, _inherits2.default)(NavigationTracking, _BaseTracking); | |
| 540 | - return (0, _createClass2.default)(NavigationTracking, null, [{ | |
| 541 | - key: "init", | |
| 542 | - value: function init() { | |
| 543 | - if (_wpDashboardTracking.default.isEditorOneActive()) { | |
| 544 | - this.attachSidebarNavigationTracking(); | |
| 545 | - this.attachElementorHomeMenuTracking(); | |
| 546 | - } else { | |
| 547 | - this.attachElementorMenuTracking(); | |
| 548 | - this.attachTemplatesMenuTracking(); | |
| 549 | - } | |
| 550 | - } | |
| 551 | - }, { | |
| 552 | - key: "attachTemplatesMenuTracking", | |
| 553 | - value: function attachTemplatesMenuTracking() { | |
| 554 | - var templatesMenu = document.querySelector(ELEMENTOR_MENU_SELECTORS.TEMPLATES_TOP_LEVEL); | |
| 555 | - if (!templatesMenu) { | |
| 556 | - return; | |
| 557 | - } | |
| 558 | - this.attachMenuTracking(templatesMenu, 'Templates'); | |
| 559 | - } | |
| 560 | - }, { | |
| 561 | - key: "attachElementorHomeMenuTracking", | |
| 562 | - value: function attachElementorHomeMenuTracking() { | |
| 563 | - var elementorHomeMenu = document.querySelector(ELEMENTOR_MENU_SELECTORS.ELEMENTOR_HOME_TOP_LEVEL); | |
| 564 | - if (!elementorHomeMenu) { | |
| 565 | - return; | |
| 566 | - } | |
| 567 | - this.attachMenuTracking(elementorHomeMenu, 'Elementor'); | |
| 568 | - } | |
| 569 | - }, { | |
| 570 | - key: "attachElementorMenuTracking", | |
| 571 | - value: function attachElementorMenuTracking() { | |
| 572 | - var elementorMenu = document.querySelector(ELEMENTOR_MENU_SELECTORS.ELEMENTOR_TOP_LEVEL); | |
| 573 | - if (!elementorMenu) { | |
| 574 | - return; | |
| 575 | - } | |
| 576 | - this.attachMenuTracking(elementorMenu, 'Elementor'); | |
| 577 | - } | |
| 578 | - }, { | |
| 579 | - key: "attachSidebarNavigationTracking", | |
| 580 | - value: function attachSidebarNavigationTracking() { | |
| 581 | - var sidebar = document.querySelector(ELEMENTOR_MENU_SELECTORS.SIDEBAR_NAVIGATION); | |
| 582 | - if (sidebar) { | |
| 583 | - this.attachSidebarClickListener(sidebar); | |
| 584 | - } | |
| 585 | - } | |
| 586 | - }, { | |
| 587 | - key: "attachSidebarClickListener", | |
| 588 | - value: function attachSidebarClickListener(sidebar) { | |
| 589 | - var _this = this; | |
| 590 | - this.addEventListenerTracked(sidebar, 'click', function (event) { | |
| 591 | - _this.handleSidebarClick(event); | |
| 592 | - }, { | |
| 593 | - capture: true | |
| 594 | - }); | |
| 595 | - } | |
| 596 | - }, { | |
| 597 | - key: "attachMenuTracking", | |
| 598 | - value: function attachMenuTracking(menuElement, menuName) { | |
| 599 | - var _this2 = this; | |
| 600 | - this.addEventListenerTracked(menuElement, 'click', function (event) { | |
| 601 | - _this2.handleMenuClick(event, menuName); | |
| 602 | - }); | |
| 603 | - } | |
| 604 | - }, { | |
| 605 | - key: "handleMenuClick", | |
| 606 | - value: function handleMenuClick(event, menuName) { | |
| 607 | - var link = event.target.closest('a'); | |
| 608 | - if (!link) { | |
| 609 | - return; | |
| 610 | - } | |
| 611 | - var isTopLevel = link.classList.contains('menu-top'); | |
| 612 | - var itemId = this.extractItemId(link); | |
| 613 | - var area = this.determineNavArea(link); | |
| 614 | - _wpDashboardTracking.default.trackNavClicked(itemId, isTopLevel ? null : menuName, area); | |
| 615 | - } | |
| 616 | - }, { | |
| 617 | - key: "handleSidebarClick", | |
| 618 | - value: function handleSidebarClick(event) { | |
| 619 | - var clickedElement = event.target.closest('a, button, [role="button"]'); | |
| 620 | - if (!clickedElement) { | |
| 621 | - return; | |
| 622 | - } | |
| 623 | - var itemId = this.extractSidebarItemId(clickedElement); | |
| 624 | - _wpDashboardTracking.default.trackNavClicked(itemId, null, _wpDashboardTracking.NAV_AREAS.SIDEBAR_MENU); | |
| 625 | - } | |
| 626 | - }, { | |
| 627 | - key: "extractSidebarItemId", | |
| 628 | - value: function extractSidebarItemId(element) { | |
| 629 | - var paragraph = element.querySelector('p'); | |
| 630 | - if (paragraph) { | |
| 631 | - return paragraph.textContent.trim(); | |
| 632 | - } | |
| 633 | - var textContent = element.textContent.trim(); | |
| 634 | - if (textContent) { | |
| 635 | - return textContent; | |
| 636 | - } | |
| 637 | - return 'unknown'; | |
| 638 | - } | |
| 639 | - }, { | |
| 640 | - key: "extractPageFromUrl", | |
| 641 | - value: function extractPageFromUrl(href) { | |
| 642 | - var urlParams = new URLSearchParams(href.split('?')[1] || ''); | |
| 643 | - var page = urlParams.get('page'); | |
| 644 | - if (page) { | |
| 645 | - return page; | |
| 646 | - } | |
| 647 | - var postType = urlParams.get('post_type'); | |
| 648 | - if (postType) { | |
| 649 | - return postType; | |
| 650 | - } | |
| 651 | - return 'unknown'; | |
| 652 | - } | |
| 653 | - }, { | |
| 654 | - key: "extractItemId", | |
| 655 | - value: function extractItemId(link) { | |
| 656 | - var textContent = link.textContent.trim(); | |
| 657 | - if (textContent) { | |
| 658 | - return textContent; | |
| 659 | - } | |
| 660 | - var href = link.getAttribute('href'); | |
| 661 | - if (href) { | |
| 662 | - return this.extractPageFromUrl(href); | |
| 663 | - } | |
| 664 | - var linkId = link.getAttribute('id'); | |
| 665 | - if (linkId) { | |
| 666 | - return linkId; | |
| 667 | - } | |
| 668 | - return 'unknown'; | |
| 669 | - } | |
| 670 | - }, { | |
| 671 | - key: "determineNavArea", | |
| 672 | - value: function determineNavArea(link) { | |
| 673 | - var parentMenu = link.closest('li.menu-top'); | |
| 674 | - if (parentMenu) { | |
| 675 | - var isSubmenuItem = link.closest(ELEMENTOR_MENU_SELECTORS.SUBMENU_CONTAINER); | |
| 676 | - if (isSubmenuItem) { | |
| 677 | - var submenuElement = link.closest(ELEMENTOR_MENU_SELECTORS.SUBMENU_ITEM_TOP_LEVEL); | |
| 678 | - if (submenuElement.classList.contains('wp-not-current-submenu')) { | |
| 679 | - return _wpDashboardTracking.NAV_AREAS.HOVER_MENU; | |
| 680 | - } | |
| 681 | - return _wpDashboardTracking.NAV_AREAS.SUBMENU; | |
| 682 | - } | |
| 683 | - return _wpDashboardTracking.NAV_AREAS.LEFT_MENU; | |
| 684 | - } | |
| 685 | - return _wpDashboardTracking.NAV_AREAS.LEFT_MENU; | |
| 686 | - } | |
| 687 | - }]); | |
| 688 | -}(_baseTracking.default); | |
| 689 | -var _default = exports["default"] = NavigationTracking; | |
| 690 | 126 | |
| 127 | + return _get.apply(this, arguments); | |
| 128 | +} | |
| 129 | + | |
| 130 | +module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 131 | + | |
| 691 | 132 | /***/ }), |
| 692 | 133 | |
| 693 | -/***/ "../app/assets/js/event-track/dashboard/plugin-actions.js": | |
| 134 | +/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 694 | 135 | /*!****************************************************************!*\ |
| 695 | - !*** ../app/assets/js/event-track/dashboard/plugin-actions.js ***! | |
| 136 | + !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 696 | 137 | \****************************************************************/ |
| 697 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 138 | +/***/ ((module) => { | |
| 698 | 139 | |
| 699 | -"use strict"; | |
| 140 | +function _getPrototypeOf(o) { | |
| 141 | + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { | |
| 142 | + return o.__proto__ || Object.getPrototypeOf(o); | |
| 143 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 144 | + return _getPrototypeOf(o); | |
| 145 | +} | |
| 700 | 146 | |
| 147 | +module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 701 | 148 | |
| 702 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 703 | -Object.defineProperty(exports, "__esModule", ({ | |
| 704 | - value: true | |
| 705 | -})); | |
| 706 | -exports["default"] = void 0; | |
| 707 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 708 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 709 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 710 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 711 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 712 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 713 | -var _wpDashboardTracking = _interopRequireDefault(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); | |
| 714 | -var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); | |
| 715 | -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)); } | |
| 716 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 717 | -var PLUGIN_TYPE = { | |
| 718 | - ELEMENTOR: 'core', | |
| 719 | - ELEMENTOR_PRO: 'pro' | |
| 720 | -}; | |
| 721 | -var PluginActions = /*#__PURE__*/function (_BaseTracking) { | |
| 722 | - function PluginActions() { | |
| 723 | - (0, _classCallCheck2.default)(this, PluginActions); | |
| 724 | - return _callSuper(this, PluginActions, arguments); | |
| 149 | +/***/ }), | |
| 150 | + | |
| 151 | +/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 152 | +/*!**********************************************************!*\ | |
| 153 | + !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 154 | + \**********************************************************/ | |
| 155 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 156 | + | |
| 157 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 158 | + | |
| 159 | +function _inherits(subClass, superClass) { | |
| 160 | + if (typeof superClass !== "function" && superClass !== null) { | |
| 161 | + throw new TypeError("Super expression must either be null or a function"); | |
| 725 | 162 | } |
| 726 | - (0, _inherits2.default)(PluginActions, _BaseTracking); | |
| 727 | - return (0, _createClass2.default)(PluginActions, null, [{ | |
| 728 | - key: "init", | |
| 729 | - value: function init() { | |
| 730 | - this.attachCoreDeactivationTracking(); | |
| 731 | - this.attachProDeactivationTracking(); | |
| 732 | - this.attachProDeletionTracking(); | |
| 163 | + | |
| 164 | + subClass.prototype = Object.create(superClass && superClass.prototype, { | |
| 165 | + constructor: { | |
| 166 | + value: subClass, | |
| 167 | + writable: true, | |
| 168 | + configurable: true | |
| 733 | 169 | } |
| 734 | - }, { | |
| 735 | - key: "attachCoreDeactivationTracking", | |
| 736 | - value: function attachCoreDeactivationTracking() { | |
| 737 | - var _this = this; | |
| 738 | - var dialogForm = document.querySelector('#elementor-deactivate-feedback-dialog-form'); | |
| 739 | - if (!dialogForm) { | |
| 740 | - return; | |
| 741 | - } | |
| 742 | - this.addEventListenerTracked(dialogForm, 'change', function (event) { | |
| 743 | - var target = event.target; | |
| 744 | - if (target.classList.contains('elementor-deactivate-feedback-dialog-input')) { | |
| 745 | - _this.selectedReason = target.value; | |
| 746 | - } | |
| 747 | - }); | |
| 748 | - this.observeModalButtons(); | |
| 170 | + }); | |
| 171 | + Object.defineProperty(subClass, "prototype", { | |
| 172 | + writable: false | |
| 173 | + }); | |
| 174 | + if (superClass) setPrototypeOf(subClass, superClass); | |
| 175 | +} | |
| 176 | + | |
| 177 | +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 178 | + | |
| 179 | +/***/ }), | |
| 180 | + | |
| 181 | +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 182 | +/*!***********************************************************************!*\ | |
| 183 | + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 184 | + \***********************************************************************/ | |
| 185 | +/***/ ((module) => { | |
| 186 | + | |
| 187 | +function _interopRequireDefault(obj) { | |
| 188 | + return obj && obj.__esModule ? obj : { | |
| 189 | + "default": obj | |
| 190 | + }; | |
| 191 | +} | |
| 192 | + | |
| 193 | +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 194 | + | |
| 195 | +/***/ }), | |
| 196 | + | |
| 197 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 198 | +/*!**********************************************************************!*\ | |
| 199 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 200 | + \**********************************************************************/ | |
| 201 | +/***/ ((module) => { | |
| 202 | + | |
| 203 | +function _iterableToArrayLimit(arr, i) { | |
| 204 | + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; | |
| 205 | + | |
| 206 | + if (_i == null) return; | |
| 207 | + var _arr = []; | |
| 208 | + var _n = true; | |
| 209 | + var _d = false; | |
| 210 | + | |
| 211 | + var _s, _e; | |
| 212 | + | |
| 213 | + try { | |
| 214 | + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { | |
| 215 | + _arr.push(_s.value); | |
| 216 | + | |
| 217 | + if (i && _arr.length === i) break; | |
| 749 | 218 | } |
| 750 | - }, { | |
| 751 | - key: "attachProDeactivationTracking", | |
| 752 | - value: function attachProDeactivationTracking() { | |
| 753 | - var _this2 = this; | |
| 754 | - var pluginsTable = document.querySelector('.plugins'); | |
| 755 | - if (!pluginsTable) { | |
| 756 | - return; | |
| 757 | - } | |
| 758 | - this.addEventListenerTracked(pluginsTable, 'click', function (event) { | |
| 759 | - var link = event.target.closest('a'); | |
| 760 | - if (link && 'deactivate-elementor-pro' === link.id) { | |
| 761 | - _this2.trackProDeactivation(); | |
| 762 | - } | |
| 763 | - }, { | |
| 764 | - capture: true | |
| 765 | - }); | |
| 219 | + } catch (err) { | |
| 220 | + _d = true; | |
| 221 | + _e = err; | |
| 222 | + } finally { | |
| 223 | + try { | |
| 224 | + if (!_n && _i["return"] != null) _i["return"](); | |
| 225 | + } finally { | |
| 226 | + if (_d) throw _e; | |
| 766 | 227 | } |
| 767 | - }, { | |
| 768 | - key: "observeModalButtons", | |
| 769 | - value: function observeModalButtons() { | |
| 770 | - var _this3 = this; | |
| 771 | - var checkAndAttachDelegation = function checkAndAttachDelegation() { | |
| 772 | - var modal = document.querySelector('#elementor-deactivate-feedback-modal'); | |
| 773 | - if (!modal) { | |
| 774 | - return false; | |
| 775 | - } | |
| 776 | - _this3.addEventListenerTracked(modal, 'click', function (event) { | |
| 777 | - var submitButton = event.target.closest('.dialog-submit'); | |
| 778 | - var skipButton = event.target.closest('.dialog-skip'); | |
| 779 | - if (submitButton) { | |
| 780 | - _this3.trackCoreDeactivation('submit&deactivate'); | |
| 781 | - } else if (skipButton) { | |
| 782 | - _this3.trackCoreDeactivation('skip&deactivate'); | |
| 783 | - } | |
| 784 | - }, { | |
| 785 | - capture: true | |
| 786 | - }); | |
| 787 | - return true; | |
| 788 | - }; | |
| 789 | - if (checkAndAttachDelegation()) { | |
| 790 | - return; | |
| 791 | - } | |
| 792 | - this.addObserver(document.body, { | |
| 793 | - childList: true, | |
| 794 | - subtree: true | |
| 795 | - }, function (mutations, observer) { | |
| 796 | - if (checkAndAttachDelegation()) { | |
| 797 | - observer.disconnect(); | |
| 798 | - } | |
| 799 | - }); | |
| 800 | - } | |
| 801 | - }, { | |
| 802 | - key: "getUserInput", | |
| 803 | - value: function getUserInput() { | |
| 804 | - var reasonsWithInput = ['found_a_better_plugin', 'other']; | |
| 805 | - if (!this.selectedReason || !reasonsWithInput.includes(this.selectedReason)) { | |
| 806 | - return null; | |
| 807 | - } | |
| 808 | - var inputField = document.querySelector("input[name=\"reason_".concat(this.selectedReason, "\"]")); | |
| 809 | - if (inputField && inputField.value) { | |
| 810 | - return inputField.value; | |
| 811 | - } | |
| 812 | - return null; | |
| 813 | - } | |
| 814 | - }, { | |
| 815 | - key: "trackCoreDeactivation", | |
| 816 | - value: function trackCoreDeactivation(action) { | |
| 817 | - var properties = { | |
| 818 | - deactivate_form_submit: action, | |
| 819 | - deactivate_plugin_type: PLUGIN_TYPE.ELEMENTOR | |
| 820 | - }; | |
| 821 | - if (this.selectedReason) { | |
| 822 | - properties.deactivate_feedback_reason = this.selectedReason; | |
| 823 | - } | |
| 824 | - var userInput = this.getUserInput(); | |
| 825 | - if (userInput) { | |
| 826 | - properties.deactivate_feedback_reason += "/".concat(userInput); | |
| 827 | - } | |
| 828 | - _wpDashboardTracking.default.dispatchEvent('wpdash_deactivate_plugin', properties, { | |
| 829 | - send_immediately: true | |
| 830 | - }); | |
| 831 | - } | |
| 832 | - }, { | |
| 833 | - key: "trackProDeactivation", | |
| 834 | - value: function trackProDeactivation() { | |
| 835 | - this.trackProAction('deactivate'); | |
| 836 | - } | |
| 837 | - }, { | |
| 838 | - key: "attachProDeletionTracking", | |
| 839 | - value: function attachProDeletionTracking() { | |
| 840 | - var _this4 = this; | |
| 841 | - if ('undefined' === typeof jQuery) { | |
| 842 | - return; | |
| 843 | - } | |
| 844 | - jQuery(document).on('wp-plugin-deleting', function (event, args) { | |
| 845 | - if ('elementor-pro' === (args === null || args === void 0 ? void 0 : args.slug)) { | |
| 846 | - _this4.trackProAction('delete'); | |
| 847 | - } | |
| 848 | - }); | |
| 849 | - } | |
| 850 | - }, { | |
| 851 | - key: "destroy", | |
| 852 | - value: function destroy() { | |
| 853 | - if ('undefined' !== typeof jQuery) { | |
| 854 | - jQuery(document).off('wp-plugin-deleting'); | |
| 855 | - } | |
| 856 | - _baseTracking.default.destroy.call(this); | |
| 857 | - } | |
| 858 | - }, { | |
| 859 | - key: "trackProAction", | |
| 860 | - value: function trackProAction(action) { | |
| 861 | - var eventMap = { | |
| 862 | - deactivate: { | |
| 863 | - eventName: 'wpdash_deactivate_plugin', | |
| 864 | - propertyKey: 'deactivate_plugin_type' | |
| 865 | - }, | |
| 866 | - delete: { | |
| 867 | - eventName: 'wpdash_delete_plugin', | |
| 868 | - propertyKey: 'plugin_delete' | |
| 869 | - } | |
| 870 | - }; | |
| 871 | - var config = eventMap[action]; | |
| 872 | - if (!config) { | |
| 873 | - return; | |
| 874 | - } | |
| 875 | - var properties = (0, _defineProperty2.default)({}, config.propertyKey, PLUGIN_TYPE.ELEMENTOR_PRO); | |
| 876 | - _wpDashboardTracking.default.dispatchEvent(config.eventName, properties, { | |
| 877 | - send_immediately: true | |
| 878 | - }); | |
| 879 | - } | |
| 880 | - }]); | |
| 881 | -}(_baseTracking.default); | |
| 882 | -(0, _defineProperty2.default)(PluginActions, "selectedReason", null); | |
| 883 | -var _default = exports["default"] = PluginActions; | |
| 228 | + } | |
| 884 | 229 | |
| 230 | + return _arr; | |
| 231 | +} | |
| 232 | + | |
| 233 | +module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 234 | + | |
| 885 | 235 | /***/ }), |
| 886 | 236 | |
| 887 | -/***/ "../app/assets/js/event-track/dashboard/promotion.js": | |
| 888 | -/*!***********************************************************!*\ | |
| 889 | - !*** ../app/assets/js/event-track/dashboard/promotion.js ***! | |
| 890 | - \***********************************************************/ | |
| 891 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 237 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 238 | +/*!*****************************************************************!*\ | |
| 239 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 240 | + \*****************************************************************/ | |
| 241 | +/***/ ((module) => { | |
| 892 | 242 | |
| 893 | -"use strict"; | |
| 243 | +function _nonIterableRest() { | |
| 244 | + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 245 | +} | |
| 894 | 246 | |
| 247 | +module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 895 | 248 | |
| 896 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 897 | -Object.defineProperty(exports, "__esModule", ({ | |
| 898 | - value: true | |
| 899 | -})); | |
| 900 | -exports["default"] = void 0; | |
| 901 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 902 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 903 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 904 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 905 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 906 | -var _wpDashboardTracking = _interopRequireDefault(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); | |
| 907 | -var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); | |
| 908 | -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)); } | |
| 909 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 910 | -var PROMO_SELECTORS = { | |
| 911 | - PROMO_PAGE: '.e-feature-promotion, .elementor-settings-form-page, #elementor-element-manager-wrap', | |
| 912 | - PROMO_BLANK_STATE: '.elementor-blank_state', | |
| 913 | - CTA_BUTTON: '.go-pro', | |
| 914 | - TITLE: 'h3' | |
| 915 | -}; | |
| 916 | -var PromotionTracking = /*#__PURE__*/function (_BaseTracking) { | |
| 917 | - function PromotionTracking() { | |
| 918 | - (0, _classCallCheck2.default)(this, PromotionTracking); | |
| 919 | - return _callSuper(this, PromotionTracking, arguments); | |
| 249 | +/***/ }), | |
| 250 | + | |
| 251 | +/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 252 | +/*!***************************************************************************!*\ | |
| 253 | + !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 254 | + \***************************************************************************/ | |
| 255 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 256 | + | |
| 257 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 258 | + | |
| 259 | +var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 260 | + | |
| 261 | +function _possibleConstructorReturn(self, call) { | |
| 262 | + if (call && (_typeof(call) === "object" || typeof call === "function")) { | |
| 263 | + return call; | |
| 264 | + } else if (call !== void 0) { | |
| 265 | + throw new TypeError("Derived constructors may only return object or undefined"); | |
| 920 | 266 | } |
| 921 | - (0, _inherits2.default)(PromotionTracking, _BaseTracking); | |
| 922 | - return (0, _createClass2.default)(PromotionTracking, null, [{ | |
| 923 | - key: "init", | |
| 924 | - value: function init() { | |
| 925 | - this.attachDelegatedTracking(); | |
| 926 | - } | |
| 927 | - }, { | |
| 928 | - key: "attachDelegatedTracking", | |
| 929 | - value: function attachDelegatedTracking() { | |
| 930 | - var _this = this; | |
| 931 | - this.addEventListenerTracked(document, 'click', function (event) { | |
| 932 | - var target = event.target; | |
| 933 | - if (!target) { | |
| 934 | - return; | |
| 935 | - } | |
| 936 | - var button = target.closest("a".concat(PROMO_SELECTORS.CTA_BUTTON)); | |
| 937 | - if (!button) { | |
| 938 | - return; | |
| 939 | - } | |
| 940 | - var promoPage = button.closest("".concat(PROMO_SELECTORS.PROMO_PAGE, ", ").concat(PROMO_SELECTORS.PROMO_BLANK_STATE)); | |
| 941 | - if (!promoPage) { | |
| 942 | - return; | |
| 943 | - } | |
| 944 | - _this.handlePromoClick(button, promoPage); | |
| 945 | - }, { | |
| 946 | - capture: true | |
| 947 | - }); | |
| 948 | - } | |
| 949 | - }, { | |
| 950 | - key: "handlePromoClick", | |
| 951 | - value: function handlePromoClick(button, promoPage) { | |
| 952 | - var promoTitle = this.extractPromoTitle(promoPage, button); | |
| 953 | - var destination = button.getAttribute('href'); | |
| 954 | - var path = this.extractPromoPath(); | |
| 955 | - _wpDashboardTracking.default.trackPromoClicked(promoTitle, destination, path); | |
| 956 | - } | |
| 957 | - }, { | |
| 958 | - key: "extractPromoTitle", | |
| 959 | - value: function extractPromoTitle(promoPage, button) { | |
| 960 | - var titleElement = promoPage.querySelector(PROMO_SELECTORS.TITLE); | |
| 961 | - return titleElement ? titleElement.textContent.trim() : button.textContent.trim(); | |
| 962 | - } | |
| 963 | - }, { | |
| 964 | - key: "extractPromoPath", | |
| 965 | - value: function extractPromoPath() { | |
| 966 | - var urlParams = new URLSearchParams(window.location.search); | |
| 967 | - var page = urlParams.get('page'); | |
| 968 | - if (!page) { | |
| 969 | - return 'elementor'; | |
| 970 | - } | |
| 971 | - return page.replace('elementor_', '').replace(/_/g, '/'); | |
| 972 | - } | |
| 973 | - }]); | |
| 974 | -}(_baseTracking.default); | |
| 975 | -var _default = exports["default"] = PromotionTracking; | |
| 976 | 267 | |
| 268 | + return assertThisInitialized(self); | |
| 269 | +} | |
| 270 | + | |
| 271 | +module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 272 | + | |
| 977 | 273 | /***/ }), |
| 978 | 274 | |
| 979 | -/***/ "../app/assets/js/event-track/dashboard/screen-view.js": | |
| 980 | -/*!*************************************************************!*\ | |
| 981 | - !*** ../app/assets/js/event-track/dashboard/screen-view.js ***! | |
| 982 | - \*************************************************************/ | |
| 983 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 275 | +/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 276 | +/*!****************************************************************!*\ | |
| 277 | + !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 278 | + \****************************************************************/ | |
| 279 | +/***/ ((module) => { | |
| 984 | 280 | |
| 985 | -"use strict"; | |
| 281 | +function _setPrototypeOf(o, p) { | |
| 282 | + module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { | |
| 283 | + o.__proto__ = p; | |
| 284 | + return o; | |
| 285 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 286 | + return _setPrototypeOf(o, p); | |
| 287 | +} | |
| 986 | 288 | |
| 289 | +module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 987 | 290 | |
| 988 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 989 | -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 990 | -Object.defineProperty(exports, "__esModule", ({ | |
| 991 | - value: true | |
| 992 | -})); | |
| 993 | -exports["default"] = void 0; | |
| 994 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 995 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 996 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 997 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 998 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 999 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1000 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1001 | -var _wpDashboardTracking = _interopRequireWildcard(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); | |
| 1002 | -var _utils = __webpack_require__(/*! ./utils */ "../app/assets/js/event-track/dashboard/utils.js"); | |
| 1003 | -var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); | |
| 1004 | -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 _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 1005 | -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } | |
| 1006 | -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } | |
| 1007 | -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } | |
| 1008 | -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)); } | |
| 1009 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1010 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 1011 | -var SCREEN_SELECTORS = { | |
| 1012 | - NAV_TAB_WRAPPER: '.nav-tab-wrapper', | |
| 1013 | - NAV_TAB: '.nav-tab', | |
| 1014 | - NAV_TAB_ACTIVE: '.nav-tab-active', | |
| 1015 | - SETTINGS_FORM_PAGE: '.elementor-settings-form-page', | |
| 1016 | - SETTINGS_FORM_PAGE_ACTIVE: '.elementor-settings-form-page.elementor-active', | |
| 1017 | - FLOATING_ELEMENTS_MODAL: '#elementor-new-floating-elements-modal', | |
| 1018 | - TEMPLATE_DIALOG_MODAL: '#elementor-new-template-dialog-content' | |
| 1019 | -}; | |
| 1020 | -var TRACKED_MODALS = [SCREEN_SELECTORS.FLOATING_ELEMENTS_MODAL, SCREEN_SELECTORS.TEMPLATE_DIALOG_MODAL]; | |
| 1021 | -var ScreenViewTracking = /*#__PURE__*/function (_BaseTracking) { | |
| 1022 | - function ScreenViewTracking() { | |
| 1023 | - (0, _classCallCheck2.default)(this, ScreenViewTracking); | |
| 1024 | - return _callSuper(this, ScreenViewTracking, arguments); | |
| 291 | +/***/ }), | |
| 292 | + | |
| 293 | +/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 294 | +/*!***************************************************************!*\ | |
| 295 | + !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 296 | + \***************************************************************/ | |
| 297 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 298 | + | |
| 299 | +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 300 | + | |
| 301 | +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 302 | + | |
| 303 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 304 | + | |
| 305 | +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 306 | + | |
| 307 | +function _slicedToArray(arr, i) { | |
| 308 | + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); | |
| 309 | +} | |
| 310 | + | |
| 311 | +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 312 | + | |
| 313 | +/***/ }), | |
| 314 | + | |
| 315 | +/***/ "../node_modules/@babel/runtime/helpers/superPropBase.js": | |
| 316 | +/*!***************************************************************!*\ | |
| 317 | + !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***! | |
| 318 | + \***************************************************************/ | |
| 319 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 320 | + | |
| 321 | +var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); | |
| 322 | + | |
| 323 | +function _superPropBase(object, property) { | |
| 324 | + while (!Object.prototype.hasOwnProperty.call(object, property)) { | |
| 325 | + object = getPrototypeOf(object); | |
| 326 | + if (object === null) break; | |
| 1025 | 327 | } |
| 1026 | - (0, _inherits2.default)(ScreenViewTracking, _BaseTracking); | |
| 1027 | - return (0, _createClass2.default)(ScreenViewTracking, null, [{ | |
| 1028 | - key: "init", | |
| 1029 | - value: function init() { | |
| 1030 | - if (!_utils.DashboardUtils.isElementorPage()) { | |
| 1031 | - return; | |
| 1032 | - } | |
| 1033 | - this.attachTabChangeTracking(); | |
| 1034 | - } | |
| 1035 | - }, { | |
| 1036 | - key: "destroy", | |
| 1037 | - value: function destroy() { | |
| 1038 | - _superPropGet(ScreenViewTracking, "destroy", this, 2)([]); | |
| 1039 | - this.trackedScreens.clear(); | |
| 1040 | - } | |
| 1041 | - }, { | |
| 1042 | - key: "getScreenData", | |
| 1043 | - value: function getScreenData() { | |
| 1044 | - var urlParams = new URLSearchParams(window.location.search); | |
| 1045 | - var page = urlParams.get('page'); | |
| 1046 | - var postType = urlParams.get('post_type'); | |
| 1047 | - var hash = window.location.hash; | |
| 1048 | - var screenId = ''; | |
| 1049 | - var screenType = ''; | |
| 1050 | - if (page) { | |
| 1051 | - screenId = page; | |
| 1052 | - } else if (postType) { | |
| 1053 | - screenId = postType; | |
| 1054 | - } else { | |
| 1055 | - screenId = this.getScreenIdFromBody(); | |
| 1056 | - } | |
| 1057 | - if (this.isElementorAppPage()) { | |
| 1058 | - var appScreenData = this.getAppScreenData(hash); | |
| 1059 | - if (appScreenData) { | |
| 1060 | - return appScreenData; | |
| 1061 | - } | |
| 1062 | - } | |
| 1063 | - var hasNavTabs = document.querySelector(SCREEN_SELECTORS.NAV_TAB_WRAPPER); | |
| 1064 | - var hasSettingsTabs = document.querySelectorAll(SCREEN_SELECTORS.SETTINGS_FORM_PAGE).length > 1; | |
| 1065 | - if (hasNavTabs || hasSettingsTabs || hash && !this.isElementorAppPage()) { | |
| 1066 | - screenType = _wpDashboardTracking.SCREEN_TYPES.TAB; | |
| 1067 | - if (hash) { | |
| 1068 | - var tabId = hash.replace(/^#(tab-)?/, ''); | |
| 1069 | - screenId = "".concat(screenId, "-").concat(tabId); | |
| 1070 | - } else if (hasNavTabs) { | |
| 1071 | - var activeTab = document.querySelector(SCREEN_SELECTORS.NAV_TAB_ACTIVE); | |
| 1072 | - if (activeTab) { | |
| 1073 | - var tabText = activeTab.textContent.trim(); | |
| 1074 | - var tabHref = activeTab.getAttribute('href'); | |
| 1075 | - if (tabText) { | |
| 1076 | - screenId = "".concat(screenId, "-").concat(this.sanitizeScreenId(tabText)); | |
| 1077 | - } else if (tabHref && tabHref.includes('#')) { | |
| 1078 | - var _tabId = tabHref.split('#')[1]; | |
| 1079 | - screenId = "".concat(screenId, "-").concat(_tabId); | |
| 1080 | - } | |
| 1081 | - } | |
| 1082 | - } else if (hasSettingsTabs) { | |
| 1083 | - var activeSettingsTab = document.querySelector(SCREEN_SELECTORS.SETTINGS_FORM_PAGE_ACTIVE); | |
| 1084 | - if (activeSettingsTab) { | |
| 1085 | - var _tabId2 = activeSettingsTab.id; | |
| 1086 | - if (_tabId2) { | |
| 1087 | - screenId = "".concat(screenId, "-").concat(_tabId2); | |
| 1088 | - } | |
| 1089 | - } | |
| 1090 | - } | |
| 1091 | - } | |
| 1092 | - return { | |
| 1093 | - screenId: screenId, | |
| 1094 | - screenType: screenType | |
| 1095 | - }; | |
| 1096 | - } | |
| 1097 | - }, { | |
| 1098 | - key: "isElementorAppPage", | |
| 1099 | - value: function isElementorAppPage() { | |
| 1100 | - var urlParams = new URLSearchParams(window.location.search); | |
| 1101 | - return 'elementor-app' === urlParams.get('page'); | |
| 1102 | - } | |
| 1103 | - }, { | |
| 1104 | - key: "getAppScreenData", | |
| 1105 | - value: function getAppScreenData(hash) { | |
| 1106 | - if (!hash) { | |
| 1107 | - return null; | |
| 1108 | - } | |
| 1109 | - var cleanHash = hash.replace(/^#/, ''); | |
| 1110 | - if (!cleanHash.startsWith('/')) { | |
| 1111 | - return null; | |
| 1112 | - } | |
| 1113 | - var pathParts = cleanHash.split('/').filter(Boolean); | |
| 1114 | - if (0 === pathParts.length) { | |
| 1115 | - return null; | |
| 1116 | - } | |
| 1117 | - var screenId = pathParts.join('/'); | |
| 1118 | - var screenType = _wpDashboardTracking.SCREEN_TYPES.APP_SCREEN; | |
| 1119 | - return { | |
| 1120 | - screenId: screenId, | |
| 1121 | - screenType: screenType | |
| 1122 | - }; | |
| 1123 | - } | |
| 1124 | - }, { | |
| 1125 | - key: "getScreenIdFromBody", | |
| 1126 | - value: function getScreenIdFromBody() { | |
| 1127 | - var body = document.body; | |
| 1128 | - var bodyClasses = body.className.split(' '); | |
| 1129 | - var _iterator = _createForOfIteratorHelper(bodyClasses), | |
| 1130 | - _step; | |
| 1131 | - try { | |
| 1132 | - for (_iterator.s(); !(_step = _iterator.n()).done;) { | |
| 1133 | - var cls = _step.value; | |
| 1134 | - if (cls.startsWith('elementor') && (cls.includes('page') || cls.includes('post-type'))) { | |
| 1135 | - return cls; | |
| 1136 | - } | |
| 1137 | - } | |
| 1138 | - } catch (err) { | |
| 1139 | - _iterator.e(err); | |
| 1140 | - } finally { | |
| 1141 | - _iterator.f(); | |
| 1142 | - } | |
| 1143 | - return 'elementor-unknown'; | |
| 1144 | - } | |
| 1145 | - }, { | |
| 1146 | - key: "sanitizeScreenId", | |
| 1147 | - value: function sanitizeScreenId(text) { | |
| 1148 | - return text.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, ''); | |
| 1149 | - } | |
| 1150 | - }, { | |
| 1151 | - key: "attachTabChangeTracking", | |
| 1152 | - value: function attachTabChangeTracking() { | |
| 1153 | - this.attachNavTabTracking(); | |
| 1154 | - this.attachHashChangeTracking(); | |
| 1155 | - this.attachSettingsTabTracking(); | |
| 1156 | - this.attachModalTracking(); | |
| 1157 | - } | |
| 1158 | - }, { | |
| 1159 | - key: "attachNavTabTracking", | |
| 1160 | - value: function attachNavTabTracking() { | |
| 1161 | - var _this = this; | |
| 1162 | - var wrapper = document.querySelector(SCREEN_SELECTORS.NAV_TAB_WRAPPER); | |
| 1163 | - if (!wrapper) { | |
| 1164 | - return; | |
| 1165 | - } | |
| 1166 | - this.addEventListenerTracked(wrapper, 'click', function (event) { | |
| 1167 | - var navTab = event.target.closest(SCREEN_SELECTORS.NAV_TAB); | |
| 1168 | - if (navTab && !navTab.classList.contains('nav-tab-active')) { | |
| 1169 | - var screenData = _this.getScreenData(); | |
| 1170 | - if (screenData) { | |
| 1171 | - _this.trackScreen(screenData.screenId, screenData.screenType); | |
| 1172 | - } | |
| 1173 | - } | |
| 1174 | - }); | |
| 1175 | - } | |
| 1176 | - }, { | |
| 1177 | - key: "attachHashChangeTracking", | |
| 1178 | - value: function attachHashChangeTracking() { | |
| 1179 | - var _this2 = this; | |
| 1180 | - this.addEventListenerTracked(window, 'hashchange', function () { | |
| 1181 | - var screenData = _this2.getScreenData(); | |
| 1182 | - if (screenData) { | |
| 1183 | - _this2.trackScreen(screenData.screenId, screenData.screenType); | |
| 1184 | - } | |
| 1185 | - }); | |
| 1186 | - } | |
| 1187 | - }, { | |
| 1188 | - key: "attachSettingsTabTracking", | |
| 1189 | - value: function attachSettingsTabTracking() { | |
| 1190 | - var _this3 = this; | |
| 1191 | - var settingsPages = document.querySelectorAll(SCREEN_SELECTORS.SETTINGS_FORM_PAGE); | |
| 1192 | - if (0 === settingsPages.length) { | |
| 1193 | - return; | |
| 1194 | - } | |
| 1195 | - settingsPages.forEach(function (page) { | |
| 1196 | - _this3.addObserver(page, { | |
| 1197 | - attributes: true, | |
| 1198 | - attributeFilter: ['class'] | |
| 1199 | - }, function () { | |
| 1200 | - var screenData = _this3.getScreenData(); | |
| 1201 | - if (screenData) { | |
| 1202 | - _this3.trackScreen(screenData.screenId, screenData.screenType); | |
| 1203 | - } | |
| 1204 | - }); | |
| 1205 | - }); | |
| 1206 | - } | |
| 1207 | - }, { | |
| 1208 | - key: "attachModalTracking", | |
| 1209 | - value: function attachModalTracking() { | |
| 1210 | - var _this4 = this; | |
| 1211 | - this.addObserver(document.body, { | |
| 1212 | - childList: true, | |
| 1213 | - subtree: true | |
| 1214 | - }, function (mutations) { | |
| 1215 | - var _iterator2 = _createForOfIteratorHelper(mutations), | |
| 1216 | - _step2; | |
| 1217 | - try { | |
| 1218 | - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { | |
| 1219 | - var mutation = _step2.value; | |
| 1220 | - if ('childList' === mutation.type) { | |
| 1221 | - TRACKED_MODALS.forEach(function (modalSelector) { | |
| 1222 | - var modal = document.querySelector(modalSelector); | |
| 1223 | - if (modal && _this4.isModalVisible(modal)) { | |
| 1224 | - var modalId = modalSelector.replace('#', ''); | |
| 1225 | - _this4.trackScreen(modalId, _wpDashboardTracking.SCREEN_TYPES.POPUP); | |
| 1226 | - } | |
| 1227 | - }); | |
| 1228 | - } | |
| 1229 | - } | |
| 1230 | - } catch (err) { | |
| 1231 | - _iterator2.e(err); | |
| 1232 | - } finally { | |
| 1233 | - _iterator2.f(); | |
| 1234 | - } | |
| 1235 | - }); | |
| 1236 | - } | |
| 1237 | - }, { | |
| 1238 | - key: "isModalVisible", | |
| 1239 | - value: function isModalVisible(element) { | |
| 1240 | - if (!element) { | |
| 1241 | - return false; | |
| 1242 | - } | |
| 1243 | - var style = window.getComputedStyle(element); | |
| 1244 | - return 'none' !== style.display && 0 !== parseFloat(style.opacity); | |
| 1245 | - } | |
| 1246 | - }, { | |
| 1247 | - key: "trackScreen", | |
| 1248 | - value: function trackScreen(screenId) { | |
| 1249 | - var screenType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _wpDashboardTracking.SCREEN_TYPES.TOP_LEVEL_PAGE; | |
| 1250 | - var trackingKey = "".concat(screenId, "-").concat(screenType); | |
| 1251 | - if (this.trackedScreens.has(trackingKey)) { | |
| 1252 | - return; | |
| 1253 | - } | |
| 1254 | - this.trackedScreens.add(trackingKey); | |
| 1255 | - _wpDashboardTracking.default.trackScreenViewed(screenId, screenType); | |
| 1256 | - } | |
| 1257 | - }]); | |
| 1258 | -}(_baseTracking.default); | |
| 1259 | -(0, _defineProperty2.default)(ScreenViewTracking, "trackedScreens", new Set()); | |
| 1260 | -var _default = exports["default"] = ScreenViewTracking; | |
| 1261 | 328 | |
| 329 | + return object; | |
| 330 | +} | |
| 331 | + | |
| 332 | +module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 333 | + | |
| 1262 | 334 | /***/ }), |
| 1263 | 335 | |
| 1264 | -/***/ "../app/assets/js/event-track/dashboard/utils.js": | |
| 1265 | -/*!*******************************************************!*\ | |
| 1266 | - !*** ../app/assets/js/event-track/dashboard/utils.js ***! | |
| 1267 | - \*******************************************************/ | |
| 1268 | -/***/ ((__unused_webpack_module, exports) => { | |
| 336 | +/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 337 | +/*!********************************************************!*\ | |
| 338 | + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 339 | + \********************************************************/ | |
| 340 | +/***/ ((module) => { | |
| 1269 | 341 | |
| 1270 | -"use strict"; | |
| 342 | +function _typeof(obj) { | |
| 343 | + "@babel/helpers - typeof"; | |
| 1271 | 344 | |
| 345 | + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { | |
| 346 | + return typeof obj; | |
| 347 | + } : function (obj) { | |
| 348 | + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; | |
| 349 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); | |
| 350 | +} | |
| 1272 | 351 | |
| 1273 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1274 | - value: true | |
| 1275 | -})); | |
| 1276 | -exports.DashboardUtils = void 0; | |
| 1277 | -var DashboardUtils = exports.DashboardUtils = { | |
| 1278 | - isElementorPage: function isElementorPage() { | |
| 1279 | - var urlParams = new URLSearchParams(window.location.search); | |
| 1280 | - var page = urlParams.get('page'); | |
| 1281 | - if (page && (page.startsWith('elementor') || page.includes('elementor'))) { | |
| 1282 | - return true; | |
| 1283 | - } | |
| 1284 | - var postType = urlParams.get('post_type'); | |
| 1285 | - if ('elementor_library' === postType || 'e-floating-buttons' === postType) { | |
| 1286 | - return true; | |
| 1287 | - } | |
| 1288 | - var body = document.body; | |
| 1289 | - var bodyClasses = body.className.split(' '); | |
| 1290 | - return bodyClasses.some(function (cls) { | |
| 1291 | - return cls.includes('elementor') && (cls.includes('page') || cls.includes('post-type')); | |
| 1292 | - }); | |
| 1293 | - } | |
| 1294 | -}; | |
| 352 | +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1295 | 353 | |
| 1296 | 354 | /***/ }), |
| 1297 | 355 | |
| 1298 | -/***/ "../app/assets/js/event-track/wp-dashboard-tracking.js": | |
| 1299 | -/*!*************************************************************!*\ | |
| 1300 | - !*** ../app/assets/js/event-track/wp-dashboard-tracking.js ***! | |
| 1301 | - \*************************************************************/ | |
| 1302 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 356 | +/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 357 | +/*!****************************************************************************!*\ | |
| 358 | + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 359 | + \****************************************************************************/ | |
| 360 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1303 | 361 | |
| 1304 | -"use strict"; | |
| 362 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 1305 | 363 | |
| 364 | +function _unsupportedIterableToArray(o, minLen) { | |
| 365 | + if (!o) return; | |
| 366 | + if (typeof o === "string") return arrayLikeToArray(o, minLen); | |
| 367 | + var n = Object.prototype.toString.call(o).slice(8, -1); | |
| 368 | + if (n === "Object" && o.constructor) n = o.constructor.name; | |
| 369 | + if (n === "Map" || n === "Set") return Array.from(o); | |
| 370 | + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); | |
| 371 | +} | |
| 1306 | 372 | |
| 1307 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1308 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1309 | - value: true | |
| 1310 | -})); | |
| 1311 | -exports["default"] = exports.SCREEN_TYPES = exports.NAV_AREAS = exports.CONTROL_TYPES = void 0; | |
| 1312 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1313 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1314 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1315 | -var _navigation = _interopRequireDefault(__webpack_require__(/*! ./dashboard/navigation */ "../app/assets/js/event-track/dashboard/navigation.js")); | |
| 1316 | -var _pluginActions = _interopRequireDefault(__webpack_require__(/*! ./dashboard/plugin-actions */ "../app/assets/js/event-track/dashboard/plugin-actions.js")); | |
| 1317 | -var _promotion = _interopRequireDefault(__webpack_require__(/*! ./dashboard/promotion */ "../app/assets/js/event-track/dashboard/promotion.js")); | |
| 1318 | -var _screenView = _interopRequireDefault(__webpack_require__(/*! ./dashboard/screen-view */ "../app/assets/js/event-track/dashboard/screen-view.js")); | |
| 1319 | -var _menuPromotion = _interopRequireDefault(__webpack_require__(/*! ./dashboard/menu-promotion */ "../app/assets/js/event-track/dashboard/menu-promotion.js")); | |
| 1320 | -var _actionControls = _interopRequireDefault(__webpack_require__(/*! ./dashboard/action-controls */ "../app/assets/js/event-track/dashboard/action-controls.js")); | |
| 1321 | -var SESSION_TIMEOUT_MINUTES = 30; | |
| 1322 | -var MINUTE_MS = 60 * 1000; | |
| 1323 | -var SESSION_TIMEOUT = SESSION_TIMEOUT_MINUTES * MINUTE_MS; | |
| 1324 | -var ACTIVITY_CHECK_INTERVAL = 1 * MINUTE_MS; | |
| 1325 | -var SESSION_STORAGE_KEY = 'elementor_wpdash_session'; | |
| 1326 | -var PENDING_NAV_CLICK_KEY = 'elementor_wpdash_pending_nav'; | |
| 1327 | -var CONTROL_TYPES = exports.CONTROL_TYPES = { | |
| 1328 | - BUTTON: 'button', | |
| 1329 | - CHECKBOX: 'checkbox', | |
| 1330 | - RADIO: 'radio', | |
| 1331 | - LINK: 'link', | |
| 1332 | - SELECT: 'select', | |
| 1333 | - TOGGLE: 'toggle', | |
| 1334 | - FILTER: 'filter' | |
| 1335 | -}; | |
| 1336 | -var NAV_AREAS = exports.NAV_AREAS = { | |
| 1337 | - LEFT_MENU: 'left_menu', | |
| 1338 | - SUBMENU: 'submenu', | |
| 1339 | - HOVER_MENU: 'hover_menu', | |
| 1340 | - TOP_BAR: 'top_bar', | |
| 1341 | - SIDEBAR_MENU: 'sidebar' | |
| 1342 | -}; | |
| 1343 | -var SCREEN_TYPES = exports.SCREEN_TYPES = { | |
| 1344 | - TAB: 'tab', | |
| 1345 | - POPUP: 'popup', | |
| 1346 | - APP_SCREEN: 'app_screen' | |
| 1347 | -}; | |
| 1348 | -var WpDashboardTracking = exports["default"] = /*#__PURE__*/function () { | |
| 1349 | - function WpDashboardTracking() { | |
| 1350 | - (0, _classCallCheck2.default)(this, WpDashboardTracking); | |
| 1351 | - } | |
| 1352 | - return (0, _createClass2.default)(WpDashboardTracking, null, [{ | |
| 1353 | - key: "getElementorCommon", | |
| 1354 | - value: function getElementorCommon() { | |
| 1355 | - return window.elementorCommon; | |
| 1356 | - } | |
| 1357 | - }, { | |
| 1358 | - key: "init", | |
| 1359 | - value: function init() { | |
| 1360 | - if (this.initialized) { | |
| 1361 | - return; | |
| 1362 | - } | |
| 1363 | - this.restoreOrCreateSession(); | |
| 1364 | - if (this.isEventsManagerAvailable()) { | |
| 1365 | - this.startSessionMonitoring(); | |
| 1366 | - this.attachActivityListeners(); | |
| 1367 | - this.attachNavigationListener(); | |
| 1368 | - this.initialized = true; | |
| 1369 | - } | |
| 1370 | - } | |
| 1371 | - }, { | |
| 1372 | - key: "restoreOrCreateSession", | |
| 1373 | - value: function restoreOrCreateSession() { | |
| 1374 | - var storedSession = this.getStoredSession(); | |
| 1375 | - if (storedSession) { | |
| 1376 | - this.sessionStartTime = storedSession.sessionStartTime; | |
| 1377 | - this.navItemsVisited = new Set(storedSession.navItemsVisited); | |
| 1378 | - this.lastActivityTime = Date.now(); | |
| 1379 | - this.sessionEnded = false; | |
| 1380 | - } else { | |
| 1381 | - this.sessionStartTime = Date.now(); | |
| 1382 | - this.lastActivityTime = Date.now(); | |
| 1383 | - this.sessionEnded = false; | |
| 1384 | - this.navItemsVisited = new Set(); | |
| 1385 | - } | |
| 1386 | - this.processPendingNavClick(); | |
| 1387 | - this.saveSessionToStorage(); | |
| 1388 | - } | |
| 1389 | - }, { | |
| 1390 | - key: "isEditorOneActive", | |
| 1391 | - value: function isEditorOneActive() { | |
| 1392 | - var _elementorCommon$conf, _elementorCommon$conf2; | |
| 1393 | - var elementorCommon = this.getElementorCommon(); | |
| 1394 | - return (_elementorCommon$conf = elementorCommon === null || elementorCommon === void 0 || (_elementorCommon$conf2 = elementorCommon.config) === null || _elementorCommon$conf2 === void 0 || (_elementorCommon$conf2 = _elementorCommon$conf2.editor_events) === null || _elementorCommon$conf2 === void 0 ? void 0 : _elementorCommon$conf2.isEditorOneActive) !== null && _elementorCommon$conf !== void 0 ? _elementorCommon$conf : false; | |
| 1395 | - } | |
| 1396 | - }, { | |
| 1397 | - key: "processPendingNavClick", | |
| 1398 | - value: function processPendingNavClick() { | |
| 1399 | - try { | |
| 1400 | - var pendingNav = sessionStorage.getItem(PENDING_NAV_CLICK_KEY); | |
| 1401 | - if (pendingNav) { | |
| 1402 | - var _JSON$parse = JSON.parse(pendingNav), | |
| 1403 | - itemId = _JSON$parse.itemId, | |
| 1404 | - rootItem = _JSON$parse.rootItem, | |
| 1405 | - area = _JSON$parse.area; | |
| 1406 | - this.navItemsVisited.add(itemId); | |
| 1407 | - var properties = { | |
| 1408 | - wpdash_nav_item_id: itemId, | |
| 1409 | - wpdash_nav_area: area | |
| 1410 | - }; | |
| 1411 | - if (rootItem) { | |
| 1412 | - properties.wpdash_nav_item_root = rootItem; | |
| 1413 | - } | |
| 1414 | - this.dispatchEvent('wpdash_nav_clicked', properties, { | |
| 1415 | - send_immediately: true | |
| 1416 | - }); | |
| 1417 | - sessionStorage.removeItem(PENDING_NAV_CLICK_KEY); | |
| 1418 | - } | |
| 1419 | - } catch (error) { | |
| 1420 | - sessionStorage.removeItem(PENDING_NAV_CLICK_KEY); | |
| 1421 | - } | |
| 1422 | - } | |
| 1423 | - }, { | |
| 1424 | - key: "getStoredSession", | |
| 1425 | - value: function getStoredSession() { | |
| 1426 | - try { | |
| 1427 | - var stored = sessionStorage.getItem(SESSION_STORAGE_KEY); | |
| 1428 | - return stored ? JSON.parse(stored) : null; | |
| 1429 | - } catch (error) { | |
| 1430 | - return null; | |
| 1431 | - } | |
| 1432 | - } | |
| 1433 | - }, { | |
| 1434 | - key: "saveSessionToStorage", | |
| 1435 | - value: function saveSessionToStorage() { | |
| 1436 | - var sessionData = { | |
| 1437 | - sessionStartTime: this.sessionStartTime, | |
| 1438 | - navItemsVisited: Array.from(this.navItemsVisited) | |
| 1439 | - }; | |
| 1440 | - sessionStorage.setItem(SESSION_STORAGE_KEY, JSON.stringify(sessionData)); | |
| 1441 | - } | |
| 1442 | - }, { | |
| 1443 | - key: "clearStoredSession", | |
| 1444 | - value: function clearStoredSession() { | |
| 1445 | - sessionStorage.removeItem(SESSION_STORAGE_KEY); | |
| 1446 | - } | |
| 1447 | - }, { | |
| 1448 | - key: "isEventsManagerAvailable", | |
| 1449 | - value: function isEventsManagerAvailable() { | |
| 1450 | - var elementorCommon = this.getElementorCommon(); | |
| 1451 | - return (elementorCommon === null || elementorCommon === void 0 ? void 0 : elementorCommon.eventsManager) && 'function' === typeof elementorCommon.eventsManager.dispatchEvent; | |
| 1452 | - } | |
| 1453 | - }, { | |
| 1454 | - key: "canSendEvents", | |
| 1455 | - value: function canSendEvents() { | |
| 1456 | - var _elementorCommon$conf3, _elementorCommon$conf4; | |
| 1457 | - var elementorCommon = this.getElementorCommon(); | |
| 1458 | - return (_elementorCommon$conf3 = elementorCommon === null || elementorCommon === void 0 || (_elementorCommon$conf4 = elementorCommon.config) === null || _elementorCommon$conf4 === void 0 || (_elementorCommon$conf4 = _elementorCommon$conf4.editor_events) === null || _elementorCommon$conf4 === void 0 ? void 0 : _elementorCommon$conf4.can_send_events) !== null && _elementorCommon$conf3 !== void 0 ? _elementorCommon$conf3 : false; | |
| 1459 | - } | |
| 1460 | - }, { | |
| 1461 | - key: "dispatchEvent", | |
| 1462 | - value: function dispatchEvent(eventName) { | |
| 1463 | - var _elementorCommon$even; | |
| 1464 | - var properties = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | |
| 1465 | - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | |
| 1466 | - if (!this.isEventsManagerAvailable() || !this.canSendEvents()) { | |
| 1467 | - return; | |
| 1468 | - } | |
| 1469 | - var elementorCommon = this.getElementorCommon(); | |
| 1470 | - elementorCommon === null || elementorCommon === void 0 || (_elementorCommon$even = elementorCommon.eventsManager) === null || _elementorCommon$even === void 0 || _elementorCommon$even.dispatchEvent(eventName, properties, options); | |
| 1471 | - } | |
| 1472 | - }, { | |
| 1473 | - key: "updateActivity", | |
| 1474 | - value: function updateActivity() { | |
| 1475 | - this.lastActivityTime = Date.now(); | |
| 1476 | - } | |
| 1477 | - }, { | |
| 1478 | - key: "startSessionMonitoring", | |
| 1479 | - value: function startSessionMonitoring() { | |
| 1480 | - var _this = this; | |
| 1481 | - this.activityCheckInterval = setInterval(function () { | |
| 1482 | - _this.checkSessionTimeout(); | |
| 1483 | - }, ACTIVITY_CHECK_INTERVAL); | |
| 1484 | - window.addEventListener('beforeunload', function () { | |
| 1485 | - if (!_this.sessionEnded && !_this.isNavigatingToElementor) { | |
| 1486 | - _this.trackSessionEnd('tab_closed'); | |
| 1487 | - } | |
| 1488 | - }); | |
| 1489 | - document.addEventListener('visibilitychange', function () { | |
| 1490 | - if (!_this.sessionEnded && document.hidden) { | |
| 1491 | - var timeSinceLastActivity = Date.now() - _this.lastActivityTime; | |
| 1492 | - if (timeSinceLastActivity > SESSION_TIMEOUT) { | |
| 1493 | - _this.trackSessionEnd('tab_inactive'); | |
| 1494 | - } | |
| 1495 | - } | |
| 1496 | - }); | |
| 1497 | - } | |
| 1498 | - }, { | |
| 1499 | - key: "isElementorPage", | |
| 1500 | - value: function isElementorPage(url) { | |
| 1501 | - try { | |
| 1502 | - var urlObj = new URL(url, window.location.origin); | |
| 1503 | - var params = urlObj.searchParams; | |
| 1504 | - var page = params.get('page'); | |
| 1505 | - var postType = params.get('post_type'); | |
| 1506 | - var action = params.get('action'); | |
| 1507 | - var elementorPages = ['elementor-home', 'e-form-submissions']; | |
| 1508 | - var elementorPostTypes = ['elementor_library', 'e-floating-buttons']; | |
| 1509 | - return page && elementorPages.some(function (p) { | |
| 1510 | - return page.includes(p); | |
| 1511 | - }) || postType && elementorPostTypes.includes(postType) || action && action.includes('elementor'); | |
| 1512 | - } catch (error) { | |
| 1513 | - return false; | |
| 1514 | - } | |
| 1515 | - } | |
| 1516 | - }, { | |
| 1517 | - key: "isPluginsPage", | |
| 1518 | - value: function isPluginsPage(url) { | |
| 1519 | - try { | |
| 1520 | - var urlObj = new URL(url, window.location.origin); | |
| 1521 | - return urlObj.pathname.includes('plugins.php'); | |
| 1522 | - } catch (error) { | |
| 1523 | - return false; | |
| 1524 | - } | |
| 1525 | - } | |
| 1526 | - }, { | |
| 1527 | - key: "isNavigatingAwayFromElementor", | |
| 1528 | - value: function isNavigatingAwayFromElementor(targetUrl) { | |
| 1529 | - if (!targetUrl) { | |
| 1530 | - return false; | |
| 1531 | - } | |
| 1532 | - if (targetUrl.startsWith('#')) { | |
| 1533 | - return false; | |
| 1534 | - } | |
| 1535 | - return !this.isElementorPage(targetUrl); | |
| 1536 | - } | |
| 1537 | - }, { | |
| 1538 | - key: "isLinkOpeningInNewTab", | |
| 1539 | - value: function isLinkOpeningInNewTab(link) { | |
| 1540 | - var target = link.getAttribute('target'); | |
| 1541 | - return '_blank' === target || '_new' === target; | |
| 1542 | - } | |
| 1543 | - }, { | |
| 1544 | - key: "attachNavigationListener", | |
| 1545 | - value: function attachNavigationListener() { | |
| 1546 | - var _this2 = this; | |
| 1547 | - var handleLinkClick = function handleLinkClick(event) { | |
| 1548 | - var link = event.target.closest('a'); | |
| 1549 | - if (link && link.href) { | |
| 1550 | - if (_this2.isLinkOpeningInNewTab(link)) { | |
| 1551 | - return; | |
| 1552 | - } | |
| 1553 | - if (!_this2.sessionEnded && _this2.isNavigatingAwayFromElementor(link.href)) { | |
| 1554 | - _this2.trackSessionEnd('navigate_away'); | |
| 1555 | - } else if (_this2.isElementorPage(link.href)) { | |
| 1556 | - _this2.isNavigatingToElementor = true; | |
| 1557 | - } | |
| 1558 | - } | |
| 1559 | - var isSidebar = event.target.closest('#editor-one-sidebar-navigation'); | |
| 1560 | - if (isSidebar) { | |
| 1561 | - _this2.isNavigatingToElementor = true; | |
| 1562 | - } | |
| 1563 | - }; | |
| 1564 | - var handleFormSubmit = function handleFormSubmit(event) { | |
| 1565 | - var form = event.target; | |
| 1566 | - if (form.action) { | |
| 1567 | - if (!_this2.sessionEnded && _this2.isNavigatingAwayFromElementor(form.action)) { | |
| 1568 | - _this2.trackSessionEnd('navigate_away'); | |
| 1569 | - } else if (_this2.isElementorPage(form.action)) { | |
| 1570 | - _this2.isNavigatingToElementor = true; | |
| 1571 | - } | |
| 1572 | - } | |
| 1573 | - }; | |
| 1574 | - document.addEventListener('click', handleLinkClick, true); | |
| 1575 | - document.addEventListener('submit', handleFormSubmit, true); | |
| 1576 | - this.navigationListeners.push({ | |
| 1577 | - type: 'click', | |
| 1578 | - handler: handleLinkClick | |
| 1579 | - }, { | |
| 1580 | - type: 'submit', | |
| 1581 | - handler: handleFormSubmit | |
| 1582 | - }); | |
| 1583 | - } | |
| 1584 | - }, { | |
| 1585 | - key: "checkSessionTimeout", | |
| 1586 | - value: function checkSessionTimeout() { | |
| 1587 | - var timeSinceLastActivity = Date.now() - this.lastActivityTime; | |
| 1588 | - if (timeSinceLastActivity > SESSION_TIMEOUT && !this.sessionEnded) { | |
| 1589 | - this.trackSessionEnd('timeout'); | |
| 1590 | - } | |
| 1591 | - } | |
| 1592 | - }, { | |
| 1593 | - key: "attachActivityListeners", | |
| 1594 | - value: function attachActivityListeners() { | |
| 1595 | - var _this3 = this; | |
| 1596 | - var events = ['mousedown', 'keydown', 'scroll', 'touchstart', 'click']; | |
| 1597 | - events.forEach(function (event) { | |
| 1598 | - document.addEventListener(event, function () { | |
| 1599 | - _this3.updateActivity(); | |
| 1600 | - }, { | |
| 1601 | - capture: true, | |
| 1602 | - passive: true | |
| 1603 | - }); | |
| 1604 | - }); | |
| 1605 | - } | |
| 1606 | - }, { | |
| 1607 | - key: "formatDuration", | |
| 1608 | - value: function formatDuration(milliseconds) { | |
| 1609 | - var totalSeconds = Math.floor(milliseconds / 1000); | |
| 1610 | - return Number(totalSeconds.toFixed(2)); | |
| 1611 | - } | |
| 1612 | - }, { | |
| 1613 | - key: "trackNavClicked", | |
| 1614 | - value: function trackNavClicked(itemId) { | |
| 1615 | - var rootItem = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | |
| 1616 | - var area = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : NAV_AREAS.LEFT_MENU; | |
| 1617 | - if (!this.initialized) { | |
| 1618 | - var pendingNav = { | |
| 1619 | - itemId: itemId, | |
| 1620 | - rootItem: rootItem, | |
| 1621 | - area: area | |
| 1622 | - }; | |
| 1623 | - sessionStorage.setItem(PENDING_NAV_CLICK_KEY, JSON.stringify(pendingNav)); | |
| 1624 | - return; | |
| 1625 | - } | |
| 1626 | - this.updateActivity(); | |
| 1627 | - this.navItemsVisited.add(itemId); | |
| 1628 | - this.saveSessionToStorage(); | |
| 1629 | - var properties = { | |
| 1630 | - wpdash_nav_item_id: itemId, | |
| 1631 | - wpdash_nav_area: area | |
| 1632 | - }; | |
| 1633 | - if (rootItem) { | |
| 1634 | - properties.wpdash_nav_item_root = rootItem; | |
| 1635 | - } | |
| 1636 | - this.dispatchEvent('wpdash_nav_clicked', properties); | |
| 1637 | - } | |
| 1638 | - }, { | |
| 1639 | - key: "trackScreenViewed", | |
| 1640 | - value: function trackScreenViewed(screenId) { | |
| 1641 | - var screenType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SCREEN_TYPES.TAB; | |
| 1642 | - this.updateActivity(); | |
| 1643 | - var properties = { | |
| 1644 | - wpdash_screen_id: screenId, | |
| 1645 | - wpdash_screen_type: screenType | |
| 1646 | - }; | |
| 1647 | - this.dispatchEvent('wpdash_screen_viewed', properties); | |
| 1648 | - } | |
| 1649 | - }, { | |
| 1650 | - key: "trackActionControl", | |
| 1651 | - value: function trackActionControl(controlIdentifier, controlType) { | |
| 1652 | - this.updateActivity(); | |
| 1653 | - var properties = { | |
| 1654 | - wpdash_action_control_interacted: controlIdentifier, | |
| 1655 | - wpdash_control_type: controlType | |
| 1656 | - }; | |
| 1657 | - this.dispatchEvent('wpdash_action_control', properties); | |
| 1658 | - } | |
| 1659 | - }, { | |
| 1660 | - key: "trackPromoClicked", | |
| 1661 | - value: function trackPromoClicked(promoName, destination, clickPath) { | |
| 1662 | - this.updateActivity(); | |
| 1663 | - var properties = { | |
| 1664 | - wpdash_promo_name: promoName, | |
| 1665 | - wpdash_promo_destination: destination, | |
| 1666 | - wpdash_promo_clicked_path: clickPath | |
| 1667 | - }; | |
| 1668 | - this.dispatchEvent('wpdash_promo_clicked', properties); | |
| 1669 | - } | |
| 1670 | - }, { | |
| 1671 | - key: "trackSessionEnd", | |
| 1672 | - value: function trackSessionEnd() { | |
| 1673 | - var reason = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'timeout'; | |
| 1674 | - if (this.sessionEnded) { | |
| 1675 | - return; | |
| 1676 | - } | |
| 1677 | - this.sessionEnded = true; | |
| 1678 | - if (this.activityCheckInterval) { | |
| 1679 | - clearInterval(this.activityCheckInterval); | |
| 1680 | - this.activityCheckInterval = null; | |
| 1681 | - } | |
| 1682 | - var duration = Date.now() - this.sessionStartTime; | |
| 1683 | - var properties = { | |
| 1684 | - wpdash_endstate_nav_summary: Array.from(this.navItemsVisited), | |
| 1685 | - wpdash_endstate_nav_count: this.navItemsVisited.size, | |
| 1686 | - wpdash_endstate_duration: this.formatDuration(duration), | |
| 1687 | - reason: reason | |
| 1688 | - }; | |
| 1689 | - this.dispatchEvent('wpdash_session_end_state', properties); | |
| 1690 | - this.clearStoredSession(); | |
| 1691 | - } | |
| 1692 | - }, { | |
| 1693 | - key: "destroy", | |
| 1694 | - value: function destroy() { | |
| 1695 | - if (this.activityCheckInterval) { | |
| 1696 | - clearInterval(this.activityCheckInterval); | |
| 1697 | - } | |
| 1698 | - this.navigationListeners.forEach(function (_ref) { | |
| 1699 | - var type = _ref.type, | |
| 1700 | - handler = _ref.handler; | |
| 1701 | - document.removeEventListener(type, handler, true); | |
| 1702 | - }); | |
| 1703 | - this.navigationListeners = []; | |
| 1704 | - _screenView.default.destroy(); | |
| 1705 | - _promotion.default.destroy(); | |
| 1706 | - _menuPromotion.default.destroy(); | |
| 1707 | - _actionControls.default.destroy(); | |
| 1708 | - this.initialized = false; | |
| 1709 | - } | |
| 1710 | - }]); | |
| 1711 | -}(); | |
| 1712 | -(0, _defineProperty2.default)(WpDashboardTracking, "sessionStartTime", Date.now()); | |
| 1713 | -(0, _defineProperty2.default)(WpDashboardTracking, "lastActivityTime", Date.now()); | |
| 1714 | -(0, _defineProperty2.default)(WpDashboardTracking, "sessionEnded", false); | |
| 1715 | -(0, _defineProperty2.default)(WpDashboardTracking, "navItemsVisited", new Set()); | |
| 1716 | -(0, _defineProperty2.default)(WpDashboardTracking, "activityCheckInterval", null); | |
| 1717 | -(0, _defineProperty2.default)(WpDashboardTracking, "initialized", false); | |
| 1718 | -(0, _defineProperty2.default)(WpDashboardTracking, "navigationListeners", []); | |
| 1719 | -(0, _defineProperty2.default)(WpDashboardTracking, "isNavigatingToElementor", false); | |
| 1720 | -window.addEventListener('elementor/admin/init', function () { | |
| 1721 | - var currentUrl = window.location.href; | |
| 1722 | - var isPluginsPage = WpDashboardTracking.isPluginsPage(currentUrl); | |
| 1723 | - var isElementorPage = WpDashboardTracking.isElementorPage(currentUrl); | |
| 1724 | - if (isPluginsPage) { | |
| 1725 | - _pluginActions.default.init(); | |
| 1726 | - } | |
| 1727 | - _navigation.default.init(); | |
| 1728 | - if (isElementorPage) { | |
| 1729 | - WpDashboardTracking.init(); | |
| 1730 | - _screenView.default.init(); | |
| 1731 | - _promotion.default.init(); | |
| 1732 | - _menuPromotion.default.init(); | |
| 1733 | - _actionControls.default.init(); | |
| 1734 | - } | |
| 1735 | -}); | |
| 1736 | -window.addEventListener('beforeunload', function () { | |
| 1737 | - _navigation.default.destroy(); | |
| 1738 | - _pluginActions.default.destroy(); | |
| 1739 | - WpDashboardTracking.destroy(); | |
| 1740 | -}); | |
| 373 | +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1741 | 374 | |
| 1742 | 375 | /***/ }), |
| 1743 | 376 | |
| 1744 | 377 | /***/ "../assets/dev/js/admin/maintenance-mode.js": |
| @@ -1769,9 +402,9 @@ | ||
| 1769 | 402 | }; |
| 1770 | 403 | }, |
| 1771 | 404 | getDefaultElements: function getDefaultElements() { |
| 1772 | 405 | var elements = {}, |
| 1773 | - selectors = this.getSettings('selectors'); | |
| 406 | + selectors = this.getSettings('selectors'); | |
| 1774 | 407 | elements.$modeSelect = jQuery(selectors.modeSelect); |
| 1775 | 408 | elements.$maintenanceModeTable = elements.$modeSelect.parents(selectors.maintenanceModeTable); |
| 1776 | 409 | elements.$excludeModeSelect = elements.$maintenanceModeTable.find(selectors.excludeModeSelect); |
| 1777 | 410 | elements.$excludeRolesArea = elements.$maintenanceModeTable.find(selectors.excludeRolesArea); |
| @@ -1782,9 +415,9 @@ | ||
| 1782 | 415 | return elements; |
| 1783 | 416 | }, |
| 1784 | 417 | handleModeSelectChange: function handleModeSelectChange() { |
| 1785 | 418 | var settings = this.getSettings(), |
| 1786 | - elements = this.elements; | |
| 419 | + elements = this.elements; | |
| 1787 | 420 | elements.$maintenanceModeTable.toggleClass(settings.classes.isEnabled, !!elements.$modeSelect.val()); |
| 1788 | 421 | elements.$maintenanceModeDescriptions.hide(); |
| 1789 | 422 | elements.$maintenanceModeDescriptions.filter('[data-value="' + elements.$modeSelect.val() + '"]').show(); |
| 1790 | 423 | }, |
| @@ -1794,13 +427,15 @@ | ||
| 1794 | 427 | }, |
| 1795 | 428 | handleTemplateSelectChange: function handleTemplateSelectChange() { |
| 1796 | 429 | var elements = this.elements; |
| 1797 | 430 | var templateID = elements.$templateSelect.val(); |
| 431 | + | |
| 1798 | 432 | if (!templateID) { |
| 1799 | 433 | elements.$editTemplateButton.hide(); |
| 1800 | 434 | elements.$maintenanceModeError.show(); |
| 1801 | 435 | return; |
| 1802 | 436 | } |
| 437 | + | |
| 1803 | 438 | var editUrl = elementorAdmin.config.home_url + '?p=' + templateID + '&elementor'; |
| 1804 | 439 | elements.$editTemplateButton.prop('href', editUrl).show(); |
| 1805 | 440 | elements.$maintenanceModeError.hide(); |
| 1806 | 441 | }, |
| @@ -1832,28 +467,41 @@ | ||
| 1832 | 467 | "use strict"; |
| 1833 | 468 | |
| 1834 | 469 | |
| 1835 | 470 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 471 | + | |
| 1836 | 472 | Object.defineProperty(exports, "__esModule", ({ |
| 1837 | 473 | value: true |
| 1838 | 474 | })); |
| 1839 | 475 | exports["default"] = void 0; |
| 476 | + | |
| 1840 | 477 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 478 | + | |
| 1841 | 479 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 480 | + | |
| 481 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 482 | + | |
| 483 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 484 | + | |
| 1842 | 485 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 486 | + | |
| 1843 | 487 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1844 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 1845 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1846 | -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)); } | |
| 1847 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1848 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 1849 | -var MenuHandler = exports["default"] = /*#__PURE__*/function (_elementorModules$Vie) { | |
| 488 | + | |
| 489 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 490 | + | |
| 491 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 492 | + | |
| 493 | +var MenuHandler = /*#__PURE__*/function (_elementorModules$Vie) { | |
| 494 | + (0, _inherits2.default)(MenuHandler, _elementorModules$Vie); | |
| 495 | + | |
| 496 | + var _super = _createSuper(MenuHandler); | |
| 497 | + | |
| 1850 | 498 | function MenuHandler() { |
| 1851 | 499 | (0, _classCallCheck2.default)(this, MenuHandler); |
| 1852 | - return _callSuper(this, MenuHandler, arguments); | |
| 500 | + return _super.apply(this, arguments); | |
| 1853 | 501 | } |
| 1854 | - (0, _inherits2.default)(MenuHandler, _elementorModules$Vie); | |
| 1855 | - return (0, _createClass2.default)(MenuHandler, [{ | |
| 502 | + | |
| 503 | + (0, _createClass2.default)(MenuHandler, [{ | |
| 1856 | 504 | key: "getDefaultSettings", |
| 1857 | 505 | value: function getDefaultSettings() { |
| 1858 | 506 | return { |
| 1859 | 507 | selectors: { |
| @@ -1868,24 +516,24 @@ | ||
| 1868 | 516 | return { |
| 1869 | 517 | $currentSubmenuItems: jQuery(settings.selectors.currentSubmenuItems), |
| 1870 | 518 | $adminPageMenuLink: jQuery("a[href=\"".concat(settings.path, "\"]")) |
| 1871 | 519 | }; |
| 1872 | - } | |
| 1873 | - | |
| 1874 | - // This method highlights the currently visited submenu item for the slug provided as an argument to this handler. | |
| 520 | + } // This method highlights the currently visited submenu item for the slug provided as an argument to this handler. | |
| 1875 | 521 | // This method also accepts a jQuery instance of a custom submenu item to highlight. If provided, the provided |
| 1876 | 522 | // item will be the one highlighted. |
| 523 | + | |
| 1877 | 524 | }, { |
| 1878 | 525 | key: "highlightSubMenuItem", |
| 1879 | 526 | value: function highlightSubMenuItem() { |
| 1880 | 527 | var $element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; |
| 1881 | 528 | var $submenuItem = $element || this.elements.$adminPageMenuLink; |
| 529 | + | |
| 1882 | 530 | if (this.elements.$currentSubmenuItems.length) { |
| 1883 | 531 | this.elements.$currentSubmenuItems.removeClass('current'); |
| 1884 | 532 | } |
| 1885 | - $submenuItem.addClass('current'); | |
| 1886 | 533 | |
| 1887 | - // Need to add the 'current' class to the link element's parent `<li>` element as well. | |
| 534 | + $submenuItem.addClass('current'); // Need to add the 'current' class to the link element's parent `<li>` element as well. | |
| 535 | + | |
| 1888 | 536 | $submenuItem.parent().addClass('current'); |
| 1889 | 537 | } |
| 1890 | 538 | }, { |
| 1891 | 539 | key: "highlightTopLevelMenuItem", |
| @@ -1892,8 +540,9 @@ | ||
| 1892 | 540 | value: function highlightTopLevelMenuItem($elementToHighlight) { |
| 1893 | 541 | var $elementToRemove = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; |
| 1894 | 542 | var activeClasses = 'wp-has-current-submenu wp-menu-open current'; |
| 1895 | 543 | $elementToHighlight.parent().addClass(activeClasses).removeClass('wp-not-current-submenu'); |
| 544 | + | |
| 1896 | 545 | if ($elementToRemove) { |
| 1897 | 546 | $elementToRemove.removeClass(activeClasses); |
| 1898 | 547 | } |
| 1899 | 548 | } |
| @@ -1899,77 +548,21 @@ | ||
| 1899 | 548 | } |
| 1900 | 549 | }, { |
| 1901 | 550 | key: "onInit", |
| 1902 | 551 | value: function onInit() { |
| 1903 | - _superPropGet(MenuHandler, "onInit", this, 3)([]); | |
| 552 | + (0, _get2.default)((0, _getPrototypeOf2.default)(MenuHandler.prototype), "onInit", this).call(this); | |
| 1904 | 553 | var settings = this.getSettings(); |
| 554 | + | |
| 1905 | 555 | if (window.location.href.includes(settings.path)) { |
| 1906 | 556 | this.highlightSubMenuItem(); |
| 1907 | 557 | } |
| 1908 | 558 | } |
| 1909 | 559 | }]); |
| 560 | + return MenuHandler; | |
| 1910 | 561 | }(elementorModules.ViewModule); |
| 1911 | 562 | |
| 1912 | -/***/ }), | |
| 563 | +exports["default"] = MenuHandler; | |
| 1913 | 564 | |
| 1914 | -/***/ "../assets/dev/js/admin/new-template/template-controls.js": | |
| 1915 | -/*!****************************************************************!*\ | |
| 1916 | - !*** ../assets/dev/js/admin/new-template/template-controls.js ***! | |
| 1917 | - \****************************************************************/ | |
| 1918 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1919 | - | |
| 1920 | -"use strict"; | |
| 1921 | - | |
| 1922 | - | |
| 1923 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1924 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1925 | - value: true | |
| 1926 | -})); | |
| 1927 | -exports["default"] = void 0; | |
| 1928 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 1929 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1930 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1931 | -var TemplateControls = exports["default"] = /*#__PURE__*/function () { | |
| 1932 | - function TemplateControls() { | |
| 1933 | - (0, _classCallCheck2.default)(this, TemplateControls); | |
| 1934 | - } | |
| 1935 | - return (0, _createClass2.default)(TemplateControls, [{ | |
| 1936 | - key: "setDynamicControlsVisibility", | |
| 1937 | - value: function setDynamicControlsVisibility(lookupControlIdPrefix, controls) { | |
| 1938 | - if (undefined === controls) { | |
| 1939 | - return; | |
| 1940 | - } | |
| 1941 | - var controlsArray = Object.entries(controls); | |
| 1942 | - for (var _i = 0, _controlsArray = controlsArray; _i < _controlsArray.length; _i++) { | |
| 1943 | - var _controlsArray$_i = (0, _slicedToArray2.default)(_controlsArray[_i], 2), | |
| 1944 | - controlId = _controlsArray$_i[0], | |
| 1945 | - controlSettings = _controlsArray$_i[1]; | |
| 1946 | - this.setVisibilityForControl(lookupControlIdPrefix, controlSettings, controlId); | |
| 1947 | - } | |
| 1948 | - } | |
| 1949 | - }, { | |
| 1950 | - key: "setVisibilityForControl", | |
| 1951 | - value: function setVisibilityForControl(lookupControlIdPrefix, controlSettings, controlId) { | |
| 1952 | - var _controlSettings$cond, | |
| 1953 | - _this = this; | |
| 1954 | - var conditions = Object.entries((_controlSettings$cond = controlSettings.conditions) !== null && _controlSettings$cond !== void 0 ? _controlSettings$cond : {}); | |
| 1955 | - conditions.forEach(function (condition) { | |
| 1956 | - _this.changeVisibilityBasedOnCondition(lookupControlIdPrefix, condition, controlId); | |
| 1957 | - }); | |
| 1958 | - } | |
| 1959 | - }, { | |
| 1960 | - key: "changeVisibilityBasedOnCondition", | |
| 1961 | - value: function changeVisibilityBasedOnCondition(lookupControlIdPrefix, condition, controlId) { | |
| 1962 | - var _condition = (0, _slicedToArray2.default)(condition, 2), | |
| 1963 | - conditionKey = _condition[0], | |
| 1964 | - conditionValue = _condition[1]; | |
| 1965 | - var targetControlWrapper = document.getElementById(lookupControlIdPrefix + controlId + '__wrapper'); | |
| 1966 | - var lookupControl = document.getElementById(lookupControlIdPrefix + conditionKey); | |
| 1967 | - targetControlWrapper.classList.toggle('elementor-hidden', !lookupControl || conditionValue !== lookupControl.value); | |
| 1968 | - } | |
| 1969 | - }]); | |
| 1970 | -}(); | |
| 1971 | - | |
| 1972 | 565 | /***/ }), |
| 1973 | 566 | |
| 1974 | 567 | /***/ "../assets/dev/js/editor/utils/files-upload-handler.js": |
| 1975 | 568 | /*!*************************************************************!*\ |
| @@ -1981,25 +574,32 @@ | ||
| 1981 | 574 | /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; |
| 1982 | 575 | |
| 1983 | 576 | |
| 1984 | 577 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 578 | + | |
| 1985 | 579 | Object.defineProperty(exports, "__esModule", ({ |
| 1986 | 580 | value: true |
| 1987 | 581 | })); |
| 1988 | 582 | exports["default"] = void 0; |
| 583 | + | |
| 1989 | 584 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 585 | + | |
| 1990 | 586 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1991 | -var FilesUploadHandler = exports["default"] = /*#__PURE__*/function () { | |
| 587 | + | |
| 588 | +var FilesUploadHandler = /*#__PURE__*/function () { | |
| 1992 | 589 | function FilesUploadHandler() { |
| 1993 | 590 | (0, _classCallCheck2.default)(this, FilesUploadHandler); |
| 1994 | 591 | } |
| 1995 | - return (0, _createClass2.default)(FilesUploadHandler, null, [{ | |
| 592 | + | |
| 593 | + (0, _createClass2.default)(FilesUploadHandler, null, [{ | |
| 1996 | 594 | key: "isUploadEnabled", |
| 1997 | 595 | value: function isUploadEnabled(mediaType) { |
| 1998 | 596 | var unfilteredFilesTypes = ['svg', 'application/json']; |
| 597 | + | |
| 1999 | 598 | if (!unfilteredFilesTypes.includes(mediaType)) { |
| 2000 | 599 | return true; |
| 2001 | 600 | } |
| 601 | + | |
| 2002 | 602 | return elementorCommon.config.filesUpload.unfilteredFiles; |
| 2003 | 603 | } |
| 2004 | 604 | }, { |
| 2005 | 605 | key: "setUploadTypeCaller", |
| @@ -2006,39 +606,21 @@ | ||
| 2006 | 606 | value: function setUploadTypeCaller(frame) { |
| 2007 | 607 | frame.uploader.uploader.param('uploadTypeCaller', 'elementor-wp-media-upload'); |
| 2008 | 608 | } |
| 2009 | 609 | }, { |
| 2010 | - key: "getUnfilteredFilesNonAdminDialog", | |
| 2011 | - value: function getUnfilteredFilesNonAdminDialog() { | |
| 2012 | - return elementorCommon.dialogsManager.createWidget('alert', { | |
| 2013 | - id: 'e-unfiltered-files-disabled-dialog', | |
| 2014 | - headerMessage: __('Sorry, you can\'t upload that file yet', 'elementor'), | |
| 2015 | - message: __('This is because JSON files may pose a security risk.', 'elementor') + '<br><br>' + __('To upload them anyway, ask the site administrator to enable unfiltered file uploads.', 'elementor'), | |
| 2016 | - strings: { | |
| 2017 | - confirm: __('Got it', 'elementor') | |
| 2018 | - } | |
| 2019 | - }); | |
| 2020 | - } | |
| 2021 | - }, { | |
| 2022 | 610 | key: "getUnfilteredFilesNotEnabledDialog", |
| 2023 | 611 | value: function getUnfilteredFilesNotEnabledDialog(callback) { |
| 2024 | - var elementorInstance = window.elementorAdmin || window.elementor; | |
| 2025 | - if (!elementorInstance.config.user.is_administrator) { | |
| 2026 | - return this.getUnfilteredFilesNonAdminDialog(); | |
| 2027 | - } | |
| 2028 | 612 | var onConfirm = function onConfirm() { |
| 2029 | 613 | elementorCommon.ajax.addRequest('enable_unfiltered_files_upload', {}, true); |
| 2030 | 614 | elementorCommon.config.filesUpload.unfilteredFiles = true; |
| 2031 | 615 | callback(); |
| 2032 | 616 | }; |
| 2033 | - return elementorInstance.helpers.getSimpleDialog('e-enable-unfiltered-files-dialog', __('Enable Unfiltered File Uploads', 'elementor'), __('Before you enable unfiltered files upload, note that such files include a security risk. Elementor does run a process to remove possible malicious code, but there is still risk involved when using such files.', 'elementor'), __('Enable', 'elementor'), onConfirm); | |
| 617 | + | |
| 618 | + return elementor.helpers.getSimpleDialog('e-enable-unfiltered-files-dialog', __('Enable Unfiltered File Uploads', 'elementor'), __('Before you enable unfiltered files upload, note that such files include a security risk. Elementor does run a process to remove possible malicious code, but there is still risk involved when using such files.', 'elementor'), __('Enable', 'elementor'), onConfirm); | |
| 2034 | 619 | } |
| 2035 | 620 | }, { |
| 2036 | 621 | key: "getUnfilteredFilesNotEnabledImportTemplateDialog", |
| 2037 | 622 | value: function getUnfilteredFilesNotEnabledImportTemplateDialog(callback) { |
| 2038 | - if (!(window.elementorAdmin || window.elementor).config.user.is_administrator) { | |
| 2039 | - return this.getUnfilteredFilesNonAdminDialog(); | |
| 2040 | - } | |
| 2041 | 623 | return elementorCommon.dialogsManager.createWidget('confirm', { |
| 2042 | 624 | id: 'e-enable-unfiltered-files-dialog-import-template', |
| 2043 | 625 | headerMessage: __('Enable Unfiltered File Uploads', 'elementor'), |
| 2044 | 626 | message: __('Before you enable unfiltered files upload, note that such files include a security risk. Elementor does run a process to remove possible malicious code, but there is still risk involved when using such files.', 'elementor') + '<br /><br />' + __('If you do not enable uploading unfiltered files, any SVG or JSON (including lottie) files used in the uploaded template will not be imported.', 'elementor'), |
| @@ -2064,10 +646,13 @@ | ||
| 2064 | 646 | } |
| 2065 | 647 | }); |
| 2066 | 648 | } |
| 2067 | 649 | }]); |
| 650 | + return FilesUploadHandler; | |
| 2068 | 651 | }(); |
| 2069 | 652 | |
| 653 | +exports["default"] = FilesUploadHandler; | |
| 654 | + | |
| 2070 | 655 | /***/ }), |
| 2071 | 656 | |
| 2072 | 657 | /***/ "../assets/dev/js/utils/events.js": |
| 2073 | 658 | /*!****************************************!*\ |
| @@ -2078,19 +663,24 @@ | ||
| 2078 | 663 | "use strict"; |
| 2079 | 664 | |
| 2080 | 665 | |
| 2081 | 666 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 667 | + | |
| 2082 | 668 | Object.defineProperty(exports, "__esModule", ({ |
| 2083 | 669 | value: true |
| 2084 | 670 | })); |
| 2085 | 671 | exports["default"] = exports.Events = void 0; |
| 672 | + | |
| 2086 | 673 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 674 | + | |
| 2087 | 675 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2088 | -var Events = exports.Events = /*#__PURE__*/function () { | |
| 676 | + | |
| 677 | +var Events = /*#__PURE__*/function () { | |
| 2089 | 678 | function Events() { |
| 2090 | 679 | (0, _classCallCheck2.default)(this, Events); |
| 2091 | 680 | } |
| 2092 | - return (0, _createClass2.default)(Events, null, [{ | |
| 681 | + | |
| 682 | + (0, _createClass2.default)(Events, null, [{ | |
| 2093 | 683 | key: "dispatch", |
| 2094 | 684 | value: |
| 2095 | 685 | /** |
| 2096 | 686 | * Dispatch an Elementor event. |
| @@ -2108,162 +698,30 @@ | ||
| 2108 | 698 | function dispatch(context, event) { |
| 2109 | 699 | var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; |
| 2110 | 700 | var bcEvent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; |
| 2111 | 701 | // Make sure to use the native context if it's a jQuery instance. |
| 2112 | - context = context instanceof jQuery ? context[0] : context; | |
| 702 | + context = context instanceof jQuery ? context[0] : context; // Dispatch the BC event only if exists. | |
| 2113 | 703 | |
| 2114 | - // Dispatch the BC event only if exists. | |
| 2115 | 704 | if (bcEvent) { |
| 2116 | 705 | context.dispatchEvent(new CustomEvent(bcEvent, { |
| 2117 | 706 | detail: data |
| 2118 | 707 | })); |
| 2119 | - } | |
| 708 | + } // jQuery's `.on()` listens also to native custom events, so there is no need | |
| 709 | + // to dispatch also a jQuery event. | |
| 2120 | 710 | |
| 2121 | - // jQuery's `.on()` listens also to native custom events, so there is no need | |
| 2122 | - // to dispatch also a jQuery event. | |
| 711 | + | |
| 2123 | 712 | context.dispatchEvent(new CustomEvent(event, { |
| 2124 | 713 | detail: data |
| 2125 | 714 | })); |
| 2126 | 715 | } |
| 2127 | 716 | }]); |
| 717 | + return Events; | |
| 2128 | 718 | }(); |
| 2129 | -var _default = exports["default"] = Events; | |
| 2130 | 719 | |
| 2131 | -/***/ }), | |
| 720 | +exports.Events = Events; | |
| 721 | +var _default = Events; | |
| 722 | +exports["default"] = _default; | |
| 2132 | 723 | |
| 2133 | -/***/ "../assets/dev/js/utils/json-upload-warning-message.js": | |
| 2134 | -/*!*************************************************************!*\ | |
| 2135 | - !*** ../assets/dev/js/utils/json-upload-warning-message.js ***! | |
| 2136 | - \*************************************************************/ | |
| 2137 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2138 | - | |
| 2139 | -"use strict"; | |
| 2140 | -/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 2141 | - | |
| 2142 | - | |
| 2143 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2144 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2145 | - value: true | |
| 2146 | -})); | |
| 2147 | -exports.showJsonUploadWarningMessageIfNeeded = showJsonUploadWarningMessageIfNeeded; | |
| 2148 | -var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 2149 | -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 2150 | -var genericMessageIntroductionKey = 'upload_json_warning_generic_message'; | |
| 2151 | -/** | |
| 2152 | - * @type {import('../utils/introduction').default | null} | |
| 2153 | - */ | |
| 2154 | -var genericWarningModal = null; | |
| 2155 | -function showJsonUploadWarningMessageIfNeeded(_ref) { | |
| 2156 | - var introductionMap = _ref.introductionMap, | |
| 2157 | - IntroductionClass = _ref.IntroductionClass, | |
| 2158 | - _ref$waitForSetViewed = _ref.waitForSetViewed, | |
| 2159 | - waitForSetViewed = _ref$waitForSetViewed === void 0 ? false : _ref$waitForSetViewed; | |
| 2160 | - if (!genericWarningModal) { | |
| 2161 | - genericWarningModal = createGenericWarningModal(IntroductionClass); | |
| 2162 | - } | |
| 2163 | - genericWarningModal.setIntroductionMap(introductionMap); | |
| 2164 | - if (genericWarningModal.introductionViewed) { | |
| 2165 | - return Promise.resolve(); | |
| 2166 | - } | |
| 2167 | - var dialog = genericWarningModal.getDialog(); | |
| 2168 | - return new Promise(function (resolve, reject) { | |
| 2169 | - dialog.onHide = function () { | |
| 2170 | - // When closing the dialog (esc, click on background, etc.) we need to reject the promise. | |
| 2171 | - reject(); | |
| 2172 | - }; | |
| 2173 | - dialog.onConfirm = /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 2174 | - return _regenerator.default.wrap(function (_context) { | |
| 2175 | - while (1) switch (_context.prev = _context.next) { | |
| 2176 | - case 0: | |
| 2177 | - if (!dialog.getElements('checkbox-dont-show-again').prop('checked')) { | |
| 2178 | - _context.next = 3; | |
| 2179 | - break; | |
| 2180 | - } | |
| 2181 | - if (!waitForSetViewed) { | |
| 2182 | - _context.next = 2; | |
| 2183 | - break; | |
| 2184 | - } | |
| 2185 | - _context.next = 1; | |
| 2186 | - return genericWarningModal.setViewed(); | |
| 2187 | - case 1: | |
| 2188 | - _context.next = 3; | |
| 2189 | - break; | |
| 2190 | - case 2: | |
| 2191 | - genericWarningModal.setViewed(); | |
| 2192 | - case 3: | |
| 2193 | - // Hack: we need to resolve the promise and then hide it manually, to avoid rejecting the promise. | |
| 2194 | - // this because when closing the dialog (esc, click on background, etc.) it does not trigger `onCancel` method. | |
| 2195 | - resolve(); | |
| 2196 | - dialog.hide(); | |
| 2197 | - case 4: | |
| 2198 | - case "end": | |
| 2199 | - return _context.stop(); | |
| 2200 | - } | |
| 2201 | - }, _callee); | |
| 2202 | - })); | |
| 2203 | - dialog.onCancel = function () { | |
| 2204 | - dialog.hide(); | |
| 2205 | - }; | |
| 2206 | - genericWarningModal.show(); | |
| 2207 | - }); | |
| 2208 | -} | |
| 2209 | - | |
| 2210 | -/** | |
| 2211 | - * @param {import('../utils/introduction').default.prototype.constructor} IntroductionClass | |
| 2212 | - * | |
| 2213 | - * @return {import('../utils/introduction').default} | |
| 2214 | - */ | |
| 2215 | -function createGenericWarningModal(IntroductionClass) { | |
| 2216 | - var _introduction$getDial, _introduction$getDial2; | |
| 2217 | - var dialogId = 'e-generic-warning-modal-for-json-upload'; | |
| 2218 | - var introduction = new IntroductionClass({ | |
| 2219 | - introductionKey: genericMessageIntroductionKey, | |
| 2220 | - dialogType: 'confirm', | |
| 2221 | - dialogOptions: { | |
| 2222 | - id: dialogId, | |
| 2223 | - headerMessage: __('Warning: JSON files may be unsafe', 'elementor'), | |
| 2224 | - message: __('Uploading JSON files from unknown sources can be harmful and put your site at risk. For maximum safety, only install JSON files from trusted sources.', 'elementor'), | |
| 2225 | - effects: { | |
| 2226 | - show: 'fadeIn', | |
| 2227 | - hide: 'fadeOut' | |
| 2228 | - }, | |
| 2229 | - hide: { | |
| 2230 | - onBackgroundClick: true, | |
| 2231 | - onButtonClick: false | |
| 2232 | - }, | |
| 2233 | - strings: { | |
| 2234 | - confirm: __('Continue', 'elementor'), | |
| 2235 | - cancel: __('Cancel', 'elementor') | |
| 2236 | - } | |
| 2237 | - } | |
| 2238 | - }); | |
| 2239 | - var _createCheckboxAndLab = createCheckboxAndLabel(dialogId), | |
| 2240 | - checkbox = _createCheckboxAndLab.checkbox, | |
| 2241 | - label = _createCheckboxAndLab.label; | |
| 2242 | - introduction.getDialog().addElement('checkbox-dont-show-again', checkbox); | |
| 2243 | - (_introduction$getDial = introduction.getDialog().getElements('message')) === null || _introduction$getDial === void 0 || (_introduction$getDial2 = _introduction$getDial.append) === null || _introduction$getDial2 === void 0 || _introduction$getDial2.call(_introduction$getDial, label); // `getElements` return JQuery object. | |
| 2244 | - | |
| 2245 | - return introduction; | |
| 2246 | -} | |
| 2247 | -function createCheckboxAndLabel(dialogId) { | |
| 2248 | - var checkboxId = "".concat(dialogId, "-dont-show-again"); | |
| 2249 | - var checkbox = document.createElement('input'); | |
| 2250 | - checkbox.type = 'checkbox'; | |
| 2251 | - checkbox.name = checkboxId; | |
| 2252 | - checkbox.id = checkboxId; | |
| 2253 | - var label = document.createElement('label'); | |
| 2254 | - label.htmlFor = checkboxId; | |
| 2255 | - label.textContent = __('Do not show this message again', 'elementor'); | |
| 2256 | - label.style.display = 'block'; | |
| 2257 | - label.style.marginTop = '20px'; | |
| 2258 | - label.style.marginBottom = '20px'; | |
| 2259 | - label.prepend(checkbox); | |
| 2260 | - return { | |
| 2261 | - checkbox: checkbox, | |
| 2262 | - label: label | |
| 2263 | - }; | |
| 2264 | -} | |
| 2265 | - | |
| 2266 | 724 | /***/ }), |
| 2267 | 725 | |
| 2268 | 726 | /***/ "../core/common/assets/js/utils/environment.js": |
| 2269 | 727 | /*!*****************************************************!*\ |
| @@ -2277,338 +735,95 @@ | ||
| 2277 | 735 | Object.defineProperty(exports, "__esModule", ({ |
| 2278 | 736 | value: true |
| 2279 | 737 | })); |
| 2280 | 738 | exports["default"] = void 0; |
| 739 | + | |
| 2281 | 740 | var matchUserAgent = function matchUserAgent(UserAgentStr) { |
| 2282 | - return userAgent.indexOf(UserAgentStr) >= 0; | |
| 2283 | - }, | |
| 2284 | - userAgent = navigator.userAgent, | |
| 2285 | - // Solution influenced by https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser | |
| 741 | + return userAgent.indexOf(UserAgentStr) >= 0; | |
| 742 | +}, | |
| 743 | + userAgent = navigator.userAgent, | |
| 744 | + // Solution influenced by https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser | |
| 745 | +// Opera 8.0+ | |
| 746 | +isOpera = !!window.opr && !!opr.addons || !!window.opera || matchUserAgent(' OPR/'), | |
| 747 | + // Firefox 1.0+ | |
| 748 | +isFirefox = matchUserAgent('Firefox'), | |
| 749 | + // Safari 3.0+ "[object HTMLElementConstructor]" | |
| 750 | +isSafari = /^((?!chrome|android).)*safari/i.test(userAgent) || /constructor/i.test(window.HTMLElement) || function (p) { | |
| 751 | + return '[object SafariRemoteNotification]' === p.toString(); | |
| 752 | +}(!window.safari || typeof safari !== 'undefined' && safari.pushNotification), | |
| 753 | + // Internet Explorer 6-11 | |
| 754 | +isIE = /Trident|MSIE/.test(userAgent) && ( | |
| 755 | +/*@cc_on!@*/ | |
| 756 | + false || !!document.documentMode), | |
| 757 | + // Edge 20+ | |
| 758 | +isEdge = !isIE && !!window.StyleMedia || matchUserAgent('Edg'), | |
| 759 | + // Google Chrome (Not accurate) | |
| 760 | +isChrome = !!window.chrome && matchUserAgent('Chrome') && !(isEdge || isOpera), | |
| 761 | + // Blink engine | |
| 762 | +isBlink = matchUserAgent('Chrome') && !!window.CSS, | |
| 763 | + // Apple Webkit engine | |
| 764 | +isAppleWebkit = matchUserAgent('AppleWebKit') && !isBlink, | |
| 765 | + environment = { | |
| 766 | + appleWebkit: isAppleWebkit, | |
| 767 | + blink: isBlink, | |
| 768 | + chrome: isChrome, | |
| 769 | + edge: isEdge, | |
| 770 | + firefox: isFirefox, | |
| 771 | + ie: isIE, | |
| 772 | + mac: matchUserAgent('Macintosh'), | |
| 773 | + opera: isOpera, | |
| 774 | + safari: isSafari, | |
| 775 | + webkit: matchUserAgent('AppleWebKit') | |
| 776 | +}; | |
| 2286 | 777 | |
| 2287 | - // Opera 8.0+ | |
| 2288 | - isOpera = !!window.opr && !!opr.addons || !!window.opera || matchUserAgent(' OPR/'), | |
| 2289 | - // Firefox 1.0+ | |
| 2290 | - isFirefox = matchUserAgent('Firefox'), | |
| 2291 | - // Safari 3.0+ "[object HTMLElementConstructor]" | |
| 2292 | - isSafari = /^((?!chrome|android).)*safari/i.test(userAgent) || /constructor/i.test(window.HTMLElement) || function (p) { | |
| 2293 | - return '[object SafariRemoteNotification]' === p.toString(); | |
| 2294 | - }(!window.safari || typeof safari !== 'undefined' && safari.pushNotification), | |
| 2295 | - // Internet Explorer 6-11 | |
| 2296 | - isIE = /Trident|MSIE/.test(userAgent) && (/* @cc_on!@*/ false || !!document.documentMode), | |
| 2297 | - // Edge 20+ | |
| 2298 | - isEdge = !isIE && !!window.StyleMedia || matchUserAgent('Edg'), | |
| 2299 | - // Google Chrome (Not accurate) | |
| 2300 | - isChrome = !!window.chrome && matchUserAgent('Chrome') && !(isEdge || isOpera), | |
| 2301 | - // Blink engine | |
| 2302 | - isBlink = matchUserAgent('Chrome') && !!window.CSS, | |
| 2303 | - // Apple Webkit engine | |
| 2304 | - isAppleWebkit = matchUserAgent('AppleWebKit') && !isBlink, | |
| 2305 | - isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0, | |
| 2306 | - environment = { | |
| 2307 | - isTouchDevice: isTouchDevice, | |
| 2308 | - appleWebkit: isAppleWebkit, | |
| 2309 | - blink: isBlink, | |
| 2310 | - chrome: isChrome, | |
| 2311 | - edge: isEdge, | |
| 2312 | - firefox: isFirefox, | |
| 2313 | - ie: isIE, | |
| 2314 | - mac: matchUserAgent('Macintosh'), | |
| 2315 | - opera: isOpera, | |
| 2316 | - safari: isSafari, | |
| 2317 | - webkit: matchUserAgent('AppleWebKit') | |
| 2318 | - }; | |
| 2319 | -var _default = exports["default"] = environment; | |
| 778 | +var _default = environment; | |
| 779 | +exports["default"] = _default; | |
| 2320 | 780 | |
| 2321 | 781 | /***/ }), |
| 2322 | 782 | |
| 2323 | -/***/ "../core/experiments/assets/js/admin/behaviors/experiments-messages.js": | |
| 2324 | -/*!*****************************************************************************!*\ | |
| 2325 | - !*** ../core/experiments/assets/js/admin/behaviors/experiments-messages.js ***! | |
| 2326 | - \*****************************************************************************/ | |
| 783 | +/***/ "../core/experiments/assets/js/admin/module.js": | |
| 784 | +/*!*****************************************************!*\ | |
| 785 | + !*** ../core/experiments/assets/js/admin/module.js ***! | |
| 786 | + \*****************************************************/ | |
| 2327 | 787 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 2328 | 788 | |
| 2329 | 789 | "use strict"; |
| 2330 | -/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 2331 | 790 | |
| 2332 | 791 | |
| 2333 | 792 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 793 | + | |
| 2334 | 794 | Object.defineProperty(exports, "__esModule", ({ |
| 2335 | 795 | value: true |
| 2336 | 796 | })); |
| 2337 | 797 | exports["default"] = void 0; |
| 2338 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 798 | + | |
| 2339 | 799 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 800 | + | |
| 2340 | 801 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2341 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 2342 | -var STATE_ACTIVE = 'active'; | |
| 2343 | -var STATE_INACTIVE = 'inactive'; | |
| 2344 | -var STATE_DEFAULT = 'default'; | |
| 2345 | -var ExperimentsMessages = exports["default"] = /*#__PURE__*/function () { | |
| 2346 | - function ExperimentsMessages(_ref) { | |
| 2347 | - var selects = _ref.selects, | |
| 2348 | - submit = _ref.submit; | |
| 2349 | - (0, _classCallCheck2.default)(this, ExperimentsMessages); | |
| 2350 | - (0, _defineProperty2.default)(this, "elements", {}); | |
| 2351 | - this.elements = { | |
| 2352 | - /** | |
| 2353 | - * @type {HTMLSelectElement[]} | |
| 2354 | - */ | |
| 2355 | - selects: selects, | |
| 2356 | - /** | |
| 2357 | - * @type {HTMLInputElement} | |
| 2358 | - */ | |
| 2359 | - submit: submit | |
| 2360 | - }; | |
| 2361 | - } | |
| 2362 | - return (0, _createClass2.default)(ExperimentsMessages, [{ | |
| 2363 | - key: "bindEvents", | |
| 2364 | - value: function bindEvents() { | |
| 2365 | - var _this = this; | |
| 2366 | - this.elements.selects.forEach(function (select) { | |
| 2367 | - select.addEventListener('change', function (e) { | |
| 2368 | - return _this.onExperimentStateChange(e); | |
| 2369 | - }); | |
| 2370 | - }); | |
| 2371 | - } | |
| 2372 | - }, { | |
| 2373 | - key: "onExperimentStateChange", | |
| 2374 | - value: function onExperimentStateChange(e) { | |
| 2375 | - var experimentId = e.currentTarget.dataset.experimentId, | |
| 2376 | - experimentNewState = this.getExperimentActualState(experimentId); | |
| 2377 | - switch (experimentNewState) { | |
| 2378 | - case STATE_ACTIVE: | |
| 2379 | - if (this.shouldShowDependenciesDialog(experimentId)) { | |
| 2380 | - this.showDependenciesDialog(experimentId); | |
| 2381 | - } | |
| 2382 | - break; | |
| 2383 | - case STATE_INACTIVE: | |
| 2384 | - if (this.shouldShowDeactivationDialog(experimentId)) { | |
| 2385 | - this.showDeactivationDialog(experimentId); | |
| 2386 | - } else { | |
| 2387 | - this.deactivateDependantExperiments(experimentId); | |
| 2388 | - } | |
| 2389 | - break; | |
| 2390 | - default: | |
| 2391 | - break; | |
| 2392 | - } | |
| 2393 | - } | |
| 2394 | - }, { | |
| 2395 | - key: "getExperimentData", | |
| 2396 | - value: function getExperimentData(experimentId) { | |
| 2397 | - return elementorAdminConfig.experiments[experimentId]; | |
| 2398 | - } | |
| 2399 | - }, { | |
| 2400 | - key: "getExperimentDependencies", | |
| 2401 | - value: function getExperimentDependencies(experimentId) { | |
| 2402 | - var _this2 = this; | |
| 2403 | - return this.getExperimentData(experimentId).dependencies.map(function (dependencyId) { | |
| 2404 | - return _this2.getExperimentData(dependencyId); | |
| 2405 | - }); | |
| 2406 | - } | |
| 2407 | - }, { | |
| 2408 | - key: "getExperimentSelect", | |
| 2409 | - value: function getExperimentSelect(experimentId) { | |
| 2410 | - return this.elements.selects.find(function (select) { | |
| 2411 | - return select.matches("[data-experiment-id=\"".concat(experimentId, "\"]")); | |
| 2412 | - }); | |
| 2413 | - } | |
| 2414 | - }, { | |
| 2415 | - key: "setExperimentState", | |
| 2416 | - value: function setExperimentState(experimentId, state) { | |
| 2417 | - this.getExperimentSelect(experimentId).value = state; | |
| 2418 | - } | |
| 2419 | - }, { | |
| 2420 | - key: "getExperimentActualState", | |
| 2421 | - value: function getExperimentActualState(experimentId) { | |
| 2422 | - var _this$getExperimentSe; | |
| 2423 | - var state = (_this$getExperimentSe = this.getExperimentSelect(experimentId)) === null || _this$getExperimentSe === void 0 ? void 0 : _this$getExperimentSe.value; | |
| 2424 | - if (!state) { | |
| 2425 | - return this.getExperimentData(experimentId).state; | |
| 2426 | - } | |
| 2427 | - if (state !== STATE_DEFAULT) { | |
| 2428 | - return state; | |
| 2429 | - } | |
| 2430 | 802 | |
| 2431 | - // Normalize the "default" state to the actual state value. | |
| 2432 | - return this.isExperimentActiveByDefault(experimentId) ? STATE_ACTIVE : STATE_INACTIVE; | |
| 2433 | - } | |
| 2434 | - }, { | |
| 2435 | - key: "isExperimentActive", | |
| 2436 | - value: function isExperimentActive(experimentId) { | |
| 2437 | - return this.getExperimentActualState(experimentId) === STATE_ACTIVE; | |
| 2438 | - } | |
| 2439 | - }, { | |
| 2440 | - key: "isExperimentActiveByDefault", | |
| 2441 | - value: function isExperimentActiveByDefault(experimentId) { | |
| 2442 | - return this.getExperimentData(experimentId).default === STATE_ACTIVE; | |
| 2443 | - } | |
| 2444 | - }, { | |
| 2445 | - key: "areAllDependenciesActive", | |
| 2446 | - value: function areAllDependenciesActive(dependencies) { | |
| 2447 | - var _this3 = this; | |
| 2448 | - return dependencies.every(function (dependency) { | |
| 2449 | - return _this3.isExperimentActive(dependency.name); | |
| 2450 | - }); | |
| 2451 | - } | |
| 2452 | - }, { | |
| 2453 | - key: "deactivateDependantExperiments", | |
| 2454 | - value: function deactivateDependantExperiments(experimentId) { | |
| 2455 | - var _this4 = this; | |
| 2456 | - Object.entries(elementorAdminConfig.experiments).forEach(function (_ref2) { | |
| 2457 | - var _ref3 = (0, _slicedToArray2.default)(_ref2, 2), | |
| 2458 | - id = _ref3[0], | |
| 2459 | - experimentData = _ref3[1]; | |
| 2460 | - var isDependant = experimentData.dependencies.includes(experimentId), | |
| 2461 | - isActive = _this4.getExperimentActualState(id) === STATE_ACTIVE; | |
| 2462 | - if (isDependant && isActive) { | |
| 2463 | - _this4.setExperimentState(id, STATE_INACTIVE); | |
| 2464 | - } | |
| 2465 | - }); | |
| 2466 | - } | |
| 2467 | - }, { | |
| 2468 | - key: "shouldShowDependenciesDialog", | |
| 2469 | - value: function shouldShowDependenciesDialog(experimentId) { | |
| 2470 | - var dependencies = this.getExperimentDependencies(experimentId); | |
| 2471 | - return !this.areAllDependenciesActive(dependencies); | |
| 2472 | - } | |
| 2473 | - }, { | |
| 2474 | - key: "shouldShowDeactivationDialog", | |
| 2475 | - value: function shouldShowDeactivationDialog(experimentId) { | |
| 2476 | - var getExperimentData = this.getExperimentData(experimentId), | |
| 2477 | - isInitialStateActive = getExperimentData.state === STATE_ACTIVE || getExperimentData.state === STATE_DEFAULT && getExperimentData.default === STATE_ACTIVE, | |
| 2478 | - hasMessage = !!this.getMessage(experimentId, 'on_deactivate'); | |
| 2479 | - return hasMessage && isInitialStateActive; | |
| 2480 | - } | |
| 2481 | - }, { | |
| 2482 | - key: "showDialog", | |
| 2483 | - value: function showDialog(dialog) { | |
| 2484 | - return elementorCommon.dialogsManager.createWidget('confirm', { | |
| 2485 | - id: 'e-experiments-messages-dialog', | |
| 2486 | - headerMessage: dialog.headerMessage, | |
| 2487 | - message: dialog.message, | |
| 2488 | - position: { | |
| 2489 | - my: 'center center', | |
| 2490 | - at: 'center center' | |
| 2491 | - }, | |
| 2492 | - strings: { | |
| 2493 | - confirm: dialog.strings.confirm, | |
| 2494 | - cancel: dialog.strings.cancel | |
| 2495 | - }, | |
| 2496 | - hide: { | |
| 2497 | - onOutsideClick: false, | |
| 2498 | - onBackgroundClick: false, | |
| 2499 | - onEscKeyPress: false | |
| 2500 | - }, | |
| 2501 | - onConfirm: dialog.onConfirm, | |
| 2502 | - onCancel: dialog.onCancel | |
| 2503 | - }).show(); | |
| 2504 | - } | |
| 2505 | - }, { | |
| 2506 | - key: "getSiteLanguageCode", | |
| 2507 | - value: function getSiteLanguageCode() { | |
| 2508 | - var languageCode = document.querySelector('html').getAttribute('lang'); | |
| 2509 | - return languageCode !== null && languageCode !== void 0 ? languageCode : 'en'; // Fallback to English if no language code found. | |
| 2510 | - } | |
| 2511 | - }, { | |
| 2512 | - key: "formatDependenciesList", | |
| 2513 | - value: function formatDependenciesList(dependencies) { | |
| 2514 | - var dependenciesTitles = dependencies.map(function (d) { | |
| 2515 | - return d.title; | |
| 2516 | - }); | |
| 2517 | - var languageCode = this.getSiteLanguageCode(); | |
| 2518 | - return new Intl.ListFormat(languageCode).format(dependenciesTitles); | |
| 2519 | - } | |
| 2520 | - }, { | |
| 2521 | - key: "showDependenciesDialog", | |
| 2522 | - value: function showDependenciesDialog(experimentId) { | |
| 2523 | - var _this5 = this; | |
| 2524 | - var experiment = this.getExperimentData(experimentId), | |
| 2525 | - experimentName = experiment.title, | |
| 2526 | - dependenciesList = this.formatDependenciesList(this.getExperimentDependencies(experimentId)); | |
| 803 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 2527 | 804 | |
| 2528 | - // Translators: %1$s: Experiment title, %2$s: Comma-separated dependencies list | |
| 2529 | - var message = __('In order to use %1$s, first you need to activate %2$s.', 'elementor').replace('%1$s', "<strong>".concat(experimentName, "</strong>")).replace('%2$s', dependenciesList); | |
| 2530 | - this.showDialog({ | |
| 2531 | - message: message, | |
| 2532 | - headerMessage: __('First, activate another experiment.', 'elementor'), | |
| 2533 | - strings: { | |
| 2534 | - confirm: __('Activate', 'elementor'), | |
| 2535 | - cancel: __('Cancel', 'elementor') | |
| 2536 | - }, | |
| 2537 | - onConfirm: function onConfirm() { | |
| 2538 | - _this5.getExperimentDependencies(experimentId).forEach(function (dependency) { | |
| 2539 | - _this5.setExperimentState(dependency.name, STATE_ACTIVE); | |
| 2540 | - }); | |
| 2541 | - _this5.elements.submit.click(); | |
| 2542 | - }, | |
| 2543 | - onCancel: function onCancel() { | |
| 2544 | - _this5.setExperimentState(experimentId, STATE_INACTIVE); | |
| 2545 | - } | |
| 2546 | - }); | |
| 2547 | - } | |
| 2548 | - }, { | |
| 2549 | - key: "showDeactivationDialog", | |
| 2550 | - value: function showDeactivationDialog(experimentId) { | |
| 2551 | - var _this6 = this; | |
| 2552 | - this.showDialog({ | |
| 2553 | - message: this.getMessage(experimentId, 'on_deactivate'), | |
| 2554 | - headerMessage: __('Are you sure?', 'elementor'), | |
| 2555 | - strings: { | |
| 2556 | - confirm: __('Deactivate', 'elementor'), | |
| 2557 | - cancel: __('Cancel', 'elementor') | |
| 2558 | - }, | |
| 2559 | - onConfirm: function onConfirm() { | |
| 2560 | - _this6.setExperimentState(experimentId, STATE_INACTIVE); | |
| 2561 | - _this6.deactivateDependantExperiments(experimentId); | |
| 2562 | - _this6.elements.submit.click(); | |
| 2563 | - }, | |
| 2564 | - onCancel: function onCancel() { | |
| 2565 | - _this6.setExperimentState(experimentId, STATE_ACTIVE); | |
| 2566 | - } | |
| 2567 | - }); | |
| 2568 | - } | |
| 2569 | - }, { | |
| 2570 | - key: "getMessage", | |
| 2571 | - value: function getMessage(experimentId, messageId) { | |
| 2572 | - var _this$getExperimentDa; | |
| 2573 | - return (_this$getExperimentDa = this.getExperimentData(experimentId)) === null || _this$getExperimentDa === void 0 ? void 0 : _this$getExperimentDa.messages[messageId]; | |
| 2574 | - } | |
| 2575 | - }]); | |
| 2576 | -}(); | |
| 805 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2577 | 806 | |
| 2578 | -/***/ }), | |
| 807 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2579 | 808 | |
| 2580 | -/***/ "../core/experiments/assets/js/admin/module.js": | |
| 2581 | -/*!*****************************************************!*\ | |
| 2582 | - !*** ../core/experiments/assets/js/admin/module.js ***! | |
| 2583 | - \*****************************************************/ | |
| 2584 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 809 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2585 | 810 | |
| 2586 | -"use strict"; | |
| 811 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 2587 | 812 | |
| 813 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 2588 | 814 | |
| 2589 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2590 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2591 | - value: true | |
| 2592 | -})); | |
| 2593 | -exports["default"] = void 0; | |
| 2594 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2595 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2596 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2597 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2598 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 2599 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2600 | -var _experimentsMessages = _interopRequireDefault(__webpack_require__(/*! ./behaviors/experiments-messages */ "../core/experiments/assets/js/admin/behaviors/experiments-messages.js")); | |
| 2601 | -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)); } | |
| 2602 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2603 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 2604 | -var ExperimentsModule = exports["default"] = /*#__PURE__*/function (_elementorModules$Vie) { | |
| 815 | +var ExperimentsModule = /*#__PURE__*/function (_elementorModules$Vie) { | |
| 816 | + (0, _inherits2.default)(ExperimentsModule, _elementorModules$Vie); | |
| 817 | + | |
| 818 | + var _super = _createSuper(ExperimentsModule); | |
| 819 | + | |
| 2605 | 820 | function ExperimentsModule() { |
| 2606 | 821 | (0, _classCallCheck2.default)(this, ExperimentsModule); |
| 2607 | - return _callSuper(this, ExperimentsModule, arguments); | |
| 822 | + return _super.apply(this, arguments); | |
| 2608 | 823 | } |
| 2609 | - (0, _inherits2.default)(ExperimentsModule, _elementorModules$Vie); | |
| 2610 | - return (0, _createClass2.default)(ExperimentsModule, [{ | |
| 824 | + | |
| 825 | + (0, _createClass2.default)(ExperimentsModule, [{ | |
| 2611 | 826 | key: "getDefaultSettings", |
| 2612 | 827 | value: function getDefaultSettings() { |
| 2613 | 828 | return { |
| 2614 | 829 | selectors: { |
| @@ -2622,9 +837,10 @@ | ||
| 2622 | 837 | }, { |
| 2623 | 838 | key: "getDefaultElements", |
| 2624 | 839 | value: function getDefaultElements() { |
| 2625 | 840 | var _this$getSettings = this.getSettings(), |
| 2626 | - selectors = _this$getSettings.selectors; | |
| 841 | + selectors = _this$getSettings.selectors; | |
| 842 | + | |
| 2627 | 843 | return { |
| 2628 | 844 | $experimentIndicators: jQuery(selectors.experimentIndicators), |
| 2629 | 845 | $experimentForm: jQuery(selectors.experimentForm), |
| 2630 | 846 | $experimentSelects: jQuery(selectors.experimentSelects), |
| @@ -2634,8 +850,9 @@ | ||
| 2634 | 850 | }, { |
| 2635 | 851 | key: "bindEvents", |
| 2636 | 852 | value: function bindEvents() { |
| 2637 | 853 | var _this = this; |
| 854 | + | |
| 2638 | 855 | this.elements.$experimentsButtons.on('click', function (event) { |
| 2639 | 856 | return _this.onExperimentsButtonsClick(event); |
| 2640 | 857 | }); |
| 2641 | 858 | } |
| @@ -2660,8 +877,9 @@ | ||
| 2660 | 877 | }, { |
| 2661 | 878 | key: "addIndicatorsTooltips", |
| 2662 | 879 | value: function addIndicatorsTooltips() { |
| 2663 | 880 | var _this2 = this; |
| 881 | + | |
| 2664 | 882 | this.elements.$experimentIndicators.each(function (index, experimentIndicator) { |
| 2665 | 883 | return _this2.addTipsy(jQuery(experimentIndicator)); |
| 2666 | 884 | }); |
| 2667 | 885 | } |
| @@ -2668,29 +886,31 @@ | ||
| 2668 | 886 | }, { |
| 2669 | 887 | key: "onInit", |
| 2670 | 888 | value: function onInit() { |
| 2671 | 889 | var _this3 = this; |
| 2672 | - _superPropGet(ExperimentsModule, "onInit", this, 3)([]); | |
| 2673 | - this.experimentsDependency = new _experimentsMessages.default({ | |
| 2674 | - selects: this.elements.$experimentSelects.toArray(), | |
| 2675 | - submit: this.elements.$experimentForm.find('#submit').get(0) | |
| 2676 | - }); | |
| 2677 | - this.experimentsDependency.bindEvents(); | |
| 890 | + | |
| 891 | + (0, _get2.default)((0, _getPrototypeOf2.default)(ExperimentsModule.prototype), "onInit", this).call(this); | |
| 892 | + | |
| 2678 | 893 | if (this.elements.$experimentIndicators.length) { |
| 2679 | - import(/* webpackIgnore: true */"".concat(elementorCommon.config.urls.assets, "lib/tipsy/tipsy.min.js?ver=1.0.0")).then(function () { | |
| 894 | + import( | |
| 895 | + /* webpackIgnore: true */ | |
| 896 | + "".concat(elementorCommon.config.urls.assets, "lib/tipsy/tipsy.min.js?ver=1.0.0")).then(function () { | |
| 2680 | 897 | return _this3.addIndicatorsTooltips(); |
| 2681 | 898 | }); |
| 2682 | 899 | } |
| 2683 | 900 | } |
| 2684 | 901 | }]); |
| 902 | + return ExperimentsModule; | |
| 2685 | 903 | }(elementorModules.ViewModule); |
| 2686 | 904 | |
| 905 | +exports["default"] = ExperimentsModule; | |
| 906 | + | |
| 2687 | 907 | /***/ }), |
| 2688 | 908 | |
| 2689 | -/***/ "../modules/floating-buttons/assets/js/floating-buttons/admin/floating-buttons.js": | |
| 2690 | -/*!****************************************************************************************!*\ | |
| 2691 | - !*** ../modules/floating-buttons/assets/js/floating-buttons/admin/floating-buttons.js ***! | |
| 2692 | - \****************************************************************************************/ | |
| 909 | +/***/ "../modules/landing-pages/assets/js/admin/landing-pages.js": | |
| 910 | +/*!*****************************************************************!*\ | |
| 911 | + !*** ../modules/landing-pages/assets/js/admin/landing-pages.js ***! | |
| 912 | + \*****************************************************************/ | |
| 2693 | 913 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 2694 | 914 | |
| 2695 | 915 | "use strict"; |
| 2696 | 916 | |
| @@ -2695,174 +915,51 @@ | ||
| 2695 | 915 | "use strict"; |
| 2696 | 916 | |
| 2697 | 917 | |
| 2698 | 918 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 919 | + | |
| 2699 | 920 | Object.defineProperty(exports, "__esModule", ({ |
| 2700 | 921 | value: true |
| 2701 | 922 | })); |
| 2702 | 923 | exports["default"] = void 0; |
| 924 | + | |
| 2703 | 925 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 926 | + | |
| 2704 | 927 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2705 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2706 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 928 | + | |
| 2707 | 929 | var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); |
| 930 | + | |
| 2708 | 931 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 2709 | -var _menuHandler = _interopRequireDefault(__webpack_require__(/*! elementor-admin/menu-handler */ "../assets/dev/js/admin/menu-handler.js")); | |
| 2710 | -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)); } | |
| 2711 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2712 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 2713 | -var FloatingButtonsHandler = exports["default"] = /*#__PURE__*/function (_AdminMenuHandler) { | |
| 2714 | - function FloatingButtonsHandler() { | |
| 2715 | - (0, _classCallCheck2.default)(this, FloatingButtonsHandler); | |
| 2716 | - return _callSuper(this, FloatingButtonsHandler, arguments); | |
| 2717 | - } | |
| 2718 | - (0, _inherits2.default)(FloatingButtonsHandler, _AdminMenuHandler); | |
| 2719 | - return (0, _createClass2.default)(FloatingButtonsHandler, [{ | |
| 2720 | - key: "getDefaultSettings", | |
| 2721 | - value: function getDefaultSettings() { | |
| 2722 | - var pageName = 'e-floating-buttons', | |
| 2723 | - adminMenuSelectors = { | |
| 2724 | - // The escaping is done because jQuery requires it for selectors. | |
| 2725 | - contactPagesTablePage: 'a[href="edit.php?post_type=' + pageName + '"]', | |
| 2726 | - contactPagesAddNewPage: 'a[href="edit.php?post_type=elementor_library&page=' + pageName + '"]' | |
| 2727 | - }; | |
| 2728 | - return { | |
| 2729 | - selectors: { | |
| 2730 | - addButton: '.page-title-action:first', | |
| 2731 | - templatesMenuItem: '.menu-icon-elementor_library', | |
| 2732 | - contactPagesMenuItem: "".concat(adminMenuSelectors.contactPagesTablePage, ", ").concat(adminMenuSelectors.contactPagesAddNewPage) | |
| 2733 | - } | |
| 2734 | - }; | |
| 2735 | - } | |
| 2736 | - }, { | |
| 2737 | - key: "getDefaultElements", | |
| 2738 | - value: function getDefaultElements() { | |
| 2739 | - var selectors = this.getSettings('selectors'), | |
| 2740 | - elements = _superPropGet(FloatingButtonsHandler, "getDefaultElements", this, 3)([]); | |
| 2741 | - elements.$templatesMenuItem = jQuery(selectors.templatesMenuItem); | |
| 2742 | - elements.$contactPagesMenuItem = jQuery(selectors.contactPagesMenuItem); | |
| 2743 | - return elements; | |
| 2744 | - } | |
| 2745 | - }, { | |
| 2746 | - key: "onInit", | |
| 2747 | - value: function onInit() { | |
| 2748 | - var _elementorAdminConfig; | |
| 2749 | - _superPropGet(FloatingButtonsHandler, "onInit", this, 3)([]); | |
| 2750 | - var settings = this.getSettings(), | |
| 2751 | - isContactPagesTablePage = !!window.location.href.includes(settings.paths.contactPagesTablePage), | |
| 2752 | - isContactPagesTrashPage = !!window.location.href.includes(settings.paths.contactPagesTrashPage), | |
| 2753 | - isLContactPagesCreateYourFirstPage = !!window.location.href.includes(settings.paths.contactPagesAddNewPage); | |
| 2754 | 932 | |
| 2755 | - // We need this because there is a complex bug in the WordPress admin menu that causes the Contact Menu to be broken | |
| 2756 | - // When the links page has at least one post and the contact page has none. | |
| 2757 | - if ((_elementorAdminConfig = elementorAdminConfig.urls) !== null && _elementorAdminConfig !== void 0 && _elementorAdminConfig.viewContactPageUrl) { | |
| 2758 | - this.elements.$templatesMenuItem.find('li.submenu-e-contact a').attr('href', elementorAdminConfig.urls.viewContactPageUrl); | |
| 2759 | - } | |
| 2760 | - if (isContactPagesTablePage || isContactPagesTrashPage || isLContactPagesCreateYourFirstPage) { | |
| 2761 | - this.highlightTopLevelMenuItem(this.elements.$templatesMenuItem, this.elements.$pagesMenuItemAndLink); | |
| 2762 | - this.highlightSubMenuItem(this.elements.$contactPagesMenuItem); | |
| 2763 | - jQuery(settings.selectors.addButton).attr('href', elementorAdminConfig.urls.addNewLinkUrlContact); | |
| 2764 | - } | |
| 2765 | - } | |
| 2766 | - }]); | |
| 2767 | -}(_menuHandler.default); | |
| 933 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2768 | 934 | |
| 2769 | -/***/ }), | |
| 2770 | - | |
| 2771 | -/***/ "../modules/floating-buttons/assets/js/floating-buttons/admin/module.js": | |
| 2772 | -/*!******************************************************************************!*\ | |
| 2773 | - !*** ../modules/floating-buttons/assets/js/floating-buttons/admin/module.js ***! | |
| 2774 | - \******************************************************************************/ | |
| 2775 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2776 | - | |
| 2777 | -"use strict"; | |
| 2778 | - | |
| 2779 | - | |
| 2780 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2781 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2782 | - value: true | |
| 2783 | -})); | |
| 2784 | -exports["default"] = void 0; | |
| 2785 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2786 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2787 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2788 | 935 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2789 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2790 | -var _floatingButtons = _interopRequireDefault(__webpack_require__(/*! ./floating-buttons */ "../modules/floating-buttons/assets/js/floating-buttons/admin/floating-buttons.js")); | |
| 2791 | -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)); } | |
| 2792 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2793 | -var _default = exports["default"] = /*#__PURE__*/function (_elementorModules$Mod) { | |
| 2794 | - function _default() { | |
| 2795 | - var _this; | |
| 2796 | - (0, _classCallCheck2.default)(this, _default); | |
| 2797 | - _this = _callSuper(this, _default); | |
| 2798 | - elementorCommon.elements.$window.on('elementor/admin/init', function () { | |
| 2799 | - _this.runHandler(); | |
| 2800 | - }); | |
| 2801 | - return _this; | |
| 2802 | - } | |
| 2803 | - (0, _inherits2.default)(_default, _elementorModules$Mod); | |
| 2804 | - return (0, _createClass2.default)(_default, [{ | |
| 2805 | - key: "runHandler", | |
| 2806 | - value: function runHandler() { | |
| 2807 | - var pageNameContact = 'e-floating-buttons', | |
| 2808 | - paths = { | |
| 2809 | - contactPagesTablePage: 'edit.php?post_type=' + pageNameContact, | |
| 2810 | - contactPagesAddNewPage: 'edit.php?post_type=elementor_library&page=' + pageNameContact, | |
| 2811 | - contactPagesTrashPage: 'edit.php?post_status=trash&post_type=' + pageNameContact | |
| 2812 | - }, | |
| 2813 | - args = { | |
| 2814 | - paths: paths | |
| 2815 | - }; | |
| 2816 | 936 | |
| 2817 | - // This class modifies elements in the WordPress admin that are rendered "wrong" by the WordPress core | |
| 2818 | - // and could not be modified in the backend. | |
| 2819 | - new _floatingButtons.default(args); | |
| 2820 | - } | |
| 2821 | - }]); | |
| 2822 | -}(elementorModules.Module); | |
| 937 | +var _menuHandler = _interopRequireDefault(__webpack_require__(/*! elementor-admin/menu-handler */ "../assets/dev/js/admin/menu-handler.js")); | |
| 2823 | 938 | |
| 2824 | -/***/ }), | |
| 939 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 2825 | 940 | |
| 2826 | -/***/ "../modules/landing-pages/assets/js/admin/landing-pages.js": | |
| 2827 | -/*!*****************************************************************!*\ | |
| 2828 | - !*** ../modules/landing-pages/assets/js/admin/landing-pages.js ***! | |
| 2829 | - \*****************************************************************/ | |
| 2830 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 941 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 2831 | 942 | |
| 2832 | -"use strict"; | |
| 943 | +var LandingPagesHandler = /*#__PURE__*/function (_AdminMenuHandler) { | |
| 944 | + (0, _inherits2.default)(LandingPagesHandler, _AdminMenuHandler); | |
| 2833 | 945 | |
| 946 | + var _super = _createSuper(LandingPagesHandler); | |
| 2834 | 947 | |
| 2835 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2836 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2837 | - value: true | |
| 2838 | -})); | |
| 2839 | -exports["default"] = void 0; | |
| 2840 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2841 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2842 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2843 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2844 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 2845 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2846 | -var _menuHandler = _interopRequireDefault(__webpack_require__(/*! elementor-admin/menu-handler */ "../assets/dev/js/admin/menu-handler.js")); | |
| 2847 | -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)); } | |
| 2848 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2849 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 2850 | -var LandingPagesHandler = exports["default"] = /*#__PURE__*/function (_AdminMenuHandler) { | |
| 2851 | 948 | function LandingPagesHandler() { |
| 2852 | 949 | (0, _classCallCheck2.default)(this, LandingPagesHandler); |
| 2853 | - return _callSuper(this, LandingPagesHandler, arguments); | |
| 950 | + return _super.apply(this, arguments); | |
| 2854 | 951 | } |
| 2855 | - (0, _inherits2.default)(LandingPagesHandler, _AdminMenuHandler); | |
| 2856 | - return (0, _createClass2.default)(LandingPagesHandler, [{ | |
| 952 | + | |
| 953 | + (0, _createClass2.default)(LandingPagesHandler, [{ | |
| 2857 | 954 | key: "getDefaultSettings", |
| 2858 | 955 | value: function getDefaultSettings() { |
| 2859 | 956 | var pageName = 'e-landing-page', |
| 2860 | - adminMenuSelectors = { | |
| 2861 | - // The escaping is done because jQuery requires it for selectors. | |
| 2862 | - landingPagesTablePage: 'a[href="edit.php?post_type=' + pageName + '"]', | |
| 2863 | - landingPagesAddNewPage: 'a[href="edit.php?post_type=elementor_library&page=' + pageName + '"]' | |
| 2864 | - }; | |
| 957 | + adminMenuSelectors = { | |
| 958 | + // The escaping is done because jQuery requires it for selectors. | |
| 959 | + landingPagesTablePage: 'a[href=\"edit.php?post_type=' + pageName + '\"]', | |
| 960 | + landingPagesAddNewPage: 'a[href=\"edit.php?post_type=elementor_library&page=' + pageName + '\"]' | |
| 961 | + }; | |
| 2865 | 962 | return { |
| 2866 | 963 | selectors: { |
| 2867 | 964 | addButton: '.page-title-action:first', |
| 2868 | 965 | pagesMenuItemAndLink: '#menu-pages, #menu-pages > a', |
| @@ -2874,9 +971,9 @@ | ||
| 2874 | 971 | }, { |
| 2875 | 972 | key: "getDefaultElements", |
| 2876 | 973 | value: function getDefaultElements() { |
| 2877 | 974 | var selectors = this.getSettings('selectors'), |
| 2878 | - elements = _superPropGet(LandingPagesHandler, "getDefaultElements", this, 3)([]); | |
| 975 | + elements = (0, _get2.default)((0, _getPrototypeOf2.default)(LandingPagesHandler.prototype), "getDefaultElements", this).call(this); | |
| 2879 | 976 | elements.$landingPagesMenuItem = jQuery(selectors.landingPagesMenuItem); |
| 2880 | 977 | elements.$templatesMenuItem = jQuery(selectors.templatesMenuItem); |
| 2881 | 978 | elements.$pagesMenuItemAndLink = jQuery(selectors.pagesMenuItemAndLink); |
| 2882 | 979 | return elements; |
| @@ -2883,28 +980,29 @@ | ||
| 2883 | 980 | } |
| 2884 | 981 | }, { |
| 2885 | 982 | key: "onInit", |
| 2886 | 983 | value: function onInit() { |
| 2887 | - _superPropGet(LandingPagesHandler, "onInit", this, 3)([]); | |
| 984 | + (0, _get2.default)((0, _getPrototypeOf2.default)(LandingPagesHandler.prototype), "onInit", this).call(this); | |
| 2888 | 985 | var settings = this.getSettings(), |
| 2889 | - isLandingPagesTablePage = !!window.location.href.includes(settings.paths.landingPagesTablePage), | |
| 2890 | - isLandingPagesTrashPage = !!window.location.href.includes(settings.paths.landingPagesTrashPage), | |
| 2891 | - isLandingPagesCreateYourFirstPage = !!window.location.href.includes(settings.paths.landingPagesAddNewPage); | |
| 986 | + isLandingPagesTablePage = !!window.location.href.includes(settings.paths.landingPagesTablePage), | |
| 987 | + isLandingPagesTrashPage = !!window.location.href.includes(settings.paths.landingPagesTrashPage), | |
| 988 | + isLandingPagesCreateYourFirstPage = !!window.location.href.includes(settings.paths.landingPagesAddNewPage); // If the current page is a Landing Pages Page (the Posts Table page, "Create Your First.." page, or a native | |
| 989 | + // WordPress dashboard page edit screen when using WordPress' Classic Editor). | |
| 2892 | 990 | |
| 2893 | - // If the current page is a Landing Pages Page (the Posts Table page, "Create Your First.." page, or a native | |
| 2894 | - // WordPress dashboard page edit screen when using WordPress' Classic Editor). | |
| 2895 | 991 | if (isLandingPagesTablePage || isLandingPagesTrashPage || isLandingPagesCreateYourFirstPage || settings.isLandingPageAdminEdit) { |
| 2896 | 992 | // Make sure the active admin top level menu item is 'Templates', and not 'Pages'. |
| 2897 | 993 | this.highlightTopLevelMenuItem(this.elements.$templatesMenuItem, this.elements.$pagesMenuItemAndLink); |
| 2898 | - this.highlightSubMenuItem(this.elements.$landingPagesMenuItem); | |
| 994 | + this.highlightSubMenuItem(this.elements.$landingPagesMenuItem); // Overwrite the 'Add New' button at the top of the page to open in Elementor with the library module open. | |
| 2899 | 995 | |
| 2900 | - // Overwrite the 'Add New' button at the top of the page to open in Elementor with the library module open. | |
| 2901 | 996 | jQuery(settings.selectors.addButton).attr('href', elementorAdminConfig.urls.addNewLandingPageUrl); |
| 2902 | 997 | } |
| 2903 | 998 | } |
| 2904 | 999 | }]); |
| 1000 | + return LandingPagesHandler; | |
| 2905 | 1001 | }(_menuHandler.default); |
| 2906 | 1002 | |
| 1003 | +exports["default"] = LandingPagesHandler; | |
| 1004 | + | |
| 2907 | 1005 | /***/ }), |
| 2908 | 1006 | |
| 2909 | 1007 | /***/ "../modules/landing-pages/assets/js/admin/module.js": |
| 2910 | 1008 | /*!**********************************************************!*\ |
| @@ -2915,822 +1013,74 @@ | ||
| 2915 | 1013 | "use strict"; |
| 2916 | 1014 | |
| 2917 | 1015 | |
| 2918 | 1016 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1017 | + | |
| 2919 | 1018 | Object.defineProperty(exports, "__esModule", ({ |
| 2920 | 1019 | value: true |
| 2921 | 1020 | })); |
| 2922 | 1021 | exports["default"] = void 0; |
| 1022 | + | |
| 2923 | 1023 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1024 | + | |
| 2924 | 1025 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1026 | + | |
| 1027 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1028 | + | |
| 2925 | 1029 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1030 | + | |
| 2926 | 1031 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2927 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1032 | + | |
| 2928 | 1033 | var _landingPages = _interopRequireDefault(__webpack_require__(/*! ./landing-pages */ "../modules/landing-pages/assets/js/admin/landing-pages.js")); |
| 2929 | -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)); } | |
| 2930 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2931 | -var _default = exports["default"] = /*#__PURE__*/function (_elementorModules$Mod) { | |
| 1034 | + | |
| 1035 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 1036 | + | |
| 1037 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 1038 | + | |
| 1039 | +var _default = /*#__PURE__*/function (_elementorModules$Mod) { | |
| 1040 | + (0, _inherits2.default)(_default, _elementorModules$Mod); | |
| 1041 | + | |
| 1042 | + var _super = _createSuper(_default); | |
| 1043 | + | |
| 2932 | 1044 | function _default() { |
| 2933 | 1045 | var _this; |
| 1046 | + | |
| 2934 | 1047 | (0, _classCallCheck2.default)(this, _default); |
| 2935 | - _this = _callSuper(this, _default); | |
| 1048 | + _this = _super.call(this); | |
| 2936 | 1049 | elementorCommon.elements.$window.on('elementor/admin/init', function () { |
| 2937 | 1050 | _this.runHandler(); |
| 2938 | 1051 | }); |
| 2939 | 1052 | return _this; |
| 2940 | 1053 | } |
| 2941 | - (0, _inherits2.default)(_default, _elementorModules$Mod); | |
| 2942 | - return (0, _createClass2.default)(_default, [{ | |
| 1054 | + | |
| 1055 | + (0, _createClass2.default)(_default, [{ | |
| 2943 | 1056 | key: "runHandler", |
| 2944 | 1057 | value: function runHandler() { |
| 2945 | 1058 | var _elementorAdmin$confi, _elementorAdmin$confi2; |
| 1059 | + | |
| 2946 | 1060 | var pageName = 'e-landing-page', |
| 2947 | - paths = { | |
| 2948 | - landingPagesTablePage: 'edit.php?post_type=' + pageName, | |
| 2949 | - landingPagesAddNewPage: 'edit.php?post_type=elementor_library&page=' + pageName, | |
| 2950 | - landingPagesTrashPage: 'edit.php?post_status=trash&post_type=' + pageName | |
| 2951 | - }, | |
| 2952 | - args = { | |
| 2953 | - path: (_elementorAdmin$confi = elementorAdmin.config.landingPages) !== null && _elementorAdmin$confi !== void 0 && _elementorAdmin$confi.landingPagesHasPages ? paths.landingPagesTablePage : paths.landingPagesAddNewPage, | |
| 2954 | - isLandingPageAdminEdit: (_elementorAdmin$confi2 = elementorAdmin.config.landingPages) === null || _elementorAdmin$confi2 === void 0 ? void 0 : _elementorAdmin$confi2.isLandingPageAdminEdit, | |
| 2955 | - paths: paths | |
| 2956 | - }; | |
| 1061 | + paths = { | |
| 1062 | + landingPagesTablePage: 'edit.php?post_type=' + pageName, | |
| 1063 | + landingPagesAddNewPage: 'edit.php?post_type=elementor_library&page=' + pageName, | |
| 1064 | + landingPagesTrashPage: 'edit.php?post_status=trash&post_type=' + pageName | |
| 1065 | + }, | |
| 1066 | + args = { | |
| 1067 | + path: (_elementorAdmin$confi = elementorAdmin.config.landingPages) !== null && _elementorAdmin$confi !== void 0 && _elementorAdmin$confi.landingPagesHasPages ? paths.landingPagesTablePage : paths.landingPagesAddNewPage, | |
| 1068 | + isLandingPageAdminEdit: (_elementorAdmin$confi2 = elementorAdmin.config.landingPages) === null || _elementorAdmin$confi2 === void 0 ? void 0 : _elementorAdmin$confi2.isLandingPageAdminEdit, | |
| 1069 | + paths: paths | |
| 1070 | + }; // This class modifies elements in the WordPress admin that are rendered "wrong" by the WordPress core | |
| 1071 | + // and could not be modified in the backend. | |
| 2957 | 1072 | |
| 2958 | - // This class modifies elements in the WordPress admin that are rendered "wrong" by the WordPress core | |
| 2959 | - // and could not be modified in the backend. | |
| 2960 | 1073 | new _landingPages.default(args); |
| 2961 | 1074 | } |
| 2962 | 1075 | }]); |
| 1076 | + return _default; | |
| 2963 | 1077 | }(elementorModules.Module); |
| 2964 | 1078 | |
| 2965 | -/***/ }), | |
| 1079 | +exports["default"] = _default; | |
| 2966 | 1080 | |
| 2967 | -/***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js": | |
| 2968 | -/*!***************************************************************!*\ | |
| 2969 | - !*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***! | |
| 2970 | - \***************************************************************/ | |
| 2971 | -/***/ ((module) => { | |
| 2972 | - | |
| 2973 | -function _OverloadYield(e, d) { | |
| 2974 | - this.v = e, this.k = d; | |
| 2975 | -} | |
| 2976 | -module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2977 | - | |
| 2978 | 1081 | /***/ }), |
| 2979 | 1082 | |
| 2980 | -/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 2981 | -/*!******************************************************************!*\ | |
| 2982 | - !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 2983 | - \******************************************************************/ | |
| 2984 | -/***/ ((module) => { | |
| 2985 | - | |
| 2986 | -function _arrayLikeToArray(r, a) { | |
| 2987 | - (null == a || a > r.length) && (a = r.length); | |
| 2988 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 2989 | - return n; | |
| 2990 | -} | |
| 2991 | -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2992 | - | |
| 2993 | -/***/ }), | |
| 2994 | - | |
| 2995 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 2996 | -/*!****************************************************************!*\ | |
| 2997 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 2998 | - \****************************************************************/ | |
| 2999 | -/***/ ((module) => { | |
| 3000 | - | |
| 3001 | -function _arrayWithHoles(r) { | |
| 3002 | - if (Array.isArray(r)) return r; | |
| 3003 | -} | |
| 3004 | -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3005 | - | |
| 3006 | -/***/ }), | |
| 3007 | - | |
| 3008 | -/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 3009 | -/*!***********************************************************************!*\ | |
| 3010 | - !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 3011 | - \***********************************************************************/ | |
| 3012 | -/***/ ((module) => { | |
| 3013 | - | |
| 3014 | -function _assertThisInitialized(e) { | |
| 3015 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 3016 | - return e; | |
| 3017 | -} | |
| 3018 | -module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3019 | - | |
| 3020 | -/***/ }), | |
| 3021 | - | |
| 3022 | -/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": | |
| 3023 | -/*!******************************************************************!*\ | |
| 3024 | - !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! | |
| 3025 | - \******************************************************************/ | |
| 3026 | -/***/ ((module) => { | |
| 3027 | - | |
| 3028 | -function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 3029 | - try { | |
| 3030 | - var i = n[a](c), | |
| 3031 | - u = i.value; | |
| 3032 | - } catch (n) { | |
| 3033 | - return void e(n); | |
| 3034 | - } | |
| 3035 | - i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 3036 | -} | |
| 3037 | -function _asyncToGenerator(n) { | |
| 3038 | - return function () { | |
| 3039 | - var t = this, | |
| 3040 | - e = arguments; | |
| 3041 | - return new Promise(function (r, o) { | |
| 3042 | - var a = n.apply(t, e); | |
| 3043 | - function _next(n) { | |
| 3044 | - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 3045 | - } | |
| 3046 | - function _throw(n) { | |
| 3047 | - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 3048 | - } | |
| 3049 | - _next(void 0); | |
| 3050 | - }); | |
| 3051 | - }; | |
| 3052 | -} | |
| 3053 | -module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3054 | - | |
| 3055 | -/***/ }), | |
| 3056 | - | |
| 3057 | -/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 3058 | -/*!****************************************************************!*\ | |
| 3059 | - !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 3060 | - \****************************************************************/ | |
| 3061 | -/***/ ((module) => { | |
| 3062 | - | |
| 3063 | -function _classCallCheck(a, n) { | |
| 3064 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 3065 | -} | |
| 3066 | -module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3067 | - | |
| 3068 | -/***/ }), | |
| 3069 | - | |
| 3070 | -/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 3071 | -/*!*************************************************************!*\ | |
| 3072 | - !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 3073 | - \*************************************************************/ | |
| 3074 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3075 | - | |
| 3076 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 3077 | -function _defineProperties(e, r) { | |
| 3078 | - for (var t = 0; t < r.length; t++) { | |
| 3079 | - var o = r[t]; | |
| 3080 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 3081 | - } | |
| 3082 | -} | |
| 3083 | -function _createClass(e, r, t) { | |
| 3084 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 3085 | - writable: !1 | |
| 3086 | - }), e; | |
| 3087 | -} | |
| 3088 | -module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3089 | - | |
| 3090 | -/***/ }), | |
| 3091 | - | |
| 3092 | -/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 3093 | -/*!****************************************************************!*\ | |
| 3094 | - !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 3095 | - \****************************************************************/ | |
| 3096 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3097 | - | |
| 3098 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 3099 | -function _defineProperty(e, r, t) { | |
| 3100 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 3101 | - value: t, | |
| 3102 | - enumerable: !0, | |
| 3103 | - configurable: !0, | |
| 3104 | - writable: !0 | |
| 3105 | - }) : e[r] = t, e; | |
| 3106 | -} | |
| 3107 | -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3108 | - | |
| 3109 | -/***/ }), | |
| 3110 | - | |
| 3111 | -/***/ "../node_modules/@babel/runtime/helpers/get.js": | |
| 3112 | -/*!*****************************************************!*\ | |
| 3113 | - !*** ../node_modules/@babel/runtime/helpers/get.js ***! | |
| 3114 | - \*****************************************************/ | |
| 3115 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3116 | - | |
| 3117 | -var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js"); | |
| 3118 | -function _get() { | |
| 3119 | - return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { | |
| 3120 | - var p = superPropBase(e, t); | |
| 3121 | - if (p) { | |
| 3122 | - var n = Object.getOwnPropertyDescriptor(p, t); | |
| 3123 | - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; | |
| 3124 | - } | |
| 3125 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); | |
| 3126 | -} | |
| 3127 | -module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3128 | - | |
| 3129 | -/***/ }), | |
| 3130 | - | |
| 3131 | -/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 3132 | -/*!****************************************************************!*\ | |
| 3133 | - !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 3134 | - \****************************************************************/ | |
| 3135 | -/***/ ((module) => { | |
| 3136 | - | |
| 3137 | -function _getPrototypeOf(t) { | |
| 3138 | - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 3139 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 3140 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 3141 | -} | |
| 3142 | -module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3143 | - | |
| 3144 | -/***/ }), | |
| 3145 | - | |
| 3146 | -/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 3147 | -/*!**********************************************************!*\ | |
| 3148 | - !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 3149 | - \**********************************************************/ | |
| 3150 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3151 | - | |
| 3152 | -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 3153 | -function _inherits(t, e) { | |
| 3154 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 3155 | - t.prototype = Object.create(e && e.prototype, { | |
| 3156 | - constructor: { | |
| 3157 | - value: t, | |
| 3158 | - writable: !0, | |
| 3159 | - configurable: !0 | |
| 3160 | - } | |
| 3161 | - }), Object.defineProperty(t, "prototype", { | |
| 3162 | - writable: !1 | |
| 3163 | - }), e && setPrototypeOf(t, e); | |
| 3164 | -} | |
| 3165 | -module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3166 | - | |
| 3167 | -/***/ }), | |
| 3168 | - | |
| 3169 | -/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 3170 | -/*!***********************************************************************!*\ | |
| 3171 | - !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 3172 | - \***********************************************************************/ | |
| 3173 | -/***/ ((module) => { | |
| 3174 | - | |
| 3175 | -function _interopRequireDefault(e) { | |
| 3176 | - return e && e.__esModule ? e : { | |
| 3177 | - "default": e | |
| 3178 | - }; | |
| 3179 | -} | |
| 3180 | -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3181 | - | |
| 3182 | -/***/ }), | |
| 3183 | - | |
| 3184 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 3185 | -/*!**********************************************************************!*\ | |
| 3186 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 3187 | - \**********************************************************************/ | |
| 3188 | -/***/ ((module) => { | |
| 3189 | - | |
| 3190 | -function _iterableToArrayLimit(r, l) { | |
| 3191 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 3192 | - if (null != t) { | |
| 3193 | - var e, | |
| 3194 | - n, | |
| 3195 | - i, | |
| 3196 | - u, | |
| 3197 | - a = [], | |
| 3198 | - f = !0, | |
| 3199 | - o = !1; | |
| 3200 | - try { | |
| 3201 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 3202 | - if (Object(t) !== t) return; | |
| 3203 | - f = !1; | |
| 3204 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 3205 | - } catch (r) { | |
| 3206 | - o = !0, n = r; | |
| 3207 | - } finally { | |
| 3208 | - try { | |
| 3209 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 3210 | - } finally { | |
| 3211 | - if (o) throw n; | |
| 3212 | - } | |
| 3213 | - } | |
| 3214 | - return a; | |
| 3215 | - } | |
| 3216 | -} | |
| 3217 | -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3218 | - | |
| 3219 | -/***/ }), | |
| 3220 | - | |
| 3221 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 3222 | -/*!*****************************************************************!*\ | |
| 3223 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 3224 | - \*****************************************************************/ | |
| 3225 | -/***/ ((module) => { | |
| 3226 | - | |
| 3227 | -function _nonIterableRest() { | |
| 3228 | - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 3229 | -} | |
| 3230 | -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3231 | - | |
| 3232 | -/***/ }), | |
| 3233 | - | |
| 3234 | -/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 3235 | -/*!***************************************************************************!*\ | |
| 3236 | - !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 3237 | - \***************************************************************************/ | |
| 3238 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3239 | - | |
| 3240 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3241 | -var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 3242 | -function _possibleConstructorReturn(t, e) { | |
| 3243 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 3244 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 3245 | - return assertThisInitialized(t); | |
| 3246 | -} | |
| 3247 | -module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3248 | - | |
| 3249 | -/***/ }), | |
| 3250 | - | |
| 3251 | -/***/ "../node_modules/@babel/runtime/helpers/regenerator.js": | |
| 3252 | -/*!*************************************************************!*\ | |
| 3253 | - !*** ../node_modules/@babel/runtime/helpers/regenerator.js ***! | |
| 3254 | - \*************************************************************/ | |
| 3255 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3256 | - | |
| 3257 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 3258 | -function _regenerator() { | |
| 3259 | - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 3260 | - var e, | |
| 3261 | - t, | |
| 3262 | - r = "function" == typeof Symbol ? Symbol : {}, | |
| 3263 | - n = r.iterator || "@@iterator", | |
| 3264 | - o = r.toStringTag || "@@toStringTag"; | |
| 3265 | - function i(r, n, o, i) { | |
| 3266 | - var c = n && n.prototype instanceof Generator ? n : Generator, | |
| 3267 | - u = Object.create(c.prototype); | |
| 3268 | - return regeneratorDefine(u, "_invoke", function (r, n, o) { | |
| 3269 | - var i, | |
| 3270 | - c, | |
| 3271 | - u, | |
| 3272 | - f = 0, | |
| 3273 | - p = o || [], | |
| 3274 | - y = !1, | |
| 3275 | - G = { | |
| 3276 | - p: 0, | |
| 3277 | - n: 0, | |
| 3278 | - v: e, | |
| 3279 | - a: d, | |
| 3280 | - f: d.bind(e, 4), | |
| 3281 | - d: function d(t, r) { | |
| 3282 | - return i = t, c = 0, u = e, G.n = r, a; | |
| 3283 | - } | |
| 3284 | - }; | |
| 3285 | - function d(r, n) { | |
| 3286 | - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 3287 | - var o, | |
| 3288 | - i = p[t], | |
| 3289 | - d = G.p, | |
| 3290 | - l = i[2]; | |
| 3291 | - r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); | |
| 3292 | - } | |
| 3293 | - if (o || r > 1) return a; | |
| 3294 | - throw y = !0, n; | |
| 3295 | - } | |
| 3296 | - return function (o, p, l) { | |
| 3297 | - if (f > 1) throw TypeError("Generator is already running"); | |
| 3298 | - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 3299 | - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 3300 | - try { | |
| 3301 | - if (f = 2, i) { | |
| 3302 | - if (c || (o = "next"), t = i[o]) { | |
| 3303 | - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 3304 | - if (!t.done) return t; | |
| 3305 | - u = t.value, c < 2 && (c = 0); | |
| 3306 | - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 3307 | - i = e; | |
| 3308 | - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 3309 | - } catch (t) { | |
| 3310 | - i = e, c = 1, u = t; | |
| 3311 | - } finally { | |
| 3312 | - f = 1; | |
| 3313 | - } | |
| 3314 | - } | |
| 3315 | - return { | |
| 3316 | - value: t, | |
| 3317 | - done: y | |
| 3318 | - }; | |
| 3319 | - }; | |
| 3320 | - }(r, o, i), !0), u; | |
| 3321 | - } | |
| 3322 | - var a = {}; | |
| 3323 | - function Generator() {} | |
| 3324 | - function GeneratorFunction() {} | |
| 3325 | - function GeneratorFunctionPrototype() {} | |
| 3326 | - t = Object.getPrototypeOf; | |
| 3327 | - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { | |
| 3328 | - return this; | |
| 3329 | - }), t), | |
| 3330 | - u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 3331 | - function f(e) { | |
| 3332 | - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 3333 | - } | |
| 3334 | - return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () { | |
| 3335 | - return this; | |
| 3336 | - }), regeneratorDefine(u, "toString", function () { | |
| 3337 | - return "[object Generator]"; | |
| 3338 | - }), (module.exports = _regenerator = function _regenerator() { | |
| 3339 | - return { | |
| 3340 | - w: i, | |
| 3341 | - m: f | |
| 3342 | - }; | |
| 3343 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 3344 | -} | |
| 3345 | -module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3346 | - | |
| 3347 | -/***/ }), | |
| 3348 | - | |
| 3349 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js": | |
| 3350 | -/*!******************************************************************!*\ | |
| 3351 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsync.js ***! | |
| 3352 | - \******************************************************************/ | |
| 3353 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3354 | - | |
| 3355 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 3356 | -function _regeneratorAsync(n, e, r, t, o) { | |
| 3357 | - var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 3358 | - return a.next().then(function (n) { | |
| 3359 | - return n.done ? n.value : a.next(); | |
| 3360 | - }); | |
| 3361 | -} | |
| 3362 | -module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3363 | - | |
| 3364 | -/***/ }), | |
| 3365 | - | |
| 3366 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js": | |
| 3367 | -/*!*********************************************************************!*\ | |
| 3368 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js ***! | |
| 3369 | - \*********************************************************************/ | |
| 3370 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3371 | - | |
| 3372 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 3373 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 3374 | -function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 3375 | - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 3376 | -} | |
| 3377 | -module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3378 | - | |
| 3379 | -/***/ }), | |
| 3380 | - | |
| 3381 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js": | |
| 3382 | -/*!**************************************************************************!*\ | |
| 3383 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js ***! | |
| 3384 | - \**************************************************************************/ | |
| 3385 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3386 | - | |
| 3387 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 3388 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 3389 | -function AsyncIterator(t, e) { | |
| 3390 | - function n(r, o, i, f) { | |
| 3391 | - try { | |
| 3392 | - var c = t[r](o), | |
| 3393 | - u = c.value; | |
| 3394 | - return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { | |
| 3395 | - n("next", t, i, f); | |
| 3396 | - }, function (t) { | |
| 3397 | - n("throw", t, i, f); | |
| 3398 | - }) : e.resolve(u).then(function (t) { | |
| 3399 | - c.value = t, i(c); | |
| 3400 | - }, function (t) { | |
| 3401 | - return n("throw", t, i, f); | |
| 3402 | - }); | |
| 3403 | - } catch (t) { | |
| 3404 | - f(t); | |
| 3405 | - } | |
| 3406 | - } | |
| 3407 | - var r; | |
| 3408 | - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { | |
| 3409 | - return this; | |
| 3410 | - })), regeneratorDefine(this, "_invoke", function (t, o, i) { | |
| 3411 | - function f() { | |
| 3412 | - return new e(function (e, r) { | |
| 3413 | - n(t, i, e, r); | |
| 3414 | - }); | |
| 3415 | - } | |
| 3416 | - return r = r ? r.then(f, f) : f(); | |
| 3417 | - }, !0); | |
| 3418 | -} | |
| 3419 | -module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3420 | - | |
| 3421 | -/***/ }), | |
| 3422 | - | |
| 3423 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js": | |
| 3424 | -/*!*******************************************************************!*\ | |
| 3425 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorDefine.js ***! | |
| 3426 | - \*******************************************************************/ | |
| 3427 | -/***/ ((module) => { | |
| 3428 | - | |
| 3429 | -function _regeneratorDefine(e, r, n, t) { | |
| 3430 | - var i = Object.defineProperty; | |
| 3431 | - try { | |
| 3432 | - i({}, "", {}); | |
| 3433 | - } catch (e) { | |
| 3434 | - i = 0; | |
| 3435 | - } | |
| 3436 | - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 3437 | - function o(r, n) { | |
| 3438 | - _regeneratorDefine(e, r, function (e) { | |
| 3439 | - return this._invoke(r, n, e); | |
| 3440 | - }); | |
| 3441 | - } | |
| 3442 | - r ? i ? i(e, r, { | |
| 3443 | - value: n, | |
| 3444 | - enumerable: !t, | |
| 3445 | - configurable: !t, | |
| 3446 | - writable: !t | |
| 3447 | - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 3448 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 3449 | -} | |
| 3450 | -module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3451 | - | |
| 3452 | -/***/ }), | |
| 3453 | - | |
| 3454 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js": | |
| 3455 | -/*!*****************************************************************!*\ | |
| 3456 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorKeys.js ***! | |
| 3457 | - \*****************************************************************/ | |
| 3458 | -/***/ ((module) => { | |
| 3459 | - | |
| 3460 | -function _regeneratorKeys(e) { | |
| 3461 | - var n = Object(e), | |
| 3462 | - r = []; | |
| 3463 | - for (var t in n) r.unshift(t); | |
| 3464 | - return function e() { | |
| 3465 | - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 3466 | - return e.done = !0, e; | |
| 3467 | - }; | |
| 3468 | -} | |
| 3469 | -module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3470 | - | |
| 3471 | -/***/ }), | |
| 3472 | - | |
| 3473 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 3474 | -/*!********************************************************************!*\ | |
| 3475 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 3476 | - \********************************************************************/ | |
| 3477 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3478 | - | |
| 3479 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 3480 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 3481 | -var regeneratorAsync = __webpack_require__(/*! ./regeneratorAsync.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js"); | |
| 3482 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 3483 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 3484 | -var regeneratorKeys = __webpack_require__(/*! ./regeneratorKeys.js */ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js"); | |
| 3485 | -var regeneratorValues = __webpack_require__(/*! ./regeneratorValues.js */ "../node_modules/@babel/runtime/helpers/regeneratorValues.js"); | |
| 3486 | -function _regeneratorRuntime() { | |
| 3487 | - "use strict"; | |
| 3488 | - | |
| 3489 | - var r = regenerator(), | |
| 3490 | - e = r.m(_regeneratorRuntime), | |
| 3491 | - t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 3492 | - function n(r) { | |
| 3493 | - var e = "function" == typeof r && r.constructor; | |
| 3494 | - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 3495 | - } | |
| 3496 | - var o = { | |
| 3497 | - "throw": 1, | |
| 3498 | - "return": 2, | |
| 3499 | - "break": 3, | |
| 3500 | - "continue": 3 | |
| 3501 | - }; | |
| 3502 | - function a(r) { | |
| 3503 | - var e, t; | |
| 3504 | - return function (n) { | |
| 3505 | - e || (e = { | |
| 3506 | - stop: function stop() { | |
| 3507 | - return t(n.a, 2); | |
| 3508 | - }, | |
| 3509 | - "catch": function _catch() { | |
| 3510 | - return n.v; | |
| 3511 | - }, | |
| 3512 | - abrupt: function abrupt(r, e) { | |
| 3513 | - return t(n.a, o[r], e); | |
| 3514 | - }, | |
| 3515 | - delegateYield: function delegateYield(r, o, a) { | |
| 3516 | - return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 3517 | - }, | |
| 3518 | - finish: function finish(r) { | |
| 3519 | - return t(n.f, r); | |
| 3520 | - } | |
| 3521 | - }, t = function t(r, _t, o) { | |
| 3522 | - n.p = e.prev, n.n = e.next; | |
| 3523 | - try { | |
| 3524 | - return r(_t, o); | |
| 3525 | - } finally { | |
| 3526 | - e.next = n.n; | |
| 3527 | - } | |
| 3528 | - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 3529 | - try { | |
| 3530 | - return r.call(this, e); | |
| 3531 | - } finally { | |
| 3532 | - n.p = e.prev, n.n = e.next; | |
| 3533 | - } | |
| 3534 | - }; | |
| 3535 | - } | |
| 3536 | - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 3537 | - return { | |
| 3538 | - wrap: function wrap(e, t, n, o) { | |
| 3539 | - return r.w(a(e), t, n, o && o.reverse()); | |
| 3540 | - }, | |
| 3541 | - isGeneratorFunction: n, | |
| 3542 | - mark: r.m, | |
| 3543 | - awrap: function awrap(r, e) { | |
| 3544 | - return new OverloadYield(r, e); | |
| 3545 | - }, | |
| 3546 | - AsyncIterator: regeneratorAsyncIterator, | |
| 3547 | - async: function async(r, e, t, o, u) { | |
| 3548 | - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 3549 | - }, | |
| 3550 | - keys: regeneratorKeys, | |
| 3551 | - values: regeneratorValues | |
| 3552 | - }; | |
| 3553 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 3554 | -} | |
| 3555 | -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3556 | - | |
| 3557 | -/***/ }), | |
| 3558 | - | |
| 3559 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorValues.js": | |
| 3560 | -/*!*******************************************************************!*\ | |
| 3561 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorValues.js ***! | |
| 3562 | - \*******************************************************************/ | |
| 3563 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3564 | - | |
| 3565 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3566 | -function _regeneratorValues(e) { | |
| 3567 | - if (null != e) { | |
| 3568 | - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], | |
| 3569 | - r = 0; | |
| 3570 | - if (t) return t.call(e); | |
| 3571 | - if ("function" == typeof e.next) return e; | |
| 3572 | - if (!isNaN(e.length)) return { | |
| 3573 | - next: function next() { | |
| 3574 | - return e && r >= e.length && (e = void 0), { | |
| 3575 | - value: e && e[r++], | |
| 3576 | - done: !e | |
| 3577 | - }; | |
| 3578 | - } | |
| 3579 | - }; | |
| 3580 | - } | |
| 3581 | - throw new TypeError(_typeof(e) + " is not iterable"); | |
| 3582 | -} | |
| 3583 | -module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3584 | - | |
| 3585 | -/***/ }), | |
| 3586 | - | |
| 3587 | -/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 3588 | -/*!****************************************************************!*\ | |
| 3589 | - !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 3590 | - \****************************************************************/ | |
| 3591 | -/***/ ((module) => { | |
| 3592 | - | |
| 3593 | -function _setPrototypeOf(t, e) { | |
| 3594 | - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 3595 | - return t.__proto__ = e, t; | |
| 3596 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 3597 | -} | |
| 3598 | -module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3599 | - | |
| 3600 | -/***/ }), | |
| 3601 | - | |
| 3602 | -/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 3603 | -/*!***************************************************************!*\ | |
| 3604 | - !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 3605 | - \***************************************************************/ | |
| 3606 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3607 | - | |
| 3608 | -var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 3609 | -var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 3610 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 3611 | -var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 3612 | -function _slicedToArray(r, e) { | |
| 3613 | - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 3614 | -} | |
| 3615 | -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3616 | - | |
| 3617 | -/***/ }), | |
| 3618 | - | |
| 3619 | -/***/ "../node_modules/@babel/runtime/helpers/superPropBase.js": | |
| 3620 | -/*!***************************************************************!*\ | |
| 3621 | - !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***! | |
| 3622 | - \***************************************************************/ | |
| 3623 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3624 | - | |
| 3625 | -var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); | |
| 3626 | -function _superPropBase(t, o) { | |
| 3627 | - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); | |
| 3628 | - return t; | |
| 3629 | -} | |
| 3630 | -module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3631 | - | |
| 3632 | -/***/ }), | |
| 3633 | - | |
| 3634 | -/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 3635 | -/*!*************************************************************!*\ | |
| 3636 | - !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 3637 | - \*************************************************************/ | |
| 3638 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3639 | - | |
| 3640 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3641 | -function toPrimitive(t, r) { | |
| 3642 | - if ("object" != _typeof(t) || !t) return t; | |
| 3643 | - var e = t[Symbol.toPrimitive]; | |
| 3644 | - if (void 0 !== e) { | |
| 3645 | - var i = e.call(t, r || "default"); | |
| 3646 | - if ("object" != _typeof(i)) return i; | |
| 3647 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 3648 | - } | |
| 3649 | - return ("string" === r ? String : Number)(t); | |
| 3650 | -} | |
| 3651 | -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3652 | - | |
| 3653 | -/***/ }), | |
| 3654 | - | |
| 3655 | -/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 3656 | -/*!***************************************************************!*\ | |
| 3657 | - !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 3658 | - \***************************************************************/ | |
| 3659 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3660 | - | |
| 3661 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3662 | -var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 3663 | -function toPropertyKey(t) { | |
| 3664 | - var i = toPrimitive(t, "string"); | |
| 3665 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 3666 | -} | |
| 3667 | -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3668 | - | |
| 3669 | -/***/ }), | |
| 3670 | - | |
| 3671 | -/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 3672 | -/*!********************************************************!*\ | |
| 3673 | - !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 3674 | - \********************************************************/ | |
| 3675 | -/***/ ((module) => { | |
| 3676 | - | |
| 3677 | -function _typeof(o) { | |
| 3678 | - "@babel/helpers - typeof"; | |
| 3679 | - | |
| 3680 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 3681 | - return typeof o; | |
| 3682 | - } : function (o) { | |
| 3683 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 3684 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 3685 | -} | |
| 3686 | -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3687 | - | |
| 3688 | -/***/ }), | |
| 3689 | - | |
| 3690 | -/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 3691 | -/*!****************************************************************************!*\ | |
| 3692 | - !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 3693 | - \****************************************************************************/ | |
| 3694 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3695 | - | |
| 3696 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 3697 | -function _unsupportedIterableToArray(r, a) { | |
| 3698 | - if (r) { | |
| 3699 | - if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 3700 | - var t = {}.toString.call(r).slice(8, -1); | |
| 3701 | - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0; | |
| 3702 | - } | |
| 3703 | -} | |
| 3704 | -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3705 | - | |
| 3706 | -/***/ }), | |
| 3707 | - | |
| 3708 | -/***/ "../node_modules/@babel/runtime/regenerator/index.js": | |
| 3709 | -/*!***********************************************************!*\ | |
| 3710 | - !*** ../node_modules/@babel/runtime/regenerator/index.js ***! | |
| 3711 | - \***********************************************************/ | |
| 3712 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3713 | - | |
| 3714 | -// TODO(Babel 8): Remove this file. | |
| 3715 | - | |
| 3716 | -var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); | |
| 3717 | -module.exports = runtime; | |
| 3718 | - | |
| 3719 | -// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= | |
| 3720 | -try { | |
| 3721 | - regeneratorRuntime = runtime; | |
| 3722 | -} catch (accidentalStrictMode) { | |
| 3723 | - if (typeof globalThis === "object") { | |
| 3724 | - globalThis.regeneratorRuntime = runtime; | |
| 3725 | - } else { | |
| 3726 | - Function("r", "regeneratorRuntime = r")(runtime); | |
| 3727 | - } | |
| 3728 | -} | |
| 3729 | - | |
| 3730 | - | |
| 3731 | -/***/ }), | |
| 3732 | - | |
| 3733 | 1083 | /***/ "@wordpress/i18n": |
| 3734 | 1084 | /*!**************************!*\ |
| 3735 | 1085 | !*** external "wp.i18n" ***! |
| 3736 | 1086 | \**************************/ |
| @@ -3768,9 +1118,9 @@ | ||
| 3768 | 1118 | /******/ } |
| 3769 | 1119 | /******/ |
| 3770 | 1120 | /************************************************************************/ |
| 3771 | 1121 | var __webpack_exports__ = {}; |
| 3772 | -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 1122 | +// This entry need to be wrapped in an IIFE because it need to be in strict mode. | |
| 3773 | 1123 | (() => { |
| 3774 | 1124 | "use strict"; |
| 3775 | 1125 | /*!***************************************!*\ |
| 3776 | 1126 | !*** ../assets/dev/js/admin/admin.js ***! |
| @@ -3778,20 +1128,21 @@ | ||
| 3778 | 1128 | /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; |
| 3779 | 1129 | |
| 3780 | 1130 | |
| 3781 | 1131 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 3782 | -var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 3783 | -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 1132 | + | |
| 3784 | 1133 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 1134 | + | |
| 3785 | 1135 | var _module = _interopRequireDefault(__webpack_require__(/*! elementor/modules/landing-pages/assets/js/admin/module */ "../modules/landing-pages/assets/js/admin/module.js")); |
| 1136 | + | |
| 3786 | 1137 | var _module2 = _interopRequireDefault(__webpack_require__(/*! elementor/core/experiments/assets/js/admin/module */ "../core/experiments/assets/js/admin/module.js")); |
| 1138 | + | |
| 3787 | 1139 | var _environment = _interopRequireDefault(__webpack_require__(/*! ../../../../core/common/assets/js/utils/environment */ "../core/common/assets/js/utils/environment.js")); |
| 1140 | + | |
| 3788 | 1141 | var _events = _interopRequireDefault(__webpack_require__(/*! elementor-utils/events */ "../assets/dev/js/utils/events.js")); |
| 1142 | + | |
| 3789 | 1143 | var _filesUploadHandler = _interopRequireDefault(__webpack_require__(/*! ../editor/utils/files-upload-handler */ "../assets/dev/js/editor/utils/files-upload-handler.js")); |
| 3790 | -var _templateControls = _interopRequireDefault(__webpack_require__(/*! ./new-template/template-controls.js */ "../assets/dev/js/admin/new-template/template-controls.js")); | |
| 3791 | -var _jsonUploadWarningMessage = __webpack_require__(/*! elementor-utils/json-upload-warning-message */ "../assets/dev/js/utils/json-upload-warning-message.js"); | |
| 3792 | -var _module3 = _interopRequireDefault(__webpack_require__(/*! elementor/modules/floating-buttons/assets/js/floating-buttons/admin/module */ "../modules/floating-buttons/assets/js/floating-buttons/admin/module.js")); | |
| 3793 | -__webpack_require__(/*! elementor-app/event-track/wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js"); | |
| 1144 | + | |
| 3794 | 1145 | (function ($) { |
| 3795 | 1146 | var ElementorAdmin = elementorModules.ViewModule.extend({ |
| 3796 | 1147 | maintenanceMode: null, |
| 3797 | 1148 | config: elementorAdminConfig, |
| @@ -3809,9 +1160,9 @@ | ||
| 3809 | 1160 | $importForm: $('#elementor-import-template-form'), |
| 3810 | 1161 | $importFormFileInput: $('#elementor-import-template-form input[type="file"]'), |
| 3811 | 1162 | $settingsForm: $('#elementor-settings-form'), |
| 3812 | 1163 | $settingsTabsWrapper: $('#elementor-settings-tabs-wrapper'), |
| 3813 | - $menuGoProLink: $('a[href="admin.php?page=go_elementor_pro"]'), | |
| 1164 | + $menuGetHelpLink: $('a[href="admin.php?page=go_knowledge_base_site"]'), | |
| 3814 | 1165 | $reMigrateGlobalsButton: $('.elementor-re-migrate-globals-button') |
| 3815 | 1166 | }; |
| 3816 | 1167 | elements.$settingsFormPages = elements.$settingsForm.find('.elementor-settings-form-page'); |
| 3817 | 1168 | elements.$activeSettingsPage = elements.$settingsFormPages.filter('.elementor-active'); |
| @@ -3826,8 +1177,9 @@ | ||
| 3826 | 1177 | bindEvents: function bindEvents() { |
| 3827 | 1178 | var self = this; |
| 3828 | 1179 | self.elements.$switchModeButton.on('click', function (event) { |
| 3829 | 1180 | event.preventDefault(); |
| 1181 | + | |
| 3830 | 1182 | if (self.isElementorMode()) { |
| 3831 | 1183 | elementorCommon.dialogsManager.createWidget('confirm', { |
| 3832 | 1184 | message: __('Please note that you are switching to WordPress default editor. Your current layout, design and content might break.', 'elementor'), |
| 3833 | 1185 | headerMessage: __('Back to WordPress Editor', 'elementor'), |
| @@ -3843,14 +1195,17 @@ | ||
| 3843 | 1195 | }).show(); |
| 3844 | 1196 | } else { |
| 3845 | 1197 | self.elements.$switchModeInput.val(true); |
| 3846 | 1198 | var $wpTitle = $('#title'); |
| 1199 | + | |
| 3847 | 1200 | if (!$wpTitle.val()) { |
| 3848 | 1201 | $wpTitle.val('Elementor #' + $('#post_ID').val()); |
| 3849 | 1202 | } |
| 1203 | + | |
| 3850 | 1204 | if (wp.autosave) { |
| 3851 | 1205 | wp.autosave.server.triggerSave(); |
| 3852 | 1206 | } |
| 1207 | + | |
| 3853 | 1208 | self.animateLoader(); |
| 3854 | 1209 | $(document).on('heartbeat-tick.autosave', function () { |
| 3855 | 1210 | elementorCommon.elements.$window.off('beforeunload.edit-post'); |
| 3856 | 1211 | location.href = self.elements.$goToEditLink.attr('href'); |
| @@ -3865,10 +1220,9 @@ | ||
| 3865 | 1220 | event.preventDefault(); |
| 3866 | 1221 | var $wrapperElm = $(this).closest('.e-notice--dismissible'); |
| 3867 | 1222 | $.post(ajaxurl, { |
| 3868 | 1223 | action: 'elementor_set_admin_notice_viewed', |
| 3869 | - notice_id: $wrapperElm.data('notice_id'), | |
| 3870 | - _wpnonce: $wrapperElm.data('nonce') | |
| 1224 | + notice_id: $wrapperElm.data('notice_id') | |
| 3871 | 1225 | }); |
| 3872 | 1226 | $wrapperElm.fadeTo(100, 0, function () { |
| 3873 | 1227 | $wrapperElm.slideUp(100, function () { |
| 3874 | 1228 | $wrapperElm.remove(); |
| @@ -3874,34 +1228,8 @@ | ||
| 3874 | 1228 | $wrapperElm.remove(); |
| 3875 | 1229 | }); |
| 3876 | 1230 | }); |
| 3877 | 1231 | }); |
| 3878 | - var campaignNotices = { | |
| 3879 | - plugin_image_optimization: 'elementor_image_optimization_campaign', | |
| 3880 | - site_mailer_promotion: 'elementor_core_site_mailer_campaign' | |
| 3881 | - }; | |
| 3882 | - Object.keys(campaignNotices).forEach(function (noticeId) { | |
| 3883 | - $(".e-notice--cta.e-notice--dismissible[data-notice_id=\"".concat(noticeId, "\"] a.e-button--cta")).on('click', function () { | |
| 3884 | - var $button = $(this); | |
| 3885 | - elementorCommon.ajax.addRequest(campaignNotices[noticeId], { | |
| 3886 | - data: { | |
| 3887 | - campaign: ($button === null || $button === void 0 ? void 0 : $button.data('campaign')) || '', | |
| 3888 | - source: ($button === null || $button === void 0 ? void 0 : $button.data('source')) || '', | |
| 3889 | - medium: ($button === null || $button === void 0 ? void 0 : $button.data('medium')) || '' | |
| 3890 | - } | |
| 3891 | - }); | |
| 3892 | - }); | |
| 3893 | - }); | |
| 3894 | - $('.e-a-apps .e-a-item[data-plugin="image-optimization/image-optimization.php"] a.e-btn').on('click', function () { | |
| 3895 | - var $button = $(this); | |
| 3896 | - elementorCommon.ajax.addRequest('elementor_image_optimization_campaign', { | |
| 3897 | - data: { | |
| 3898 | - campaign: ($button === null || $button === void 0 ? void 0 : $button.data('campaign')) || '', | |
| 3899 | - source: ($button === null || $button === void 0 ? void 0 : $button.data('source')) || '', | |
| 3900 | - medium: ($button === null || $button === void 0 ? void 0 : $button.data('medium')) || '' | |
| 3901 | - } | |
| 3902 | - }); | |
| 3903 | - }); | |
| 3904 | 1232 | $('#elementor-clear-cache-button').on('click', function (event) { |
| 3905 | 1233 | event.preventDefault(); |
| 3906 | 1234 | var $thisButton = $(this); |
| 3907 | 1235 | $thisButton.removeClass('success').addClass('loading'); |
| @@ -3933,10 +1261,12 @@ | ||
| 3933 | 1261 | }).done(function () { |
| 3934 | 1262 | $thisButton.removeClass('loading').addClass('success'); |
| 3935 | 1263 | }).fail(function (_ref) { |
| 3936 | 1264 | var _responseJSON$data; |
| 1265 | + | |
| 3937 | 1266 | var responseJSON = _ref.responseJSON; |
| 3938 | 1267 | $thisButton.removeClass('loading').addClass('error'); |
| 1268 | + | |
| 3939 | 1269 | if ((_responseJSON$data = responseJSON.data) !== null && _responseJSON$data !== void 0 && _responseJSON$data.message) { |
| 3940 | 1270 | $thisButton.after("<div class=\"e-recreate-kit-error-message\">".concat(responseJSON.data.message, "</div>")); |
| 3941 | 1271 | } |
| 3942 | 1272 | }); |
| @@ -3943,11 +1273,11 @@ | ||
| 3943 | 1273 | }); |
| 3944 | 1274 | $('#elementor-replace-url-button').on('click', function (event) { |
| 3945 | 1275 | event.preventDefault(); |
| 3946 | 1276 | var $this = $(this), |
| 3947 | - $tr = $this.parents('tr'), | |
| 3948 | - $from = $tr.find('[name="from"]'), | |
| 3949 | - $to = $tr.find('[name="to"]'); | |
| 1277 | + $tr = $this.parents('tr'), | |
| 1278 | + $from = $tr.find('[name="from"]'), | |
| 1279 | + $to = $tr.find('[name="to"]'); | |
| 3950 | 1280 | $this.removeClass('success').addClass('loading'); |
| 3951 | 1281 | $.post(ajaxurl, { |
| 3952 | 1282 | action: 'elementor_replace_url', |
| 3953 | 1283 | from: $from.val(), |
| @@ -3954,11 +1284,13 @@ | ||
| 3954 | 1284 | to: $to.val(), |
| 3955 | 1285 | _nonce: $this.data('nonce') |
| 3956 | 1286 | }).done(function (response) { |
| 3957 | 1287 | $this.removeClass('loading'); |
| 1288 | + | |
| 3958 | 1289 | if (response.success) { |
| 3959 | 1290 | $this.addClass('success'); |
| 3960 | 1291 | } |
| 1292 | + | |
| 3961 | 1293 | elementorCommon.dialogsManager.createWidget('alert', { |
| 3962 | 1294 | message: response.data |
| 3963 | 1295 | }).show(); |
| 3964 | 1296 | }); |
| @@ -3977,12 +1309,14 @@ | ||
| 3977 | 1309 | }, |
| 3978 | 1310 | defaultOption: 'confirm', |
| 3979 | 1311 | onConfirm: function onConfirm() { |
| 3980 | 1312 | $updateButton.removeClass('error').addClass('loading'); |
| 1313 | + | |
| 3981 | 1314 | var _$updateButton$data = $updateButton.data(), |
| 3982 | - _nonce = _$updateButton$data._nonce, | |
| 3983 | - action = _$updateButton$data.action, | |
| 3984 | - redirectUrl = _$updateButton$data.redirectUrl; | |
| 1315 | + _nonce = _$updateButton$data._nonce, | |
| 1316 | + action = _$updateButton$data.action, | |
| 1317 | + redirectUrl = _$updateButton$data.redirectUrl; | |
| 1318 | + | |
| 3985 | 1319 | $.post(ajaxurl, { |
| 3986 | 1320 | action: action, |
| 3987 | 1321 | _nonce: _nonce |
| 3988 | 1322 | }).done(function (response) { |
| @@ -3989,12 +1323,14 @@ | ||
| 3989 | 1323 | $updateButton.removeClass('loading').addClass('success'); |
| 3990 | 1324 | var messageElement = document.createElement('p'); |
| 3991 | 1325 | messageElement.appendChild(document.createTextNode(response.data.message)); |
| 3992 | 1326 | $('#elementor_upgrade_fa_button').parent().append(messageElement); |
| 1327 | + | |
| 3993 | 1328 | if (redirectUrl) { |
| 3994 | 1329 | location.href = decodeURIComponent(redirectUrl); |
| 3995 | 1330 | return; |
| 3996 | 1331 | } |
| 1332 | + | |
| 3997 | 1333 | history.go(-1); |
| 3998 | 1334 | }).fail(function () { |
| 3999 | 1335 | $updateButton.removeClass('loading').addClass('error'); |
| 4000 | 1336 | }); |
| @@ -4017,13 +1353,13 @@ | ||
| 4017 | 1353 | } |
| 4018 | 1354 | }); |
| 4019 | 1355 | $('select.elementor-rollback-select').on('change', function () { |
| 4020 | 1356 | var $this = $(this), |
| 4021 | - $rollbackButton = $this.next('.elementor-rollback-button'), | |
| 4022 | - placeholderText = $rollbackButton.data('placeholder-text'), | |
| 4023 | - placeholderUrl = $rollbackButton.data('placeholder-url'); | |
| 1357 | + $rollbackButton = $this.next('.elementor-rollback-button'), | |
| 1358 | + placeholderText = $rollbackButton.data('placeholder-text'), | |
| 1359 | + placeholderUrl = $rollbackButton.data('placeholder-url'); | |
| 4024 | 1360 | $rollbackButton.html(placeholderText.replace('{VERSION}', $this.val())); |
| 4025 | - $rollbackButton.data('href', placeholderUrl.replace('VERSION', $this.val())); | |
| 1361 | + $rollbackButton.attr('href', placeholderUrl.replace('VERSION', $this.val())); | |
| 4026 | 1362 | }).trigger('change'); |
| 4027 | 1363 | $('.elementor-rollback-button').on('click', function (event) { |
| 4028 | 1364 | event.preventDefault(); |
| 4029 | 1365 | var $this = $(this); |
| @@ -4035,9 +1371,9 @@ | ||
| 4035 | 1371 | cancel: __('Cancel', 'elementor') |
| 4036 | 1372 | }, |
| 4037 | 1373 | onConfirm: function onConfirm() { |
| 4038 | 1374 | $this.addClass('loading'); |
| 4039 | - location.href = $this.data('href'); | |
| 1375 | + location.href = $this.attr('href'); | |
| 4040 | 1376 | } |
| 4041 | 1377 | }).show(); |
| 4042 | 1378 | }); |
| 4043 | 1379 | self.elements.$reMigrateGlobalsButton.on('click', function (event) { |
| @@ -4059,10 +1395,12 @@ | ||
| 4059 | 1395 | }); |
| 4060 | 1396 | } |
| 4061 | 1397 | }).show(); |
| 4062 | 1398 | }); |
| 4063 | - $('.elementor_google_font select').on('change', function () { | |
| 4064 | - $('.elementor_font_display').toggle('1' === $(this).val()); | |
| 1399 | + $('.elementor_css_print_method select').on('change', function () { | |
| 1400 | + var $descriptions = $('.elementor-css-print-method-description'); | |
| 1401 | + $descriptions.hide(); | |
| 1402 | + $descriptions.filter('[data-value="' + $(this).val() + '"]').show(); | |
| 4065 | 1403 | }).trigger('change'); |
| 4066 | 1404 | }, |
| 4067 | 1405 | onInit: function onInit() { |
| 4068 | 1406 | elementorModules.ViewModule.prototype.onInit.apply(this, arguments); |
| @@ -4068,18 +1406,16 @@ | ||
| 4068 | 1406 | elementorModules.ViewModule.prototype.onInit.apply(this, arguments); |
| 4069 | 1407 | this.initTemplatesImport(); |
| 4070 | 1408 | this.initMaintenanceMode(); |
| 4071 | 1409 | this.goToSettingsTabFromHash(); |
| 4072 | - this.openLinksInNewTab(); | |
| 1410 | + this.openGetHelpInNewTab(); | |
| 4073 | 1411 | this.addUserAgentClasses(); |
| 4074 | 1412 | this.roleManager.init(); |
| 1413 | + | |
| 4075 | 1414 | if (elementorCommon.config.experimentalFeatures['landing-pages']) { |
| 4076 | 1415 | new _module.default(); |
| 4077 | 1416 | } |
| 4078 | - if (elementorCommon.config.experimentalFeatures.container) { | |
| 4079 | - new _module3.default(); | |
| 4080 | - } | |
| 4081 | - this.templateControls = new _templateControls.default(); | |
| 1417 | + | |
| 4082 | 1418 | new _module2.default(); |
| 4083 | 1419 | }, |
| 4084 | 1420 | addUserAgentClasses: function addUserAgentClasses() { |
| 4085 | 1421 | var body = document.querySelector('body'); |
| @@ -4084,125 +1420,51 @@ | ||
| 4084 | 1420 | addUserAgentClasses: function addUserAgentClasses() { |
| 4085 | 1421 | var body = document.querySelector('body'); |
| 4086 | 1422 | Object.entries(_environment.default).forEach(function (_ref2) { |
| 4087 | 1423 | var _ref3 = (0, _slicedToArray2.default)(_ref2, 2), |
| 4088 | - key = _ref3[0], | |
| 4089 | - value = _ref3[1]; | |
| 1424 | + key = _ref3[0], | |
| 1425 | + value = _ref3[1]; | |
| 1426 | + | |
| 4090 | 1427 | if (!value) { |
| 4091 | 1428 | return; |
| 4092 | 1429 | } |
| 1430 | + | |
| 4093 | 1431 | body.classList.add('e--ua-' + key); |
| 4094 | 1432 | }); |
| 4095 | 1433 | }, |
| 4096 | - /** | |
| 4097 | - * Open Links in New Tab | |
| 4098 | - * | |
| 4099 | - * Adds a `target="_blank"` attribute to the Admin Dashboard menu items specified in the `elements` array, | |
| 4100 | - * if the elements are found in the DOM. The items in the `elements` array should be jQuery instances. | |
| 4101 | - * | |
| 4102 | - * @since 3.6.0 | |
| 4103 | - */ | |
| 4104 | - openLinksInNewTab: function openLinksInNewTab() { | |
| 4105 | - var elements = [this.elements.$menuGoProLink]; | |
| 4106 | - elements.forEach(function ($element) { | |
| 4107 | - // Only add the attribute if the element is found. | |
| 4108 | - if ($element.length) { | |
| 4109 | - $element.attr('target', '_blank'); | |
| 4110 | - } | |
| 4111 | - }); | |
| 1434 | + openGetHelpInNewTab: function openGetHelpInNewTab() { | |
| 1435 | + this.elements.$menuGetHelpLink.attr('target', '_blank'); | |
| 4112 | 1436 | }, |
| 4113 | 1437 | initTemplatesImport: function initTemplatesImport() { |
| 4114 | - var _elementorAdminConfig, _elementorAdminConfig2; | |
| 4115 | - var canImport = elementorAdminConfig.user.is_administrator || ((_elementorAdminConfig = (_elementorAdminConfig2 = elementorAdminConfig.user.restrictions) === null || _elementorAdminConfig2 === void 0 ? void 0 : _elementorAdminConfig2.includes('json-upload')) !== null && _elementorAdminConfig !== void 0 ? _elementorAdminConfig : false); | |
| 4116 | - if (!canImport || !elementorCommon.elements.$body.hasClass('post-type-elementor_library')) { | |
| 1438 | + if (!elementorCommon.elements.$body.hasClass('post-type-elementor_library')) { | |
| 4117 | 1439 | return; |
| 4118 | 1440 | } |
| 4119 | - if (0 === this.elements.$importNowButton.length) { | |
| 4120 | - return; | |
| 4121 | - } | |
| 1441 | + | |
| 4122 | 1442 | var self = this, |
| 4123 | - $importForm = self.elements.$importForm, | |
| 4124 | - $importButton = self.elements.$importButton, | |
| 4125 | - $importArea = self.elements.$importArea, | |
| 4126 | - $importNowButton = self.elements.$importNowButton, | |
| 4127 | - $importFormFileInput = self.elements.$importFormFileInput; | |
| 1443 | + $importButton = self.elements.$importButton, | |
| 1444 | + $importArea = self.elements.$importArea, | |
| 1445 | + $importNowButton = self.elements.$importNowButton; | |
| 4128 | 1446 | self.elements.$formAnchor = $('.wp-header-end'); |
| 4129 | - $('#wpbody-content').find('.page-title-action').first().before($importButton); | |
| 1447 | + $('#wpbody-content').find('.page-title-action').last().after($importButton); | |
| 4130 | 1448 | self.elements.$formAnchor.after($importArea); |
| 4131 | 1449 | $importButton.on('click', function () { |
| 4132 | 1450 | $('#elementor-import-template-area').toggle(); |
| 4133 | 1451 | }); |
| 4134 | - var messages = { | |
| 4135 | - jsonUploadWarning: { | |
| 4136 | - shown: false | |
| 4137 | - }, | |
| 4138 | - enableUnfilteredFiles: { | |
| 4139 | - shown: false | |
| 1452 | + $importNowButton.on('click', function (event) { | |
| 1453 | + if (self.elements.$importFormFileInput[0].files.length && !elementorCommon.config.filesUpload.unfilteredFiles) { | |
| 1454 | + event.preventDefault(); | |
| 1455 | + | |
| 1456 | + var enableUnfilteredFilesModal = _filesUploadHandler.default.getUnfilteredFilesNotEnabledImportTemplateDialog(function () { | |
| 1457 | + self.elements.$importForm.trigger('submit'); | |
| 1458 | + }); | |
| 1459 | + | |
| 1460 | + enableUnfilteredFilesModal.show(); | |
| 4140 | 1461 | } |
| 4141 | - }; | |
| 4142 | - var originalButtonValue = $importNowButton[0].value; | |
| 4143 | - $importForm.on('submit', /*#__PURE__*/function () { | |
| 4144 | - var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(event) { | |
| 4145 | - var hasImportedFiles, areUnfilteredFilesEnabled, enableUnfilteredFilesModal, _t; | |
| 4146 | - return _regenerator.default.wrap(function (_context) { | |
| 4147 | - while (1) switch (_context.prev = _context.next) { | |
| 4148 | - case 0: | |
| 4149 | - $importNowButton[0].disabled = true; | |
| 4150 | - $importNowButton[0].value = __('Importing...', 'elementor'); | |
| 4151 | - if (messages.jsonUploadWarning.shown) { | |
| 4152 | - _context.next = 5; | |
| 4153 | - break; | |
| 4154 | - } | |
| 4155 | - event.preventDefault(); | |
| 4156 | - _context.prev = 1; | |
| 4157 | - _context.next = 2; | |
| 4158 | - return (0, _jsonUploadWarningMessage.showJsonUploadWarningMessageIfNeeded)({ | |
| 4159 | - IntroductionClass: window.elementorModules.admin.utils.Introduction, | |
| 4160 | - introductionMap: window.elementorAdmin.config.user.introduction, | |
| 4161 | - waitForSetViewed: true | |
| 4162 | - }); | |
| 4163 | - case 2: | |
| 4164 | - messages.jsonUploadWarning.shown = true; | |
| 4165 | - $importForm.trigger('submit'); | |
| 4166 | - _context.next = 4; | |
| 4167 | - break; | |
| 4168 | - case 3: | |
| 4169 | - _context.prev = 3; | |
| 4170 | - _t = _context["catch"](1); | |
| 4171 | - $importNowButton[0].disabled = false; | |
| 4172 | - $importNowButton[0].value = originalButtonValue; | |
| 4173 | - case 4: | |
| 4174 | - return _context.abrupt("return"); | |
| 4175 | - case 5: | |
| 4176 | - hasImportedFiles = $importFormFileInput[0].files.length; | |
| 4177 | - areUnfilteredFilesEnabled = elementorCommon.config.filesUpload.unfilteredFiles; | |
| 4178 | - if (!(hasImportedFiles && !areUnfilteredFilesEnabled && !messages.enableUnfilteredFiles.shown)) { | |
| 4179 | - _context.next = 6; | |
| 4180 | - break; | |
| 4181 | - } | |
| 4182 | - event.preventDefault(); | |
| 4183 | - enableUnfilteredFilesModal = _filesUploadHandler.default.getUnfilteredFilesNotEnabledImportTemplateDialog(function () { | |
| 4184 | - messages.enableUnfilteredFiles.shown = true; | |
| 4185 | - $importForm.trigger('submit'); | |
| 4186 | - }); | |
| 4187 | - enableUnfilteredFilesModal.show(); | |
| 4188 | - return _context.abrupt("return"); | |
| 4189 | - case 6: | |
| 4190 | - messages.jsonUploadWarning.shown = false; | |
| 4191 | - messages.enableUnfilteredFiles.shown = false; | |
| 4192 | - case 7: | |
| 4193 | - case "end": | |
| 4194 | - return _context.stop(); | |
| 4195 | - } | |
| 4196 | - }, _callee, null, [[1, 3]]); | |
| 4197 | - })); | |
| 4198 | - return function (_x) { | |
| 4199 | - return _ref4.apply(this, arguments); | |
| 4200 | - }; | |
| 4201 | - }()); | |
| 1462 | + }); | |
| 4202 | 1463 | }, |
| 4203 | 1464 | initMaintenanceMode: function initMaintenanceMode() { |
| 4204 | 1465 | var MaintenanceMode = __webpack_require__(/*! elementor-admin/maintenance-mode */ "../assets/dev/js/admin/maintenance-mode.js"); |
| 1466 | + | |
| 4205 | 1467 | this.maintenanceMode = new MaintenanceMode(); |
| 4206 | 1468 | }, |
| 4207 | 1469 | isElementorMode: function isElementorMode() { |
| 4208 | 1470 | return !!this.elements.$switchModeInput.val(); |
| @@ -4211,8 +1473,9 @@ | ||
| 4211 | 1473 | this.elements.$goToEditLink.addClass('elementor-animate'); |
| 4212 | 1474 | }, |
| 4213 | 1475 | goToSettingsTabFromHash: function goToSettingsTabFromHash() { |
| 4214 | 1476 | var hash = location.hash.slice(1); |
| 1477 | + | |
| 4215 | 1478 | if (hash) { |
| 4216 | 1479 | this.goToSettingsTab(hash); |
| 4217 | 1480 | } |
| 4218 | 1481 | }, |
| @@ -4217,11 +1480,13 @@ | ||
| 4217 | 1480 | } |
| 4218 | 1481 | }, |
| 4219 | 1482 | goToSettingsTab: function goToSettingsTab(tabName) { |
| 4220 | 1483 | var $pages = this.elements.$settingsFormPages; |
| 1484 | + | |
| 4221 | 1485 | if (!$pages.length) { |
| 4222 | 1486 | return; |
| 4223 | 1487 | } |
| 1488 | + | |
| 4224 | 1489 | var $activePage = $pages.filter('#' + tabName); |
| 4225 | 1490 | this.elements.$activeSettingsPage.removeClass('elementor-active'); |
| 4226 | 1491 | this.elements.$activeSettingsTab.removeClass('nav-tab-active'); |
| 4227 | 1492 | var $activeTab = this.elements.$settingsTabs.filter('#elementor-settings-' + tabName); |
| @@ -4247,33 +1512,37 @@ | ||
| 4247 | 1512 | arrowDown: 'dashicons-arrow-down' |
| 4248 | 1513 | }, |
| 4249 | 1514 | toggle: function toggle($trigger) { |
| 4250 | 1515 | var self = this, |
| 4251 | - $row = $trigger.closest(self.selectors.row), | |
| 4252 | - $toggleHandleIcon = $row.find(self.selectors.toggleHandle).find('.dashicons'), | |
| 4253 | - $controls = $row.find(self.selectors.controlsContainer); | |
| 1516 | + $row = $trigger.closest(self.selectors.row), | |
| 1517 | + $toggleHandleIcon = $row.find(self.selectors.toggleHandle).find('.dashicons'), | |
| 1518 | + $controls = $row.find(self.selectors.controlsContainer); | |
| 4254 | 1519 | $controls.toggleClass('hidden'); |
| 1520 | + | |
| 4255 | 1521 | if ($controls.hasClass('hidden')) { |
| 4256 | 1522 | $toggleHandleIcon.removeClass(self.selectors.arrowUp).addClass(self.selectors.arrowDown); |
| 4257 | 1523 | } else { |
| 4258 | 1524 | $toggleHandleIcon.removeClass(self.selectors.arrowDown).addClass(self.selectors.arrowUp); |
| 4259 | 1525 | } |
| 1526 | + | |
| 4260 | 1527 | self.updateLabel($row); |
| 4261 | 1528 | }, |
| 4262 | 1529 | updateLabel: function updateLabel($row) { |
| 4263 | 1530 | var self = this, |
| 4264 | - $indicator = $row.find(self.selectors.excludedIndicator), | |
| 4265 | - excluded = $row.find(self.selectors.excludedField).is(':checked'); | |
| 1531 | + $indicator = $row.find(self.selectors.excludedIndicator), | |
| 1532 | + excluded = $row.find(self.selectors.excludedField).is(':checked'); | |
| 1533 | + | |
| 4266 | 1534 | if (excluded) { |
| 4267 | 1535 | $indicator.html($indicator.data('excluded-label')); |
| 4268 | 1536 | } else { |
| 4269 | 1537 | $indicator.html(''); |
| 4270 | 1538 | } |
| 1539 | + | |
| 4271 | 1540 | self.setAdvancedState($row, excluded); |
| 4272 | 1541 | }, |
| 4273 | 1542 | setAdvancedState: function setAdvancedState($row, state) { |
| 4274 | 1543 | var self = this, |
| 4275 | - $controls = $row.find('input[type="checkbox"]').not(self.selectors.excludedField); | |
| 1544 | + $controls = $row.find('input[type="checkbox"]').not(self.selectors.excludedField); | |
| 4276 | 1545 | $controls.each(function (index, input) { |
| 4277 | 1546 | $(input).prop('disabled', state); |
| 4278 | 1547 | }); |
| 4279 | 1548 | }, |
| @@ -4288,11 +1557,13 @@ | ||
| 4288 | 1557 | }); |
| 4289 | 1558 | }, |
| 4290 | 1559 | init: function init() { |
| 4291 | 1560 | var self = this; |
| 1561 | + | |
| 4292 | 1562 | if (!$('body[class*="' + self.selectors.body + '"]').length) { |
| 4293 | 1563 | return; |
| 4294 | 1564 | } |
| 1565 | + | |
| 4295 | 1566 | self.bind(); |
| 4296 | 1567 | $(self.selectors.row).each(function (index, row) { |
| 4297 | 1568 | self.updateLabel($(row)); |
| 4298 | 1569 | }); |
| @@ -4300,8 +1571,9 @@ | ||
| 4300 | 1571 | } |
| 4301 | 1572 | }); |
| 4302 | 1573 | $(function () { |
| 4303 | 1574 | window.elementorAdmin = new ElementorAdmin(); |
| 1575 | + | |
| 4304 | 1576 | _events.default.dispatch(elementorCommon.elements.$window, 'elementor/admin/init'); |
| 4305 | 1577 | }); |
| 4306 | 1578 | })(jQuery); |
| 4307 | 1579 | })(); |