| @@ -1,4 +1,5 @@ | ||
| 1 | +/*! elementor - v3.7.5 - 14-09-2022 */ | |
| 1 | 2 | /******/ (() => { // webpackBootstrap |
| 2 | 3 | /******/ var __webpack_modules__ = ({ |
| 3 | 4 | |
| 4 | 5 | /***/ "../assets/dev/js/editor/command-bases/command-container-base.js": |
| @@ -10,30 +11,44 @@ | ||
| 10 | 11 | "use strict"; |
| 11 | 12 | |
| 12 | 13 | |
| 13 | 14 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 15 | + | |
| 14 | 16 | Object.defineProperty(exports, "__esModule", ({ |
| 15 | 17 | value: true |
| 16 | 18 | })); |
| 17 | 19 | exports["default"] = void 0; |
| 20 | + | |
| 18 | 21 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 22 | + | |
| 19 | 23 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 24 | + | |
| 25 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 26 | + | |
| 20 | 27 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 28 | + | |
| 21 | 29 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 22 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 30 | + | |
| 23 | 31 | var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); |
| 24 | -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)); } | |
| 25 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 32 | + | |
| 33 | +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); }; } | |
| 34 | + | |
| 35 | +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; } } | |
| 36 | + | |
| 26 | 37 | /** |
| 27 | 38 | * @name $e.modules.editor.CommandContainerBase |
| 28 | 39 | */ |
| 29 | -var CommandContainerBase = exports["default"] = /*#__PURE__*/function (_CommandBase) { | |
| 40 | +var CommandContainerBase = /*#__PURE__*/function (_CommandBase) { | |
| 41 | + (0, _inherits2.default)(CommandContainerBase, _CommandBase); | |
| 42 | + | |
| 43 | + var _super = _createSuper(CommandContainerBase); | |
| 44 | + | |
| 30 | 45 | function CommandContainerBase() { |
| 31 | 46 | (0, _classCallCheck2.default)(this, CommandContainerBase); |
| 32 | - return _callSuper(this, CommandContainerBase, arguments); | |
| 47 | + return _super.apply(this, arguments); | |
| 33 | 48 | } |
| 34 | - (0, _inherits2.default)(CommandContainerBase, _CommandBase); | |
| 35 | - return (0, _createClass2.default)(CommandContainerBase, [{ | |
| 49 | + | |
| 50 | + (0, _createClass2.default)(CommandContainerBase, [{ | |
| 36 | 51 | key: "requireContainer", |
| 37 | 52 | value: |
| 38 | 53 | /** |
| 39 | 54 | * Function requireContainer(). |
| @@ -45,15 +60,19 @@ | ||
| 45 | 60 | * @throws {Error} |
| 46 | 61 | */ |
| 47 | 62 | function requireContainer() { |
| 48 | 63 | var _this = this; |
| 64 | + | |
| 49 | 65 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args; |
| 66 | + | |
| 50 | 67 | if (!args.container && !args.containers) { |
| 51 | 68 | throw Error('container or containers are required.'); |
| 52 | 69 | } |
| 70 | + | |
| 53 | 71 | if (args.container && args.containers) { |
| 54 | 72 | throw Error('container and containers cannot go together please select one of them.'); |
| 55 | 73 | } |
| 74 | + | |
| 56 | 75 | var containers = args.containers || [args.container]; |
| 57 | 76 | containers.forEach(function (container) { |
| 58 | 77 | _this.requireArgumentInstance('container', elementorModules.editor.Container, { |
| 59 | 78 | container: container |
| @@ -65,10 +84,13 @@ | ||
| 65 | 84 | value: function getInstanceType() { |
| 66 | 85 | return 'CommandContainerBase'; |
| 67 | 86 | } |
| 68 | 87 | }]); |
| 88 | + return CommandContainerBase; | |
| 69 | 89 | }(_commandBase.default); |
| 70 | 90 | |
| 91 | +exports["default"] = CommandContainerBase; | |
| 92 | + | |
| 71 | 93 | /***/ }), |
| 72 | 94 | |
| 73 | 95 | /***/ "../assets/dev/js/editor/command-bases/command-container-internal-base.js": |
| 74 | 96 | /*!********************************************************************************!*\ |
| @@ -79,37 +101,54 @@ | ||
| 79 | 101 | "use strict"; |
| 80 | 102 | |
| 81 | 103 | |
| 82 | 104 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 105 | + | |
| 83 | 106 | Object.defineProperty(exports, "__esModule", ({ |
| 84 | 107 | value: true |
| 85 | 108 | })); |
| 86 | 109 | exports["default"] = void 0; |
| 110 | + | |
| 87 | 111 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 112 | + | |
| 88 | 113 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 114 | + | |
| 115 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 116 | + | |
| 89 | 117 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 118 | + | |
| 90 | 119 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 91 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 120 | + | |
| 92 | 121 | var _commandContainerBase = _interopRequireDefault(__webpack_require__(/*! ./command-container-base */ "../assets/dev/js/editor/command-bases/command-container-base.js")); |
| 93 | -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)); } | |
| 94 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 122 | + | |
| 123 | +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); }; } | |
| 124 | + | |
| 125 | +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; } } | |
| 126 | + | |
| 95 | 127 | /** |
| 96 | 128 | * @name $e.modules.editor.CommandContainerInternalBase |
| 97 | 129 | */ |
| 98 | -var CommandContainerInternalBase = exports["default"] = /*#__PURE__*/function (_CommandContainerBase) { | |
| 130 | +var CommandContainerInternalBase = /*#__PURE__*/function (_CommandContainerBase) { | |
| 131 | + (0, _inherits2.default)(CommandContainerInternalBase, _CommandContainerBase); | |
| 132 | + | |
| 133 | + var _super = _createSuper(CommandContainerInternalBase); | |
| 134 | + | |
| 99 | 135 | function CommandContainerInternalBase(args) { |
| 100 | 136 | (0, _classCallCheck2.default)(this, CommandContainerInternalBase); |
| 101 | - return _callSuper(this, CommandContainerInternalBase, [args, $e.commandsInternal]); | |
| 137 | + return _super.call(this, args, $e.commandsInternal); | |
| 102 | 138 | } |
| 103 | - (0, _inherits2.default)(CommandContainerInternalBase, _CommandContainerBase); | |
| 104 | - return (0, _createClass2.default)(CommandContainerInternalBase, null, [{ | |
| 139 | + | |
| 140 | + (0, _createClass2.default)(CommandContainerInternalBase, null, [{ | |
| 105 | 141 | key: "getInstanceType", |
| 106 | 142 | value: function getInstanceType() { |
| 107 | 143 | return 'CommandContainerInternalBase'; |
| 108 | 144 | } |
| 109 | 145 | }]); |
| 146 | + return CommandContainerInternalBase; | |
| 110 | 147 | }(_commandContainerBase.default); |
| 111 | 148 | |
| 149 | +exports["default"] = CommandContainerInternalBase; | |
| 150 | + | |
| 112 | 151 | /***/ }), |
| 113 | 152 | |
| 114 | 153 | /***/ "../assets/dev/js/editor/document/command-bases/command-history-base.js": |
| 115 | 154 | /*!******************************************************************************!*\ |
| @@ -120,39 +159,54 @@ | ||
| 120 | 159 | "use strict"; |
| 121 | 160 | |
| 122 | 161 | |
| 123 | 162 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 163 | + | |
| 124 | 164 | Object.defineProperty(exports, "__esModule", ({ |
| 125 | 165 | value: true |
| 126 | 166 | })); |
| 127 | 167 | exports["default"] = void 0; |
| 168 | + | |
| 128 | 169 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 170 | + | |
| 129 | 171 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 172 | + | |
| 173 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 174 | + | |
| 175 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 176 | + | |
| 130 | 177 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 178 | + | |
| 131 | 179 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 132 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 133 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 180 | + | |
| 134 | 181 | var _commandContainerBase = _interopRequireDefault(__webpack_require__(/*! elementor-editor/command-bases/command-container-base */ "../assets/dev/js/editor/command-bases/command-container-base.js")); |
| 135 | -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)); } | |
| 136 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 137 | -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; } | |
| 182 | + | |
| 183 | +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); }; } | |
| 184 | + | |
| 185 | +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; } } | |
| 186 | + | |
| 138 | 187 | /** |
| 139 | 188 | * @name $e.modules.editor.document.CommandHistoryBase |
| 140 | 189 | */ |
| 141 | -var CommandHistoryBase = exports["default"] = /*#__PURE__*/function (_CommandContainerBase) { | |
| 190 | +var CommandHistoryBase = /*#__PURE__*/function (_CommandContainerBase) { | |
| 191 | + (0, _inherits2.default)(CommandHistoryBase, _CommandContainerBase); | |
| 192 | + | |
| 193 | + var _super = _createSuper(CommandHistoryBase); | |
| 194 | + | |
| 142 | 195 | function CommandHistoryBase() { |
| 143 | 196 | (0, _classCallCheck2.default)(this, CommandHistoryBase); |
| 144 | - return _callSuper(this, CommandHistoryBase, arguments); | |
| 197 | + return _super.apply(this, arguments); | |
| 145 | 198 | } |
| 146 | - (0, _inherits2.default)(CommandHistoryBase, _CommandContainerBase); | |
| 147 | - return (0, _createClass2.default)(CommandHistoryBase, [{ | |
| 199 | + | |
| 200 | + (0, _createClass2.default)(CommandHistoryBase, [{ | |
| 148 | 201 | key: "initialize", |
| 149 | 202 | value: function initialize() { |
| 150 | 203 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 151 | 204 | var _args$options = args.options, |
| 152 | - options = _args$options === void 0 ? {} : _args$options, | |
| 153 | - _options$useHistory = options.useHistory, | |
| 154 | - useHistory = _options$useHistory === void 0 ? true : _options$useHistory; | |
| 205 | + options = _args$options === void 0 ? {} : _args$options, | |
| 206 | + _options$useHistory = options.useHistory, | |
| 207 | + useHistory = _options$useHistory === void 0 ? true : _options$useHistory; | |
| 208 | + | |
| 155 | 209 | if (useHistory) { |
| 156 | 210 | /** |
| 157 | 211 | * Get History from child command. |
| 158 | 212 | * |
| @@ -158,17 +212,16 @@ | ||
| 158 | 212 | * |
| 159 | 213 | * @type {{}|boolean} |
| 160 | 214 | */ |
| 161 | 215 | this.history = this.getHistory(args); |
| 162 | - | |
| 163 | 216 | /** |
| 164 | 217 | * @type {number|boolean} |
| 165 | 218 | */ |
| 219 | + | |
| 166 | 220 | this.historyId = false; |
| 167 | 221 | } |
| 168 | - } | |
| 222 | + } // eslint-disable-next-line jsdoc/require-returns-check | |
| 169 | 223 | |
| 170 | - // eslint-disable-next-line jsdoc/require-returns-check | |
| 171 | 224 | /** |
| 172 | 225 | * Function getHistory(). |
| 173 | 226 | * |
| 174 | 227 | * Get history object from child, do nothing if it false. |
| @@ -176,8 +229,9 @@ | ||
| 176 | 229 | * @param {*} [args={}] |
| 177 | 230 | * |
| 178 | 231 | * @return {({}|boolean)} history object |
| 179 | 232 | */ |
| 233 | + | |
| 180 | 234 | }, { |
| 181 | 235 | key: "getHistory", |
| 182 | 236 | value: function getHistory() { |
| 183 | 237 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| @@ -183,9 +237,8 @@ | ||
| 183 | 237 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 184 | 238 | // eslint-disable-line no-unused-vars |
| 185 | 239 | elementorModules.ForceMethodImplementation(); |
| 186 | 240 | } |
| 187 | - | |
| 188 | 241 | /** |
| 189 | 242 | * Function isHistoryActive(). |
| 190 | 243 | * |
| 191 | 244 | * Return `elementor.documents.getCurrent().history.getActive()`. |
| @@ -191,8 +244,9 @@ | ||
| 191 | 244 | * Return `elementor.documents.getCurrent().history.getActive()`. |
| 192 | 245 | * |
| 193 | 246 | * @return {boolean} is history active |
| 194 | 247 | */ |
| 248 | + | |
| 195 | 249 | }, { |
| 196 | 250 | key: "isHistoryActive", |
| 197 | 251 | value: function isHistoryActive() { |
| 198 | 252 | return elementor.documents.getCurrent().history.getActive(); |
| @@ -199,9 +253,10 @@ | ||
| 199 | 253 | } |
| 200 | 254 | }, { |
| 201 | 255 | key: "onBeforeRun", |
| 202 | 256 | value: function onBeforeRun(args) { |
| 203 | - _superPropGet(CommandHistoryBase, "onBeforeRun", this, 3)([args]); | |
| 257 | + (0, _get2.default)((0, _getPrototypeOf2.default)(CommandHistoryBase.prototype), "onBeforeRun", this).call(this, args); | |
| 258 | + | |
| 204 | 259 | if (this.history && this.isHistoryActive()) { |
| 205 | 260 | this.historyId = $e.internal('document/history/start-log', this.history); |
| 206 | 261 | } |
| 207 | 262 | } |
| @@ -207,9 +262,10 @@ | ||
| 207 | 262 | } |
| 208 | 263 | }, { |
| 209 | 264 | key: "onAfterRun", |
| 210 | 265 | value: function onAfterRun(args, result) { |
| 211 | - _superPropGet(CommandHistoryBase, "onAfterRun", this, 3)([args, result]); | |
| 266 | + (0, _get2.default)((0, _getPrototypeOf2.default)(CommandHistoryBase.prototype), "onAfterRun", this).call(this, args, result); | |
| 267 | + | |
| 212 | 268 | if (this.history && this.isHistoryActive()) { |
| 213 | 269 | $e.internal('document/history/end-log', { |
| 214 | 270 | id: this.historyId |
| 215 | 271 | }); |
| @@ -219,9 +275,10 @@ | ||
| 219 | 275 | key: "onAfterApply", |
| 220 | 276 | value: function onAfterApply() { |
| 221 | 277 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 222 | 278 | var result = arguments.length > 1 ? arguments[1] : undefined; |
| 223 | - _superPropGet(CommandHistoryBase, "onAfterApply", this, 3)([args, result]); | |
| 279 | + (0, _get2.default)((0, _getPrototypeOf2.default)(CommandHistoryBase.prototype), "onAfterApply", this).call(this, args, result); | |
| 280 | + | |
| 224 | 281 | if (this.isDataChanged()) { |
| 225 | 282 | $e.internal('document/save/set-is-modified', { |
| 226 | 283 | status: true |
| 227 | 284 | }); |
| @@ -235,9 +292,10 @@ | ||
| 235 | 292 | $e.internal('document/history/delete-log', { |
| 236 | 293 | id: this.historyId |
| 237 | 294 | }); |
| 238 | 295 | } |
| 239 | - _superPropGet(CommandHistoryBase, "onCatchApply", this, 3)([e]); | |
| 296 | + | |
| 297 | + (0, _get2.default)((0, _getPrototypeOf2.default)(CommandHistoryBase.prototype), "onCatchApply", this).call(this, e); | |
| 240 | 298 | } |
| 241 | 299 | }, { |
| 242 | 300 | key: "isDataChanged", |
| 243 | 301 | value: function isDataChanged() { |
| @@ -249,10 +307,13 @@ | ||
| 249 | 307 | value: function getInstanceType() { |
| 250 | 308 | return 'CommandHistoryBase'; |
| 251 | 309 | } |
| 252 | 310 | }]); |
| 311 | + return CommandHistoryBase; | |
| 253 | 312 | }(_commandContainerBase.default); |
| 254 | 313 | |
| 314 | +exports["default"] = CommandHistoryBase; | |
| 315 | + | |
| 255 | 316 | /***/ }), |
| 256 | 317 | |
| 257 | 318 | /***/ "../assets/dev/js/editor/document/command-bases/command-history-debounce-base.js": |
| 258 | 319 | /*!***************************************************************************************!*\ |
| @@ -263,25 +324,35 @@ | ||
| 263 | 324 | "use strict"; |
| 264 | 325 | |
| 265 | 326 | |
| 266 | 327 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 328 | + | |
| 267 | 329 | Object.defineProperty(exports, "__esModule", ({ |
| 268 | 330 | value: true |
| 269 | 331 | })); |
| 270 | 332 | exports.getDefaultDebounceDelay = exports["default"] = exports.DEFAULT_DEBOUNCE_DELAY = void 0; |
| 333 | + | |
| 271 | 334 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 335 | + | |
| 272 | 336 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 337 | + | |
| 338 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 339 | + | |
| 340 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 341 | + | |
| 273 | 342 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 343 | + | |
| 274 | 344 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 275 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 276 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 345 | + | |
| 277 | 346 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 347 | + | |
| 278 | 348 | var _commandHistoryBase = _interopRequireDefault(__webpack_require__(/*! ./command-history-base */ "../assets/dev/js/editor/document/command-bases/command-history-base.js")); |
| 279 | -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)); } | |
| 280 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 281 | -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; } | |
| 282 | -var DEFAULT_DEBOUNCE_DELAY = exports.DEFAULT_DEBOUNCE_DELAY = 800; | |
| 283 | 349 | |
| 350 | +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); }; } | |
| 351 | + | |
| 352 | +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; } } | |
| 353 | + | |
| 354 | +var DEFAULT_DEBOUNCE_DELAY = 800; | |
| 284 | 355 | /** |
| 285 | 356 | * Function getDefaultDebounceDelay(). |
| 286 | 357 | * |
| 287 | 358 | * Returns default debounce delay time, if exists in config override. |
| @@ -287,38 +358,51 @@ | ||
| 287 | 358 | * Returns default debounce delay time, if exists in config override. |
| 288 | 359 | * |
| 289 | 360 | * @return {number} default debounce delay time |
| 290 | 361 | */ |
| 291 | -var getDefaultDebounceDelay = exports.getDefaultDebounceDelay = function getDefaultDebounceDelay() { | |
| 362 | + | |
| 363 | +exports.DEFAULT_DEBOUNCE_DELAY = DEFAULT_DEBOUNCE_DELAY; | |
| 364 | + | |
| 365 | +var getDefaultDebounceDelay = function getDefaultDebounceDelay() { | |
| 292 | 366 | var result = DEFAULT_DEBOUNCE_DELAY; |
| 367 | + | |
| 293 | 368 | if (elementor.config.document && undefined !== elementor.config.document.debounceDelay) { |
| 294 | 369 | result = elementor.config.document.debounceDelay; |
| 295 | 370 | } |
| 371 | + | |
| 296 | 372 | return result; |
| 297 | 373 | }; |
| 298 | - | |
| 299 | 374 | /** |
| 300 | 375 | * @name $e.modules.editor.document.CommandHistoryDebounceBase |
| 301 | 376 | */ |
| 302 | -var CommandHistoryDebounceBase = exports["default"] = /*#__PURE__*/function (_CommandHistoryBase) { | |
| 377 | + | |
| 378 | + | |
| 379 | +exports.getDefaultDebounceDelay = getDefaultDebounceDelay; | |
| 380 | + | |
| 381 | +var CommandHistoryDebounceBase = /*#__PURE__*/function (_CommandHistoryBase) { | |
| 382 | + (0, _inherits2.default)(CommandHistoryDebounceBase, _CommandHistoryBase); | |
| 383 | + | |
| 384 | + var _super = _createSuper(CommandHistoryDebounceBase); | |
| 385 | + | |
| 303 | 386 | function CommandHistoryDebounceBase() { |
| 304 | 387 | (0, _classCallCheck2.default)(this, CommandHistoryDebounceBase); |
| 305 | - return _callSuper(this, CommandHistoryDebounceBase, arguments); | |
| 388 | + return _super.apply(this, arguments); | |
| 306 | 389 | } |
| 307 | - (0, _inherits2.default)(CommandHistoryDebounceBase, _CommandHistoryBase); | |
| 308 | - return (0, _createClass2.default)(CommandHistoryDebounceBase, [{ | |
| 390 | + | |
| 391 | + (0, _createClass2.default)(CommandHistoryDebounceBase, [{ | |
| 309 | 392 | key: "initialize", |
| 310 | 393 | value: function initialize(args) { |
| 311 | 394 | var _args$options = args.options, |
| 312 | - options = _args$options === void 0 ? {} : _args$options; | |
| 313 | - _superPropGet(CommandHistoryDebounceBase, "initialize", this, 3)([args]); | |
| 395 | + options = _args$options === void 0 ? {} : _args$options; | |
| 396 | + (0, _get2.default)((0, _getPrototypeOf2.default)(CommandHistoryDebounceBase.prototype), "initialize", this).call(this, args); | |
| 397 | + | |
| 314 | 398 | if (!this.constructor.debounce) { |
| 315 | 399 | this.constructor.debounce = _.debounce(function (fn) { |
| 316 | 400 | return fn(); |
| 317 | 401 | }, getDefaultDebounceDelay()); |
| 318 | - } | |
| 402 | + } // If its head command, and not called within another command. | |
| 319 | 403 | |
| 320 | - // If its head command, and not called within another command. | |
| 404 | + | |
| 321 | 405 | if (1 === $e.commands.currentTrace.length || options.debounce) { |
| 322 | 406 | this.isDebounceRequired = true; |
| 323 | 407 | } |
| 324 | 408 | } |
| @@ -325,8 +409,9 @@ | ||
| 325 | 409 | }, { |
| 326 | 410 | key: "onBeforeRun", |
| 327 | 411 | value: function onBeforeRun(args) { |
| 328 | 412 | $e.modules.CommandBase.prototype.onBeforeRun.call(this, args); |
| 413 | + | |
| 329 | 414 | if (this.history && this.isHistoryActive()) { |
| 330 | 415 | $e.internal('document/history/add-transaction', this.history); |
| 331 | 416 | } |
| 332 | 417 | } |
| @@ -333,8 +418,9 @@ | ||
| 333 | 418 | }, { |
| 334 | 419 | key: "onAfterRun", |
| 335 | 420 | value: function onAfterRun(args, result) { |
| 336 | 421 | $e.modules.CommandBase.prototype.onAfterRun.call(this, args, result); |
| 422 | + | |
| 337 | 423 | if (this.isHistoryActive()) { |
| 338 | 424 | if (this.isDebounceRequired) { |
| 339 | 425 | this.constructor.debounce(function () { |
| 340 | 426 | return $e.internal('document/history/end-transaction'); |
| @@ -346,11 +432,10 @@ | ||
| 346 | 432 | } |
| 347 | 433 | }, { |
| 348 | 434 | key: "onCatchApply", |
| 349 | 435 | value: function onCatchApply(e) { |
| 350 | - $e.modules.CommandBase.prototype.onCatchApply.call(this, e); | |
| 436 | + $e.modules.CommandBase.prototype.onCatchApply.call(this, e); // Rollback history on failure. | |
| 351 | 437 | |
| 352 | - // Rollback history on failure. | |
| 353 | 438 | if (e instanceof $e.modules.HookBreak && this.history) { |
| 354 | 439 | if (this.isDebounceRequired) { |
| 355 | 440 | // `clear-transaction` is under debounce, because it should `clear-transaction` after `end-transaction`. |
| 356 | 441 | this.constructor.debounce(function () { |
| @@ -362,20 +447,24 @@ | ||
| 362 | 447 | } |
| 363 | 448 | } |
| 364 | 449 | }], [{ |
| 365 | 450 | key: "getInstanceType", |
| 366 | - value: function getInstanceType() { | |
| 451 | + value: | |
| 452 | + /** | |
| 453 | + * Function debounce(). | |
| 454 | + * | |
| 455 | + * Will debounce every function you pass in, at the same debounce flow. | |
| 456 | + * | |
| 457 | + * @param {Function} | |
| 458 | + */ | |
| 459 | + function getInstanceType() { | |
| 367 | 460 | return 'CommandHistoryDebounceBase'; |
| 368 | 461 | } |
| 369 | 462 | }]); |
| 463 | + return CommandHistoryDebounceBase; | |
| 370 | 464 | }(_commandHistoryBase.default); |
| 371 | -/** | |
| 372 | - * Function debounce(). | |
| 373 | - * | |
| 374 | - * Will debounce every function you pass in, at the same debounce flow. | |
| 375 | - * | |
| 376 | - * @param {Function} | |
| 377 | - */ | |
| 465 | + | |
| 466 | +exports["default"] = CommandHistoryDebounceBase; | |
| 378 | 467 | (0, _defineProperty2.default)(CommandHistoryDebounceBase, "debounce", undefined); |
| 379 | 468 | |
| 380 | 469 | /***/ }), |
| 381 | 470 | |
| @@ -391,11 +480,15 @@ | ||
| 391 | 480 | Object.defineProperty(exports, "__esModule", ({ |
| 392 | 481 | value: true |
| 393 | 482 | })); |
| 394 | 483 | exports["default"] = void 0; |
| 395 | -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; } } }; } | |
| 396 | -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; } } | |
| 397 | -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; } | |
| 484 | + | |
| 485 | +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } | |
| 486 | + | |
| 487 | +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | |
| 488 | + | |
| 489 | +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } | |
| 490 | + | |
| 398 | 491 | /** |
| 399 | 492 | * Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved |
| 400 | 493 | * object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can |
| 401 | 494 | * check whether it's instanceof by using the objects constructor and prototype names. |
| @@ -403,16 +496,19 @@ | ||
| 403 | 496 | * @param object |
| 404 | 497 | * @param constructors |
| 405 | 498 | * @return {boolean} |
| 406 | 499 | */ |
| 407 | -var _default = exports["default"] = function _default(object, constructors) { | |
| 500 | +var _default = function _default(object, constructors) { | |
| 408 | 501 | constructors = Array.isArray(constructors) ? constructors : [constructors]; |
| 502 | + | |
| 409 | 503 | var _iterator = _createForOfIteratorHelper(constructors), |
| 410 | - _step; | |
| 504 | + _step; | |
| 505 | + | |
| 411 | 506 | try { |
| 412 | 507 | for (_iterator.s(); !(_step = _iterator.n()).done;) { |
| 413 | - var constructor = _step.value; | |
| 414 | - if (object.constructor.name === constructor.prototype[Symbol.toStringTag]) { | |
| 508 | + var _constructor = _step.value; | |
| 509 | + | |
| 510 | + if (object.constructor.name === _constructor.prototype[Symbol.toStringTag]) { | |
| 415 | 511 | return true; |
| 416 | 512 | } |
| 417 | 513 | } |
| 418 | 514 | } catch (err) { |
| @@ -419,11 +515,14 @@ | ||
| 419 | 515 | _iterator.e(err); |
| 420 | 516 | } finally { |
| 421 | 517 | _iterator.f(); |
| 422 | 518 | } |
| 519 | + | |
| 423 | 520 | return false; |
| 424 | 521 | }; |
| 425 | 522 | |
| 523 | +exports["default"] = _default; | |
| 524 | + | |
| 426 | 525 | /***/ }), |
| 427 | 526 | |
| 428 | 527 | /***/ "../assets/dev/js/modules/imports/args-object.js": |
| 429 | 528 | /*!*******************************************************!*\ |
| @@ -434,23 +533,39 @@ | ||
| 434 | 533 | "use strict"; |
| 435 | 534 | |
| 436 | 535 | |
| 437 | 536 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 537 | + | |
| 438 | 538 | Object.defineProperty(exports, "__esModule", ({ |
| 439 | 539 | value: true |
| 440 | 540 | })); |
| 441 | 541 | exports["default"] = void 0; |
| 542 | + | |
| 442 | 543 | var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js")); |
| 544 | + | |
| 443 | 545 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 546 | + | |
| 444 | 547 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 548 | + | |
| 549 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 550 | + | |
| 445 | 551 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 552 | + | |
| 446 | 553 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 447 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 554 | + | |
| 448 | 555 | var _instanceType = _interopRequireDefault(__webpack_require__(/*! ./instance-type */ "../assets/dev/js/modules/imports/instance-type.js")); |
| 556 | + | |
| 449 | 557 | var _isInstanceof = _interopRequireDefault(__webpack_require__(/*! ../../editor/utils/is-instanceof */ "../assets/dev/js/editor/utils/is-instanceof.js")); |
| 450 | -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)); } | |
| 451 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 452 | -var ArgsObject = exports["default"] = /*#__PURE__*/function (_InstanceType) { | |
| 558 | + | |
| 559 | +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); }; } | |
| 560 | + | |
| 561 | +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; } } | |
| 562 | + | |
| 563 | +var ArgsObject = /*#__PURE__*/function (_InstanceType) { | |
| 564 | + (0, _inherits2.default)(ArgsObject, _InstanceType); | |
| 565 | + | |
| 566 | + var _super = _createSuper(ArgsObject); | |
| 567 | + | |
| 453 | 568 | /** |
| 454 | 569 | * Function constructor(). |
| 455 | 570 | * |
| 456 | 571 | * Create ArgsObject. |
| @@ -458,14 +573,14 @@ | ||
| 458 | 573 | * @param {{}} args |
| 459 | 574 | */ |
| 460 | 575 | function ArgsObject(args) { |
| 461 | 576 | var _this; |
| 577 | + | |
| 462 | 578 | (0, _classCallCheck2.default)(this, ArgsObject); |
| 463 | - _this = _callSuper(this, ArgsObject); | |
| 579 | + _this = _super.call(this); | |
| 464 | 580 | _this.args = args; |
| 465 | 581 | return _this; |
| 466 | 582 | } |
| 467 | - | |
| 468 | 583 | /** |
| 469 | 584 | * Function requireArgument(). |
| 470 | 585 | * |
| 471 | 586 | * Validate property in args. |
| @@ -473,19 +588,21 @@ | ||
| 473 | 588 | * @param {string} property |
| 474 | 589 | * @param {{}} args |
| 475 | 590 | * |
| 476 | 591 | * @throws {Error} |
| 592 | + * | |
| 477 | 593 | */ |
| 478 | - (0, _inherits2.default)(ArgsObject, _InstanceType); | |
| 479 | - return (0, _createClass2.default)(ArgsObject, [{ | |
| 594 | + | |
| 595 | + | |
| 596 | + (0, _createClass2.default)(ArgsObject, [{ | |
| 480 | 597 | key: "requireArgument", |
| 481 | 598 | value: function requireArgument(property) { |
| 482 | 599 | var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.args; |
| 600 | + | |
| 483 | 601 | if (!Object.prototype.hasOwnProperty.call(args, property)) { |
| 484 | 602 | throw Error("".concat(property, " is required.")); |
| 485 | 603 | } |
| 486 | 604 | } |
| 487 | - | |
| 488 | 605 | /** |
| 489 | 606 | * Function requireArgumentType(). |
| 490 | 607 | * |
| 491 | 608 | * Validate property in args using `type === typeof(args.whatever)`. |
| @@ -494,19 +611,21 @@ | ||
| 494 | 611 | * @param {string} type |
| 495 | 612 | * @param {{}} args |
| 496 | 613 | * |
| 497 | 614 | * @throws {Error} |
| 615 | + * | |
| 498 | 616 | */ |
| 617 | + | |
| 499 | 618 | }, { |
| 500 | 619 | key: "requireArgumentType", |
| 501 | 620 | value: function requireArgumentType(property, type) { |
| 502 | 621 | var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; |
| 503 | 622 | this.requireArgument(property, args); |
| 623 | + | |
| 504 | 624 | if ((0, _typeof2.default)(args[property]) !== type) { |
| 505 | 625 | throw Error("".concat(property, " invalid type: ").concat(type, ".")); |
| 506 | 626 | } |
| 507 | 627 | } |
| 508 | - | |
| 509 | 628 | /** |
| 510 | 629 | * Function requireArgumentInstance(). |
| 511 | 630 | * |
| 512 | 631 | * Validate property in args using `args.whatever instanceof instance`. |
| @@ -515,19 +634,21 @@ | ||
| 515 | 634 | * @param {*} instance |
| 516 | 635 | * @param {{}} args |
| 517 | 636 | * |
| 518 | 637 | * @throws {Error} |
| 638 | + * | |
| 519 | 639 | */ |
| 640 | + | |
| 520 | 641 | }, { |
| 521 | 642 | key: "requireArgumentInstance", |
| 522 | 643 | value: function requireArgumentInstance(property, instance) { |
| 523 | 644 | var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; |
| 524 | 645 | this.requireArgument(property, args); |
| 646 | + | |
| 525 | 647 | if (!(args[property] instanceof instance) && !(0, _isInstanceof.default)(args[property], instance)) { |
| 526 | 648 | throw Error("".concat(property, " invalid instance.")); |
| 527 | 649 | } |
| 528 | 650 | } |
| 529 | - | |
| 530 | 651 | /** |
| 531 | 652 | * Function requireArgumentConstructor(). |
| 532 | 653 | * |
| 533 | 654 | * Validate property in args using `type === args.whatever.constructor`. |
| @@ -536,17 +657,18 @@ | ||
| 536 | 657 | * @param {*} type |
| 537 | 658 | * @param {{}} args |
| 538 | 659 | * |
| 539 | 660 | * @throws {Error} |
| 661 | + * | |
| 540 | 662 | */ |
| 663 | + | |
| 541 | 664 | }, { |
| 542 | 665 | key: "requireArgumentConstructor", |
| 543 | 666 | value: function requireArgumentConstructor(property, type) { |
| 544 | 667 | var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; |
| 545 | - this.requireArgument(property, args); | |
| 668 | + this.requireArgument(property, args); // Note: Converting the constructor to string in order to avoid equation issues | |
| 669 | + // due to different memory addresses between iframes (window.Object !== window.top.Object). | |
| 546 | 670 | |
| 547 | - // Note: Converting the constructor to string in order to avoid equation issues | |
| 548 | - // due to different memory addresses between iframes (window.Object !== window.top.Object). | |
| 549 | 671 | if (args[property].constructor.toString() !== type.prototype.constructor.toString()) { |
| 550 | 672 | throw Error("".concat(property, " invalid constructor type.")); |
| 551 | 673 | } |
| 552 | 674 | } |
| @@ -555,10 +677,13 @@ | ||
| 555 | 677 | value: function getInstanceType() { |
| 556 | 678 | return 'ArgsObject'; |
| 557 | 679 | } |
| 558 | 680 | }]); |
| 681 | + return ArgsObject; | |
| 559 | 682 | }(_instanceType.default); |
| 560 | 683 | |
| 684 | +exports["default"] = ArgsObject; | |
| 685 | + | |
| 561 | 686 | /***/ }), |
| 562 | 687 | |
| 563 | 688 | /***/ "../assets/dev/js/modules/imports/instance-type.js": |
| 564 | 689 | /*!*********************************************************!*\ |
| @@ -569,34 +694,43 @@ | ||
| 569 | 694 | "use strict"; |
| 570 | 695 | |
| 571 | 696 | |
| 572 | 697 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 698 | + | |
| 573 | 699 | Object.defineProperty(exports, "__esModule", ({ |
| 574 | 700 | value: true |
| 575 | 701 | })); |
| 576 | 702 | exports["default"] = void 0; |
| 703 | + | |
| 577 | 704 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 705 | + | |
| 578 | 706 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 707 | + | |
| 708 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 709 | + | |
| 579 | 710 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 580 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 581 | -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; } | |
| 582 | -var InstanceType = exports["default"] = /*#__PURE__*/function () { | |
| 711 | + | |
| 712 | +var InstanceType = /*#__PURE__*/function (_Symbol$hasInstance) { | |
| 583 | 713 | function InstanceType() { |
| 584 | 714 | var _this = this; |
| 715 | + | |
| 585 | 716 | (0, _classCallCheck2.default)(this, InstanceType); |
| 586 | 717 | // Since anonymous classes sometimes do not get validated by babel, do it manually. |
| 587 | 718 | var target = this instanceof InstanceType ? this.constructor : void 0; |
| 588 | 719 | var prototypes = []; |
| 720 | + | |
| 589 | 721 | while (target.__proto__ && target.__proto__.name) { |
| 590 | 722 | prototypes.push(target.__proto__); |
| 591 | 723 | target = target.__proto__; |
| 592 | 724 | } |
| 725 | + | |
| 593 | 726 | prototypes.reverse().forEach(function (proto) { |
| 594 | 727 | return _this instanceof proto; |
| 595 | 728 | }); |
| 596 | 729 | } |
| 597 | - return (0, _createClass2.default)(InstanceType, null, [{ | |
| 598 | - key: Symbol.hasInstance, | |
| 730 | + | |
| 731 | + (0, _createClass2.default)(InstanceType, null, [{ | |
| 732 | + key: _Symbol$hasInstance, | |
| 599 | 733 | value: function value(target) { |
| 600 | 734 | /** |
| 601 | 735 | * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class |
| 602 | 736 | * its give's opportunity to mange capabilities of instanceOf operator. |
| @@ -601,34 +735,39 @@ | ||
| 601 | 735 | * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class |
| 602 | 736 | * its give's opportunity to mange capabilities of instanceOf operator. |
| 603 | 737 | * saving current class each time will give option later to handle instanceOf manually. |
| 604 | 738 | */ |
| 605 | - var result = _superPropGet(InstanceType, Symbol.hasInstance, this, 2)([target]); | |
| 739 | + var result = (0, _get2.default)((0, _getPrototypeOf2.default)(InstanceType), Symbol.hasInstance, this).call(this, target); // Act normal when validate a class, which does not have instance type. | |
| 606 | 740 | |
| 607 | - // Act normal when validate a class, which does not have instance type. | |
| 608 | 741 | if (target && !target.constructor.getInstanceType) { |
| 609 | 742 | return result; |
| 610 | 743 | } |
| 744 | + | |
| 611 | 745 | if (target) { |
| 612 | 746 | if (!target.instanceTypes) { |
| 613 | 747 | target.instanceTypes = []; |
| 614 | 748 | } |
| 749 | + | |
| 615 | 750 | if (!result) { |
| 616 | 751 | if (this.getInstanceType() === target.constructor.getInstanceType()) { |
| 617 | 752 | result = true; |
| 618 | 753 | } |
| 619 | 754 | } |
| 755 | + | |
| 620 | 756 | if (result) { |
| 621 | 757 | var name = this.getInstanceType === InstanceType.getInstanceType ? 'BaseInstanceType' : this.getInstanceType(); |
| 758 | + | |
| 622 | 759 | if (-1 === target.instanceTypes.indexOf(name)) { |
| 623 | 760 | target.instanceTypes.push(name); |
| 624 | 761 | } |
| 625 | 762 | } |
| 626 | 763 | } |
| 764 | + | |
| 627 | 765 | if (!result && target) { |
| 628 | 766 | // Check if the given 'target', is instance of known types. |
| 629 | 767 | result = target.instanceTypes && Array.isArray(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType()); |
| 630 | 768 | } |
| 769 | + | |
| 631 | 770 | return result; |
| 632 | 771 | } |
| 633 | 772 | }, { |
| 634 | 773 | key: "getInstanceType", |
| @@ -635,10 +774,13 @@ | ||
| 635 | 774 | value: function getInstanceType() { |
| 636 | 775 | elementorModules.ForceMethodImplementation(); |
| 637 | 776 | } |
| 638 | 777 | }]); |
| 639 | -}(); | |
| 778 | + return InstanceType; | |
| 779 | +}(Symbol.hasInstance); | |
| 640 | 780 | |
| 781 | +exports["default"] = InstanceType; | |
| 782 | + | |
| 641 | 783 | /***/ }), |
| 642 | 784 | |
| 643 | 785 | /***/ "../modules/web-cli/assets/js/modules/command-base.js": |
| 644 | 786 | /*!************************************************************!*\ |
| @@ -649,31 +791,46 @@ | ||
| 649 | 791 | "use strict"; |
| 650 | 792 | |
| 651 | 793 | |
| 652 | 794 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 795 | + | |
| 653 | 796 | Object.defineProperty(exports, "__esModule", ({ |
| 654 | 797 | value: true |
| 655 | 798 | })); |
| 656 | 799 | exports["default"] = void 0; |
| 800 | + | |
| 657 | 801 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 802 | + | |
| 658 | 803 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 804 | + | |
| 805 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 806 | + | |
| 659 | 807 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 808 | + | |
| 660 | 809 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 661 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 810 | + | |
| 662 | 811 | var _commandInfra = _interopRequireDefault(__webpack_require__(/*! ./command-infra */ "../modules/web-cli/assets/js/modules/command-infra.js")); |
| 812 | + | |
| 663 | 813 | var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); |
| 664 | -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)); } | |
| 665 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 814 | + | |
| 815 | +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); }; } | |
| 816 | + | |
| 817 | +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; } } | |
| 818 | + | |
| 666 | 819 | /** |
| 667 | 820 | * @name $e.modules.CommandBase |
| 668 | 821 | */ |
| 669 | -var CommandBase = exports["default"] = /*#__PURE__*/function (_CommandInfra) { | |
| 822 | +var CommandBase = /*#__PURE__*/function (_CommandInfra) { | |
| 823 | + (0, _inherits2.default)(CommandBase, _CommandInfra); | |
| 824 | + | |
| 825 | + var _super = _createSuper(CommandBase); | |
| 826 | + | |
| 670 | 827 | function CommandBase() { |
| 671 | 828 | (0, _classCallCheck2.default)(this, CommandBase); |
| 672 | - return _callSuper(this, CommandBase, arguments); | |
| 829 | + return _super.apply(this, arguments); | |
| 673 | 830 | } |
| 674 | - (0, _inherits2.default)(CommandBase, _CommandInfra); | |
| 675 | - return (0, _createClass2.default)(CommandBase, [{ | |
| 831 | + | |
| 832 | + (0, _createClass2.default)(CommandBase, [{ | |
| 676 | 833 | key: "onBeforeRun", |
| 677 | 834 | value: function onBeforeRun() { |
| 678 | 835 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 679 | 836 | $e.hooks.runUIBefore(this.command, args); |
| @@ -695,9 +852,9 @@ | ||
| 695 | 852 | key: "onAfterApply", |
| 696 | 853 | value: function onAfterApply() { |
| 697 | 854 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 698 | 855 | var result = arguments.length > 1 ? arguments[1] : undefined; |
| 699 | - return $e.hooks.runDataAfter(this.command, args, result); | |
| 856 | + $e.hooks.runDataAfter(this.command, args, result); | |
| 700 | 857 | } |
| 701 | 858 | }, { |
| 702 | 859 | key: "onCatchApply", |
| 703 | 860 | value: function onCatchApply(e) { |
| @@ -702,14 +859,14 @@ | ||
| 702 | 859 | key: "onCatchApply", |
| 703 | 860 | value: function onCatchApply(e) { |
| 704 | 861 | this.runCatchHooks(e); |
| 705 | 862 | } |
| 706 | - | |
| 707 | 863 | /** |
| 708 | 864 | * Run all the catch hooks. |
| 709 | 865 | * |
| 710 | 866 | * @param {Error} e |
| 711 | 867 | */ |
| 868 | + | |
| 712 | 869 | }, { |
| 713 | 870 | key: "runCatchHooks", |
| 714 | 871 | value: function runCatchHooks(e) { |
| 715 | 872 | $e.hooks.runDataCatch(this.command, this.args, e); |
| @@ -714,9 +871,8 @@ | ||
| 714 | 871 | value: function runCatchHooks(e) { |
| 715 | 872 | $e.hooks.runDataCatch(this.command, this.args, e); |
| 716 | 873 | $e.hooks.runUICatch(this.command, this.args, e); |
| 717 | 874 | } |
| 718 | - | |
| 719 | 875 | /** |
| 720 | 876 | * TODO - Remove - Backwards compatibility. |
| 721 | 877 | * |
| 722 | 878 | * Function requireContainer(). |
| @@ -723,24 +879,29 @@ | ||
| 723 | 879 | * |
| 724 | 880 | * Validate `arg.container` & `arg.containers`. |
| 725 | 881 | * |
| 726 | 882 | * @param {{}} args |
| 727 | - * @deprecated since 3.7.0, extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase` instead. | |
| 728 | 883 | * |
| 729 | 884 | * @throws {Error} |
| 730 | 885 | */ |
| 886 | + | |
| 731 | 887 | }, { |
| 732 | 888 | key: "requireContainer", |
| 733 | 889 | value: function requireContainer() { |
| 734 | 890 | var _this = this; |
| 891 | + | |
| 735 | 892 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args; |
| 736 | - _deprecation.default.deprecated('requireContainer()', '3.7.0', 'Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`'); | |
| 893 | + | |
| 894 | + _deprecation.default.deprecated('requireContainer', '3.7.0', 'Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`'); | |
| 895 | + | |
| 737 | 896 | if (!args.container && !args.containers) { |
| 738 | 897 | throw Error('container or containers are required.'); |
| 739 | 898 | } |
| 899 | + | |
| 740 | 900 | if (args.container && args.containers) { |
| 741 | 901 | throw Error('container and containers cannot go together please select one of them.'); |
| 742 | 902 | } |
| 903 | + | |
| 743 | 904 | var containers = args.containers || [args.container]; |
| 744 | 905 | containers.forEach(function (container) { |
| 745 | 906 | _this.requireArgumentInstance('container', elementorModules.editor.Container, { |
| 746 | 907 | container: container |
| @@ -752,10 +913,13 @@ | ||
| 752 | 913 | value: function getInstanceType() { |
| 753 | 914 | return 'CommandBase'; |
| 754 | 915 | } |
| 755 | 916 | }]); |
| 917 | + return CommandBase; | |
| 756 | 918 | }(_commandInfra.default); |
| 757 | 919 | |
| 920 | +exports["default"] = CommandBase; | |
| 921 | + | |
| 758 | 922 | /***/ }), |
| 759 | 923 | |
| 760 | 924 | /***/ "../modules/web-cli/assets/js/modules/command-infra.js": |
| 761 | 925 | /*!*************************************************************!*\ |
| @@ -766,26 +930,42 @@ | ||
| 766 | 930 | "use strict"; |
| 767 | 931 | |
| 768 | 932 | |
| 769 | 933 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 934 | + | |
| 770 | 935 | Object.defineProperty(exports, "__esModule", ({ |
| 771 | 936 | value: true |
| 772 | 937 | })); |
| 773 | 938 | exports["default"] = void 0; |
| 939 | + | |
| 774 | 940 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 941 | + | |
| 775 | 942 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 943 | + | |
| 944 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 945 | + | |
| 776 | 946 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 947 | + | |
| 777 | 948 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 778 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 949 | + | |
| 779 | 950 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 951 | + | |
| 780 | 952 | var _argsObject = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js")); |
| 953 | + | |
| 781 | 954 | var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); |
| 782 | -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)); } | |
| 783 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 955 | + | |
| 956 | +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); }; } | |
| 957 | + | |
| 958 | +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; } } | |
| 959 | + | |
| 784 | 960 | /** |
| 785 | 961 | * @typedef {import('../modules/component-base')} ComponentBase |
| 786 | 962 | */ |
| 787 | -var CommandInfra = exports["default"] = /*#__PURE__*/function (_ArgsObject) { | |
| 963 | +var CommandInfra = /*#__PURE__*/function (_ArgsObject) { | |
| 964 | + (0, _inherits2.default)(CommandInfra, _ArgsObject); | |
| 965 | + | |
| 966 | + var _super = _createSuper(CommandInfra); | |
| 967 | + | |
| 788 | 968 | /** |
| 789 | 969 | * Function constructor(). |
| 790 | 970 | * |
| 791 | 971 | * Create Commands Base. |
| @@ -793,32 +973,31 @@ | ||
| 793 | 973 | * @param {{}} args |
| 794 | 974 | */ |
| 795 | 975 | function CommandInfra() { |
| 796 | 976 | var _this; |
| 977 | + | |
| 797 | 978 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 798 | 979 | (0, _classCallCheck2.default)(this, CommandInfra); |
| 799 | - _this = _callSuper(this, CommandInfra, [args]); | |
| 980 | + _this = _super.call(this, args); | |
| 981 | + | |
| 800 | 982 | if (!_this.constructor.registerConfig) { |
| 801 | 983 | throw RangeError('Doing it wrong: Each command type should have `registerConfig`.'); |
| 802 | - } | |
| 984 | + } // Acknowledge self about which command it run. | |
| 803 | 985 | |
| 804 | - // Acknowledge self about which command it run. | |
| 805 | - _this.command = _this.constructor.getCommand(); | |
| 806 | 986 | |
| 807 | - // Assign instance of current component. | |
| 808 | - _this.component = _this.constructor.getComponent(); | |
| 987 | + _this.command = _this.constructor.getCommand(); // Assign instance of current component. | |
| 809 | 988 | |
| 810 | - // Who ever need do something before without `super` the constructor can use `initialize` method. | |
| 811 | - _this.initialize(args); | |
| 989 | + _this.component = _this.constructor.getComponent(); // Who ever need do something before without `super` the constructor can use `initialize` method. | |
| 812 | 990 | |
| 813 | - // Refresh args, maybe the changed via `initialize`. | |
| 814 | - args = _this.args; | |
| 991 | + _this.initialize(args); // Refresh args, maybe the changed via `initialize`. | |
| 815 | 992 | |
| 816 | - // Validate args before run. | |
| 993 | + | |
| 994 | + args = _this.args; // Validate args before run. | |
| 995 | + | |
| 817 | 996 | _this.validateArgs(args); |
| 997 | + | |
| 818 | 998 | return _this; |
| 819 | 999 | } |
| 820 | - | |
| 821 | 1000 | /** |
| 822 | 1001 | * Function initialize(). |
| 823 | 1002 | * |
| 824 | 1003 | * Initialize command, called after construction. |
| @@ -824,17 +1003,16 @@ | ||
| 824 | 1003 | * Initialize command, called after construction. |
| 825 | 1004 | * |
| 826 | 1005 | * @param {{}} args |
| 827 | 1006 | */ |
| 828 | - (0, _inherits2.default)(CommandInfra, _ArgsObject); | |
| 829 | - return (0, _createClass2.default)(CommandInfra, [{ | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + (0, _createClass2.default)(CommandInfra, [{ | |
| 830 | 1010 | key: "currentCommand", |
| 831 | - get: | |
| 832 | - /** | |
| 833 | - * @deprecated since 3.7.0, use `this.command` instead. | |
| 834 | - */ | |
| 1011 | + get: // TODO - Remove backwards compatibility. | |
| 835 | 1012 | function get() { |
| 836 | 1013 | _deprecation.default.deprecated('this.currentCommand', '3.7.0', 'this.command'); |
| 1014 | + | |
| 837 | 1015 | return this.command; |
| 838 | 1016 | } |
| 839 | 1017 | }, { |
| 840 | 1018 | key: "initialize", |
| @@ -848,15 +1026,16 @@ | ||
| 848 | 1026 | * Validate command arguments. |
| 849 | 1027 | * |
| 850 | 1028 | * @param {{}} args |
| 851 | 1029 | */ |
| 1030 | + | |
| 852 | 1031 | }, { |
| 853 | 1032 | key: "validateArgs", |
| 854 | 1033 | value: function validateArgs() { |
| 855 | 1034 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 856 | 1035 | } // eslint-disable-line no-unused-vars |
| 1036 | + // eslint-disable-next-line jsdoc/require-returns-check | |
| 857 | 1037 | |
| 858 | - // eslint-disable-next-line jsdoc/require-returns-check | |
| 859 | 1038 | /** |
| 860 | 1039 | * Function apply(). |
| 861 | 1040 | * |
| 862 | 1041 | * Do the actual command. |
| @@ -864,8 +1043,9 @@ | ||
| 864 | 1043 | * @param {{}} args |
| 865 | 1044 | * |
| 866 | 1045 | * @return {*} Command results. |
| 867 | 1046 | */ |
| 1047 | + | |
| 868 | 1048 | }, { |
| 869 | 1049 | key: "apply", |
| 870 | 1050 | value: function apply() { |
| 871 | 1051 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| @@ -871,9 +1051,8 @@ | ||
| 871 | 1051 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 872 | 1052 | // eslint-disable-line no-unused-vars |
| 873 | 1053 | elementorModules.ForceMethodImplementation(); |
| 874 | 1054 | } |
| 875 | - | |
| 876 | 1055 | /** |
| 877 | 1056 | * Function run(). |
| 878 | 1057 | * |
| 879 | 1058 | * Run command with history & hooks. |
| @@ -879,14 +1058,14 @@ | ||
| 879 | 1058 | * Run command with history & hooks. |
| 880 | 1059 | * |
| 881 | 1060 | * @return {*} Command results. |
| 882 | 1061 | */ |
| 1062 | + | |
| 883 | 1063 | }, { |
| 884 | 1064 | key: "run", |
| 885 | 1065 | value: function run() { |
| 886 | 1066 | return this.apply(this.args); |
| 887 | 1067 | } |
| 888 | - | |
| 889 | 1068 | /** |
| 890 | 1069 | * Function onBeforeRun. |
| 891 | 1070 | * |
| 892 | 1071 | * Called before run(). |
| @@ -892,8 +1071,9 @@ | ||
| 892 | 1071 | * Called before run(). |
| 893 | 1072 | * |
| 894 | 1073 | * @param {{}} args |
| 895 | 1074 | */ |
| 1075 | + | |
| 896 | 1076 | }, { |
| 897 | 1077 | key: "onBeforeRun", |
| 898 | 1078 | value: function onBeforeRun() { |
| 899 | 1079 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| @@ -906,8 +1086,9 @@ | ||
| 906 | 1086 | * |
| 907 | 1087 | * @param {{}} args |
| 908 | 1088 | * @param {*} result |
| 909 | 1089 | */ |
| 1090 | + | |
| 910 | 1091 | }, { |
| 911 | 1092 | key: "onAfterRun", |
| 912 | 1093 | value: function onAfterRun() { |
| 913 | 1094 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| @@ -920,8 +1101,9 @@ | ||
| 920 | 1101 | * Called before apply(). |
| 921 | 1102 | * |
| 922 | 1103 | * @param {{}} args |
| 923 | 1104 | */ |
| 1105 | + | |
| 924 | 1106 | }, { |
| 925 | 1107 | key: "onBeforeApply", |
| 926 | 1108 | value: function onBeforeApply() { |
| 927 | 1109 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| @@ -934,8 +1116,9 @@ | ||
| 934 | 1116 | * |
| 935 | 1117 | * @param {{}} args |
| 936 | 1118 | * @param {*} result |
| 937 | 1119 | */ |
| 1120 | + | |
| 938 | 1121 | }, { |
| 939 | 1122 | key: "onAfterApply", |
| 940 | 1123 | value: function onAfterApply() { |
| 941 | 1124 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| @@ -948,40 +1131,46 @@ | ||
| 948 | 1131 | * Called after apply() failed. |
| 949 | 1132 | * |
| 950 | 1133 | * @param {Error} e |
| 951 | 1134 | */ |
| 1135 | + | |
| 952 | 1136 | }, { |
| 953 | 1137 | key: "onCatchApply", |
| 954 | 1138 | value: function onCatchApply(e) {} // eslint-disable-line no-unused-vars |
| 1139 | + | |
| 955 | 1140 | }], [{ |
| 956 | 1141 | key: "getInstanceType", |
| 957 | - value: function getInstanceType() { | |
| 1142 | + value: | |
| 1143 | + /** | |
| 1144 | + * @type {Object} | |
| 1145 | + */ | |
| 1146 | + function getInstanceType() { | |
| 958 | 1147 | return 'CommandInfra'; |
| 959 | 1148 | } |
| 960 | - | |
| 961 | 1149 | /** |
| 962 | 1150 | * Get info of command. |
| 963 | 1151 | * |
| 964 | 1152 | * @return {Object} Extra information about the command. |
| 965 | 1153 | */ |
| 1154 | + | |
| 966 | 1155 | }, { |
| 967 | 1156 | key: "getInfo", |
| 968 | 1157 | value: function getInfo() { |
| 969 | 1158 | return {}; |
| 970 | 1159 | } |
| 971 | - | |
| 972 | 1160 | /** |
| 973 | 1161 | * @return {string} Self command name. |
| 974 | 1162 | */ |
| 1163 | + | |
| 975 | 1164 | }, { |
| 976 | 1165 | key: "getCommand", |
| 977 | 1166 | value: function getCommand() { |
| 978 | 1167 | return this.registerConfig.command; |
| 979 | 1168 | } |
| 980 | - | |
| 981 | 1169 | /** |
| 982 | 1170 | * @return {ComponentBase} Self component |
| 983 | 1171 | */ |
| 1172 | + | |
| 984 | 1173 | }, { |
| 985 | 1174 | key: "getComponent", |
| 986 | 1175 | value: function getComponent() { |
| 987 | 1176 | return this.registerConfig.component; |
| @@ -991,12 +1180,12 @@ | ||
| 991 | 1180 | value: function setRegisterConfig(config) { |
| 992 | 1181 | this.registerConfig = Object.freeze(config); |
| 993 | 1182 | } |
| 994 | 1183 | }]); |
| 1184 | + return CommandInfra; | |
| 995 | 1185 | }(_argsObject.default); |
| 996 | -/** | |
| 997 | - * @type {Object} | |
| 998 | - */ | |
| 1186 | + | |
| 1187 | +exports["default"] = CommandInfra; | |
| 999 | 1188 | (0, _defineProperty2.default)(CommandInfra, "registerConfig", null); |
| 1000 | 1189 | |
| 1001 | 1190 | /***/ }), |
| 1002 | 1191 | |
| @@ -1009,27 +1198,32 @@ | ||
| 1009 | 1198 | "use strict"; |
| 1010 | 1199 | |
| 1011 | 1200 | |
| 1012 | 1201 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1202 | + | |
| 1013 | 1203 | Object.defineProperty(exports, "__esModule", ({ |
| 1014 | 1204 | value: true |
| 1015 | 1205 | })); |
| 1016 | 1206 | exports["default"] = void 0; |
| 1207 | + | |
| 1017 | 1208 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1209 | + | |
| 1018 | 1210 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1019 | -var Console = exports["default"] = /*#__PURE__*/function () { | |
| 1211 | + | |
| 1212 | +var Console = /*#__PURE__*/function () { | |
| 1020 | 1213 | function Console() { |
| 1021 | 1214 | (0, _classCallCheck2.default)(this, Console); |
| 1022 | 1215 | } |
| 1023 | - return (0, _createClass2.default)(Console, null, [{ | |
| 1216 | + | |
| 1217 | + (0, _createClass2.default)(Console, null, [{ | |
| 1024 | 1218 | key: "error", |
| 1025 | 1219 | value: function error(message) { |
| 1026 | 1220 | // Show an error if devTools is available. |
| 1027 | 1221 | if ($e.devTools) { |
| 1028 | 1222 | $e.devTools.log.error(message); |
| 1029 | - } | |
| 1223 | + } // If not a 'Hook-Break' then show error. | |
| 1030 | 1224 | |
| 1031 | - // If not a 'Hook-Break' then show error. | |
| 1225 | + | |
| 1032 | 1226 | if (!(message instanceof $e.modules.HookBreak)) { |
| 1033 | 1227 | // eslint-disable-next-line no-console |
| 1034 | 1228 | console.error(message); |
| 1035 | 1229 | } |
| @@ -1037,18 +1231,26 @@ | ||
| 1037 | 1231 | }, { |
| 1038 | 1232 | key: "warn", |
| 1039 | 1233 | value: function warn() { |
| 1040 | 1234 | var _console; |
| 1235 | + | |
| 1041 | 1236 | var style = "font-size: 12px; background-image: url(\"".concat(elementorWebCliConfig.urls.assets, "images/logo-icon.png\"); background-repeat: no-repeat; background-size: contain;"); |
| 1237 | + | |
| 1042 | 1238 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| 1043 | 1239 | args[_key] = arguments[_key]; |
| 1044 | 1240 | } |
| 1241 | + | |
| 1045 | 1242 | args.unshift('%c %c', style, ''); |
| 1243 | + | |
| 1046 | 1244 | (_console = console).warn.apply(_console, args); // eslint-disable-line no-console |
| 1245 | + | |
| 1047 | 1246 | } |
| 1048 | 1247 | }]); |
| 1248 | + return Console; | |
| 1049 | 1249 | }(); |
| 1050 | 1250 | |
| 1251 | +exports["default"] = Console; | |
| 1252 | + | |
| 1051 | 1253 | /***/ }), |
| 1052 | 1254 | |
| 1053 | 1255 | /***/ "../modules/web-cli/assets/js/utils/deprecation.js": |
| 1054 | 1256 | /*!*********************************************************!*\ |
| @@ -1059,17 +1261,24 @@ | ||
| 1059 | 1261 | "use strict"; |
| 1060 | 1262 | |
| 1061 | 1263 | |
| 1062 | 1264 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1265 | + | |
| 1063 | 1266 | Object.defineProperty(exports, "__esModule", ({ |
| 1064 | 1267 | value: true |
| 1065 | 1268 | })); |
| 1066 | 1269 | exports["default"] = void 0; |
| 1270 | + | |
| 1067 | 1271 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 1272 | + | |
| 1068 | 1273 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1274 | + | |
| 1069 | 1275 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1276 | + | |
| 1070 | 1277 | var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js")); |
| 1278 | + | |
| 1071 | 1279 | // Copied from `modules/dev-tools/assets/js/deprecation.js` |
| 1280 | + | |
| 1072 | 1281 | /** |
| 1073 | 1282 | * @typedef {Object} Version |
| 1074 | 1283 | * @property {number} major1 The first number |
| 1075 | 1284 | * @property {number} major2 The second number |
| @@ -1075,29 +1284,34 @@ | ||
| 1075 | 1284 | * @property {number} major2 The second number |
| 1076 | 1285 | * @property {number} minor The third number |
| 1077 | 1286 | * @property {string} build The fourth number |
| 1078 | 1287 | */ |
| 1079 | - | |
| 1080 | 1288 | var softDeprecated = function softDeprecated(name, version, replacement) { |
| 1081 | 1289 | if (elementorWebCliConfig.isDebug) { |
| 1082 | 1290 | deprecatedMessage('soft', name, version, replacement); |
| 1083 | 1291 | } |
| 1084 | 1292 | }; |
| 1293 | + | |
| 1085 | 1294 | var hardDeprecated = function hardDeprecated(name, version, replacement) { |
| 1086 | 1295 | deprecatedMessage('hard', name, version, replacement); |
| 1087 | 1296 | }; |
| 1297 | + | |
| 1088 | 1298 | var deprecatedMessage = function deprecatedMessage(type, name, version, replacement) { |
| 1089 | 1299 | var message = "`".concat(name, "` is ").concat(type, " deprecated since ").concat(version); |
| 1300 | + | |
| 1090 | 1301 | if (replacement) { |
| 1091 | 1302 | message += " - Use `".concat(replacement, "` instead"); |
| 1092 | 1303 | } |
| 1304 | + | |
| 1093 | 1305 | _console.default.warn(message); |
| 1094 | 1306 | }; |
| 1095 | -var Deprecation = exports["default"] = /*#__PURE__*/function () { | |
| 1307 | + | |
| 1308 | +var Deprecation = /*#__PURE__*/function () { | |
| 1096 | 1309 | function Deprecation() { |
| 1097 | 1310 | (0, _classCallCheck2.default)(this, Deprecation); |
| 1098 | 1311 | } |
| 1099 | - return (0, _createClass2.default)(Deprecation, null, [{ | |
| 1312 | + | |
| 1313 | + (0, _createClass2.default)(Deprecation, null, [{ | |
| 1100 | 1314 | key: "deprecated", |
| 1101 | 1315 | value: function deprecated(name, version, replacement) { |
| 1102 | 1316 | if (this.isHardDeprecated(version)) { |
| 1103 | 1317 | hardDeprecated(name, version, replacement); |
| @@ -1104,27 +1318,30 @@ | ||
| 1104 | 1318 | } else { |
| 1105 | 1319 | softDeprecated(name, version, replacement); |
| 1106 | 1320 | } |
| 1107 | 1321 | } |
| 1108 | - | |
| 1109 | 1322 | /** |
| 1110 | 1323 | * @param {string} version |
| 1111 | 1324 | * |
| 1112 | 1325 | * @return {Version} |
| 1113 | 1326 | */ |
| 1327 | + | |
| 1114 | 1328 | }, { |
| 1115 | 1329 | key: "parseVersion", |
| 1116 | 1330 | value: function parseVersion(version) { |
| 1117 | 1331 | var versionParts = version.split('.'); |
| 1332 | + | |
| 1118 | 1333 | if (versionParts.length < 3 || versionParts.length > 4) { |
| 1119 | 1334 | throw new RangeError('Invalid Semantic Version string provided'); |
| 1120 | 1335 | } |
| 1336 | + | |
| 1121 | 1337 | var _versionParts = (0, _slicedToArray2.default)(versionParts, 4), |
| 1122 | - major1 = _versionParts[0], | |
| 1123 | - major2 = _versionParts[1], | |
| 1124 | - minor = _versionParts[2], | |
| 1125 | - _versionParts$ = _versionParts[3], | |
| 1126 | - build = _versionParts$ === void 0 ? '' : _versionParts$; | |
| 1338 | + major1 = _versionParts[0], | |
| 1339 | + major2 = _versionParts[1], | |
| 1340 | + minor = _versionParts[2], | |
| 1341 | + _versionParts$ = _versionParts[3], | |
| 1342 | + build = _versionParts$ === void 0 ? '' : _versionParts$; | |
| 1343 | + | |
| 1127 | 1344 | return { |
| 1128 | 1345 | major1: parseInt(major1), |
| 1129 | 1346 | major2: parseInt(major2), |
| 1130 | 1347 | minor: parseInt(minor), |
| @@ -1130,9 +1347,8 @@ | ||
| 1130 | 1347 | minor: parseInt(minor), |
| 1131 | 1348 | build: build |
| 1132 | 1349 | }; |
| 1133 | 1350 | } |
| 1134 | - | |
| 1135 | 1351 | /** |
| 1136 | 1352 | * Get total of major. |
| 1137 | 1353 | * |
| 1138 | 1354 | * Since `get_total_major` cannot determine how much really versions between 2.9.0 and 3.3.0 if there is 2.10.0 version for example, |
| @@ -1141,19 +1357,21 @@ | ||
| 1141 | 1357 | * @param {Version} versionObj |
| 1142 | 1358 | * |
| 1143 | 1359 | * @return {number} |
| 1144 | 1360 | */ |
| 1361 | + | |
| 1145 | 1362 | }, { |
| 1146 | 1363 | key: "getTotalMajor", |
| 1147 | 1364 | value: function getTotalMajor(versionObj) { |
| 1148 | 1365 | var total = parseInt("".concat(versionObj.major1).concat(versionObj.major2, "0")); |
| 1149 | 1366 | total = Number((total / 10).toFixed(0)); |
| 1367 | + | |
| 1150 | 1368 | if (versionObj.major2 > 9) { |
| 1151 | 1369 | total = versionObj.major2 - 9; |
| 1152 | 1370 | } |
| 1371 | + | |
| 1153 | 1372 | return total; |
| 1154 | 1373 | } |
| 1155 | - | |
| 1156 | 1374 | /** |
| 1157 | 1375 | * @param {string} version1 |
| 1158 | 1376 | * @param {string} version2 |
| 1159 | 1377 | * |
| @@ -1158,12 +1376,14 @@ | ||
| 1158 | 1376 | * @param {string} version2 |
| 1159 | 1377 | * |
| 1160 | 1378 | * @return {number} |
| 1161 | 1379 | */ |
| 1380 | + | |
| 1162 | 1381 | }, { |
| 1163 | 1382 | key: "compareVersion", |
| 1164 | 1383 | value: function compareVersion(version1, version2) { |
| 1165 | 1384 | var _this = this; |
| 1385 | + | |
| 1166 | 1386 | return [this.parseVersion(version1), this.parseVersion(version2)].map(function (versionObj) { |
| 1167 | 1387 | return _this.getTotalMajor(versionObj); |
| 1168 | 1388 | }).reduce(function (acc, major) { |
| 1169 | 1389 | return acc - major; |
| @@ -1168,14 +1388,14 @@ | ||
| 1168 | 1388 | }).reduce(function (acc, major) { |
| 1169 | 1389 | return acc - major; |
| 1170 | 1390 | }); |
| 1171 | 1391 | } |
| 1172 | - | |
| 1173 | 1392 | /** |
| 1174 | 1393 | * @param {string} version |
| 1175 | 1394 | * |
| 1176 | 1395 | * @return {boolean} |
| 1177 | 1396 | */ |
| 1397 | + | |
| 1178 | 1398 | }, { |
| 1179 | 1399 | key: "isSoftDeprecated", |
| 1180 | 1400 | value: function isSoftDeprecated(version) { |
| 1181 | 1401 | var total = this.compareVersion(version, elementorWebCliConfig.version); |
| @@ -1180,13 +1400,13 @@ | ||
| 1180 | 1400 | value: function isSoftDeprecated(version) { |
| 1181 | 1401 | var total = this.compareVersion(version, elementorWebCliConfig.version); |
| 1182 | 1402 | return total <= 4; |
| 1183 | 1403 | } |
| 1184 | - | |
| 1185 | 1404 | /** |
| 1186 | 1405 | * @param {string} version |
| 1187 | 1406 | * @return {boolean} |
| 1188 | 1407 | */ |
| 1408 | + | |
| 1189 | 1409 | }, { |
| 1190 | 1410 | key: "isHardDeprecated", |
| 1191 | 1411 | value: function isHardDeprecated(version) { |
| 1192 | 1412 | var total = this.compareVersion(version, elementorWebCliConfig.version); |
| @@ -1192,10 +1412,13 @@ | ||
| 1192 | 1412 | var total = this.compareVersion(version, elementorWebCliConfig.version); |
| 1193 | 1413 | return total < 0 || total >= 8; |
| 1194 | 1414 | } |
| 1195 | 1415 | }]); |
| 1416 | + return Deprecation; | |
| 1196 | 1417 | }(); |
| 1197 | 1418 | |
| 1419 | +exports["default"] = Deprecation; | |
| 1420 | + | |
| 1198 | 1421 | /***/ }), |
| 1199 | 1422 | |
| 1200 | 1423 | /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": |
| 1201 | 1424 | /*!******************************************************************!*\ |
| @@ -1202,13 +1425,18 @@ | ||
| 1202 | 1425 | !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! |
| 1203 | 1426 | \******************************************************************/ |
| 1204 | 1427 | /***/ ((module) => { |
| 1205 | 1428 | |
| 1206 | -function _arrayLikeToArray(r, a) { | |
| 1207 | - (null == a || a > r.length) && (a = r.length); | |
| 1208 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 1209 | - return n; | |
| 1429 | +function _arrayLikeToArray(arr, len) { | |
| 1430 | + if (len == null || len > arr.length) len = arr.length; | |
| 1431 | + | |
| 1432 | + for (var i = 0, arr2 = new Array(len); i < len; i++) { | |
| 1433 | + arr2[i] = arr[i]; | |
| 1434 | + } | |
| 1435 | + | |
| 1436 | + return arr2; | |
| 1210 | 1437 | } |
| 1438 | + | |
| 1211 | 1439 | module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1212 | 1440 | |
| 1213 | 1441 | /***/ }), |
| 1214 | 1442 | |
| @@ -1217,11 +1445,12 @@ | ||
| 1217 | 1445 | !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! |
| 1218 | 1446 | \****************************************************************/ |
| 1219 | 1447 | /***/ ((module) => { |
| 1220 | 1448 | |
| 1221 | -function _arrayWithHoles(r) { | |
| 1222 | - if (Array.isArray(r)) return r; | |
| 1449 | +function _arrayWithHoles(arr) { | |
| 1450 | + if (Array.isArray(arr)) return arr; | |
| 1223 | 1451 | } |
| 1452 | + | |
| 1224 | 1453 | module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1225 | 1454 | |
| 1226 | 1455 | /***/ }), |
| 1227 | 1456 | |
| @@ -1230,12 +1459,16 @@ | ||
| 1230 | 1459 | !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! |
| 1231 | 1460 | \***********************************************************************/ |
| 1232 | 1461 | /***/ ((module) => { |
| 1233 | 1462 | |
| 1234 | -function _assertThisInitialized(e) { | |
| 1235 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 1236 | - return e; | |
| 1463 | +function _assertThisInitialized(self) { | |
| 1464 | + if (self === void 0) { | |
| 1465 | + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 1466 | + } | |
| 1467 | + | |
| 1468 | + return self; | |
| 1237 | 1469 | } |
| 1470 | + | |
| 1238 | 1471 | module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1239 | 1472 | |
| 1240 | 1473 | /***/ }), |
| 1241 | 1474 | |
| @@ -1244,11 +1477,14 @@ | ||
| 1244 | 1477 | !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! |
| 1245 | 1478 | \****************************************************************/ |
| 1246 | 1479 | /***/ ((module) => { |
| 1247 | 1480 | |
| 1248 | -function _classCallCheck(a, n) { | |
| 1249 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 1481 | +function _classCallCheck(instance, Constructor) { | |
| 1482 | + if (!(instance instanceof Constructor)) { | |
| 1483 | + throw new TypeError("Cannot call a class as a function"); | |
| 1484 | + } | |
| 1250 | 1485 | } |
| 1486 | + | |
| 1251 | 1487 | module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1252 | 1488 | |
| 1253 | 1489 | /***/ }), |
| 1254 | 1490 | |
| @@ -1255,22 +1491,29 @@ | ||
| 1255 | 1491 | /***/ "../node_modules/@babel/runtime/helpers/createClass.js": |
| 1256 | 1492 | /*!*************************************************************!*\ |
| 1257 | 1493 | !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! |
| 1258 | 1494 | \*************************************************************/ |
| 1259 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1495 | +/***/ ((module) => { | |
| 1260 | 1496 | |
| 1261 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 1262 | -function _defineProperties(e, r) { | |
| 1263 | - for (var t = 0; t < r.length; t++) { | |
| 1264 | - var o = r[t]; | |
| 1265 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 1497 | +function _defineProperties(target, props) { | |
| 1498 | + for (var i = 0; i < props.length; i++) { | |
| 1499 | + var descriptor = props[i]; | |
| 1500 | + descriptor.enumerable = descriptor.enumerable || false; | |
| 1501 | + descriptor.configurable = true; | |
| 1502 | + if ("value" in descriptor) descriptor.writable = true; | |
| 1503 | + Object.defineProperty(target, descriptor.key, descriptor); | |
| 1266 | 1504 | } |
| 1267 | 1505 | } |
| 1268 | -function _createClass(e, r, t) { | |
| 1269 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 1270 | - writable: !1 | |
| 1271 | - }), e; | |
| 1506 | + | |
| 1507 | +function _createClass(Constructor, protoProps, staticProps) { | |
| 1508 | + if (protoProps) _defineProperties(Constructor.prototype, protoProps); | |
| 1509 | + if (staticProps) _defineProperties(Constructor, staticProps); | |
| 1510 | + Object.defineProperty(Constructor, "prototype", { | |
| 1511 | + writable: false | |
| 1512 | + }); | |
| 1513 | + return Constructor; | |
| 1272 | 1514 | } |
| 1515 | + | |
| 1273 | 1516 | module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1274 | 1517 | |
| 1275 | 1518 | /***/ }), |
| 1276 | 1519 | |
| @@ -1277,19 +1520,25 @@ | ||
| 1277 | 1520 | /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": |
| 1278 | 1521 | /*!****************************************************************!*\ |
| 1279 | 1522 | !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! |
| 1280 | 1523 | \****************************************************************/ |
| 1281 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1524 | +/***/ ((module) => { | |
| 1282 | 1525 | |
| 1283 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 1284 | -function _defineProperty(e, r, t) { | |
| 1285 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 1286 | - value: t, | |
| 1287 | - enumerable: !0, | |
| 1288 | - configurable: !0, | |
| 1289 | - writable: !0 | |
| 1290 | - }) : e[r] = t, e; | |
| 1526 | +function _defineProperty(obj, key, value) { | |
| 1527 | + if (key in obj) { | |
| 1528 | + Object.defineProperty(obj, key, { | |
| 1529 | + value: value, | |
| 1530 | + enumerable: true, | |
| 1531 | + configurable: true, | |
| 1532 | + writable: true | |
| 1533 | + }); | |
| 1534 | + } else { | |
| 1535 | + obj[key] = value; | |
| 1536 | + } | |
| 1537 | + | |
| 1538 | + return obj; | |
| 1291 | 1539 | } |
| 1540 | + | |
| 1292 | 1541 | module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1293 | 1542 | |
| 1294 | 1543 | /***/ }), |
| 1295 | 1544 | |
| @@ -1299,17 +1548,29 @@ | ||
| 1299 | 1548 | \*****************************************************/ |
| 1300 | 1549 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1301 | 1550 | |
| 1302 | 1551 | var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js"); |
| 1552 | + | |
| 1303 | 1553 | function _get() { |
| 1304 | - return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { | |
| 1305 | - var p = superPropBase(e, t); | |
| 1306 | - if (p) { | |
| 1307 | - var n = Object.getOwnPropertyDescriptor(p, t); | |
| 1308 | - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; | |
| 1309 | - } | |
| 1310 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); | |
| 1554 | + if (typeof Reflect !== "undefined" && Reflect.get) { | |
| 1555 | + module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1556 | + } else { | |
| 1557 | + module.exports = _get = function _get(target, property, receiver) { | |
| 1558 | + var base = superPropBase(target, property); | |
| 1559 | + if (!base) return; | |
| 1560 | + var desc = Object.getOwnPropertyDescriptor(base, property); | |
| 1561 | + | |
| 1562 | + if (desc.get) { | |
| 1563 | + return desc.get.call(arguments.length < 3 ? target : receiver); | |
| 1564 | + } | |
| 1565 | + | |
| 1566 | + return desc.value; | |
| 1567 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1568 | + } | |
| 1569 | + | |
| 1570 | + return _get.apply(this, arguments); | |
| 1311 | 1571 | } |
| 1572 | + | |
| 1312 | 1573 | module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1313 | 1574 | |
| 1314 | 1575 | /***/ }), |
| 1315 | 1576 | |
| @@ -1318,13 +1579,15 @@ | ||
| 1318 | 1579 | !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! |
| 1319 | 1580 | \****************************************************************/ |
| 1320 | 1581 | /***/ ((module) => { |
| 1321 | 1582 | |
| 1322 | -function _getPrototypeOf(t) { | |
| 1323 | - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 1324 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 1325 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 1583 | +function _getPrototypeOf(o) { | |
| 1584 | + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { | |
| 1585 | + return o.__proto__ || Object.getPrototypeOf(o); | |
| 1586 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1587 | + return _getPrototypeOf(o); | |
| 1326 | 1588 | } |
| 1589 | + | |
| 1327 | 1590 | module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1328 | 1591 | |
| 1329 | 1592 | /***/ }), |
| 1330 | 1593 | |
| @@ -1334,20 +1597,27 @@ | ||
| 1334 | 1597 | \**********************************************************/ |
| 1335 | 1598 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1336 | 1599 | |
| 1337 | 1600 | var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); |
| 1338 | -function _inherits(t, e) { | |
| 1339 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 1340 | - t.prototype = Object.create(e && e.prototype, { | |
| 1601 | + | |
| 1602 | +function _inherits(subClass, superClass) { | |
| 1603 | + if (typeof superClass !== "function" && superClass !== null) { | |
| 1604 | + throw new TypeError("Super expression must either be null or a function"); | |
| 1605 | + } | |
| 1606 | + | |
| 1607 | + subClass.prototype = Object.create(superClass && superClass.prototype, { | |
| 1341 | 1608 | constructor: { |
| 1342 | - value: t, | |
| 1343 | - writable: !0, | |
| 1344 | - configurable: !0 | |
| 1609 | + value: subClass, | |
| 1610 | + writable: true, | |
| 1611 | + configurable: true | |
| 1345 | 1612 | } |
| 1346 | - }), Object.defineProperty(t, "prototype", { | |
| 1347 | - writable: !1 | |
| 1348 | - }), e && setPrototypeOf(t, e); | |
| 1613 | + }); | |
| 1614 | + Object.defineProperty(subClass, "prototype", { | |
| 1615 | + writable: false | |
| 1616 | + }); | |
| 1617 | + if (superClass) setPrototypeOf(subClass, superClass); | |
| 1349 | 1618 | } |
| 1619 | + | |
| 1350 | 1620 | module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1351 | 1621 | |
| 1352 | 1622 | /***/ }), |
| 1353 | 1623 | |
| @@ -1356,13 +1626,14 @@ | ||
| 1356 | 1626 | !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! |
| 1357 | 1627 | \***********************************************************************/ |
| 1358 | 1628 | /***/ ((module) => { |
| 1359 | 1629 | |
| 1360 | -function _interopRequireDefault(e) { | |
| 1361 | - return e && e.__esModule ? e : { | |
| 1362 | - "default": e | |
| 1630 | +function _interopRequireDefault(obj) { | |
| 1631 | + return obj && obj.__esModule ? obj : { | |
| 1632 | + "default": obj | |
| 1363 | 1633 | }; |
| 1364 | 1634 | } |
| 1635 | + | |
| 1365 | 1636 | module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1366 | 1637 | |
| 1367 | 1638 | /***/ }), |
| 1368 | 1639 | |
| @@ -1371,35 +1642,38 @@ | ||
| 1371 | 1642 | !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! |
| 1372 | 1643 | \**********************************************************************/ |
| 1373 | 1644 | /***/ ((module) => { |
| 1374 | 1645 | |
| 1375 | -function _iterableToArrayLimit(r, l) { | |
| 1376 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 1377 | - if (null != t) { | |
| 1378 | - var e, | |
| 1379 | - n, | |
| 1380 | - i, | |
| 1381 | - u, | |
| 1382 | - a = [], | |
| 1383 | - f = !0, | |
| 1384 | - o = !1; | |
| 1646 | +function _iterableToArrayLimit(arr, i) { | |
| 1647 | + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; | |
| 1648 | + | |
| 1649 | + if (_i == null) return; | |
| 1650 | + var _arr = []; | |
| 1651 | + var _n = true; | |
| 1652 | + var _d = false; | |
| 1653 | + | |
| 1654 | + var _s, _e; | |
| 1655 | + | |
| 1656 | + try { | |
| 1657 | + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { | |
| 1658 | + _arr.push(_s.value); | |
| 1659 | + | |
| 1660 | + if (i && _arr.length === i) break; | |
| 1661 | + } | |
| 1662 | + } catch (err) { | |
| 1663 | + _d = true; | |
| 1664 | + _e = err; | |
| 1665 | + } finally { | |
| 1385 | 1666 | try { |
| 1386 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 1387 | - if (Object(t) !== t) return; | |
| 1388 | - f = !1; | |
| 1389 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 1390 | - } catch (r) { | |
| 1391 | - o = !0, n = r; | |
| 1667 | + if (!_n && _i["return"] != null) _i["return"](); | |
| 1392 | 1668 | } finally { |
| 1393 | - try { | |
| 1394 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 1395 | - } finally { | |
| 1396 | - if (o) throw n; | |
| 1397 | - } | |
| 1669 | + if (_d) throw _e; | |
| 1398 | 1670 | } |
| 1399 | - return a; | |
| 1400 | 1671 | } |
| 1672 | + | |
| 1673 | + return _arr; | |
| 1401 | 1674 | } |
| 1675 | + | |
| 1402 | 1676 | module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1403 | 1677 | |
| 1404 | 1678 | /***/ }), |
| 1405 | 1679 | |
| @@ -1411,8 +1685,9 @@ | ||
| 1411 | 1685 | |
| 1412 | 1686 | function _nonIterableRest() { |
| 1413 | 1687 | throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 1414 | 1688 | } |
| 1689 | + | |
| 1415 | 1690 | module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1416 | 1691 | |
| 1417 | 1692 | /***/ }), |
| 1418 | 1693 | |
| @@ -1422,14 +1697,21 @@ | ||
| 1422 | 1697 | \***************************************************************************/ |
| 1423 | 1698 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1424 | 1699 | |
| 1425 | 1700 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 1701 | + | |
| 1426 | 1702 | var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); |
| 1427 | -function _possibleConstructorReturn(t, e) { | |
| 1428 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 1429 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 1430 | - return assertThisInitialized(t); | |
| 1703 | + | |
| 1704 | +function _possibleConstructorReturn(self, call) { | |
| 1705 | + if (call && (_typeof(call) === "object" || typeof call === "function")) { | |
| 1706 | + return call; | |
| 1707 | + } else if (call !== void 0) { | |
| 1708 | + throw new TypeError("Derived constructors may only return object or undefined"); | |
| 1709 | + } | |
| 1710 | + | |
| 1711 | + return assertThisInitialized(self); | |
| 1431 | 1712 | } |
| 1713 | + | |
| 1432 | 1714 | module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1433 | 1715 | |
| 1434 | 1716 | /***/ }), |
| 1435 | 1717 | |
| @@ -1438,13 +1720,16 @@ | ||
| 1438 | 1720 | !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! |
| 1439 | 1721 | \****************************************************************/ |
| 1440 | 1722 | /***/ ((module) => { |
| 1441 | 1723 | |
| 1442 | -function _setPrototypeOf(t, e) { | |
| 1443 | - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 1444 | - return t.__proto__ = e, t; | |
| 1445 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 1724 | +function _setPrototypeOf(o, p) { | |
| 1725 | + module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { | |
| 1726 | + o.__proto__ = p; | |
| 1727 | + return o; | |
| 1728 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1729 | + return _setPrototypeOf(o, p); | |
| 1446 | 1730 | } |
| 1731 | + | |
| 1447 | 1732 | module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1448 | 1733 | |
| 1449 | 1734 | /***/ }), |
| 1450 | 1735 | |
| @@ -1454,14 +1739,19 @@ | ||
| 1454 | 1739 | \***************************************************************/ |
| 1455 | 1740 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1456 | 1741 | |
| 1457 | 1742 | var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); |
| 1743 | + | |
| 1458 | 1744 | var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); |
| 1745 | + | |
| 1459 | 1746 | var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); |
| 1747 | + | |
| 1460 | 1748 | var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); |
| 1461 | -function _slicedToArray(r, e) { | |
| 1462 | - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 1749 | + | |
| 1750 | +function _slicedToArray(arr, i) { | |
| 1751 | + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); | |
| 1463 | 1752 | } |
| 1753 | + | |
| 1464 | 1754 | module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1465 | 1755 | |
| 1466 | 1756 | /***/ }), |
| 1467 | 1757 | |
| @@ -1471,51 +1761,20 @@ | ||
| 1471 | 1761 | \***************************************************************/ |
| 1472 | 1762 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1473 | 1763 | |
| 1474 | 1764 | var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); |
| 1475 | -function _superPropBase(t, o) { | |
| 1476 | - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); | |
| 1477 | - return t; | |
| 1478 | -} | |
| 1479 | -module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1480 | 1765 | |
| 1481 | -/***/ }), | |
| 1766 | +function _superPropBase(object, property) { | |
| 1767 | + while (!Object.prototype.hasOwnProperty.call(object, property)) { | |
| 1768 | + object = getPrototypeOf(object); | |
| 1769 | + if (object === null) break; | |
| 1770 | + } | |
| 1482 | 1771 | |
| 1483 | -/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 1484 | -/*!*************************************************************!*\ | |
| 1485 | - !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 1486 | - \*************************************************************/ | |
| 1487 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1488 | - | |
| 1489 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1490 | -function toPrimitive(t, r) { | |
| 1491 | - if ("object" != _typeof(t) || !t) return t; | |
| 1492 | - var e = t[Symbol.toPrimitive]; | |
| 1493 | - if (void 0 !== e) { | |
| 1494 | - var i = e.call(t, r || "default"); | |
| 1495 | - if ("object" != _typeof(i)) return i; | |
| 1496 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 1497 | - } | |
| 1498 | - return ("string" === r ? String : Number)(t); | |
| 1772 | + return object; | |
| 1499 | 1773 | } |
| 1500 | -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1501 | 1774 | |
| 1502 | -/***/ }), | |
| 1775 | +module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1503 | 1776 | |
| 1504 | -/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 1505 | -/*!***************************************************************!*\ | |
| 1506 | - !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 1507 | - \***************************************************************/ | |
| 1508 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1509 | - | |
| 1510 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1511 | -var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 1512 | -function toPropertyKey(t) { | |
| 1513 | - var i = toPrimitive(t, "string"); | |
| 1514 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 1515 | -} | |
| 1516 | -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1517 | - | |
| 1518 | 1777 | /***/ }), |
| 1519 | 1778 | |
| 1520 | 1779 | /***/ "../node_modules/@babel/runtime/helpers/typeof.js": |
| 1521 | 1780 | /*!********************************************************!*\ |
| @@ -1522,17 +1781,18 @@ | ||
| 1522 | 1781 | !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! |
| 1523 | 1782 | \********************************************************/ |
| 1524 | 1783 | /***/ ((module) => { |
| 1525 | 1784 | |
| 1526 | -function _typeof(o) { | |
| 1785 | +function _typeof(obj) { | |
| 1527 | 1786 | "@babel/helpers - typeof"; |
| 1528 | 1787 | |
| 1529 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 1530 | - return typeof o; | |
| 1531 | - } : function (o) { | |
| 1532 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 1533 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 1788 | + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { | |
| 1789 | + return typeof obj; | |
| 1790 | + } : function (obj) { | |
| 1791 | + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; | |
| 1792 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); | |
| 1534 | 1793 | } |
| 1794 | + | |
| 1535 | 1795 | module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1536 | 1796 | |
| 1537 | 1797 | /***/ }), |
| 1538 | 1798 | |
| @@ -1542,15 +1802,18 @@ | ||
| 1542 | 1802 | \****************************************************************************/ |
| 1543 | 1803 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1544 | 1804 | |
| 1545 | 1805 | var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); |
| 1546 | -function _unsupportedIterableToArray(r, a) { | |
| 1547 | - if (r) { | |
| 1548 | - if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 1549 | - var t = {}.toString.call(r).slice(8, -1); | |
| 1550 | - 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; | |
| 1551 | - } | |
| 1806 | + | |
| 1807 | +function _unsupportedIterableToArray(o, minLen) { | |
| 1808 | + if (!o) return; | |
| 1809 | + if (typeof o === "string") return arrayLikeToArray(o, minLen); | |
| 1810 | + var n = Object.prototype.toString.call(o).slice(8, -1); | |
| 1811 | + if (n === "Object" && o.constructor) n = o.constructor.name; | |
| 1812 | + if (n === "Map" || n === "Set") return Array.from(o); | |
| 1813 | + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); | |
| 1552 | 1814 | } |
| 1815 | + | |
| 1553 | 1816 | module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1554 | 1817 | |
| 1555 | 1818 | /***/ }) |
| 1556 | 1819 | |
| @@ -1581,9 +1844,9 @@ | ||
| 1581 | 1844 | /******/ } |
| 1582 | 1845 | /******/ |
| 1583 | 1846 | /************************************************************************/ |
| 1584 | 1847 | var __webpack_exports__ = {}; |
| 1585 | -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 1848 | +// This entry need to be wrapped in an IIFE because it need to be in strict mode. | |
| 1586 | 1849 | (() => { |
| 1587 | 1850 | "use strict"; |
| 1588 | 1851 | /*!**************************************************!*\ |
| 1589 | 1852 | !*** ../assets/dev/js/editor/editor-document.js ***! |
| @@ -1590,12 +1853,17 @@ | ||
| 1590 | 1853 | \**************************************************/ |
| 1591 | 1854 | |
| 1592 | 1855 | |
| 1593 | 1856 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1857 | + | |
| 1594 | 1858 | var _commandContainerBase = _interopRequireDefault(__webpack_require__(/*! ./command-bases/command-container-base */ "../assets/dev/js/editor/command-bases/command-container-base.js")); |
| 1859 | + | |
| 1595 | 1860 | var _commandContainerInternalBase = _interopRequireDefault(__webpack_require__(/*! ./command-bases/command-container-internal-base */ "../assets/dev/js/editor/command-bases/command-container-internal-base.js")); |
| 1861 | + | |
| 1596 | 1862 | var _commandHistoryBase = _interopRequireDefault(__webpack_require__(/*! elementor-document/command-bases/command-history-base */ "../assets/dev/js/editor/document/command-bases/command-history-base.js")); |
| 1863 | + | |
| 1597 | 1864 | var _commandHistoryDebounceBase = _interopRequireDefault(__webpack_require__(/*! elementor-document/command-bases/command-history-debounce-base */ "../assets/dev/js/editor/document/command-bases/command-history-debounce-base.js")); |
| 1865 | + | |
| 1598 | 1866 | $e.modules.editor = { |
| 1599 | 1867 | CommandContainerBase: _commandContainerBase.default, |
| 1600 | 1868 | CommandContainerInternalBase: _commandContainerInternalBase.default, |
| 1601 | 1869 | document: { |
| @@ -1601,26 +1869,21 @@ | ||
| 1601 | 1869 | document: { |
| 1602 | 1870 | CommandHistoryBase: _commandHistoryBase.default, |
| 1603 | 1871 | CommandHistoryDebounceBase: _commandHistoryDebounceBase.default |
| 1604 | 1872 | } |
| 1605 | -}; | |
| 1873 | +}; // TODO: Remove, BC. | |
| 1606 | 1874 | |
| 1607 | -// TODO: Remove, BC. | |
| 1608 | 1875 | $e.modules.document = { |
| 1609 | - /** | |
| 1610 | - * @deprecated since 3.7.0, use `$e.modules.editor.document.CommandHistoryBase` instead. | |
| 1611 | - */ | |
| 1612 | 1876 | get CommandHistory() { |
| 1613 | 1877 | elementorDevTools.deprecation.deprecated('$e.modules.document.CommandHistory', '3.7.0', '$e.modules.editor.document.CommandHistoryBase'); |
| 1614 | 1878 | return $e.modules.editor.document.CommandHistoryBase; |
| 1615 | 1879 | }, |
| 1616 | - /** | |
| 1617 | - * @deprecated since 3.7.0, use `$e.modules.editor.document.CommandHistoryDebounceBase` instead. | |
| 1618 | - */ | |
| 1880 | + | |
| 1619 | 1881 | get CommandHistoryDebounce() { |
| 1620 | 1882 | elementorDevTools.deprecation.deprecated('$e.modules.CommandHistoryDebounce', '3.7.0', '$e.modules.editor.document.CommandHistoryDebounceBase'); |
| 1621 | 1883 | return $e.modules.editor.document.CommandHistoryDebounceBase; |
| 1622 | 1884 | } |
| 1885 | + | |
| 1623 | 1886 | }; |
| 1624 | 1887 | })(); |
| 1625 | 1888 | |
| 1626 | 1889 | /******/ })() |