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