| @@ -1,750 +1,1183 @@ | ||
| 1 | -(function(_wordpress_i18n) { | |
| 1 | +/*! elementor - v3.20.0 - 20-03-2024 */ | |
| 2 | +/******/ (() => { // webpackBootstrap | |
| 3 | +/******/ var __webpack_modules__ = ({ | |
| 2 | 4 | |
| 3 | -//#region \0rolldown/runtime.js | |
| 4 | - var __defProp = Object.defineProperty; | |
| 5 | - var __name = (target, value) => __defProp(target, "name", { | |
| 6 | - value, | |
| 7 | - configurable: true | |
| 8 | - }); | |
| 9 | - var __exportAll = (all, no_symbols) => { | |
| 10 | - let target = {}; | |
| 11 | - for (var name in all) { | |
| 12 | - __defProp(target, name, { | |
| 13 | - get: all[name], | |
| 14 | - enumerable: true | |
| 15 | - }); | |
| 16 | - } | |
| 17 | - if (!no_symbols) { | |
| 18 | - __defProp(target, Symbol.toStringTag, { value: "Module" }); | |
| 19 | - } | |
| 20 | - return target; | |
| 21 | - }; | |
| 5 | +/***/ "../modules/container-converter/assets/js/editor/commands/convert-all.js": | |
| 6 | +/*!*******************************************************************************!*\ | |
| 7 | + !*** ../modules/container-converter/assets/js/editor/commands/convert-all.js ***! | |
| 8 | + \*******************************************************************************/ | |
| 9 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 22 | 10 | |
| 23 | -//#endregion | |
| 11 | +"use strict"; | |
| 12 | +/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 24 | 13 | |
| 25 | -//#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js | |
| 26 | - function _classCallCheck(a, n) { | |
| 27 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 28 | - } | |
| 29 | 14 | |
| 30 | -//#endregion | |
| 31 | -//#region node_modules/@babel/runtime/helpers/esm/typeof.js | |
| 32 | - function _typeof(o) { | |
| 33 | - "@babel/helpers - typeof"; | |
| 34 | - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 35 | - return typeof o; | |
| 36 | - } : function(o) { | |
| 37 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 38 | - }, _typeof(o); | |
| 39 | - } | |
| 15 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 16 | +Object.defineProperty(exports, "__esModule", ({ | |
| 17 | + value: true | |
| 18 | +})); | |
| 19 | +exports.ConvertAll = void 0; | |
| 20 | +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); | |
| 21 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 22 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 23 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 24 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 25 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 26 | +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); }; } | |
| 27 | +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; } } | |
| 28 | +var ConvertAll = /*#__PURE__*/function (_$e$modules$editor$do) { | |
| 29 | + (0, _inherits2.default)(ConvertAll, _$e$modules$editor$do); | |
| 30 | + var _super = _createSuper(ConvertAll); | |
| 31 | + function ConvertAll() { | |
| 32 | + (0, _classCallCheck2.default)(this, ConvertAll); | |
| 33 | + return _super.apply(this, arguments); | |
| 34 | + } | |
| 35 | + (0, _createClass2.default)(ConvertAll, [{ | |
| 36 | + key: "getHistory", | |
| 37 | + value: function getHistory() { | |
| 38 | + return { | |
| 39 | + type: __('Converted to Containers', 'elementor'), | |
| 40 | + title: __('All Content', 'elementor') | |
| 41 | + }; | |
| 42 | + } | |
| 43 | + }, { | |
| 44 | + key: "apply", | |
| 45 | + value: function apply() { | |
| 46 | + var _elementor$getPreview = elementor.getPreviewContainer(), | |
| 47 | + children = _elementor$getPreview.children; | |
| 48 | + (0, _toConsumableArray2.default)(children).forEach(function (container) { | |
| 49 | + $e.run('container-converter/convert', { | |
| 50 | + container: container | |
| 51 | + }); | |
| 52 | + }); | |
| 53 | + } | |
| 54 | + }]); | |
| 55 | + return ConvertAll; | |
| 56 | +}($e.modules.editor.document.CommandHistoryBase); | |
| 57 | +exports.ConvertAll = ConvertAll; | |
| 40 | 58 | |
| 41 | -//#endregion | |
| 42 | -//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js | |
| 43 | - function toPrimitive(t, r) { | |
| 44 | - if ("object" != _typeof(t) || !t) return t; | |
| 45 | - var e = t[Symbol.toPrimitive]; | |
| 46 | - if (void 0 !== e) { | |
| 47 | - var i = e.call(t, r || "default"); | |
| 48 | - if ("object" != _typeof(i)) return i; | |
| 49 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 50 | - } | |
| 51 | - return ("string" === r ? String : Number)(t); | |
| 52 | - } | |
| 59 | +/***/ }), | |
| 53 | 60 | |
| 54 | -//#endregion | |
| 55 | -//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js | |
| 56 | - function toPropertyKey(t) { | |
| 57 | - var i = toPrimitive(t, "string"); | |
| 58 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 59 | - } | |
| 61 | +/***/ "../modules/container-converter/assets/js/editor/commands/convert.js": | |
| 62 | +/*!***************************************************************************!*\ | |
| 63 | + !*** ../modules/container-converter/assets/js/editor/commands/convert.js ***! | |
| 64 | + \***************************************************************************/ | |
| 65 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 60 | 66 | |
| 61 | -//#endregion | |
| 62 | -//#region node_modules/@babel/runtime/helpers/esm/createClass.js | |
| 63 | - function _defineProperties(e, r) { | |
| 64 | - for (var t = 0; t < r.length; t++) { | |
| 65 | - var o = r[t]; | |
| 66 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 67 | - } | |
| 68 | - } | |
| 69 | - function _createClass(e, r, t) { | |
| 70 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; | |
| 71 | - } | |
| 67 | +"use strict"; | |
| 68 | +/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 72 | 69 | |
| 73 | -//#endregion | |
| 74 | -//#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js | |
| 75 | - function _assertThisInitialized(e) { | |
| 76 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 77 | - return e; | |
| 78 | - } | |
| 79 | 70 | |
| 80 | -//#endregion | |
| 81 | -//#region node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js | |
| 82 | - function _possibleConstructorReturn(t, e) { | |
| 83 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 84 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 85 | - return _assertThisInitialized(t); | |
| 86 | - } | |
| 71 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 72 | +Object.defineProperty(exports, "__esModule", ({ | |
| 73 | + value: true | |
| 74 | +})); | |
| 75 | +exports.Convert = void 0; | |
| 76 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 77 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 78 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 79 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 80 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 81 | +var _migrator = _interopRequireDefault(__webpack_require__(/*! ../migrator */ "../modules/container-converter/assets/js/editor/migrator.js")); | |
| 82 | +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); }; } | |
| 83 | +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; } } | |
| 84 | +/** | |
| 85 | + * @typedef {import('../../../../../../assets/dev/js/editor/container/container')} Container | |
| 86 | + */ | |
| 87 | +var Convert = /*#__PURE__*/function (_$e$modules$editor$do) { | |
| 88 | + (0, _inherits2.default)(Convert, _$e$modules$editor$do); | |
| 89 | + var _super = _createSuper(Convert); | |
| 90 | + function Convert() { | |
| 91 | + (0, _classCallCheck2.default)(this, Convert); | |
| 92 | + return _super.apply(this, arguments); | |
| 93 | + } | |
| 94 | + (0, _createClass2.default)(Convert, [{ | |
| 95 | + key: "getHistory", | |
| 96 | + value: function getHistory() { | |
| 97 | + return { | |
| 98 | + type: __('Converted to Container', 'elementor'), | |
| 99 | + title: __('Section', 'elementor') | |
| 100 | + }; | |
| 101 | + } | |
| 102 | + }, { | |
| 103 | + key: "validateArgs", | |
| 104 | + value: function validateArgs() { | |
| 105 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 106 | + this.requireContainer(args); | |
| 107 | + } | |
| 108 | + }, { | |
| 109 | + key: "apply", | |
| 110 | + value: function apply(args) { | |
| 111 | + this.constructor.convert(args); | |
| 112 | + } | |
| 87 | 113 | |
| 88 | -//#endregion | |
| 89 | -//#region node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js | |
| 90 | - function _getPrototypeOf(t) { | |
| 91 | - return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { | |
| 92 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 93 | - }, _getPrototypeOf(t); | |
| 94 | - } | |
| 114 | + /** | |
| 115 | + * Convert an element to Container. | |
| 116 | + * | |
| 117 | + * TODO: It's static in order to be able to test it without initializing the whole editor in a browser. | |
| 118 | + * Should be moved to `apply()` when there is a proper way to test commands using jest. | |
| 119 | + * | |
| 120 | + * @param {Object} root0 | |
| 121 | + * @param {Container} root0.container - Element to convert. | |
| 122 | + * @param {Container} root0.rootContainer - Root element to migrate the `container` into (used for recursion). | |
| 123 | + * | |
| 124 | + * @return {void} | |
| 125 | + */ | |
| 126 | + }], [{ | |
| 127 | + key: "convert", | |
| 128 | + value: function convert(_ref) { | |
| 129 | + var container = _ref.container, | |
| 130 | + _ref$rootContainer = _ref.rootContainer, | |
| 131 | + rootContainer = _ref$rootContainer === void 0 ? container.parent : _ref$rootContainer; | |
| 132 | + var view = container.view, | |
| 133 | + elType = container.type, | |
| 134 | + isFirst = rootContainer === container.parent; | |
| 95 | 135 | |
| 96 | -//#endregion | |
| 97 | -//#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js | |
| 98 | - function _setPrototypeOf(t, e) { | |
| 99 | - return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) { | |
| 100 | - return t.__proto__ = e, t; | |
| 101 | - }, _setPrototypeOf(t, e); | |
| 102 | - } | |
| 136 | + // TODO: Maybe use `view._parent.collection.indexOf( this.model )`. | |
| 137 | + // Get the converted element index. The first converted element should be put after the original one. | |
| 138 | + var at = isFirst ? view._index + 1 : view._index; | |
| 103 | 139 | |
| 104 | -//#endregion | |
| 105 | -//#region node_modules/@babel/runtime/helpers/esm/inherits.js | |
| 106 | - function _inherits(t, e) { | |
| 107 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 108 | - t.prototype = Object.create(e && e.prototype, { constructor: { | |
| 109 | - value: t, | |
| 110 | - writable: !0, | |
| 111 | - configurable: !0 | |
| 112 | - } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); | |
| 113 | - } | |
| 140 | + // Copy the element as is without converting. | |
| 141 | + if (!_migrator.default.canConvertToContainer(elType)) { | |
| 142 | + $e.run('document/elements/create', { | |
| 143 | + model: { | |
| 144 | + elType: container.model.get('elType'), | |
| 145 | + widgetType: container.model.get('widgetType'), | |
| 146 | + settings: container.settings.toJSON({ | |
| 147 | + remove: 'default' | |
| 148 | + }) | |
| 149 | + }, | |
| 150 | + container: rootContainer, | |
| 151 | + options: { | |
| 152 | + at: at, | |
| 153 | + edit: false | |
| 154 | + } | |
| 155 | + }); | |
| 156 | + return; | |
| 157 | + } | |
| 158 | + var model = container.model.toJSON(); | |
| 159 | + var controlsMapping = _migrator.default.getLegacyControlsMapping(model); | |
| 160 | + var settings = container.settings.toJSON({ | |
| 161 | + remove: 'default' | |
| 162 | + }); | |
| 163 | + settings = _migrator.default.migrate(settings, controlsMapping); | |
| 164 | + settings = _migrator.default.normalizeSettings(model, settings); | |
| 165 | + var newContainer = $e.run('document/elements/create', { | |
| 166 | + model: { | |
| 167 | + elType: 'container', | |
| 168 | + settings: settings | |
| 169 | + }, | |
| 170 | + container: rootContainer, | |
| 171 | + options: { | |
| 172 | + at: at, | |
| 173 | + edit: false | |
| 174 | + } | |
| 175 | + }); | |
| 114 | 176 | |
| 115 | -//#endregion | |
| 116 | -//#region node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js | |
| 117 | - function _arrayWithHoles(r) { | |
| 118 | - if (Array.isArray(r)) return r; | |
| 119 | - } | |
| 177 | + // Recursively convert children to Containers. | |
| 178 | + container.children.forEach(function (child) { | |
| 179 | + $e.run('container-converter/convert', { | |
| 180 | + container: child, | |
| 181 | + rootContainer: newContainer | |
| 182 | + }); | |
| 183 | + }); | |
| 184 | + } | |
| 185 | + }]); | |
| 186 | + return Convert; | |
| 187 | +}($e.modules.editor.document.CommandHistoryBase); | |
| 188 | +exports.Convert = Convert; | |
| 120 | 189 | |
| 121 | -//#endregion | |
| 122 | -//#region node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js | |
| 123 | - function _iterableToArrayLimit(r, l) { | |
| 124 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 125 | - if (null != t) { | |
| 126 | - var e; | |
| 127 | - var n; | |
| 128 | - var i; | |
| 129 | - var u; | |
| 130 | - var a = []; | |
| 131 | - var f = !0; | |
| 132 | - var o = !1; | |
| 133 | - try { | |
| 134 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 135 | - if (Object(t) !== t) return; | |
| 136 | - f = !1; | |
| 137 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 138 | - } catch (r) { | |
| 139 | - o = !0, n = r; | |
| 140 | - } finally { | |
| 141 | - try { | |
| 142 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 143 | - } finally { | |
| 144 | - if (o) throw n; | |
| 145 | - } | |
| 146 | - } | |
| 147 | - return a; | |
| 148 | - } | |
| 149 | - } | |
| 190 | +/***/ }), | |
| 150 | 191 | |
| 151 | -//#endregion | |
| 152 | -//#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js | |
| 153 | - function _arrayLikeToArray(r, a) { | |
| 154 | - (null == a || a > r.length) && (a = r.length); | |
| 155 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 156 | - return n; | |
| 157 | - } | |
| 192 | +/***/ "../modules/container-converter/assets/js/editor/commands/index.js": | |
| 193 | +/*!*************************************************************************!*\ | |
| 194 | + !*** ../modules/container-converter/assets/js/editor/commands/index.js ***! | |
| 195 | + \*************************************************************************/ | |
| 196 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 158 | 197 | |
| 159 | -//#endregion | |
| 160 | -//#region node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js | |
| 161 | - function _unsupportedIterableToArray(r, a) { | |
| 162 | - if (r) { | |
| 163 | - if ("string" == typeof r) return _arrayLikeToArray(r, a); | |
| 164 | - var t = {}.toString.call(r).slice(8, -1); | |
| 165 | - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; | |
| 166 | - } | |
| 167 | - } | |
| 198 | +"use strict"; | |
| 168 | 199 | |
| 169 | -//#endregion | |
| 170 | -//#region node_modules/@babel/runtime/helpers/esm/nonIterableRest.js | |
| 171 | - function _nonIterableRest() { | |
| 172 | - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 173 | - } | |
| 174 | 200 | |
| 175 | -//#endregion | |
| 176 | -//#region node_modules/@babel/runtime/helpers/esm/slicedToArray.js | |
| 177 | - function _slicedToArray(r, e) { | |
| 178 | - return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); | |
| 179 | - } | |
| 201 | +Object.defineProperty(exports, "__esModule", ({ | |
| 202 | + value: true | |
| 203 | +})); | |
| 204 | +Object.defineProperty(exports, "Convert", ({ | |
| 205 | + enumerable: true, | |
| 206 | + get: function get() { | |
| 207 | + return _convert.Convert; | |
| 208 | + } | |
| 209 | +})); | |
| 210 | +Object.defineProperty(exports, "ConvertAll", ({ | |
| 211 | + enumerable: true, | |
| 212 | + get: function get() { | |
| 213 | + return _convertAll.ConvertAll; | |
| 214 | + } | |
| 215 | +})); | |
| 216 | +var _convert = __webpack_require__(/*! ./convert */ "../modules/container-converter/assets/js/editor/commands/convert.js"); | |
| 217 | +var _convertAll = __webpack_require__(/*! ./convert-all */ "../modules/container-converter/assets/js/editor/commands/convert-all.js"); | |
| 180 | 218 | |
| 181 | -//#endregion | |
| 182 | -//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js | |
| 183 | - function _defineProperty(e, r, t) { | |
| 184 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 185 | - value: t, | |
| 186 | - enumerable: !0, | |
| 187 | - configurable: !0, | |
| 188 | - writable: !0 | |
| 189 | - }) : e[r] = t, e; | |
| 190 | - } | |
| 219 | +/***/ }), | |
| 191 | 220 | |
| 192 | -//#endregion | |
| 193 | -//#region node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js | |
| 194 | - function _arrayWithoutHoles(r) { | |
| 195 | - if (Array.isArray(r)) return _arrayLikeToArray(r); | |
| 196 | - } | |
| 221 | +/***/ "../modules/container-converter/assets/js/editor/component.js": | |
| 222 | +/*!********************************************************************!*\ | |
| 223 | + !*** ../modules/container-converter/assets/js/editor/component.js ***! | |
| 224 | + \********************************************************************/ | |
| 225 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 197 | 226 | |
| 198 | -//#endregion | |
| 199 | -//#region node_modules/@babel/runtime/helpers/esm/iterableToArray.js | |
| 200 | - function _iterableToArray(r) { | |
| 201 | - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 202 | - } | |
| 227 | +"use strict"; | |
| 228 | +/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 203 | 229 | |
| 204 | -//#endregion | |
| 205 | -//#region node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js | |
| 206 | - function _nonIterableSpread() { | |
| 207 | - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 208 | - } | |
| 209 | 230 | |
| 210 | -//#endregion | |
| 211 | -//#region node_modules/@babel/runtime/helpers/esm/toConsumableArray.js | |
| 212 | - function _toConsumableArray(r) { | |
| 213 | - return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); | |
| 214 | - } | |
| 231 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 232 | +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 233 | +Object.defineProperty(exports, "__esModule", ({ | |
| 234 | + value: true | |
| 235 | +})); | |
| 236 | +exports["default"] = void 0; | |
| 237 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 238 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 239 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 240 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 241 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 242 | +var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../modules/container-converter/assets/js/editor/commands/index.js")); | |
| 243 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 244 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 245 | +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); }; } | |
| 246 | +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; } } | |
| 247 | +var _default = /*#__PURE__*/function (_$e$modules$Component) { | |
| 248 | + (0, _inherits2.default)(_default, _$e$modules$Component); | |
| 249 | + var _super = _createSuper(_default); | |
| 250 | + function _default() { | |
| 251 | + var _this; | |
| 252 | + (0, _classCallCheck2.default)(this, _default); | |
| 253 | + _this = _super.call(this); | |
| 254 | + _this.bindEvents(); | |
| 255 | + return _this; | |
| 256 | + } | |
| 215 | 257 | |
| 216 | -//#endregion | |
| 217 | -//#region modules/container-converter/assets/js/editor/maps/utils.js | |
| 258 | + /** | |
| 259 | + * Listen to click event in the panel. | |
| 260 | + * | |
| 261 | + * @return {void} | |
| 262 | + */ | |
| 263 | + (0, _createClass2.default)(_default, [{ | |
| 264 | + key: "bindEvents", | |
| 265 | + value: function bindEvents() { | |
| 266 | + elementor.channels.editor.on('elementorContainerConverter:convert', function (_ref) { | |
| 267 | + var container = _ref.container, | |
| 268 | + el = _ref.el; | |
| 269 | + var button = el.querySelector('.elementor-button'); | |
| 270 | + var loadingClass = 'e-loading'; | |
| 271 | + button.classList.add(loadingClass); | |
| 272 | + | |
| 273 | + // Defer the conversion process in order to force a re-render of the button, since the conversion is | |
| 274 | + // synchronous and blocks the main thread from re-rendering. | |
| 275 | + setTimeout(function () { | |
| 276 | + if ('document' === container.type) { | |
| 277 | + $e.run('container-converter/convert-all'); | |
| 278 | + } else { | |
| 279 | + $e.run('container-converter/convert', { | |
| 280 | + container: container | |
| 281 | + }); | |
| 282 | + } | |
| 283 | + button.classList.remove(loadingClass); | |
| 284 | + button.setAttribute('disabled', true); | |
| 285 | + elementor.notifications.showToast({ | |
| 286 | + message: __('Your changes have been updated.', 'elementor') | |
| 287 | + }); | |
| 288 | + }); | |
| 289 | + }); | |
| 290 | + } | |
| 291 | + | |
| 292 | + /** | |
| 293 | + * Get the component namespace. | |
| 294 | + * | |
| 295 | + * @return {string} component namespace | |
| 296 | + */ | |
| 297 | + }, { | |
| 298 | + key: "getNamespace", | |
| 299 | + value: function getNamespace() { | |
| 300 | + return 'container-converter'; | |
| 301 | + } | |
| 302 | + | |
| 303 | + /** | |
| 304 | + * Get the component default commands. | |
| 305 | + * | |
| 306 | + * @return {Object} commands | |
| 307 | + */ | |
| 308 | + }, { | |
| 309 | + key: "defaultCommands", | |
| 310 | + value: function defaultCommands() { | |
| 311 | + return this.importCommands(commands); | |
| 312 | + } | |
| 313 | + }]); | |
| 314 | + return _default; | |
| 315 | +}($e.modules.ComponentBase); | |
| 316 | +exports["default"] = _default; | |
| 317 | + | |
| 318 | +/***/ }), | |
| 319 | + | |
| 320 | +/***/ "../modules/container-converter/assets/js/editor/maps/column.js": | |
| 321 | +/*!**********************************************************************!*\ | |
| 322 | + !*** ../modules/container-converter/assets/js/editor/maps/column.js ***! | |
| 323 | + \**********************************************************************/ | |
| 324 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 325 | + | |
| 326 | +"use strict"; | |
| 327 | + | |
| 328 | + | |
| 329 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 330 | +Object.defineProperty(exports, "__esModule", ({ | |
| 331 | + value: true | |
| 332 | +})); | |
| 333 | +exports["default"] = void 0; | |
| 334 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 335 | +var _utils = __webpack_require__(/*! ./utils */ "../modules/container-converter/assets/js/editor/maps/utils.js"); | |
| 336 | +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | |
| 337 | +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | |
| 338 | +var map = function map() { | |
| 339 | + return _objectSpread(_objectSpread(_objectSpread({}, (0, _utils.responsive)('_inline_size', function (_ref) { | |
| 340 | + var deviceValue = _ref.deviceValue, | |
| 341 | + breakpoint = _ref.breakpoint; | |
| 342 | + var deviceKey = (0, _utils.getDeviceKey)('width', breakpoint); | |
| 343 | + var newValue = { | |
| 344 | + size: deviceValue, | |
| 345 | + unit: '%' | |
| 346 | + }; | |
| 347 | + return [deviceKey, newValue]; | |
| 348 | + })), (0, _utils.responsive)('content_position', function (_ref2) { | |
| 349 | + var deviceValue = _ref2.deviceValue, | |
| 350 | + breakpoint = _ref2.breakpoint; | |
| 351 | + var optionsMap = { | |
| 352 | + top: 'flex-start', | |
| 353 | + bottom: 'flex-end' | |
| 354 | + }; | |
| 355 | + var deviceKey = (0, _utils.getDeviceKey)('flex_justify_content', breakpoint); | |
| 356 | + return [deviceKey, optionsMap[deviceValue] || deviceValue]; | |
| 357 | + })), (0, _utils.responsive)('space_between_widgets', function (_ref3) { | |
| 358 | + var deviceValue = _ref3.deviceValue, | |
| 359 | + breakpoint = _ref3.breakpoint; | |
| 360 | + var deviceKey = (0, _utils.getDeviceKey)('flex_gap', breakpoint); | |
| 361 | + var newValue = { | |
| 362 | + size: deviceValue, | |
| 363 | + column: '' + deviceValue, | |
| 364 | + row: '' + deviceValue, | |
| 365 | + unit: 'px' | |
| 366 | + }; | |
| 367 | + return [deviceKey, newValue]; | |
| 368 | + })); | |
| 369 | +}; | |
| 370 | +var _default = map; | |
| 371 | +exports["default"] = _default; | |
| 372 | + | |
| 373 | +/***/ }), | |
| 374 | + | |
| 375 | +/***/ "../modules/container-converter/assets/js/editor/maps/section.js": | |
| 376 | +/*!***********************************************************************!*\ | |
| 377 | + !*** ../modules/container-converter/assets/js/editor/maps/section.js ***! | |
| 378 | + \***********************************************************************/ | |
| 379 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 380 | + | |
| 381 | +"use strict"; | |
| 382 | + | |
| 383 | + | |
| 384 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 385 | +Object.defineProperty(exports, "__esModule", ({ | |
| 386 | + value: true | |
| 387 | +})); | |
| 388 | +exports["default"] = void 0; | |
| 389 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 390 | +var _utils = __webpack_require__(/*! ./utils */ "../modules/container-converter/assets/js/editor/maps/utils.js"); | |
| 391 | +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | |
| 392 | +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | |
| 393 | +var map = function map(_ref) { | |
| 394 | + var isInner = _ref.isInner, | |
| 395 | + _ref$settings = _ref.settings, | |
| 396 | + settings = _ref$settings === void 0 ? {} : _ref$settings; | |
| 397 | + var widthKey = isInner ? 'width' : 'boxed_width'; | |
| 398 | + return _objectSpread(_objectSpread(_objectSpread({}, 'boxed' === settings.layout ? (0, _utils.responsive)('content_width', widthKey) : { | |
| 399 | + content_width: null | |
| 400 | + }), 'min-height' === settings.height && (0, _utils.responsive)('custom_height', 'min_height')), {}, { | |
| 401 | + layout: function layout(_ref2) { | |
| 402 | + var value = _ref2.value; | |
| 403 | + var optionsMap = { | |
| 404 | + boxed: 'boxed', | |
| 405 | + full_width: 'full' | |
| 406 | + }; | |
| 407 | + return ['content_width', optionsMap[value] || value]; | |
| 408 | + }, | |
| 409 | + height: function height(_ref3) { | |
| 410 | + var value = _ref3.value, | |
| 411 | + sectionSettings = _ref3.settings; | |
| 412 | + switch (value) { | |
| 413 | + case 'full': | |
| 414 | + value = { | |
| 415 | + size: 100, | |
| 416 | + unit: 'vh' | |
| 417 | + }; | |
| 418 | + break; | |
| 419 | + case 'min-height': | |
| 420 | + value = sectionSettings.custom_height || { | |
| 421 | + size: 400, | |
| 422 | + unit: 'px' | |
| 423 | + }; // Default section's height. | |
| 424 | + break; | |
| 425 | + default: | |
| 426 | + return false; | |
| 427 | + } | |
| 428 | + return ['min_height', value]; | |
| 429 | + }, | |
| 430 | + gap: function gap(_ref4) { | |
| 431 | + var value = _ref4.value, | |
| 432 | + sectionSettings = _ref4.settings; | |
| 433 | + var sizesMap = { | |
| 434 | + no: 0, | |
| 435 | + narrow: 5, | |
| 436 | + extended: 15, | |
| 437 | + wide: 20, | |
| 438 | + wider: 30 | |
| 439 | + }; | |
| 440 | + value = 'custom' === value ? sectionSettings.gap_columns_custom : { | |
| 441 | + size: sizesMap[value], | |
| 442 | + column: '' + sizesMap[value], | |
| 443 | + row: '' + sizesMap[value], | |
| 444 | + unit: 'px' | |
| 445 | + }; | |
| 446 | + return ['flex_gap', value]; | |
| 447 | + }, | |
| 448 | + gap_columns_custom: null, | |
| 449 | + column_position: function column_position(_ref5) { | |
| 450 | + var value = _ref5.value; | |
| 451 | + var optionsMap = { | |
| 452 | + top: 'flex-start', | |
| 453 | + middle: 'center', | |
| 454 | + bottom: 'flex-end' | |
| 455 | + }; | |
| 456 | + return ['flex_align_items', optionsMap[value] || value]; | |
| 457 | + } | |
| 458 | + }); | |
| 459 | +}; | |
| 460 | +var _default = map; | |
| 461 | +exports["default"] = _default; | |
| 462 | + | |
| 463 | +/***/ }), | |
| 464 | + | |
| 465 | +/***/ "../modules/container-converter/assets/js/editor/maps/utils.js": | |
| 466 | +/*!*********************************************************************!*\ | |
| 467 | + !*** ../modules/container-converter/assets/js/editor/maps/utils.js ***! | |
| 468 | + \*********************************************************************/ | |
| 469 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 470 | + | |
| 471 | +"use strict"; | |
| 472 | + | |
| 473 | + | |
| 474 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 475 | +Object.defineProperty(exports, "__esModule", ({ | |
| 476 | + value: true | |
| 477 | +})); | |
| 478 | +exports.getDeviceKey = getDeviceKey; | |
| 479 | +exports.responsive = responsive; | |
| 480 | +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); | |
| 218 | 481 | /** |
| 219 | - * Generate a mapping object for responsive controls. | |
| 220 | - * | |
| 221 | - * Usage: | |
| 222 | - * 1. responsive( 'old_key', 'new_key' ); | |
| 223 | - * 2. responsive( 'old_key', ( { key, value, deviceValue, settings, breakpoint } ) => { return [ key, value ] } ); | |
| 224 | - * | |
| 225 | - * @param {string} key - Control name without device suffix. | |
| 226 | - * @param {string | Function} value - New control name without device suffix, or a callback. | |
| 227 | - * | |
| 228 | - * @return {Object} mapping object | |
| 229 | - */ | |
| 230 | - function responsive(key, value) { | |
| 231 | - var breakpoints = [""].concat(_toConsumableArray(Object.keys(elementorFrontend.config.responsive.activeBreakpoints))); | |
| 232 | - return Object.fromEntries(breakpoints.map(function(breakpoint) { | |
| 233 | - var deviceKey = getDeviceKey(key, breakpoint); | |
| 234 | - if ("string" === typeof value) { | |
| 235 | - var newDeviceKey = getDeviceKey(value, breakpoint); | |
| 236 | - return [deviceKey, function(_ref) { | |
| 237 | - return [newDeviceKey, _ref.settings[deviceKey]]; | |
| 238 | - }]; | |
| 239 | - } | |
| 240 | - return [deviceKey, function(_ref2) { | |
| 241 | - var settings = _ref2.settings; | |
| 242 | - var desktopValue = _ref2.value; | |
| 243 | - return value({ | |
| 244 | - key, | |
| 245 | - deviceKey, | |
| 246 | - value: desktopValue, | |
| 247 | - deviceValue: settings[deviceKey], | |
| 248 | - settings, | |
| 249 | - breakpoint | |
| 250 | - }); | |
| 251 | - }]; | |
| 252 | - })); | |
| 253 | - } | |
| 254 | - /** | |
| 255 | - * Get a setting key for a device. | |
| 256 | - * | |
| 257 | - * Examples: | |
| 258 | - * 1. getDeviceKey( 'some_control', 'mobile' ) => 'some_control_mobile'. | |
| 259 | - * 2. getDeviceKey( 'some_control', '' ) => 'some_control'. | |
| 260 | - * | |
| 261 | - * @param {string} key - Setting key. | |
| 262 | - * @param {string} breakpoint - Breakpoint name. | |
| 263 | - * | |
| 264 | - * @return {string} device key | |
| 265 | - */ | |
| 266 | - function getDeviceKey(key, breakpoint) { | |
| 267 | - return [key, breakpoint].filter(function(v) { | |
| 268 | - return !!v; | |
| 269 | - }).join("_"); | |
| 270 | - } | |
| 482 | + * Generate a mapping object for responsive controls. | |
| 483 | + * | |
| 484 | + * Usage: | |
| 485 | + * 1. responsive( 'old_key', 'new_key' ); | |
| 486 | + * 2. responsive( 'old_key', ( { key, value, deviceValue, settings, breakpoint } ) => { return [ key, value ] } ); | |
| 487 | + * | |
| 488 | + * @param {string} key - Control name without device suffix. | |
| 489 | + * @param {string | Function} value - New control name without device suffix, or a callback. | |
| 490 | + * | |
| 491 | + * @return {Object} mapping object | |
| 492 | + */ | |
| 493 | +function responsive(key, value) { | |
| 494 | + var breakpoints = [''].concat((0, _toConsumableArray2.default)(Object.keys(elementorFrontend.config.responsive.activeBreakpoints))); | |
| 495 | + return Object.fromEntries(breakpoints.map(function (breakpoint) { | |
| 496 | + var deviceKey = getDeviceKey(key, breakpoint); | |
| 271 | 497 | |
| 272 | -//#endregion | |
| 273 | -//#region modules/container-converter/assets/js/editor/maps/section.js | |
| 274 | - function ownKeys$2(e, r) { | |
| 275 | - var t = Object.keys(e); | |
| 276 | - if (Object.getOwnPropertySymbols) { | |
| 277 | - var o = Object.getOwnPropertySymbols(e); | |
| 278 | - r && (o = o.filter(function(r) { | |
| 279 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 280 | - })), t.push.apply(t, o); | |
| 281 | - } | |
| 282 | - return t; | |
| 283 | - } | |
| 284 | - __name(ownKeys$2, "ownKeys"); | |
| 285 | - function _objectSpread$2(e) { | |
| 286 | - for (var r = 1; r < arguments.length; r++) { | |
| 287 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 288 | - r % 2 ? ownKeys$2(Object(t), !0).forEach(function(r) { | |
| 289 | - _defineProperty(e, r, t[r]); | |
| 290 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function(r) { | |
| 291 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 292 | - }); | |
| 293 | - } | |
| 294 | - return e; | |
| 295 | - } | |
| 296 | - __name(_objectSpread$2, "_objectSpread"); | |
| 297 | - var map$1 = function map(_ref) { | |
| 298 | - var isInner = _ref.isInner; | |
| 299 | - var _ref$settings = _ref.settings; | |
| 300 | - var settings = _ref$settings === void 0 ? {} : _ref$settings; | |
| 301 | - var widthKey = isInner ? "width" : "boxed_width"; | |
| 302 | - return _objectSpread$2(_objectSpread$2(_objectSpread$2({}, "boxed" === settings.layout ? responsive("content_width", widthKey) : { content_width: null }), "min-height" === settings.height && responsive("custom_height", "min_height")), {}, { | |
| 303 | - layout: function layout(_ref2) { | |
| 304 | - var value = _ref2.value; | |
| 305 | - return ["content_width", { | |
| 306 | - boxed: "boxed", | |
| 307 | - full_width: "full" | |
| 308 | - }[value] || value]; | |
| 309 | - }, | |
| 310 | - height: function height(_ref3) { | |
| 311 | - var value = _ref3.value; | |
| 312 | - var sectionSettings = _ref3.settings; | |
| 313 | - switch (value) { | |
| 314 | - case "full": | |
| 315 | - value = { | |
| 316 | - size: 100, | |
| 317 | - unit: "vh" | |
| 318 | - }; | |
| 319 | - break; | |
| 320 | - case "min-height": | |
| 321 | - value = sectionSettings.custom_height || { | |
| 322 | - size: 400, | |
| 323 | - unit: "px" | |
| 324 | - }; | |
| 325 | - break; | |
| 326 | - default: return false; | |
| 327 | - } | |
| 328 | - return ["min_height", value]; | |
| 329 | - }, | |
| 330 | - gap: function gap(_ref4) { | |
| 331 | - var value = _ref4.value; | |
| 332 | - var sectionSettings = _ref4.settings; | |
| 333 | - var sizesMap = { | |
| 334 | - no: 0, | |
| 335 | - narrow: 5, | |
| 336 | - extended: 15, | |
| 337 | - wide: 20, | |
| 338 | - wider: 30 | |
| 339 | - }; | |
| 340 | - value = "custom" === value ? sectionSettings.gap_columns_custom : { | |
| 341 | - size: sizesMap[value], | |
| 342 | - column: "" + sizesMap[value], | |
| 343 | - row: "" + sizesMap[value], | |
| 344 | - unit: "px" | |
| 345 | - }; | |
| 346 | - return ["flex_gap", value]; | |
| 347 | - }, | |
| 348 | - gap_columns_custom: null, | |
| 349 | - column_position: function column_position(_ref5) { | |
| 350 | - var value = _ref5.value; | |
| 351 | - return ["flex_align_items", { | |
| 352 | - top: "flex-start", | |
| 353 | - middle: "center", | |
| 354 | - bottom: "flex-end" | |
| 355 | - }[value] || value]; | |
| 356 | - } | |
| 357 | - }); | |
| 358 | - }; | |
| 498 | + // Simple responsive rename with string: | |
| 499 | + if ('string' === typeof value) { | |
| 500 | + var newDeviceKey = getDeviceKey(value, breakpoint); | |
| 501 | + return [deviceKey, function (_ref) { | |
| 502 | + var settings = _ref.settings; | |
| 503 | + return [newDeviceKey, settings[deviceKey]]; | |
| 504 | + }]; | |
| 505 | + } | |
| 359 | 506 | |
| 360 | -//#endregion | |
| 361 | -//#region modules/container-converter/assets/js/editor/maps/column.js | |
| 362 | - function ownKeys$1(e, r) { | |
| 363 | - var t = Object.keys(e); | |
| 364 | - if (Object.getOwnPropertySymbols) { | |
| 365 | - var o = Object.getOwnPropertySymbols(e); | |
| 366 | - r && (o = o.filter(function(r) { | |
| 367 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 368 | - })), t.push.apply(t, o); | |
| 369 | - } | |
| 370 | - return t; | |
| 371 | - } | |
| 372 | - __name(ownKeys$1, "ownKeys"); | |
| 373 | - function _objectSpread$1(e) { | |
| 374 | - for (var r = 1; r < arguments.length; r++) { | |
| 375 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 376 | - r % 2 ? ownKeys$1(Object(t), !0).forEach(function(r) { | |
| 377 | - _defineProperty(e, r, t[r]); | |
| 378 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r) { | |
| 379 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 380 | - }); | |
| 381 | - } | |
| 382 | - return e; | |
| 383 | - } | |
| 384 | - __name(_objectSpread$1, "_objectSpread"); | |
| 385 | - var map = function map() { | |
| 386 | - return _objectSpread$1(_objectSpread$1(_objectSpread$1({}, responsive("_inline_size", function(_ref) { | |
| 387 | - var deviceValue = _ref.deviceValue; | |
| 388 | - var breakpoint = _ref.breakpoint; | |
| 389 | - return [getDeviceKey("width", breakpoint), { | |
| 390 | - size: deviceValue, | |
| 391 | - unit: "%" | |
| 392 | - }]; | |
| 393 | - })), responsive("content_position", function(_ref2) { | |
| 394 | - var deviceValue = _ref2.deviceValue; | |
| 395 | - var breakpoint = _ref2.breakpoint; | |
| 396 | - return [getDeviceKey("flex_justify_content", breakpoint), { | |
| 397 | - top: "flex-start", | |
| 398 | - bottom: "flex-end" | |
| 399 | - }[deviceValue] || deviceValue]; | |
| 400 | - })), responsive("space_between_widgets", function(_ref3) { | |
| 401 | - var deviceValue = _ref3.deviceValue; | |
| 402 | - var breakpoint = _ref3.breakpoint; | |
| 403 | - return [getDeviceKey("flex_gap", breakpoint), { | |
| 404 | - size: deviceValue, | |
| 405 | - column: "" + deviceValue, | |
| 406 | - row: "" + deviceValue, | |
| 407 | - unit: "px" | |
| 408 | - }]; | |
| 409 | - })); | |
| 410 | - }; | |
| 507 | + // Advanced responsive rename with callback: | |
| 508 | + return [deviceKey, function (_ref2) { | |
| 509 | + var settings = _ref2.settings, | |
| 510 | + desktopValue = _ref2.value; | |
| 511 | + return value({ | |
| 512 | + key: key, | |
| 513 | + deviceKey: deviceKey, | |
| 514 | + value: desktopValue, | |
| 515 | + deviceValue: settings[deviceKey], | |
| 516 | + settings: settings, | |
| 517 | + breakpoint: breakpoint | |
| 518 | + }); | |
| 519 | + }]; | |
| 520 | + })); | |
| 521 | +} | |
| 411 | 522 | |
| 412 | -//#endregion | |
| 413 | -//#region modules/container-converter/assets/js/editor/migrator.js | |
| 414 | - function ownKeys(e, r) { | |
| 415 | - var t = Object.keys(e); | |
| 416 | - if (Object.getOwnPropertySymbols) { | |
| 417 | - var o = Object.getOwnPropertySymbols(e); | |
| 418 | - r && (o = o.filter(function(r) { | |
| 419 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 420 | - })), t.push.apply(t, o); | |
| 421 | - } | |
| 422 | - return t; | |
| 423 | - } | |
| 424 | - function _objectSpread(e) { | |
| 425 | - for (var r = 1; r < arguments.length; r++) { | |
| 426 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 427 | - r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { | |
| 428 | - _defineProperty(e, r, t[r]); | |
| 429 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { | |
| 430 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 431 | - }); | |
| 432 | - } | |
| 433 | - return e; | |
| 434 | - } | |
| 435 | - var Migrator = /*#__PURE__*/ function() { | |
| 436 | - function Migrator() { | |
| 437 | - _classCallCheck(this, Migrator); | |
| 438 | - } | |
| 439 | - return _createClass(Migrator, null, [ | |
| 440 | - { | |
| 441 | - key: "migrate", | |
| 442 | - value: function migrate(settings, map) { | |
| 443 | - return Object.fromEntries(Object.entries(_objectSpread({}, settings)).map(function(_ref) { | |
| 444 | - var _ref2 = _slicedToArray(_ref, 2); | |
| 445 | - var key = _ref2[0]; | |
| 446 | - var value = _ref2[1]; | |
| 447 | - var mapped = map[key]; | |
| 448 | - if (null === mapped) return null; | |
| 449 | - if ("string" === typeof mapped) return [mapped, value]; | |
| 450 | - if ("function" === typeof mapped) return mapped({ | |
| 451 | - key, | |
| 452 | - value, | |
| 453 | - settings | |
| 454 | - }); | |
| 455 | - return [key, value]; | |
| 456 | - }).filter(Boolean)); | |
| 457 | - } | |
| 458 | - }, | |
| 459 | - { | |
| 460 | - key: "canConvertToContainer", | |
| 461 | - value: function canConvertToContainer(elType) { | |
| 462 | - return Object.keys(this.config).includes(elType); | |
| 463 | - } | |
| 464 | - }, | |
| 465 | - { | |
| 466 | - key: "getLegacyControlsMapping", | |
| 467 | - value: function getLegacyControlsMapping(model) { | |
| 468 | - var config = this.config[model.elType]; | |
| 469 | - if (!config) return {}; | |
| 470 | - var mapping = config.legacyControlsMapping; | |
| 471 | - return "function" === typeof mapping ? mapping(model) : mapping; | |
| 472 | - } | |
| 473 | - }, | |
| 474 | - { | |
| 475 | - key: "normalizeSettings", | |
| 476 | - value: function normalizeSettings(model, settings) { | |
| 477 | - var config = this.config[model.elType]; | |
| 478 | - if (!config.normalizeSettings) return settings; | |
| 479 | - return config.normalizeSettings(settings, model); | |
| 480 | - } | |
| 481 | - } | |
| 482 | - ]); | |
| 483 | - }(); | |
| 484 | - /** | |
| 485 | - * Migrations configuration by `elType`. | |
| 486 | - * | |
| 487 | - * @type {Object} | |
| 488 | - */ | |
| 489 | - _defineProperty(Migrator, "config", { | |
| 490 | - section: { | |
| 491 | - legacyControlsMapping: map$1, | |
| 492 | - normalizeSettings: function normalizeSettings(settings, _ref3) { | |
| 493 | - var isInner = _ref3.isInner; | |
| 494 | - return _objectSpread(_objectSpread({}, settings), {}, { | |
| 495 | - flex_direction: "row", | |
| 496 | - flex_align_items: settings.flex_align_items || "stretch", | |
| 497 | - flex_gap: settings.flex_gap || { | |
| 498 | - size: 10, | |
| 499 | - column: "10", | |
| 500 | - row: "10", | |
| 501 | - unit: "px" | |
| 502 | - } | |
| 503 | - }, isInner ? { content_width: "full" } : {}); | |
| 504 | - } | |
| 505 | - }, | |
| 506 | - column: { | |
| 507 | - legacyControlsMapping: map, | |
| 508 | - normalizeSettings: function normalizeSettings(settings) { | |
| 509 | - return _objectSpread(_objectSpread({}, settings), {}, { content_width: "full" }); | |
| 510 | - } | |
| 511 | - } | |
| 512 | - }); | |
| 523 | +/** | |
| 524 | + * Get a setting key for a device. | |
| 525 | + * | |
| 526 | + * Examples: | |
| 527 | + * 1. getDeviceKey( 'some_control', 'mobile' ) => 'some_control_mobile'. | |
| 528 | + * 2. getDeviceKey( 'some_control', '' ) => 'some_control'. | |
| 529 | + * | |
| 530 | + * @param {string} key - Setting key. | |
| 531 | + * @param {string} breakpoint - Breakpoint name. | |
| 532 | + * | |
| 533 | + * @return {string} device key | |
| 534 | + */ | |
| 535 | +function getDeviceKey(key, breakpoint) { | |
| 536 | + return [key, breakpoint].filter(function (v) { | |
| 537 | + return !!v; | |
| 538 | + }).join('_'); | |
| 539 | +} | |
| 513 | 540 | |
| 514 | -//#endregion | |
| 515 | -//#region modules/container-converter/assets/js/editor/commands/convert.js | |
| 516 | - function _callSuper$3(t, o, e) { | |
| 517 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 518 | - } | |
| 519 | - __name(_callSuper$3, "_callSuper"); | |
| 520 | - function _isNativeReflectConstruct$3() { | |
| 521 | - try { | |
| 522 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 523 | - } catch (t) {} | |
| 524 | - return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() { | |
| 525 | - return !!t; | |
| 526 | - })(); | |
| 527 | - } | |
| 528 | - __name(_isNativeReflectConstruct$3, "_isNativeReflectConstruct"); | |
| 529 | - /** | |
| 530 | - * @typedef {import('../../../../../../assets/dev/js/editor/container/container')} Container | |
| 531 | - */ | |
| 532 | - var Convert = /*#__PURE__*/ function(_$e$modules$editor$do) { | |
| 533 | - function Convert() { | |
| 534 | - _classCallCheck(this, Convert); | |
| 535 | - return _callSuper$3(this, Convert, arguments); | |
| 536 | - } | |
| 537 | - _inherits(Convert, _$e$modules$editor$do); | |
| 538 | - return _createClass(Convert, [ | |
| 539 | - { | |
| 540 | - key: "getHistory", | |
| 541 | - value: function getHistory() { | |
| 542 | - return { | |
| 543 | - type: (0, _wordpress_i18n.__)("Converted to Container", "elementor"), | |
| 544 | - title: (0, _wordpress_i18n.__)("Section", "elementor") | |
| 545 | - }; | |
| 546 | - } | |
| 547 | - }, | |
| 548 | - { | |
| 549 | - key: "validateArgs", | |
| 550 | - value: function validateArgs() { | |
| 551 | - var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 552 | - this.requireContainer(args); | |
| 553 | - } | |
| 554 | - }, | |
| 555 | - { | |
| 556 | - key: "apply", | |
| 557 | - value: function apply(args) { | |
| 558 | - this.constructor.convert(args); | |
| 559 | - } | |
| 560 | - } | |
| 561 | - ], [{ | |
| 562 | - key: "convert", | |
| 563 | - value: function convert(_ref) { | |
| 564 | - var container = _ref.container; | |
| 565 | - var _ref$rootContainer = _ref.rootContainer; | |
| 566 | - var rootContainer = _ref$rootContainer === void 0 ? container.parent : _ref$rootContainer; | |
| 567 | - var view = container.view; | |
| 568 | - var elType = container.type; | |
| 569 | - var at = rootContainer === container.parent ? view._index + 1 : view._index; | |
| 570 | - if (!Migrator.canConvertToContainer(elType)) { | |
| 571 | - $e.run("document/elements/create", { | |
| 572 | - model: { | |
| 573 | - elType: container.model.get("elType"), | |
| 574 | - widgetType: container.model.get("widgetType"), | |
| 575 | - settings: container.settings.toJSON({ remove: "default" }) | |
| 576 | - }, | |
| 577 | - container: rootContainer, | |
| 578 | - options: { | |
| 579 | - at, | |
| 580 | - edit: false | |
| 581 | - } | |
| 582 | - }); | |
| 583 | - return; | |
| 584 | - } | |
| 585 | - var model = container.model.toJSON(); | |
| 586 | - var controlsMapping = Migrator.getLegacyControlsMapping(model); | |
| 587 | - var settings = container.settings.toJSON({ remove: "default" }); | |
| 588 | - settings = Migrator.migrate(settings, controlsMapping); | |
| 589 | - settings = Migrator.normalizeSettings(model, settings); | |
| 590 | - var newContainer = $e.run("document/elements/create", { | |
| 591 | - model: { | |
| 592 | - elType: "container", | |
| 593 | - settings | |
| 594 | - }, | |
| 595 | - container: rootContainer, | |
| 596 | - options: { | |
| 597 | - at, | |
| 598 | - edit: false | |
| 599 | - } | |
| 600 | - }); | |
| 601 | - container.children.forEach(function(child) { | |
| 602 | - $e.run("container-converter/convert", { | |
| 603 | - container: child, | |
| 604 | - rootContainer: newContainer | |
| 605 | - }); | |
| 606 | - }); | |
| 607 | - } | |
| 608 | - }]); | |
| 609 | - }($e.modules.editor.document.CommandHistoryBase); | |
| 541 | +/***/ }), | |
| 610 | 542 | |
| 611 | -//#endregion | |
| 612 | -//#region modules/container-converter/assets/js/editor/commands/convert-all.js | |
| 613 | - function _callSuper$2(t, o, e) { | |
| 614 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 615 | - } | |
| 616 | - __name(_callSuper$2, "_callSuper"); | |
| 617 | - function _isNativeReflectConstruct$2() { | |
| 618 | - try { | |
| 619 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 620 | - } catch (t) {} | |
| 621 | - return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { | |
| 622 | - return !!t; | |
| 623 | - })(); | |
| 624 | - } | |
| 625 | - __name(_isNativeReflectConstruct$2, "_isNativeReflectConstruct"); | |
| 626 | - var ConvertAll = /*#__PURE__*/ function(_$e$modules$editor$do) { | |
| 627 | - function ConvertAll() { | |
| 628 | - _classCallCheck(this, ConvertAll); | |
| 629 | - return _callSuper$2(this, ConvertAll, arguments); | |
| 630 | - } | |
| 631 | - _inherits(ConvertAll, _$e$modules$editor$do); | |
| 632 | - return _createClass(ConvertAll, [{ | |
| 633 | - key: "getHistory", | |
| 634 | - value: function getHistory() { | |
| 635 | - return { | |
| 636 | - type: (0, _wordpress_i18n.__)("Converted to Containers", "elementor"), | |
| 637 | - title: (0, _wordpress_i18n.__)("All Content", "elementor") | |
| 638 | - }; | |
| 639 | - } | |
| 640 | - }, { | |
| 641 | - key: "apply", | |
| 642 | - value: function apply() { | |
| 643 | - var children = elementor.getPreviewContainer().children; | |
| 644 | - _toConsumableArray(children).forEach(function(container) { | |
| 645 | - $e.run("container-converter/convert", { container }); | |
| 646 | - }); | |
| 647 | - } | |
| 648 | - }]); | |
| 649 | - }($e.modules.editor.document.CommandHistoryBase); | |
| 543 | +/***/ "../modules/container-converter/assets/js/editor/migrator.js": | |
| 544 | +/*!*******************************************************************!*\ | |
| 545 | + !*** ../modules/container-converter/assets/js/editor/migrator.js ***! | |
| 546 | + \*******************************************************************/ | |
| 547 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 650 | 548 | |
| 651 | -//#endregion | |
| 652 | -//#region modules/container-converter/assets/js/editor/commands/index.js | |
| 653 | - var commands_exports = /* @__PURE__ */ __exportAll({ | |
| 654 | - Convert: () => Convert, | |
| 655 | - ConvertAll: () => ConvertAll | |
| 656 | - }); | |
| 549 | +"use strict"; | |
| 657 | 550 | |
| 658 | -//#endregion | |
| 659 | -//#region modules/container-converter/assets/js/editor/component.js | |
| 660 | - function _callSuper$1(t, o, e) { | |
| 661 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 662 | - } | |
| 663 | - __name(_callSuper$1, "_callSuper"); | |
| 664 | - function _isNativeReflectConstruct$1() { | |
| 665 | - try { | |
| 666 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 667 | - } catch (t) {} | |
| 668 | - return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { | |
| 669 | - return !!t; | |
| 670 | - })(); | |
| 671 | - } | |
| 672 | - __name(_isNativeReflectConstruct$1, "_isNativeReflectConstruct"); | |
| 673 | - var _default = /*#__PURE__*/ function(_$e$modules$Component) { | |
| 674 | - function _default() { | |
| 675 | - var _this; | |
| 676 | - _classCallCheck(this, _default); | |
| 677 | - _this = _callSuper$1(this, _default); | |
| 678 | - _this.bindEvents(); | |
| 679 | - return _this; | |
| 680 | - } | |
| 681 | - /** | |
| 682 | - * Listen to click event in the panel. | |
| 683 | - * | |
| 684 | - * @return {void} | |
| 685 | - */ | |
| 686 | - _inherits(_default, _$e$modules$Component); | |
| 687 | - return _createClass(_default, [ | |
| 688 | - { | |
| 689 | - key: "bindEvents", | |
| 690 | - value: function bindEvents() { | |
| 691 | - elementor.channels.editor.on("elementorContainerConverter:convert", function(_ref) { | |
| 692 | - var container = _ref.container; | |
| 693 | - var button = _ref.el.querySelector(".elementor-button"); | |
| 694 | - var loadingClass = "e-loading"; | |
| 695 | - button.classList.add(loadingClass); | |
| 696 | - setTimeout(function() { | |
| 697 | - if ("document" === container.type) $e.run("container-converter/convert-all"); | |
| 698 | - else $e.run("container-converter/convert", { container }); | |
| 699 | - button.classList.remove(loadingClass); | |
| 700 | - button.setAttribute("disabled", true); | |
| 701 | - elementor.notifications.showToast({ message: (0, _wordpress_i18n.__)("Your changes have been updated.", "elementor") }); | |
| 702 | - }); | |
| 703 | - }); | |
| 704 | - } | |
| 705 | - }, | |
| 706 | - { | |
| 707 | - key: "getNamespace", | |
| 708 | - value: function getNamespace() { | |
| 709 | - return "container-converter"; | |
| 710 | - } | |
| 711 | - }, | |
| 712 | - { | |
| 713 | - key: "defaultCommands", | |
| 714 | - value: function defaultCommands() { | |
| 715 | - return this.importCommands(commands_exports); | |
| 716 | - } | |
| 717 | - } | |
| 718 | - ]); | |
| 719 | - }($e.modules.ComponentBase); | |
| 720 | 551 | |
| 721 | -//#endregion | |
| 722 | -//#region modules/container-converter/assets/js/editor/module.js | |
| 723 | - function _callSuper(t, o, e) { | |
| 724 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 725 | - } | |
| 726 | - function _isNativeReflectConstruct() { | |
| 727 | - try { | |
| 728 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 729 | - } catch (t) {} | |
| 730 | - return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 731 | - return !!t; | |
| 732 | - })(); | |
| 733 | - } | |
| 734 | - new (/* @__PURE__ */ function(_elementorModules$edi) { | |
| 735 | - function Module() { | |
| 736 | - _classCallCheck(this, Module); | |
| 737 | - return _callSuper(this, Module, arguments); | |
| 738 | - } | |
| 739 | - _inherits(Module, _elementorModules$edi); | |
| 740 | - return _createClass(Module, [{ | |
| 741 | - key: "onInit", | |
| 742 | - value: function onInit() { | |
| 743 | - $e.components.register(new _default()); | |
| 744 | - } | |
| 745 | - }]); | |
| 746 | - }(elementorModules.editor.utils.Module))(); | |
| 552 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 553 | +Object.defineProperty(exports, "__esModule", ({ | |
| 554 | + value: true | |
| 555 | +})); | |
| 556 | +exports["default"] = void 0; | |
| 557 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 558 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 559 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 560 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 561 | +var _section = _interopRequireDefault(__webpack_require__(/*! ./maps/section */ "../modules/container-converter/assets/js/editor/maps/section.js")); | |
| 562 | +var _column = _interopRequireDefault(__webpack_require__(/*! ./maps/column */ "../modules/container-converter/assets/js/editor/maps/column.js")); | |
| 563 | +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | |
| 564 | +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | |
| 565 | +var Migrator = /*#__PURE__*/function () { | |
| 566 | + function Migrator() { | |
| 567 | + (0, _classCallCheck2.default)(this, Migrator); | |
| 568 | + } | |
| 569 | + (0, _createClass2.default)(Migrator, null, [{ | |
| 570 | + key: "migrate", | |
| 571 | + value: | |
| 572 | + /** | |
| 573 | + * Migrate element settings into new settings object, using a map object. | |
| 574 | + * | |
| 575 | + * @param {Object} settings - Settings to migrate. | |
| 576 | + * @param {Object} map - Mapping object. | |
| 577 | + * | |
| 578 | + * @return {Object} new settings | |
| 579 | + */ | |
| 580 | + function migrate(settings, map) { | |
| 581 | + return Object.fromEntries(Object.entries(_objectSpread({}, settings)).map(function (_ref) { | |
| 582 | + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), | |
| 583 | + key = _ref2[0], | |
| 584 | + value = _ref2[1]; | |
| 585 | + var mapped = map[key]; | |
| 747 | 586 | |
| 748 | -//#endregion | |
| 749 | -})(wp.i18n); | |
| 587 | + // Remove setting. | |
| 588 | + if (null === mapped) { | |
| 589 | + return null; | |
| 590 | + } | |
| 591 | + | |
| 592 | + // Simple key conversion: | |
| 593 | + // { old_setting: 'new_setting' } | |
| 594 | + if ('string' === typeof mapped) { | |
| 595 | + return [mapped, value]; | |
| 596 | + } | |
| 597 | + | |
| 598 | + // Advanced conversion using a callback: | |
| 599 | + // { old_setting: ( { key, value, settings } ) => [ 'new_setting', value ] } | |
| 600 | + if ('function' === typeof mapped) { | |
| 601 | + return mapped({ | |
| 602 | + key: key, | |
| 603 | + value: value, | |
| 604 | + settings: settings | |
| 605 | + }); | |
| 606 | + } | |
| 607 | + return [key, value]; | |
| 608 | + }).filter(Boolean)); | |
| 609 | + } | |
| 610 | + | |
| 611 | + /** | |
| 612 | + * Determine if an element can be converted to a Container. | |
| 613 | + * | |
| 614 | + * @param {string} elType | |
| 615 | + * | |
| 616 | + * @return {boolean} true, if element can be converted | |
| 617 | + */ | |
| 618 | + }, { | |
| 619 | + key: "canConvertToContainer", | |
| 620 | + value: function canConvertToContainer(elType) { | |
| 621 | + return Object.keys(this.config).includes(elType); | |
| 622 | + } | |
| 623 | + | |
| 624 | + /** | |
| 625 | + * Get a mapping object of Legacy-to-Container controls mapping. | |
| 626 | + * | |
| 627 | + * @param {Object} model - Element model. | |
| 628 | + * | |
| 629 | + * @return {Object} mapping object | |
| 630 | + */ | |
| 631 | + }, { | |
| 632 | + key: "getLegacyControlsMapping", | |
| 633 | + value: function getLegacyControlsMapping(model) { | |
| 634 | + var config = this.config[model.elType]; | |
| 635 | + if (!config) { | |
| 636 | + return {}; | |
| 637 | + } | |
| 638 | + var mapping = config.legacyControlsMapping; | |
| 639 | + return 'function' === typeof mapping ? mapping(model) : mapping; | |
| 640 | + } | |
| 641 | + | |
| 642 | + /** | |
| 643 | + * Normalize element settings (adding defaults, etc.) by elType, | |
| 644 | + * | |
| 645 | + * @param {Object} model - Element model. | |
| 646 | + * @param {Object} settings - Settings object after migration. | |
| 647 | + * | |
| 648 | + * @return {Object} - normalized settings. | |
| 649 | + */ | |
| 650 | + }, { | |
| 651 | + key: "normalizeSettings", | |
| 652 | + value: function normalizeSettings(model, settings) { | |
| 653 | + var config = this.config[model.elType]; | |
| 654 | + if (!config.normalizeSettings) { | |
| 655 | + return settings; | |
| 656 | + } | |
| 657 | + return config.normalizeSettings(settings, model); | |
| 658 | + } | |
| 659 | + }]); | |
| 660 | + return Migrator; | |
| 661 | +}(); | |
| 662 | +exports["default"] = Migrator; | |
| 663 | +/** | |
| 664 | + * Migrations configuration by `elType`. | |
| 665 | + * | |
| 666 | + * @type {Object} | |
| 667 | + */ | |
| 668 | +(0, _defineProperty2.default)(Migrator, "config", { | |
| 669 | + section: { | |
| 670 | + legacyControlsMapping: _section.default, | |
| 671 | + normalizeSettings: function normalizeSettings(settings, _ref3) { | |
| 672 | + var isInner = _ref3.isInner; | |
| 673 | + return _objectSpread(_objectSpread({}, settings), {}, { | |
| 674 | + flex_direction: 'row', | |
| 675 | + // Force it to be row. | |
| 676 | + // Defaults (since default settings are removed): | |
| 677 | + flex_align_items: settings.flex_align_items || 'stretch', | |
| 678 | + flex_gap: settings.flex_gap || { | |
| 679 | + size: 10, | |
| 680 | + column: '10', | |
| 681 | + row: '10', | |
| 682 | + unit: 'px' | |
| 683 | + } | |
| 684 | + }, isInner ? { | |
| 685 | + content_width: 'full' | |
| 686 | + } : {}); | |
| 687 | + } | |
| 688 | + }, | |
| 689 | + column: { | |
| 690 | + legacyControlsMapping: _column.default, | |
| 691 | + normalizeSettings: function normalizeSettings(settings) { | |
| 692 | + return _objectSpread(_objectSpread({}, settings), {}, { | |
| 693 | + content_width: 'full' | |
| 694 | + }); | |
| 695 | + } | |
| 696 | + } | |
| 697 | +}); | |
| 698 | + | |
| 699 | +/***/ }), | |
| 700 | + | |
| 701 | +/***/ "@wordpress/i18n": | |
| 702 | +/*!**************************!*\ | |
| 703 | + !*** external "wp.i18n" ***! | |
| 704 | + \**************************/ | |
| 705 | +/***/ ((module) => { | |
| 706 | + | |
| 707 | +"use strict"; | |
| 708 | +module.exports = wp.i18n; | |
| 709 | + | |
| 710 | +/***/ }), | |
| 711 | + | |
| 712 | +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 713 | +/*!******************************************************************!*\ | |
| 714 | + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 715 | + \******************************************************************/ | |
| 716 | +/***/ ((module) => { | |
| 717 | + | |
| 718 | +function _arrayLikeToArray(arr, len) { | |
| 719 | + if (len == null || len > arr.length) len = arr.length; | |
| 720 | + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | |
| 721 | + return arr2; | |
| 722 | +} | |
| 723 | +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 724 | + | |
| 725 | +/***/ }), | |
| 726 | + | |
| 727 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 728 | +/*!****************************************************************!*\ | |
| 729 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 730 | + \****************************************************************/ | |
| 731 | +/***/ ((module) => { | |
| 732 | + | |
| 733 | +function _arrayWithHoles(arr) { | |
| 734 | + if (Array.isArray(arr)) return arr; | |
| 735 | +} | |
| 736 | +module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 737 | + | |
| 738 | +/***/ }), | |
| 739 | + | |
| 740 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": | |
| 741 | +/*!*******************************************************************!*\ | |
| 742 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! | |
| 743 | + \*******************************************************************/ | |
| 744 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 745 | + | |
| 746 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 747 | +function _arrayWithoutHoles(arr) { | |
| 748 | + if (Array.isArray(arr)) return arrayLikeToArray(arr); | |
| 749 | +} | |
| 750 | +module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 751 | + | |
| 752 | +/***/ }), | |
| 753 | + | |
| 754 | +/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 755 | +/*!***********************************************************************!*\ | |
| 756 | + !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 757 | + \***********************************************************************/ | |
| 758 | +/***/ ((module) => { | |
| 759 | + | |
| 760 | +function _assertThisInitialized(self) { | |
| 761 | + if (self === void 0) { | |
| 762 | + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 763 | + } | |
| 764 | + return self; | |
| 765 | +} | |
| 766 | +module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 767 | + | |
| 768 | +/***/ }), | |
| 769 | + | |
| 770 | +/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 771 | +/*!****************************************************************!*\ | |
| 772 | + !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 773 | + \****************************************************************/ | |
| 774 | +/***/ ((module) => { | |
| 775 | + | |
| 776 | +function _classCallCheck(instance, Constructor) { | |
| 777 | + if (!(instance instanceof Constructor)) { | |
| 778 | + throw new TypeError("Cannot call a class as a function"); | |
| 779 | + } | |
| 780 | +} | |
| 781 | +module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 782 | + | |
| 783 | +/***/ }), | |
| 784 | + | |
| 785 | +/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 786 | +/*!*************************************************************!*\ | |
| 787 | + !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 788 | + \*************************************************************/ | |
| 789 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 790 | + | |
| 791 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 792 | +function _defineProperties(target, props) { | |
| 793 | + for (var i = 0; i < props.length; i++) { | |
| 794 | + var descriptor = props[i]; | |
| 795 | + descriptor.enumerable = descriptor.enumerable || false; | |
| 796 | + descriptor.configurable = true; | |
| 797 | + if ("value" in descriptor) descriptor.writable = true; | |
| 798 | + Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor); | |
| 799 | + } | |
| 800 | +} | |
| 801 | +function _createClass(Constructor, protoProps, staticProps) { | |
| 802 | + if (protoProps) _defineProperties(Constructor.prototype, protoProps); | |
| 803 | + if (staticProps) _defineProperties(Constructor, staticProps); | |
| 804 | + Object.defineProperty(Constructor, "prototype", { | |
| 805 | + writable: false | |
| 806 | + }); | |
| 807 | + return Constructor; | |
| 808 | +} | |
| 809 | +module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 810 | + | |
| 811 | +/***/ }), | |
| 812 | + | |
| 813 | +/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 814 | +/*!****************************************************************!*\ | |
| 815 | + !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 816 | + \****************************************************************/ | |
| 817 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 818 | + | |
| 819 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 820 | +function _defineProperty(obj, key, value) { | |
| 821 | + key = toPropertyKey(key); | |
| 822 | + if (key in obj) { | |
| 823 | + Object.defineProperty(obj, key, { | |
| 824 | + value: value, | |
| 825 | + enumerable: true, | |
| 826 | + configurable: true, | |
| 827 | + writable: true | |
| 828 | + }); | |
| 829 | + } else { | |
| 830 | + obj[key] = value; | |
| 831 | + } | |
| 832 | + return obj; | |
| 833 | +} | |
| 834 | +module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 835 | + | |
| 836 | +/***/ }), | |
| 837 | + | |
| 838 | +/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 839 | +/*!****************************************************************!*\ | |
| 840 | + !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 841 | + \****************************************************************/ | |
| 842 | +/***/ ((module) => { | |
| 843 | + | |
| 844 | +function _getPrototypeOf(o) { | |
| 845 | + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { | |
| 846 | + return o.__proto__ || Object.getPrototypeOf(o); | |
| 847 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 848 | + return _getPrototypeOf(o); | |
| 849 | +} | |
| 850 | +module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 851 | + | |
| 852 | +/***/ }), | |
| 853 | + | |
| 854 | +/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 855 | +/*!**********************************************************!*\ | |
| 856 | + !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 857 | + \**********************************************************/ | |
| 858 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 859 | + | |
| 860 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 861 | +function _inherits(subClass, superClass) { | |
| 862 | + if (typeof superClass !== "function" && superClass !== null) { | |
| 863 | + throw new TypeError("Super expression must either be null or a function"); | |
| 864 | + } | |
| 865 | + subClass.prototype = Object.create(superClass && superClass.prototype, { | |
| 866 | + constructor: { | |
| 867 | + value: subClass, | |
| 868 | + writable: true, | |
| 869 | + configurable: true | |
| 870 | + } | |
| 871 | + }); | |
| 872 | + Object.defineProperty(subClass, "prototype", { | |
| 873 | + writable: false | |
| 874 | + }); | |
| 875 | + if (superClass) setPrototypeOf(subClass, superClass); | |
| 876 | +} | |
| 877 | +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 878 | + | |
| 879 | +/***/ }), | |
| 880 | + | |
| 881 | +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 882 | +/*!***********************************************************************!*\ | |
| 883 | + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 884 | + \***********************************************************************/ | |
| 885 | +/***/ ((module) => { | |
| 886 | + | |
| 887 | +function _interopRequireDefault(obj) { | |
| 888 | + return obj && obj.__esModule ? obj : { | |
| 889 | + "default": obj | |
| 890 | + }; | |
| 891 | +} | |
| 892 | +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 893 | + | |
| 894 | +/***/ }), | |
| 895 | + | |
| 896 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": | |
| 897 | +/*!*****************************************************************!*\ | |
| 898 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! | |
| 899 | + \*****************************************************************/ | |
| 900 | +/***/ ((module) => { | |
| 901 | + | |
| 902 | +function _iterableToArray(iter) { | |
| 903 | + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); | |
| 904 | +} | |
| 905 | +module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 906 | + | |
| 907 | +/***/ }), | |
| 908 | + | |
| 909 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 910 | +/*!**********************************************************************!*\ | |
| 911 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 912 | + \**********************************************************************/ | |
| 913 | +/***/ ((module) => { | |
| 914 | + | |
| 915 | +function _iterableToArrayLimit(r, l) { | |
| 916 | + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 917 | + if (null != t) { | |
| 918 | + var e, | |
| 919 | + n, | |
| 920 | + i, | |
| 921 | + u, | |
| 922 | + a = [], | |
| 923 | + f = !0, | |
| 924 | + o = !1; | |
| 925 | + try { | |
| 926 | + if (i = (t = t.call(r)).next, 0 === l) { | |
| 927 | + if (Object(t) !== t) return; | |
| 928 | + f = !1; | |
| 929 | + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 930 | + } catch (r) { | |
| 931 | + o = !0, n = r; | |
| 932 | + } finally { | |
| 933 | + try { | |
| 934 | + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 935 | + } finally { | |
| 936 | + if (o) throw n; | |
| 937 | + } | |
| 938 | + } | |
| 939 | + return a; | |
| 940 | + } | |
| 941 | +} | |
| 942 | +module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 943 | + | |
| 944 | +/***/ }), | |
| 945 | + | |
| 946 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 947 | +/*!*****************************************************************!*\ | |
| 948 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 949 | + \*****************************************************************/ | |
| 950 | +/***/ ((module) => { | |
| 951 | + | |
| 952 | +function _nonIterableRest() { | |
| 953 | + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 954 | +} | |
| 955 | +module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 956 | + | |
| 957 | +/***/ }), | |
| 958 | + | |
| 959 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": | |
| 960 | +/*!*******************************************************************!*\ | |
| 961 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! | |
| 962 | + \*******************************************************************/ | |
| 963 | +/***/ ((module) => { | |
| 964 | + | |
| 965 | +function _nonIterableSpread() { | |
| 966 | + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 967 | +} | |
| 968 | +module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 969 | + | |
| 970 | +/***/ }), | |
| 971 | + | |
| 972 | +/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 973 | +/*!***************************************************************************!*\ | |
| 974 | + !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 975 | + \***************************************************************************/ | |
| 976 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 977 | + | |
| 978 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 979 | +var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 980 | +function _possibleConstructorReturn(self, call) { | |
| 981 | + if (call && (_typeof(call) === "object" || typeof call === "function")) { | |
| 982 | + return call; | |
| 983 | + } else if (call !== void 0) { | |
| 984 | + throw new TypeError("Derived constructors may only return object or undefined"); | |
| 985 | + } | |
| 986 | + return assertThisInitialized(self); | |
| 987 | +} | |
| 988 | +module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 989 | + | |
| 990 | +/***/ }), | |
| 991 | + | |
| 992 | +/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 993 | +/*!****************************************************************!*\ | |
| 994 | + !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 995 | + \****************************************************************/ | |
| 996 | +/***/ ((module) => { | |
| 997 | + | |
| 998 | +function _setPrototypeOf(o, p) { | |
| 999 | + module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { | |
| 1000 | + o.__proto__ = p; | |
| 1001 | + return o; | |
| 1002 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1003 | + return _setPrototypeOf(o, p); | |
| 1004 | +} | |
| 1005 | +module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1006 | + | |
| 1007 | +/***/ }), | |
| 1008 | + | |
| 1009 | +/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 1010 | +/*!***************************************************************!*\ | |
| 1011 | + !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 1012 | + \***************************************************************/ | |
| 1013 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1014 | + | |
| 1015 | +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 1016 | +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 1017 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 1018 | +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 1019 | +function _slicedToArray(arr, i) { | |
| 1020 | + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); | |
| 1021 | +} | |
| 1022 | +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1023 | + | |
| 1024 | +/***/ }), | |
| 1025 | + | |
| 1026 | +/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": | |
| 1027 | +/*!*******************************************************************!*\ | |
| 1028 | + !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! | |
| 1029 | + \*******************************************************************/ | |
| 1030 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1031 | + | |
| 1032 | +var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); | |
| 1033 | +var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); | |
| 1034 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 1035 | +var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); | |
| 1036 | +function _toConsumableArray(arr) { | |
| 1037 | + return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); | |
| 1038 | +} | |
| 1039 | +module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1040 | + | |
| 1041 | +/***/ }), | |
| 1042 | + | |
| 1043 | +/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 1044 | +/*!*************************************************************!*\ | |
| 1045 | + !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 1046 | + \*************************************************************/ | |
| 1047 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1048 | + | |
| 1049 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1050 | +function toPrimitive(t, r) { | |
| 1051 | + if ("object" != _typeof(t) || !t) return t; | |
| 1052 | + var e = t[Symbol.toPrimitive]; | |
| 1053 | + if (void 0 !== e) { | |
| 1054 | + var i = e.call(t, r || "default"); | |
| 1055 | + if ("object" != _typeof(i)) return i; | |
| 1056 | + throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 1057 | + } | |
| 1058 | + return ("string" === r ? String : Number)(t); | |
| 1059 | +} | |
| 1060 | +module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1061 | + | |
| 1062 | +/***/ }), | |
| 1063 | + | |
| 1064 | +/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 1065 | +/*!***************************************************************!*\ | |
| 1066 | + !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 1067 | + \***************************************************************/ | |
| 1068 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1069 | + | |
| 1070 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1071 | +var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 1072 | +function toPropertyKey(t) { | |
| 1073 | + var i = toPrimitive(t, "string"); | |
| 1074 | + return "symbol" == _typeof(i) ? i : String(i); | |
| 1075 | +} | |
| 1076 | +module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1077 | + | |
| 1078 | +/***/ }), | |
| 1079 | + | |
| 1080 | +/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 1081 | +/*!********************************************************!*\ | |
| 1082 | + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 1083 | + \********************************************************/ | |
| 1084 | +/***/ ((module) => { | |
| 1085 | + | |
| 1086 | +function _typeof(o) { | |
| 1087 | + "@babel/helpers - typeof"; | |
| 1088 | + | |
| 1089 | + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 1090 | + return typeof o; | |
| 1091 | + } : function (o) { | |
| 1092 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 1093 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o); | |
| 1094 | +} | |
| 1095 | +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1096 | + | |
| 1097 | +/***/ }), | |
| 1098 | + | |
| 1099 | +/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 1100 | +/*!****************************************************************************!*\ | |
| 1101 | + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 1102 | + \****************************************************************************/ | |
| 1103 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1104 | + | |
| 1105 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 1106 | +function _unsupportedIterableToArray(o, minLen) { | |
| 1107 | + if (!o) return; | |
| 1108 | + if (typeof o === "string") return arrayLikeToArray(o, minLen); | |
| 1109 | + var n = Object.prototype.toString.call(o).slice(8, -1); | |
| 1110 | + if (n === "Object" && o.constructor) n = o.constructor.name; | |
| 1111 | + if (n === "Map" || n === "Set") return Array.from(o); | |
| 1112 | + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); | |
| 1113 | +} | |
| 1114 | +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1115 | + | |
| 1116 | +/***/ }) | |
| 1117 | + | |
| 1118 | +/******/ }); | |
| 1119 | +/************************************************************************/ | |
| 1120 | +/******/ // The module cache | |
| 1121 | +/******/ var __webpack_module_cache__ = {}; | |
| 1122 | +/******/ | |
| 1123 | +/******/ // The require function | |
| 1124 | +/******/ function __webpack_require__(moduleId) { | |
| 1125 | +/******/ // Check if module is in cache | |
| 1126 | +/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 1127 | +/******/ if (cachedModule !== undefined) { | |
| 1128 | +/******/ return cachedModule.exports; | |
| 1129 | +/******/ } | |
| 1130 | +/******/ // Create a new module (and put it into the cache) | |
| 1131 | +/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 1132 | +/******/ // no module.id needed | |
| 1133 | +/******/ // no module.loaded needed | |
| 1134 | +/******/ exports: {} | |
| 1135 | +/******/ }; | |
| 1136 | +/******/ | |
| 1137 | +/******/ // Execute the module function | |
| 1138 | +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 1139 | +/******/ | |
| 1140 | +/******/ // Return the exports of the module | |
| 1141 | +/******/ return module.exports; | |
| 1142 | +/******/ } | |
| 1143 | +/******/ | |
| 1144 | +/************************************************************************/ | |
| 1145 | +var __webpack_exports__ = {}; | |
| 1146 | +// This entry need to be wrapped in an IIFE because it need to be in strict mode. | |
| 1147 | +(() => { | |
| 1148 | +"use strict"; | |
| 1149 | +/*!*****************************************************************!*\ | |
| 1150 | + !*** ../modules/container-converter/assets/js/editor/module.js ***! | |
| 1151 | + \*****************************************************************/ | |
| 1152 | + | |
| 1153 | + | |
| 1154 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1155 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1156 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1157 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1158 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1159 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1160 | +var _component = _interopRequireDefault(__webpack_require__(/*! ./component */ "../modules/container-converter/assets/js/editor/component.js")); | |
| 1161 | +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); }; } | |
| 1162 | +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; } } | |
| 1163 | +var Module = /*#__PURE__*/function (_elementorModules$edi) { | |
| 1164 | + (0, _inherits2.default)(Module, _elementorModules$edi); | |
| 1165 | + var _super = _createSuper(Module); | |
| 1166 | + function Module() { | |
| 1167 | + (0, _classCallCheck2.default)(this, Module); | |
| 1168 | + return _super.apply(this, arguments); | |
| 1169 | + } | |
| 1170 | + (0, _createClass2.default)(Module, [{ | |
| 1171 | + key: "onInit", | |
| 1172 | + value: function onInit() { | |
| 1173 | + $e.components.register(new _component.default()); | |
| 1174 | + } | |
| 1175 | + }]); | |
| 1176 | + return Module; | |
| 1177 | +}(elementorModules.editor.utils.Module); | |
| 1178 | +new Module(); | |
| 1179 | +})(); | |
| 1180 | + | |
| 1181 | +/******/ })() | |
| 1182 | +; | |
| 750 | 1183 | //# sourceMappingURL=container-converter.js.map |