| @@ -1,3476 +1,3582 @@ | ||
| 1 | -(function(_wordpress_i18n, react, react_dom) { | |
| 1 | +/******/ (() => { // webpackBootstrap | |
| 2 | +/******/ var __webpack_modules__ = ({ | |
| 2 | 3 | |
| 3 | -//#region \0rolldown/runtime.js | |
| 4 | - var __create = Object.create; | |
| 5 | - var __defProp = Object.defineProperty; | |
| 6 | - var __name = (target, value) => __defProp(target, "name", { | |
| 7 | - value, | |
| 8 | - configurable: true | |
| 9 | - }); | |
| 10 | - var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 11 | - var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 12 | - var __getProtoOf = Object.getPrototypeOf; | |
| 13 | - var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 14 | - var __esmMin = (fn, res, err) => () => { | |
| 15 | - if (err) throw err[0]; | |
| 16 | - try { | |
| 17 | - return fn && (res = fn(fn = 0)), res; | |
| 18 | - } catch (e) { | |
| 19 | - throw err = [e], e; | |
| 20 | - } | |
| 21 | - }; | |
| 22 | - var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); | |
| 23 | - var __exportAll = (all, no_symbols) => { | |
| 24 | - let target = {}; | |
| 25 | - for (var name in all) { | |
| 26 | - __defProp(target, name, { | |
| 27 | - get: all[name], | |
| 28 | - enumerable: true | |
| 29 | - }); | |
| 30 | - } | |
| 31 | - if (!no_symbols) { | |
| 32 | - __defProp(target, Symbol.toStringTag, { value: "Module" }); | |
| 33 | - } | |
| 34 | - return target; | |
| 35 | - }; | |
| 36 | - var __copyProps = (to, from, except, desc) => { | |
| 37 | - if (from && typeof from === "object" || typeof from === "function") { | |
| 38 | - for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { | |
| 39 | - key = keys[i]; | |
| 40 | - if (!__hasOwnProp.call(to, key) && key !== except) { | |
| 41 | - __defProp(to, key, { | |
| 42 | - get: ((k) => from[k]).bind(null, key), | |
| 43 | - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable | |
| 44 | - }); | |
| 45 | - } | |
| 46 | - } | |
| 47 | - } | |
| 48 | - return to; | |
| 49 | - }; | |
| 50 | - var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { | |
| 51 | - value: mod, | |
| 52 | - enumerable: true | |
| 53 | - }) : target, mod)); | |
| 4 | +/***/ "../assets/dev/js/editor/elements/views/behaviors/sortable.js": | |
| 5 | +/*!********************************************************************!*\ | |
| 6 | + !*** ../assets/dev/js/editor/elements/views/behaviors/sortable.js ***! | |
| 7 | + \********************************************************************/ | |
| 8 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 54 | 9 | |
| 55 | -//#endregion | |
| 56 | -react = __toESM(react); | |
| 57 | -react_dom = __toESM(react_dom); | |
| 10 | +"use strict"; | |
| 58 | 11 | |
| 59 | -//#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js | |
| 60 | - function _classCallCheck(a, n) { | |
| 61 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 62 | - } | |
| 63 | 12 | |
| 64 | -//#endregion | |
| 65 | -//#region node_modules/@babel/runtime/helpers/esm/typeof.js | |
| 66 | - function _typeof(o) { | |
| 67 | - "@babel/helpers - typeof"; | |
| 68 | - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 69 | - return typeof o; | |
| 70 | - } : function(o) { | |
| 71 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 72 | - }, _typeof(o); | |
| 73 | - } | |
| 74 | - var init_typeof = __esmMin((() => {})); | |
| 13 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 14 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 15 | +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 16 | +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 17 | +var SortableBehavior; | |
| 75 | 18 | |
| 76 | -//#endregion | |
| 77 | -//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js | |
| 78 | - function toPrimitive(t, r) { | |
| 79 | - if ("object" != _typeof(t) || !t) return t; | |
| 80 | - var e = t[Symbol.toPrimitive]; | |
| 81 | - if (void 0 !== e) { | |
| 82 | - var i = e.call(t, r || "default"); | |
| 83 | - if ("object" != _typeof(i)) return i; | |
| 84 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 85 | - } | |
| 86 | - return ("string" === r ? String : Number)(t); | |
| 87 | - } | |
| 88 | - var init_toPrimitive = __esmMin((() => { | |
| 89 | - init_typeof(); | |
| 90 | - })); | |
| 19 | +/** | |
| 20 | + * @typedef {import('../../../container/container')} Container | |
| 21 | + */ | |
| 22 | +SortableBehavior = Marionette.Behavior.extend({ | |
| 23 | + defaults: { | |
| 24 | + elChildType: 'widget' | |
| 25 | + }, | |
| 26 | + events: { | |
| 27 | + sortstart: 'onSortStart', | |
| 28 | + sortreceive: 'onSortReceive', | |
| 29 | + sortupdate: 'onSortUpdate', | |
| 30 | + sortover: 'onSortOver', | |
| 31 | + sortout: 'onSortOut' | |
| 32 | + }, | |
| 33 | + initialize: function initialize() { | |
| 34 | + this.listenTo(elementor.channels.dataEditMode, 'switch', this.onEditModeSwitched).listenTo(this.view.options.model, 'request:sort:start', this.startSort).listenTo(this.view.options.model, 'request:sort:update', this.updateSort).listenTo(this.view.options.model, 'request:sort:receive', this.receiveSort); | |
| 35 | + }, | |
| 36 | + onEditModeSwitched: function onEditModeSwitched(activeMode) { | |
| 37 | + this.onToggleSortMode('edit' === activeMode); | |
| 38 | + }, | |
| 39 | + refresh: function refresh() { | |
| 40 | + this.onEditModeSwitched(elementor.channels.dataEditMode.request('activeMode')); | |
| 41 | + }, | |
| 42 | + onRender: function onRender() { | |
| 43 | + var _this = this; | |
| 44 | + this.view.collection.on('update', function () { | |
| 45 | + return _this.refresh(); | |
| 46 | + }); | |
| 47 | + _.defer(function () { | |
| 48 | + return _this.refresh(); | |
| 49 | + }); | |
| 50 | + }, | |
| 51 | + onDestroy: function onDestroy() { | |
| 52 | + this.deactivate(); | |
| 53 | + }, | |
| 54 | + /** | |
| 55 | + * Create an item placeholder in order to avoid UI jumps due to flex. | |
| 56 | + * | |
| 57 | + * @param {Object} $element - jQuery element instance to create placeholder for. | |
| 58 | + * @param {string} className - Placeholder class. | |
| 59 | + * @param {boolean} hide - Whether to hide the original element. | |
| 60 | + * | |
| 61 | + * @return {void} | |
| 62 | + */ | |
| 63 | + createPlaceholder: function createPlaceholder($element) { | |
| 64 | + var className = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; | |
| 65 | + var hide = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; | |
| 66 | + // Get the actual item size. | |
| 67 | + $element.css('display', ''); | |
| 68 | + var _$element$ = $element[0], | |
| 69 | + width = _$element$.clientWidth, | |
| 70 | + height = _$element$.clientHeight; | |
| 71 | + if (hide) { | |
| 72 | + $element.css('display', 'none'); | |
| 73 | + } | |
| 74 | + jQuery('<div />').css(_objectSpread(_objectSpread({}, $element.css(['flex-basis', 'flex-grow', 'flex-shrink', 'position'])), {}, { | |
| 75 | + width: width, | |
| 76 | + height: height | |
| 77 | + })).addClass(className).insertAfter($element); | |
| 78 | + }, | |
| 79 | + /** | |
| 80 | + * Return a settings object for jQuery UI sortable to make it swappable. | |
| 81 | + * | |
| 82 | + * @return {{stop: Function, start: Function}} options | |
| 83 | + */ | |
| 84 | + getSwappableOptions: function getSwappableOptions() { | |
| 85 | + var _this2 = this; | |
| 86 | + var $childViewContainer = this.getChildViewContainer(), | |
| 87 | + placeholderClass = 'e-swappable--item-placeholder'; | |
| 88 | + return { | |
| 89 | + start: function start(event, ui) { | |
| 90 | + $childViewContainer.sortable('refreshPositions'); | |
| 91 | 91 | |
| 92 | -//#endregion | |
| 93 | -//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js | |
| 94 | - function toPropertyKey(t) { | |
| 95 | - var i = toPrimitive(t, "string"); | |
| 96 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 97 | - } | |
| 98 | - var init_toPropertyKey = __esmMin((() => { | |
| 99 | - init_typeof(); | |
| 100 | - init_toPrimitive(); | |
| 101 | - })); | |
| 92 | + // TODO: Find a better solution than this hack. | |
| 93 | + // Used in order to prevent dragging a container into itself. | |
| 94 | + _this2.createPlaceholder(ui.item, placeholderClass); | |
| 95 | + }, | |
| 96 | + stop: function stop() { | |
| 97 | + // Cleanup. | |
| 98 | + $childViewContainer.find(".".concat(placeholderClass)).remove(); | |
| 99 | + } | |
| 100 | + }; | |
| 101 | + }, | |
| 102 | + onToggleSortMode: function onToggleSortMode(isActive) { | |
| 103 | + if (isActive) { | |
| 104 | + this.activate(); | |
| 105 | + } else { | |
| 106 | + this.deactivate(); | |
| 107 | + } | |
| 108 | + }, | |
| 109 | + applySortable: function applySortable() { | |
| 110 | + if (!elementor.userCan('design')) { | |
| 111 | + return; | |
| 112 | + } | |
| 113 | + var $childViewContainer = this.getChildViewContainer(), | |
| 114 | + defaultSortableOptions = { | |
| 115 | + placeholder: 'elementor-sortable-placeholder elementor-' + this.getOption('elChildType') + '-placeholder', | |
| 116 | + cursorAt: { | |
| 117 | + top: 20, | |
| 118 | + left: 25 | |
| 119 | + }, | |
| 120 | + helper: this._getSortableHelper.bind(this), | |
| 121 | + cancel: 'input, textarea, button, select, option, .elementor-inline-editing, .elementor-tab-title', | |
| 122 | + // Fix: Sortable - Unable to drag and drop sections with huge height. | |
| 123 | + start: function start() { | |
| 124 | + $childViewContainer.sortable('refreshPositions'); | |
| 125 | + } | |
| 126 | + }; | |
| 127 | + var sortableOptions = _.extend(defaultSortableOptions, this.view.getSortableOptions()); | |
| 102 | 128 | |
| 103 | -//#endregion | |
| 104 | -//#region node_modules/@babel/runtime/helpers/esm/createClass.js | |
| 105 | - init_toPropertyKey(); | |
| 106 | - function _defineProperties(e, r) { | |
| 107 | - for (var t = 0; t < r.length; t++) { | |
| 108 | - var o = r[t]; | |
| 109 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 110 | - } | |
| 111 | - } | |
| 112 | - function _createClass(e, r, t) { | |
| 113 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; | |
| 114 | - } | |
| 129 | + // Add a swappable behavior (used for flex containers). | |
| 130 | + if (this.isSwappable()) { | |
| 131 | + $childViewContainer.addClass('e-swappable'); | |
| 132 | + sortableOptions = _.extend(sortableOptions, this.getSwappableOptions()); | |
| 133 | + } | |
| 115 | 134 | |
| 116 | -//#endregion | |
| 117 | -//#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js | |
| 118 | - function _assertThisInitialized(e) { | |
| 119 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 120 | - return e; | |
| 121 | - } | |
| 135 | + // TODO: Temporary hack for Container. | |
| 136 | + // Will be removed in the future when the Navigator will use React. | |
| 137 | + if (sortableOptions.preventInit) { | |
| 138 | + return; | |
| 139 | + } | |
| 140 | + $childViewContainer.sortable(sortableOptions); | |
| 141 | + }, | |
| 142 | + /** | |
| 143 | + * Enable sorting for this element, and generate sortable instance for it unless already generated. | |
| 144 | + */ | |
| 145 | + activate: function activate() { | |
| 146 | + if (!this.getChildViewContainer().sortable('instance')) { | |
| 147 | + // Generate sortable instance for this element. Since fresh instances of sortable already allowing sorting, | |
| 148 | + // we can return. | |
| 149 | + this.applySortable(); | |
| 150 | + return; | |
| 151 | + } | |
| 152 | + this.getChildViewContainer().sortable('enable'); | |
| 153 | + }, | |
| 154 | + _getSortableHelper: function _getSortableHelper(event, $item) { | |
| 155 | + var model = this.view.collection.get({ | |
| 156 | + cid: $item.data('model-cid') | |
| 157 | + }); | |
| 158 | + return '<div style="height: 84px; width: 125px;" class="elementor-sortable-helper elementor-sortable-helper-' + model.get('elType') + '"><div class="icon"><i class="' + model.getIcon() + '"></i></div><div class="title-wrapper"><div class="title">' + model.getTitle() + '</div></div></div>'; | |
| 159 | + }, | |
| 160 | + getChildViewContainer: function getChildViewContainer() { | |
| 161 | + return this.view.getChildViewContainer(this.view); | |
| 162 | + }, | |
| 163 | + // The natural widget index in the column is wrong, since there are other elements | |
| 164 | + // at the beginning of the column (background-overlay, element-overlay, resizeable-handle) | |
| 165 | + getSortedElementNewIndex: function getSortedElementNewIndex($element) { | |
| 166 | + var widgets = Object.values($element.parent().find('> .elementor-element')); | |
| 167 | + return widgets.indexOf($element[0]); | |
| 168 | + }, | |
| 169 | + /** | |
| 170 | + * Disable sorting of the element unless no sortable instance exists, in which case there is already no option to | |
| 171 | + * sort. | |
| 172 | + */ | |
| 173 | + deactivate: function deactivate() { | |
| 174 | + var childViewContainer = this.getChildViewContainer(); | |
| 175 | + if (childViewContainer.sortable('instance')) { | |
| 176 | + childViewContainer.sortable('disable'); | |
| 177 | + } | |
| 178 | + }, | |
| 179 | + /** | |
| 180 | + * Determine if the current instance of Sortable is swappable. | |
| 181 | + * | |
| 182 | + * @return {boolean} is swappable | |
| 183 | + */ | |
| 184 | + isSwappable: function isSwappable() { | |
| 185 | + return !!this.view.getSortableOptions().swappable; | |
| 186 | + }, | |
| 187 | + startSort: function startSort(event, ui) { | |
| 188 | + event.stopPropagation(); | |
| 189 | + var container = elementor.getContainer(ui.item.attr('data-id')); | |
| 190 | + elementor.channels.data.reply('dragging:model', container.model).reply('dragging:view', container.view).reply('dragging:parent:view', this.view).trigger('drag:start', container.model).trigger(container.model.get('elType') + ':drag:start'); | |
| 191 | + }, | |
| 192 | + // On sorting element | |
| 193 | + updateSort: function updateSort(ui, newIndex) { | |
| 194 | + if (undefined === newIndex) { | |
| 195 | + newIndex = ui.item.index(); | |
| 196 | + } | |
| 197 | + var child = elementor.channels.data.request('dragging:view').getContainer(); | |
| 198 | + var result = this.moveChild(child, newIndex); | |
| 199 | + if (!result) { | |
| 200 | + jQuery(ui.sender).sortable('cancel'); | |
| 201 | + } | |
| 202 | + }, | |
| 203 | + // On receiving element from another container | |
| 204 | + receiveSort: function receiveSort(event, ui, newIndex) { | |
| 205 | + event.stopPropagation(); | |
| 206 | + if (this.view.isCollectionFilled()) { | |
| 207 | + jQuery(ui.sender).sortable('cancel'); | |
| 208 | + return; | |
| 209 | + } | |
| 210 | + var model = elementor.channels.data.request('dragging:model'), | |
| 211 | + draggedElType = model.get('elType'), | |
| 212 | + draggedIsInnerSection = 'section' === draggedElType && model.get('isInner'), | |
| 213 | + targetIsInnerColumn = 'column' === this.view.getElementType() && this.view.isInner(); | |
| 214 | + if (draggedIsInnerSection && targetIsInnerColumn) { | |
| 215 | + jQuery(ui.sender).sortable('cancel'); | |
| 216 | + return; | |
| 217 | + } | |
| 218 | + if (undefined === newIndex) { | |
| 219 | + newIndex = ui.item.index(); | |
| 220 | + } | |
| 221 | + var child = elementor.channels.data.request('dragging:view').getContainer(); | |
| 222 | + var result = this.moveChild(child, newIndex); | |
| 223 | + if (!result) { | |
| 224 | + jQuery(ui.sender).sortable('cancel'); | |
| 225 | + } | |
| 226 | + }, | |
| 227 | + onSortStart: function onSortStart(event, ui) { | |
| 228 | + if ('column' === this.options.elChildType) { | |
| 229 | + var uiData = ui.item.data('sortableItem'), | |
| 230 | + uiItems = uiData.items, | |
| 231 | + itemHeight = 0; | |
| 232 | + uiItems.forEach(function (item) { | |
| 233 | + if (item.item[0] === ui.item[0]) { | |
| 234 | + itemHeight = item.height; | |
| 235 | + return false; | |
| 236 | + } | |
| 237 | + }); | |
| 238 | + ui.placeholder.height(itemHeight); | |
| 239 | + } | |
| 240 | + this.startSort(event, ui); | |
| 241 | + }, | |
| 242 | + onSortOver: function onSortOver(event) { | |
| 243 | + event.stopPropagation(); | |
| 244 | + var model = elementor.channels.data.request('dragging:model'); | |
| 245 | + jQuery(event.target).addClass('elementor-draggable-over').attr({ | |
| 246 | + 'data-dragged-element': model.get('elType'), | |
| 247 | + 'data-dragged-is-inner': model.get('isInner') | |
| 248 | + }); | |
| 249 | + this.$el.addClass('elementor-dragging-on-child'); | |
| 250 | + }, | |
| 251 | + onSortOut: function onSortOut(event) { | |
| 252 | + event.stopPropagation(); | |
| 253 | + jQuery(event.target).removeClass('elementor-draggable-over').removeAttr('data-dragged-element data-dragged-is-inner'); | |
| 254 | + this.$el.removeClass('elementor-dragging-on-child'); | |
| 255 | + }, | |
| 256 | + onSortReceive: function onSortReceive(event, ui) { | |
| 257 | + this.receiveSort(event, ui, this.getSortedElementNewIndex(ui.item)); | |
| 258 | + }, | |
| 259 | + onSortUpdate: function onSortUpdate(event, ui) { | |
| 260 | + event.stopPropagation(); | |
| 261 | + if (this.getChildViewContainer()[0] !== ui.item.parent()[0]) { | |
| 262 | + return; | |
| 263 | + } | |
| 264 | + this.updateSort(ui, this.getSortedElementNewIndex(ui.item)); | |
| 265 | + }, | |
| 266 | + onAddChild: function onAddChild(view) { | |
| 267 | + view.$el.attr('data-model-cid', view.model.cid); | |
| 268 | + }, | |
| 269 | + /** | |
| 270 | + * Move a child container to another position. | |
| 271 | + * | |
| 272 | + * @param {Container} child - The child container to move. | |
| 273 | + * @param {number|string} index - New index. | |
| 274 | + * | |
| 275 | + * @return {Container|boolean} | |
| 276 | + */ | |
| 277 | + moveChild: function moveChild(child, index) { | |
| 278 | + return $e.run('document/elements/move', { | |
| 279 | + container: child, | |
| 280 | + target: this.view.getContainer(), | |
| 281 | + options: { | |
| 282 | + at: index | |
| 283 | + } | |
| 284 | + }); | |
| 285 | + } | |
| 286 | +}); | |
| 287 | +module.exports = SortableBehavior; | |
| 122 | 288 | |
| 123 | -//#endregion | |
| 124 | -//#region node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js | |
| 125 | - init_typeof(); | |
| 126 | - function _possibleConstructorReturn(t, e) { | |
| 127 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 128 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 129 | - return _assertThisInitialized(t); | |
| 130 | - } | |
| 289 | +/***/ }), | |
| 131 | 290 | |
| 132 | -//#endregion | |
| 133 | -//#region node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js | |
| 134 | - function _getPrototypeOf(t) { | |
| 135 | - return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { | |
| 136 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 137 | - }, _getPrototypeOf(t); | |
| 138 | - } | |
| 291 | +/***/ "../assets/dev/js/editor/elements/views/container/empty-component.js": | |
| 292 | +/*!***************************************************************************!*\ | |
| 293 | + !*** ../assets/dev/js/editor/elements/views/container/empty-component.js ***! | |
| 294 | + \***************************************************************************/ | |
| 295 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 139 | 296 | |
| 140 | -//#endregion | |
| 141 | -//#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js | |
| 142 | - function _setPrototypeOf(t, e) { | |
| 143 | - return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) { | |
| 144 | - return t.__proto__ = e, t; | |
| 145 | - }, _setPrototypeOf(t, e); | |
| 146 | - } | |
| 297 | +"use strict"; | |
| 147 | 298 | |
| 148 | -//#endregion | |
| 149 | -//#region node_modules/@babel/runtime/helpers/esm/inherits.js | |
| 150 | - function _inherits(t, e) { | |
| 151 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 152 | - t.prototype = Object.create(e && e.prototype, { constructor: { | |
| 153 | - value: t, | |
| 154 | - writable: !0, | |
| 155 | - configurable: !0 | |
| 156 | - } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); | |
| 157 | - } | |
| 158 | 299 | |
| 159 | -//#endregion | |
| 160 | -//#region node_modules/@babel/runtime/helpers/esm/superPropBase.js | |
| 161 | - function _superPropBase(t, o) { | |
| 162 | - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); | |
| 163 | - return t; | |
| 164 | - } | |
| 300 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 301 | +Object.defineProperty(exports, "__esModule", ({ | |
| 302 | + value: true | |
| 303 | +})); | |
| 304 | +exports["default"] = EmptyComponent; | |
| 305 | +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 306 | +var _editorOneEvents = __webpack_require__(/*! elementor-editor-utils/editor-one-events */ "../assets/dev/js/editor/utils/editor-one-events.js"); | |
| 307 | +/* eslint-disable jsx-a11y/no-static-element-interactions */ | |
| 308 | +/* eslint-disable jsx-a11y/click-events-have-key-events */ | |
| 165 | 309 | |
| 166 | -//#endregion | |
| 167 | -//#region node_modules/@babel/runtime/helpers/esm/get.js | |
| 168 | - function _get() { | |
| 169 | - return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function(e, t, r) { | |
| 170 | - var p = _superPropBase(e, t); | |
| 171 | - if (p) { | |
| 172 | - var n = Object.getOwnPropertyDescriptor(p, t); | |
| 173 | - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; | |
| 174 | - } | |
| 175 | - }, _get.apply(null, arguments); | |
| 176 | - } | |
| 310 | +function EmptyComponent() { | |
| 311 | + var handleClick = function handleClick() { | |
| 312 | + _editorOneEvents.EditorOneEventManager.sendCanvasEmptyBoxAction({ | |
| 313 | + targetName: 'add_container' | |
| 314 | + }); | |
| 315 | + $e.route('panel/elements/categories'); | |
| 316 | + }; | |
| 317 | + return /*#__PURE__*/_react.default.createElement("div", { | |
| 318 | + className: "elementor-first-add" | |
| 319 | + }, /*#__PURE__*/_react.default.createElement("div", { | |
| 320 | + className: "elementor-icon eicon-plus", | |
| 321 | + onClick: handleClick | |
| 322 | + })); | |
| 323 | +} | |
| 177 | 324 | |
| 178 | -//#endregion | |
| 179 | -//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js | |
| 180 | - function _defineProperty(e, r, t) { | |
| 181 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 182 | - value: t, | |
| 183 | - enumerable: !0, | |
| 184 | - configurable: !0, | |
| 185 | - writable: !0 | |
| 186 | - }) : e[r] = t, e; | |
| 187 | - } | |
| 188 | - var init_defineProperty = __esmMin((() => { | |
| 189 | - init_toPropertyKey(); | |
| 190 | - })); | |
| 325 | +/***/ }), | |
| 191 | 326 | |
| 192 | -//#endregion | |
| 193 | -//#region modules/atomic-widgets/assets/js/editor/atomic-element-base-model.js | |
| 194 | - init_defineProperty(); | |
| 195 | - function ownKeys$3(e, r) { | |
| 196 | - var t = Object.keys(e); | |
| 197 | - if (Object.getOwnPropertySymbols) { | |
| 198 | - var o = Object.getOwnPropertySymbols(e); | |
| 199 | - r && (o = o.filter(function(r) { | |
| 200 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 201 | - })), t.push.apply(t, o); | |
| 202 | - } | |
| 203 | - return t; | |
| 204 | - } | |
| 205 | - __name(ownKeys$3, "ownKeys"); | |
| 206 | - function _objectSpread$3(e) { | |
| 207 | - for (var r = 1; r < arguments.length; r++) { | |
| 208 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 209 | - r % 2 ? ownKeys$3(Object(t), !0).forEach(function(r) { | |
| 210 | - _defineProperty(e, r, t[r]); | |
| 211 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function(r) { | |
| 212 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 213 | - }); | |
| 214 | - } | |
| 215 | - return e; | |
| 216 | - } | |
| 217 | - __name(_objectSpread$3, "_objectSpread"); | |
| 218 | - function _callSuper$8(t, o, e) { | |
| 219 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$8() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 220 | - } | |
| 221 | - __name(_callSuper$8, "_callSuper"); | |
| 222 | - function _isNativeReflectConstruct$8() { | |
| 223 | - try { | |
| 224 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 225 | - } catch (t) {} | |
| 226 | - return (_isNativeReflectConstruct$8 = function _isNativeReflectConstruct() { | |
| 227 | - return !!t; | |
| 228 | - })(); | |
| 229 | - } | |
| 230 | - __name(_isNativeReflectConstruct$8, "_isNativeReflectConstruct"); | |
| 231 | - function _superPropGet(t, o, e, r) { | |
| 232 | - var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); | |
| 233 | - return 2 & r && "function" == typeof p ? function(t) { | |
| 234 | - return p.apply(e, t); | |
| 235 | - } : p; | |
| 236 | - } | |
| 237 | - var AtomicElementBaseModel = /*#__PURE__*/ function(_elementor$modules$el) { | |
| 238 | - function AtomicElementBaseModel() { | |
| 239 | - _classCallCheck(this, AtomicElementBaseModel); | |
| 240 | - return _callSuper$8(this, AtomicElementBaseModel, arguments); | |
| 241 | - } | |
| 242 | - _inherits(AtomicElementBaseModel, _elementor$modules$el); | |
| 243 | - return _createClass(AtomicElementBaseModel, [ | |
| 244 | - { | |
| 245 | - key: "isValidChild", | |
| 246 | - value: function isValidChild(childModel) { | |
| 247 | - var elType = childModel.get("elType"); | |
| 248 | - return "section" !== elType && "column" !== elType; | |
| 249 | - } | |
| 250 | - }, | |
| 251 | - { | |
| 252 | - key: "initialize", | |
| 253 | - value: function initialize(attributes, options) { | |
| 254 | - var _this$config; | |
| 255 | - var elementType = this.get("elType"); | |
| 256 | - this.config = elementor.config.elements[elementType]; | |
| 257 | - if ((_this$config = this.config) !== null && _this$config !== void 0 && (_this$config = _this$config.meta) !== null && _this$config !== void 0 && _this$config.permanently_locked) this.set("isLocked", true); | |
| 258 | - var isEmpty = 0 === this.get("elements").length; | |
| 259 | - var isNewElementCreate = isEmpty && $e.commands.currentTrace.includes("document/elements/create"); | |
| 260 | - var shouldHydrate = isEmpty && this.get("hydrateDefaultChildren"); | |
| 261 | - if (shouldHydrate) this.unset("hydrateDefaultChildren", { silent: true }); | |
| 262 | - if (isNewElementCreate || shouldHydrate) this.onElementCreate(); | |
| 263 | - this.reconcileChildrenAgainstSchema(attributes); | |
| 264 | - _superPropGet(AtomicElementBaseModel, "initialize", this, 3)([attributes, options]); | |
| 265 | - this.bindChildrenReconcile(); | |
| 266 | - } | |
| 267 | - }, | |
| 268 | - { | |
| 269 | - key: "reconcileChildrenAgainstSchema", | |
| 270 | - value: function reconcileChildrenAgainstSchema(attributes) { | |
| 271 | - var _this$config2; | |
| 272 | - if (!((_this$config2 = this.config) !== null && _this$config2 !== void 0 && (_this$config2 = _this$config2.children_dependencies) !== null && _this$config2 !== void 0 && _this$config2.length)) return; | |
| 273 | - var adapter = AtomicElementBaseModel.childrenDependenciesAdapter; | |
| 274 | - if (!(adapter !== null && adapter !== void 0 && adapter.reconcileInitialChildren)) return; | |
| 275 | - attributes.elements = this.get("elements"); | |
| 276 | - adapter.reconcileInitialChildren({ | |
| 277 | - elementId: this.get("id"), | |
| 278 | - elementConfig: this.config, | |
| 279 | - attributes | |
| 280 | - }); | |
| 281 | - this.set("elements", attributes.elements); | |
| 282 | - } | |
| 283 | - }, | |
| 284 | - { | |
| 285 | - key: "bindChildrenReconcile", | |
| 286 | - value: function bindChildrenReconcile() { | |
| 287 | - var _this$config3; | |
| 288 | - var _this$unbindChildrenR; | |
| 289 | - var _this = this; | |
| 290 | - if (!((_this$config3 = this.config) !== null && _this$config3 !== void 0 && (_this$config3 = _this$config3.children_dependencies) !== null && _this$config3 !== void 0 && _this$config3.length)) return; | |
| 291 | - var adapter = AtomicElementBaseModel.childrenDependenciesAdapter; | |
| 292 | - if (!(adapter !== null && adapter !== void 0 && adapter.bindSettingsReconcile)) return; | |
| 293 | - (_this$unbindChildrenR = this.unbindChildrenReconcile) === null || _this$unbindChildrenR === void 0 || _this$unbindChildrenR.call(this); | |
| 294 | - this.unbindChildrenReconcile = adapter.bindSettingsReconcile({ | |
| 295 | - model: this, | |
| 296 | - elementConfig: this.config | |
| 297 | - }); | |
| 298 | - this.once("destroy", function() { | |
| 299 | - var _this$unbindChildrenR2; | |
| 300 | - return (_this$unbindChildrenR2 = _this.unbindChildrenReconcile) === null || _this$unbindChildrenR2 === void 0 ? void 0 : _this$unbindChildrenR2.call(_this); | |
| 301 | - }); | |
| 302 | - } | |
| 303 | - }, | |
| 304 | - { | |
| 305 | - key: "getDefaultChildren", | |
| 306 | - value: function getDefaultChildren() { | |
| 307 | - var defaultChildren = this.config.default_children; | |
| 308 | - return this.modifyDefaultChildren(defaultChildren); | |
| 309 | - } | |
| 310 | - }, | |
| 311 | - { | |
| 312 | - key: "onElementCreate", | |
| 313 | - value: function onElementCreate() { | |
| 314 | - var _this2 = this; | |
| 315 | - if (this.get("skipDefaultChildren")) { | |
| 316 | - this.unset("skipDefaultChildren", { silent: true }); | |
| 317 | - return; | |
| 318 | - } | |
| 319 | - this.set("elements", this.getDefaultChildren().map(function(element) { | |
| 320 | - return _this2.buildElement(element); | |
| 321 | - })); | |
| 322 | - } | |
| 323 | - }, | |
| 324 | - { | |
| 325 | - key: "modifyDefaultChildren", | |
| 326 | - value: function modifyDefaultChildren(element) { | |
| 327 | - return element; | |
| 328 | - } | |
| 329 | - }, | |
| 330 | - { | |
| 331 | - key: "buildElement", | |
| 332 | - value: function buildElement(element) { | |
| 333 | - var _this3 = this; | |
| 334 | - var _element$settings; | |
| 335 | - var id = elementorCommon.helpers.getUniqueId(); | |
| 336 | - var elements = (element.elements || []).map(function(el) { | |
| 337 | - return _this3.buildElement(el); | |
| 338 | - }); | |
| 339 | - return _objectSpread$3({ | |
| 340 | - elType: element.elType, | |
| 341 | - widgetType: element.widgetType, | |
| 342 | - id, | |
| 343 | - settings: (_element$settings = element.settings) !== null && _element$settings !== void 0 ? _element$settings : {}, | |
| 344 | - elements, | |
| 345 | - isLocked: element.isLocked || false, | |
| 346 | - editor_settings: element.editor_settings || {}, | |
| 347 | - meta: element.meta || {} | |
| 348 | - }, element.skipDefaultChildren ? {} : { hydrateDefaultChildren: true }); | |
| 349 | - } | |
| 350 | - } | |
| 351 | - ], [{ | |
| 352 | - key: "setChildrenDependenciesAdapter", | |
| 353 | - value: function setChildrenDependenciesAdapter(adapter) { | |
| 354 | - AtomicElementBaseModel.childrenDependenciesAdapter = adapter; | |
| 355 | - } | |
| 356 | - }]); | |
| 357 | - }(elementor.modules.elements.models.Element); | |
| 358 | - _defineProperty(AtomicElementBaseModel, "childrenDependenciesAdapter", null); | |
| 327 | +/***/ "../assets/dev/js/editor/utils/editor-one-events.js": | |
| 328 | +/*!**********************************************************!*\ | |
| 329 | + !*** ../assets/dev/js/editor/utils/editor-one-events.js ***! | |
| 330 | + \**********************************************************/ | |
| 331 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 359 | 332 | |
| 360 | -//#endregion | |
| 361 | -//#region modules/atomic-widgets/assets/js/editor/atomic-element-base-type.js | |
| 362 | - function _callSuper$7(t, o, e) { | |
| 363 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$7() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 364 | - } | |
| 365 | - __name(_callSuper$7, "_callSuper"); | |
| 366 | - function _isNativeReflectConstruct$7() { | |
| 367 | - try { | |
| 368 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 369 | - } catch (t) {} | |
| 370 | - return (_isNativeReflectConstruct$7 = function _isNativeReflectConstruct() { | |
| 371 | - return !!t; | |
| 372 | - })(); | |
| 373 | - } | |
| 374 | - __name(_isNativeReflectConstruct$7, "_isNativeReflectConstruct"); | |
| 375 | - var AtomicElementBaseType = /*#__PURE__*/ function(_elementor$modules$el) { | |
| 376 | - function AtomicElementBaseType(elementType, viewClass) { | |
| 377 | - var _this; | |
| 378 | - var modelClass = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; | |
| 379 | - var emptyViewClass = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null; | |
| 380 | - _classCallCheck(this, AtomicElementBaseType); | |
| 381 | - _this = _callSuper$7(this, AtomicElementBaseType); | |
| 382 | - _this.elementType = elementType; | |
| 383 | - _this.viewClass = viewClass; | |
| 384 | - _this.modelClass = modelClass; | |
| 385 | - _this.emptyViewClass = emptyViewClass; | |
| 386 | - return _this; | |
| 387 | - } | |
| 388 | - _inherits(AtomicElementBaseType, _elementor$modules$el); | |
| 389 | - return _createClass(AtomicElementBaseType, [ | |
| 390 | - { | |
| 391 | - key: "getType", | |
| 392 | - value: function getType() { | |
| 393 | - return this.elementType; | |
| 394 | - } | |
| 395 | - }, | |
| 396 | - { | |
| 397 | - key: "getView", | |
| 398 | - value: function getView() { | |
| 399 | - return this.viewClass; | |
| 400 | - } | |
| 401 | - }, | |
| 402 | - { | |
| 403 | - key: "getEmptyView", | |
| 404 | - value: function getEmptyView() { | |
| 405 | - return this.emptyViewClass || elementor.modules.elements.views.EmptyComponent; | |
| 406 | - } | |
| 407 | - }, | |
| 408 | - { | |
| 409 | - key: "getModel", | |
| 410 | - value: function getModel() { | |
| 411 | - return this.modelClass || elementor.modules.elements.models.AtomicElementBase; | |
| 412 | - } | |
| 413 | - } | |
| 414 | - ]); | |
| 415 | - }(elementor.modules.elements.types.Base); | |
| 333 | +"use strict"; | |
| 416 | 334 | |
| 417 | -//#endregion | |
| 418 | -//#region node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js | |
| 419 | - function _arrayWithHoles(r) { | |
| 420 | - if (Array.isArray(r)) return r; | |
| 421 | - } | |
| 422 | 335 | |
| 423 | -//#endregion | |
| 424 | -//#region node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js | |
| 425 | - function _iterableToArrayLimit(r, l) { | |
| 426 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 427 | - if (null != t) { | |
| 428 | - var e; | |
| 429 | - var n; | |
| 430 | - var i; | |
| 431 | - var u; | |
| 432 | - var a = []; | |
| 433 | - var f = !0; | |
| 434 | - var o = !1; | |
| 435 | - try { | |
| 436 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 437 | - if (Object(t) !== t) return; | |
| 438 | - f = !1; | |
| 439 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 440 | - } catch (r) { | |
| 441 | - o = !0, n = r; | |
| 442 | - } finally { | |
| 443 | - try { | |
| 444 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 445 | - } finally { | |
| 446 | - if (o) throw n; | |
| 447 | - } | |
| 448 | - } | |
| 449 | - return a; | |
| 450 | - } | |
| 451 | - } | |
| 336 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 337 | +Object.defineProperty(exports, "__esModule", ({ | |
| 338 | + value: true | |
| 339 | +})); | |
| 340 | +exports["default"] = exports.createDebouncedWidgetPanelSearch = exports.createDebouncedFinderSearch = exports.EditorOneEventManager = void 0; | |
| 341 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 342 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 343 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 344 | +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 345 | +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 346 | +var EditorOneEventManager = exports.EditorOneEventManager = /*#__PURE__*/function () { | |
| 347 | + function EditorOneEventManager() { | |
| 348 | + (0, _classCallCheck2.default)(this, EditorOneEventManager); | |
| 349 | + } | |
| 350 | + return (0, _createClass2.default)(EditorOneEventManager, null, [{ | |
| 351 | + key: "getEventsManager", | |
| 352 | + value: function getEventsManager() { | |
| 353 | + var _elementorCommon; | |
| 354 | + return (_elementorCommon = elementorCommon) === null || _elementorCommon === void 0 ? void 0 : _elementorCommon.eventsManager; | |
| 355 | + } | |
| 356 | + }, { | |
| 357 | + key: "getConfig", | |
| 358 | + value: function getConfig() { | |
| 359 | + var _this$getEventsManage; | |
| 360 | + return (_this$getEventsManage = this.getEventsManager()) === null || _this$getEventsManage === void 0 ? void 0 : _this$getEventsManage.config; | |
| 361 | + } | |
| 362 | + }, { | |
| 363 | + key: "canSendEvents", | |
| 364 | + value: function canSendEvents() { | |
| 365 | + var _elementorCommon2; | |
| 366 | + return ((_elementorCommon2 = elementorCommon) === null || _elementorCommon2 === void 0 || (_elementorCommon2 = _elementorCommon2.config) === null || _elementorCommon2 === void 0 || (_elementorCommon2 = _elementorCommon2.editor_events) === null || _elementorCommon2 === void 0 ? void 0 : _elementorCommon2.can_send_events) || false; | |
| 367 | + } | |
| 368 | + }, { | |
| 369 | + key: "isEventsManagerAvailable", | |
| 370 | + value: function isEventsManagerAvailable() { | |
| 371 | + var eventsManager = this.getEventsManager(); | |
| 372 | + return eventsManager && 'function' === typeof eventsManager.dispatchEvent; | |
| 373 | + } | |
| 374 | + }, { | |
| 375 | + key: "dispatchEvent", | |
| 376 | + value: function dispatchEvent(eventName, payload) { | |
| 377 | + if (!this.isEventsManagerAvailable() || !this.canSendEvents()) { | |
| 378 | + return false; | |
| 379 | + } | |
| 380 | + try { | |
| 381 | + return this.getEventsManager().dispatchEvent(eventName, payload); | |
| 382 | + } catch (error) { | |
| 383 | + return false; | |
| 384 | + } | |
| 385 | + } | |
| 386 | + }, { | |
| 387 | + key: "toLowerSnake", | |
| 388 | + value: function toLowerSnake(value) { | |
| 389 | + if (!value || 'string' !== typeof value) { | |
| 390 | + return value; | |
| 391 | + } | |
| 392 | + return value.replace(/\s+/g, '_').toLowerCase(); | |
| 393 | + } | |
| 394 | + }, { | |
| 395 | + key: "decodeHtmlEntities", | |
| 396 | + value: function decodeHtmlEntities(text) { | |
| 397 | + if (!text || 'string' !== typeof text) { | |
| 398 | + return text; | |
| 399 | + } | |
| 400 | + var doc = new DOMParser().parseFromString(text, 'text/html'); | |
| 401 | + return doc.body.textContent || text; | |
| 402 | + } | |
| 403 | + }, { | |
| 404 | + key: "isInEditorContext", | |
| 405 | + value: function isInEditorContext() { | |
| 406 | + var _window$elementor; | |
| 407 | + return 'undefined' !== typeof window.elementor && !!((_window$elementor = window.elementor) !== null && _window$elementor !== void 0 && _window$elementor.documents); | |
| 408 | + } | |
| 409 | + }, { | |
| 410 | + key: "getFinderContext", | |
| 411 | + value: function getFinderContext() { | |
| 412 | + var _config$appTypes, _config$appTypes2, _config$locations, _config$locations2; | |
| 413 | + var config = this.getConfig(); | |
| 414 | + var isEditor = this.isInEditorContext(); | |
| 415 | + return { | |
| 416 | + windowName: isEditor ? config === null || config === void 0 || (_config$appTypes = config.appTypes) === null || _config$appTypes === void 0 ? void 0 : _config$appTypes.editor : config === null || config === void 0 || (_config$appTypes2 = config.appTypes) === null || _config$appTypes2 === void 0 ? void 0 : _config$appTypes2.wpAdmin, | |
| 417 | + targetLocation: this.toLowerSnake(isEditor ? config === null || config === void 0 || (_config$locations = config.locations) === null || _config$locations === void 0 ? void 0 : _config$locations.topBar : config === null || config === void 0 || (_config$locations2 = config.locations) === null || _config$locations2 === void 0 ? void 0 : _config$locations2.sidebar) | |
| 418 | + }; | |
| 419 | + } | |
| 420 | + }, { | |
| 421 | + key: "createBasePayload", | |
| 422 | + value: function createBasePayload() { | |
| 423 | + var _config$appTypes$edit, _config$appTypes3, _config$appTypes$edit2, _config$appTypes4; | |
| 424 | + var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 425 | + var config = this.getConfig(); | |
| 426 | + return _objectSpread({ | |
| 427 | + app_type: (_config$appTypes$edit = config === null || config === void 0 || (_config$appTypes3 = config.appTypes) === null || _config$appTypes3 === void 0 ? void 0 : _config$appTypes3.editor) !== null && _config$appTypes$edit !== void 0 ? _config$appTypes$edit : 'editor', | |
| 428 | + window_name: (_config$appTypes$edit2 = config === null || config === void 0 || (_config$appTypes4 = config.appTypes) === null || _config$appTypes4 === void 0 ? void 0 : _config$appTypes4.editor) !== null && _config$appTypes$edit2 !== void 0 ? _config$appTypes$edit2 : 'editor' | |
| 429 | + }, overrides); | |
| 430 | + } | |
| 431 | + }, { | |
| 432 | + key: "sendTopBarPublishDropdown", | |
| 433 | + value: function sendTopBarPublishDropdown(targetName) { | |
| 434 | + var _config$names, _config$triggers, _config$targetTypes, _config$interactionRe, _config$locations3, _config$secondaryLoca, _config$targetTypes2; | |
| 435 | + var config = this.getConfig(); | |
| 436 | + return this.dispatchEvent(config === null || config === void 0 || (_config$names = config.names) === null || _config$names === void 0 || (_config$names = _config$names.editorOne) === null || _config$names === void 0 ? void 0 : _config$names.topBarPublishDropdown, this.createBasePayload({ | |
| 437 | + interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers = config.triggers) === null || _config$triggers === void 0 ? void 0 : _config$triggers.click), | |
| 438 | + target_type: config === null || config === void 0 || (_config$targetTypes = config.targetTypes) === null || _config$targetTypes === void 0 ? void 0 : _config$targetTypes.dropdownItem, | |
| 439 | + target_name: targetName, | |
| 440 | + interaction_result: config === null || config === void 0 || (_config$interactionRe = config.interactionResults) === null || _config$interactionRe === void 0 ? void 0 : _config$interactionRe.actionSelected, | |
| 441 | + target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations3 = config.locations) === null || _config$locations3 === void 0 ? void 0 : _config$locations3.topBar), | |
| 442 | + location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca = config.secondaryLocations) === null || _config$secondaryLoca === void 0 ? void 0 : _config$secondaryLoca.publishDropdown), | |
| 443 | + location_l2: config === null || config === void 0 || (_config$targetTypes2 = config.targetTypes) === null || _config$targetTypes2 === void 0 ? void 0 : _config$targetTypes2.dropdownItem, | |
| 444 | + interaction_description: 'User selected an action from the publish dropdown' | |
| 445 | + })); | |
| 446 | + } | |
| 447 | + }, { | |
| 448 | + key: "sendTopBarPageList", | |
| 449 | + value: function sendTopBarPageList(targetName) { | |
| 450 | + var _config$names2, _config$triggers2, _config$targetTypes3, _config$interactionRe2, _config$interactionRe3, _config$locations4, _config$secondaryLoca2, _config$targetTypes4; | |
| 451 | + var isCreate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; | |
| 452 | + var config = this.getConfig(); | |
| 453 | + return this.dispatchEvent(config === null || config === void 0 || (_config$names2 = config.names) === null || _config$names2 === void 0 || (_config$names2 = _config$names2.editorOne) === null || _config$names2 === void 0 ? void 0 : _config$names2.topBarPageList, this.createBasePayload({ | |
| 454 | + interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers2 = config.triggers) === null || _config$triggers2 === void 0 ? void 0 : _config$triggers2.click), | |
| 455 | + target_type: config === null || config === void 0 || (_config$targetTypes3 = config.targetTypes) === null || _config$targetTypes3 === void 0 ? void 0 : _config$targetTypes3.dropdownItem, | |
| 456 | + target_name: targetName, | |
| 457 | + interaction_result: isCreate ? config === null || config === void 0 || (_config$interactionRe2 = config.interactionResults) === null || _config$interactionRe2 === void 0 ? void 0 : _config$interactionRe2.create : config === null || config === void 0 || (_config$interactionRe3 = config.interactionResults) === null || _config$interactionRe3 === void 0 ? void 0 : _config$interactionRe3.navigate, | |
| 458 | + target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations4 = config.locations) === null || _config$locations4 === void 0 ? void 0 : _config$locations4.topBar), | |
| 459 | + location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca2 = config.secondaryLocations) === null || _config$secondaryLoca2 === void 0 ? void 0 : _config$secondaryLoca2.pageListDropdown), | |
| 460 | + location_l2: config === null || config === void 0 || (_config$targetTypes4 = config.targetTypes) === null || _config$targetTypes4 === void 0 ? void 0 : _config$targetTypes4.dropdownItem, | |
| 461 | + interaction_description: 'User selected an action from the page list dropdown' | |
| 462 | + })); | |
| 463 | + } | |
| 464 | + }, { | |
| 465 | + key: "sendSiteSettingsSession", | |
| 466 | + value: function sendSiteSettingsSession(_ref) { | |
| 467 | + var _config$names3, _config$triggers3, _config$interactionRe4, _config$locations5, _config$secondaryLoca3; | |
| 468 | + var targetType = _ref.targetType, | |
| 469 | + _ref$visitedItems = _ref.visitedItems, | |
| 470 | + visitedItems = _ref$visitedItems === void 0 ? [] : _ref$visitedItems, | |
| 471 | + _ref$savedItems = _ref.savedItems, | |
| 472 | + savedItems = _ref$savedItems === void 0 ? [] : _ref$savedItems, | |
| 473 | + state = _ref.state; | |
| 474 | + var config = this.getConfig(); | |
| 475 | + return this.dispatchEvent(config === null || config === void 0 || (_config$names3 = config.names) === null || _config$names3 === void 0 || (_config$names3 = _config$names3.editorOne) === null || _config$names3 === void 0 ? void 0 : _config$names3.siteSettingsSession, this.createBasePayload({ | |
| 476 | + interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers3 = config.triggers) === null || _config$triggers3 === void 0 ? void 0 : _config$triggers3.click), | |
| 477 | + target_type: targetType, | |
| 478 | + target_name: 'site_settings', | |
| 479 | + interaction_result: config === null || config === void 0 || (_config$interactionRe4 = config.interactionResults) === null || _config$interactionRe4 === void 0 ? void 0 : _config$interactionRe4.sessionEnd, | |
| 480 | + target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations5 = config.locations) === null || _config$locations5 === void 0 ? void 0 : _config$locations5.leftPanel), | |
| 481 | + location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca3 = config.secondaryLocations) === null || _config$secondaryLoca3 === void 0 ? void 0 : _config$secondaryLoca3.siteSettings), | |
| 482 | + interaction_description: 'Records areas visited as part of the site setting session', | |
| 483 | + metadata: { | |
| 484 | + visited_items: visitedItems, | |
| 485 | + saved_items: savedItems | |
| 486 | + }, | |
| 487 | + state: state | |
| 488 | + })); | |
| 489 | + } | |
| 490 | + }, { | |
| 491 | + key: "sendELibraryNav", | |
| 492 | + value: function sendELibraryNav(tabName) { | |
| 493 | + var _config$names4, _config$triggers4, _config$targetTypes5, _config$interactionRe5, _config$locations6, _config$secondaryLoca4; | |
| 494 | + var config = this.getConfig(); | |
| 495 | + return this.dispatchEvent(config === null || config === void 0 || (_config$names4 = config.names) === null || _config$names4 === void 0 || (_config$names4 = _config$names4.editorOne) === null || _config$names4 === void 0 ? void 0 : _config$names4.eLibraryNav, this.createBasePayload({ | |
| 496 | + interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers4 = config.triggers) === null || _config$triggers4 === void 0 ? void 0 : _config$triggers4.tabSelect), | |
| 497 | + target_type: config === null || config === void 0 || (_config$targetTypes5 = config.targetTypes) === null || _config$targetTypes5 === void 0 ? void 0 : _config$targetTypes5.tab, | |
| 498 | + target_name: this.toLowerSnake(tabName), | |
| 499 | + interaction_result: config === null || config === void 0 || (_config$interactionRe5 = config.interactionResults) === null || _config$interactionRe5 === void 0 ? void 0 : _config$interactionRe5.tabChanged, | |
| 500 | + target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations6 = config.locations) === null || _config$locations6 === void 0 ? void 0 : _config$locations6.elementorLibrary), | |
| 501 | + location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca4 = config.secondaryLocations) === null || _config$secondaryLoca4 === void 0 ? void 0 : _config$secondaryLoca4.libraryTabs), | |
| 502 | + interaction_description: 'User navigates within elementor library' | |
| 503 | + })); | |
| 504 | + } | |
| 505 | + }, { | |
| 506 | + key: "sendELibraryInsert", | |
| 507 | + value: function sendELibraryInsert(_ref2) { | |
| 508 | + var _config$triggers5, _config$targetTypes6, _config$interactionRe6, _config$locations7, _config$secondaryLoca5, _config$names5; | |
| 509 | + var assetId = _ref2.assetId, | |
| 510 | + assetName = _ref2.assetName, | |
| 511 | + libraryType = _ref2.libraryType, | |
| 512 | + _ref2$proRequired = _ref2.proRequired, | |
| 513 | + proRequired = _ref2$proRequired === void 0 ? false : _ref2$proRequired; | |
| 514 | + var config = this.getConfig(); | |
| 515 | + var payload = this.createBasePayload({ | |
| 516 | + interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers5 = config.triggers) === null || _config$triggers5 === void 0 ? void 0 : _config$triggers5.insert), | |
| 517 | + target_type: config === null || config === void 0 || (_config$targetTypes6 = config.targetTypes) === null || _config$targetTypes6 === void 0 ? void 0 : _config$targetTypes6.button, | |
| 518 | + target_name: String(assetId), | |
| 519 | + interaction_result: config === null || config === void 0 || (_config$interactionRe6 = config.interactionResults) === null || _config$interactionRe6 === void 0 ? void 0 : _config$interactionRe6.assetInserted, | |
| 520 | + target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations7 = config.locations) === null || _config$locations7 === void 0 ? void 0 : _config$locations7.elementorLibrary), | |
| 521 | + location_l1: this.toLowerSnake(libraryType), | |
| 522 | + location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca5 = config.secondaryLocations) === null || _config$secondaryLoca5 === void 0 ? void 0 : _config$secondaryLoca5.assetCard), | |
| 523 | + interaction_description: 'User inserts block/pages from elementor library', | |
| 524 | + metadata: { | |
| 525 | + template_id: String(assetId), | |
| 526 | + template_name: this.decodeHtmlEntities(assetName) || '' | |
| 527 | + } | |
| 528 | + }); | |
| 529 | + if (proRequired) { | |
| 530 | + payload.state = 'pro_plan_required'; | |
| 531 | + } | |
| 532 | + return this.dispatchEvent(config === null || config === void 0 || (_config$names5 = config.names) === null || _config$names5 === void 0 || (_config$names5 = _config$names5.editorOne) === null || _config$names5 === void 0 ? void 0 : _config$names5.eLibraryInsert, payload); | |
| 533 | + } | |
| 534 | + }, { | |
| 535 | + key: "sendELibraryFavorite", | |
| 536 | + value: function sendELibraryFavorite(_ref3) { | |
| 537 | + var _config$triggers6, _config$targetTypes7, _config$interactionRe7, _config$locations8, _config$secondaryLoca6, _config$names6; | |
| 538 | + var assetId = _ref3.assetId, | |
| 539 | + assetName = _ref3.assetName, | |
| 540 | + libraryType = _ref3.libraryType, | |
| 541 | + isFavorite = _ref3.isFavorite, | |
| 542 | + _ref3$proRequired = _ref3.proRequired, | |
| 543 | + proRequired = _ref3$proRequired === void 0 ? false : _ref3$proRequired; | |
| 544 | + var config = this.getConfig(); | |
| 545 | + var payload = this.createBasePayload({ | |
| 546 | + interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers6 = config.triggers) === null || _config$triggers6 === void 0 ? void 0 : _config$triggers6.click), | |
| 547 | + target_type: config === null || config === void 0 || (_config$targetTypes7 = config.targetTypes) === null || _config$targetTypes7 === void 0 ? void 0 : _config$targetTypes7.toggle, | |
| 548 | + target_name: String(assetId), | |
| 549 | + interaction_result: config === null || config === void 0 || (_config$interactionRe7 = config.interactionResults) === null || _config$interactionRe7 === void 0 ? void 0 : _config$interactionRe7.assetFavorite, | |
| 550 | + target_value: Boolean(isFavorite), | |
| 551 | + target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations8 = config.locations) === null || _config$locations8 === void 0 ? void 0 : _config$locations8.elementorLibrary), | |
| 552 | + location_l1: this.toLowerSnake(libraryType), | |
| 553 | + location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca6 = config.secondaryLocations) === null || _config$secondaryLoca6 === void 0 ? void 0 : _config$secondaryLoca6.assetCard), | |
| 554 | + interaction_description: 'User favorite block/pages from elementor library', | |
| 555 | + metadata: { | |
| 556 | + template_id: String(assetId), | |
| 557 | + template_name: this.decodeHtmlEntities(assetName) || '' | |
| 558 | + } | |
| 559 | + }); | |
| 560 | + if (proRequired) { | |
| 561 | + payload.state = 'pro_plan_required'; | |
| 562 | + } | |
| 563 | + return this.dispatchEvent(config === null || config === void 0 || (_config$names6 = config.names) === null || _config$names6 === void 0 || (_config$names6 = _config$names6.editorOne) === null || _config$names6 === void 0 ? void 0 : _config$names6.eLibraryFavorite, payload); | |
| 564 | + } | |
| 565 | + }, { | |
| 566 | + key: "sendELibraryGenerateAi", | |
| 567 | + value: function sendELibraryGenerateAi(_ref4) { | |
| 568 | + var _config$names7, _config$triggers7, _config$targetTypes8, _config$interactionRe8, _config$locations9, _config$secondaryLoca7; | |
| 569 | + var assetId = _ref4.assetId, | |
| 570 | + assetName = _ref4.assetName, | |
| 571 | + libraryType = _ref4.libraryType; | |
| 572 | + var config = this.getConfig(); | |
| 573 | + return this.dispatchEvent(config === null || config === void 0 || (_config$names7 = config.names) === null || _config$names7 === void 0 || (_config$names7 = _config$names7.editorOne) === null || _config$names7 === void 0 ? void 0 : _config$names7.eLibraryGenerateAi, this.createBasePayload({ | |
| 574 | + interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers7 = config.triggers) === null || _config$triggers7 === void 0 ? void 0 : _config$triggers7.click), | |
| 575 | + target_type: config === null || config === void 0 || (_config$targetTypes8 = config.targetTypes) === null || _config$targetTypes8 === void 0 ? void 0 : _config$targetTypes8.button, | |
| 576 | + target_name: String(assetId), | |
| 577 | + interaction_result: config === null || config === void 0 || (_config$interactionRe8 = config.interactionResults) === null || _config$interactionRe8 === void 0 ? void 0 : _config$interactionRe8.aiGenerate, | |
| 578 | + target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations9 = config.locations) === null || _config$locations9 === void 0 ? void 0 : _config$locations9.elementorLibrary), | |
| 579 | + location_l1: this.toLowerSnake(libraryType), | |
| 580 | + location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca7 = config.secondaryLocations) === null || _config$secondaryLoca7 === void 0 ? void 0 : _config$secondaryLoca7.assetCard), | |
| 581 | + interaction_description: 'User generated block/page based on a library asset', | |
| 582 | + metadata: { | |
| 583 | + template_id: String(assetId), | |
| 584 | + template_name: this.decodeHtmlEntities(assetName) || '' | |
| 585 | + } | |
| 586 | + })); | |
| 587 | + } | |
| 588 | + }, { | |
| 589 | + key: "sendFinderSearchInput", | |
| 590 | + value: function sendFinderSearchInput(_ref5) { | |
| 591 | + var _config$triggers8, _config$targetTypes9, _config$interactionRe9, _config$interactionRe0, _config$secondaryLoca8, _config$names8; | |
| 592 | + var resultsCount = _ref5.resultsCount, | |
| 593 | + _ref5$searchTerm = _ref5.searchTerm, | |
| 594 | + searchTerm = _ref5$searchTerm === void 0 ? null : _ref5$searchTerm; | |
| 595 | + var config = this.getConfig(); | |
| 596 | + var hasResults = resultsCount > 0; | |
| 597 | + var finderContext = this.getFinderContext(); | |
| 598 | + var payload = this.createBasePayload({ | |
| 599 | + window_name: finderContext.windowName, | |
| 600 | + interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers8 = config.triggers) === null || _config$triggers8 === void 0 ? void 0 : _config$triggers8.typing), | |
| 601 | + target_type: config === null || config === void 0 || (_config$targetTypes9 = config.targetTypes) === null || _config$targetTypes9 === void 0 ? void 0 : _config$targetTypes9.searchInput, | |
| 602 | + target_name: 'finder', | |
| 603 | + interaction_result: hasResults ? config === null || config === void 0 || (_config$interactionRe9 = config.interactionResults) === null || _config$interactionRe9 === void 0 ? void 0 : _config$interactionRe9.resultsUpdated : config === null || config === void 0 || (_config$interactionRe0 = config.interactionResults) === null || _config$interactionRe0 === void 0 ? void 0 : _config$interactionRe0.noResults, | |
| 604 | + target_location: finderContext.targetLocation, | |
| 605 | + location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca8 = config.secondaryLocations) === null || _config$secondaryLoca8 === void 0 ? void 0 : _config$secondaryLoca8.finder), | |
| 606 | + interaction_description: 'Finder search input, follows debounce behavior', | |
| 607 | + metadata: { | |
| 608 | + results_count: resultsCount | |
| 609 | + } | |
| 610 | + }); | |
| 611 | + if (!hasResults && searchTerm) { | |
| 612 | + payload.metadata.search_term = searchTerm; | |
| 613 | + } | |
| 614 | + return this.dispatchEvent(config === null || config === void 0 || (_config$names8 = config.names) === null || _config$names8 === void 0 || (_config$names8 = _config$names8.editorOne) === null || _config$names8 === void 0 ? void 0 : _config$names8.finderSearchInput, payload); | |
| 615 | + } | |
| 616 | + }, { | |
| 617 | + key: "sendFinderResultSelect", | |
| 618 | + value: function sendFinderResultSelect(choice) { | |
| 619 | + var _config$names9, _config$triggers9, _config$targetTypes0, _config$interactionRe1, _config$secondaryLoca9, _config$secondaryLoca0; | |
| 620 | + var config = this.getConfig(); | |
| 621 | + var finderContext = this.getFinderContext(); | |
| 622 | + return this.dispatchEvent(config === null || config === void 0 || (_config$names9 = config.names) === null || _config$names9 === void 0 || (_config$names9 = _config$names9.editorOne) === null || _config$names9 === void 0 ? void 0 : _config$names9.finderResultSelect, this.createBasePayload({ | |
| 623 | + window_name: finderContext.windowName, | |
| 624 | + interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers9 = config.triggers) === null || _config$triggers9 === void 0 ? void 0 : _config$triggers9.click), | |
| 625 | + target_type: config === null || config === void 0 || (_config$targetTypes0 = config.targetTypes) === null || _config$targetTypes0 === void 0 ? void 0 : _config$targetTypes0.searchResult, | |
| 626 | + target_name: choice, | |
| 627 | + interaction_result: config === null || config === void 0 || (_config$interactionRe1 = config.interactionResults) === null || _config$interactionRe1 === void 0 ? void 0 : _config$interactionRe1.selected, | |
| 628 | + target_location: finderContext.targetLocation, | |
| 629 | + location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca9 = config.secondaryLocations) === null || _config$secondaryLoca9 === void 0 ? void 0 : _config$secondaryLoca9.finder), | |
| 630 | + location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca0 = config.secondaryLocations) === null || _config$secondaryLoca0 === void 0 ? void 0 : _config$secondaryLoca0.finderResults), | |
| 631 | + interaction_description: 'Finder search results was selected' | |
| 632 | + })); | |
| 633 | + } | |
| 634 | + }, { | |
| 635 | + key: "sendCanvasEmptyBoxAction", | |
| 636 | + value: function sendCanvasEmptyBoxAction(_ref6) { | |
| 637 | + var _config$triggers0, _config$targetTypes1, _config$interactionRe10, _config$locations0, _config$secondaryLoca1, _config$names0; | |
| 638 | + var targetName = _ref6.targetName, | |
| 639 | + _ref6$metadata = _ref6.metadata, | |
| 640 | + metadata = _ref6$metadata === void 0 ? {} : _ref6$metadata, | |
| 641 | + _ref6$containerCreate = _ref6.containerCreated, | |
| 642 | + containerCreated = _ref6$containerCreate === void 0 ? null : _ref6$containerCreate; | |
| 643 | + var config = this.getConfig(); | |
| 644 | + var payload = this.createBasePayload({ | |
| 645 | + interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers0 = config.triggers) === null || _config$triggers0 === void 0 ? void 0 : _config$triggers0.click), | |
| 646 | + target_type: config === null || config === void 0 || (_config$targetTypes1 = config.targetTypes) === null || _config$targetTypes1 === void 0 ? void 0 : _config$targetTypes1.buttons, | |
| 647 | + target_name: targetName, | |
| 648 | + interaction_result: config === null || config === void 0 || (_config$interactionRe10 = config.interactionResults) === null || _config$interactionRe10 === void 0 ? void 0 : _config$interactionRe10.selected, | |
| 649 | + target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations0 = config.locations) === null || _config$locations0 === void 0 ? void 0 : _config$locations0.canvas), | |
| 650 | + location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca1 = config.secondaryLocations) === null || _config$secondaryLoca1 === void 0 ? void 0 : _config$secondaryLoca1.emptyBox), | |
| 651 | + interaction_description: 'Empty box on canvas actions' | |
| 652 | + }); | |
| 653 | + if (Object.keys(metadata).length > 0) { | |
| 654 | + payload.metadata = metadata; | |
| 655 | + } | |
| 656 | + if (containerCreated !== null) { | |
| 657 | + payload.state = containerCreated; | |
| 658 | + } | |
| 659 | + return this.dispatchEvent(config === null || config === void 0 || (_config$names0 = config.names) === null || _config$names0 === void 0 || (_config$names0 = _config$names0.editorOne) === null || _config$names0 === void 0 ? void 0 : _config$names0.canvasEmptyBoxAction, payload); | |
| 660 | + } | |
| 661 | + }, { | |
| 662 | + key: "sendWidgetPanelSearch", | |
| 663 | + value: function sendWidgetPanelSearch(_ref7) { | |
| 664 | + var _config$triggers1, _config$targetTypes10, _config$interactionRe11, _config$interactionRe12, _config$locations1, _config$locations10, _config$secondaryLoca10, _config$names1; | |
| 665 | + var resultsCount = _ref7.resultsCount, | |
| 666 | + _ref7$userInput = _ref7.userInput, | |
| 667 | + userInput = _ref7$userInput === void 0 ? null : _ref7$userInput; | |
| 668 | + var config = this.getConfig(); | |
| 669 | + var hasResults = resultsCount > 0; | |
| 670 | + var payload = this.createBasePayload({ | |
| 671 | + interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers1 = config.triggers) === null || _config$triggers1 === void 0 ? void 0 : _config$triggers1.typing), | |
| 672 | + target_type: config === null || config === void 0 || (_config$targetTypes10 = config.targetTypes) === null || _config$targetTypes10 === void 0 ? void 0 : _config$targetTypes10.searchWidget, | |
| 673 | + target_name: 'search_widget', | |
| 674 | + interaction_result: hasResults ? config === null || config === void 0 || (_config$interactionRe11 = config.interactionResults) === null || _config$interactionRe11 === void 0 ? void 0 : _config$interactionRe11.resultsUpdated : config === null || config === void 0 || (_config$interactionRe12 = config.interactionResults) === null || _config$interactionRe12 === void 0 ? void 0 : _config$interactionRe12.noResults, | |
| 675 | + target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations1 = config.locations) === null || _config$locations1 === void 0 ? void 0 : _config$locations1.leftPanel), | |
| 676 | + location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$locations10 = config.locations) === null || _config$locations10 === void 0 ? void 0 : _config$locations10.widgetPanel), | |
| 677 | + location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca10 = config.secondaryLocations) === null || _config$secondaryLoca10 === void 0 ? void 0 : _config$secondaryLoca10.searchBar), | |
| 678 | + interaction_description: 'Widget search input, follows debounce behavior' | |
| 679 | + }); | |
| 680 | + if (!hasResults && userInput) { | |
| 681 | + payload.metadata = { | |
| 682 | + user_input: userInput | |
| 683 | + }; | |
| 684 | + } | |
| 685 | + return this.dispatchEvent(config === null || config === void 0 || (_config$names1 = config.names) === null || _config$names1 === void 0 || (_config$names1 = _config$names1.editorOne) === null || _config$names1 === void 0 ? void 0 : _config$names1.widgetPanelSearch, payload); | |
| 686 | + } | |
| 687 | + }]); | |
| 688 | +}(); | |
| 689 | +var createDebouncedFinderSearch = exports.createDebouncedFinderSearch = function createDebouncedFinderSearch() { | |
| 690 | + var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 300; | |
| 691 | + return _.debounce(function (resultsCount, searchTerm) { | |
| 692 | + EditorOneEventManager.sendFinderSearchInput({ | |
| 693 | + resultsCount: resultsCount, | |
| 694 | + searchTerm: searchTerm | |
| 695 | + }); | |
| 696 | + }, delay); | |
| 697 | +}; | |
| 698 | +var createDebouncedWidgetPanelSearch = exports.createDebouncedWidgetPanelSearch = function createDebouncedWidgetPanelSearch() { | |
| 699 | + var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2000; | |
| 700 | + return _.debounce(function (resultsCount, userInput) { | |
| 701 | + EditorOneEventManager.sendWidgetPanelSearch({ | |
| 702 | + resultsCount: resultsCount, | |
| 703 | + userInput: userInput | |
| 704 | + }); | |
| 705 | + }, delay); | |
| 706 | +}; | |
| 707 | +var _default = exports["default"] = EditorOneEventManager; | |
| 452 | 708 | |
| 453 | -//#endregion | |
| 454 | -//#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js | |
| 455 | - function _arrayLikeToArray(r, a) { | |
| 456 | - (null == a || a > r.length) && (a = r.length); | |
| 457 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 458 | - return n; | |
| 459 | - } | |
| 709 | +/***/ }), | |
| 460 | 710 | |
| 461 | -//#endregion | |
| 462 | -//#region node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js | |
| 463 | - function _unsupportedIterableToArray(r, a) { | |
| 464 | - if (r) { | |
| 465 | - if ("string" == typeof r) return _arrayLikeToArray(r, a); | |
| 466 | - var t = {}.toString.call(r).slice(8, -1); | |
| 467 | - 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; | |
| 468 | - } | |
| 469 | - } | |
| 711 | +/***/ "../assets/dev/js/editor/utils/element-types.js": | |
| 712 | +/*!******************************************************!*\ | |
| 713 | + !*** ../assets/dev/js/editor/utils/element-types.js ***! | |
| 714 | + \******************************************************/ | |
| 715 | +/***/ ((module) => { | |
| 470 | 716 | |
| 471 | -//#endregion | |
| 472 | -//#region node_modules/@babel/runtime/helpers/esm/nonIterableRest.js | |
| 473 | - function _nonIterableRest() { | |
| 474 | - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 475 | - } | |
| 717 | +"use strict"; | |
| 476 | 718 | |
| 477 | -//#endregion | |
| 478 | -//#region node_modules/@babel/runtime/helpers/esm/slicedToArray.js | |
| 479 | - function _slicedToArray(r, e) { | |
| 480 | - return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); | |
| 481 | - } | |
| 482 | 719 | |
| 483 | -//#endregion | |
| 484 | -//#region node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js | |
| 485 | - function _arrayWithoutHoles(r) { | |
| 486 | - if (Array.isArray(r)) return _arrayLikeToArray(r); | |
| 487 | - } | |
| 720 | +/** | |
| 721 | + * Returns an array of all available element types. | |
| 722 | + * | |
| 723 | + * @return {string[]} Array of element type strings. | |
| 724 | + */ | |
| 725 | +var getAllElementTypes = function getAllElementTypes() { | |
| 726 | + return Object.keys(elementor.getConfig().elements); | |
| 727 | +}; | |
| 728 | +module.exports = { | |
| 729 | + getAllElementTypes: getAllElementTypes | |
| 730 | +}; | |
| 488 | 731 | |
| 489 | -//#endregion | |
| 490 | -//#region node_modules/@babel/runtime/helpers/esm/iterableToArray.js | |
| 491 | - function _iterableToArray(r) { | |
| 492 | - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 493 | - } | |
| 732 | +/***/ }), | |
| 494 | 733 | |
| 495 | -//#endregion | |
| 496 | -//#region node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js | |
| 497 | - function _nonIterableSpread() { | |
| 498 | - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 499 | - } | |
| 734 | +/***/ "../assets/dev/js/utils/react.js": | |
| 735 | +/*!***************************************!*\ | |
| 736 | + !*** ../assets/dev/js/utils/react.js ***! | |
| 737 | + \***************************************/ | |
| 738 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 500 | 739 | |
| 501 | -//#endregion | |
| 502 | -//#region node_modules/@babel/runtime/helpers/esm/toConsumableArray.js | |
| 503 | - function _toConsumableArray(r) { | |
| 504 | - return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); | |
| 505 | - } | |
| 740 | +"use strict"; | |
| 506 | 741 | |
| 507 | -//#endregion | |
| 508 | -//#region modules/atomic-widgets/assets/js/editor/utils/get-element-children.js | |
| 509 | - function getElementChildren(model) { | |
| 510 | - var _model$get$models; | |
| 511 | - var _model$get; | |
| 512 | - if (!model) return []; | |
| 513 | - var children = ((_model$get$models = (_model$get = model.get("elements")) === null || _model$get === void 0 ? void 0 : _model$get.models) !== null && _model$get$models !== void 0 ? _model$get$models : []).flatMap(getElementChildren); | |
| 514 | - return [model].concat(_toConsumableArray(children)); | |
| 515 | - } | |
| 516 | 742 | |
| 517 | -//#endregion | |
| 518 | -//#region modules/atomic-widgets/assets/js/editor/utils/get-random-style-id.js | |
| 743 | +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 744 | +Object.defineProperty(exports, "__esModule", ({ | |
| 745 | + value: true | |
| 746 | +})); | |
| 747 | +exports["default"] = void 0; | |
| 748 | +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); | |
| 749 | +var ReactDOM = _interopRequireWildcard(__webpack_require__(/*! react-dom */ "react-dom")); | |
| 750 | +var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js"); | |
| 751 | +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 519 | 752 | /** |
| 520 | - * @typedef {import('elementor/assets/dev/js/editor/container/container')} Container | |
| 521 | - */ | |
| 522 | - /** | |
| 523 | - * @param {Container} container | |
| 524 | - * @param {Object} existingStyleIds | |
| 525 | - * @return {string} | |
| 526 | - */ | |
| 527 | - function getRandomStyleId(container) { | |
| 528 | - var existingStyleIds = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; | |
| 529 | - var id; | |
| 530 | - do | |
| 531 | - id = "e-".concat(container.id, "-").concat(elementorCommon.helpers.getUniqueId()); | |
| 532 | - while (existingStyleIds.hasOwnProperty(id)); | |
| 533 | - return id; | |
| 534 | - } | |
| 753 | + * Support conditional rendering of a React App to the DOM, based on the React version. | |
| 754 | + * We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions. | |
| 755 | + * | |
| 756 | + * @param { React.ReactElement } app The app to render. | |
| 757 | + * @param { HTMLElement } domElement The DOM element to render the app into. | |
| 758 | + * | |
| 759 | + * @return {{ unmount: () => void }} The unmount function. | |
| 760 | + */ | |
| 761 | +function render(app, domElement) { | |
| 762 | + var unmountFunction; | |
| 763 | + try { | |
| 764 | + var root = (0, _client.createRoot)(domElement); | |
| 765 | + root.render(app); | |
| 766 | + unmountFunction = function unmountFunction() { | |
| 767 | + root.unmount(); | |
| 768 | + }; | |
| 769 | + } catch (e) { | |
| 770 | + // eslint-disable-next-line react/no-deprecated | |
| 771 | + ReactDOM.render(app, domElement); | |
| 772 | + unmountFunction = function unmountFunction() { | |
| 773 | + // eslint-disable-next-line react/no-deprecated | |
| 774 | + ReactDOM.unmountComponentAtNode(domElement); | |
| 775 | + }; | |
| 776 | + } | |
| 777 | + return { | |
| 778 | + unmount: unmountFunction | |
| 779 | + }; | |
| 780 | +} | |
| 781 | +var _default = exports["default"] = { | |
| 782 | + render: render | |
| 783 | +}; | |
| 535 | 784 | |
| 536 | -//#endregion | |
| 537 | -//#region modules/atomic-widgets/assets/js/editor/utils/regenerate-local-style-ids.js | |
| 538 | - init_defineProperty(); | |
| 539 | - function ownKeys$2(e, r) { | |
| 540 | - var t = Object.keys(e); | |
| 541 | - if (Object.getOwnPropertySymbols) { | |
| 542 | - var o = Object.getOwnPropertySymbols(e); | |
| 543 | - r && (o = o.filter(function(r) { | |
| 544 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 545 | - })), t.push.apply(t, o); | |
| 546 | - } | |
| 547 | - return t; | |
| 548 | - } | |
| 549 | - __name(ownKeys$2, "ownKeys"); | |
| 550 | - function _objectSpread$2(e) { | |
| 551 | - for (var r = 1; r < arguments.length; r++) { | |
| 552 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 553 | - r % 2 ? ownKeys$2(Object(t), !0).forEach(function(r) { | |
| 554 | - _defineProperty(e, r, t[r]); | |
| 555 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function(r) { | |
| 556 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 557 | - }); | |
| 558 | - } | |
| 559 | - return e; | |
| 560 | - } | |
| 561 | - __name(_objectSpread$2, "_objectSpread"); | |
| 562 | - function regenerateLocalStyleIds(container) { | |
| 563 | - if (!(container !== null && container !== void 0 && container.model)) return; | |
| 564 | - updateElementsStyleIdsInsideOut(getElementChildren(container.model).filter(function(model) { | |
| 565 | - var _model$get; | |
| 566 | - return model && Object.keys((_model$get = model.get("styles")) !== null && _model$get !== void 0 ? _model$get : {}).length > 0; | |
| 567 | - })); | |
| 568 | - } | |
| 569 | - function isClassesProp(prop) { | |
| 570 | - return prop.$$type && "classes" === prop.$$type && Array.isArray(prop.value) && prop.value.length > 0; | |
| 571 | - } | |
| 572 | - function calculateNewStylesAndSettings(element, model, settings) { | |
| 573 | - var _settings$toJSON; | |
| 574 | - var originalStyles = model.get("styles"); | |
| 575 | - var settingsJson = (_settings$toJSON = settings === null || settings === void 0 ? void 0 : settings.toJSON()) !== null && _settings$toJSON !== void 0 ? _settings$toJSON : {}; | |
| 576 | - var classesProps = Object.entries(settingsJson).filter(function(_ref) { | |
| 577 | - var propValue = _slicedToArray(_ref, 2)[1]; | |
| 578 | - return isClassesProp(propValue); | |
| 579 | - }); | |
| 580 | - var newStyles = {}; | |
| 581 | - var changedIds = {}; | |
| 582 | - Object.entries(originalStyles).forEach(function(_ref3) { | |
| 583 | - var _ref4 = _slicedToArray(_ref3, 2); | |
| 584 | - var originalStyleId = _ref4[0]; | |
| 585 | - var style = _ref4[1]; | |
| 586 | - var newStyleId = getRandomStyleId(element, newStyles); | |
| 587 | - newStyles[newStyleId] = structuredClone(_objectSpread$2(_objectSpread$2({}, style), {}, { id: newStyleId })); | |
| 588 | - changedIds[originalStyleId] = newStyleId; | |
| 589 | - }); | |
| 590 | - var newClassesProps = classesProps.map(function(_ref5) { | |
| 591 | - var _ref6 = _slicedToArray(_ref5, 2); | |
| 592 | - var key = _ref6[0]; | |
| 593 | - var value = _ref6[1]; | |
| 594 | - return [key, _objectSpread$2(_objectSpread$2({}, value), {}, { value: value.value.map(function(className) { | |
| 595 | - var _changedIds$className; | |
| 596 | - return (_changedIds$className = changedIds[className]) !== null && _changedIds$className !== void 0 ? _changedIds$className : className; | |
| 597 | - }) })]; | |
| 598 | - }, {}); | |
| 599 | - return { | |
| 600 | - newStyles, | |
| 601 | - newSettings: Object.fromEntries(newClassesProps) | |
| 602 | - }; | |
| 603 | - } | |
| 604 | - function updateStyleIdForContainer(container) { | |
| 605 | - var model = container.model; | |
| 606 | - var settings = container.settings; | |
| 607 | - var _calculateNewStylesAn = calculateNewStylesAndSettings(container, model, settings); | |
| 608 | - var newStyles = _calculateNewStylesAn.newStyles; | |
| 609 | - var newSettings = _calculateNewStylesAn.newSettings; | |
| 610 | - $e.internal("document/elements/set-settings", { | |
| 611 | - container, | |
| 612 | - settings: newSettings | |
| 613 | - }); | |
| 614 | - model.set("styles", newStyles); | |
| 615 | - } | |
| 616 | - function updateStyleIdForModel(model) { | |
| 617 | - var settings = model.get("settings"); | |
| 618 | - var _calculateNewStylesAn2 = calculateNewStylesAndSettings(model, model, settings); | |
| 619 | - var newStyles = _calculateNewStylesAn2.newStyles; | |
| 620 | - var newSettings = _calculateNewStylesAn2.newSettings; | |
| 621 | - settings.set(newSettings); | |
| 622 | - model.set("styles", newStyles); | |
| 623 | - } | |
| 624 | - function updateStyleId(model) { | |
| 625 | - var container = window.elementor.getContainer(model.get("id")); | |
| 626 | - if (container) { | |
| 627 | - updateStyleIdForContainer(container); | |
| 628 | - return; | |
| 629 | - } | |
| 630 | - updateStyleIdForModel(model); | |
| 631 | - } | |
| 632 | - function updateElementsStyleIdsInsideOut(styledElements) { | |
| 633 | - styledElements === null || styledElements === void 0 || styledElements.reverse().forEach(updateStyleId); | |
| 634 | - } | |
| 785 | +/***/ }), | |
| 635 | 786 | |
| 636 | -//#endregion | |
| 637 | -//#region modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/duplicate-element.js | |
| 638 | - function _callSuper$6(t, o, e) { | |
| 639 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$6() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 640 | - } | |
| 641 | - __name(_callSuper$6, "_callSuper"); | |
| 642 | - function _isNativeReflectConstruct$6() { | |
| 643 | - try { | |
| 644 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 645 | - } catch (t) {} | |
| 646 | - return (_isNativeReflectConstruct$6 = function _isNativeReflectConstruct() { | |
| 647 | - return !!t; | |
| 648 | - })(); | |
| 649 | - } | |
| 650 | - __name(_isNativeReflectConstruct$6, "_isNativeReflectConstruct"); | |
| 651 | - var DuplicateElement$1 = /*#__PURE__*/ function(_$e$modules$hookData$) { | |
| 652 | - function DuplicateElement() { | |
| 653 | - _classCallCheck(this, DuplicateElement); | |
| 654 | - return _callSuper$6(this, DuplicateElement, arguments); | |
| 655 | - } | |
| 656 | - _inherits(DuplicateElement, _$e$modules$hookData$); | |
| 657 | - return _createClass(DuplicateElement, [ | |
| 658 | - { | |
| 659 | - key: "getCommand", | |
| 660 | - value: function getCommand() { | |
| 661 | - return "document/elements/duplicate"; | |
| 662 | - } | |
| 663 | - }, | |
| 664 | - { | |
| 665 | - key: "getId", | |
| 666 | - value: function getId() { | |
| 667 | - return "regenerate-local-style-ids--document/elements/duplicate"; | |
| 668 | - } | |
| 669 | - }, | |
| 670 | - { | |
| 671 | - key: "apply", | |
| 672 | - value: function apply(args, result) { | |
| 673 | - (Array.isArray(result) ? result : [result]).forEach(regenerateLocalStyleIds); | |
| 674 | - } | |
| 675 | - } | |
| 676 | - ]); | |
| 677 | - }($e.modules.hookData.After); | |
| 787 | +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-base-model.js": | |
| 788 | +/*!*******************************************************************************!*\ | |
| 789 | + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-base-model.js ***! | |
| 790 | + \*******************************************************************************/ | |
| 791 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 678 | 792 | |
| 679 | -//#endregion | |
| 680 | -//#region modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/paste-element.js | |
| 681 | - function _callSuper$5(t, o, e) { | |
| 682 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$5() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 683 | - } | |
| 684 | - __name(_callSuper$5, "_callSuper"); | |
| 685 | - function _isNativeReflectConstruct$5() { | |
| 686 | - try { | |
| 687 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 688 | - } catch (t) {} | |
| 689 | - return (_isNativeReflectConstruct$5 = function _isNativeReflectConstruct() { | |
| 690 | - return !!t; | |
| 691 | - })(); | |
| 692 | - } | |
| 693 | - __name(_isNativeReflectConstruct$5, "_isNativeReflectConstruct"); | |
| 694 | - var PasteElement = /*#__PURE__*/ function(_$e$modules$hookData$) { | |
| 695 | - function PasteElement() { | |
| 696 | - _classCallCheck(this, PasteElement); | |
| 697 | - return _callSuper$5(this, PasteElement, arguments); | |
| 698 | - } | |
| 699 | - _inherits(PasteElement, _$e$modules$hookData$); | |
| 700 | - return _createClass(PasteElement, [ | |
| 701 | - { | |
| 702 | - key: "getCommand", | |
| 703 | - value: function getCommand() { | |
| 704 | - return "document/elements/paste"; | |
| 705 | - } | |
| 706 | - }, | |
| 707 | - { | |
| 708 | - key: "getId", | |
| 709 | - value: function getId() { | |
| 710 | - return "regenerate-local-style-ids--document/elements/paste"; | |
| 711 | - } | |
| 712 | - }, | |
| 713 | - { | |
| 714 | - key: "apply", | |
| 715 | - value: function apply(args, result) { | |
| 716 | - (Array.isArray(result) ? result : [result]).forEach(regenerateLocalStyleIds); | |
| 717 | - } | |
| 718 | - } | |
| 719 | - ]); | |
| 720 | - }($e.modules.hookData.After); | |
| 793 | +"use strict"; | |
| 721 | 794 | |
| 722 | -//#endregion | |
| 723 | -//#region modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/import-element.js | |
| 724 | - function _callSuper$4(t, o, e) { | |
| 725 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$4() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 726 | - } | |
| 727 | - __name(_callSuper$4, "_callSuper"); | |
| 728 | - function _isNativeReflectConstruct$4() { | |
| 729 | - try { | |
| 730 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 731 | - } catch (t) {} | |
| 732 | - return (_isNativeReflectConstruct$4 = function _isNativeReflectConstruct() { | |
| 733 | - return !!t; | |
| 734 | - })(); | |
| 735 | - } | |
| 736 | - __name(_isNativeReflectConstruct$4, "_isNativeReflectConstruct"); | |
| 737 | - var ImportElement = /*#__PURE__*/ function(_$e$modules$hookData$) { | |
| 738 | - function ImportElement() { | |
| 739 | - _classCallCheck(this, ImportElement); | |
| 740 | - return _callSuper$4(this, ImportElement, arguments); | |
| 741 | - } | |
| 742 | - _inherits(ImportElement, _$e$modules$hookData$); | |
| 743 | - return _createClass(ImportElement, [ | |
| 744 | - { | |
| 745 | - key: "getCommand", | |
| 746 | - value: function getCommand() { | |
| 747 | - return "document/elements/import"; | |
| 748 | - } | |
| 749 | - }, | |
| 750 | - { | |
| 751 | - key: "getId", | |
| 752 | - value: function getId() { | |
| 753 | - return "regenerate-local-style-ids--document/elements/import"; | |
| 754 | - } | |
| 755 | - }, | |
| 756 | - { | |
| 757 | - key: "apply", | |
| 758 | - value: function apply(args, result) { | |
| 759 | - (Array.isArray(result) ? result : [result]).forEach(regenerateLocalStyleIds); | |
| 760 | - } | |
| 761 | - } | |
| 762 | - ]); | |
| 763 | - }($e.modules.hookData.After); | |
| 764 | 795 | |
| 765 | -//#endregion | |
| 766 | -//#region modules/atomic-widgets/assets/js/editor/utils/clear-duplicated-settings.js | |
| 767 | - init_defineProperty(); | |
| 768 | - init_typeof(); | |
| 769 | - function ownKeys$1(e, r) { | |
| 770 | - var t = Object.keys(e); | |
| 771 | - if (Object.getOwnPropertySymbols) { | |
| 772 | - var o = Object.getOwnPropertySymbols(e); | |
| 773 | - r && (o = o.filter(function(r) { | |
| 774 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 775 | - })), t.push.apply(t, o); | |
| 776 | - } | |
| 777 | - return t; | |
| 778 | - } | |
| 779 | - __name(ownKeys$1, "ownKeys"); | |
| 780 | - function _objectSpread$1(e) { | |
| 781 | - for (var r = 1; r < arguments.length; r++) { | |
| 782 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 783 | - r % 2 ? ownKeys$1(Object(t), !0).forEach(function(r) { | |
| 784 | - _defineProperty(e, r, t[r]); | |
| 785 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r) { | |
| 786 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 787 | - }); | |
| 788 | - } | |
| 789 | - return e; | |
| 790 | - } | |
| 791 | - __name(_objectSpread$1, "_objectSpread"); | |
| 792 | - var DUPLICATE_BEHAVIOR_META_KEY = "duplicate_behavior"; | |
| 793 | - var DUPLICATE_BEHAVIOR_CLEAR = "clear"; | |
| 794 | - function getClearablePropKeys(model) { | |
| 795 | - var _elementor$helpers$ge; | |
| 796 | - var _elementor$helpers$ge2; | |
| 797 | - var schema = (_elementor$helpers$ge = (_elementor$helpers$ge2 = elementor.helpers.getWidgetCache(model)) === null || _elementor$helpers$ge2 === void 0 ? void 0 : _elementor$helpers$ge2.atomic_props_schema) !== null && _elementor$helpers$ge !== void 0 ? _elementor$helpers$ge : {}; | |
| 798 | - return Object.entries(schema).filter(function(_ref) { | |
| 799 | - var _prop$meta; | |
| 800 | - var prop = _slicedToArray(_ref, 2)[1]; | |
| 801 | - return DUPLICATE_BEHAVIOR_CLEAR === (prop === null || prop === void 0 || (_prop$meta = prop.meta) === null || _prop$meta === void 0 ? void 0 : _prop$meta[DUPLICATE_BEHAVIOR_META_KEY]); | |
| 802 | - }).map(function(_ref3) { | |
| 803 | - return _slicedToArray(_ref3, 1)[0]; | |
| 804 | - }); | |
| 805 | - } | |
| 806 | - function getSettingsJson(model) { | |
| 807 | - var _model$get$toJSON; | |
| 808 | - var _model$get; | |
| 809 | - var _model$get$toJSON2; | |
| 810 | - var container = elementor.getContainer(model.get("id")); | |
| 811 | - if (container) { | |
| 812 | - var _container$settings$t; | |
| 813 | - var _container$settings; | |
| 814 | - var _container$settings$t2; | |
| 815 | - return (_container$settings$t = (_container$settings = container.settings) === null || _container$settings === void 0 || (_container$settings$t2 = _container$settings.toJSON) === null || _container$settings$t2 === void 0 ? void 0 : _container$settings$t2.call(_container$settings)) !== null && _container$settings$t !== void 0 ? _container$settings$t : {}; | |
| 816 | - } | |
| 817 | - return (_model$get$toJSON = (_model$get = model.get("settings")) === null || _model$get === void 0 || (_model$get$toJSON2 = _model$get.toJSON) === null || _model$get$toJSON2 === void 0 ? void 0 : _model$get$toJSON2.call(_model$get)) !== null && _model$get$toJSON !== void 0 ? _model$get$toJSON : {}; | |
| 818 | - } | |
| 819 | - function toClearedValue(currentValue) { | |
| 820 | - if (currentValue && "object" === _typeof(currentValue) && "$$type" in currentValue) return _objectSpread$1(_objectSpread$1({}, currentValue), {}, { value: null }); | |
| 821 | - return null; | |
| 822 | - } | |
| 823 | - function updateSettings(model, settings) { | |
| 824 | - var _model$get2; | |
| 825 | - var container = elementor.getContainer(model.get("id")); | |
| 826 | - if (container) { | |
| 827 | - $e.internal("document/elements/set-settings", { | |
| 828 | - container, | |
| 829 | - settings | |
| 830 | - }); | |
| 831 | - return; | |
| 832 | - } | |
| 833 | - (_model$get2 = model.get("settings")) === null || _model$get2 === void 0 || _model$get2.set(settings); | |
| 834 | - } | |
| 835 | - function clearSettingsForModel(model) { | |
| 836 | - var clearableKeys = getClearablePropKeys(model); | |
| 837 | - if (!clearableKeys.length) return; | |
| 838 | - var settingsJson = getSettingsJson(model); | |
| 839 | - var settingsToClear = clearableKeys.reduce(function(acc, key) { | |
| 840 | - var _settingsJson$key; | |
| 841 | - if ((_settingsJson$key = settingsJson[key]) !== null && _settingsJson$key !== void 0 && _settingsJson$key.value) acc[key] = toClearedValue(settingsJson[key]); | |
| 842 | - return acc; | |
| 843 | - }, {}); | |
| 844 | - if (Object.keys(settingsToClear).length) updateSettings(model, settingsToClear); | |
| 845 | - } | |
| 846 | - function clearDuplicatedSettings(container) { | |
| 847 | - if (!(container !== null && container !== void 0 && container.model)) return; | |
| 848 | - getElementChildren(container.model).forEach(clearSettingsForModel); | |
| 849 | - } | |
| 796 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 797 | +Object.defineProperty(exports, "__esModule", ({ | |
| 798 | + value: true | |
| 799 | +})); | |
| 800 | +exports["default"] = void 0; | |
| 801 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 802 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 803 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 804 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 805 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 806 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 807 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 808 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 809 | +function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 810 | +var AtomicElementBaseModel = exports["default"] = /*#__PURE__*/function (_elementor$modules$el) { | |
| 811 | + function AtomicElementBaseModel() { | |
| 812 | + (0, _classCallCheck2.default)(this, AtomicElementBaseModel); | |
| 813 | + return _callSuper(this, AtomicElementBaseModel, arguments); | |
| 814 | + } | |
| 815 | + (0, _inherits2.default)(AtomicElementBaseModel, _elementor$modules$el); | |
| 816 | + return (0, _createClass2.default)(AtomicElementBaseModel, [{ | |
| 817 | + key: "isValidChild", | |
| 818 | + value: | |
| 819 | + /** | |
| 820 | + * Do not allow section, column or container be placed in the Atomic container. | |
| 821 | + * | |
| 822 | + * @param {*} childModel | |
| 823 | + */ | |
| 824 | + function isValidChild(childModel) { | |
| 825 | + var elType = childModel.get('elType'); | |
| 826 | + return 'section' !== elType && 'column' !== elType; | |
| 827 | + } | |
| 828 | + }, { | |
| 829 | + key: "initialize", | |
| 830 | + value: function initialize(attributes, options) { | |
| 831 | + var elementType = this.get('elType'); | |
| 832 | + this.config = elementor.config.elements[elementType]; | |
| 833 | + var isNewElementCreate = 0 === this.get('elements').length && $e.commands.currentTrace.includes('document/elements/create'); | |
| 834 | + if (isNewElementCreate) { | |
| 835 | + this.onElementCreate(); | |
| 836 | + } | |
| 837 | + _superPropGet(AtomicElementBaseModel, "initialize", this, 3)([attributes, options]); | |
| 838 | + } | |
| 839 | + }, { | |
| 840 | + key: "getDefaultChildren", | |
| 841 | + value: function getDefaultChildren() { | |
| 842 | + var defaultChildren = this.config.default_children; | |
| 843 | + return this.modifyDefaultChildren(defaultChildren); | |
| 844 | + } | |
| 845 | + }, { | |
| 846 | + key: "onElementCreate", | |
| 847 | + value: function onElementCreate() { | |
| 848 | + var _this = this; | |
| 849 | + this.set('elements', this.getDefaultChildren().map(function (element) { | |
| 850 | + return _this.buildElement(element); | |
| 851 | + })); | |
| 852 | + } | |
| 853 | + }, { | |
| 854 | + key: "modifyDefaultChildren", | |
| 855 | + value: function modifyDefaultChildren(element) { | |
| 856 | + return element; | |
| 857 | + } | |
| 858 | + }, { | |
| 859 | + key: "buildElement", | |
| 860 | + value: function buildElement(element) { | |
| 861 | + var _this2 = this, | |
| 862 | + _element$settings; | |
| 863 | + var id = elementorCommon.helpers.getUniqueId(); | |
| 864 | + var elements = (element.elements || []).map(function (el) { | |
| 865 | + return _this2.buildElement(el); | |
| 866 | + }); | |
| 867 | + return { | |
| 868 | + elType: element.elType, | |
| 869 | + widgetType: element.widgetType, | |
| 870 | + id: id, | |
| 871 | + settings: (_element$settings = element.settings) !== null && _element$settings !== void 0 ? _element$settings : {}, | |
| 872 | + elements: elements, | |
| 873 | + isLocked: element.isLocked || false, | |
| 874 | + editor_settings: element.editor_settings || {} | |
| 875 | + }; | |
| 876 | + } | |
| 877 | + }]); | |
| 878 | +}(elementor.modules.elements.models.Element); | |
| 850 | 879 | |
| 851 | -//#endregion | |
| 852 | -//#region modules/atomic-widgets/assets/js/editor/hooks/data/clear-duplicated-settings/duplicate-element.js | |
| 853 | - function _callSuper$3(t, o, e) { | |
| 854 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 855 | - } | |
| 856 | - __name(_callSuper$3, "_callSuper"); | |
| 857 | - function _isNativeReflectConstruct$3() { | |
| 858 | - try { | |
| 859 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 860 | - } catch (t) {} | |
| 861 | - return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() { | |
| 862 | - return !!t; | |
| 863 | - })(); | |
| 864 | - } | |
| 865 | - __name(_isNativeReflectConstruct$3, "_isNativeReflectConstruct"); | |
| 866 | - var DuplicateElement = /*#__PURE__*/ function(_$e$modules$hookData$) { | |
| 867 | - function DuplicateElement() { | |
| 868 | - _classCallCheck(this, DuplicateElement); | |
| 869 | - return _callSuper$3(this, DuplicateElement, arguments); | |
| 870 | - } | |
| 871 | - _inherits(DuplicateElement, _$e$modules$hookData$); | |
| 872 | - return _createClass(DuplicateElement, [ | |
| 873 | - { | |
| 874 | - key: "getCommand", | |
| 875 | - value: function getCommand() { | |
| 876 | - return "document/elements/duplicate"; | |
| 877 | - } | |
| 878 | - }, | |
| 879 | - { | |
| 880 | - key: "getId", | |
| 881 | - value: function getId() { | |
| 882 | - return "clear-duplicated-settings--document/elements/duplicate"; | |
| 883 | - } | |
| 884 | - }, | |
| 885 | - { | |
| 886 | - key: "apply", | |
| 887 | - value: function apply(args, result) { | |
| 888 | - (Array.isArray(result) ? result : [result]).filter(Boolean).forEach(clearDuplicatedSettings); | |
| 889 | - } | |
| 890 | - } | |
| 891 | - ]); | |
| 892 | - }($e.modules.hookData.After); | |
| 880 | +/***/ }), | |
| 893 | 881 | |
| 894 | -//#endregion | |
| 895 | -//#region modules/atomic-widgets/assets/js/editor/hooks/index.js | |
| 896 | - var hooks_exports = /* @__PURE__ */ __exportAll({ | |
| 897 | - ClearDuplicatedSettingsElement: () => DuplicateElement, | |
| 898 | - DuplicateElement: () => DuplicateElement$1, | |
| 899 | - ImportElement: () => ImportElement, | |
| 900 | - PasteElement: () => PasteElement | |
| 901 | - }); | |
| 882 | +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-base-type.js": | |
| 883 | +/*!******************************************************************************!*\ | |
| 884 | + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-base-type.js ***! | |
| 885 | + \******************************************************************************/ | |
| 886 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 902 | 887 | |
| 903 | -//#endregion | |
| 904 | -//#region modules/atomic-widgets/assets/js/editor/component.js | |
| 905 | - function _callSuper$2(t, o, e) { | |
| 906 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 907 | - } | |
| 908 | - __name(_callSuper$2, "_callSuper"); | |
| 909 | - function _isNativeReflectConstruct$2() { | |
| 910 | - try { | |
| 911 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 912 | - } catch (t) {} | |
| 913 | - return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { | |
| 914 | - return !!t; | |
| 915 | - })(); | |
| 916 | - } | |
| 917 | - __name(_isNativeReflectConstruct$2, "_isNativeReflectConstruct"); | |
| 918 | - var Component = /*#__PURE__*/ function(_$e$modules$Component) { | |
| 919 | - function Component() { | |
| 920 | - _classCallCheck(this, Component); | |
| 921 | - return _callSuper$2(this, Component, arguments); | |
| 922 | - } | |
| 923 | - _inherits(Component, _$e$modules$Component); | |
| 924 | - return _createClass(Component, [{ | |
| 925 | - key: "getNamespace", | |
| 926 | - value: function getNamespace() { | |
| 927 | - return "document/atomic-widgets"; | |
| 928 | - } | |
| 929 | - }, { | |
| 930 | - key: "defaultHooks", | |
| 931 | - value: function defaultHooks() { | |
| 932 | - return this.importHooks(hooks_exports); | |
| 933 | - } | |
| 934 | - }]); | |
| 935 | - }($e.modules.ComponentBase); | |
| 888 | +"use strict"; | |
| 936 | 889 | |
| 937 | -//#endregion | |
| 938 | -//#region node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js | |
| 939 | - function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 940 | - try { | |
| 941 | - var i = n[a](c); | |
| 942 | - var u = i.value; | |
| 943 | - } catch (n) { | |
| 944 | - e(n); | |
| 945 | - return; | |
| 946 | - } | |
| 947 | - i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 948 | - } | |
| 949 | - function _asyncToGenerator(n) { | |
| 950 | - return function() { | |
| 951 | - var t = this; | |
| 952 | - var e = arguments; | |
| 953 | - return new Promise(function(r, o) { | |
| 954 | - var a = n.apply(t, e); | |
| 955 | - function _next(n) { | |
| 956 | - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 957 | - } | |
| 958 | - function _throw(n) { | |
| 959 | - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 960 | - } | |
| 961 | - _next(void 0); | |
| 962 | - }); | |
| 963 | - }; | |
| 964 | - } | |
| 965 | 890 | |
| 966 | -//#endregion | |
| 967 | -//#region node_modules/@babel/runtime/helpers/OverloadYield.js | |
| 968 | - var require_OverloadYield = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 969 | - function _OverloadYield(e, d) { | |
| 970 | - this.v = e, this.k = d; | |
| 971 | - } | |
| 972 | - module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 973 | - })); | |
| 891 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 892 | +Object.defineProperty(exports, "__esModule", ({ | |
| 893 | + value: true | |
| 894 | +})); | |
| 895 | +exports["default"] = void 0; | |
| 896 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 897 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 898 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 899 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 900 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 901 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 902 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 903 | +var AtomicElementBaseType = exports["default"] = /*#__PURE__*/function (_elementor$modules$el) { | |
| 904 | + function AtomicElementBaseType(elementType, viewClass) { | |
| 905 | + var _this; | |
| 906 | + var modelClass = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; | |
| 907 | + var emptyViewClass = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; | |
| 908 | + (0, _classCallCheck2.default)(this, AtomicElementBaseType); | |
| 909 | + _this = _callSuper(this, AtomicElementBaseType); | |
| 910 | + _this.elementType = elementType; | |
| 911 | + _this.viewClass = viewClass; | |
| 912 | + _this.modelClass = modelClass; | |
| 913 | + _this.emptyViewClass = emptyViewClass; | |
| 914 | + return _this; | |
| 915 | + } | |
| 916 | + (0, _inherits2.default)(AtomicElementBaseType, _elementor$modules$el); | |
| 917 | + return (0, _createClass2.default)(AtomicElementBaseType, [{ | |
| 918 | + key: "getType", | |
| 919 | + value: function getType() { | |
| 920 | + return this.elementType; | |
| 921 | + } | |
| 922 | + }, { | |
| 923 | + key: "getView", | |
| 924 | + value: function getView() { | |
| 925 | + return this.viewClass; | |
| 926 | + } | |
| 927 | + }, { | |
| 928 | + key: "getEmptyView", | |
| 929 | + value: function getEmptyView() { | |
| 930 | + return this.emptyViewClass || elementor.modules.elements.views.EmptyComponent; | |
| 931 | + } | |
| 932 | + }, { | |
| 933 | + key: "getModel", | |
| 934 | + value: function getModel() { | |
| 935 | + return this.modelClass || elementor.modules.elements.models.AtomicElementBase; | |
| 936 | + } | |
| 937 | + }]); | |
| 938 | +}(elementor.modules.elements.types.Base); | |
| 974 | 939 | |
| 975 | -//#endregion | |
| 976 | -//#region node_modules/@babel/runtime/helpers/regeneratorDefine.js | |
| 977 | - var require_regeneratorDefine = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 978 | - function _regeneratorDefine(e, r, n, t) { | |
| 979 | - var i = Object.defineProperty; | |
| 980 | - try { | |
| 981 | - i({}, "", {}); | |
| 982 | - } catch (e) { | |
| 983 | - i = 0; | |
| 984 | - } | |
| 985 | - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 986 | - function o(r, n) { | |
| 987 | - _regeneratorDefine(e, r, function(e) { | |
| 988 | - return this._invoke(r, n, e); | |
| 989 | - }); | |
| 990 | - } | |
| 991 | - r ? i ? i(e, r, { | |
| 992 | - value: n, | |
| 993 | - enumerable: !t, | |
| 994 | - configurable: !t, | |
| 995 | - writable: !t | |
| 996 | - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 997 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 998 | - } | |
| 999 | - module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1000 | - })); | |
| 940 | +/***/ }), | |
| 1001 | 941 | |
| 1002 | -//#endregion | |
| 1003 | -//#region node_modules/@babel/runtime/helpers/regenerator.js | |
| 1004 | - var require_regenerator$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1005 | - var regeneratorDefine = require_regeneratorDefine(); | |
| 1006 | - function _regenerator() { | |
| 1007 | - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 1008 | - var e; | |
| 1009 | - var t; | |
| 1010 | - var r = "function" == typeof Symbol ? Symbol : {}; | |
| 1011 | - var n = r.iterator || "@@iterator"; | |
| 1012 | - var o = r.toStringTag || "@@toStringTag"; | |
| 1013 | - function i(r, n, o, i) { | |
| 1014 | - var c = n && n.prototype instanceof Generator ? n : Generator; | |
| 1015 | - var u = Object.create(c.prototype); | |
| 1016 | - return regeneratorDefine(u, "_invoke", function(r, n, o) { | |
| 1017 | - var i; | |
| 1018 | - var c; | |
| 1019 | - var u; | |
| 1020 | - var f = 0; | |
| 1021 | - var p = o || []; | |
| 1022 | - var y = !1; | |
| 1023 | - var G = { | |
| 1024 | - p: 0, | |
| 1025 | - n: 0, | |
| 1026 | - v: e, | |
| 1027 | - a: d, | |
| 1028 | - f: d.bind(e, 4), | |
| 1029 | - d: function d(t, r) { | |
| 1030 | - return i = t, c = 0, u = e, G.n = r, a; | |
| 1031 | - } | |
| 1032 | - }; | |
| 1033 | - function d(r, n) { | |
| 1034 | - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 1035 | - var o; | |
| 1036 | - var i = p[t]; | |
| 1037 | - var d = G.p; | |
| 1038 | - var l = i[2]; | |
| 1039 | - r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); | |
| 1040 | - } | |
| 1041 | - if (o || r > 1) return a; | |
| 1042 | - throw y = !0, n; | |
| 1043 | - } | |
| 1044 | - return function(o, p, l) { | |
| 1045 | - if (f > 1) throw TypeError("Generator is already running"); | |
| 1046 | - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 1047 | - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 1048 | - try { | |
| 1049 | - if (f = 2, i) { | |
| 1050 | - if (c || (o = "next"), t = i[o]) { | |
| 1051 | - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 1052 | - if (!t.done) return t; | |
| 1053 | - u = t.value, c < 2 && (c = 0); | |
| 1054 | - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 1055 | - i = e; | |
| 1056 | - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 1057 | - } catch (t) { | |
| 1058 | - i = e, c = 1, u = t; | |
| 1059 | - } finally { | |
| 1060 | - f = 1; | |
| 1061 | - } | |
| 1062 | - } | |
| 1063 | - return { | |
| 1064 | - value: t, | |
| 1065 | - done: y | |
| 1066 | - }; | |
| 1067 | - }; | |
| 1068 | - }(r, o, i), !0), u; | |
| 1069 | - } | |
| 1070 | - var a = {}; | |
| 1071 | - function Generator() {} | |
| 1072 | - function GeneratorFunction() {} | |
| 1073 | - function GeneratorFunctionPrototype() {} | |
| 1074 | - t = Object.getPrototypeOf; | |
| 1075 | - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function() { | |
| 1076 | - return this; | |
| 1077 | - }), t); | |
| 1078 | - var u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 1079 | - function f(e) { | |
| 1080 | - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 1081 | - } | |
| 1082 | - return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function() { | |
| 1083 | - return this; | |
| 1084 | - }), regeneratorDefine(u, "toString", function() { | |
| 1085 | - return "[object Generator]"; | |
| 1086 | - }), (module.exports = _regenerator = function _regenerator() { | |
| 1087 | - return { | |
| 1088 | - w: i, | |
| 1089 | - m: f | |
| 1090 | - }; | |
| 1091 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 1092 | - } | |
| 1093 | - module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1094 | - })); | |
| 942 | +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-content/create-atomic-tab-content-type.js": | |
| 943 | +/*!****************************************************************************************************************************!*\ | |
| 944 | + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-content/create-atomic-tab-content-type.js ***! | |
| 945 | + \****************************************************************************************************************************/ | |
| 946 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1095 | 947 | |
| 1096 | -//#endregion | |
| 1097 | -//#region node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js | |
| 1098 | - var require_regeneratorAsyncIterator = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1099 | - var OverloadYield = require_OverloadYield(); | |
| 1100 | - var regeneratorDefine = require_regeneratorDefine(); | |
| 1101 | - function AsyncIterator(t, e) { | |
| 1102 | - function n(r, o, i, f) { | |
| 1103 | - try { | |
| 1104 | - var c = t[r](o); | |
| 1105 | - var u = c.value; | |
| 1106 | - return u instanceof OverloadYield ? e.resolve(u.v).then(function(t) { | |
| 1107 | - n("next", t, i, f); | |
| 1108 | - }, function(t) { | |
| 1109 | - n("throw", t, i, f); | |
| 1110 | - }) : e.resolve(u).then(function(t) { | |
| 1111 | - c.value = t, i(c); | |
| 1112 | - }, function(t) { | |
| 1113 | - return n("throw", t, i, f); | |
| 1114 | - }); | |
| 1115 | - } catch (t) { | |
| 1116 | - f(t); | |
| 1117 | - } | |
| 1118 | - } | |
| 1119 | - var r; | |
| 1120 | - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function() { | |
| 1121 | - return this; | |
| 1122 | - })), regeneratorDefine(this, "_invoke", function(t, o, i) { | |
| 1123 | - function f() { | |
| 1124 | - return new e(function(e, r) { | |
| 1125 | - n(t, i, e, r); | |
| 1126 | - }); | |
| 1127 | - } | |
| 1128 | - return r = r ? r.then(f, f) : f(); | |
| 1129 | - }, !0); | |
| 1130 | - } | |
| 1131 | - module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1132 | - })); | |
| 948 | +"use strict"; | |
| 1133 | 949 | |
| 1134 | -//#endregion | |
| 1135 | -//#region node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js | |
| 1136 | - var require_regeneratorAsyncGen = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1137 | - var regenerator = require_regenerator$1(); | |
| 1138 | - var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); | |
| 1139 | - function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 1140 | - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 1141 | - } | |
| 1142 | - module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1143 | - })); | |
| 1144 | 950 | |
| 1145 | -//#endregion | |
| 1146 | -//#region node_modules/@babel/runtime/helpers/regeneratorAsync.js | |
| 1147 | - var require_regeneratorAsync = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1148 | - var regeneratorAsyncGen = require_regeneratorAsyncGen(); | |
| 1149 | - function _regeneratorAsync(n, e, r, t, o) { | |
| 1150 | - var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 1151 | - return a.next().then(function(n) { | |
| 1152 | - return n.done ? n.value : a.next(); | |
| 1153 | - }); | |
| 1154 | - } | |
| 1155 | - module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1156 | - })); | |
| 951 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 952 | +Object.defineProperty(exports, "__esModule", ({ | |
| 953 | + value: true | |
| 954 | +})); | |
| 955 | +exports["default"] = void 0; | |
| 956 | +var _createAtomicTabContentView = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-tab-content-view */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-content/create-atomic-tab-content-view.js")); | |
| 957 | +var createAtomicTabContentType = function createAtomicTabContentType() { | |
| 958 | + return new elementor.modules.elements.types.AtomicElementBase('e-tab-content', (0, _createAtomicTabContentView.default)()); | |
| 959 | +}; | |
| 960 | +var _default = exports["default"] = createAtomicTabContentType; | |
| 1157 | 961 | |
| 1158 | -//#endregion | |
| 1159 | -//#region node_modules/@babel/runtime/helpers/regeneratorKeys.js | |
| 1160 | - var require_regeneratorKeys = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1161 | - function _regeneratorKeys(e) { | |
| 1162 | - var n = Object(e); | |
| 1163 | - var r = []; | |
| 1164 | - for (var t in n) r.unshift(t); | |
| 1165 | - return function e() { | |
| 1166 | - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 1167 | - return e.done = !0, e; | |
| 1168 | - }; | |
| 1169 | - } | |
| 1170 | - module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1171 | - })); | |
| 962 | +/***/ }), | |
| 1172 | 963 | |
| 1173 | -//#endregion | |
| 1174 | -//#region node_modules/@babel/runtime/helpers/typeof.js | |
| 1175 | - var require_typeof = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1176 | - function _typeof(o) { | |
| 1177 | - "@babel/helpers - typeof"; | |
| 1178 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 1179 | - return typeof o; | |
| 1180 | - } : function(o) { | |
| 1181 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 1182 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 1183 | - } | |
| 1184 | - module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1185 | - })); | |
| 964 | +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-content/create-atomic-tab-content-view.js": | |
| 965 | +/*!****************************************************************************************************************************!*\ | |
| 966 | + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-content/create-atomic-tab-content-view.js ***! | |
| 967 | + \****************************************************************************************************************************/ | |
| 968 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1186 | 969 | |
| 1187 | -//#endregion | |
| 1188 | -//#region node_modules/@babel/runtime/helpers/regeneratorValues.js | |
| 1189 | - var require_regeneratorValues = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1190 | - var _typeof = require_typeof()["default"]; | |
| 1191 | - function _regeneratorValues(e) { | |
| 1192 | - if (null != e) { | |
| 1193 | - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"]; | |
| 1194 | - var r = 0; | |
| 1195 | - if (t) return t.call(e); | |
| 1196 | - if ("function" == typeof e.next) return e; | |
| 1197 | - if (!isNaN(e.length)) return { next: function next() { | |
| 1198 | - return e && r >= e.length && (e = void 0), { | |
| 1199 | - value: e && e[r++], | |
| 1200 | - done: !e | |
| 1201 | - }; | |
| 1202 | - } }; | |
| 1203 | - } | |
| 1204 | - throw new TypeError(_typeof(e) + " is not iterable"); | |
| 1205 | - } | |
| 1206 | - module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1207 | - })); | |
| 970 | +"use strict"; | |
| 1208 | 971 | |
| 1209 | -//#endregion | |
| 1210 | -//#region node_modules/@babel/runtime/helpers/regeneratorRuntime.js | |
| 1211 | - var require_regeneratorRuntime = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1212 | - var OverloadYield = require_OverloadYield(); | |
| 1213 | - var regenerator = require_regenerator$1(); | |
| 1214 | - var regeneratorAsync = require_regeneratorAsync(); | |
| 1215 | - var regeneratorAsyncGen = require_regeneratorAsyncGen(); | |
| 1216 | - var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); | |
| 1217 | - var regeneratorKeys = require_regeneratorKeys(); | |
| 1218 | - var regeneratorValues = require_regeneratorValues(); | |
| 1219 | - function _regeneratorRuntime() { | |
| 1220 | - "use strict"; | |
| 1221 | - var r = regenerator(); | |
| 1222 | - var e = r.m(_regeneratorRuntime); | |
| 1223 | - var t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 1224 | - function n(r) { | |
| 1225 | - var e = "function" == typeof r && r.constructor; | |
| 1226 | - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 1227 | - } | |
| 1228 | - var o = { | |
| 1229 | - "throw": 1, | |
| 1230 | - "return": 2, | |
| 1231 | - "break": 3, | |
| 1232 | - "continue": 3 | |
| 1233 | - }; | |
| 1234 | - function a(r) { | |
| 1235 | - var e; | |
| 1236 | - var t; | |
| 1237 | - return function(n) { | |
| 1238 | - e || (e = { | |
| 1239 | - stop: function stop() { | |
| 1240 | - return t(n.a, 2); | |
| 1241 | - }, | |
| 1242 | - "catch": function _catch() { | |
| 1243 | - return n.v; | |
| 1244 | - }, | |
| 1245 | - abrupt: function abrupt(r, e) { | |
| 1246 | - return t(n.a, o[r], e); | |
| 1247 | - }, | |
| 1248 | - delegateYield: function delegateYield(r, o, a) { | |
| 1249 | - return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 1250 | - }, | |
| 1251 | - finish: function finish(r) { | |
| 1252 | - return t(n.f, r); | |
| 1253 | - } | |
| 1254 | - }, t = function t(r, _t, o) { | |
| 1255 | - n.p = e.prev, n.n = e.next; | |
| 1256 | - try { | |
| 1257 | - return r(_t, o); | |
| 1258 | - } finally { | |
| 1259 | - e.next = n.n; | |
| 1260 | - } | |
| 1261 | - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 1262 | - try { | |
| 1263 | - return r.call(this, e); | |
| 1264 | - } finally { | |
| 1265 | - n.p = e.prev, n.n = e.next; | |
| 1266 | - } | |
| 1267 | - }; | |
| 1268 | - } | |
| 1269 | - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 1270 | - return { | |
| 1271 | - wrap: function wrap(e, t, n, o) { | |
| 1272 | - return r.w(a(e), t, n, o && o.reverse()); | |
| 1273 | - }, | |
| 1274 | - isGeneratorFunction: n, | |
| 1275 | - mark: r.m, | |
| 1276 | - awrap: function awrap(r, e) { | |
| 1277 | - return new OverloadYield(r, e); | |
| 1278 | - }, | |
| 1279 | - AsyncIterator: regeneratorAsyncIterator, | |
| 1280 | - async: function async(r, e, t, o, u) { | |
| 1281 | - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 1282 | - }, | |
| 1283 | - keys: regeneratorKeys, | |
| 1284 | - values: regeneratorValues | |
| 1285 | - }; | |
| 1286 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 1287 | - } | |
| 1288 | - module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1289 | - })); | |
| 1290 | 972 | |
| 1291 | -//#endregion | |
| 1292 | -//#region node_modules/@babel/runtime/regenerator/index.js | |
| 1293 | - var require_regenerator = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1294 | - var runtime = require_regeneratorRuntime()(); | |
| 1295 | - module.exports = runtime; | |
| 1296 | - try { | |
| 1297 | - regeneratorRuntime = runtime; | |
| 1298 | - } catch (accidentalStrictMode) { | |
| 1299 | - if (typeof globalThis === "object") globalThis.regeneratorRuntime = runtime; | |
| 1300 | - else Function("r", "regeneratorRuntime = r")(runtime); | |
| 1301 | - } | |
| 1302 | - })); | |
| 973 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 974 | +Object.defineProperty(exports, "__esModule", ({ | |
| 975 | + value: true | |
| 976 | +})); | |
| 977 | +exports["default"] = void 0; | |
| 978 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 979 | +var _readOnlyError2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/readOnlyError */ "../node_modules/@babel/runtime/helpers/readOnlyError.js")); | |
| 980 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 981 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 982 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 983 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 984 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 985 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 986 | +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 987 | +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 988 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 989 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 990 | +function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 991 | +var createAtomicTabContentView = function createAtomicTabContentView() { | |
| 992 | + var AtomicElementBaseView = elementor.modules.elements.views.createAtomicElementBase('e-tab-content'); | |
| 993 | + return /*#__PURE__*/function (_AtomicElementBaseVie) { | |
| 994 | + function AtomicTabContentView() { | |
| 995 | + (0, _classCallCheck2.default)(this, AtomicTabContentView); | |
| 996 | + return _callSuper(this, AtomicTabContentView, arguments); | |
| 997 | + } | |
| 998 | + (0, _inherits2.default)(AtomicTabContentView, _AtomicElementBaseVie); | |
| 999 | + return (0, _createClass2.default)(AtomicTabContentView, [{ | |
| 1000 | + key: "attributes", | |
| 1001 | + value: function attributes() { | |
| 1002 | + var attributes = _superPropGet(AtomicTabContentView, "attributes", this, 3)([]); | |
| 1003 | + return _objectSpread({ | |
| 1004 | + 'x-bind': 'tabContent', | |
| 1005 | + 'x-ref': this.model.id | |
| 1006 | + }, attributes); | |
| 1007 | + } | |
| 1008 | + }]); | |
| 1009 | + }(AtomicElementBaseView); | |
| 1010 | +}; | |
| 1011 | +var _default = exports["default"] = createAtomicTabContentView; | |
| 1303 | 1012 | |
| 1304 | -//#endregion | |
| 1305 | -//#region assets/dev/js/editor/utils/element-types.js | |
| 1306 | - var require_element_types = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1307 | - /** | |
| 1308 | - * Returns an array of all available element types. | |
| 1309 | - * | |
| 1310 | - * @return {string[]} Array of element type strings. | |
| 1311 | - */ | |
| 1312 | - var getAllElementTypes = function getAllElementTypes() { | |
| 1313 | - return Object.keys(elementor.getConfig().elements); | |
| 1314 | - }; | |
| 1315 | - /** | |
| 1316 | - * Returns whether an element type is a compound atomic element — | |
| 1317 | - * one that should be auto-wrapped in a flexbox container when dropped on the canvas, | |
| 1318 | - * consistent with atom elements (Heading, Image, etc.). | |
| 1319 | - * | |
| 1320 | - * Compound atomic elements declare `is_compound: true` in their PHP element meta. | |
| 1321 | - * | |
| 1322 | - * @param {string} elType - The element type string (e.g. 'e-tabs'). | |
| 1323 | - * @return {boolean} | |
| 1324 | - */ | |
| 1325 | - var isCompoundAtomicType = function isCompoundAtomicType(elType) { | |
| 1326 | - var _elementor$getConfig$; | |
| 1327 | - return !!((_elementor$getConfig$ = elementor.getConfig().elements[elType]) !== null && _elementor$getConfig$ !== void 0 && (_elementor$getConfig$ = _elementor$getConfig$.meta) !== null && _elementor$getConfig$ !== void 0 && _elementor$getConfig$.is_compound); | |
| 1328 | - }; | |
| 1329 | - module.exports = { | |
| 1330 | - getAllElementTypes, | |
| 1331 | - isCompoundAtomicType | |
| 1332 | - }; | |
| 1333 | - })); | |
| 1013 | +/***/ }), | |
| 1334 | 1014 | |
| 1335 | -//#endregion | |
| 1336 | -//#region node_modules/react-dom/client.js | |
| 1337 | - var require_client = /* @__PURE__ */ __commonJSMin(((exports) => { | |
| 1338 | - var m = (globalThis.ReactDOM); | |
| 1339 | - var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | |
| 1340 | - exports.createRoot = function(c, o) { | |
| 1341 | - i.usingClientEntryPoint = true; | |
| 1342 | - try { | |
| 1343 | - return m.createRoot(c, o); | |
| 1344 | - } finally { | |
| 1345 | - i.usingClientEntryPoint = false; | |
| 1346 | - } | |
| 1347 | - }; | |
| 1348 | - })); | |
| 1015 | +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-model.js": | |
| 1016 | +/*!*************************************************************************************************************!*\ | |
| 1017 | + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-model.js ***! | |
| 1018 | + \*************************************************************************************************************/ | |
| 1019 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1349 | 1020 | |
| 1350 | -//#endregion | |
| 1351 | -//#region assets/dev/js/utils/react.js | |
| 1352 | -var import_regenerator = /* @__PURE__ */ __toESM(require_regenerator()); | |
| 1353 | -var import_element_types = require_element_types(); | |
| 1354 | - var import_client = require_client(); | |
| 1355 | - /** | |
| 1356 | - * Support conditional rendering of a React App to the DOM, based on the React version. | |
| 1357 | - * We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions. | |
| 1358 | - * | |
| 1359 | - * @param {Promise.resolve(React).ReactElement} app The app to render. | |
| 1360 | - * @param {HTMLElement} domElement The DOM element to render the app into. | |
| 1361 | - * | |
| 1362 | - * @return {{ unmount: () => void }} The unmount function. | |
| 1363 | - */ | |
| 1364 | - function render(app, domElement) { | |
| 1365 | - var unmountFunction; | |
| 1366 | - try { | |
| 1367 | - var root = (0, import_client.createRoot)(domElement); | |
| 1368 | - root.render(app); | |
| 1369 | - unmountFunction = function unmountFunction() { | |
| 1370 | - root.unmount(); | |
| 1371 | - }; | |
| 1372 | - } catch (e) { | |
| 1373 | - react_dom.render(app, domElement); | |
| 1374 | - unmountFunction = function unmountFunction() { | |
| 1375 | - react_dom.unmountComponentAtNode(domElement); | |
| 1376 | - }; | |
| 1377 | - } | |
| 1378 | - return { unmount: unmountFunction }; | |
| 1379 | - } | |
| 1380 | - var react_default = { render }; | |
| 1021 | +"use strict"; | |
| 1381 | 1022 | |
| 1382 | -//#endregion | |
| 1383 | -//#region node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js | |
| 1384 | -/** @license React v16.13.1 | |
| 1385 | - * react-is.development.js | |
| 1386 | - * | |
| 1387 | - * Copyright (c) Facebook, Inc. and its affiliates. | |
| 1388 | - * | |
| 1389 | - * This source code is licensed under the MIT license found in the | |
| 1390 | - * LICENSE file in the root directory of this source tree. | |
| 1391 | - */ | |
| 1392 | - var require_react_is_development = /* @__PURE__ */ __commonJSMin(((exports) => { | |
| 1393 | - (function() { | |
| 1394 | - "use strict"; | |
| 1395 | - var hasSymbol = typeof Symbol === "function" && Symbol.for; | |
| 1396 | - var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103; | |
| 1397 | - var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106; | |
| 1398 | - var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107; | |
| 1399 | - var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108; | |
| 1400 | - var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114; | |
| 1401 | - var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109; | |
| 1402 | - var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110; | |
| 1403 | - var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111; | |
| 1404 | - var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111; | |
| 1405 | - var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112; | |
| 1406 | - var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113; | |
| 1407 | - var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120; | |
| 1408 | - var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115; | |
| 1409 | - var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116; | |
| 1410 | - var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121; | |
| 1411 | - var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117; | |
| 1412 | - var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118; | |
| 1413 | - var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119; | |
| 1414 | - function isValidElementType(type) { | |
| 1415 | - return typeof type === "string" || typeof type === "function" || type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); | |
| 1416 | - } | |
| 1417 | - function typeOf(object) { | |
| 1418 | - if (typeof object === "object" && object !== null) { | |
| 1419 | - var $$typeof = object.$$typeof; | |
| 1420 | - switch ($$typeof) { | |
| 1421 | - case REACT_ELEMENT_TYPE: | |
| 1422 | - var type = object.type; | |
| 1423 | - switch (type) { | |
| 1424 | - case REACT_ASYNC_MODE_TYPE: | |
| 1425 | - case REACT_CONCURRENT_MODE_TYPE: | |
| 1426 | - case REACT_FRAGMENT_TYPE: | |
| 1427 | - case REACT_PROFILER_TYPE: | |
| 1428 | - case REACT_STRICT_MODE_TYPE: | |
| 1429 | - case REACT_SUSPENSE_TYPE: return type; | |
| 1430 | - default: | |
| 1431 | - var $$typeofType = type && type.$$typeof; | |
| 1432 | - switch ($$typeofType) { | |
| 1433 | - case REACT_CONTEXT_TYPE: | |
| 1434 | - case REACT_FORWARD_REF_TYPE: | |
| 1435 | - case REACT_LAZY_TYPE: | |
| 1436 | - case REACT_MEMO_TYPE: | |
| 1437 | - case REACT_PROVIDER_TYPE: return $$typeofType; | |
| 1438 | - default: return $$typeof; | |
| 1439 | - } | |
| 1440 | - } | |
| 1441 | - case REACT_PORTAL_TYPE: return $$typeof; | |
| 1442 | - } | |
| 1443 | - } | |
| 1444 | - } | |
| 1445 | - var AsyncMode = REACT_ASYNC_MODE_TYPE; | |
| 1446 | - var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; | |
| 1447 | - var ContextConsumer = REACT_CONTEXT_TYPE; | |
| 1448 | - var ContextProvider = REACT_PROVIDER_TYPE; | |
| 1449 | - var Element = REACT_ELEMENT_TYPE; | |
| 1450 | - var ForwardRef = REACT_FORWARD_REF_TYPE; | |
| 1451 | - var Fragment = REACT_FRAGMENT_TYPE; | |
| 1452 | - var Lazy = REACT_LAZY_TYPE; | |
| 1453 | - var Memo = REACT_MEMO_TYPE; | |
| 1454 | - var Portal = REACT_PORTAL_TYPE; | |
| 1455 | - var Profiler = REACT_PROFILER_TYPE; | |
| 1456 | - var StrictMode = REACT_STRICT_MODE_TYPE; | |
| 1457 | - var Suspense = REACT_SUSPENSE_TYPE; | |
| 1458 | - var hasWarnedAboutDeprecatedIsAsyncMode = false; | |
| 1459 | - function isAsyncMode(object) { | |
| 1460 | - if (!hasWarnedAboutDeprecatedIsAsyncMode) { | |
| 1461 | - hasWarnedAboutDeprecatedIsAsyncMode = true; | |
| 1462 | - console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API."); | |
| 1463 | - } | |
| 1464 | - return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; | |
| 1465 | - } | |
| 1466 | - function isConcurrentMode(object) { | |
| 1467 | - return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; | |
| 1468 | - } | |
| 1469 | - function isContextConsumer(object) { | |
| 1470 | - return typeOf(object) === REACT_CONTEXT_TYPE; | |
| 1471 | - } | |
| 1472 | - function isContextProvider(object) { | |
| 1473 | - return typeOf(object) === REACT_PROVIDER_TYPE; | |
| 1474 | - } | |
| 1475 | - function isElement(object) { | |
| 1476 | - return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | |
| 1477 | - } | |
| 1478 | - function isForwardRef(object) { | |
| 1479 | - return typeOf(object) === REACT_FORWARD_REF_TYPE; | |
| 1480 | - } | |
| 1481 | - function isFragment(object) { | |
| 1482 | - return typeOf(object) === REACT_FRAGMENT_TYPE; | |
| 1483 | - } | |
| 1484 | - function isLazy(object) { | |
| 1485 | - return typeOf(object) === REACT_LAZY_TYPE; | |
| 1486 | - } | |
| 1487 | - function isMemo(object) { | |
| 1488 | - return typeOf(object) === REACT_MEMO_TYPE; | |
| 1489 | - } | |
| 1490 | - function isPortal(object) { | |
| 1491 | - return typeOf(object) === REACT_PORTAL_TYPE; | |
| 1492 | - } | |
| 1493 | - function isProfiler(object) { | |
| 1494 | - return typeOf(object) === REACT_PROFILER_TYPE; | |
| 1495 | - } | |
| 1496 | - function isStrictMode(object) { | |
| 1497 | - return typeOf(object) === REACT_STRICT_MODE_TYPE; | |
| 1498 | - } | |
| 1499 | - function isSuspense(object) { | |
| 1500 | - return typeOf(object) === REACT_SUSPENSE_TYPE; | |
| 1501 | - } | |
| 1502 | - exports.AsyncMode = AsyncMode; | |
| 1503 | - exports.ConcurrentMode = ConcurrentMode; | |
| 1504 | - exports.ContextConsumer = ContextConsumer; | |
| 1505 | - exports.ContextProvider = ContextProvider; | |
| 1506 | - exports.Element = Element; | |
| 1507 | - exports.ForwardRef = ForwardRef; | |
| 1508 | - exports.Fragment = Fragment; | |
| 1509 | - exports.Lazy = Lazy; | |
| 1510 | - exports.Memo = Memo; | |
| 1511 | - exports.Portal = Portal; | |
| 1512 | - exports.Profiler = Profiler; | |
| 1513 | - exports.StrictMode = StrictMode; | |
| 1514 | - exports.Suspense = Suspense; | |
| 1515 | - exports.isAsyncMode = isAsyncMode; | |
| 1516 | - exports.isConcurrentMode = isConcurrentMode; | |
| 1517 | - exports.isContextConsumer = isContextConsumer; | |
| 1518 | - exports.isContextProvider = isContextProvider; | |
| 1519 | - exports.isElement = isElement; | |
| 1520 | - exports.isForwardRef = isForwardRef; | |
| 1521 | - exports.isFragment = isFragment; | |
| 1522 | - exports.isLazy = isLazy; | |
| 1523 | - exports.isMemo = isMemo; | |
| 1524 | - exports.isPortal = isPortal; | |
| 1525 | - exports.isProfiler = isProfiler; | |
| 1526 | - exports.isStrictMode = isStrictMode; | |
| 1527 | - exports.isSuspense = isSuspense; | |
| 1528 | - exports.isValidElementType = isValidElementType; | |
| 1529 | - exports.typeOf = typeOf; | |
| 1530 | - })(); | |
| 1531 | - })); | |
| 1532 | 1023 | |
| 1533 | -//#endregion | |
| 1534 | -//#region node_modules/prop-types/node_modules/react-is/index.js | |
| 1535 | - var require_react_is = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1536 | - module.exports = require_react_is_development(); | |
| 1537 | - })); | |
| 1024 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1025 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1026 | + value: true | |
| 1027 | +})); | |
| 1028 | +exports["default"] = void 0; | |
| 1029 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 1030 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1031 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1032 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1033 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1034 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1035 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1036 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1037 | +var createAtomicTabModel = function createAtomicTabModel() { | |
| 1038 | + var AtomicElementBaseModel = elementor.modules.elements.models.AtomicElementBase; | |
| 1039 | + return /*#__PURE__*/function (_AtomicElementBaseMod) { | |
| 1040 | + function AtomicTabModel() { | |
| 1041 | + (0, _classCallCheck2.default)(this, AtomicTabModel); | |
| 1042 | + return _callSuper(this, AtomicTabModel, arguments); | |
| 1043 | + } | |
| 1044 | + (0, _inherits2.default)(AtomicTabModel, _AtomicElementBaseMod); | |
| 1045 | + return (0, _createClass2.default)(AtomicTabModel, [{ | |
| 1046 | + key: "modifyDefaultChildren", | |
| 1047 | + value: function modifyDefaultChildren(elements) { | |
| 1048 | + var _this$attributes$edit; | |
| 1049 | + var _elements = (0, _slicedToArray2.default)(elements, 1), | |
| 1050 | + paragraph = _elements[0]; | |
| 1051 | + var position = (_this$attributes$edit = this.attributes.editor_settings) === null || _this$attributes$edit === void 0 ? void 0 : _this$attributes$edit.initial_position; | |
| 1052 | + paragraph.settings.paragraph = { | |
| 1053 | + $$type: 'html', | |
| 1054 | + value: "Tab ".concat(position) | |
| 1055 | + }; | |
| 1056 | + return elements; | |
| 1057 | + } | |
| 1058 | + }]); | |
| 1059 | + }(AtomicElementBaseModel); | |
| 1060 | +}; | |
| 1061 | +var _default = exports["default"] = createAtomicTabModel; | |
| 1538 | 1062 | |
| 1539 | -//#endregion | |
| 1540 | -//#region node_modules/object-assign/index.js | |
| 1541 | -/* | |
| 1542 | - object-assign | |
| 1543 | - (c) Sindre Sorhus | |
| 1544 | - @license MIT | |
| 1545 | - */ | |
| 1546 | - var require_object_assign = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1547 | - var getOwnPropertySymbols = Object.getOwnPropertySymbols; | |
| 1548 | - var hasOwnProperty = Object.prototype.hasOwnProperty; | |
| 1549 | - var propIsEnumerable = Object.prototype.propertyIsEnumerable; | |
| 1550 | - function toObject(val) { | |
| 1551 | - if (val === null || val === void 0) throw new TypeError("Object.assign cannot be called with null or undefined"); | |
| 1552 | - return Object(val); | |
| 1553 | - } | |
| 1554 | - function shouldUseNative() { | |
| 1555 | - try { | |
| 1556 | - if (!Object.assign) return false; | |
| 1557 | - var test1 = /* @__PURE__ */ new String("abc"); | |
| 1558 | - test1[5] = "de"; | |
| 1559 | - if (Object.getOwnPropertyNames(test1)[0] === "5") return false; | |
| 1560 | - var test2 = {}; | |
| 1561 | - for (var i = 0; i < 10; i++) test2["_" + String.fromCharCode(i)] = i; | |
| 1562 | - if (Object.getOwnPropertyNames(test2).map(function(n) { | |
| 1563 | - return test2[n]; | |
| 1564 | - }).join("") !== "0123456789") return false; | |
| 1565 | - var test3 = {}; | |
| 1566 | - "abcdefghijklmnopqrst".split("").forEach(function(letter) { | |
| 1567 | - test3[letter] = letter; | |
| 1568 | - }); | |
| 1569 | - if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") return false; | |
| 1570 | - return true; | |
| 1571 | - } catch (err) { | |
| 1572 | - return false; | |
| 1573 | - } | |
| 1574 | - } | |
| 1575 | - module.exports = shouldUseNative() ? Object.assign : function(target, source) { | |
| 1576 | - var from; | |
| 1577 | - var to = toObject(target); | |
| 1578 | - var symbols; | |
| 1579 | - for (var s = 1; s < arguments.length; s++) { | |
| 1580 | - from = Object(arguments[s]); | |
| 1581 | - for (var key in from) if (hasOwnProperty.call(from, key)) to[key] = from[key]; | |
| 1582 | - if (getOwnPropertySymbols) { | |
| 1583 | - symbols = getOwnPropertySymbols(from); | |
| 1584 | - for (var i = 0; i < symbols.length; i++) if (propIsEnumerable.call(from, symbols[i])) to[symbols[i]] = from[symbols[i]]; | |
| 1585 | - } | |
| 1586 | - } | |
| 1587 | - return to; | |
| 1588 | - }; | |
| 1589 | - })); | |
| 1063 | +/***/ }), | |
| 1590 | 1064 | |
| 1591 | -//#endregion | |
| 1592 | -//#region node_modules/prop-types/lib/ReactPropTypesSecret.js | |
| 1065 | +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-type.js": | |
| 1066 | +/*!************************************************************************************************************!*\ | |
| 1067 | + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-type.js ***! | |
| 1068 | + \************************************************************************************************************/ | |
| 1069 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1070 | + | |
| 1071 | +"use strict"; | |
| 1072 | + | |
| 1073 | + | |
| 1074 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1075 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1076 | + value: true | |
| 1077 | +})); | |
| 1078 | +exports["default"] = void 0; | |
| 1079 | +var _createAtomicTabView = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-tab-view */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-view.js")); | |
| 1080 | +var _createAtomicTabModel = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-tab-model */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-model.js")); | |
| 1081 | +var createAtomicTabType = function createAtomicTabType() { | |
| 1082 | + return new elementor.modules.elements.types.AtomicElementBase('e-tab', (0, _createAtomicTabView.default)(), (0, _createAtomicTabModel.default)()); | |
| 1083 | +}; | |
| 1084 | +var _default = exports["default"] = createAtomicTabType; | |
| 1085 | + | |
| 1086 | +/***/ }), | |
| 1087 | + | |
| 1088 | +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-view.js": | |
| 1089 | +/*!************************************************************************************************************!*\ | |
| 1090 | + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-view.js ***! | |
| 1091 | + \************************************************************************************************************/ | |
| 1092 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1093 | + | |
| 1094 | +"use strict"; | |
| 1095 | + | |
| 1096 | + | |
| 1097 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1098 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1099 | + value: true | |
| 1100 | +})); | |
| 1101 | +exports["default"] = void 0; | |
| 1102 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1103 | +var _readOnlyError2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/readOnlyError */ "../node_modules/@babel/runtime/helpers/readOnlyError.js")); | |
| 1104 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1105 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1106 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1107 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1108 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 1109 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1110 | +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 1111 | +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 1112 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1113 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1114 | +function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 1115 | +var createAtomicTabView = function createAtomicTabView() { | |
| 1116 | + var atomicElementBaseView = elementor.modules.elements.views.createAtomicElementBase('e-tab'); | |
| 1117 | + return /*#__PURE__*/function (_atomicElementBaseVie) { | |
| 1118 | + function AtomicTabView() { | |
| 1119 | + (0, _classCallCheck2.default)(this, AtomicTabView); | |
| 1120 | + return _callSuper(this, AtomicTabView, arguments); | |
| 1121 | + } | |
| 1122 | + (0, _inherits2.default)(AtomicTabView, _atomicElementBaseVie); | |
| 1123 | + return (0, _createClass2.default)(AtomicTabView, [{ | |
| 1124 | + key: "attributes", | |
| 1125 | + value: function attributes() { | |
| 1126 | + var attributes = _superPropGet(AtomicTabView, "attributes", this, 3)([]); | |
| 1127 | + return _objectSpread({ | |
| 1128 | + 'x-bind': 'tab', | |
| 1129 | + 'x-ref': this.model.id | |
| 1130 | + }, attributes); | |
| 1131 | + } | |
| 1132 | + }]); | |
| 1133 | + }(atomicElementBaseView); | |
| 1134 | +}; | |
| 1135 | +var _default = exports["default"] = createAtomicTabView; | |
| 1136 | + | |
| 1137 | +/***/ }), | |
| 1138 | + | |
| 1139 | +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-content-area/create-atomic-tabs-content-area-type.js": | |
| 1140 | +/*!****************************************************************************************************************************************!*\ | |
| 1141 | + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-content-area/create-atomic-tabs-content-area-type.js ***! | |
| 1142 | + \****************************************************************************************************************************************/ | |
| 1143 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1144 | + | |
| 1145 | +"use strict"; | |
| 1146 | + | |
| 1147 | + | |
| 1148 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1149 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1150 | + value: true | |
| 1151 | +})); | |
| 1152 | +exports["default"] = void 0; | |
| 1153 | +var _createAtomicTabsContentAreaView = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-tabs-content-area-view */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-content-area/create-atomic-tabs-content-area-view.js")); | |
| 1154 | +var createAtomicTabsContentAreaType = function createAtomicTabsContentAreaType() { | |
| 1155 | + var AtomicTabsContentAreaView = (0, _createAtomicTabsContentAreaView.default)(); | |
| 1156 | + return new elementor.modules.elements.types.AtomicElementBase('e-tabs-content-area', AtomicTabsContentAreaView); | |
| 1157 | +}; | |
| 1158 | +var _default = exports["default"] = createAtomicTabsContentAreaType; | |
| 1159 | + | |
| 1160 | +/***/ }), | |
| 1161 | + | |
| 1162 | +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-content-area/create-atomic-tabs-content-area-view.js": | |
| 1163 | +/*!****************************************************************************************************************************************!*\ | |
| 1164 | + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-content-area/create-atomic-tabs-content-area-view.js ***! | |
| 1165 | + \****************************************************************************************************************************************/ | |
| 1166 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1167 | + | |
| 1168 | +"use strict"; | |
| 1169 | + | |
| 1170 | + | |
| 1171 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1172 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1173 | + value: true | |
| 1174 | +})); | |
| 1175 | +exports["default"] = void 0; | |
| 1176 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1177 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1178 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1179 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1180 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1181 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1182 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1183 | +var createAtomicTabsContentAreaView = function createAtomicTabsContentAreaView() { | |
| 1184 | + var BaseView = elementor.modules.elements.views.createAtomicElementBase('e-tabs-content-area'); | |
| 1185 | + return /*#__PURE__*/function (_BaseView) { | |
| 1186 | + function AtomicTabsContentAreaView() { | |
| 1187 | + (0, _classCallCheck2.default)(this, AtomicTabsContentAreaView); | |
| 1188 | + return _callSuper(this, AtomicTabsContentAreaView, arguments); | |
| 1189 | + } | |
| 1190 | + (0, _inherits2.default)(AtomicTabsContentAreaView, _BaseView); | |
| 1191 | + return (0, _createClass2.default)(AtomicTabsContentAreaView, [{ | |
| 1192 | + key: "getChildType", | |
| 1193 | + value: function getChildType() { | |
| 1194 | + return ['e-tab-content', 'container']; | |
| 1195 | + } | |
| 1196 | + }]); | |
| 1197 | + }(BaseView); | |
| 1198 | +}; | |
| 1199 | +var _default = exports["default"] = createAtomicTabsContentAreaView; | |
| 1200 | + | |
| 1201 | +/***/ }), | |
| 1202 | + | |
| 1203 | +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-menu/create-atomic-tabs-menu-type.js": | |
| 1204 | +/*!************************************************************************************************************************!*\ | |
| 1205 | + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-menu/create-atomic-tabs-menu-type.js ***! | |
| 1206 | + \************************************************************************************************************************/ | |
| 1207 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1208 | + | |
| 1209 | +"use strict"; | |
| 1210 | + | |
| 1211 | + | |
| 1212 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1213 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1214 | + value: true | |
| 1215 | +})); | |
| 1216 | +exports["default"] = void 0; | |
| 1217 | +var _createAtomicTabsMenuView = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-tabs-menu-view */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-menu/create-atomic-tabs-menu-view.js")); | |
| 1218 | +var createAtomicTabsMenuType = function createAtomicTabsMenuType() { | |
| 1219 | + var AtomicTabsMenuView = (0, _createAtomicTabsMenuView.default)(); | |
| 1220 | + return new elementor.modules.elements.types.AtomicElementBase('e-tabs-menu', AtomicTabsMenuView); | |
| 1221 | +}; | |
| 1222 | +var _default = exports["default"] = createAtomicTabsMenuType; | |
| 1223 | + | |
| 1224 | +/***/ }), | |
| 1225 | + | |
| 1226 | +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-menu/create-atomic-tabs-menu-view.js": | |
| 1227 | +/*!************************************************************************************************************************!*\ | |
| 1228 | + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-menu/create-atomic-tabs-menu-view.js ***! | |
| 1229 | + \************************************************************************************************************************/ | |
| 1230 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1231 | + | |
| 1232 | +"use strict"; | |
| 1233 | + | |
| 1234 | + | |
| 1235 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1236 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1237 | + value: true | |
| 1238 | +})); | |
| 1239 | +exports["default"] = void 0; | |
| 1240 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1241 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1242 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1243 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1244 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1245 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1246 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1247 | +var createAtomicTabsMenuView = function createAtomicTabsMenuView() { | |
| 1248 | + var BaseView = elementor.modules.elements.views.createAtomicElementBase('e-tabs-menu'); | |
| 1249 | + return /*#__PURE__*/function (_BaseView) { | |
| 1250 | + function AtomicTabsMenuView() { | |
| 1251 | + (0, _classCallCheck2.default)(this, AtomicTabsMenuView); | |
| 1252 | + return _callSuper(this, AtomicTabsMenuView, arguments); | |
| 1253 | + } | |
| 1254 | + (0, _inherits2.default)(AtomicTabsMenuView, _BaseView); | |
| 1255 | + return (0, _createClass2.default)(AtomicTabsMenuView, [{ | |
| 1256 | + key: "getChildType", | |
| 1257 | + value: function getChildType() { | |
| 1258 | + return ['e-tab', 'container']; | |
| 1259 | + } | |
| 1260 | + }]); | |
| 1261 | + }(BaseView); | |
| 1262 | +}; | |
| 1263 | +var _default = exports["default"] = createAtomicTabsMenuView; | |
| 1264 | + | |
| 1265 | +/***/ }), | |
| 1266 | + | |
| 1267 | +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-type.js": | |
| 1268 | +/*!**************************************************************************************************************!*\ | |
| 1269 | + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-type.js ***! | |
| 1270 | + \**************************************************************************************************************/ | |
| 1271 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1272 | + | |
| 1273 | +"use strict"; | |
| 1274 | + | |
| 1275 | + | |
| 1276 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1277 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1278 | + value: true | |
| 1279 | +})); | |
| 1280 | +exports["default"] = void 0; | |
| 1281 | +var _createAtomicTabsView = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-tabs-view */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-view.js")); | |
| 1282 | +var createAtomicTabsType = function createAtomicTabsType() { | |
| 1283 | + return new elementor.modules.elements.types.AtomicElementBase('e-tabs', (0, _createAtomicTabsView.default)()); | |
| 1284 | +}; | |
| 1285 | +var _default = exports["default"] = createAtomicTabsType; | |
| 1286 | + | |
| 1287 | +/***/ }), | |
| 1288 | + | |
| 1289 | +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-view.js": | |
| 1290 | +/*!**************************************************************************************************************!*\ | |
| 1291 | + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-view.js ***! | |
| 1292 | + \**************************************************************************************************************/ | |
| 1293 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1294 | + | |
| 1295 | +"use strict"; | |
| 1296 | + | |
| 1297 | + | |
| 1298 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1299 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1300 | + value: true | |
| 1301 | +})); | |
| 1302 | +exports["default"] = void 0; | |
| 1303 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1304 | +var _readOnlyError2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/readOnlyError */ "../node_modules/@babel/runtime/helpers/readOnlyError.js")); | |
| 1305 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1306 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1307 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1308 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1309 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 1310 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1311 | +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 1312 | +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 1313 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1314 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1315 | +function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 1316 | +var createAtomicTabsView = function createAtomicTabsView() { | |
| 1317 | + var AtomicElementBaseView = elementor.modules.elements.views.createAtomicElementBase('e-tabs'); | |
| 1318 | + return /*#__PURE__*/function (_AtomicElementBaseVie) { | |
| 1319 | + function AtomicTabsView() { | |
| 1320 | + (0, _classCallCheck2.default)(this, AtomicTabsView); | |
| 1321 | + return _callSuper(this, AtomicTabsView, arguments); | |
| 1322 | + } | |
| 1323 | + (0, _inherits2.default)(AtomicTabsView, _AtomicElementBaseVie); | |
| 1324 | + return (0, _createClass2.default)(AtomicTabsView, [{ | |
| 1325 | + key: "attributes", | |
| 1326 | + value: function attributes() { | |
| 1327 | + var _this$model$getSettin; | |
| 1328 | + var defaultActiveTab = (_this$model$getSettin = this.model.getSetting('default-active-tab').value) !== null && _this$model$getSettin !== void 0 ? _this$model$getSettin : 0; | |
| 1329 | + var defaultActiveTabId = "".concat(this.model.id, "-tab-").concat(defaultActiveTab); | |
| 1330 | + var eSettings = JSON.stringify({ | |
| 1331 | + 'default-active-tab': defaultActiveTabId | |
| 1332 | + }); | |
| 1333 | + var attributes = _superPropGet(AtomicTabsView, "attributes", this, 3)([]); | |
| 1334 | + return _objectSpread({ | |
| 1335 | + 'x-data': "eTabs".concat(this.model.id), | |
| 1336 | + 'data-e-settings': eSettings | |
| 1337 | + }, attributes); | |
| 1338 | + } | |
| 1339 | + }]); | |
| 1340 | + }(AtomicElementBaseView); | |
| 1341 | +}; | |
| 1342 | +var _default = exports["default"] = createAtomicTabsView; | |
| 1343 | + | |
| 1344 | +/***/ }), | |
| 1345 | + | |
| 1346 | +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-div-block-type.js": | |
| 1347 | +/*!************************************************************************************************!*\ | |
| 1348 | + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-div-block-type.js ***! | |
| 1349 | + \************************************************************************************************/ | |
| 1350 | +/***/ ((__unused_webpack_module, exports) => { | |
| 1351 | + | |
| 1352 | +"use strict"; | |
| 1353 | + | |
| 1354 | + | |
| 1355 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1356 | + value: true | |
| 1357 | +})); | |
| 1358 | +exports["default"] = void 0; | |
| 1359 | +var createDivBlockType = function createDivBlockType() { | |
| 1360 | + var DivBlockView = elementor.modules.elements.views.createAtomicElementBase('e-div-block'); | |
| 1361 | + return new elementor.modules.elements.types.AtomicElementBase('e-div-block', DivBlockView); | |
| 1362 | +}; | |
| 1363 | +var _default = exports["default"] = createDivBlockType; | |
| 1364 | + | |
| 1365 | +/***/ }), | |
| 1366 | + | |
| 1367 | +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-flexbox-type.js": | |
| 1368 | +/*!**********************************************************************************************!*\ | |
| 1369 | + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-flexbox-type.js ***! | |
| 1370 | + \**********************************************************************************************/ | |
| 1371 | +/***/ ((__unused_webpack_module, exports) => { | |
| 1372 | + | |
| 1373 | +"use strict"; | |
| 1374 | + | |
| 1375 | + | |
| 1376 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1377 | + value: true | |
| 1378 | +})); | |
| 1379 | +exports["default"] = void 0; | |
| 1380 | +var createFlexboxType = function createFlexboxType() { | |
| 1381 | + var FlexboxView = elementor.modules.elements.views.createAtomicElementBase('e-flexbox'); | |
| 1382 | + return new elementor.modules.elements.types.AtomicElementBase('e-flexbox', FlexboxView); | |
| 1383 | +}; | |
| 1384 | +var _default = exports["default"] = createFlexboxType; | |
| 1385 | + | |
| 1386 | +/***/ }), | |
| 1387 | + | |
| 1388 | +/***/ "../modules/atomic-widgets/assets/js/editor/component.js": | |
| 1389 | +/*!***************************************************************!*\ | |
| 1390 | + !*** ../modules/atomic-widgets/assets/js/editor/component.js ***! | |
| 1391 | + \***************************************************************/ | |
| 1392 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1393 | + | |
| 1394 | +"use strict"; | |
| 1395 | + | |
| 1396 | + | |
| 1397 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1398 | +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 1399 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1400 | + value: true | |
| 1401 | +})); | |
| 1402 | +exports["default"] = void 0; | |
| 1403 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1404 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1405 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1406 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1407 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1408 | +var hooks = _interopRequireWildcard(__webpack_require__(/*! ./hooks */ "../modules/atomic-widgets/assets/js/editor/hooks/index.js")); | |
| 1409 | +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 1410 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1411 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1412 | +var Component = exports["default"] = /*#__PURE__*/function (_$e$modules$Component) { | |
| 1413 | + function Component() { | |
| 1414 | + (0, _classCallCheck2.default)(this, Component); | |
| 1415 | + return _callSuper(this, Component, arguments); | |
| 1416 | + } | |
| 1417 | + (0, _inherits2.default)(Component, _$e$modules$Component); | |
| 1418 | + return (0, _createClass2.default)(Component, [{ | |
| 1419 | + key: "getNamespace", | |
| 1420 | + value: function getNamespace() { | |
| 1421 | + return 'document/atomic-widgets'; | |
| 1422 | + } | |
| 1423 | + }, { | |
| 1424 | + key: "defaultHooks", | |
| 1425 | + value: function defaultHooks() { | |
| 1426 | + return this.importHooks(hooks); | |
| 1427 | + } | |
| 1428 | + }]); | |
| 1429 | +}($e.modules.ComponentBase); | |
| 1430 | + | |
| 1431 | +/***/ }), | |
| 1432 | + | |
| 1433 | +/***/ "../modules/atomic-widgets/assets/js/editor/container/atomic-element-empty-view.js": | |
| 1434 | +/*!*****************************************************************************************!*\ | |
| 1435 | + !*** ../modules/atomic-widgets/assets/js/editor/container/atomic-element-empty-view.js ***! | |
| 1436 | + \*****************************************************************************************/ | |
| 1437 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1438 | + | |
| 1439 | +"use strict"; | |
| 1440 | + | |
| 1441 | + | |
| 1442 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1443 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1444 | + value: true | |
| 1445 | +})); | |
| 1446 | +exports["default"] = void 0; | |
| 1447 | +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 1448 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1449 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1450 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1451 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1452 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1453 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1454 | +var _react2 = _interopRequireDefault(__webpack_require__(/*! elementor-utils/react */ "../assets/dev/js/utils/react.js")); | |
| 1455 | +var _emptyComponent = _interopRequireDefault(__webpack_require__(/*! elementor-elements/views/container/empty-component */ "../assets/dev/js/editor/elements/views/container/empty-component.js")); | |
| 1456 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1457 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1458 | +var AtomicElementEmptyView = exports["default"] = /*#__PURE__*/function (_Marionette$ItemView) { | |
| 1459 | + function AtomicElementEmptyView() { | |
| 1460 | + var _this; | |
| 1461 | + (0, _classCallCheck2.default)(this, AtomicElementEmptyView); | |
| 1462 | + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 1463 | + args[_key] = arguments[_key]; | |
| 1464 | + } | |
| 1465 | + _this = _callSuper(this, AtomicElementEmptyView, [].concat(args)); | |
| 1466 | + (0, _defineProperty2.default)(_this, "template", '<div></div>'); | |
| 1467 | + (0, _defineProperty2.default)(_this, "className", 'elementor-empty-view'); | |
| 1468 | + return _this; | |
| 1469 | + } | |
| 1470 | + (0, _inherits2.default)(AtomicElementEmptyView, _Marionette$ItemView); | |
| 1471 | + return (0, _createClass2.default)(AtomicElementEmptyView, [{ | |
| 1472 | + key: "renderReactDefaultElement", | |
| 1473 | + value: function renderReactDefaultElement(container) { | |
| 1474 | + var _ReactUtils$render = _react2.default.render(/*#__PURE__*/_react.default.createElement(_emptyComponent.default, { | |
| 1475 | + container: container | |
| 1476 | + }), this.el), | |
| 1477 | + unmount = _ReactUtils$render.unmount; | |
| 1478 | + this.unmount = unmount; | |
| 1479 | + } | |
| 1480 | + }, { | |
| 1481 | + key: "onRender", | |
| 1482 | + value: function onRender() { | |
| 1483 | + this.$el.addClass(this.className); | |
| 1484 | + this.renderReactDefaultElement(); | |
| 1485 | + } | |
| 1486 | + }, { | |
| 1487 | + key: "onDestroy", | |
| 1488 | + value: function onDestroy() { | |
| 1489 | + this.unmount(); | |
| 1490 | + } | |
| 1491 | + }]); | |
| 1492 | +}(Marionette.ItemView); | |
| 1493 | + | |
| 1494 | +/***/ }), | |
| 1495 | + | |
| 1496 | +/***/ "../modules/atomic-widgets/assets/js/editor/create-atomic-element-base-view.js": | |
| 1497 | +/*!*************************************************************************************!*\ | |
| 1498 | + !*** ../modules/atomic-widgets/assets/js/editor/create-atomic-element-base-view.js ***! | |
| 1499 | + \*************************************************************************************/ | |
| 1500 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1501 | + | |
| 1502 | +"use strict"; | |
| 1503 | +/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 1504 | +/* provided dependency */ var sprintf = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["sprintf"]; | |
| 1505 | + | |
| 1506 | + | |
| 1507 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1508 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1509 | + value: true | |
| 1510 | +})); | |
| 1511 | +exports["default"] = createAtomicElementBaseView; | |
| 1512 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 1513 | +var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js")); | |
| 1514 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 1515 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1516 | +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); | |
| 1517 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 1518 | +var _elementTypes = __webpack_require__(/*! elementor-editor/utils/element-types */ "../assets/dev/js/editor/utils/element-types.js"); | |
| 1519 | +var _atomicElementEmptyView = _interopRequireDefault(__webpack_require__(/*! ./container/atomic-element-empty-view */ "../modules/atomic-widgets/assets/js/editor/container/atomic-element-empty-view.js")); | |
| 1520 | +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 1521 | +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 1522 | +var BaseElementView = elementor.modules.elements.views.BaseElement; | |
| 1523 | +function createAtomicElementBaseView(type) { | |
| 1524 | + var resolvedTagCache = new WeakMap(); | |
| 1525 | + var AtomicElementView = BaseElementView.extend({ | |
| 1526 | + template: Marionette.TemplateCache.get("#tmpl-elementor-".concat(type, "-content")), | |
| 1527 | + emptyView: _atomicElementEmptyView.default, | |
| 1528 | + _childrenRenderPromises: [], | |
| 1529 | + tagName: function tagName() { | |
| 1530 | + var _resolvedTagCache$get; | |
| 1531 | + return (_resolvedTagCache$get = resolvedTagCache.get(this.model)) !== null && _resolvedTagCache$get !== void 0 ? _resolvedTagCache$get : this._resolveTag(); | |
| 1532 | + }, | |
| 1533 | + _resolveTag: function _resolveTag() { | |
| 1534 | + var _this$getResolverRend, _resolvedTag$value; | |
| 1535 | + var renderContext = (_this$getResolverRend = this.getResolverRenderContext) === null || _this$getResolverRend === void 0 ? void 0 : _this$getResolverRend.call(this); | |
| 1536 | + var tagSetting = this.model.getSetting('tag'); | |
| 1537 | + var resolvedTag = this._resolvePropValue(tagSetting, renderContext); | |
| 1538 | + var tagValue = (_resolvedTag$value = resolvedTag === null || resolvedTag === void 0 ? void 0 : resolvedTag.value) !== null && _resolvedTag$value !== void 0 ? _resolvedTag$value : resolvedTag; | |
| 1539 | + if (this._hasLink(renderContext)) { | |
| 1540 | + return 'a'; | |
| 1541 | + } | |
| 1542 | + return tagValue || this.model.config.default_html_tag || 'div'; | |
| 1543 | + }, | |
| 1544 | + getChildViewContainer: function getChildViewContainer() { | |
| 1545 | + this.childViewContainer = ''; | |
| 1546 | + return Marionette.CompositeView.prototype.getChildViewContainer.apply(this, arguments); | |
| 1547 | + }, | |
| 1548 | + getChildType: function getChildType() { | |
| 1549 | + var atomicElements = Object.entries(elementor.config.elements).filter(function (_ref) { | |
| 1550 | + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), | |
| 1551 | + element = _ref2[1]; | |
| 1552 | + return !!(element !== null && element !== void 0 && element.atomic_props_schema); | |
| 1553 | + }).map(function (_ref3) { | |
| 1554 | + var _ref4 = (0, _slicedToArray2.default)(_ref3, 1), | |
| 1555 | + elType = _ref4[0]; | |
| 1556 | + return elType; | |
| 1557 | + }); | |
| 1558 | + return ['widget', 'container'].concat((0, _toConsumableArray2.default)(atomicElements)); | |
| 1559 | + }, | |
| 1560 | + getRenderContext: function getRenderContext() { | |
| 1561 | + var _this$_parent, _this$_parent$getRend; | |
| 1562 | + return (_this$_parent = this._parent) === null || _this$_parent === void 0 || (_this$_parent$getRend = _this$_parent.getRenderContext) === null || _this$_parent$getRend === void 0 ? void 0 : _this$_parent$getRend.call(_this$_parent); | |
| 1563 | + }, | |
| 1564 | + getResolverRenderContext: function getResolverRenderContext() { | |
| 1565 | + var _this$_parent2, _this$_parent2$getRes; | |
| 1566 | + return (_this$_parent2 = this._parent) === null || _this$_parent2 === void 0 || (_this$_parent2$getRes = _this$_parent2.getResolverRenderContext) === null || _this$_parent2$getRes === void 0 ? void 0 : _this$_parent2$getRes.call(_this$_parent2); | |
| 1567 | + }, | |
| 1568 | + className: function className() { | |
| 1569 | + return "".concat(BaseElementView.prototype.className.apply(this), " e-con e-atomic-element ").concat(this.getClassString()); | |
| 1570 | + }, | |
| 1571 | + // TODO: Copied from `views/column.js`. | |
| 1572 | + ui: function ui() { | |
| 1573 | + var ui = BaseElementView.prototype.ui.apply(this, arguments); | |
| 1574 | + ui.percentsTooltip = '> .elementor-element-overlay .elementor-column-percents-tooltip'; | |
| 1575 | + return ui; | |
| 1576 | + }, | |
| 1577 | + attributes: function attributes() { | |
| 1578 | + var _this$model$getSettin, _this$model$getSettin2, _this$model$config$in, _this$model; | |
| 1579 | + var attr = BaseElementView.prototype.attributes.apply(this); | |
| 1580 | + var local = {}; | |
| 1581 | + var cssId = this.model.getSetting('_cssid'); | |
| 1582 | + var customAttributes = (_this$model$getSettin = (_this$model$getSettin2 = this.model.getSetting('attributes')) === null || _this$model$getSettin2 === void 0 ? void 0 : _this$model$getSettin2.value) !== null && _this$model$getSettin !== void 0 ? _this$model$getSettin : []; | |
| 1583 | + var initialAttributes = (_this$model$config$in = this === null || this === void 0 || (_this$model = this.model) === null || _this$model === void 0 || (_this$model = _this$model.config) === null || _this$model === void 0 ? void 0 : _this$model.initial_attributes) !== null && _this$model$config$in !== void 0 ? _this$model$config$in : {}; | |
| 1584 | + if (cssId) { | |
| 1585 | + local.id = cssId.value; | |
| 1586 | + } | |
| 1587 | + local['data-interaction-id'] = this.model.get('id'); | |
| 1588 | + customAttributes.forEach(function (attribute) { | |
| 1589 | + var _attribute$value, _attribute$value2; | |
| 1590 | + var key = (_attribute$value = attribute.value) === null || _attribute$value === void 0 || (_attribute$value = _attribute$value.key) === null || _attribute$value === void 0 ? void 0 : _attribute$value.value; | |
| 1591 | + var value = (_attribute$value2 = attribute.value) === null || _attribute$value2 === void 0 || (_attribute$value2 = _attribute$value2.value) === null || _attribute$value2 === void 0 ? void 0 : _attribute$value2.value; | |
| 1592 | + if (key && value) { | |
| 1593 | + local[key] = value; | |
| 1594 | + } | |
| 1595 | + }); | |
| 1596 | + return _objectSpread(_objectSpread(_objectSpread({}, attr), initialAttributes), local); | |
| 1597 | + }, | |
| 1598 | + // TODO: Copied from `views/column.js`. | |
| 1599 | + attachElContent: function attachElContent() { | |
| 1600 | + BaseElementView.prototype.attachElContent.apply(this, arguments); | |
| 1601 | + var $tooltip = jQuery('<div>', { | |
| 1602 | + class: 'elementor-column-percents-tooltip', | |
| 1603 | + 'data-side': elementorCommon.config.isRTL ? 'right' : 'left' | |
| 1604 | + }); | |
| 1605 | + this.$el.children('.elementor-element-overlay').append($tooltip); | |
| 1606 | + }, | |
| 1607 | + // TODO: Copied from `views/column.js`. | |
| 1608 | + getPercentSize: function getPercentSize(size) { | |
| 1609 | + if (!size) { | |
| 1610 | + size = this.el.getBoundingClientRect().width; | |
| 1611 | + } | |
| 1612 | + return +(size / this.$el.parent().width() * 100).toFixed(3); | |
| 1613 | + }, | |
| 1614 | + // TODO: Copied from `views/column.js`. | |
| 1615 | + getPercentsForDisplay: function getPercentsForDisplay() { | |
| 1616 | + var width = +this.model.getSetting('width') || this.getPercentSize(); | |
| 1617 | + return width.toFixed(1) + '%'; | |
| 1618 | + }, | |
| 1619 | + renderOnChange: function renderOnChange(settings) { | |
| 1620 | + var _this = this; | |
| 1621 | + var changed = settings.changedAttributes(); | |
| 1622 | + setTimeout(function () { | |
| 1623 | + _this.updateHandlesPosition(); | |
| 1624 | + }); | |
| 1625 | + if (!changed) { | |
| 1626 | + return; | |
| 1627 | + } | |
| 1628 | + BaseElementView.prototype.renderOnChange.apply(this, settings); | |
| 1629 | + if (changed.attributes) { | |
| 1630 | + var $elAttrs = this.$el[0].attributes; | |
| 1631 | + for (var i = $elAttrs.length - 1; i >= 0; i--) { | |
| 1632 | + var attrName = $elAttrs[i].name; | |
| 1633 | + if (attrName !== 'class') { | |
| 1634 | + this.$el.removeAttr(attrName); | |
| 1635 | + } | |
| 1636 | + } | |
| 1637 | + var newAttrs = this.attributes(); | |
| 1638 | + Object.entries(newAttrs).forEach(function (_ref5) { | |
| 1639 | + var _ref6 = (0, _slicedToArray2.default)(_ref5, 2), | |
| 1640 | + key = _ref6[0], | |
| 1641 | + value = _ref6[1]; | |
| 1642 | + if (key !== 'class' && value !== undefined) { | |
| 1643 | + _this.$el.attr(key, value); | |
| 1644 | + } | |
| 1645 | + }); | |
| 1646 | + return; | |
| 1647 | + } | |
| 1648 | + if (changed.classes) { | |
| 1649 | + this.$el.attr('class', this.className()); | |
| 1650 | + return; | |
| 1651 | + } | |
| 1652 | + if (changed._cssid) { | |
| 1653 | + if (changed._cssid.value) { | |
| 1654 | + this.$el.attr('id', changed._cssid.value); | |
| 1655 | + } else { | |
| 1656 | + this.$el.removeAttr('id'); | |
| 1657 | + } | |
| 1658 | + return; | |
| 1659 | + } | |
| 1660 | + this.$el.addClass(this.getClasses()); | |
| 1661 | + if (this.isTagChanged(changed)) { | |
| 1662 | + this.rerenderEntireView(); | |
| 1663 | + } | |
| 1664 | + }, | |
| 1665 | + isTagChanged: function isTagChanged(changed) { | |
| 1666 | + return ((changed === null || changed === void 0 ? void 0 : changed.tag) !== undefined || (changed === null || changed === void 0 ? void 0 : changed.link) !== undefined) && this._parent && this.tagName() !== this.el.tagName; | |
| 1667 | + }, | |
| 1668 | + rerenderEntireView: function rerenderEntireView() { | |
| 1669 | + var parent = this._parent; | |
| 1670 | + this._parent.removeChildView(this); | |
| 1671 | + parent.addChild(this.model, AtomicElementView, this._index); | |
| 1672 | + }, | |
| 1673 | + render: function render() { | |
| 1674 | + var _this2 = this; | |
| 1675 | + this._currentRenderPromise = new Promise(function (resolve) { | |
| 1676 | + // Optimize rendering by reusing existing child views instead of recreating them. | |
| 1677 | + if (_this2._shouldSkipFullRender()) { | |
| 1678 | + _this2._renderWithoutDomRecreation(resolve); | |
| 1679 | + } else { | |
| 1680 | + _this2._renderWithDomRecreation(resolve); | |
| 1681 | + } | |
| 1682 | + }); | |
| 1683 | + return this; | |
| 1684 | + }, | |
| 1685 | + _shouldSkipFullRender: function _shouldSkipFullRender() { | |
| 1686 | + var _this$children; | |
| 1687 | + return this.isRendered && ((_this$children = this.children) === null || _this$children === void 0 ? void 0 : _this$children.length) > 0; | |
| 1688 | + }, | |
| 1689 | + _renderWithoutDomRecreation: function _renderWithoutDomRecreation(resolve) { | |
| 1690 | + var _this3 = this; | |
| 1691 | + this._beforeRender(); | |
| 1692 | + this._renderChildren(); | |
| 1693 | + this._waitForChildrenToComplete().then(function () { | |
| 1694 | + _this3._afterRender(); | |
| 1695 | + resolve(); | |
| 1696 | + }); | |
| 1697 | + }, | |
| 1698 | + _renderWithDomRecreation: function _renderWithDomRecreation(resolve) { | |
| 1699 | + var _this4 = this; | |
| 1700 | + BaseElementView.prototype.render.apply(this, arguments); | |
| 1701 | + this._waitForChildrenToComplete().then(function () { | |
| 1702 | + _this4._applyResolvedAttributes(); | |
| 1703 | + resolve(); | |
| 1704 | + }); | |
| 1705 | + }, | |
| 1706 | + _beforeRender: function _beforeRender() { | |
| 1707 | + this._isRendering = true; | |
| 1708 | + this._invalidateTagCache(); | |
| 1709 | + this.triggerMethod('before:render', this); | |
| 1710 | + }, | |
| 1711 | + _invalidateTagCache: function _invalidateTagCache() { | |
| 1712 | + resolvedTagCache.delete(this.model); | |
| 1713 | + }, | |
| 1714 | + _cacheResolvedTag: function _cacheResolvedTag(tag) { | |
| 1715 | + resolvedTagCache.set(this.model, tag); | |
| 1716 | + }, | |
| 1717 | + _afterRender: function _afterRender() { | |
| 1718 | + this._isRendering = false; | |
| 1719 | + this.isRendered = true; | |
| 1720 | + this.triggerMethod('render', this); | |
| 1721 | + this._applyResolvedAttributes(); | |
| 1722 | + }, | |
| 1723 | + _applyResolvedAttributes: function _applyResolvedAttributes() { | |
| 1724 | + if (!this._parent) { | |
| 1725 | + return; | |
| 1726 | + } | |
| 1727 | + if (this._shouldRecreateForTagChange()) { | |
| 1728 | + return; | |
| 1729 | + } | |
| 1730 | + this._applyLinkAttributes(); | |
| 1731 | + }, | |
| 1732 | + _shouldRecreateForTagChange: function _shouldRecreateForTagChange() { | |
| 1733 | + var resolvedTag = this.tagName(); | |
| 1734 | + var currentTag = this.el.tagName.toLowerCase(); | |
| 1735 | + if (resolvedTag === currentTag) { | |
| 1736 | + return false; | |
| 1737 | + } | |
| 1738 | + this._cacheResolvedTag(resolvedTag); | |
| 1739 | + this.rerenderEntireView(); | |
| 1740 | + return true; | |
| 1741 | + }, | |
| 1742 | + _applyLinkAttributes: function _applyLinkAttributes() { | |
| 1743 | + this.$el.removeAttr('href'); | |
| 1744 | + this.$el.removeAttr('data-action-link'); | |
| 1745 | + var link = this.getLink(); | |
| 1746 | + if (link) { | |
| 1747 | + this.$el.attr(link.attr, link.value); | |
| 1748 | + } | |
| 1749 | + }, | |
| 1750 | + _waitForChildrenToComplete: function _waitForChildrenToComplete() { | |
| 1751 | + var _this5 = this; | |
| 1752 | + return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 1753 | + return _regenerator.default.wrap(function (_context) { | |
| 1754 | + while (1) switch (_context.prev = _context.next) { | |
| 1755 | + case 0: | |
| 1756 | + if (!(_this5._childrenRenderPromises.length > 0)) { | |
| 1757 | + _context.next = 1; | |
| 1758 | + break; | |
| 1759 | + } | |
| 1760 | + _context.next = 1; | |
| 1761 | + return Promise.all(_this5._childrenRenderPromises); | |
| 1762 | + case 1: | |
| 1763 | + case "end": | |
| 1764 | + return _context.stop(); | |
| 1765 | + } | |
| 1766 | + }, _callee); | |
| 1767 | + }))(); | |
| 1768 | + }, | |
| 1769 | + _renderChildren: function _renderChildren() { | |
| 1770 | + if (this._shouldSkipFullRender()) { | |
| 1771 | + var _this$children2; | |
| 1772 | + (_this$children2 = this.children) === null || _this$children2 === void 0 || _this$children2.each(function (childView) { | |
| 1773 | + return childView.render(); | |
| 1774 | + }); | |
| 1775 | + } else { | |
| 1776 | + BaseElementView.prototype._renderChildren.apply(this, arguments); | |
| 1777 | + } | |
| 1778 | + this._collectChildrenRenderPromises(); | |
| 1779 | + }, | |
| 1780 | + _collectChildrenRenderPromises: function _collectChildrenRenderPromises() { | |
| 1781 | + var _this$children3, | |
| 1782 | + _this6 = this; | |
| 1783 | + this._childrenRenderPromises = []; | |
| 1784 | + (_this$children3 = this.children) === null || _this$children3 === void 0 || _this$children3.each(function (childView) { | |
| 1785 | + if (childView._currentRenderPromise) { | |
| 1786 | + _this6._childrenRenderPromises.push(childView._currentRenderPromise); | |
| 1787 | + } | |
| 1788 | + }); | |
| 1789 | + }, | |
| 1790 | + onRender: function onRender() { | |
| 1791 | + var _this7 = this; | |
| 1792 | + this.dispatchPreviewEvent('elementor/element/render'); | |
| 1793 | + BaseElementView.prototype.onRender.apply(this, arguments); | |
| 1794 | + | |
| 1795 | + // Defer to wait for everything to render. | |
| 1796 | + setTimeout(function () { | |
| 1797 | + _this7.droppableInitialize(); | |
| 1798 | + _this7.updateHandlesPosition(); | |
| 1799 | + }); | |
| 1800 | + }, | |
| 1801 | + onDestroy: function onDestroy() { | |
| 1802 | + BaseElementView.prototype.onDestroy.apply(this, arguments); | |
| 1803 | + this.dispatchPreviewEvent('elementor/element/destroy'); | |
| 1804 | + }, | |
| 1805 | + dispatchPreviewEvent: function dispatchPreviewEvent(eventType) { | |
| 1806 | + var _elementor; | |
| 1807 | + (_elementor = elementor) === null || _elementor === void 0 || (_elementor = _elementor.$preview) === null || _elementor === void 0 || (_elementor = _elementor[0]) === null || _elementor === void 0 || _elementor.contentWindow.dispatchEvent(new CustomEvent(eventType, { | |
| 1808 | + detail: { | |
| 1809 | + id: this.model.get('id'), | |
| 1810 | + type: this.model.get('elType'), | |
| 1811 | + element: this.getDomElement().get(0) | |
| 1812 | + } | |
| 1813 | + })); | |
| 1814 | + }, | |
| 1815 | + _hasLink: function _hasLink(renderContext) { | |
| 1816 | + var _resolvedLink$value; | |
| 1817 | + var linkSetting = this.model.getSetting('link'); | |
| 1818 | + var resolvedLink = this._resolvePropValue(linkSetting, renderContext); | |
| 1819 | + if ('link' !== (resolvedLink === null || resolvedLink === void 0 ? void 0 : resolvedLink.$$type)) { | |
| 1820 | + return false; | |
| 1821 | + } | |
| 1822 | + var destination = this._resolvePropValue((_resolvedLink$value = resolvedLink.value) === null || _resolvedLink$value === void 0 ? void 0 : _resolvedLink$value.destination, renderContext); | |
| 1823 | + return !!(destination !== null && destination !== void 0 && destination.value); | |
| 1824 | + }, | |
| 1825 | + getLink: function getLink() { | |
| 1826 | + var _this$getResolverRend2, _resolvedLink$value2; | |
| 1827 | + var renderContext = (_this$getResolverRend2 = this.getResolverRenderContext) === null || _this$getResolverRend2 === void 0 ? void 0 : _this$getResolverRend2.call(this); | |
| 1828 | + var linkSetting = this.model.getSetting('link'); | |
| 1829 | + var resolvedLink = this._resolvePropValue(linkSetting, renderContext); | |
| 1830 | + if ('link' !== (resolvedLink === null || resolvedLink === void 0 ? void 0 : resolvedLink.$$type)) { | |
| 1831 | + return null; | |
| 1832 | + } | |
| 1833 | + var destination = this._resolvePropValue((_resolvedLink$value2 = resolvedLink.value) === null || _resolvedLink$value2 === void 0 ? void 0 : _resolvedLink$value2.destination, renderContext); | |
| 1834 | + if (!(destination !== null && destination !== void 0 && destination.value)) { | |
| 1835 | + return null; | |
| 1836 | + } | |
| 1837 | + var $$type = destination.$$type, | |
| 1838 | + value = destination.value; | |
| 1839 | + if ('dynamic' === $$type) { | |
| 1840 | + var _value$settings; | |
| 1841 | + var resolvedValue = this.handleDynamicLink(value); | |
| 1842 | + if (!resolvedValue) { | |
| 1843 | + return null; | |
| 1844 | + } | |
| 1845 | + return { | |
| 1846 | + attr: 'action' === ((_value$settings = value.settings) === null || _value$settings === void 0 ? void 0 : _value$settings.group) ? 'data-action-link' : 'href', | |
| 1847 | + value: resolvedValue | |
| 1848 | + }; | |
| 1849 | + } | |
| 1850 | + var isPostId = 'number' === $$type; | |
| 1851 | + var hrefPrefix = isPostId ? elementor.config.home_url + '/?p=' : ''; | |
| 1852 | + return { | |
| 1853 | + attr: 'href', | |
| 1854 | + value: hrefPrefix + value | |
| 1855 | + }; | |
| 1856 | + }, | |
| 1857 | + droppableInitialize: function droppableInitialize() { | |
| 1858 | + this.$el.html5Droppable(this.getDroppableOptions()); | |
| 1859 | + }, | |
| 1860 | + /** | |
| 1861 | + * Add a `Save as a Template` button to the context menu. | |
| 1862 | + * | |
| 1863 | + * @return {Object} groups | |
| 1864 | + */ | |
| 1865 | + getContextMenuGroups: function getContextMenuGroups() { | |
| 1866 | + var _this8 = this, | |
| 1867 | + _elementorCommon$conf; | |
| 1868 | + var saveActions = [{ | |
| 1869 | + name: 'save', | |
| 1870 | + title: __('Save as a template', 'elementor'), | |
| 1871 | + callback: this.saveAsTemplate.bind(this), | |
| 1872 | + isEnabled: function isEnabled() { | |
| 1873 | + return !_this8.getContainer().isLocked(); | |
| 1874 | + } | |
| 1875 | + }]; | |
| 1876 | + var isAdministrator = elementor.config.user.is_administrator; | |
| 1877 | + var isExperimentalFeaturesEnabled = (_elementorCommon$conf = elementorCommon.config.experimentalFeatures) === null || _elementorCommon$conf === void 0 ? void 0 : _elementorCommon$conf.e_components; | |
| 1878 | + if (isExperimentalFeaturesEnabled && isAdministrator) { | |
| 1879 | + saveActions.unshift({ | |
| 1880 | + name: 'save-component', | |
| 1881 | + title: __('Create component', 'elementor'), | |
| 1882 | + shortcut: "<span class=\"elementor-context-menu-list__item__shortcut__new-badge\">".concat(__('New', 'elementor'), "</span>"), | |
| 1883 | + callback: this.saveAsComponent.bind(this), | |
| 1884 | + isEnabled: function isEnabled() { | |
| 1885 | + return !_this8.getContainer().isLocked(); | |
| 1886 | + } | |
| 1887 | + }); | |
| 1888 | + } | |
| 1889 | + var groups = BaseElementView.prototype.getContextMenuGroups.apply(this, arguments), | |
| 1890 | + transferGroupClipboardIndex = groups.indexOf(_.findWhere(groups, { | |
| 1891 | + name: 'clipboard' | |
| 1892 | + })); | |
| 1893 | + groups.splice(transferGroupClipboardIndex + 1, 0, { | |
| 1894 | + name: 'save', | |
| 1895 | + actions: saveActions | |
| 1896 | + }); | |
| 1897 | + return groups; | |
| 1898 | + }, | |
| 1899 | + saveAsTemplate: function saveAsTemplate() { | |
| 1900 | + elementor.templates.eventManager.sendNewSaveTemplateClickedEvent(); | |
| 1901 | + $e.route('library/save-template', { | |
| 1902 | + model: this.model | |
| 1903 | + }); | |
| 1904 | + }, | |
| 1905 | + saveAsComponent: function saveAsComponent(openContextMenuEvent, options) { | |
| 1906 | + // Calculate the absolute position where the context menu was opened. | |
| 1907 | + var openMenuOriginalEvent = openContextMenuEvent.originalEvent; | |
| 1908 | + var iframeRect = elementor.$preview[0].getBoundingClientRect(); | |
| 1909 | + var anchorPosition = { | |
| 1910 | + left: openMenuOriginalEvent.clientX + iframeRect.left, | |
| 1911 | + top: openMenuOriginalEvent.clientY + iframeRect.top | |
| 1912 | + }; | |
| 1913 | + window.dispatchEvent(new CustomEvent('elementor/editor/open-save-as-component-form', { | |
| 1914 | + detail: { | |
| 1915 | + element: elementor.getContainer(this.model.id).model.toJSON({ | |
| 1916 | + remove: ['default'] | |
| 1917 | + }), | |
| 1918 | + anchorPosition: anchorPosition, | |
| 1919 | + options: options | |
| 1920 | + } | |
| 1921 | + })); | |
| 1922 | + }, | |
| 1923 | + isDroppingAllowed: function isDroppingAllowed() { | |
| 1924 | + return this.getContainer().isEditable(); | |
| 1925 | + }, | |
| 1926 | + behaviors: function behaviors() { | |
| 1927 | + var behaviors = BaseElementView.prototype.behaviors.apply(this, arguments); | |
| 1928 | + _.extend(behaviors, { | |
| 1929 | + Sortable: { | |
| 1930 | + behaviorClass: __webpack_require__(/*! elementor-behaviors/sortable */ "../assets/dev/js/editor/elements/views/behaviors/sortable.js"), | |
| 1931 | + elChildType: 'widget' | |
| 1932 | + } | |
| 1933 | + }); | |
| 1934 | + return elementor.hooks.applyFilters("elements/".concat(type, "/behaviors"), behaviors, this); | |
| 1935 | + }, | |
| 1936 | + /** | |
| 1937 | + * @return {{}} options | |
| 1938 | + */ | |
| 1939 | + getSortableOptions: function getSortableOptions() { | |
| 1940 | + return { | |
| 1941 | + preventInit: true | |
| 1942 | + }; | |
| 1943 | + }, | |
| 1944 | + getDroppableOptions: function getDroppableOptions() { | |
| 1945 | + var _this9 = this; | |
| 1946 | + var items = '> .elementor-element, > .elementor-empty-view .elementor-first-add'; | |
| 1947 | + return { | |
| 1948 | + axis: null, | |
| 1949 | + items: items, | |
| 1950 | + groups: ['elementor-element'], | |
| 1951 | + horizontalThreshold: 0, | |
| 1952 | + isDroppingAllowed: this.isDroppingAllowed.bind(this), | |
| 1953 | + currentElementClass: 'elementor-html5dnd-current-element', | |
| 1954 | + placeholderClass: 'elementor-sortable-placeholder elementor-widget-placeholder', | |
| 1955 | + hasDraggingOnChildClass: 'e-dragging-over', | |
| 1956 | + getDropContainer: function getDropContainer() { | |
| 1957 | + return _this9.getContainer(); | |
| 1958 | + }, | |
| 1959 | + onDropping: function onDropping(side, event) { | |
| 1960 | + event.stopPropagation(); | |
| 1961 | + | |
| 1962 | + // Triggering the drag end manually, since it won't fire above the iframe | |
| 1963 | + elementor.getPreviewView().onPanelElementDragEnd(); | |
| 1964 | + var draggedView = elementor.channels.editor.request('element:dragged'), | |
| 1965 | + draggedElement = draggedView === null || draggedView === void 0 ? void 0 : draggedView.getContainer().view.el, | |
| 1966 | + containerElement = event.currentTarget.parentElement, | |
| 1967 | + elements = Array.from((containerElement === null || containerElement === void 0 ? void 0 : containerElement.querySelectorAll(':scope > .elementor-element')) || []); | |
| 1968 | + var targetIndex = elements.indexOf(event.currentTarget); | |
| 1969 | + if (_this9.isPanelElement(draggedView, draggedElement)) { | |
| 1970 | + var _elementorCommon; | |
| 1971 | + if (_this9.draggingOnBottomOrRightSide(side) && !_this9.emptyViewIsCurrentlyBeingDraggedOver()) { | |
| 1972 | + targetIndex++; | |
| 1973 | + } | |
| 1974 | + _this9.onDrop(event, { | |
| 1975 | + at: targetIndex | |
| 1976 | + }); | |
| 1977 | + if ((_elementorCommon = elementorCommon) !== null && _elementorCommon !== void 0 && (_elementorCommon = _elementorCommon.eventsManager) !== null && _elementorCommon !== void 0 && _elementorCommon.dispatchEvent) { | |
| 1978 | + var selectedElement = elementor.channels.panelElements.request('element:selected'); | |
| 1979 | + if (selectedElement) { | |
| 1980 | + var _selectedElement$mode, _selectedElement$mode2, _selectedElement$mode3, _selectedElement$mode4; | |
| 1981 | + var elType = (_selectedElement$mode = (_selectedElement$mode2 = selectedElement.model) === null || _selectedElement$mode2 === void 0 ? void 0 : _selectedElement$mode2.get('elType')) !== null && _selectedElement$mode !== void 0 ? _selectedElement$mode : ''; | |
| 1982 | + var widgetType = (_selectedElement$mode3 = (_selectedElement$mode4 = selectedElement.model) === null || _selectedElement$mode4 === void 0 ? void 0 : _selectedElement$mode4.get('widgetType')) !== null && _selectedElement$mode3 !== void 0 ? _selectedElement$mode3 : ''; | |
| 1983 | + var elementName = 'widget' === elType ? widgetType : elType; | |
| 1984 | + elementorCommon.eventsManager.dispatchEvent('add_element', { | |
| 1985 | + location: 'editor_panel', | |
| 1986 | + element_name: elementName, | |
| 1987 | + element_type: elType, | |
| 1988 | + widget_type: widgetType | |
| 1989 | + }); | |
| 1990 | + } | |
| 1991 | + } | |
| 1992 | + return; | |
| 1993 | + } | |
| 1994 | + if (_this9.isParentElement(draggedView.getContainer().id)) { | |
| 1995 | + return; | |
| 1996 | + } | |
| 1997 | + if (_this9.emptyViewIsCurrentlyBeingDraggedOver()) { | |
| 1998 | + _this9.moveDroppedItem(draggedView, 0); | |
| 1999 | + return; | |
| 2000 | + } | |
| 2001 | + _this9.moveExistingElement(side, draggedView, containerElement, elements, targetIndex, draggedElement); | |
| 2002 | + } | |
| 2003 | + }; | |
| 2004 | + }, | |
| 2005 | + moveExistingElement: function moveExistingElement(side, draggedView, containerElement, elements, targetIndex, draggedElement) { | |
| 2006 | + var selfIndex = elements.indexOf(draggedElement); | |
| 2007 | + if (targetIndex === selfIndex) { | |
| 2008 | + return; | |
| 2009 | + } | |
| 2010 | + var dropIndex = this.getDropIndex(containerElement, side, targetIndex, selfIndex); | |
| 2011 | + this.moveDroppedItem(draggedView, dropIndex); | |
| 2012 | + }, | |
| 2013 | + isPanelElement: function isPanelElement(draggedView, draggedElement) { | |
| 2014 | + return !draggedView || !draggedElement; | |
| 2015 | + }, | |
| 2016 | + isParentElement: function isParentElement(draggedId) { | |
| 2017 | + var current = this.container; | |
| 2018 | + while (current) { | |
| 2019 | + if (current.id === draggedId) { | |
| 2020 | + return true; | |
| 2021 | + } | |
| 2022 | + current = current.parent; | |
| 2023 | + } | |
| 2024 | + return false; | |
| 2025 | + }, | |
| 2026 | + getDropIndex: function getDropIndex(container, side, index, selfIndex) { | |
| 2027 | + var styles = window.getComputedStyle(container); | |
| 2028 | + var isFlex = ['flex', 'inline-flex'].includes(styles.display); | |
| 2029 | + var isFlexReverse = isFlex && ['column-reverse', 'row-reverse'].includes(styles.flexDirection); | |
| 2030 | + var isRow = isFlex && ['row-reverse', 'row'].includes(styles.flexDirection); | |
| 2031 | + var isRtl = elementorCommon.config.isRTL; | |
| 2032 | + var isReverse = isRow ? isFlexReverse !== isRtl : isFlexReverse; | |
| 2033 | + | |
| 2034 | + // The element should be placed BEFORE the current target | |
| 2035 | + // if is reversed + side is bottom/right OR not is reversed + side is top/left | |
| 2036 | + if (isReverse === this.draggingOnBottomOrRightSide(side)) { | |
| 2037 | + if (-1 === selfIndex || selfIndex >= index - 1) { | |
| 2038 | + return index; | |
| 2039 | + } | |
| 2040 | + return index > 0 ? index - 1 : 0; | |
| 2041 | + } | |
| 2042 | + if (0 <= selfIndex && selfIndex < index) { | |
| 2043 | + return index; | |
| 2044 | + } | |
| 2045 | + return index + 1; | |
| 2046 | + }, | |
| 2047 | + moveDroppedItem: function moveDroppedItem(draggedView, dropIndex) { | |
| 2048 | + // Reset the dragged element cache. | |
| 2049 | + elementor.channels.editor.reply('element:dragged', null); | |
| 2050 | + $e.run('document/elements/move', { | |
| 2051 | + container: draggedView.getContainer(), | |
| 2052 | + target: this.getContainer(), | |
| 2053 | + options: { | |
| 2054 | + at: dropIndex | |
| 2055 | + } | |
| 2056 | + }); | |
| 2057 | + }, | |
| 2058 | + getEditButtons: function getEditButtons() { | |
| 2059 | + var elementData = elementor.getElementData(this.model), | |
| 2060 | + editTools = {}; | |
| 2061 | + if ($e.components.get('document/elements').utils.allowAddingWidgets()) { | |
| 2062 | + editTools.add = { | |
| 2063 | + /* Translators: %s: Element Name. */ | |
| 2064 | + title: sprintf(__('Add %s', 'elementor'), elementData.title), | |
| 2065 | + icon: 'plus' | |
| 2066 | + }; | |
| 2067 | + editTools.edit = { | |
| 2068 | + /* Translators: %s: Element Name. */ | |
| 2069 | + title: sprintf(__('Edit %s', 'elementor'), elementData.title), | |
| 2070 | + icon: 'handle' | |
| 2071 | + }; | |
| 2072 | + } | |
| 2073 | + if (!this.getContainer().isLocked()) { | |
| 2074 | + if (elementor.getPreferences('edit_buttons') && $e.components.get('document/elements').utils.allowAddingWidgets()) { | |
| 2075 | + editTools.duplicate = { | |
| 2076 | + /* Translators: %s: Element Name. */ | |
| 2077 | + title: sprintf(__('Duplicate %s', 'elementor'), elementData.title), | |
| 2078 | + icon: 'clone' | |
| 2079 | + }; | |
| 2080 | + } | |
| 2081 | + editTools.remove = { | |
| 2082 | + /* Translators: %s: Element Name. */ | |
| 2083 | + title: sprintf(__('Delete %s', 'elementor'), elementData.title), | |
| 2084 | + icon: 'close' | |
| 2085 | + }; | |
| 2086 | + } | |
| 2087 | + return editTools; | |
| 2088 | + }, | |
| 2089 | + draggingOnBottomOrRightSide: function draggingOnBottomOrRightSide(side) { | |
| 2090 | + return ['bottom', 'right'].includes(side); | |
| 2091 | + }, | |
| 2092 | + emptyViewIsCurrentlyBeingDraggedOver: function emptyViewIsCurrentlyBeingDraggedOver() { | |
| 2093 | + return this.$el.find('> .elementor-empty-view > .elementor-first-add.elementor-html5dnd-current-element').length > 0; | |
| 2094 | + }, | |
| 2095 | + /** | |
| 2096 | + * Toggle the `New Section` view when clicking the `add` button in the edit tools. | |
| 2097 | + * | |
| 2098 | + * @return {void} | |
| 2099 | + */ | |
| 2100 | + onAddButtonClick: function onAddButtonClick() { | |
| 2101 | + if (this.addSectionView && !this.addSectionView.isDestroyed) { | |
| 2102 | + this.addSectionView.fadeToDeath(); | |
| 2103 | + return; | |
| 2104 | + } | |
| 2105 | + var addSectionView = new elementor.modules.elements.components.AddSectionView({ | |
| 2106 | + at: this.model.collection.indexOf(this.model) | |
| 2107 | + }); | |
| 2108 | + addSectionView.render(); | |
| 2109 | + this.$el.before(addSectionView.$el); | |
| 2110 | + addSectionView.$el.hide(); | |
| 2111 | + | |
| 2112 | + // Delaying the slide down for slow-render browsers (such as FF) | |
| 2113 | + setTimeout(function () { | |
| 2114 | + addSectionView.$el.slideDown(null, function () { | |
| 2115 | + // Remove inline style, for preview mode. | |
| 2116 | + jQuery(this).css('display', ''); | |
| 2117 | + }); | |
| 2118 | + }); | |
| 2119 | + this.addSectionView = addSectionView; | |
| 2120 | + }, | |
| 2121 | + getClasses: function getClasses() { | |
| 2122 | + var _window, _window$get, _this$options; | |
| 2123 | + var transformer = (_window = window) === null || _window === void 0 || (_window = _window.elementorV2) === null || _window === void 0 || (_window = _window.editorCanvas) === null || _window === void 0 || (_window = _window.settingsTransformersRegistry) === null || _window === void 0 || (_window$get = _window.get) === null || _window$get === void 0 ? void 0 : _window$get.call(_window, 'classes'); | |
| 2124 | + if (!transformer) { | |
| 2125 | + return []; | |
| 2126 | + } | |
| 2127 | + return transformer(((_this$options = this.options) === null || _this$options === void 0 || (_this$options = _this$options.model) === null || _this$options === void 0 || (_this$options = _this$options.getSetting('classes')) === null || _this$options === void 0 ? void 0 : _this$options.value) || []); | |
| 2128 | + }, | |
| 2129 | + getClassString: function getClassString() { | |
| 2130 | + var classes = this.getClasses(); | |
| 2131 | + var base = this.getBaseClass(); | |
| 2132 | + return [base].concat((0, _toConsumableArray2.default)(classes)).join(' '); | |
| 2133 | + }, | |
| 2134 | + getBaseClass: function getBaseClass() { | |
| 2135 | + var _this$options2, _Object$keys$; | |
| 2136 | + var baseStyles = elementor.helpers.getAtomicWidgetBaseStyles((_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.model); | |
| 2137 | + return (_Object$keys$ = Object.keys(baseStyles !== null && baseStyles !== void 0 ? baseStyles : {})[0]) !== null && _Object$keys$ !== void 0 ? _Object$keys$ : ''; | |
| 2138 | + }, | |
| 2139 | + isOverflowHidden: function isOverflowHidden() { | |
| 2140 | + var elementStyles = window.getComputedStyle(this.el); | |
| 2141 | + var overflowStyles = [elementStyles.overflowX, elementStyles.overflowY, elementStyles.overflow]; | |
| 2142 | + return overflowStyles.includes('hidden') || overflowStyles.includes('auto'); | |
| 2143 | + }, | |
| 2144 | + updateHandlesPosition: function updateHandlesPosition() { | |
| 2145 | + var elementType = this.$el.data('element_type'); | |
| 2146 | + var isElement = (0, _elementTypes.getAllElementTypes)().includes(elementType); | |
| 2147 | + if (!isElement) { | |
| 2148 | + return; | |
| 2149 | + } | |
| 2150 | + var shouldPlaceInside = this.isOverflowHidden(); | |
| 2151 | + if (!shouldPlaceInside && this.isTopLevelElement() && this.isFirstElementInStructure()) { | |
| 2152 | + shouldPlaceInside = true; | |
| 2153 | + } | |
| 2154 | + this.$el.toggleClass('e-handles-inside', shouldPlaceInside); | |
| 2155 | + }, | |
| 2156 | + isTopLevelElement: function isTopLevelElement() { | |
| 2157 | + return this.container.parent && 'document' === this.container.parent.id; | |
| 2158 | + }, | |
| 2159 | + isFirstElementInStructure: function isFirstElementInStructure() { | |
| 2160 | + if (!this.model.collection) { | |
| 2161 | + return true; | |
| 2162 | + } | |
| 2163 | + return 0 === this.model.collection.indexOf(this.model); | |
| 2164 | + }, | |
| 2165 | + getDynamicLinkValue: function getDynamicLinkValue(name, settings) { | |
| 2166 | + var simpleTransform = function simpleTransform(props) { | |
| 2167 | + var transformed = Object.entries(props).map(function (_ref7) { | |
| 2168 | + var _ref8 = (0, _slicedToArray2.default)(_ref7, 2), | |
| 2169 | + settingKey = _ref8[0], | |
| 2170 | + settingValue = _ref8[1]; | |
| 2171 | + var value = 'object' === (0, _typeof2.default)(settingValue) && 'value' in settingValue ? settingValue.value : settingValue; | |
| 2172 | + return [settingKey, value]; | |
| 2173 | + }); | |
| 2174 | + return Object.fromEntries(transformed); | |
| 2175 | + }; | |
| 2176 | + var getTagValue = function getTagValue() { | |
| 2177 | + var _elementor$dynamicTag; | |
| 2178 | + var tag = elementor.dynamicTags.createTag('v4-dynamic-tag', name, simpleTransform(settings)); | |
| 2179 | + if (!tag) { | |
| 2180 | + return null; | |
| 2181 | + } | |
| 2182 | + return (_elementor$dynamicTag = elementor.dynamicTags.loadTagDataFromCache(tag)) !== null && _elementor$dynamicTag !== void 0 ? _elementor$dynamicTag : null; | |
| 2183 | + }; | |
| 2184 | + var tagValue = getTagValue(); | |
| 2185 | + if (tagValue !== null) { | |
| 2186 | + return tagValue; | |
| 2187 | + } | |
| 2188 | + return new Promise(function (resolve) { | |
| 2189 | + elementor.dynamicTags.refreshCacheFromServer(function () { | |
| 2190 | + resolve(getTagValue()); | |
| 2191 | + }); | |
| 2192 | + }); | |
| 2193 | + }, | |
| 2194 | + handleDynamicLink: function handleDynamicLink(linkValue) { | |
| 2195 | + var _this0 = this; | |
| 2196 | + var result = this.getDynamicLinkValue(linkValue.name, linkValue.settings); | |
| 2197 | + if (!result) { | |
| 2198 | + return null; | |
| 2199 | + } | |
| 2200 | + if ('string' === typeof result) { | |
| 2201 | + return result; | |
| 2202 | + } | |
| 2203 | + result.then(function (href) { | |
| 2204 | + _this0.el.removeAttribute('href'); | |
| 2205 | + var attribute = 'action' === linkValue.group ? 'data-action-link' : 'href'; | |
| 2206 | + _this0.el.setAttribute(attribute, href); | |
| 2207 | + }).then(function () { | |
| 2208 | + return _this0.dispatchPreviewEvent('elementor/element/render'); | |
| 2209 | + }); | |
| 2210 | + return null; | |
| 2211 | + }, | |
| 2212 | + _resolvePropValue: function _resolvePropValue(prop, renderContext) { | |
| 2213 | + var _window2, _registry$get; | |
| 2214 | + if (!prop || (0, _typeof2.default)(prop) !== 'object') { | |
| 2215 | + return prop; | |
| 2216 | + } | |
| 2217 | + if ('overridable' !== prop.$$type) { | |
| 2218 | + return prop; | |
| 2219 | + } | |
| 2220 | + var registry = (_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.elementorV2) === null || _window2 === void 0 || (_window2 = _window2.editorCanvas) === null || _window2 === void 0 ? void 0 : _window2.settingsTransformersRegistry; | |
| 2221 | + var transformer = registry === null || registry === void 0 || (_registry$get = registry.get) === null || _registry$get === void 0 ? void 0 : _registry$get.call(registry, 'overridable'); | |
| 2222 | + if (!transformer) { | |
| 2223 | + var _prop$value; | |
| 2224 | + return (_prop$value = prop.value) === null || _prop$value === void 0 ? void 0 : _prop$value.origin_value; | |
| 2225 | + } | |
| 2226 | + var transformed = transformer(prop.value, { | |
| 2227 | + key: 'overridable', | |
| 2228 | + renderContext: renderContext | |
| 2229 | + }); | |
| 2230 | + return this._resolvePropValue(transformed, renderContext); | |
| 2231 | + } | |
| 2232 | + }); | |
| 2233 | + return AtomicElementView; | |
| 2234 | +} | |
| 2235 | + | |
| 2236 | +/***/ }), | |
| 2237 | + | |
| 2238 | +/***/ "../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/duplicate-element.js": | |
| 2239 | +/*!*************************************************************************************************************!*\ | |
| 2240 | + !*** ../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/duplicate-element.js ***! | |
| 2241 | + \*************************************************************************************************************/ | |
| 2242 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2243 | + | |
| 2244 | +"use strict"; | |
| 2245 | + | |
| 2246 | + | |
| 2247 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2248 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2249 | + value: true | |
| 2250 | +})); | |
| 2251 | +exports.DuplicateElement = void 0; | |
| 2252 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2253 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2254 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2255 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2256 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2257 | +var _regenerateLocalStyleIds = __webpack_require__(/*! ../../../utils/regenerate-local-style-ids */ "../modules/atomic-widgets/assets/js/editor/utils/regenerate-local-style-ids.js"); | |
| 2258 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2259 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2260 | +var DuplicateElement = exports.DuplicateElement = /*#__PURE__*/function (_$e$modules$hookData$) { | |
| 2261 | + function DuplicateElement() { | |
| 2262 | + (0, _classCallCheck2.default)(this, DuplicateElement); | |
| 2263 | + return _callSuper(this, DuplicateElement, arguments); | |
| 2264 | + } | |
| 2265 | + (0, _inherits2.default)(DuplicateElement, _$e$modules$hookData$); | |
| 2266 | + return (0, _createClass2.default)(DuplicateElement, [{ | |
| 2267 | + key: "getCommand", | |
| 2268 | + value: function getCommand() { | |
| 2269 | + return 'document/elements/duplicate'; | |
| 2270 | + } | |
| 2271 | + }, { | |
| 2272 | + key: "getId", | |
| 2273 | + value: function getId() { | |
| 2274 | + return 'regenerate-local-style-ids--document/elements/duplicate'; | |
| 2275 | + } | |
| 2276 | + }, { | |
| 2277 | + key: "apply", | |
| 2278 | + value: function apply(args, result) { | |
| 2279 | + var containers = Array.isArray(result) ? result : [result]; | |
| 2280 | + containers.forEach(_regenerateLocalStyleIds.regenerateLocalStyleIds); | |
| 2281 | + } | |
| 2282 | + }]); | |
| 2283 | +}($e.modules.hookData.After); | |
| 2284 | + | |
| 2285 | +/***/ }), | |
| 2286 | + | |
| 2287 | +/***/ "../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/import-element.js": | |
| 2288 | +/*!**********************************************************************************************************!*\ | |
| 2289 | + !*** ../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/import-element.js ***! | |
| 2290 | + \**********************************************************************************************************/ | |
| 2291 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2292 | + | |
| 2293 | +"use strict"; | |
| 2294 | + | |
| 2295 | + | |
| 2296 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2297 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2298 | + value: true | |
| 2299 | +})); | |
| 2300 | +exports.ImportElement = void 0; | |
| 2301 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2302 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2303 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2304 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2305 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2306 | +var _regenerateLocalStyleIds = __webpack_require__(/*! ../../../utils/regenerate-local-style-ids */ "../modules/atomic-widgets/assets/js/editor/utils/regenerate-local-style-ids.js"); | |
| 2307 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2308 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2309 | +var ImportElement = exports.ImportElement = /*#__PURE__*/function (_$e$modules$hookData$) { | |
| 2310 | + function ImportElement() { | |
| 2311 | + (0, _classCallCheck2.default)(this, ImportElement); | |
| 2312 | + return _callSuper(this, ImportElement, arguments); | |
| 2313 | + } | |
| 2314 | + (0, _inherits2.default)(ImportElement, _$e$modules$hookData$); | |
| 2315 | + return (0, _createClass2.default)(ImportElement, [{ | |
| 2316 | + key: "getCommand", | |
| 2317 | + value: function getCommand() { | |
| 2318 | + return 'document/elements/import'; | |
| 2319 | + } | |
| 2320 | + }, { | |
| 2321 | + key: "getId", | |
| 2322 | + value: function getId() { | |
| 2323 | + return 'regenerate-local-style-ids--document/elements/import'; | |
| 2324 | + } | |
| 2325 | + }, { | |
| 2326 | + key: "apply", | |
| 2327 | + value: function apply(args, result) { | |
| 2328 | + var containers = Array.isArray(result) ? result : [result]; | |
| 2329 | + containers.forEach(_regenerateLocalStyleIds.regenerateLocalStyleIds); | |
| 2330 | + } | |
| 2331 | + }]); | |
| 2332 | +}($e.modules.hookData.After); | |
| 2333 | + | |
| 2334 | +/***/ }), | |
| 2335 | + | |
| 2336 | +/***/ "../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/paste-element.js": | |
| 2337 | +/*!*********************************************************************************************************!*\ | |
| 2338 | + !*** ../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/paste-element.js ***! | |
| 2339 | + \*********************************************************************************************************/ | |
| 2340 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2341 | + | |
| 2342 | +"use strict"; | |
| 2343 | + | |
| 2344 | + | |
| 2345 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2346 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2347 | + value: true | |
| 2348 | +})); | |
| 2349 | +exports.PasteElement = void 0; | |
| 2350 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2351 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2352 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2353 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2354 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2355 | +var _regenerateLocalStyleIds = __webpack_require__(/*! ../../../utils/regenerate-local-style-ids */ "../modules/atomic-widgets/assets/js/editor/utils/regenerate-local-style-ids.js"); | |
| 2356 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2357 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2358 | +var PasteElement = exports.PasteElement = /*#__PURE__*/function (_$e$modules$hookData$) { | |
| 2359 | + function PasteElement() { | |
| 2360 | + (0, _classCallCheck2.default)(this, PasteElement); | |
| 2361 | + return _callSuper(this, PasteElement, arguments); | |
| 2362 | + } | |
| 2363 | + (0, _inherits2.default)(PasteElement, _$e$modules$hookData$); | |
| 2364 | + return (0, _createClass2.default)(PasteElement, [{ | |
| 2365 | + key: "getCommand", | |
| 2366 | + value: function getCommand() { | |
| 2367 | + return 'document/elements/paste'; | |
| 2368 | + } | |
| 2369 | + }, { | |
| 2370 | + key: "getId", | |
| 2371 | + value: function getId() { | |
| 2372 | + return 'regenerate-local-style-ids--document/elements/paste'; | |
| 2373 | + } | |
| 2374 | + }, { | |
| 2375 | + key: "apply", | |
| 2376 | + value: function apply(args, result) { | |
| 2377 | + var containers = Array.isArray(result) ? result : [result]; | |
| 2378 | + containers.forEach(_regenerateLocalStyleIds.regenerateLocalStyleIds); | |
| 2379 | + } | |
| 2380 | + }]); | |
| 2381 | +}($e.modules.hookData.After); | |
| 2382 | + | |
| 2383 | +/***/ }), | |
| 2384 | + | |
| 2385 | +/***/ "../modules/atomic-widgets/assets/js/editor/hooks/index.js": | |
| 2386 | +/*!*****************************************************************!*\ | |
| 2387 | + !*** ../modules/atomic-widgets/assets/js/editor/hooks/index.js ***! | |
| 2388 | + \*****************************************************************/ | |
| 2389 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2390 | + | |
| 2391 | +"use strict"; | |
| 2392 | + | |
| 2393 | + | |
| 2394 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2395 | + value: true | |
| 2396 | +})); | |
| 2397 | +Object.defineProperty(exports, "DuplicateElement", ({ | |
| 2398 | + enumerable: true, | |
| 2399 | + get: function get() { | |
| 2400 | + return _duplicateElement.DuplicateElement; | |
| 2401 | + } | |
| 2402 | +})); | |
| 2403 | +Object.defineProperty(exports, "ImportElement", ({ | |
| 2404 | + enumerable: true, | |
| 2405 | + get: function get() { | |
| 2406 | + return _importElement.ImportElement; | |
| 2407 | + } | |
| 2408 | +})); | |
| 2409 | +Object.defineProperty(exports, "PasteElement", ({ | |
| 2410 | + enumerable: true, | |
| 2411 | + get: function get() { | |
| 2412 | + return _pasteElement.PasteElement; | |
| 2413 | + } | |
| 2414 | +})); | |
| 2415 | +var _duplicateElement = __webpack_require__(/*! ./data/regenerate-local-style-ids/duplicate-element */ "../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/duplicate-element.js"); | |
| 2416 | +var _pasteElement = __webpack_require__(/*! ./data/regenerate-local-style-ids/paste-element */ "../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/paste-element.js"); | |
| 2417 | +var _importElement = __webpack_require__(/*! ./data/regenerate-local-style-ids/import-element */ "../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/import-element.js"); | |
| 2418 | + | |
| 2419 | +/***/ }), | |
| 2420 | + | |
| 2421 | +/***/ "../modules/atomic-widgets/assets/js/editor/utils/get-element-children.js": | |
| 2422 | +/*!********************************************************************************!*\ | |
| 2423 | + !*** ../modules/atomic-widgets/assets/js/editor/utils/get-element-children.js ***! | |
| 2424 | + \********************************************************************************/ | |
| 2425 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2426 | + | |
| 2427 | +"use strict"; | |
| 2428 | + | |
| 2429 | + | |
| 2430 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2431 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2432 | + value: true | |
| 2433 | +})); | |
| 2434 | +exports.getElementChildren = getElementChildren; | |
| 2435 | +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); | |
| 1593 | 2436 | /** |
| 1594 | - * Copyright (c) 2013-present, Facebook, Inc. | |
| 1595 | - * | |
| 1596 | - * This source code is licensed under the MIT license found in the | |
| 1597 | - * LICENSE file in the root directory of this source tree. | |
| 1598 | - */ | |
| 1599 | - var require_ReactPropTypesSecret = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1600 | - var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; | |
| 1601 | - module.exports = ReactPropTypesSecret; | |
| 1602 | - })); | |
| 2437 | + * @typedef {import('assets/dev/js/editor/container/container')} Container | |
| 2438 | + */ | |
| 1603 | 2439 | |
| 1604 | -//#endregion | |
| 1605 | -//#region node_modules/prop-types/lib/has.js | |
| 1606 | - var require_has = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1607 | - module.exports = Function.call.bind(Object.prototype.hasOwnProperty); | |
| 1608 | - })); | |
| 2440 | +/** | |
| 2441 | + * return all recursively nested elements in a flat array | |
| 2442 | + * | |
| 2443 | + * @param {Container} model | |
| 2444 | + * @return {Container[]} | |
| 2445 | + */ | |
| 2446 | +function getElementChildren(model) { | |
| 2447 | + var _flatMap, _container$model$get$, _container$model; | |
| 2448 | + var container = window.elementor.getContainer(model.id); | |
| 2449 | + var children = (_flatMap = ((_container$model$get$ = (_container$model = container.model) === null || _container$model === void 0 || (_container$model = _container$model.get('elements')) === null || _container$model === void 0 ? void 0 : _container$model.models) !== null && _container$model$get$ !== void 0 ? _container$model$get$ : []).flatMap(function (child) { | |
| 2450 | + return getElementChildren(child); | |
| 2451 | + })) !== null && _flatMap !== void 0 ? _flatMap : []; | |
| 2452 | + return [container].concat((0, _toConsumableArray2.default)(children)); | |
| 2453 | +} | |
| 1609 | 2454 | |
| 1610 | -//#endregion | |
| 1611 | -//#region node_modules/prop-types/checkPropTypes.js | |
| 2455 | +/***/ }), | |
| 2456 | + | |
| 2457 | +/***/ "../modules/atomic-widgets/assets/js/editor/utils/get-random-style-id.js": | |
| 2458 | +/*!*******************************************************************************!*\ | |
| 2459 | + !*** ../modules/atomic-widgets/assets/js/editor/utils/get-random-style-id.js ***! | |
| 2460 | + \*******************************************************************************/ | |
| 2461 | +/***/ ((__unused_webpack_module, exports) => { | |
| 2462 | + | |
| 2463 | +"use strict"; | |
| 2464 | + | |
| 2465 | + | |
| 2466 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2467 | + value: true | |
| 2468 | +})); | |
| 2469 | +exports.getRandomStyleId = getRandomStyleId; | |
| 1612 | 2470 | /** |
| 1613 | - * Copyright (c) 2013-present, Facebook, Inc. | |
| 1614 | - * | |
| 1615 | - * This source code is licensed under the MIT license found in the | |
| 1616 | - * LICENSE file in the root directory of this source tree. | |
| 1617 | - */ | |
| 1618 | - var require_checkPropTypes = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1619 | - var printWarning = function() {}; | |
| 1620 | - var ReactPropTypesSecret = require_ReactPropTypesSecret(); | |
| 1621 | - var loggedTypeFailures = {}; | |
| 1622 | - var has = require_has(); | |
| 1623 | - printWarning = function(text) { | |
| 1624 | - var message = "Warning: " + text; | |
| 1625 | - if (typeof console !== "undefined") console.error(message); | |
| 1626 | - try { | |
| 1627 | - throw new Error(message); | |
| 1628 | - } catch (x) {} | |
| 1629 | - }; | |
| 1630 | - /** | |
| 1631 | - * Assert that the values match with the type specs. | |
| 1632 | - * Error messages are memorized and will only be shown once. | |
| 1633 | - * | |
| 1634 | - * @param {object} typeSpecs Map of name to a ReactPropType | |
| 1635 | - * @param {object} values Runtime values that need to be type-checked | |
| 1636 | - * @param {string} location e.g. "prop", "context", "child context" | |
| 1637 | - * @param {string} componentName Name of the component for error messages. | |
| 1638 | - * @param {?Function} getStack Returns the component stack. | |
| 1639 | - * @private | |
| 1640 | - */ | |
| 1641 | - function checkPropTypes(typeSpecs, values, location, componentName, getStack) { | |
| 1642 | - for (var typeSpecName in typeSpecs) if (has(typeSpecs, typeSpecName)) { | |
| 1643 | - var error; | |
| 1644 | - try { | |
| 1645 | - if (typeof typeSpecs[typeSpecName] !== "function") { | |
| 1646 | - var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | |
| 1647 | - err.name = "Invariant Violation"; | |
| 1648 | - throw err; | |
| 1649 | - } | |
| 1650 | - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); | |
| 1651 | - } catch (ex) { | |
| 1652 | - error = ex; | |
| 1653 | - } | |
| 1654 | - if (error && !(error instanceof Error)) printWarning((componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."); | |
| 1655 | - if (error instanceof Error && !(error.message in loggedTypeFailures)) { | |
| 1656 | - loggedTypeFailures[error.message] = true; | |
| 1657 | - var stack = getStack ? getStack() : ""; | |
| 1658 | - printWarning("Failed " + location + " type: " + error.message + (stack != null ? stack : "")); | |
| 1659 | - } | |
| 1660 | - } | |
| 1661 | - } | |
| 1662 | - /** | |
| 1663 | - * Resets warning cache when testing. | |
| 1664 | - * | |
| 1665 | - * @private | |
| 1666 | - */ | |
| 1667 | - checkPropTypes.resetWarningCache = function() { | |
| 1668 | - loggedTypeFailures = {}; | |
| 1669 | - }; | |
| 1670 | - module.exports = checkPropTypes; | |
| 1671 | - })); | |
| 2471 | + * @typedef {import('elementor/assets/dev/js/editor/container/container')} Container | |
| 2472 | + */ | |
| 1672 | 2473 | |
| 1673 | -//#endregion | |
| 1674 | -//#region node_modules/prop-types/factoryWithTypeCheckers.js | |
| 1675 | 2474 | /** |
| 1676 | - * Copyright (c) 2013-present, Facebook, Inc. | |
| 1677 | - * | |
| 1678 | - * This source code is licensed under the MIT license found in the | |
| 1679 | - * LICENSE file in the root directory of this source tree. | |
| 1680 | - */ | |
| 1681 | - var require_factoryWithTypeCheckers = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1682 | - var ReactIs = require_react_is(); | |
| 1683 | - var assign = require_object_assign(); | |
| 1684 | - var ReactPropTypesSecret = require_ReactPropTypesSecret(); | |
| 1685 | - var has = require_has(); | |
| 1686 | - var checkPropTypes = require_checkPropTypes(); | |
| 1687 | - var printWarning = function() {}; | |
| 1688 | - printWarning = function(text) { | |
| 1689 | - var message = "Warning: " + text; | |
| 1690 | - if (typeof console !== "undefined") console.error(message); | |
| 1691 | - try { | |
| 1692 | - throw new Error(message); | |
| 1693 | - } catch (x) {} | |
| 1694 | - }; | |
| 1695 | - function emptyFunctionThatReturnsNull() { | |
| 1696 | - return null; | |
| 1697 | - } | |
| 1698 | - module.exports = function(isValidElement, throwOnDirectAccess) { | |
| 1699 | - var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator; | |
| 1700 | - var FAUX_ITERATOR_SYMBOL = "@@iterator"; | |
| 1701 | - /** | |
| 1702 | - * Returns the iterator method function contained on the iterable object. | |
| 1703 | - * | |
| 1704 | - * Be sure to invoke the function with the iterable as context: | |
| 1705 | - * | |
| 1706 | - * var iteratorFn = getIteratorFn(myIterable); | |
| 1707 | - * if (iteratorFn) { | |
| 1708 | - * var iterator = iteratorFn.call(myIterable); | |
| 1709 | - * ... | |
| 1710 | - * } | |
| 1711 | - * | |
| 1712 | - * @param {?object} maybeIterable | |
| 1713 | - * @return {?function} | |
| 1714 | - */ | |
| 1715 | - function getIteratorFn(maybeIterable) { | |
| 1716 | - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); | |
| 1717 | - if (typeof iteratorFn === "function") return iteratorFn; | |
| 1718 | - } | |
| 1719 | - /** | |
| 1720 | - * Collection of methods that allow declaration and validation of props that are | |
| 1721 | - * supplied to React components. Example usage: | |
| 1722 | - * | |
| 1723 | - * var Props = require('ReactPropTypes'); | |
| 1724 | - * var MyArticle = React.createClass({ | |
| 1725 | - * propTypes: { | |
| 1726 | - * // An optional string prop named "description". | |
| 1727 | - * description: Props.string, | |
| 1728 | - * | |
| 1729 | - * // A required enum prop named "category". | |
| 1730 | - * category: Props.oneOf(['News','Photos']).isRequired, | |
| 1731 | - * | |
| 1732 | - * // A prop named "dialog" that requires an instance of Dialog. | |
| 1733 | - * dialog: Props.instanceOf(Dialog).isRequired | |
| 1734 | - * }, | |
| 1735 | - * render: function() { ... } | |
| 1736 | - * }); | |
| 1737 | - * | |
| 1738 | - * A more formal specification of how these methods are used: | |
| 1739 | - * | |
| 1740 | - * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) | |
| 1741 | - * decl := ReactPropTypes.{type}(.isRequired)? | |
| 1742 | - * | |
| 1743 | - * Each and every declaration produces a function with the same signature. This | |
| 1744 | - * allows the creation of custom validation functions. For example: | |
| 1745 | - * | |
| 1746 | - * var MyLink = React.createClass({ | |
| 1747 | - * propTypes: { | |
| 1748 | - * // An optional string or URI prop named "href". | |
| 1749 | - * href: function(props, propName, componentName) { | |
| 1750 | - * var propValue = props[propName]; | |
| 1751 | - * if (propValue != null && typeof propValue !== 'string' && | |
| 1752 | - * !(propValue instanceof URI)) { | |
| 1753 | - * return new Error( | |
| 1754 | - * 'Expected a string or an URI for ' + propName + ' in ' + | |
| 1755 | - * componentName | |
| 1756 | - * ); | |
| 1757 | - * } | |
| 1758 | - * } | |
| 1759 | - * }, | |
| 1760 | - * render: function() {...} | |
| 1761 | - * }); | |
| 1762 | - * | |
| 1763 | - * @internal | |
| 1764 | - */ | |
| 1765 | - var ANONYMOUS = "<<anonymous>>"; | |
| 1766 | - var ReactPropTypes = { | |
| 1767 | - array: createPrimitiveTypeChecker("array"), | |
| 1768 | - bigint: createPrimitiveTypeChecker("bigint"), | |
| 1769 | - bool: createPrimitiveTypeChecker("boolean"), | |
| 1770 | - func: createPrimitiveTypeChecker("function"), | |
| 1771 | - number: createPrimitiveTypeChecker("number"), | |
| 1772 | - object: createPrimitiveTypeChecker("object"), | |
| 1773 | - string: createPrimitiveTypeChecker("string"), | |
| 1774 | - symbol: createPrimitiveTypeChecker("symbol"), | |
| 1775 | - any: createAnyTypeChecker(), | |
| 1776 | - arrayOf: createArrayOfTypeChecker, | |
| 1777 | - element: createElementTypeChecker(), | |
| 1778 | - elementType: createElementTypeTypeChecker(), | |
| 1779 | - instanceOf: createInstanceTypeChecker, | |
| 1780 | - node: createNodeChecker(), | |
| 1781 | - objectOf: createObjectOfTypeChecker, | |
| 1782 | - oneOf: createEnumTypeChecker, | |
| 1783 | - oneOfType: createUnionTypeChecker, | |
| 1784 | - shape: createShapeTypeChecker, | |
| 1785 | - exact: createStrictShapeTypeChecker | |
| 1786 | - }; | |
| 1787 | - /** | |
| 1788 | - * inlined Object.is polyfill to avoid requiring consumers ship their own | |
| 1789 | - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is | |
| 1790 | - */ | |
| 1791 | - function is(x, y) { | |
| 1792 | - if (x === y) return x !== 0 || 1 / x === 1 / y; | |
| 1793 | - else return x !== x && y !== y; | |
| 1794 | - } | |
| 1795 | - /** | |
| 1796 | - * We use an Error-like object for backward compatibility as people may call | |
| 1797 | - * PropTypes directly and inspect their output. However, we don't use real | |
| 1798 | - * Errors anymore. We don't inspect their stack anyway, and creating them | |
| 1799 | - * is prohibitively expensive if they are created too often, such as what | |
| 1800 | - * happens in oneOfType() for any type before the one that matched. | |
| 1801 | - */ | |
| 1802 | - function PropTypeError(message, data) { | |
| 1803 | - this.message = message; | |
| 1804 | - this.data = data && typeof data === "object" ? data : {}; | |
| 1805 | - this.stack = ""; | |
| 1806 | - } | |
| 1807 | - PropTypeError.prototype = Error.prototype; | |
| 1808 | - function createChainableTypeChecker(validate) { | |
| 1809 | - var manualPropTypeCallCache = {}; | |
| 1810 | - var manualPropTypeWarningCount = 0; | |
| 1811 | - function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { | |
| 1812 | - componentName = componentName || ANONYMOUS; | |
| 1813 | - propFullName = propFullName || propName; | |
| 1814 | - if (secret !== ReactPropTypesSecret) { | |
| 1815 | - if (throwOnDirectAccess) { | |
| 1816 | - var err = /* @__PURE__ */ new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"); | |
| 1817 | - err.name = "Invariant Violation"; | |
| 1818 | - throw err; | |
| 1819 | - } else if (typeof console !== "undefined") { | |
| 1820 | - var cacheKey = componentName + ":" + propName; | |
| 1821 | - if (!manualPropTypeCallCache[cacheKey] && manualPropTypeWarningCount < 3) { | |
| 1822 | - printWarning("You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."); | |
| 1823 | - manualPropTypeCallCache[cacheKey] = true; | |
| 1824 | - manualPropTypeWarningCount++; | |
| 1825 | - } | |
| 1826 | - } | |
| 1827 | - } | |
| 1828 | - if (props[propName] == null) { | |
| 1829 | - if (isRequired) { | |
| 1830 | - if (props[propName] === null) return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`.")); | |
| 1831 | - return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`.")); | |
| 1832 | - } | |
| 1833 | - return null; | |
| 1834 | - } else return validate(props, propName, componentName, location, propFullName); | |
| 1835 | - } | |
| 1836 | - var chainedCheckType = checkType.bind(null, false); | |
| 1837 | - chainedCheckType.isRequired = checkType.bind(null, true); | |
| 1838 | - return chainedCheckType; | |
| 1839 | - } | |
| 1840 | - function createPrimitiveTypeChecker(expectedType) { | |
| 1841 | - function validate(props, propName, componentName, location, propFullName, secret) { | |
| 1842 | - var propValue = props[propName]; | |
| 1843 | - if (getPropType(propValue) !== expectedType) { | |
| 1844 | - var preciseType = getPreciseType(propValue); | |
| 1845 | - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."), { expectedType }); | |
| 1846 | - } | |
| 1847 | - return null; | |
| 1848 | - } | |
| 1849 | - return createChainableTypeChecker(validate); | |
| 1850 | - } | |
| 1851 | - function createAnyTypeChecker() { | |
| 1852 | - return createChainableTypeChecker(emptyFunctionThatReturnsNull); | |
| 1853 | - } | |
| 1854 | - function createArrayOfTypeChecker(typeChecker) { | |
| 1855 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1856 | - if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf."); | |
| 1857 | - var propValue = props[propName]; | |
| 1858 | - if (!Array.isArray(propValue)) { | |
| 1859 | - var propType = getPropType(propValue); | |
| 1860 | - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array.")); | |
| 1861 | - } | |
| 1862 | - for (var i = 0; i < propValue.length; i++) { | |
| 1863 | - var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret); | |
| 1864 | - if (error instanceof Error) return error; | |
| 1865 | - } | |
| 1866 | - return null; | |
| 1867 | - } | |
| 1868 | - return createChainableTypeChecker(validate); | |
| 1869 | - } | |
| 1870 | - function createElementTypeChecker() { | |
| 1871 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1872 | - var propValue = props[propName]; | |
| 1873 | - if (!isValidElement(propValue)) { | |
| 1874 | - var propType = getPropType(propValue); | |
| 1875 | - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement.")); | |
| 1876 | - } | |
| 1877 | - return null; | |
| 1878 | - } | |
| 1879 | - return createChainableTypeChecker(validate); | |
| 1880 | - } | |
| 1881 | - function createElementTypeTypeChecker() { | |
| 1882 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1883 | - var propValue = props[propName]; | |
| 1884 | - if (!ReactIs.isValidElementType(propValue)) { | |
| 1885 | - var propType = getPropType(propValue); | |
| 1886 | - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type.")); | |
| 1887 | - } | |
| 1888 | - return null; | |
| 1889 | - } | |
| 1890 | - return createChainableTypeChecker(validate); | |
| 1891 | - } | |
| 1892 | - function createInstanceTypeChecker(expectedClass) { | |
| 1893 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1894 | - if (!(props[propName] instanceof expectedClass)) { | |
| 1895 | - var expectedClassName = expectedClass.name || ANONYMOUS; | |
| 1896 | - var actualClassName = getClassName(props[propName]); | |
| 1897 | - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`.")); | |
| 1898 | - } | |
| 1899 | - return null; | |
| 1900 | - } | |
| 1901 | - return createChainableTypeChecker(validate); | |
| 1902 | - } | |
| 1903 | - function createEnumTypeChecker(expectedValues) { | |
| 1904 | - if (!Array.isArray(expectedValues)) { | |
| 1905 | - if (arguments.length > 1) printWarning("Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."); | |
| 1906 | - else printWarning("Invalid argument supplied to oneOf, expected an array."); | |
| 1907 | - return emptyFunctionThatReturnsNull; | |
| 1908 | - } | |
| 1909 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1910 | - var propValue = props[propName]; | |
| 1911 | - for (var i = 0; i < expectedValues.length; i++) if (is(propValue, expectedValues[i])) return null; | |
| 1912 | - var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { | |
| 1913 | - if (getPreciseType(value) === "symbol") return String(value); | |
| 1914 | - return value; | |
| 1915 | - }); | |
| 1916 | - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + ".")); | |
| 1917 | - } | |
| 1918 | - return createChainableTypeChecker(validate); | |
| 1919 | - } | |
| 1920 | - function createObjectOfTypeChecker(typeChecker) { | |
| 1921 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1922 | - if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf."); | |
| 1923 | - var propValue = props[propName]; | |
| 1924 | - var propType = getPropType(propValue); | |
| 1925 | - if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object.")); | |
| 1926 | - for (var key in propValue) if (has(propValue, key)) { | |
| 1927 | - var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); | |
| 1928 | - if (error instanceof Error) return error; | |
| 1929 | - } | |
| 1930 | - return null; | |
| 1931 | - } | |
| 1932 | - return createChainableTypeChecker(validate); | |
| 1933 | - } | |
| 1934 | - function createUnionTypeChecker(arrayOfTypeCheckers) { | |
| 1935 | - if (!Array.isArray(arrayOfTypeCheckers)) { | |
| 1936 | - printWarning("Invalid argument supplied to oneOfType, expected an instance of array."); | |
| 1937 | - return emptyFunctionThatReturnsNull; | |
| 1938 | - } | |
| 1939 | - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { | |
| 1940 | - var checker = arrayOfTypeCheckers[i]; | |
| 1941 | - if (typeof checker !== "function") { | |
| 1942 | - printWarning("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."); | |
| 1943 | - return emptyFunctionThatReturnsNull; | |
| 1944 | - } | |
| 1945 | - } | |
| 1946 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1947 | - var expectedTypes = []; | |
| 1948 | - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { | |
| 1949 | - var checker = arrayOfTypeCheckers[i]; | |
| 1950 | - var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret); | |
| 1951 | - if (checkerResult == null) return null; | |
| 1952 | - if (checkerResult.data && has(checkerResult.data, "expectedType")) expectedTypes.push(checkerResult.data.expectedType); | |
| 1953 | - } | |
| 1954 | - var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : ""; | |
| 1955 | - return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + ".")); | |
| 1956 | - } | |
| 1957 | - return createChainableTypeChecker(validate); | |
| 1958 | - } | |
| 1959 | - function createNodeChecker() { | |
| 1960 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1961 | - if (!isNode(props[propName])) return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode.")); | |
| 1962 | - return null; | |
| 1963 | - } | |
| 1964 | - return createChainableTypeChecker(validate); | |
| 1965 | - } | |
| 1966 | - function invalidValidatorError(componentName, location, propFullName, key, type) { | |
| 1967 | - return new PropTypeError((componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."); | |
| 1968 | - } | |
| 1969 | - function createShapeTypeChecker(shapeTypes) { | |
| 1970 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1971 | - var propValue = props[propName]; | |
| 1972 | - var propType = getPropType(propValue); | |
| 1973 | - if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`.")); | |
| 1974 | - for (var key in shapeTypes) { | |
| 1975 | - var checker = shapeTypes[key]; | |
| 1976 | - if (typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | |
| 1977 | - var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); | |
| 1978 | - if (error) return error; | |
| 1979 | - } | |
| 1980 | - return null; | |
| 1981 | - } | |
| 1982 | - return createChainableTypeChecker(validate); | |
| 1983 | - } | |
| 1984 | - function createStrictShapeTypeChecker(shapeTypes) { | |
| 1985 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1986 | - var propValue = props[propName]; | |
| 1987 | - var propType = getPropType(propValue); | |
| 1988 | - if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`.")); | |
| 1989 | - for (var key in assign({}, props[propName], shapeTypes)) { | |
| 1990 | - var checker = shapeTypes[key]; | |
| 1991 | - if (has(shapeTypes, key) && typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | |
| 1992 | - if (!checker) return new PropTypeError("Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")); | |
| 1993 | - var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); | |
| 1994 | - if (error) return error; | |
| 1995 | - } | |
| 1996 | - return null; | |
| 1997 | - } | |
| 1998 | - return createChainableTypeChecker(validate); | |
| 1999 | - } | |
| 2000 | - function isNode(propValue) { | |
| 2001 | - switch (typeof propValue) { | |
| 2002 | - case "number": | |
| 2003 | - case "string": | |
| 2004 | - case "undefined": return true; | |
| 2005 | - case "boolean": return !propValue; | |
| 2006 | - case "object": | |
| 2007 | - if (Array.isArray(propValue)) return propValue.every(isNode); | |
| 2008 | - if (propValue === null || isValidElement(propValue)) return true; | |
| 2009 | - var iteratorFn = getIteratorFn(propValue); | |
| 2010 | - if (iteratorFn) { | |
| 2011 | - var iterator = iteratorFn.call(propValue); | |
| 2012 | - var step; | |
| 2013 | - if (iteratorFn !== propValue.entries) { | |
| 2014 | - while (!(step = iterator.next()).done) if (!isNode(step.value)) return false; | |
| 2015 | - } else while (!(step = iterator.next()).done) { | |
| 2016 | - var entry = step.value; | |
| 2017 | - if (entry) { | |
| 2018 | - if (!isNode(entry[1])) return false; | |
| 2019 | - } | |
| 2020 | - } | |
| 2021 | - } else return false; | |
| 2022 | - return true; | |
| 2023 | - default: return false; | |
| 2024 | - } | |
| 2025 | - } | |
| 2026 | - function isSymbol(propType, propValue) { | |
| 2027 | - if (propType === "symbol") return true; | |
| 2028 | - if (!propValue) return false; | |
| 2029 | - if (propValue["@@toStringTag"] === "Symbol") return true; | |
| 2030 | - if (typeof Symbol === "function" && propValue instanceof Symbol) return true; | |
| 2031 | - return false; | |
| 2032 | - } | |
| 2033 | - function getPropType(propValue) { | |
| 2034 | - var propType = typeof propValue; | |
| 2035 | - if (Array.isArray(propValue)) return "array"; | |
| 2036 | - if (propValue instanceof RegExp) return "object"; | |
| 2037 | - if (isSymbol(propType, propValue)) return "symbol"; | |
| 2038 | - return propType; | |
| 2039 | - } | |
| 2040 | - function getPreciseType(propValue) { | |
| 2041 | - if (typeof propValue === "undefined" || propValue === null) return "" + propValue; | |
| 2042 | - var propType = getPropType(propValue); | |
| 2043 | - if (propType === "object") { | |
| 2044 | - if (propValue instanceof Date) return "date"; | |
| 2045 | - else if (propValue instanceof RegExp) return "regexp"; | |
| 2046 | - } | |
| 2047 | - return propType; | |
| 2048 | - } | |
| 2049 | - function getPostfixForTypeWarning(value) { | |
| 2050 | - var type = getPreciseType(value); | |
| 2051 | - switch (type) { | |
| 2052 | - case "array": | |
| 2053 | - case "object": return "an " + type; | |
| 2054 | - case "boolean": | |
| 2055 | - case "date": | |
| 2056 | - case "regexp": return "a " + type; | |
| 2057 | - default: return type; | |
| 2058 | - } | |
| 2059 | - } | |
| 2060 | - function getClassName(propValue) { | |
| 2061 | - if (!propValue.constructor || !propValue.constructor.name) return ANONYMOUS; | |
| 2062 | - return propValue.constructor.name; | |
| 2063 | - } | |
| 2064 | - ReactPropTypes.checkPropTypes = checkPropTypes; | |
| 2065 | - ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; | |
| 2066 | - ReactPropTypes.PropTypes = ReactPropTypes; | |
| 2067 | - return ReactPropTypes; | |
| 2068 | - }; | |
| 2069 | - })); | |
| 2475 | + * @param {Container} container | |
| 2476 | + * @param {Object} existingStyleIds | |
| 2477 | + * @return {string} | |
| 2478 | + */ | |
| 2479 | +function getRandomStyleId(container) { | |
| 2480 | + var existingStyleIds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | |
| 2481 | + var id; | |
| 2482 | + do { | |
| 2483 | + id = "e-".concat(container.id, "-").concat(elementorCommon.helpers.getUniqueId()); | |
| 2484 | + } while (existingStyleIds.hasOwnProperty(id)); | |
| 2485 | + return id; | |
| 2486 | +} | |
| 2070 | 2487 | |
| 2071 | -//#endregion | |
| 2072 | -//#region node_modules/prop-types/index.js | |
| 2073 | - var require_prop_types = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 2074 | - var ReactIs = require_react_is(); | |
| 2075 | - var throwOnDirectAccess = true; | |
| 2076 | - module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess); | |
| 2077 | - })); | |
| 2488 | +/***/ }), | |
| 2078 | 2489 | |
| 2079 | -//#endregion | |
| 2080 | -//#region assets/dev/js/editor/utils/editor-one-events.js | |
| 2081 | -var import_prop_types = /* @__PURE__ */ __toESM(require_prop_types()); | |
| 2082 | - init_defineProperty(); | |
| 2083 | - function ownKeys(e, r) { | |
| 2084 | - var t = Object.keys(e); | |
| 2085 | - if (Object.getOwnPropertySymbols) { | |
| 2086 | - var o = Object.getOwnPropertySymbols(e); | |
| 2087 | - r && (o = o.filter(function(r) { | |
| 2088 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 2089 | - })), t.push.apply(t, o); | |
| 2090 | - } | |
| 2091 | - return t; | |
| 2092 | - } | |
| 2093 | - function _objectSpread(e) { | |
| 2094 | - for (var r = 1; r < arguments.length; r++) { | |
| 2095 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 2096 | - r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { | |
| 2097 | - _defineProperty(e, r, t[r]); | |
| 2098 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { | |
| 2099 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 2100 | - }); | |
| 2101 | - } | |
| 2102 | - return e; | |
| 2103 | - } | |
| 2104 | - var EditorOneEventManager = /*#__PURE__*/ function() { | |
| 2105 | - function EditorOneEventManager() { | |
| 2106 | - _classCallCheck(this, EditorOneEventManager); | |
| 2107 | - } | |
| 2108 | - return _createClass(EditorOneEventManager, null, [ | |
| 2109 | - { | |
| 2110 | - key: "getEventsManager", | |
| 2111 | - value: function getEventsManager() { | |
| 2112 | - var _elementorCommon; | |
| 2113 | - return (_elementorCommon = elementorCommon) === null || _elementorCommon === void 0 ? void 0 : _elementorCommon.eventsManager; | |
| 2114 | - } | |
| 2115 | - }, | |
| 2116 | - { | |
| 2117 | - key: "getConfig", | |
| 2118 | - value: function getConfig() { | |
| 2119 | - var _this$getEventsManage; | |
| 2120 | - return (_this$getEventsManage = this.getEventsManager()) === null || _this$getEventsManage === void 0 ? void 0 : _this$getEventsManage.config; | |
| 2121 | - } | |
| 2122 | - }, | |
| 2123 | - { | |
| 2124 | - key: "canSendEvents", | |
| 2125 | - value: function canSendEvents() { | |
| 2126 | - var _elementorCommon2; | |
| 2127 | - return ((_elementorCommon2 = elementorCommon) === null || _elementorCommon2 === void 0 || (_elementorCommon2 = _elementorCommon2.config) === null || _elementorCommon2 === void 0 || (_elementorCommon2 = _elementorCommon2.editor_events) === null || _elementorCommon2 === void 0 ? void 0 : _elementorCommon2.can_send_events) || false; | |
| 2128 | - } | |
| 2129 | - }, | |
| 2130 | - { | |
| 2131 | - key: "isEventsManagerAvailable", | |
| 2132 | - value: function isEventsManagerAvailable() { | |
| 2133 | - var eventsManager = this.getEventsManager(); | |
| 2134 | - return eventsManager && "function" === typeof eventsManager.dispatchEvent; | |
| 2135 | - } | |
| 2136 | - }, | |
| 2137 | - { | |
| 2138 | - key: "dispatchEvent", | |
| 2139 | - value: function dispatchEvent(eventName, payload) { | |
| 2140 | - try { | |
| 2141 | - if (!this.isEventsManagerAvailable() || !this.canSendEvents()) return false; | |
| 2142 | - this.getEventsManager().dispatchEvent(eventName, payload); | |
| 2143 | - return true; | |
| 2144 | - } catch (error) { | |
| 2145 | - return false; | |
| 2146 | - } | |
| 2147 | - } | |
| 2148 | - }, | |
| 2149 | - { | |
| 2150 | - key: "toLowerSnake", | |
| 2151 | - value: function toLowerSnake(value) { | |
| 2152 | - if (!value || "string" !== typeof value) return value; | |
| 2153 | - return value.replace(/\s+/g, "_").toLowerCase(); | |
| 2154 | - } | |
| 2155 | - }, | |
| 2156 | - { | |
| 2157 | - key: "decodeHtmlEntities", | |
| 2158 | - value: function decodeHtmlEntities(text) { | |
| 2159 | - if (!text || "string" !== typeof text) return text; | |
| 2160 | - return new DOMParser().parseFromString(text, "text/html").body.textContent || text; | |
| 2161 | - } | |
| 2162 | - }, | |
| 2163 | - { | |
| 2164 | - key: "isInEditorContext", | |
| 2165 | - value: function isInEditorContext() { | |
| 2166 | - var _window$elementor; | |
| 2167 | - return "undefined" !== typeof window.elementor && !!((_window$elementor = window.elementor) !== null && _window$elementor !== void 0 && _window$elementor.documents); | |
| 2168 | - } | |
| 2169 | - }, | |
| 2170 | - { | |
| 2171 | - key: "getFinderContext", | |
| 2172 | - value: function getFinderContext() { | |
| 2173 | - var _config$appTypes; | |
| 2174 | - var _config$appTypes2; | |
| 2175 | - var _config$locations; | |
| 2176 | - var _config$locations2; | |
| 2177 | - var config = this.getConfig(); | |
| 2178 | - var isEditor = this.isInEditorContext(); | |
| 2179 | - return { | |
| 2180 | - windowName: isEditor ? config === null || config === void 0 || (_config$appTypes = config.appTypes) === null || _config$appTypes === void 0 ? void 0 : _config$appTypes.editor : config === null || config === void 0 || (_config$appTypes2 = config.appTypes) === null || _config$appTypes2 === void 0 ? void 0 : _config$appTypes2.wpAdmin, | |
| 2181 | - targetLocation: this.toLowerSnake(isEditor ? config === null || config === void 0 || (_config$locations = config.locations) === null || _config$locations === void 0 ? void 0 : _config$locations.topBar : config === null || config === void 0 || (_config$locations2 = config.locations) === null || _config$locations2 === void 0 ? void 0 : _config$locations2.sidebar) | |
| 2182 | - }; | |
| 2183 | - } | |
| 2184 | - }, | |
| 2185 | - { | |
| 2186 | - key: "createBasePayload", | |
| 2187 | - value: function createBasePayload() { | |
| 2188 | - var _config$appTypes$edit; | |
| 2189 | - var _config$appTypes3; | |
| 2190 | - var overrides = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 2191 | - var config = this.getConfig(); | |
| 2192 | - return _objectSpread({ window_name: (_config$appTypes$edit = config === null || config === void 0 || (_config$appTypes3 = config.appTypes) === null || _config$appTypes3 === void 0 ? void 0 : _config$appTypes3.editor) !== null && _config$appTypes$edit !== void 0 ? _config$appTypes$edit : "editor" }, overrides); | |
| 2193 | - } | |
| 2194 | - }, | |
| 2195 | - { | |
| 2196 | - key: "sendTopBarPublishDropdown", | |
| 2197 | - value: function sendTopBarPublishDropdown(targetName) { | |
| 2198 | - var _config$names; | |
| 2199 | - var _config$triggers; | |
| 2200 | - var _config$targetTypes; | |
| 2201 | - var _config$interactionRe; | |
| 2202 | - var _config$locations3; | |
| 2203 | - var _config$secondaryLoca; | |
| 2204 | - var _config$targetTypes2; | |
| 2205 | - var config = this.getConfig(); | |
| 2206 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names = config.names) === null || _config$names === void 0 || (_config$names = _config$names.editorOne) === null || _config$names === void 0 ? void 0 : _config$names.topBarPublishDropdown, this.createBasePayload({ | |
| 2207 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers = config.triggers) === null || _config$triggers === void 0 ? void 0 : _config$triggers.click), | |
| 2208 | - target_type: config === null || config === void 0 || (_config$targetTypes = config.targetTypes) === null || _config$targetTypes === void 0 ? void 0 : _config$targetTypes.dropdownItem, | |
| 2209 | - target_name: targetName, | |
| 2210 | - interaction_result: config === null || config === void 0 || (_config$interactionRe = config.interactionResults) === null || _config$interactionRe === void 0 ? void 0 : _config$interactionRe.actionSelected, | |
| 2211 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations3 = config.locations) === null || _config$locations3 === void 0 ? void 0 : _config$locations3.topBar), | |
| 2212 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca = config.secondaryLocations) === null || _config$secondaryLoca === void 0 ? void 0 : _config$secondaryLoca.publishDropdown), | |
| 2213 | - location_l2: config === null || config === void 0 || (_config$targetTypes2 = config.targetTypes) === null || _config$targetTypes2 === void 0 ? void 0 : _config$targetTypes2.dropdownItem, | |
| 2214 | - interaction_description: "User selected an action from the publish dropdown" | |
| 2215 | - })); | |
| 2216 | - } | |
| 2217 | - }, | |
| 2218 | - { | |
| 2219 | - key: "sendTopBarPageList", | |
| 2220 | - value: function sendTopBarPageList(targetName) { | |
| 2221 | - var _config$names2; | |
| 2222 | - var _config$triggers2; | |
| 2223 | - var _config$targetTypes3; | |
| 2224 | - var _config$interactionRe2; | |
| 2225 | - var _config$interactionRe3; | |
| 2226 | - var _config$locations4; | |
| 2227 | - var _config$secondaryLoca2; | |
| 2228 | - var _config$targetTypes4; | |
| 2229 | - var isCreate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; | |
| 2230 | - var config = this.getConfig(); | |
| 2231 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names2 = config.names) === null || _config$names2 === void 0 || (_config$names2 = _config$names2.editorOne) === null || _config$names2 === void 0 ? void 0 : _config$names2.topBarPageList, this.createBasePayload({ | |
| 2232 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers2 = config.triggers) === null || _config$triggers2 === void 0 ? void 0 : _config$triggers2.click), | |
| 2233 | - target_type: config === null || config === void 0 || (_config$targetTypes3 = config.targetTypes) === null || _config$targetTypes3 === void 0 ? void 0 : _config$targetTypes3.dropdownItem, | |
| 2234 | - target_name: targetName, | |
| 2235 | - interaction_result: isCreate ? config === null || config === void 0 || (_config$interactionRe2 = config.interactionResults) === null || _config$interactionRe2 === void 0 ? void 0 : _config$interactionRe2.create : config === null || config === void 0 || (_config$interactionRe3 = config.interactionResults) === null || _config$interactionRe3 === void 0 ? void 0 : _config$interactionRe3.navigate, | |
| 2236 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations4 = config.locations) === null || _config$locations4 === void 0 ? void 0 : _config$locations4.topBar), | |
| 2237 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca2 = config.secondaryLocations) === null || _config$secondaryLoca2 === void 0 ? void 0 : _config$secondaryLoca2.pageListDropdown), | |
| 2238 | - location_l2: config === null || config === void 0 || (_config$targetTypes4 = config.targetTypes) === null || _config$targetTypes4 === void 0 ? void 0 : _config$targetTypes4.dropdownItem, | |
| 2239 | - interaction_description: "User selected an action from the page list dropdown" | |
| 2240 | - })); | |
| 2241 | - } | |
| 2242 | - }, | |
| 2243 | - { | |
| 2244 | - key: "sendSiteSettingsSession", | |
| 2245 | - value: function sendSiteSettingsSession(_ref) { | |
| 2246 | - var _config$names3; | |
| 2247 | - var _config$triggers3; | |
| 2248 | - var _config$interactionRe4; | |
| 2249 | - var _config$locations5; | |
| 2250 | - var _config$secondaryLoca3; | |
| 2251 | - var targetType = _ref.targetType; | |
| 2252 | - var _ref$visitedItems = _ref.visitedItems; | |
| 2253 | - var visitedItems = _ref$visitedItems === void 0 ? [] : _ref$visitedItems; | |
| 2254 | - var _ref$savedItems = _ref.savedItems; | |
| 2255 | - var savedItems = _ref$savedItems === void 0 ? [] : _ref$savedItems; | |
| 2256 | - var state = _ref.state; | |
| 2257 | - var config = this.getConfig(); | |
| 2258 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names3 = config.names) === null || _config$names3 === void 0 || (_config$names3 = _config$names3.editorOne) === null || _config$names3 === void 0 ? void 0 : _config$names3.siteSettingsSession, this.createBasePayload({ | |
| 2259 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers3 = config.triggers) === null || _config$triggers3 === void 0 ? void 0 : _config$triggers3.click), | |
| 2260 | - target_type: targetType, | |
| 2261 | - target_name: "site_settings", | |
| 2262 | - interaction_result: config === null || config === void 0 || (_config$interactionRe4 = config.interactionResults) === null || _config$interactionRe4 === void 0 ? void 0 : _config$interactionRe4.sessionEnd, | |
| 2263 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations5 = config.locations) === null || _config$locations5 === void 0 ? void 0 : _config$locations5.leftPanel), | |
| 2264 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca3 = config.secondaryLocations) === null || _config$secondaryLoca3 === void 0 ? void 0 : _config$secondaryLoca3.siteSettings), | |
| 2265 | - interaction_description: "Records areas visited as part of the site setting session", | |
| 2266 | - metadata: { | |
| 2267 | - visited_items: visitedItems, | |
| 2268 | - saved_items: savedItems | |
| 2269 | - }, | |
| 2270 | - state | |
| 2271 | - })); | |
| 2272 | - } | |
| 2273 | - }, | |
| 2274 | - { | |
| 2275 | - key: "sendELibraryNav", | |
| 2276 | - value: function sendELibraryNav(tabName) { | |
| 2277 | - var _config$names4; | |
| 2278 | - var _config$triggers4; | |
| 2279 | - var _config$targetTypes5; | |
| 2280 | - var _config$interactionRe5; | |
| 2281 | - var _config$locations6; | |
| 2282 | - var _config$secondaryLoca4; | |
| 2283 | - var config = this.getConfig(); | |
| 2284 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names4 = config.names) === null || _config$names4 === void 0 || (_config$names4 = _config$names4.editorOne) === null || _config$names4 === void 0 ? void 0 : _config$names4.eLibraryNav, this.createBasePayload({ | |
| 2285 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers4 = config.triggers) === null || _config$triggers4 === void 0 ? void 0 : _config$triggers4.tabSelect), | |
| 2286 | - target_type: config === null || config === void 0 || (_config$targetTypes5 = config.targetTypes) === null || _config$targetTypes5 === void 0 ? void 0 : _config$targetTypes5.tab, | |
| 2287 | - target_name: this.toLowerSnake(tabName), | |
| 2288 | - interaction_result: config === null || config === void 0 || (_config$interactionRe5 = config.interactionResults) === null || _config$interactionRe5 === void 0 ? void 0 : _config$interactionRe5.tabChanged, | |
| 2289 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations6 = config.locations) === null || _config$locations6 === void 0 ? void 0 : _config$locations6.elementorLibrary), | |
| 2290 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca4 = config.secondaryLocations) === null || _config$secondaryLoca4 === void 0 ? void 0 : _config$secondaryLoca4.libraryTabs), | |
| 2291 | - interaction_description: "User navigates within elementor library" | |
| 2292 | - })); | |
| 2293 | - } | |
| 2294 | - }, | |
| 2295 | - { | |
| 2296 | - key: "sendELibraryInsert", | |
| 2297 | - value: function sendELibraryInsert(_ref2) { | |
| 2298 | - var _config$triggers5; | |
| 2299 | - var _config$targetTypes6; | |
| 2300 | - var _config$interactionRe6; | |
| 2301 | - var _config$locations7; | |
| 2302 | - var _config$secondaryLoca5; | |
| 2303 | - var _config$names5; | |
| 2304 | - var assetId = _ref2.assetId; | |
| 2305 | - var assetName = _ref2.assetName; | |
| 2306 | - var libraryType = _ref2.libraryType; | |
| 2307 | - var _ref2$proRequired = _ref2.proRequired; | |
| 2308 | - var proRequired = _ref2$proRequired === void 0 ? false : _ref2$proRequired; | |
| 2309 | - var config = this.getConfig(); | |
| 2310 | - var payload = this.createBasePayload({ | |
| 2311 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers5 = config.triggers) === null || _config$triggers5 === void 0 ? void 0 : _config$triggers5.insert), | |
| 2312 | - target_type: config === null || config === void 0 || (_config$targetTypes6 = config.targetTypes) === null || _config$targetTypes6 === void 0 ? void 0 : _config$targetTypes6.button, | |
| 2313 | - target_name: String(assetId), | |
| 2314 | - interaction_result: config === null || config === void 0 || (_config$interactionRe6 = config.interactionResults) === null || _config$interactionRe6 === void 0 ? void 0 : _config$interactionRe6.assetInserted, | |
| 2315 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations7 = config.locations) === null || _config$locations7 === void 0 ? void 0 : _config$locations7.elementorLibrary), | |
| 2316 | - location_l1: this.toLowerSnake(libraryType), | |
| 2317 | - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca5 = config.secondaryLocations) === null || _config$secondaryLoca5 === void 0 ? void 0 : _config$secondaryLoca5.assetCard), | |
| 2318 | - interaction_description: "User inserts block/pages from elementor library", | |
| 2319 | - metadata: { | |
| 2320 | - template_id: String(assetId), | |
| 2321 | - template_name: this.decodeHtmlEntities(assetName) || "" | |
| 2322 | - } | |
| 2323 | - }); | |
| 2324 | - if (proRequired) payload.state = "pro_plan_required"; | |
| 2325 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names5 = config.names) === null || _config$names5 === void 0 || (_config$names5 = _config$names5.editorOne) === null || _config$names5 === void 0 ? void 0 : _config$names5.eLibraryInsert, payload); | |
| 2326 | - } | |
| 2327 | - }, | |
| 2328 | - { | |
| 2329 | - key: "sendELibraryFavorite", | |
| 2330 | - value: function sendELibraryFavorite(_ref3) { | |
| 2331 | - var _config$triggers6; | |
| 2332 | - var _config$targetTypes7; | |
| 2333 | - var _config$interactionRe7; | |
| 2334 | - var _config$locations8; | |
| 2335 | - var _config$secondaryLoca6; | |
| 2336 | - var _config$names6; | |
| 2337 | - var assetId = _ref3.assetId; | |
| 2338 | - var assetName = _ref3.assetName; | |
| 2339 | - var libraryType = _ref3.libraryType; | |
| 2340 | - var isFavorite = _ref3.isFavorite; | |
| 2341 | - var _ref3$proRequired = _ref3.proRequired; | |
| 2342 | - var proRequired = _ref3$proRequired === void 0 ? false : _ref3$proRequired; | |
| 2343 | - var config = this.getConfig(); | |
| 2344 | - var payload = this.createBasePayload({ | |
| 2345 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers6 = config.triggers) === null || _config$triggers6 === void 0 ? void 0 : _config$triggers6.click), | |
| 2346 | - target_type: config === null || config === void 0 || (_config$targetTypes7 = config.targetTypes) === null || _config$targetTypes7 === void 0 ? void 0 : _config$targetTypes7.toggle, | |
| 2347 | - target_name: String(assetId), | |
| 2348 | - interaction_result: config === null || config === void 0 || (_config$interactionRe7 = config.interactionResults) === null || _config$interactionRe7 === void 0 ? void 0 : _config$interactionRe7.assetFavorite, | |
| 2349 | - target_value: Boolean(isFavorite), | |
| 2350 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations8 = config.locations) === null || _config$locations8 === void 0 ? void 0 : _config$locations8.elementorLibrary), | |
| 2351 | - location_l1: this.toLowerSnake(libraryType), | |
| 2352 | - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca6 = config.secondaryLocations) === null || _config$secondaryLoca6 === void 0 ? void 0 : _config$secondaryLoca6.assetCard), | |
| 2353 | - interaction_description: "User favorite block/pages from elementor library", | |
| 2354 | - metadata: { | |
| 2355 | - template_id: String(assetId), | |
| 2356 | - template_name: this.decodeHtmlEntities(assetName) || "" | |
| 2357 | - } | |
| 2358 | - }); | |
| 2359 | - if (proRequired) payload.state = "pro_plan_required"; | |
| 2360 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names6 = config.names) === null || _config$names6 === void 0 || (_config$names6 = _config$names6.editorOne) === null || _config$names6 === void 0 ? void 0 : _config$names6.eLibraryFavorite, payload); | |
| 2361 | - } | |
| 2362 | - }, | |
| 2363 | - { | |
| 2364 | - key: "sendELibraryGenerateAi", | |
| 2365 | - value: function sendELibraryGenerateAi(_ref4) { | |
| 2366 | - var _config$names7; | |
| 2367 | - var _config$triggers7; | |
| 2368 | - var _config$targetTypes8; | |
| 2369 | - var _config$interactionRe8; | |
| 2370 | - var _config$locations9; | |
| 2371 | - var _config$secondaryLoca7; | |
| 2372 | - var assetId = _ref4.assetId; | |
| 2373 | - var assetName = _ref4.assetName; | |
| 2374 | - var libraryType = _ref4.libraryType; | |
| 2375 | - var config = this.getConfig(); | |
| 2376 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names7 = config.names) === null || _config$names7 === void 0 || (_config$names7 = _config$names7.editorOne) === null || _config$names7 === void 0 ? void 0 : _config$names7.eLibraryGenerateAi, this.createBasePayload({ | |
| 2377 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers7 = config.triggers) === null || _config$triggers7 === void 0 ? void 0 : _config$triggers7.click), | |
| 2378 | - target_type: config === null || config === void 0 || (_config$targetTypes8 = config.targetTypes) === null || _config$targetTypes8 === void 0 ? void 0 : _config$targetTypes8.button, | |
| 2379 | - target_name: String(assetId), | |
| 2380 | - interaction_result: config === null || config === void 0 || (_config$interactionRe8 = config.interactionResults) === null || _config$interactionRe8 === void 0 ? void 0 : _config$interactionRe8.aiGenerate, | |
| 2381 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations9 = config.locations) === null || _config$locations9 === void 0 ? void 0 : _config$locations9.elementorLibrary), | |
| 2382 | - location_l1: this.toLowerSnake(libraryType), | |
| 2383 | - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca7 = config.secondaryLocations) === null || _config$secondaryLoca7 === void 0 ? void 0 : _config$secondaryLoca7.assetCard), | |
| 2384 | - interaction_description: "User generated block/page based on a library asset", | |
| 2385 | - metadata: { | |
| 2386 | - template_id: String(assetId), | |
| 2387 | - template_name: this.decodeHtmlEntities(assetName) || "" | |
| 2388 | - } | |
| 2389 | - })); | |
| 2390 | - } | |
| 2391 | - }, | |
| 2392 | - { | |
| 2393 | - key: "sendFinderSearchInput", | |
| 2394 | - value: function sendFinderSearchInput(_ref5) { | |
| 2395 | - var _config$triggers8; | |
| 2396 | - var _config$targetTypes9; | |
| 2397 | - var _config$interactionRe9; | |
| 2398 | - var _config$interactionRe0; | |
| 2399 | - var _config$secondaryLoca8; | |
| 2400 | - var _config$names8; | |
| 2401 | - var resultsCount = _ref5.resultsCount; | |
| 2402 | - var _ref5$searchTerm = _ref5.searchTerm; | |
| 2403 | - var searchTerm = _ref5$searchTerm === void 0 ? null : _ref5$searchTerm; | |
| 2404 | - var config = this.getConfig(); | |
| 2405 | - var hasResults = resultsCount > 0; | |
| 2406 | - var finderContext = this.getFinderContext(); | |
| 2407 | - var payload = this.createBasePayload({ | |
| 2408 | - window_name: finderContext.windowName, | |
| 2409 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers8 = config.triggers) === null || _config$triggers8 === void 0 ? void 0 : _config$triggers8.typing), | |
| 2410 | - target_type: config === null || config === void 0 || (_config$targetTypes9 = config.targetTypes) === null || _config$targetTypes9 === void 0 ? void 0 : _config$targetTypes9.searchInput, | |
| 2411 | - target_name: "finder", | |
| 2412 | - interaction_result: hasResults ? config === null || config === void 0 || (_config$interactionRe9 = config.interactionResults) === null || _config$interactionRe9 === void 0 ? void 0 : _config$interactionRe9.resultsUpdated : config === null || config === void 0 || (_config$interactionRe0 = config.interactionResults) === null || _config$interactionRe0 === void 0 ? void 0 : _config$interactionRe0.noResults, | |
| 2413 | - target_location: finderContext.targetLocation, | |
| 2414 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca8 = config.secondaryLocations) === null || _config$secondaryLoca8 === void 0 ? void 0 : _config$secondaryLoca8.finder), | |
| 2415 | - interaction_description: "Finder search input, follows debounce behavior", | |
| 2416 | - metadata: { results_count: resultsCount } | |
| 2417 | - }); | |
| 2418 | - if (!hasResults && searchTerm) payload.metadata.search_term = searchTerm; | |
| 2419 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names8 = config.names) === null || _config$names8 === void 0 || (_config$names8 = _config$names8.editorOne) === null || _config$names8 === void 0 ? void 0 : _config$names8.finderSearchInput, payload); | |
| 2420 | - } | |
| 2421 | - }, | |
| 2422 | - { | |
| 2423 | - key: "sendFinderResultSelect", | |
| 2424 | - value: function sendFinderResultSelect(choice) { | |
| 2425 | - var _config$names9; | |
| 2426 | - var _config$triggers9; | |
| 2427 | - var _config$targetTypes0; | |
| 2428 | - var _config$interactionRe1; | |
| 2429 | - var _config$secondaryLoca9; | |
| 2430 | - var _config$secondaryLoca0; | |
| 2431 | - var config = this.getConfig(); | |
| 2432 | - var finderContext = this.getFinderContext(); | |
| 2433 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names9 = config.names) === null || _config$names9 === void 0 || (_config$names9 = _config$names9.editorOne) === null || _config$names9 === void 0 ? void 0 : _config$names9.finderResultSelect, this.createBasePayload({ | |
| 2434 | - window_name: finderContext.windowName, | |
| 2435 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers9 = config.triggers) === null || _config$triggers9 === void 0 ? void 0 : _config$triggers9.click), | |
| 2436 | - target_type: config === null || config === void 0 || (_config$targetTypes0 = config.targetTypes) === null || _config$targetTypes0 === void 0 ? void 0 : _config$targetTypes0.searchResult, | |
| 2437 | - target_name: choice, | |
| 2438 | - interaction_result: config === null || config === void 0 || (_config$interactionRe1 = config.interactionResults) === null || _config$interactionRe1 === void 0 ? void 0 : _config$interactionRe1.selected, | |
| 2439 | - target_location: finderContext.targetLocation, | |
| 2440 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca9 = config.secondaryLocations) === null || _config$secondaryLoca9 === void 0 ? void 0 : _config$secondaryLoca9.finder), | |
| 2441 | - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca0 = config.secondaryLocations) === null || _config$secondaryLoca0 === void 0 ? void 0 : _config$secondaryLoca0.finderResults), | |
| 2442 | - interaction_description: "Finder search results was selected" | |
| 2443 | - })); | |
| 2444 | - } | |
| 2445 | - }, | |
| 2446 | - { | |
| 2447 | - key: "sendCanvasEmptyBoxAction", | |
| 2448 | - value: function sendCanvasEmptyBoxAction(_ref6) { | |
| 2449 | - var _config$triggers0; | |
| 2450 | - var _config$targetTypes1; | |
| 2451 | - var _config$interactionRe10; | |
| 2452 | - var _config$locations0; | |
| 2453 | - var _config$secondaryLoca1; | |
| 2454 | - var _config$names0; | |
| 2455 | - var targetName = _ref6.targetName; | |
| 2456 | - var _ref6$metadata = _ref6.metadata; | |
| 2457 | - var metadata = _ref6$metadata === void 0 ? {} : _ref6$metadata; | |
| 2458 | - var _ref6$containerCreate = _ref6.containerCreated; | |
| 2459 | - var containerCreated = _ref6$containerCreate === void 0 ? null : _ref6$containerCreate; | |
| 2460 | - var config = this.getConfig(); | |
| 2461 | - var payload = this.createBasePayload({ | |
| 2462 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers0 = config.triggers) === null || _config$triggers0 === void 0 ? void 0 : _config$triggers0.click), | |
| 2463 | - target_type: config === null || config === void 0 || (_config$targetTypes1 = config.targetTypes) === null || _config$targetTypes1 === void 0 ? void 0 : _config$targetTypes1.buttons, | |
| 2464 | - target_name: targetName, | |
| 2465 | - interaction_result: config === null || config === void 0 || (_config$interactionRe10 = config.interactionResults) === null || _config$interactionRe10 === void 0 ? void 0 : _config$interactionRe10.selected, | |
| 2466 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations0 = config.locations) === null || _config$locations0 === void 0 ? void 0 : _config$locations0.canvas), | |
| 2467 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca1 = config.secondaryLocations) === null || _config$secondaryLoca1 === void 0 ? void 0 : _config$secondaryLoca1.emptyBox), | |
| 2468 | - interaction_description: "Empty box on canvas actions" | |
| 2469 | - }); | |
| 2470 | - if (Object.keys(metadata).length > 0) payload.metadata = metadata; | |
| 2471 | - if (containerCreated !== null) payload.state = containerCreated; | |
| 2472 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names0 = config.names) === null || _config$names0 === void 0 || (_config$names0 = _config$names0.editorOne) === null || _config$names0 === void 0 ? void 0 : _config$names0.canvasEmptyBoxAction, payload); | |
| 2473 | - } | |
| 2474 | - }, | |
| 2475 | - { | |
| 2476 | - key: "sendWidgetPanelSearch", | |
| 2477 | - value: function sendWidgetPanelSearch(_ref7) { | |
| 2478 | - var _config$triggers1; | |
| 2479 | - var _config$targetTypes10; | |
| 2480 | - var _config$interactionRe11; | |
| 2481 | - var _config$interactionRe12; | |
| 2482 | - var _config$locations1; | |
| 2483 | - var _config$locations10; | |
| 2484 | - var _config$secondaryLoca10; | |
| 2485 | - var _config$names1; | |
| 2486 | - var resultsCount = _ref7.resultsCount; | |
| 2487 | - var _ref7$userInput = _ref7.userInput; | |
| 2488 | - var userInput = _ref7$userInput === void 0 ? null : _ref7$userInput; | |
| 2489 | - var config = this.getConfig(); | |
| 2490 | - var hasResults = resultsCount > 0; | |
| 2491 | - var payload = this.createBasePayload({ | |
| 2492 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers1 = config.triggers) === null || _config$triggers1 === void 0 ? void 0 : _config$triggers1.typing), | |
| 2493 | - target_type: config === null || config === void 0 || (_config$targetTypes10 = config.targetTypes) === null || _config$targetTypes10 === void 0 ? void 0 : _config$targetTypes10.searchWidget, | |
| 2494 | - target_name: "search_widget", | |
| 2495 | - interaction_result: hasResults ? config === null || config === void 0 || (_config$interactionRe11 = config.interactionResults) === null || _config$interactionRe11 === void 0 ? void 0 : _config$interactionRe11.resultsUpdated : config === null || config === void 0 || (_config$interactionRe12 = config.interactionResults) === null || _config$interactionRe12 === void 0 ? void 0 : _config$interactionRe12.noResults, | |
| 2496 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations1 = config.locations) === null || _config$locations1 === void 0 ? void 0 : _config$locations1.leftPanel), | |
| 2497 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$locations10 = config.locations) === null || _config$locations10 === void 0 ? void 0 : _config$locations10.widgetPanel), | |
| 2498 | - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca10 = config.secondaryLocations) === null || _config$secondaryLoca10 === void 0 ? void 0 : _config$secondaryLoca10.searchBar), | |
| 2499 | - interaction_description: "Widget search input, follows debounce behavior" | |
| 2500 | - }); | |
| 2501 | - if (!hasResults && userInput) payload.metadata = { user_input: userInput }; | |
| 2502 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names1 = config.names) === null || _config$names1 === void 0 || (_config$names1 = _config$names1.editorOne) === null || _config$names1 === void 0 ? void 0 : _config$names1.widgetPanelSearch, payload); | |
| 2503 | - } | |
| 2504 | - }, | |
| 2505 | - { | |
| 2506 | - key: "createWpDashPayload", | |
| 2507 | - value: function createWpDashPayload() { | |
| 2508 | - var _config$appTypes$wpDa; | |
| 2509 | - var _config$appTypes4; | |
| 2510 | - var _config$locations11; | |
| 2511 | - var overrides = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 2512 | - var config = this.getConfig(); | |
| 2513 | - return this.createBasePayload(_objectSpread({ | |
| 2514 | - window_name: (_config$appTypes$wpDa = config === null || config === void 0 || (_config$appTypes4 = config.appTypes) === null || _config$appTypes4 === void 0 ? void 0 : _config$appTypes4.wpDash) !== null && _config$appTypes$wpDa !== void 0 ? _config$appTypes$wpDa : "wpdash", | |
| 2515 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations11 = config.locations) === null || _config$locations11 === void 0 ? void 0 : _config$locations11.wpDashAdmin), | |
| 2516 | - location_l2: "" | |
| 2517 | - }, overrides)); | |
| 2518 | - } | |
| 2519 | - }, | |
| 2520 | - { | |
| 2521 | - key: "sendWpDashElementorMenuClick", | |
| 2522 | - value: function sendWpDashElementorMenuClick() { | |
| 2523 | - var _config$names10; | |
| 2524 | - var _config$triggers10; | |
| 2525 | - var _config$targetTypes11; | |
| 2526 | - var _config$interactionRe13; | |
| 2527 | - var _config$secondaryLoca11; | |
| 2528 | - var config = this.getConfig(); | |
| 2529 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names10 = config.names) === null || _config$names10 === void 0 || (_config$names10 = _config$names10.editorOne) === null || _config$names10 === void 0 ? void 0 : _config$names10.wpDashElementorMenuClick, this.createWpDashPayload({ | |
| 2530 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers10 = config.triggers) === null || _config$triggers10 === void 0 ? void 0 : _config$triggers10.click), | |
| 2531 | - target_type: config === null || config === void 0 || (_config$targetTypes11 = config.targetTypes) === null || _config$targetTypes11 === void 0 ? void 0 : _config$targetTypes11.wpDashAdminMenuItem, | |
| 2532 | - target_name: "elementor_menu_item", | |
| 2533 | - interaction_result: config === null || config === void 0 || (_config$interactionRe13 = config.interactionResults) === null || _config$interactionRe13 === void 0 ? void 0 : _config$interactionRe13.elementorSideMenuOpened, | |
| 2534 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca11 = config.secondaryLocations) === null || _config$secondaryLoca11 === void 0 ? void 0 : _config$secondaryLoca11.wpDashElementorCoreMenu), | |
| 2535 | - interaction_description: "core_user_clicked_elementor_menu_item" | |
| 2536 | - })); | |
| 2537 | - } | |
| 2538 | - }, | |
| 2539 | - { | |
| 2540 | - key: "sendWpDashEditorSubMenuHover", | |
| 2541 | - value: function sendWpDashEditorSubMenuHover() { | |
| 2542 | - var _config$names11; | |
| 2543 | - var _config$triggers11; | |
| 2544 | - var _config$targetTypes12; | |
| 2545 | - var _config$interactionRe14; | |
| 2546 | - var _config$secondaryLoca12; | |
| 2547 | - var config = this.getConfig(); | |
| 2548 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names11 = config.names) === null || _config$names11 === void 0 || (_config$names11 = _config$names11.editorOne) === null || _config$names11 === void 0 ? void 0 : _config$names11.wpDashEditorSubMenuHover, this.createWpDashPayload({ | |
| 2549 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers11 = config.triggers) === null || _config$triggers11 === void 0 ? void 0 : _config$triggers11.hover), | |
| 2550 | - target_type: config === null || config === void 0 || (_config$targetTypes12 = config.targetTypes) === null || _config$targetTypes12 === void 0 ? void 0 : _config$targetTypes12.wpDashEditorMenu, | |
| 2551 | - target_name: "wpdash_editor_sub_menu", | |
| 2552 | - interaction_result: config === null || config === void 0 || (_config$interactionRe14 = config.interactionResults) === null || _config$interactionRe14 === void 0 ? void 0 : _config$interactionRe14.editorSubMenuOpened, | |
| 2553 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca12 = config.secondaryLocations) === null || _config$secondaryLoca12 === void 0 ? void 0 : _config$secondaryLoca12.wpDashElementorCoreSubMenu), | |
| 2554 | - interaction_description: "core_user_hovered_sub_menu" | |
| 2555 | - })); | |
| 2556 | - } | |
| 2557 | - }, | |
| 2558 | - { | |
| 2559 | - key: "sendWpDashThemeBuilderClick", | |
| 2560 | - value: function sendWpDashThemeBuilderClick() { | |
| 2561 | - var _config$names12; | |
| 2562 | - var _config$triggers12; | |
| 2563 | - var _config$targetTypes13; | |
| 2564 | - var _config$interactionRe15; | |
| 2565 | - var _config$secondaryLoca13; | |
| 2566 | - var config = this.getConfig(); | |
| 2567 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names12 = config.names) === null || _config$names12 === void 0 || (_config$names12 = _config$names12.editorOne) === null || _config$names12 === void 0 ? void 0 : _config$names12.wpDashThemeBuilderClick, this.createWpDashPayload({ | |
| 2568 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers12 = config.triggers) === null || _config$triggers12 === void 0 ? void 0 : _config$triggers12.click), | |
| 2569 | - target_type: config === null || config === void 0 || (_config$targetTypes13 = config.targetTypes) === null || _config$targetTypes13 === void 0 ? void 0 : _config$targetTypes13.wpDashSubMenuItem, | |
| 2570 | - target_name: "theme_builder_menu_item", | |
| 2571 | - interaction_result: config === null || config === void 0 || (_config$interactionRe15 = config.interactionResults) === null || _config$interactionRe15 === void 0 ? void 0 : _config$interactionRe15.themeBuilderPromotionWindow, | |
| 2572 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca13 = config.secondaryLocations) === null || _config$secondaryLoca13 === void 0 ? void 0 : _config$secondaryLoca13.wpDashThemeBuilder), | |
| 2573 | - interaction_description: "core_user_clicked_theme_builder_menu_item" | |
| 2574 | - })); | |
| 2575 | - } | |
| 2576 | - }, | |
| 2577 | - { | |
| 2578 | - key: "sendSidebarMenuItemClicked", | |
| 2579 | - value: function sendSidebarMenuItemClicked(_ref8) { | |
| 2580 | - var eventId = _ref8.eventId; | |
| 2581 | - var groupEventId = _ref8.groupEventId; | |
| 2582 | - try { | |
| 2583 | - var _config$windowNames; | |
| 2584 | - var _config$triggers13; | |
| 2585 | - var _config$targetTypes14; | |
| 2586 | - var _config$interactionRe16; | |
| 2587 | - var _config$locations12; | |
| 2588 | - var _config$names13; | |
| 2589 | - var config = this.getConfig(); | |
| 2590 | - var payload = this.createBasePayload({ | |
| 2591 | - window_name: config === null || config === void 0 || (_config$windowNames = config.windowNames) === null || _config$windowNames === void 0 ? void 0 : _config$windowNames.sidebarMenu, | |
| 2592 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers13 = config.triggers) === null || _config$triggers13 === void 0 ? void 0 : _config$triggers13.click), | |
| 2593 | - target_type: config === null || config === void 0 || (_config$targetTypes14 = config.targetTypes) === null || _config$targetTypes14 === void 0 ? void 0 : _config$targetTypes14.link, | |
| 2594 | - target_name: eventId, | |
| 2595 | - interaction_result: config === null || config === void 0 || (_config$interactionRe16 = config.interactionResults) === null || _config$interactionRe16 === void 0 ? void 0 : _config$interactionRe16.pageOpened, | |
| 2596 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations12 = config.locations) === null || _config$locations12 === void 0 ? void 0 : _config$locations12.sidebar) | |
| 2597 | - }); | |
| 2598 | - if (groupEventId) payload.location_l1 = groupEventId; | |
| 2599 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names13 = config.names) === null || _config$names13 === void 0 || (_config$names13 = _config$names13.editorOne) === null || _config$names13 === void 0 ? void 0 : _config$names13.sidebarMenuItemClicked, payload); | |
| 2600 | - } catch (error) { | |
| 2601 | - return false; | |
| 2602 | - } | |
| 2603 | - } | |
| 2604 | - }, | |
| 2605 | - { | |
| 2606 | - key: "sendSidebarMenuGroupToggled", | |
| 2607 | - value: function sendSidebarMenuGroupToggled(_ref9) { | |
| 2608 | - var eventId = _ref9.eventId; | |
| 2609 | - var isExpanded = _ref9.isExpanded; | |
| 2610 | - try { | |
| 2611 | - var _config$interactionRe17; | |
| 2612 | - var _config$interactionRe18; | |
| 2613 | - var _config$names14; | |
| 2614 | - var _config$windowNames2; | |
| 2615 | - var _config$triggers14; | |
| 2616 | - var _config$targetTypes15; | |
| 2617 | - var _config$locations13; | |
| 2618 | - var config = this.getConfig(); | |
| 2619 | - var interactionResult = isExpanded ? config === null || config === void 0 || (_config$interactionRe17 = config.interactionResults) === null || _config$interactionRe17 === void 0 ? void 0 : _config$interactionRe17.expanded : config === null || config === void 0 || (_config$interactionRe18 = config.interactionResults) === null || _config$interactionRe18 === void 0 ? void 0 : _config$interactionRe18.collapsed; | |
| 2620 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names14 = config.names) === null || _config$names14 === void 0 || (_config$names14 = _config$names14.editorOne) === null || _config$names14 === void 0 ? void 0 : _config$names14.sidebarMenuGroupToggled, this.createBasePayload({ | |
| 2621 | - window_name: config === null || config === void 0 || (_config$windowNames2 = config.windowNames) === null || _config$windowNames2 === void 0 ? void 0 : _config$windowNames2.sidebarMenu, | |
| 2622 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers14 = config.triggers) === null || _config$triggers14 === void 0 ? void 0 : _config$triggers14.click), | |
| 2623 | - target_type: config === null || config === void 0 || (_config$targetTypes15 = config.targetTypes) === null || _config$targetTypes15 === void 0 ? void 0 : _config$targetTypes15.toggle, | |
| 2624 | - target_name: eventId, | |
| 2625 | - interaction_result: interactionResult, | |
| 2626 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations13 = config.locations) === null || _config$locations13 === void 0 ? void 0 : _config$locations13.sidebar) | |
| 2627 | - })); | |
| 2628 | - } catch (error) { | |
| 2629 | - return false; | |
| 2630 | - } | |
| 2631 | - } | |
| 2632 | - } | |
| 2633 | - ]); | |
| 2634 | - }(); | |
| 2490 | +/***/ "../modules/atomic-widgets/assets/js/editor/utils/regenerate-local-style-ids.js": | |
| 2491 | +/*!**************************************************************************************!*\ | |
| 2492 | + !*** ../modules/atomic-widgets/assets/js/editor/utils/regenerate-local-style-ids.js ***! | |
| 2493 | + \**************************************************************************************/ | |
| 2494 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2635 | 2495 | |
| 2636 | -//#endregion | |
| 2637 | -//#region assets/dev/js/editor/elements/views/container/empty-component.js | |
| 2638 | - function EmptyComponent() { | |
| 2639 | - var container = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}).container; | |
| 2640 | - return /*#__PURE__*/ react.default.createElement("div", { className: "elementor-first-add" }, /*#__PURE__*/ react.default.createElement("div", { | |
| 2641 | - className: "elementor-icon eicon-plus", | |
| 2642 | - onClick: function handleClick() { | |
| 2643 | - if (container) $e.run("document/elements/select", { container }); | |
| 2644 | - EditorOneEventManager.sendCanvasEmptyBoxAction({ targetName: "add_container" }); | |
| 2645 | - $e.route("panel/elements/categories"); | |
| 2646 | - } | |
| 2647 | - })); | |
| 2648 | - } | |
| 2649 | - EmptyComponent.propTypes = { container: import_prop_types.default.object }; | |
| 2496 | +"use strict"; | |
| 2650 | 2497 | |
| 2651 | -//#endregion | |
| 2652 | -//#region modules/atomic-widgets/assets/js/editor/container/atomic-element-empty-view.js | |
| 2653 | - init_defineProperty(); | |
| 2654 | - function _callSuper$1(t, o, e) { | |
| 2655 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 2656 | - } | |
| 2657 | - __name(_callSuper$1, "_callSuper"); | |
| 2658 | - function _isNativeReflectConstruct$1() { | |
| 2659 | - try { | |
| 2660 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 2661 | - } catch (t) {} | |
| 2662 | - return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { | |
| 2663 | - return !!t; | |
| 2664 | - })(); | |
| 2665 | - } | |
| 2666 | - __name(_isNativeReflectConstruct$1, "_isNativeReflectConstruct"); | |
| 2667 | - var AtomicElementEmptyView = /*#__PURE__*/ function(_Marionette$ItemView) { | |
| 2668 | - function AtomicElementEmptyView() { | |
| 2669 | - var _this; | |
| 2670 | - _classCallCheck(this, AtomicElementEmptyView); | |
| 2671 | - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; | |
| 2672 | - _this = _callSuper$1(this, AtomicElementEmptyView, [].concat(args)); | |
| 2673 | - _defineProperty(_this, "template", "<div></div>"); | |
| 2674 | - _defineProperty(_this, "className", "elementor-empty-view"); | |
| 2675 | - _defineProperty(_this, "unmount", null); | |
| 2676 | - return _this; | |
| 2677 | - } | |
| 2678 | - _inherits(AtomicElementEmptyView, _Marionette$ItemView); | |
| 2679 | - return _createClass(AtomicElementEmptyView, [ | |
| 2680 | - { | |
| 2681 | - key: "renderReactDefaultElement", | |
| 2682 | - value: function renderReactDefaultElement(container) { | |
| 2683 | - var unmount = react_default.render(/*#__PURE__*/ react.default.createElement(EmptyComponent, { container }), this.el).unmount; | |
| 2684 | - this.unmount = unmount; | |
| 2685 | - } | |
| 2686 | - }, | |
| 2687 | - { | |
| 2688 | - key: "onBeforeRender", | |
| 2689 | - value: function onBeforeRender() { | |
| 2690 | - if (this.unmount) { | |
| 2691 | - this.unmount(); | |
| 2692 | - this.unmount = null; | |
| 2693 | - } | |
| 2694 | - } | |
| 2695 | - }, | |
| 2696 | - { | |
| 2697 | - key: "onRender", | |
| 2698 | - value: function onRender() { | |
| 2699 | - var _this$_parent; | |
| 2700 | - var _this$_parent$getCont; | |
| 2701 | - this.$el.addClass(this.className); | |
| 2702 | - this.renderReactDefaultElement((_this$_parent = this._parent) === null || _this$_parent === void 0 || (_this$_parent$getCont = _this$_parent.getContainer) === null || _this$_parent$getCont === void 0 ? void 0 : _this$_parent$getCont.call(_this$_parent)); | |
| 2703 | - } | |
| 2704 | - }, | |
| 2705 | - { | |
| 2706 | - key: "onDestroy", | |
| 2707 | - value: function onDestroy() { | |
| 2708 | - var _this$unmount; | |
| 2709 | - (_this$unmount = this.unmount) === null || _this$unmount === void 0 || _this$unmount.call(this); | |
| 2710 | - } | |
| 2711 | - } | |
| 2712 | - ]); | |
| 2713 | - }(Marionette.ItemView); | |
| 2714 | 2498 | |
| 2715 | -//#endregion | |
| 2716 | -//#region assets/dev/js/editor/elements/views/behaviors/sortable.js | |
| 2717 | - var require_sortable = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 2718 | - init_defineProperty(); | |
| 2719 | - function ownKeys(e, r) { | |
| 2720 | - var t = Object.keys(e); | |
| 2721 | - if (Object.getOwnPropertySymbols) { | |
| 2722 | - var o = Object.getOwnPropertySymbols(e); | |
| 2723 | - r && (o = o.filter(function(r) { | |
| 2724 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 2725 | - })), t.push.apply(t, o); | |
| 2726 | - } | |
| 2727 | - return t; | |
| 2728 | - } | |
| 2729 | - function _objectSpread(e) { | |
| 2730 | - for (var r = 1; r < arguments.length; r++) { | |
| 2731 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 2732 | - r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { | |
| 2733 | - _defineProperty(e, r, t[r]); | |
| 2734 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { | |
| 2735 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 2736 | - }); | |
| 2737 | - } | |
| 2738 | - return e; | |
| 2739 | - } | |
| 2740 | - var SortableBehavior = Marionette.Behavior.extend({ | |
| 2741 | - defaults: { elChildType: "widget" }, | |
| 2742 | - events: { | |
| 2743 | - sortstart: "onSortStart", | |
| 2744 | - sortreceive: "onSortReceive", | |
| 2745 | - sortupdate: "onSortUpdate", | |
| 2746 | - sortover: "onSortOver", | |
| 2747 | - sortout: "onSortOut" | |
| 2748 | - }, | |
| 2749 | - initialize: function initialize() { | |
| 2750 | - this.listenTo(elementor.channels.dataEditMode, "switch", this.onEditModeSwitched).listenTo(this.view.options.model, "request:sort:start", this.startSort).listenTo(this.view.options.model, "request:sort:update", this.updateSort).listenTo(this.view.options.model, "request:sort:receive", this.receiveSort); | |
| 2751 | - }, | |
| 2752 | - onEditModeSwitched: function onEditModeSwitched(activeMode) { | |
| 2753 | - this.onToggleSortMode("edit" === activeMode); | |
| 2754 | - }, | |
| 2755 | - refresh: function refresh() { | |
| 2756 | - this.onEditModeSwitched(elementor.channels.dataEditMode.request("activeMode")); | |
| 2757 | - }, | |
| 2758 | - onRender: function onRender() { | |
| 2759 | - var _this = this; | |
| 2760 | - this.view.collection.on("update", function() { | |
| 2761 | - return _this.refresh(); | |
| 2762 | - }); | |
| 2763 | - _.defer(function() { | |
| 2764 | - return _this.refresh(); | |
| 2765 | - }); | |
| 2766 | - }, | |
| 2767 | - onDestroy: function onDestroy() { | |
| 2768 | - this.deactivate(); | |
| 2769 | - }, | |
| 2770 | - /** | |
| 2771 | - * Create an item placeholder in order to avoid UI jumps due to flex. | |
| 2772 | - * | |
| 2773 | - * @param {Object} $element - jQuery element instance to create placeholder for. | |
| 2774 | - * @param {string} className - Placeholder class. | |
| 2775 | - * @param {boolean} hide - Whether to hide the original element. | |
| 2776 | - * | |
| 2777 | - * @return {void} | |
| 2778 | - */ | |
| 2779 | - createPlaceholder: function createPlaceholder($element) { | |
| 2780 | - var className = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""; | |
| 2781 | - var hide = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true; | |
| 2782 | - $element.css("display", ""); | |
| 2783 | - var _$element$ = $element[0]; | |
| 2784 | - var width = _$element$.clientWidth; | |
| 2785 | - var height = _$element$.clientHeight; | |
| 2786 | - if (hide) $element.css("display", "none"); | |
| 2787 | - jQuery("<div />").css(_objectSpread(_objectSpread({}, $element.css([ | |
| 2788 | - "flex-basis", | |
| 2789 | - "flex-grow", | |
| 2790 | - "flex-shrink", | |
| 2791 | - "position" | |
| 2792 | - ])), {}, { | |
| 2793 | - width, | |
| 2794 | - height | |
| 2795 | - })).addClass(className).insertAfter($element); | |
| 2796 | - }, | |
| 2797 | - /** | |
| 2798 | - * Return a settings object for jQuery UI sortable to make it swappable. | |
| 2799 | - * | |
| 2800 | - * @return {{stop: Function, start: Function}} options | |
| 2801 | - */ | |
| 2802 | - getSwappableOptions: function getSwappableOptions() { | |
| 2803 | - var _this2 = this; | |
| 2804 | - var $childViewContainer = this.getChildViewContainer(); | |
| 2805 | - var placeholderClass = "e-swappable--item-placeholder"; | |
| 2806 | - return { | |
| 2807 | - start: function start(event, ui) { | |
| 2808 | - $childViewContainer.sortable("refreshPositions"); | |
| 2809 | - _this2.createPlaceholder(ui.item, placeholderClass); | |
| 2810 | - }, | |
| 2811 | - stop: function stop() { | |
| 2812 | - $childViewContainer.find(".".concat(placeholderClass)).remove(); | |
| 2813 | - } | |
| 2814 | - }; | |
| 2815 | - }, | |
| 2816 | - onToggleSortMode: function onToggleSortMode(isActive) { | |
| 2817 | - if (isActive) this.activate(); | |
| 2818 | - else this.deactivate(); | |
| 2819 | - }, | |
| 2820 | - applySortable: function applySortable() { | |
| 2821 | - if (!elementor.userCan("design")) return; | |
| 2822 | - var $childViewContainer = this.getChildViewContainer(); | |
| 2823 | - var defaultSortableOptions = { | |
| 2824 | - placeholder: "elementor-sortable-placeholder elementor-" + this.getOption("elChildType") + "-placeholder", | |
| 2825 | - cursorAt: { | |
| 2826 | - top: 20, | |
| 2827 | - left: 25 | |
| 2828 | - }, | |
| 2829 | - helper: this._getSortableHelper.bind(this), | |
| 2830 | - cancel: "input, textarea, button, select, option, .elementor-inline-editing, .elementor-tab-title", | |
| 2831 | - start: function start() { | |
| 2832 | - $childViewContainer.sortable("refreshPositions"); | |
| 2833 | - } | |
| 2834 | - }; | |
| 2835 | - var sortableOptions = _.extend(defaultSortableOptions, this.view.getSortableOptions()); | |
| 2836 | - if (this.isSwappable()) { | |
| 2837 | - $childViewContainer.addClass("e-swappable"); | |
| 2838 | - sortableOptions = _.extend(sortableOptions, this.getSwappableOptions()); | |
| 2839 | - } | |
| 2840 | - if (sortableOptions.preventInit) return; | |
| 2841 | - $childViewContainer.sortable(sortableOptions); | |
| 2842 | - }, | |
| 2843 | - /** | |
| 2844 | - * Enable sorting for this element, and generate sortable instance for it unless already generated. | |
| 2845 | - */ | |
| 2846 | - activate: function activate() { | |
| 2847 | - if (!this.getChildViewContainer().sortable("instance")) { | |
| 2848 | - this.applySortable(); | |
| 2849 | - return; | |
| 2850 | - } | |
| 2851 | - this.getChildViewContainer().sortable("enable"); | |
| 2852 | - }, | |
| 2853 | - _getSortableHelper: function _getSortableHelper(event, $item) { | |
| 2854 | - var model = this.view.collection.get({ cid: $item.data("model-cid") }); | |
| 2855 | - return "<div style=\"height: 84px; width: 125px;\" class=\"elementor-sortable-helper elementor-sortable-helper-" + model.get("elType") + "\"><div class=\"icon\"><i class=\"" + model.getIcon() + "\"></i></div><div class=\"title-wrapper\"><div class=\"title\">" + model.getTitle() + "</div></div></div>"; | |
| 2856 | - }, | |
| 2857 | - getChildViewContainer: function getChildViewContainer() { | |
| 2858 | - return this.view.getChildViewContainer(this.view); | |
| 2859 | - }, | |
| 2860 | - getSortedElementNewIndex: function getSortedElementNewIndex($element) { | |
| 2861 | - return Object.values($element.parent().find("> .elementor-element")).indexOf($element[0]); | |
| 2862 | - }, | |
| 2863 | - /** | |
| 2864 | - * Disable sorting of the element unless no sortable instance exists, in which case there is already no option to | |
| 2865 | - * sort. | |
| 2866 | - */ | |
| 2867 | - deactivate: function deactivate() { | |
| 2868 | - var childViewContainer = this.getChildViewContainer(); | |
| 2869 | - if (childViewContainer.sortable("instance")) childViewContainer.sortable("disable"); | |
| 2870 | - }, | |
| 2871 | - /** | |
| 2872 | - * Determine if the current instance of Sortable is swappable. | |
| 2873 | - * | |
| 2874 | - * @return {boolean} is swappable | |
| 2875 | - */ | |
| 2876 | - isSwappable: function isSwappable() { | |
| 2877 | - return !!this.view.getSortableOptions().swappable; | |
| 2878 | - }, | |
| 2879 | - startSort: function startSort(event, ui) { | |
| 2880 | - event.stopPropagation(); | |
| 2881 | - var container = elementor.getContainer(ui.item.attr("data-id")); | |
| 2882 | - elementor.channels.data.reply("dragging:model", container.model).reply("dragging:view", container.view).reply("dragging:parent:view", this.view).trigger("drag:start", container.model).trigger(container.model.get("elType") + ":drag:start"); | |
| 2883 | - }, | |
| 2884 | - updateSort: function updateSort(ui, newIndex) { | |
| 2885 | - if (void 0 === newIndex) newIndex = ui.item.index(); | |
| 2886 | - var child = elementor.channels.data.request("dragging:view").getContainer(); | |
| 2887 | - if (!this.moveChild(child, newIndex)) jQuery(ui.sender).sortable("cancel"); | |
| 2888 | - }, | |
| 2889 | - receiveSort: function receiveSort(event, ui, newIndex) { | |
| 2890 | - event.stopPropagation(); | |
| 2891 | - if (this.view.isCollectionFilled()) { | |
| 2892 | - jQuery(ui.sender).sortable("cancel"); | |
| 2893 | - return; | |
| 2894 | - } | |
| 2895 | - var model = elementor.channels.data.request("dragging:model"); | |
| 2896 | - var draggedIsInnerSection = "section" === model.get("elType") && model.get("isInner"); | |
| 2897 | - var targetIsInnerColumn = "column" === this.view.getElementType() && this.view.isInner(); | |
| 2898 | - if (draggedIsInnerSection && targetIsInnerColumn) { | |
| 2899 | - jQuery(ui.sender).sortable("cancel"); | |
| 2900 | - return; | |
| 2901 | - } | |
| 2902 | - if (void 0 === newIndex) newIndex = ui.item.index(); | |
| 2903 | - var child = elementor.channels.data.request("dragging:view").getContainer(); | |
| 2904 | - if (!this.moveChild(child, newIndex)) jQuery(ui.sender).sortable("cancel"); | |
| 2905 | - }, | |
| 2906 | - onSortStart: function onSortStart(event, ui) { | |
| 2907 | - if ("column" === this.options.elChildType) { | |
| 2908 | - var uiItems = ui.item.data("sortableItem").items; | |
| 2909 | - var itemHeight = 0; | |
| 2910 | - uiItems.forEach(function(item) { | |
| 2911 | - if (item.item[0] === ui.item[0]) { | |
| 2912 | - itemHeight = item.height; | |
| 2913 | - return false; | |
| 2914 | - } | |
| 2915 | - }); | |
| 2916 | - ui.placeholder.height(itemHeight); | |
| 2917 | - } | |
| 2918 | - this.startSort(event, ui); | |
| 2919 | - }, | |
| 2920 | - onSortOver: function onSortOver(event) { | |
| 2921 | - event.stopPropagation(); | |
| 2922 | - var model = elementor.channels.data.request("dragging:model"); | |
| 2923 | - jQuery(event.target).addClass("elementor-draggable-over").attr({ | |
| 2924 | - "data-dragged-element": model.get("elType"), | |
| 2925 | - "data-dragged-is-inner": model.get("isInner") | |
| 2926 | - }); | |
| 2927 | - this.$el.addClass("elementor-dragging-on-child"); | |
| 2928 | - }, | |
| 2929 | - onSortOut: function onSortOut(event) { | |
| 2930 | - event.stopPropagation(); | |
| 2931 | - jQuery(event.target).removeClass("elementor-draggable-over").removeAttr("data-dragged-element data-dragged-is-inner"); | |
| 2932 | - this.$el.removeClass("elementor-dragging-on-child"); | |
| 2933 | - }, | |
| 2934 | - onSortReceive: function onSortReceive(event, ui) { | |
| 2935 | - this.receiveSort(event, ui, this.getSortedElementNewIndex(ui.item)); | |
| 2936 | - }, | |
| 2937 | - onSortUpdate: function onSortUpdate(event, ui) { | |
| 2938 | - event.stopPropagation(); | |
| 2939 | - if (this.getChildViewContainer()[0] !== ui.item.parent()[0]) return; | |
| 2940 | - this.updateSort(ui, this.getSortedElementNewIndex(ui.item)); | |
| 2941 | - }, | |
| 2942 | - onAddChild: function onAddChild(view) { | |
| 2943 | - view.$el.attr("data-model-cid", view.model.cid); | |
| 2944 | - }, | |
| 2945 | - /** | |
| 2946 | - * Move a child container to another position. | |
| 2947 | - * | |
| 2948 | - * @param {Container} child - The child container to move. | |
| 2949 | - * @param {number|string} index - New index. | |
| 2950 | - * | |
| 2951 | - * @return {Container|boolean} | |
| 2952 | - */ | |
| 2953 | - moveChild: function moveChild(child, index) { | |
| 2954 | - return $e.run("document/elements/move", { | |
| 2955 | - container: child, | |
| 2956 | - target: this.view.getContainer(), | |
| 2957 | - options: { at: index } | |
| 2958 | - }); | |
| 2959 | - } | |
| 2960 | - }); | |
| 2961 | - module.exports = SortableBehavior; | |
| 2962 | - })); | |
| 2499 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2500 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2501 | + value: true | |
| 2502 | +})); | |
| 2503 | +exports.regenerateLocalStyleIds = regenerateLocalStyleIds; | |
| 2504 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 2505 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 2506 | +var _getElementChildren = __webpack_require__(/*! ./get-element-children */ "../modules/atomic-widgets/assets/js/editor/utils/get-element-children.js"); | |
| 2507 | +var _getRandomStyleId = __webpack_require__(/*! ./get-random-style-id */ "../modules/atomic-widgets/assets/js/editor/utils/get-random-style-id.js"); | |
| 2508 | +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 2509 | +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 2510 | +/** | |
| 2511 | + * @typedef {import('assets/dev/js/editor/container/container')} Container | |
| 2512 | + */ | |
| 2963 | 2513 | |
| 2964 | -//#endregion | |
| 2965 | -//#region modules/atomic-widgets/assets/js/editor/create-atomic-element-base-view.js | |
| 2966 | - var BaseElementView = elementor.modules.elements.views.BaseElement; | |
| 2967 | - function createAtomicElementBaseView(type) { | |
| 2968 | - return BaseElementView.extend({ | |
| 2969 | - template: Marionette.TemplateCache.get("#tmpl-elementor-".concat(type, "-content")), | |
| 2970 | - emptyView: AtomicElementEmptyView, | |
| 2971 | - _childrenRenderPromises: [], | |
| 2972 | - _createElement: function _createElement(tag) { | |
| 2973 | - var _elementor$$preview; | |
| 2974 | - var previewDocument = (_elementor$$preview = elementor.$preview) === null || _elementor$$preview === void 0 || (_elementor$$preview = _elementor$$preview[0]) === null || _elementor$$preview === void 0 ? void 0 : _elementor$$preview.contentDocument; | |
| 2975 | - if (previewDocument) return previewDocument.createElement(tag); | |
| 2976 | - return document.createElement(tag); | |
| 2977 | - }, | |
| 2978 | - getChildViewContainer: function getChildViewContainer() { | |
| 2979 | - this.childViewContainer = ""; | |
| 2980 | - return Marionette.CompositeView.prototype.getChildViewContainer.apply(this, arguments); | |
| 2981 | - }, | |
| 2982 | - getChildType: function getChildType() { | |
| 2983 | - var atomicElements = Object.entries(elementor.config.elements).filter(function(_ref) { | |
| 2984 | - var element = _slicedToArray(_ref, 2)[1]; | |
| 2985 | - return !!(element !== null && element !== void 0 && element.atomic_props_schema); | |
| 2986 | - }).map(function(_ref3) { | |
| 2987 | - return _slicedToArray(_ref3, 1)[0]; | |
| 2988 | - }); | |
| 2989 | - return ["widget", "container"].concat(_toConsumableArray(atomicElements)); | |
| 2990 | - }, | |
| 2991 | - getRenderContext: function getRenderContext() { | |
| 2992 | - var _this$_parent; | |
| 2993 | - var _this$_parent$getRend; | |
| 2994 | - return (_this$_parent = this._parent) === null || _this$_parent === void 0 || (_this$_parent$getRend = _this$_parent.getRenderContext) === null || _this$_parent$getRend === void 0 ? void 0 : _this$_parent$getRend.call(_this$_parent); | |
| 2995 | - }, | |
| 2996 | - getResolverRenderContext: function getResolverRenderContext() { | |
| 2997 | - var _this$_parent2; | |
| 2998 | - var _this$_parent2$getRes; | |
| 2999 | - return (_this$_parent2 = this._parent) === null || _this$_parent2 === void 0 || (_this$_parent2$getRes = _this$_parent2.getResolverRenderContext) === null || _this$_parent2$getRes === void 0 ? void 0 : _this$_parent2$getRes.call(_this$_parent2); | |
| 3000 | - }, | |
| 3001 | - render: function render() { | |
| 3002 | - var _this = this; | |
| 3003 | - this._currentRenderPromise = new Promise(function(resolve) { | |
| 3004 | - if (_this._shouldSkipFullRender()) _this._renderWithoutDomRecreation(resolve); | |
| 3005 | - else _this._renderWithDomRecreation(resolve); | |
| 3006 | - }); | |
| 3007 | - return this; | |
| 3008 | - }, | |
| 3009 | - _shouldSkipFullRender: function _shouldSkipFullRender() { | |
| 3010 | - return this.isRendered && this._hasConnectedChildren(); | |
| 3011 | - }, | |
| 3012 | - _hasConnectedChildren: function _hasConnectedChildren() { | |
| 3013 | - var _this$children; | |
| 3014 | - var _firstChild$$el$get$i; | |
| 3015 | - var _firstChild$$el; | |
| 3016 | - if (!((_this$children = this.children) !== null && _this$children !== void 0 && _this$children.length)) return false; | |
| 3017 | - var firstChild = this.children.findByIndex(0); | |
| 3018 | - return (_firstChild$$el$get$i = firstChild === null || firstChild === void 0 || (_firstChild$$el = firstChild.$el) === null || _firstChild$$el === void 0 || (_firstChild$$el = _firstChild$$el.get(0)) === null || _firstChild$$el === void 0 ? void 0 : _firstChild$$el.isConnected) !== null && _firstChild$$el$get$i !== void 0 ? _firstChild$$el$get$i : false; | |
| 3019 | - }, | |
| 3020 | - _renderWithoutDomRecreation: function _renderWithoutDomRecreation(resolve) { | |
| 3021 | - var _this2 = this; | |
| 3022 | - this._beforeRender(); | |
| 3023 | - this._renderChildren(); | |
| 3024 | - this._waitForChildrenToComplete().then(function() { | |
| 3025 | - _this2._afterRender(); | |
| 3026 | - resolve(); | |
| 3027 | - }); | |
| 3028 | - }, | |
| 3029 | - _renderWithDomRecreation: function _renderWithDomRecreation(resolve) { | |
| 3030 | - BaseElementView.prototype.render.apply(this, arguments); | |
| 3031 | - this._waitForChildrenToComplete().then(function() { | |
| 3032 | - resolve(); | |
| 3033 | - }); | |
| 3034 | - }, | |
| 3035 | - _beforeRender: function _beforeRender() { | |
| 3036 | - this._isRendering = true; | |
| 3037 | - this.triggerMethod("before:render", this); | |
| 3038 | - }, | |
| 3039 | - _afterRender: function _afterRender() { | |
| 3040 | - this._isRendering = false; | |
| 3041 | - this.isRendered = true; | |
| 3042 | - this.triggerMethod("render", this); | |
| 3043 | - }, | |
| 3044 | - _waitForChildrenToComplete: function _waitForChildrenToComplete() { | |
| 3045 | - var _this3 = this; | |
| 3046 | - return _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee() { | |
| 3047 | - return import_regenerator.default.wrap(function(_context) { | |
| 3048 | - while (1) switch (_context.prev = _context.next) { | |
| 3049 | - case 0: | |
| 3050 | - if (!(_this3._childrenRenderPromises.length > 0)) { | |
| 3051 | - _context.next = 1; | |
| 3052 | - break; | |
| 3053 | - } | |
| 3054 | - _context.next = 1; | |
| 3055 | - return Promise.all(_this3._childrenRenderPromises); | |
| 3056 | - case 1: | |
| 3057 | - case "end": return _context.stop(); | |
| 3058 | - } | |
| 3059 | - }, _callee); | |
| 3060 | - }))(); | |
| 3061 | - }, | |
| 3062 | - _renderChildren: function _renderChildren() { | |
| 3063 | - if (this._shouldSkipFullRender()) { | |
| 3064 | - var _this$children2; | |
| 3065 | - (_this$children2 = this.children) === null || _this$children2 === void 0 || _this$children2.each(function(childView) { | |
| 3066 | - return childView.render(); | |
| 3067 | - }); | |
| 3068 | - } else BaseElementView.prototype._renderChildren.apply(this, arguments); | |
| 3069 | - this._collectChildrenRenderPromises(); | |
| 3070 | - }, | |
| 3071 | - _collectChildrenRenderPromises: function _collectChildrenRenderPromises() { | |
| 3072 | - var _this$children3; | |
| 3073 | - var _this4 = this; | |
| 3074 | - this._childrenRenderPromises = []; | |
| 3075 | - (_this$children3 = this.children) === null || _this$children3 === void 0 || _this$children3.each(function(childView) { | |
| 3076 | - if (childView._currentRenderPromise) _this4._childrenRenderPromises.push(childView._currentRenderPromise); | |
| 3077 | - }); | |
| 3078 | - }, | |
| 3079 | - onRender: function onRender() { | |
| 3080 | - var _this5 = this; | |
| 3081 | - this.dispatchPreviewEvent("elementor/element/render"); | |
| 3082 | - BaseElementView.prototype.onRender.apply(this, arguments); | |
| 3083 | - setTimeout(function() { | |
| 3084 | - if (_this5.isAtomicGridContainer()) _this5.reInitEmptyView(); | |
| 3085 | - _this5.droppableInitialize(); | |
| 3086 | - _this5.updateHandlesPosition(); | |
| 3087 | - }); | |
| 3088 | - }, | |
| 3089 | - destroyEmptyView: function destroyEmptyView() { | |
| 3090 | - if (this.isAtomicGridContainer()) return; | |
| 3091 | - return Marionette.CompositeView.prototype.destroyEmptyView.apply(this, arguments); | |
| 3092 | - }, | |
| 3093 | - isAtomicGridContainer: function isAtomicGridContainer() { | |
| 3094 | - return "e-grid" === type; | |
| 3095 | - }, | |
| 3096 | - reInitEmptyView: function reInitEmptyView() { | |
| 3097 | - var _this$el; | |
| 3098 | - if ((_this$el = this.el) !== null && _this$el !== void 0 && _this$el.querySelector(":scope > .elementor-empty-view")) return; | |
| 3099 | - delete this._showingEmptyView; | |
| 3100 | - this.showEmptyView(); | |
| 3101 | - }, | |
| 3102 | - onDestroy: function onDestroy() { | |
| 3103 | - BaseElementView.prototype.onDestroy.apply(this, arguments); | |
| 3104 | - this.dispatchPreviewEvent("elementor/element/destroy"); | |
| 3105 | - }, | |
| 3106 | - dispatchPreviewEvent: function dispatchPreviewEvent(eventType) { | |
| 3107 | - var _elementor; | |
| 3108 | - (_elementor = elementor) === null || _elementor === void 0 || (_elementor = _elementor.$preview) === null || _elementor === void 0 || (_elementor = _elementor[0]) === null || _elementor === void 0 || _elementor.contentWindow.dispatchEvent(new CustomEvent(eventType, { detail: { | |
| 3109 | - id: this.model.get("id"), | |
| 3110 | - type: this.model.get("elType"), | |
| 3111 | - element: this.getDomElement().get(0) | |
| 3112 | - } })); | |
| 3113 | - }, | |
| 3114 | - droppableInitialize: function droppableInitialize() { | |
| 3115 | - this.$el.html5Droppable(this.getDroppableOptions()); | |
| 3116 | - }, | |
| 3117 | - /** | |
| 3118 | - * Add a `Save as a Template` button to the context menu. | |
| 3119 | - * | |
| 3120 | - * @return {Object} groups | |
| 3121 | - */ | |
| 3122 | - getContextMenuGroups: function getContextMenuGroups() { | |
| 3123 | - var _this6 = this; | |
| 3124 | - var saveActions = [{ | |
| 3125 | - name: "save", | |
| 3126 | - title: (0, _wordpress_i18n.__)("Save as a template", "elementor"), | |
| 3127 | - callback: this.saveAsTemplate.bind(this), | |
| 3128 | - isEnabled: function isEnabled() { | |
| 3129 | - return !_this6.getContainer().isLocked(); | |
| 3130 | - } | |
| 3131 | - }]; | |
| 3132 | - if (elementor.config.user.is_administrator) { | |
| 3133 | - var _window$elementorV2$u; | |
| 3134 | - var _window$elementorV; | |
| 3135 | - var _window$elementorV$is; | |
| 3136 | - var _window$elementorV2$u2; | |
| 3137 | - var _window$elementorV2; | |
| 3138 | - var _window$elementorV2$h; | |
| 3139 | - var _window$elementorV2$u3; | |
| 3140 | - var _window$elementorV3; | |
| 3141 | - var _window$elementorV3$i; | |
| 3142 | - var isProActive = (_window$elementorV2$u = (_window$elementorV = window.elementorV2) === null || _window$elementorV === void 0 || (_window$elementorV = _window$elementorV.utils) === null || _window$elementorV === void 0 || (_window$elementorV$is = _window$elementorV.isProActive) === null || _window$elementorV$is === void 0 ? void 0 : _window$elementorV$is.call(_window$elementorV)) !== null && _window$elementorV2$u !== void 0 ? _window$elementorV2$u : true; | |
| 3143 | - var isProOutdated = ((_window$elementorV2$u2 = (_window$elementorV2 = window.elementorV2) === null || _window$elementorV2 === void 0 || (_window$elementorV2 = _window$elementorV2.utils) === null || _window$elementorV2 === void 0 || (_window$elementorV2$h = _window$elementorV2.hasProInstalled) === null || _window$elementorV2$h === void 0 ? void 0 : _window$elementorV2$h.call(_window$elementorV2)) !== null && _window$elementorV2$u2 !== void 0 ? _window$elementorV2$u2 : false) && !((_window$elementorV2$u3 = (_window$elementorV3 = window.elementorV2) === null || _window$elementorV3 === void 0 || (_window$elementorV3 = _window$elementorV3.utils) === null || _window$elementorV3 === void 0 || (_window$elementorV3$i = _window$elementorV3.isProAtLeast) === null || _window$elementorV3$i === void 0 ? void 0 : _window$elementorV3$i.call(_window$elementorV3, "4.0")) !== null && _window$elementorV2$u3 !== void 0 ? _window$elementorV2$u3 : false); | |
| 3144 | - var showPromoBadge = !isProActive && !isProOutdated; | |
| 3145 | - var newBadge = "<span class=\"elementor-context-menu-list__item__shortcut__new-badge\">".concat((0, _wordpress_i18n.__)("New", "elementor"), "</span>"); | |
| 3146 | - var proBadge = "<a href=\"https://go.elementor.com/go-pro-components-Instance-create-context-menu/\" target=\"_blank\" onclick=\"event.stopPropagation()\" class=\"".concat("elementor-context-menu-list__item__shortcut__promotion-badge", "\"><i class=\"eicon-upgrade-crown\"></i></a>"); | |
| 3147 | - saveActions.unshift({ | |
| 3148 | - name: "save-component", | |
| 3149 | - title: (0, _wordpress_i18n.__)("Create component", "elementor"), | |
| 3150 | - shortcut: isProActive || isProOutdated ? newBadge : proBadge, | |
| 3151 | - hasShortcutAction: showPromoBadge, | |
| 3152 | - callback: this.saveAsComponent.bind(this), | |
| 3153 | - isEnabled: function isEnabled() { | |
| 3154 | - return (isProActive || isProOutdated) && !_this6.getContainer().isLocked(); | |
| 3155 | - } | |
| 3156 | - }); | |
| 3157 | - } | |
| 3158 | - var groups = BaseElementView.prototype.getContextMenuGroups.apply(this, arguments); | |
| 3159 | - var transferGroupClipboardIndex = groups.indexOf(_.findWhere(groups, { name: "clipboard" })); | |
| 3160 | - groups.splice(transferGroupClipboardIndex + 1, 0, { | |
| 3161 | - name: "save", | |
| 3162 | - actions: saveActions | |
| 3163 | - }); | |
| 3164 | - return groups; | |
| 3165 | - }, | |
| 3166 | - saveAsTemplate: function saveAsTemplate() { | |
| 3167 | - elementor.templates.eventManager.sendNewSaveTemplateClickedEvent(); | |
| 3168 | - $e.route("library/save-template", { model: this.model }); | |
| 3169 | - }, | |
| 3170 | - saveAsComponent: function saveAsComponent(openContextMenuEvent, options) { | |
| 3171 | - var _window$elementorV2$u4; | |
| 3172 | - var _window$elementorV4; | |
| 3173 | - var _window$elementorV4$h; | |
| 3174 | - var _window$elementorV2$u5; | |
| 3175 | - var _window$elementorV5; | |
| 3176 | - var _window$elementorV5$i; | |
| 3177 | - var _window$elementorV2$u6; | |
| 3178 | - var _window$elementorV7; | |
| 3179 | - var _window$elementorV7$i; | |
| 3180 | - if (((_window$elementorV2$u4 = (_window$elementorV4 = window.elementorV2) === null || _window$elementorV4 === void 0 || (_window$elementorV4 = _window$elementorV4.utils) === null || _window$elementorV4 === void 0 || (_window$elementorV4$h = _window$elementorV4.hasProInstalled) === null || _window$elementorV4$h === void 0 ? void 0 : _window$elementorV4$h.call(_window$elementorV4)) !== null && _window$elementorV2$u4 !== void 0 ? _window$elementorV2$u4 : false) && !((_window$elementorV2$u5 = (_window$elementorV5 = window.elementorV2) === null || _window$elementorV5 === void 0 || (_window$elementorV5 = _window$elementorV5.utils) === null || _window$elementorV5 === void 0 || (_window$elementorV5$i = _window$elementorV5.isProAtLeast) === null || _window$elementorV5$i === void 0 ? void 0 : _window$elementorV5$i.call(_window$elementorV5, "4.0")) !== null && _window$elementorV2$u5 !== void 0 ? _window$elementorV2$u5 : false)) { | |
| 3181 | - var _window$elementorV6; | |
| 3182 | - var _window$elementorV6$n; | |
| 3183 | - (_window$elementorV6 = window.elementorV2) === null || _window$elementorV6 === void 0 || (_window$elementorV6 = _window$elementorV6.editorNotifications) === null || _window$elementorV6 === void 0 || (_window$elementorV6$n = _window$elementorV6.notify) === null || _window$elementorV6$n === void 0 || _window$elementorV6$n.call(_window$elementorV6, { | |
| 3184 | - type: "info", | |
| 3185 | - id: "component-create-update", | |
| 3186 | - message: (0, _wordpress_i18n.__)("To create new components, update Elementor Pro to the latest version.", "elementor"), | |
| 3187 | - additionalActionProps: [{ | |
| 3188 | - size: "small", | |
| 3189 | - variant: "contained", | |
| 3190 | - color: "info", | |
| 3191 | - href: "/wp-admin/plugins.php", | |
| 3192 | - target: "_blank", | |
| 3193 | - children: (0, _wordpress_i18n.__)("Update Now", "elementor") | |
| 3194 | - }] | |
| 3195 | - }); | |
| 3196 | - return; | |
| 3197 | - } | |
| 3198 | - if (!((_window$elementorV2$u6 = (_window$elementorV7 = window.elementorV2) === null || _window$elementorV7 === void 0 || (_window$elementorV7 = _window$elementorV7.utils) === null || _window$elementorV7 === void 0 || (_window$elementorV7$i = _window$elementorV7.isProActive) === null || _window$elementorV7$i === void 0 ? void 0 : _window$elementorV7$i.call(_window$elementorV7)) !== null && _window$elementorV2$u6 !== void 0 ? _window$elementorV2$u6 : true)) return; | |
| 3199 | - var openMenuOriginalEvent = openContextMenuEvent.originalEvent; | |
| 3200 | - var iframeRect = elementor.$preview[0].getBoundingClientRect(); | |
| 3201 | - var anchorPosition = { | |
| 3202 | - left: openMenuOriginalEvent.clientX + iframeRect.left, | |
| 3203 | - top: openMenuOriginalEvent.clientY + iframeRect.top | |
| 3204 | - }; | |
| 3205 | - window.dispatchEvent(new CustomEvent("elementor/editor/open-save-as-component-form", { detail: { | |
| 3206 | - element: elementor.getContainer(this.model.id).model.toJSON({ remove: ["default"] }), | |
| 3207 | - anchorPosition, | |
| 3208 | - options | |
| 3209 | - } })); | |
| 3210 | - }, | |
| 3211 | - isDroppingAllowed: function isDroppingAllowed() { | |
| 3212 | - return this.getContainer().isEditable(); | |
| 3213 | - }, | |
| 3214 | - behaviors: function behaviors() { | |
| 3215 | - var behaviors = BaseElementView.prototype.behaviors.apply(this, arguments); | |
| 3216 | - _.extend(behaviors, { Sortable: { | |
| 3217 | - behaviorClass: require_sortable(), | |
| 3218 | - elChildType: "widget" | |
| 3219 | - } }); | |
| 3220 | - return elementor.hooks.applyFilters("elements/".concat(type, "/behaviors"), behaviors, this); | |
| 3221 | - }, | |
| 3222 | - /** | |
| 3223 | - * @return {{}} options | |
| 3224 | - */ | |
| 3225 | - getSortableOptions: function getSortableOptions() { | |
| 3226 | - return { preventInit: true }; | |
| 3227 | - }, | |
| 3228 | - getDroppableOptions: function getDroppableOptions() { | |
| 3229 | - var _this7 = this; | |
| 3230 | - return { | |
| 3231 | - axis: this.isAtomicGridContainer() ? "vertical" : null, | |
| 3232 | - items: "> .elementor-element, > .elementor-empty-view .elementor-first-add", | |
| 3233 | - groups: ["elementor-element"], | |
| 3234 | - horizontalThreshold: 0, | |
| 3235 | - isDroppingAllowed: this.isDroppingAllowed.bind(this), | |
| 3236 | - currentElementClass: "elementor-html5dnd-current-element", | |
| 3237 | - placeholderClass: "elementor-sortable-placeholder elementor-widget-placeholder", | |
| 3238 | - hasDraggingOnChildClass: "e-dragging-over", | |
| 3239 | - getDropContainer: function getDropContainer() { | |
| 3240 | - return _this7.getContainer(); | |
| 3241 | - }, | |
| 3242 | - onDropping: function onDropping(side, event) { | |
| 3243 | - event.stopPropagation(); | |
| 3244 | - elementor.getPreviewView().onPanelElementDragEnd(); | |
| 3245 | - var draggedView = elementor.channels.editor.request("element:dragged"); | |
| 3246 | - var draggedElement = draggedView === null || draggedView === void 0 ? void 0 : draggedView.getContainer().view.el; | |
| 3247 | - var isEmptyViewTarget = _this7.emptyViewIsCurrentlyBeingDraggedOver(); | |
| 3248 | - var containerElement = isEmptyViewTarget ? _this7.el : event.currentTarget.parentElement; | |
| 3249 | - var elements = Array.from((containerElement === null || containerElement === void 0 ? void 0 : containerElement.querySelectorAll(":scope > .elementor-element")) || []); | |
| 3250 | - var targetIndex = isEmptyViewTarget ? elements.length : elements.indexOf(event.currentTarget); | |
| 3251 | - if (_this7.isPanelElement(draggedView, draggedElement)) { | |
| 3252 | - if (_this7.draggingOnBottomOrRightSide(side) && !isEmptyViewTarget) targetIndex++; | |
| 3253 | - _this7.onDrop(event, { at: targetIndex }); | |
| 3254 | - return; | |
| 3255 | - } | |
| 3256 | - if (_this7.isParentElement(draggedView.getContainer().id)) return; | |
| 3257 | - if (isEmptyViewTarget) { | |
| 3258 | - _this7.moveDroppedItem(draggedView, targetIndex); | |
| 3259 | - return; | |
| 3260 | - } | |
| 3261 | - _this7.moveExistingElement(side, draggedView, containerElement, elements, targetIndex, draggedElement); | |
| 3262 | - } | |
| 3263 | - }; | |
| 3264 | - }, | |
| 3265 | - moveExistingElement: function moveExistingElement(side, draggedView, containerElement, elements, targetIndex, draggedElement) { | |
| 3266 | - var selfIndex = elements.indexOf(draggedElement); | |
| 3267 | - if (targetIndex === selfIndex) return; | |
| 3268 | - var dropIndex = this.getDropIndex(containerElement, side, targetIndex, selfIndex); | |
| 3269 | - this.moveDroppedItem(draggedView, dropIndex); | |
| 3270 | - }, | |
| 3271 | - isPanelElement: function isPanelElement(draggedView, draggedElement) { | |
| 3272 | - return !draggedView || !draggedElement; | |
| 3273 | - }, | |
| 3274 | - isParentElement: function isParentElement(draggedId) { | |
| 3275 | - var current = this.container; | |
| 3276 | - while (current) { | |
| 3277 | - if (current.id === draggedId) return true; | |
| 3278 | - current = current.parent; | |
| 3279 | - } | |
| 3280 | - return false; | |
| 3281 | - }, | |
| 3282 | - getDropIndex: function getDropIndex(container, side, index, selfIndex) { | |
| 3283 | - var styles = window.getComputedStyle(container); | |
| 3284 | - var isFlex = ["flex", "inline-flex"].includes(styles.display); | |
| 3285 | - var isFlexReverse = isFlex && ["column-reverse", "row-reverse"].includes(styles.flexDirection); | |
| 3286 | - var isRow = isFlex && ["row-reverse", "row"].includes(styles.flexDirection); | |
| 3287 | - var isRtl = elementorCommon.config.isRTL; | |
| 3288 | - if ((isRow ? isFlexReverse !== isRtl : isFlexReverse) === this.draggingOnBottomOrRightSide(side)) { | |
| 3289 | - if (-1 === selfIndex || selfIndex >= index - 1) return index; | |
| 3290 | - return index > 0 ? index - 1 : 0; | |
| 3291 | - } | |
| 3292 | - if (0 <= selfIndex && selfIndex < index) return index; | |
| 3293 | - return index + 1; | |
| 3294 | - }, | |
| 3295 | - moveDroppedItem: function moveDroppedItem(draggedView, dropIndex) { | |
| 3296 | - elementor.channels.editor.reply("element:dragged", null); | |
| 3297 | - $e.run("document/elements/move", { | |
| 3298 | - container: draggedView.getContainer(), | |
| 3299 | - target: this.getContainer(), | |
| 3300 | - options: { at: dropIndex } | |
| 3301 | - }); | |
| 3302 | - }, | |
| 3303 | - getEditButtons: function getEditButtons() { | |
| 3304 | - var elementData = elementor.getElementData(this.model); | |
| 3305 | - var editTools = {}; | |
| 3306 | - if ($e.components.get("document/elements").utils.allowAddingWidgets()) { | |
| 3307 | - editTools.add = { | |
| 3308 | - title: (0, _wordpress_i18n.sprintf)((0, _wordpress_i18n.__)("Add %s", "elementor"), elementData.title), | |
| 3309 | - icon: "plus" | |
| 3310 | - }; | |
| 3311 | - editTools.edit = { | |
| 3312 | - title: (0, _wordpress_i18n.sprintf)((0, _wordpress_i18n.__)("Edit %s", "elementor"), elementData.title), | |
| 3313 | - icon: "handle" | |
| 3314 | - }; | |
| 3315 | - } | |
| 3316 | - if (!this.getContainer().isLocked()) { | |
| 3317 | - if (elementor.getPreferences("edit_buttons") && $e.components.get("document/elements").utils.allowAddingWidgets()) editTools.duplicate = { | |
| 3318 | - title: (0, _wordpress_i18n.sprintf)((0, _wordpress_i18n.__)("Duplicate %s", "elementor"), elementData.title), | |
| 3319 | - icon: "clone" | |
| 3320 | - }; | |
| 3321 | - editTools.remove = { | |
| 3322 | - title: (0, _wordpress_i18n.sprintf)((0, _wordpress_i18n.__)("Delete %s", "elementor"), elementData.title), | |
| 3323 | - icon: "close" | |
| 3324 | - }; | |
| 3325 | - } | |
| 3326 | - return editTools; | |
| 3327 | - }, | |
| 3328 | - draggingOnBottomOrRightSide: function draggingOnBottomOrRightSide(side) { | |
| 3329 | - return ["bottom", "right"].includes(side); | |
| 3330 | - }, | |
| 3331 | - emptyViewIsCurrentlyBeingDraggedOver: function emptyViewIsCurrentlyBeingDraggedOver() { | |
| 3332 | - return this.$el.find("> .elementor-empty-view > .elementor-first-add.elementor-html5dnd-current-element").length > 0; | |
| 3333 | - }, | |
| 3334 | - /** | |
| 3335 | - * Toggle the `New Section` view when clicking the `add` button in the edit tools. | |
| 3336 | - * | |
| 3337 | - * @return {void} | |
| 3338 | - */ | |
| 3339 | - onAddButtonClick: function onAddButtonClick() { | |
| 3340 | - if (this.addSectionView && !this.addSectionView.isDestroyed) { | |
| 3341 | - this.addSectionView.fadeToDeath(); | |
| 3342 | - return; | |
| 3343 | - } | |
| 3344 | - var addSectionView = new elementor.modules.elements.components.AddSectionView({ at: this.model.collection.indexOf(this.model) }); | |
| 3345 | - addSectionView.render(); | |
| 3346 | - this.$el.before(addSectionView.$el); | |
| 3347 | - addSectionView.$el.hide(); | |
| 3348 | - setTimeout(function() { | |
| 3349 | - addSectionView.$el.slideDown(null, function() { | |
| 3350 | - jQuery(this).css("display", ""); | |
| 3351 | - }); | |
| 3352 | - }); | |
| 3353 | - this.addSectionView = addSectionView; | |
| 3354 | - }, | |
| 3355 | - isOverflowHidden: function isOverflowHidden() { | |
| 3356 | - var elementStyles = window.getComputedStyle(this.el); | |
| 3357 | - var overflowStyles = [ | |
| 3358 | - elementStyles.overflowX, | |
| 3359 | - elementStyles.overflowY, | |
| 3360 | - elementStyles.overflow | |
| 3361 | - ]; | |
| 3362 | - return overflowStyles.includes("hidden") || overflowStyles.includes("auto"); | |
| 3363 | - }, | |
| 3364 | - updateHandlesPosition: function updateHandlesPosition() { | |
| 3365 | - var elementType = this.$el.data("element_type"); | |
| 3366 | - if (!(0, import_element_types.getAllElementTypes)().includes(elementType)) return; | |
| 3367 | - var shouldPlaceInside = this.isOverflowHidden(); | |
| 3368 | - if (!shouldPlaceInside && this.isTopLevelElement() && this.isFirstElementInStructure()) shouldPlaceInside = true; | |
| 3369 | - this.$el.toggleClass("e-handles-inside", shouldPlaceInside); | |
| 3370 | - }, | |
| 3371 | - isTopLevelElement: function isTopLevelElement() { | |
| 3372 | - return this.container.parent && "document" === this.container.parent.id; | |
| 3373 | - }, | |
| 3374 | - isFirstElementInStructure: function isFirstElementInStructure() { | |
| 3375 | - if (!this.model.collection) return true; | |
| 3376 | - return 0 === this.model.collection.indexOf(this.model); | |
| 3377 | - }, | |
| 3378 | - getInteractionId: function getInteractionId() { | |
| 3379 | - var originId = this.model.get("originId"); | |
| 3380 | - var id = this.model.get("id"); | |
| 3381 | - return originId !== null && originId !== void 0 ? originId : id; | |
| 3382 | - } | |
| 3383 | - }); | |
| 3384 | - } | |
| 2514 | +function isClassesProp(prop) { | |
| 2515 | + return prop.$$type && 'classes' === prop.$$type && Array.isArray(prop.value) && prop.value.length > 0; | |
| 2516 | +} | |
| 3385 | 2517 | |
| 3386 | -//#endregion | |
| 3387 | -//#region modules/atomic-widgets/assets/js/editor/atomic-element-types/create-div-block-type.js | |
| 3388 | - var createDivBlockType = function createDivBlockType() { | |
| 3389 | - var DivBlockView = elementor.modules.elements.views.createAtomicElementBase("e-div-block"); | |
| 3390 | - return new elementor.modules.elements.types.AtomicElementBase("e-div-block", DivBlockView); | |
| 3391 | - }; | |
| 2518 | +/** | |
| 2519 | + * Update the style id of the container. | |
| 2520 | + * | |
| 2521 | + * @param {Container} container | |
| 2522 | + */ | |
| 2523 | +function updateStyleId(container) { | |
| 2524 | + var _container$settings$t, _container$settings; | |
| 2525 | + var originalStyles = container.model.get('styles'); | |
| 2526 | + var settings = (_container$settings$t = (_container$settings = container.settings) === null || _container$settings === void 0 ? void 0 : _container$settings.toJSON()) !== null && _container$settings$t !== void 0 ? _container$settings$t : {}; | |
| 2527 | + var classesProps = Object.entries(settings).filter(function (_ref) { | |
| 2528 | + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), | |
| 2529 | + propValue = _ref2[1]; | |
| 2530 | + return isClassesProp(propValue); | |
| 2531 | + }); | |
| 2532 | + var newStyles = {}; | |
| 2533 | + var changedIds = {}; // Conversion map - {[originalId: string]: newId: string} | |
| 3392 | 2534 | |
| 3393 | -//#endregion | |
| 3394 | -//#region modules/atomic-widgets/assets/js/editor/atomic-element-types/create-flexbox-type.js | |
| 3395 | - var createFlexboxType = function createFlexboxType() { | |
| 3396 | - var FlexboxView = elementor.modules.elements.views.createAtomicElementBase("e-flexbox"); | |
| 3397 | - return new elementor.modules.elements.types.AtomicElementBase("e-flexbox", FlexboxView); | |
| 3398 | - }; | |
| 2535 | + Object.entries(originalStyles).forEach(function (_ref3) { | |
| 2536 | + var _ref4 = (0, _slicedToArray2.default)(_ref3, 2), | |
| 2537 | + originalStyleId = _ref4[0], | |
| 2538 | + style = _ref4[1]; | |
| 2539 | + var newStyleId = (0, _getRandomStyleId.getRandomStyleId)(container, newStyles); | |
| 2540 | + newStyles[newStyleId] = structuredClone(_objectSpread(_objectSpread({}, style), {}, { | |
| 2541 | + id: newStyleId | |
| 2542 | + })); | |
| 2543 | + changedIds[originalStyleId] = newStyleId; | |
| 2544 | + }); | |
| 2545 | + var newClassesProps = classesProps.map(function (_ref5) { | |
| 2546 | + var _ref6 = (0, _slicedToArray2.default)(_ref5, 2), | |
| 2547 | + key = _ref6[0], | |
| 2548 | + value = _ref6[1]; | |
| 2549 | + return [key, _objectSpread(_objectSpread({}, value), {}, { | |
| 2550 | + value: value.value.map(function (className) { | |
| 2551 | + var _changedIds$className; | |
| 2552 | + return (_changedIds$className = changedIds[className]) !== null && _changedIds$className !== void 0 ? _changedIds$className : className; | |
| 2553 | + }) | |
| 2554 | + })]; | |
| 2555 | + }, {}); | |
| 3399 | 2556 | |
| 3400 | -//#endregion | |
| 3401 | -//#region modules/atomic-widgets/assets/js/editor/atomic-element-types/create-grid-type.js | |
| 3402 | - var createGridType = function createGridType() { | |
| 3403 | - var GridView = elementor.modules.elements.views.createAtomicElementBase("e-grid"); | |
| 3404 | - return new elementor.modules.elements.types.AtomicElementBase("e-grid", GridView); | |
| 3405 | - }; | |
| 2557 | + // Update classes array | |
| 2558 | + $e.internal('document/elements/set-settings', { | |
| 2559 | + container: container, | |
| 2560 | + settings: Object.fromEntries(newClassesProps) | |
| 2561 | + }); | |
| 3406 | 2562 | |
| 3407 | -//#endregion | |
| 3408 | -//#region modules/atomic-widgets/assets/js/editor/module.js | |
| 3409 | - function _callSuper(t, o, e) { | |
| 3410 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 3411 | - } | |
| 3412 | - function _isNativeReflectConstruct() { | |
| 3413 | - try { | |
| 3414 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 3415 | - } catch (t) {} | |
| 3416 | - return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 3417 | - return !!t; | |
| 3418 | - })(); | |
| 3419 | - } | |
| 3420 | - new (/* @__PURE__ */ function(_elementorModules$edi) { | |
| 3421 | - function Module() { | |
| 3422 | - _classCallCheck(this, Module); | |
| 3423 | - return _callSuper(this, Module, arguments); | |
| 3424 | - } | |
| 3425 | - _inherits(Module, _elementorModules$edi); | |
| 3426 | - return _createClass(Module, [ | |
| 3427 | - { | |
| 3428 | - key: "onInit", | |
| 3429 | - value: function onInit() { | |
| 3430 | - $e.components.register(new Component()); | |
| 3431 | - this.wireChildrenDependenciesAdapter(); | |
| 3432 | - this.exposeAtomicElementClasses(); | |
| 3433 | - this.registerAtomicElements(); | |
| 3434 | - } | |
| 3435 | - }, | |
| 3436 | - { | |
| 3437 | - key: "wireChildrenDependenciesAdapter", | |
| 3438 | - value: function wireChildrenDependenciesAdapter() { | |
| 3439 | - var _window$elementorV; | |
| 3440 | - var api = (_window$elementorV = window.elementorV2) === null || _window$elementorV === void 0 ? void 0 : _window$elementorV.editorElements; | |
| 3441 | - if (!(api !== null && api !== void 0 && api.reconcileInitialChildren) || !(api !== null && api !== void 0 && api.bindSettingsReconcile)) return; | |
| 3442 | - AtomicElementBaseModel.setChildrenDependenciesAdapter({ | |
| 3443 | - reconcileInitialChildren: api.reconcileInitialChildren, | |
| 3444 | - bindSettingsReconcile: api.bindSettingsReconcile | |
| 3445 | - }); | |
| 3446 | - } | |
| 3447 | - }, | |
| 3448 | - { | |
| 3449 | - key: "exposeAtomicElementClasses", | |
| 3450 | - value: function exposeAtomicElementClasses() { | |
| 3451 | - elementor.modules.elements.types.AtomicElementBase = AtomicElementBaseType; | |
| 3452 | - elementor.modules.elements.views.createAtomicElementBase = createAtomicElementBaseView; | |
| 3453 | - elementor.modules.elements.models.AtomicElementBase = AtomicElementBaseModel; | |
| 3454 | - } | |
| 3455 | - }, | |
| 3456 | - { | |
| 3457 | - key: "registerAtomicElements", | |
| 3458 | - value: function registerAtomicElements() { | |
| 3459 | - this.registerAtomicElementTypeIfAbsent(createDivBlockType()); | |
| 3460 | - this.registerAtomicElementTypeIfAbsent(createFlexboxType()); | |
| 3461 | - this.registerAtomicElementTypeIfAbsent(createGridType()); | |
| 3462 | - } | |
| 3463 | - }, | |
| 3464 | - { | |
| 3465 | - key: "registerAtomicElementTypeIfAbsent", | |
| 3466 | - value: function registerAtomicElementTypeIfAbsent(elementType) { | |
| 3467 | - if (elementor.elementsManager.getElementTypeClass(elementType.getType())) return; | |
| 3468 | - elementor.elementsManager.registerElementType(elementType); | |
| 3469 | - } | |
| 3470 | - } | |
| 3471 | - ]); | |
| 3472 | - }(elementorModules.editor.utils.Module))(); | |
| 2563 | + // Update local styles | |
| 2564 | + container.model.set('styles', newStyles); | |
| 2565 | +} | |
| 2566 | +function updateElementsStyleIdsInsideOut(styledElements) { | |
| 2567 | + styledElements === null || styledElements === void 0 || styledElements.reverse().forEach(updateStyleId); | |
| 2568 | +} | |
| 3473 | 2569 | |
| 3474 | -//#endregion | |
| 3475 | -})(wp.i18n, React, ReactDOM); | |
| 2570 | +/** | |
| 2571 | + * Get a container - iterate over its children, find all styled atomic widgets and update their style ids | |
| 2572 | + * | |
| 2573 | + * @param {Container} container | |
| 2574 | + */ | |
| 2575 | +function regenerateLocalStyleIds(container) { | |
| 2576 | + var allElements = (0, _getElementChildren.getElementChildren)(container); | |
| 2577 | + var styledElements = allElements.filter(function (element) { | |
| 2578 | + var _element$model$get; | |
| 2579 | + return Object.keys((_element$model$get = element.model.get('styles')) !== null && _element$model$get !== void 0 ? _element$model$get : {}).length > 0; | |
| 2580 | + }); | |
| 2581 | + updateElementsStyleIdsInsideOut(styledElements); | |
| 2582 | +} | |
| 2583 | + | |
| 2584 | +/***/ }), | |
| 2585 | + | |
| 2586 | +/***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js": | |
| 2587 | +/*!***************************************************************!*\ | |
| 2588 | + !*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***! | |
| 2589 | + \***************************************************************/ | |
| 2590 | +/***/ ((module) => { | |
| 2591 | + | |
| 2592 | +function _OverloadYield(e, d) { | |
| 2593 | + this.v = e, this.k = d; | |
| 2594 | +} | |
| 2595 | +module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2596 | + | |
| 2597 | +/***/ }), | |
| 2598 | + | |
| 2599 | +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 2600 | +/*!******************************************************************!*\ | |
| 2601 | + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 2602 | + \******************************************************************/ | |
| 2603 | +/***/ ((module) => { | |
| 2604 | + | |
| 2605 | +function _arrayLikeToArray(r, a) { | |
| 2606 | + (null == a || a > r.length) && (a = r.length); | |
| 2607 | + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 2608 | + return n; | |
| 2609 | +} | |
| 2610 | +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2611 | + | |
| 2612 | +/***/ }), | |
| 2613 | + | |
| 2614 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 2615 | +/*!****************************************************************!*\ | |
| 2616 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 2617 | + \****************************************************************/ | |
| 2618 | +/***/ ((module) => { | |
| 2619 | + | |
| 2620 | +function _arrayWithHoles(r) { | |
| 2621 | + if (Array.isArray(r)) return r; | |
| 2622 | +} | |
| 2623 | +module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2624 | + | |
| 2625 | +/***/ }), | |
| 2626 | + | |
| 2627 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": | |
| 2628 | +/*!*******************************************************************!*\ | |
| 2629 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! | |
| 2630 | + \*******************************************************************/ | |
| 2631 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2632 | + | |
| 2633 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 2634 | +function _arrayWithoutHoles(r) { | |
| 2635 | + if (Array.isArray(r)) return arrayLikeToArray(r); | |
| 2636 | +} | |
| 2637 | +module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2638 | + | |
| 2639 | +/***/ }), | |
| 2640 | + | |
| 2641 | +/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 2642 | +/*!***********************************************************************!*\ | |
| 2643 | + !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 2644 | + \***********************************************************************/ | |
| 2645 | +/***/ ((module) => { | |
| 2646 | + | |
| 2647 | +function _assertThisInitialized(e) { | |
| 2648 | + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 2649 | + return e; | |
| 2650 | +} | |
| 2651 | +module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2652 | + | |
| 2653 | +/***/ }), | |
| 2654 | + | |
| 2655 | +/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": | |
| 2656 | +/*!******************************************************************!*\ | |
| 2657 | + !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! | |
| 2658 | + \******************************************************************/ | |
| 2659 | +/***/ ((module) => { | |
| 2660 | + | |
| 2661 | +function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 2662 | + try { | |
| 2663 | + var i = n[a](c), | |
| 2664 | + u = i.value; | |
| 2665 | + } catch (n) { | |
| 2666 | + return void e(n); | |
| 2667 | + } | |
| 2668 | + i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 2669 | +} | |
| 2670 | +function _asyncToGenerator(n) { | |
| 2671 | + return function () { | |
| 2672 | + var t = this, | |
| 2673 | + e = arguments; | |
| 2674 | + return new Promise(function (r, o) { | |
| 2675 | + var a = n.apply(t, e); | |
| 2676 | + function _next(n) { | |
| 2677 | + asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 2678 | + } | |
| 2679 | + function _throw(n) { | |
| 2680 | + asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 2681 | + } | |
| 2682 | + _next(void 0); | |
| 2683 | + }); | |
| 2684 | + }; | |
| 2685 | +} | |
| 2686 | +module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2687 | + | |
| 2688 | +/***/ }), | |
| 2689 | + | |
| 2690 | +/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 2691 | +/*!****************************************************************!*\ | |
| 2692 | + !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 2693 | + \****************************************************************/ | |
| 2694 | +/***/ ((module) => { | |
| 2695 | + | |
| 2696 | +function _classCallCheck(a, n) { | |
| 2697 | + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 2698 | +} | |
| 2699 | +module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2700 | + | |
| 2701 | +/***/ }), | |
| 2702 | + | |
| 2703 | +/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 2704 | +/*!*************************************************************!*\ | |
| 2705 | + !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 2706 | + \*************************************************************/ | |
| 2707 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2708 | + | |
| 2709 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 2710 | +function _defineProperties(e, r) { | |
| 2711 | + for (var t = 0; t < r.length; t++) { | |
| 2712 | + var o = r[t]; | |
| 2713 | + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 2714 | + } | |
| 2715 | +} | |
| 2716 | +function _createClass(e, r, t) { | |
| 2717 | + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 2718 | + writable: !1 | |
| 2719 | + }), e; | |
| 2720 | +} | |
| 2721 | +module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2722 | + | |
| 2723 | +/***/ }), | |
| 2724 | + | |
| 2725 | +/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 2726 | +/*!****************************************************************!*\ | |
| 2727 | + !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 2728 | + \****************************************************************/ | |
| 2729 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2730 | + | |
| 2731 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 2732 | +function _defineProperty(e, r, t) { | |
| 2733 | + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 2734 | + value: t, | |
| 2735 | + enumerable: !0, | |
| 2736 | + configurable: !0, | |
| 2737 | + writable: !0 | |
| 2738 | + }) : e[r] = t, e; | |
| 2739 | +} | |
| 2740 | +module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2741 | + | |
| 2742 | +/***/ }), | |
| 2743 | + | |
| 2744 | +/***/ "../node_modules/@babel/runtime/helpers/get.js": | |
| 2745 | +/*!*****************************************************!*\ | |
| 2746 | + !*** ../node_modules/@babel/runtime/helpers/get.js ***! | |
| 2747 | + \*****************************************************/ | |
| 2748 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2749 | + | |
| 2750 | +var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js"); | |
| 2751 | +function _get() { | |
| 2752 | + return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { | |
| 2753 | + var p = superPropBase(e, t); | |
| 2754 | + if (p) { | |
| 2755 | + var n = Object.getOwnPropertyDescriptor(p, t); | |
| 2756 | + return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; | |
| 2757 | + } | |
| 2758 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); | |
| 2759 | +} | |
| 2760 | +module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2761 | + | |
| 2762 | +/***/ }), | |
| 2763 | + | |
| 2764 | +/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 2765 | +/*!****************************************************************!*\ | |
| 2766 | + !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 2767 | + \****************************************************************/ | |
| 2768 | +/***/ ((module) => { | |
| 2769 | + | |
| 2770 | +function _getPrototypeOf(t) { | |
| 2771 | + return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 2772 | + return t.__proto__ || Object.getPrototypeOf(t); | |
| 2773 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 2774 | +} | |
| 2775 | +module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2776 | + | |
| 2777 | +/***/ }), | |
| 2778 | + | |
| 2779 | +/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 2780 | +/*!**********************************************************!*\ | |
| 2781 | + !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 2782 | + \**********************************************************/ | |
| 2783 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2784 | + | |
| 2785 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 2786 | +function _inherits(t, e) { | |
| 2787 | + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 2788 | + t.prototype = Object.create(e && e.prototype, { | |
| 2789 | + constructor: { | |
| 2790 | + value: t, | |
| 2791 | + writable: !0, | |
| 2792 | + configurable: !0 | |
| 2793 | + } | |
| 2794 | + }), Object.defineProperty(t, "prototype", { | |
| 2795 | + writable: !1 | |
| 2796 | + }), e && setPrototypeOf(t, e); | |
| 2797 | +} | |
| 2798 | +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2799 | + | |
| 2800 | +/***/ }), | |
| 2801 | + | |
| 2802 | +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 2803 | +/*!***********************************************************************!*\ | |
| 2804 | + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 2805 | + \***********************************************************************/ | |
| 2806 | +/***/ ((module) => { | |
| 2807 | + | |
| 2808 | +function _interopRequireDefault(e) { | |
| 2809 | + return e && e.__esModule ? e : { | |
| 2810 | + "default": e | |
| 2811 | + }; | |
| 2812 | +} | |
| 2813 | +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2814 | + | |
| 2815 | +/***/ }), | |
| 2816 | + | |
| 2817 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": | |
| 2818 | +/*!*****************************************************************!*\ | |
| 2819 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! | |
| 2820 | + \*****************************************************************/ | |
| 2821 | +/***/ ((module) => { | |
| 2822 | + | |
| 2823 | +function _iterableToArray(r) { | |
| 2824 | + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 2825 | +} | |
| 2826 | +module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2827 | + | |
| 2828 | +/***/ }), | |
| 2829 | + | |
| 2830 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 2831 | +/*!**********************************************************************!*\ | |
| 2832 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 2833 | + \**********************************************************************/ | |
| 2834 | +/***/ ((module) => { | |
| 2835 | + | |
| 2836 | +function _iterableToArrayLimit(r, l) { | |
| 2837 | + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 2838 | + if (null != t) { | |
| 2839 | + var e, | |
| 2840 | + n, | |
| 2841 | + i, | |
| 2842 | + u, | |
| 2843 | + a = [], | |
| 2844 | + f = !0, | |
| 2845 | + o = !1; | |
| 2846 | + try { | |
| 2847 | + if (i = (t = t.call(r)).next, 0 === l) { | |
| 2848 | + if (Object(t) !== t) return; | |
| 2849 | + f = !1; | |
| 2850 | + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 2851 | + } catch (r) { | |
| 2852 | + o = !0, n = r; | |
| 2853 | + } finally { | |
| 2854 | + try { | |
| 2855 | + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 2856 | + } finally { | |
| 2857 | + if (o) throw n; | |
| 2858 | + } | |
| 2859 | + } | |
| 2860 | + return a; | |
| 2861 | + } | |
| 2862 | +} | |
| 2863 | +module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2864 | + | |
| 2865 | +/***/ }), | |
| 2866 | + | |
| 2867 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 2868 | +/*!*****************************************************************!*\ | |
| 2869 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 2870 | + \*****************************************************************/ | |
| 2871 | +/***/ ((module) => { | |
| 2872 | + | |
| 2873 | +function _nonIterableRest() { | |
| 2874 | + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 2875 | +} | |
| 2876 | +module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2877 | + | |
| 2878 | +/***/ }), | |
| 2879 | + | |
| 2880 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": | |
| 2881 | +/*!*******************************************************************!*\ | |
| 2882 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! | |
| 2883 | + \*******************************************************************/ | |
| 2884 | +/***/ ((module) => { | |
| 2885 | + | |
| 2886 | +function _nonIterableSpread() { | |
| 2887 | + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 2888 | +} | |
| 2889 | +module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2890 | + | |
| 2891 | +/***/ }), | |
| 2892 | + | |
| 2893 | +/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 2894 | +/*!***************************************************************************!*\ | |
| 2895 | + !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 2896 | + \***************************************************************************/ | |
| 2897 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2898 | + | |
| 2899 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 2900 | +var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 2901 | +function _possibleConstructorReturn(t, e) { | |
| 2902 | + if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 2903 | + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 2904 | + return assertThisInitialized(t); | |
| 2905 | +} | |
| 2906 | +module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2907 | + | |
| 2908 | +/***/ }), | |
| 2909 | + | |
| 2910 | +/***/ "../node_modules/@babel/runtime/helpers/readOnlyError.js": | |
| 2911 | +/*!***************************************************************!*\ | |
| 2912 | + !*** ../node_modules/@babel/runtime/helpers/readOnlyError.js ***! | |
| 2913 | + \***************************************************************/ | |
| 2914 | +/***/ ((module) => { | |
| 2915 | + | |
| 2916 | +function _readOnlyError(r) { | |
| 2917 | + throw new TypeError('"' + r + '" is read-only'); | |
| 2918 | +} | |
| 2919 | +module.exports = _readOnlyError, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2920 | + | |
| 2921 | +/***/ }), | |
| 2922 | + | |
| 2923 | +/***/ "../node_modules/@babel/runtime/helpers/regenerator.js": | |
| 2924 | +/*!*************************************************************!*\ | |
| 2925 | + !*** ../node_modules/@babel/runtime/helpers/regenerator.js ***! | |
| 2926 | + \*************************************************************/ | |
| 2927 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2928 | + | |
| 2929 | +var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 2930 | +function _regenerator() { | |
| 2931 | + /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 2932 | + var e, | |
| 2933 | + t, | |
| 2934 | + r = "function" == typeof Symbol ? Symbol : {}, | |
| 2935 | + n = r.iterator || "@@iterator", | |
| 2936 | + o = r.toStringTag || "@@toStringTag"; | |
| 2937 | + function i(r, n, o, i) { | |
| 2938 | + var c = n && n.prototype instanceof Generator ? n : Generator, | |
| 2939 | + u = Object.create(c.prototype); | |
| 2940 | + return regeneratorDefine(u, "_invoke", function (r, n, o) { | |
| 2941 | + var i, | |
| 2942 | + c, | |
| 2943 | + u, | |
| 2944 | + f = 0, | |
| 2945 | + p = o || [], | |
| 2946 | + y = !1, | |
| 2947 | + G = { | |
| 2948 | + p: 0, | |
| 2949 | + n: 0, | |
| 2950 | + v: e, | |
| 2951 | + a: d, | |
| 2952 | + f: d.bind(e, 4), | |
| 2953 | + d: function d(t, r) { | |
| 2954 | + return i = t, c = 0, u = e, G.n = r, a; | |
| 2955 | + } | |
| 2956 | + }; | |
| 2957 | + function d(r, n) { | |
| 2958 | + for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 2959 | + var o, | |
| 2960 | + i = p[t], | |
| 2961 | + d = G.p, | |
| 2962 | + l = i[2]; | |
| 2963 | + r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); | |
| 2964 | + } | |
| 2965 | + if (o || r > 1) return a; | |
| 2966 | + throw y = !0, n; | |
| 2967 | + } | |
| 2968 | + return function (o, p, l) { | |
| 2969 | + if (f > 1) throw TypeError("Generator is already running"); | |
| 2970 | + for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 2971 | + i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 2972 | + try { | |
| 2973 | + if (f = 2, i) { | |
| 2974 | + if (c || (o = "next"), t = i[o]) { | |
| 2975 | + if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 2976 | + if (!t.done) return t; | |
| 2977 | + u = t.value, c < 2 && (c = 0); | |
| 2978 | + } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 2979 | + i = e; | |
| 2980 | + } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 2981 | + } catch (t) { | |
| 2982 | + i = e, c = 1, u = t; | |
| 2983 | + } finally { | |
| 2984 | + f = 1; | |
| 2985 | + } | |
| 2986 | + } | |
| 2987 | + return { | |
| 2988 | + value: t, | |
| 2989 | + done: y | |
| 2990 | + }; | |
| 2991 | + }; | |
| 2992 | + }(r, o, i), !0), u; | |
| 2993 | + } | |
| 2994 | + var a = {}; | |
| 2995 | + function Generator() {} | |
| 2996 | + function GeneratorFunction() {} | |
| 2997 | + function GeneratorFunctionPrototype() {} | |
| 2998 | + t = Object.getPrototypeOf; | |
| 2999 | + var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { | |
| 3000 | + return this; | |
| 3001 | + }), t), | |
| 3002 | + u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 3003 | + function f(e) { | |
| 3004 | + return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 3005 | + } | |
| 3006 | + return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () { | |
| 3007 | + return this; | |
| 3008 | + }), regeneratorDefine(u, "toString", function () { | |
| 3009 | + return "[object Generator]"; | |
| 3010 | + }), (module.exports = _regenerator = function _regenerator() { | |
| 3011 | + return { | |
| 3012 | + w: i, | |
| 3013 | + m: f | |
| 3014 | + }; | |
| 3015 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 3016 | +} | |
| 3017 | +module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3018 | + | |
| 3019 | +/***/ }), | |
| 3020 | + | |
| 3021 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js": | |
| 3022 | +/*!******************************************************************!*\ | |
| 3023 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorAsync.js ***! | |
| 3024 | + \******************************************************************/ | |
| 3025 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3026 | + | |
| 3027 | +var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 3028 | +function _regeneratorAsync(n, e, r, t, o) { | |
| 3029 | + var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 3030 | + return a.next().then(function (n) { | |
| 3031 | + return n.done ? n.value : a.next(); | |
| 3032 | + }); | |
| 3033 | +} | |
| 3034 | +module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3035 | + | |
| 3036 | +/***/ }), | |
| 3037 | + | |
| 3038 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js": | |
| 3039 | +/*!*********************************************************************!*\ | |
| 3040 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js ***! | |
| 3041 | + \*********************************************************************/ | |
| 3042 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3043 | + | |
| 3044 | +var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 3045 | +var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 3046 | +function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 3047 | + return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 3048 | +} | |
| 3049 | +module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3050 | + | |
| 3051 | +/***/ }), | |
| 3052 | + | |
| 3053 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js": | |
| 3054 | +/*!**************************************************************************!*\ | |
| 3055 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js ***! | |
| 3056 | + \**************************************************************************/ | |
| 3057 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3058 | + | |
| 3059 | +var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 3060 | +var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 3061 | +function AsyncIterator(t, e) { | |
| 3062 | + function n(r, o, i, f) { | |
| 3063 | + try { | |
| 3064 | + var c = t[r](o), | |
| 3065 | + u = c.value; | |
| 3066 | + return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { | |
| 3067 | + n("next", t, i, f); | |
| 3068 | + }, function (t) { | |
| 3069 | + n("throw", t, i, f); | |
| 3070 | + }) : e.resolve(u).then(function (t) { | |
| 3071 | + c.value = t, i(c); | |
| 3072 | + }, function (t) { | |
| 3073 | + return n("throw", t, i, f); | |
| 3074 | + }); | |
| 3075 | + } catch (t) { | |
| 3076 | + f(t); | |
| 3077 | + } | |
| 3078 | + } | |
| 3079 | + var r; | |
| 3080 | + this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { | |
| 3081 | + return this; | |
| 3082 | + })), regeneratorDefine(this, "_invoke", function (t, o, i) { | |
| 3083 | + function f() { | |
| 3084 | + return new e(function (e, r) { | |
| 3085 | + n(t, i, e, r); | |
| 3086 | + }); | |
| 3087 | + } | |
| 3088 | + return r = r ? r.then(f, f) : f(); | |
| 3089 | + }, !0); | |
| 3090 | +} | |
| 3091 | +module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3092 | + | |
| 3093 | +/***/ }), | |
| 3094 | + | |
| 3095 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js": | |
| 3096 | +/*!*******************************************************************!*\ | |
| 3097 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorDefine.js ***! | |
| 3098 | + \*******************************************************************/ | |
| 3099 | +/***/ ((module) => { | |
| 3100 | + | |
| 3101 | +function _regeneratorDefine(e, r, n, t) { | |
| 3102 | + var i = Object.defineProperty; | |
| 3103 | + try { | |
| 3104 | + i({}, "", {}); | |
| 3105 | + } catch (e) { | |
| 3106 | + i = 0; | |
| 3107 | + } | |
| 3108 | + module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 3109 | + function o(r, n) { | |
| 3110 | + _regeneratorDefine(e, r, function (e) { | |
| 3111 | + return this._invoke(r, n, e); | |
| 3112 | + }); | |
| 3113 | + } | |
| 3114 | + r ? i ? i(e, r, { | |
| 3115 | + value: n, | |
| 3116 | + enumerable: !t, | |
| 3117 | + configurable: !t, | |
| 3118 | + writable: !t | |
| 3119 | + }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 3120 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 3121 | +} | |
| 3122 | +module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3123 | + | |
| 3124 | +/***/ }), | |
| 3125 | + | |
| 3126 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js": | |
| 3127 | +/*!*****************************************************************!*\ | |
| 3128 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorKeys.js ***! | |
| 3129 | + \*****************************************************************/ | |
| 3130 | +/***/ ((module) => { | |
| 3131 | + | |
| 3132 | +function _regeneratorKeys(e) { | |
| 3133 | + var n = Object(e), | |
| 3134 | + r = []; | |
| 3135 | + for (var t in n) r.unshift(t); | |
| 3136 | + return function e() { | |
| 3137 | + for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 3138 | + return e.done = !0, e; | |
| 3139 | + }; | |
| 3140 | +} | |
| 3141 | +module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3142 | + | |
| 3143 | +/***/ }), | |
| 3144 | + | |
| 3145 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 3146 | +/*!********************************************************************!*\ | |
| 3147 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 3148 | + \********************************************************************/ | |
| 3149 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3150 | + | |
| 3151 | +var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 3152 | +var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 3153 | +var regeneratorAsync = __webpack_require__(/*! ./regeneratorAsync.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js"); | |
| 3154 | +var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 3155 | +var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 3156 | +var regeneratorKeys = __webpack_require__(/*! ./regeneratorKeys.js */ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js"); | |
| 3157 | +var regeneratorValues = __webpack_require__(/*! ./regeneratorValues.js */ "../node_modules/@babel/runtime/helpers/regeneratorValues.js"); | |
| 3158 | +function _regeneratorRuntime() { | |
| 3159 | + "use strict"; | |
| 3160 | + | |
| 3161 | + var r = regenerator(), | |
| 3162 | + e = r.m(_regeneratorRuntime), | |
| 3163 | + t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 3164 | + function n(r) { | |
| 3165 | + var e = "function" == typeof r && r.constructor; | |
| 3166 | + return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 3167 | + } | |
| 3168 | + var o = { | |
| 3169 | + "throw": 1, | |
| 3170 | + "return": 2, | |
| 3171 | + "break": 3, | |
| 3172 | + "continue": 3 | |
| 3173 | + }; | |
| 3174 | + function a(r) { | |
| 3175 | + var e, t; | |
| 3176 | + return function (n) { | |
| 3177 | + e || (e = { | |
| 3178 | + stop: function stop() { | |
| 3179 | + return t(n.a, 2); | |
| 3180 | + }, | |
| 3181 | + "catch": function _catch() { | |
| 3182 | + return n.v; | |
| 3183 | + }, | |
| 3184 | + abrupt: function abrupt(r, e) { | |
| 3185 | + return t(n.a, o[r], e); | |
| 3186 | + }, | |
| 3187 | + delegateYield: function delegateYield(r, o, a) { | |
| 3188 | + return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 3189 | + }, | |
| 3190 | + finish: function finish(r) { | |
| 3191 | + return t(n.f, r); | |
| 3192 | + } | |
| 3193 | + }, t = function t(r, _t, o) { | |
| 3194 | + n.p = e.prev, n.n = e.next; | |
| 3195 | + try { | |
| 3196 | + return r(_t, o); | |
| 3197 | + } finally { | |
| 3198 | + e.next = n.n; | |
| 3199 | + } | |
| 3200 | + }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 3201 | + try { | |
| 3202 | + return r.call(this, e); | |
| 3203 | + } finally { | |
| 3204 | + n.p = e.prev, n.n = e.next; | |
| 3205 | + } | |
| 3206 | + }; | |
| 3207 | + } | |
| 3208 | + return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 3209 | + return { | |
| 3210 | + wrap: function wrap(e, t, n, o) { | |
| 3211 | + return r.w(a(e), t, n, o && o.reverse()); | |
| 3212 | + }, | |
| 3213 | + isGeneratorFunction: n, | |
| 3214 | + mark: r.m, | |
| 3215 | + awrap: function awrap(r, e) { | |
| 3216 | + return new OverloadYield(r, e); | |
| 3217 | + }, | |
| 3218 | + AsyncIterator: regeneratorAsyncIterator, | |
| 3219 | + async: function async(r, e, t, o, u) { | |
| 3220 | + return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 3221 | + }, | |
| 3222 | + keys: regeneratorKeys, | |
| 3223 | + values: regeneratorValues | |
| 3224 | + }; | |
| 3225 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 3226 | +} | |
| 3227 | +module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3228 | + | |
| 3229 | +/***/ }), | |
| 3230 | + | |
| 3231 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorValues.js": | |
| 3232 | +/*!*******************************************************************!*\ | |
| 3233 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorValues.js ***! | |
| 3234 | + \*******************************************************************/ | |
| 3235 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3236 | + | |
| 3237 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3238 | +function _regeneratorValues(e) { | |
| 3239 | + if (null != e) { | |
| 3240 | + var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], | |
| 3241 | + r = 0; | |
| 3242 | + if (t) return t.call(e); | |
| 3243 | + if ("function" == typeof e.next) return e; | |
| 3244 | + if (!isNaN(e.length)) return { | |
| 3245 | + next: function next() { | |
| 3246 | + return e && r >= e.length && (e = void 0), { | |
| 3247 | + value: e && e[r++], | |
| 3248 | + done: !e | |
| 3249 | + }; | |
| 3250 | + } | |
| 3251 | + }; | |
| 3252 | + } | |
| 3253 | + throw new TypeError(_typeof(e) + " is not iterable"); | |
| 3254 | +} | |
| 3255 | +module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3256 | + | |
| 3257 | +/***/ }), | |
| 3258 | + | |
| 3259 | +/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 3260 | +/*!****************************************************************!*\ | |
| 3261 | + !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 3262 | + \****************************************************************/ | |
| 3263 | +/***/ ((module) => { | |
| 3264 | + | |
| 3265 | +function _setPrototypeOf(t, e) { | |
| 3266 | + return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 3267 | + return t.__proto__ = e, t; | |
| 3268 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 3269 | +} | |
| 3270 | +module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3271 | + | |
| 3272 | +/***/ }), | |
| 3273 | + | |
| 3274 | +/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 3275 | +/*!***************************************************************!*\ | |
| 3276 | + !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 3277 | + \***************************************************************/ | |
| 3278 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3279 | + | |
| 3280 | +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 3281 | +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 3282 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 3283 | +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 3284 | +function _slicedToArray(r, e) { | |
| 3285 | + return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 3286 | +} | |
| 3287 | +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3288 | + | |
| 3289 | +/***/ }), | |
| 3290 | + | |
| 3291 | +/***/ "../node_modules/@babel/runtime/helpers/superPropBase.js": | |
| 3292 | +/*!***************************************************************!*\ | |
| 3293 | + !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***! | |
| 3294 | + \***************************************************************/ | |
| 3295 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3296 | + | |
| 3297 | +var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); | |
| 3298 | +function _superPropBase(t, o) { | |
| 3299 | + for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); | |
| 3300 | + return t; | |
| 3301 | +} | |
| 3302 | +module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3303 | + | |
| 3304 | +/***/ }), | |
| 3305 | + | |
| 3306 | +/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": | |
| 3307 | +/*!*******************************************************************!*\ | |
| 3308 | + !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! | |
| 3309 | + \*******************************************************************/ | |
| 3310 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3311 | + | |
| 3312 | +var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); | |
| 3313 | +var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); | |
| 3314 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 3315 | +var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); | |
| 3316 | +function _toConsumableArray(r) { | |
| 3317 | + return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); | |
| 3318 | +} | |
| 3319 | +module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3320 | + | |
| 3321 | +/***/ }), | |
| 3322 | + | |
| 3323 | +/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 3324 | +/*!*************************************************************!*\ | |
| 3325 | + !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 3326 | + \*************************************************************/ | |
| 3327 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3328 | + | |
| 3329 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3330 | +function toPrimitive(t, r) { | |
| 3331 | + if ("object" != _typeof(t) || !t) return t; | |
| 3332 | + var e = t[Symbol.toPrimitive]; | |
| 3333 | + if (void 0 !== e) { | |
| 3334 | + var i = e.call(t, r || "default"); | |
| 3335 | + if ("object" != _typeof(i)) return i; | |
| 3336 | + throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 3337 | + } | |
| 3338 | + return ("string" === r ? String : Number)(t); | |
| 3339 | +} | |
| 3340 | +module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3341 | + | |
| 3342 | +/***/ }), | |
| 3343 | + | |
| 3344 | +/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 3345 | +/*!***************************************************************!*\ | |
| 3346 | + !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 3347 | + \***************************************************************/ | |
| 3348 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3349 | + | |
| 3350 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3351 | +var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 3352 | +function toPropertyKey(t) { | |
| 3353 | + var i = toPrimitive(t, "string"); | |
| 3354 | + return "symbol" == _typeof(i) ? i : i + ""; | |
| 3355 | +} | |
| 3356 | +module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3357 | + | |
| 3358 | +/***/ }), | |
| 3359 | + | |
| 3360 | +/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 3361 | +/*!********************************************************!*\ | |
| 3362 | + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 3363 | + \********************************************************/ | |
| 3364 | +/***/ ((module) => { | |
| 3365 | + | |
| 3366 | +function _typeof(o) { | |
| 3367 | + "@babel/helpers - typeof"; | |
| 3368 | + | |
| 3369 | + return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 3370 | + return typeof o; | |
| 3371 | + } : function (o) { | |
| 3372 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 3373 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 3374 | +} | |
| 3375 | +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3376 | + | |
| 3377 | +/***/ }), | |
| 3378 | + | |
| 3379 | +/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 3380 | +/*!****************************************************************************!*\ | |
| 3381 | + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 3382 | + \****************************************************************************/ | |
| 3383 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3384 | + | |
| 3385 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 3386 | +function _unsupportedIterableToArray(r, a) { | |
| 3387 | + if (r) { | |
| 3388 | + if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 3389 | + var t = {}.toString.call(r).slice(8, -1); | |
| 3390 | + 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; | |
| 3391 | + } | |
| 3392 | +} | |
| 3393 | +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3394 | + | |
| 3395 | +/***/ }), | |
| 3396 | + | |
| 3397 | +/***/ "../node_modules/@babel/runtime/regenerator/index.js": | |
| 3398 | +/*!***********************************************************!*\ | |
| 3399 | + !*** ../node_modules/@babel/runtime/regenerator/index.js ***! | |
| 3400 | + \***********************************************************/ | |
| 3401 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3402 | + | |
| 3403 | +// TODO(Babel 8): Remove this file. | |
| 3404 | + | |
| 3405 | +var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); | |
| 3406 | +module.exports = runtime; | |
| 3407 | + | |
| 3408 | +// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= | |
| 3409 | +try { | |
| 3410 | + regeneratorRuntime = runtime; | |
| 3411 | +} catch (accidentalStrictMode) { | |
| 3412 | + if (typeof globalThis === "object") { | |
| 3413 | + globalThis.regeneratorRuntime = runtime; | |
| 3414 | + } else { | |
| 3415 | + Function("r", "regeneratorRuntime = r")(runtime); | |
| 3416 | + } | |
| 3417 | +} | |
| 3418 | + | |
| 3419 | + | |
| 3420 | +/***/ }), | |
| 3421 | + | |
| 3422 | +/***/ "../node_modules/react-dom/client.js": | |
| 3423 | +/*!*******************************************!*\ | |
| 3424 | + !*** ../node_modules/react-dom/client.js ***! | |
| 3425 | + \*******************************************/ | |
| 3426 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 3427 | + | |
| 3428 | +"use strict"; | |
| 3429 | + | |
| 3430 | + | |
| 3431 | +var m = __webpack_require__(/*! react-dom */ "react-dom"); | |
| 3432 | +if (false) // removed by dead control flow | |
| 3433 | +{} else { | |
| 3434 | + var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | |
| 3435 | + exports.createRoot = function(c, o) { | |
| 3436 | + i.usingClientEntryPoint = true; | |
| 3437 | + try { | |
| 3438 | + return m.createRoot(c, o); | |
| 3439 | + } finally { | |
| 3440 | + i.usingClientEntryPoint = false; | |
| 3441 | + } | |
| 3442 | + }; | |
| 3443 | + exports.hydrateRoot = function(c, h, o) { | |
| 3444 | + i.usingClientEntryPoint = true; | |
| 3445 | + try { | |
| 3446 | + return m.hydrateRoot(c, h, o); | |
| 3447 | + } finally { | |
| 3448 | + i.usingClientEntryPoint = false; | |
| 3449 | + } | |
| 3450 | + }; | |
| 3451 | +} | |
| 3452 | + | |
| 3453 | + | |
| 3454 | +/***/ }), | |
| 3455 | + | |
| 3456 | +/***/ "@wordpress/i18n": | |
| 3457 | +/*!**************************!*\ | |
| 3458 | + !*** external "wp.i18n" ***! | |
| 3459 | + \**************************/ | |
| 3460 | +/***/ ((module) => { | |
| 3461 | + | |
| 3462 | +"use strict"; | |
| 3463 | +module.exports = wp.i18n; | |
| 3464 | + | |
| 3465 | +/***/ }), | |
| 3466 | + | |
| 3467 | +/***/ "react": | |
| 3468 | +/*!************************!*\ | |
| 3469 | + !*** external "React" ***! | |
| 3470 | + \************************/ | |
| 3471 | +/***/ ((module) => { | |
| 3472 | + | |
| 3473 | +"use strict"; | |
| 3474 | +module.exports = React; | |
| 3475 | + | |
| 3476 | +/***/ }), | |
| 3477 | + | |
| 3478 | +/***/ "react-dom": | |
| 3479 | +/*!***************************!*\ | |
| 3480 | + !*** external "ReactDOM" ***! | |
| 3481 | + \***************************/ | |
| 3482 | +/***/ ((module) => { | |
| 3483 | + | |
| 3484 | +"use strict"; | |
| 3485 | +module.exports = ReactDOM; | |
| 3486 | + | |
| 3487 | +/***/ }) | |
| 3488 | + | |
| 3489 | +/******/ }); | |
| 3490 | +/************************************************************************/ | |
| 3491 | +/******/ // The module cache | |
| 3492 | +/******/ var __webpack_module_cache__ = {}; | |
| 3493 | +/******/ | |
| 3494 | +/******/ // The require function | |
| 3495 | +/******/ function __webpack_require__(moduleId) { | |
| 3496 | +/******/ // Check if module is in cache | |
| 3497 | +/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 3498 | +/******/ if (cachedModule !== undefined) { | |
| 3499 | +/******/ return cachedModule.exports; | |
| 3500 | +/******/ } | |
| 3501 | +/******/ // Create a new module (and put it into the cache) | |
| 3502 | +/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 3503 | +/******/ // no module.id needed | |
| 3504 | +/******/ // no module.loaded needed | |
| 3505 | +/******/ exports: {} | |
| 3506 | +/******/ }; | |
| 3507 | +/******/ | |
| 3508 | +/******/ // Execute the module function | |
| 3509 | +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 3510 | +/******/ | |
| 3511 | +/******/ // Return the exports of the module | |
| 3512 | +/******/ return module.exports; | |
| 3513 | +/******/ } | |
| 3514 | +/******/ | |
| 3515 | +/************************************************************************/ | |
| 3516 | +var __webpack_exports__ = {}; | |
| 3517 | +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 3518 | +(() => { | |
| 3519 | +"use strict"; | |
| 3520 | +/*!************************************************************!*\ | |
| 3521 | + !*** ../modules/atomic-widgets/assets/js/editor/module.js ***! | |
| 3522 | + \************************************************************/ | |
| 3523 | + | |
| 3524 | + | |
| 3525 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 3526 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 3527 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 3528 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 3529 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 3530 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 3531 | +var _component = _interopRequireDefault(__webpack_require__(/*! ./component */ "../modules/atomic-widgets/assets/js/editor/component.js")); | |
| 3532 | +var _atomicElementBaseType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-base-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-base-type.js")); | |
| 3533 | +var _createAtomicElementBaseView = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-element-base-view */ "../modules/atomic-widgets/assets/js/editor/create-atomic-element-base-view.js")); | |
| 3534 | +var _atomicElementBaseModel = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-base-model */ "../modules/atomic-widgets/assets/js/editor/atomic-element-base-model.js")); | |
| 3535 | +var _createDivBlockType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/create-div-block-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-div-block-type.js")); | |
| 3536 | +var _createFlexboxType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/create-flexbox-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-flexbox-type.js")); | |
| 3537 | +var _createAtomicTabsType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/atomic-tabs/create-atomic-tabs-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-type.js")); | |
| 3538 | +var _createAtomicTabContentType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/atomic-tab-content/create-atomic-tab-content-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-content/create-atomic-tab-content-type.js")); | |
| 3539 | +var _createAtomicTabType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/atomic-tab/create-atomic-tab-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-type.js")); | |
| 3540 | +var _createAtomicTabsMenuType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/atomic-tabs-menu/create-atomic-tabs-menu-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-menu/create-atomic-tabs-menu-type.js")); | |
| 3541 | +var _createAtomicTabsContentAreaType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/atomic-tabs-content-area/create-atomic-tabs-content-area-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-content-area/create-atomic-tabs-content-area-type.js")); | |
| 3542 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 3543 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 3544 | +var Module = /*#__PURE__*/function (_elementorModules$edi) { | |
| 3545 | + function Module() { | |
| 3546 | + (0, _classCallCheck2.default)(this, Module); | |
| 3547 | + return _callSuper(this, Module, arguments); | |
| 3548 | + } | |
| 3549 | + (0, _inherits2.default)(Module, _elementorModules$edi); | |
| 3550 | + return (0, _createClass2.default)(Module, [{ | |
| 3551 | + key: "onInit", | |
| 3552 | + value: function onInit() { | |
| 3553 | + $e.components.register(new _component.default()); | |
| 3554 | + this.exposeAtomicElementClasses(); | |
| 3555 | + this.registerAtomicElements(); | |
| 3556 | + } | |
| 3557 | + }, { | |
| 3558 | + key: "exposeAtomicElementClasses", | |
| 3559 | + value: function exposeAtomicElementClasses() { | |
| 3560 | + elementor.modules.elements.types.AtomicElementBase = _atomicElementBaseType.default; | |
| 3561 | + elementor.modules.elements.views.createAtomicElementBase = _createAtomicElementBaseView.default; | |
| 3562 | + elementor.modules.elements.models.AtomicElementBase = _atomicElementBaseModel.default; | |
| 3563 | + } | |
| 3564 | + }, { | |
| 3565 | + key: "registerAtomicElements", | |
| 3566 | + value: function registerAtomicElements() { | |
| 3567 | + elementor.elementsManager.registerElementType((0, _createDivBlockType.default)()); | |
| 3568 | + elementor.elementsManager.registerElementType((0, _createFlexboxType.default)()); | |
| 3569 | + elementor.elementsManager.registerElementType((0, _createAtomicTabsType.default)()); | |
| 3570 | + elementor.elementsManager.registerElementType((0, _createAtomicTabContentType.default)()); | |
| 3571 | + elementor.elementsManager.registerElementType((0, _createAtomicTabType.default)()); | |
| 3572 | + elementor.elementsManager.registerElementType((0, _createAtomicTabsMenuType.default)()); | |
| 3573 | + elementor.elementsManager.registerElementType((0, _createAtomicTabsContentAreaType.default)()); | |
| 3574 | + } | |
| 3575 | + }]); | |
| 3576 | +}(elementorModules.editor.utils.Module); | |
| 3577 | +new Module(); | |
| 3578 | +})(); | |
| 3579 | + | |
| 3580 | +/******/ })() | |
| 3581 | +; | |
| 3476 | 3582 | //# sourceMappingURL=atomic-widgets-editor.js.map |