PluginProbe
Elementor Website Builder – more than just a page builder / 3.31.4
Elementor Website Builder – more than just a page builder v3.31.4
4.3.2 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 All 455 releases
← All changes | assets/js/cloud-library-screenshot.js +860 -1601 4.3.0 → 3.31.4 View file →
@@ -1,1643 +1,902 @@
1 -(function() {
1 +/*! elementor - v3.31.0 - 08-09-2025 */
2 +/******/ (() => { // webpackBootstrap
3 +/******/ var __webpack_modules__ = ({
2 4
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 __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
15 - var __copyProps = (to, from, except, desc) => {
16 - if (from && typeof from === "object" || typeof from === "function") {
17 - for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
18 - key = keys[i];
19 - if (!__hasOwnProp.call(to, key) && key !== except) {
20 - __defProp(to, key, {
21 - get: ((k) => from[k]).bind(null, key),
22 - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
23 - });
24 - }
25 - }
26 - }
27 - return to;
28 - };
29 - var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30 - value: mod,
31 - enumerable: true
32 - }) : target, mod));
5 +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
6 +/*!******************************************************************!*\
7 + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
8 + \******************************************************************/
9 +/***/ ((module) => {
33 10
34 -//#endregion
11 +function _arrayLikeToArray(r, a) {
12 + (null == a || a > r.length) && (a = r.length);
13 + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
14 + return n;
15 +}
16 +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
35 17
36 -//#region node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
37 - function asyncGeneratorStep$1(n, t, e, r, o, a, c) {
38 - try {
39 - var i = n[a](c);
40 - var u = i.value;
41 - } catch (n) {
42 - e(n);
43 - return;
44 - }
45 - i.done ? t(u) : Promise.resolve(u).then(r, o);
46 - }
47 - __name(asyncGeneratorStep$1, "asyncGeneratorStep");
48 - function _asyncToGenerator$1(n) {
49 - return function() {
50 - var t = this;
51 - var e = arguments;
52 - return new Promise(function(r, o) {
53 - var a = n.apply(t, e);
54 - function _next(n) {
55 - asyncGeneratorStep$1(a, r, o, _next, _throw, "next", n);
56 - }
57 - function _throw(n) {
58 - asyncGeneratorStep$1(a, r, o, _next, _throw, "throw", n);
59 - }
60 - _next(void 0);
61 - });
62 - };
63 - }
64 - __name(_asyncToGenerator$1, "_asyncToGenerator");
18 +/***/ }),
65 19
66 -//#endregion
67 -//#region node_modules/@babel/runtime/helpers/esm/typeof.js
68 - function _typeof(o) {
69 - "@babel/helpers - typeof";
70 - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
71 - return typeof o;
72 - } : function(o) {
73 - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
74 - }, _typeof(o);
75 - }
20 +/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js":
21 +/*!*******************************************************************!*\
22 + !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
23 + \*******************************************************************/
24 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
76 25
77 -//#endregion
78 -//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js
79 - function toPrimitive(t, r) {
80 - if ("object" != _typeof(t) || !t) return t;
81 - var e = t[Symbol.toPrimitive];
82 - if (void 0 !== e) {
83 - var i = e.call(t, r || "default");
84 - if ("object" != _typeof(i)) return i;
85 - throw new TypeError("@@toPrimitive must return a primitive value.");
86 - }
87 - return ("string" === r ? String : Number)(t);
88 - }
26 +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
27 +function _arrayWithoutHoles(r) {
28 + if (Array.isArray(r)) return arrayLikeToArray(r);
29 +}
30 +module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
89 31
90 -//#endregion
91 -//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
92 - function toPropertyKey(t) {
93 - var i = toPrimitive(t, "string");
94 - return "symbol" == _typeof(i) ? i : i + "";
95 - }
32 +/***/ }),
96 33
97 -//#endregion
98 -//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js
99 - function _defineProperty(e, r, t) {
100 - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
101 - value: t,
102 - enumerable: !0,
103 - configurable: !0,
104 - writable: !0
105 - }) : e[r] = t, e;
106 - }
34 +/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js":
35 +/*!***********************************************************************!*\
36 + !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
37 + \***********************************************************************/
38 +/***/ ((module) => {
107 39
108 -//#endregion
109 -//#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js
110 - function _classCallCheck(a, n) {
111 - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
112 - }
40 +function _assertThisInitialized(e) {
41 + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
42 + return e;
43 +}
44 +module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
113 45
114 -//#endregion
115 -//#region node_modules/@babel/runtime/helpers/esm/createClass.js
116 - function _defineProperties(e, r) {
117 - for (var t = 0; t < r.length; t++) {
118 - var o = r[t];
119 - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
120 - }
121 - }
122 - function _createClass(e, r, t) {
123 - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
124 - }
46 +/***/ }),
125 47
126 -//#endregion
127 -//#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
128 - function _assertThisInitialized(e) {
129 - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
130 - return e;
131 - }
48 +/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
49 +/*!****************************************************************!*\
50 + !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
51 + \****************************************************************/
52 +/***/ ((module) => {
132 53
133 -//#endregion
134 -//#region node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
135 - function _possibleConstructorReturn(t, e) {
136 - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
137 - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
138 - return _assertThisInitialized(t);
139 - }
54 +function _classCallCheck(a, n) {
55 + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
56 +}
57 +module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
140 58
141 -//#endregion
142 -//#region node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
143 - function _getPrototypeOf(t) {
144 - return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
145 - return t.__proto__ || Object.getPrototypeOf(t);
146 - }, _getPrototypeOf(t);
147 - }
59 +/***/ }),
148 60
149 -//#endregion
150 -//#region node_modules/@babel/runtime/helpers/esm/superPropBase.js
151 - function _superPropBase(t, o) {
152 - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
153 - return t;
154 - }
61 +/***/ "../node_modules/@babel/runtime/helpers/createClass.js":
62 +/*!*************************************************************!*\
63 + !*** ../node_modules/@babel/runtime/helpers/createClass.js ***!
64 + \*************************************************************/
65 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
155 66
156 -//#endregion
157 -//#region node_modules/@babel/runtime/helpers/esm/get.js
158 - function _get() {
159 - return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function(e, t, r) {
160 - var p = _superPropBase(e, t);
161 - if (p) {
162 - var n = Object.getOwnPropertyDescriptor(p, t);
163 - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
164 - }
165 - }, _get.apply(null, arguments);
166 - }
67 +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
68 +function _defineProperties(e, r) {
69 + for (var t = 0; t < r.length; t++) {
70 + var o = r[t];
71 + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
72 + }
73 +}
74 +function _createClass(e, r, t) {
75 + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
76 + writable: !1
77 + }), e;
78 +}
79 +module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
167 80
168 -//#endregion
169 -//#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
170 - function _setPrototypeOf(t, e) {
171 - return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
172 - return t.__proto__ = e, t;
173 - }, _setPrototypeOf(t, e);
174 - }
81 +/***/ }),
175 82
176 -//#endregion
177 -//#region node_modules/@babel/runtime/helpers/esm/inherits.js
178 - function _inherits(t, e) {
179 - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
180 - t.prototype = Object.create(e && e.prototype, { constructor: {
181 - value: t,
182 - writable: !0,
183 - configurable: !0
184 - } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e);
185 - }
83 +/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
84 +/*!****************************************************************!*\
85 + !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
86 + \****************************************************************/
87 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
186 88
187 -//#endregion
188 -//#region node_modules/@babel/runtime/helpers/OverloadYield.js
189 - var require_OverloadYield = /* @__PURE__ */ __commonJSMin(((exports, module) => {
190 - function _OverloadYield(e, d) {
191 - this.v = e, this.k = d;
192 - }
193 - module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports;
194 - }));
89 +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
90 +function _defineProperty(e, r, t) {
91 + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
92 + value: t,
93 + enumerable: !0,
94 + configurable: !0,
95 + writable: !0
96 + }) : e[r] = t, e;
97 +}
98 +module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
195 99
196 -//#endregion
197 -//#region node_modules/@babel/runtime/helpers/regeneratorDefine.js
198 - var require_regeneratorDefine = /* @__PURE__ */ __commonJSMin(((exports, module) => {
199 - function _regeneratorDefine(e, r, n, t) {
200 - var i = Object.defineProperty;
201 - try {
202 - i({}, "", {});
203 - } catch (e) {
204 - i = 0;
205 - }
206 - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) {
207 - function o(r, n) {
208 - _regeneratorDefine(e, r, function(e) {
209 - return this._invoke(r, n, e);
210 - });
211 - }
212 - r ? i ? i(e, r, {
213 - value: n,
214 - enumerable: !t,
215 - configurable: !t,
216 - writable: !t
217 - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
218 - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t);
219 - }
220 - module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports;
221 - }));
100 +/***/ }),
222 101
223 -//#endregion
224 -//#region node_modules/@babel/runtime/helpers/regenerator.js
225 - var require_regenerator$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
226 - var regeneratorDefine = require_regeneratorDefine();
227 - function _regenerator() {
228 - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
229 - var e;
230 - var t;
231 - var r = "function" == typeof Symbol ? Symbol : {};
232 - var n = r.iterator || "@@iterator";
233 - var o = r.toStringTag || "@@toStringTag";
234 - function i(r, n, o, i) {
235 - var c = n && n.prototype instanceof Generator ? n : Generator;
236 - var u = Object.create(c.prototype);
237 - return regeneratorDefine(u, "_invoke", function(r, n, o) {
238 - var i;
239 - var c;
240 - var u;
241 - var f = 0;
242 - var p = o || [];
243 - var y = !1;
244 - var G = {
245 - p: 0,
246 - n: 0,
247 - v: e,
248 - a: d,
249 - f: d.bind(e, 4),
250 - d: function d(t, r) {
251 - return i = t, c = 0, u = e, G.n = r, a;
252 - }
253 - };
254 - function d(r, n) {
255 - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
256 - var o;
257 - var i = p[t];
258 - var d = G.p;
259 - var l = i[2];
260 - 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));
261 - }
262 - if (o || r > 1) return a;
263 - throw y = !0, n;
264 - }
265 - return function(o, p, l) {
266 - if (f > 1) throw TypeError("Generator is already running");
267 - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
268 - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
269 - try {
270 - if (f = 2, i) {
271 - if (c || (o = "next"), t = i[o]) {
272 - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
273 - if (!t.done) return t;
274 - u = t.value, c < 2 && (c = 0);
275 - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
276 - i = e;
277 - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
278 - } catch (t) {
279 - i = e, c = 1, u = t;
280 - } finally {
281 - f = 1;
282 - }
283 - }
284 - return {
285 - value: t,
286 - done: y
287 - };
288 - };
289 - }(r, o, i), !0), u;
290 - }
291 - var a = {};
292 - function Generator() {}
293 - function GeneratorFunction() {}
294 - function GeneratorFunctionPrototype() {}
295 - t = Object.getPrototypeOf;
296 - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function() {
297 - return this;
298 - }), t);
299 - var u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
300 - function f(e) {
301 - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
302 - }
303 - 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() {
304 - return this;
305 - }), regeneratorDefine(u, "toString", function() {
306 - return "[object Generator]";
307 - }), (module.exports = _regenerator = function _regenerator() {
308 - return {
309 - w: i,
310 - m: f
311 - };
312 - }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
313 - }
314 - module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
315 - }));
102 +/***/ "../node_modules/@babel/runtime/helpers/get.js":
103 +/*!*****************************************************!*\
104 + !*** ../node_modules/@babel/runtime/helpers/get.js ***!
105 + \*****************************************************/
106 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
316 107
317 -//#endregion
318 -//#region node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js
319 - var require_regeneratorAsyncIterator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
320 - var OverloadYield = require_OverloadYield();
321 - var regeneratorDefine = require_regeneratorDefine();
322 - function AsyncIterator(t, e) {
323 - function n(r, o, i, f) {
324 - try {
325 - var c = t[r](o);
326 - var u = c.value;
327 - return u instanceof OverloadYield ? e.resolve(u.v).then(function(t) {
328 - n("next", t, i, f);
329 - }, function(t) {
330 - n("throw", t, i, f);
331 - }) : e.resolve(u).then(function(t) {
332 - c.value = t, i(c);
333 - }, function(t) {
334 - return n("throw", t, i, f);
335 - });
336 - } catch (t) {
337 - f(t);
338 - }
339 - }
340 - var r;
341 - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function() {
342 - return this;
343 - })), regeneratorDefine(this, "_invoke", function(t, o, i) {
344 - function f() {
345 - return new e(function(e, r) {
346 - n(t, i, e, r);
347 - });
348 - }
349 - return r = r ? r.then(f, f) : f();
350 - }, !0);
351 - }
352 - module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports;
353 - }));
108 +var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js");
109 +function _get() {
110 + return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {
111 + var p = superPropBase(e, t);
112 + if (p) {
113 + var n = Object.getOwnPropertyDescriptor(p, t);
114 + return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
115 + }
116 + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments);
117 +}
118 +module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports;
354 119
355 -//#endregion
356 -//#region node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js
357 - var require_regeneratorAsyncGen = /* @__PURE__ */ __commonJSMin(((exports, module) => {
358 - var regenerator = require_regenerator$1();
359 - var regeneratorAsyncIterator = require_regeneratorAsyncIterator();
360 - function _regeneratorAsyncGen(r, e, t, o, n) {
361 - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise);
362 - }
363 - module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports;
364 - }));
120 +/***/ }),
365 121
366 -//#endregion
367 -//#region node_modules/@babel/runtime/helpers/regeneratorAsync.js
368 - var require_regeneratorAsync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
369 - var regeneratorAsyncGen = require_regeneratorAsyncGen();
370 - function _regeneratorAsync(n, e, r, t, o) {
371 - var a = regeneratorAsyncGen(n, e, r, t, o);
372 - return a.next().then(function(n) {
373 - return n.done ? n.value : a.next();
374 - });
375 - }
376 - module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports;
377 - }));
122 +/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js":
123 +/*!****************************************************************!*\
124 + !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
125 + \****************************************************************/
126 +/***/ ((module) => {
378 127
379 -//#endregion
380 -//#region node_modules/@babel/runtime/helpers/regeneratorKeys.js
381 - var require_regeneratorKeys = /* @__PURE__ */ __commonJSMin(((exports, module) => {
382 - function _regeneratorKeys(e) {
383 - var n = Object(e);
384 - var r = [];
385 - for (var t in n) r.unshift(t);
386 - return function e() {
387 - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;
388 - return e.done = !0, e;
389 - };
390 - }
391 - module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports;
392 - }));
128 +function _getPrototypeOf(t) {
129 + return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
130 + return t.__proto__ || Object.getPrototypeOf(t);
131 + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t);
132 +}
133 +module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
393 134
394 -//#endregion
395 -//#region node_modules/@babel/runtime/helpers/typeof.js
396 - var require_typeof = /* @__PURE__ */ __commonJSMin(((exports, module) => {
397 - function _typeof(o) {
398 - "@babel/helpers - typeof";
399 - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
400 - return typeof o;
401 - } : function(o) {
402 - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
403 - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
404 - }
405 - module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
406 - }));
135 +/***/ }),
407 136
408 -//#endregion
409 -//#region node_modules/@babel/runtime/helpers/regeneratorValues.js
410 - var require_regeneratorValues = /* @__PURE__ */ __commonJSMin(((exports, module) => {
411 - var _typeof = require_typeof()["default"];
412 - function _regeneratorValues(e) {
413 - if (null != e) {
414 - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"];
415 - var r = 0;
416 - if (t) return t.call(e);
417 - if ("function" == typeof e.next) return e;
418 - if (!isNaN(e.length)) return { next: function next() {
419 - return e && r >= e.length && (e = void 0), {
420 - value: e && e[r++],
421 - done: !e
422 - };
423 - } };
424 - }
425 - throw new TypeError(_typeof(e) + " is not iterable");
426 - }
427 - module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports;
428 - }));
137 +/***/ "../node_modules/@babel/runtime/helpers/inherits.js":
138 +/*!**********************************************************!*\
139 + !*** ../node_modules/@babel/runtime/helpers/inherits.js ***!
140 + \**********************************************************/
141 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
429 142
430 -//#endregion
431 -//#region node_modules/@babel/runtime/helpers/regeneratorRuntime.js
432 - var require_regeneratorRuntime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
433 - var OverloadYield = require_OverloadYield();
434 - var regenerator = require_regenerator$1();
435 - var regeneratorAsync = require_regeneratorAsync();
436 - var regeneratorAsyncGen = require_regeneratorAsyncGen();
437 - var regeneratorAsyncIterator = require_regeneratorAsyncIterator();
438 - var regeneratorKeys = require_regeneratorKeys();
439 - var regeneratorValues = require_regeneratorValues();
440 - function _regeneratorRuntime() {
441 - "use strict";
442 - var r = regenerator();
443 - var e = r.m(_regeneratorRuntime);
444 - var t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
445 - function n(r) {
446 - var e = "function" == typeof r && r.constructor;
447 - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
448 - }
449 - var o = {
450 - "throw": 1,
451 - "return": 2,
452 - "break": 3,
453 - "continue": 3
454 - };
455 - function a(r) {
456 - var e;
457 - var t;
458 - return function(n) {
459 - e || (e = {
460 - stop: function stop() {
461 - return t(n.a, 2);
462 - },
463 - "catch": function _catch() {
464 - return n.v;
465 - },
466 - abrupt: function abrupt(r, e) {
467 - return t(n.a, o[r], e);
468 - },
469 - delegateYield: function delegateYield(r, o, a) {
470 - return e.resultName = o, t(n.d, regeneratorValues(r), a);
471 - },
472 - finish: function finish(r) {
473 - return t(n.f, r);
474 - }
475 - }, t = function t(r, _t, o) {
476 - n.p = e.prev, n.n = e.next;
477 - try {
478 - return r(_t, o);
479 - } finally {
480 - e.next = n.n;
481 - }
482 - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
483 - try {
484 - return r.call(this, e);
485 - } finally {
486 - n.p = e.prev, n.n = e.next;
487 - }
488 - };
489 - }
490 - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
491 - return {
492 - wrap: function wrap(e, t, n, o) {
493 - return r.w(a(e), t, n, o && o.reverse());
494 - },
495 - isGeneratorFunction: n,
496 - mark: r.m,
497 - awrap: function awrap(r, e) {
498 - return new OverloadYield(r, e);
499 - },
500 - AsyncIterator: regeneratorAsyncIterator,
501 - async: function async(r, e, t, o, u) {
502 - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);
503 - },
504 - keys: regeneratorKeys,
505 - values: regeneratorValues
506 - };
507 - }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
508 - }
509 - module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
510 - }));
143 +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
144 +function _inherits(t, e) {
145 + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
146 + t.prototype = Object.create(e && e.prototype, {
147 + constructor: {
148 + value: t,
149 + writable: !0,
150 + configurable: !0
151 + }
152 + }), Object.defineProperty(t, "prototype", {
153 + writable: !1
154 + }), e && setPrototypeOf(t, e);
155 +}
156 +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
511 157
512 -//#endregion
513 -//#region node_modules/@babel/runtime/regenerator/index.js
514 - var require_regenerator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
515 - var runtime = require_regeneratorRuntime()();
516 - module.exports = runtime;
517 - try {
518 - regeneratorRuntime = runtime;
519 - } catch (accidentalStrictMode) {
520 - if (typeof globalThis === "object") globalThis.regeneratorRuntime = runtime;
521 - else Function("r", "regeneratorRuntime = r")(runtime);
522 - }
523 - }));
158 +/***/ }),
524 159
525 -//#endregion
526 -//#region \0@[email protected]/helpers/esm/asyncToGenerator.js
527 -var import_regenerator = /* @__PURE__ */ __toESM(require_regenerator());
528 - function asyncGeneratorStep(n, t, e, r, o, a, c) {
529 - try {
530 - var i = n[a](c);
531 - var u = i.value;
532 - } catch (n) {
533 - e(n);
534 - return;
535 - }
536 - i.done ? t(u) : Promise.resolve(u).then(r, o);
537 - }
538 - function _asyncToGenerator(n) {
539 - return function() {
540 - var t = this;
541 - var e = arguments;
542 - return new Promise(function(r, o) {
543 - var a = n.apply(t, e);
544 - function _next(n) {
545 - asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
546 - }
547 - function _throw(n) {
548 - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
549 - }
550 - _next(void 0);
551 - });
552 - };
553 - }
160 +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
161 +/*!***********************************************************************!*\
162 + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
163 + \***********************************************************************/
164 +/***/ ((module) => {
554 165
555 -//#endregion
556 -//#region node_modules/html-to-image/es/util.js
557 - function resolveUrl(url, baseUrl) {
558 - if (url.match(/^[a-z]+:\/\//i)) return url;
559 - if (url.match(/^\/\//)) return window.location.protocol + url;
560 - if (url.match(/^[a-z]+:/i)) return url;
561 - const doc = document.implementation.createHTMLDocument();
562 - const base = doc.createElement("base");
563 - const a = doc.createElement("a");
564 - doc.head.appendChild(base);
565 - doc.body.appendChild(a);
566 - if (baseUrl) base.href = baseUrl;
567 - a.href = url;
568 - return a.href;
569 - }
570 - var uuid = (() => {
571 - let counter = 0;
572 - const random = () => `0000${(Math.random() * Math.pow(36, 4) << 0).toString(36)}`.slice(-4);
573 - return () => {
574 - counter += 1;
575 - return `u${random()}${counter}`;
576 - };
577 - })();
578 - function toArray(arrayLike) {
579 - const arr = [];
580 - for (let i = 0, l = arrayLike.length; i < l; i++) arr.push(arrayLike[i]);
581 - return arr;
582 - }
583 - var styleProps = null;
584 - function getStyleProperties(options = {}) {
585 - if (styleProps) return styleProps;
586 - if (options.includeStyleProperties) {
587 - styleProps = options.includeStyleProperties;
588 - return styleProps;
589 - }
590 - styleProps = toArray(window.getComputedStyle(document.documentElement));
591 - return styleProps;
592 - }
593 - function px(node, styleProperty) {
594 - const val = (node.ownerDocument.defaultView || window).getComputedStyle(node).getPropertyValue(styleProperty);
595 - return val ? parseFloat(val.replace("px", "")) : 0;
596 - }
597 - function getNodeWidth(node) {
598 - const leftBorder = px(node, "border-left-width");
599 - const rightBorder = px(node, "border-right-width");
600 - return node.clientWidth + leftBorder + rightBorder;
601 - }
602 - function getNodeHeight(node) {
603 - const topBorder = px(node, "border-top-width");
604 - const bottomBorder = px(node, "border-bottom-width");
605 - return node.clientHeight + topBorder + bottomBorder;
606 - }
607 - function getImageSize(targetNode, options = {}) {
608 - return {
609 - width: options.width || getNodeWidth(targetNode),
610 - height: options.height || getNodeHeight(targetNode)
611 - };
612 - }
613 - function getPixelRatio() {
614 - let ratio;
615 - let FINAL_PROCESS;
616 - try {
617 - FINAL_PROCESS = process;
618 - } catch (e) {}
619 - const val = FINAL_PROCESS && FINAL_PROCESS.env ? FINAL_PROCESS.env.devicePixelRatio : null;
620 - if (val) {
621 - ratio = parseInt(val, 10);
622 - if (Number.isNaN(ratio)) ratio = 1;
623 - }
624 - return ratio || window.devicePixelRatio || 1;
625 - }
626 - var canvasDimensionLimit = 16384;
627 - function checkCanvasDimensions(canvas) {
628 - if (canvas.width > canvasDimensionLimit || canvas.height > canvasDimensionLimit) if (canvas.width > canvasDimensionLimit && canvas.height > canvasDimensionLimit) if (canvas.width > canvas.height) {
629 - canvas.height *= canvasDimensionLimit / canvas.width;
630 - canvas.width = canvasDimensionLimit;
631 - } else {
632 - canvas.width *= canvasDimensionLimit / canvas.height;
633 - canvas.height = canvasDimensionLimit;
634 - }
635 - else if (canvas.width > canvasDimensionLimit) {
636 - canvas.height *= canvasDimensionLimit / canvas.width;
637 - canvas.width = canvasDimensionLimit;
638 - } else {
639 - canvas.width *= canvasDimensionLimit / canvas.height;
640 - canvas.height = canvasDimensionLimit;
641 - }
642 - }
643 - function createImage(url) {
644 - return new Promise((resolve, reject) => {
645 - const img = new Image();
646 - img.onload = () => {
647 - img.decode().then(() => {
648 - requestAnimationFrame(() => resolve(img));
649 - });
650 - };
651 - img.onerror = reject;
652 - img.crossOrigin = "anonymous";
653 - img.decoding = "async";
654 - img.src = url;
655 - });
656 - }
657 - function svgToDataURL(_x) {
658 - return _svgToDataURL.apply(this, arguments);
659 - }
660 - function _svgToDataURL() {
661 - _svgToDataURL = _asyncToGenerator(function* (svg) {
662 - return Promise.resolve().then(() => new XMLSerializer().serializeToString(svg)).then(encodeURIComponent).then((html) => `data:image/svg+xml;charset=utf-8,${html}`);
663 - });
664 - return _svgToDataURL.apply(this, arguments);
665 - }
666 - function nodeToDataURL(_x2, _x3, _x4) {
667 - return _nodeToDataURL.apply(this, arguments);
668 - }
669 - function _nodeToDataURL() {
670 - _nodeToDataURL = _asyncToGenerator(function* (node, width, height) {
671 - const xmlns = "http://www.w3.org/2000/svg";
672 - const svg = document.createElementNS(xmlns, "svg");
673 - const foreignObject = document.createElementNS(xmlns, "foreignObject");
674 - svg.setAttribute("width", `${width}`);
675 - svg.setAttribute("height", `${height}`);
676 - svg.setAttribute("viewBox", `0 0 ${width} ${height}`);
677 - foreignObject.setAttribute("width", "100%");
678 - foreignObject.setAttribute("height", "100%");
679 - foreignObject.setAttribute("x", "0");
680 - foreignObject.setAttribute("y", "0");
681 - foreignObject.setAttribute("externalResourcesRequired", "true");
682 - svg.appendChild(foreignObject);
683 - foreignObject.appendChild(node);
684 - return svgToDataURL(svg);
685 - });
686 - return _nodeToDataURL.apply(this, arguments);
687 - }
688 - var isInstanceOfElement = (node, instance) => {
689 - if (node instanceof instance) return true;
690 - const nodePrototype = Object.getPrototypeOf(node);
691 - if (nodePrototype === null) return false;
692 - return nodePrototype.constructor.name === instance.name || isInstanceOfElement(nodePrototype, instance);
693 - };
166 +function _interopRequireDefault(e) {
167 + return e && e.__esModule ? e : {
168 + "default": e
169 + };
170 +}
171 +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
694 172
695 -//#endregion
696 -//#region node_modules/html-to-image/es/clone-pseudos.js
697 - function formatCSSText(style) {
698 - const content = style.getPropertyValue("content");
699 - return `${style.cssText} content: '${content.replace(/'|"/g, "")}';`;
700 - }
701 - function formatCSSProperties(style, options) {
702 - return getStyleProperties(options).map((name) => {
703 - return `${name}: ${style.getPropertyValue(name)}${style.getPropertyPriority(name) ? " !important" : ""};`;
704 - }).join(" ");
705 - }
706 - function getPseudoElementStyle(className, pseudo, style, options) {
707 - const selector = `.${className}:${pseudo}`;
708 - const cssText = style.cssText ? formatCSSText(style) : formatCSSProperties(style, options);
709 - return document.createTextNode(`${selector}{${cssText}}`);
710 - }
711 - function clonePseudoElement(nativeNode, clonedNode, pseudo, options) {
712 - const style = window.getComputedStyle(nativeNode, pseudo);
713 - const content = style.getPropertyValue("content");
714 - if (content === "" || content === "none") return;
715 - const className = uuid();
716 - try {
717 - clonedNode.className = `${clonedNode.className} ${className}`;
718 - } catch (err) {
719 - return;
720 - }
721 - const styleElement = document.createElement("style");
722 - styleElement.appendChild(getPseudoElementStyle(className, pseudo, style, options));
723 - clonedNode.appendChild(styleElement);
724 - }
725 - function clonePseudoElements(nativeNode, clonedNode, options) {
726 - clonePseudoElement(nativeNode, clonedNode, ":before", options);
727 - clonePseudoElement(nativeNode, clonedNode, ":after", options);
728 - }
173 +/***/ }),
729 174
730 -//#endregion
731 -//#region node_modules/html-to-image/es/mimes.js
732 - var WOFF = "application/font-woff";
733 - var JPEG = "image/jpeg";
734 - var mimes = {
735 - woff: WOFF,
736 - woff2: WOFF,
737 - ttf: "application/font-truetype",
738 - eot: "application/vnd.ms-fontobject",
739 - png: "image/png",
740 - jpg: JPEG,
741 - jpeg: JPEG,
742 - gif: "image/gif",
743 - tiff: "image/tiff",
744 - svg: "image/svg+xml",
745 - webp: "image/webp"
746 - };
747 - function getExtension(url) {
748 - const match = /\.([^./]*?)$/g.exec(url);
749 - return match ? match[1] : "";
750 - }
751 - function getMimeType(url) {
752 - const extension = getExtension(url).toLowerCase();
753 - return mimes[extension] || "";
754 - }
175 +/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js":
176 +/*!*****************************************************************!*\
177 + !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***!
178 + \*****************************************************************/
179 +/***/ ((module) => {
755 180
756 -//#endregion
757 -//#region node_modules/html-to-image/es/dataurl.js
758 - function getContentFromDataUrl(dataURL) {
759 - return dataURL.split(/,/)[1];
760 - }
761 - function isDataUrl(url) {
762 - return url.search(/^(data:)/) !== -1;
763 - }
764 - function makeDataUrl(content, mimeType) {
765 - return `data:${mimeType};base64,${content}`;
766 - }
767 - function fetchAsDataURL(_x, _x2, _x3) {
768 - return _fetchAsDataURL.apply(this, arguments);
769 - }
770 - function _fetchAsDataURL() {
771 - _fetchAsDataURL = _asyncToGenerator(function* (url, init, process) {
772 - const res = yield fetch(url, init);
773 - if (res.status === 404) throw new Error(`Resource "${res.url}" not found`);
774 - const blob = yield res.blob();
775 - return new Promise((resolve, reject) => {
776 - const reader = new FileReader();
777 - reader.onerror = reject;
778 - reader.onloadend = () => {
779 - try {
780 - resolve(process({
781 - res,
782 - result: reader.result
783 - }));
784 - } catch (error) {
785 - reject(error);
786 - }
787 - };
788 - reader.readAsDataURL(blob);
789 - });
790 - });
791 - return _fetchAsDataURL.apply(this, arguments);
792 - }
793 - var cache = {};
794 - function getCacheKey(url, contentType, includeQueryParams) {
795 - let key = url.replace(/\?.*/, "");
796 - if (includeQueryParams) key = url;
797 - if (/ttf|otf|eot|woff2?/i.test(key)) key = key.replace(/.*\//, "");
798 - return contentType ? `[${contentType}]${key}` : key;
799 - }
800 - function resourceToDataURL(_x4, _x5, _x6) {
801 - return _resourceToDataURL.apply(this, arguments);
802 - }
803 - function _resourceToDataURL() {
804 - _resourceToDataURL = _asyncToGenerator(function* (resourceUrl, contentType, options) {
805 - const cacheKey = getCacheKey(resourceUrl, contentType, options.includeQueryParams);
806 - if (cache[cacheKey] != null) return cache[cacheKey];
807 - if (options.cacheBust) resourceUrl += (/\?/.test(resourceUrl) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime();
808 - let dataURL;
809 - try {
810 - dataURL = makeDataUrl(yield fetchAsDataURL(resourceUrl, options.fetchRequestInit, ({ res, result }) => {
811 - if (!contentType) contentType = res.headers.get("Content-Type") || "";
812 - return getContentFromDataUrl(result);
813 - }), contentType);
814 - } catch (error) {
815 - dataURL = options.imagePlaceholder || "";
816 - let msg = `Failed to fetch resource: ${resourceUrl}`;
817 - if (error) msg = typeof error === "string" ? error : error.message;
818 - if (msg) console.warn(msg);
819 - }
820 - cache[cacheKey] = dataURL;
821 - return dataURL;
822 - });
823 - return _resourceToDataURL.apply(this, arguments);
824 - }
181 +function _iterableToArray(r) {
182 + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
183 +}
184 +module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
825 185
826 -//#endregion
827 -//#region node_modules/html-to-image/es/clone-node.js
828 - function cloneCanvasElement(_x) {
829 - return _cloneCanvasElement.apply(this, arguments);
830 - }
831 - function _cloneCanvasElement() {
832 - _cloneCanvasElement = _asyncToGenerator(function* (canvas) {
833 - const dataURL = canvas.toDataURL();
834 - if (dataURL === "data:,") return canvas.cloneNode(false);
835 - return createImage(dataURL);
836 - });
837 - return _cloneCanvasElement.apply(this, arguments);
838 - }
839 - function cloneVideoElement(_x2, _x3) {
840 - return _cloneVideoElement.apply(this, arguments);
841 - }
842 - function _cloneVideoElement() {
843 - _cloneVideoElement = _asyncToGenerator(function* (video, options) {
844 - if (video.currentSrc) {
845 - const canvas = document.createElement("canvas");
846 - const ctx = canvas.getContext("2d");
847 - canvas.width = video.clientWidth;
848 - canvas.height = video.clientHeight;
849 - ctx === null || ctx === void 0 || ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
850 - return createImage(canvas.toDataURL());
851 - }
852 - const poster = video.poster;
853 - return createImage(yield resourceToDataURL(poster, getMimeType(poster), options));
854 - });
855 - return _cloneVideoElement.apply(this, arguments);
856 - }
857 - function cloneIFrameElement(_x4, _x5) {
858 - return _cloneIFrameElement.apply(this, arguments);
859 - }
860 - function _cloneIFrameElement() {
861 - _cloneIFrameElement = _asyncToGenerator(function* (iframe, options) {
862 - var _a;
863 - try {
864 - if ((_a = iframe === null || iframe === void 0 ? void 0 : iframe.contentDocument) === null || _a === void 0 ? void 0 : _a.body) return yield cloneNode(iframe.contentDocument.body, options, true);
865 - } catch (_b) {}
866 - return iframe.cloneNode(false);
867 - });
868 - return _cloneIFrameElement.apply(this, arguments);
869 - }
870 - function cloneSingleNode(_x6, _x7) {
871 - return _cloneSingleNode.apply(this, arguments);
872 - }
873 - function _cloneSingleNode() {
874 - _cloneSingleNode = _asyncToGenerator(function* (node, options) {
875 - if (isInstanceOfElement(node, HTMLCanvasElement)) return cloneCanvasElement(node);
876 - if (isInstanceOfElement(node, HTMLVideoElement)) return cloneVideoElement(node, options);
877 - if (isInstanceOfElement(node, HTMLIFrameElement)) return cloneIFrameElement(node, options);
878 - return node.cloneNode(isSVGElement(node));
879 - });
880 - return _cloneSingleNode.apply(this, arguments);
881 - }
882 - var isSlotElement = (node) => node.tagName != null && node.tagName.toUpperCase() === "SLOT";
883 - var isSVGElement = (node) => node.tagName != null && node.tagName.toUpperCase() === "SVG";
884 - function cloneChildren(_x8, _x9, _x10) {
885 - return _cloneChildren.apply(this, arguments);
886 - }
887 - function _cloneChildren() {
888 - _cloneChildren = _asyncToGenerator(function* (nativeNode, clonedNode, options) {
889 - var _a;
890 - var _b;
891 - if (isSVGElement(clonedNode)) return clonedNode;
892 - let children = [];
893 - if (isSlotElement(nativeNode) && nativeNode.assignedNodes) children = toArray(nativeNode.assignedNodes());
894 - else if (isInstanceOfElement(nativeNode, HTMLIFrameElement) && ((_a = nativeNode.contentDocument) === null || _a === void 0 ? void 0 : _a.body)) children = toArray(nativeNode.contentDocument.body.childNodes);
895 - else children = toArray(((_b = nativeNode.shadowRoot) !== null && _b !== void 0 ? _b : nativeNode).childNodes);
896 - if (children.length === 0 || isInstanceOfElement(nativeNode, HTMLVideoElement)) return clonedNode;
897 - yield children.reduce((deferred, child) => deferred.then(() => cloneNode(child, options)).then((clonedChild) => {
898 - if (clonedChild) clonedNode.appendChild(clonedChild);
899 - }), Promise.resolve());
900 - return clonedNode;
901 - });
902 - return _cloneChildren.apply(this, arguments);
903 - }
904 - function cloneCSSStyle(nativeNode, clonedNode, options) {
905 - const targetStyle = clonedNode.style;
906 - if (!targetStyle) return;
907 - const sourceStyle = window.getComputedStyle(nativeNode);
908 - if (sourceStyle.cssText) {
909 - targetStyle.cssText = sourceStyle.cssText;
910 - targetStyle.transformOrigin = sourceStyle.transformOrigin;
911 - } else getStyleProperties(options).forEach((name) => {
912 - let value = sourceStyle.getPropertyValue(name);
913 - if (name === "font-size" && value.endsWith("px")) value = `${Math.floor(parseFloat(value.substring(0, value.length - 2))) - .1}px`;
914 - if (isInstanceOfElement(nativeNode, HTMLIFrameElement) && name === "display" && value === "inline") value = "block";
915 - if (name === "d" && clonedNode.getAttribute("d")) value = `path(${clonedNode.getAttribute("d")})`;
916 - targetStyle.setProperty(name, value, sourceStyle.getPropertyPriority(name));
917 - });
918 - }
919 - function cloneInputValue(nativeNode, clonedNode) {
920 - if (isInstanceOfElement(nativeNode, HTMLTextAreaElement)) clonedNode.innerHTML = nativeNode.value;
921 - if (isInstanceOfElement(nativeNode, HTMLInputElement)) clonedNode.setAttribute("value", nativeNode.value);
922 - }
923 - function cloneSelectValue(nativeNode, clonedNode) {
924 - if (isInstanceOfElement(nativeNode, HTMLSelectElement)) {
925 - const clonedSelect = clonedNode;
926 - const selectedOption = Array.from(clonedSelect.children).find((child) => nativeNode.value === child.getAttribute("value"));
927 - if (selectedOption) selectedOption.setAttribute("selected", "");
928 - }
929 - }
930 - function decorate(nativeNode, clonedNode, options) {
931 - if (isInstanceOfElement(clonedNode, Element)) {
932 - cloneCSSStyle(nativeNode, clonedNode, options);
933 - clonePseudoElements(nativeNode, clonedNode, options);
934 - cloneInputValue(nativeNode, clonedNode);
935 - cloneSelectValue(nativeNode, clonedNode);
936 - }
937 - return clonedNode;
938 - }
939 - function ensureSVGSymbols(_x11, _x12) {
940 - return _ensureSVGSymbols.apply(this, arguments);
941 - }
942 - function _ensureSVGSymbols() {
943 - _ensureSVGSymbols = _asyncToGenerator(function* (clone, options) {
944 - const uses = clone.querySelectorAll ? clone.querySelectorAll("use") : [];
945 - if (uses.length === 0) return clone;
946 - const processedDefs = {};
947 - for (let i = 0; i < uses.length; i++) {
948 - const id = uses[i].getAttribute("xlink:href");
949 - if (id) {
950 - const exist = clone.querySelector(id);
951 - const definition = document.querySelector(id);
952 - if (!exist && definition && !processedDefs[id]) processedDefs[id] = yield cloneNode(definition, options, true);
953 - }
954 - }
955 - const nodes = Object.values(processedDefs);
956 - if (nodes.length) {
957 - const ns = "http://www.w3.org/1999/xhtml";
958 - const svg = document.createElementNS(ns, "svg");
959 - svg.setAttribute("xmlns", ns);
960 - svg.style.position = "absolute";
961 - svg.style.width = "0";
962 - svg.style.height = "0";
963 - svg.style.overflow = "hidden";
964 - svg.style.display = "none";
965 - const defs = document.createElementNS(ns, "defs");
966 - svg.appendChild(defs);
967 - for (let i = 0; i < nodes.length; i++) defs.appendChild(nodes[i]);
968 - clone.appendChild(svg);
969 - }
970 - return clone;
971 - });
972 - return _ensureSVGSymbols.apply(this, arguments);
973 - }
974 - function cloneNode(_x13, _x14, _x15) {
975 - return _cloneNode.apply(this, arguments);
976 - }
977 - function _cloneNode() {
978 - _cloneNode = _asyncToGenerator(function* (node, options, isRoot) {
979 - if (!isRoot && options.filter && !options.filter(node)) return null;
980 - return Promise.resolve(node).then((clonedNode) => cloneSingleNode(clonedNode, options)).then((clonedNode) => cloneChildren(node, clonedNode, options)).then((clonedNode) => decorate(node, clonedNode, options)).then((clonedNode) => ensureSVGSymbols(clonedNode, options));
981 - });
982 - return _cloneNode.apply(this, arguments);
983 - }
186 +/***/ }),
984 187
985 -//#endregion
986 -//#region node_modules/html-to-image/es/embed-resources.js
987 - var URL_REGEX = /url\((['"]?)([^'"]+?)\1\)/g;
988 - var URL_WITH_FORMAT_REGEX = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g;
989 - var FONT_SRC_REGEX = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
990 - function toRegex(url) {
991 - const escaped = url.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
992 - return new RegExp(`(url\\(['"]?)(${escaped})(['"]?\\))`, "g");
993 - }
994 - function parseURLs(cssText) {
995 - const urls = [];
996 - cssText.replace(URL_REGEX, (raw, quotation, url) => {
997 - urls.push(url);
998 - return raw;
999 - });
1000 - return urls.filter((url) => !isDataUrl(url));
1001 - }
1002 - function embed(_x, _x2, _x3, _x4, _x5) {
1003 - return _embed.apply(this, arguments);
1004 - }
1005 - function _embed() {
1006 - _embed = _asyncToGenerator(function* (cssText, resourceURL, baseURL, options, getContentFromUrl) {
1007 - try {
1008 - const resolvedURL = baseURL ? resolveUrl(resourceURL, baseURL) : resourceURL;
1009 - const contentType = getMimeType(resourceURL);
1010 - let dataURL;
1011 - if (getContentFromUrl) dataURL = makeDataUrl(yield getContentFromUrl(resolvedURL), contentType);
1012 - else dataURL = yield resourceToDataURL(resolvedURL, contentType, options);
1013 - return cssText.replace(toRegex(resourceURL), `$1${dataURL}$3`);
1014 - } catch (error) {}
1015 - return cssText;
1016 - });
1017 - return _embed.apply(this, arguments);
1018 - }
1019 - function filterPreferredFontFormat(str, { preferredFontFormat }) {
1020 - return !preferredFontFormat ? str : str.replace(FONT_SRC_REGEX, (match) => {
1021 - while (true) {
1022 - const [src, , format] = URL_WITH_FORMAT_REGEX.exec(match) || [];
1023 - if (!format) return "";
1024 - if (format === preferredFontFormat) return `src: ${src};`;
1025 - }
1026 - });
1027 - }
1028 - function shouldEmbed(url) {
1029 - return url.search(URL_REGEX) !== -1;
1030 - }
1031 - function embedResources(_x6, _x7, _x8) {
1032 - return _embedResources.apply(this, arguments);
1033 - }
1034 - function _embedResources() {
1035 - _embedResources = _asyncToGenerator(function* (cssText, baseUrl, options) {
1036 - if (!shouldEmbed(cssText)) return cssText;
1037 - const filteredCSSText = filterPreferredFontFormat(cssText, options);
1038 - return parseURLs(filteredCSSText).reduce((deferred, url) => deferred.then((css) => embed(css, url, baseUrl, options)), Promise.resolve(filteredCSSText));
1039 - });
1040 - return _embedResources.apply(this, arguments);
1041 - }
188 +/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js":
189 +/*!*******************************************************************!*\
190 + !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
191 + \*******************************************************************/
192 +/***/ ((module) => {
1042 193
1043 -//#endregion
1044 -//#region node_modules/html-to-image/es/embed-images.js
1045 - function embedProp(_x, _x2, _x3) {
1046 - return _embedProp.apply(this, arguments);
1047 - }
1048 - function _embedProp() {
1049 - _embedProp = _asyncToGenerator(function* (propName, node, options) {
1050 - var _a;
1051 - const propValue = (_a = node.style) === null || _a === void 0 ? void 0 : _a.getPropertyValue(propName);
1052 - if (propValue) {
1053 - const cssString = yield embedResources(propValue, null, options);
1054 - node.style.setProperty(propName, cssString, node.style.getPropertyPriority(propName));
1055 - return true;
1056 - }
1057 - return false;
1058 - });
1059 - return _embedProp.apply(this, arguments);
1060 - }
1061 - function embedBackground(_x4, _x5) {
1062 - return _embedBackground.apply(this, arguments);
1063 - }
1064 - function _embedBackground() {
1065 - _embedBackground = _asyncToGenerator(function* (clonedNode, options) {
1066 - (yield embedProp("background", clonedNode, options)) || (yield embedProp("background-image", clonedNode, options));
1067 - (yield embedProp("mask", clonedNode, options)) || (yield embedProp("-webkit-mask", clonedNode, options)) || (yield embedProp("mask-image", clonedNode, options)) || (yield embedProp("-webkit-mask-image", clonedNode, options));
1068 - });
1069 - return _embedBackground.apply(this, arguments);
1070 - }
1071 - function embedImageNode(_x6, _x7) {
1072 - return _embedImageNode.apply(this, arguments);
1073 - }
1074 - function _embedImageNode() {
1075 - _embedImageNode = _asyncToGenerator(function* (clonedNode, options) {
1076 - const isImageElement = isInstanceOfElement(clonedNode, HTMLImageElement);
1077 - if (!(isImageElement && !isDataUrl(clonedNode.src)) && !(isInstanceOfElement(clonedNode, SVGImageElement) && !isDataUrl(clonedNode.href.baseVal))) return;
1078 - const url = isImageElement ? clonedNode.src : clonedNode.href.baseVal;
1079 - const dataURL = yield resourceToDataURL(url, getMimeType(url), options);
1080 - yield new Promise((resolve, reject) => {
1081 - clonedNode.onload = resolve;
1082 - clonedNode.onerror = options.onImageErrorHandler ? (...attributes) => {
1083 - try {
1084 - resolve(options.onImageErrorHandler(...attributes));
1085 - } catch (error) {
1086 - reject(error);
1087 - }
1088 - } : reject;
1089 - const image = clonedNode;
1090 - if (image.decode) image.decode = resolve;
1091 - if (image.loading === "lazy") image.loading = "eager";
1092 - if (isImageElement) {
1093 - clonedNode.srcset = "";
1094 - clonedNode.src = dataURL;
1095 - } else clonedNode.href.baseVal = dataURL;
1096 - });
1097 - });
1098 - return _embedImageNode.apply(this, arguments);
1099 - }
1100 - function embedChildren(_x8, _x9) {
1101 - return _embedChildren.apply(this, arguments);
1102 - }
1103 - function _embedChildren() {
1104 - _embedChildren = _asyncToGenerator(function* (clonedNode, options) {
1105 - const deferreds = toArray(clonedNode.childNodes).map((child) => embedImages(child, options));
1106 - yield Promise.all(deferreds).then(() => clonedNode);
1107 - });
1108 - return _embedChildren.apply(this, arguments);
1109 - }
1110 - function embedImages(_x10, _x11) {
1111 - return _embedImages.apply(this, arguments);
1112 - }
1113 - function _embedImages() {
1114 - _embedImages = _asyncToGenerator(function* (clonedNode, options) {
1115 - if (isInstanceOfElement(clonedNode, Element)) {
1116 - yield embedBackground(clonedNode, options);
1117 - yield embedImageNode(clonedNode, options);
1118 - yield embedChildren(clonedNode, options);
1119 - }
1120 - });
1121 - return _embedImages.apply(this, arguments);
1122 - }
194 +function _nonIterableSpread() {
195 + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
196 +}
197 +module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
1123 198
1124 -//#endregion
1125 -//#region node_modules/html-to-image/es/apply-style.js
1126 - function applyStyle(node, options) {
1127 - const { style } = node;
1128 - if (options.backgroundColor) style.backgroundColor = options.backgroundColor;
1129 - if (options.width) style.width = `${options.width}px`;
1130 - if (options.height) style.height = `${options.height}px`;
1131 - const manual = options.style;
1132 - if (manual != null) Object.keys(manual).forEach((key) => {
1133 - style[key] = manual[key];
1134 - });
1135 - return node;
1136 - }
199 +/***/ }),
1137 200
1138 -//#endregion
1139 -//#region node_modules/html-to-image/es/embed-webfonts.js
1140 - var cssFetchCache = {};
1141 - function fetchCSS(_x) {
1142 - return _fetchCSS.apply(this, arguments);
1143 - }
1144 - function _fetchCSS() {
1145 - _fetchCSS = _asyncToGenerator(function* (url) {
1146 - let cache = cssFetchCache[url];
1147 - if (cache != null) return cache;
1148 - cache = {
1149 - url,
1150 - cssText: yield (yield fetch(url)).text()
1151 - };
1152 - cssFetchCache[url] = cache;
1153 - return cache;
1154 - });
1155 - return _fetchCSS.apply(this, arguments);
1156 - }
1157 - function embedFonts(_x3, _x4) {
1158 - return _embedFonts.apply(this, arguments);
1159 - }
1160 - function _embedFonts() {
1161 - _embedFonts = _asyncToGenerator(function* (data, options) {
1162 - let cssText = data.cssText;
1163 - const regexUrl = /url\(["']?([^"')]+)["']?\)/g;
1164 - const loadFonts = (cssText.match(/url\([^)]+\)/g) || []).map(function() {
1165 - var _ref = _asyncToGenerator(function* (loc) {
1166 - let url = loc.replace(regexUrl, "$1");
1167 - if (!url.startsWith("https://")) url = new URL(url, data.url).href;
1168 - return fetchAsDataURL(url, options.fetchRequestInit, ({ result }) => {
1169 - cssText = cssText.replace(loc, `url(${result})`);
1170 - return [loc, result];
1171 - });
1172 - });
1173 - return function(_x2) {
1174 - return _ref.apply(this, arguments);
1175 - };
1176 - }());
1177 - return Promise.all(loadFonts).then(() => cssText);
1178 - });
1179 - return _embedFonts.apply(this, arguments);
1180 - }
1181 - function parseCSS(source) {
1182 - if (source == null) return [];
1183 - const result = [];
1184 - let cssText = source.replace(/(\/\*[\s\S]*?\*\/)/gi, "");
1185 - const keyframesRegex = /* @__PURE__ */ new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
1186 - while (true) {
1187 - const matches = keyframesRegex.exec(cssText);
1188 - if (matches === null) break;
1189 - result.push(matches[0]);
1190 - }
1191 - cssText = cssText.replace(keyframesRegex, "");
1192 - const importRegex = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi;
1193 - const unifiedRegex = /* @__PURE__ */ new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", "gi");
1194 - while (true) {
1195 - let matches = importRegex.exec(cssText);
1196 - if (matches === null) {
1197 - matches = unifiedRegex.exec(cssText);
1198 - if (matches === null) break;
1199 - else importRegex.lastIndex = unifiedRegex.lastIndex;
1200 - } else unifiedRegex.lastIndex = importRegex.lastIndex;
1201 - result.push(matches[0]);
1202 - }
1203 - return result;
1204 - }
1205 - function getCSSRules(_x5, _x6) {
1206 - return _getCSSRules.apply(this, arguments);
1207 - }
1208 - function _getCSSRules() {
1209 - _getCSSRules = _asyncToGenerator(function* (styleSheets, options) {
1210 - const ret = [];
1211 - const deferreds = [];
1212 - styleSheets.forEach((sheet) => {
1213 - if ("cssRules" in sheet) try {
1214 - toArray(sheet.cssRules || []).forEach((item, index) => {
1215 - if (item.type === CSSRule.IMPORT_RULE) {
1216 - let importIndex = index + 1;
1217 - const url = item.href;
1218 - const deferred = fetchCSS(url).then((metadata) => embedFonts(metadata, options)).then((cssText) => parseCSS(cssText).forEach((rule) => {
1219 - try {
1220 - sheet.insertRule(rule, rule.startsWith("@import") ? importIndex += 1 : sheet.cssRules.length);
1221 - } catch (error) {
1222 - console.error("Error inserting rule from remote css", {
1223 - rule,
1224 - error
1225 - });
1226 - }
1227 - })).catch((e) => {
1228 - console.error("Error loading remote css", e.toString());
1229 - });
1230 - deferreds.push(deferred);
1231 - }
1232 - });
1233 - } catch (e) {
1234 - const inline = styleSheets.find((a) => a.href == null) || document.styleSheets[0];
1235 - if (sheet.href != null) deferreds.push(fetchCSS(sheet.href).then((metadata) => embedFonts(metadata, options)).then((cssText) => parseCSS(cssText).forEach((rule) => {
1236 - inline.insertRule(rule, inline.cssRules.length);
1237 - })).catch((err) => {
1238 - console.error("Error loading remote stylesheet", err);
1239 - }));
1240 - console.error("Error inlining remote css file", e);
1241 - }
1242 - });
1243 - return Promise.all(deferreds).then(() => {
1244 - styleSheets.forEach((sheet) => {
1245 - if ("cssRules" in sheet) try {
1246 - toArray(sheet.cssRules || []).forEach((item) => {
1247 - ret.push(item);
1248 - });
1249 - } catch (e) {
1250 - console.error(`Error while reading CSS rules from ${sheet.href}`, e);
1251 - }
1252 - });
1253 - return ret;
1254 - });
1255 - });
1256 - return _getCSSRules.apply(this, arguments);
1257 - }
1258 - function getWebFontRules(cssRules) {
1259 - return cssRules.filter((rule) => rule.type === CSSRule.FONT_FACE_RULE).filter((rule) => shouldEmbed(rule.style.getPropertyValue("src")));
1260 - }
1261 - function parseWebFontRules(_x7, _x8) {
1262 - return _parseWebFontRules.apply(this, arguments);
1263 - }
1264 - function _parseWebFontRules() {
1265 - _parseWebFontRules = _asyncToGenerator(function* (node, options) {
1266 - if (node.ownerDocument == null) throw new Error("Provided element is not within a Document");
1267 - return getWebFontRules(yield getCSSRules(toArray(node.ownerDocument.styleSheets), options));
1268 - });
1269 - return _parseWebFontRules.apply(this, arguments);
1270 - }
1271 - function normalizeFontFamily(font) {
1272 - return font.trim().replace(/["']/g, "");
1273 - }
1274 - function getUsedFonts(node) {
1275 - const fonts = /* @__PURE__ */ new Set();
1276 - function traverse(node) {
1277 - (node.style.fontFamily || getComputedStyle(node).fontFamily).split(",").forEach((font) => {
1278 - fonts.add(normalizeFontFamily(font));
1279 - });
1280 - Array.from(node.children).forEach((child) => {
1281 - if (child instanceof HTMLElement) traverse(child);
1282 - });
1283 - }
1284 - traverse(node);
1285 - return fonts;
1286 - }
1287 - function getWebFontCSS(_x9, _x10) {
1288 - return _getWebFontCSS.apply(this, arguments);
1289 - }
1290 - function _getWebFontCSS() {
1291 - _getWebFontCSS = _asyncToGenerator(function* (node, options) {
1292 - const rules = yield parseWebFontRules(node, options);
1293 - const usedFonts = getUsedFonts(node);
1294 - return (yield Promise.all(rules.filter((rule) => usedFonts.has(normalizeFontFamily(rule.style.fontFamily))).map((rule) => {
1295 - const baseUrl = rule.parentStyleSheet ? rule.parentStyleSheet.href : null;
1296 - return embedResources(rule.cssText, baseUrl, options);
1297 - }))).join("\n");
1298 - });
1299 - return _getWebFontCSS.apply(this, arguments);
1300 - }
1301 - function embedWebFonts(_x11, _x12) {
1302 - return _embedWebFonts.apply(this, arguments);
1303 - }
1304 - function _embedWebFonts() {
1305 - _embedWebFonts = _asyncToGenerator(function* (clonedNode, options) {
1306 - const cssText = options.fontEmbedCSS != null ? options.fontEmbedCSS : options.skipFonts ? null : yield getWebFontCSS(clonedNode, options);
1307 - if (cssText) {
1308 - const styleNode = document.createElement("style");
1309 - const sytleContent = document.createTextNode(cssText);
1310 - styleNode.appendChild(sytleContent);
1311 - if (clonedNode.firstChild) clonedNode.insertBefore(styleNode, clonedNode.firstChild);
1312 - else clonedNode.appendChild(styleNode);
1313 - }
1314 - });
1315 - return _embedWebFonts.apply(this, arguments);
1316 - }
201 +/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
202 +/*!***************************************************************************!*\
203 + !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
204 + \***************************************************************************/
205 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1317 206
1318 -//#endregion
1319 -//#region node_modules/html-to-image/es/index.js
1320 - function toSvg(_x) {
1321 - return _toSvg.apply(this, arguments);
1322 - }
1323 - function _toSvg() {
1324 - _toSvg = _asyncToGenerator(function* (node, options = {}) {
1325 - const { width, height } = getImageSize(node, options);
1326 - const clonedNode = yield cloneNode(node, options, true);
1327 - yield embedWebFonts(clonedNode, options);
1328 - yield embedImages(clonedNode, options);
1329 - applyStyle(clonedNode, options);
1330 - return yield nodeToDataURL(clonedNode, width, height);
1331 - });
1332 - return _toSvg.apply(this, arguments);
1333 - }
1334 - function toCanvas(_x2) {
1335 - return _toCanvas.apply(this, arguments);
1336 - }
1337 - function _toCanvas() {
1338 - _toCanvas = _asyncToGenerator(function* (node, options = {}) {
1339 - const { width, height } = getImageSize(node, options);
1340 - const img = yield createImage(yield toSvg(node, options));
1341 - const canvas = document.createElement("canvas");
1342 - const context = canvas.getContext("2d");
1343 - const ratio = options.pixelRatio || getPixelRatio();
1344 - const canvasWidth = options.canvasWidth || width;
1345 - const canvasHeight = options.canvasHeight || height;
1346 - canvas.width = canvasWidth * ratio;
1347 - canvas.height = canvasHeight * ratio;
1348 - if (!options.skipAutoScale) checkCanvasDimensions(canvas);
1349 - canvas.style.width = `${canvasWidth}`;
1350 - canvas.style.height = `${canvasHeight}`;
1351 - if (options.backgroundColor) {
1352 - context.fillStyle = options.backgroundColor;
1353 - context.fillRect(0, 0, canvas.width, canvas.height);
1354 - }
1355 - context.drawImage(img, 0, 0, canvas.width, canvas.height);
1356 - return canvas;
1357 - });
1358 - return _toCanvas.apply(this, arguments);
1359 - }
207 +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
208 +var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js");
209 +function _possibleConstructorReturn(t, e) {
210 + if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
211 + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
212 + return assertThisInitialized(t);
213 +}
214 +module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
1360 215
1361 -//#endregion
1362 -//#region modules/cloud-library/assets/js/preview/screenshot.js
1363 - function ownKeys(e, r) {
1364 - var t = Object.keys(e);
1365 - if (Object.getOwnPropertySymbols) {
1366 - var o = Object.getOwnPropertySymbols(e);
1367 - r && (o = o.filter(function(r) {
1368 - return Object.getOwnPropertyDescriptor(e, r).enumerable;
1369 - })), t.push.apply(t, o);
1370 - }
1371 - return t;
1372 - }
1373 - function _objectSpread(e) {
1374 - for (var r = 1; r < arguments.length; r++) {
1375 - var t = null != arguments[r] ? arguments[r] : {};
1376 - r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
1377 - _defineProperty(e, r, t[r]);
1378 - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
1379 - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
1380 - });
1381 - }
1382 - return e;
1383 - }
1384 - function _callSuper(t, o, e) {
1385 - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
1386 - }
1387 - function _isNativeReflectConstruct() {
1388 - try {
1389 - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1390 - } catch (t) {}
1391 - return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
1392 - return !!t;
1393 - })();
1394 - }
1395 - function _superPropGet(t, o, e, r) {
1396 - var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e);
1397 - return 2 & r && "function" == typeof p ? function(t) {
1398 - return p.apply(e, t);
1399 - } : p;
1400 - }
1401 - var Screenshot = /*#__PURE__*/ function(_elementorModules$Vie) {
1402 - function Screenshot() {
1403 - _classCallCheck(this, Screenshot);
1404 - return _callSuper(this, Screenshot, arguments);
1405 - }
1406 - _inherits(Screenshot, _elementorModules$Vie);
1407 - return _createClass(Screenshot, [
1408 - {
1409 - key: "getDefaultSettings",
1410 - value: function getDefaultSettings() {
1411 - return _objectSpread({
1412 - timeout: 15e3,
1413 - render_timeout: 5e3,
1414 - image_quality: .15,
1415 - image_placeholder: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="
1416 - }, ElementorScreenshotConfig);
1417 - }
1418 - },
1419 - {
1420 - key: "getDefaultElements",
1421 - value: function getDefaultElements() {
1422 - return { $elementor: jQuery(ElementorScreenshotConfig.selector) };
1423 - }
1424 - },
1425 - {
1426 - key: "onInit",
1427 - value: function onInit() {
1428 - var _this = this;
1429 - _superPropGet(Screenshot, "onInit", this, 3)([]);
1430 - /**
1431 - * Hold the timeout timer
1432 - *
1433 - * @type {number|null}
1434 - */
1435 - this.timeoutTimer = setTimeout(function() {
1436 - _this.screenshotFailed(/* @__PURE__ */ new Error("Screenshot timeout reached"));
1437 - }, this.getSettings("timeout"));
1438 - return this.captureScreenshot();
1439 - }
1440 - },
1441 - {
1442 - key: "captureScreenshot",
1443 - value: function captureScreenshot() {
1444 - var _this2 = this;
1445 - return Promise.resolve().then(function() {
1446 - return _this2.createImage();
1447 - }).then(function(imageData) {
1448 - return _this2.save(imageData);
1449 - }).then(function(url) {
1450 - return _this2.screenshotSucceed(url);
1451 - }).catch(function(error) {
1452 - return _this2.screenshotFailed(error);
1453 - });
1454 - }
1455 - },
1456 - {
1457 - key: "createImage",
1458 - value: function() {
1459 - var _createImage = _asyncToGenerator$1(/*#__PURE__*/ import_regenerator.default.mark(function _callee() {
1460 - var _this3 = this;
1461 - var pageLoadedPromise;
1462 - var timeOutPromise;
1463 - var $elementorElement;
1464 - var bodyStyle;
1465 - var bodyBackgroundColor;
1466 - var canvas;
1467 - return import_regenerator.default.wrap(function(_context) {
1468 - while (1) switch (_context.prev = _context.next) {
1469 - case 0:
1470 - pageLoadedPromise = new Promise(function(resolve) {
1471 - window.addEventListener("load", function() {
1472 - return resolve();
1473 - });
1474 - });
1475 - timeOutPromise = new Promise(function(resolve) {
1476 - setTimeout(function() {
1477 - return resolve();
1478 - }, _this3.getSettings("render_timeout"));
1479 - });
1480 - _context.next = 1;
1481 - return Promise.race([pageLoadedPromise, timeOutPromise]);
1482 - case 1:
1483 - $elementorElement = this.elements.$elementor;
1484 - if (!$elementorElement.length) $elementorElement = jQuery(ElementorScreenshotConfig.selector);
1485 - if (!$elementorElement.length) $elementorElement = jQuery("body > div.elementor:not(.elementor-location-header):not(.elementor-location-footer)");
1486 - if ($elementorElement.length) {
1487 - _context.next = 2;
1488 - break;
1489 - }
1490 - throw new Error("Elementor container not found. Selector: " + ElementorScreenshotConfig.selector);
1491 - case 2:
1492 - this.preprocessLazyImages($elementorElement);
1493 - bodyStyle = window.getComputedStyle(document.body);
1494 - bodyBackgroundColor = bodyStyle.backgroundColor;
1495 - _context.next = 3;
1496 - return toCanvas($elementorElement[0], {
1497 - quality: this.getSettings("image_quality"),
1498 - imagePlaceholder: this.getSettings("image_placeholder"),
1499 - backgroundColor: bodyBackgroundColor || null,
1500 - style: {
1501 - transform: "scale(1)",
1502 - transformOrigin: "top left"
1503 - }
1504 - });
1505 - case 3:
1506 - canvas = _context.sent;
1507 - return _context.abrupt("return", canvas.toDataURL("image/webp", this.getSettings("image_quality")));
1508 - case 4:
1509 - case "end": return _context.stop();
1510 - }
1511 - }, _callee, this);
1512 - }));
1513 - function createImage() {
1514 - return _createImage.apply(this, arguments);
1515 - }
1516 - return createImage;
1517 - }()
1518 - },
1519 - {
1520 - key: "preprocessLazyImages",
1521 - value: function preprocessLazyImages($element) {
1522 - $element.find("img[data-src], img.swiper-lazy, img.lazy").each(function(index, img) {
1523 - var $img = jQuery(img);
1524 - if ($img.attr("data-src")) {
1525 - $img.attr("src", $img.attr("data-src"));
1526 - $img.removeAttr("data-src");
1527 - }
1528 - $img.removeClass("swiper-lazy lazy swiper-slide-image");
1529 - $img.removeAttr("loading");
1530 - $img.removeAttr("data-srcset");
1531 - });
1532 - }
1533 - },
1534 - {
1535 - key: "save",
1536 - value: function save(dataUrl) {
1537 - var _this$getSaveAction = this.getSaveAction();
1538 - var key = _this$getSaveAction.key;
1539 - var action = _this$getSaveAction.action;
1540 - var data = _defineProperty(_defineProperty({}, key, this.getSettings(key)), "screenshot", dataUrl);
1541 - return new Promise(function(resolve, reject) {
1542 - if ("kit_id" === key) return resolve(data.screenshot);
1543 - elementorCommon.ajax.addRequest(action, {
1544 - data,
1545 - success: function success(url) {
1546 - return resolve(url);
1547 - },
1548 - error: function error() {
1549 - return reject();
1550 - }
1551 - });
1552 - });
1553 - }
1554 - },
1555 - {
1556 - key: "markAsFailed",
1557 - value: function markAsFailed(e) {
1558 - var _this4 = this;
1559 - return new Promise(function(resolve, reject) {
1560 - var templateId = _this4.getSettings("template_id");
1561 - var postId = _this4.getSettings("post_id");
1562 - if (_this4.getSettings("kit_id")) resolve();
1563 - else {
1564 - var route = templateId ? "template_screenshot_failed" : "screenshot_failed";
1565 - var data = templateId ? {
1566 - template_id: templateId,
1567 - error: e.message || e.toString()
1568 - } : { post_id: postId };
1569 - elementorCommon.ajax.addRequest(route, {
1570 - data,
1571 - success: function success() {
1572 - return resolve();
1573 - },
1574 - error: function error() {
1575 - return reject();
1576 - }
1577 - });
1578 - }
1579 - });
1580 - }
1581 - },
1582 - {
1583 - key: "screenshotSucceed",
1584 - value: function screenshotSucceed(imageUrl) {
1585 - this.screenshotDone(true, imageUrl);
1586 - }
1587 - },
1588 - {
1589 - key: "screenshotFailed",
1590 - value: function screenshotFailed(e) {
1591 - var _this5 = this;
1592 - this.markAsFailed(e).then(function() {
1593 - return _this5.screenshotDone(false);
1594 - });
1595 - }
1596 - },
1597 - {
1598 - key: "screenshotDone",
1599 - value: function screenshotDone(success) {
1600 - var imageUrl = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
1601 - clearTimeout(this.timeoutTimer);
1602 - this.timeoutTimer = null;
1603 - var _this$getSaveAction2 = this.getSaveAction();
1604 - var message = _this$getSaveAction2.message;
1605 - var key = _this$getSaveAction2.key;
1606 - window.parent.postMessage({
1607 - name: message,
1608 - success,
1609 - id: this.getSettings(key),
1610 - imageUrl
1611 - }, "*");
1612 - }
1613 - },
1614 - {
1615 - key: "getSaveAction",
1616 - value: function getSaveAction() {
1617 - var config = this.getSettings();
1618 - if (config.kit_id) return {
1619 - message: "kit-screenshot-done",
1620 - action: "update_kit_preview",
1621 - key: "kit_id"
1622 - };
1623 - if (config.template_id) return {
1624 - message: "library/capture-screenshot-done",
1625 - action: "save_template_screenshot",
1626 - key: "template_id"
1627 - };
1628 - return {
1629 - message: "capture-screenshot-done",
1630 - action: "screenshot_save",
1631 - key: "post_id"
1632 - };
1633 - }
1634 - }
1635 - ]);
1636 - }(elementorModules.ViewModule);
1637 - jQuery(function() {
1638 - new Screenshot();
1639 - });
216 +/***/ }),
1640 217
1641 -//#endregion
218 +/***/ "../node_modules/@babel/runtime/helpers/readOnlyError.js":
219 +/*!***************************************************************!*\
220 + !*** ../node_modules/@babel/runtime/helpers/readOnlyError.js ***!
221 + \***************************************************************/
222 +/***/ ((module) => {
223 +
224 +function _readOnlyError(r) {
225 + throw new TypeError('"' + r + '" is read-only');
226 +}
227 +module.exports = _readOnlyError, module.exports.__esModule = true, module.exports["default"] = module.exports;
228 +
229 +/***/ }),
230 +
231 +/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js":
232 +/*!****************************************************************!*\
233 + !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
234 + \****************************************************************/
235 +/***/ ((module) => {
236 +
237 +function _setPrototypeOf(t, e) {
238 + return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
239 + return t.__proto__ = e, t;
240 + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e);
241 +}
242 +module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
243 +
244 +/***/ }),
245 +
246 +/***/ "../node_modules/@babel/runtime/helpers/superPropBase.js":
247 +/*!***************************************************************!*\
248 + !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***!
249 + \***************************************************************/
250 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
251 +
252 +var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
253 +function _superPropBase(t, o) {
254 + for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t)););
255 + return t;
256 +}
257 +module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports;
258 +
259 +/***/ }),
260 +
261 +/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js":
262 +/*!*******************************************************************!*\
263 + !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
264 + \*******************************************************************/
265 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
266 +
267 +var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js");
268 +var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js");
269 +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
270 +var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js");
271 +function _toConsumableArray(r) {
272 + return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();
273 +}
274 +module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
275 +
276 +/***/ }),
277 +
278 +/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js":
279 +/*!*************************************************************!*\
280 + !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***!
281 + \*************************************************************/
282 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
283 +
284 +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
285 +function toPrimitive(t, r) {
286 + if ("object" != _typeof(t) || !t) return t;
287 + var e = t[Symbol.toPrimitive];
288 + if (void 0 !== e) {
289 + var i = e.call(t, r || "default");
290 + if ("object" != _typeof(i)) return i;
291 + throw new TypeError("@@toPrimitive must return a primitive value.");
292 + }
293 + return ("string" === r ? String : Number)(t);
294 +}
295 +module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
296 +
297 +/***/ }),
298 +
299 +/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js":
300 +/*!***************************************************************!*\
301 + !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
302 + \***************************************************************/
303 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
304 +
305 +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
306 +var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js");
307 +function toPropertyKey(t) {
308 + var i = toPrimitive(t, "string");
309 + return "symbol" == _typeof(i) ? i : i + "";
310 +}
311 +module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
312 +
313 +/***/ }),
314 +
315 +/***/ "../node_modules/@babel/runtime/helpers/typeof.js":
316 +/*!********************************************************!*\
317 + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
318 + \********************************************************/
319 +/***/ ((module) => {
320 +
321 +function _typeof(o) {
322 + "@babel/helpers - typeof";
323 +
324 + return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
325 + return typeof o;
326 + } : function (o) {
327 + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
328 + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
329 +}
330 +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
331 +
332 +/***/ }),
333 +
334 +/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
335 +/*!****************************************************************************!*\
336 + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
337 + \****************************************************************************/
338 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
339 +
340 +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
341 +function _unsupportedIterableToArray(r, a) {
342 + if (r) {
343 + if ("string" == typeof r) return arrayLikeToArray(r, a);
344 + var t = {}.toString.call(r).slice(8, -1);
345 + 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;
346 + }
347 +}
348 +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
349 +
350 +/***/ })
351 +
352 +/******/ });
353 +/************************************************************************/
354 +/******/ // The module cache
355 +/******/ var __webpack_module_cache__ = {};
356 +/******/
357 +/******/ // The require function
358 +/******/ function __webpack_require__(moduleId) {
359 +/******/ // Check if module is in cache
360 +/******/ var cachedModule = __webpack_module_cache__[moduleId];
361 +/******/ if (cachedModule !== undefined) {
362 +/******/ return cachedModule.exports;
363 +/******/ }
364 +/******/ // Create a new module (and put it into the cache)
365 +/******/ var module = __webpack_module_cache__[moduleId] = {
366 +/******/ // no module.id needed
367 +/******/ // no module.loaded needed
368 +/******/ exports: {}
369 +/******/ };
370 +/******/
371 +/******/ // Execute the module function
372 +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
373 +/******/
374 +/******/ // Return the exports of the module
375 +/******/ return module.exports;
376 +/******/ }
377 +/******/
378 +/************************************************************************/
379 +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
380 +(() => {
381 +"use strict";
382 +/*!****************************************************************!*\
383 + !*** ../modules/cloud-library/assets/js/preview/screenshot.js ***!
384 + \****************************************************************/
385 +
386 +
387 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
388 +var _readOnlyError2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/readOnlyError */ "../node_modules/@babel/runtime/helpers/readOnlyError.js"));
389 +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js"));
390 +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
391 +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
392 +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
393 +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
394 +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
395 +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
396 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
397 +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; }
398 +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; }
399 +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)); }
400 +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
401 +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; }
402 +/* global ElementorScreenshotConfig */
403 +var Screenshot = /*#__PURE__*/function (_elementorModules$Vie) {
404 + function Screenshot() {
405 + (0, _classCallCheck2.default)(this, Screenshot);
406 + return _callSuper(this, Screenshot, arguments);
407 + }
408 + (0, _inherits2.default)(Screenshot, _elementorModules$Vie);
409 + return (0, _createClass2.default)(Screenshot, [{
410 + key: "getDefaultSettings",
411 + value: function getDefaultSettings() {
412 + var _ElementorScreenshotC, _ElementorScreenshotC2;
413 + return _objectSpread({
414 + empty_content_headline: 'Empty Content.',
415 + crop: {
416 + width: ((_ElementorScreenshotC = ElementorScreenshotConfig) === null || _ElementorScreenshotC === void 0 || (_ElementorScreenshotC = _ElementorScreenshotC.crop) === null || _ElementorScreenshotC === void 0 ? void 0 : _ElementorScreenshotC.width) || 1200,
417 + height: ((_ElementorScreenshotC2 = ElementorScreenshotConfig) === null || _ElementorScreenshotC2 === void 0 || (_ElementorScreenshotC2 = _ElementorScreenshotC2.crop) === null || _ElementorScreenshotC2 === void 0 ? void 0 : _ElementorScreenshotC2.height) || 1500
418 + },
419 + excluded_external_css_urls: ['https://kit-pro.fontawesome.com'],
420 + external_images_urls: ['https://i.ytimg.com' // Youtube images domain.
421 + ],
422 + timeout: 15000,
423 + // Wait until screenshot taken or fail in 15 secs.
424 + render_timeout: 5000,
425 + // Wait until all the element will be loaded or 5 sec and then take screenshot.
426 + timerLabel: null,
427 + timer_label: "".concat(ElementorScreenshotConfig.post_id, " - timer"),
428 + image_placeholder: 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=',
429 + isDebug: elementorCommonConfig.isElementorDebug,
430 + isDebugSvg: false
431 + }, ElementorScreenshotConfig);
432 + }
433 + }, {
434 + key: "getDefaultElements",
435 + value: function getDefaultElements() {
436 + var $elementor = jQuery(ElementorScreenshotConfig.selector);
437 + var $sections = $elementor.find('.elementor-section-wrap > .elementor-section, .elementor > .elementor-section');
438 + return {
439 + $elementor: $elementor,
440 + $sections: $sections,
441 + $firstSection: $sections.first(),
442 + $notElementorElements: elementorCommon.elements.$body.find('> *:not(style, link)').not($elementor),
443 + $head: jQuery('head')
444 + };
445 + }
446 + }, {
447 + key: "onInit",
448 + value: function onInit() {
449 + _superPropGet(Screenshot, "onInit", this, 3)([]);
450 + this.log('Screenshot init', 'time');
451 +
452 + /**
453 + * Hold the timeout timer
454 + *
455 + * @type {number|null}
456 + */
457 + this.timeoutTimer = setTimeout(this.screenshotFailed.bind(this), this.getSettings('timeout'));
458 + return this.captureScreenshot();
459 + }
460 +
461 + /**
462 + * The main method for this class.
463 + */
464 + }, {
465 + key: "captureScreenshot",
466 + value: function captureScreenshot() {
467 + if (!this.elements.$elementor.length && !this.getSettings('kit_id')) {
468 + elementorCommon.helpers.consoleWarn('Screenshots: The content of this page is empty, the module will create a fake conent just for this screenshot.');
469 + this.createFakeContent();
470 + }
471 + this.removeUnnecessaryElements();
472 + this.handleIFrames();
473 + this.removeFirstSectionMargin();
474 + this.handleLinks();
475 + this.loadExternalCss();
476 + this.loadExternalImages();
477 + return Promise.resolve().then(this.createImage.bind(this)).then(this.createImageElement.bind(this)).then(this.cropCanvas.bind(this)).then(this.save.bind(this)).then(this.screenshotSucceed.bind(this)).catch(this.screenshotFailed.bind(this));
478 + }
479 +
480 + /**
481 + * Fake content for documents that dont have any content.
482 + */
483 + }, {
484 + key: "createFakeContent",
485 + value: function createFakeContent() {
486 + this.elements.$elementor = jQuery('<div>').css({
487 + height: this.getSettings('crop.height'),
488 + width: this.getSettings('crop.width'),
489 + display: 'flex',
490 + alignItems: 'center',
491 + justifyContent: 'center'
492 + });
493 + this.elements.$elementor.append(jQuery('<h1>').css({
494 + fontSize: '85px'
495 + }).html(this.getSettings('empty_content_headline')));
496 + document.body.prepend(this.elements.$elementor);
497 + }
498 +
499 + /**
500 + * CSS from another server cannot be loaded with the current dom to image library.
501 + * this method take all the links from another domain and proxy them.
502 + */
503 + }, {
504 + key: "loadExternalCss",
505 + value: function loadExternalCss() {
506 + var _this = this;
507 + var excludedUrls = [this.getSettings('home_url')].concat((0, _toConsumableArray2.default)(this.getSettings('excluded_external_css_urls')));
508 + var notSelector = excludedUrls.map(function (url) {
509 + return "[href^=\"".concat(url, "\"]");
510 + }).join(', ');
511 + jQuery('link').not(notSelector).each(function (index, el) {
512 + var $link = jQuery(el),
513 + $newLink = $link.clone();
514 + $newLink.attr('href', _this.getScreenshotProxyUrl($link.attr('href')));
515 + _this.elements.$head.append($newLink);
516 + $link.remove();
517 + });
518 + }
519 +
520 + /**
521 + * Make a proxy to images urls that has some problems with cross origin (like youtube).
522 + */
523 + }, {
524 + key: "loadExternalImages",
525 + value: function loadExternalImages() {
526 + var _this2 = this;
527 + var selector = this.getSettings('external_images_urls').map(function (url) {
528 + return "img[src^=\"".concat(url, "\"]");
529 + }).join(', ');
530 + jQuery(selector).each(function (index, el) {
531 + var $img = jQuery(el);
532 + $img.attr('src', _this2.getScreenshotProxyUrl($img.attr('src')));
533 + });
534 + }
535 +
536 + /**
537 + * Html to images libraries can not snapshot IFrames
538 + * this method convert all the IFrames to some other elements.
539 + */
540 + }, {
541 + key: "handleIFrames",
542 + value: function handleIFrames() {
543 + this.elements.$elementor.find('iframe').each(function (index, el) {
544 + var $iframe = jQuery(el),
545 + $iframeMask = jQuery('<div />', {
546 + css: {
547 + background: 'gray',
548 + width: $iframe.width(),
549 + height: $iframe.height()
550 + }
551 + });
552 + $iframe.before($iframeMask);
553 + $iframe.remove();
554 + });
555 + }
556 +
557 + /**
558 + * Remove all the sections that should not be in the screenshot.
559 + */
560 + }, {
561 + key: "removeUnnecessaryElements",
562 + value: function removeUnnecessaryElements() {
563 + var _this3 = this;
564 + var currentHeight = 0;
565 +
566 + // We need to keep all elements as for Kit we render the entire homepage
567 + if (this.getSettings('kit_id')) {
568 + return;
569 + }
570 + this.elements.$sections.filter(function (index, el) {
571 + var shouldBeRemoved = false;
572 + if (currentHeight >= _this3.getSettings('crop.height')) {
573 + shouldBeRemoved = true;
574 + }
575 + currentHeight += jQuery(el).outerHeight();
576 + return shouldBeRemoved;
577 + }).each(function (index, el) {
578 + el.remove();
579 + });
580 +
581 + // Some 3rd party plugins inject elements into the dom, so this method removes all
582 + // the elements that was injected, to make sure that it capture a screenshot only of the post itself.
583 + this.elements.$notElementorElements.remove();
584 + }
585 +
586 + /**
587 + * Some urls make some problems to the svg parser.
588 + * this method convert all the urls to just '/'.
589 + */
590 + }, {
591 + key: "handleLinks",
592 + value: function handleLinks() {
593 + elementorCommon.elements.$body.find('a').attr('href', '/');
594 + }
595 +
596 + /**
597 + * Remove unnecessary margin from the first element of the post (singles and footers).
598 + */
599 + }, {
600 + key: "removeFirstSectionMargin",
601 + value: function removeFirstSectionMargin() {
602 + this.elements.$firstSection.css({
603 + marginTop: 0
604 + });
605 + }
606 +
607 + /**
608 + * Creates a png image.
609 + *
610 + * @return {Promise<unknown>} URI containing image data
611 + */
612 + }, {
613 + key: "createImage",
614 + value: function createImage() {
615 + var _this4 = this;
616 + var pageLoadedPromise = new Promise(function (resolve) {
617 + window.addEventListener('load', function () {
618 + resolve();
619 + });
620 + });
621 + var timeOutPromise = new Promise(function (resolve) {
622 + setTimeout(function () {
623 + resolve();
624 + }, _this4.getSettings('render_timeout'));
625 + });
626 + return Promise.race([pageLoadedPromise, timeOutPromise]).then(function () {
627 + _this4.log('Start creating screenshot.');
628 + if (_this4.getSettings('isDebugSvg')) {
629 + domtoimage.toSvg(document.body, {
630 + imagePlaceholder: _this4.getSettings('image_placeholder')
631 + }).then(function (svg) {
632 + return _this4.download(svg);
633 + });
634 + return Promise.reject('Debug SVG.');
635 + }
636 +
637 + // TODO: Extract to util function.
638 + var isSafari = /^((?!chrome|android).)*safari/i.test(window.userAgent);
639 +
640 + // Safari browser has some problems with the images that dom-to-images
641 + // library creates, so in this specific case the screenshot uses html2canvas.
642 + // Note that dom-to-image creates more accurate screenshot in "not safari" browsers.
643 + if (isSafari) {
644 + _this4.log('Creating screenshot with "html2canvas"');
645 + return html2canvas(document.body).then(function (canvas) {
646 + return canvas.toDataURL('image/png');
647 + });
648 + }
649 + _this4.log('Creating screenshot with "dom-to-image"');
650 + return domtoimage.toPng(document.body, {
651 + imagePlaceholder: _this4.getSettings('image_placeholder')
652 + }).catch(function () {
653 + return html2canvas(document.body).then(function (canvas) {
654 + return canvas.toDataURL('image/png');
655 + });
656 + });
657 + });
658 + }
659 +
660 + /**
661 + * Download a uri, use for debugging the svg that created from dom to image libraries.
662 + *
663 + * @param {string} uri
664 + */
665 + }, {
666 + key: "download",
667 + value: function download(uri) {
668 + var $link = jQuery('<a/>', {
669 + href: uri,
670 + download: 'debugSvg.svg',
671 + html: 'Download SVG'
672 + });
673 + elementorCommon.elements.$body.append($link);
674 + $link.trigger('click');
675 + }
676 +
677 + /**
678 + * Creates fake image element to get the size of the image later on.
679 + *
680 + * @param {string} dataUrl
681 + * @return {Promise<HTMLImageElement>} Image Element
682 + */
683 + }, {
684 + key: "createImageElement",
685 + value: function createImageElement(dataUrl) {
686 + var image = new Image();
687 + image.src = dataUrl;
688 + return new Promise(function (resolve) {
689 + image.onload = function () {
690 + return resolve(image);
691 + };
692 + });
693 + }
694 +
695 + /**
696 + * Crop the image to requested sizes.
697 + *
698 + * @param {HTMLImageElement} image
699 + * @return {Promise<unknown>} Canvas
700 + */
701 + }, {
702 + key: "cropCanvas",
703 + value: function cropCanvas(image) {
704 + var width = this.getSettings('crop.width');
705 + var height = this.getSettings('crop.height');
706 + var cropCanvas = document.createElement('canvas'),
707 + cropContext = cropCanvas.getContext('2d'),
708 + ratio = width / image.width;
709 + cropCanvas.width = width;
710 + cropCanvas.height = height > image.height ? image.height : height;
711 + cropContext.drawImage(image, 0, 0, image.width, image.height, 0, 0, image.width * ratio, image.height * ratio);
712 + return Promise.resolve(cropCanvas);
713 + }
714 +
715 + /**
716 + * Send the image to the server.
717 + *
718 + * @param {HTMLCanvasElement} canvas
719 + * @return {Promise<unknown>} Screenshot URL
720 + */
721 + }, {
722 + key: "save",
723 + value: function save(canvas) {
724 + var _this5 = this;
725 + var _this$getSaveAction = this.getSaveAction(),
726 + key = _this$getSaveAction.key,
727 + action = _this$getSaveAction.action;
728 + var data = (0, _defineProperty2.default)((0, _defineProperty2.default)({}, key, this.getSettings(key)), "screenshot", canvas.toDataURL('image/png'));
729 + return new Promise(function (resolve, reject) {
730 + if ('kit_id' === key) {
731 + return resolve(data.screenshot);
732 + }
733 + elementorCommon.ajax.addRequest(action, {
734 + data: data,
735 + success: function success(url) {
736 + _this5.log("Screenshot created: ".concat(encodeURI(url)));
737 + resolve(url);
738 + },
739 + error: function error() {
740 + _this5.log('Failed to create screenshot.');
741 + reject();
742 + }
743 + });
744 + });
745 + }
746 +
747 + /**
748 + * Mark this post screenshot as failed.
749 + * @param {Error} e
750 + */
751 + }, {
752 + key: "markAsFailed",
753 + value: function markAsFailed(e) {
754 + var _this6 = this;
755 + return new Promise(function (resolve, reject) {
756 + var templateId = _this6.getSettings('template_id');
757 + var postId = _this6.getSettings('post_id');
758 + var kitId = _this6.getSettings('kit_id');
759 + if (kitId) {
760 + resolve();
761 + } else {
762 + var route = templateId ? 'template_screenshot_failed' : 'screenshot_failed';
763 + var data = templateId ? {
764 + template_id: templateId,
765 + error: e.message || e.toString()
766 + } : {
767 + post_id: postId
768 + };
769 + elementorCommon.ajax.addRequest(route, {
770 + data: data,
771 + success: function success() {
772 + _this6.log("Marked as failed.");
773 + resolve();
774 + },
775 + error: function error() {
776 + _this6.log('Failed to mark this screenshot as failed.');
777 + reject();
778 + }
779 + });
780 + }
781 + });
782 + }
783 +
784 + /**
785 + * @param {string} url
786 + * @return {string} Screenshot Proxy URL
787 + */
788 + }, {
789 + key: "getScreenshotProxyUrl",
790 + value: function getScreenshotProxyUrl(url) {
791 + return "".concat(this.getSettings('home_url'), "?screenshot_proxy&nonce=").concat(this.getSettings('nonce'), "&href=").concat(url);
792 + }
793 +
794 + /**
795 + * Notify that the screenshot has been succeed.
796 + *
797 + * @param {string} imageUrl
798 + */
799 + }, {
800 + key: "screenshotSucceed",
801 + value: function screenshotSucceed(imageUrl) {
802 + this.screenshotDone(true, imageUrl);
803 + }
804 +
805 + /**
806 + * Notify that the screenshot has been failed.
807 + *
808 + * @param {Error} e
809 + */
810 + }, {
811 + key: "screenshotFailed",
812 + value: function screenshotFailed(e) {
813 + var _this7 = this;
814 + this.log(e, null);
815 + this.markAsFailed(e).then(function () {
816 + return _this7.screenshotDone(false);
817 + });
818 + }
819 +
820 + /**
821 + * Final method of the screenshot.
822 + *
823 + * @param {boolean} success
824 + * @param {string} imageUrl
825 + */
826 + }, {
827 + key: "screenshotDone",
828 + value: function screenshotDone(success) {
829 + var imageUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
830 + clearTimeout(this.timeoutTimer);
831 + this.timeoutTimer = null;
832 + var _this$getSaveAction2 = this.getSaveAction(),
833 + message = _this$getSaveAction2.message,
834 + key = _this$getSaveAction2.key;
835 +
836 + // Send the message to the parent window and not to the top.
837 + // e.g: The `Theme builder` is loaded into an iFrame so the message of the screenshot
838 + // should be sent to the `Theme builder` window and not to the top window.
839 + window.parent.postMessage({
840 + name: message,
841 + success: success,
842 + id: this.getSettings(key),
843 + imageUrl: imageUrl
844 + }, '*');
845 + this.log("Screenshot ".concat(success ? 'Succeed' : 'Failed', "."), 'timeEnd');
846 + }
847 +
848 + /**
849 + * Log messages for debugging.
850 + *
851 + * @param {any} message
852 + * @param {string?} timerMethod
853 + */
854 + }, {
855 + key: "log",
856 + value: function log(message) {
857 + var timerMethod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'timeLog';
858 + if (!this.getSettings('isDebug')) {
859 + return;
860 + }
861 +
862 + // eslint-disable-next-line no-console
863 + console.log('string' === typeof message ? "".concat(this.getSettings('post_id'), " - ").concat(message) : message);
864 + if (timerMethod) {
865 + // eslint-disable-next-line no-console
866 + console[timerMethod](this.getSettings('timer_label'));
867 + }
868 + }
869 + }, {
870 + key: "getSaveAction",
871 + value: function getSaveAction() {
872 + var config = this.getSettings();
873 + if (config.kit_id) {
874 + return {
875 + message: 'kit-screenshot-done',
876 + action: 'update_kit_preview',
877 + key: 'kit_id'
878 + };
879 + }
880 + if (config.template_id) {
881 + return {
882 + message: 'library/capture-screenshot-done',
883 + action: 'save_template_screenshot',
884 + key: 'template_id'
885 + };
886 + }
887 + return {
888 + message: 'capture-screenshot-done',
889 + action: 'screenshot_save',
890 + key: 'post_id'
891 + };
892 + }
893 + }]);
894 +}(elementorModules.ViewModule);
895 +jQuery(function () {
896 + new Screenshot();
897 +});
1642 898 })();
899 +
900 +/******/ })()
901 +;
1643 902 //# sourceMappingURL=cloud-library-screenshot.js.map