| @@ -1,6077 +1,2574 @@ | ||
| 1 | -/******/ (() => { // webpackBootstrap | |
| 2 | -/******/ var __webpack_modules__ = ({ | |
| 1 | +(function(react, _wordpress_dom_ready, _elementor_ui, _wordpress_i18n, _elementor_icons, _wordpress_components) { | |
| 3 | 2 | |
| 4 | -/***/ "../modules/element-manager/assets/js/api.js": | |
| 5 | -/*!***************************************************!*\ | |
| 6 | - !*** ../modules/element-manager/assets/js/api.js ***! | |
| 7 | - \***************************************************/ | |
| 8 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 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)); | |
| 9 | 33 | |
| 10 | -"use strict"; | |
| 34 | +//#endregion | |
| 35 | +react = __toESM(react); | |
| 36 | +_wordpress_dom_ready = __toESM(_wordpress_dom_ready); | |
| 11 | 37 | |
| 38 | +//#region node_modules/react-dom/client.js | |
| 39 | + var require_client = /* @__PURE__ */ __commonJSMin(((exports) => { | |
| 40 | + var m = (globalThis.ReactDOM); | |
| 41 | + var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | |
| 42 | + exports.createRoot = function(c, o) { | |
| 43 | + i.usingClientEntryPoint = true; | |
| 44 | + try { | |
| 45 | + return m.createRoot(c, o); | |
| 46 | + } finally { | |
| 47 | + i.usingClientEntryPoint = false; | |
| 48 | + } | |
| 49 | + }; | |
| 50 | + })); | |
| 12 | 51 | |
| 13 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 14 | -Object.defineProperty(exports, "__esModule", ({ | |
| 15 | - value: true | |
| 16 | -})); | |
| 17 | -exports.saveDisabledWidgets = exports.markNoticeViewed = exports.getUsageWidgets = exports.getAdminAppData = void 0; | |
| 18 | -var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 19 | -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 20 | -var saveDisabledWidgets = exports.saveDisabledWidgets = /*#__PURE__*/function () { | |
| 21 | - var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(widgetsDisabled) { | |
| 22 | - var elementsRestriction, | |
| 23 | - bodyData, | |
| 24 | - _args = arguments, | |
| 25 | - _t; | |
| 26 | - return _regenerator.default.wrap(function (_context) { | |
| 27 | - while (1) switch (_context.prev = _context.next) { | |
| 28 | - case 0: | |
| 29 | - elementsRestriction = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}; | |
| 30 | - _context.prev = 1; | |
| 31 | - bodyData = { | |
| 32 | - action: 'elementor_element_manager_save_disabled_elements', | |
| 33 | - nonce: eElementManagerConfig.nonce, | |
| 34 | - widgets: JSON.stringify(widgetsDisabled) | |
| 35 | - }; | |
| 36 | - if (null !== elementsRestriction) { | |
| 37 | - bodyData.elements_restriction = JSON.stringify(elementsRestriction); | |
| 38 | - } | |
| 39 | - _context.next = 2; | |
| 40 | - return fetch(eElementManagerConfig.ajaxurl, { | |
| 41 | - method: 'POST', | |
| 42 | - headers: { | |
| 43 | - 'Content-Type': 'application/x-www-form-urlencoded' | |
| 44 | - }, | |
| 45 | - body: new URLSearchParams(bodyData) | |
| 46 | - }); | |
| 47 | - case 2: | |
| 48 | - _context.next = 4; | |
| 49 | - break; | |
| 50 | - case 3: | |
| 51 | - _context.prev = 3; | |
| 52 | - _t = _context["catch"](1); | |
| 53 | - console.error(_t); // eslint-disable-line no-console | |
| 54 | - case 4: | |
| 55 | - case "end": | |
| 56 | - return _context.stop(); | |
| 57 | - } | |
| 58 | - }, _callee, null, [[1, 3]]); | |
| 59 | - })); | |
| 60 | - return function saveDisabledWidgets(_x) { | |
| 61 | - return _ref.apply(this, arguments); | |
| 62 | - }; | |
| 63 | -}(); | |
| 64 | -var getAdminAppData = exports.getAdminAppData = /*#__PURE__*/function () { | |
| 65 | - var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { | |
| 66 | - var response, data, _t2; | |
| 67 | - return _regenerator.default.wrap(function (_context2) { | |
| 68 | - while (1) switch (_context2.prev = _context2.next) { | |
| 69 | - case 0: | |
| 70 | - _context2.prev = 0; | |
| 71 | - _context2.next = 1; | |
| 72 | - return fetch(eElementManagerConfig.ajaxurl, { | |
| 73 | - method: 'POST', | |
| 74 | - headers: { | |
| 75 | - 'Content-Type': 'application/x-www-form-urlencoded' | |
| 76 | - }, | |
| 77 | - body: new URLSearchParams({ | |
| 78 | - action: 'elementor_element_manager_get_admin_app_data', | |
| 79 | - nonce: eElementManagerConfig.nonce | |
| 80 | - }) | |
| 81 | - }); | |
| 82 | - case 1: | |
| 83 | - response = _context2.sent; | |
| 84 | - _context2.next = 2; | |
| 85 | - return response.json(); | |
| 86 | - case 2: | |
| 87 | - data = _context2.sent; | |
| 88 | - if (!data.success) { | |
| 89 | - _context2.next = 3; | |
| 90 | - break; | |
| 91 | - } | |
| 92 | - return _context2.abrupt("return", data.data); | |
| 93 | - case 3: | |
| 94 | - _context2.next = 5; | |
| 95 | - break; | |
| 96 | - case 4: | |
| 97 | - _context2.prev = 4; | |
| 98 | - _t2 = _context2["catch"](0); | |
| 99 | - console.error(_t2); // eslint-disable-line no-console | |
| 100 | - case 5: | |
| 101 | - case "end": | |
| 102 | - return _context2.stop(); | |
| 103 | - } | |
| 104 | - }, _callee2, null, [[0, 4]]); | |
| 105 | - })); | |
| 106 | - return function getAdminAppData() { | |
| 107 | - return _ref2.apply(this, arguments); | |
| 108 | - }; | |
| 109 | -}(); | |
| 110 | -var getUsageWidgets = exports.getUsageWidgets = /*#__PURE__*/function () { | |
| 111 | - var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { | |
| 112 | - var response, data, _t3; | |
| 113 | - return _regenerator.default.wrap(function (_context3) { | |
| 114 | - while (1) switch (_context3.prev = _context3.next) { | |
| 115 | - case 0: | |
| 116 | - _context3.prev = 0; | |
| 117 | - _context3.next = 1; | |
| 118 | - return fetch(eElementManagerConfig.ajaxurl, { | |
| 119 | - method: 'POST', | |
| 120 | - headers: { | |
| 121 | - 'Content-Type': 'application/x-www-form-urlencoded' | |
| 122 | - }, | |
| 123 | - body: new URLSearchParams({ | |
| 124 | - action: 'elementor_element_manager_get_widgets_usage', | |
| 125 | - nonce: eElementManagerConfig.nonce | |
| 126 | - }) | |
| 127 | - }); | |
| 128 | - case 1: | |
| 129 | - response = _context3.sent; | |
| 130 | - _context3.next = 2; | |
| 131 | - return response.json(); | |
| 132 | - case 2: | |
| 133 | - data = _context3.sent; | |
| 134 | - if (!data.success) { | |
| 135 | - _context3.next = 3; | |
| 136 | - break; | |
| 137 | - } | |
| 138 | - return _context3.abrupt("return", data.data); | |
| 139 | - case 3: | |
| 140 | - _context3.next = 5; | |
| 141 | - break; | |
| 142 | - case 4: | |
| 143 | - _context3.prev = 4; | |
| 144 | - _t3 = _context3["catch"](0); | |
| 145 | - console.error(_t3); // eslint-disable-line no-console | |
| 146 | - case 5: | |
| 147 | - case "end": | |
| 148 | - return _context3.stop(); | |
| 149 | - } | |
| 150 | - }, _callee3, null, [[0, 4]]); | |
| 151 | - })); | |
| 152 | - return function getUsageWidgets() { | |
| 153 | - return _ref3.apply(this, arguments); | |
| 154 | - }; | |
| 155 | -}(); | |
| 156 | -var markNoticeViewed = exports.markNoticeViewed = /*#__PURE__*/function () { | |
| 157 | - var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4(noticeId, nonce) { | |
| 158 | - var _t4; | |
| 159 | - return _regenerator.default.wrap(function (_context4) { | |
| 160 | - while (1) switch (_context4.prev = _context4.next) { | |
| 161 | - case 0: | |
| 162 | - _context4.prev = 0; | |
| 163 | - _context4.next = 1; | |
| 164 | - return fetch(eElementManagerConfig.ajaxurl, { | |
| 165 | - method: 'POST', | |
| 166 | - headers: { | |
| 167 | - 'Content-Type': 'application/x-www-form-urlencoded' | |
| 168 | - }, | |
| 169 | - body: new URLSearchParams({ | |
| 170 | - action: 'elementor_set_admin_notice_viewed', | |
| 171 | - notice_id: noticeId, | |
| 172 | - _wpnonce: nonce | |
| 173 | - }) | |
| 174 | - }); | |
| 175 | - case 1: | |
| 176 | - _context4.next = 3; | |
| 177 | - break; | |
| 178 | - case 2: | |
| 179 | - _context4.prev = 2; | |
| 180 | - _t4 = _context4["catch"](0); | |
| 181 | - console.error(_t4); // eslint-disable-line no-console | |
| 182 | - case 3: | |
| 183 | - case "end": | |
| 184 | - return _context4.stop(); | |
| 185 | - } | |
| 186 | - }, _callee4, null, [[0, 2]]); | |
| 187 | - })); | |
| 188 | - return function markNoticeViewed(_x2, _x3) { | |
| 189 | - return _ref4.apply(this, arguments); | |
| 190 | - }; | |
| 191 | -}(); | |
| 192 | - | |
| 193 | -/***/ }), | |
| 194 | - | |
| 195 | -/***/ "../modules/element-manager/assets/js/app-editor-one/App.js": | |
| 196 | -/*!******************************************************************!*\ | |
| 197 | - !*** ../modules/element-manager/assets/js/app-editor-one/App.js ***! | |
| 198 | - \******************************************************************/ | |
| 199 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 200 | - | |
| 201 | -"use strict"; | |
| 202 | - | |
| 203 | - | |
| 204 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 205 | -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 206 | -Object.defineProperty(exports, "__esModule", ({ | |
| 207 | - value: true | |
| 208 | -})); | |
| 209 | -exports.App = void 0; | |
| 210 | -var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); | |
| 211 | -var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 212 | -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 213 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 214 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 215 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 216 | -var _hooks = __webpack_require__(/*! ./hooks */ "../modules/element-manager/assets/js/app-editor-one/hooks/index.js"); | |
| 217 | -var _components = __webpack_require__(/*! ./components */ "../modules/element-manager/assets/js/app-editor-one/components/index.js"); | |
| 218 | -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); } | |
| 219 | -var App = exports.App = function App() { | |
| 220 | - var _useState = (0, _react.useState)(false), | |
| 221 | - _useState2 = (0, _slicedToArray2.default)(_useState, 2), | |
| 222 | - isConfirmDialogOpen = _useState2[0], | |
| 223 | - setIsConfirmDialogOpen = _useState2[1]; | |
| 224 | - var _useElementManager = (0, _hooks.useElementManager)(), | |
| 225 | - isLoading = _useElementManager.isLoading, | |
| 226 | - widgets = _useElementManager.widgets, | |
| 227 | - promotionWidgets = _useElementManager.promotionWidgets, | |
| 228 | - plugins = _useElementManager.plugins, | |
| 229 | - roles = _useElementManager.roles, | |
| 230 | - widgetsDisabled = _useElementManager.widgetsDisabled, | |
| 231 | - widgetsRoleRestrictions = _useElementManager.widgetsRoleRestrictions, | |
| 232 | - setWidgetsRoleRestrictions = _useElementManager.setWidgetsRoleRestrictions, | |
| 233 | - promotionData = _useElementManager.promotionData, | |
| 234 | - noticeData = _useElementManager.noticeData, | |
| 235 | - usageWidgets = _useElementManager.usageWidgets, | |
| 236 | - changeProgress = _useElementManager.changeProgress, | |
| 237 | - isSnackbarOpen = _useElementManager.isSnackbarOpen, | |
| 238 | - setIsSnackbarOpen = _useElementManager.setIsSnackbarOpen, | |
| 239 | - getWidgetUsage = _useElementManager.getWidgetUsage, | |
| 240 | - scanUsageElements = _useElementManager.scanUsageElements, | |
| 241 | - saveChanges = _useElementManager.saveChanges, | |
| 242 | - deactivateAllUnusedWidgets = _useElementManager.deactivateAllUnusedWidgets, | |
| 243 | - enableAllWidgets = _useElementManager.enableAllWidgets, | |
| 244 | - toggleWidget = _useElementManager.toggleWidget, | |
| 245 | - dismissNotice = _useElementManager.dismissNotice; | |
| 246 | - var _useWidgetFilters = (0, _hooks.useWidgetFilters)(widgets, widgetsDisabled, getWidgetUsage), | |
| 247 | - searchKeyword = _useWidgetFilters.searchKeyword, | |
| 248 | - setSearchKeyword = _useWidgetFilters.setSearchKeyword, | |
| 249 | - filterByPlugin = _useWidgetFilters.filterByPlugin, | |
| 250 | - setFilterByPlugin = _useWidgetFilters.setFilterByPlugin, | |
| 251 | - filterByStatus = _useWidgetFilters.filterByStatus, | |
| 252 | - setFilterByStatus = _useWidgetFilters.setFilterByStatus, | |
| 253 | - sortedAndFilteredWidgets = _useWidgetFilters.sortedAndFilteredWidgets, | |
| 254 | - getSortingIndicatorClasses = _useWidgetFilters.getSortingIndicatorClasses, | |
| 255 | - onSortingClicked = _useWidgetFilters.onSortingClicked, | |
| 256 | - setSortByUsage = _useWidgetFilters.setSortByUsage; | |
| 257 | - var handleScanUsage = (0, _react.useCallback)(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 258 | - return _regenerator.default.wrap(function (_context) { | |
| 259 | - while (1) switch (_context.prev = _context.next) { | |
| 260 | - case 0: | |
| 261 | - _context.next = 1; | |
| 262 | - return scanUsageElements(); | |
| 263 | - case 1: | |
| 264 | - setSortByUsage(); | |
| 265 | - case 2: | |
| 266 | - case "end": | |
| 267 | - return _context.stop(); | |
| 268 | - } | |
| 269 | - }, _callee); | |
| 270 | - })), [scanUsageElements, setSortByUsage]); | |
| 271 | - var handleSaveClick = (0, _react.useCallback)(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { | |
| 272 | - return _regenerator.default.wrap(function (_context2) { | |
| 273 | - while (1) switch (_context2.prev = _context2.next) { | |
| 274 | - case 0: | |
| 275 | - setIsConfirmDialogOpen(false); | |
| 276 | - _context2.next = 1; | |
| 277 | - return saveChanges(); | |
| 278 | - case 1: | |
| 279 | - case "end": | |
| 280 | - return _context2.stop(); | |
| 281 | - } | |
| 282 | - }, _callee2); | |
| 283 | - })), [saveChanges]); | |
| 284 | - if (isLoading) { | |
| 285 | - return /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 286 | - justifyContent: "center", | |
| 287 | - sx: { | |
| 288 | - margin: 12 | |
| 289 | - } | |
| 290 | - }, /*#__PURE__*/_react.default.createElement(_ui.CircularProgress, { | |
| 291 | - size: 80 | |
| 292 | - })); | |
| 293 | - } | |
| 294 | - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 295 | - variant: "body2", | |
| 296 | - color: "text.secondary", | |
| 297 | - sx: { | |
| 298 | - marginBlockEnd: 2.5, | |
| 299 | - maxWidth: 800 | |
| 300 | - } | |
| 301 | - }, (0, _i18n.__)('Here\'s where you can fine-tune Elementor to your workflow. Disable elements you don\'t use for a cleaner interface, more focused creative experience, and improved performance.', 'elementor'), ' ', /*#__PURE__*/_react.default.createElement(_ui.Link, { | |
| 302 | - href: "https://go.elementor.com/wp-dash-element-manager/", | |
| 303 | - rel: "noreferrer", | |
| 304 | - target: "_blank", | |
| 305 | - color: "info.light" | |
| 306 | - }, (0, _i18n.__)('Learn More', 'elementor'))), noticeData && !noticeData.is_viewed && /*#__PURE__*/_react.default.createElement(_components.NoticeAlert, { | |
| 307 | - onDismiss: dismissNotice | |
| 308 | - }), /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_components.SearchFilters, { | |
| 309 | - searchKeyword: searchKeyword, | |
| 310 | - onSearchChange: setSearchKeyword, | |
| 311 | - filterByPlugin: filterByPlugin, | |
| 312 | - onPluginFilterChange: setFilterByPlugin, | |
| 313 | - filterByStatus: filterByStatus, | |
| 314 | - onStatusFilterChange: setFilterByStatus, | |
| 315 | - plugins: plugins, | |
| 316 | - usageIsLoading: usageWidgets.isLoading, | |
| 317 | - usageData: usageWidgets.data, | |
| 318 | - widgetsDisabledCount: widgetsDisabled.length, | |
| 319 | - onScanUsage: handleScanUsage, | |
| 320 | - onDeactivateUnused: deactivateAllUnusedWidgets, | |
| 321 | - onEnableAll: enableAllWidgets, | |
| 322 | - onSaveChanges: function onSaveChanges() { | |
| 323 | - return setIsConfirmDialogOpen(true); | |
| 324 | - }, | |
| 325 | - isSaving: changeProgress.isSaving, | |
| 326 | - hasUnsavedChanges: changeProgress.isUnsavedChanges | |
| 327 | - }), /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_components.WidgetsTable, { | |
| 328 | - widgets: sortedAndFilteredWidgets, | |
| 329 | - widgetsDisabled: widgetsDisabled, | |
| 330 | - widgetsRoleRestrictions: widgetsRoleRestrictions, | |
| 331 | - setWidgetsRoleRestrictions: setWidgetsRoleRestrictions, | |
| 332 | - roles: roles, | |
| 333 | - promotionWidgets: promotionWidgets, | |
| 334 | - promotionData: promotionData, | |
| 335 | - usageWidgets: usageWidgets, | |
| 336 | - getWidgetUsage: getWidgetUsage, | |
| 337 | - onScanUsage: handleScanUsage, | |
| 338 | - onToggleWidget: toggleWidget, | |
| 339 | - getSortingIndicatorClasses: getSortingIndicatorClasses, | |
| 340 | - onSortingClicked: onSortingClicked | |
| 341 | - })), /*#__PURE__*/_react.default.createElement(_components.PromotionWidgetsTable, { | |
| 342 | - widgets: promotionWidgets, | |
| 343 | - promotionData: promotionData | |
| 344 | - })), /*#__PURE__*/_react.default.createElement(_components.ConfirmDialog, { | |
| 345 | - isOpen: isConfirmDialogOpen, | |
| 346 | - onClose: function onClose() { | |
| 347 | - return setIsConfirmDialogOpen(false); | |
| 348 | - }, | |
| 349 | - onConfirm: handleSaveClick | |
| 350 | - }), /*#__PURE__*/_react.default.createElement(_ui.Snackbar, { | |
| 351 | - open: isSnackbarOpen, | |
| 352 | - autoHideDuration: 6000, | |
| 353 | - onClose: function onClose() { | |
| 354 | - return setIsSnackbarOpen(false); | |
| 355 | - }, | |
| 356 | - message: (0, _i18n.__)('We saved your changes.', 'elementor'), | |
| 357 | - anchorOrigin: { | |
| 358 | - vertical: 'bottom', | |
| 359 | - horizontal: 'center' | |
| 360 | - } | |
| 361 | - })); | |
| 362 | -}; | |
| 363 | - | |
| 364 | -/***/ }), | |
| 365 | - | |
| 366 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/ConfirmDialog.js": | |
| 367 | -/*!***************************************************************************************!*\ | |
| 368 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/ConfirmDialog.js ***! | |
| 369 | - \***************************************************************************************/ | |
| 370 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 371 | - | |
| 372 | -"use strict"; | |
| 373 | - | |
| 374 | - | |
| 375 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 376 | -Object.defineProperty(exports, "__esModule", ({ | |
| 377 | - value: true | |
| 378 | -})); | |
| 379 | -exports.ConfirmDialog = void 0; | |
| 380 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 381 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 382 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 383 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 384 | -var ConfirmDialog = exports.ConfirmDialog = function ConfirmDialog(_ref) { | |
| 385 | - var isOpen = _ref.isOpen, | |
| 386 | - onClose = _ref.onClose, | |
| 387 | - onConfirm = _ref.onConfirm; | |
| 388 | - return /*#__PURE__*/_react.default.createElement(_ui.Dialog, { | |
| 389 | - open: isOpen, | |
| 390 | - onClose: onClose, | |
| 391 | - maxWidth: "sm" | |
| 392 | - }, /*#__PURE__*/_react.default.createElement(_ui.DialogTitle, null, (0, _i18n.__)('Sure you want to save these changes?', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.DialogContent, null, /*#__PURE__*/_react.default.createElement(_ui.DialogContentText, null, (0, _i18n.__)('Turning widgets off will hide them from the editor panel, and can potentially affect your layout or front-end.', 'elementor'), /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 393 | - component: "span", | |
| 394 | - sx: { | |
| 395 | - display: 'block', | |
| 396 | - mt: 2.5 | |
| 397 | - } | |
| 398 | - }, (0, _i18n.__)('If you\'re adding widgets back in, enjoy them!', 'elementor')))), /*#__PURE__*/_react.default.createElement(_ui.DialogActions, null, /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 399 | - direction: "row", | |
| 400 | - gap: 2, | |
| 401 | - justifyContent: "flex-end" | |
| 402 | - }, /*#__PURE__*/_react.default.createElement(_ui.Button, { | |
| 403 | - variant: "outlined", | |
| 404 | - color: "secondary", | |
| 405 | - onClick: onClose, | |
| 406 | - className: "e-id-elementor-element-manager-modal-button-cancel" | |
| 407 | - }, (0, _i18n.__)('Cancel', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Button, { | |
| 408 | - variant: "contained", | |
| 409 | - onClick: onConfirm, | |
| 410 | - className: "e-id-elementor-element-manager-modal-button-save" | |
| 411 | - }, (0, _i18n.__)('Save', 'elementor'))))); | |
| 412 | -}; | |
| 413 | -ConfirmDialog.propTypes = { | |
| 414 | - isOpen: _propTypes.default.bool.isRequired, | |
| 415 | - onClose: _propTypes.default.func.isRequired, | |
| 416 | - onConfirm: _propTypes.default.func.isRequired | |
| 417 | -}; | |
| 418 | - | |
| 419 | -/***/ }), | |
| 420 | - | |
| 421 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/NoticeAlert.js": | |
| 422 | -/*!*************************************************************************************!*\ | |
| 423 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/NoticeAlert.js ***! | |
| 424 | - \*************************************************************************************/ | |
| 425 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 426 | - | |
| 427 | -"use strict"; | |
| 428 | - | |
| 429 | - | |
| 430 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 431 | -Object.defineProperty(exports, "__esModule", ({ | |
| 432 | - value: true | |
| 433 | -})); | |
| 434 | -exports.NoticeAlert = void 0; | |
| 435 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 436 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 437 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 438 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 439 | -var NoticeAlert = exports.NoticeAlert = function NoticeAlert(_ref) { | |
| 440 | - var onDismiss = _ref.onDismiss; | |
| 441 | - return /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 442 | - sx: { | |
| 443 | - mb: 2 | |
| 444 | - } | |
| 445 | - }, /*#__PURE__*/_react.default.createElement(_ui.Alert, { | |
| 446 | - severity: "warning", | |
| 447 | - onClose: onDismiss | |
| 448 | - }, /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 449 | - component: "strong", | |
| 450 | - variant: "body2", | |
| 451 | - sx: { | |
| 452 | - fontWeight: 700 | |
| 453 | - } | |
| 454 | - }, (0, _i18n.__)('Before you continue:', 'elementor')), ' ', (0, _i18n.__)('Deactivating widgets here will remove them from both the Elementor Editor and your website, which can cause changes to your overall layout, design and what visitors see.', 'elementor'))); | |
| 455 | -}; | |
| 456 | -NoticeAlert.propTypes = { | |
| 457 | - onDismiss: _propTypes.default.func.isRequired | |
| 458 | -}; | |
| 459 | - | |
| 460 | -/***/ }), | |
| 461 | - | |
| 462 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/PromotionWidgetsTable.js": | |
| 463 | -/*!***********************************************************************************************!*\ | |
| 464 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/PromotionWidgetsTable.js ***! | |
| 465 | - \***********************************************************************************************/ | |
| 466 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 467 | - | |
| 468 | -"use strict"; | |
| 469 | - | |
| 470 | - | |
| 471 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 472 | -Object.defineProperty(exports, "__esModule", ({ | |
| 473 | - value: true | |
| 474 | -})); | |
| 475 | -exports.PromotionWidgetsTable = void 0; | |
| 476 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 477 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 478 | -var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 479 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 480 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 481 | -var _upgradeButton = __webpack_require__(/*! ../../upgrade-button */ "../modules/element-manager/assets/js/upgrade-button.js"); | |
| 482 | -var _RolePermissions = __webpack_require__(/*! ./RolePermissions */ "../modules/element-manager/assets/js/app-editor-one/components/RolePermissions.js"); | |
| 483 | -var PromotionWidgetsTable = exports.PromotionWidgetsTable = function PromotionWidgetsTable(_ref) { | |
| 484 | - var widgets = _ref.widgets, | |
| 485 | - promotionData = _ref.promotionData; | |
| 486 | - var elementManager = promotionData.element_manager; | |
| 487 | - if (!widgets.length) { | |
| 488 | - return null; | |
| 489 | - } | |
| 490 | - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 491 | - sx: { | |
| 492 | - mt: 5, | |
| 493 | - mb: 2.5 | |
| 494 | - } | |
| 495 | - }, /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 496 | - direction: "row", | |
| 497 | - justifyContent: "space-between", | |
| 498 | - alignItems: "center" | |
| 499 | - }, /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 500 | - variant: "h6", | |
| 501 | - component: "h3" | |
| 502 | - }, (0, _i18n.__)('Elementor Pro Elements', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 503 | - variant: "body2", | |
| 504 | - component: "p" | |
| 505 | - }, (0, _i18n.__)('Unleash the full power of Elementor\'s features and web creation tools.', 'elementor'))), /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_upgradeButton.UpgradeButton, { | |
| 506 | - href: elementManager.url, | |
| 507 | - text: elementManager.text, | |
| 508 | - className: "e-id-elementor-element-manager-button-upgrade-pro-elements" | |
| 509 | - })))), /*#__PURE__*/_react.default.createElement(_ui.TableContainer, { | |
| 510 | - component: _ui.Paper, | |
| 511 | - variant: "outlined" | |
| 512 | - }, /*#__PURE__*/_react.default.createElement(_ui.Table, { | |
| 513 | - size: "small" | |
| 514 | - }, /*#__PURE__*/_react.default.createElement(_ui.TableHead, null, /*#__PURE__*/_react.default.createElement(_ui.TableRow, null, /*#__PURE__*/_react.default.createElement(_ui.TableCell, { | |
| 515 | - sx: function sx(theme) { | |
| 516 | - return { | |
| 517 | - width: theme.spacing(25) | |
| 518 | - }; | |
| 519 | - } | |
| 520 | - }, (0, _i18n.__)('Element', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.TableCell, { | |
| 521 | - sx: function sx(theme) { | |
| 522 | - return { | |
| 523 | - width: theme.spacing(10) | |
| 524 | - }; | |
| 525 | - } | |
| 526 | - }, (0, _i18n.__)('Status', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, (0, _i18n.__)('Usage', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, (0, _i18n.__)('Plugin', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 527 | - direction: "row", | |
| 528 | - justifyContent: "flex-start", | |
| 529 | - alignItems: "center", | |
| 530 | - gap: 1 | |
| 531 | - }, /*#__PURE__*/_react.default.createElement(_ui.Box, null, (0, _i18n.__)('Permission', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_ui.Tooltip, { | |
| 532 | - placement: "top", | |
| 533 | - title: (0, _i18n.__)('Choose which role will have access to a specific widget.', 'elementor') | |
| 534 | - }, /*#__PURE__*/_react.default.createElement(_ui.IconButton, { | |
| 535 | - size: "small" | |
| 536 | - }, /*#__PURE__*/_react.default.createElement(_icons.HelpIcon, { | |
| 537 | - fontSize: "small" | |
| 538 | - })))))))), /*#__PURE__*/_react.default.createElement(_ui.TableBody, null, widgets.map(function (widget) { | |
| 539 | - return /*#__PURE__*/_react.default.createElement(_ui.TableRow, { | |
| 540 | - key: widget.name, | |
| 541 | - hover: true | |
| 542 | - }, /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 543 | - sx: { | |
| 544 | - display: 'flex', | |
| 545 | - alignItems: 'center' | |
| 546 | - } | |
| 547 | - }, /*#__PURE__*/_react.default.createElement("i", { | |
| 548 | - style: { | |
| 549 | - marginInlineEnd: 8 | |
| 550 | - }, | |
| 551 | - className: widget.icon | |
| 552 | - }), widget.title)), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_ui.Switch, { | |
| 553 | - checked: false, | |
| 554 | - disabled: true, | |
| 555 | - size: "small", | |
| 556 | - "data-id": "e-id-elementor-element-manager-toggle-".concat(widget.name) | |
| 557 | - })), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, (0, _i18n.__)('Elementor Pro', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_RolePermissions.EditButtonDisabled, { | |
| 558 | - widgetName: widget.name | |
| 559 | - }))); | |
| 560 | - }))))); | |
| 561 | -}; | |
| 562 | -PromotionWidgetsTable.propTypes = { | |
| 563 | - widgets: _propTypes.default.arrayOf(_propTypes.default.shape({ | |
| 564 | - name: _propTypes.default.string.isRequired, | |
| 565 | - title: _propTypes.default.string.isRequired, | |
| 566 | - icon: _propTypes.default.string | |
| 567 | - })).isRequired, | |
| 568 | - promotionData: _propTypes.default.shape({ | |
| 569 | - element_manager: _propTypes.default.shape({ | |
| 570 | - url: _propTypes.default.string, | |
| 571 | - text: _propTypes.default.string | |
| 572 | - }) | |
| 573 | - }).isRequired | |
| 574 | -}; | |
| 575 | - | |
| 576 | -/***/ }), | |
| 577 | - | |
| 578 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/RolePermissions.js": | |
| 579 | -/*!*****************************************************************************************!*\ | |
| 580 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/RolePermissions.js ***! | |
| 581 | - \*****************************************************************************************/ | |
| 582 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 583 | - | |
| 584 | -"use strict"; | |
| 585 | - | |
| 586 | - | |
| 587 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 588 | -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 589 | -Object.defineProperty(exports, "__esModule", ({ | |
| 590 | - value: true | |
| 591 | -})); | |
| 592 | -exports.RolePermissions = exports.EditButtonDisabled = void 0; | |
| 593 | -var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); | |
| 594 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 595 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 596 | -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); | |
| 597 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 598 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 599 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 600 | -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); } | |
| 601 | -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; } | |
| 602 | -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; } | |
| 603 | -var toggleRoleRestrictions = function toggleRoleRestrictions(widgetName, roleId, widgetsRoleRestrictions, setWidgetsRoleRestrictions) { | |
| 604 | - var widgetRoleRestrictions = (0, _toConsumableArray2.default)(widgetsRoleRestrictions[widgetName] || []); | |
| 605 | - if (widgetRoleRestrictions.includes(roleId)) { | |
| 606 | - widgetRoleRestrictions.splice(widgetRoleRestrictions.indexOf(roleId), 1); | |
| 607 | - } else { | |
| 608 | - widgetRoleRestrictions.push(roleId); | |
| 609 | - } | |
| 610 | - setWidgetsRoleRestrictions(_objectSpread(_objectSpread({}, widgetsRoleRestrictions), {}, (0, _defineProperty2.default)({}, widgetName, widgetRoleRestrictions))); | |
| 611 | -}; | |
| 612 | -var RolesList = function RolesList(_ref) { | |
| 613 | - var roles = _ref.roles, | |
| 614 | - widgetRoleRestrictions = _ref.widgetRoleRestrictions; | |
| 615 | - var rolesEnabled = roles.filter(function (role) { | |
| 616 | - return !widgetRoleRestrictions.includes(role.id); | |
| 617 | - }); | |
| 618 | - if (!rolesEnabled.length) { | |
| 619 | - return /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 620 | - component: "span", | |
| 621 | - variant: "body2", | |
| 622 | - color: "text.primary" | |
| 623 | - }, "(", (0, _i18n.__)('Admin', 'elementor'), ")"); | |
| 624 | - } | |
| 625 | - if (rolesEnabled.length === roles.length) { | |
| 626 | - return /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 627 | - component: "span", | |
| 628 | - variant: "body2", | |
| 629 | - color: "text.primary" | |
| 630 | - }, "(", (0, _i18n.__)('All Roles', 'elementor'), ")"); | |
| 631 | - } | |
| 632 | - return /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 633 | - component: "span", | |
| 634 | - variant: "body2", | |
| 635 | - color: "text.primary" | |
| 636 | - }, "(", rolesEnabled.map(function (role) { | |
| 637 | - return role.name; | |
| 638 | - }).join(', '), ")"); | |
| 639 | -}; | |
| 640 | -RolesList.propTypes = { | |
| 641 | - roles: _propTypes.default.arrayOf(_propTypes.default.shape({ | |
| 642 | - id: _propTypes.default.string.isRequired, | |
| 643 | - name: _propTypes.default.string.isRequired | |
| 644 | - })).isRequired, | |
| 645 | - widgetRoleRestrictions: _propTypes.default.arrayOf(_propTypes.default.string).isRequired | |
| 646 | -}; | |
| 647 | -var RolePermissions = exports.RolePermissions = function RolePermissions(_ref2) { | |
| 648 | - var roles = _ref2.roles, | |
| 649 | - widgetName = _ref2.widgetName, | |
| 650 | - widgetsRoleRestrictions = _ref2.widgetsRoleRestrictions, | |
| 651 | - setWidgetsRoleRestrictions = _ref2.setWidgetsRoleRestrictions; | |
| 652 | - var _useState = (0, _react.useState)(null), | |
| 653 | - _useState2 = (0, _slicedToArray2.default)(_useState, 2), | |
| 654 | - anchorEl = _useState2[0], | |
| 655 | - setAnchorEl = _useState2[1]; | |
| 656 | - var isOpen = Boolean(anchorEl); | |
| 657 | - var widgetRoleRestrictions = widgetsRoleRestrictions[widgetName] || []; | |
| 658 | - var handleClick = (0, _react.useCallback)(function (event) { | |
| 659 | - setAnchorEl(event.currentTarget); | |
| 660 | - }, []); | |
| 661 | - var handleClose = (0, _react.useCallback)(function () { | |
| 662 | - setAnchorEl(null); | |
| 663 | - }, []); | |
| 664 | - var isAllChecked = roles.every(function (role) { | |
| 665 | - return !widgetRoleRestrictions.includes(role.id); | |
| 666 | - }); | |
| 667 | - var isIndeterminate = !isAllChecked && roles.some(function (role) { | |
| 668 | - return !widgetRoleRestrictions.includes(role.id); | |
| 669 | - }); | |
| 670 | - var handleAllChange = (0, _react.useCallback)(function (event) { | |
| 671 | - if (event.target.checked) { | |
| 672 | - setWidgetsRoleRestrictions(_objectSpread(_objectSpread({}, widgetsRoleRestrictions), {}, (0, _defineProperty2.default)({}, widgetName, []))); | |
| 673 | - } else { | |
| 674 | - setWidgetsRoleRestrictions(_objectSpread(_objectSpread({}, widgetsRoleRestrictions), {}, (0, _defineProperty2.default)({}, widgetName, roles.map(function (role) { | |
| 675 | - return role.id; | |
| 676 | - })))); | |
| 677 | - } | |
| 678 | - }, [widgetName, widgetsRoleRestrictions, setWidgetsRoleRestrictions, roles]); | |
| 679 | - return /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 680 | - sx: { | |
| 681 | - display: 'inline-flex', | |
| 682 | - alignItems: 'center', | |
| 683 | - gap: 0.5 | |
| 684 | - } | |
| 685 | - }, /*#__PURE__*/_react.default.createElement(_ui.Button, { | |
| 686 | - variant: "text", | |
| 687 | - color: "secondary", | |
| 688 | - size: "small", | |
| 689 | - onClick: handleClick, | |
| 690 | - "aria-expanded": isOpen, | |
| 691 | - "aria-haspopup": "true", | |
| 692 | - className: "e-id-elementor-element-manager-button-edit-permissions-".concat(widgetName) | |
| 693 | - }, (0, _i18n.__)('Edit', 'elementor')), /*#__PURE__*/_react.default.createElement(RolesList, { | |
| 694 | - roles: roles, | |
| 695 | - widgetRoleRestrictions: widgetRoleRestrictions | |
| 696 | - }), /*#__PURE__*/_react.default.createElement(_ui.Menu, { | |
| 697 | - anchorEl: anchorEl, | |
| 698 | - open: isOpen, | |
| 699 | - onClose: handleClose, | |
| 700 | - anchorOrigin: { | |
| 701 | - vertical: 'bottom', | |
| 702 | - horizontal: 'left' | |
| 703 | - }, | |
| 704 | - transformOrigin: { | |
| 705 | - vertical: 'top', | |
| 706 | - horizontal: 'left' | |
| 707 | - } | |
| 708 | - }, /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { | |
| 709 | - sx: { | |
| 710 | - py: 0.5 | |
| 711 | - } | |
| 712 | - }, /*#__PURE__*/_react.default.createElement(_ui.FormControlLabel, { | |
| 713 | - control: /*#__PURE__*/_react.default.createElement(_ui.Checkbox, { | |
| 714 | - checked: isAllChecked, | |
| 715 | - indeterminate: isIndeterminate, | |
| 716 | - onChange: handleAllChange, | |
| 717 | - size: "small", | |
| 718 | - color: "secondary" | |
| 719 | - }), | |
| 720 | - label: (0, _i18n.__)('All', 'elementor') | |
| 721 | - })), roles.map(function (role) { | |
| 722 | - return /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { | |
| 723 | - key: role.id, | |
| 724 | - sx: { | |
| 725 | - py: 0.5 | |
| 726 | - } | |
| 727 | - }, /*#__PURE__*/_react.default.createElement(_ui.FormControlLabel, { | |
| 728 | - control: /*#__PURE__*/_react.default.createElement(_ui.Checkbox, { | |
| 729 | - color: "secondary", | |
| 730 | - checked: !widgetRoleRestrictions.includes(role.id), | |
| 731 | - onChange: function onChange() { | |
| 732 | - toggleRoleRestrictions(widgetName, role.id, widgetsRoleRestrictions, setWidgetsRoleRestrictions); | |
| 733 | - }, | |
| 734 | - size: "small" | |
| 735 | - }), | |
| 736 | - label: role.name | |
| 737 | - })); | |
| 738 | - }))); | |
| 739 | -}; | |
| 740 | -RolePermissions.propTypes = { | |
| 741 | - roles: _propTypes.default.arrayOf(_propTypes.default.shape({ | |
| 742 | - id: _propTypes.default.string.isRequired, | |
| 743 | - name: _propTypes.default.string.isRequired | |
| 744 | - })).isRequired, | |
| 745 | - widgetName: _propTypes.default.string.isRequired, | |
| 746 | - widgetsRoleRestrictions: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.array]).isRequired, | |
| 747 | - setWidgetsRoleRestrictions: _propTypes.default.func.isRequired | |
| 748 | -}; | |
| 749 | -var EditButtonDisabled = exports.EditButtonDisabled = function EditButtonDisabled(_ref3) { | |
| 750 | - var _ref3$widgetName = _ref3.widgetName, | |
| 751 | - widgetName = _ref3$widgetName === void 0 ? 'unknown' : _ref3$widgetName; | |
| 752 | - return /*#__PURE__*/_react.default.createElement(_ui.Button, { | |
| 753 | - variant: "text", | |
| 754 | - color: "secondary", | |
| 755 | - size: "small", | |
| 756 | - disabled: true, | |
| 757 | - className: "e-id-elementor-element-manager-button-edit-permissions-".concat(widgetName) | |
| 758 | - }, (0, _i18n.__)('Edit', 'elementor')); | |
| 759 | -}; | |
| 760 | -EditButtonDisabled.propTypes = { | |
| 761 | - widgetName: _propTypes.default.string | |
| 762 | -}; | |
| 763 | - | |
| 764 | -/***/ }), | |
| 765 | - | |
| 766 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/SearchFilters.js": | |
| 767 | -/*!***************************************************************************************!*\ | |
| 768 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/SearchFilters.js ***! | |
| 769 | - \***************************************************************************************/ | |
| 770 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 771 | - | |
| 772 | -"use strict"; | |
| 773 | - | |
| 774 | - | |
| 775 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 776 | -Object.defineProperty(exports, "__esModule", ({ | |
| 777 | - value: true | |
| 778 | -})); | |
| 779 | -exports.SearchFilters = void 0; | |
| 780 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 781 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 782 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 783 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 784 | -var FIELD_HEIGHT = 28; | |
| 785 | -var FONT_SIZE = 12; | |
| 786 | -var ICON_SIZE = 16; | |
| 787 | -var StyledTextField = (0, _ui.styled)(_ui.TextField)({ | |
| 788 | - '& .MuiInputBase-root': { | |
| 789 | - height: FIELD_HEIGHT, | |
| 790 | - fontSize: FONT_SIZE | |
| 791 | - } | |
| 792 | -}); | |
| 793 | -var StyledFormControl = (0, _ui.styled)(_ui.FormControl)({ | |
| 794 | - '& .MuiInputBase-root': { | |
| 795 | - height: FIELD_HEIGHT, | |
| 796 | - fontSize: FONT_SIZE | |
| 797 | - }, | |
| 798 | - '& .MuiSelect-icon': { | |
| 799 | - width: ICON_SIZE, | |
| 800 | - height: ICON_SIZE, | |
| 801 | - top: 'calc(50% - 8px)' | |
| 802 | - } | |
| 803 | -}); | |
| 804 | -var StyledButton = (0, _ui.styled)(_ui.Button)({ | |
| 805 | - height: FIELD_HEIGHT, | |
| 806 | - fontSize: FONT_SIZE, | |
| 807 | - minWidth: 'auto', | |
| 808 | - whiteSpace: 'nowrap' | |
| 809 | -}); | |
| 810 | -var SearchFilters = exports.SearchFilters = function SearchFilters(_ref) { | |
| 811 | - var searchKeyword = _ref.searchKeyword, | |
| 812 | - onSearchChange = _ref.onSearchChange, | |
| 813 | - filterByPlugin = _ref.filterByPlugin, | |
| 814 | - onPluginFilterChange = _ref.onPluginFilterChange, | |
| 815 | - filterByStatus = _ref.filterByStatus, | |
| 816 | - onStatusFilterChange = _ref.onStatusFilterChange, | |
| 817 | - plugins = _ref.plugins, | |
| 818 | - usageIsLoading = _ref.usageIsLoading, | |
| 819 | - usageData = _ref.usageData, | |
| 820 | - widgetsDisabledCount = _ref.widgetsDisabledCount, | |
| 821 | - onScanUsage = _ref.onScanUsage, | |
| 822 | - onDeactivateUnused = _ref.onDeactivateUnused, | |
| 823 | - onEnableAll = _ref.onEnableAll, | |
| 824 | - onSaveChanges = _ref.onSaveChanges, | |
| 825 | - isSaving = _ref.isSaving, | |
| 826 | - hasUnsavedChanges = _ref.hasUnsavedChanges; | |
| 827 | - return /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 828 | - direction: { | |
| 829 | - xs: 'column', | |
| 830 | - sm: 'row' | |
| 831 | - }, | |
| 832 | - alignItems: { | |
| 833 | - xs: 'stretch', | |
| 834 | - sm: 'flex-start' | |
| 835 | - }, | |
| 836 | - gap: 1.5, | |
| 837 | - sx: function sx(theme) { | |
| 838 | - return { | |
| 839 | - position: 'sticky', | |
| 840 | - top: 0, | |
| 841 | - '@media screen and (max-width: 782px)': { | |
| 842 | - top: 'calc(var(--e-admin-bar-height, 0px) + var(--e-top-bar-header-height, 0px))' | |
| 843 | - }, | |
| 844 | - backgroundColor: 'var(--e-one-palette-background-default)', | |
| 845 | - zIndex: 10, | |
| 846 | - paddingBlock: 2, | |
| 847 | - paddingInline: 2, | |
| 848 | - boxShadow: 'rgba(0, 0, 0, 0.15) 0 5px 10px 0', | |
| 849 | - marginBottom: theme.spacing(1) | |
| 850 | - }; | |
| 851 | - } | |
| 852 | - }, /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 853 | - direction: "row", | |
| 854 | - alignItems: "center", | |
| 855 | - flexWrap: "wrap", | |
| 856 | - gap: 1.5, | |
| 857 | - sx: { | |
| 858 | - flex: 1 | |
| 859 | - } | |
| 860 | - }, /*#__PURE__*/_react.default.createElement(StyledTextField, { | |
| 861 | - color: "secondary", | |
| 862 | - value: searchKeyword, | |
| 863 | - size: "small", | |
| 864 | - placeholder: (0, _i18n.__)('Search', 'elementor'), | |
| 865 | - onChange: function onChange(e) { | |
| 866 | - return onSearchChange(e.target.value); | |
| 867 | - }, | |
| 868 | - sx: function sx(theme) { | |
| 869 | - return { | |
| 870 | - minWidth: theme.spacing(14) | |
| 871 | - }; | |
| 872 | - } | |
| 873 | - }), /*#__PURE__*/_react.default.createElement(StyledFormControl, { | |
| 874 | - size: "small", | |
| 875 | - sx: function sx(theme) { | |
| 876 | - return { | |
| 877 | - width: theme.spacing(20) | |
| 878 | - }; | |
| 879 | - }, | |
| 880 | - color: "secondary" | |
| 881 | - }, /*#__PURE__*/_react.default.createElement(_ui.Select, { | |
| 882 | - placeholder: (0, _i18n.__)('Plugin', 'elementor'), | |
| 883 | - value: filterByPlugin, | |
| 884 | - onChange: function onChange(event) { | |
| 885 | - return onPluginFilterChange(event.target.value); | |
| 886 | - }, | |
| 887 | - "data-id": "elementor-element-manager-select-filter-by-plugin", | |
| 888 | - displayEmpty: true, | |
| 889 | - renderValue: function renderValue(value) { | |
| 890 | - if ('' === value) { | |
| 891 | - return (0, _i18n.__)('All Plugins', 'elementor'); | |
| 892 | - } | |
| 893 | - var selectedPlugin = plugins.find(function (p) { | |
| 894 | - return p.value === value; | |
| 895 | - }); | |
| 896 | - return selectedPlugin ? selectedPlugin.label : value; | |
| 897 | - } | |
| 898 | - }, /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { | |
| 899 | - value: "" | |
| 900 | - }, (0, _i18n.__)('All Plugins', 'elementor')), plugins.map(function (plugin) { | |
| 901 | - return /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { | |
| 902 | - key: plugin.value, | |
| 903 | - value: plugin.value | |
| 904 | - }, plugin.label); | |
| 905 | - }))), /*#__PURE__*/_react.default.createElement(StyledFormControl, { | |
| 906 | - size: "small", | |
| 907 | - sx: function sx(theme) { | |
| 908 | - return { | |
| 909 | - width: theme.spacing(20) | |
| 910 | - }; | |
| 911 | - }, | |
| 912 | - color: "secondary" | |
| 913 | - }, /*#__PURE__*/_react.default.createElement(_ui.Select, { | |
| 914 | - value: filterByStatus, | |
| 915 | - onChange: function onChange(event) { | |
| 916 | - return onStatusFilterChange(event.target.value); | |
| 917 | - }, | |
| 918 | - "data-id": "elementor-element-manager-select-filter-by-status", | |
| 919 | - placeholder: (0, _i18n.__)('Status', 'elementor') | |
| 920 | - }, /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { | |
| 921 | - value: "all" | |
| 922 | - }, (0, _i18n.__)('All Statuses', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { | |
| 923 | - value: "active" | |
| 924 | - }, (0, _i18n.__)('Active', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { | |
| 925 | - value: "inactive" | |
| 926 | - }, (0, _i18n.__)('Inactive', 'elementor')))), /*#__PURE__*/_react.default.createElement(_ui.Divider, { | |
| 927 | - orientation: "vertical", | |
| 928 | - flexItem: true, | |
| 929 | - sx: { | |
| 930 | - height: FIELD_HEIGHT, | |
| 931 | - marginBlock: 0, | |
| 932 | - marginInline: 0.5, | |
| 933 | - alignSelf: 'center', | |
| 934 | - display: { | |
| 935 | - xs: 'none', | |
| 936 | - md: 'block' | |
| 937 | - } | |
| 938 | - } | |
| 939 | - }), /*#__PURE__*/_react.default.createElement(StyledButton, { | |
| 940 | - variant: "outlined", | |
| 941 | - color: "secondary", | |
| 942 | - size: "small", | |
| 943 | - disabled: usageIsLoading, | |
| 944 | - onClick: onScanUsage, | |
| 945 | - "data-id": "e-id-elementor-element-manager-button-scan-element-usage", | |
| 946 | - loading: usageIsLoading | |
| 947 | - }, (0, _i18n.__)('Scan Element Usage', 'elementor')), /*#__PURE__*/_react.default.createElement(StyledButton, { | |
| 948 | - variant: "outlined", | |
| 949 | - color: "secondary", | |
| 950 | - size: "small", | |
| 951 | - onClick: onDeactivateUnused, | |
| 952 | - disabled: null === usageData, | |
| 953 | - "data-id": "e-id-elementor-element-manager-button-deactivate-unused-elements" | |
| 954 | - }, (0, _i18n.__)('Deactivate Unused Elements', 'elementor')), /*#__PURE__*/_react.default.createElement(StyledButton, { | |
| 955 | - variant: "outlined", | |
| 956 | - color: "secondary", | |
| 957 | - size: "small", | |
| 958 | - disabled: !widgetsDisabledCount, | |
| 959 | - onClick: onEnableAll, | |
| 960 | - "data-id": "e-id-elementor-element-manager-button-enable-all" | |
| 961 | - }, (0, _i18n.__)('Enable All', 'elementor'))), /*#__PURE__*/_react.default.createElement(StyledButton, { | |
| 962 | - variant: "contained", | |
| 963 | - size: "small", | |
| 964 | - disabled: isSaving || !hasUnsavedChanges, | |
| 965 | - onClick: onSaveChanges, | |
| 966 | - "data-id": "e-id-elementor-element-manager-button-save-changes", | |
| 967 | - loading: isSaving, | |
| 968 | - sx: { | |
| 969 | - alignSelf: 'flex-start' | |
| 970 | - } | |
| 971 | - }, (0, _i18n.__)('Save Changes', 'elementor'))); | |
| 972 | -}; | |
| 973 | -SearchFilters.propTypes = { | |
| 974 | - searchKeyword: _propTypes.default.string.isRequired, | |
| 975 | - onSearchChange: _propTypes.default.func.isRequired, | |
| 976 | - filterByPlugin: _propTypes.default.string.isRequired, | |
| 977 | - onPluginFilterChange: _propTypes.default.func.isRequired, | |
| 978 | - filterByStatus: _propTypes.default.string.isRequired, | |
| 979 | - onStatusFilterChange: _propTypes.default.func.isRequired, | |
| 980 | - plugins: _propTypes.default.arrayOf(_propTypes.default.shape({ | |
| 981 | - label: _propTypes.default.string.isRequired, | |
| 982 | - value: _propTypes.default.string.isRequired | |
| 983 | - })).isRequired, | |
| 984 | - usageIsLoading: _propTypes.default.bool, | |
| 985 | - usageData: _propTypes.default.object, | |
| 986 | - widgetsDisabledCount: _propTypes.default.number.isRequired, | |
| 987 | - onScanUsage: _propTypes.default.func.isRequired, | |
| 988 | - onDeactivateUnused: _propTypes.default.func.isRequired, | |
| 989 | - onEnableAll: _propTypes.default.func.isRequired, | |
| 990 | - onSaveChanges: _propTypes.default.func.isRequired, | |
| 991 | - isSaving: _propTypes.default.bool, | |
| 992 | - hasUnsavedChanges: _propTypes.default.bool | |
| 993 | -}; | |
| 994 | - | |
| 995 | -/***/ }), | |
| 996 | - | |
| 997 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/UsageTimesColumn.js": | |
| 998 | -/*!******************************************************************************************!*\ | |
| 999 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/UsageTimesColumn.js ***! | |
| 1000 | - \******************************************************************************************/ | |
| 1001 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1002 | - | |
| 1003 | -"use strict"; | |
| 1004 | - | |
| 1005 | - | |
| 1006 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1007 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1008 | - value: true | |
| 1009 | -})); | |
| 1010 | -exports.UsageTimesColumn = void 0; | |
| 1011 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 1012 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1013 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 1014 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 1015 | -var UsageTimesColumn = exports.UsageTimesColumn = function UsageTimesColumn(_ref) { | |
| 1016 | - var widgetName = _ref.widgetName, | |
| 1017 | - usageData = _ref.usageData, | |
| 1018 | - isLoading = _ref.isLoading, | |
| 1019 | - getWidgetUsage = _ref.getWidgetUsage, | |
| 1020 | - onScanClick = _ref.onScanClick; | |
| 1021 | - if (null !== usageData) { | |
| 1022 | - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, getWidgetUsage(widgetName), " ", (0, _i18n.__)('times', 'elementor')); | |
| 1023 | - } | |
| 1024 | - if (isLoading) { | |
| 1025 | - return /*#__PURE__*/_react.default.createElement(_ui.CircularProgress, { | |
| 1026 | - color: "secondary", | |
| 1027 | - size: 20 | |
| 1028 | - }); | |
| 1029 | - } | |
| 1030 | - return /*#__PURE__*/_react.default.createElement(_ui.Button, { | |
| 1031 | - onClick: onScanClick, | |
| 1032 | - size: "small", | |
| 1033 | - variant: "outlined", | |
| 1034 | - color: "secondary", | |
| 1035 | - className: "e-id-elementor-element-manager-button-show-usage", | |
| 1036 | - sx: { | |
| 1037 | - minWidth: function minWidth(theme) { | |
| 1038 | - return theme.spacing(6); | |
| 1039 | - }, | |
| 1040 | - height: 26 | |
| 1041 | - } | |
| 1042 | - }, (0, _i18n.__)('Show', 'elementor')); | |
| 1043 | -}; | |
| 1044 | -UsageTimesColumn.propTypes = { | |
| 1045 | - widgetName: _propTypes.default.string.isRequired, | |
| 1046 | - usageData: _propTypes.default.object, | |
| 1047 | - isLoading: _propTypes.default.bool, | |
| 1048 | - getWidgetUsage: _propTypes.default.func.isRequired, | |
| 1049 | - onScanClick: _propTypes.default.func.isRequired | |
| 1050 | -}; | |
| 1051 | - | |
| 1052 | -/***/ }), | |
| 1053 | - | |
| 1054 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/WidgetsTable.js": | |
| 1055 | -/*!**************************************************************************************!*\ | |
| 1056 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/WidgetsTable.js ***! | |
| 1057 | - \**************************************************************************************/ | |
| 1058 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1059 | - | |
| 1060 | -"use strict"; | |
| 1061 | - | |
| 1062 | - | |
| 1063 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1064 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1065 | - value: true | |
| 1066 | -})); | |
| 1067 | -exports.WidgetsTable = void 0; | |
| 1068 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 1069 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1070 | -var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 1071 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 1072 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 1073 | -var _upgradeButton = __webpack_require__(/*! ../../upgrade-button */ "../modules/element-manager/assets/js/upgrade-button.js"); | |
| 1074 | -var _RolePermissions = __webpack_require__(/*! ./RolePermissions */ "../modules/element-manager/assets/js/app-editor-one/components/RolePermissions.js"); | |
| 1075 | -var _UsageTimesColumn = __webpack_require__(/*! ./UsageTimesColumn */ "../modules/element-manager/assets/js/app-editor-one/components/UsageTimesColumn.js"); | |
| 1076 | -var StyledSwitch = (0, _ui.styled)(_ui.Switch)({ | |
| 1077 | - '& .MuiSwitch-track': { | |
| 1078 | - backgroundColor: 'rgba(0, 0, 0, 0.12);' | |
| 1079 | - }, | |
| 1080 | - '& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track': { | |
| 1081 | - backgroundColor: '#000' | |
| 1082 | - }, | |
| 1083 | - '& .MuiSwitch-switchBase:not(.Mui-checked) .MuiSwitch-thumb': { | |
| 1084 | - backgroundColor: '#D5D8DC' | |
| 1085 | - }, | |
| 1086 | - '& .MuiSwitch-switchBase.Mui-checked .MuiSwitch-thumb': { | |
| 1087 | - backgroundColor: '#fff' | |
| 1088 | - } | |
| 1089 | -}); | |
| 1090 | -var WidgetsTable = exports.WidgetsTable = function WidgetsTable(_ref) { | |
| 1091 | - var widgets = _ref.widgets, | |
| 1092 | - widgetsDisabled = _ref.widgetsDisabled, | |
| 1093 | - widgetsRoleRestrictions = _ref.widgetsRoleRestrictions, | |
| 1094 | - setWidgetsRoleRestrictions = _ref.setWidgetsRoleRestrictions, | |
| 1095 | - roles = _ref.roles, | |
| 1096 | - promotionWidgets = _ref.promotionWidgets, | |
| 1097 | - promotionData = _ref.promotionData, | |
| 1098 | - usageWidgets = _ref.usageWidgets, | |
| 1099 | - getWidgetUsage = _ref.getWidgetUsage, | |
| 1100 | - onScanUsage = _ref.onScanUsage, | |
| 1101 | - onToggleWidget = _ref.onToggleWidget, | |
| 1102 | - getSortingIndicatorClasses = _ref.getSortingIndicatorClasses, | |
| 1103 | - onSortingClicked = _ref.onSortingClicked; | |
| 1104 | - var managerPermissions = promotionData.manager_permissions; | |
| 1105 | - var sortingClasses = getSortingIndicatorClasses('widget'); | |
| 1106 | - var isWidgetSorted = sortingClasses.includes('sorted'); | |
| 1107 | - var widgetSortDirection = sortingClasses.includes('asc') ? 'asc' : 'desc'; | |
| 1108 | - var usageSortingClasses = getSortingIndicatorClasses('usage'); | |
| 1109 | - var isUsageSorted = usageSortingClasses.includes('sorted'); | |
| 1110 | - var usageSortDirection = usageSortingClasses.includes('asc') ? 'asc' : 'desc'; | |
| 1111 | - if (!widgets.length) { | |
| 1112 | - return /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 1113 | - color: "text.secondary" | |
| 1114 | - }, (0, _i18n.__)('No elements found.', 'elementor')); | |
| 1115 | - } | |
| 1116 | - return /*#__PURE__*/_react.default.createElement(_ui.TableContainer, { | |
| 1117 | - component: _ui.Paper, | |
| 1118 | - variant: "outlined" | |
| 1119 | - }, /*#__PURE__*/_react.default.createElement(_ui.Table, { | |
| 1120 | - size: "small" | |
| 1121 | - }, /*#__PURE__*/_react.default.createElement(_ui.TableHead, null, /*#__PURE__*/_react.default.createElement(_ui.TableRow, null, /*#__PURE__*/_react.default.createElement(_ui.TableCell, { | |
| 1122 | - sx: function sx(theme) { | |
| 1123 | - return { | |
| 1124 | - width: theme.spacing(25) | |
| 1125 | - }; | |
| 1126 | - } | |
| 1127 | - }, /*#__PURE__*/_react.default.createElement(_ui.TableSortLabel, { | |
| 1128 | - active: isWidgetSorted, | |
| 1129 | - direction: isWidgetSorted ? widgetSortDirection : 'asc', | |
| 1130 | - onClick: function onClick() { | |
| 1131 | - return onSortingClicked('widget'); | |
| 1132 | - }, | |
| 1133 | - "data-id": "e-id-elementor-element-manager-button-sort-by-element" | |
| 1134 | - }, (0, _i18n.__)('Element', 'elementor'))), /*#__PURE__*/_react.default.createElement(_ui.TableCell, { | |
| 1135 | - sx: function sx(theme) { | |
| 1136 | - return { | |
| 1137 | - width: theme.spacing(10) | |
| 1138 | - }; | |
| 1139 | - } | |
| 1140 | - }, (0, _i18n.__)('Status', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_ui.TableSortLabel, { | |
| 1141 | - active: isUsageSorted, | |
| 1142 | - direction: isUsageSorted ? usageSortDirection : 'asc', | |
| 1143 | - onClick: function onClick() { | |
| 1144 | - return onSortingClicked('usage'); | |
| 1145 | - }, | |
| 1146 | - "data-id": "e-id-elementor-element-manager-button-sort-by-usage" | |
| 1147 | - }, (0, _i18n.__)('Usage', 'elementor'))), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, (0, _i18n.__)('Plugin', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 1148 | - direction: "row", | |
| 1149 | - justifyContent: "flex-start", | |
| 1150 | - alignItems: "center", | |
| 1151 | - gap: 1 | |
| 1152 | - }, /*#__PURE__*/_react.default.createElement(_ui.Box, null, (0, _i18n.__)('Permission', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_ui.Tooltip, { | |
| 1153 | - placement: "top", | |
| 1154 | - title: (0, _i18n.__)('Choose which users will have access to each widget.', 'elementor') | |
| 1155 | - }, /*#__PURE__*/_react.default.createElement(_ui.IconButton, { | |
| 1156 | - size: "small" | |
| 1157 | - }, /*#__PURE__*/_react.default.createElement(_icons.HelpIcon, { | |
| 1158 | - fontSize: "small" | |
| 1159 | - })))), null === widgetsRoleRestrictions && /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 1160 | - sx: { | |
| 1161 | - marginInlineStart: 1 | |
| 1162 | - } | |
| 1163 | - }, /*#__PURE__*/_react.default.createElement(_upgradeButton.UpgradeButton, { | |
| 1164 | - href: promotionWidgets.length ? managerPermissions.pro.url : managerPermissions.advanced.url, | |
| 1165 | - size: "small", | |
| 1166 | - text: promotionWidgets.length ? managerPermissions.pro.text : managerPermissions.advanced.text, | |
| 1167 | - className: "go-pro", | |
| 1168 | - "data-id": "e-id-elementor-element-manager-button-upgrade-permissions" | |
| 1169 | - })))))), /*#__PURE__*/_react.default.createElement(_ui.TableBody, null, widgets.map(function (widget) { | |
| 1170 | - return /*#__PURE__*/_react.default.createElement(_ui.TableRow, { | |
| 1171 | - key: widget.name, | |
| 1172 | - "data-key-id": widget.name, | |
| 1173 | - hover: true | |
| 1174 | - }, /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 1175 | - sx: { | |
| 1176 | - display: 'flex', | |
| 1177 | - alignItems: 'center' | |
| 1178 | - } | |
| 1179 | - }, /*#__PURE__*/_react.default.createElement("i", { | |
| 1180 | - style: { | |
| 1181 | - marginInlineEnd: 8, | |
| 1182 | - marginInlineStart: 0, | |
| 1183 | - display: 'inline-block' | |
| 1184 | - }, | |
| 1185 | - className: widget.icon | |
| 1186 | - }), widget.title)), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(StyledSwitch, { | |
| 1187 | - color: "secondary", | |
| 1188 | - checked: !widgetsDisabled.includes(widget.name), | |
| 1189 | - onChange: function onChange(event, checked) { | |
| 1190 | - return onToggleWidget(widget.name, checked); | |
| 1191 | - }, | |
| 1192 | - size: "small", | |
| 1193 | - "data-id": "e-id-elementor-element-manager-toggle-".concat(widget.name) | |
| 1194 | - })), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_UsageTimesColumn.UsageTimesColumn, { | |
| 1195 | - widgetName: widget.name, | |
| 1196 | - usageData: usageWidgets.data, | |
| 1197 | - isLoading: usageWidgets.isLoading, | |
| 1198 | - getWidgetUsage: getWidgetUsage, | |
| 1199 | - onScanClick: onScanUsage | |
| 1200 | - })), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, widget.plugin), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, null !== widgetsRoleRestrictions && !widgetsDisabled.includes(widget.name) ? /*#__PURE__*/_react.default.createElement(_RolePermissions.RolePermissions, { | |
| 1201 | - widgetName: widget.name, | |
| 1202 | - roles: roles, | |
| 1203 | - widgetsRoleRestrictions: widgetsRoleRestrictions, | |
| 1204 | - setWidgetsRoleRestrictions: setWidgetsRoleRestrictions | |
| 1205 | - }) : /*#__PURE__*/_react.default.createElement(_RolePermissions.EditButtonDisabled, null))); | |
| 1206 | - })))); | |
| 1207 | -}; | |
| 1208 | -var widgetShape = _propTypes.default.shape({ | |
| 1209 | - name: _propTypes.default.string.isRequired, | |
| 1210 | - title: _propTypes.default.string.isRequired, | |
| 1211 | - icon: _propTypes.default.string, | |
| 1212 | - plugin: _propTypes.default.string | |
| 1213 | -}); | |
| 1214 | -WidgetsTable.propTypes = { | |
| 1215 | - widgets: _propTypes.default.arrayOf(widgetShape).isRequired, | |
| 1216 | - widgetsDisabled: _propTypes.default.arrayOf(_propTypes.default.string).isRequired, | |
| 1217 | - widgetsRoleRestrictions: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.array]), | |
| 1218 | - setWidgetsRoleRestrictions: _propTypes.default.func.isRequired, | |
| 1219 | - roles: _propTypes.default.array.isRequired, | |
| 1220 | - promotionWidgets: _propTypes.default.arrayOf(widgetShape).isRequired, | |
| 1221 | - promotionData: _propTypes.default.shape({ | |
| 1222 | - manager_permissions: _propTypes.default.shape({ | |
| 1223 | - pro: _propTypes.default.shape({ | |
| 1224 | - url: _propTypes.default.string, | |
| 1225 | - text: _propTypes.default.string | |
| 1226 | - }), | |
| 1227 | - advanced: _propTypes.default.shape({ | |
| 1228 | - url: _propTypes.default.string, | |
| 1229 | - text: _propTypes.default.string | |
| 1230 | - }) | |
| 1231 | - }) | |
| 1232 | - }).isRequired, | |
| 1233 | - usageWidgets: _propTypes.default.shape({ | |
| 1234 | - isLoading: _propTypes.default.bool, | |
| 1235 | - data: _propTypes.default.object | |
| 1236 | - }).isRequired, | |
| 1237 | - getWidgetUsage: _propTypes.default.func.isRequired, | |
| 1238 | - onScanUsage: _propTypes.default.func.isRequired, | |
| 1239 | - onToggleWidget: _propTypes.default.func.isRequired, | |
| 1240 | - getSortingIndicatorClasses: _propTypes.default.func.isRequired, | |
| 1241 | - onSortingClicked: _propTypes.default.func.isRequired | |
| 1242 | -}; | |
| 1243 | - | |
| 1244 | -/***/ }), | |
| 1245 | - | |
| 1246 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/index.js": | |
| 1247 | -/*!*******************************************************************************!*\ | |
| 1248 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/index.js ***! | |
| 1249 | - \*******************************************************************************/ | |
| 1250 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1251 | - | |
| 1252 | -"use strict"; | |
| 1253 | - | |
| 1254 | - | |
| 1255 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1256 | - value: true | |
| 1257 | -})); | |
| 1258 | -Object.defineProperty(exports, "ConfirmDialog", ({ | |
| 1259 | - enumerable: true, | |
| 1260 | - get: function get() { | |
| 1261 | - return _ConfirmDialog.ConfirmDialog; | |
| 1262 | - } | |
| 1263 | -})); | |
| 1264 | -Object.defineProperty(exports, "EditButtonDisabled", ({ | |
| 1265 | - enumerable: true, | |
| 1266 | - get: function get() { | |
| 1267 | - return _RolePermissions.EditButtonDisabled; | |
| 1268 | - } | |
| 1269 | -})); | |
| 1270 | -Object.defineProperty(exports, "NoticeAlert", ({ | |
| 1271 | - enumerable: true, | |
| 1272 | - get: function get() { | |
| 1273 | - return _NoticeAlert.NoticeAlert; | |
| 1274 | - } | |
| 1275 | -})); | |
| 1276 | -Object.defineProperty(exports, "PromotionWidgetsTable", ({ | |
| 1277 | - enumerable: true, | |
| 1278 | - get: function get() { | |
| 1279 | - return _PromotionWidgetsTable.PromotionWidgetsTable; | |
| 1280 | - } | |
| 1281 | -})); | |
| 1282 | -Object.defineProperty(exports, "RolePermissions", ({ | |
| 1283 | - enumerable: true, | |
| 1284 | - get: function get() { | |
| 1285 | - return _RolePermissions.RolePermissions; | |
| 1286 | - } | |
| 1287 | -})); | |
| 1288 | -Object.defineProperty(exports, "SearchFilters", ({ | |
| 1289 | - enumerable: true, | |
| 1290 | - get: function get() { | |
| 1291 | - return _SearchFilters.SearchFilters; | |
| 1292 | - } | |
| 1293 | -})); | |
| 1294 | -Object.defineProperty(exports, "UsageTimesColumn", ({ | |
| 1295 | - enumerable: true, | |
| 1296 | - get: function get() { | |
| 1297 | - return _UsageTimesColumn.UsageTimesColumn; | |
| 1298 | - } | |
| 1299 | -})); | |
| 1300 | -Object.defineProperty(exports, "WidgetsTable", ({ | |
| 1301 | - enumerable: true, | |
| 1302 | - get: function get() { | |
| 1303 | - return _WidgetsTable.WidgetsTable; | |
| 1304 | - } | |
| 1305 | -})); | |
| 1306 | -var _UsageTimesColumn = __webpack_require__(/*! ./UsageTimesColumn */ "../modules/element-manager/assets/js/app-editor-one/components/UsageTimesColumn.js"); | |
| 1307 | -var _NoticeAlert = __webpack_require__(/*! ./NoticeAlert */ "../modules/element-manager/assets/js/app-editor-one/components/NoticeAlert.js"); | |
| 1308 | -var _ConfirmDialog = __webpack_require__(/*! ./ConfirmDialog */ "../modules/element-manager/assets/js/app-editor-one/components/ConfirmDialog.js"); | |
| 1309 | -var _SearchFilters = __webpack_require__(/*! ./SearchFilters */ "../modules/element-manager/assets/js/app-editor-one/components/SearchFilters.js"); | |
| 1310 | -var _WidgetsTable = __webpack_require__(/*! ./WidgetsTable */ "../modules/element-manager/assets/js/app-editor-one/components/WidgetsTable.js"); | |
| 1311 | -var _PromotionWidgetsTable = __webpack_require__(/*! ./PromotionWidgetsTable */ "../modules/element-manager/assets/js/app-editor-one/components/PromotionWidgetsTable.js"); | |
| 1312 | -var _RolePermissions = __webpack_require__(/*! ./RolePermissions */ "../modules/element-manager/assets/js/app-editor-one/components/RolePermissions.js"); | |
| 1313 | - | |
| 1314 | -/***/ }), | |
| 1315 | - | |
| 1316 | -/***/ "../modules/element-manager/assets/js/app-editor-one/hooks/index.js": | |
| 1317 | -/*!**************************************************************************!*\ | |
| 1318 | - !*** ../modules/element-manager/assets/js/app-editor-one/hooks/index.js ***! | |
| 1319 | - \**************************************************************************/ | |
| 1320 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1321 | - | |
| 1322 | -"use strict"; | |
| 1323 | - | |
| 1324 | - | |
| 1325 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1326 | - value: true | |
| 1327 | -})); | |
| 1328 | -Object.defineProperty(exports, "useElementManager", ({ | |
| 1329 | - enumerable: true, | |
| 1330 | - get: function get() { | |
| 1331 | - return _useElementManager.useElementManager; | |
| 1332 | - } | |
| 1333 | -})); | |
| 1334 | -Object.defineProperty(exports, "useWidgetFilters", ({ | |
| 1335 | - enumerable: true, | |
| 1336 | - get: function get() { | |
| 1337 | - return _useWidgetFilters.useWidgetFilters; | |
| 1338 | - } | |
| 1339 | -})); | |
| 1340 | -var _useElementManager = __webpack_require__(/*! ./useElementManager */ "../modules/element-manager/assets/js/app-editor-one/hooks/useElementManager.js"); | |
| 1341 | -var _useWidgetFilters = __webpack_require__(/*! ./useWidgetFilters */ "../modules/element-manager/assets/js/app-editor-one/hooks/useWidgetFilters.js"); | |
| 1342 | - | |
| 1343 | -/***/ }), | |
| 1344 | - | |
| 1345 | -/***/ "../modules/element-manager/assets/js/app-editor-one/hooks/useElementManager.js": | |
| 1346 | -/*!**************************************************************************************!*\ | |
| 1347 | - !*** ../modules/element-manager/assets/js/app-editor-one/hooks/useElementManager.js ***! | |
| 1348 | - \**************************************************************************************/ | |
| 1349 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1350 | - | |
| 1351 | -"use strict"; | |
| 1352 | - | |
| 1353 | - | |
| 1354 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1355 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1356 | - value: true | |
| 1357 | -})); | |
| 1358 | -exports.useElementManager = void 0; | |
| 1359 | -var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 1360 | -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); | |
| 1361 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1362 | -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 1363 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 1364 | -var _react = __webpack_require__(/*! react */ "react"); | |
| 1365 | -var _api = __webpack_require__(/*! ../../api */ "../modules/element-manager/assets/js/api.js"); | |
| 1366 | -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; } | |
| 1367 | -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; } | |
| 1368 | -var useElementManager = exports.useElementManager = function useElementManager() { | |
| 1369 | - var isInitialMount = (0, _react.useRef)(true); | |
| 1370 | - var _useState = (0, _react.useState)(true), | |
| 1371 | - _useState2 = (0, _slicedToArray2.default)(_useState, 2), | |
| 1372 | - isLoading = _useState2[0], | |
| 1373 | - setIsLoading = _useState2[1]; | |
| 1374 | - var _useState3 = (0, _react.useState)([]), | |
| 1375 | - _useState4 = (0, _slicedToArray2.default)(_useState3, 2), | |
| 1376 | - widgets = _useState4[0], | |
| 1377 | - setWidgets = _useState4[1]; | |
| 1378 | - var _useState5 = (0, _react.useState)([]), | |
| 1379 | - _useState6 = (0, _slicedToArray2.default)(_useState5, 2), | |
| 1380 | - promotionWidgets = _useState6[0], | |
| 1381 | - setPromotionWidgets = _useState6[1]; | |
| 1382 | - var _useState7 = (0, _react.useState)([]), | |
| 1383 | - _useState8 = (0, _slicedToArray2.default)(_useState7, 2), | |
| 1384 | - plugins = _useState8[0], | |
| 1385 | - setPlugins = _useState8[1]; | |
| 1386 | - var _useState9 = (0, _react.useState)([]), | |
| 1387 | - _useState0 = (0, _slicedToArray2.default)(_useState9, 2), | |
| 1388 | - roles = _useState0[0], | |
| 1389 | - setRoles = _useState0[1]; | |
| 1390 | - var _useState1 = (0, _react.useState)([]), | |
| 1391 | - _useState10 = (0, _slicedToArray2.default)(_useState1, 2), | |
| 1392 | - widgetsDisabled = _useState10[0], | |
| 1393 | - setWidgetsDisabled = _useState10[1]; | |
| 1394 | - var _useState11 = (0, _react.useState)(null), | |
| 1395 | - _useState12 = (0, _slicedToArray2.default)(_useState11, 2), | |
| 1396 | - widgetsRoleRestrictions = _useState12[0], | |
| 1397 | - setWidgetsRoleRestrictions = _useState12[1]; | |
| 1398 | - var _useState13 = (0, _react.useState)([]), | |
| 1399 | - _useState14 = (0, _slicedToArray2.default)(_useState13, 2), | |
| 1400 | - promotionData = _useState14[0], | |
| 1401 | - setPromotionData = _useState14[1]; | |
| 1402 | - var _useState15 = (0, _react.useState)(null), | |
| 1403 | - _useState16 = (0, _slicedToArray2.default)(_useState15, 2), | |
| 1404 | - noticeData = _useState16[0], | |
| 1405 | - setNoticeData = _useState16[1]; | |
| 1406 | - var _useState17 = (0, _react.useState)({ | |
| 1407 | - isLoading: false, | |
| 1408 | - data: null | |
| 1409 | - }), | |
| 1410 | - _useState18 = (0, _slicedToArray2.default)(_useState17, 2), | |
| 1411 | - usageWidgets = _useState18[0], | |
| 1412 | - setUsageWidgets = _useState18[1]; | |
| 1413 | - var _useState19 = (0, _react.useState)({ | |
| 1414 | - isSaving: false, | |
| 1415 | - isUnsavedChanges: false | |
| 1416 | - }), | |
| 1417 | - _useState20 = (0, _slicedToArray2.default)(_useState19, 2), | |
| 1418 | - changeProgress = _useState20[0], | |
| 1419 | - setChangeProgress = _useState20[1]; | |
| 1420 | - var _useState21 = (0, _react.useState)(false), | |
| 1421 | - _useState22 = (0, _slicedToArray2.default)(_useState21, 2), | |
| 1422 | - isSnackbarOpen = _useState22[0], | |
| 1423 | - setIsSnackbarOpen = _useState22[1]; | |
| 1424 | - var getWidgetUsage = (0, _react.useCallback)(function (widgetName) { | |
| 1425 | - if (!usageWidgets.data || !usageWidgets.data.hasOwnProperty(widgetName)) { | |
| 1426 | - return 0; | |
| 1427 | - } | |
| 1428 | - return usageWidgets.data[widgetName]; | |
| 1429 | - }, [usageWidgets.data]); | |
| 1430 | - var scanUsageElements = (0, _react.useCallback)(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 1431 | - var data; | |
| 1432 | - return _regenerator.default.wrap(function (_context) { | |
| 1433 | - while (1) switch (_context.prev = _context.next) { | |
| 1434 | - case 0: | |
| 1435 | - setUsageWidgets(function (prev) { | |
| 1436 | - return _objectSpread(_objectSpread({}, prev), {}, { | |
| 1437 | - isLoading: true | |
| 1438 | - }); | |
| 1439 | - }); | |
| 1440 | - _context.next = 1; | |
| 1441 | - return (0, _api.getUsageWidgets)(); | |
| 1442 | - case 1: | |
| 1443 | - data = _context.sent; | |
| 1444 | - setUsageWidgets({ | |
| 1445 | - data: data, | |
| 1446 | - isLoading: false | |
| 1447 | - }); | |
| 1448 | - return _context.abrupt("return", data); | |
| 1449 | - case 2: | |
| 1450 | - case "end": | |
| 1451 | - return _context.stop(); | |
| 1452 | - } | |
| 1453 | - }, _callee); | |
| 1454 | - })), []); | |
| 1455 | - var saveChanges = (0, _react.useCallback)(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { | |
| 1456 | - return _regenerator.default.wrap(function (_context2) { | |
| 1457 | - while (1) switch (_context2.prev = _context2.next) { | |
| 1458 | - case 0: | |
| 1459 | - setChangeProgress(function (prev) { | |
| 1460 | - return _objectSpread(_objectSpread({}, prev), {}, { | |
| 1461 | - isSaving: true | |
| 1462 | - }); | |
| 1463 | - }); | |
| 1464 | - _context2.next = 1; | |
| 1465 | - return (0, _api.saveDisabledWidgets)(widgetsDisabled, widgetsRoleRestrictions); | |
| 1466 | - case 1: | |
| 1467 | - setChangeProgress({ | |
| 1468 | - isSaving: false, | |
| 1469 | - isUnsavedChanges: false | |
| 1470 | - }); | |
| 1471 | - setIsSnackbarOpen(true); | |
| 1472 | - case 2: | |
| 1473 | - case "end": | |
| 1474 | - return _context2.stop(); | |
| 1475 | - } | |
| 1476 | - }, _callee2); | |
| 1477 | - })), [widgetsDisabled, widgetsRoleRestrictions]); | |
| 1478 | - var deactivateAllUnusedWidgets = (0, _react.useCallback)(function () { | |
| 1479 | - if (!usageWidgets.data) { | |
| 1480 | - return; | |
| 1481 | - } | |
| 1482 | - var widgetsToDeactivate = widgets.filter(function (widget) { | |
| 1483 | - return !usageWidgets.data.hasOwnProperty(widget.name) || widgetsDisabled.includes(widget.name); | |
| 1484 | - }); | |
| 1485 | - setWidgetsDisabled(widgetsToDeactivate.map(function (widget) { | |
| 1486 | - return widget.name; | |
| 1487 | - })); | |
| 1488 | - }, [widgets, usageWidgets.data, widgetsDisabled]); | |
| 1489 | - var enableAllWidgets = (0, _react.useCallback)(function () { | |
| 1490 | - setWidgetsDisabled([]); | |
| 1491 | - }, []); | |
| 1492 | - var toggleWidget = (0, _react.useCallback)(function (widgetName, isEnabled) { | |
| 1493 | - if (isEnabled) { | |
| 1494 | - setWidgetsDisabled(function (prev) { | |
| 1495 | - return prev.filter(function (item) { | |
| 1496 | - return item !== widgetName; | |
| 1497 | - }); | |
| 1498 | - }); | |
| 1499 | - } else { | |
| 1500 | - setWidgetsDisabled(function (prev) { | |
| 1501 | - return [].concat((0, _toConsumableArray2.default)(prev), [widgetName]); | |
| 1502 | - }); | |
| 1503 | - } | |
| 1504 | - }, []); | |
| 1505 | - var dismissNotice = (0, _react.useCallback)(function () { | |
| 1506 | - if (noticeData) { | |
| 1507 | - (0, _api.markNoticeViewed)(noticeData.notice_id, noticeData.nonce); | |
| 1508 | - setNoticeData(function (prev) { | |
| 1509 | - return _objectSpread(_objectSpread({}, prev), {}, { | |
| 1510 | - is_viewed: true | |
| 1511 | - }); | |
| 1512 | - }); | |
| 1513 | - } | |
| 1514 | - }, [noticeData]); | |
| 1515 | - (0, _react.useEffect)(function () { | |
| 1516 | - var loadData = /*#__PURE__*/function () { | |
| 1517 | - var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { | |
| 1518 | - var _appData$additional_d, _appData$additional_d2; | |
| 1519 | - var appData, pluginsData; | |
| 1520 | - return _regenerator.default.wrap(function (_context3) { | |
| 1521 | - while (1) switch (_context3.prev = _context3.next) { | |
| 1522 | - case 0: | |
| 1523 | - _context3.next = 1; | |
| 1524 | - return (0, _api.getAdminAppData)(); | |
| 1525 | - case 1: | |
| 1526 | - appData = _context3.sent; | |
| 1527 | - setNoticeData(appData.notice_data); | |
| 1528 | - setWidgetsDisabled(appData.disabled_elements); | |
| 1529 | - setWidgets(appData.widgets); | |
| 1530 | - setPromotionWidgets(appData.promotion_widgets); | |
| 1531 | - setPromotionData(appData.promotion_data); | |
| 1532 | - if ((_appData$additional_d = appData.additional_data) !== null && _appData$additional_d !== void 0 && _appData$additional_d.roles) { | |
| 1533 | - setRoles(appData.additional_data.roles); | |
| 1534 | - } | |
| 1535 | - if ((_appData$additional_d2 = appData.additional_data) !== null && _appData$additional_d2 !== void 0 && _appData$additional_d2.role_restrictions) { | |
| 1536 | - setWidgetsRoleRestrictions(appData.additional_data.role_restrictions); | |
| 1537 | - } | |
| 1538 | - pluginsData = appData.plugins.map(function (plugin) { | |
| 1539 | - return { | |
| 1540 | - label: plugin, | |
| 1541 | - value: plugin | |
| 1542 | - }; | |
| 1543 | - }); | |
| 1544 | - pluginsData.unshift({ | |
| 1545 | - label: 'All Plugins', | |
| 1546 | - value: '' | |
| 1547 | - }); | |
| 1548 | - setPlugins(pluginsData); | |
| 1549 | - setIsLoading(false); | |
| 1550 | - setChangeProgress(function (prev) { | |
| 1551 | - return _objectSpread(_objectSpread({}, prev), {}, { | |
| 1552 | - isUnsavedChanges: false | |
| 1553 | - }); | |
| 1554 | - }); | |
| 1555 | - case 2: | |
| 1556 | - case "end": | |
| 1557 | - return _context3.stop(); | |
| 1558 | - } | |
| 1559 | - }, _callee3); | |
| 1560 | - })); | |
| 1561 | - return function loadData() { | |
| 1562 | - return _ref3.apply(this, arguments); | |
| 1563 | - }; | |
| 1564 | - }(); | |
| 1565 | - loadData(); | |
| 1566 | - }, []); | |
| 1567 | - (0, _react.useEffect)(function () { | |
| 1568 | - if (isLoading) { | |
| 1569 | - return; | |
| 1570 | - } | |
| 1571 | - if (isInitialMount.current) { | |
| 1572 | - isInitialMount.current = false; | |
| 1573 | - return; | |
| 1574 | - } | |
| 1575 | - setChangeProgress(function (prev) { | |
| 1576 | - return _objectSpread(_objectSpread({}, prev), {}, { | |
| 1577 | - isUnsavedChanges: true | |
| 1578 | - }); | |
| 1579 | - }); | |
| 1580 | - }, [widgetsDisabled, widgetsRoleRestrictions, isLoading]); | |
| 1581 | - (0, _react.useEffect)(function () { | |
| 1582 | - var handleBeforeUnload = function handleBeforeUnload(event) { | |
| 1583 | - event.preventDefault(); | |
| 1584 | - event.returnValue = ''; | |
| 1585 | - }; | |
| 1586 | - if (changeProgress.isUnsavedChanges) { | |
| 1587 | - window.addEventListener('beforeunload', handleBeforeUnload); | |
| 1588 | - } else { | |
| 1589 | - window.removeEventListener('beforeunload', handleBeforeUnload); | |
| 1590 | - } | |
| 1591 | - return function () { | |
| 1592 | - window.removeEventListener('beforeunload', handleBeforeUnload); | |
| 1593 | - }; | |
| 1594 | - }, [changeProgress.isUnsavedChanges]); | |
| 1595 | - return { | |
| 1596 | - isLoading: isLoading, | |
| 1597 | - widgets: widgets, | |
| 1598 | - promotionWidgets: promotionWidgets, | |
| 1599 | - plugins: plugins, | |
| 1600 | - roles: roles, | |
| 1601 | - widgetsDisabled: widgetsDisabled, | |
| 1602 | - widgetsRoleRestrictions: widgetsRoleRestrictions, | |
| 1603 | - setWidgetsRoleRestrictions: setWidgetsRoleRestrictions, | |
| 1604 | - promotionData: promotionData, | |
| 1605 | - noticeData: noticeData, | |
| 1606 | - usageWidgets: usageWidgets, | |
| 1607 | - changeProgress: changeProgress, | |
| 1608 | - isSnackbarOpen: isSnackbarOpen, | |
| 1609 | - setIsSnackbarOpen: setIsSnackbarOpen, | |
| 1610 | - getWidgetUsage: getWidgetUsage, | |
| 1611 | - scanUsageElements: scanUsageElements, | |
| 1612 | - saveChanges: saveChanges, | |
| 1613 | - deactivateAllUnusedWidgets: deactivateAllUnusedWidgets, | |
| 1614 | - enableAllWidgets: enableAllWidgets, | |
| 1615 | - toggleWidget: toggleWidget, | |
| 1616 | - dismissNotice: dismissNotice | |
| 1617 | - }; | |
| 1618 | -}; | |
| 1619 | - | |
| 1620 | -/***/ }), | |
| 1621 | - | |
| 1622 | -/***/ "../modules/element-manager/assets/js/app-editor-one/hooks/useWidgetFilters.js": | |
| 1623 | -/*!*************************************************************************************!*\ | |
| 1624 | - !*** ../modules/element-manager/assets/js/app-editor-one/hooks/useWidgetFilters.js ***! | |
| 1625 | - \*************************************************************************************/ | |
| 1626 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1627 | - | |
| 1628 | -"use strict"; | |
| 1629 | - | |
| 1630 | - | |
| 1631 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1632 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1633 | - value: true | |
| 1634 | -})); | |
| 1635 | -exports.useWidgetFilters = void 0; | |
| 1636 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 1637 | -var _react = __webpack_require__(/*! react */ "react"); | |
| 1638 | -var useWidgetFilters = exports.useWidgetFilters = function useWidgetFilters(widgets, widgetsDisabled, getWidgetUsage) { | |
| 1639 | - var _useState = (0, _react.useState)(''), | |
| 1640 | - _useState2 = (0, _slicedToArray2.default)(_useState, 2), | |
| 1641 | - searchKeyword = _useState2[0], | |
| 1642 | - setSearchKeyword = _useState2[1]; | |
| 1643 | - var _useState3 = (0, _react.useState)('widget'), | |
| 1644 | - _useState4 = (0, _slicedToArray2.default)(_useState3, 2), | |
| 1645 | - sortingColumn = _useState4[0], | |
| 1646 | - setSortingColumn = _useState4[1]; | |
| 1647 | - var _useState5 = (0, _react.useState)('asc'), | |
| 1648 | - _useState6 = (0, _slicedToArray2.default)(_useState5, 2), | |
| 1649 | - sortingDirection = _useState6[0], | |
| 1650 | - setSortingDirection = _useState6[1]; | |
| 1651 | - var _useState7 = (0, _react.useState)(''), | |
| 1652 | - _useState8 = (0, _slicedToArray2.default)(_useState7, 2), | |
| 1653 | - filterByPlugin = _useState8[0], | |
| 1654 | - setFilterByPlugin = _useState8[1]; | |
| 1655 | - var _useState9 = (0, _react.useState)('all'), | |
| 1656 | - _useState0 = (0, _slicedToArray2.default)(_useState9, 2), | |
| 1657 | - filterByStatus = _useState0[0], | |
| 1658 | - setFilterByStatus = _useState0[1]; | |
| 1659 | - var sortedAndFilteredWidgets = (0, _react.useMemo)(function () { | |
| 1660 | - var filteredWidgets = widgets.filter(function (widget) { | |
| 1661 | - return widget.title.toLowerCase().includes(searchKeyword.toLowerCase()); | |
| 1662 | - }); | |
| 1663 | - if ('' !== filterByPlugin) { | |
| 1664 | - filteredWidgets = filteredWidgets.filter(function (widget) { | |
| 1665 | - return widget.plugin.toLowerCase() === filterByPlugin.toLowerCase(); | |
| 1666 | - }); | |
| 1667 | - } | |
| 1668 | - if ('all' !== filterByStatus) { | |
| 1669 | - filteredWidgets = filteredWidgets.filter(function (widget) { | |
| 1670 | - if ('active' === filterByStatus) { | |
| 1671 | - return !widgetsDisabled.includes(widget.name); | |
| 1672 | - } | |
| 1673 | - return widgetsDisabled.includes(widget.name); | |
| 1674 | - }); | |
| 1675 | - } | |
| 1676 | - filteredWidgets.sort(function (a, b) { | |
| 1677 | - var aValue; | |
| 1678 | - var bValue; | |
| 1679 | - if ('widget' === sortingColumn) { | |
| 1680 | - aValue = a.title; | |
| 1681 | - bValue = b.title; | |
| 1682 | - } | |
| 1683 | - if ('usage' === sortingColumn) { | |
| 1684 | - aValue = getWidgetUsage(a.name); | |
| 1685 | - bValue = getWidgetUsage(b.name); | |
| 1686 | - } | |
| 1687 | - if (aValue === bValue) { | |
| 1688 | - return 0; | |
| 1689 | - } | |
| 1690 | - if ('asc' === sortingDirection) { | |
| 1691 | - return aValue < bValue ? -1 : 1; | |
| 1692 | - } | |
| 1693 | - return aValue > bValue ? -1 : 1; | |
| 1694 | - }); | |
| 1695 | - return filteredWidgets; | |
| 1696 | - }, [widgets, searchKeyword, sortingColumn, sortingDirection, filterByPlugin, filterByStatus, widgetsDisabled, getWidgetUsage]); | |
| 1697 | - var getSortingIndicatorClasses = (0, _react.useCallback)(function (column) { | |
| 1698 | - if (sortingColumn !== column) { | |
| 1699 | - return ''; | |
| 1700 | - } | |
| 1701 | - return 'asc' === sortingDirection ? 'sorted asc' : 'sorted desc'; | |
| 1702 | - }, [sortingColumn, sortingDirection]); | |
| 1703 | - var onSortingClicked = (0, _react.useCallback)(function (column) { | |
| 1704 | - if (sortingColumn === column) { | |
| 1705 | - setSortingDirection(function (prev) { | |
| 1706 | - return 'asc' === prev ? 'desc' : 'asc'; | |
| 1707 | - }); | |
| 1708 | - } else { | |
| 1709 | - setSortingColumn(column); | |
| 1710 | - setSortingDirection('asc'); | |
| 1711 | - } | |
| 1712 | - }, [sortingColumn]); | |
| 1713 | - var setSortByUsage = (0, _react.useCallback)(function () { | |
| 1714 | - setSortingColumn('usage'); | |
| 1715 | - setSortingDirection('desc'); | |
| 1716 | - }, []); | |
| 1717 | - return { | |
| 1718 | - searchKeyword: searchKeyword, | |
| 1719 | - setSearchKeyword: setSearchKeyword, | |
| 1720 | - filterByPlugin: filterByPlugin, | |
| 1721 | - setFilterByPlugin: setFilterByPlugin, | |
| 1722 | - filterByStatus: filterByStatus, | |
| 1723 | - setFilterByStatus: setFilterByStatus, | |
| 1724 | - sortedAndFilteredWidgets: sortedAndFilteredWidgets, | |
| 1725 | - getSortingIndicatorClasses: getSortingIndicatorClasses, | |
| 1726 | - onSortingClicked: onSortingClicked, | |
| 1727 | - setSortByUsage: setSortByUsage | |
| 1728 | - }; | |
| 1729 | -}; | |
| 1730 | - | |
| 1731 | -/***/ }), | |
| 1732 | - | |
| 1733 | -/***/ "../modules/element-manager/assets/js/app-editor-one/index.js": | |
| 1734 | -/*!********************************************************************!*\ | |
| 1735 | - !*** ../modules/element-manager/assets/js/app-editor-one/index.js ***! | |
| 1736 | - \********************************************************************/ | |
| 1737 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1738 | - | |
| 1739 | -"use strict"; | |
| 1740 | - | |
| 1741 | - | |
| 1742 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1743 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1744 | - value: true | |
| 1745 | -})); | |
| 1746 | -exports.AppModern = void 0; | |
| 1747 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 1748 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1749 | -var _App = __webpack_require__(/*! ./App */ "../modules/element-manager/assets/js/app-editor-one/App.js"); | |
| 1750 | -var AppModern = exports.AppModern = function AppModern() { | |
| 1751 | - var _elementorCommon$conf; | |
| 1752 | - var isRTL = typeof elementorCommon !== 'undefined' && (_elementorCommon$conf = elementorCommon.config) !== null && _elementorCommon$conf !== void 0 && _elementorCommon$conf.isRTL ? elementorCommon.config.isRTL : 'rtl' === document.documentElement.dir || document.body.classList.contains('rtl'); | |
| 1753 | - return /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, { | |
| 1754 | - rtl: isRTL | |
| 1755 | - }, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, { | |
| 1756 | - colorScheme: "light" | |
| 1757 | - }, /*#__PURE__*/_react.default.createElement(_App.App, null))); | |
| 1758 | -}; | |
| 1759 | - | |
| 1760 | -/***/ }), | |
| 1761 | - | |
| 1762 | -/***/ "../modules/element-manager/assets/js/upgrade-button.js": | |
| 1763 | -/*!**************************************************************!*\ | |
| 1764 | - !*** ../modules/element-manager/assets/js/upgrade-button.js ***! | |
| 1765 | - \**************************************************************/ | |
| 1766 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1767 | - | |
| 1768 | -"use strict"; | |
| 1769 | - | |
| 1770 | - | |
| 1771 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1772 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1773 | - value: true | |
| 1774 | -})); | |
| 1775 | -exports.UpgradeButton = void 0; | |
| 1776 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 1777 | -var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js")); | |
| 1778 | -var _components = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); | |
| 1779 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 1780 | -var UpgradeButton = exports.UpgradeButton = function UpgradeButton(props) { | |
| 1781 | - var trackingClass = props.className || 'e-id-elementor-element-manager-button-upgrade'; | |
| 1782 | - return /*#__PURE__*/_react.default.createElement(_components.Button, (0, _extends2.default)({}, props, { | |
| 1783 | - variant: "primary", | |
| 1784 | - target: "_blank", | |
| 1785 | - rel: 'noreferrer', | |
| 1786 | - style: { | |
| 1787 | - background: 'var(--e-a-btn-bg-accent, #93003f)' | |
| 1788 | - }, | |
| 1789 | - className: trackingClass | |
| 1790 | - })); | |
| 1791 | -}; | |
| 1792 | -UpgradeButton.propTypes = { | |
| 1793 | - className: _propTypes.default.string | |
| 1794 | -}; | |
| 1795 | - | |
| 1796 | -/***/ }), | |
| 1797 | - | |
| 1798 | -/***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js": | |
| 1799 | -/*!***************************************************************!*\ | |
| 1800 | - !*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***! | |
| 1801 | - \***************************************************************/ | |
| 1802 | -/***/ ((module) => { | |
| 1803 | - | |
| 1804 | -function _OverloadYield(e, d) { | |
| 1805 | - this.v = e, this.k = d; | |
| 1806 | -} | |
| 1807 | -module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1808 | - | |
| 1809 | -/***/ }), | |
| 1810 | - | |
| 1811 | -/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 1812 | -/*!******************************************************************!*\ | |
| 1813 | - !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 1814 | - \******************************************************************/ | |
| 1815 | -/***/ ((module) => { | |
| 1816 | - | |
| 1817 | -function _arrayLikeToArray(r, a) { | |
| 1818 | - (null == a || a > r.length) && (a = r.length); | |
| 1819 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 1820 | - return n; | |
| 1821 | -} | |
| 1822 | -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1823 | - | |
| 1824 | -/***/ }), | |
| 1825 | - | |
| 1826 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 1827 | -/*!****************************************************************!*\ | |
| 1828 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 1829 | - \****************************************************************/ | |
| 1830 | -/***/ ((module) => { | |
| 1831 | - | |
| 1832 | -function _arrayWithHoles(r) { | |
| 1833 | - if (Array.isArray(r)) return r; | |
| 1834 | -} | |
| 1835 | -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1836 | - | |
| 1837 | -/***/ }), | |
| 1838 | - | |
| 1839 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": | |
| 1840 | -/*!*******************************************************************!*\ | |
| 1841 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! | |
| 1842 | - \*******************************************************************/ | |
| 1843 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1844 | - | |
| 1845 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 1846 | -function _arrayWithoutHoles(r) { | |
| 1847 | - if (Array.isArray(r)) return arrayLikeToArray(r); | |
| 1848 | -} | |
| 1849 | -module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1850 | - | |
| 1851 | -/***/ }), | |
| 1852 | - | |
| 1853 | -/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": | |
| 1854 | -/*!******************************************************************!*\ | |
| 1855 | - !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! | |
| 1856 | - \******************************************************************/ | |
| 1857 | -/***/ ((module) => { | |
| 1858 | - | |
| 1859 | -function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 1860 | - try { | |
| 1861 | - var i = n[a](c), | |
| 1862 | - u = i.value; | |
| 1863 | - } catch (n) { | |
| 1864 | - return void e(n); | |
| 1865 | - } | |
| 1866 | - i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 1867 | -} | |
| 1868 | -function _asyncToGenerator(n) { | |
| 1869 | - return function () { | |
| 1870 | - var t = this, | |
| 1871 | - e = arguments; | |
| 1872 | - return new Promise(function (r, o) { | |
| 1873 | - var a = n.apply(t, e); | |
| 1874 | - function _next(n) { | |
| 1875 | - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 1876 | - } | |
| 1877 | - function _throw(n) { | |
| 1878 | - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 1879 | - } | |
| 1880 | - _next(void 0); | |
| 1881 | - }); | |
| 1882 | - }; | |
| 1883 | -} | |
| 1884 | -module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1885 | - | |
| 1886 | -/***/ }), | |
| 1887 | - | |
| 1888 | -/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 1889 | -/*!****************************************************************!*\ | |
| 1890 | - !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 1891 | - \****************************************************************/ | |
| 1892 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1893 | - | |
| 1894 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 1895 | -function _defineProperty(e, r, t) { | |
| 1896 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 1897 | - value: t, | |
| 1898 | - enumerable: !0, | |
| 1899 | - configurable: !0, | |
| 1900 | - writable: !0 | |
| 1901 | - }) : e[r] = t, e; | |
| 1902 | -} | |
| 1903 | -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1904 | - | |
| 1905 | -/***/ }), | |
| 1906 | - | |
| 1907 | -/***/ "../node_modules/@babel/runtime/helpers/extends.js": | |
| 1908 | -/*!*********************************************************!*\ | |
| 1909 | - !*** ../node_modules/@babel/runtime/helpers/extends.js ***! | |
| 1910 | - \*********************************************************/ | |
| 1911 | -/***/ ((module) => { | |
| 1912 | - | |
| 1913 | -function _extends() { | |
| 1914 | - return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) { | |
| 1915 | - for (var e = 1; e < arguments.length; e++) { | |
| 1916 | - var t = arguments[e]; | |
| 1917 | - for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); | |
| 1918 | - } | |
| 1919 | - return n; | |
| 1920 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments); | |
| 1921 | -} | |
| 1922 | -module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1923 | - | |
| 1924 | -/***/ }), | |
| 1925 | - | |
| 1926 | -/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 1927 | -/*!***********************************************************************!*\ | |
| 1928 | - !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 1929 | - \***********************************************************************/ | |
| 1930 | -/***/ ((module) => { | |
| 1931 | - | |
| 1932 | -function _interopRequireDefault(e) { | |
| 1933 | - return e && e.__esModule ? e : { | |
| 1934 | - "default": e | |
| 1935 | - }; | |
| 1936 | -} | |
| 1937 | -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1938 | - | |
| 1939 | -/***/ }), | |
| 1940 | - | |
| 1941 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": | |
| 1942 | -/*!*****************************************************************!*\ | |
| 1943 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! | |
| 1944 | - \*****************************************************************/ | |
| 1945 | -/***/ ((module) => { | |
| 1946 | - | |
| 1947 | -function _iterableToArray(r) { | |
| 1948 | - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 1949 | -} | |
| 1950 | -module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1951 | - | |
| 1952 | -/***/ }), | |
| 1953 | - | |
| 1954 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 1955 | -/*!**********************************************************************!*\ | |
| 1956 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 1957 | - \**********************************************************************/ | |
| 1958 | -/***/ ((module) => { | |
| 1959 | - | |
| 1960 | -function _iterableToArrayLimit(r, l) { | |
| 1961 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 1962 | - if (null != t) { | |
| 1963 | - var e, | |
| 1964 | - n, | |
| 1965 | - i, | |
| 1966 | - u, | |
| 1967 | - a = [], | |
| 1968 | - f = !0, | |
| 1969 | - o = !1; | |
| 1970 | - try { | |
| 1971 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 1972 | - if (Object(t) !== t) return; | |
| 1973 | - f = !1; | |
| 1974 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 1975 | - } catch (r) { | |
| 1976 | - o = !0, n = r; | |
| 1977 | - } finally { | |
| 1978 | - try { | |
| 1979 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 1980 | - } finally { | |
| 1981 | - if (o) throw n; | |
| 1982 | - } | |
| 1983 | - } | |
| 1984 | - return a; | |
| 1985 | - } | |
| 1986 | -} | |
| 1987 | -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1988 | - | |
| 1989 | -/***/ }), | |
| 1990 | - | |
| 1991 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 1992 | -/*!*****************************************************************!*\ | |
| 1993 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 1994 | - \*****************************************************************/ | |
| 1995 | -/***/ ((module) => { | |
| 1996 | - | |
| 1997 | -function _nonIterableRest() { | |
| 1998 | - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 1999 | -} | |
| 2000 | -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2001 | - | |
| 2002 | -/***/ }), | |
| 2003 | - | |
| 2004 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": | |
| 2005 | -/*!*******************************************************************!*\ | |
| 2006 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! | |
| 2007 | - \*******************************************************************/ | |
| 2008 | -/***/ ((module) => { | |
| 2009 | - | |
| 2010 | -function _nonIterableSpread() { | |
| 2011 | - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 2012 | -} | |
| 2013 | -module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2014 | - | |
| 2015 | -/***/ }), | |
| 2016 | - | |
| 2017 | -/***/ "../node_modules/@babel/runtime/helpers/regenerator.js": | |
| 2018 | -/*!*************************************************************!*\ | |
| 2019 | - !*** ../node_modules/@babel/runtime/helpers/regenerator.js ***! | |
| 2020 | - \*************************************************************/ | |
| 2021 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2022 | - | |
| 2023 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 2024 | -function _regenerator() { | |
| 2025 | - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 2026 | - var e, | |
| 2027 | - t, | |
| 2028 | - r = "function" == typeof Symbol ? Symbol : {}, | |
| 2029 | - n = r.iterator || "@@iterator", | |
| 2030 | - o = r.toStringTag || "@@toStringTag"; | |
| 2031 | - function i(r, n, o, i) { | |
| 2032 | - var c = n && n.prototype instanceof Generator ? n : Generator, | |
| 2033 | - u = Object.create(c.prototype); | |
| 2034 | - return regeneratorDefine(u, "_invoke", function (r, n, o) { | |
| 2035 | - var i, | |
| 2036 | - c, | |
| 2037 | - u, | |
| 2038 | - f = 0, | |
| 2039 | - p = o || [], | |
| 2040 | - y = !1, | |
| 2041 | - G = { | |
| 2042 | - p: 0, | |
| 2043 | - n: 0, | |
| 2044 | - v: e, | |
| 2045 | - a: d, | |
| 2046 | - f: d.bind(e, 4), | |
| 2047 | - d: function d(t, r) { | |
| 2048 | - return i = t, c = 0, u = e, G.n = r, a; | |
| 2049 | - } | |
| 2050 | - }; | |
| 2051 | - function d(r, n) { | |
| 2052 | - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 2053 | - var o, | |
| 2054 | - i = p[t], | |
| 2055 | - d = G.p, | |
| 2056 | - l = i[2]; | |
| 2057 | - 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)); | |
| 2058 | - } | |
| 2059 | - if (o || r > 1) return a; | |
| 2060 | - throw y = !0, n; | |
| 2061 | - } | |
| 2062 | - return function (o, p, l) { | |
| 2063 | - if (f > 1) throw TypeError("Generator is already running"); | |
| 2064 | - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 2065 | - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 2066 | - try { | |
| 2067 | - if (f = 2, i) { | |
| 2068 | - if (c || (o = "next"), t = i[o]) { | |
| 2069 | - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 2070 | - if (!t.done) return t; | |
| 2071 | - u = t.value, c < 2 && (c = 0); | |
| 2072 | - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 2073 | - i = e; | |
| 2074 | - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 2075 | - } catch (t) { | |
| 2076 | - i = e, c = 1, u = t; | |
| 2077 | - } finally { | |
| 2078 | - f = 1; | |
| 2079 | - } | |
| 2080 | - } | |
| 2081 | - return { | |
| 2082 | - value: t, | |
| 2083 | - done: y | |
| 2084 | - }; | |
| 2085 | - }; | |
| 2086 | - }(r, o, i), !0), u; | |
| 2087 | - } | |
| 2088 | - var a = {}; | |
| 2089 | - function Generator() {} | |
| 2090 | - function GeneratorFunction() {} | |
| 2091 | - function GeneratorFunctionPrototype() {} | |
| 2092 | - t = Object.getPrototypeOf; | |
| 2093 | - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { | |
| 2094 | - return this; | |
| 2095 | - }), t), | |
| 2096 | - u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 2097 | - function f(e) { | |
| 2098 | - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 2099 | - } | |
| 2100 | - 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 () { | |
| 2101 | - return this; | |
| 2102 | - }), regeneratorDefine(u, "toString", function () { | |
| 2103 | - return "[object Generator]"; | |
| 2104 | - }), (module.exports = _regenerator = function _regenerator() { | |
| 2105 | - return { | |
| 2106 | - w: i, | |
| 2107 | - m: f | |
| 2108 | - }; | |
| 2109 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 2110 | -} | |
| 2111 | -module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2112 | - | |
| 2113 | -/***/ }), | |
| 2114 | - | |
| 2115 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js": | |
| 2116 | -/*!******************************************************************!*\ | |
| 2117 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsync.js ***! | |
| 2118 | - \******************************************************************/ | |
| 2119 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2120 | - | |
| 2121 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 2122 | -function _regeneratorAsync(n, e, r, t, o) { | |
| 2123 | - var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 2124 | - return a.next().then(function (n) { | |
| 2125 | - return n.done ? n.value : a.next(); | |
| 2126 | - }); | |
| 2127 | -} | |
| 2128 | -module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2129 | - | |
| 2130 | -/***/ }), | |
| 2131 | - | |
| 2132 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js": | |
| 2133 | -/*!*********************************************************************!*\ | |
| 2134 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js ***! | |
| 2135 | - \*********************************************************************/ | |
| 2136 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2137 | - | |
| 2138 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 2139 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 2140 | -function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 2141 | - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 2142 | -} | |
| 2143 | -module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2144 | - | |
| 2145 | -/***/ }), | |
| 2146 | - | |
| 2147 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js": | |
| 2148 | -/*!**************************************************************************!*\ | |
| 2149 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js ***! | |
| 2150 | - \**************************************************************************/ | |
| 2151 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2152 | - | |
| 2153 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 2154 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 2155 | -function AsyncIterator(t, e) { | |
| 2156 | - function n(r, o, i, f) { | |
| 2157 | - try { | |
| 2158 | - var c = t[r](o), | |
| 2159 | - u = c.value; | |
| 2160 | - return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { | |
| 2161 | - n("next", t, i, f); | |
| 2162 | - }, function (t) { | |
| 2163 | - n("throw", t, i, f); | |
| 2164 | - }) : e.resolve(u).then(function (t) { | |
| 2165 | - c.value = t, i(c); | |
| 2166 | - }, function (t) { | |
| 2167 | - return n("throw", t, i, f); | |
| 2168 | - }); | |
| 2169 | - } catch (t) { | |
| 2170 | - f(t); | |
| 2171 | - } | |
| 2172 | - } | |
| 2173 | - var r; | |
| 2174 | - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { | |
| 2175 | - return this; | |
| 2176 | - })), regeneratorDefine(this, "_invoke", function (t, o, i) { | |
| 2177 | - function f() { | |
| 2178 | - return new e(function (e, r) { | |
| 2179 | - n(t, i, e, r); | |
| 2180 | - }); | |
| 2181 | - } | |
| 2182 | - return r = r ? r.then(f, f) : f(); | |
| 2183 | - }, !0); | |
| 2184 | -} | |
| 2185 | -module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2186 | - | |
| 2187 | -/***/ }), | |
| 2188 | - | |
| 2189 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js": | |
| 2190 | -/*!*******************************************************************!*\ | |
| 2191 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorDefine.js ***! | |
| 2192 | - \*******************************************************************/ | |
| 2193 | -/***/ ((module) => { | |
| 2194 | - | |
| 2195 | -function _regeneratorDefine(e, r, n, t) { | |
| 2196 | - var i = Object.defineProperty; | |
| 2197 | - try { | |
| 2198 | - i({}, "", {}); | |
| 2199 | - } catch (e) { | |
| 2200 | - i = 0; | |
| 2201 | - } | |
| 2202 | - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 2203 | - function o(r, n) { | |
| 2204 | - _regeneratorDefine(e, r, function (e) { | |
| 2205 | - return this._invoke(r, n, e); | |
| 2206 | - }); | |
| 2207 | - } | |
| 2208 | - r ? i ? i(e, r, { | |
| 2209 | - value: n, | |
| 2210 | - enumerable: !t, | |
| 2211 | - configurable: !t, | |
| 2212 | - writable: !t | |
| 2213 | - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 2214 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 2215 | -} | |
| 2216 | -module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2217 | - | |
| 2218 | -/***/ }), | |
| 2219 | - | |
| 2220 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js": | |
| 2221 | -/*!*****************************************************************!*\ | |
| 2222 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorKeys.js ***! | |
| 2223 | - \*****************************************************************/ | |
| 2224 | -/***/ ((module) => { | |
| 2225 | - | |
| 2226 | -function _regeneratorKeys(e) { | |
| 2227 | - var n = Object(e), | |
| 2228 | - r = []; | |
| 2229 | - for (var t in n) r.unshift(t); | |
| 2230 | - return function e() { | |
| 2231 | - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 2232 | - return e.done = !0, e; | |
| 2233 | - }; | |
| 2234 | -} | |
| 2235 | -module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2236 | - | |
| 2237 | -/***/ }), | |
| 2238 | - | |
| 2239 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 2240 | -/*!********************************************************************!*\ | |
| 2241 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 2242 | - \********************************************************************/ | |
| 2243 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2244 | - | |
| 2245 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 2246 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 2247 | -var regeneratorAsync = __webpack_require__(/*! ./regeneratorAsync.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js"); | |
| 2248 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 2249 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 2250 | -var regeneratorKeys = __webpack_require__(/*! ./regeneratorKeys.js */ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js"); | |
| 2251 | -var regeneratorValues = __webpack_require__(/*! ./regeneratorValues.js */ "../node_modules/@babel/runtime/helpers/regeneratorValues.js"); | |
| 2252 | -function _regeneratorRuntime() { | |
| 2253 | - "use strict"; | |
| 2254 | - | |
| 2255 | - var r = regenerator(), | |
| 2256 | - e = r.m(_regeneratorRuntime), | |
| 2257 | - t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 2258 | - function n(r) { | |
| 2259 | - var e = "function" == typeof r && r.constructor; | |
| 2260 | - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 2261 | - } | |
| 2262 | - var o = { | |
| 2263 | - "throw": 1, | |
| 2264 | - "return": 2, | |
| 2265 | - "break": 3, | |
| 2266 | - "continue": 3 | |
| 2267 | - }; | |
| 2268 | - function a(r) { | |
| 2269 | - var e, t; | |
| 2270 | - return function (n) { | |
| 2271 | - e || (e = { | |
| 2272 | - stop: function stop() { | |
| 2273 | - return t(n.a, 2); | |
| 2274 | - }, | |
| 2275 | - "catch": function _catch() { | |
| 2276 | - return n.v; | |
| 2277 | - }, | |
| 2278 | - abrupt: function abrupt(r, e) { | |
| 2279 | - return t(n.a, o[r], e); | |
| 2280 | - }, | |
| 2281 | - delegateYield: function delegateYield(r, o, a) { | |
| 2282 | - return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 2283 | - }, | |
| 2284 | - finish: function finish(r) { | |
| 2285 | - return t(n.f, r); | |
| 2286 | - } | |
| 2287 | - }, t = function t(r, _t, o) { | |
| 2288 | - n.p = e.prev, n.n = e.next; | |
| 2289 | - try { | |
| 2290 | - return r(_t, o); | |
| 2291 | - } finally { | |
| 2292 | - e.next = n.n; | |
| 2293 | - } | |
| 2294 | - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 2295 | - try { | |
| 2296 | - return r.call(this, e); | |
| 2297 | - } finally { | |
| 2298 | - n.p = e.prev, n.n = e.next; | |
| 2299 | - } | |
| 2300 | - }; | |
| 2301 | - } | |
| 2302 | - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 2303 | - return { | |
| 2304 | - wrap: function wrap(e, t, n, o) { | |
| 2305 | - return r.w(a(e), t, n, o && o.reverse()); | |
| 2306 | - }, | |
| 2307 | - isGeneratorFunction: n, | |
| 2308 | - mark: r.m, | |
| 2309 | - awrap: function awrap(r, e) { | |
| 2310 | - return new OverloadYield(r, e); | |
| 2311 | - }, | |
| 2312 | - AsyncIterator: regeneratorAsyncIterator, | |
| 2313 | - async: function async(r, e, t, o, u) { | |
| 2314 | - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 2315 | - }, | |
| 2316 | - keys: regeneratorKeys, | |
| 2317 | - values: regeneratorValues | |
| 2318 | - }; | |
| 2319 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 2320 | -} | |
| 2321 | -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2322 | - | |
| 2323 | -/***/ }), | |
| 2324 | - | |
| 2325 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorValues.js": | |
| 2326 | -/*!*******************************************************************!*\ | |
| 2327 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorValues.js ***! | |
| 2328 | - \*******************************************************************/ | |
| 2329 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2330 | - | |
| 2331 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 2332 | -function _regeneratorValues(e) { | |
| 2333 | - if (null != e) { | |
| 2334 | - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], | |
| 2335 | - r = 0; | |
| 2336 | - if (t) return t.call(e); | |
| 2337 | - if ("function" == typeof e.next) return e; | |
| 2338 | - if (!isNaN(e.length)) return { | |
| 2339 | - next: function next() { | |
| 2340 | - return e && r >= e.length && (e = void 0), { | |
| 2341 | - value: e && e[r++], | |
| 2342 | - done: !e | |
| 2343 | - }; | |
| 2344 | - } | |
| 2345 | - }; | |
| 2346 | - } | |
| 2347 | - throw new TypeError(_typeof(e) + " is not iterable"); | |
| 2348 | -} | |
| 2349 | -module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2350 | - | |
| 2351 | -/***/ }), | |
| 2352 | - | |
| 2353 | -/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 2354 | -/*!***************************************************************!*\ | |
| 2355 | - !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 2356 | - \***************************************************************/ | |
| 2357 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2358 | - | |
| 2359 | -var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 2360 | -var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 2361 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 2362 | -var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 2363 | -function _slicedToArray(r, e) { | |
| 2364 | - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 2365 | -} | |
| 2366 | -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2367 | - | |
| 2368 | -/***/ }), | |
| 2369 | - | |
| 2370 | -/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": | |
| 2371 | -/*!*******************************************************************!*\ | |
| 2372 | - !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! | |
| 2373 | - \*******************************************************************/ | |
| 2374 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2375 | - | |
| 2376 | -var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); | |
| 2377 | -var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); | |
| 2378 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 2379 | -var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); | |
| 2380 | -function _toConsumableArray(r) { | |
| 2381 | - return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); | |
| 2382 | -} | |
| 2383 | -module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2384 | - | |
| 2385 | -/***/ }), | |
| 2386 | - | |
| 2387 | -/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 2388 | -/*!*************************************************************!*\ | |
| 2389 | - !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 2390 | - \*************************************************************/ | |
| 2391 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2392 | - | |
| 2393 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 2394 | -function toPrimitive(t, r) { | |
| 2395 | - if ("object" != _typeof(t) || !t) return t; | |
| 2396 | - var e = t[Symbol.toPrimitive]; | |
| 2397 | - if (void 0 !== e) { | |
| 2398 | - var i = e.call(t, r || "default"); | |
| 2399 | - if ("object" != _typeof(i)) return i; | |
| 2400 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 2401 | - } | |
| 2402 | - return ("string" === r ? String : Number)(t); | |
| 2403 | -} | |
| 2404 | -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2405 | - | |
| 2406 | -/***/ }), | |
| 2407 | - | |
| 2408 | -/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 2409 | -/*!***************************************************************!*\ | |
| 2410 | - !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 2411 | - \***************************************************************/ | |
| 2412 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2413 | - | |
| 2414 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 2415 | -var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 2416 | -function toPropertyKey(t) { | |
| 2417 | - var i = toPrimitive(t, "string"); | |
| 2418 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 2419 | -} | |
| 2420 | -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2421 | - | |
| 2422 | -/***/ }), | |
| 2423 | - | |
| 2424 | -/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 2425 | -/*!********************************************************!*\ | |
| 2426 | - !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 2427 | - \********************************************************/ | |
| 2428 | -/***/ ((module) => { | |
| 2429 | - | |
| 2430 | -function _typeof(o) { | |
| 2431 | - "@babel/helpers - typeof"; | |
| 2432 | - | |
| 2433 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 2434 | - return typeof o; | |
| 2435 | - } : function (o) { | |
| 2436 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 2437 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 2438 | -} | |
| 2439 | -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2440 | - | |
| 2441 | -/***/ }), | |
| 2442 | - | |
| 2443 | -/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 2444 | -/*!****************************************************************************!*\ | |
| 2445 | - !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 2446 | - \****************************************************************************/ | |
| 2447 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2448 | - | |
| 2449 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 2450 | -function _unsupportedIterableToArray(r, a) { | |
| 2451 | - if (r) { | |
| 2452 | - if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 2453 | - var t = {}.toString.call(r).slice(8, -1); | |
| 2454 | - 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; | |
| 2455 | - } | |
| 2456 | -} | |
| 2457 | -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2458 | - | |
| 2459 | -/***/ }), | |
| 2460 | - | |
| 2461 | -/***/ "../node_modules/@babel/runtime/regenerator/index.js": | |
| 2462 | -/*!***********************************************************!*\ | |
| 2463 | - !*** ../node_modules/@babel/runtime/regenerator/index.js ***! | |
| 2464 | - \***********************************************************/ | |
| 2465 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2466 | - | |
| 2467 | -// TODO(Babel 8): Remove this file. | |
| 2468 | - | |
| 2469 | -var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); | |
| 2470 | -module.exports = runtime; | |
| 2471 | - | |
| 2472 | -// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= | |
| 2473 | -try { | |
| 2474 | - regeneratorRuntime = runtime; | |
| 2475 | -} catch (accidentalStrictMode) { | |
| 2476 | - if (typeof globalThis === "object") { | |
| 2477 | - globalThis.regeneratorRuntime = runtime; | |
| 2478 | - } else { | |
| 2479 | - Function("r", "regeneratorRuntime = r")(runtime); | |
| 2480 | - } | |
| 2481 | -} | |
| 2482 | - | |
| 2483 | - | |
| 2484 | -/***/ }), | |
| 2485 | - | |
| 2486 | -/***/ "../node_modules/@wordpress/element/build-module/create-interpolate-element.js": | |
| 2487 | -/*!*************************************************************************************!*\ | |
| 2488 | - !*** ../node_modules/@wordpress/element/build-module/create-interpolate-element.js ***! | |
| 2489 | - \*************************************************************************************/ | |
| 2490 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 2491 | - | |
| 2492 | -"use strict"; | |
| 2493 | -__webpack_require__.r(__webpack_exports__); | |
| 2494 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2495 | -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 2496 | -/* harmony export */ }); | |
| 2497 | -/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./react */ "react"); | |
| 2498 | -/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_react__WEBPACK_IMPORTED_MODULE_0__); | |
| 52 | +//#endregion | |
| 53 | +//#region node_modules/@wordpress/element/build-module/react-platform.js | |
| 2499 | 54 | /** |
| 2500 | - * Internal dependencies | |
| 2501 | - */ | |
| 55 | + * External dependencies | |
| 56 | + */ | |
| 57 | + var import_client = require_client(); | |
| 2502 | 58 | |
| 59 | +//#endregion | |
| 60 | +//#region node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js | |
| 61 | + function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 62 | + try { | |
| 63 | + var i = n[a](c); | |
| 64 | + var u = i.value; | |
| 65 | + } catch (n) { | |
| 66 | + e(n); | |
| 67 | + return; | |
| 68 | + } | |
| 69 | + i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 70 | + } | |
| 71 | + function _asyncToGenerator(n) { | |
| 72 | + return function() { | |
| 73 | + var t = this; | |
| 74 | + var e = arguments; | |
| 75 | + return new Promise(function(r, o) { | |
| 76 | + var a = n.apply(t, e); | |
| 77 | + function _next(n) { | |
| 78 | + asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 79 | + } | |
| 80 | + function _throw(n) { | |
| 81 | + asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 82 | + } | |
| 83 | + _next(void 0); | |
| 84 | + }); | |
| 85 | + }; | |
| 86 | + } | |
| 2503 | 87 | |
| 2504 | -/** | |
| 2505 | - * Object containing a React element. | |
| 2506 | - * | |
| 2507 | - * @typedef {import('react').ReactElement} Element | |
| 2508 | - */ | |
| 88 | +//#endregion | |
| 89 | +//#region node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js | |
| 90 | + function _arrayWithHoles(r) { | |
| 91 | + if (Array.isArray(r)) return r; | |
| 92 | + } | |
| 2509 | 93 | |
| 2510 | -let indoc, offset, output, stack; | |
| 94 | +//#endregion | |
| 95 | +//#region node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js | |
| 96 | + function _iterableToArrayLimit(r, l) { | |
| 97 | + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 98 | + if (null != t) { | |
| 99 | + var e; | |
| 100 | + var n; | |
| 101 | + var i; | |
| 102 | + var u; | |
| 103 | + var a = []; | |
| 104 | + var f = !0; | |
| 105 | + var o = !1; | |
| 106 | + try { | |
| 107 | + if (i = (t = t.call(r)).next, 0 === l) { | |
| 108 | + if (Object(t) !== t) return; | |
| 109 | + f = !1; | |
| 110 | + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 111 | + } catch (r) { | |
| 112 | + o = !0, n = r; | |
| 113 | + } finally { | |
| 114 | + try { | |
| 115 | + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 116 | + } finally { | |
| 117 | + if (o) throw n; | |
| 118 | + } | |
| 119 | + } | |
| 120 | + return a; | |
| 121 | + } | |
| 122 | + } | |
| 2511 | 123 | |
| 2512 | -/** | |
| 2513 | - * Matches tags in the localized string | |
| 2514 | - * | |
| 2515 | - * This is used for extracting the tag pattern groups for parsing the localized | |
| 2516 | - * string and along with the map converting it to a react element. | |
| 2517 | - * | |
| 2518 | - * There are four references extracted using this tokenizer: | |
| 2519 | - * | |
| 2520 | - * match: Full match of the tag (i.e. <strong>, </strong>, <br/>) | |
| 2521 | - * isClosing: The closing slash, if it exists. | |
| 2522 | - * name: The name portion of the tag (strong, br) (if ) | |
| 2523 | - * isSelfClosed: The slash on a self closing tag, if it exists. | |
| 2524 | - * | |
| 2525 | - * @type {RegExp} | |
| 2526 | - */ | |
| 2527 | -const tokenizer = /<(\/)?(\w+)\s*(\/)?>/g; | |
| 124 | +//#endregion | |
| 125 | +//#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js | |
| 126 | + function _arrayLikeToArray(r, a) { | |
| 127 | + (null == a || a > r.length) && (a = r.length); | |
| 128 | + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 129 | + return n; | |
| 130 | + } | |
| 2528 | 131 | |
| 2529 | -/** | |
| 2530 | - * The stack frame tracking parse progress. | |
| 2531 | - * | |
| 2532 | - * @typedef Frame | |
| 2533 | - * | |
| 2534 | - * @property {Element} element A parent element which may still have | |
| 2535 | - * @property {number} tokenStart Offset at which parent element first | |
| 2536 | - * appears. | |
| 2537 | - * @property {number} tokenLength Length of string marking start of parent | |
| 2538 | - * element. | |
| 2539 | - * @property {number} [prevOffset] Running offset at which parsing should | |
| 2540 | - * continue. | |
| 2541 | - * @property {number} [leadingTextStart] Offset at which last closing element | |
| 2542 | - * finished, used for finding text between | |
| 2543 | - * elements. | |
| 2544 | - * @property {Element[]} children Children. | |
| 2545 | - */ | |
| 132 | +//#endregion | |
| 133 | +//#region node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js | |
| 134 | + function _unsupportedIterableToArray(r, a) { | |
| 135 | + if (r) { | |
| 136 | + if ("string" == typeof r) return _arrayLikeToArray(r, a); | |
| 137 | + var t = {}.toString.call(r).slice(8, -1); | |
| 138 | + 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; | |
| 139 | + } | |
| 140 | + } | |
| 2546 | 141 | |
| 2547 | -/** | |
| 2548 | - * Tracks recursive-descent parse state. | |
| 2549 | - * | |
| 2550 | - * This is a Stack frame holding parent elements until all children have been | |
| 2551 | - * parsed. | |
| 2552 | - * | |
| 2553 | - * @private | |
| 2554 | - * @param {Element} element A parent element which may still have | |
| 2555 | - * nested children not yet parsed. | |
| 2556 | - * @param {number} tokenStart Offset at which parent element first | |
| 2557 | - * appears. | |
| 2558 | - * @param {number} tokenLength Length of string marking start of parent | |
| 2559 | - * element. | |
| 2560 | - * @param {number} [prevOffset] Running offset at which parsing should | |
| 2561 | - * continue. | |
| 2562 | - * @param {number} [leadingTextStart] Offset at which last closing element | |
| 2563 | - * finished, used for finding text between | |
| 2564 | - * elements. | |
| 2565 | - * | |
| 2566 | - * @return {Frame} The stack frame tracking parse progress. | |
| 2567 | - */ | |
| 2568 | -function createFrame(element, tokenStart, tokenLength, prevOffset, leadingTextStart) { | |
| 2569 | - return { | |
| 2570 | - element, | |
| 2571 | - tokenStart, | |
| 2572 | - tokenLength, | |
| 2573 | - prevOffset, | |
| 2574 | - leadingTextStart, | |
| 2575 | - children: [] | |
| 2576 | - }; | |
| 2577 | -} | |
| 142 | +//#endregion | |
| 143 | +//#region node_modules/@babel/runtime/helpers/esm/nonIterableRest.js | |
| 144 | + function _nonIterableRest() { | |
| 145 | + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 146 | + } | |
| 2578 | 147 | |
| 2579 | -/** | |
| 2580 | - * This function creates an interpolated element from a passed in string with | |
| 2581 | - * specific tags matching how the string should be converted to an element via | |
| 2582 | - * the conversion map value. | |
| 2583 | - * | |
| 2584 | - * @example | |
| 2585 | - * For example, for the given string: | |
| 2586 | - * | |
| 2587 | - * "This is a <span>string</span> with <a>a link</a> and a self-closing | |
| 2588 | - * <CustomComponentB/> tag" | |
| 2589 | - * | |
| 2590 | - * You would have something like this as the conversionMap value: | |
| 2591 | - * | |
| 2592 | - * ```js | |
| 2593 | - * { | |
| 2594 | - * span: <span />, | |
| 2595 | - * a: <a href={ 'https://github.com' } />, | |
| 2596 | - * CustomComponentB: <CustomComponent />, | |
| 2597 | - * } | |
| 2598 | - * ``` | |
| 2599 | - * | |
| 2600 | - * @param {string} interpolatedString The interpolation string to be parsed. | |
| 2601 | - * @param {Record<string, Element>} conversionMap The map used to convert the string to | |
| 2602 | - * a react element. | |
| 2603 | - * @throws {TypeError} | |
| 2604 | - * @return {Element} A wp element. | |
| 2605 | - */ | |
| 2606 | -const createInterpolateElement = (interpolatedString, conversionMap) => { | |
| 2607 | - indoc = interpolatedString; | |
| 2608 | - offset = 0; | |
| 2609 | - output = []; | |
| 2610 | - stack = []; | |
| 2611 | - tokenizer.lastIndex = 0; | |
| 2612 | - if (!isValidConversionMap(conversionMap)) { | |
| 2613 | - throw new TypeError('The conversionMap provided is not valid. It must be an object with values that are React Elements'); | |
| 2614 | - } | |
| 2615 | - do { | |
| 2616 | - // twiddle our thumbs | |
| 2617 | - } while (proceed(conversionMap)); | |
| 2618 | - return (0,_react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, ...output); | |
| 2619 | -}; | |
| 2620 | - | |
| 2621 | -/** | |
| 2622 | - * Validate conversion map. | |
| 2623 | - * | |
| 2624 | - * A map is considered valid if it's an object and every value in the object | |
| 2625 | - * is a React Element | |
| 2626 | - * | |
| 2627 | - * @private | |
| 2628 | - * | |
| 2629 | - * @param {Object} conversionMap The map being validated. | |
| 2630 | - * | |
| 2631 | - * @return {boolean} True means the map is valid. | |
| 2632 | - */ | |
| 2633 | -const isValidConversionMap = conversionMap => { | |
| 2634 | - const isObject = typeof conversionMap === 'object'; | |
| 2635 | - const values = isObject && Object.values(conversionMap); | |
| 2636 | - return isObject && values.length && values.every(element => (0,_react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(element)); | |
| 2637 | -}; | |
| 2638 | - | |
| 2639 | -/** | |
| 2640 | - * This is the iterator over the matches in the string. | |
| 2641 | - * | |
| 2642 | - * @private | |
| 2643 | - * | |
| 2644 | - * @param {Object} conversionMap The conversion map for the string. | |
| 2645 | - * | |
| 2646 | - * @return {boolean} true for continuing to iterate, false for finished. | |
| 2647 | - */ | |
| 2648 | -function proceed(conversionMap) { | |
| 2649 | - const next = nextToken(); | |
| 2650 | - const [tokenType, name, startOffset, tokenLength] = next; | |
| 2651 | - const stackDepth = stack.length; | |
| 2652 | - const leadingTextStart = startOffset > offset ? offset : null; | |
| 2653 | - if (!conversionMap[name]) { | |
| 2654 | - addText(); | |
| 2655 | - return false; | |
| 2656 | - } | |
| 2657 | - switch (tokenType) { | |
| 2658 | - case 'no-more-tokens': | |
| 2659 | - if (stackDepth !== 0) { | |
| 2660 | - const { | |
| 2661 | - leadingTextStart: stackLeadingText, | |
| 2662 | - tokenStart | |
| 2663 | - } = stack.pop(); | |
| 2664 | - output.push(indoc.substr(stackLeadingText, tokenStart)); | |
| 2665 | - } | |
| 2666 | - addText(); | |
| 2667 | - return false; | |
| 2668 | - case 'self-closed': | |
| 2669 | - if (0 === stackDepth) { | |
| 2670 | - if (null !== leadingTextStart) { | |
| 2671 | - output.push(indoc.substr(leadingTextStart, startOffset - leadingTextStart)); | |
| 2672 | - } | |
| 2673 | - output.push(conversionMap[name]); | |
| 2674 | - offset = startOffset + tokenLength; | |
| 2675 | - return true; | |
| 2676 | - } | |
| 2677 | - | |
| 2678 | - // Otherwise we found an inner element. | |
| 2679 | - addChild(createFrame(conversionMap[name], startOffset, tokenLength)); | |
| 2680 | - offset = startOffset + tokenLength; | |
| 2681 | - return true; | |
| 2682 | - case 'opener': | |
| 2683 | - stack.push(createFrame(conversionMap[name], startOffset, tokenLength, startOffset + tokenLength, leadingTextStart)); | |
| 2684 | - offset = startOffset + tokenLength; | |
| 2685 | - return true; | |
| 2686 | - case 'closer': | |
| 2687 | - // If we're not nesting then this is easy - close the block. | |
| 2688 | - if (1 === stackDepth) { | |
| 2689 | - closeOuterElement(startOffset); | |
| 2690 | - offset = startOffset + tokenLength; | |
| 2691 | - return true; | |
| 2692 | - } | |
| 2693 | - | |
| 2694 | - // Otherwise we're nested and we have to close out the current | |
| 2695 | - // block and add it as a innerBlock to the parent. | |
| 2696 | - const stackTop = stack.pop(); | |
| 2697 | - const text = indoc.substr(stackTop.prevOffset, startOffset - stackTop.prevOffset); | |
| 2698 | - stackTop.children.push(text); | |
| 2699 | - stackTop.prevOffset = startOffset + tokenLength; | |
| 2700 | - const frame = createFrame(stackTop.element, stackTop.tokenStart, stackTop.tokenLength, startOffset + tokenLength); | |
| 2701 | - frame.children = stackTop.children; | |
| 2702 | - addChild(frame); | |
| 2703 | - offset = startOffset + tokenLength; | |
| 2704 | - return true; | |
| 2705 | - default: | |
| 2706 | - addText(); | |
| 2707 | - return false; | |
| 2708 | - } | |
| 2709 | -} | |
| 2710 | - | |
| 2711 | -/** | |
| 2712 | - * Grabs the next token match in the string and returns it's details. | |
| 2713 | - * | |
| 2714 | - * @private | |
| 2715 | - * | |
| 2716 | - * @return {Array} An array of details for the token matched. | |
| 2717 | - */ | |
| 2718 | -function nextToken() { | |
| 2719 | - const matches = tokenizer.exec(indoc); | |
| 2720 | - // We have no more tokens. | |
| 2721 | - if (null === matches) { | |
| 2722 | - return ['no-more-tokens']; | |
| 2723 | - } | |
| 2724 | - const startedAt = matches.index; | |
| 2725 | - const [match, isClosing, name, isSelfClosed] = matches; | |
| 2726 | - const length = match.length; | |
| 2727 | - if (isSelfClosed) { | |
| 2728 | - return ['self-closed', name, startedAt, length]; | |
| 2729 | - } | |
| 2730 | - if (isClosing) { | |
| 2731 | - return ['closer', name, startedAt, length]; | |
| 2732 | - } | |
| 2733 | - return ['opener', name, startedAt, length]; | |
| 2734 | -} | |
| 2735 | - | |
| 2736 | -/** | |
| 2737 | - * Pushes text extracted from the indoc string to the output stack given the | |
| 2738 | - * current rawLength value and offset (if rawLength is provided ) or the | |
| 2739 | - * indoc.length and offset. | |
| 2740 | - * | |
| 2741 | - * @private | |
| 2742 | - */ | |
| 2743 | -function addText() { | |
| 2744 | - const length = indoc.length - offset; | |
| 2745 | - if (0 === length) { | |
| 2746 | - return; | |
| 2747 | - } | |
| 2748 | - output.push(indoc.substr(offset, length)); | |
| 2749 | -} | |
| 2750 | - | |
| 2751 | -/** | |
| 2752 | - * Pushes a child element to the associated parent element's children for the | |
| 2753 | - * parent currently active in the stack. | |
| 2754 | - * | |
| 2755 | - * @private | |
| 2756 | - * | |
| 2757 | - * @param {Frame} frame The Frame containing the child element and it's | |
| 2758 | - * token information. | |
| 2759 | - */ | |
| 2760 | -function addChild(frame) { | |
| 2761 | - const { | |
| 2762 | - element, | |
| 2763 | - tokenStart, | |
| 2764 | - tokenLength, | |
| 2765 | - prevOffset, | |
| 2766 | - children | |
| 2767 | - } = frame; | |
| 2768 | - const parent = stack[stack.length - 1]; | |
| 2769 | - const text = indoc.substr(parent.prevOffset, tokenStart - parent.prevOffset); | |
| 2770 | - if (text) { | |
| 2771 | - parent.children.push(text); | |
| 2772 | - } | |
| 2773 | - parent.children.push((0,_react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(element, null, ...children)); | |
| 2774 | - parent.prevOffset = prevOffset ? prevOffset : tokenStart + tokenLength; | |
| 2775 | -} | |
| 2776 | - | |
| 2777 | -/** | |
| 2778 | - * This is called for closing tags. It creates the element currently active in | |
| 2779 | - * the stack. | |
| 2780 | - * | |
| 2781 | - * @private | |
| 2782 | - * | |
| 2783 | - * @param {number} endOffset Offset at which the closing tag for the element | |
| 2784 | - * begins in the string. If this is greater than the | |
| 2785 | - * prevOffset attached to the element, then this | |
| 2786 | - * helps capture any remaining nested text nodes in | |
| 2787 | - * the element. | |
| 2788 | - */ | |
| 2789 | -function closeOuterElement(endOffset) { | |
| 2790 | - const { | |
| 2791 | - element, | |
| 2792 | - leadingTextStart, | |
| 2793 | - prevOffset, | |
| 2794 | - tokenStart, | |
| 2795 | - children | |
| 2796 | - } = stack.pop(); | |
| 2797 | - const text = endOffset ? indoc.substr(prevOffset, endOffset - prevOffset) : indoc.substr(prevOffset); | |
| 2798 | - if (text) { | |
| 2799 | - children.push(text); | |
| 2800 | - } | |
| 2801 | - if (null !== leadingTextStart) { | |
| 2802 | - output.push(indoc.substr(leadingTextStart, tokenStart - leadingTextStart)); | |
| 2803 | - } | |
| 2804 | - output.push((0,_react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(element, null, ...children)); | |
| 2805 | -} | |
| 2806 | -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createInterpolateElement); | |
| 2807 | -//# sourceMappingURL=create-interpolate-element.js.map | |
| 2808 | - | |
| 2809 | -/***/ }), | |
| 2810 | - | |
| 2811 | -/***/ "../node_modules/@wordpress/element/build-module/index.js": | |
| 2812 | -/*!****************************************************************!*\ | |
| 2813 | - !*** ../node_modules/@wordpress/element/build-module/index.js ***! | |
| 2814 | - \****************************************************************/ | |
| 2815 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 2816 | - | |
| 2817 | -"use strict"; | |
| 2818 | -__webpack_require__.r(__webpack_exports__); | |
| 2819 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2820 | -/* harmony export */ Children: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Children), | |
| 2821 | -/* harmony export */ Component: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Component), | |
| 2822 | -/* harmony export */ Fragment: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Fragment), | |
| 2823 | -/* harmony export */ Platform: () => (/* reexport safe */ _platform__WEBPACK_IMPORTED_MODULE_4__["default"]), | |
| 2824 | -/* harmony export */ PureComponent: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.PureComponent), | |
| 2825 | -/* harmony export */ RawHTML: () => (/* reexport safe */ _raw_html__WEBPACK_IMPORTED_MODULE_6__["default"]), | |
| 2826 | -/* harmony export */ StrictMode: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.StrictMode), | |
| 2827 | -/* harmony export */ Suspense: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Suspense), | |
| 2828 | -/* harmony export */ cloneElement: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.cloneElement), | |
| 2829 | -/* harmony export */ concatChildren: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.concatChildren), | |
| 2830 | -/* harmony export */ createContext: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.createContext), | |
| 2831 | -/* harmony export */ createElement: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.createElement), | |
| 2832 | -/* harmony export */ createInterpolateElement: () => (/* reexport safe */ _create_interpolate_element__WEBPACK_IMPORTED_MODULE_0__["default"]), | |
| 2833 | -/* harmony export */ createPortal: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.createPortal), | |
| 2834 | -/* harmony export */ createRef: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.createRef), | |
| 2835 | -/* harmony export */ createRoot: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.createRoot), | |
| 2836 | -/* harmony export */ findDOMNode: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.findDOMNode), | |
| 2837 | -/* harmony export */ flushSync: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.flushSync), | |
| 2838 | -/* harmony export */ forwardRef: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.forwardRef), | |
| 2839 | -/* harmony export */ hydrate: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.hydrate), | |
| 2840 | -/* harmony export */ hydrateRoot: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.hydrateRoot), | |
| 2841 | -/* harmony export */ isEmptyElement: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_3__.isEmptyElement), | |
| 2842 | -/* harmony export */ isValidElement: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.isValidElement), | |
| 2843 | -/* harmony export */ lazy: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.lazy), | |
| 2844 | -/* harmony export */ memo: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.memo), | |
| 2845 | -/* harmony export */ render: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.render), | |
| 2846 | -/* harmony export */ renderToString: () => (/* reexport safe */ _serialize__WEBPACK_IMPORTED_MODULE_5__["default"]), | |
| 2847 | -/* harmony export */ startTransition: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.startTransition), | |
| 2848 | -/* harmony export */ switchChildrenNodeName: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.switchChildrenNodeName), | |
| 2849 | -/* harmony export */ unmountComponentAtNode: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.unmountComponentAtNode), | |
| 2850 | -/* harmony export */ useCallback: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useCallback), | |
| 2851 | -/* harmony export */ useContext: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useContext), | |
| 2852 | -/* harmony export */ useDebugValue: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useDebugValue), | |
| 2853 | -/* harmony export */ useDeferredValue: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useDeferredValue), | |
| 2854 | -/* harmony export */ useEffect: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useEffect), | |
| 2855 | -/* harmony export */ useId: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useId), | |
| 2856 | -/* harmony export */ useImperativeHandle: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle), | |
| 2857 | -/* harmony export */ useInsertionEffect: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useInsertionEffect), | |
| 2858 | -/* harmony export */ useLayoutEffect: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect), | |
| 2859 | -/* harmony export */ useMemo: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useMemo), | |
| 2860 | -/* harmony export */ useReducer: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useReducer), | |
| 2861 | -/* harmony export */ useRef: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useRef), | |
| 2862 | -/* harmony export */ useState: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useState), | |
| 2863 | -/* harmony export */ useSyncExternalStore: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useSyncExternalStore), | |
| 2864 | -/* harmony export */ useTransition: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useTransition) | |
| 2865 | -/* harmony export */ }); | |
| 2866 | -/* harmony import */ var _create_interpolate_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./create-interpolate-element */ "../node_modules/@wordpress/element/build-module/create-interpolate-element.js"); | |
| 2867 | -/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./react */ "../node_modules/@wordpress/element/build-module/react.js"); | |
| 2868 | -/* harmony import */ var _react_platform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./react-platform */ "../node_modules/@wordpress/element/build-module/react-platform.js"); | |
| 2869 | -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "../node_modules/@wordpress/element/build-module/utils.js"); | |
| 2870 | -/* harmony import */ var _platform__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./platform */ "../node_modules/@wordpress/element/build-module/platform.js"); | |
| 2871 | -/* harmony import */ var _serialize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./serialize */ "../node_modules/@wordpress/element/build-module/serialize.js"); | |
| 2872 | -/* harmony import */ var _raw_html__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./raw-html */ "../node_modules/@wordpress/element/build-module/raw-html.js"); | |
| 2873 | - | |
| 2874 | - | |
| 2875 | - | |
| 2876 | - | |
| 2877 | - | |
| 2878 | - | |
| 2879 | - | |
| 2880 | -//# sourceMappingURL=index.js.map | |
| 2881 | - | |
| 2882 | -/***/ }), | |
| 2883 | - | |
| 2884 | -/***/ "../node_modules/@wordpress/element/build-module/platform.js": | |
| 2885 | -/*!*******************************************************************!*\ | |
| 2886 | - !*** ../node_modules/@wordpress/element/build-module/platform.js ***! | |
| 2887 | - \*******************************************************************/ | |
| 2888 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 2889 | - | |
| 2890 | -"use strict"; | |
| 2891 | -__webpack_require__.r(__webpack_exports__); | |
| 2892 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2893 | -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 2894 | -/* harmony export */ }); | |
| 2895 | -/** | |
| 2896 | - * Parts of this source were derived and modified from react-native-web, | |
| 2897 | - * released under the MIT license. | |
| 2898 | - * | |
| 2899 | - * Copyright (c) 2016-present, Nicolas Gallagher. | |
| 2900 | - * Copyright (c) 2015-present, Facebook, Inc. | |
| 2901 | - * | |
| 2902 | - */ | |
| 2903 | -const Platform = { | |
| 2904 | - OS: 'web', | |
| 2905 | - select: spec => 'web' in spec ? spec.web : spec.default, | |
| 2906 | - isWeb: true | |
| 2907 | -}; | |
| 2908 | -/** | |
| 2909 | - * Component used to detect the current Platform being used. | |
| 2910 | - * Use Platform.OS === 'web' to detect if running on web enviroment. | |
| 2911 | - * | |
| 2912 | - * This is the same concept as the React Native implementation. | |
| 2913 | - * | |
| 2914 | - * @see https://reactnative.dev/docs/platform-specific-code#platform-module | |
| 2915 | - * | |
| 2916 | - * Here is an example of how to use the select method: | |
| 2917 | - * @example | |
| 2918 | - * ```js | |
| 2919 | - * import { Platform } from '@wordpress/element'; | |
| 2920 | - * | |
| 2921 | - * const placeholderLabel = Platform.select( { | |
| 2922 | - * native: __( 'Add media' ), | |
| 2923 | - * web: __( 'Drag images, upload new ones or select files from your library.' ), | |
| 2924 | - * } ); | |
| 2925 | - * ``` | |
| 2926 | - */ | |
| 2927 | -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Platform); | |
| 2928 | -//# sourceMappingURL=platform.js.map | |
| 2929 | - | |
| 2930 | -/***/ }), | |
| 2931 | - | |
| 2932 | -/***/ "../node_modules/@wordpress/element/build-module/raw-html.js": | |
| 2933 | -/*!*******************************************************************!*\ | |
| 2934 | - !*** ../node_modules/@wordpress/element/build-module/raw-html.js ***! | |
| 2935 | - \*******************************************************************/ | |
| 2936 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 2937 | - | |
| 2938 | -"use strict"; | |
| 2939 | -__webpack_require__.r(__webpack_exports__); | |
| 2940 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2941 | -/* harmony export */ "default": () => (/* binding */ RawHTML) | |
| 2942 | -/* harmony export */ }); | |
| 2943 | -/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./react */ "react"); | |
| 2944 | -/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_react__WEBPACK_IMPORTED_MODULE_0__); | |
| 2945 | -/** | |
| 2946 | - * Internal dependencies | |
| 2947 | - */ | |
| 2948 | - | |
| 2949 | - | |
| 2950 | -/** @typedef {{children: string} & import('react').ComponentPropsWithoutRef<'div'>} RawHTMLProps */ | |
| 2951 | - | |
| 2952 | -/** | |
| 2953 | - * Component used as equivalent of Fragment with unescaped HTML, in cases where | |
| 2954 | - * it is desirable to render dangerous HTML without needing a wrapper element. | |
| 2955 | - * To preserve additional props, a `div` wrapper _will_ be created if any props | |
| 2956 | - * aside from `children` are passed. | |
| 2957 | - * | |
| 2958 | - * @param {RawHTMLProps} props Children should be a string of HTML or an array | |
| 2959 | - * of strings. Other props will be passed through | |
| 2960 | - * to the div wrapper. | |
| 2961 | - * | |
| 2962 | - * @return {JSX.Element} Dangerously-rendering component. | |
| 2963 | - */ | |
| 2964 | -function RawHTML({ | |
| 2965 | - children, | |
| 2966 | - ...props | |
| 2967 | -}) { | |
| 2968 | - let rawHtml = ''; | |
| 2969 | - | |
| 2970 | - // Cast children as an array, and concatenate each element if it is a string. | |
| 2971 | - _react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children).forEach(child => { | |
| 2972 | - if (typeof child === 'string' && child.trim() !== '') { | |
| 2973 | - rawHtml += child; | |
| 2974 | - } | |
| 2975 | - }); | |
| 2976 | - | |
| 2977 | - // The `div` wrapper will be stripped by the `renderElement` serializer in | |
| 2978 | - // `./serialize.js` unless there are non-children props present. | |
| 2979 | - return (0,_react__WEBPACK_IMPORTED_MODULE_0__.createElement)('div', { | |
| 2980 | - dangerouslySetInnerHTML: { | |
| 2981 | - __html: rawHtml | |
| 2982 | - }, | |
| 2983 | - ...props | |
| 2984 | - }); | |
| 2985 | -} | |
| 2986 | -//# sourceMappingURL=raw-html.js.map | |
| 2987 | - | |
| 2988 | -/***/ }), | |
| 2989 | - | |
| 2990 | -/***/ "../node_modules/@wordpress/element/build-module/react-platform.js": | |
| 2991 | -/*!*************************************************************************!*\ | |
| 2992 | - !*** ../node_modules/@wordpress/element/build-module/react-platform.js ***! | |
| 2993 | - \*************************************************************************/ | |
| 2994 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 2995 | - | |
| 2996 | -"use strict"; | |
| 2997 | -__webpack_require__.r(__webpack_exports__); | |
| 2998 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2999 | -/* harmony export */ createPortal: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.createPortal), | |
| 3000 | -/* harmony export */ createRoot: () => (/* reexport safe */ react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot), | |
| 3001 | -/* harmony export */ findDOMNode: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.findDOMNode), | |
| 3002 | -/* harmony export */ flushSync: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.flushSync), | |
| 3003 | -/* harmony export */ hydrate: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.hydrate), | |
| 3004 | -/* harmony export */ hydrateRoot: () => (/* reexport safe */ react_dom_client__WEBPACK_IMPORTED_MODULE_1__.hydrateRoot), | |
| 3005 | -/* harmony export */ render: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.render), | |
| 3006 | -/* harmony export */ unmountComponentAtNode: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.unmountComponentAtNode) | |
| 3007 | -/* harmony export */ }); | |
| 3008 | -/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom */ "react-dom"); | |
| 3009 | -/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__); | |
| 3010 | -/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js"); | |
| 3011 | -/** | |
| 3012 | - * External dependencies | |
| 3013 | - */ | |
| 3014 | - | |
| 3015 | - | |
| 3016 | - | |
| 3017 | -/** | |
| 3018 | - * Creates a portal into which a component can be rendered. | |
| 3019 | - * | |
| 3020 | - * @see https://github.com/facebook/react/issues/10309#issuecomment-318433235 | |
| 3021 | - * | |
| 3022 | - * @param {import('react').ReactElement} child Any renderable child, such as an element, | |
| 3023 | - * string, or fragment. | |
| 3024 | - * @param {HTMLElement} container DOM node into which element should be rendered. | |
| 3025 | - */ | |
| 3026 | - | |
| 3027 | - | |
| 3028 | -/** | |
| 3029 | - * Finds the dom node of a React component. | |
| 3030 | - * | |
| 3031 | - * @param {import('react').ComponentType} component Component's instance. | |
| 3032 | - */ | |
| 3033 | - | |
| 3034 | - | |
| 3035 | -/** | |
| 3036 | - * Forces React to flush any updates inside the provided callback synchronously. | |
| 3037 | - * | |
| 3038 | - * @param {Function} callback Callback to run synchronously. | |
| 3039 | - */ | |
| 3040 | - | |
| 3041 | - | |
| 3042 | -/** | |
| 3043 | - * Renders a given element into the target DOM node. | |
| 3044 | - * | |
| 3045 | - * @deprecated since WordPress 6.2.0. Use `createRoot` instead. | |
| 3046 | - * @see https://react.dev/reference/react-dom/render | |
| 3047 | - */ | |
| 3048 | - | |
| 3049 | - | |
| 3050 | -/** | |
| 3051 | - * Hydrates a given element into the target DOM node. | |
| 3052 | - * | |
| 3053 | - * @deprecated since WordPress 6.2.0. Use `hydrateRoot` instead. | |
| 3054 | - * @see https://react.dev/reference/react-dom/hydrate | |
| 3055 | - */ | |
| 3056 | - | |
| 3057 | - | |
| 3058 | -/** | |
| 3059 | - * Creates a new React root for the target DOM node. | |
| 3060 | - * | |
| 3061 | - * @since 6.2.0 Introduced in WordPress core. | |
| 3062 | - * @see https://react.dev/reference/react-dom/client/createRoot | |
| 3063 | - */ | |
| 3064 | - | |
| 3065 | - | |
| 3066 | -/** | |
| 3067 | - * Creates a new React root for the target DOM node and hydrates it with a pre-generated markup. | |
| 3068 | - * | |
| 3069 | - * @since 6.2.0 Introduced in WordPress core. | |
| 3070 | - * @see https://react.dev/reference/react-dom/client/hydrateRoot | |
| 3071 | - */ | |
| 3072 | - | |
| 3073 | - | |
| 3074 | -/** | |
| 3075 | - * Removes any mounted element from the target DOM node. | |
| 3076 | - * | |
| 3077 | - * @deprecated since WordPress 6.2.0. Use `root.unmount()` instead. | |
| 3078 | - * @see https://react.dev/reference/react-dom/unmountComponentAtNode | |
| 3079 | - */ | |
| 3080 | - | |
| 3081 | -//# sourceMappingURL=react-platform.js.map | |
| 3082 | - | |
| 3083 | -/***/ }), | |
| 3084 | - | |
| 3085 | -/***/ "../node_modules/@wordpress/element/build-module/react.js": | |
| 3086 | -/*!****************************************************************!*\ | |
| 3087 | - !*** ../node_modules/@wordpress/element/build-module/react.js ***! | |
| 3088 | - \****************************************************************/ | |
| 3089 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 3090 | - | |
| 3091 | -"use strict"; | |
| 3092 | -__webpack_require__.r(__webpack_exports__); | |
| 3093 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3094 | -/* harmony export */ Children: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Children), | |
| 3095 | -/* harmony export */ Component: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Component), | |
| 3096 | -/* harmony export */ Fragment: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Fragment), | |
| 3097 | -/* harmony export */ PureComponent: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.PureComponent), | |
| 3098 | -/* harmony export */ StrictMode: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.StrictMode), | |
| 3099 | -/* harmony export */ Suspense: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Suspense), | |
| 3100 | -/* harmony export */ cloneElement: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.cloneElement), | |
| 3101 | -/* harmony export */ concatChildren: () => (/* binding */ concatChildren), | |
| 3102 | -/* harmony export */ createContext: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.createContext), | |
| 3103 | -/* harmony export */ createElement: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.createElement), | |
| 3104 | -/* harmony export */ createRef: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.createRef), | |
| 3105 | -/* harmony export */ forwardRef: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.forwardRef), | |
| 3106 | -/* harmony export */ isValidElement: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.isValidElement), | |
| 3107 | -/* harmony export */ lazy: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.lazy), | |
| 3108 | -/* harmony export */ memo: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.memo), | |
| 3109 | -/* harmony export */ startTransition: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.startTransition), | |
| 3110 | -/* harmony export */ switchChildrenNodeName: () => (/* binding */ switchChildrenNodeName), | |
| 3111 | -/* harmony export */ useCallback: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useCallback), | |
| 3112 | -/* harmony export */ useContext: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useContext), | |
| 3113 | -/* harmony export */ useDebugValue: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useDebugValue), | |
| 3114 | -/* harmony export */ useDeferredValue: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useDeferredValue), | |
| 3115 | -/* harmony export */ useEffect: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useEffect), | |
| 3116 | -/* harmony export */ useId: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useId), | |
| 3117 | -/* harmony export */ useImperativeHandle: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle), | |
| 3118 | -/* harmony export */ useInsertionEffect: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useInsertionEffect), | |
| 3119 | -/* harmony export */ useLayoutEffect: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect), | |
| 3120 | -/* harmony export */ useMemo: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useMemo), | |
| 3121 | -/* harmony export */ useReducer: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useReducer), | |
| 3122 | -/* harmony export */ useRef: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useRef), | |
| 3123 | -/* harmony export */ useState: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useState), | |
| 3124 | -/* harmony export */ useSyncExternalStore: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useSyncExternalStore), | |
| 3125 | -/* harmony export */ useTransition: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useTransition) | |
| 3126 | -/* harmony export */ }); | |
| 3127 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 3128 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 3129 | -/** | |
| 3130 | - * External dependencies | |
| 3131 | - */ | |
| 3132 | -// eslint-disable-next-line @typescript-eslint/no-restricted-imports | |
| 3133 | - | |
| 3134 | - | |
| 3135 | -/** | |
| 3136 | - * Object containing a React element. | |
| 3137 | - * | |
| 3138 | - * @typedef {import('react').ReactElement} Element | |
| 3139 | - */ | |
| 3140 | - | |
| 3141 | -/** | |
| 3142 | - * Object containing a React component. | |
| 3143 | - * | |
| 3144 | - * @typedef {import('react').ComponentType} ComponentType | |
| 3145 | - */ | |
| 3146 | - | |
| 3147 | -/** | |
| 3148 | - * Object containing a React synthetic event. | |
| 3149 | - * | |
| 3150 | - * @typedef {import('react').SyntheticEvent} SyntheticEvent | |
| 3151 | - */ | |
| 3152 | - | |
| 3153 | -/** | |
| 3154 | - * Object containing a React synthetic event. | |
| 3155 | - * | |
| 3156 | - * @template T | |
| 3157 | - * @typedef {import('react').RefObject<T>} RefObject<T> | |
| 3158 | - */ | |
| 3159 | - | |
| 3160 | -/** | |
| 3161 | - * Object that provides utilities for dealing with React children. | |
| 3162 | - */ | |
| 3163 | - | |
| 3164 | - | |
| 3165 | -/** | |
| 3166 | - * Creates a copy of an element with extended props. | |
| 3167 | - * | |
| 3168 | - * @param {Element} element Element | |
| 3169 | - * @param {?Object} props Props to apply to cloned element | |
| 3170 | - * | |
| 3171 | - * @return {Element} Cloned element. | |
| 3172 | - */ | |
| 3173 | - | |
| 3174 | - | |
| 3175 | -/** | |
| 3176 | - * A base class to create WordPress Components (Refs, state and lifecycle hooks) | |
| 3177 | - */ | |
| 3178 | - | |
| 3179 | - | |
| 3180 | -/** | |
| 3181 | - * Creates a context object containing two components: a provider and consumer. | |
| 3182 | - * | |
| 3183 | - * @param {Object} defaultValue A default data stored in the context. | |
| 3184 | - * | |
| 3185 | - * @return {Object} Context object. | |
| 3186 | - */ | |
| 3187 | - | |
| 3188 | - | |
| 3189 | -/** | |
| 3190 | - * Returns a new element of given type. Type can be either a string tag name or | |
| 3191 | - * another function which itself returns an element. | |
| 3192 | - * | |
| 3193 | - * @param {?(string|Function)} type Tag name or element creator | |
| 3194 | - * @param {Object} props Element properties, either attribute | |
| 3195 | - * set to apply to DOM node or values to | |
| 3196 | - * pass through to element creator | |
| 3197 | - * @param {...Element} children Descendant elements | |
| 3198 | - * | |
| 3199 | - * @return {Element} Element. | |
| 3200 | - */ | |
| 3201 | - | |
| 3202 | - | |
| 3203 | -/** | |
| 3204 | - * Returns an object tracking a reference to a rendered element via its | |
| 3205 | - * `current` property as either a DOMElement or Element, dependent upon the | |
| 3206 | - * type of element rendered with the ref attribute. | |
| 3207 | - * | |
| 3208 | - * @return {Object} Ref object. | |
| 3209 | - */ | |
| 3210 | - | |
| 3211 | - | |
| 3212 | -/** | |
| 3213 | - * Component enhancer used to enable passing a ref to its wrapped component. | |
| 3214 | - * Pass a function argument which receives `props` and `ref` as its arguments, | |
| 3215 | - * returning an element using the forwarded ref. The return value is a new | |
| 3216 | - * component which forwards its ref. | |
| 3217 | - * | |
| 3218 | - * @param {Function} forwarder Function passed `props` and `ref`, expected to | |
| 3219 | - * return an element. | |
| 3220 | - * | |
| 3221 | - * @return {Component} Enhanced component. | |
| 3222 | - */ | |
| 3223 | - | |
| 3224 | - | |
| 3225 | -/** | |
| 3226 | - * A component which renders its children without any wrapping element. | |
| 3227 | - */ | |
| 3228 | - | |
| 3229 | - | |
| 3230 | -/** | |
| 3231 | - * Checks if an object is a valid React Element. | |
| 3232 | - * | |
| 3233 | - * @param {Object} objectToCheck The object to be checked. | |
| 3234 | - * | |
| 3235 | - * @return {boolean} true if objectToTest is a valid React Element and false otherwise. | |
| 3236 | - */ | |
| 3237 | - | |
| 3238 | - | |
| 3239 | -/** | |
| 3240 | - * @see https://reactjs.org/docs/react-api.html#reactmemo | |
| 3241 | - */ | |
| 3242 | - | |
| 3243 | - | |
| 3244 | -/** | |
| 3245 | - * Component that activates additional checks and warnings for its descendants. | |
| 3246 | - */ | |
| 3247 | - | |
| 3248 | - | |
| 3249 | -/** | |
| 3250 | - * @see https://reactjs.org/docs/hooks-reference.html#usecallback | |
| 3251 | - */ | |
| 3252 | - | |
| 3253 | - | |
| 3254 | -/** | |
| 3255 | - * @see https://reactjs.org/docs/hooks-reference.html#usecontext | |
| 3256 | - */ | |
| 3257 | - | |
| 3258 | - | |
| 3259 | -/** | |
| 3260 | - * @see https://reactjs.org/docs/hooks-reference.html#usedebugvalue | |
| 3261 | - */ | |
| 3262 | - | |
| 3263 | - | |
| 3264 | -/** | |
| 3265 | - * @see https://reactjs.org/docs/hooks-reference.html#usedeferredvalue | |
| 3266 | - */ | |
| 3267 | - | |
| 3268 | - | |
| 3269 | -/** | |
| 3270 | - * @see https://reactjs.org/docs/hooks-reference.html#useeffect | |
| 3271 | - */ | |
| 3272 | - | |
| 3273 | - | |
| 3274 | -/** | |
| 3275 | - * @see https://reactjs.org/docs/hooks-reference.html#useid | |
| 3276 | - */ | |
| 3277 | - | |
| 3278 | - | |
| 3279 | -/** | |
| 3280 | - * @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle | |
| 3281 | - */ | |
| 3282 | - | |
| 3283 | - | |
| 3284 | -/** | |
| 3285 | - * @see https://reactjs.org/docs/hooks-reference.html#useinsertioneffect | |
| 3286 | - */ | |
| 3287 | - | |
| 3288 | - | |
| 3289 | -/** | |
| 3290 | - * @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect | |
| 3291 | - */ | |
| 3292 | - | |
| 3293 | - | |
| 3294 | -/** | |
| 3295 | - * @see https://reactjs.org/docs/hooks-reference.html#usememo | |
| 3296 | - */ | |
| 3297 | - | |
| 3298 | - | |
| 3299 | -/** | |
| 3300 | - * @see https://reactjs.org/docs/hooks-reference.html#usereducer | |
| 3301 | - */ | |
| 3302 | - | |
| 3303 | - | |
| 3304 | -/** | |
| 3305 | - * @see https://reactjs.org/docs/hooks-reference.html#useref | |
| 3306 | - */ | |
| 3307 | - | |
| 3308 | - | |
| 3309 | -/** | |
| 3310 | - * @see https://reactjs.org/docs/hooks-reference.html#usestate | |
| 3311 | - */ | |
| 3312 | - | |
| 3313 | - | |
| 3314 | -/** | |
| 3315 | - * @see https://reactjs.org/docs/hooks-reference.html#usesyncexternalstore | |
| 3316 | - */ | |
| 3317 | - | |
| 3318 | - | |
| 3319 | -/** | |
| 3320 | - * @see https://reactjs.org/docs/hooks-reference.html#usetransition | |
| 3321 | - */ | |
| 3322 | - | |
| 3323 | - | |
| 3324 | -/** | |
| 3325 | - * @see https://reactjs.org/docs/react-api.html#starttransition | |
| 3326 | - */ | |
| 3327 | - | |
| 3328 | - | |
| 3329 | -/** | |
| 3330 | - * @see https://reactjs.org/docs/react-api.html#reactlazy | |
| 3331 | - */ | |
| 3332 | - | |
| 3333 | - | |
| 3334 | -/** | |
| 3335 | - * @see https://reactjs.org/docs/react-api.html#reactsuspense | |
| 3336 | - */ | |
| 3337 | - | |
| 3338 | - | |
| 3339 | -/** | |
| 3340 | - * @see https://reactjs.org/docs/react-api.html#reactpurecomponent | |
| 3341 | - */ | |
| 3342 | - | |
| 3343 | - | |
| 3344 | -/** | |
| 3345 | - * Concatenate two or more React children objects. | |
| 3346 | - * | |
| 3347 | - * @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate. | |
| 3348 | - * | |
| 3349 | - * @return {Array} The concatenated value. | |
| 3350 | - */ | |
| 3351 | -function concatChildren(...childrenArguments) { | |
| 3352 | - return childrenArguments.reduce((accumulator, children, i) => { | |
| 3353 | - react__WEBPACK_IMPORTED_MODULE_0__.Children.forEach(children, (child, j) => { | |
| 3354 | - if (child && 'string' !== typeof child) { | |
| 3355 | - child = (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(child, { | |
| 3356 | - key: [i, j].join() | |
| 3357 | - }); | |
| 3358 | - } | |
| 3359 | - accumulator.push(child); | |
| 3360 | - }); | |
| 3361 | - return accumulator; | |
| 3362 | - }, []); | |
| 3363 | -} | |
| 3364 | - | |
| 3365 | -/** | |
| 3366 | - * Switches the nodeName of all the elements in the children object. | |
| 3367 | - * | |
| 3368 | - * @param {?Object} children Children object. | |
| 3369 | - * @param {string} nodeName Node name. | |
| 3370 | - * | |
| 3371 | - * @return {?Object} The updated children object. | |
| 3372 | - */ | |
| 3373 | -function switchChildrenNodeName(children, nodeName) { | |
| 3374 | - return children && react__WEBPACK_IMPORTED_MODULE_0__.Children.map(children, (elt, index) => { | |
| 3375 | - if (typeof elt?.valueOf() === 'string') { | |
| 3376 | - return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(nodeName, { | |
| 3377 | - key: index | |
| 3378 | - }, elt); | |
| 3379 | - } | |
| 3380 | - const { | |
| 3381 | - children: childrenProp, | |
| 3382 | - ...props | |
| 3383 | - } = elt.props; | |
| 3384 | - return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(nodeName, { | |
| 3385 | - key: index, | |
| 3386 | - ...props | |
| 3387 | - }, childrenProp); | |
| 3388 | - }); | |
| 3389 | -} | |
| 3390 | -//# sourceMappingURL=react.js.map | |
| 3391 | - | |
| 3392 | -/***/ }), | |
| 3393 | - | |
| 3394 | -/***/ "../node_modules/@wordpress/element/build-module/serialize.js": | |
| 3395 | -/*!********************************************************************!*\ | |
| 3396 | - !*** ../node_modules/@wordpress/element/build-module/serialize.js ***! | |
| 3397 | - \********************************************************************/ | |
| 3398 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 3399 | - | |
| 3400 | -"use strict"; | |
| 3401 | -__webpack_require__.r(__webpack_exports__); | |
| 3402 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3403 | -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), | |
| 3404 | -/* harmony export */ hasPrefix: () => (/* binding */ hasPrefix), | |
| 3405 | -/* harmony export */ renderAttributes: () => (/* binding */ renderAttributes), | |
| 3406 | -/* harmony export */ renderComponent: () => (/* binding */ renderComponent), | |
| 3407 | -/* harmony export */ renderElement: () => (/* binding */ renderElement), | |
| 3408 | -/* harmony export */ renderNativeComponent: () => (/* binding */ renderNativeComponent), | |
| 3409 | -/* harmony export */ renderStyle: () => (/* binding */ renderStyle) | |
| 3410 | -/* harmony export */ }); | |
| 3411 | -/* harmony import */ var is_plain_object__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-plain-object */ "../node_modules/is-plain-object/dist/is-plain-object.mjs"); | |
| 3412 | -/* harmony import */ var change_case__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! change-case */ "../node_modules/param-case/dist.es2015/index.js"); | |
| 3413 | -/* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/escape-html */ "../node_modules/@wordpress/escape-html/build-module/index.js"); | |
| 3414 | -/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./react */ "react"); | |
| 3415 | -/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_react__WEBPACK_IMPORTED_MODULE_3__); | |
| 3416 | -/* harmony import */ var _raw_html__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./raw-html */ "../node_modules/@wordpress/element/build-module/raw-html.js"); | |
| 3417 | -/** | |
| 3418 | - * Parts of this source were derived and modified from fast-react-render, | |
| 3419 | - * released under the MIT license. | |
| 3420 | - * | |
| 3421 | - * https://github.com/alt-j/fast-react-render | |
| 3422 | - * | |
| 3423 | - * Copyright (c) 2016 Andrey Morozov | |
| 3424 | - * | |
| 3425 | - * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 3426 | - * of this software and associated documentation files (the "Software"), to deal | |
| 3427 | - * in the Software without restriction, including without limitation the rights | |
| 3428 | - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 3429 | - * copies of the Software, and to permit persons to whom the Software is | |
| 3430 | - * furnished to do so, subject to the following conditions: | |
| 3431 | - * | |
| 3432 | - * The above copyright notice and this permission notice shall be included in | |
| 3433 | - * all copies or substantial portions of the Software. | |
| 3434 | - * | |
| 3435 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 3436 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 3437 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 3438 | - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 3439 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 3440 | - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 3441 | - * THE SOFTWARE. | |
| 3442 | - */ | |
| 3443 | - | |
| 3444 | -/** | |
| 3445 | - * External dependencies | |
| 3446 | - */ | |
| 3447 | - | |
| 3448 | - | |
| 3449 | - | |
| 3450 | -/** | |
| 3451 | - * WordPress dependencies | |
| 3452 | - */ | |
| 3453 | - | |
| 3454 | - | |
| 3455 | -/** | |
| 3456 | - * Internal dependencies | |
| 3457 | - */ | |
| 3458 | - | |
| 3459 | - | |
| 3460 | - | |
| 3461 | -/** @typedef {import('react').ReactElement} ReactElement */ | |
| 3462 | - | |
| 3463 | -const { | |
| 3464 | - Provider, | |
| 3465 | - Consumer | |
| 3466 | -} = (0,_react__WEBPACK_IMPORTED_MODULE_3__.createContext)(undefined); | |
| 3467 | -const ForwardRef = (0,_react__WEBPACK_IMPORTED_MODULE_3__.forwardRef)(() => { | |
| 3468 | - return null; | |
| 3469 | -}); | |
| 3470 | - | |
| 3471 | -/** | |
| 3472 | - * Valid attribute types. | |
| 3473 | - * | |
| 3474 | - * @type {Set<string>} | |
| 3475 | - */ | |
| 3476 | -const ATTRIBUTES_TYPES = new Set(['string', 'boolean', 'number']); | |
| 3477 | - | |
| 3478 | -/** | |
| 3479 | - * Element tags which can be self-closing. | |
| 3480 | - * | |
| 3481 | - * @type {Set<string>} | |
| 3482 | - */ | |
| 3483 | -const SELF_CLOSING_TAGS = new Set(['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']); | |
| 3484 | - | |
| 3485 | -/** | |
| 3486 | - * Boolean attributes are attributes whose presence as being assigned is | |
| 3487 | - * meaningful, even if only empty. | |
| 3488 | - * | |
| 3489 | - * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes | |
| 3490 | - * Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3 | |
| 3491 | - * | |
| 3492 | - * Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ] | |
| 3493 | - * .filter( ( tr ) => tr.lastChild.textContent.indexOf( 'Boolean attribute' ) !== -1 ) | |
| 3494 | - * .reduce( ( result, tr ) => Object.assign( result, { | |
| 3495 | - * [ tr.firstChild.textContent.trim() ]: true | |
| 3496 | - * } ), {} ) ).sort(); | |
| 3497 | - * | |
| 3498 | - * @type {Set<string>} | |
| 3499 | - */ | |
| 3500 | -const BOOLEAN_ATTRIBUTES = new Set(['allowfullscreen', 'allowpaymentrequest', 'allowusermedia', 'async', 'autofocus', 'autoplay', 'checked', 'controls', 'default', 'defer', 'disabled', 'download', 'formnovalidate', 'hidden', 'ismap', 'itemscope', 'loop', 'multiple', 'muted', 'nomodule', 'novalidate', 'open', 'playsinline', 'readonly', 'required', 'reversed', 'selected', 'typemustmatch']); | |
| 3501 | - | |
| 3502 | -/** | |
| 3503 | - * Enumerated attributes are attributes which must be of a specific value form. | |
| 3504 | - * Like boolean attributes, these are meaningful if specified, even if not of a | |
| 3505 | - * valid enumerated value. | |
| 3506 | - * | |
| 3507 | - * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attribute | |
| 3508 | - * Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3 | |
| 3509 | - * | |
| 3510 | - * Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ] | |
| 3511 | - * .filter( ( tr ) => /^("(.+?)";?\s*)+/.test( tr.lastChild.textContent.trim() ) ) | |
| 3512 | - * .reduce( ( result, tr ) => Object.assign( result, { | |
| 3513 | - * [ tr.firstChild.textContent.trim() ]: true | |
| 3514 | - * } ), {} ) ).sort(); | |
| 3515 | - * | |
| 3516 | - * Some notable omissions: | |
| 3517 | - * | |
| 3518 | - * - `alt`: https://blog.whatwg.org/omit-alt | |
| 3519 | - * | |
| 3520 | - * @type {Set<string>} | |
| 3521 | - */ | |
| 3522 | -const ENUMERATED_ATTRIBUTES = new Set(['autocapitalize', 'autocomplete', 'charset', 'contenteditable', 'crossorigin', 'decoding', 'dir', 'draggable', 'enctype', 'formenctype', 'formmethod', 'http-equiv', 'inputmode', 'kind', 'method', 'preload', 'scope', 'shape', 'spellcheck', 'translate', 'type', 'wrap']); | |
| 3523 | - | |
| 3524 | -/** | |
| 3525 | - * Set of CSS style properties which support assignment of unitless numbers. | |
| 3526 | - * Used in rendering of style properties, where `px` unit is assumed unless | |
| 3527 | - * property is included in this set or value is zero. | |
| 3528 | - * | |
| 3529 | - * Generated via: | |
| 3530 | - * | |
| 3531 | - * Object.entries( document.createElement( 'div' ).style ) | |
| 3532 | - * .filter( ( [ key ] ) => ( | |
| 3533 | - * ! /^(webkit|ms|moz)/.test( key ) && | |
| 3534 | - * ( e.style[ key ] = 10 ) && | |
| 3535 | - * e.style[ key ] === '10' | |
| 3536 | - * ) ) | |
| 3537 | - * .map( ( [ key ] ) => key ) | |
| 3538 | - * .sort(); | |
| 3539 | - * | |
| 3540 | - * @type {Set<string>} | |
| 3541 | - */ | |
| 3542 | -const CSS_PROPERTIES_SUPPORTS_UNITLESS = new Set(['animation', 'animationIterationCount', 'baselineShift', 'borderImageOutset', 'borderImageSlice', 'borderImageWidth', 'columnCount', 'cx', 'cy', 'fillOpacity', 'flexGrow', 'flexShrink', 'floodOpacity', 'fontWeight', 'gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart', 'lineHeight', 'opacity', 'order', 'orphans', 'r', 'rx', 'ry', 'shapeImageThreshold', 'stopOpacity', 'strokeDasharray', 'strokeDashoffset', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'tabSize', 'widows', 'x', 'y', 'zIndex', 'zoom']); | |
| 3543 | - | |
| 3544 | -/** | |
| 3545 | - * Returns true if the specified string is prefixed by one of an array of | |
| 3546 | - * possible prefixes. | |
| 3547 | - * | |
| 3548 | - * @param {string} string String to check. | |
| 3549 | - * @param {string[]} prefixes Possible prefixes. | |
| 3550 | - * | |
| 3551 | - * @return {boolean} Whether string has prefix. | |
| 3552 | - */ | |
| 3553 | -function hasPrefix(string, prefixes) { | |
| 3554 | - return prefixes.some(prefix => string.indexOf(prefix) === 0); | |
| 3555 | -} | |
| 3556 | - | |
| 3557 | -/** | |
| 3558 | - * Returns true if the given prop name should be ignored in attributes | |
| 3559 | - * serialization, or false otherwise. | |
| 3560 | - * | |
| 3561 | - * @param {string} attribute Attribute to check. | |
| 3562 | - * | |
| 3563 | - * @return {boolean} Whether attribute should be ignored. | |
| 3564 | - */ | |
| 3565 | -function isInternalAttribute(attribute) { | |
| 3566 | - return 'key' === attribute || 'children' === attribute; | |
| 3567 | -} | |
| 3568 | - | |
| 3569 | -/** | |
| 3570 | - * Returns the normal form of the element's attribute value for HTML. | |
| 3571 | - * | |
| 3572 | - * @param {string} attribute Attribute name. | |
| 3573 | - * @param {*} value Non-normalized attribute value. | |
| 3574 | - * | |
| 3575 | - * @return {*} Normalized attribute value. | |
| 3576 | - */ | |
| 3577 | -function getNormalAttributeValue(attribute, value) { | |
| 3578 | - switch (attribute) { | |
| 3579 | - case 'style': | |
| 3580 | - return renderStyle(value); | |
| 3581 | - } | |
| 3582 | - return value; | |
| 3583 | -} | |
| 3584 | -/** | |
| 3585 | - * This is a map of all SVG attributes that have dashes. Map(lower case prop => dashed lower case attribute). | |
| 3586 | - * We need this to render e.g strokeWidth as stroke-width. | |
| 3587 | - * | |
| 3588 | - * List from: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute. | |
| 3589 | - */ | |
| 3590 | -const SVG_ATTRIBUTE_WITH_DASHES_LIST = ['accentHeight', 'alignmentBaseline', 'arabicForm', 'baselineShift', 'capHeight', 'clipPath', 'clipRule', 'colorInterpolation', 'colorInterpolationFilters', 'colorProfile', 'colorRendering', 'dominantBaseline', 'enableBackground', 'fillOpacity', 'fillRule', 'floodColor', 'floodOpacity', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontWeight', 'glyphName', 'glyphOrientationHorizontal', 'glyphOrientationVertical', 'horizAdvX', 'horizOriginX', 'imageRendering', 'letterSpacing', 'lightingColor', 'markerEnd', 'markerMid', 'markerStart', 'overlinePosition', 'overlineThickness', 'paintOrder', 'panose1', 'pointerEvents', 'renderingIntent', 'shapeRendering', 'stopColor', 'stopOpacity', 'strikethroughPosition', 'strikethroughThickness', 'strokeDasharray', 'strokeDashoffset', 'strokeLinecap', 'strokeLinejoin', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'textAnchor', 'textDecoration', 'textRendering', 'underlinePosition', 'underlineThickness', 'unicodeBidi', 'unicodeRange', 'unitsPerEm', 'vAlphabetic', 'vHanging', 'vIdeographic', 'vMathematical', 'vectorEffect', 'vertAdvY', 'vertOriginX', 'vertOriginY', 'wordSpacing', 'writingMode', 'xmlnsXlink', 'xHeight'].reduce((map, attribute) => { | |
| 3591 | - // The keys are lower-cased for more robust lookup. | |
| 3592 | - map[attribute.toLowerCase()] = attribute; | |
| 3593 | - return map; | |
| 3594 | -}, {}); | |
| 3595 | - | |
| 3596 | -/** | |
| 3597 | - * This is a map of all case-sensitive SVG attributes. Map(lowercase key => proper case attribute). | |
| 3598 | - * The keys are lower-cased for more robust lookup. | |
| 3599 | - * Note that this list only contains attributes that contain at least one capital letter. | |
| 3600 | - * Lowercase attributes don't need mapping, since we lowercase all attributes by default. | |
| 3601 | - */ | |
| 3602 | -const CASE_SENSITIVE_SVG_ATTRIBUTES = ['allowReorder', 'attributeName', 'attributeType', 'autoReverse', 'baseFrequency', 'baseProfile', 'calcMode', 'clipPathUnits', 'contentScriptType', 'contentStyleType', 'diffuseConstant', 'edgeMode', 'externalResourcesRequired', 'filterRes', 'filterUnits', 'glyphRef', 'gradientTransform', 'gradientUnits', 'kernelMatrix', 'kernelUnitLength', 'keyPoints', 'keySplines', 'keyTimes', 'lengthAdjust', 'limitingConeAngle', 'markerHeight', 'markerUnits', 'markerWidth', 'maskContentUnits', 'maskUnits', 'numOctaves', 'pathLength', 'patternContentUnits', 'patternTransform', 'patternUnits', 'pointsAtX', 'pointsAtY', 'pointsAtZ', 'preserveAlpha', 'preserveAspectRatio', 'primitiveUnits', 'refX', 'refY', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'specularConstant', 'specularExponent', 'spreadMethod', 'startOffset', 'stdDeviation', 'stitchTiles', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'surfaceScale', 'systemLanguage', 'tableValues', 'targetX', 'targetY', 'textLength', 'viewBox', 'viewTarget', 'xChannelSelector', 'yChannelSelector'].reduce((map, attribute) => { | |
| 3603 | - // The keys are lower-cased for more robust lookup. | |
| 3604 | - map[attribute.toLowerCase()] = attribute; | |
| 3605 | - return map; | |
| 3606 | -}, {}); | |
| 3607 | - | |
| 3608 | -/** | |
| 3609 | - * This is a map of all SVG attributes that have colons. | |
| 3610 | - * Keys are lower-cased and stripped of their colons for more robust lookup. | |
| 3611 | - */ | |
| 3612 | -const SVG_ATTRIBUTES_WITH_COLONS = ['xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'xmlns:xlink'].reduce((map, attribute) => { | |
| 3613 | - map[attribute.replace(':', '').toLowerCase()] = attribute; | |
| 3614 | - return map; | |
| 3615 | -}, {}); | |
| 3616 | - | |
| 3617 | -/** | |
| 3618 | - * Returns the normal form of the element's attribute name for HTML. | |
| 3619 | - * | |
| 3620 | - * @param {string} attribute Non-normalized attribute name. | |
| 3621 | - * | |
| 3622 | - * @return {string} Normalized attribute name. | |
| 3623 | - */ | |
| 3624 | -function getNormalAttributeName(attribute) { | |
| 3625 | - switch (attribute) { | |
| 3626 | - case 'htmlFor': | |
| 3627 | - return 'for'; | |
| 3628 | - case 'className': | |
| 3629 | - return 'class'; | |
| 3630 | - } | |
| 3631 | - const attributeLowerCase = attribute.toLowerCase(); | |
| 3632 | - if (CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]) { | |
| 3633 | - return CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]; | |
| 3634 | - } else if (SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]) { | |
| 3635 | - return (0,change_case__WEBPACK_IMPORTED_MODULE_1__.paramCase)(SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]); | |
| 3636 | - } else if (SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]) { | |
| 3637 | - return SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]; | |
| 3638 | - } | |
| 3639 | - return attributeLowerCase; | |
| 3640 | -} | |
| 3641 | - | |
| 3642 | -/** | |
| 3643 | - * Returns the normal form of the style property name for HTML. | |
| 3644 | - * | |
| 3645 | - * - Converts property names to kebab-case, e.g. 'backgroundColor' → 'background-color' | |
| 3646 | - * - Leaves custom attributes alone, e.g. '--myBackgroundColor' → '--myBackgroundColor' | |
| 3647 | - * - Converts vendor-prefixed property names to -kebab-case, e.g. 'MozTransform' → '-moz-transform' | |
| 3648 | - * | |
| 3649 | - * @param {string} property Property name. | |
| 3650 | - * | |
| 3651 | - * @return {string} Normalized property name. | |
| 3652 | - */ | |
| 3653 | -function getNormalStylePropertyName(property) { | |
| 3654 | - if (property.startsWith('--')) { | |
| 3655 | - return property; | |
| 3656 | - } | |
| 3657 | - if (hasPrefix(property, ['ms', 'O', 'Moz', 'Webkit'])) { | |
| 3658 | - return '-' + (0,change_case__WEBPACK_IMPORTED_MODULE_1__.paramCase)(property); | |
| 3659 | - } | |
| 3660 | - return (0,change_case__WEBPACK_IMPORTED_MODULE_1__.paramCase)(property); | |
| 3661 | -} | |
| 3662 | - | |
| 3663 | -/** | |
| 3664 | - * Returns the normal form of the style property value for HTML. Appends a | |
| 3665 | - * default pixel unit if numeric, not a unitless property, and not zero. | |
| 3666 | - * | |
| 3667 | - * @param {string} property Property name. | |
| 3668 | - * @param {*} value Non-normalized property value. | |
| 3669 | - * | |
| 3670 | - * @return {*} Normalized property value. | |
| 3671 | - */ | |
| 3672 | -function getNormalStylePropertyValue(property, value) { | |
| 3673 | - if (typeof value === 'number' && 0 !== value && !CSS_PROPERTIES_SUPPORTS_UNITLESS.has(property)) { | |
| 3674 | - return value + 'px'; | |
| 3675 | - } | |
| 3676 | - return value; | |
| 3677 | -} | |
| 3678 | - | |
| 3679 | -/** | |
| 3680 | - * Serializes a React element to string. | |
| 3681 | - * | |
| 3682 | - * @param {import('react').ReactNode} element Element to serialize. | |
| 3683 | - * @param {Object} [context] Context object. | |
| 3684 | - * @param {Object} [legacyContext] Legacy context object. | |
| 3685 | - * | |
| 3686 | - * @return {string} Serialized element. | |
| 3687 | - */ | |
| 3688 | -function renderElement(element, context, legacyContext = {}) { | |
| 3689 | - if (null === element || undefined === element || false === element) { | |
| 3690 | - return ''; | |
| 3691 | - } | |
| 3692 | - if (Array.isArray(element)) { | |
| 3693 | - return renderChildren(element, context, legacyContext); | |
| 3694 | - } | |
| 3695 | - switch (typeof element) { | |
| 3696 | - case 'string': | |
| 3697 | - return (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__.escapeHTML)(element); | |
| 3698 | - case 'number': | |
| 3699 | - return element.toString(); | |
| 3700 | - } | |
| 3701 | - const { | |
| 3702 | - type, | |
| 3703 | - props | |
| 3704 | - } = /** @type {{type?: any, props?: any}} */ | |
| 3705 | - element; | |
| 3706 | - switch (type) { | |
| 3707 | - case _react__WEBPACK_IMPORTED_MODULE_3__.StrictMode: | |
| 3708 | - case _react__WEBPACK_IMPORTED_MODULE_3__.Fragment: | |
| 3709 | - return renderChildren(props.children, context, legacyContext); | |
| 3710 | - case _raw_html__WEBPACK_IMPORTED_MODULE_4__["default"]: | |
| 3711 | - const { | |
| 3712 | - children, | |
| 3713 | - ...wrapperProps | |
| 3714 | - } = props; | |
| 3715 | - return renderNativeComponent(!Object.keys(wrapperProps).length ? null : 'div', { | |
| 3716 | - ...wrapperProps, | |
| 3717 | - dangerouslySetInnerHTML: { | |
| 3718 | - __html: children | |
| 3719 | - } | |
| 3720 | - }, context, legacyContext); | |
| 3721 | - } | |
| 3722 | - switch (typeof type) { | |
| 3723 | - case 'string': | |
| 3724 | - return renderNativeComponent(type, props, context, legacyContext); | |
| 3725 | - case 'function': | |
| 3726 | - if (type.prototype && typeof type.prototype.render === 'function') { | |
| 3727 | - return renderComponent(type, props, context, legacyContext); | |
| 3728 | - } | |
| 3729 | - return renderElement(type(props, legacyContext), context, legacyContext); | |
| 3730 | - } | |
| 3731 | - switch (type && type.$$typeof) { | |
| 3732 | - case Provider.$$typeof: | |
| 3733 | - return renderChildren(props.children, props.value, legacyContext); | |
| 3734 | - case Consumer.$$typeof: | |
| 3735 | - return renderElement(props.children(context || type._currentValue), context, legacyContext); | |
| 3736 | - case ForwardRef.$$typeof: | |
| 3737 | - return renderElement(type.render(props), context, legacyContext); | |
| 3738 | - } | |
| 3739 | - return ''; | |
| 3740 | -} | |
| 3741 | - | |
| 3742 | -/** | |
| 3743 | - * Serializes a native component type to string. | |
| 3744 | - * | |
| 3745 | - * @param {?string} type Native component type to serialize, or null if | |
| 3746 | - * rendering as fragment of children content. | |
| 3747 | - * @param {Object} props Props object. | |
| 3748 | - * @param {Object} [context] Context object. | |
| 3749 | - * @param {Object} [legacyContext] Legacy context object. | |
| 3750 | - * | |
| 3751 | - * @return {string} Serialized element. | |
| 3752 | - */ | |
| 3753 | -function renderNativeComponent(type, props, context, legacyContext = {}) { | |
| 3754 | - let content = ''; | |
| 3755 | - if (type === 'textarea' && props.hasOwnProperty('value')) { | |
| 3756 | - // Textarea children can be assigned as value prop. If it is, render in | |
| 3757 | - // place of children. Ensure to omit so it is not assigned as attribute | |
| 3758 | - // as well. | |
| 3759 | - content = renderChildren(props.value, context, legacyContext); | |
| 3760 | - const { | |
| 3761 | - value, | |
| 3762 | - ...restProps | |
| 3763 | - } = props; | |
| 3764 | - props = restProps; | |
| 3765 | - } else if (props.dangerouslySetInnerHTML && typeof props.dangerouslySetInnerHTML.__html === 'string') { | |
| 3766 | - // Dangerous content is left unescaped. | |
| 3767 | - content = props.dangerouslySetInnerHTML.__html; | |
| 3768 | - } else if (typeof props.children !== 'undefined') { | |
| 3769 | - content = renderChildren(props.children, context, legacyContext); | |
| 3770 | - } | |
| 3771 | - if (!type) { | |
| 3772 | - return content; | |
| 3773 | - } | |
| 3774 | - const attributes = renderAttributes(props); | |
| 3775 | - if (SELF_CLOSING_TAGS.has(type)) { | |
| 3776 | - return '<' + type + attributes + '/>'; | |
| 3777 | - } | |
| 3778 | - return '<' + type + attributes + '>' + content + '</' + type + '>'; | |
| 3779 | -} | |
| 3780 | - | |
| 3781 | -/** @typedef {import('react').ComponentType} ComponentType */ | |
| 3782 | - | |
| 3783 | -/** | |
| 3784 | - * Serializes a non-native component type to string. | |
| 3785 | - * | |
| 3786 | - * @param {ComponentType} Component Component type to serialize. | |
| 3787 | - * @param {Object} props Props object. | |
| 3788 | - * @param {Object} [context] Context object. | |
| 3789 | - * @param {Object} [legacyContext] Legacy context object. | |
| 3790 | - * | |
| 3791 | - * @return {string} Serialized element | |
| 3792 | - */ | |
| 3793 | -function renderComponent(Component, props, context, legacyContext = {}) { | |
| 3794 | - const instance = new ( /** @type {import('react').ComponentClass} */ | |
| 3795 | - Component)(props, legacyContext); | |
| 3796 | - if (typeof | |
| 3797 | - // Ignore reason: Current prettier reformats parens and mangles type assertion | |
| 3798 | - // prettier-ignore | |
| 3799 | - /** @type {{getChildContext?: () => unknown}} */ | |
| 3800 | - instance.getChildContext === 'function') { | |
| 3801 | - Object.assign(legacyContext, /** @type {{getChildContext?: () => unknown}} */instance.getChildContext()); | |
| 3802 | - } | |
| 3803 | - const html = renderElement(instance.render(), context, legacyContext); | |
| 3804 | - return html; | |
| 3805 | -} | |
| 3806 | - | |
| 3807 | -/** | |
| 3808 | - * Serializes an array of children to string. | |
| 3809 | - * | |
| 3810 | - * @param {import('react').ReactNodeArray} children Children to serialize. | |
| 3811 | - * @param {Object} [context] Context object. | |
| 3812 | - * @param {Object} [legacyContext] Legacy context object. | |
| 3813 | - * | |
| 3814 | - * @return {string} Serialized children. | |
| 3815 | - */ | |
| 3816 | -function renderChildren(children, context, legacyContext = {}) { | |
| 3817 | - let result = ''; | |
| 3818 | - children = Array.isArray(children) ? children : [children]; | |
| 3819 | - for (let i = 0; i < children.length; i++) { | |
| 3820 | - const child = children[i]; | |
| 3821 | - result += renderElement(child, context, legacyContext); | |
| 3822 | - } | |
| 3823 | - return result; | |
| 3824 | -} | |
| 3825 | - | |
| 3826 | -/** | |
| 3827 | - * Renders a props object as a string of HTML attributes. | |
| 3828 | - * | |
| 3829 | - * @param {Object} props Props object. | |
| 3830 | - * | |
| 3831 | - * @return {string} Attributes string. | |
| 3832 | - */ | |
| 3833 | -function renderAttributes(props) { | |
| 3834 | - let result = ''; | |
| 3835 | - for (const key in props) { | |
| 3836 | - const attribute = getNormalAttributeName(key); | |
| 3837 | - if (!(0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__.isValidAttributeName)(attribute)) { | |
| 3838 | - continue; | |
| 3839 | - } | |
| 3840 | - let value = getNormalAttributeValue(key, props[key]); | |
| 3841 | - | |
| 3842 | - // If value is not of serializable type, skip. | |
| 3843 | - if (!ATTRIBUTES_TYPES.has(typeof value)) { | |
| 3844 | - continue; | |
| 3845 | - } | |
| 3846 | - | |
| 3847 | - // Don't render internal attribute names. | |
| 3848 | - if (isInternalAttribute(key)) { | |
| 3849 | - continue; | |
| 3850 | - } | |
| 3851 | - const isBooleanAttribute = BOOLEAN_ATTRIBUTES.has(attribute); | |
| 3852 | - | |
| 3853 | - // Boolean attribute should be omitted outright if its value is false. | |
| 3854 | - if (isBooleanAttribute && value === false) { | |
| 3855 | - continue; | |
| 3856 | - } | |
| 3857 | - const isMeaningfulAttribute = isBooleanAttribute || hasPrefix(key, ['data-', 'aria-']) || ENUMERATED_ATTRIBUTES.has(attribute); | |
| 3858 | - | |
| 3859 | - // Only write boolean value as attribute if meaningful. | |
| 3860 | - if (typeof value === 'boolean' && !isMeaningfulAttribute) { | |
| 3861 | - continue; | |
| 3862 | - } | |
| 3863 | - result += ' ' + attribute; | |
| 3864 | - | |
| 3865 | - // Boolean attributes should write attribute name, but without value. | |
| 3866 | - // Mere presence of attribute name is effective truthiness. | |
| 3867 | - if (isBooleanAttribute) { | |
| 3868 | - continue; | |
| 3869 | - } | |
| 3870 | - if (typeof value === 'string') { | |
| 3871 | - value = (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__.escapeAttribute)(value); | |
| 3872 | - } | |
| 3873 | - result += '="' + value + '"'; | |
| 3874 | - } | |
| 3875 | - return result; | |
| 3876 | -} | |
| 3877 | - | |
| 3878 | -/** | |
| 3879 | - * Renders a style object as a string attribute value. | |
| 3880 | - * | |
| 3881 | - * @param {Object} style Style object. | |
| 3882 | - * | |
| 3883 | - * @return {string} Style attribute value. | |
| 3884 | - */ | |
| 3885 | -function renderStyle(style) { | |
| 3886 | - // Only generate from object, e.g. tolerate string value. | |
| 3887 | - if (!(0,is_plain_object__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(style)) { | |
| 3888 | - return style; | |
| 3889 | - } | |
| 3890 | - let result; | |
| 3891 | - for (const property in style) { | |
| 3892 | - const value = style[property]; | |
| 3893 | - if (null === value || undefined === value) { | |
| 3894 | - continue; | |
| 3895 | - } | |
| 3896 | - if (result) { | |
| 3897 | - result += ';'; | |
| 3898 | - } else { | |
| 3899 | - result = ''; | |
| 3900 | - } | |
| 3901 | - const normalName = getNormalStylePropertyName(property); | |
| 3902 | - const normalValue = getNormalStylePropertyValue(property, value); | |
| 3903 | - result += normalName + ':' + normalValue; | |
| 3904 | - } | |
| 3905 | - return result; | |
| 3906 | -} | |
| 3907 | -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (renderElement); | |
| 3908 | -//# sourceMappingURL=serialize.js.map | |
| 3909 | - | |
| 3910 | -/***/ }), | |
| 3911 | - | |
| 3912 | -/***/ "../node_modules/@wordpress/element/build-module/utils.js": | |
| 3913 | -/*!****************************************************************!*\ | |
| 3914 | - !*** ../node_modules/@wordpress/element/build-module/utils.js ***! | |
| 3915 | - \****************************************************************/ | |
| 3916 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 3917 | - | |
| 3918 | -"use strict"; | |
| 3919 | -__webpack_require__.r(__webpack_exports__); | |
| 3920 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3921 | -/* harmony export */ isEmptyElement: () => (/* binding */ isEmptyElement) | |
| 3922 | -/* harmony export */ }); | |
| 3923 | -/** | |
| 3924 | - * Checks if the provided WP element is empty. | |
| 3925 | - * | |
| 3926 | - * @param {*} element WP element to check. | |
| 3927 | - * @return {boolean} True when an element is considered empty. | |
| 3928 | - */ | |
| 3929 | -const isEmptyElement = element => { | |
| 3930 | - if (typeof element === 'number') { | |
| 3931 | - return false; | |
| 3932 | - } | |
| 3933 | - if (typeof element?.valueOf() === 'string' || Array.isArray(element)) { | |
| 3934 | - return !element.length; | |
| 3935 | - } | |
| 3936 | - return !element; | |
| 3937 | -}; | |
| 3938 | -//# sourceMappingURL=utils.js.map | |
| 3939 | - | |
| 3940 | -/***/ }), | |
| 3941 | - | |
| 3942 | -/***/ "../node_modules/@wordpress/escape-html/build-module/escape-greater.js": | |
| 3943 | -/*!*****************************************************************************!*\ | |
| 3944 | - !*** ../node_modules/@wordpress/escape-html/build-module/escape-greater.js ***! | |
| 3945 | - \*****************************************************************************/ | |
| 3946 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 3947 | - | |
| 3948 | -"use strict"; | |
| 3949 | -__webpack_require__.r(__webpack_exports__); | |
| 3950 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3951 | -/* harmony export */ "default": () => (/* binding */ __unstableEscapeGreaterThan) | |
| 3952 | -/* harmony export */ }); | |
| 3953 | -/** | |
| 3954 | - * Returns a string with greater-than sign replaced. | |
| 3955 | - * | |
| 3956 | - * Note that if a resolution for Trac#45387 comes to fruition, it is no longer | |
| 3957 | - * necessary for `__unstableEscapeGreaterThan` to exist. | |
| 3958 | - * | |
| 3959 | - * See: https://core.trac.wordpress.org/ticket/45387 | |
| 3960 | - * | |
| 3961 | - * @param {string} value Original string. | |
| 3962 | - * | |
| 3963 | - * @return {string} Escaped string. | |
| 3964 | - */ | |
| 3965 | -function __unstableEscapeGreaterThan(value) { | |
| 3966 | - return value.replace(/>/g, '>'); | |
| 3967 | -} | |
| 3968 | -//# sourceMappingURL=escape-greater.js.map | |
| 3969 | - | |
| 3970 | -/***/ }), | |
| 3971 | - | |
| 3972 | -/***/ "../node_modules/@wordpress/escape-html/build-module/index.js": | |
| 3973 | -/*!********************************************************************!*\ | |
| 3974 | - !*** ../node_modules/@wordpress/escape-html/build-module/index.js ***! | |
| 3975 | - \********************************************************************/ | |
| 3976 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 3977 | - | |
| 3978 | -"use strict"; | |
| 3979 | -__webpack_require__.r(__webpack_exports__); | |
| 3980 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3981 | -/* harmony export */ escapeAmpersand: () => (/* binding */ escapeAmpersand), | |
| 3982 | -/* harmony export */ escapeAttribute: () => (/* binding */ escapeAttribute), | |
| 3983 | -/* harmony export */ escapeEditableHTML: () => (/* binding */ escapeEditableHTML), | |
| 3984 | -/* harmony export */ escapeHTML: () => (/* binding */ escapeHTML), | |
| 3985 | -/* harmony export */ escapeLessThan: () => (/* binding */ escapeLessThan), | |
| 3986 | -/* harmony export */ escapeQuotationMark: () => (/* binding */ escapeQuotationMark), | |
| 3987 | -/* harmony export */ isValidAttributeName: () => (/* binding */ isValidAttributeName) | |
| 3988 | -/* harmony export */ }); | |
| 3989 | -/* harmony import */ var _escape_greater__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./escape-greater */ "../node_modules/@wordpress/escape-html/build-module/escape-greater.js"); | |
| 3990 | -/** | |
| 3991 | - * Internal dependencies | |
| 3992 | - */ | |
| 3993 | - | |
| 3994 | - | |
| 3995 | -/** | |
| 3996 | - * Regular expression matching invalid attribute names. | |
| 3997 | - * | |
| 3998 | - * "Attribute names must consist of one or more characters other than controls, | |
| 3999 | - * U+0020 SPACE, U+0022 ("), U+0027 ('), U+003E (>), U+002F (/), U+003D (=), | |
| 4000 | - * and noncharacters." | |
| 4001 | - * | |
| 4002 | - * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 | |
| 4003 | - * | |
| 4004 | - * @type {RegExp} | |
| 4005 | - */ | |
| 4006 | -const REGEXP_INVALID_ATTRIBUTE_NAME = /[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/; | |
| 4007 | - | |
| 4008 | -/** | |
| 4009 | - * Returns a string with ampersands escaped. Note that this is an imperfect | |
| 4010 | - * implementation, where only ampersands which do not appear as a pattern of | |
| 4011 | - * named, decimal, or hexadecimal character references are escaped. Invalid | |
| 4012 | - * named references (i.e. ambiguous ampersand) are still permitted. | |
| 4013 | - * | |
| 4014 | - * @see https://w3c.github.io/html/syntax.html#character-references | |
| 4015 | - * @see https://w3c.github.io/html/syntax.html#ambiguous-ampersand | |
| 4016 | - * @see https://w3c.github.io/html/syntax.html#named-character-references | |
| 4017 | - * | |
| 4018 | - * @param {string} value Original string. | |
| 4019 | - * | |
| 4020 | - * @return {string} Escaped string. | |
| 4021 | - */ | |
| 4022 | -function escapeAmpersand(value) { | |
| 4023 | - return value.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi, '&'); | |
| 4024 | -} | |
| 4025 | - | |
| 4026 | -/** | |
| 4027 | - * Returns a string with quotation marks replaced. | |
| 4028 | - * | |
| 4029 | - * @param {string} value Original string. | |
| 4030 | - * | |
| 4031 | - * @return {string} Escaped string. | |
| 4032 | - */ | |
| 4033 | -function escapeQuotationMark(value) { | |
| 4034 | - return value.replace(/"/g, '"'); | |
| 4035 | -} | |
| 4036 | - | |
| 4037 | -/** | |
| 4038 | - * Returns a string with less-than sign replaced. | |
| 4039 | - * | |
| 4040 | - * @param {string} value Original string. | |
| 4041 | - * | |
| 4042 | - * @return {string} Escaped string. | |
| 4043 | - */ | |
| 4044 | -function escapeLessThan(value) { | |
| 4045 | - return value.replace(/</g, '<'); | |
| 4046 | -} | |
| 4047 | - | |
| 4048 | -/** | |
| 4049 | - * Returns an escaped attribute value. | |
| 4050 | - * | |
| 4051 | - * @see https://w3c.github.io/html/syntax.html#elements-attributes | |
| 4052 | - * | |
| 4053 | - * "[...] the text cannot contain an ambiguous ampersand [...] must not contain | |
| 4054 | - * any literal U+0022 QUOTATION MARK characters (")" | |
| 4055 | - * | |
| 4056 | - * Note we also escape the greater than symbol, as this is used by wptexturize to | |
| 4057 | - * split HTML strings. This is a WordPress specific fix | |
| 4058 | - * | |
| 4059 | - * Note that if a resolution for Trac#45387 comes to fruition, it is no longer | |
| 4060 | - * necessary for `__unstableEscapeGreaterThan` to be used. | |
| 4061 | - * | |
| 4062 | - * See: https://core.trac.wordpress.org/ticket/45387 | |
| 4063 | - * | |
| 4064 | - * @param {string} value Attribute value. | |
| 4065 | - * | |
| 4066 | - * @return {string} Escaped attribute value. | |
| 4067 | - */ | |
| 4068 | -function escapeAttribute(value) { | |
| 4069 | - return (0,_escape_greater__WEBPACK_IMPORTED_MODULE_0__["default"])(escapeQuotationMark(escapeAmpersand(value))); | |
| 4070 | -} | |
| 4071 | - | |
| 4072 | -/** | |
| 4073 | - * Returns an escaped HTML element value. | |
| 4074 | - * | |
| 4075 | - * @see https://w3c.github.io/html/syntax.html#writing-html-documents-elements | |
| 4076 | - * | |
| 4077 | - * "the text must not contain the character U+003C LESS-THAN SIGN (<) or an | |
| 4078 | - * ambiguous ampersand." | |
| 4079 | - * | |
| 4080 | - * @param {string} value Element value. | |
| 4081 | - * | |
| 4082 | - * @return {string} Escaped HTML element value. | |
| 4083 | - */ | |
| 4084 | -function escapeHTML(value) { | |
| 4085 | - return escapeLessThan(escapeAmpersand(value)); | |
| 4086 | -} | |
| 4087 | - | |
| 4088 | -/** | |
| 4089 | - * Returns an escaped Editable HTML element value. This is different from | |
| 4090 | - * `escapeHTML`, because for editable HTML, ALL ampersands must be escaped in | |
| 4091 | - * order to render the content correctly on the page. | |
| 4092 | - * | |
| 4093 | - * @param {string} value Element value. | |
| 4094 | - * | |
| 4095 | - * @return {string} Escaped HTML element value. | |
| 4096 | - */ | |
| 4097 | -function escapeEditableHTML(value) { | |
| 4098 | - return escapeLessThan(value.replace(/&/g, '&')); | |
| 4099 | -} | |
| 4100 | - | |
| 4101 | -/** | |
| 4102 | - * Returns true if the given attribute name is valid, or false otherwise. | |
| 4103 | - * | |
| 4104 | - * @param {string} name Attribute name to test. | |
| 4105 | - * | |
| 4106 | - * @return {boolean} Whether attribute is valid. | |
| 4107 | - */ | |
| 4108 | -function isValidAttributeName(name) { | |
| 4109 | - return !REGEXP_INVALID_ATTRIBUTE_NAME.test(name); | |
| 4110 | -} | |
| 4111 | -//# sourceMappingURL=index.js.map | |
| 4112 | - | |
| 4113 | -/***/ }), | |
| 4114 | - | |
| 4115 | -/***/ "../node_modules/dot-case/dist.es2015/index.js": | |
| 4116 | -/*!*****************************************************!*\ | |
| 4117 | - !*** ../node_modules/dot-case/dist.es2015/index.js ***! | |
| 4118 | - \*****************************************************/ | |
| 4119 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 4120 | - | |
| 4121 | -"use strict"; | |
| 4122 | -__webpack_require__.r(__webpack_exports__); | |
| 4123 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4124 | -/* harmony export */ dotCase: () => (/* binding */ dotCase) | |
| 4125 | -/* harmony export */ }); | |
| 4126 | -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.mjs"); | |
| 4127 | -/* harmony import */ var no_case__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! no-case */ "../node_modules/no-case/dist.es2015/index.js"); | |
| 4128 | - | |
| 4129 | - | |
| 4130 | -function dotCase(input, options) { | |
| 4131 | - if (options === void 0) { options = {}; } | |
| 4132 | - return (0,no_case__WEBPACK_IMPORTED_MODULE_1__.noCase)(input, (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({ delimiter: "." }, options)); | |
| 4133 | -} | |
| 4134 | -//# sourceMappingURL=index.js.map | |
| 4135 | - | |
| 4136 | -/***/ }), | |
| 4137 | - | |
| 4138 | -/***/ "../node_modules/is-plain-object/dist/is-plain-object.mjs": | |
| 4139 | -/*!****************************************************************!*\ | |
| 4140 | - !*** ../node_modules/is-plain-object/dist/is-plain-object.mjs ***! | |
| 4141 | - \****************************************************************/ | |
| 4142 | -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 4143 | - | |
| 4144 | -"use strict"; | |
| 4145 | -__webpack_require__.r(__webpack_exports__); | |
| 4146 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4147 | -/* harmony export */ isPlainObject: () => (/* binding */ isPlainObject) | |
| 4148 | -/* harmony export */ }); | |
| 4149 | -/*! | |
| 4150 | - * is-plain-object <https://github.com/jonschlinkert/is-plain-object> | |
| 4151 | - * | |
| 4152 | - * Copyright (c) 2014-2017, Jon Schlinkert. | |
| 4153 | - * Released under the MIT License. | |
| 4154 | - */ | |
| 4155 | - | |
| 4156 | -function isObject(o) { | |
| 4157 | - return Object.prototype.toString.call(o) === '[object Object]'; | |
| 4158 | -} | |
| 4159 | - | |
| 4160 | -function isPlainObject(o) { | |
| 4161 | - var ctor,prot; | |
| 4162 | - | |
| 4163 | - if (isObject(o) === false) return false; | |
| 4164 | - | |
| 4165 | - // If has modified constructor | |
| 4166 | - ctor = o.constructor; | |
| 4167 | - if (ctor === undefined) return true; | |
| 4168 | - | |
| 4169 | - // If has modified prototype | |
| 4170 | - prot = ctor.prototype; | |
| 4171 | - if (isObject(prot) === false) return false; | |
| 4172 | - | |
| 4173 | - // If constructor does not have an Object-specific method | |
| 4174 | - if (prot.hasOwnProperty('isPrototypeOf') === false) { | |
| 4175 | - return false; | |
| 4176 | - } | |
| 4177 | - | |
| 4178 | - // Most likely a plain Object | |
| 4179 | - return true; | |
| 4180 | -} | |
| 4181 | - | |
| 4182 | - | |
| 4183 | - | |
| 4184 | - | |
| 4185 | -/***/ }), | |
| 4186 | - | |
| 4187 | -/***/ "../node_modules/lower-case/dist.es2015/index.js": | |
| 4188 | -/*!*******************************************************!*\ | |
| 4189 | - !*** ../node_modules/lower-case/dist.es2015/index.js ***! | |
| 4190 | - \*******************************************************/ | |
| 4191 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 4192 | - | |
| 4193 | -"use strict"; | |
| 4194 | -__webpack_require__.r(__webpack_exports__); | |
| 4195 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4196 | -/* harmony export */ localeLowerCase: () => (/* binding */ localeLowerCase), | |
| 4197 | -/* harmony export */ lowerCase: () => (/* binding */ lowerCase) | |
| 4198 | -/* harmony export */ }); | |
| 4199 | -/** | |
| 4200 | - * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt | |
| 4201 | - */ | |
| 4202 | -var SUPPORTED_LOCALE = { | |
| 4203 | - tr: { | |
| 4204 | - regexp: /\u0130|\u0049|\u0049\u0307/g, | |
| 4205 | - map: { | |
| 4206 | - İ: "\u0069", | |
| 4207 | - I: "\u0131", | |
| 4208 | - İ: "\u0069", | |
| 4209 | - }, | |
| 4210 | - }, | |
| 4211 | - az: { | |
| 4212 | - regexp: /\u0130/g, | |
| 4213 | - map: { | |
| 4214 | - İ: "\u0069", | |
| 4215 | - I: "\u0131", | |
| 4216 | - İ: "\u0069", | |
| 4217 | - }, | |
| 4218 | - }, | |
| 4219 | - lt: { | |
| 4220 | - regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g, | |
| 4221 | - map: { | |
| 4222 | - I: "\u0069\u0307", | |
| 4223 | - J: "\u006A\u0307", | |
| 4224 | - Į: "\u012F\u0307", | |
| 4225 | - Ì: "\u0069\u0307\u0300", | |
| 4226 | - Í: "\u0069\u0307\u0301", | |
| 4227 | - Ĩ: "\u0069\u0307\u0303", | |
| 4228 | - }, | |
| 4229 | - }, | |
| 4230 | -}; | |
| 4231 | -/** | |
| 4232 | - * Localized lower case. | |
| 4233 | - */ | |
| 4234 | -function localeLowerCase(str, locale) { | |
| 4235 | - var lang = SUPPORTED_LOCALE[locale.toLowerCase()]; | |
| 4236 | - if (lang) | |
| 4237 | - return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; })); | |
| 4238 | - return lowerCase(str); | |
| 4239 | -} | |
| 4240 | -/** | |
| 4241 | - * Lower case as a function. | |
| 4242 | - */ | |
| 4243 | -function lowerCase(str) { | |
| 4244 | - return str.toLowerCase(); | |
| 4245 | -} | |
| 4246 | -//# sourceMappingURL=index.js.map | |
| 4247 | - | |
| 4248 | -/***/ }), | |
| 4249 | - | |
| 4250 | -/***/ "../node_modules/no-case/dist.es2015/index.js": | |
| 4251 | -/*!****************************************************!*\ | |
| 4252 | - !*** ../node_modules/no-case/dist.es2015/index.js ***! | |
| 4253 | - \****************************************************/ | |
| 4254 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 4255 | - | |
| 4256 | -"use strict"; | |
| 4257 | -__webpack_require__.r(__webpack_exports__); | |
| 4258 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4259 | -/* harmony export */ noCase: () => (/* binding */ noCase) | |
| 4260 | -/* harmony export */ }); | |
| 4261 | -/* harmony import */ var lower_case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lower-case */ "../node_modules/lower-case/dist.es2015/index.js"); | |
| 4262 | - | |
| 4263 | -// Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case"). | |
| 4264 | -var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g]; | |
| 4265 | -// Remove all non-word characters. | |
| 4266 | -var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi; | |
| 4267 | -/** | |
| 4268 | - * Normalize the string into something other libraries can manipulate easier. | |
| 4269 | - */ | |
| 4270 | -function noCase(input, options) { | |
| 4271 | - if (options === void 0) { options = {}; } | |
| 4272 | - var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lower_case__WEBPACK_IMPORTED_MODULE_0__.lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d; | |
| 4273 | - var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0"); | |
| 4274 | - var start = 0; | |
| 4275 | - var end = result.length; | |
| 4276 | - // Trim the delimiter from around the output string. | |
| 4277 | - while (result.charAt(start) === "\0") | |
| 4278 | - start++; | |
| 4279 | - while (result.charAt(end - 1) === "\0") | |
| 4280 | - end--; | |
| 4281 | - // Transform each token independently. | |
| 4282 | - return result.slice(start, end).split("\0").map(transform).join(delimiter); | |
| 4283 | -} | |
| 4284 | -/** | |
| 4285 | - * Replace `re` in the input string with the replacement value. | |
| 4286 | - */ | |
| 4287 | -function replace(input, re, value) { | |
| 4288 | - if (re instanceof RegExp) | |
| 4289 | - return input.replace(re, value); | |
| 4290 | - return re.reduce(function (input, re) { return input.replace(re, value); }, input); | |
| 4291 | -} | |
| 4292 | -//# sourceMappingURL=index.js.map | |
| 4293 | - | |
| 4294 | -/***/ }), | |
| 4295 | - | |
| 4296 | -/***/ "../node_modules/object-assign/index.js": | |
| 4297 | -/*!**********************************************!*\ | |
| 4298 | - !*** ../node_modules/object-assign/index.js ***! | |
| 4299 | - \**********************************************/ | |
| 4300 | -/***/ ((module) => { | |
| 4301 | - | |
| 4302 | -"use strict"; | |
| 4303 | -/* | |
| 4304 | -object-assign | |
| 4305 | -(c) Sindre Sorhus | |
| 4306 | -@license MIT | |
| 4307 | -*/ | |
| 4308 | - | |
| 4309 | - | |
| 4310 | -/* eslint-disable no-unused-vars */ | |
| 4311 | -var getOwnPropertySymbols = Object.getOwnPropertySymbols; | |
| 4312 | -var hasOwnProperty = Object.prototype.hasOwnProperty; | |
| 4313 | -var propIsEnumerable = Object.prototype.propertyIsEnumerable; | |
| 4314 | - | |
| 4315 | -function toObject(val) { | |
| 4316 | - if (val === null || val === undefined) { | |
| 4317 | - throw new TypeError('Object.assign cannot be called with null or undefined'); | |
| 148 | +//#endregion | |
| 149 | +//#region node_modules/@babel/runtime/helpers/esm/slicedToArray.js | |
| 150 | + function _slicedToArray(r, e) { | |
| 151 | + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); | |
| 4318 | 152 | } |
| 4319 | 153 | |
| 4320 | - return Object(val); | |
| 4321 | -} | |
| 154 | +//#endregion | |
| 155 | +//#region node_modules/@babel/runtime/helpers/OverloadYield.js | |
| 156 | + var require_OverloadYield = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 157 | + function _OverloadYield(e, d) { | |
| 158 | + this.v = e, this.k = d; | |
| 159 | + } | |
| 160 | + module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 161 | + })); | |
| 4322 | 162 | |
| 4323 | -function shouldUseNative() { | |
| 4324 | - try { | |
| 4325 | - if (!Object.assign) { | |
| 4326 | - return false; | |
| 163 | +//#endregion | |
| 164 | +//#region node_modules/@babel/runtime/helpers/regeneratorDefine.js | |
| 165 | + var require_regeneratorDefine = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 166 | + function _regeneratorDefine(e, r, n, t) { | |
| 167 | + var i = Object.defineProperty; | |
| 168 | + try { | |
| 169 | + i({}, "", {}); | |
| 170 | + } catch (e) { | |
| 171 | + i = 0; | |
| 172 | + } | |
| 173 | + module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 174 | + function o(r, n) { | |
| 175 | + _regeneratorDefine(e, r, function(e) { | |
| 176 | + return this._invoke(r, n, e); | |
| 177 | + }); | |
| 178 | + } | |
| 179 | + r ? i ? i(e, r, { | |
| 180 | + value: n, | |
| 181 | + enumerable: !t, | |
| 182 | + configurable: !t, | |
| 183 | + writable: !t | |
| 184 | + }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 185 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 4327 | 186 | } |
| 187 | + module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 188 | + })); | |
| 4328 | 189 | |
| 4329 | - // Detect buggy property enumeration order in older V8 versions. | |
| 190 | +//#endregion | |
| 191 | +//#region node_modules/@babel/runtime/helpers/regenerator.js | |
| 192 | + var require_regenerator$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 193 | + var regeneratorDefine = require_regeneratorDefine(); | |
| 194 | + function _regenerator() { | |
| 195 | + /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 196 | + var e; | |
| 197 | + var t; | |
| 198 | + var r = "function" == typeof Symbol ? Symbol : {}; | |
| 199 | + var n = r.iterator || "@@iterator"; | |
| 200 | + var o = r.toStringTag || "@@toStringTag"; | |
| 201 | + function i(r, n, o, i) { | |
| 202 | + var c = n && n.prototype instanceof Generator ? n : Generator; | |
| 203 | + var u = Object.create(c.prototype); | |
| 204 | + return regeneratorDefine(u, "_invoke", function(r, n, o) { | |
| 205 | + var i; | |
| 206 | + var c; | |
| 207 | + var u; | |
| 208 | + var f = 0; | |
| 209 | + var p = o || []; | |
| 210 | + var y = !1; | |
| 211 | + var G = { | |
| 212 | + p: 0, | |
| 213 | + n: 0, | |
| 214 | + v: e, | |
| 215 | + a: d, | |
| 216 | + f: d.bind(e, 4), | |
| 217 | + d: function d(t, r) { | |
| 218 | + return i = t, c = 0, u = e, G.n = r, a; | |
| 219 | + } | |
| 220 | + }; | |
| 221 | + function d(r, n) { | |
| 222 | + for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 223 | + var o; | |
| 224 | + var i = p[t]; | |
| 225 | + var d = G.p; | |
| 226 | + var l = i[2]; | |
| 227 | + 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)); | |
| 228 | + } | |
| 229 | + if (o || r > 1) return a; | |
| 230 | + throw y = !0, n; | |
| 231 | + } | |
| 232 | + return function(o, p, l) { | |
| 233 | + if (f > 1) throw TypeError("Generator is already running"); | |
| 234 | + for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 235 | + i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 236 | + try { | |
| 237 | + if (f = 2, i) { | |
| 238 | + if (c || (o = "next"), t = i[o]) { | |
| 239 | + if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 240 | + if (!t.done) return t; | |
| 241 | + u = t.value, c < 2 && (c = 0); | |
| 242 | + } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 243 | + i = e; | |
| 244 | + } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 245 | + } catch (t) { | |
| 246 | + i = e, c = 1, u = t; | |
| 247 | + } finally { | |
| 248 | + f = 1; | |
| 249 | + } | |
| 250 | + } | |
| 251 | + return { | |
| 252 | + value: t, | |
| 253 | + done: y | |
| 254 | + }; | |
| 255 | + }; | |
| 256 | + }(r, o, i), !0), u; | |
| 257 | + } | |
| 258 | + var a = {}; | |
| 259 | + function Generator() {} | |
| 260 | + function GeneratorFunction() {} | |
| 261 | + function GeneratorFunctionPrototype() {} | |
| 262 | + t = Object.getPrototypeOf; | |
| 263 | + var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function() { | |
| 264 | + return this; | |
| 265 | + }), t); | |
| 266 | + var u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 267 | + function f(e) { | |
| 268 | + return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 269 | + } | |
| 270 | + 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() { | |
| 271 | + return this; | |
| 272 | + }), regeneratorDefine(u, "toString", function() { | |
| 273 | + return "[object Generator]"; | |
| 274 | + }), (module.exports = _regenerator = function _regenerator() { | |
| 275 | + return { | |
| 276 | + w: i, | |
| 277 | + m: f | |
| 278 | + }; | |
| 279 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 280 | + } | |
| 281 | + module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 282 | + })); | |
| 4330 | 283 | |
| 4331 | - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 | |
| 4332 | - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers | |
| 4333 | - test1[5] = 'de'; | |
| 4334 | - if (Object.getOwnPropertyNames(test1)[0] === '5') { | |
| 4335 | - return false; | |
| 284 | +//#endregion | |
| 285 | +//#region node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js | |
| 286 | + var require_regeneratorAsyncIterator = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 287 | + var OverloadYield = require_OverloadYield(); | |
| 288 | + var regeneratorDefine = require_regeneratorDefine(); | |
| 289 | + function AsyncIterator(t, e) { | |
| 290 | + function n(r, o, i, f) { | |
| 291 | + try { | |
| 292 | + var c = t[r](o); | |
| 293 | + var u = c.value; | |
| 294 | + return u instanceof OverloadYield ? e.resolve(u.v).then(function(t) { | |
| 295 | + n("next", t, i, f); | |
| 296 | + }, function(t) { | |
| 297 | + n("throw", t, i, f); | |
| 298 | + }) : e.resolve(u).then(function(t) { | |
| 299 | + c.value = t, i(c); | |
| 300 | + }, function(t) { | |
| 301 | + return n("throw", t, i, f); | |
| 302 | + }); | |
| 303 | + } catch (t) { | |
| 304 | + f(t); | |
| 305 | + } | |
| 306 | + } | |
| 307 | + var r; | |
| 308 | + this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function() { | |
| 309 | + return this; | |
| 310 | + })), regeneratorDefine(this, "_invoke", function(t, o, i) { | |
| 311 | + function f() { | |
| 312 | + return new e(function(e, r) { | |
| 313 | + n(t, i, e, r); | |
| 314 | + }); | |
| 315 | + } | |
| 316 | + return r = r ? r.then(f, f) : f(); | |
| 317 | + }, !0); | |
| 4336 | 318 | } |
| 319 | + module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 320 | + })); | |
| 4337 | 321 | |
| 4338 | - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 | |
| 4339 | - var test2 = {}; | |
| 4340 | - for (var i = 0; i < 10; i++) { | |
| 4341 | - test2['_' + String.fromCharCode(i)] = i; | |
| 322 | +//#endregion | |
| 323 | +//#region node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js | |
| 324 | + var require_regeneratorAsyncGen = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 325 | + var regenerator = require_regenerator$1(); | |
| 326 | + var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); | |
| 327 | + function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 328 | + return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 4342 | 329 | } |
| 4343 | - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { | |
| 4344 | - return test2[n]; | |
| 4345 | - }); | |
| 4346 | - if (order2.join('') !== '0123456789') { | |
| 4347 | - return false; | |
| 330 | + module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 331 | + })); | |
| 332 | + | |
| 333 | +//#endregion | |
| 334 | +//#region node_modules/@babel/runtime/helpers/regeneratorAsync.js | |
| 335 | + var require_regeneratorAsync = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 336 | + var regeneratorAsyncGen = require_regeneratorAsyncGen(); | |
| 337 | + function _regeneratorAsync(n, e, r, t, o) { | |
| 338 | + var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 339 | + return a.next().then(function(n) { | |
| 340 | + return n.done ? n.value : a.next(); | |
| 341 | + }); | |
| 4348 | 342 | } |
| 343 | + module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 344 | + })); | |
| 4349 | 345 | |
| 4350 | - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 | |
| 4351 | - var test3 = {}; | |
| 4352 | - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { | |
| 4353 | - test3[letter] = letter; | |
| 4354 | - }); | |
| 4355 | - if (Object.keys(Object.assign({}, test3)).join('') !== | |
| 4356 | - 'abcdefghijklmnopqrst') { | |
| 4357 | - return false; | |
| 346 | +//#endregion | |
| 347 | +//#region node_modules/@babel/runtime/helpers/regeneratorKeys.js | |
| 348 | + var require_regeneratorKeys = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 349 | + function _regeneratorKeys(e) { | |
| 350 | + var n = Object(e); | |
| 351 | + var r = []; | |
| 352 | + for (var t in n) r.unshift(t); | |
| 353 | + return function e() { | |
| 354 | + for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 355 | + return e.done = !0, e; | |
| 356 | + }; | |
| 4358 | 357 | } |
| 358 | + module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 359 | + })); | |
| 4359 | 360 | |
| 4360 | - return true; | |
| 4361 | - } catch (err) { | |
| 4362 | - // We don't expect any of the above to throw, but better to be safe. | |
| 4363 | - return false; | |
| 4364 | - } | |
| 4365 | -} | |
| 361 | +//#endregion | |
| 362 | +//#region node_modules/@babel/runtime/helpers/typeof.js | |
| 363 | + var require_typeof = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 364 | + function _typeof(o) { | |
| 365 | + "@babel/helpers - typeof"; | |
| 366 | + return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 367 | + return typeof o; | |
| 368 | + } : function(o) { | |
| 369 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 370 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 371 | + } | |
| 372 | + module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 373 | + })); | |
| 4366 | 374 | |
| 4367 | -module.exports = shouldUseNative() ? Object.assign : function (target, source) { | |
| 4368 | - var from; | |
| 4369 | - var to = toObject(target); | |
| 4370 | - var symbols; | |
| 4371 | - | |
| 4372 | - for (var s = 1; s < arguments.length; s++) { | |
| 4373 | - from = Object(arguments[s]); | |
| 4374 | - | |
| 4375 | - for (var key in from) { | |
| 4376 | - if (hasOwnProperty.call(from, key)) { | |
| 4377 | - to[key] = from[key]; | |
| 375 | +//#endregion | |
| 376 | +//#region node_modules/@babel/runtime/helpers/regeneratorValues.js | |
| 377 | + var require_regeneratorValues = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 378 | + var _typeof = require_typeof()["default"]; | |
| 379 | + function _regeneratorValues(e) { | |
| 380 | + if (null != e) { | |
| 381 | + var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"]; | |
| 382 | + var r = 0; | |
| 383 | + if (t) return t.call(e); | |
| 384 | + if ("function" == typeof e.next) return e; | |
| 385 | + if (!isNaN(e.length)) return { next: function next() { | |
| 386 | + return e && r >= e.length && (e = void 0), { | |
| 387 | + value: e && e[r++], | |
| 388 | + done: !e | |
| 389 | + }; | |
| 390 | + } }; | |
| 4378 | 391 | } |
| 392 | + throw new TypeError(_typeof(e) + " is not iterable"); | |
| 4379 | 393 | } |
| 394 | + module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 395 | + })); | |
| 4380 | 396 | |
| 4381 | - if (getOwnPropertySymbols) { | |
| 4382 | - symbols = getOwnPropertySymbols(from); | |
| 4383 | - for (var i = 0; i < symbols.length; i++) { | |
| 4384 | - if (propIsEnumerable.call(from, symbols[i])) { | |
| 4385 | - to[symbols[i]] = from[symbols[i]]; | |
| 4386 | - } | |
| 397 | +//#endregion | |
| 398 | +//#region node_modules/@babel/runtime/helpers/regeneratorRuntime.js | |
| 399 | + var require_regeneratorRuntime = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 400 | + var OverloadYield = require_OverloadYield(); | |
| 401 | + var regenerator = require_regenerator$1(); | |
| 402 | + var regeneratorAsync = require_regeneratorAsync(); | |
| 403 | + var regeneratorAsyncGen = require_regeneratorAsyncGen(); | |
| 404 | + var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); | |
| 405 | + var regeneratorKeys = require_regeneratorKeys(); | |
| 406 | + var regeneratorValues = require_regeneratorValues(); | |
| 407 | + function _regeneratorRuntime() { | |
| 408 | + "use strict"; | |
| 409 | + var r = regenerator(); | |
| 410 | + var e = r.m(_regeneratorRuntime); | |
| 411 | + var t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 412 | + function n(r) { | |
| 413 | + var e = "function" == typeof r && r.constructor; | |
| 414 | + return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 4387 | 415 | } |
| 416 | + var o = { | |
| 417 | + "throw": 1, | |
| 418 | + "return": 2, | |
| 419 | + "break": 3, | |
| 420 | + "continue": 3 | |
| 421 | + }; | |
| 422 | + function a(r) { | |
| 423 | + var e; | |
| 424 | + var t; | |
| 425 | + return function(n) { | |
| 426 | + e || (e = { | |
| 427 | + stop: function stop() { | |
| 428 | + return t(n.a, 2); | |
| 429 | + }, | |
| 430 | + "catch": function _catch() { | |
| 431 | + return n.v; | |
| 432 | + }, | |
| 433 | + abrupt: function abrupt(r, e) { | |
| 434 | + return t(n.a, o[r], e); | |
| 435 | + }, | |
| 436 | + delegateYield: function delegateYield(r, o, a) { | |
| 437 | + return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 438 | + }, | |
| 439 | + finish: function finish(r) { | |
| 440 | + return t(n.f, r); | |
| 441 | + } | |
| 442 | + }, t = function t(r, _t, o) { | |
| 443 | + n.p = e.prev, n.n = e.next; | |
| 444 | + try { | |
| 445 | + return r(_t, o); | |
| 446 | + } finally { | |
| 447 | + e.next = n.n; | |
| 448 | + } | |
| 449 | + }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 450 | + try { | |
| 451 | + return r.call(this, e); | |
| 452 | + } finally { | |
| 453 | + n.p = e.prev, n.n = e.next; | |
| 454 | + } | |
| 455 | + }; | |
| 456 | + } | |
| 457 | + return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 458 | + return { | |
| 459 | + wrap: function wrap(e, t, n, o) { | |
| 460 | + return r.w(a(e), t, n, o && o.reverse()); | |
| 461 | + }, | |
| 462 | + isGeneratorFunction: n, | |
| 463 | + mark: r.m, | |
| 464 | + awrap: function awrap(r, e) { | |
| 465 | + return new OverloadYield(r, e); | |
| 466 | + }, | |
| 467 | + AsyncIterator: regeneratorAsyncIterator, | |
| 468 | + async: function async(r, e, t, o, u) { | |
| 469 | + return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 470 | + }, | |
| 471 | + keys: regeneratorKeys, | |
| 472 | + values: regeneratorValues | |
| 473 | + }; | |
| 474 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 4388 | 475 | } |
| 4389 | - } | |
| 476 | + module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 477 | + })); | |
| 4390 | 478 | |
| 4391 | - return to; | |
| 4392 | -}; | |
| 479 | +//#endregion | |
| 480 | +//#region node_modules/@babel/runtime/regenerator/index.js | |
| 481 | + var require_regenerator = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 482 | + var runtime = require_regeneratorRuntime()(); | |
| 483 | + module.exports = runtime; | |
| 484 | + try { | |
| 485 | + regeneratorRuntime = runtime; | |
| 486 | + } catch (accidentalStrictMode) { | |
| 487 | + if (typeof globalThis === "object") globalThis.regeneratorRuntime = runtime; | |
| 488 | + else Function("r", "regeneratorRuntime = r")(runtime); | |
| 489 | + } | |
| 490 | + })); | |
| 4393 | 491 | |
| 492 | +//#endregion | |
| 493 | +//#region node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js | |
| 494 | +var import_regenerator = /* @__PURE__ */ __toESM(require_regenerator()); | |
| 495 | + function _arrayWithoutHoles(r) { | |
| 496 | + if (Array.isArray(r)) return _arrayLikeToArray(r); | |
| 497 | + } | |
| 4394 | 498 | |
| 4395 | -/***/ }), | |
| 499 | +//#endregion | |
| 500 | +//#region node_modules/@babel/runtime/helpers/esm/iterableToArray.js | |
| 501 | + function _iterableToArray(r) { | |
| 502 | + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 503 | + } | |
| 4396 | 504 | |
| 4397 | -/***/ "../node_modules/param-case/dist.es2015/index.js": | |
| 4398 | -/*!*******************************************************!*\ | |
| 4399 | - !*** ../node_modules/param-case/dist.es2015/index.js ***! | |
| 4400 | - \*******************************************************/ | |
| 4401 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 505 | +//#endregion | |
| 506 | +//#region node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js | |
| 507 | + function _nonIterableSpread() { | |
| 508 | + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 509 | + } | |
| 4402 | 510 | |
| 4403 | -"use strict"; | |
| 4404 | -__webpack_require__.r(__webpack_exports__); | |
| 4405 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4406 | -/* harmony export */ paramCase: () => (/* binding */ paramCase) | |
| 4407 | -/* harmony export */ }); | |
| 4408 | -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.mjs"); | |
| 4409 | -/* harmony import */ var dot_case__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dot-case */ "../node_modules/dot-case/dist.es2015/index.js"); | |
| 511 | +//#endregion | |
| 512 | +//#region node_modules/@babel/runtime/helpers/esm/toConsumableArray.js | |
| 513 | + function _toConsumableArray(r) { | |
| 514 | + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); | |
| 515 | + } | |
| 4410 | 516 | |
| 517 | +//#endregion | |
| 518 | +//#region node_modules/@babel/runtime/helpers/esm/typeof.js | |
| 519 | + function _typeof(o) { | |
| 520 | + "@babel/helpers - typeof"; | |
| 521 | + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 522 | + return typeof o; | |
| 523 | + } : function(o) { | |
| 524 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 525 | + }, _typeof(o); | |
| 526 | + } | |
| 4411 | 527 | |
| 4412 | -function paramCase(input, options) { | |
| 4413 | - if (options === void 0) { options = {}; } | |
| 4414 | - return (0,dot_case__WEBPACK_IMPORTED_MODULE_1__.dotCase)(input, (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({ delimiter: "-" }, options)); | |
| 4415 | -} | |
| 4416 | -//# sourceMappingURL=index.js.map | |
| 528 | +//#endregion | |
| 529 | +//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js | |
| 530 | + function toPrimitive(t, r) { | |
| 531 | + if ("object" != _typeof(t) || !t) return t; | |
| 532 | + var e = t[Symbol.toPrimitive]; | |
| 533 | + if (void 0 !== e) { | |
| 534 | + var i = e.call(t, r || "default"); | |
| 535 | + if ("object" != _typeof(i)) return i; | |
| 536 | + throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 537 | + } | |
| 538 | + return ("string" === r ? String : Number)(t); | |
| 539 | + } | |
| 4417 | 540 | |
| 4418 | -/***/ }), | |
| 541 | +//#endregion | |
| 542 | +//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js | |
| 543 | + function toPropertyKey(t) { | |
| 544 | + var i = toPrimitive(t, "string"); | |
| 545 | + return "symbol" == _typeof(i) ? i : i + ""; | |
| 546 | + } | |
| 4419 | 547 | |
| 4420 | -/***/ "../node_modules/prop-types/checkPropTypes.js": | |
| 4421 | -/*!****************************************************!*\ | |
| 4422 | - !*** ../node_modules/prop-types/checkPropTypes.js ***! | |
| 4423 | - \****************************************************/ | |
| 4424 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 548 | +//#endregion | |
| 549 | +//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js | |
| 550 | + function _defineProperty(e, r, t) { | |
| 551 | + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 552 | + value: t, | |
| 553 | + enumerable: !0, | |
| 554 | + configurable: !0, | |
| 555 | + writable: !0 | |
| 556 | + }) : e[r] = t, e; | |
| 557 | + } | |
| 4425 | 558 | |
| 4426 | -"use strict"; | |
| 4427 | -/** | |
| 4428 | - * Copyright (c) 2013-present, Facebook, Inc. | |
| 4429 | - * | |
| 4430 | - * This source code is licensed under the MIT license found in the | |
| 4431 | - * LICENSE file in the root directory of this source tree. | |
| 4432 | - */ | |
| 559 | +//#endregion | |
| 560 | +//#region modules/element-manager/assets/js/api.js | |
| 561 | + var saveDisabledWidgets = /*#__PURE__*/ function() { | |
| 562 | + var _ref = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee(widgetsDisabled) { | |
| 563 | + var elementsRestriction; | |
| 564 | + var bodyData; | |
| 565 | + var _args = arguments; | |
| 566 | + var _t; | |
| 567 | + return import_regenerator.default.wrap(function(_context) { | |
| 568 | + while (1) switch (_context.prev = _context.next) { | |
| 569 | + case 0: | |
| 570 | + elementsRestriction = _args.length > 1 && _args[1] !== void 0 ? _args[1] : {}; | |
| 571 | + _context.prev = 1; | |
| 572 | + bodyData = { | |
| 573 | + action: "elementor_element_manager_save_disabled_elements", | |
| 574 | + nonce: eElementManagerConfig.nonce, | |
| 575 | + widgets: JSON.stringify(widgetsDisabled) | |
| 576 | + }; | |
| 577 | + if (null !== elementsRestriction) bodyData.elements_restriction = JSON.stringify(elementsRestriction); | |
| 578 | + _context.next = 2; | |
| 579 | + return fetch(eElementManagerConfig.ajaxurl, { | |
| 580 | + method: "POST", | |
| 581 | + headers: { "Content-Type": "application/x-www-form-urlencoded" }, | |
| 582 | + body: new URLSearchParams(bodyData) | |
| 583 | + }); | |
| 584 | + case 2: | |
| 585 | + _context.next = 4; | |
| 586 | + break; | |
| 587 | + case 3: | |
| 588 | + _context.prev = 3; | |
| 589 | + _t = _context["catch"](1); | |
| 590 | + console.error(_t); | |
| 591 | + case 4: | |
| 592 | + case "end": return _context.stop(); | |
| 593 | + } | |
| 594 | + }, _callee, null, [[1, 3]]); | |
| 595 | + })); | |
| 596 | + return function saveDisabledWidgets(_x) { | |
| 597 | + return _ref.apply(this, arguments); | |
| 598 | + }; | |
| 599 | + }(); | |
| 600 | + var getAdminAppData = /*#__PURE__*/ function() { | |
| 601 | + var _ref2 = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee2() { | |
| 602 | + var response; | |
| 603 | + var data; | |
| 604 | + var _t2; | |
| 605 | + return import_regenerator.default.wrap(function(_context2) { | |
| 606 | + while (1) switch (_context2.prev = _context2.next) { | |
| 607 | + case 0: | |
| 608 | + _context2.prev = 0; | |
| 609 | + _context2.next = 1; | |
| 610 | + return fetch(eElementManagerConfig.ajaxurl, { | |
| 611 | + method: "POST", | |
| 612 | + headers: { "Content-Type": "application/x-www-form-urlencoded" }, | |
| 613 | + body: new URLSearchParams({ | |
| 614 | + action: "elementor_element_manager_get_admin_app_data", | |
| 615 | + nonce: eElementManagerConfig.nonce | |
| 616 | + }) | |
| 617 | + }); | |
| 618 | + case 1: | |
| 619 | + response = _context2.sent; | |
| 620 | + _context2.next = 2; | |
| 621 | + return response.json(); | |
| 622 | + case 2: | |
| 623 | + data = _context2.sent; | |
| 624 | + if (!data.success) { | |
| 625 | + _context2.next = 3; | |
| 626 | + break; | |
| 627 | + } | |
| 628 | + return _context2.abrupt("return", data.data); | |
| 629 | + case 3: | |
| 630 | + _context2.next = 5; | |
| 631 | + break; | |
| 632 | + case 4: | |
| 633 | + _context2.prev = 4; | |
| 634 | + _t2 = _context2["catch"](0); | |
| 635 | + console.error(_t2); | |
| 636 | + case 5: | |
| 637 | + case "end": return _context2.stop(); | |
| 638 | + } | |
| 639 | + }, _callee2, null, [[0, 4]]); | |
| 640 | + })); | |
| 641 | + return function getAdminAppData() { | |
| 642 | + return _ref2.apply(this, arguments); | |
| 643 | + }; | |
| 644 | + }(); | |
| 645 | + var getUsageWidgets = /*#__PURE__*/ function() { | |
| 646 | + var _ref3 = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee3() { | |
| 647 | + var response; | |
| 648 | + var data; | |
| 649 | + var _t3; | |
| 650 | + return import_regenerator.default.wrap(function(_context3) { | |
| 651 | + while (1) switch (_context3.prev = _context3.next) { | |
| 652 | + case 0: | |
| 653 | + _context3.prev = 0; | |
| 654 | + _context3.next = 1; | |
| 655 | + return fetch(eElementManagerConfig.ajaxurl, { | |
| 656 | + method: "POST", | |
| 657 | + headers: { "Content-Type": "application/x-www-form-urlencoded" }, | |
| 658 | + body: new URLSearchParams({ | |
| 659 | + action: "elementor_element_manager_get_widgets_usage", | |
| 660 | + nonce: eElementManagerConfig.nonce | |
| 661 | + }) | |
| 662 | + }); | |
| 663 | + case 1: | |
| 664 | + response = _context3.sent; | |
| 665 | + _context3.next = 2; | |
| 666 | + return response.json(); | |
| 667 | + case 2: | |
| 668 | + data = _context3.sent; | |
| 669 | + if (!data.success) { | |
| 670 | + _context3.next = 3; | |
| 671 | + break; | |
| 672 | + } | |
| 673 | + return _context3.abrupt("return", data.data); | |
| 674 | + case 3: | |
| 675 | + _context3.next = 5; | |
| 676 | + break; | |
| 677 | + case 4: | |
| 678 | + _context3.prev = 4; | |
| 679 | + _t3 = _context3["catch"](0); | |
| 680 | + console.error(_t3); | |
| 681 | + case 5: | |
| 682 | + case "end": return _context3.stop(); | |
| 683 | + } | |
| 684 | + }, _callee3, null, [[0, 4]]); | |
| 685 | + })); | |
| 686 | + return function getUsageWidgets() { | |
| 687 | + return _ref3.apply(this, arguments); | |
| 688 | + }; | |
| 689 | + }(); | |
| 690 | + var markNoticeViewed = /*#__PURE__*/ function() { | |
| 691 | + var _ref4 = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee4(noticeId, nonce) { | |
| 692 | + var _t4; | |
| 693 | + return import_regenerator.default.wrap(function(_context4) { | |
| 694 | + while (1) switch (_context4.prev = _context4.next) { | |
| 695 | + case 0: | |
| 696 | + _context4.prev = 0; | |
| 697 | + _context4.next = 1; | |
| 698 | + return fetch(eElementManagerConfig.ajaxurl, { | |
| 699 | + method: "POST", | |
| 700 | + headers: { "Content-Type": "application/x-www-form-urlencoded" }, | |
| 701 | + body: new URLSearchParams({ | |
| 702 | + action: "elementor_set_admin_notice_viewed", | |
| 703 | + notice_id: noticeId, | |
| 704 | + _wpnonce: nonce | |
| 705 | + }) | |
| 706 | + }); | |
| 707 | + case 1: | |
| 708 | + _context4.next = 3; | |
| 709 | + break; | |
| 710 | + case 2: | |
| 711 | + _context4.prev = 2; | |
| 712 | + _t4 = _context4["catch"](0); | |
| 713 | + console.error(_t4); | |
| 714 | + case 3: | |
| 715 | + case "end": return _context4.stop(); | |
| 716 | + } | |
| 717 | + }, _callee4, null, [[0, 2]]); | |
| 718 | + })); | |
| 719 | + return function markNoticeViewed(_x2, _x3) { | |
| 720 | + return _ref4.apply(this, arguments); | |
| 721 | + }; | |
| 722 | + }(); | |
| 4433 | 723 | |
| 724 | +//#endregion | |
| 725 | +//#region modules/element-manager/assets/js/app-editor-one/hooks/useElementManager.js | |
| 726 | + function ownKeys$1(e, r) { | |
| 727 | + var t = Object.keys(e); | |
| 728 | + if (Object.getOwnPropertySymbols) { | |
| 729 | + var o = Object.getOwnPropertySymbols(e); | |
| 730 | + r && (o = o.filter(function(r) { | |
| 731 | + return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 732 | + })), t.push.apply(t, o); | |
| 733 | + } | |
| 734 | + return t; | |
| 735 | + } | |
| 736 | + __name(ownKeys$1, "ownKeys"); | |
| 737 | + function _objectSpread$1(e) { | |
| 738 | + for (var r = 1; r < arguments.length; r++) { | |
| 739 | + var t = null != arguments[r] ? arguments[r] : {}; | |
| 740 | + r % 2 ? ownKeys$1(Object(t), !0).forEach(function(r) { | |
| 741 | + _defineProperty(e, r, t[r]); | |
| 742 | + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r) { | |
| 743 | + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 744 | + }); | |
| 745 | + } | |
| 746 | + return e; | |
| 747 | + } | |
| 748 | + __name(_objectSpread$1, "_objectSpread"); | |
| 749 | + var useElementManager = function useElementManager() { | |
| 750 | + var isInitialMount = (0, react.useRef)(true); | |
| 751 | + var _useState2 = _slicedToArray((0, react.useState)(true), 2); | |
| 752 | + var isLoading = _useState2[0]; | |
| 753 | + var setIsLoading = _useState2[1]; | |
| 754 | + var _useState4 = _slicedToArray((0, react.useState)([]), 2); | |
| 755 | + var widgets = _useState4[0]; | |
| 756 | + var setWidgets = _useState4[1]; | |
| 757 | + var _useState6 = _slicedToArray((0, react.useState)([]), 2); | |
| 758 | + var promotionWidgets = _useState6[0]; | |
| 759 | + var setPromotionWidgets = _useState6[1]; | |
| 760 | + var _useState8 = _slicedToArray((0, react.useState)([]), 2); | |
| 761 | + var plugins = _useState8[0]; | |
| 762 | + var setPlugins = _useState8[1]; | |
| 763 | + var _useState0 = _slicedToArray((0, react.useState)([]), 2); | |
| 764 | + var roles = _useState0[0]; | |
| 765 | + var setRoles = _useState0[1]; | |
| 766 | + var _useState10 = _slicedToArray((0, react.useState)([]), 2); | |
| 767 | + var widgetsDisabled = _useState10[0]; | |
| 768 | + var setWidgetsDisabled = _useState10[1]; | |
| 769 | + var _useState12 = _slicedToArray((0, react.useState)(null), 2); | |
| 770 | + var widgetsRoleRestrictions = _useState12[0]; | |
| 771 | + var setWidgetsRoleRestrictions = _useState12[1]; | |
| 772 | + var _useState14 = _slicedToArray((0, react.useState)([]), 2); | |
| 773 | + var promotionData = _useState14[0]; | |
| 774 | + var setPromotionData = _useState14[1]; | |
| 775 | + var _useState16 = _slicedToArray((0, react.useState)(null), 2); | |
| 776 | + var noticeData = _useState16[0]; | |
| 777 | + var setNoticeData = _useState16[1]; | |
| 778 | + var _useState18 = _slicedToArray((0, react.useState)({ | |
| 779 | + isLoading: false, | |
| 780 | + data: null | |
| 781 | + }), 2); | |
| 782 | + var usageWidgets = _useState18[0]; | |
| 783 | + var setUsageWidgets = _useState18[1]; | |
| 784 | + var _useState20 = _slicedToArray((0, react.useState)({ | |
| 785 | + isSaving: false, | |
| 786 | + isUnsavedChanges: false | |
| 787 | + }), 2); | |
| 788 | + var changeProgress = _useState20[0]; | |
| 789 | + var setChangeProgress = _useState20[1]; | |
| 790 | + var _useState22 = _slicedToArray((0, react.useState)(false), 2); | |
| 791 | + var isSnackbarOpen = _useState22[0]; | |
| 792 | + var setIsSnackbarOpen = _useState22[1]; | |
| 793 | + var getWidgetUsage = (0, react.useCallback)(function(widgetName) { | |
| 794 | + if (!usageWidgets.data || !usageWidgets.data.hasOwnProperty(widgetName)) return 0; | |
| 795 | + return usageWidgets.data[widgetName]; | |
| 796 | + }, [usageWidgets.data]); | |
| 797 | + var scanUsageElements = (0, react.useCallback)(/*#__PURE__*/ _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee() { | |
| 798 | + var data; | |
| 799 | + return import_regenerator.default.wrap(function(_context) { | |
| 800 | + while (1) switch (_context.prev = _context.next) { | |
| 801 | + case 0: | |
| 802 | + setUsageWidgets(function(prev) { | |
| 803 | + return _objectSpread$1(_objectSpread$1({}, prev), {}, { isLoading: true }); | |
| 804 | + }); | |
| 805 | + _context.next = 1; | |
| 806 | + return getUsageWidgets(); | |
| 807 | + case 1: | |
| 808 | + data = _context.sent; | |
| 809 | + setUsageWidgets({ | |
| 810 | + data, | |
| 811 | + isLoading: false | |
| 812 | + }); | |
| 813 | + return _context.abrupt("return", data); | |
| 814 | + case 2: | |
| 815 | + case "end": return _context.stop(); | |
| 816 | + } | |
| 817 | + }, _callee); | |
| 818 | + })), []); | |
| 819 | + var saveChanges = (0, react.useCallback)(/*#__PURE__*/ _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee2() { | |
| 820 | + return import_regenerator.default.wrap(function(_context2) { | |
| 821 | + while (1) switch (_context2.prev = _context2.next) { | |
| 822 | + case 0: | |
| 823 | + setChangeProgress(function(prev) { | |
| 824 | + return _objectSpread$1(_objectSpread$1({}, prev), {}, { isSaving: true }); | |
| 825 | + }); | |
| 826 | + _context2.next = 1; | |
| 827 | + return saveDisabledWidgets(widgetsDisabled, widgetsRoleRestrictions); | |
| 828 | + case 1: | |
| 829 | + setChangeProgress({ | |
| 830 | + isSaving: false, | |
| 831 | + isUnsavedChanges: false | |
| 832 | + }); | |
| 833 | + setIsSnackbarOpen(true); | |
| 834 | + case 2: | |
| 835 | + case "end": return _context2.stop(); | |
| 836 | + } | |
| 837 | + }, _callee2); | |
| 838 | + })), [widgetsDisabled, widgetsRoleRestrictions]); | |
| 839 | + var deactivateAllUnusedWidgets = (0, react.useCallback)(function() { | |
| 840 | + if (!usageWidgets.data) return; | |
| 841 | + setWidgetsDisabled(widgets.filter(function(widget) { | |
| 842 | + return !usageWidgets.data.hasOwnProperty(widget.name) || widgetsDisabled.includes(widget.name); | |
| 843 | + }).map(function(widget) { | |
| 844 | + return widget.name; | |
| 845 | + })); | |
| 846 | + }, [ | |
| 847 | + widgets, | |
| 848 | + usageWidgets.data, | |
| 849 | + widgetsDisabled | |
| 850 | + ]); | |
| 851 | + var enableAllWidgets = (0, react.useCallback)(function() { | |
| 852 | + setWidgetsDisabled([]); | |
| 853 | + }, []); | |
| 854 | + var toggleWidget = (0, react.useCallback)(function(widgetName, isEnabled) { | |
| 855 | + if (isEnabled) setWidgetsDisabled(function(prev) { | |
| 856 | + return prev.filter(function(item) { | |
| 857 | + return item !== widgetName; | |
| 858 | + }); | |
| 859 | + }); | |
| 860 | + else setWidgetsDisabled(function(prev) { | |
| 861 | + return [].concat(_toConsumableArray(prev), [widgetName]); | |
| 862 | + }); | |
| 863 | + }, []); | |
| 864 | + var dismissNotice = (0, react.useCallback)(function() { | |
| 865 | + if (noticeData) { | |
| 866 | + markNoticeViewed(noticeData.notice_id, noticeData.nonce); | |
| 867 | + setNoticeData(function(prev) { | |
| 868 | + return _objectSpread$1(_objectSpread$1({}, prev), {}, { is_viewed: true }); | |
| 869 | + }); | |
| 870 | + } | |
| 871 | + }, [noticeData]); | |
| 872 | + (0, react.useEffect)(function() { | |
| 873 | + (/* @__PURE__ */ (function() { | |
| 874 | + var _ref3 = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee3() { | |
| 875 | + var _appData$additional_d; | |
| 876 | + var _appData$additional_d2; | |
| 877 | + var appData; | |
| 878 | + var pluginsData; | |
| 879 | + return import_regenerator.default.wrap(function(_context3) { | |
| 880 | + while (1) switch (_context3.prev = _context3.next) { | |
| 881 | + case 0: | |
| 882 | + _context3.next = 1; | |
| 883 | + return getAdminAppData(); | |
| 884 | + case 1: | |
| 885 | + appData = _context3.sent; | |
| 886 | + setNoticeData(appData.notice_data); | |
| 887 | + setWidgetsDisabled(appData.disabled_elements); | |
| 888 | + setWidgets(appData.widgets); | |
| 889 | + setPromotionWidgets(appData.promotion_widgets); | |
| 890 | + setPromotionData(appData.promotion_data); | |
| 891 | + if ((_appData$additional_d = appData.additional_data) !== null && _appData$additional_d !== void 0 && _appData$additional_d.roles) setRoles(appData.additional_data.roles); | |
| 892 | + if ((_appData$additional_d2 = appData.additional_data) !== null && _appData$additional_d2 !== void 0 && _appData$additional_d2.role_restrictions) setWidgetsRoleRestrictions(appData.additional_data.role_restrictions); | |
| 893 | + pluginsData = appData.plugins.map(function(plugin) { | |
| 894 | + return { | |
| 895 | + label: plugin, | |
| 896 | + value: plugin | |
| 897 | + }; | |
| 898 | + }); | |
| 899 | + pluginsData.unshift({ | |
| 900 | + label: "All Plugins", | |
| 901 | + value: "" | |
| 902 | + }); | |
| 903 | + setPlugins(pluginsData); | |
| 904 | + setIsLoading(false); | |
| 905 | + setChangeProgress(function(prev) { | |
| 906 | + return _objectSpread$1(_objectSpread$1({}, prev), {}, { isUnsavedChanges: false }); | |
| 907 | + }); | |
| 908 | + case 2: | |
| 909 | + case "end": return _context3.stop(); | |
| 910 | + } | |
| 911 | + }, _callee3); | |
| 912 | + })); | |
| 913 | + return function loadData() { | |
| 914 | + return _ref3.apply(this, arguments); | |
| 915 | + }; | |
| 916 | + })())(); | |
| 917 | + }, []); | |
| 918 | + (0, react.useEffect)(function() { | |
| 919 | + if (isLoading) return; | |
| 920 | + if (isInitialMount.current) { | |
| 921 | + isInitialMount.current = false; | |
| 922 | + return; | |
| 923 | + } | |
| 924 | + setChangeProgress(function(prev) { | |
| 925 | + return _objectSpread$1(_objectSpread$1({}, prev), {}, { isUnsavedChanges: true }); | |
| 926 | + }); | |
| 927 | + }, [ | |
| 928 | + widgetsDisabled, | |
| 929 | + widgetsRoleRestrictions, | |
| 930 | + isLoading | |
| 931 | + ]); | |
| 932 | + (0, react.useEffect)(function() { | |
| 933 | + var handleBeforeUnload = function handleBeforeUnload(event) { | |
| 934 | + event.preventDefault(); | |
| 935 | + event.returnValue = ""; | |
| 936 | + }; | |
| 937 | + if (changeProgress.isUnsavedChanges) window.addEventListener("beforeunload", handleBeforeUnload); | |
| 938 | + else window.removeEventListener("beforeunload", handleBeforeUnload); | |
| 939 | + return function() { | |
| 940 | + window.removeEventListener("beforeunload", handleBeforeUnload); | |
| 941 | + }; | |
| 942 | + }, [changeProgress.isUnsavedChanges]); | |
| 943 | + return { | |
| 944 | + isLoading, | |
| 945 | + widgets, | |
| 946 | + promotionWidgets, | |
| 947 | + plugins, | |
| 948 | + roles, | |
| 949 | + widgetsDisabled, | |
| 950 | + widgetsRoleRestrictions, | |
| 951 | + setWidgetsRoleRestrictions, | |
| 952 | + promotionData, | |
| 953 | + noticeData, | |
| 954 | + usageWidgets, | |
| 955 | + changeProgress, | |
| 956 | + isSnackbarOpen, | |
| 957 | + setIsSnackbarOpen, | |
| 958 | + getWidgetUsage, | |
| 959 | + scanUsageElements, | |
| 960 | + saveChanges, | |
| 961 | + deactivateAllUnusedWidgets, | |
| 962 | + enableAllWidgets, | |
| 963 | + toggleWidget, | |
| 964 | + dismissNotice | |
| 965 | + }; | |
| 966 | + }; | |
| 4434 | 967 | |
| 968 | +//#endregion | |
| 969 | +//#region modules/element-manager/assets/js/app-editor-one/hooks/useWidgetFilters.js | |
| 970 | + var useWidgetFilters = function useWidgetFilters(widgets, widgetsDisabled, getWidgetUsage) { | |
| 971 | + var _useState2 = _slicedToArray((0, react.useState)(""), 2); | |
| 972 | + var searchKeyword = _useState2[0]; | |
| 973 | + var setSearchKeyword = _useState2[1]; | |
| 974 | + var _useState4 = _slicedToArray((0, react.useState)("widget"), 2); | |
| 975 | + var sortingColumn = _useState4[0]; | |
| 976 | + var setSortingColumn = _useState4[1]; | |
| 977 | + var _useState6 = _slicedToArray((0, react.useState)("asc"), 2); | |
| 978 | + var sortingDirection = _useState6[0]; | |
| 979 | + var setSortingDirection = _useState6[1]; | |
| 980 | + var _useState8 = _slicedToArray((0, react.useState)(""), 2); | |
| 981 | + var filterByPlugin = _useState8[0]; | |
| 982 | + var setFilterByPlugin = _useState8[1]; | |
| 983 | + var _useState0 = _slicedToArray((0, react.useState)("all"), 2); | |
| 984 | + var filterByStatus = _useState0[0]; | |
| 985 | + return { | |
| 986 | + searchKeyword, | |
| 987 | + setSearchKeyword, | |
| 988 | + filterByPlugin, | |
| 989 | + setFilterByPlugin, | |
| 990 | + filterByStatus, | |
| 991 | + setFilterByStatus: _useState0[1], | |
| 992 | + sortedAndFilteredWidgets: (0, react.useMemo)(function() { | |
| 993 | + var filteredWidgets = widgets.filter(function(widget) { | |
| 994 | + return widget.title.toLowerCase().includes(searchKeyword.toLowerCase()); | |
| 995 | + }); | |
| 996 | + if ("" !== filterByPlugin) filteredWidgets = filteredWidgets.filter(function(widget) { | |
| 997 | + return widget.plugin.toLowerCase() === filterByPlugin.toLowerCase(); | |
| 998 | + }); | |
| 999 | + if ("all" !== filterByStatus) filteredWidgets = filteredWidgets.filter(function(widget) { | |
| 1000 | + if ("active" === filterByStatus) return !widgetsDisabled.includes(widget.name); | |
| 1001 | + return widgetsDisabled.includes(widget.name); | |
| 1002 | + }); | |
| 1003 | + filteredWidgets.sort(function(a, b) { | |
| 1004 | + var aValue; | |
| 1005 | + var bValue; | |
| 1006 | + if ("widget" === sortingColumn) { | |
| 1007 | + aValue = a.title; | |
| 1008 | + bValue = b.title; | |
| 1009 | + } | |
| 1010 | + if ("usage" === sortingColumn) { | |
| 1011 | + aValue = getWidgetUsage(a.name); | |
| 1012 | + bValue = getWidgetUsage(b.name); | |
| 1013 | + } | |
| 1014 | + if (aValue === bValue) return 0; | |
| 1015 | + if ("asc" === sortingDirection) return aValue < bValue ? -1 : 1; | |
| 1016 | + return aValue > bValue ? -1 : 1; | |
| 1017 | + }); | |
| 1018 | + return filteredWidgets; | |
| 1019 | + }, [ | |
| 1020 | + widgets, | |
| 1021 | + searchKeyword, | |
| 1022 | + sortingColumn, | |
| 1023 | + sortingDirection, | |
| 1024 | + filterByPlugin, | |
| 1025 | + filterByStatus, | |
| 1026 | + widgetsDisabled, | |
| 1027 | + getWidgetUsage | |
| 1028 | + ]), | |
| 1029 | + getSortingIndicatorClasses: (0, react.useCallback)(function(column) { | |
| 1030 | + if (sortingColumn !== column) return ""; | |
| 1031 | + return "asc" === sortingDirection ? "sorted asc" : "sorted desc"; | |
| 1032 | + }, [sortingColumn, sortingDirection]), | |
| 1033 | + onSortingClicked: (0, react.useCallback)(function(column) { | |
| 1034 | + if (sortingColumn === column) setSortingDirection(function(prev) { | |
| 1035 | + return "asc" === prev ? "desc" : "asc"; | |
| 1036 | + }); | |
| 1037 | + else { | |
| 1038 | + setSortingColumn(column); | |
| 1039 | + setSortingDirection("asc"); | |
| 1040 | + } | |
| 1041 | + }, [sortingColumn]), | |
| 1042 | + setSortByUsage: (0, react.useCallback)(function() { | |
| 1043 | + setSortingColumn("usage"); | |
| 1044 | + setSortingDirection("desc"); | |
| 1045 | + }, []) | |
| 1046 | + }; | |
| 1047 | + }; | |
| 4435 | 1048 | |
| 4436 | -var printWarning = function() {}; | |
| 1049 | +//#endregion | |
| 1050 | +//#region node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js | |
| 1051 | +/** @license React v16.13.1 | |
| 1052 | + * react-is.development.js | |
| 1053 | + * | |
| 1054 | + * Copyright (c) Facebook, Inc. and its affiliates. | |
| 1055 | + * | |
| 1056 | + * This source code is licensed under the MIT license found in the | |
| 1057 | + * LICENSE file in the root directory of this source tree. | |
| 1058 | + */ | |
| 1059 | + var require_react_is_development = /* @__PURE__ */ __commonJSMin(((exports) => { | |
| 1060 | + (function() { | |
| 1061 | + "use strict"; | |
| 1062 | + var hasSymbol = typeof Symbol === "function" && Symbol.for; | |
| 1063 | + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103; | |
| 1064 | + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106; | |
| 1065 | + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107; | |
| 1066 | + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108; | |
| 1067 | + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114; | |
| 1068 | + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109; | |
| 1069 | + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110; | |
| 1070 | + var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111; | |
| 1071 | + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111; | |
| 1072 | + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112; | |
| 1073 | + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113; | |
| 1074 | + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120; | |
| 1075 | + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115; | |
| 1076 | + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116; | |
| 1077 | + var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121; | |
| 1078 | + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117; | |
| 1079 | + var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118; | |
| 1080 | + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119; | |
| 1081 | + function isValidElementType(type) { | |
| 1082 | + return typeof type === "string" || typeof type === "function" || type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); | |
| 1083 | + } | |
| 1084 | + function typeOf(object) { | |
| 1085 | + if (typeof object === "object" && object !== null) { | |
| 1086 | + var $$typeof = object.$$typeof; | |
| 1087 | + switch ($$typeof) { | |
| 1088 | + case REACT_ELEMENT_TYPE: | |
| 1089 | + var type = object.type; | |
| 1090 | + switch (type) { | |
| 1091 | + case REACT_ASYNC_MODE_TYPE: | |
| 1092 | + case REACT_CONCURRENT_MODE_TYPE: | |
| 1093 | + case REACT_FRAGMENT_TYPE: | |
| 1094 | + case REACT_PROFILER_TYPE: | |
| 1095 | + case REACT_STRICT_MODE_TYPE: | |
| 1096 | + case REACT_SUSPENSE_TYPE: return type; | |
| 1097 | + default: | |
| 1098 | + var $$typeofType = type && type.$$typeof; | |
| 1099 | + switch ($$typeofType) { | |
| 1100 | + case REACT_CONTEXT_TYPE: | |
| 1101 | + case REACT_FORWARD_REF_TYPE: | |
| 1102 | + case REACT_LAZY_TYPE: | |
| 1103 | + case REACT_MEMO_TYPE: | |
| 1104 | + case REACT_PROVIDER_TYPE: return $$typeofType; | |
| 1105 | + default: return $$typeof; | |
| 1106 | + } | |
| 1107 | + } | |
| 1108 | + case REACT_PORTAL_TYPE: return $$typeof; | |
| 1109 | + } | |
| 1110 | + } | |
| 1111 | + } | |
| 1112 | + var AsyncMode = REACT_ASYNC_MODE_TYPE; | |
| 1113 | + var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; | |
| 1114 | + var ContextConsumer = REACT_CONTEXT_TYPE; | |
| 1115 | + var ContextProvider = REACT_PROVIDER_TYPE; | |
| 1116 | + var Element = REACT_ELEMENT_TYPE; | |
| 1117 | + var ForwardRef = REACT_FORWARD_REF_TYPE; | |
| 1118 | + var Fragment = REACT_FRAGMENT_TYPE; | |
| 1119 | + var Lazy = REACT_LAZY_TYPE; | |
| 1120 | + var Memo = REACT_MEMO_TYPE; | |
| 1121 | + var Portal = REACT_PORTAL_TYPE; | |
| 1122 | + var Profiler = REACT_PROFILER_TYPE; | |
| 1123 | + var StrictMode = REACT_STRICT_MODE_TYPE; | |
| 1124 | + var Suspense = REACT_SUSPENSE_TYPE; | |
| 1125 | + var hasWarnedAboutDeprecatedIsAsyncMode = false; | |
| 1126 | + function isAsyncMode(object) { | |
| 1127 | + if (!hasWarnedAboutDeprecatedIsAsyncMode) { | |
| 1128 | + hasWarnedAboutDeprecatedIsAsyncMode = true; | |
| 1129 | + 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."); | |
| 1130 | + } | |
| 1131 | + return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; | |
| 1132 | + } | |
| 1133 | + function isConcurrentMode(object) { | |
| 1134 | + return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; | |
| 1135 | + } | |
| 1136 | + function isContextConsumer(object) { | |
| 1137 | + return typeOf(object) === REACT_CONTEXT_TYPE; | |
| 1138 | + } | |
| 1139 | + function isContextProvider(object) { | |
| 1140 | + return typeOf(object) === REACT_PROVIDER_TYPE; | |
| 1141 | + } | |
| 1142 | + function isElement(object) { | |
| 1143 | + return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | |
| 1144 | + } | |
| 1145 | + function isForwardRef(object) { | |
| 1146 | + return typeOf(object) === REACT_FORWARD_REF_TYPE; | |
| 1147 | + } | |
| 1148 | + function isFragment(object) { | |
| 1149 | + return typeOf(object) === REACT_FRAGMENT_TYPE; | |
| 1150 | + } | |
| 1151 | + function isLazy(object) { | |
| 1152 | + return typeOf(object) === REACT_LAZY_TYPE; | |
| 1153 | + } | |
| 1154 | + function isMemo(object) { | |
| 1155 | + return typeOf(object) === REACT_MEMO_TYPE; | |
| 1156 | + } | |
| 1157 | + function isPortal(object) { | |
| 1158 | + return typeOf(object) === REACT_PORTAL_TYPE; | |
| 1159 | + } | |
| 1160 | + function isProfiler(object) { | |
| 1161 | + return typeOf(object) === REACT_PROFILER_TYPE; | |
| 1162 | + } | |
| 1163 | + function isStrictMode(object) { | |
| 1164 | + return typeOf(object) === REACT_STRICT_MODE_TYPE; | |
| 1165 | + } | |
| 1166 | + function isSuspense(object) { | |
| 1167 | + return typeOf(object) === REACT_SUSPENSE_TYPE; | |
| 1168 | + } | |
| 1169 | + exports.AsyncMode = AsyncMode; | |
| 1170 | + exports.ConcurrentMode = ConcurrentMode; | |
| 1171 | + exports.ContextConsumer = ContextConsumer; | |
| 1172 | + exports.ContextProvider = ContextProvider; | |
| 1173 | + exports.Element = Element; | |
| 1174 | + exports.ForwardRef = ForwardRef; | |
| 1175 | + exports.Fragment = Fragment; | |
| 1176 | + exports.Lazy = Lazy; | |
| 1177 | + exports.Memo = Memo; | |
| 1178 | + exports.Portal = Portal; | |
| 1179 | + exports.Profiler = Profiler; | |
| 1180 | + exports.StrictMode = StrictMode; | |
| 1181 | + exports.Suspense = Suspense; | |
| 1182 | + exports.isAsyncMode = isAsyncMode; | |
| 1183 | + exports.isConcurrentMode = isConcurrentMode; | |
| 1184 | + exports.isContextConsumer = isContextConsumer; | |
| 1185 | + exports.isContextProvider = isContextProvider; | |
| 1186 | + exports.isElement = isElement; | |
| 1187 | + exports.isForwardRef = isForwardRef; | |
| 1188 | + exports.isFragment = isFragment; | |
| 1189 | + exports.isLazy = isLazy; | |
| 1190 | + exports.isMemo = isMemo; | |
| 1191 | + exports.isPortal = isPortal; | |
| 1192 | + exports.isProfiler = isProfiler; | |
| 1193 | + exports.isStrictMode = isStrictMode; | |
| 1194 | + exports.isSuspense = isSuspense; | |
| 1195 | + exports.isValidElementType = isValidElementType; | |
| 1196 | + exports.typeOf = typeOf; | |
| 1197 | + })(); | |
| 1198 | + })); | |
| 4437 | 1199 | |
| 4438 | -if (true) { | |
| 4439 | - var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); | |
| 4440 | - var loggedTypeFailures = {}; | |
| 4441 | - var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); | |
| 1200 | +//#endregion | |
| 1201 | +//#region node_modules/prop-types/node_modules/react-is/index.js | |
| 1202 | + var require_react_is = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1203 | + module.exports = require_react_is_development(); | |
| 1204 | + })); | |
| 4442 | 1205 | |
| 4443 | - printWarning = function(text) { | |
| 4444 | - var message = 'Warning: ' + text; | |
| 4445 | - if (typeof console !== 'undefined') { | |
| 4446 | - console.error(message); | |
| 4447 | - } | |
| 4448 | - try { | |
| 4449 | - // --- Welcome to debugging React --- | |
| 4450 | - // This error was thrown as a convenience so that you can use this stack | |
| 4451 | - // to find the callsite that caused this warning to fire. | |
| 4452 | - throw new Error(message); | |
| 4453 | - } catch (x) { /**/ } | |
| 4454 | - }; | |
| 4455 | -} | |
| 1206 | +//#endregion | |
| 1207 | +//#region node_modules/object-assign/index.js | |
| 1208 | +/* | |
| 1209 | + object-assign | |
| 1210 | + (c) Sindre Sorhus | |
| 1211 | + @license MIT | |
| 1212 | + */ | |
| 1213 | + var require_object_assign = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1214 | + var getOwnPropertySymbols = Object.getOwnPropertySymbols; | |
| 1215 | + var hasOwnProperty = Object.prototype.hasOwnProperty; | |
| 1216 | + var propIsEnumerable = Object.prototype.propertyIsEnumerable; | |
| 1217 | + function toObject(val) { | |
| 1218 | + if (val === null || val === void 0) throw new TypeError("Object.assign cannot be called with null or undefined"); | |
| 1219 | + return Object(val); | |
| 1220 | + } | |
| 1221 | + function shouldUseNative() { | |
| 1222 | + try { | |
| 1223 | + if (!Object.assign) return false; | |
| 1224 | + var test1 = /* @__PURE__ */ new String("abc"); | |
| 1225 | + test1[5] = "de"; | |
| 1226 | + if (Object.getOwnPropertyNames(test1)[0] === "5") return false; | |
| 1227 | + var test2 = {}; | |
| 1228 | + for (var i = 0; i < 10; i++) test2["_" + String.fromCharCode(i)] = i; | |
| 1229 | + if (Object.getOwnPropertyNames(test2).map(function(n) { | |
| 1230 | + return test2[n]; | |
| 1231 | + }).join("") !== "0123456789") return false; | |
| 1232 | + var test3 = {}; | |
| 1233 | + "abcdefghijklmnopqrst".split("").forEach(function(letter) { | |
| 1234 | + test3[letter] = letter; | |
| 1235 | + }); | |
| 1236 | + if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") return false; | |
| 1237 | + return true; | |
| 1238 | + } catch (err) { | |
| 1239 | + return false; | |
| 1240 | + } | |
| 1241 | + } | |
| 1242 | + module.exports = shouldUseNative() ? Object.assign : function(target, source) { | |
| 1243 | + var from; | |
| 1244 | + var to = toObject(target); | |
| 1245 | + var symbols; | |
| 1246 | + for (var s = 1; s < arguments.length; s++) { | |
| 1247 | + from = Object(arguments[s]); | |
| 1248 | + for (var key in from) if (hasOwnProperty.call(from, key)) to[key] = from[key]; | |
| 1249 | + if (getOwnPropertySymbols) { | |
| 1250 | + symbols = getOwnPropertySymbols(from); | |
| 1251 | + for (var i = 0; i < symbols.length; i++) if (propIsEnumerable.call(from, symbols[i])) to[symbols[i]] = from[symbols[i]]; | |
| 1252 | + } | |
| 1253 | + } | |
| 1254 | + return to; | |
| 1255 | + }; | |
| 1256 | + })); | |
| 4456 | 1257 | |
| 1258 | +//#endregion | |
| 1259 | +//#region node_modules/prop-types/lib/ReactPropTypesSecret.js | |
| 4457 | 1260 | /** |
| 4458 | - * Assert that the values match with the type specs. | |
| 4459 | - * Error messages are memorized and will only be shown once. | |
| 4460 | - * | |
| 4461 | - * @param {object} typeSpecs Map of name to a ReactPropType | |
| 4462 | - * @param {object} values Runtime values that need to be type-checked | |
| 4463 | - * @param {string} location e.g. "prop", "context", "child context" | |
| 4464 | - * @param {string} componentName Name of the component for error messages. | |
| 4465 | - * @param {?Function} getStack Returns the component stack. | |
| 4466 | - * @private | |
| 4467 | - */ | |
| 4468 | -function checkPropTypes(typeSpecs, values, location, componentName, getStack) { | |
| 4469 | - if (true) { | |
| 4470 | - for (var typeSpecName in typeSpecs) { | |
| 4471 | - if (has(typeSpecs, typeSpecName)) { | |
| 4472 | - var error; | |
| 4473 | - // Prop type validation may throw. In case they do, we don't want to | |
| 4474 | - // fail the render phase where it didn't fail before. So we log it. | |
| 4475 | - // After these have been cleaned up, we'll let them throw. | |
| 4476 | - try { | |
| 4477 | - // This is intentionally an invariant that gets caught. It's the same | |
| 4478 | - // behavior as without this statement except with a better message. | |
| 4479 | - if (typeof typeSpecs[typeSpecName] !== 'function') { | |
| 4480 | - var err = Error( | |
| 4481 | - (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + | |
| 4482 | - 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + | |
| 4483 | - 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.' | |
| 4484 | - ); | |
| 4485 | - err.name = 'Invariant Violation'; | |
| 4486 | - throw err; | |
| 4487 | - } | |
| 4488 | - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); | |
| 4489 | - } catch (ex) { | |
| 4490 | - error = ex; | |
| 4491 | - } | |
| 4492 | - if (error && !(error instanceof Error)) { | |
| 4493 | - printWarning( | |
| 4494 | - (componentName || 'React class') + ': type specification of ' + | |
| 4495 | - location + ' `' + typeSpecName + '` is invalid; the type checker ' + | |
| 4496 | - 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + | |
| 4497 | - 'You may have forgotten to pass an argument to the type checker ' + | |
| 4498 | - 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + | |
| 4499 | - 'shape all require an argument).' | |
| 4500 | - ); | |
| 4501 | - } | |
| 4502 | - if (error instanceof Error && !(error.message in loggedTypeFailures)) { | |
| 4503 | - // Only monitor this failure once because there tends to be a lot of the | |
| 4504 | - // same error. | |
| 4505 | - loggedTypeFailures[error.message] = true; | |
| 1261 | + * Copyright (c) 2013-present, Facebook, Inc. | |
| 1262 | + * | |
| 1263 | + * This source code is licensed under the MIT license found in the | |
| 1264 | + * LICENSE file in the root directory of this source tree. | |
| 1265 | + */ | |
| 1266 | + var require_ReactPropTypesSecret = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1267 | + var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; | |
| 1268 | + module.exports = ReactPropTypesSecret; | |
| 1269 | + })); | |
| 4506 | 1270 | |
| 4507 | - var stack = getStack ? getStack() : ''; | |
| 1271 | +//#endregion | |
| 1272 | +//#region node_modules/prop-types/lib/has.js | |
| 1273 | + var require_has = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1274 | + module.exports = Function.call.bind(Object.prototype.hasOwnProperty); | |
| 1275 | + })); | |
| 4508 | 1276 | |
| 4509 | - printWarning( | |
| 4510 | - 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') | |
| 4511 | - ); | |
| 4512 | - } | |
| 4513 | - } | |
| 4514 | - } | |
| 4515 | - } | |
| 4516 | -} | |
| 4517 | - | |
| 1277 | +//#endregion | |
| 1278 | +//#region node_modules/prop-types/checkPropTypes.js | |
| 4518 | 1279 | /** |
| 4519 | - * Resets warning cache when testing. | |
| 4520 | - * | |
| 4521 | - * @private | |
| 4522 | - */ | |
| 4523 | -checkPropTypes.resetWarningCache = function() { | |
| 4524 | - if (true) { | |
| 4525 | - loggedTypeFailures = {}; | |
| 4526 | - } | |
| 4527 | -} | |
| 1280 | + * Copyright (c) 2013-present, Facebook, Inc. | |
| 1281 | + * | |
| 1282 | + * This source code is licensed under the MIT license found in the | |
| 1283 | + * LICENSE file in the root directory of this source tree. | |
| 1284 | + */ | |
| 1285 | + var require_checkPropTypes = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1286 | + var printWarning = function() {}; | |
| 1287 | + var ReactPropTypesSecret = require_ReactPropTypesSecret(); | |
| 1288 | + var loggedTypeFailures = {}; | |
| 1289 | + var has = require_has(); | |
| 1290 | + printWarning = function(text) { | |
| 1291 | + var message = "Warning: " + text; | |
| 1292 | + if (typeof console !== "undefined") console.error(message); | |
| 1293 | + try { | |
| 1294 | + throw new Error(message); | |
| 1295 | + } catch (x) {} | |
| 1296 | + }; | |
| 1297 | + /** | |
| 1298 | + * Assert that the values match with the type specs. | |
| 1299 | + * Error messages are memorized and will only be shown once. | |
| 1300 | + * | |
| 1301 | + * @param {object} typeSpecs Map of name to a ReactPropType | |
| 1302 | + * @param {object} values Runtime values that need to be type-checked | |
| 1303 | + * @param {string} location e.g. "prop", "context", "child context" | |
| 1304 | + * @param {string} componentName Name of the component for error messages. | |
| 1305 | + * @param {?Function} getStack Returns the component stack. | |
| 1306 | + * @private | |
| 1307 | + */ | |
| 1308 | + function checkPropTypes(typeSpecs, values, location, componentName, getStack) { | |
| 1309 | + for (var typeSpecName in typeSpecs) if (has(typeSpecs, typeSpecName)) { | |
| 1310 | + var error; | |
| 1311 | + try { | |
| 1312 | + if (typeof typeSpecs[typeSpecName] !== "function") { | |
| 1313 | + var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | |
| 1314 | + err.name = "Invariant Violation"; | |
| 1315 | + throw err; | |
| 1316 | + } | |
| 1317 | + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); | |
| 1318 | + } catch (ex) { | |
| 1319 | + error = ex; | |
| 1320 | + } | |
| 1321 | + if (error && !(error instanceof Error)) printWarning((componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."); | |
| 1322 | + if (error instanceof Error && !(error.message in loggedTypeFailures)) { | |
| 1323 | + loggedTypeFailures[error.message] = true; | |
| 1324 | + var stack = getStack ? getStack() : ""; | |
| 1325 | + printWarning("Failed " + location + " type: " + error.message + (stack != null ? stack : "")); | |
| 1326 | + } | |
| 1327 | + } | |
| 1328 | + } | |
| 1329 | + /** | |
| 1330 | + * Resets warning cache when testing. | |
| 1331 | + * | |
| 1332 | + * @private | |
| 1333 | + */ | |
| 1334 | + checkPropTypes.resetWarningCache = function() { | |
| 1335 | + loggedTypeFailures = {}; | |
| 1336 | + }; | |
| 1337 | + module.exports = checkPropTypes; | |
| 1338 | + })); | |
| 4528 | 1339 | |
| 4529 | -module.exports = checkPropTypes; | |
| 4530 | - | |
| 4531 | - | |
| 4532 | -/***/ }), | |
| 4533 | - | |
| 4534 | -/***/ "../node_modules/prop-types/factoryWithTypeCheckers.js": | |
| 4535 | -/*!*************************************************************!*\ | |
| 4536 | - !*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***! | |
| 4537 | - \*************************************************************/ | |
| 4538 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4539 | - | |
| 4540 | -"use strict"; | |
| 1340 | +//#endregion | |
| 1341 | +//#region node_modules/prop-types/factoryWithTypeCheckers.js | |
| 4541 | 1342 | /** |
| 4542 | - * Copyright (c) 2013-present, Facebook, Inc. | |
| 4543 | - * | |
| 4544 | - * This source code is licensed under the MIT license found in the | |
| 4545 | - * LICENSE file in the root directory of this source tree. | |
| 4546 | - */ | |
| 1343 | + * Copyright (c) 2013-present, Facebook, Inc. | |
| 1344 | + * | |
| 1345 | + * This source code is licensed under the MIT license found in the | |
| 1346 | + * LICENSE file in the root directory of this source tree. | |
| 1347 | + */ | |
| 1348 | + var require_factoryWithTypeCheckers = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1349 | + var ReactIs = require_react_is(); | |
| 1350 | + var assign = require_object_assign(); | |
| 1351 | + var ReactPropTypesSecret = require_ReactPropTypesSecret(); | |
| 1352 | + var has = require_has(); | |
| 1353 | + var checkPropTypes = require_checkPropTypes(); | |
| 1354 | + var printWarning = function() {}; | |
| 1355 | + printWarning = function(text) { | |
| 1356 | + var message = "Warning: " + text; | |
| 1357 | + if (typeof console !== "undefined") console.error(message); | |
| 1358 | + try { | |
| 1359 | + throw new Error(message); | |
| 1360 | + } catch (x) {} | |
| 1361 | + }; | |
| 1362 | + function emptyFunctionThatReturnsNull() { | |
| 1363 | + return null; | |
| 1364 | + } | |
| 1365 | + module.exports = function(isValidElement, throwOnDirectAccess) { | |
| 1366 | + var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator; | |
| 1367 | + var FAUX_ITERATOR_SYMBOL = "@@iterator"; | |
| 1368 | + /** | |
| 1369 | + * Returns the iterator method function contained on the iterable object. | |
| 1370 | + * | |
| 1371 | + * Be sure to invoke the function with the iterable as context: | |
| 1372 | + * | |
| 1373 | + * var iteratorFn = getIteratorFn(myIterable); | |
| 1374 | + * if (iteratorFn) { | |
| 1375 | + * var iterator = iteratorFn.call(myIterable); | |
| 1376 | + * ... | |
| 1377 | + * } | |
| 1378 | + * | |
| 1379 | + * @param {?object} maybeIterable | |
| 1380 | + * @return {?function} | |
| 1381 | + */ | |
| 1382 | + function getIteratorFn(maybeIterable) { | |
| 1383 | + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); | |
| 1384 | + if (typeof iteratorFn === "function") return iteratorFn; | |
| 1385 | + } | |
| 1386 | + /** | |
| 1387 | + * Collection of methods that allow declaration and validation of props that are | |
| 1388 | + * supplied to React components. Example usage: | |
| 1389 | + * | |
| 1390 | + * var Props = require('ReactPropTypes'); | |
| 1391 | + * var MyArticle = React.createClass({ | |
| 1392 | + * propTypes: { | |
| 1393 | + * // An optional string prop named "description". | |
| 1394 | + * description: Props.string, | |
| 1395 | + * | |
| 1396 | + * // A required enum prop named "category". | |
| 1397 | + * category: Props.oneOf(['News','Photos']).isRequired, | |
| 1398 | + * | |
| 1399 | + * // A prop named "dialog" that requires an instance of Dialog. | |
| 1400 | + * dialog: Props.instanceOf(Dialog).isRequired | |
| 1401 | + * }, | |
| 1402 | + * render: function() { ... } | |
| 1403 | + * }); | |
| 1404 | + * | |
| 1405 | + * A more formal specification of how these methods are used: | |
| 1406 | + * | |
| 1407 | + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) | |
| 1408 | + * decl := ReactPropTypes.{type}(.isRequired)? | |
| 1409 | + * | |
| 1410 | + * Each and every declaration produces a function with the same signature. This | |
| 1411 | + * allows the creation of custom validation functions. For example: | |
| 1412 | + * | |
| 1413 | + * var MyLink = React.createClass({ | |
| 1414 | + * propTypes: { | |
| 1415 | + * // An optional string or URI prop named "href". | |
| 1416 | + * href: function(props, propName, componentName) { | |
| 1417 | + * var propValue = props[propName]; | |
| 1418 | + * if (propValue != null && typeof propValue !== 'string' && | |
| 1419 | + * !(propValue instanceof URI)) { | |
| 1420 | + * return new Error( | |
| 1421 | + * 'Expected a string or an URI for ' + propName + ' in ' + | |
| 1422 | + * componentName | |
| 1423 | + * ); | |
| 1424 | + * } | |
| 1425 | + * } | |
| 1426 | + * }, | |
| 1427 | + * render: function() {...} | |
| 1428 | + * }); | |
| 1429 | + * | |
| 1430 | + * @internal | |
| 1431 | + */ | |
| 1432 | + var ANONYMOUS = "<<anonymous>>"; | |
| 1433 | + var ReactPropTypes = { | |
| 1434 | + array: createPrimitiveTypeChecker("array"), | |
| 1435 | + bigint: createPrimitiveTypeChecker("bigint"), | |
| 1436 | + bool: createPrimitiveTypeChecker("boolean"), | |
| 1437 | + func: createPrimitiveTypeChecker("function"), | |
| 1438 | + number: createPrimitiveTypeChecker("number"), | |
| 1439 | + object: createPrimitiveTypeChecker("object"), | |
| 1440 | + string: createPrimitiveTypeChecker("string"), | |
| 1441 | + symbol: createPrimitiveTypeChecker("symbol"), | |
| 1442 | + any: createAnyTypeChecker(), | |
| 1443 | + arrayOf: createArrayOfTypeChecker, | |
| 1444 | + element: createElementTypeChecker(), | |
| 1445 | + elementType: createElementTypeTypeChecker(), | |
| 1446 | + instanceOf: createInstanceTypeChecker, | |
| 1447 | + node: createNodeChecker(), | |
| 1448 | + objectOf: createObjectOfTypeChecker, | |
| 1449 | + oneOf: createEnumTypeChecker, | |
| 1450 | + oneOfType: createUnionTypeChecker, | |
| 1451 | + shape: createShapeTypeChecker, | |
| 1452 | + exact: createStrictShapeTypeChecker | |
| 1453 | + }; | |
| 1454 | + /** | |
| 1455 | + * inlined Object.is polyfill to avoid requiring consumers ship their own | |
| 1456 | + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is | |
| 1457 | + */ | |
| 1458 | + function is(x, y) { | |
| 1459 | + if (x === y) return x !== 0 || 1 / x === 1 / y; | |
| 1460 | + else return x !== x && y !== y; | |
| 1461 | + } | |
| 1462 | + /** | |
| 1463 | + * We use an Error-like object for backward compatibility as people may call | |
| 1464 | + * PropTypes directly and inspect their output. However, we don't use real | |
| 1465 | + * Errors anymore. We don't inspect their stack anyway, and creating them | |
| 1466 | + * is prohibitively expensive if they are created too often, such as what | |
| 1467 | + * happens in oneOfType() for any type before the one that matched. | |
| 1468 | + */ | |
| 1469 | + function PropTypeError(message, data) { | |
| 1470 | + this.message = message; | |
| 1471 | + this.data = data && typeof data === "object" ? data : {}; | |
| 1472 | + this.stack = ""; | |
| 1473 | + } | |
| 1474 | + PropTypeError.prototype = Error.prototype; | |
| 1475 | + function createChainableTypeChecker(validate) { | |
| 1476 | + var manualPropTypeCallCache = {}; | |
| 1477 | + var manualPropTypeWarningCount = 0; | |
| 1478 | + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { | |
| 1479 | + componentName = componentName || ANONYMOUS; | |
| 1480 | + propFullName = propFullName || propName; | |
| 1481 | + if (secret !== ReactPropTypesSecret) { | |
| 1482 | + if (throwOnDirectAccess) { | |
| 1483 | + var err = /* @__PURE__ */ new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"); | |
| 1484 | + err.name = "Invariant Violation"; | |
| 1485 | + throw err; | |
| 1486 | + } else if (typeof console !== "undefined") { | |
| 1487 | + var cacheKey = componentName + ":" + propName; | |
| 1488 | + if (!manualPropTypeCallCache[cacheKey] && manualPropTypeWarningCount < 3) { | |
| 1489 | + printWarning("You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."); | |
| 1490 | + manualPropTypeCallCache[cacheKey] = true; | |
| 1491 | + manualPropTypeWarningCount++; | |
| 1492 | + } | |
| 1493 | + } | |
| 1494 | + } | |
| 1495 | + if (props[propName] == null) { | |
| 1496 | + if (isRequired) { | |
| 1497 | + if (props[propName] === null) return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`.")); | |
| 1498 | + return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`.")); | |
| 1499 | + } | |
| 1500 | + return null; | |
| 1501 | + } else return validate(props, propName, componentName, location, propFullName); | |
| 1502 | + } | |
| 1503 | + var chainedCheckType = checkType.bind(null, false); | |
| 1504 | + chainedCheckType.isRequired = checkType.bind(null, true); | |
| 1505 | + return chainedCheckType; | |
| 1506 | + } | |
| 1507 | + function createPrimitiveTypeChecker(expectedType) { | |
| 1508 | + function validate(props, propName, componentName, location, propFullName, secret) { | |
| 1509 | + var propValue = props[propName]; | |
| 1510 | + if (getPropType(propValue) !== expectedType) { | |
| 1511 | + var preciseType = getPreciseType(propValue); | |
| 1512 | + return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."), { expectedType }); | |
| 1513 | + } | |
| 1514 | + return null; | |
| 1515 | + } | |
| 1516 | + return createChainableTypeChecker(validate); | |
| 1517 | + } | |
| 1518 | + function createAnyTypeChecker() { | |
| 1519 | + return createChainableTypeChecker(emptyFunctionThatReturnsNull); | |
| 1520 | + } | |
| 1521 | + function createArrayOfTypeChecker(typeChecker) { | |
| 1522 | + function validate(props, propName, componentName, location, propFullName) { | |
| 1523 | + if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf."); | |
| 1524 | + var propValue = props[propName]; | |
| 1525 | + if (!Array.isArray(propValue)) { | |
| 1526 | + var propType = getPropType(propValue); | |
| 1527 | + return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array.")); | |
| 1528 | + } | |
| 1529 | + for (var i = 0; i < propValue.length; i++) { | |
| 1530 | + var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret); | |
| 1531 | + if (error instanceof Error) return error; | |
| 1532 | + } | |
| 1533 | + return null; | |
| 1534 | + } | |
| 1535 | + return createChainableTypeChecker(validate); | |
| 1536 | + } | |
| 1537 | + function createElementTypeChecker() { | |
| 1538 | + function validate(props, propName, componentName, location, propFullName) { | |
| 1539 | + var propValue = props[propName]; | |
| 1540 | + if (!isValidElement(propValue)) { | |
| 1541 | + var propType = getPropType(propValue); | |
| 1542 | + return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement.")); | |
| 1543 | + } | |
| 1544 | + return null; | |
| 1545 | + } | |
| 1546 | + return createChainableTypeChecker(validate); | |
| 1547 | + } | |
| 1548 | + function createElementTypeTypeChecker() { | |
| 1549 | + function validate(props, propName, componentName, location, propFullName) { | |
| 1550 | + var propValue = props[propName]; | |
| 1551 | + if (!ReactIs.isValidElementType(propValue)) { | |
| 1552 | + var propType = getPropType(propValue); | |
| 1553 | + return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type.")); | |
| 1554 | + } | |
| 1555 | + return null; | |
| 1556 | + } | |
| 1557 | + return createChainableTypeChecker(validate); | |
| 1558 | + } | |
| 1559 | + function createInstanceTypeChecker(expectedClass) { | |
| 1560 | + function validate(props, propName, componentName, location, propFullName) { | |
| 1561 | + if (!(props[propName] instanceof expectedClass)) { | |
| 1562 | + var expectedClassName = expectedClass.name || ANONYMOUS; | |
| 1563 | + var actualClassName = getClassName(props[propName]); | |
| 1564 | + return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`.")); | |
| 1565 | + } | |
| 1566 | + return null; | |
| 1567 | + } | |
| 1568 | + return createChainableTypeChecker(validate); | |
| 1569 | + } | |
| 1570 | + function createEnumTypeChecker(expectedValues) { | |
| 1571 | + if (!Array.isArray(expectedValues)) { | |
| 1572 | + if (arguments.length > 1) printWarning("Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."); | |
| 1573 | + else printWarning("Invalid argument supplied to oneOf, expected an array."); | |
| 1574 | + return emptyFunctionThatReturnsNull; | |
| 1575 | + } | |
| 1576 | + function validate(props, propName, componentName, location, propFullName) { | |
| 1577 | + var propValue = props[propName]; | |
| 1578 | + for (var i = 0; i < expectedValues.length; i++) if (is(propValue, expectedValues[i])) return null; | |
| 1579 | + var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { | |
| 1580 | + if (getPreciseType(value) === "symbol") return String(value); | |
| 1581 | + return value; | |
| 1582 | + }); | |
| 1583 | + return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + ".")); | |
| 1584 | + } | |
| 1585 | + return createChainableTypeChecker(validate); | |
| 1586 | + } | |
| 1587 | + function createObjectOfTypeChecker(typeChecker) { | |
| 1588 | + function validate(props, propName, componentName, location, propFullName) { | |
| 1589 | + if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf."); | |
| 1590 | + var propValue = props[propName]; | |
| 1591 | + var propType = getPropType(propValue); | |
| 1592 | + if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object.")); | |
| 1593 | + for (var key in propValue) if (has(propValue, key)) { | |
| 1594 | + var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); | |
| 1595 | + if (error instanceof Error) return error; | |
| 1596 | + } | |
| 1597 | + return null; | |
| 1598 | + } | |
| 1599 | + return createChainableTypeChecker(validate); | |
| 1600 | + } | |
| 1601 | + function createUnionTypeChecker(arrayOfTypeCheckers) { | |
| 1602 | + if (!Array.isArray(arrayOfTypeCheckers)) { | |
| 1603 | + printWarning("Invalid argument supplied to oneOfType, expected an instance of array."); | |
| 1604 | + return emptyFunctionThatReturnsNull; | |
| 1605 | + } | |
| 1606 | + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { | |
| 1607 | + var checker = arrayOfTypeCheckers[i]; | |
| 1608 | + if (typeof checker !== "function") { | |
| 1609 | + printWarning("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."); | |
| 1610 | + return emptyFunctionThatReturnsNull; | |
| 1611 | + } | |
| 1612 | + } | |
| 1613 | + function validate(props, propName, componentName, location, propFullName) { | |
| 1614 | + var expectedTypes = []; | |
| 1615 | + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { | |
| 1616 | + var checker = arrayOfTypeCheckers[i]; | |
| 1617 | + var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret); | |
| 1618 | + if (checkerResult == null) return null; | |
| 1619 | + if (checkerResult.data && has(checkerResult.data, "expectedType")) expectedTypes.push(checkerResult.data.expectedType); | |
| 1620 | + } | |
| 1621 | + var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : ""; | |
| 1622 | + return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + ".")); | |
| 1623 | + } | |
| 1624 | + return createChainableTypeChecker(validate); | |
| 1625 | + } | |
| 1626 | + function createNodeChecker() { | |
| 1627 | + function validate(props, propName, componentName, location, propFullName) { | |
| 1628 | + if (!isNode(props[propName])) return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode.")); | |
| 1629 | + return null; | |
| 1630 | + } | |
| 1631 | + return createChainableTypeChecker(validate); | |
| 1632 | + } | |
| 1633 | + function invalidValidatorError(componentName, location, propFullName, key, type) { | |
| 1634 | + return new PropTypeError((componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."); | |
| 1635 | + } | |
| 1636 | + function createShapeTypeChecker(shapeTypes) { | |
| 1637 | + function validate(props, propName, componentName, location, propFullName) { | |
| 1638 | + var propValue = props[propName]; | |
| 1639 | + var propType = getPropType(propValue); | |
| 1640 | + if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`.")); | |
| 1641 | + for (var key in shapeTypes) { | |
| 1642 | + var checker = shapeTypes[key]; | |
| 1643 | + if (typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | |
| 1644 | + var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); | |
| 1645 | + if (error) return error; | |
| 1646 | + } | |
| 1647 | + return null; | |
| 1648 | + } | |
| 1649 | + return createChainableTypeChecker(validate); | |
| 1650 | + } | |
| 1651 | + function createStrictShapeTypeChecker(shapeTypes) { | |
| 1652 | + function validate(props, propName, componentName, location, propFullName) { | |
| 1653 | + var propValue = props[propName]; | |
| 1654 | + var propType = getPropType(propValue); | |
| 1655 | + if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`.")); | |
| 1656 | + for (var key in assign({}, props[propName], shapeTypes)) { | |
| 1657 | + var checker = shapeTypes[key]; | |
| 1658 | + if (has(shapeTypes, key) && typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | |
| 1659 | + if (!checker) return new PropTypeError("Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")); | |
| 1660 | + var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); | |
| 1661 | + if (error) return error; | |
| 1662 | + } | |
| 1663 | + return null; | |
| 1664 | + } | |
| 1665 | + return createChainableTypeChecker(validate); | |
| 1666 | + } | |
| 1667 | + function isNode(propValue) { | |
| 1668 | + switch (typeof propValue) { | |
| 1669 | + case "number": | |
| 1670 | + case "string": | |
| 1671 | + case "undefined": return true; | |
| 1672 | + case "boolean": return !propValue; | |
| 1673 | + case "object": | |
| 1674 | + if (Array.isArray(propValue)) return propValue.every(isNode); | |
| 1675 | + if (propValue === null || isValidElement(propValue)) return true; | |
| 1676 | + var iteratorFn = getIteratorFn(propValue); | |
| 1677 | + if (iteratorFn) { | |
| 1678 | + var iterator = iteratorFn.call(propValue); | |
| 1679 | + var step; | |
| 1680 | + if (iteratorFn !== propValue.entries) { | |
| 1681 | + while (!(step = iterator.next()).done) if (!isNode(step.value)) return false; | |
| 1682 | + } else while (!(step = iterator.next()).done) { | |
| 1683 | + var entry = step.value; | |
| 1684 | + if (entry) { | |
| 1685 | + if (!isNode(entry[1])) return false; | |
| 1686 | + } | |
| 1687 | + } | |
| 1688 | + } else return false; | |
| 1689 | + return true; | |
| 1690 | + default: return false; | |
| 1691 | + } | |
| 1692 | + } | |
| 1693 | + function isSymbol(propType, propValue) { | |
| 1694 | + if (propType === "symbol") return true; | |
| 1695 | + if (!propValue) return false; | |
| 1696 | + if (propValue["@@toStringTag"] === "Symbol") return true; | |
| 1697 | + if (typeof Symbol === "function" && propValue instanceof Symbol) return true; | |
| 1698 | + return false; | |
| 1699 | + } | |
| 1700 | + function getPropType(propValue) { | |
| 1701 | + var propType = typeof propValue; | |
| 1702 | + if (Array.isArray(propValue)) return "array"; | |
| 1703 | + if (propValue instanceof RegExp) return "object"; | |
| 1704 | + if (isSymbol(propType, propValue)) return "symbol"; | |
| 1705 | + return propType; | |
| 1706 | + } | |
| 1707 | + function getPreciseType(propValue) { | |
| 1708 | + if (typeof propValue === "undefined" || propValue === null) return "" + propValue; | |
| 1709 | + var propType = getPropType(propValue); | |
| 1710 | + if (propType === "object") { | |
| 1711 | + if (propValue instanceof Date) return "date"; | |
| 1712 | + else if (propValue instanceof RegExp) return "regexp"; | |
| 1713 | + } | |
| 1714 | + return propType; | |
| 1715 | + } | |
| 1716 | + function getPostfixForTypeWarning(value) { | |
| 1717 | + var type = getPreciseType(value); | |
| 1718 | + switch (type) { | |
| 1719 | + case "array": | |
| 1720 | + case "object": return "an " + type; | |
| 1721 | + case "boolean": | |
| 1722 | + case "date": | |
| 1723 | + case "regexp": return "a " + type; | |
| 1724 | + default: return type; | |
| 1725 | + } | |
| 1726 | + } | |
| 1727 | + function getClassName(propValue) { | |
| 1728 | + if (!propValue.constructor || !propValue.constructor.name) return ANONYMOUS; | |
| 1729 | + return propValue.constructor.name; | |
| 1730 | + } | |
| 1731 | + ReactPropTypes.checkPropTypes = checkPropTypes; | |
| 1732 | + ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; | |
| 1733 | + ReactPropTypes.PropTypes = ReactPropTypes; | |
| 1734 | + return ReactPropTypes; | |
| 1735 | + }; | |
| 1736 | + })); | |
| 4547 | 1737 | |
| 1738 | +//#endregion | |
| 1739 | +//#region node_modules/prop-types/index.js | |
| 1740 | + var require_prop_types = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1741 | + var ReactIs = require_react_is(); | |
| 1742 | + var throwOnDirectAccess = true; | |
| 1743 | + module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess); | |
| 1744 | + })); | |
| 4548 | 1745 | |
| 1746 | +//#endregion | |
| 1747 | +//#region modules/element-manager/assets/js/app-editor-one/components/UsageTimesColumn.js | |
| 1748 | + var import_prop_types = /* @__PURE__ */ __toESM(require_prop_types()); | |
| 1749 | + var UsageTimesColumn = function UsageTimesColumn(_ref) { | |
| 1750 | + var widgetName = _ref.widgetName; | |
| 1751 | + var usageData = _ref.usageData; | |
| 1752 | + var isLoading = _ref.isLoading; | |
| 1753 | + var getWidgetUsage = _ref.getWidgetUsage; | |
| 1754 | + var onScanClick = _ref.onScanClick; | |
| 1755 | + if (null !== usageData) return /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, getWidgetUsage(widgetName), " ", (0, _wordpress_i18n.__)("times", "elementor")); | |
| 1756 | + if (isLoading) return /*#__PURE__*/ react.default.createElement(_elementor_ui.CircularProgress, { | |
| 1757 | + color: "secondary", | |
| 1758 | + size: 20 | |
| 1759 | + }); | |
| 1760 | + return /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, { | |
| 1761 | + onClick: onScanClick, | |
| 1762 | + size: "small", | |
| 1763 | + variant: "outlined", | |
| 1764 | + color: "secondary", | |
| 1765 | + className: "e-id-elementor-element-manager-button-show-usage", | |
| 1766 | + sx: { | |
| 1767 | + minWidth: function minWidth(theme) { | |
| 1768 | + return theme.spacing(6); | |
| 1769 | + }, | |
| 1770 | + height: 26 | |
| 1771 | + } | |
| 1772 | + }, (0, _wordpress_i18n.__)("Show", "elementor")); | |
| 1773 | + }; | |
| 1774 | + UsageTimesColumn.propTypes = { | |
| 1775 | + widgetName: import_prop_types.default.string.isRequired, | |
| 1776 | + usageData: import_prop_types.default.object, | |
| 1777 | + isLoading: import_prop_types.default.bool, | |
| 1778 | + getWidgetUsage: import_prop_types.default.func.isRequired, | |
| 1779 | + onScanClick: import_prop_types.default.func.isRequired | |
| 1780 | + }; | |
| 4549 | 1781 | |
| 4550 | -var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); | |
| 4551 | -var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js"); | |
| 1782 | +//#endregion | |
| 1783 | +//#region modules/element-manager/assets/js/app-editor-one/components/NoticeAlert.js | |
| 1784 | + var NoticeAlert = function NoticeAlert(_ref) { | |
| 1785 | + var onDismiss = _ref.onDismiss; | |
| 1786 | + return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { mb: 2 } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Alert, { | |
| 1787 | + severity: "warning", | |
| 1788 | + onClose: onDismiss | |
| 1789 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { | |
| 1790 | + component: "strong", | |
| 1791 | + variant: "body2", | |
| 1792 | + sx: { fontWeight: 700 } | |
| 1793 | + }, (0, _wordpress_i18n.__)("Before you continue:", "elementor")), " ", (0, _wordpress_i18n.__)("Deactivating widgets here will remove them from both the Elementor Editor and your website, which can cause changes to your overall layout, design and what visitors see.", "elementor"))); | |
| 1794 | + }; | |
| 1795 | + NoticeAlert.propTypes = { onDismiss: import_prop_types.default.func.isRequired }; | |
| 4552 | 1796 | |
| 4553 | -var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); | |
| 4554 | -var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); | |
| 4555 | -var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js"); | |
| 1797 | +//#endregion | |
| 1798 | +//#region modules/element-manager/assets/js/app-editor-one/components/ConfirmDialog.js | |
| 1799 | + var ConfirmDialog = function ConfirmDialog(_ref) { | |
| 1800 | + var isOpen = _ref.isOpen; | |
| 1801 | + var onClose = _ref.onClose; | |
| 1802 | + var onConfirm = _ref.onConfirm; | |
| 1803 | + return /*#__PURE__*/ react.default.createElement(_elementor_ui.Dialog, { | |
| 1804 | + open: isOpen, | |
| 1805 | + onClose, | |
| 1806 | + maxWidth: "sm" | |
| 1807 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.DialogTitle, null, (0, _wordpress_i18n.__)("Sure you want to save these changes?", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.DialogContent, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.DialogContentText, null, (0, _wordpress_i18n.__)("Turning widgets off will hide them from the editor panel, and can potentially affect your layout or front-end.", "elementor"), /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { | |
| 1808 | + component: "span", | |
| 1809 | + sx: { | |
| 1810 | + display: "block", | |
| 1811 | + mt: 2.5 | |
| 1812 | + } | |
| 1813 | + }, (0, _wordpress_i18n.__)("If you're adding widgets back in, enjoy them!", "elementor")))), /*#__PURE__*/ react.default.createElement(_elementor_ui.DialogActions, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, { | |
| 1814 | + direction: "row", | |
| 1815 | + gap: 2, | |
| 1816 | + justifyContent: "flex-end" | |
| 1817 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, { | |
| 1818 | + variant: "outlined", | |
| 1819 | + color: "secondary", | |
| 1820 | + onClick: onClose, | |
| 1821 | + className: "e-id-elementor-element-manager-modal-button-cancel" | |
| 1822 | + }, (0, _wordpress_i18n.__)("Cancel", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, { | |
| 1823 | + variant: "contained", | |
| 1824 | + onClick: onConfirm, | |
| 1825 | + className: "e-id-elementor-element-manager-modal-button-save" | |
| 1826 | + }, (0, _wordpress_i18n.__)("Save", "elementor"))))); | |
| 1827 | + }; | |
| 1828 | + ConfirmDialog.propTypes = { | |
| 1829 | + isOpen: import_prop_types.default.bool.isRequired, | |
| 1830 | + onClose: import_prop_types.default.func.isRequired, | |
| 1831 | + onConfirm: import_prop_types.default.func.isRequired | |
| 1832 | + }; | |
| 4556 | 1833 | |
| 4557 | -var printWarning = function() {}; | |
| 1834 | +//#endregion | |
| 1835 | +//#region modules/element-manager/assets/js/app-editor-one/components/SearchFilters.js | |
| 1836 | + var FIELD_HEIGHT = 28; | |
| 1837 | + var FONT_SIZE = 12; | |
| 1838 | + var ICON_SIZE = 16; | |
| 1839 | + var StyledTextField = (0, _elementor_ui.styled)(_elementor_ui.TextField)({ "& .MuiInputBase-root": { | |
| 1840 | + height: FIELD_HEIGHT, | |
| 1841 | + fontSize: FONT_SIZE | |
| 1842 | + } }); | |
| 1843 | + var StyledFormControl = (0, _elementor_ui.styled)(_elementor_ui.FormControl)({ | |
| 1844 | + "& .MuiInputBase-root": { | |
| 1845 | + height: FIELD_HEIGHT, | |
| 1846 | + fontSize: FONT_SIZE | |
| 1847 | + }, | |
| 1848 | + "& .MuiSelect-icon": { | |
| 1849 | + width: ICON_SIZE, | |
| 1850 | + height: ICON_SIZE, | |
| 1851 | + top: "calc(50% - 8px)" | |
| 1852 | + } | |
| 1853 | + }); | |
| 1854 | + var StyledButton = (0, _elementor_ui.styled)(_elementor_ui.Button)({ | |
| 1855 | + height: FIELD_HEIGHT, | |
| 1856 | + fontSize: FONT_SIZE, | |
| 1857 | + minWidth: "auto", | |
| 1858 | + whiteSpace: "nowrap" | |
| 1859 | + }); | |
| 1860 | + var SearchFilters = function SearchFilters(_ref) { | |
| 1861 | + var searchKeyword = _ref.searchKeyword; | |
| 1862 | + var onSearchChange = _ref.onSearchChange; | |
| 1863 | + var filterByPlugin = _ref.filterByPlugin; | |
| 1864 | + var onPluginFilterChange = _ref.onPluginFilterChange; | |
| 1865 | + var filterByStatus = _ref.filterByStatus; | |
| 1866 | + var onStatusFilterChange = _ref.onStatusFilterChange; | |
| 1867 | + var plugins = _ref.plugins; | |
| 1868 | + var usageIsLoading = _ref.usageIsLoading; | |
| 1869 | + var usageData = _ref.usageData; | |
| 1870 | + var widgetsDisabledCount = _ref.widgetsDisabledCount; | |
| 1871 | + var onScanUsage = _ref.onScanUsage; | |
| 1872 | + var onDeactivateUnused = _ref.onDeactivateUnused; | |
| 1873 | + var onEnableAll = _ref.onEnableAll; | |
| 1874 | + var onSaveChanges = _ref.onSaveChanges; | |
| 1875 | + var isSaving = _ref.isSaving; | |
| 1876 | + var hasUnsavedChanges = _ref.hasUnsavedChanges; | |
| 1877 | + return /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, { | |
| 1878 | + direction: { | |
| 1879 | + xs: "column", | |
| 1880 | + sm: "row" | |
| 1881 | + }, | |
| 1882 | + alignItems: { | |
| 1883 | + xs: "stretch", | |
| 1884 | + sm: "flex-start" | |
| 1885 | + }, | |
| 1886 | + gap: 1.5, | |
| 1887 | + sx: function sx(theme) { | |
| 1888 | + return { | |
| 1889 | + position: "sticky", | |
| 1890 | + top: 0, | |
| 1891 | + "@media screen and (max-width: 782px)": { top: "calc(var(--e-admin-bar-height, 0px) + var(--e-top-bar-header-height, 0px))" }, | |
| 1892 | + backgroundColor: "var(--e-one-palette-background-default)", | |
| 1893 | + zIndex: 10, | |
| 1894 | + paddingBlock: 2, | |
| 1895 | + paddingInline: 2, | |
| 1896 | + boxShadow: "rgba(0, 0, 0, 0.15) 0 5px 10px 0", | |
| 1897 | + marginBottom: theme.spacing(1) | |
| 1898 | + }; | |
| 1899 | + } | |
| 1900 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, { | |
| 1901 | + direction: "row", | |
| 1902 | + alignItems: "center", | |
| 1903 | + flexWrap: "wrap", | |
| 1904 | + gap: 1.5, | |
| 1905 | + sx: { flex: 1 } | |
| 1906 | + }, /*#__PURE__*/ react.default.createElement(StyledTextField, { | |
| 1907 | + color: "secondary", | |
| 1908 | + value: searchKeyword, | |
| 1909 | + size: "small", | |
| 1910 | + placeholder: (0, _wordpress_i18n.__)("Search", "elementor"), | |
| 1911 | + onChange: function onChange(e) { | |
| 1912 | + return onSearchChange(e.target.value); | |
| 1913 | + }, | |
| 1914 | + sx: function sx(theme) { | |
| 1915 | + return { minWidth: theme.spacing(14) }; | |
| 1916 | + } | |
| 1917 | + }), /*#__PURE__*/ react.default.createElement(StyledFormControl, { | |
| 1918 | + size: "small", | |
| 1919 | + sx: function sx(theme) { | |
| 1920 | + return { width: theme.spacing(20) }; | |
| 1921 | + }, | |
| 1922 | + color: "secondary" | |
| 1923 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Select, { | |
| 1924 | + placeholder: (0, _wordpress_i18n.__)("Plugin", "elementor"), | |
| 1925 | + value: filterByPlugin, | |
| 1926 | + onChange: function onChange(event) { | |
| 1927 | + return onPluginFilterChange(event.target.value); | |
| 1928 | + }, | |
| 1929 | + "data-id": "elementor-element-manager-select-filter-by-plugin", | |
| 1930 | + displayEmpty: true, | |
| 1931 | + renderValue: function renderValue(value) { | |
| 1932 | + if ("" === value) return (0, _wordpress_i18n.__)("All Plugins", "elementor"); | |
| 1933 | + var selectedPlugin = plugins.find(function(p) { | |
| 1934 | + return p.value === value; | |
| 1935 | + }); | |
| 1936 | + return selectedPlugin ? selectedPlugin.label : value; | |
| 1937 | + } | |
| 1938 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.MenuItem, { value: "" }, (0, _wordpress_i18n.__)("All Plugins", "elementor")), plugins.map(function(plugin) { | |
| 1939 | + return /*#__PURE__*/ react.default.createElement(_elementor_ui.MenuItem, { | |
| 1940 | + key: plugin.value, | |
| 1941 | + value: plugin.value | |
| 1942 | + }, plugin.label); | |
| 1943 | + }))), /*#__PURE__*/ react.default.createElement(StyledFormControl, { | |
| 1944 | + size: "small", | |
| 1945 | + sx: function sx(theme) { | |
| 1946 | + return { width: theme.spacing(20) }; | |
| 1947 | + }, | |
| 1948 | + color: "secondary" | |
| 1949 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Select, { | |
| 1950 | + value: filterByStatus, | |
| 1951 | + onChange: function onChange(event) { | |
| 1952 | + return onStatusFilterChange(event.target.value); | |
| 1953 | + }, | |
| 1954 | + "data-id": "elementor-element-manager-select-filter-by-status", | |
| 1955 | + placeholder: (0, _wordpress_i18n.__)("Status", "elementor") | |
| 1956 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.MenuItem, { value: "all" }, (0, _wordpress_i18n.__)("All Statuses", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.MenuItem, { value: "active" }, (0, _wordpress_i18n.__)("Active", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.MenuItem, { value: "inactive" }, (0, _wordpress_i18n.__)("Inactive", "elementor")))), /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, { | |
| 1957 | + orientation: "vertical", | |
| 1958 | + flexItem: true, | |
| 1959 | + sx: { | |
| 1960 | + height: FIELD_HEIGHT, | |
| 1961 | + marginBlock: 0, | |
| 1962 | + marginInline: .5, | |
| 1963 | + alignSelf: "center", | |
| 1964 | + display: { | |
| 1965 | + xs: "none", | |
| 1966 | + md: "block" | |
| 1967 | + } | |
| 1968 | + } | |
| 1969 | + }), /*#__PURE__*/ react.default.createElement(StyledButton, { | |
| 1970 | + variant: "outlined", | |
| 1971 | + color: "secondary", | |
| 1972 | + size: "small", | |
| 1973 | + disabled: usageIsLoading, | |
| 1974 | + onClick: onScanUsage, | |
| 1975 | + "data-id": "e-id-elementor-element-manager-button-scan-element-usage", | |
| 1976 | + loading: usageIsLoading | |
| 1977 | + }, (0, _wordpress_i18n.__)("Scan Element Usage", "elementor")), /*#__PURE__*/ react.default.createElement(StyledButton, { | |
| 1978 | + variant: "outlined", | |
| 1979 | + color: "secondary", | |
| 1980 | + size: "small", | |
| 1981 | + onClick: onDeactivateUnused, | |
| 1982 | + disabled: null === usageData, | |
| 1983 | + "data-id": "e-id-elementor-element-manager-button-deactivate-unused-elements" | |
| 1984 | + }, (0, _wordpress_i18n.__)("Deactivate Unused Elements", "elementor")), /*#__PURE__*/ react.default.createElement(StyledButton, { | |
| 1985 | + variant: "outlined", | |
| 1986 | + color: "secondary", | |
| 1987 | + size: "small", | |
| 1988 | + disabled: !widgetsDisabledCount, | |
| 1989 | + onClick: onEnableAll, | |
| 1990 | + "data-id": "e-id-elementor-element-manager-button-enable-all" | |
| 1991 | + }, (0, _wordpress_i18n.__)("Enable All", "elementor"))), /*#__PURE__*/ react.default.createElement(StyledButton, { | |
| 1992 | + variant: "contained", | |
| 1993 | + size: "small", | |
| 1994 | + disabled: isSaving || !hasUnsavedChanges, | |
| 1995 | + onClick: onSaveChanges, | |
| 1996 | + "data-id": "e-id-elementor-element-manager-button-save-changes", | |
| 1997 | + loading: isSaving, | |
| 1998 | + sx: { alignSelf: "flex-start" } | |
| 1999 | + }, (0, _wordpress_i18n.__)("Save Changes", "elementor"))); | |
| 2000 | + }; | |
| 2001 | + SearchFilters.propTypes = { | |
| 2002 | + searchKeyword: import_prop_types.default.string.isRequired, | |
| 2003 | + onSearchChange: import_prop_types.default.func.isRequired, | |
| 2004 | + filterByPlugin: import_prop_types.default.string.isRequired, | |
| 2005 | + onPluginFilterChange: import_prop_types.default.func.isRequired, | |
| 2006 | + filterByStatus: import_prop_types.default.string.isRequired, | |
| 2007 | + onStatusFilterChange: import_prop_types.default.func.isRequired, | |
| 2008 | + plugins: import_prop_types.default.arrayOf(import_prop_types.default.shape({ | |
| 2009 | + label: import_prop_types.default.string.isRequired, | |
| 2010 | + value: import_prop_types.default.string.isRequired | |
| 2011 | + })).isRequired, | |
| 2012 | + usageIsLoading: import_prop_types.default.bool, | |
| 2013 | + usageData: import_prop_types.default.object, | |
| 2014 | + widgetsDisabledCount: import_prop_types.default.number.isRequired, | |
| 2015 | + onScanUsage: import_prop_types.default.func.isRequired, | |
| 2016 | + onDeactivateUnused: import_prop_types.default.func.isRequired, | |
| 2017 | + onEnableAll: import_prop_types.default.func.isRequired, | |
| 2018 | + onSaveChanges: import_prop_types.default.func.isRequired, | |
| 2019 | + isSaving: import_prop_types.default.bool, | |
| 2020 | + hasUnsavedChanges: import_prop_types.default.bool | |
| 2021 | + }; | |
| 4558 | 2022 | |
| 4559 | -if (true) { | |
| 4560 | - printWarning = function(text) { | |
| 4561 | - var message = 'Warning: ' + text; | |
| 4562 | - if (typeof console !== 'undefined') { | |
| 4563 | - console.error(message); | |
| 4564 | - } | |
| 4565 | - try { | |
| 4566 | - // --- Welcome to debugging React --- | |
| 4567 | - // This error was thrown as a convenience so that you can use this stack | |
| 4568 | - // to find the callsite that caused this warning to fire. | |
| 4569 | - throw new Error(message); | |
| 4570 | - } catch (x) {} | |
| 4571 | - }; | |
| 4572 | -} | |
| 2023 | +//#endregion | |
| 2024 | +//#region node_modules/@babel/runtime/helpers/esm/extends.js | |
| 2025 | + function _extends() { | |
| 2026 | + return _extends = Object.assign ? Object.assign.bind() : function(n) { | |
| 2027 | + for (var e = 1; e < arguments.length; e++) { | |
| 2028 | + var t = arguments[e]; | |
| 2029 | + for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); | |
| 2030 | + } | |
| 2031 | + return n; | |
| 2032 | + }, _extends.apply(null, arguments); | |
| 2033 | + } | |
| 4573 | 2034 | |
| 4574 | -function emptyFunctionThatReturnsNull() { | |
| 4575 | - return null; | |
| 4576 | -} | |
| 2035 | +//#endregion | |
| 2036 | +//#region modules/element-manager/assets/js/upgrade-button.js | |
| 2037 | + var UpgradeButton = function UpgradeButton(props) { | |
| 2038 | + var trackingClass = props.className || "e-id-elementor-element-manager-button-upgrade"; | |
| 2039 | + return /*#__PURE__*/ react.default.createElement(_wordpress_components.Button, _extends({}, props, { | |
| 2040 | + variant: "primary", | |
| 2041 | + target: "_blank", | |
| 2042 | + rel: "noreferrer", | |
| 2043 | + style: { background: "var(--e-a-btn-bg-accent, #93003f)" }, | |
| 2044 | + className: trackingClass | |
| 2045 | + })); | |
| 2046 | + }; | |
| 2047 | + UpgradeButton.propTypes = { className: import_prop_types.default.string }; | |
| 4577 | 2048 | |
| 4578 | -module.exports = function(isValidElement, throwOnDirectAccess) { | |
| 4579 | - /* global Symbol */ | |
| 4580 | - var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; | |
| 4581 | - var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. | |
| 2049 | +//#endregion | |
| 2050 | +//#region modules/element-manager/assets/js/app-editor-one/components/RolePermissions.js | |
| 2051 | + function ownKeys(e, r) { | |
| 2052 | + var t = Object.keys(e); | |
| 2053 | + if (Object.getOwnPropertySymbols) { | |
| 2054 | + var o = Object.getOwnPropertySymbols(e); | |
| 2055 | + r && (o = o.filter(function(r) { | |
| 2056 | + return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 2057 | + })), t.push.apply(t, o); | |
| 2058 | + } | |
| 2059 | + return t; | |
| 2060 | + } | |
| 2061 | + function _objectSpread(e) { | |
| 2062 | + for (var r = 1; r < arguments.length; r++) { | |
| 2063 | + var t = null != arguments[r] ? arguments[r] : {}; | |
| 2064 | + r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { | |
| 2065 | + _defineProperty(e, r, t[r]); | |
| 2066 | + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { | |
| 2067 | + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 2068 | + }); | |
| 2069 | + } | |
| 2070 | + return e; | |
| 2071 | + } | |
| 2072 | + var toggleRoleRestrictions = function toggleRoleRestrictions(widgetName, roleId, widgetsRoleRestrictions, setWidgetsRoleRestrictions) { | |
| 2073 | + var widgetRoleRestrictions = _toConsumableArray(widgetsRoleRestrictions[widgetName] || []); | |
| 2074 | + if (widgetRoleRestrictions.includes(roleId)) widgetRoleRestrictions.splice(widgetRoleRestrictions.indexOf(roleId), 1); | |
| 2075 | + else widgetRoleRestrictions.push(roleId); | |
| 2076 | + setWidgetsRoleRestrictions(_objectSpread(_objectSpread({}, widgetsRoleRestrictions), {}, _defineProperty({}, widgetName, widgetRoleRestrictions))); | |
| 2077 | + }; | |
| 2078 | + var RolesList = function RolesList(_ref) { | |
| 2079 | + var roles = _ref.roles; | |
| 2080 | + var widgetRoleRestrictions = _ref.widgetRoleRestrictions; | |
| 2081 | + var rolesEnabled = roles.filter(function(role) { | |
| 2082 | + return !widgetRoleRestrictions.includes(role.id); | |
| 2083 | + }); | |
| 2084 | + if (!rolesEnabled.length) return /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { | |
| 2085 | + component: "span", | |
| 2086 | + variant: "body2", | |
| 2087 | + color: "text.primary" | |
| 2088 | + }, "(", (0, _wordpress_i18n.__)("Admin", "elementor"), ")"); | |
| 2089 | + if (rolesEnabled.length === roles.length) return /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { | |
| 2090 | + component: "span", | |
| 2091 | + variant: "body2", | |
| 2092 | + color: "text.primary" | |
| 2093 | + }, "(", (0, _wordpress_i18n.__)("All Roles", "elementor"), ")"); | |
| 2094 | + return /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { | |
| 2095 | + component: "span", | |
| 2096 | + variant: "body2", | |
| 2097 | + color: "text.primary" | |
| 2098 | + }, "(", rolesEnabled.map(function(role) { | |
| 2099 | + return role.name; | |
| 2100 | + }).join(", "), ")"); | |
| 2101 | + }; | |
| 2102 | + RolesList.propTypes = { | |
| 2103 | + roles: import_prop_types.default.arrayOf(import_prop_types.default.shape({ | |
| 2104 | + id: import_prop_types.default.string.isRequired, | |
| 2105 | + name: import_prop_types.default.string.isRequired | |
| 2106 | + })).isRequired, | |
| 2107 | + widgetRoleRestrictions: import_prop_types.default.arrayOf(import_prop_types.default.string).isRequired | |
| 2108 | + }; | |
| 2109 | + var RolePermissions = function RolePermissions(_ref2) { | |
| 2110 | + var roles = _ref2.roles; | |
| 2111 | + var widgetName = _ref2.widgetName; | |
| 2112 | + var widgetsRoleRestrictions = _ref2.widgetsRoleRestrictions; | |
| 2113 | + var setWidgetsRoleRestrictions = _ref2.setWidgetsRoleRestrictions; | |
| 2114 | + var _useState2 = _slicedToArray((0, react.useState)(null), 2); | |
| 2115 | + var anchorEl = _useState2[0]; | |
| 2116 | + var setAnchorEl = _useState2[1]; | |
| 2117 | + var isOpen = Boolean(anchorEl); | |
| 2118 | + var widgetRoleRestrictions = widgetsRoleRestrictions[widgetName] || []; | |
| 2119 | + var handleClick = (0, react.useCallback)(function(event) { | |
| 2120 | + setAnchorEl(event.currentTarget); | |
| 2121 | + }, []); | |
| 2122 | + var handleClose = (0, react.useCallback)(function() { | |
| 2123 | + setAnchorEl(null); | |
| 2124 | + }, []); | |
| 2125 | + var isAllChecked = roles.every(function(role) { | |
| 2126 | + return !widgetRoleRestrictions.includes(role.id); | |
| 2127 | + }); | |
| 2128 | + var isIndeterminate = !isAllChecked && roles.some(function(role) { | |
| 2129 | + return !widgetRoleRestrictions.includes(role.id); | |
| 2130 | + }); | |
| 2131 | + var handleAllChange = (0, react.useCallback)(function(event) { | |
| 2132 | + if (event.target.checked) setWidgetsRoleRestrictions(_objectSpread(_objectSpread({}, widgetsRoleRestrictions), {}, _defineProperty({}, widgetName, []))); | |
| 2133 | + else setWidgetsRoleRestrictions(_objectSpread(_objectSpread({}, widgetsRoleRestrictions), {}, _defineProperty({}, widgetName, roles.map(function(role) { | |
| 2134 | + return role.id; | |
| 2135 | + })))); | |
| 2136 | + }, [ | |
| 2137 | + widgetName, | |
| 2138 | + widgetsRoleRestrictions, | |
| 2139 | + setWidgetsRoleRestrictions, | |
| 2140 | + roles | |
| 2141 | + ]); | |
| 2142 | + return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { | |
| 2143 | + display: "inline-flex", | |
| 2144 | + alignItems: "center", | |
| 2145 | + gap: .5 | |
| 2146 | + } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, { | |
| 2147 | + variant: "text", | |
| 2148 | + color: "secondary", | |
| 2149 | + size: "small", | |
| 2150 | + onClick: handleClick, | |
| 2151 | + "aria-expanded": isOpen, | |
| 2152 | + "aria-haspopup": "true", | |
| 2153 | + className: "e-id-elementor-element-manager-button-edit-permissions-".concat(widgetName) | |
| 2154 | + }, (0, _wordpress_i18n.__)("Edit", "elementor")), /*#__PURE__*/ react.default.createElement(RolesList, { | |
| 2155 | + roles, | |
| 2156 | + widgetRoleRestrictions | |
| 2157 | + }), /*#__PURE__*/ react.default.createElement(_elementor_ui.Menu, { | |
| 2158 | + anchorEl, | |
| 2159 | + open: isOpen, | |
| 2160 | + onClose: handleClose, | |
| 2161 | + anchorOrigin: { | |
| 2162 | + vertical: "bottom", | |
| 2163 | + horizontal: "left" | |
| 2164 | + }, | |
| 2165 | + transformOrigin: { | |
| 2166 | + vertical: "top", | |
| 2167 | + horizontal: "left" | |
| 2168 | + } | |
| 2169 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.MenuItem, { sx: { py: .5 } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.FormControlLabel, { | |
| 2170 | + control: /*#__PURE__*/ react.default.createElement(_elementor_ui.Checkbox, { | |
| 2171 | + checked: isAllChecked, | |
| 2172 | + indeterminate: isIndeterminate, | |
| 2173 | + onChange: handleAllChange, | |
| 2174 | + size: "small", | |
| 2175 | + color: "secondary" | |
| 2176 | + }), | |
| 2177 | + label: (0, _wordpress_i18n.__)("All", "elementor") | |
| 2178 | + })), roles.map(function(role) { | |
| 2179 | + return /*#__PURE__*/ react.default.createElement(_elementor_ui.MenuItem, { | |
| 2180 | + key: role.id, | |
| 2181 | + sx: { py: .5 } | |
| 2182 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.FormControlLabel, { | |
| 2183 | + control: /*#__PURE__*/ react.default.createElement(_elementor_ui.Checkbox, { | |
| 2184 | + color: "secondary", | |
| 2185 | + checked: !widgetRoleRestrictions.includes(role.id), | |
| 2186 | + onChange: function onChange() { | |
| 2187 | + toggleRoleRestrictions(widgetName, role.id, widgetsRoleRestrictions, setWidgetsRoleRestrictions); | |
| 2188 | + }, | |
| 2189 | + size: "small" | |
| 2190 | + }), | |
| 2191 | + label: role.name | |
| 2192 | + })); | |
| 2193 | + }))); | |
| 2194 | + }; | |
| 2195 | + RolePermissions.propTypes = { | |
| 2196 | + roles: import_prop_types.default.arrayOf(import_prop_types.default.shape({ | |
| 2197 | + id: import_prop_types.default.string.isRequired, | |
| 2198 | + name: import_prop_types.default.string.isRequired | |
| 2199 | + })).isRequired, | |
| 2200 | + widgetName: import_prop_types.default.string.isRequired, | |
| 2201 | + widgetsRoleRestrictions: import_prop_types.default.oneOfType([import_prop_types.default.object, import_prop_types.default.array]).isRequired, | |
| 2202 | + setWidgetsRoleRestrictions: import_prop_types.default.func.isRequired | |
| 2203 | + }; | |
| 2204 | + var EditButtonDisabled = function EditButtonDisabled(_ref3) { | |
| 2205 | + var _ref3$widgetName = _ref3.widgetName; | |
| 2206 | + var widgetName = _ref3$widgetName === void 0 ? "unknown" : _ref3$widgetName; | |
| 2207 | + return /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, { | |
| 2208 | + variant: "text", | |
| 2209 | + color: "secondary", | |
| 2210 | + size: "small", | |
| 2211 | + disabled: true, | |
| 2212 | + className: "e-id-elementor-element-manager-button-edit-permissions-".concat(widgetName) | |
| 2213 | + }, (0, _wordpress_i18n.__)("Edit", "elementor")); | |
| 2214 | + }; | |
| 2215 | + EditButtonDisabled.propTypes = { widgetName: import_prop_types.default.string }; | |
| 4582 | 2216 | |
| 4583 | - /** | |
| 4584 | - * Returns the iterator method function contained on the iterable object. | |
| 4585 | - * | |
| 4586 | - * Be sure to invoke the function with the iterable as context: | |
| 4587 | - * | |
| 4588 | - * var iteratorFn = getIteratorFn(myIterable); | |
| 4589 | - * if (iteratorFn) { | |
| 4590 | - * var iterator = iteratorFn.call(myIterable); | |
| 4591 | - * ... | |
| 4592 | - * } | |
| 4593 | - * | |
| 4594 | - * @param {?object} maybeIterable | |
| 4595 | - * @return {?function} | |
| 4596 | - */ | |
| 4597 | - function getIteratorFn(maybeIterable) { | |
| 4598 | - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); | |
| 4599 | - if (typeof iteratorFn === 'function') { | |
| 4600 | - return iteratorFn; | |
| 4601 | - } | |
| 4602 | - } | |
| 2217 | +//#endregion | |
| 2218 | +//#region modules/element-manager/assets/js/app-editor-one/components/WidgetsTable.js | |
| 2219 | + var StyledSwitch = (0, _elementor_ui.styled)(_elementor_ui.Switch)({ | |
| 2220 | + "& .MuiSwitch-track": { backgroundColor: "rgba(0, 0, 0, 0.12);" }, | |
| 2221 | + "& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track": { backgroundColor: "#000" }, | |
| 2222 | + "& .MuiSwitch-switchBase:not(.Mui-checked) .MuiSwitch-thumb": { backgroundColor: "#D5D8DC" }, | |
| 2223 | + "& .MuiSwitch-switchBase.Mui-checked .MuiSwitch-thumb": { backgroundColor: "#fff" } | |
| 2224 | + }); | |
| 2225 | + var WidgetsTable = function WidgetsTable(_ref) { | |
| 2226 | + var widgets = _ref.widgets; | |
| 2227 | + var widgetsDisabled = _ref.widgetsDisabled; | |
| 2228 | + var widgetsRoleRestrictions = _ref.widgetsRoleRestrictions; | |
| 2229 | + var setWidgetsRoleRestrictions = _ref.setWidgetsRoleRestrictions; | |
| 2230 | + var roles = _ref.roles; | |
| 2231 | + var promotionWidgets = _ref.promotionWidgets; | |
| 2232 | + var promotionData = _ref.promotionData; | |
| 2233 | + var usageWidgets = _ref.usageWidgets; | |
| 2234 | + var getWidgetUsage = _ref.getWidgetUsage; | |
| 2235 | + var onScanUsage = _ref.onScanUsage; | |
| 2236 | + var onToggleWidget = _ref.onToggleWidget; | |
| 2237 | + var getSortingIndicatorClasses = _ref.getSortingIndicatorClasses; | |
| 2238 | + var onSortingClicked = _ref.onSortingClicked; | |
| 2239 | + var managerPermissions = promotionData.manager_permissions; | |
| 2240 | + var sortingClasses = getSortingIndicatorClasses("widget"); | |
| 2241 | + var isWidgetSorted = sortingClasses.includes("sorted"); | |
| 2242 | + var widgetSortDirection = sortingClasses.includes("asc") ? "asc" : "desc"; | |
| 2243 | + var usageSortingClasses = getSortingIndicatorClasses("usage"); | |
| 2244 | + var isUsageSorted = usageSortingClasses.includes("sorted"); | |
| 2245 | + var usageSortDirection = usageSortingClasses.includes("asc") ? "asc" : "desc"; | |
| 2246 | + if (!widgets.length) return /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { color: "text.secondary" }, (0, _wordpress_i18n.__)("No elements found.", "elementor")); | |
| 2247 | + return /*#__PURE__*/ react.default.createElement(_elementor_ui.TableContainer, { | |
| 2248 | + component: _elementor_ui.Paper, | |
| 2249 | + variant: "outlined" | |
| 2250 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Table, { size: "small" }, /*#__PURE__*/ react.default.createElement(_elementor_ui.TableHead, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.TableRow, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, { sx: function sx(theme) { | |
| 2251 | + return { width: theme.spacing(25) }; | |
| 2252 | + } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.TableSortLabel, { | |
| 2253 | + active: isWidgetSorted, | |
| 2254 | + direction: isWidgetSorted ? widgetSortDirection : "asc", | |
| 2255 | + onClick: function onClick() { | |
| 2256 | + return onSortingClicked("widget"); | |
| 2257 | + }, | |
| 2258 | + "data-id": "e-id-elementor-element-manager-button-sort-by-element" | |
| 2259 | + }, (0, _wordpress_i18n.__)("Element", "elementor"))), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, { sx: function sx(theme) { | |
| 2260 | + return { width: theme.spacing(10) }; | |
| 2261 | + } }, (0, _wordpress_i18n.__)("Status", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.TableSortLabel, { | |
| 2262 | + active: isUsageSorted, | |
| 2263 | + direction: isUsageSorted ? usageSortDirection : "asc", | |
| 2264 | + onClick: function onClick() { | |
| 2265 | + return onSortingClicked("usage"); | |
| 2266 | + }, | |
| 2267 | + "data-id": "e-id-elementor-element-manager-button-sort-by-usage" | |
| 2268 | + }, (0, _wordpress_i18n.__)("Usage", "elementor"))), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null, (0, _wordpress_i18n.__)("Plugin", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, { | |
| 2269 | + direction: "row", | |
| 2270 | + justifyContent: "flex-start", | |
| 2271 | + alignItems: "center", | |
| 2272 | + gap: 1 | |
| 2273 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, (0, _wordpress_i18n.__)("Permission", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Tooltip, { | |
| 2274 | + placement: "top", | |
| 2275 | + title: (0, _wordpress_i18n.__)("Choose which users will have access to each widget.", "elementor") | |
| 2276 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.IconButton, { size: "small" }, /*#__PURE__*/ react.default.createElement(_elementor_icons.HelpIcon, { fontSize: "small" })))), null === widgetsRoleRestrictions && /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { marginInlineStart: 1 } }, /*#__PURE__*/ react.default.createElement(UpgradeButton, { | |
| 2277 | + href: promotionWidgets.length ? managerPermissions.pro.url : managerPermissions.advanced.url, | |
| 2278 | + size: "small", | |
| 2279 | + text: promotionWidgets.length ? managerPermissions.pro.text : managerPermissions.advanced.text, | |
| 2280 | + className: "go-pro", | |
| 2281 | + "data-id": "e-id-elementor-element-manager-button-upgrade-permissions" | |
| 2282 | + })))))), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableBody, null, widgets.map(function(widget) { | |
| 2283 | + return /*#__PURE__*/ react.default.createElement(_elementor_ui.TableRow, { | |
| 2284 | + key: widget.name, | |
| 2285 | + "data-key-id": widget.name, | |
| 2286 | + hover: true | |
| 2287 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { | |
| 2288 | + display: "flex", | |
| 2289 | + alignItems: "center" | |
| 2290 | + } }, /*#__PURE__*/ react.default.createElement("i", { | |
| 2291 | + style: { | |
| 2292 | + marginInlineEnd: 8, | |
| 2293 | + marginInlineStart: 0, | |
| 2294 | + display: "inline-block" | |
| 2295 | + }, | |
| 2296 | + className: widget.icon | |
| 2297 | + }), widget.title)), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null, /*#__PURE__*/ react.default.createElement(StyledSwitch, { | |
| 2298 | + color: "secondary", | |
| 2299 | + checked: !widgetsDisabled.includes(widget.name), | |
| 2300 | + onChange: function onChange(event, checked) { | |
| 2301 | + return onToggleWidget(widget.name, checked); | |
| 2302 | + }, | |
| 2303 | + size: "small", | |
| 2304 | + "data-id": "e-id-elementor-element-manager-toggle-".concat(widget.name) | |
| 2305 | + })), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null, /*#__PURE__*/ react.default.createElement(UsageTimesColumn, { | |
| 2306 | + widgetName: widget.name, | |
| 2307 | + usageData: usageWidgets.data, | |
| 2308 | + isLoading: usageWidgets.isLoading, | |
| 2309 | + getWidgetUsage, | |
| 2310 | + onScanClick: onScanUsage | |
| 2311 | + })), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null, widget.plugin), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null, null !== widgetsRoleRestrictions && !widgetsDisabled.includes(widget.name) ? /*#__PURE__*/ react.default.createElement(RolePermissions, { | |
| 2312 | + widgetName: widget.name, | |
| 2313 | + roles, | |
| 2314 | + widgetsRoleRestrictions, | |
| 2315 | + setWidgetsRoleRestrictions | |
| 2316 | + }) : /*#__PURE__*/ react.default.createElement(EditButtonDisabled, null))); | |
| 2317 | + })))); | |
| 2318 | + }; | |
| 2319 | + var widgetShape = import_prop_types.default.shape({ | |
| 2320 | + name: import_prop_types.default.string.isRequired, | |
| 2321 | + title: import_prop_types.default.string.isRequired, | |
| 2322 | + icon: import_prop_types.default.string, | |
| 2323 | + plugin: import_prop_types.default.string | |
| 2324 | + }); | |
| 2325 | + WidgetsTable.propTypes = { | |
| 2326 | + widgets: import_prop_types.default.arrayOf(widgetShape).isRequired, | |
| 2327 | + widgetsDisabled: import_prop_types.default.arrayOf(import_prop_types.default.string).isRequired, | |
| 2328 | + widgetsRoleRestrictions: import_prop_types.default.oneOfType([import_prop_types.default.object, import_prop_types.default.array]), | |
| 2329 | + setWidgetsRoleRestrictions: import_prop_types.default.func.isRequired, | |
| 2330 | + roles: import_prop_types.default.array.isRequired, | |
| 2331 | + promotionWidgets: import_prop_types.default.arrayOf(widgetShape).isRequired, | |
| 2332 | + promotionData: import_prop_types.default.shape({ manager_permissions: import_prop_types.default.shape({ | |
| 2333 | + pro: import_prop_types.default.shape({ | |
| 2334 | + url: import_prop_types.default.string, | |
| 2335 | + text: import_prop_types.default.string | |
| 2336 | + }), | |
| 2337 | + advanced: import_prop_types.default.shape({ | |
| 2338 | + url: import_prop_types.default.string, | |
| 2339 | + text: import_prop_types.default.string | |
| 2340 | + }) | |
| 2341 | + }) }).isRequired, | |
| 2342 | + usageWidgets: import_prop_types.default.shape({ | |
| 2343 | + isLoading: import_prop_types.default.bool, | |
| 2344 | + data: import_prop_types.default.object | |
| 2345 | + }).isRequired, | |
| 2346 | + getWidgetUsage: import_prop_types.default.func.isRequired, | |
| 2347 | + onScanUsage: import_prop_types.default.func.isRequired, | |
| 2348 | + onToggleWidget: import_prop_types.default.func.isRequired, | |
| 2349 | + getSortingIndicatorClasses: import_prop_types.default.func.isRequired, | |
| 2350 | + onSortingClicked: import_prop_types.default.func.isRequired | |
| 2351 | + }; | |
| 4603 | 2352 | |
| 4604 | - /** | |
| 4605 | - * Collection of methods that allow declaration and validation of props that are | |
| 4606 | - * supplied to React components. Example usage: | |
| 4607 | - * | |
| 4608 | - * var Props = require('ReactPropTypes'); | |
| 4609 | - * var MyArticle = React.createClass({ | |
| 4610 | - * propTypes: { | |
| 4611 | - * // An optional string prop named "description". | |
| 4612 | - * description: Props.string, | |
| 4613 | - * | |
| 4614 | - * // A required enum prop named "category". | |
| 4615 | - * category: Props.oneOf(['News','Photos']).isRequired, | |
| 4616 | - * | |
| 4617 | - * // A prop named "dialog" that requires an instance of Dialog. | |
| 4618 | - * dialog: Props.instanceOf(Dialog).isRequired | |
| 4619 | - * }, | |
| 4620 | - * render: function() { ... } | |
| 4621 | - * }); | |
| 4622 | - * | |
| 4623 | - * A more formal specification of how these methods are used: | |
| 4624 | - * | |
| 4625 | - * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) | |
| 4626 | - * decl := ReactPropTypes.{type}(.isRequired)? | |
| 4627 | - * | |
| 4628 | - * Each and every declaration produces a function with the same signature. This | |
| 4629 | - * allows the creation of custom validation functions. For example: | |
| 4630 | - * | |
| 4631 | - * var MyLink = React.createClass({ | |
| 4632 | - * propTypes: { | |
| 4633 | - * // An optional string or URI prop named "href". | |
| 4634 | - * href: function(props, propName, componentName) { | |
| 4635 | - * var propValue = props[propName]; | |
| 4636 | - * if (propValue != null && typeof propValue !== 'string' && | |
| 4637 | - * !(propValue instanceof URI)) { | |
| 4638 | - * return new Error( | |
| 4639 | - * 'Expected a string or an URI for ' + propName + ' in ' + | |
| 4640 | - * componentName | |
| 4641 | - * ); | |
| 4642 | - * } | |
| 4643 | - * } | |
| 4644 | - * }, | |
| 4645 | - * render: function() {...} | |
| 4646 | - * }); | |
| 4647 | - * | |
| 4648 | - * @internal | |
| 4649 | - */ | |
| 2353 | +//#endregion | |
| 2354 | +//#region modules/element-manager/assets/js/app-editor-one/components/PromotionWidgetsTable.js | |
| 2355 | + var PromotionWidgetsTable = function PromotionWidgetsTable(_ref) { | |
| 2356 | + var widgets = _ref.widgets; | |
| 2357 | + var elementManager = _ref.promotionData.element_manager; | |
| 2358 | + if (!widgets.length) return null; | |
| 2359 | + return /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { | |
| 2360 | + mt: 5, | |
| 2361 | + mb: 2.5 | |
| 2362 | + } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, { | |
| 2363 | + direction: "row", | |
| 2364 | + justifyContent: "space-between", | |
| 2365 | + alignItems: "center" | |
| 2366 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { | |
| 2367 | + variant: "h6", | |
| 2368 | + component: "h3" | |
| 2369 | + }, (0, _wordpress_i18n.__)("Elementor Pro Elements", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { | |
| 2370 | + variant: "body2", | |
| 2371 | + component: "p" | |
| 2372 | + }, (0, _wordpress_i18n.__)("Unleash the full power of Elementor's features and web creation tools.", "elementor"))), /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, /*#__PURE__*/ react.default.createElement(UpgradeButton, { | |
| 2373 | + href: elementManager.url, | |
| 2374 | + text: elementManager.text, | |
| 2375 | + className: "e-id-elementor-element-manager-button-upgrade-pro-elements" | |
| 2376 | + })))), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableContainer, { | |
| 2377 | + component: _elementor_ui.Paper, | |
| 2378 | + variant: "outlined" | |
| 2379 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Table, { size: "small" }, /*#__PURE__*/ react.default.createElement(_elementor_ui.TableHead, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.TableRow, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, { sx: function sx(theme) { | |
| 2380 | + return { width: theme.spacing(25) }; | |
| 2381 | + } }, (0, _wordpress_i18n.__)("Element", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, { sx: function sx(theme) { | |
| 2382 | + return { width: theme.spacing(10) }; | |
| 2383 | + } }, (0, _wordpress_i18n.__)("Status", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null, (0, _wordpress_i18n.__)("Usage", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null, (0, _wordpress_i18n.__)("Plugin", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, { | |
| 2384 | + direction: "row", | |
| 2385 | + justifyContent: "flex-start", | |
| 2386 | + alignItems: "center", | |
| 2387 | + gap: 1 | |
| 2388 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, (0, _wordpress_i18n.__)("Permission", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Tooltip, { | |
| 2389 | + placement: "top", | |
| 2390 | + title: (0, _wordpress_i18n.__)("Choose which role will have access to a specific widget.", "elementor") | |
| 2391 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.IconButton, { size: "small" }, /*#__PURE__*/ react.default.createElement(_elementor_icons.HelpIcon, { fontSize: "small" })))))))), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableBody, null, widgets.map(function(widget) { | |
| 2392 | + return /*#__PURE__*/ react.default.createElement(_elementor_ui.TableRow, { | |
| 2393 | + key: widget.name, | |
| 2394 | + hover: true | |
| 2395 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { | |
| 2396 | + display: "flex", | |
| 2397 | + alignItems: "center" | |
| 2398 | + } }, /*#__PURE__*/ react.default.createElement("i", { | |
| 2399 | + style: { marginInlineEnd: 8 }, | |
| 2400 | + className: widget.icon | |
| 2401 | + }), widget.title)), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Switch, { | |
| 2402 | + checked: false, | |
| 2403 | + disabled: true, | |
| 2404 | + size: "small", | |
| 2405 | + "data-id": "e-id-elementor-element-manager-toggle-".concat(widget.name) | |
| 2406 | + })), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null, (0, _wordpress_i18n.__)("Elementor Pro", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.TableCell, null, /*#__PURE__*/ react.default.createElement(EditButtonDisabled, { widgetName: widget.name }))); | |
| 2407 | + }))))); | |
| 2408 | + }; | |
| 2409 | + PromotionWidgetsTable.propTypes = { | |
| 2410 | + widgets: import_prop_types.default.arrayOf(import_prop_types.default.shape({ | |
| 2411 | + name: import_prop_types.default.string.isRequired, | |
| 2412 | + title: import_prop_types.default.string.isRequired, | |
| 2413 | + icon: import_prop_types.default.string | |
| 2414 | + })).isRequired, | |
| 2415 | + promotionData: import_prop_types.default.shape({ element_manager: import_prop_types.default.shape({ | |
| 2416 | + url: import_prop_types.default.string, | |
| 2417 | + text: import_prop_types.default.string | |
| 2418 | + }) }).isRequired | |
| 2419 | + }; | |
| 4650 | 2420 | |
| 4651 | - var ANONYMOUS = '<<anonymous>>'; | |
| 2421 | +//#endregion | |
| 2422 | +//#region modules/element-manager/assets/js/app-editor-one/App.js | |
| 2423 | + var App = function App() { | |
| 2424 | + var _useState2 = _slicedToArray((0, react.useState)(false), 2); | |
| 2425 | + var isConfirmDialogOpen = _useState2[0]; | |
| 2426 | + var setIsConfirmDialogOpen = _useState2[1]; | |
| 2427 | + var _useElementManager = useElementManager(); | |
| 2428 | + var isLoading = _useElementManager.isLoading; | |
| 2429 | + var widgets = _useElementManager.widgets; | |
| 2430 | + var promotionWidgets = _useElementManager.promotionWidgets; | |
| 2431 | + var plugins = _useElementManager.plugins; | |
| 2432 | + var roles = _useElementManager.roles; | |
| 2433 | + var widgetsDisabled = _useElementManager.widgetsDisabled; | |
| 2434 | + var widgetsRoleRestrictions = _useElementManager.widgetsRoleRestrictions; | |
| 2435 | + var setWidgetsRoleRestrictions = _useElementManager.setWidgetsRoleRestrictions; | |
| 2436 | + var promotionData = _useElementManager.promotionData; | |
| 2437 | + var noticeData = _useElementManager.noticeData; | |
| 2438 | + var usageWidgets = _useElementManager.usageWidgets; | |
| 2439 | + var changeProgress = _useElementManager.changeProgress; | |
| 2440 | + var isSnackbarOpen = _useElementManager.isSnackbarOpen; | |
| 2441 | + var setIsSnackbarOpen = _useElementManager.setIsSnackbarOpen; | |
| 2442 | + var getWidgetUsage = _useElementManager.getWidgetUsage; | |
| 2443 | + var scanUsageElements = _useElementManager.scanUsageElements; | |
| 2444 | + var saveChanges = _useElementManager.saveChanges; | |
| 2445 | + var deactivateAllUnusedWidgets = _useElementManager.deactivateAllUnusedWidgets; | |
| 2446 | + var enableAllWidgets = _useElementManager.enableAllWidgets; | |
| 2447 | + var toggleWidget = _useElementManager.toggleWidget; | |
| 2448 | + var dismissNotice = _useElementManager.dismissNotice; | |
| 2449 | + var _useWidgetFilters = useWidgetFilters(widgets, widgetsDisabled, getWidgetUsage); | |
| 2450 | + var searchKeyword = _useWidgetFilters.searchKeyword; | |
| 2451 | + var setSearchKeyword = _useWidgetFilters.setSearchKeyword; | |
| 2452 | + var filterByPlugin = _useWidgetFilters.filterByPlugin; | |
| 2453 | + var setFilterByPlugin = _useWidgetFilters.setFilterByPlugin; | |
| 2454 | + var filterByStatus = _useWidgetFilters.filterByStatus; | |
| 2455 | + var setFilterByStatus = _useWidgetFilters.setFilterByStatus; | |
| 2456 | + var sortedAndFilteredWidgets = _useWidgetFilters.sortedAndFilteredWidgets; | |
| 2457 | + var getSortingIndicatorClasses = _useWidgetFilters.getSortingIndicatorClasses; | |
| 2458 | + var onSortingClicked = _useWidgetFilters.onSortingClicked; | |
| 2459 | + var setSortByUsage = _useWidgetFilters.setSortByUsage; | |
| 2460 | + var handleScanUsage = (0, react.useCallback)(/*#__PURE__*/ _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee() { | |
| 2461 | + return import_regenerator.default.wrap(function(_context) { | |
| 2462 | + while (1) switch (_context.prev = _context.next) { | |
| 2463 | + case 0: | |
| 2464 | + _context.next = 1; | |
| 2465 | + return scanUsageElements(); | |
| 2466 | + case 1: setSortByUsage(); | |
| 2467 | + case 2: | |
| 2468 | + case "end": return _context.stop(); | |
| 2469 | + } | |
| 2470 | + }, _callee); | |
| 2471 | + })), [scanUsageElements, setSortByUsage]); | |
| 2472 | + var handleSaveClick = (0, react.useCallback)(/*#__PURE__*/ _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee2() { | |
| 2473 | + return import_regenerator.default.wrap(function(_context2) { | |
| 2474 | + while (1) switch (_context2.prev = _context2.next) { | |
| 2475 | + case 0: | |
| 2476 | + setIsConfirmDialogOpen(false); | |
| 2477 | + _context2.next = 1; | |
| 2478 | + return saveChanges(); | |
| 2479 | + case 1: | |
| 2480 | + case "end": return _context2.stop(); | |
| 2481 | + } | |
| 2482 | + }, _callee2); | |
| 2483 | + })), [saveChanges]); | |
| 2484 | + if (isLoading) return /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, { | |
| 2485 | + justifyContent: "center", | |
| 2486 | + sx: { margin: 12 } | |
| 2487 | + }, /*#__PURE__*/ react.default.createElement(_elementor_ui.CircularProgress, { size: 80 })); | |
| 2488 | + return /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { | |
| 2489 | + variant: "body2", | |
| 2490 | + color: "text.secondary", | |
| 2491 | + sx: { | |
| 2492 | + marginBlockEnd: 2.5, | |
| 2493 | + maxWidth: 800 | |
| 2494 | + } | |
| 2495 | + }, (0, _wordpress_i18n.__)("Here's where you can fine-tune Elementor to your workflow. Disable elements you don't use for a cleaner interface, more focused creative experience, and improved performance.", "elementor"), " ", /*#__PURE__*/ react.default.createElement(_elementor_ui.Link, { | |
| 2496 | + href: "https://go.elementor.com/wp-dash-element-manager/", | |
| 2497 | + rel: "noreferrer", | |
| 2498 | + target: "_blank", | |
| 2499 | + color: "info.light" | |
| 2500 | + }, (0, _wordpress_i18n.__)("Learn More", "elementor"))), noticeData && !noticeData.is_viewed && /*#__PURE__*/ react.default.createElement(NoticeAlert, { onDismiss: dismissNotice }), /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, /*#__PURE__*/ react.default.createElement(SearchFilters, { | |
| 2501 | + searchKeyword, | |
| 2502 | + onSearchChange: setSearchKeyword, | |
| 2503 | + filterByPlugin, | |
| 2504 | + onPluginFilterChange: setFilterByPlugin, | |
| 2505 | + filterByStatus, | |
| 2506 | + onStatusFilterChange: setFilterByStatus, | |
| 2507 | + plugins, | |
| 2508 | + usageIsLoading: usageWidgets.isLoading, | |
| 2509 | + usageData: usageWidgets.data, | |
| 2510 | + widgetsDisabledCount: widgetsDisabled.length, | |
| 2511 | + onScanUsage: handleScanUsage, | |
| 2512 | + onDeactivateUnused: deactivateAllUnusedWidgets, | |
| 2513 | + onEnableAll: enableAllWidgets, | |
| 2514 | + onSaveChanges: function onSaveChanges() { | |
| 2515 | + return setIsConfirmDialogOpen(true); | |
| 2516 | + }, | |
| 2517 | + isSaving: changeProgress.isSaving, | |
| 2518 | + hasUnsavedChanges: changeProgress.isUnsavedChanges | |
| 2519 | + }), /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, /*#__PURE__*/ react.default.createElement(WidgetsTable, { | |
| 2520 | + widgets: sortedAndFilteredWidgets, | |
| 2521 | + widgetsDisabled, | |
| 2522 | + widgetsRoleRestrictions, | |
| 2523 | + setWidgetsRoleRestrictions, | |
| 2524 | + roles, | |
| 2525 | + promotionWidgets, | |
| 2526 | + promotionData, | |
| 2527 | + usageWidgets, | |
| 2528 | + getWidgetUsage, | |
| 2529 | + onScanUsage: handleScanUsage, | |
| 2530 | + onToggleWidget: toggleWidget, | |
| 2531 | + getSortingIndicatorClasses, | |
| 2532 | + onSortingClicked | |
| 2533 | + })), /*#__PURE__*/ react.default.createElement(PromotionWidgetsTable, { | |
| 2534 | + widgets: promotionWidgets, | |
| 2535 | + promotionData | |
| 2536 | + })), /*#__PURE__*/ react.default.createElement(ConfirmDialog, { | |
| 2537 | + isOpen: isConfirmDialogOpen, | |
| 2538 | + onClose: function onClose() { | |
| 2539 | + return setIsConfirmDialogOpen(false); | |
| 2540 | + }, | |
| 2541 | + onConfirm: handleSaveClick | |
| 2542 | + }), /*#__PURE__*/ react.default.createElement(_elementor_ui.Snackbar, { | |
| 2543 | + open: isSnackbarOpen, | |
| 2544 | + autoHideDuration: 6e3, | |
| 2545 | + onClose: function onClose() { | |
| 2546 | + return setIsSnackbarOpen(false); | |
| 2547 | + }, | |
| 2548 | + message: (0, _wordpress_i18n.__)("We saved your changes.", "elementor"), | |
| 2549 | + anchorOrigin: { | |
| 2550 | + vertical: "bottom", | |
| 2551 | + horizontal: "center" | |
| 2552 | + } | |
| 2553 | + })); | |
| 2554 | + }; | |
| 4652 | 2555 | |
| 4653 | - // Important! | |
| 4654 | - // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. | |
| 4655 | - var ReactPropTypes = { | |
| 4656 | - array: createPrimitiveTypeChecker('array'), | |
| 4657 | - bigint: createPrimitiveTypeChecker('bigint'), | |
| 4658 | - bool: createPrimitiveTypeChecker('boolean'), | |
| 4659 | - func: createPrimitiveTypeChecker('function'), | |
| 4660 | - number: createPrimitiveTypeChecker('number'), | |
| 4661 | - object: createPrimitiveTypeChecker('object'), | |
| 4662 | - string: createPrimitiveTypeChecker('string'), | |
| 4663 | - symbol: createPrimitiveTypeChecker('symbol'), | |
| 2556 | +//#endregion | |
| 2557 | +//#region modules/element-manager/assets/js/app-editor-one/index.js | |
| 2558 | + var AppModern = function AppModern() { | |
| 2559 | + var _elementorCommon$conf; | |
| 2560 | + var isRTL = typeof elementorCommon !== "undefined" && (_elementorCommon$conf = elementorCommon.config) !== null && _elementorCommon$conf !== void 0 && _elementorCommon$conf.isRTL ? elementorCommon.config.isRTL : "rtl" === document.documentElement.dir || document.body.classList.contains("rtl"); | |
| 2561 | + return /*#__PURE__*/ react.default.createElement(_elementor_ui.DirectionProvider, { rtl: isRTL }, /*#__PURE__*/ react.default.createElement(_elementor_ui.ThemeProvider, { colorScheme: "light" }, /*#__PURE__*/ react.default.createElement(App, null))); | |
| 2562 | + }; | |
| 4664 | 2563 | |
| 4665 | - any: createAnyTypeChecker(), | |
| 4666 | - arrayOf: createArrayOfTypeChecker, | |
| 4667 | - element: createElementTypeChecker(), | |
| 4668 | - elementType: createElementTypeTypeChecker(), | |
| 4669 | - instanceOf: createInstanceTypeChecker, | |
| 4670 | - node: createNodeChecker(), | |
| 4671 | - objectOf: createObjectOfTypeChecker, | |
| 4672 | - oneOf: createEnumTypeChecker, | |
| 4673 | - oneOfType: createUnionTypeChecker, | |
| 4674 | - shape: createShapeTypeChecker, | |
| 4675 | - exact: createStrictShapeTypeChecker, | |
| 4676 | - }; | |
| 2564 | +//#endregion | |
| 2565 | +//#region modules/element-manager/assets/js/admin.js | |
| 2566 | + (0, _wordpress_dom_ready.default)(function() { | |
| 2567 | + var htmlOutput = document.getElementById("elementor-element-manager-wrap"); | |
| 2568 | + if (!htmlOutput) return; | |
| 2569 | + (0, import_client.createRoot)(htmlOutput).render(/*#__PURE__*/ react.default.createElement(AppModern, null)); | |
| 2570 | + }); | |
| 4677 | 2571 | |
| 4678 | - /** | |
| 4679 | - * inlined Object.is polyfill to avoid requiring consumers ship their own | |
| 4680 | - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is | |
| 4681 | - */ | |
| 4682 | - /*eslint-disable no-self-compare*/ | |
| 4683 | - function is(x, y) { | |
| 4684 | - // SameValue algorithm | |
| 4685 | - if (x === y) { | |
| 4686 | - // Steps 1-5, 7-10 | |
| 4687 | - // Steps 6.b-6.e: +0 != -0 | |
| 4688 | - return x !== 0 || 1 / x === 1 / y; | |
| 4689 | - } else { | |
| 4690 | - // Step 6.a: NaN == NaN | |
| 4691 | - return x !== x && y !== y; | |
| 4692 | - } | |
| 4693 | - } | |
| 4694 | - /*eslint-enable no-self-compare*/ | |
| 4695 | - | |
| 4696 | - /** | |
| 4697 | - * We use an Error-like object for backward compatibility as people may call | |
| 4698 | - * PropTypes directly and inspect their output. However, we don't use real | |
| 4699 | - * Errors anymore. We don't inspect their stack anyway, and creating them | |
| 4700 | - * is prohibitively expensive if they are created too often, such as what | |
| 4701 | - * happens in oneOfType() for any type before the one that matched. | |
| 4702 | - */ | |
| 4703 | - function PropTypeError(message, data) { | |
| 4704 | - this.message = message; | |
| 4705 | - this.data = data && typeof data === 'object' ? data: {}; | |
| 4706 | - this.stack = ''; | |
| 4707 | - } | |
| 4708 | - // Make `instanceof Error` still work for returned errors. | |
| 4709 | - PropTypeError.prototype = Error.prototype; | |
| 4710 | - | |
| 4711 | - function createChainableTypeChecker(validate) { | |
| 4712 | - if (true) { | |
| 4713 | - var manualPropTypeCallCache = {}; | |
| 4714 | - var manualPropTypeWarningCount = 0; | |
| 4715 | - } | |
| 4716 | - function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { | |
| 4717 | - componentName = componentName || ANONYMOUS; | |
| 4718 | - propFullName = propFullName || propName; | |
| 4719 | - | |
| 4720 | - if (secret !== ReactPropTypesSecret) { | |
| 4721 | - if (throwOnDirectAccess) { | |
| 4722 | - // New behavior only for users of `prop-types` package | |
| 4723 | - var err = new Error( | |
| 4724 | - 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + | |
| 4725 | - 'Use `PropTypes.checkPropTypes()` to call them. ' + | |
| 4726 | - 'Read more at http://fb.me/use-check-prop-types' | |
| 4727 | - ); | |
| 4728 | - err.name = 'Invariant Violation'; | |
| 4729 | - throw err; | |
| 4730 | - } else if ( true && typeof console !== 'undefined') { | |
| 4731 | - // Old behavior for people using React.PropTypes | |
| 4732 | - var cacheKey = componentName + ':' + propName; | |
| 4733 | - if ( | |
| 4734 | - !manualPropTypeCallCache[cacheKey] && | |
| 4735 | - // Avoid spamming the console because they are often not actionable except for lib authors | |
| 4736 | - manualPropTypeWarningCount < 3 | |
| 4737 | - ) { | |
| 4738 | - printWarning( | |
| 4739 | - 'You are manually calling a React.PropTypes validation ' + | |
| 4740 | - 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + | |
| 4741 | - 'and will throw in the standalone `prop-types` package. ' + | |
| 4742 | - 'You may be seeing this warning due to a third-party PropTypes ' + | |
| 4743 | - 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' | |
| 4744 | - ); | |
| 4745 | - manualPropTypeCallCache[cacheKey] = true; | |
| 4746 | - manualPropTypeWarningCount++; | |
| 4747 | - } | |
| 4748 | - } | |
| 4749 | - } | |
| 4750 | - if (props[propName] == null) { | |
| 4751 | - if (isRequired) { | |
| 4752 | - if (props[propName] === null) { | |
| 4753 | - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); | |
| 4754 | - } | |
| 4755 | - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); | |
| 4756 | - } | |
| 4757 | - return null; | |
| 4758 | - } else { | |
| 4759 | - return validate(props, propName, componentName, location, propFullName); | |
| 4760 | - } | |
| 4761 | - } | |
| 4762 | - | |
| 4763 | - var chainedCheckType = checkType.bind(null, false); | |
| 4764 | - chainedCheckType.isRequired = checkType.bind(null, true); | |
| 4765 | - | |
| 4766 | - return chainedCheckType; | |
| 4767 | - } | |
| 4768 | - | |
| 4769 | - function createPrimitiveTypeChecker(expectedType) { | |
| 4770 | - function validate(props, propName, componentName, location, propFullName, secret) { | |
| 4771 | - var propValue = props[propName]; | |
| 4772 | - var propType = getPropType(propValue); | |
| 4773 | - if (propType !== expectedType) { | |
| 4774 | - // `propValue` being instance of, say, date/regexp, pass the 'object' | |
| 4775 | - // check, but we can offer a more precise error message here rather than | |
| 4776 | - // 'of type `object`'. | |
| 4777 | - var preciseType = getPreciseType(propValue); | |
| 4778 | - | |
| 4779 | - return new PropTypeError( | |
| 4780 | - 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), | |
| 4781 | - {expectedType: expectedType} | |
| 4782 | - ); | |
| 4783 | - } | |
| 4784 | - return null; | |
| 4785 | - } | |
| 4786 | - return createChainableTypeChecker(validate); | |
| 4787 | - } | |
| 4788 | - | |
| 4789 | - function createAnyTypeChecker() { | |
| 4790 | - return createChainableTypeChecker(emptyFunctionThatReturnsNull); | |
| 4791 | - } | |
| 4792 | - | |
| 4793 | - function createArrayOfTypeChecker(typeChecker) { | |
| 4794 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4795 | - if (typeof typeChecker !== 'function') { | |
| 4796 | - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); | |
| 4797 | - } | |
| 4798 | - var propValue = props[propName]; | |
| 4799 | - if (!Array.isArray(propValue)) { | |
| 4800 | - var propType = getPropType(propValue); | |
| 4801 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); | |
| 4802 | - } | |
| 4803 | - for (var i = 0; i < propValue.length; i++) { | |
| 4804 | - var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); | |
| 4805 | - if (error instanceof Error) { | |
| 4806 | - return error; | |
| 4807 | - } | |
| 4808 | - } | |
| 4809 | - return null; | |
| 4810 | - } | |
| 4811 | - return createChainableTypeChecker(validate); | |
| 4812 | - } | |
| 4813 | - | |
| 4814 | - function createElementTypeChecker() { | |
| 4815 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4816 | - var propValue = props[propName]; | |
| 4817 | - if (!isValidElement(propValue)) { | |
| 4818 | - var propType = getPropType(propValue); | |
| 4819 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); | |
| 4820 | - } | |
| 4821 | - return null; | |
| 4822 | - } | |
| 4823 | - return createChainableTypeChecker(validate); | |
| 4824 | - } | |
| 4825 | - | |
| 4826 | - function createElementTypeTypeChecker() { | |
| 4827 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4828 | - var propValue = props[propName]; | |
| 4829 | - if (!ReactIs.isValidElementType(propValue)) { | |
| 4830 | - var propType = getPropType(propValue); | |
| 4831 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); | |
| 4832 | - } | |
| 4833 | - return null; | |
| 4834 | - } | |
| 4835 | - return createChainableTypeChecker(validate); | |
| 4836 | - } | |
| 4837 | - | |
| 4838 | - function createInstanceTypeChecker(expectedClass) { | |
| 4839 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4840 | - if (!(props[propName] instanceof expectedClass)) { | |
| 4841 | - var expectedClassName = expectedClass.name || ANONYMOUS; | |
| 4842 | - var actualClassName = getClassName(props[propName]); | |
| 4843 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); | |
| 4844 | - } | |
| 4845 | - return null; | |
| 4846 | - } | |
| 4847 | - return createChainableTypeChecker(validate); | |
| 4848 | - } | |
| 4849 | - | |
| 4850 | - function createEnumTypeChecker(expectedValues) { | |
| 4851 | - if (!Array.isArray(expectedValues)) { | |
| 4852 | - if (true) { | |
| 4853 | - if (arguments.length > 1) { | |
| 4854 | - printWarning( | |
| 4855 | - 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + | |
| 4856 | - 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' | |
| 4857 | - ); | |
| 4858 | - } else { | |
| 4859 | - printWarning('Invalid argument supplied to oneOf, expected an array.'); | |
| 4860 | - } | |
| 4861 | - } | |
| 4862 | - return emptyFunctionThatReturnsNull; | |
| 4863 | - } | |
| 4864 | - | |
| 4865 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4866 | - var propValue = props[propName]; | |
| 4867 | - for (var i = 0; i < expectedValues.length; i++) { | |
| 4868 | - if (is(propValue, expectedValues[i])) { | |
| 4869 | - return null; | |
| 4870 | - } | |
| 4871 | - } | |
| 4872 | - | |
| 4873 | - var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { | |
| 4874 | - var type = getPreciseType(value); | |
| 4875 | - if (type === 'symbol') { | |
| 4876 | - return String(value); | |
| 4877 | - } | |
| 4878 | - return value; | |
| 4879 | - }); | |
| 4880 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); | |
| 4881 | - } | |
| 4882 | - return createChainableTypeChecker(validate); | |
| 4883 | - } | |
| 4884 | - | |
| 4885 | - function createObjectOfTypeChecker(typeChecker) { | |
| 4886 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4887 | - if (typeof typeChecker !== 'function') { | |
| 4888 | - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); | |
| 4889 | - } | |
| 4890 | - var propValue = props[propName]; | |
| 4891 | - var propType = getPropType(propValue); | |
| 4892 | - if (propType !== 'object') { | |
| 4893 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); | |
| 4894 | - } | |
| 4895 | - for (var key in propValue) { | |
| 4896 | - if (has(propValue, key)) { | |
| 4897 | - var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); | |
| 4898 | - if (error instanceof Error) { | |
| 4899 | - return error; | |
| 4900 | - } | |
| 4901 | - } | |
| 4902 | - } | |
| 4903 | - return null; | |
| 4904 | - } | |
| 4905 | - return createChainableTypeChecker(validate); | |
| 4906 | - } | |
| 4907 | - | |
| 4908 | - function createUnionTypeChecker(arrayOfTypeCheckers) { | |
| 4909 | - if (!Array.isArray(arrayOfTypeCheckers)) { | |
| 4910 | - true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0; | |
| 4911 | - return emptyFunctionThatReturnsNull; | |
| 4912 | - } | |
| 4913 | - | |
| 4914 | - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { | |
| 4915 | - var checker = arrayOfTypeCheckers[i]; | |
| 4916 | - if (typeof checker !== 'function') { | |
| 4917 | - printWarning( | |
| 4918 | - 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + | |
| 4919 | - 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' | |
| 4920 | - ); | |
| 4921 | - return emptyFunctionThatReturnsNull; | |
| 4922 | - } | |
| 4923 | - } | |
| 4924 | - | |
| 4925 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4926 | - var expectedTypes = []; | |
| 4927 | - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { | |
| 4928 | - var checker = arrayOfTypeCheckers[i]; | |
| 4929 | - var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret); | |
| 4930 | - if (checkerResult == null) { | |
| 4931 | - return null; | |
| 4932 | - } | |
| 4933 | - if (checkerResult.data && has(checkerResult.data, 'expectedType')) { | |
| 4934 | - expectedTypes.push(checkerResult.data.expectedType); | |
| 4935 | - } | |
| 4936 | - } | |
| 4937 | - var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': ''; | |
| 4938 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.')); | |
| 4939 | - } | |
| 4940 | - return createChainableTypeChecker(validate); | |
| 4941 | - } | |
| 4942 | - | |
| 4943 | - function createNodeChecker() { | |
| 4944 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4945 | - if (!isNode(props[propName])) { | |
| 4946 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); | |
| 4947 | - } | |
| 4948 | - return null; | |
| 4949 | - } | |
| 4950 | - return createChainableTypeChecker(validate); | |
| 4951 | - } | |
| 4952 | - | |
| 4953 | - function invalidValidatorError(componentName, location, propFullName, key, type) { | |
| 4954 | - return new PropTypeError( | |
| 4955 | - (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + | |
| 4956 | - 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.' | |
| 4957 | - ); | |
| 4958 | - } | |
| 4959 | - | |
| 4960 | - function createShapeTypeChecker(shapeTypes) { | |
| 4961 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4962 | - var propValue = props[propName]; | |
| 4963 | - var propType = getPropType(propValue); | |
| 4964 | - if (propType !== 'object') { | |
| 4965 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); | |
| 4966 | - } | |
| 4967 | - for (var key in shapeTypes) { | |
| 4968 | - var checker = shapeTypes[key]; | |
| 4969 | - if (typeof checker !== 'function') { | |
| 4970 | - return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | |
| 4971 | - } | |
| 4972 | - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); | |
| 4973 | - if (error) { | |
| 4974 | - return error; | |
| 4975 | - } | |
| 4976 | - } | |
| 4977 | - return null; | |
| 4978 | - } | |
| 4979 | - return createChainableTypeChecker(validate); | |
| 4980 | - } | |
| 4981 | - | |
| 4982 | - function createStrictShapeTypeChecker(shapeTypes) { | |
| 4983 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4984 | - var propValue = props[propName]; | |
| 4985 | - var propType = getPropType(propValue); | |
| 4986 | - if (propType !== 'object') { | |
| 4987 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); | |
| 4988 | - } | |
| 4989 | - // We need to check all keys in case some are required but missing from props. | |
| 4990 | - var allKeys = assign({}, props[propName], shapeTypes); | |
| 4991 | - for (var key in allKeys) { | |
| 4992 | - var checker = shapeTypes[key]; | |
| 4993 | - if (has(shapeTypes, key) && typeof checker !== 'function') { | |
| 4994 | - return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | |
| 4995 | - } | |
| 4996 | - if (!checker) { | |
| 4997 | - return new PropTypeError( | |
| 4998 | - 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + | |
| 4999 | - '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + | |
| 5000 | - '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') | |
| 5001 | - ); | |
| 5002 | - } | |
| 5003 | - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); | |
| 5004 | - if (error) { | |
| 5005 | - return error; | |
| 5006 | - } | |
| 5007 | - } | |
| 5008 | - return null; | |
| 5009 | - } | |
| 5010 | - | |
| 5011 | - return createChainableTypeChecker(validate); | |
| 5012 | - } | |
| 5013 | - | |
| 5014 | - function isNode(propValue) { | |
| 5015 | - switch (typeof propValue) { | |
| 5016 | - case 'number': | |
| 5017 | - case 'string': | |
| 5018 | - case 'undefined': | |
| 5019 | - return true; | |
| 5020 | - case 'boolean': | |
| 5021 | - return !propValue; | |
| 5022 | - case 'object': | |
| 5023 | - if (Array.isArray(propValue)) { | |
| 5024 | - return propValue.every(isNode); | |
| 5025 | - } | |
| 5026 | - if (propValue === null || isValidElement(propValue)) { | |
| 5027 | - return true; | |
| 5028 | - } | |
| 5029 | - | |
| 5030 | - var iteratorFn = getIteratorFn(propValue); | |
| 5031 | - if (iteratorFn) { | |
| 5032 | - var iterator = iteratorFn.call(propValue); | |
| 5033 | - var step; | |
| 5034 | - if (iteratorFn !== propValue.entries) { | |
| 5035 | - while (!(step = iterator.next()).done) { | |
| 5036 | - if (!isNode(step.value)) { | |
| 5037 | - return false; | |
| 5038 | - } | |
| 5039 | - } | |
| 5040 | - } else { | |
| 5041 | - // Iterator will provide entry [k,v] tuples rather than values. | |
| 5042 | - while (!(step = iterator.next()).done) { | |
| 5043 | - var entry = step.value; | |
| 5044 | - if (entry) { | |
| 5045 | - if (!isNode(entry[1])) { | |
| 5046 | - return false; | |
| 5047 | - } | |
| 5048 | - } | |
| 5049 | - } | |
| 5050 | - } | |
| 5051 | - } else { | |
| 5052 | - return false; | |
| 5053 | - } | |
| 5054 | - | |
| 5055 | - return true; | |
| 5056 | - default: | |
| 5057 | - return false; | |
| 5058 | - } | |
| 5059 | - } | |
| 5060 | - | |
| 5061 | - function isSymbol(propType, propValue) { | |
| 5062 | - // Native Symbol. | |
| 5063 | - if (propType === 'symbol') { | |
| 5064 | - return true; | |
| 5065 | - } | |
| 5066 | - | |
| 5067 | - // falsy value can't be a Symbol | |
| 5068 | - if (!propValue) { | |
| 5069 | - return false; | |
| 5070 | - } | |
| 5071 | - | |
| 5072 | - // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' | |
| 5073 | - if (propValue['@@toStringTag'] === 'Symbol') { | |
| 5074 | - return true; | |
| 5075 | - } | |
| 5076 | - | |
| 5077 | - // Fallback for non-spec compliant Symbols which are polyfilled. | |
| 5078 | - if (typeof Symbol === 'function' && propValue instanceof Symbol) { | |
| 5079 | - return true; | |
| 5080 | - } | |
| 5081 | - | |
| 5082 | - return false; | |
| 5083 | - } | |
| 5084 | - | |
| 5085 | - // Equivalent of `typeof` but with special handling for array and regexp. | |
| 5086 | - function getPropType(propValue) { | |
| 5087 | - var propType = typeof propValue; | |
| 5088 | - if (Array.isArray(propValue)) { | |
| 5089 | - return 'array'; | |
| 5090 | - } | |
| 5091 | - if (propValue instanceof RegExp) { | |
| 5092 | - // Old webkits (at least until Android 4.0) return 'function' rather than | |
| 5093 | - // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ | |
| 5094 | - // passes PropTypes.object. | |
| 5095 | - return 'object'; | |
| 5096 | - } | |
| 5097 | - if (isSymbol(propType, propValue)) { | |
| 5098 | - return 'symbol'; | |
| 5099 | - } | |
| 5100 | - return propType; | |
| 5101 | - } | |
| 5102 | - | |
| 5103 | - // This handles more types than `getPropType`. Only used for error messages. | |
| 5104 | - // See `createPrimitiveTypeChecker`. | |
| 5105 | - function getPreciseType(propValue) { | |
| 5106 | - if (typeof propValue === 'undefined' || propValue === null) { | |
| 5107 | - return '' + propValue; | |
| 5108 | - } | |
| 5109 | - var propType = getPropType(propValue); | |
| 5110 | - if (propType === 'object') { | |
| 5111 | - if (propValue instanceof Date) { | |
| 5112 | - return 'date'; | |
| 5113 | - } else if (propValue instanceof RegExp) { | |
| 5114 | - return 'regexp'; | |
| 5115 | - } | |
| 5116 | - } | |
| 5117 | - return propType; | |
| 5118 | - } | |
| 5119 | - | |
| 5120 | - // Returns a string that is postfixed to a warning about an invalid type. | |
| 5121 | - // For example, "undefined" or "of type array" | |
| 5122 | - function getPostfixForTypeWarning(value) { | |
| 5123 | - var type = getPreciseType(value); | |
| 5124 | - switch (type) { | |
| 5125 | - case 'array': | |
| 5126 | - case 'object': | |
| 5127 | - return 'an ' + type; | |
| 5128 | - case 'boolean': | |
| 5129 | - case 'date': | |
| 5130 | - case 'regexp': | |
| 5131 | - return 'a ' + type; | |
| 5132 | - default: | |
| 5133 | - return type; | |
| 5134 | - } | |
| 5135 | - } | |
| 5136 | - | |
| 5137 | - // Returns class name of the object, if any. | |
| 5138 | - function getClassName(propValue) { | |
| 5139 | - if (!propValue.constructor || !propValue.constructor.name) { | |
| 5140 | - return ANONYMOUS; | |
| 5141 | - } | |
| 5142 | - return propValue.constructor.name; | |
| 5143 | - } | |
| 5144 | - | |
| 5145 | - ReactPropTypes.checkPropTypes = checkPropTypes; | |
| 5146 | - ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; | |
| 5147 | - ReactPropTypes.PropTypes = ReactPropTypes; | |
| 5148 | - | |
| 5149 | - return ReactPropTypes; | |
| 5150 | -}; | |
| 5151 | - | |
| 5152 | - | |
| 5153 | -/***/ }), | |
| 5154 | - | |
| 5155 | -/***/ "../node_modules/prop-types/index.js": | |
| 5156 | -/*!*******************************************!*\ | |
| 5157 | - !*** ../node_modules/prop-types/index.js ***! | |
| 5158 | - \*******************************************/ | |
| 5159 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5160 | - | |
| 5161 | -/** | |
| 5162 | - * Copyright (c) 2013-present, Facebook, Inc. | |
| 5163 | - * | |
| 5164 | - * This source code is licensed under the MIT license found in the | |
| 5165 | - * LICENSE file in the root directory of this source tree. | |
| 5166 | - */ | |
| 5167 | - | |
| 5168 | -if (true) { | |
| 5169 | - var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); | |
| 5170 | - | |
| 5171 | - // By explicitly using `prop-types` you are opting into new development behavior. | |
| 5172 | - // http://fb.me/prop-types-in-prod | |
| 5173 | - var throwOnDirectAccess = true; | |
| 5174 | - module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess); | |
| 5175 | -} else // removed by dead control flow | |
| 5176 | -{} | |
| 5177 | - | |
| 5178 | - | |
| 5179 | -/***/ }), | |
| 5180 | - | |
| 5181 | -/***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js": | |
| 5182 | -/*!**************************************************************!*\ | |
| 5183 | - !*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***! | |
| 5184 | - \**************************************************************/ | |
| 5185 | -/***/ ((module) => { | |
| 5186 | - | |
| 5187 | -"use strict"; | |
| 5188 | -/** | |
| 5189 | - * Copyright (c) 2013-present, Facebook, Inc. | |
| 5190 | - * | |
| 5191 | - * This source code is licensed under the MIT license found in the | |
| 5192 | - * LICENSE file in the root directory of this source tree. | |
| 5193 | - */ | |
| 5194 | - | |
| 5195 | - | |
| 5196 | - | |
| 5197 | -var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; | |
| 5198 | - | |
| 5199 | -module.exports = ReactPropTypesSecret; | |
| 5200 | - | |
| 5201 | - | |
| 5202 | -/***/ }), | |
| 5203 | - | |
| 5204 | -/***/ "../node_modules/prop-types/lib/has.js": | |
| 5205 | -/*!*********************************************!*\ | |
| 5206 | - !*** ../node_modules/prop-types/lib/has.js ***! | |
| 5207 | - \*********************************************/ | |
| 5208 | -/***/ ((module) => { | |
| 5209 | - | |
| 5210 | -module.exports = Function.call.bind(Object.prototype.hasOwnProperty); | |
| 5211 | - | |
| 5212 | - | |
| 5213 | -/***/ }), | |
| 5214 | - | |
| 5215 | -/***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js": | |
| 5216 | -/*!************************************************************************************!*\ | |
| 5217 | - !*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***! | |
| 5218 | - \************************************************************************************/ | |
| 5219 | -/***/ ((__unused_webpack_module, exports) => { | |
| 5220 | - | |
| 5221 | -"use strict"; | |
| 5222 | -/** @license React v16.13.1 | |
| 5223 | - * react-is.development.js | |
| 5224 | - * | |
| 5225 | - * Copyright (c) Facebook, Inc. and its affiliates. | |
| 5226 | - * | |
| 5227 | - * This source code is licensed under the MIT license found in the | |
| 5228 | - * LICENSE file in the root directory of this source tree. | |
| 5229 | - */ | |
| 5230 | - | |
| 5231 | - | |
| 5232 | - | |
| 5233 | - | |
| 5234 | - | |
| 5235 | -if (true) { | |
| 5236 | - (function() { | |
| 5237 | -'use strict'; | |
| 5238 | - | |
| 5239 | -// The Symbol used to tag the ReactElement-like types. If there is no native Symbol | |
| 5240 | -// nor polyfill, then a plain number is used for performance. | |
| 5241 | -var hasSymbol = typeof Symbol === 'function' && Symbol.for; | |
| 5242 | -var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; | |
| 5243 | -var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; | |
| 5244 | -var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; | |
| 5245 | -var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; | |
| 5246 | -var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; | |
| 5247 | -var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; | |
| 5248 | -var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary | |
| 5249 | -// (unstable) APIs that have been removed. Can we remove the symbols? | |
| 5250 | - | |
| 5251 | -var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; | |
| 5252 | -var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; | |
| 5253 | -var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; | |
| 5254 | -var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; | |
| 5255 | -var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; | |
| 5256 | -var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; | |
| 5257 | -var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; | |
| 5258 | -var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; | |
| 5259 | -var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; | |
| 5260 | -var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; | |
| 5261 | -var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; | |
| 5262 | - | |
| 5263 | -function isValidElementType(type) { | |
| 5264 | - return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. | |
| 5265 | - 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); | |
| 5266 | -} | |
| 5267 | - | |
| 5268 | -function typeOf(object) { | |
| 5269 | - if (typeof object === 'object' && object !== null) { | |
| 5270 | - var $$typeof = object.$$typeof; | |
| 5271 | - | |
| 5272 | - switch ($$typeof) { | |
| 5273 | - case REACT_ELEMENT_TYPE: | |
| 5274 | - var type = object.type; | |
| 5275 | - | |
| 5276 | - switch (type) { | |
| 5277 | - case REACT_ASYNC_MODE_TYPE: | |
| 5278 | - case REACT_CONCURRENT_MODE_TYPE: | |
| 5279 | - case REACT_FRAGMENT_TYPE: | |
| 5280 | - case REACT_PROFILER_TYPE: | |
| 5281 | - case REACT_STRICT_MODE_TYPE: | |
| 5282 | - case REACT_SUSPENSE_TYPE: | |
| 5283 | - return type; | |
| 5284 | - | |
| 5285 | - default: | |
| 5286 | - var $$typeofType = type && type.$$typeof; | |
| 5287 | - | |
| 5288 | - switch ($$typeofType) { | |
| 5289 | - case REACT_CONTEXT_TYPE: | |
| 5290 | - case REACT_FORWARD_REF_TYPE: | |
| 5291 | - case REACT_LAZY_TYPE: | |
| 5292 | - case REACT_MEMO_TYPE: | |
| 5293 | - case REACT_PROVIDER_TYPE: | |
| 5294 | - return $$typeofType; | |
| 5295 | - | |
| 5296 | - default: | |
| 5297 | - return $$typeof; | |
| 5298 | - } | |
| 5299 | - | |
| 5300 | - } | |
| 5301 | - | |
| 5302 | - case REACT_PORTAL_TYPE: | |
| 5303 | - return $$typeof; | |
| 5304 | - } | |
| 5305 | - } | |
| 5306 | - | |
| 5307 | - return undefined; | |
| 5308 | -} // AsyncMode is deprecated along with isAsyncMode | |
| 5309 | - | |
| 5310 | -var AsyncMode = REACT_ASYNC_MODE_TYPE; | |
| 5311 | -var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; | |
| 5312 | -var ContextConsumer = REACT_CONTEXT_TYPE; | |
| 5313 | -var ContextProvider = REACT_PROVIDER_TYPE; | |
| 5314 | -var Element = REACT_ELEMENT_TYPE; | |
| 5315 | -var ForwardRef = REACT_FORWARD_REF_TYPE; | |
| 5316 | -var Fragment = REACT_FRAGMENT_TYPE; | |
| 5317 | -var Lazy = REACT_LAZY_TYPE; | |
| 5318 | -var Memo = REACT_MEMO_TYPE; | |
| 5319 | -var Portal = REACT_PORTAL_TYPE; | |
| 5320 | -var Profiler = REACT_PROFILER_TYPE; | |
| 5321 | -var StrictMode = REACT_STRICT_MODE_TYPE; | |
| 5322 | -var Suspense = REACT_SUSPENSE_TYPE; | |
| 5323 | -var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated | |
| 5324 | - | |
| 5325 | -function isAsyncMode(object) { | |
| 5326 | - { | |
| 5327 | - if (!hasWarnedAboutDeprecatedIsAsyncMode) { | |
| 5328 | - hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint | |
| 5329 | - | |
| 5330 | - 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.'); | |
| 5331 | - } | |
| 5332 | - } | |
| 5333 | - | |
| 5334 | - return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; | |
| 5335 | -} | |
| 5336 | -function isConcurrentMode(object) { | |
| 5337 | - return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; | |
| 5338 | -} | |
| 5339 | -function isContextConsumer(object) { | |
| 5340 | - return typeOf(object) === REACT_CONTEXT_TYPE; | |
| 5341 | -} | |
| 5342 | -function isContextProvider(object) { | |
| 5343 | - return typeOf(object) === REACT_PROVIDER_TYPE; | |
| 5344 | -} | |
| 5345 | -function isElement(object) { | |
| 5346 | - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | |
| 5347 | -} | |
| 5348 | -function isForwardRef(object) { | |
| 5349 | - return typeOf(object) === REACT_FORWARD_REF_TYPE; | |
| 5350 | -} | |
| 5351 | -function isFragment(object) { | |
| 5352 | - return typeOf(object) === REACT_FRAGMENT_TYPE; | |
| 5353 | -} | |
| 5354 | -function isLazy(object) { | |
| 5355 | - return typeOf(object) === REACT_LAZY_TYPE; | |
| 5356 | -} | |
| 5357 | -function isMemo(object) { | |
| 5358 | - return typeOf(object) === REACT_MEMO_TYPE; | |
| 5359 | -} | |
| 5360 | -function isPortal(object) { | |
| 5361 | - return typeOf(object) === REACT_PORTAL_TYPE; | |
| 5362 | -} | |
| 5363 | -function isProfiler(object) { | |
| 5364 | - return typeOf(object) === REACT_PROFILER_TYPE; | |
| 5365 | -} | |
| 5366 | -function isStrictMode(object) { | |
| 5367 | - return typeOf(object) === REACT_STRICT_MODE_TYPE; | |
| 5368 | -} | |
| 5369 | -function isSuspense(object) { | |
| 5370 | - return typeOf(object) === REACT_SUSPENSE_TYPE; | |
| 5371 | -} | |
| 5372 | - | |
| 5373 | -exports.AsyncMode = AsyncMode; | |
| 5374 | -exports.ConcurrentMode = ConcurrentMode; | |
| 5375 | -exports.ContextConsumer = ContextConsumer; | |
| 5376 | -exports.ContextProvider = ContextProvider; | |
| 5377 | -exports.Element = Element; | |
| 5378 | -exports.ForwardRef = ForwardRef; | |
| 5379 | -exports.Fragment = Fragment; | |
| 5380 | -exports.Lazy = Lazy; | |
| 5381 | -exports.Memo = Memo; | |
| 5382 | -exports.Portal = Portal; | |
| 5383 | -exports.Profiler = Profiler; | |
| 5384 | -exports.StrictMode = StrictMode; | |
| 5385 | -exports.Suspense = Suspense; | |
| 5386 | -exports.isAsyncMode = isAsyncMode; | |
| 5387 | -exports.isConcurrentMode = isConcurrentMode; | |
| 5388 | -exports.isContextConsumer = isContextConsumer; | |
| 5389 | -exports.isContextProvider = isContextProvider; | |
| 5390 | -exports.isElement = isElement; | |
| 5391 | -exports.isForwardRef = isForwardRef; | |
| 5392 | -exports.isFragment = isFragment; | |
| 5393 | -exports.isLazy = isLazy; | |
| 5394 | -exports.isMemo = isMemo; | |
| 5395 | -exports.isPortal = isPortal; | |
| 5396 | -exports.isProfiler = isProfiler; | |
| 5397 | -exports.isStrictMode = isStrictMode; | |
| 5398 | -exports.isSuspense = isSuspense; | |
| 5399 | -exports.isValidElementType = isValidElementType; | |
| 5400 | -exports.typeOf = typeOf; | |
| 5401 | - })(); | |
| 5402 | -} | |
| 5403 | - | |
| 5404 | - | |
| 5405 | -/***/ }), | |
| 5406 | - | |
| 5407 | -/***/ "../node_modules/prop-types/node_modules/react-is/index.js": | |
| 5408 | -/*!*****************************************************************!*\ | |
| 5409 | - !*** ../node_modules/prop-types/node_modules/react-is/index.js ***! | |
| 5410 | - \*****************************************************************/ | |
| 5411 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5412 | - | |
| 5413 | -"use strict"; | |
| 5414 | - | |
| 5415 | - | |
| 5416 | -if (false) // removed by dead control flow | |
| 5417 | -{} else { | |
| 5418 | - module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"); | |
| 5419 | -} | |
| 5420 | - | |
| 5421 | - | |
| 5422 | -/***/ }), | |
| 5423 | - | |
| 5424 | -/***/ "../node_modules/react-dom/client.js": | |
| 5425 | -/*!*******************************************!*\ | |
| 5426 | - !*** ../node_modules/react-dom/client.js ***! | |
| 5427 | - \*******************************************/ | |
| 5428 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 5429 | - | |
| 5430 | -"use strict"; | |
| 5431 | - | |
| 5432 | - | |
| 5433 | -var m = __webpack_require__(/*! react-dom */ "react-dom"); | |
| 5434 | -if (false) // removed by dead control flow | |
| 5435 | -{} else { | |
| 5436 | - var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | |
| 5437 | - exports.createRoot = function(c, o) { | |
| 5438 | - i.usingClientEntryPoint = true; | |
| 5439 | - try { | |
| 5440 | - return m.createRoot(c, o); | |
| 5441 | - } finally { | |
| 5442 | - i.usingClientEntryPoint = false; | |
| 5443 | - } | |
| 5444 | - }; | |
| 5445 | - exports.hydrateRoot = function(c, h, o) { | |
| 5446 | - i.usingClientEntryPoint = true; | |
| 5447 | - try { | |
| 5448 | - return m.hydrateRoot(c, h, o); | |
| 5449 | - } finally { | |
| 5450 | - i.usingClientEntryPoint = false; | |
| 5451 | - } | |
| 5452 | - }; | |
| 5453 | -} | |
| 5454 | - | |
| 5455 | - | |
| 5456 | -/***/ }), | |
| 5457 | - | |
| 5458 | -/***/ "../node_modules/tslib/tslib.es6.mjs": | |
| 5459 | -/*!*******************************************!*\ | |
| 5460 | - !*** ../node_modules/tslib/tslib.es6.mjs ***! | |
| 5461 | - \*******************************************/ | |
| 5462 | -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 5463 | - | |
| 5464 | -"use strict"; | |
| 5465 | -__webpack_require__.r(__webpack_exports__); | |
| 5466 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 5467 | -/* harmony export */ __addDisposableResource: () => (/* binding */ __addDisposableResource), | |
| 5468 | -/* harmony export */ __assign: () => (/* binding */ __assign), | |
| 5469 | -/* harmony export */ __asyncDelegator: () => (/* binding */ __asyncDelegator), | |
| 5470 | -/* harmony export */ __asyncGenerator: () => (/* binding */ __asyncGenerator), | |
| 5471 | -/* harmony export */ __asyncValues: () => (/* binding */ __asyncValues), | |
| 5472 | -/* harmony export */ __await: () => (/* binding */ __await), | |
| 5473 | -/* harmony export */ __awaiter: () => (/* binding */ __awaiter), | |
| 5474 | -/* harmony export */ __classPrivateFieldGet: () => (/* binding */ __classPrivateFieldGet), | |
| 5475 | -/* harmony export */ __classPrivateFieldIn: () => (/* binding */ __classPrivateFieldIn), | |
| 5476 | -/* harmony export */ __classPrivateFieldSet: () => (/* binding */ __classPrivateFieldSet), | |
| 5477 | -/* harmony export */ __createBinding: () => (/* binding */ __createBinding), | |
| 5478 | -/* harmony export */ __decorate: () => (/* binding */ __decorate), | |
| 5479 | -/* harmony export */ __disposeResources: () => (/* binding */ __disposeResources), | |
| 5480 | -/* harmony export */ __esDecorate: () => (/* binding */ __esDecorate), | |
| 5481 | -/* harmony export */ __exportStar: () => (/* binding */ __exportStar), | |
| 5482 | -/* harmony export */ __extends: () => (/* binding */ __extends), | |
| 5483 | -/* harmony export */ __generator: () => (/* binding */ __generator), | |
| 5484 | -/* harmony export */ __importDefault: () => (/* binding */ __importDefault), | |
| 5485 | -/* harmony export */ __importStar: () => (/* binding */ __importStar), | |
| 5486 | -/* harmony export */ __makeTemplateObject: () => (/* binding */ __makeTemplateObject), | |
| 5487 | -/* harmony export */ __metadata: () => (/* binding */ __metadata), | |
| 5488 | -/* harmony export */ __param: () => (/* binding */ __param), | |
| 5489 | -/* harmony export */ __propKey: () => (/* binding */ __propKey), | |
| 5490 | -/* harmony export */ __read: () => (/* binding */ __read), | |
| 5491 | -/* harmony export */ __rest: () => (/* binding */ __rest), | |
| 5492 | -/* harmony export */ __rewriteRelativeImportExtension: () => (/* binding */ __rewriteRelativeImportExtension), | |
| 5493 | -/* harmony export */ __runInitializers: () => (/* binding */ __runInitializers), | |
| 5494 | -/* harmony export */ __setFunctionName: () => (/* binding */ __setFunctionName), | |
| 5495 | -/* harmony export */ __spread: () => (/* binding */ __spread), | |
| 5496 | -/* harmony export */ __spreadArray: () => (/* binding */ __spreadArray), | |
| 5497 | -/* harmony export */ __spreadArrays: () => (/* binding */ __spreadArrays), | |
| 5498 | -/* harmony export */ __values: () => (/* binding */ __values), | |
| 5499 | -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 5500 | -/* harmony export */ }); | |
| 5501 | -/****************************************************************************** | |
| 5502 | -Copyright (c) Microsoft Corporation. | |
| 5503 | - | |
| 5504 | -Permission to use, copy, modify, and/or distribute this software for any | |
| 5505 | -purpose with or without fee is hereby granted. | |
| 5506 | - | |
| 5507 | -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | |
| 5508 | -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | |
| 5509 | -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | |
| 5510 | -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | |
| 5511 | -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | |
| 5512 | -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | |
| 5513 | -PERFORMANCE OF THIS SOFTWARE. | |
| 5514 | -***************************************************************************** */ | |
| 5515 | -/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ | |
| 5516 | - | |
| 5517 | -var extendStatics = function(d, b) { | |
| 5518 | - extendStatics = Object.setPrototypeOf || | |
| 5519 | - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | |
| 5520 | - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | |
| 5521 | - return extendStatics(d, b); | |
| 5522 | -}; | |
| 5523 | - | |
| 5524 | -function __extends(d, b) { | |
| 5525 | - if (typeof b !== "function" && b !== null) | |
| 5526 | - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | |
| 5527 | - extendStatics(d, b); | |
| 5528 | - function __() { this.constructor = d; } | |
| 5529 | - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
| 5530 | -} | |
| 5531 | - | |
| 5532 | -var __assign = function() { | |
| 5533 | - __assign = Object.assign || function __assign(t) { | |
| 5534 | - for (var s, i = 1, n = arguments.length; i < n; i++) { | |
| 5535 | - s = arguments[i]; | |
| 5536 | - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; | |
| 5537 | - } | |
| 5538 | - return t; | |
| 5539 | - } | |
| 5540 | - return __assign.apply(this, arguments); | |
| 5541 | -} | |
| 5542 | - | |
| 5543 | -function __rest(s, e) { | |
| 5544 | - var t = {}; | |
| 5545 | - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | |
| 5546 | - t[p] = s[p]; | |
| 5547 | - if (s != null && typeof Object.getOwnPropertySymbols === "function") | |
| 5548 | - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | |
| 5549 | - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | |
| 5550 | - t[p[i]] = s[p[i]]; | |
| 5551 | - } | |
| 5552 | - return t; | |
| 5553 | -} | |
| 5554 | - | |
| 5555 | -function __decorate(decorators, target, key, desc) { | |
| 5556 | - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | |
| 5557 | - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | |
| 5558 | - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | |
| 5559 | - return c > 3 && r && Object.defineProperty(target, key, r), r; | |
| 5560 | -} | |
| 5561 | - | |
| 5562 | -function __param(paramIndex, decorator) { | |
| 5563 | - return function (target, key) { decorator(target, key, paramIndex); } | |
| 5564 | -} | |
| 5565 | - | |
| 5566 | -function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { | |
| 5567 | - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } | |
| 5568 | - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; | |
| 5569 | - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; | |
| 5570 | - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); | |
| 5571 | - var _, done = false; | |
| 5572 | - for (var i = decorators.length - 1; i >= 0; i--) { | |
| 5573 | - var context = {}; | |
| 5574 | - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; | |
| 5575 | - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; | |
| 5576 | - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; | |
| 5577 | - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); | |
| 5578 | - if (kind === "accessor") { | |
| 5579 | - if (result === void 0) continue; | |
| 5580 | - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); | |
| 5581 | - if (_ = accept(result.get)) descriptor.get = _; | |
| 5582 | - if (_ = accept(result.set)) descriptor.set = _; | |
| 5583 | - if (_ = accept(result.init)) initializers.unshift(_); | |
| 5584 | - } | |
| 5585 | - else if (_ = accept(result)) { | |
| 5586 | - if (kind === "field") initializers.unshift(_); | |
| 5587 | - else descriptor[key] = _; | |
| 5588 | - } | |
| 5589 | - } | |
| 5590 | - if (target) Object.defineProperty(target, contextIn.name, descriptor); | |
| 5591 | - done = true; | |
| 5592 | -}; | |
| 5593 | - | |
| 5594 | -function __runInitializers(thisArg, initializers, value) { | |
| 5595 | - var useValue = arguments.length > 2; | |
| 5596 | - for (var i = 0; i < initializers.length; i++) { | |
| 5597 | - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); | |
| 5598 | - } | |
| 5599 | - return useValue ? value : void 0; | |
| 5600 | -}; | |
| 5601 | - | |
| 5602 | -function __propKey(x) { | |
| 5603 | - return typeof x === "symbol" ? x : "".concat(x); | |
| 5604 | -}; | |
| 5605 | - | |
| 5606 | -function __setFunctionName(f, name, prefix) { | |
| 5607 | - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; | |
| 5608 | - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); | |
| 5609 | -}; | |
| 5610 | - | |
| 5611 | -function __metadata(metadataKey, metadataValue) { | |
| 5612 | - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); | |
| 5613 | -} | |
| 5614 | - | |
| 5615 | -function __awaiter(thisArg, _arguments, P, generator) { | |
| 5616 | - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | |
| 5617 | - return new (P || (P = Promise))(function (resolve, reject) { | |
| 5618 | - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
| 5619 | - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
| 5620 | - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | |
| 5621 | - step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
| 5622 | - }); | |
| 5623 | -} | |
| 5624 | - | |
| 5625 | -function __generator(thisArg, body) { | |
| 5626 | - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); | |
| 5627 | - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | |
| 5628 | - function verb(n) { return function (v) { return step([n, v]); }; } | |
| 5629 | - function step(op) { | |
| 5630 | - if (f) throw new TypeError("Generator is already executing."); | |
| 5631 | - while (g && (g = 0, op[0] && (_ = 0)), _) try { | |
| 5632 | - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | |
| 5633 | - if (y = 0, t) op = [op[0] & 2, t.value]; | |
| 5634 | - switch (op[0]) { | |
| 5635 | - case 0: case 1: t = op; break; | |
| 5636 | - case 4: _.label++; return { value: op[1], done: false }; | |
| 5637 | - case 5: _.label++; y = op[1]; op = [0]; continue; | |
| 5638 | - case 7: op = _.ops.pop(); _.trys.pop(); continue; | |
| 5639 | - default: | |
| 5640 | - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | |
| 5641 | - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | |
| 5642 | - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | |
| 5643 | - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | |
| 5644 | - if (t[2]) _.ops.pop(); | |
| 5645 | - _.trys.pop(); continue; | |
| 5646 | - } | |
| 5647 | - op = body.call(thisArg, _); | |
| 5648 | - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | |
| 5649 | - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | |
| 5650 | - } | |
| 5651 | -} | |
| 5652 | - | |
| 5653 | -var __createBinding = Object.create ? (function(o, m, k, k2) { | |
| 5654 | - if (k2 === undefined) k2 = k; | |
| 5655 | - var desc = Object.getOwnPropertyDescriptor(m, k); | |
| 5656 | - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | |
| 5657 | - desc = { enumerable: true, get: function() { return m[k]; } }; | |
| 5658 | - } | |
| 5659 | - Object.defineProperty(o, k2, desc); | |
| 5660 | -}) : (function(o, m, k, k2) { | |
| 5661 | - if (k2 === undefined) k2 = k; | |
| 5662 | - o[k2] = m[k]; | |
| 5663 | -}); | |
| 5664 | - | |
| 5665 | -function __exportStar(m, o) { | |
| 5666 | - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); | |
| 5667 | -} | |
| 5668 | - | |
| 5669 | -function __values(o) { | |
| 5670 | - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | |
| 5671 | - if (m) return m.call(o); | |
| 5672 | - if (o && typeof o.length === "number") return { | |
| 5673 | - next: function () { | |
| 5674 | - if (o && i >= o.length) o = void 0; | |
| 5675 | - return { value: o && o[i++], done: !o }; | |
| 5676 | - } | |
| 5677 | - }; | |
| 5678 | - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | |
| 5679 | -} | |
| 5680 | - | |
| 5681 | -function __read(o, n) { | |
| 5682 | - var m = typeof Symbol === "function" && o[Symbol.iterator]; | |
| 5683 | - if (!m) return o; | |
| 5684 | - var i = m.call(o), r, ar = [], e; | |
| 5685 | - try { | |
| 5686 | - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | |
| 5687 | - } | |
| 5688 | - catch (error) { e = { error: error }; } | |
| 5689 | - finally { | |
| 5690 | - try { | |
| 5691 | - if (r && !r.done && (m = i["return"])) m.call(i); | |
| 5692 | - } | |
| 5693 | - finally { if (e) throw e.error; } | |
| 5694 | - } | |
| 5695 | - return ar; | |
| 5696 | -} | |
| 5697 | - | |
| 5698 | -/** @deprecated */ | |
| 5699 | -function __spread() { | |
| 5700 | - for (var ar = [], i = 0; i < arguments.length; i++) | |
| 5701 | - ar = ar.concat(__read(arguments[i])); | |
| 5702 | - return ar; | |
| 5703 | -} | |
| 5704 | - | |
| 5705 | -/** @deprecated */ | |
| 5706 | -function __spreadArrays() { | |
| 5707 | - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; | |
| 5708 | - for (var r = Array(s), k = 0, i = 0; i < il; i++) | |
| 5709 | - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | |
| 5710 | - r[k] = a[j]; | |
| 5711 | - return r; | |
| 5712 | -} | |
| 5713 | - | |
| 5714 | -function __spreadArray(to, from, pack) { | |
| 5715 | - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | |
| 5716 | - if (ar || !(i in from)) { | |
| 5717 | - if (!ar) ar = Array.prototype.slice.call(from, 0, i); | |
| 5718 | - ar[i] = from[i]; | |
| 5719 | - } | |
| 5720 | - } | |
| 5721 | - return to.concat(ar || Array.prototype.slice.call(from)); | |
| 5722 | -} | |
| 5723 | - | |
| 5724 | -function __await(v) { | |
| 5725 | - return this instanceof __await ? (this.v = v, this) : new __await(v); | |
| 5726 | -} | |
| 5727 | - | |
| 5728 | -function __asyncGenerator(thisArg, _arguments, generator) { | |
| 5729 | - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | |
| 5730 | - var g = generator.apply(thisArg, _arguments || []), i, q = []; | |
| 5731 | - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; | |
| 5732 | - function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } | |
| 5733 | - function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } | |
| 5734 | - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } | |
| 5735 | - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } | |
| 5736 | - function fulfill(value) { resume("next", value); } | |
| 5737 | - function reject(value) { resume("throw", value); } | |
| 5738 | - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } | |
| 5739 | -} | |
| 5740 | - | |
| 5741 | -function __asyncDelegator(o) { | |
| 5742 | - var i, p; | |
| 5743 | - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; | |
| 5744 | - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } | |
| 5745 | -} | |
| 5746 | - | |
| 5747 | -function __asyncValues(o) { | |
| 5748 | - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | |
| 5749 | - var m = o[Symbol.asyncIterator], i; | |
| 5750 | - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); | |
| 5751 | - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } | |
| 5752 | - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } | |
| 5753 | -} | |
| 5754 | - | |
| 5755 | -function __makeTemplateObject(cooked, raw) { | |
| 5756 | - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } | |
| 5757 | - return cooked; | |
| 5758 | -}; | |
| 5759 | - | |
| 5760 | -var __setModuleDefault = Object.create ? (function(o, v) { | |
| 5761 | - Object.defineProperty(o, "default", { enumerable: true, value: v }); | |
| 5762 | -}) : function(o, v) { | |
| 5763 | - o["default"] = v; | |
| 5764 | -}; | |
| 5765 | - | |
| 5766 | -var ownKeys = function(o) { | |
| 5767 | - ownKeys = Object.getOwnPropertyNames || function (o) { | |
| 5768 | - var ar = []; | |
| 5769 | - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; | |
| 5770 | - return ar; | |
| 5771 | - }; | |
| 5772 | - return ownKeys(o); | |
| 5773 | -}; | |
| 5774 | - | |
| 5775 | -function __importStar(mod) { | |
| 5776 | - if (mod && mod.__esModule) return mod; | |
| 5777 | - var result = {}; | |
| 5778 | - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); | |
| 5779 | - __setModuleDefault(result, mod); | |
| 5780 | - return result; | |
| 5781 | -} | |
| 5782 | - | |
| 5783 | -function __importDefault(mod) { | |
| 5784 | - return (mod && mod.__esModule) ? mod : { default: mod }; | |
| 5785 | -} | |
| 5786 | - | |
| 5787 | -function __classPrivateFieldGet(receiver, state, kind, f) { | |
| 5788 | - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); | |
| 5789 | - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); | |
| 5790 | - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); | |
| 5791 | -} | |
| 5792 | - | |
| 5793 | -function __classPrivateFieldSet(receiver, state, value, kind, f) { | |
| 5794 | - if (kind === "m") throw new TypeError("Private method is not writable"); | |
| 5795 | - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); | |
| 5796 | - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); | |
| 5797 | - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; | |
| 5798 | -} | |
| 5799 | - | |
| 5800 | -function __classPrivateFieldIn(state, receiver) { | |
| 5801 | - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); | |
| 5802 | - return typeof state === "function" ? receiver === state : state.has(receiver); | |
| 5803 | -} | |
| 5804 | - | |
| 5805 | -function __addDisposableResource(env, value, async) { | |
| 5806 | - if (value !== null && value !== void 0) { | |
| 5807 | - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); | |
| 5808 | - var dispose, inner; | |
| 5809 | - if (async) { | |
| 5810 | - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); | |
| 5811 | - dispose = value[Symbol.asyncDispose]; | |
| 5812 | - } | |
| 5813 | - if (dispose === void 0) { | |
| 5814 | - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); | |
| 5815 | - dispose = value[Symbol.dispose]; | |
| 5816 | - if (async) inner = dispose; | |
| 5817 | - } | |
| 5818 | - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); | |
| 5819 | - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; | |
| 5820 | - env.stack.push({ value: value, dispose: dispose, async: async }); | |
| 5821 | - } | |
| 5822 | - else if (async) { | |
| 5823 | - env.stack.push({ async: true }); | |
| 5824 | - } | |
| 5825 | - return value; | |
| 5826 | -} | |
| 5827 | - | |
| 5828 | -var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { | |
| 5829 | - var e = new Error(message); | |
| 5830 | - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; | |
| 5831 | -}; | |
| 5832 | - | |
| 5833 | -function __disposeResources(env) { | |
| 5834 | - function fail(e) { | |
| 5835 | - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; | |
| 5836 | - env.hasError = true; | |
| 5837 | - } | |
| 5838 | - var r, s = 0; | |
| 5839 | - function next() { | |
| 5840 | - while (r = env.stack.pop()) { | |
| 5841 | - try { | |
| 5842 | - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); | |
| 5843 | - if (r.dispose) { | |
| 5844 | - var result = r.dispose.call(r.value); | |
| 5845 | - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); | |
| 5846 | - } | |
| 5847 | - else s |= 1; | |
| 5848 | - } | |
| 5849 | - catch (e) { | |
| 5850 | - fail(e); | |
| 5851 | - } | |
| 5852 | - } | |
| 5853 | - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); | |
| 5854 | - if (env.hasError) throw env.error; | |
| 5855 | - } | |
| 5856 | - return next(); | |
| 5857 | -} | |
| 5858 | - | |
| 5859 | -function __rewriteRelativeImportExtension(path, preserveJsx) { | |
| 5860 | - if (typeof path === "string" && /^\.\.?\//.test(path)) { | |
| 5861 | - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { | |
| 5862 | - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); | |
| 5863 | - }); | |
| 5864 | - } | |
| 5865 | - return path; | |
| 5866 | -} | |
| 5867 | - | |
| 5868 | -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ | |
| 5869 | - __extends, | |
| 5870 | - __assign, | |
| 5871 | - __rest, | |
| 5872 | - __decorate, | |
| 5873 | - __param, | |
| 5874 | - __esDecorate, | |
| 5875 | - __runInitializers, | |
| 5876 | - __propKey, | |
| 5877 | - __setFunctionName, | |
| 5878 | - __metadata, | |
| 5879 | - __awaiter, | |
| 5880 | - __generator, | |
| 5881 | - __createBinding, | |
| 5882 | - __exportStar, | |
| 5883 | - __values, | |
| 5884 | - __read, | |
| 5885 | - __spread, | |
| 5886 | - __spreadArrays, | |
| 5887 | - __spreadArray, | |
| 5888 | - __await, | |
| 5889 | - __asyncGenerator, | |
| 5890 | - __asyncDelegator, | |
| 5891 | - __asyncValues, | |
| 5892 | - __makeTemplateObject, | |
| 5893 | - __importStar, | |
| 5894 | - __importDefault, | |
| 5895 | - __classPrivateFieldGet, | |
| 5896 | - __classPrivateFieldSet, | |
| 5897 | - __classPrivateFieldIn, | |
| 5898 | - __addDisposableResource, | |
| 5899 | - __disposeResources, | |
| 5900 | - __rewriteRelativeImportExtension, | |
| 5901 | -}); | |
| 5902 | - | |
| 5903 | - | |
| 5904 | -/***/ }), | |
| 5905 | - | |
| 5906 | -/***/ "@elementor/icons": | |
| 5907 | -/*!************************************!*\ | |
| 5908 | - !*** external "elementorV2.icons" ***! | |
| 5909 | - \************************************/ | |
| 5910 | -/***/ ((module) => { | |
| 5911 | - | |
| 5912 | -"use strict"; | |
| 5913 | -module.exports = elementorV2.icons; | |
| 5914 | - | |
| 5915 | -/***/ }), | |
| 5916 | - | |
| 5917 | -/***/ "@elementor/ui": | |
| 5918 | -/*!*********************************!*\ | |
| 5919 | - !*** external "elementorV2.ui" ***! | |
| 5920 | - \*********************************/ | |
| 5921 | -/***/ ((module) => { | |
| 5922 | - | |
| 5923 | -"use strict"; | |
| 5924 | -module.exports = elementorV2.ui; | |
| 5925 | - | |
| 5926 | -/***/ }), | |
| 5927 | - | |
| 5928 | -/***/ "@wordpress/components": | |
| 5929 | -/*!********************************!*\ | |
| 5930 | - !*** external "wp.components" ***! | |
| 5931 | - \********************************/ | |
| 5932 | -/***/ ((module) => { | |
| 5933 | - | |
| 5934 | -"use strict"; | |
| 5935 | -module.exports = wp.components; | |
| 5936 | - | |
| 5937 | -/***/ }), | |
| 5938 | - | |
| 5939 | -/***/ "@wordpress/dom-ready": | |
| 5940 | -/*!******************************!*\ | |
| 5941 | - !*** external "wp.domReady" ***! | |
| 5942 | - \******************************/ | |
| 5943 | -/***/ ((module) => { | |
| 5944 | - | |
| 5945 | -"use strict"; | |
| 5946 | -module.exports = wp.domReady; | |
| 5947 | - | |
| 5948 | -/***/ }), | |
| 5949 | - | |
| 5950 | -/***/ "@wordpress/i18n": | |
| 5951 | -/*!**************************!*\ | |
| 5952 | - !*** external "wp.i18n" ***! | |
| 5953 | - \**************************/ | |
| 5954 | -/***/ ((module) => { | |
| 5955 | - | |
| 5956 | -"use strict"; | |
| 5957 | -module.exports = wp.i18n; | |
| 5958 | - | |
| 5959 | -/***/ }), | |
| 5960 | - | |
| 5961 | -/***/ "react": | |
| 5962 | -/*!************************!*\ | |
| 5963 | - !*** external "React" ***! | |
| 5964 | - \************************/ | |
| 5965 | -/***/ ((module) => { | |
| 5966 | - | |
| 5967 | -"use strict"; | |
| 5968 | -module.exports = React; | |
| 5969 | - | |
| 5970 | -/***/ }), | |
| 5971 | - | |
| 5972 | -/***/ "react-dom": | |
| 5973 | -/*!***************************!*\ | |
| 5974 | - !*** external "ReactDOM" ***! | |
| 5975 | - \***************************/ | |
| 5976 | -/***/ ((module) => { | |
| 5977 | - | |
| 5978 | -"use strict"; | |
| 5979 | -module.exports = ReactDOM; | |
| 5980 | - | |
| 5981 | -/***/ }) | |
| 5982 | - | |
| 5983 | -/******/ }); | |
| 5984 | -/************************************************************************/ | |
| 5985 | -/******/ // The module cache | |
| 5986 | -/******/ var __webpack_module_cache__ = {}; | |
| 5987 | -/******/ | |
| 5988 | -/******/ // The require function | |
| 5989 | -/******/ function __webpack_require__(moduleId) { | |
| 5990 | -/******/ // Check if module is in cache | |
| 5991 | -/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 5992 | -/******/ if (cachedModule !== undefined) { | |
| 5993 | -/******/ return cachedModule.exports; | |
| 5994 | -/******/ } | |
| 5995 | -/******/ // Create a new module (and put it into the cache) | |
| 5996 | -/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 5997 | -/******/ // no module.id needed | |
| 5998 | -/******/ // no module.loaded needed | |
| 5999 | -/******/ exports: {} | |
| 6000 | -/******/ }; | |
| 6001 | -/******/ | |
| 6002 | -/******/ // Execute the module function | |
| 6003 | -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 6004 | -/******/ | |
| 6005 | -/******/ // Return the exports of the module | |
| 6006 | -/******/ return module.exports; | |
| 6007 | -/******/ } | |
| 6008 | -/******/ | |
| 6009 | -/************************************************************************/ | |
| 6010 | -/******/ /* webpack/runtime/compat get default export */ | |
| 6011 | -/******/ (() => { | |
| 6012 | -/******/ // getDefaultExport function for compatibility with non-harmony modules | |
| 6013 | -/******/ __webpack_require__.n = (module) => { | |
| 6014 | -/******/ var getter = module && module.__esModule ? | |
| 6015 | -/******/ () => (module['default']) : | |
| 6016 | -/******/ () => (module); | |
| 6017 | -/******/ __webpack_require__.d(getter, { a: getter }); | |
| 6018 | -/******/ return getter; | |
| 6019 | -/******/ }; | |
| 6020 | -/******/ })(); | |
| 6021 | -/******/ | |
| 6022 | -/******/ /* webpack/runtime/define property getters */ | |
| 6023 | -/******/ (() => { | |
| 6024 | -/******/ // define getter functions for harmony exports | |
| 6025 | -/******/ __webpack_require__.d = (exports, definition) => { | |
| 6026 | -/******/ for(var key in definition) { | |
| 6027 | -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 6028 | -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 6029 | -/******/ } | |
| 6030 | -/******/ } | |
| 6031 | -/******/ }; | |
| 6032 | -/******/ })(); | |
| 6033 | -/******/ | |
| 6034 | -/******/ /* webpack/runtime/hasOwnProperty shorthand */ | |
| 6035 | -/******/ (() => { | |
| 6036 | -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) | |
| 6037 | -/******/ })(); | |
| 6038 | -/******/ | |
| 6039 | -/******/ /* webpack/runtime/make namespace object */ | |
| 6040 | -/******/ (() => { | |
| 6041 | -/******/ // define __esModule on exports | |
| 6042 | -/******/ __webpack_require__.r = (exports) => { | |
| 6043 | -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
| 6044 | -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | |
| 6045 | -/******/ } | |
| 6046 | -/******/ Object.defineProperty(exports, '__esModule', { value: true }); | |
| 6047 | -/******/ }; | |
| 6048 | -/******/ })(); | |
| 6049 | -/******/ | |
| 6050 | -/************************************************************************/ | |
| 6051 | -var __webpack_exports__ = {}; | |
| 6052 | -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 6053 | -(() => { | |
| 6054 | -"use strict"; | |
| 6055 | -/*!*****************************************************!*\ | |
| 6056 | - !*** ../modules/element-manager/assets/js/admin.js ***! | |
| 6057 | - \*****************************************************/ | |
| 6058 | - | |
| 6059 | - | |
| 6060 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 6061 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 6062 | -var _element = __webpack_require__(/*! @wordpress/element */ "../node_modules/@wordpress/element/build-module/index.js"); | |
| 6063 | -var _domReady = _interopRequireDefault(__webpack_require__(/*! @wordpress/dom-ready */ "@wordpress/dom-ready")); | |
| 6064 | -var _appEditorOne = __webpack_require__(/*! ./app-editor-one */ "../modules/element-manager/assets/js/app-editor-one/index.js"); | |
| 6065 | -(0, _domReady.default)(function () { | |
| 6066 | - var htmlOutput = document.getElementById('elementor-element-manager-wrap'); | |
| 6067 | - if (!htmlOutput) { | |
| 6068 | - return; | |
| 6069 | - } | |
| 6070 | - var root = (0, _element.createRoot)(htmlOutput); | |
| 6071 | - root.render(/*#__PURE__*/_react.default.createElement(_appEditorOne.AppModern, null)); | |
| 6072 | -}); | |
| 6073 | -})(); | |
| 6074 | - | |
| 6075 | -/******/ })() | |
| 6076 | -; | |
| 2572 | +//#endregion | |
| 2573 | +})(React, wp.domReady, elementorV2.ui, wp.i18n, elementorV2.icons, wp.components); | |
| 6077 | 2574 | //# sourceMappingURL=element-manager-admin.js.map |