| @@ -1,7 +1,19 @@ | ||
| 1 | +/*! elementor - v3.24.0 - 28-10-2024 */ | |
| 1 | 2 | /******/ (() => { // webpackBootstrap |
| 2 | 3 | /******/ var __webpack_modules__ = ({ |
| 3 | 4 | |
| 5 | +/***/ "@wordpress/i18n": | |
| 6 | +/*!**************************!*\ | |
| 7 | + !*** external "wp.i18n" ***! | |
| 8 | + \**************************/ | |
| 9 | +/***/ ((module) => { | |
| 10 | + | |
| 11 | +"use strict"; | |
| 12 | +module.exports = wp.i18n; | |
| 13 | + | |
| 14 | +/***/ }), | |
| 15 | + | |
| 4 | 16 | /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": |
| 5 | 17 | /*!****************************************************************!*\ |
| 6 | 18 | !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! |
| 7 | 19 | \****************************************************************/ |
| @@ -6,10 +18,12 @@ | ||
| 6 | 18 | !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! |
| 7 | 19 | \****************************************************************/ |
| 8 | 20 | /***/ ((module) => { |
| 9 | 21 | |
| 10 | -function _classCallCheck(a, n) { | |
| 11 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 22 | +function _classCallCheck(instance, Constructor) { | |
| 23 | + if (!(instance instanceof Constructor)) { | |
| 24 | + throw new TypeError("Cannot call a class as a function"); | |
| 25 | + } | |
| 12 | 26 | } |
| 13 | 27 | module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 14 | 28 | |
| 15 | 29 | /***/ }), |
| @@ -20,18 +34,24 @@ | ||
| 20 | 34 | \*************************************************************/ |
| 21 | 35 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 22 | 36 | |
| 23 | 37 | var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); |
| 24 | -function _defineProperties(e, r) { | |
| 25 | - for (var t = 0; t < r.length; t++) { | |
| 26 | - var o = r[t]; | |
| 27 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 38 | +function _defineProperties(target, props) { | |
| 39 | + for (var i = 0; i < props.length; i++) { | |
| 40 | + var descriptor = props[i]; | |
| 41 | + descriptor.enumerable = descriptor.enumerable || false; | |
| 42 | + descriptor.configurable = true; | |
| 43 | + if ("value" in descriptor) descriptor.writable = true; | |
| 44 | + Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor); | |
| 28 | 45 | } |
| 29 | 46 | } |
| 30 | -function _createClass(e, r, t) { | |
| 31 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 32 | - writable: !1 | |
| 33 | - }), e; | |
| 47 | +function _createClass(Constructor, protoProps, staticProps) { | |
| 48 | + if (protoProps) _defineProperties(Constructor.prototype, protoProps); | |
| 49 | + if (staticProps) _defineProperties(Constructor, staticProps); | |
| 50 | + Object.defineProperty(Constructor, "prototype", { | |
| 51 | + writable: false | |
| 52 | + }); | |
| 53 | + return Constructor; | |
| 34 | 54 | } |
| 35 | 55 | module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 36 | 56 | |
| 37 | 57 | /***/ }), |
| @@ -42,15 +62,21 @@ | ||
| 42 | 62 | \****************************************************************/ |
| 43 | 63 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 44 | 64 | |
| 45 | 65 | var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); |
| 46 | -function _defineProperty(e, r, t) { | |
| 47 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 48 | - value: t, | |
| 49 | - enumerable: !0, | |
| 50 | - configurable: !0, | |
| 51 | - writable: !0 | |
| 52 | - }) : e[r] = t, e; | |
| 66 | +function _defineProperty(obj, key, value) { | |
| 67 | + key = toPropertyKey(key); | |
| 68 | + if (key in obj) { | |
| 69 | + Object.defineProperty(obj, key, { | |
| 70 | + value: value, | |
| 71 | + enumerable: true, | |
| 72 | + configurable: true, | |
| 73 | + writable: true | |
| 74 | + }); | |
| 75 | + } else { | |
| 76 | + obj[key] = value; | |
| 77 | + } | |
| 78 | + return obj; | |
| 53 | 79 | } |
| 54 | 80 | module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 55 | 81 | |
| 56 | 82 | /***/ }), |
| @@ -60,11 +86,11 @@ | ||
| 60 | 86 | !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! |
| 61 | 87 | \***********************************************************************/ |
| 62 | 88 | /***/ ((module) => { |
| 63 | 89 | |
| 64 | -function _interopRequireDefault(e) { | |
| 65 | - return e && e.__esModule ? e : { | |
| 66 | - "default": e | |
| 90 | +function _interopRequireDefault(obj) { | |
| 91 | + return obj && obj.__esModule ? obj : { | |
| 92 | + "default": obj | |
| 67 | 93 | }; |
| 68 | 94 | } |
| 69 | 95 | module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 70 | 96 | |
| @@ -100,9 +126,9 @@ | ||
| 100 | 126 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 101 | 127 | var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); |
| 102 | 128 | function toPropertyKey(t) { |
| 103 | 129 | var i = toPrimitive(t, "string"); |
| 104 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 130 | + return "symbol" == _typeof(i) ? i : String(i); | |
| 105 | 131 | } |
| 106 | 132 | module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 107 | 133 | |
| 108 | 134 | /***/ }), |
| @@ -115,27 +141,16 @@ | ||
| 115 | 141 | |
| 116 | 142 | function _typeof(o) { |
| 117 | 143 | "@babel/helpers - typeof"; |
| 118 | 144 | |
| 119 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 145 | + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 120 | 146 | return typeof o; |
| 121 | 147 | } : function (o) { |
| 122 | 148 | return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 123 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 149 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o); | |
| 124 | 150 | } |
| 125 | 151 | module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 126 | 152 | |
| 127 | -/***/ }), | |
| 128 | - | |
| 129 | -/***/ "@wordpress/i18n": | |
| 130 | -/*!**************************!*\ | |
| 131 | - !*** external "wp.i18n" ***! | |
| 132 | - \**************************/ | |
| 133 | -/***/ ((module) => { | |
| 134 | - | |
| 135 | -"use strict"; | |
| 136 | -module.exports = wp.i18n; | |
| 137 | - | |
| 138 | 153 | /***/ }) |
| 139 | 154 | |
| 140 | 155 | /******/ }); |
| 141 | 156 | /************************************************************************/ |
| @@ -163,9 +178,10 @@ | ||
| 163 | 178 | /******/ return module.exports; |
| 164 | 179 | /******/ } |
| 165 | 180 | /******/ |
| 166 | 181 | /************************************************************************/ |
| 167 | -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 182 | +var __webpack_exports__ = {}; | |
| 183 | +// This entry need to be wrapped in an IIFE because it need to be in strict mode. | |
| 168 | 184 | (() => { |
| 169 | 185 | "use strict"; |
| 170 | 186 | /*!*******************************************************!*\ |
| 171 | 187 | !*** ../app/modules/import-export/assets/js/admin.js ***! |
| @@ -208,32 +224,23 @@ | ||
| 208 | 224 | this.revertButton = document.getElementById('elementor-import-export__revert_kit'); |
| 209 | 225 | if (this.revertButton) { |
| 210 | 226 | this.revertButton.addEventListener('click', this.onRevertButtonClick.bind(this)); |
| 211 | 227 | this.maybeAddRevertBtnMargin(); |
| 212 | - this.maybeScrollToRevertButton(); | |
| 213 | 228 | } |
| 214 | 229 | this.maybeShowReferrerKitDialog(); |
| 215 | 230 | } |
| 216 | - return (0, _createClass2.default)(Admin, [{ | |
| 217 | - key: "shouldScrollToRevert", | |
| 218 | - value: function shouldScrollToRevert() { | |
| 219 | - var urlParams = new URLSearchParams(window.location.search); | |
| 220 | - return !!urlParams.get('scroll_to_revert'); | |
| 221 | - } | |
| 222 | - }, { | |
| 231 | + | |
| 232 | + /** | |
| 233 | + * Add bottom margin to revert btn if referred from Kit library | |
| 234 | + */ | |
| 235 | + (0, _createClass2.default)(Admin, [{ | |
| 223 | 236 | key: "maybeAddRevertBtnMargin", |
| 224 | 237 | value: function maybeAddRevertBtnMargin() { |
| 225 | - if (!this.shouldScrollToRevert()) { | |
| 238 | + var referrerKitId = new URLSearchParams(this.revertButton.href).get('referrer_kit'); | |
| 239 | + if (!referrerKitId) { | |
| 226 | 240 | return; |
| 227 | 241 | } |
| 228 | 242 | this.revertButton.style.marginBottom = this.calculateMargin(); |
| 229 | - } | |
| 230 | - }, { | |
| 231 | - key: "maybeScrollToRevertButton", | |
| 232 | - value: function maybeScrollToRevertButton() { | |
| 233 | - if (!this.shouldScrollToRevert()) { | |
| 234 | - return; | |
| 235 | - } | |
| 236 | 243 | this.scrollToBottom(); |
| 237 | 244 | } |
| 238 | 245 | |
| 239 | 246 | /** |
| @@ -274,9 +281,9 @@ | ||
| 274 | 281 | event.preventDefault(); |
| 275 | 282 | elementorCommon.dialogsManager.createWidget('confirm', { |
| 276 | 283 | headerMessage: __('Are you sure?', 'elementor'), |
| 277 | 284 | // Translators: %s is the name of the active Kit |
| 278 | - message: __('Removing %s will permanently delete changes made to the Websites Template\'s content and site settings', 'elementor').replace('%s', this.activeKitName), | |
| 285 | + message: __('Removing %s will permanently delete changes made to the Kit\'s content and site settings', 'elementor').replace('%s', this.activeKitName), | |
| 279 | 286 | strings: { |
| 280 | 287 | confirm: __('Delete', 'elementor'), |
| 281 | 288 | cancel: __('Cancel', 'elementor') |
| 282 | 289 | }, |
| @@ -301,12 +308,12 @@ | ||
| 301 | 308 | return; |
| 302 | 309 | } |
| 303 | 310 | if (0 === referrerKitId.length) { |
| 304 | 311 | this.createKitDeletedWidget({ |
| 305 | - message: __('Try a different Website Template or build your site from scratch.', 'elementor'), | |
| 312 | + message: __('Try a different Kit or build your site from scratch.', 'elementor'), | |
| 306 | 313 | strings: { |
| 307 | 314 | confirm: __('OK', 'elementor'), |
| 308 | - cancel: __('Library', 'elementor') | |
| 315 | + cancel: __('Kit Library', 'elementor') | |
| 309 | 316 | }, |
| 310 | 317 | onCancel: function onCancel() { |
| 311 | 318 | location.href = elementorImportExport.appUrl; |
| 312 | 319 | } |
| @@ -410,8 +417,9 @@ | ||
| 410 | 417 | value: function clearCache() { |
| 411 | 418 | sessionStorage.removeItem(this.KIT_DATA_KEY); |
| 412 | 419 | } |
| 413 | 420 | }]); |
| 421 | + return Admin; | |
| 414 | 422 | }(); |
| 415 | 423 | window.addEventListener('load', function () { |
| 416 | 424 | new Admin(); |
| 417 | 425 | }); |