PluginProbe
Elementor Website Builder – more than just a page builder / 3.0.3
Elementor Website Builder – more than just a page builder v3.0.3
4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 All 454 releases
← All changes | assets/js/gutenberg.js +776 -125 4.3.1 → 3.0.3 View file →
@@ -1,130 +1,781 @@
1 -(function(_wordpress_i18n) {
1 +/*! elementor - v3.0.3 - 27-08-2020 */
2 +/******/ (function(modules) { // webpackBootstrap
3 +/******/ // The module cache
4 +/******/ var installedModules = {};
5 +/******/
6 +/******/ // The require function
7 +/******/ function __webpack_require__(moduleId) {
8 +/******/
9 +/******/ // Check if module is in cache
10 +/******/ if(installedModules[moduleId]) {
11 +/******/ return installedModules[moduleId].exports;
12 +/******/ }
13 +/******/ // Create a new module (and put it into the cache)
14 +/******/ var module = installedModules[moduleId] = {
15 +/******/ i: moduleId,
16 +/******/ l: false,
17 +/******/ exports: {}
18 +/******/ };
19 +/******/
20 +/******/ // Execute the module function
21 +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22 +/******/
23 +/******/ // Flag the module as loaded
24 +/******/ module.l = true;
25 +/******/
26 +/******/ // Return the exports of the module
27 +/******/ return module.exports;
28 +/******/ }
29 +/******/
30 +/******/
31 +/******/ // expose the modules object (__webpack_modules__)
32 +/******/ __webpack_require__.m = modules;
33 +/******/
34 +/******/ // expose the module cache
35 +/******/ __webpack_require__.c = installedModules;
36 +/******/
37 +/******/ // define getter function for harmony exports
38 +/******/ __webpack_require__.d = function(exports, name, getter) {
39 +/******/ if(!__webpack_require__.o(exports, name)) {
40 +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41 +/******/ }
42 +/******/ };
43 +/******/
44 +/******/ // define __esModule on exports
45 +/******/ __webpack_require__.r = function(exports) {
46 +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47 +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48 +/******/ }
49 +/******/ Object.defineProperty(exports, '__esModule', { value: true });
50 +/******/ };
51 +/******/
52 +/******/ // create a fake namespace object
53 +/******/ // mode & 1: value is a module id, require it
54 +/******/ // mode & 2: merge all properties of value into the ns
55 +/******/ // mode & 4: return value when already ns object
56 +/******/ // mode & 8|1: behave like require
57 +/******/ __webpack_require__.t = function(value, mode) {
58 +/******/ if(mode & 1) value = __webpack_require__(value);
59 +/******/ if(mode & 8) return value;
60 +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61 +/******/ var ns = Object.create(null);
62 +/******/ __webpack_require__.r(ns);
63 +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64 +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65 +/******/ return ns;
66 +/******/ };
67 +/******/
68 +/******/ // getDefaultExport function for compatibility with non-harmony modules
69 +/******/ __webpack_require__.n = function(module) {
70 +/******/ var getter = module && module.__esModule ?
71 +/******/ function getDefault() { return module['default']; } :
72 +/******/ function getModuleExports() { return module; };
73 +/******/ __webpack_require__.d(getter, 'a', getter);
74 +/******/ return getter;
75 +/******/ };
76 +/******/
77 +/******/ // Object.prototype.hasOwnProperty.call
78 +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79 +/******/
80 +/******/ // __webpack_public_path__
81 +/******/ __webpack_require__.p = "";
82 +/******/
83 +/******/
84 +/******/ // Load entry module and return exports
85 +/******/ return __webpack_require__(__webpack_require__.s = 740);
86 +/******/ })
87 +/************************************************************************/
88 +/******/ ({
2 89
3 -//#region \0rolldown/runtime.js
4 - var __defProp = Object.defineProperty;
5 - var __name = (target, value) => __defProp(target, "name", {
6 - value,
7 - configurable: true
8 - });
90 +/***/ 102:
91 +/***/ (function(module, exports) {
9 92
10 -//#endregion
93 +module.exports = function (bitmap, value) {
94 + return {
95 + enumerable: !(bitmap & 1),
96 + configurable: !(bitmap & 2),
97 + writable: !(bitmap & 4),
98 + value: value
99 + };
100 +};
11 101
12 -//#region assets/dev/js/admin/gutenberg.js
13 - (function($) {
14 - "use strict";
15 - var ElementorGutenbergApp = {
16 - cacheElements: function cacheElements() {
17 - var self = this;
18 - self.isElementorMode = ElementorGutenbergSettings.isElementorMode;
19 - self.cache = {};
20 - self.cache.$gutenberg = $("#editor");
21 - self.cache.$switchMode = $($("#elementor-gutenberg-button-switch-mode").html());
22 - self.cache.$switchModeButton = self.cache.$switchMode.find("#elementor-switch-mode-button");
23 - self.bindEvents();
24 - self.toggleStatus();
25 - wp.data.subscribe(function() {
26 - setTimeout(function() {
27 - self.buildPanel();
28 - }, 1);
29 - });
30 - },
31 - buildPanel: function buildPanel() {
32 - var self = this;
33 - if (!self.cache.$gutenberg.find("#elementor-switch-mode").length) self.cache.$gutenberg.find(".edit-post-header-toolbar").append(self.cache.$switchMode);
34 - if (this.hasIframe()) this.handleIframe();
35 - if (!$("#elementor-editor").length) {
36 - self.cache.$editorPanel = $($("#elementor-gutenberg-panel").html());
37 - var editorButtonParent = self.cache.$gutenberg.find(".block-editor-writing-flow");
38 - if (!editorButtonParent.length) editorButtonParent = self.cache.$gutenberg.find(".is-desktop-preview");
39 - self.cache.$gurenbergBlockList = editorButtonParent;
40 - self.cache.$gurenbergBlockList.append(self.cache.$editorPanel);
41 - self.cache.$editorPanelButton = self.cache.$editorPanel.find("#elementor-go-to-edit-page-link");
42 - self.cache.$editorPanelButton.on("click", function(event) {
43 - event.preventDefault();
44 - self.handleEditButtonClick();
45 - });
46 - }
47 - },
48 - handleIframe: function handleIframe() {
49 - this.hideIframeContent();
50 - this.buildPanelTopBar();
51 - },
52 - hasIframe: function hasIframe() {
53 - return !!this.cache.$gutenberg.find("iframe[name=\"editor-canvas\"]").length;
54 - },
55 - hideIframeContent: function hideIframeContent() {
56 - if (!this.isElementorMode) return;
57 - this.cache.$gutenberg.find("iframe[name=\"editor-canvas\"]").contents().find("body").append("<style>\n .editor-post-text-editor,\n .block-editor-block-list__layout {\n display: none;\n }\n\n body {\n padding: 0 !important;\n }\n </style>");
58 - },
59 - buildPanelTopBar: function buildPanelTopBar() {
60 - var self = this;
61 - if (!$("#elementor-edit-mode-button").length && this.isElementorMode) {
62 - self.cache.$editorBtnTop = $($("#elementor-gutenberg-button-tmpl").html());
63 - self.cache.$gutenberg.find(".edit-post-header-toolbar").append(self.cache.$editorBtnTop);
64 - $("#elementor-edit-mode-button").on("click", function(event) {
65 - event.preventDefault();
66 - self.handleEditButtonClick(false);
67 - });
68 - }
69 - },
70 - handleEditButtonClick: function handleEditButtonClick() {
71 - var withAnimation = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
72 - var self = this;
73 - if (withAnimation) self.animateLoader();
74 - if ("auto-draft" === wp.data.select("core/editor").getCurrentPost().status) {
75 - if (!wp.data.select("core/editor").getEditedPostAttribute("title")) wp.data.dispatch("core/editor").editPost({ title: "Elementor #" + $("#post_ID").val() });
76 - wp.data.dispatch("core/editor").savePost();
77 - }
78 - self.redirectWhenSave();
79 - },
80 - bindEvents: function bindEvents() {
81 - var self = this;
82 - self.cache.$switchModeButton.on("click", function() {
83 - if (self.isElementorMode) elementorCommon.dialogsManager.createWidget("confirm", {
84 - message: (0, _wordpress_i18n.__)("You are about to switch this page from the Elementor editor to the WordPress editor. Your current layout, design, and content may break and need to be rebuilt. Are you sure you want to continue?", "elementor"),
85 - headerMessage: (0, _wordpress_i18n.__)("Edit with WordPress?", "elementor"),
86 - strings: {
87 - confirm: (0, _wordpress_i18n.__)("Continue", "elementor"),
88 - cancel: (0, _wordpress_i18n.__)("Cancel", "elementor")
89 - },
90 - defaultOption: "cancel",
91 - onConfirm: function onConfirm() {
92 - var wpEditor = wp.data.dispatch("core/editor");
93 - wpEditor.editPost({ gutenberg_elementor_mode: false });
94 - wpEditor.savePost();
95 - self.isElementorMode = !self.isElementorMode;
96 - self.toggleStatus();
97 - }
98 - }).show();
99 - else {
100 - self.isElementorMode = !self.isElementorMode;
101 - self.toggleStatus();
102 - self.cache.$editorPanelButton.trigger("click");
103 - }
104 - });
105 - },
106 - redirectWhenSave: function redirectWhenSave() {
107 - var self = this;
108 - setTimeout(function() {
109 - if (wp.data.select("core/editor").isSavingPost()) self.redirectWhenSave();
110 - else location.href = ElementorGutenbergSettings.editLink;
111 - }, 300);
112 - },
113 - animateLoader: function animateLoader() {
114 - this.cache.$editorPanelButton.addClass("elementor-animate");
115 - },
116 - toggleStatus: function toggleStatus() {
117 - jQuery("body").toggleClass("elementor-editor-active", this.isElementorMode).toggleClass("elementor-editor-inactive", !this.isElementorMode);
118 - },
119 - init: function init() {
120 - this.cacheElements();
121 - }
122 - };
123 - $(function() {
124 - ElementorGutenbergApp.init();
125 - });
126 - })(jQuery);
127 102
128 -//#endregion
129 -})(wp.i18n);
103 +/***/ }),
104 +
105 +/***/ 109:
106 +/***/ (function(module, exports, __webpack_require__) {
107 +
108 +var isObject = __webpack_require__(30);
109 +var document = __webpack_require__(17).document;
110 +// typeof document.createElement is 'object' in old IE
111 +var is = isObject(document) && isObject(document.createElement);
112 +module.exports = function (it) {
113 + return is ? document.createElement(it) : {};
114 +};
115 +
116 +
117 +/***/ }),
118 +
119 +/***/ 110:
120 +/***/ (function(module, exports) {
121 +
122 +module.exports = false;
123 +
124 +
125 +/***/ }),
126 +
127 +/***/ 12:
128 +/***/ (function(module, exports, __webpack_require__) {
129 +
130 +var store = __webpack_require__(66)('wks');
131 +var uid = __webpack_require__(67);
132 +var Symbol = __webpack_require__(17).Symbol;
133 +var USE_SYMBOL = typeof Symbol == 'function';
134 +
135 +var $exports = module.exports = function (name) {
136 + return store[name] || (store[name] =
137 + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
138 +};
139 +
140 +$exports.store = store;
141 +
142 +
143 +/***/ }),
144 +
145 +/***/ 120:
146 +/***/ (function(module, exports, __webpack_require__) {
147 +
148 +// fallback for non-array-like ES3 and non-enumerable old V8 strings
149 +var cof = __webpack_require__(46);
150 +// eslint-disable-next-line no-prototype-builtins
151 +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
152 + return cof(it) == 'String' ? it.split('') : Object(it);
153 +};
154 +
155 +
156 +/***/ }),
157 +
158 +/***/ 123:
159 +/***/ (function(module, exports, __webpack_require__) {
160 +
161 +// 7.1.1 ToPrimitive(input [, PreferredType])
162 +var isObject = __webpack_require__(30);
163 +// instead of the ES6 spec version, we didn't implement @@toPrimitive case
164 +// and the second argument - flag - preferred type is a string
165 +module.exports = function (it, S) {
166 + if (!isObject(it)) return it;
167 + var fn, val;
168 + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
169 + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
170 + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
171 + throw TypeError("Can't convert object to primitive value");
172 +};
173 +
174 +
175 +/***/ }),
176 +
177 +/***/ 129:
178 +/***/ (function(module, exports, __webpack_require__) {
179 +
180 +module.exports = !__webpack_require__(27) && !__webpack_require__(33)(function () {
181 + return Object.defineProperty(__webpack_require__(109)('div'), 'a', { get: function () { return 7; } }).a != 7;
182 +});
183 +
184 +
185 +/***/ }),
186 +
187 +/***/ 143:
188 +/***/ (function(module, exports, __webpack_require__) {
189 +
190 +module.exports = __webpack_require__(66)('native-function-to-string', Function.toString);
191 +
192 +
193 +/***/ }),
194 +
195 +/***/ 17:
196 +/***/ (function(module, exports) {
197 +
198 +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
199 +var global = module.exports = typeof window != 'undefined' && window.Math == Math
200 + ? window : typeof self != 'undefined' && self.Math == Math ? self
201 + // eslint-disable-next-line no-new-func
202 + : Function('return this')();
203 +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
204 +
205 +
206 +/***/ }),
207 +
208 +/***/ 18:
209 +/***/ (function(module, exports, __webpack_require__) {
210 +
211 +var isObject = __webpack_require__(30);
212 +module.exports = function (it) {
213 + if (!isObject(it)) throw TypeError(it + ' is not an object!');
214 + return it;
215 +};
216 +
217 +
218 +/***/ }),
219 +
220 +/***/ 181:
221 +/***/ (function(module, exports, __webpack_require__) {
222 +
223 +// 0 -> Array#forEach
224 +// 1 -> Array#map
225 +// 2 -> Array#filter
226 +// 3 -> Array#some
227 +// 4 -> Array#every
228 +// 5 -> Array#find
229 +// 6 -> Array#findIndex
230 +var ctx = __webpack_require__(73);
231 +var IObject = __webpack_require__(120);
232 +var toObject = __webpack_require__(96);
233 +var toLength = __webpack_require__(43);
234 +var asc = __webpack_require__(216);
235 +module.exports = function (TYPE, $create) {
236 + var IS_MAP = TYPE == 1;
237 + var IS_FILTER = TYPE == 2;
238 + var IS_SOME = TYPE == 3;
239 + var IS_EVERY = TYPE == 4;
240 + var IS_FIND_INDEX = TYPE == 6;
241 + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
242 + var create = $create || asc;
243 + return function ($this, callbackfn, that) {
244 + var O = toObject($this);
245 + var self = IObject(O);
246 + var f = ctx(callbackfn, that, 3);
247 + var length = toLength(self.length);
248 + var index = 0;
249 + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
250 + var val, res;
251 + for (;length > index; index++) if (NO_HOLES || index in self) {
252 + val = self[index];
253 + res = f(val, index, O);
254 + if (TYPE) {
255 + if (IS_MAP) result[index] = res; // map
256 + else if (res) switch (TYPE) {
257 + case 3: return true; // some
258 + case 5: return val; // find
259 + case 6: return index; // findIndex
260 + case 2: result.push(val); // filter
261 + } else if (IS_EVERY) return false; // every
262 + }
263 + }
264 + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
265 + };
266 +};
267 +
268 +
269 +/***/ }),
270 +
271 +/***/ 216:
272 +/***/ (function(module, exports, __webpack_require__) {
273 +
274 +// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
275 +var speciesConstructor = __webpack_require__(217);
276 +
277 +module.exports = function (original, length) {
278 + return new (speciesConstructor(original))(length);
279 +};
280 +
281 +
282 +/***/ }),
283 +
284 +/***/ 217:
285 +/***/ (function(module, exports, __webpack_require__) {
286 +
287 +var isObject = __webpack_require__(30);
288 +var isArray = __webpack_require__(218);
289 +var SPECIES = __webpack_require__(12)('species');
290 +
291 +module.exports = function (original) {
292 + var C;
293 + if (isArray(original)) {
294 + C = original.constructor;
295 + // cross-realm fallback
296 + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
297 + if (isObject(C)) {
298 + C = C[SPECIES];
299 + if (C === null) C = undefined;
300 + }
301 + } return C === undefined ? Array : C;
302 +};
303 +
304 +
305 +/***/ }),
306 +
307 +/***/ 218:
308 +/***/ (function(module, exports, __webpack_require__) {
309 +
310 +// 7.2.2 IsArray(argument)
311 +var cof = __webpack_require__(46);
312 +module.exports = Array.isArray || function isArray(arg) {
313 + return cof(arg) == 'Array';
314 +};
315 +
316 +
317 +/***/ }),
318 +
319 +/***/ 26:
320 +/***/ (function(module, exports, __webpack_require__) {
321 +
322 +"use strict";
323 +
324 +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
325 +var $export = __webpack_require__(37);
326 +var $find = __webpack_require__(181)(5);
327 +var KEY = 'find';
328 +var forced = true;
329 +// Shouldn't skip holes
330 +if (KEY in []) Array(1)[KEY](function () { forced = false; });
331 +$export($export.P + $export.F * forced, 'Array', {
332 + find: function find(callbackfn /* , that = undefined */) {
333 + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
334 + }
335 +});
336 +__webpack_require__(85)(KEY);
337 +
338 +
339 +/***/ }),
340 +
341 +/***/ 27:
342 +/***/ (function(module, exports, __webpack_require__) {
343 +
344 +// Thank's IE8 for his funny defineProperty
345 +module.exports = !__webpack_require__(33)(function () {
346 + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
347 +});
348 +
349 +
350 +/***/ }),
351 +
352 +/***/ 29:
353 +/***/ (function(module, exports, __webpack_require__) {
354 +
355 +var dP = __webpack_require__(45);
356 +var createDesc = __webpack_require__(102);
357 +module.exports = __webpack_require__(27) ? function (object, key, value) {
358 + return dP.f(object, key, createDesc(1, value));
359 +} : function (object, key, value) {
360 + object[key] = value;
361 + return object;
362 +};
363 +
364 +
365 +/***/ }),
366 +
367 +/***/ 30:
368 +/***/ (function(module, exports) {
369 +
370 +module.exports = function (it) {
371 + return typeof it === 'object' ? it !== null : typeof it === 'function';
372 +};
373 +
374 +
375 +/***/ }),
376 +
377 +/***/ 33:
378 +/***/ (function(module, exports) {
379 +
380 +module.exports = function (exec) {
381 + try {
382 + return !!exec();
383 + } catch (e) {
384 + return true;
385 + }
386 +};
387 +
388 +
389 +/***/ }),
390 +
391 +/***/ 35:
392 +/***/ (function(module, exports, __webpack_require__) {
393 +
394 +var global = __webpack_require__(17);
395 +var hide = __webpack_require__(29);
396 +var has = __webpack_require__(61);
397 +var SRC = __webpack_require__(67)('src');
398 +var $toString = __webpack_require__(143);
399 +var TO_STRING = 'toString';
400 +var TPL = ('' + $toString).split(TO_STRING);
401 +
402 +__webpack_require__(55).inspectSource = function (it) {
403 + return $toString.call(it);
404 +};
405 +
406 +(module.exports = function (O, key, val, safe) {
407 + var isFunction = typeof val == 'function';
408 + if (isFunction) has(val, 'name') || hide(val, 'name', key);
409 + if (O[key] === val) return;
410 + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
411 + if (O === global) {
412 + O[key] = val;
413 + } else if (!safe) {
414 + delete O[key];
415 + hide(O, key, val);
416 + } else if (O[key]) {
417 + O[key] = val;
418 + } else {
419 + hide(O, key, val);
420 + }
421 +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
422 +})(Function.prototype, TO_STRING, function toString() {
423 + return typeof this == 'function' && this[SRC] || $toString.call(this);
424 +});
425 +
426 +
427 +/***/ }),
428 +
429 +/***/ 37:
430 +/***/ (function(module, exports, __webpack_require__) {
431 +
432 +var global = __webpack_require__(17);
433 +var core = __webpack_require__(55);
434 +var hide = __webpack_require__(29);
435 +var redefine = __webpack_require__(35);
436 +var ctx = __webpack_require__(73);
437 +var PROTOTYPE = 'prototype';
438 +
439 +var $export = function (type, name, source) {
440 + var IS_FORCED = type & $export.F;
441 + var IS_GLOBAL = type & $export.G;
442 + var IS_STATIC = type & $export.S;
443 + var IS_PROTO = type & $export.P;
444 + var IS_BIND = type & $export.B;
445 + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
446 + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
447 + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
448 + var key, own, out, exp;
449 + if (IS_GLOBAL) source = name;
450 + for (key in source) {
451 + // contains in native
452 + own = !IS_FORCED && target && target[key] !== undefined;
453 + // export native or passed
454 + out = (own ? target : source)[key];
455 + // bind timers to global for call from export context
456 + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
457 + // extend global
458 + if (target) redefine(target, key, out, type & $export.U);
459 + // export
460 + if (exports[key] != out) hide(exports, key, exp);
461 + if (IS_PROTO && expProto[key] != out) expProto[key] = out;
462 + }
463 +};
464 +global.core = core;
465 +// type bitmap
466 +$export.F = 1; // forced
467 +$export.G = 2; // global
468 +$export.S = 4; // static
469 +$export.P = 8; // proto
470 +$export.B = 16; // bind
471 +$export.W = 32; // wrap
472 +$export.U = 64; // safe
473 +$export.R = 128; // real proto method for `library`
474 +module.exports = $export;
475 +
476 +
477 +/***/ }),
478 +
479 +/***/ 42:
480 +/***/ (function(module, exports) {
481 +
482 +// 7.2.1 RequireObjectCoercible(argument)
483 +module.exports = function (it) {
484 + if (it == undefined) throw TypeError("Can't call method on " + it);
485 + return it;
486 +};
487 +
488 +
489 +/***/ }),
490 +
491 +/***/ 43:
492 +/***/ (function(module, exports, __webpack_require__) {
493 +
494 +// 7.1.15 ToLength
495 +var toInteger = __webpack_require__(57);
496 +var min = Math.min;
497 +module.exports = function (it) {
498 + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
499 +};
500 +
501 +
502 +/***/ }),
503 +
504 +/***/ 45:
505 +/***/ (function(module, exports, __webpack_require__) {
506 +
507 +var anObject = __webpack_require__(18);
508 +var IE8_DOM_DEFINE = __webpack_require__(129);
509 +var toPrimitive = __webpack_require__(123);
510 +var dP = Object.defineProperty;
511 +
512 +exports.f = __webpack_require__(27) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
513 + anObject(O);
514 + P = toPrimitive(P, true);
515 + anObject(Attributes);
516 + if (IE8_DOM_DEFINE) try {
517 + return dP(O, P, Attributes);
518 + } catch (e) { /* empty */ }
519 + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
520 + if ('value' in Attributes) O[P] = Attributes.value;
521 + return O;
522 +};
523 +
524 +
525 +/***/ }),
526 +
527 +/***/ 46:
528 +/***/ (function(module, exports) {
529 +
530 +var toString = {}.toString;
531 +
532 +module.exports = function (it) {
533 + return toString.call(it).slice(8, -1);
534 +};
535 +
536 +
537 +/***/ }),
538 +
539 +/***/ 55:
540 +/***/ (function(module, exports) {
541 +
542 +var core = module.exports = { version: '2.6.11' };
543 +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
544 +
545 +
546 +/***/ }),
547 +
548 +/***/ 57:
549 +/***/ (function(module, exports) {
550 +
551 +// 7.1.4 ToInteger
552 +var ceil = Math.ceil;
553 +var floor = Math.floor;
554 +module.exports = function (it) {
555 + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
556 +};
557 +
558 +
559 +/***/ }),
560 +
561 +/***/ 61:
562 +/***/ (function(module, exports) {
563 +
564 +var hasOwnProperty = {}.hasOwnProperty;
565 +module.exports = function (it, key) {
566 + return hasOwnProperty.call(it, key);
567 +};
568 +
569 +
570 +/***/ }),
571 +
572 +/***/ 66:
573 +/***/ (function(module, exports, __webpack_require__) {
574 +
575 +var core = __webpack_require__(55);
576 +var global = __webpack_require__(17);
577 +var SHARED = '__core-js_shared__';
578 +var store = global[SHARED] || (global[SHARED] = {});
579 +
580 +(module.exports = function (key, value) {
581 + return store[key] || (store[key] = value !== undefined ? value : {});
582 +})('versions', []).push({
583 + version: core.version,
584 + mode: __webpack_require__(110) ? 'pure' : 'global',
585 + copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
586 +});
587 +
588 +
589 +/***/ }),
590 +
591 +/***/ 67:
592 +/***/ (function(module, exports) {
593 +
594 +var id = 0;
595 +var px = Math.random();
596 +module.exports = function (key) {
597 + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
598 +};
599 +
600 +
601 +/***/ }),
602 +
603 +/***/ 73:
604 +/***/ (function(module, exports, __webpack_require__) {
605 +
606 +// optional / simple context binding
607 +var aFunction = __webpack_require__(91);
608 +module.exports = function (fn, that, length) {
609 + aFunction(fn);
610 + if (that === undefined) return fn;
611 + switch (length) {
612 + case 1: return function (a) {
613 + return fn.call(that, a);
614 + };
615 + case 2: return function (a, b) {
616 + return fn.call(that, a, b);
617 + };
618 + case 3: return function (a, b, c) {
619 + return fn.call(that, a, b, c);
620 + };
621 + }
622 + return function (/* ...args */) {
623 + return fn.apply(that, arguments);
624 + };
625 +};
626 +
627 +
628 +/***/ }),
629 +
630 +/***/ 740:
631 +/***/ (function(module, exports, __webpack_require__) {
632 +
633 +"use strict";
634 +
635 +
636 +__webpack_require__(26);
637 +
638 +/* global jQuery, ElementorGutenbergSettings */
639 +(function ($) {
640 + 'use strict';
641 +
642 + var ElementorGutenbergApp = {
643 + cacheElements: function cacheElements() {
644 + var self = this;
645 + self.isElementorMode = ElementorGutenbergSettings.isElementorMode;
646 + self.cache = {};
647 + self.cache.$gutenberg = $('#editor');
648 + self.cache.$switchMode = $($('#elementor-gutenberg-button-switch-mode').html());
649 + self.cache.$switchModeButton = self.cache.$switchMode.find('#elementor-switch-mode-button');
650 + self.bindEvents();
651 + self.toggleStatus();
652 + wp.data.subscribe(function () {
653 + setTimeout(function () {
654 + self.buildPanel();
655 + }, 1);
656 + });
657 + },
658 + buildPanel: function buildPanel() {
659 + var self = this;
660 +
661 + if (!self.cache.$gutenberg.find('#elementor-switch-mode').length) {
662 + self.cache.$gutenberg.find('.edit-post-header-toolbar').append(self.cache.$switchMode);
663 + }
664 +
665 + if (!$('#elementor-editor').length) {
666 + self.cache.$editorPanel = $($('#elementor-gutenberg-panel').html()); // TODO: `editor-block-list__layout` class for WP < 5.3 support.
667 +
668 + self.cache.$gurenbergBlockList = self.cache.$gutenberg.find('.editor-block-list__layout, .editor-post-text-editor, .block-editor-block-list__layout');
669 + self.cache.$gurenbergBlockList.after(self.cache.$editorPanel);
670 + self.cache.$editorPanelButton = self.cache.$editorPanel.find('#elementor-go-to-edit-page-link');
671 + self.cache.$editorPanelButton.on('click', function (event) {
672 + event.preventDefault();
673 + self.animateLoader();
674 + var documentTitle = wp.data.select('core/editor').getEditedPostAttribute('title');
675 +
676 + if (!documentTitle) {
677 + wp.data.dispatch('core/editor').editPost({
678 + title: 'Elementor #' + $('#post_ID').val()
679 + });
680 + }
681 +
682 + wp.data.dispatch('core/editor').savePost();
683 + self.redirectWhenSave();
684 + });
685 + }
686 + },
687 + bindEvents: function bindEvents() {
688 + var self = this;
689 + self.cache.$switchModeButton.on('click', function () {
690 + if (self.isElementorMode) {
691 + elementorCommon.dialogsManager.createWidget('confirm', {
692 + message: elementorAdmin.translate('back_to_wordpress_editor_message'),
693 + headerMessage: elementorAdmin.translate('back_to_wordpress_editor_header'),
694 + strings: {
695 + confirm: elementorAdmin.translate('yes'),
696 + cancel: elementorAdmin.translate('cancel')
697 + },
698 + defaultOption: 'confirm',
699 + onConfirm: function onConfirm() {
700 + var wpEditor = wp.data.dispatch('core/editor');
701 + wpEditor.editPost({
702 + gutenberg_elementor_mode: false
703 + });
704 + wpEditor.savePost();
705 + self.isElementorMode = !self.isElementorMode;
706 + self.toggleStatus();
707 + }
708 + }).show();
709 + } else {
710 + self.isElementorMode = !self.isElementorMode;
711 + self.toggleStatus();
712 + self.cache.$editorPanelButton.trigger('click');
713 + }
714 + });
715 + },
716 + redirectWhenSave: function redirectWhenSave() {
717 + var self = this;
718 + setTimeout(function () {
719 + if (wp.data.select('core/editor').isSavingPost()) {
720 + self.redirectWhenSave();
721 + } else {
722 + location.href = ElementorGutenbergSettings.editLink;
723 + }
724 + }, 300);
725 + },
726 + animateLoader: function animateLoader() {
727 + this.cache.$editorPanelButton.addClass('elementor-animate');
728 + },
729 + toggleStatus: function toggleStatus() {
730 + jQuery('body').toggleClass('elementor-editor-active', this.isElementorMode).toggleClass('elementor-editor-inactive', !this.isElementorMode);
731 + },
732 + init: function init() {
733 + this.cacheElements();
734 + }
735 + };
736 + $(function () {
737 + ElementorGutenbergApp.init();
738 + });
739 +})(jQuery);
740 +
741 +/***/ }),
742 +
743 +/***/ 85:
744 +/***/ (function(module, exports, __webpack_require__) {
745 +
746 +// 22.1.3.31 Array.prototype[@@unscopables]
747 +var UNSCOPABLES = __webpack_require__(12)('unscopables');
748 +var ArrayProto = Array.prototype;
749 +if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(29)(ArrayProto, UNSCOPABLES, {});
750 +module.exports = function (key) {
751 + ArrayProto[UNSCOPABLES][key] = true;
752 +};
753 +
754 +
755 +/***/ }),
756 +
757 +/***/ 91:
758 +/***/ (function(module, exports) {
759 +
760 +module.exports = function (it) {
761 + if (typeof it != 'function') throw TypeError(it + ' is not a function!');
762 + return it;
763 +};
764 +
765 +
766 +/***/ }),
767 +
768 +/***/ 96:
769 +/***/ (function(module, exports, __webpack_require__) {
770 +
771 +// 7.1.13 ToObject(argument)
772 +var defined = __webpack_require__(42);
773 +module.exports = function (it) {
774 + return Object(defined(it));
775 +};
776 +
777 +
778 +/***/ })
779 +
780 +/******/ });
130 781 //# sourceMappingURL=gutenberg.js.map