PluginProbe
Elementor Website Builder – more than just a page builder / 3.31.3
Elementor Website Builder – more than just a page builder v3.31.3
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / assets / js / editor-notifications.js

editor-notifications.js in Elementor Website Builder – more than just a page builder 3.31.3, at assets/js/editor-notifications.js

2,201 lines 84.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.31.0 - 27-08-2025 */
2 /******/ (() => { // webpackBootstrap
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "../assets/dev/js/utils/react.js":
6 /*!***************************************!*\
7 !*** ../assets/dev/js/utils/react.js ***!
8 \***************************************/
9 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10
11 "use strict";
12
13
14 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
15 Object.defineProperty(exports, "__esModule", ({
16 value: true
17 }));
18 exports["default"] = void 0;
19 var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
20 var ReactDOM = _interopRequireWildcard(__webpack_require__(/*! react-dom */ "react-dom"));
21 var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js");
22 function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
23 /**
24 * Support conditional rendering of a React App to the DOM, based on the React version.
25 * We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions.
26 *
27 * @param { React.ReactElement } app The app to render.
28 * @param { HTMLElement } domElement The DOM element to render the app into.
29 *
30 * @return {{ unmount: () => void }} The unmount function.
31 */
32 function render(app, domElement) {
33 var unmountFunction;
34 try {
35 var root = (0, _client.createRoot)(domElement);
36 root.render(app);
37 unmountFunction = function unmountFunction() {
38 root.unmount();
39 };
40 } catch (e) {
41 // eslint-disable-next-line react/no-deprecated
42 ReactDOM.render(app, domElement);
43 unmountFunction = function unmountFunction() {
44 // eslint-disable-next-line react/no-deprecated
45 ReactDOM.unmountComponentAtNode(domElement);
46 };
47 }
48 return {
49 unmount: unmountFunction
50 };
51 }
52 var _default = exports["default"] = {
53 render: render
54 };
55
56 /***/ }),
57
58 /***/ "../modules/notifications/assets/js/api/index.js":
59 /*!*******************************************************!*\
60 !*** ../modules/notifications/assets/js/api/index.js ***!
61 \*******************************************************/
62 /***/ ((__unused_webpack_module, exports) => {
63
64 "use strict";
65
66
67 Object.defineProperty(exports, "__esModule", ({
68 value: true
69 }));
70 exports.getNotifications = void 0;
71 var request = function request(endpoint) {
72 var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
73 return new Promise(function (resolve, reject) {
74 elementorCommon.ajax.addRequest(endpoint, {
75 success: resolve,
76 error: reject,
77 data: data
78 });
79 });
80 };
81 var getNotifications = exports.getNotifications = function getNotifications() {
82 return request('notifications_get');
83 };
84
85 /***/ }),
86
87 /***/ "../modules/notifications/assets/js/components/editor-app-bar-link.js":
88 /*!****************************************************************************!*\
89 !*** ../modules/notifications/assets/js/components/editor-app-bar-link.js ***!
90 \****************************************************************************/
91 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
92
93 "use strict";
94 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
95
96
97 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
98 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
99 Object.defineProperty(exports, "__esModule", ({
100 value: true
101 }));
102 exports.editorAppBarLink = void 0;
103 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
104 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
105 var EditorAppBar = _interopRequireWildcard(__webpack_require__(/*! @elementor/editor-app-bar */ "@elementor/editor-app-bar"));
106 var _editorOnButtonClicked = __webpack_require__(/*! ./editor-on-button-clicked */ "../modules/notifications/assets/js/components/editor-on-button-clicked.js");
107 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
108 var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
109 var _SpeakerphoneIcon = _interopRequireDefault(__webpack_require__(/*! @elementor/icons/SpeakerphoneIcon */ "@elementor/icons/SpeakerphoneIcon"));
110 function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
111 var IconWithBadge = function IconWithBadge(_ref) {
112 var invisible = _ref.invisible;
113 return /*#__PURE__*/_react.default.createElement(_ui.Badge, {
114 color: "primary",
115 variant: "dot",
116 invisible: invisible
117 }, /*#__PURE__*/_react.default.createElement(_SpeakerphoneIcon.default, null));
118 };
119 IconWithBadge.propTypes = {
120 invisible: PropTypes.bool
121 };
122 var editorAppBarLink = exports.editorAppBarLink = function editorAppBarLink() {
123 var utilitiesMenu = EditorAppBar.utilitiesMenu;
124 utilitiesMenu.registerLink({
125 id: 'app-bar-menu-item-whats-new',
126 priority: 10,
127 useProps: function useProps() {
128 var _useState = (0, _react.useState)(!elementorNotifications.is_unread),
129 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
130 isRead = _useState2[0],
131 setIsRead = _useState2[1];
132 return {
133 title: (0, _i18n.__)("What's New", 'elementor'),
134 icon: function icon() {
135 return /*#__PURE__*/_react.default.createElement(IconWithBadge, {
136 invisible: isRead
137 });
138 },
139 onClick: function onClick() {
140 elementor.editorEvents.dispatchEvent(elementor.editorEvents.config.names.topBar.whatsNew, {
141 location: elementor.editorEvents.config.locations.topBar,
142 secondaryLocation: elementor.editorEvents.config.secondaryLocations['whats-new'],
143 trigger: elementor.editorEvents.config.triggers.click,
144 element: elementor.editorEvents.config.elements.buttonIcon
145 });
146 setIsRead(true);
147 elementorNotifications.is_unread = false;
148 (0, _editorOnButtonClicked.editorOnButtonClicked)('right');
149 }
150 };
151 }
152 });
153 };
154
155 /***/ }),
156
157 /***/ "../modules/notifications/assets/js/components/editor-drawer.js":
158 /*!**********************************************************************!*\
159 !*** ../modules/notifications/assets/js/components/editor-drawer.js ***!
160 \**********************************************************************/
161 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
162
163 "use strict";
164 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
165
166
167 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
168 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
169 Object.defineProperty(exports, "__esModule", ({
170 value: true
171 }));
172 exports.EditorDrawer = void 0;
173 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
174 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
175 var _whatsNew = __webpack_require__(/*! ./whats-new */ "../modules/notifications/assets/js/components/whats-new.js");
176 function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
177 var EditorDrawer = exports.EditorDrawer = function EditorDrawer(_ref) {
178 var _ref$anchorPosition = _ref.anchorPosition,
179 anchorPosition = _ref$anchorPosition === void 0 ? 'left' : _ref$anchorPosition;
180 var _useState = (0, _react.useState)(true),
181 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
182 isOpen = _useState2[0],
183 setIsOpen = _useState2[1];
184 (0, _react.useEffect)(function () {
185 elementor.on('elementor/editor/panel/whats-new/clicked', function () {
186 return setIsOpen(true);
187 });
188 }, []);
189 return /*#__PURE__*/_react.default.createElement(_whatsNew.WhatsNew, {
190 isOpen: isOpen,
191 setIsOpen: setIsOpen,
192 setIsRead: function setIsRead() {
193 return document.body.classList.remove('e-has-notification');
194 },
195 anchorPosition: anchorPosition
196 });
197 };
198 EditorDrawer.propTypes = {
199 anchorPosition: PropTypes.oneOf(['left', 'top', 'right', 'bottom'])
200 };
201
202 /***/ }),
203
204 /***/ "../modules/notifications/assets/js/components/editor-on-button-clicked.js":
205 /*!*********************************************************************************!*\
206 !*** ../modules/notifications/assets/js/components/editor-on-button-clicked.js ***!
207 \*********************************************************************************/
208 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
209
210 "use strict";
211
212
213 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
214 Object.defineProperty(exports, "__esModule", ({
215 value: true
216 }));
217 exports.editorOnButtonClicked = void 0;
218 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
219 var _react2 = _interopRequireDefault(__webpack_require__(/*! elementor-utils/react */ "../assets/dev/js/utils/react.js"));
220 var _editorDrawer = __webpack_require__(/*! ./editor-drawer */ "../modules/notifications/assets/js/components/editor-drawer.js");
221 var isRendered = false;
222 var editorOnButtonClicked = exports.editorOnButtonClicked = function editorOnButtonClicked() {
223 var anchorPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'left';
224 if (!isRendered) {
225 isRendered = true;
226 var container = document.createElement('div');
227 document.body.append(container);
228 _react2.default.render(/*#__PURE__*/_react.default.createElement(_editorDrawer.EditorDrawer, {
229 anchorPosition: anchorPosition
230 }), container);
231 return;
232 }
233 elementor.trigger('elementor/editor/panel/whats-new/clicked');
234 };
235
236 /***/ }),
237
238 /***/ "../modules/notifications/assets/js/components/editor-v1.js":
239 /*!******************************************************************!*\
240 !*** ../modules/notifications/assets/js/components/editor-v1.js ***!
241 \******************************************************************/
242 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
243
244 "use strict";
245 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
246
247
248 Object.defineProperty(exports, "__esModule", ({
249 value: true
250 }));
251 exports.editorV1 = void 0;
252 var _editorOnButtonClicked = __webpack_require__(/*! ./editor-on-button-clicked */ "../modules/notifications/assets/js/components/editor-on-button-clicked.js");
253 var editorV1 = exports.editorV1 = function editorV1() {
254 elementor.on('panel:init', function () {
255 if (elementorNotifications.is_unread) {
256 document.body.classList.add('e-has-notification');
257 }
258 elementor.getPanelView().getPages('menu').view.addItem({
259 name: 'notification-center',
260 icon: 'eicon-speakerphone',
261 title: __('What\'s New', 'elementor'),
262 callback: _editorOnButtonClicked.editorOnButtonClicked
263 }, 'navigate_from_page', 'view-page');
264 });
265 };
266
267 /***/ }),
268
269 /***/ "../modules/notifications/assets/js/components/whats-new-drawer-content.js":
270 /*!*********************************************************************************!*\
271 !*** ../modules/notifications/assets/js/components/whats-new-drawer-content.js ***!
272 \*********************************************************************************/
273 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
274
275 "use strict";
276 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
277
278
279 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
280 Object.defineProperty(exports, "__esModule", ({
281 value: true
282 }));
283 exports.WhatsNewDrawerContent = void 0;
284 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
285 var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query");
286 var _api = __webpack_require__(/*! ../api */ "../modules/notifications/assets/js/api/index.js");
287 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
288 var _whatsNewItem = __webpack_require__(/*! ./whats-new-item */ "../modules/notifications/assets/js/components/whats-new-item.js");
289 var WhatsNewDrawerContent = exports.WhatsNewDrawerContent = function WhatsNewDrawerContent(_ref) {
290 var setIsOpen = _ref.setIsOpen;
291 var _useQuery = (0, _query.useQuery)({
292 queryKey: ['e-notifications'],
293 queryFn: _api.getNotifications
294 }),
295 isPending = _useQuery.isPending,
296 error = _useQuery.error,
297 items = _useQuery.data;
298 if (isPending) {
299 return /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_ui.LinearProgress, {
300 color: "secondary"
301 }));
302 }
303 if (error) {
304 return /*#__PURE__*/_react.default.createElement(_ui.Box, null, "An error has occurred: ", error);
305 }
306 return items.map(function (item, itemIndex) {
307 return /*#__PURE__*/_react.default.createElement(_whatsNewItem.WhatsNewItem, {
308 key: itemIndex,
309 item: item,
310 itemIndex: itemIndex,
311 itemsLength: items.length,
312 setIsOpen: setIsOpen
313 });
314 });
315 };
316 WhatsNewDrawerContent.propTypes = {
317 setIsOpen: PropTypes.func.isRequired
318 };
319
320 /***/ }),
321
322 /***/ "../modules/notifications/assets/js/components/whats-new-item-chips.js":
323 /*!*****************************************************************************!*\
324 !*** ../modules/notifications/assets/js/components/whats-new-item-chips.js ***!
325 \*****************************************************************************/
326 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
327
328 "use strict";
329 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
330
331
332 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
333 Object.defineProperty(exports, "__esModule", ({
334 value: true
335 }));
336 exports.WhatsNewItemChips = void 0;
337 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
338 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
339 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
340 var WhatsNewItemChips = exports.WhatsNewItemChips = function WhatsNewItemChips(_ref) {
341 var chipPlan = _ref.chipPlan,
342 chipTags = _ref.chipTags,
343 itemIndex = _ref.itemIndex;
344 var chips = [];
345 if (chipPlan) {
346 chips.push({
347 color: 'promotion',
348 size: 'small',
349 label: chipPlan
350 });
351 }
352 if (chipTags) {
353 chipTags.forEach(function (chipTag) {
354 chips.push({
355 variant: 'outlined',
356 size: 'small',
357 label: chipTag
358 });
359 });
360 }
361 if (!chips.length) {
362 return null;
363 }
364 return /*#__PURE__*/_react.default.createElement(_ui.Stack, {
365 direction: "row",
366 flexWrap: "wrap",
367 gap: 1,
368 sx: {
369 pb: 1
370 }
371 }, chips.map(function (chip, chipIndex) {
372 return /*#__PURE__*/_react.default.createElement(_ui.Chip, (0, _extends2.default)({
373 key: "chip-".concat(itemIndex).concat(chipIndex)
374 }, chip));
375 }));
376 };
377 WhatsNewItemChips.propTypes = {
378 chipPlan: PropTypes.string,
379 chipTags: PropTypes.array,
380 itemIndex: PropTypes.number.isRequired
381 };
382
383 /***/ }),
384
385 /***/ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js":
386 /*!*********************************************************************************!*\
387 !*** ../modules/notifications/assets/js/components/whats-new-item-thumbnail.js ***!
388 \*********************************************************************************/
389 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
390
391 "use strict";
392 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
393
394
395 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
396 Object.defineProperty(exports, "__esModule", ({
397 value: true
398 }));
399 exports.WhatsNewItemThumbnail = void 0;
400 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
401 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
402 var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js");
403 var WhatsNewItemThumbnail = exports.WhatsNewItemThumbnail = function WhatsNewItemThumbnail(_ref) {
404 var imageSrc = _ref.imageSrc,
405 title = _ref.title,
406 link = _ref.link;
407 return /*#__PURE__*/_react.default.createElement(_ui.Box, {
408 sx: {
409 pb: 2
410 }
411 }, /*#__PURE__*/_react.default.createElement(_wrapperWithLink.WrapperWithLink, {
412 link: link
413 }, /*#__PURE__*/_react.default.createElement("img", {
414 src: imageSrc,
415 alt: title,
416 style: {
417 maxWidth: '100%'
418 }
419 })));
420 };
421 WhatsNewItemThumbnail.propTypes = {
422 imageSrc: PropTypes.string.isRequired,
423 title: PropTypes.string.isRequired,
424 link: PropTypes.string
425 };
426
427 /***/ }),
428
429 /***/ "../modules/notifications/assets/js/components/whats-new-item-topic-line.js":
430 /*!**********************************************************************************!*\
431 !*** ../modules/notifications/assets/js/components/whats-new-item-topic-line.js ***!
432 \**********************************************************************************/
433 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
434
435 "use strict";
436 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
437
438
439 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
440 Object.defineProperty(exports, "__esModule", ({
441 value: true
442 }));
443 exports.WhatsNewItemTopicLine = void 0;
444 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
445 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
446 var WhatsNewItemTopicLine = exports.WhatsNewItemTopicLine = function WhatsNewItemTopicLine(_ref) {
447 var topic = _ref.topic,
448 date = _ref.date;
449 return /*#__PURE__*/_react.default.createElement(_ui.Stack, {
450 direction: "row",
451 divider: /*#__PURE__*/_react.default.createElement(_ui.Divider, {
452 orientation: "vertical",
453 flexItem: true
454 }),
455 spacing: 1,
456 color: "text.tertiary",
457 sx: {
458 pb: 1
459 }
460 }, topic && /*#__PURE__*/_react.default.createElement(_ui.Box, null, topic), date && /*#__PURE__*/_react.default.createElement(_ui.Box, null, date));
461 };
462 WhatsNewItemTopicLine.propTypes = {
463 topic: PropTypes.string,
464 date: PropTypes.string
465 };
466
467 /***/ }),
468
469 /***/ "../modules/notifications/assets/js/components/whats-new-item.js":
470 /*!***********************************************************************!*\
471 !*** ../modules/notifications/assets/js/components/whats-new-item.js ***!
472 \***********************************************************************/
473 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
474
475 "use strict";
476 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
477
478
479 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
480 Object.defineProperty(exports, "__esModule", ({
481 value: true
482 }));
483 exports.WhatsNewItem = void 0;
484 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
485 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
486 var _whatsNewItemTopicLine = __webpack_require__(/*! ./whats-new-item-topic-line */ "../modules/notifications/assets/js/components/whats-new-item-topic-line.js");
487 var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js");
488 var _whatsNewItemThumbnail = __webpack_require__(/*! ./whats-new-item-thumbnail */ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js");
489 var _whatsNewItemChips = __webpack_require__(/*! ./whats-new-item-chips */ "../modules/notifications/assets/js/components/whats-new-item-chips.js");
490 var WhatsNewItem = exports.WhatsNewItem = function WhatsNewItem(_ref) {
491 var item = _ref.item,
492 itemIndex = _ref.itemIndex,
493 itemsLength = _ref.itemsLength,
494 setIsOpen = _ref.setIsOpen;
495 return /*#__PURE__*/_react.default.createElement(_ui.Box, {
496 key: itemIndex,
497 display: "flex",
498 flexDirection: "column",
499 sx: {
500 pt: 2
501 }
502 }, (item.topic || item.date) && /*#__PURE__*/_react.default.createElement(_whatsNewItemTopicLine.WhatsNewItemTopicLine, {
503 topic: item.topic,
504 date: item.date
505 }), /*#__PURE__*/_react.default.createElement(_wrapperWithLink.WrapperWithLink, {
506 link: item.link
507 }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
508 variant: "subtitle1",
509 sx: {
510 pb: 2
511 }
512 }, item.title)), item.imageSrc && /*#__PURE__*/_react.default.createElement(_whatsNewItemThumbnail.WhatsNewItemThumbnail, {
513 imageSrc: item.imageSrc,
514 link: item.link,
515 title: item.title
516 }), /*#__PURE__*/_react.default.createElement(_whatsNewItemChips.WhatsNewItemChips, {
517 chipPlan: item.chipPlan,
518 chipTags: item.chipTags,
519 itemIndex: itemIndex
520 }), item.description && /*#__PURE__*/_react.default.createElement(_ui.Typography, {
521 variant: "body2",
522 color: "text.secondary",
523 sx: {
524 pb: 2
525 }
526 }, item.description, item.readMoreText && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ' ', /*#__PURE__*/_react.default.createElement(_ui.Link, {
527 href: item.link,
528 color: "info.main",
529 target: "_blank"
530 }, item.readMoreText))), item.cta && item.ctaLink && /*#__PURE__*/_react.default.createElement(_ui.Box, {
531 sx: {
532 pb: 2
533 }
534 }, /*#__PURE__*/_react.default.createElement(_ui.Button, {
535 href: item.ctaLink,
536 target: item.ctaLink.startsWith('#') ? '_self' : '_blank',
537 variant: "contained",
538 size: "small",
539 color: "promotion",
540 onClick: item.ctaLink.startsWith('#') ? function () {
541 return setIsOpen(false);
542 } : function () {}
543 }, item.cta)), itemIndex !== itemsLength - 1 && /*#__PURE__*/_react.default.createElement(_ui.Divider, {
544 sx: {
545 my: 1
546 }
547 }));
548 };
549 WhatsNewItem.propTypes = {
550 item: PropTypes.object.isRequired,
551 itemIndex: PropTypes.number.isRequired,
552 itemsLength: PropTypes.number.isRequired,
553 setIsOpen: PropTypes.func.isRequired
554 };
555
556 /***/ }),
557
558 /***/ "../modules/notifications/assets/js/components/whats-new-top-bar.js":
559 /*!**************************************************************************!*\
560 !*** ../modules/notifications/assets/js/components/whats-new-top-bar.js ***!
561 \**************************************************************************/
562 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
563
564 "use strict";
565 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
566
567
568 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
569 Object.defineProperty(exports, "__esModule", ({
570 value: true
571 }));
572 exports.WhatsNewTopBar = void 0;
573 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
574 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
575 var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
576 var _xIcon = __webpack_require__(/*! ../icons/x-icon */ "../modules/notifications/assets/js/icons/x-icon.js");
577 var WhatsNewTopBar = exports.WhatsNewTopBar = function WhatsNewTopBar(props) {
578 var setIsOpen = props.setIsOpen;
579 return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.AppBar, {
580 elevation: 0,
581 position: "sticky",
582 sx: {
583 backgroundColor: 'background.default'
584 }
585 }, /*#__PURE__*/_react.default.createElement(_ui.Toolbar, {
586 variant: "dense"
587 }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
588 variant: "overline",
589 sx: {
590 flexGrow: 1
591 }
592 }, (0, _i18n.__)('What\'s New', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.IconButton, {
593 "aria-label": 'close',
594 size: "small",
595 onClick: function onClick() {
596 return setIsOpen(false);
597 }
598 }, /*#__PURE__*/_react.default.createElement(_xIcon.XIcon, null)))), /*#__PURE__*/_react.default.createElement(_ui.Divider, null));
599 };
600 WhatsNewTopBar.propTypes = {
601 setIsOpen: PropTypes.func.isRequired
602 };
603
604 /***/ }),
605
606 /***/ "../modules/notifications/assets/js/components/whats-new.js":
607 /*!******************************************************************!*\
608 !*** ../modules/notifications/assets/js/components/whats-new.js ***!
609 \******************************************************************/
610 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
611
612 "use strict";
613 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
614
615
616 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
617 Object.defineProperty(exports, "__esModule", ({
618 value: true
619 }));
620 exports.WhatsNew = void 0;
621 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
622 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
623 var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query");
624 var _whatsNewTopBar = __webpack_require__(/*! ./whats-new-top-bar */ "../modules/notifications/assets/js/components/whats-new-top-bar.js");
625 var _whatsNewDrawerContent = __webpack_require__(/*! ./whats-new-drawer-content */ "../modules/notifications/assets/js/components/whats-new-drawer-content.js");
626 function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
627 var queryClient = new _query.QueryClient({
628 defaultOptions: {
629 queries: {
630 refetchOnWindowFocus: false,
631 retry: false,
632 staleTime: 1000 * 60 * 30 // 30 minutes
633 }
634 }
635 });
636 var WhatsNew = exports.WhatsNew = function WhatsNew(props) {
637 var _window$elementor, _window$elementor$get;
638 var isOpen = props.isOpen,
639 setIsOpen = props.setIsOpen,
640 setIsRead = props.setIsRead,
641 _props$anchorPosition = props.anchorPosition,
642 anchorPosition = _props$anchorPosition === void 0 ? 'right' : _props$anchorPosition;
643 (0, _react.useEffect)(function () {
644 if (!isOpen) {
645 return;
646 }
647 setIsRead(true);
648 }, [isOpen, setIsRead]);
649 return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_query.QueryClientProvider, {
650 client: queryClient
651 }, /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, {
652 rtl: elementorCommon.config.isRTL
653 }, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, {
654 colorScheme: ((_window$elementor = window.elementor) === null || _window$elementor === void 0 || (_window$elementor$get = _window$elementor.getPreferences) === null || _window$elementor$get === void 0 ? void 0 : _window$elementor$get.call(_window$elementor, 'ui_theme')) || 'auto'
655 }, /*#__PURE__*/_react.default.createElement(_ui.Drawer, {
656 anchor: anchorPosition,
657 open: isOpen,
658 onClose: function onClose() {
659 return setIsOpen(false);
660 },
661 ModalProps: {
662 style: {
663 // Above the WordPress Admin Top Bar.
664 zIndex: 999999
665 }
666 }
667 }, /*#__PURE__*/_react.default.createElement(_ui.Box, {
668 sx: {
669 width: 320,
670 backgroundColor: 'background.default'
671 },
672 role: "presentation"
673 }, /*#__PURE__*/_react.default.createElement(_whatsNewTopBar.WhatsNewTopBar, {
674 setIsOpen: setIsOpen
675 }), /*#__PURE__*/_react.default.createElement(_ui.Box, {
676 sx: {
677 padding: '16px'
678 }
679 }, /*#__PURE__*/_react.default.createElement(_whatsNewDrawerContent.WhatsNewDrawerContent, {
680 setIsOpen: setIsOpen
681 }))))))));
682 };
683 WhatsNew.propTypes = {
684 isOpen: PropTypes.bool.isRequired,
685 setIsOpen: PropTypes.func.isRequired,
686 setIsRead: PropTypes.func.isRequired,
687 anchorPosition: PropTypes.oneOf(['left', 'top', 'right', 'bottom'])
688 };
689
690 /***/ }),
691
692 /***/ "../modules/notifications/assets/js/components/wrapper-with-link.js":
693 /*!**************************************************************************!*\
694 !*** ../modules/notifications/assets/js/components/wrapper-with-link.js ***!
695 \**************************************************************************/
696 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
697
698 "use strict";
699 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
700
701
702 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
703 Object.defineProperty(exports, "__esModule", ({
704 value: true
705 }));
706 exports.WrapperWithLink = void 0;
707 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
708 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
709 var WrapperWithLink = exports.WrapperWithLink = function WrapperWithLink(props) {
710 var link = props.link,
711 children = props.children;
712 if (!link) {
713 return children;
714 }
715 return /*#__PURE__*/_react.default.createElement(_ui.Link, {
716 href: link,
717 target: "_blank",
718 underline: "none",
719 color: "inherit",
720 sx: {
721 '&:hover': {
722 color: 'inherit'
723 }
724 }
725 }, children);
726 };
727 WrapperWithLink.propTypes = {
728 link: PropTypes.string,
729 children: PropTypes.any.isRequired
730 };
731
732 /***/ }),
733
734 /***/ "../modules/notifications/assets/js/icons/x-icon.js":
735 /*!**********************************************************!*\
736 !*** ../modules/notifications/assets/js/icons/x-icon.js ***!
737 \**********************************************************/
738 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
739
740 "use strict";
741
742
743 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
744 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
745 Object.defineProperty(exports, "__esModule", ({
746 value: true
747 }));
748 exports.XIcon = void 0;
749 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
750 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
751 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
752 function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
753 var XIcon = exports.XIcon = (0, _react.forwardRef)(function (props, ref) {
754 return /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, (0, _extends2.default)({
755 viewBox: "0 0 24 24"
756 }, props, {
757 ref: ref
758 }), /*#__PURE__*/_react.default.createElement("path", {
759 fillRule: "evenodd",
760 clipRule: "evenodd",
761 d: "M18.5303 5.46967C18.8232 5.76256 18.8232 6.23744 18.5303 6.53033L6.53033 18.5303C6.23744 18.8232 5.76256 18.8232 5.46967 18.5303C5.17678 18.2374 5.17678 17.7626 5.46967 17.4697L17.4697 5.46967C17.7626 5.17678 18.2374 5.17678 18.5303 5.46967Z"
762 }), /*#__PURE__*/_react.default.createElement("path", {
763 fillRule: "evenodd",
764 clipRule: "evenodd",
765 d: "M5.46967 5.46967C5.76256 5.17678 6.23744 5.17678 6.53033 5.46967L18.5303 17.4697C18.8232 17.7626 18.8232 18.2374 18.5303 18.5303C18.2374 18.8232 17.7626 18.8232 17.4697 18.5303L5.46967 6.53033C5.17678 6.23744 5.17678 5.76256 5.46967 5.46967Z"
766 }));
767 });
768
769 /***/ }),
770
771 /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
772 /*!******************************************************************!*\
773 !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
774 \******************************************************************/
775 /***/ ((module) => {
776
777 function _arrayLikeToArray(r, a) {
778 (null == a || a > r.length) && (a = r.length);
779 for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
780 return n;
781 }
782 module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
783
784 /***/ }),
785
786 /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
787 /*!****************************************************************!*\
788 !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
789 \****************************************************************/
790 /***/ ((module) => {
791
792 function _arrayWithHoles(r) {
793 if (Array.isArray(r)) return r;
794 }
795 module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
796
797 /***/ }),
798
799 /***/ "../node_modules/@babel/runtime/helpers/extends.js":
800 /*!*********************************************************!*\
801 !*** ../node_modules/@babel/runtime/helpers/extends.js ***!
802 \*********************************************************/
803 /***/ ((module) => {
804
805 function _extends() {
806 return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {
807 for (var e = 1; e < arguments.length; e++) {
808 var t = arguments[e];
809 for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
810 }
811 return n;
812 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments);
813 }
814 module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
815
816 /***/ }),
817
818 /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
819 /*!***********************************************************************!*\
820 !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
821 \***********************************************************************/
822 /***/ ((module) => {
823
824 function _interopRequireDefault(e) {
825 return e && e.__esModule ? e : {
826 "default": e
827 };
828 }
829 module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
830
831 /***/ }),
832
833 /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
834 /*!**********************************************************************!*\
835 !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
836 \**********************************************************************/
837 /***/ ((module) => {
838
839 function _iterableToArrayLimit(r, l) {
840 var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
841 if (null != t) {
842 var e,
843 n,
844 i,
845 u,
846 a = [],
847 f = !0,
848 o = !1;
849 try {
850 if (i = (t = t.call(r)).next, 0 === l) {
851 if (Object(t) !== t) return;
852 f = !1;
853 } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
854 } catch (r) {
855 o = !0, n = r;
856 } finally {
857 try {
858 if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
859 } finally {
860 if (o) throw n;
861 }
862 }
863 return a;
864 }
865 }
866 module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
867
868 /***/ }),
869
870 /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
871 /*!*****************************************************************!*\
872 !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
873 \*****************************************************************/
874 /***/ ((module) => {
875
876 function _nonIterableRest() {
877 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
878 }
879 module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
880
881 /***/ }),
882
883 /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
884 /*!***************************************************************!*\
885 !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
886 \***************************************************************/
887 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
888
889 var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
890 var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
891 var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
892 var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
893 function _slicedToArray(r, e) {
894 return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
895 }
896 module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
897
898 /***/ }),
899
900 /***/ "../node_modules/@babel/runtime/helpers/typeof.js":
901 /*!********************************************************!*\
902 !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
903 \********************************************************/
904 /***/ ((module) => {
905
906 function _typeof(o) {
907 "@babel/helpers - typeof";
908
909 return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
910 return typeof o;
911 } : function (o) {
912 return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
913 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
914 }
915 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
916
917 /***/ }),
918
919 /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
920 /*!****************************************************************************!*\
921 !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
922 \****************************************************************************/
923 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
924
925 var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
926 function _unsupportedIterableToArray(r, a) {
927 if (r) {
928 if ("string" == typeof r) return arrayLikeToArray(r, a);
929 var t = {}.toString.call(r).slice(8, -1);
930 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;
931 }
932 }
933 module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
934
935 /***/ }),
936
937 /***/ "../node_modules/object-assign/index.js":
938 /*!**********************************************!*\
939 !*** ../node_modules/object-assign/index.js ***!
940 \**********************************************/
941 /***/ ((module) => {
942
943 "use strict";
944 /*
945 object-assign
946 (c) Sindre Sorhus
947 @license MIT
948 */
949
950
951 /* eslint-disable no-unused-vars */
952 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
953 var hasOwnProperty = Object.prototype.hasOwnProperty;
954 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
955
956 function toObject(val) {
957 if (val === null || val === undefined) {
958 throw new TypeError('Object.assign cannot be called with null or undefined');
959 }
960
961 return Object(val);
962 }
963
964 function shouldUseNative() {
965 try {
966 if (!Object.assign) {
967 return false;
968 }
969
970 // Detect buggy property enumeration order in older V8 versions.
971
972 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
973 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
974 test1[5] = 'de';
975 if (Object.getOwnPropertyNames(test1)[0] === '5') {
976 return false;
977 }
978
979 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
980 var test2 = {};
981 for (var i = 0; i < 10; i++) {
982 test2['_' + String.fromCharCode(i)] = i;
983 }
984 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
985 return test2[n];
986 });
987 if (order2.join('') !== '0123456789') {
988 return false;
989 }
990
991 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
992 var test3 = {};
993 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
994 test3[letter] = letter;
995 });
996 if (Object.keys(Object.assign({}, test3)).join('') !==
997 'abcdefghijklmnopqrst') {
998 return false;
999 }
1000
1001 return true;
1002 } catch (err) {
1003 // We don't expect any of the above to throw, but better to be safe.
1004 return false;
1005 }
1006 }
1007
1008 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
1009 var from;
1010 var to = toObject(target);
1011 var symbols;
1012
1013 for (var s = 1; s < arguments.length; s++) {
1014 from = Object(arguments[s]);
1015
1016 for (var key in from) {
1017 if (hasOwnProperty.call(from, key)) {
1018 to[key] = from[key];
1019 }
1020 }
1021
1022 if (getOwnPropertySymbols) {
1023 symbols = getOwnPropertySymbols(from);
1024 for (var i = 0; i < symbols.length; i++) {
1025 if (propIsEnumerable.call(from, symbols[i])) {
1026 to[symbols[i]] = from[symbols[i]];
1027 }
1028 }
1029 }
1030 }
1031
1032 return to;
1033 };
1034
1035
1036 /***/ }),
1037
1038 /***/ "../node_modules/prop-types/checkPropTypes.js":
1039 /*!****************************************************!*\
1040 !*** ../node_modules/prop-types/checkPropTypes.js ***!
1041 \****************************************************/
1042 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1043
1044 "use strict";
1045 /**
1046 * Copyright (c) 2013-present, Facebook, Inc.
1047 *
1048 * This source code is licensed under the MIT license found in the
1049 * LICENSE file in the root directory of this source tree.
1050 */
1051
1052
1053
1054 var printWarning = function() {};
1055
1056 if (true) {
1057 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
1058 var loggedTypeFailures = {};
1059 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
1060
1061 printWarning = function(text) {
1062 var message = 'Warning: ' + text;
1063 if (typeof console !== 'undefined') {
1064 console.error(message);
1065 }
1066 try {
1067 // --- Welcome to debugging React ---
1068 // This error was thrown as a convenience so that you can use this stack
1069 // to find the callsite that caused this warning to fire.
1070 throw new Error(message);
1071 } catch (x) { /**/ }
1072 };
1073 }
1074
1075 /**
1076 * Assert that the values match with the type specs.
1077 * Error messages are memorized and will only be shown once.
1078 *
1079 * @param {object} typeSpecs Map of name to a ReactPropType
1080 * @param {object} values Runtime values that need to be type-checked
1081 * @param {string} location e.g. "prop", "context", "child context"
1082 * @param {string} componentName Name of the component for error messages.
1083 * @param {?Function} getStack Returns the component stack.
1084 * @private
1085 */
1086 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
1087 if (true) {
1088 for (var typeSpecName in typeSpecs) {
1089 if (has(typeSpecs, typeSpecName)) {
1090 var error;
1091 // Prop type validation may throw. In case they do, we don't want to
1092 // fail the render phase where it didn't fail before. So we log it.
1093 // After these have been cleaned up, we'll let them throw.
1094 try {
1095 // This is intentionally an invariant that gets caught. It's the same
1096 // behavior as without this statement except with a better message.
1097 if (typeof typeSpecs[typeSpecName] !== 'function') {
1098 var err = Error(
1099 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
1100 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
1101 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
1102 );
1103 err.name = 'Invariant Violation';
1104 throw err;
1105 }
1106 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
1107 } catch (ex) {
1108 error = ex;
1109 }
1110 if (error && !(error instanceof Error)) {
1111 printWarning(
1112 (componentName || 'React class') + ': type specification of ' +
1113 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
1114 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
1115 'You may have forgotten to pass an argument to the type checker ' +
1116 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
1117 'shape all require an argument).'
1118 );
1119 }
1120 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
1121 // Only monitor this failure once because there tends to be a lot of the
1122 // same error.
1123 loggedTypeFailures[error.message] = true;
1124
1125 var stack = getStack ? getStack() : '';
1126
1127 printWarning(
1128 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
1129 );
1130 }
1131 }
1132 }
1133 }
1134 }
1135
1136 /**
1137 * Resets warning cache when testing.
1138 *
1139 * @private
1140 */
1141 checkPropTypes.resetWarningCache = function() {
1142 if (true) {
1143 loggedTypeFailures = {};
1144 }
1145 }
1146
1147 module.exports = checkPropTypes;
1148
1149
1150 /***/ }),
1151
1152 /***/ "../node_modules/prop-types/factoryWithTypeCheckers.js":
1153 /*!*************************************************************!*\
1154 !*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***!
1155 \*************************************************************/
1156 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1157
1158 "use strict";
1159 /**
1160 * Copyright (c) 2013-present, Facebook, Inc.
1161 *
1162 * This source code is licensed under the MIT license found in the
1163 * LICENSE file in the root directory of this source tree.
1164 */
1165
1166
1167
1168 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
1169 var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js");
1170
1171 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
1172 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
1173 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js");
1174
1175 var printWarning = function() {};
1176
1177 if (true) {
1178 printWarning = function(text) {
1179 var message = 'Warning: ' + text;
1180 if (typeof console !== 'undefined') {
1181 console.error(message);
1182 }
1183 try {
1184 // --- Welcome to debugging React ---
1185 // This error was thrown as a convenience so that you can use this stack
1186 // to find the callsite that caused this warning to fire.
1187 throw new Error(message);
1188 } catch (x) {}
1189 };
1190 }
1191
1192 function emptyFunctionThatReturnsNull() {
1193 return null;
1194 }
1195
1196 module.exports = function(isValidElement, throwOnDirectAccess) {
1197 /* global Symbol */
1198 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
1199 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
1200
1201 /**
1202 * Returns the iterator method function contained on the iterable object.
1203 *
1204 * Be sure to invoke the function with the iterable as context:
1205 *
1206 * var iteratorFn = getIteratorFn(myIterable);
1207 * if (iteratorFn) {
1208 * var iterator = iteratorFn.call(myIterable);
1209 * ...
1210 * }
1211 *
1212 * @param {?object} maybeIterable
1213 * @return {?function}
1214 */
1215 function getIteratorFn(maybeIterable) {
1216 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
1217 if (typeof iteratorFn === 'function') {
1218 return iteratorFn;
1219 }
1220 }
1221
1222 /**
1223 * Collection of methods that allow declaration and validation of props that are
1224 * supplied to React components. Example usage:
1225 *
1226 * var Props = require('ReactPropTypes');
1227 * var MyArticle = React.createClass({
1228 * propTypes: {
1229 * // An optional string prop named "description".
1230 * description: Props.string,
1231 *
1232 * // A required enum prop named "category".
1233 * category: Props.oneOf(['News','Photos']).isRequired,
1234 *
1235 * // A prop named "dialog" that requires an instance of Dialog.
1236 * dialog: Props.instanceOf(Dialog).isRequired
1237 * },
1238 * render: function() { ... }
1239 * });
1240 *
1241 * A more formal specification of how these methods are used:
1242 *
1243 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
1244 * decl := ReactPropTypes.{type}(.isRequired)?
1245 *
1246 * Each and every declaration produces a function with the same signature. This
1247 * allows the creation of custom validation functions. For example:
1248 *
1249 * var MyLink = React.createClass({
1250 * propTypes: {
1251 * // An optional string or URI prop named "href".
1252 * href: function(props, propName, componentName) {
1253 * var propValue = props[propName];
1254 * if (propValue != null && typeof propValue !== 'string' &&
1255 * !(propValue instanceof URI)) {
1256 * return new Error(
1257 * 'Expected a string or an URI for ' + propName + ' in ' +
1258 * componentName
1259 * );
1260 * }
1261 * }
1262 * },
1263 * render: function() {...}
1264 * });
1265 *
1266 * @internal
1267 */
1268
1269 var ANONYMOUS = '<<anonymous>>';
1270
1271 // Important!
1272 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
1273 var ReactPropTypes = {
1274 array: createPrimitiveTypeChecker('array'),
1275 bigint: createPrimitiveTypeChecker('bigint'),
1276 bool: createPrimitiveTypeChecker('boolean'),
1277 func: createPrimitiveTypeChecker('function'),
1278 number: createPrimitiveTypeChecker('number'),
1279 object: createPrimitiveTypeChecker('object'),
1280 string: createPrimitiveTypeChecker('string'),
1281 symbol: createPrimitiveTypeChecker('symbol'),
1282
1283 any: createAnyTypeChecker(),
1284 arrayOf: createArrayOfTypeChecker,
1285 element: createElementTypeChecker(),
1286 elementType: createElementTypeTypeChecker(),
1287 instanceOf: createInstanceTypeChecker,
1288 node: createNodeChecker(),
1289 objectOf: createObjectOfTypeChecker,
1290 oneOf: createEnumTypeChecker,
1291 oneOfType: createUnionTypeChecker,
1292 shape: createShapeTypeChecker,
1293 exact: createStrictShapeTypeChecker,
1294 };
1295
1296 /**
1297 * inlined Object.is polyfill to avoid requiring consumers ship their own
1298 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
1299 */
1300 /*eslint-disable no-self-compare*/
1301 function is(x, y) {
1302 // SameValue algorithm
1303 if (x === y) {
1304 // Steps 1-5, 7-10
1305 // Steps 6.b-6.e: +0 != -0
1306 return x !== 0 || 1 / x === 1 / y;
1307 } else {
1308 // Step 6.a: NaN == NaN
1309 return x !== x && y !== y;
1310 }
1311 }
1312 /*eslint-enable no-self-compare*/
1313
1314 /**
1315 * We use an Error-like object for backward compatibility as people may call
1316 * PropTypes directly and inspect their output. However, we don't use real
1317 * Errors anymore. We don't inspect their stack anyway, and creating them
1318 * is prohibitively expensive if they are created too often, such as what
1319 * happens in oneOfType() for any type before the one that matched.
1320 */
1321 function PropTypeError(message, data) {
1322 this.message = message;
1323 this.data = data && typeof data === 'object' ? data: {};
1324 this.stack = '';
1325 }
1326 // Make `instanceof Error` still work for returned errors.
1327 PropTypeError.prototype = Error.prototype;
1328
1329 function createChainableTypeChecker(validate) {
1330 if (true) {
1331 var manualPropTypeCallCache = {};
1332 var manualPropTypeWarningCount = 0;
1333 }
1334 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
1335 componentName = componentName || ANONYMOUS;
1336 propFullName = propFullName || propName;
1337
1338 if (secret !== ReactPropTypesSecret) {
1339 if (throwOnDirectAccess) {
1340 // New behavior only for users of `prop-types` package
1341 var err = new Error(
1342 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1343 'Use `PropTypes.checkPropTypes()` to call them. ' +
1344 'Read more at http://fb.me/use-check-prop-types'
1345 );
1346 err.name = 'Invariant Violation';
1347 throw err;
1348 } else if ( true && typeof console !== 'undefined') {
1349 // Old behavior for people using React.PropTypes
1350 var cacheKey = componentName + ':' + propName;
1351 if (
1352 !manualPropTypeCallCache[cacheKey] &&
1353 // Avoid spamming the console because they are often not actionable except for lib authors
1354 manualPropTypeWarningCount < 3
1355 ) {
1356 printWarning(
1357 'You are manually calling a React.PropTypes validation ' +
1358 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
1359 'and will throw in the standalone `prop-types` package. ' +
1360 'You may be seeing this warning due to a third-party PropTypes ' +
1361 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
1362 );
1363 manualPropTypeCallCache[cacheKey] = true;
1364 manualPropTypeWarningCount++;
1365 }
1366 }
1367 }
1368 if (props[propName] == null) {
1369 if (isRequired) {
1370 if (props[propName] === null) {
1371 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
1372 }
1373 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
1374 }
1375 return null;
1376 } else {
1377 return validate(props, propName, componentName, location, propFullName);
1378 }
1379 }
1380
1381 var chainedCheckType = checkType.bind(null, false);
1382 chainedCheckType.isRequired = checkType.bind(null, true);
1383
1384 return chainedCheckType;
1385 }
1386
1387 function createPrimitiveTypeChecker(expectedType) {
1388 function validate(props, propName, componentName, location, propFullName, secret) {
1389 var propValue = props[propName];
1390 var propType = getPropType(propValue);
1391 if (propType !== expectedType) {
1392 // `propValue` being instance of, say, date/regexp, pass the 'object'
1393 // check, but we can offer a more precise error message here rather than
1394 // 'of type `object`'.
1395 var preciseType = getPreciseType(propValue);
1396
1397 return new PropTypeError(
1398 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
1399 {expectedType: expectedType}
1400 );
1401 }
1402 return null;
1403 }
1404 return createChainableTypeChecker(validate);
1405 }
1406
1407 function createAnyTypeChecker() {
1408 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
1409 }
1410
1411 function createArrayOfTypeChecker(typeChecker) {
1412 function validate(props, propName, componentName, location, propFullName) {
1413 if (typeof typeChecker !== 'function') {
1414 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
1415 }
1416 var propValue = props[propName];
1417 if (!Array.isArray(propValue)) {
1418 var propType = getPropType(propValue);
1419 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
1420 }
1421 for (var i = 0; i < propValue.length; i++) {
1422 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
1423 if (error instanceof Error) {
1424 return error;
1425 }
1426 }
1427 return null;
1428 }
1429 return createChainableTypeChecker(validate);
1430 }
1431
1432 function createElementTypeChecker() {
1433 function validate(props, propName, componentName, location, propFullName) {
1434 var propValue = props[propName];
1435 if (!isValidElement(propValue)) {
1436 var propType = getPropType(propValue);
1437 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
1438 }
1439 return null;
1440 }
1441 return createChainableTypeChecker(validate);
1442 }
1443
1444 function createElementTypeTypeChecker() {
1445 function validate(props, propName, componentName, location, propFullName) {
1446 var propValue = props[propName];
1447 if (!ReactIs.isValidElementType(propValue)) {
1448 var propType = getPropType(propValue);
1449 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
1450 }
1451 return null;
1452 }
1453 return createChainableTypeChecker(validate);
1454 }
1455
1456 function createInstanceTypeChecker(expectedClass) {
1457 function validate(props, propName, componentName, location, propFullName) {
1458 if (!(props[propName] instanceof expectedClass)) {
1459 var expectedClassName = expectedClass.name || ANONYMOUS;
1460 var actualClassName = getClassName(props[propName]);
1461 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
1462 }
1463 return null;
1464 }
1465 return createChainableTypeChecker(validate);
1466 }
1467
1468 function createEnumTypeChecker(expectedValues) {
1469 if (!Array.isArray(expectedValues)) {
1470 if (true) {
1471 if (arguments.length > 1) {
1472 printWarning(
1473 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
1474 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
1475 );
1476 } else {
1477 printWarning('Invalid argument supplied to oneOf, expected an array.');
1478 }
1479 }
1480 return emptyFunctionThatReturnsNull;
1481 }
1482
1483 function validate(props, propName, componentName, location, propFullName) {
1484 var propValue = props[propName];
1485 for (var i = 0; i < expectedValues.length; i++) {
1486 if (is(propValue, expectedValues[i])) {
1487 return null;
1488 }
1489 }
1490
1491 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
1492 var type = getPreciseType(value);
1493 if (type === 'symbol') {
1494 return String(value);
1495 }
1496 return value;
1497 });
1498 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
1499 }
1500 return createChainableTypeChecker(validate);
1501 }
1502
1503 function createObjectOfTypeChecker(typeChecker) {
1504 function validate(props, propName, componentName, location, propFullName) {
1505 if (typeof typeChecker !== 'function') {
1506 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
1507 }
1508 var propValue = props[propName];
1509 var propType = getPropType(propValue);
1510 if (propType !== 'object') {
1511 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
1512 }
1513 for (var key in propValue) {
1514 if (has(propValue, key)) {
1515 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1516 if (error instanceof Error) {
1517 return error;
1518 }
1519 }
1520 }
1521 return null;
1522 }
1523 return createChainableTypeChecker(validate);
1524 }
1525
1526 function createUnionTypeChecker(arrayOfTypeCheckers) {
1527 if (!Array.isArray(arrayOfTypeCheckers)) {
1528 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
1529 return emptyFunctionThatReturnsNull;
1530 }
1531
1532 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1533 var checker = arrayOfTypeCheckers[i];
1534 if (typeof checker !== 'function') {
1535 printWarning(
1536 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
1537 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
1538 );
1539 return emptyFunctionThatReturnsNull;
1540 }
1541 }
1542
1543 function validate(props, propName, componentName, location, propFullName) {
1544 var expectedTypes = [];
1545 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1546 var checker = arrayOfTypeCheckers[i];
1547 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
1548 if (checkerResult == null) {
1549 return null;
1550 }
1551 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
1552 expectedTypes.push(checkerResult.data.expectedType);
1553 }
1554 }
1555 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
1556 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
1557 }
1558 return createChainableTypeChecker(validate);
1559 }
1560
1561 function createNodeChecker() {
1562 function validate(props, propName, componentName, location, propFullName) {
1563 if (!isNode(props[propName])) {
1564 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
1565 }
1566 return null;
1567 }
1568 return createChainableTypeChecker(validate);
1569 }
1570
1571 function invalidValidatorError(componentName, location, propFullName, key, type) {
1572 return new PropTypeError(
1573 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
1574 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
1575 );
1576 }
1577
1578 function createShapeTypeChecker(shapeTypes) {
1579 function validate(props, propName, componentName, location, propFullName) {
1580 var propValue = props[propName];
1581 var propType = getPropType(propValue);
1582 if (propType !== 'object') {
1583 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1584 }
1585 for (var key in shapeTypes) {
1586 var checker = shapeTypes[key];
1587 if (typeof checker !== 'function') {
1588 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1589 }
1590 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1591 if (error) {
1592 return error;
1593 }
1594 }
1595 return null;
1596 }
1597 return createChainableTypeChecker(validate);
1598 }
1599
1600 function createStrictShapeTypeChecker(shapeTypes) {
1601 function validate(props, propName, componentName, location, propFullName) {
1602 var propValue = props[propName];
1603 var propType = getPropType(propValue);
1604 if (propType !== 'object') {
1605 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1606 }
1607 // We need to check all keys in case some are required but missing from props.
1608 var allKeys = assign({}, props[propName], shapeTypes);
1609 for (var key in allKeys) {
1610 var checker = shapeTypes[key];
1611 if (has(shapeTypes, key) && typeof checker !== 'function') {
1612 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1613 }
1614 if (!checker) {
1615 return new PropTypeError(
1616 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
1617 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
1618 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
1619 );
1620 }
1621 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1622 if (error) {
1623 return error;
1624 }
1625 }
1626 return null;
1627 }
1628
1629 return createChainableTypeChecker(validate);
1630 }
1631
1632 function isNode(propValue) {
1633 switch (typeof propValue) {
1634 case 'number':
1635 case 'string':
1636 case 'undefined':
1637 return true;
1638 case 'boolean':
1639 return !propValue;
1640 case 'object':
1641 if (Array.isArray(propValue)) {
1642 return propValue.every(isNode);
1643 }
1644 if (propValue === null || isValidElement(propValue)) {
1645 return true;
1646 }
1647
1648 var iteratorFn = getIteratorFn(propValue);
1649 if (iteratorFn) {
1650 var iterator = iteratorFn.call(propValue);
1651 var step;
1652 if (iteratorFn !== propValue.entries) {
1653 while (!(step = iterator.next()).done) {
1654 if (!isNode(step.value)) {
1655 return false;
1656 }
1657 }
1658 } else {
1659 // Iterator will provide entry [k,v] tuples rather than values.
1660 while (!(step = iterator.next()).done) {
1661 var entry = step.value;
1662 if (entry) {
1663 if (!isNode(entry[1])) {
1664 return false;
1665 }
1666 }
1667 }
1668 }
1669 } else {
1670 return false;
1671 }
1672
1673 return true;
1674 default:
1675 return false;
1676 }
1677 }
1678
1679 function isSymbol(propType, propValue) {
1680 // Native Symbol.
1681 if (propType === 'symbol') {
1682 return true;
1683 }
1684
1685 // falsy value can't be a Symbol
1686 if (!propValue) {
1687 return false;
1688 }
1689
1690 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1691 if (propValue['@@toStringTag'] === 'Symbol') {
1692 return true;
1693 }
1694
1695 // Fallback for non-spec compliant Symbols which are polyfilled.
1696 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1697 return true;
1698 }
1699
1700 return false;
1701 }
1702
1703 // Equivalent of `typeof` but with special handling for array and regexp.
1704 function getPropType(propValue) {
1705 var propType = typeof propValue;
1706 if (Array.isArray(propValue)) {
1707 return 'array';
1708 }
1709 if (propValue instanceof RegExp) {
1710 // Old webkits (at least until Android 4.0) return 'function' rather than
1711 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1712 // passes PropTypes.object.
1713 return 'object';
1714 }
1715 if (isSymbol(propType, propValue)) {
1716 return 'symbol';
1717 }
1718 return propType;
1719 }
1720
1721 // This handles more types than `getPropType`. Only used for error messages.
1722 // See `createPrimitiveTypeChecker`.
1723 function getPreciseType(propValue) {
1724 if (typeof propValue === 'undefined' || propValue === null) {
1725 return '' + propValue;
1726 }
1727 var propType = getPropType(propValue);
1728 if (propType === 'object') {
1729 if (propValue instanceof Date) {
1730 return 'date';
1731 } else if (propValue instanceof RegExp) {
1732 return 'regexp';
1733 }
1734 }
1735 return propType;
1736 }
1737
1738 // Returns a string that is postfixed to a warning about an invalid type.
1739 // For example, "undefined" or "of type array"
1740 function getPostfixForTypeWarning(value) {
1741 var type = getPreciseType(value);
1742 switch (type) {
1743 case 'array':
1744 case 'object':
1745 return 'an ' + type;
1746 case 'boolean':
1747 case 'date':
1748 case 'regexp':
1749 return 'a ' + type;
1750 default:
1751 return type;
1752 }
1753 }
1754
1755 // Returns class name of the object, if any.
1756 function getClassName(propValue) {
1757 if (!propValue.constructor || !propValue.constructor.name) {
1758 return ANONYMOUS;
1759 }
1760 return propValue.constructor.name;
1761 }
1762
1763 ReactPropTypes.checkPropTypes = checkPropTypes;
1764 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1765 ReactPropTypes.PropTypes = ReactPropTypes;
1766
1767 return ReactPropTypes;
1768 };
1769
1770
1771 /***/ }),
1772
1773 /***/ "../node_modules/prop-types/index.js":
1774 /*!*******************************************!*\
1775 !*** ../node_modules/prop-types/index.js ***!
1776 \*******************************************/
1777 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1778
1779 /**
1780 * Copyright (c) 2013-present, Facebook, Inc.
1781 *
1782 * This source code is licensed under the MIT license found in the
1783 * LICENSE file in the root directory of this source tree.
1784 */
1785
1786 if (true) {
1787 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
1788
1789 // By explicitly using `prop-types` you are opting into new development behavior.
1790 // http://fb.me/prop-types-in-prod
1791 var throwOnDirectAccess = true;
1792 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
1793 } else // removed by dead control flow
1794 {}
1795
1796
1797 /***/ }),
1798
1799 /***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js":
1800 /*!**************************************************************!*\
1801 !*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
1802 \**************************************************************/
1803 /***/ ((module) => {
1804
1805 "use strict";
1806 /**
1807 * Copyright (c) 2013-present, Facebook, Inc.
1808 *
1809 * This source code is licensed under the MIT license found in the
1810 * LICENSE file in the root directory of this source tree.
1811 */
1812
1813
1814
1815 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1816
1817 module.exports = ReactPropTypesSecret;
1818
1819
1820 /***/ }),
1821
1822 /***/ "../node_modules/prop-types/lib/has.js":
1823 /*!*********************************************!*\
1824 !*** ../node_modules/prop-types/lib/has.js ***!
1825 \*********************************************/
1826 /***/ ((module) => {
1827
1828 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
1829
1830
1831 /***/ }),
1832
1833 /***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js":
1834 /*!************************************************************************************!*\
1835 !*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***!
1836 \************************************************************************************/
1837 /***/ ((__unused_webpack_module, exports) => {
1838
1839 "use strict";
1840 /** @license React v16.13.1
1841 * react-is.development.js
1842 *
1843 * Copyright (c) Facebook, Inc. and its affiliates.
1844 *
1845 * This source code is licensed under the MIT license found in the
1846 * LICENSE file in the root directory of this source tree.
1847 */
1848
1849
1850
1851
1852
1853 if (true) {
1854 (function() {
1855 'use strict';
1856
1857 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
1858 // nor polyfill, then a plain number is used for performance.
1859 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
1860 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
1861 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
1862 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
1863 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
1864 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
1865 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
1866 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
1867 // (unstable) APIs that have been removed. Can we remove the symbols?
1868
1869 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
1870 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
1871 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
1872 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
1873 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
1874 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
1875 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
1876 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
1877 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
1878 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
1879 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
1880
1881 function isValidElementType(type) {
1882 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1883 type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
1884 }
1885
1886 function typeOf(object) {
1887 if (typeof object === 'object' && object !== null) {
1888 var $$typeof = object.$$typeof;
1889
1890 switch ($$typeof) {
1891 case REACT_ELEMENT_TYPE:
1892 var type = object.type;
1893
1894 switch (type) {
1895 case REACT_ASYNC_MODE_TYPE:
1896 case REACT_CONCURRENT_MODE_TYPE:
1897 case REACT_FRAGMENT_TYPE:
1898 case REACT_PROFILER_TYPE:
1899 case REACT_STRICT_MODE_TYPE:
1900 case REACT_SUSPENSE_TYPE:
1901 return type;
1902
1903 default:
1904 var $$typeofType = type && type.$$typeof;
1905
1906 switch ($$typeofType) {
1907 case REACT_CONTEXT_TYPE:
1908 case REACT_FORWARD_REF_TYPE:
1909 case REACT_LAZY_TYPE:
1910 case REACT_MEMO_TYPE:
1911 case REACT_PROVIDER_TYPE:
1912 return $$typeofType;
1913
1914 default:
1915 return $$typeof;
1916 }
1917
1918 }
1919
1920 case REACT_PORTAL_TYPE:
1921 return $$typeof;
1922 }
1923 }
1924
1925 return undefined;
1926 } // AsyncMode is deprecated along with isAsyncMode
1927
1928 var AsyncMode = REACT_ASYNC_MODE_TYPE;
1929 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
1930 var ContextConsumer = REACT_CONTEXT_TYPE;
1931 var ContextProvider = REACT_PROVIDER_TYPE;
1932 var Element = REACT_ELEMENT_TYPE;
1933 var ForwardRef = REACT_FORWARD_REF_TYPE;
1934 var Fragment = REACT_FRAGMENT_TYPE;
1935 var Lazy = REACT_LAZY_TYPE;
1936 var Memo = REACT_MEMO_TYPE;
1937 var Portal = REACT_PORTAL_TYPE;
1938 var Profiler = REACT_PROFILER_TYPE;
1939 var StrictMode = REACT_STRICT_MODE_TYPE;
1940 var Suspense = REACT_SUSPENSE_TYPE;
1941 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
1942
1943 function isAsyncMode(object) {
1944 {
1945 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
1946 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
1947
1948 console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
1949 }
1950 }
1951
1952 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
1953 }
1954 function isConcurrentMode(object) {
1955 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
1956 }
1957 function isContextConsumer(object) {
1958 return typeOf(object) === REACT_CONTEXT_TYPE;
1959 }
1960 function isContextProvider(object) {
1961 return typeOf(object) === REACT_PROVIDER_TYPE;
1962 }
1963 function isElement(object) {
1964 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1965 }
1966 function isForwardRef(object) {
1967 return typeOf(object) === REACT_FORWARD_REF_TYPE;
1968 }
1969 function isFragment(object) {
1970 return typeOf(object) === REACT_FRAGMENT_TYPE;
1971 }
1972 function isLazy(object) {
1973 return typeOf(object) === REACT_LAZY_TYPE;
1974 }
1975 function isMemo(object) {
1976 return typeOf(object) === REACT_MEMO_TYPE;
1977 }
1978 function isPortal(object) {
1979 return typeOf(object) === REACT_PORTAL_TYPE;
1980 }
1981 function isProfiler(object) {
1982 return typeOf(object) === REACT_PROFILER_TYPE;
1983 }
1984 function isStrictMode(object) {
1985 return typeOf(object) === REACT_STRICT_MODE_TYPE;
1986 }
1987 function isSuspense(object) {
1988 return typeOf(object) === REACT_SUSPENSE_TYPE;
1989 }
1990
1991 exports.AsyncMode = AsyncMode;
1992 exports.ConcurrentMode = ConcurrentMode;
1993 exports.ContextConsumer = ContextConsumer;
1994 exports.ContextProvider = ContextProvider;
1995 exports.Element = Element;
1996 exports.ForwardRef = ForwardRef;
1997 exports.Fragment = Fragment;
1998 exports.Lazy = Lazy;
1999 exports.Memo = Memo;
2000 exports.Portal = Portal;
2001 exports.Profiler = Profiler;
2002 exports.StrictMode = StrictMode;
2003 exports.Suspense = Suspense;
2004 exports.isAsyncMode = isAsyncMode;
2005 exports.isConcurrentMode = isConcurrentMode;
2006 exports.isContextConsumer = isContextConsumer;
2007 exports.isContextProvider = isContextProvider;
2008 exports.isElement = isElement;
2009 exports.isForwardRef = isForwardRef;
2010 exports.isFragment = isFragment;
2011 exports.isLazy = isLazy;
2012 exports.isMemo = isMemo;
2013 exports.isPortal = isPortal;
2014 exports.isProfiler = isProfiler;
2015 exports.isStrictMode = isStrictMode;
2016 exports.isSuspense = isSuspense;
2017 exports.isValidElementType = isValidElementType;
2018 exports.typeOf = typeOf;
2019 })();
2020 }
2021
2022
2023 /***/ }),
2024
2025 /***/ "../node_modules/prop-types/node_modules/react-is/index.js":
2026 /*!*****************************************************************!*\
2027 !*** ../node_modules/prop-types/node_modules/react-is/index.js ***!
2028 \*****************************************************************/
2029 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2030
2031 "use strict";
2032
2033
2034 if (false) // removed by dead control flow
2035 {} else {
2036 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js");
2037 }
2038
2039
2040 /***/ }),
2041
2042 /***/ "../node_modules/react-dom/client.js":
2043 /*!*******************************************!*\
2044 !*** ../node_modules/react-dom/client.js ***!
2045 \*******************************************/
2046 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2047
2048 "use strict";
2049
2050
2051 var m = __webpack_require__(/*! react-dom */ "react-dom");
2052 if (false) // removed by dead control flow
2053 {} else {
2054 var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2055 exports.createRoot = function(c, o) {
2056 i.usingClientEntryPoint = true;
2057 try {
2058 return m.createRoot(c, o);
2059 } finally {
2060 i.usingClientEntryPoint = false;
2061 }
2062 };
2063 exports.hydrateRoot = function(c, h, o) {
2064 i.usingClientEntryPoint = true;
2065 try {
2066 return m.hydrateRoot(c, h, o);
2067 } finally {
2068 i.usingClientEntryPoint = false;
2069 }
2070 };
2071 }
2072
2073
2074 /***/ }),
2075
2076 /***/ "@elementor/editor-app-bar":
2077 /*!*******************************************!*\
2078 !*** external "elementorV2.editorAppBar" ***!
2079 \*******************************************/
2080 /***/ ((module) => {
2081
2082 "use strict";
2083 module.exports = elementorV2.editorAppBar;
2084
2085 /***/ }),
2086
2087 /***/ "@elementor/icons/SpeakerphoneIcon":
2088 /*!********************************************************!*\
2089 !*** external "elementorV2.icons['SpeakerphoneIcon']" ***!
2090 \********************************************************/
2091 /***/ ((module) => {
2092
2093 "use strict";
2094 module.exports = elementorV2.icons['SpeakerphoneIcon'];
2095
2096 /***/ }),
2097
2098 /***/ "@elementor/query":
2099 /*!************************************!*\
2100 !*** external "elementorV2.query" ***!
2101 \************************************/
2102 /***/ ((module) => {
2103
2104 "use strict";
2105 module.exports = elementorV2.query;
2106
2107 /***/ }),
2108
2109 /***/ "@elementor/ui":
2110 /*!*********************************!*\
2111 !*** external "elementorV2.ui" ***!
2112 \*********************************/
2113 /***/ ((module) => {
2114
2115 "use strict";
2116 module.exports = elementorV2.ui;
2117
2118 /***/ }),
2119
2120 /***/ "@wordpress/i18n":
2121 /*!**************************!*\
2122 !*** external "wp.i18n" ***!
2123 \**************************/
2124 /***/ ((module) => {
2125
2126 "use strict";
2127 module.exports = wp.i18n;
2128
2129 /***/ }),
2130
2131 /***/ "react":
2132 /*!************************!*\
2133 !*** external "React" ***!
2134 \************************/
2135 /***/ ((module) => {
2136
2137 "use strict";
2138 module.exports = React;
2139
2140 /***/ }),
2141
2142 /***/ "react-dom":
2143 /*!***************************!*\
2144 !*** external "ReactDOM" ***!
2145 \***************************/
2146 /***/ ((module) => {
2147
2148 "use strict";
2149 module.exports = ReactDOM;
2150
2151 /***/ })
2152
2153 /******/ });
2154 /************************************************************************/
2155 /******/ // The module cache
2156 /******/ var __webpack_module_cache__ = {};
2157 /******/
2158 /******/ // The require function
2159 /******/ function __webpack_require__(moduleId) {
2160 /******/ // Check if module is in cache
2161 /******/ var cachedModule = __webpack_module_cache__[moduleId];
2162 /******/ if (cachedModule !== undefined) {
2163 /******/ return cachedModule.exports;
2164 /******/ }
2165 /******/ // Create a new module (and put it into the cache)
2166 /******/ var module = __webpack_module_cache__[moduleId] = {
2167 /******/ // no module.id needed
2168 /******/ // no module.loaded needed
2169 /******/ exports: {}
2170 /******/ };
2171 /******/
2172 /******/ // Execute the module function
2173 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
2174 /******/
2175 /******/ // Return the exports of the module
2176 /******/ return module.exports;
2177 /******/ }
2178 /******/
2179 /************************************************************************/
2180 var __webpack_exports__ = {};
2181 // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
2182 (() => {
2183 "use strict";
2184 /*!****************************************************!*\
2185 !*** ../modules/notifications/assets/js/editor.js ***!
2186 \****************************************************/
2187
2188
2189 var _editorV = __webpack_require__(/*! ./components/editor-v1 */ "../modules/notifications/assets/js/components/editor-v1.js");
2190 var _editorAppBarLink = __webpack_require__(/*! ./components/editor-app-bar-link */ "../modules/notifications/assets/js/components/editor-app-bar-link.js");
2191 var _window;
2192 if ((_window = window) !== null && _window !== void 0 && (_window = _window.elementorV2) !== null && _window !== void 0 && _window.editorAppBar) {
2193 (0, _editorAppBarLink.editorAppBarLink)();
2194 } else {
2195 (0, _editorV.editorV1)();
2196 }
2197 })();
2198
2199 /******/ })()
2200 ;
2201 //# sourceMappingURL=editor-notifications.js.map