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