| 1 |
/*! elementor - v3.11.1 - 15-02-2023 */ |
| 2 |
/******/ (() => { // webpackBootstrap |
| 3 |
/******/ var __webpack_modules__ = ({ |
| 4 |
|
| 5 |
/***/ "../core/common/assets/js/utils/environment.js": |
| 6 |
/*!*****************************************************!*\ |
| 7 |
!*** ../core/common/assets/js/utils/environment.js ***! |
| 8 |
\*****************************************************/ |
| 9 |
/***/ ((__unused_webpack_module, exports) => { |
| 10 |
|
| 11 |
"use strict"; |
| 12 |
|
| 13 |
|
| 14 |
Object.defineProperty(exports, "__esModule", ({ |
| 15 |
value: true |
| 16 |
})); |
| 17 |
exports["default"] = void 0; |
| 18 |
var matchUserAgent = function matchUserAgent(UserAgentStr) { |
| 19 |
return userAgent.indexOf(UserAgentStr) >= 0; |
| 20 |
}, |
| 21 |
userAgent = navigator.userAgent, |
| 22 |
// Solution influenced by https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser |
| 23 |
|
| 24 |
// Opera 8.0+ |
| 25 |
isOpera = !!window.opr && !!opr.addons || !!window.opera || matchUserAgent(' OPR/'), |
| 26 |
// Firefox 1.0+ |
| 27 |
isFirefox = matchUserAgent('Firefox'), |
| 28 |
// Safari 3.0+ "[object HTMLElementConstructor]" |
| 29 |
isSafari = /^((?!chrome|android).)*safari/i.test(userAgent) || /constructor/i.test(window.HTMLElement) || function (p) { |
| 30 |
return '[object SafariRemoteNotification]' === p.toString(); |
| 31 |
}(!window.safari || typeof safari !== 'undefined' && safari.pushNotification), |
| 32 |
// Internet Explorer 6-11 |
| 33 |
isIE = /Trident|MSIE/.test(userAgent) && ( /* @cc_on!@*/ false || !!document.documentMode), |
| 34 |
// Edge 20+ |
| 35 |
isEdge = !isIE && !!window.StyleMedia || matchUserAgent('Edg'), |
| 36 |
// Google Chrome (Not accurate) |
| 37 |
isChrome = !!window.chrome && matchUserAgent('Chrome') && !(isEdge || isOpera), |
| 38 |
// Blink engine |
| 39 |
isBlink = matchUserAgent('Chrome') && !!window.CSS, |
| 40 |
// Apple Webkit engine |
| 41 |
isAppleWebkit = matchUserAgent('AppleWebKit') && !isBlink, |
| 42 |
environment = { |
| 43 |
appleWebkit: isAppleWebkit, |
| 44 |
blink: isBlink, |
| 45 |
chrome: isChrome, |
| 46 |
edge: isEdge, |
| 47 |
firefox: isFirefox, |
| 48 |
ie: isIE, |
| 49 |
mac: matchUserAgent('Macintosh'), |
| 50 |
opera: isOpera, |
| 51 |
safari: isSafari, |
| 52 |
webkit: matchUserAgent('AppleWebKit') |
| 53 |
}; |
| 54 |
var _default = environment; |
| 55 |
exports["default"] = _default; |
| 56 |
|
| 57 |
/***/ }), |
| 58 |
|
| 59 |
/***/ "../modules/admin-top-bar/assets/js/admin-top-bar.js": |
| 60 |
/*!***********************************************************!*\ |
| 61 |
!*** ../modules/admin-top-bar/assets/js/admin-top-bar.js ***! |
| 62 |
\***********************************************************/ |
| 63 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 64 |
|
| 65 |
"use strict"; |
| 66 |
/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; |
| 67 |
|
| 68 |
|
| 69 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 70 |
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 71 |
Object.defineProperty(exports, "__esModule", ({ |
| 72 |
value: true |
| 73 |
})); |
| 74 |
exports["default"] = AdminTopBar; |
| 75 |
var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 76 |
var _barButton = _interopRequireDefault(__webpack_require__(/*! ./components/bar-button/bar-button */ "../modules/admin-top-bar/assets/js/components/bar-button/bar-button.js")); |
| 77 |
var _barHeading = _interopRequireDefault(__webpack_require__(/*! ./components/bar-heading/bar-heading */ "../modules/admin-top-bar/assets/js/components/bar-heading/bar-heading.js")); |
| 78 |
var _connectionButton = _interopRequireDefault(__webpack_require__(/*! ./components/connection-button/connection-button */ "../modules/admin-top-bar/assets/js/components/connection-button/connection-button.js")); |
| 79 |
var _usePageTitle = __webpack_require__(/*! ./hooks/use-page-title/use-page-title */ "../modules/admin-top-bar/assets/js/hooks/use-page-title/use-page-title.js"); |
| 80 |
var _environment = _interopRequireDefault(__webpack_require__(/*! elementor-common/utils/environment */ "../core/common/assets/js/utils/environment.js")); |
| 81 |
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } |
| 82 |
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
| 83 |
function AdminTopBar() { |
| 84 |
var actionButtonsRef = (0, _react.useRef)(); |
| 85 |
|
| 86 |
// Handle Top Bar visibility on initiation: Indicate that the admin top bar is visible and the page content needs to push down below the admin top bar for visibility. |
| 87 |
(0, _react.useEffect)(function () { |
| 88 |
var adminTopBarElement = document.querySelector('#e-admin-top-bar-root'); |
| 89 |
adminTopBarElement.classList.add('e-admin-top-bar--active'); |
| 90 |
}, []); |
| 91 |
|
| 92 |
// Handle the page title visibility in admin top bar. |
| 93 |
var pageTitleText = (0, _usePageTitle.usePageTitle)(); |
| 94 |
|
| 95 |
// Handle the action buttons visibility in admin top bar on initiation. |
| 96 |
(0, _react.useEffect)(function () { |
| 97 |
var actionButtonElements = document.querySelectorAll('.page-title-action'); |
| 98 |
actionButtonElements.forEach(function (actionButtonElement) { |
| 99 |
actionButtonsRef.current.appendChild(actionButtonElement); |
| 100 |
}); |
| 101 |
}, []); |
| 102 |
var finderAction = function finderAction() { |
| 103 |
$e.route('finder'); |
| 104 |
}; |
| 105 |
var controlSign = _environment.default.mac ? '⌘' : '^'; |
| 106 |
var finderTooltipText = __('Search or do anything in Elementor', 'elementor') + " ".concat(controlSign, "+E"); |
| 107 |
return /*#__PURE__*/_react.default.createElement("div", { |
| 108 |
className: "e-admin-top-bar" |
| 109 |
}, /*#__PURE__*/_react.default.createElement("div", { |
| 110 |
className: "e-admin-top-bar__main-area" |
| 111 |
}, /*#__PURE__*/_react.default.createElement(_barHeading.default, null, pageTitleText), /*#__PURE__*/_react.default.createElement("div", { |
| 112 |
className: "e-admin-top-bar__main-area-buttons", |
| 113 |
ref: actionButtonsRef |
| 114 |
})), /*#__PURE__*/_react.default.createElement("div", { |
| 115 |
className: "e-admin-top-bar__secondary-area" |
| 116 |
}, /*#__PURE__*/_react.default.createElement("div", { |
| 117 |
className: "e-admin-top-bar__secondary-area-buttons" |
| 118 |
}, window.elementorAdminTopBarConfig.is_administrator ? /*#__PURE__*/_react.default.createElement(_barButton.default, { |
| 119 |
onClick: finderAction, |
| 120 |
dataInfo: finderTooltipText, |
| 121 |
icon: "eicon-search-bold" |
| 122 |
}, __('Finder', 'elementor')) : '', window.elementorCloudAdmin ? window.elementorCloudAdmin() : ''), /*#__PURE__*/_react.default.createElement(_connectionButton.default, null))); |
| 123 |
} |
| 124 |
|
| 125 |
/***/ }), |
| 126 |
|
| 127 |
/***/ "../modules/admin-top-bar/assets/js/components/bar-button/bar-button.js": |
| 128 |
/*!******************************************************************************!*\ |
| 129 |
!*** ../modules/admin-top-bar/assets/js/components/bar-button/bar-button.js ***! |
| 130 |
\******************************************************************************/ |
| 131 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 132 |
|
| 133 |
"use strict"; |
| 134 |
/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); |
| 135 |
|
| 136 |
|
| 137 |
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 138 |
Object.defineProperty(exports, "__esModule", ({ |
| 139 |
value: true |
| 140 |
})); |
| 141 |
exports["default"] = BarButton; |
| 142 |
var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 143 |
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } |
| 144 |
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
| 145 |
function BarButton(props) { |
| 146 |
(0, _react.useEffect)(function () { |
| 147 |
if (props.dataInfo) { |
| 148 |
jQuery('.e-admin-top-bar__bar-button[data-info]').tipsy({ |
| 149 |
title: function title() { |
| 150 |
return this.getAttribute('data-info'); |
| 151 |
}, |
| 152 |
gravity: function gravity() { |
| 153 |
return 'n'; |
| 154 |
}, |
| 155 |
delayIn: 400, |
| 156 |
offset: 1 |
| 157 |
}); |
| 158 |
} |
| 159 |
}, []); |
| 160 |
return /*#__PURE__*/_react.default.createElement("a", { |
| 161 |
className: "e-admin-top-bar__bar-button", |
| 162 |
ref: props.buttonRef, |
| 163 |
onClick: props.onClick, |
| 164 |
"data-info": props.dataInfo, |
| 165 |
href: props.href, |
| 166 |
target: props.target |
| 167 |
}, /*#__PURE__*/_react.default.createElement("i", { |
| 168 |
className: "e-admin-top-bar__bar-button-icon ".concat(props.icon) |
| 169 |
}), /*#__PURE__*/_react.default.createElement("h1", { |
| 170 |
className: "e-admin-top-bar__bar-button-title" |
| 171 |
}, props.children)); |
| 172 |
} |
| 173 |
BarButton.propTypes = { |
| 174 |
children: PropTypes.any, |
| 175 |
dataInfo: PropTypes.string, |
| 176 |
icon: PropTypes.any, |
| 177 |
onClick: PropTypes.func, |
| 178 |
buttonRef: PropTypes.object, |
| 179 |
href: PropTypes.string, |
| 180 |
target: PropTypes.string |
| 181 |
}; |
| 182 |
|
| 183 |
/***/ }), |
| 184 |
|
| 185 |
/***/ "../modules/admin-top-bar/assets/js/components/bar-heading/bar-heading.js": |
| 186 |
/*!********************************************************************************!*\ |
| 187 |
!*** ../modules/admin-top-bar/assets/js/components/bar-heading/bar-heading.js ***! |
| 188 |
\********************************************************************************/ |
| 189 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 190 |
|
| 191 |
"use strict"; |
| 192 |
/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); |
| 193 |
|
| 194 |
|
| 195 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 196 |
Object.defineProperty(exports, "__esModule", ({ |
| 197 |
value: true |
| 198 |
})); |
| 199 |
exports["default"] = BarHeading; |
| 200 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 201 |
function BarHeading(props) { |
| 202 |
return /*#__PURE__*/_react.default.createElement("div", { |
| 203 |
className: "e-admin-top-bar__heading" |
| 204 |
}, /*#__PURE__*/_react.default.createElement("div", { |
| 205 |
className: "e-admin-top-bar__heading-logo" |
| 206 |
}, /*#__PURE__*/_react.default.createElement("i", { |
| 207 |
className: "eicon-elementor", |
| 208 |
"aria-hidden": "true" |
| 209 |
})), /*#__PURE__*/_react.default.createElement("h1", { |
| 210 |
className: "e-admin-top-bar__heading-title" |
| 211 |
}, props.children)); |
| 212 |
} |
| 213 |
BarHeading.propTypes = { |
| 214 |
children: PropTypes.any |
| 215 |
}; |
| 216 |
|
| 217 |
/***/ }), |
| 218 |
|
| 219 |
/***/ "../modules/admin-top-bar/assets/js/components/connection-button/connection-button.js": |
| 220 |
/*!********************************************************************************************!*\ |
| 221 |
!*** ../modules/admin-top-bar/assets/js/components/connection-button/connection-button.js ***! |
| 222 |
\********************************************************************************************/ |
| 223 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 224 |
|
| 225 |
"use strict"; |
| 226 |
/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; |
| 227 |
|
| 228 |
|
| 229 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 230 |
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 231 |
Object.defineProperty(exports, "__esModule", ({ |
| 232 |
value: true |
| 233 |
})); |
| 234 |
exports["default"] = ConnectionButton; |
| 235 |
var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 236 |
var _barButton = _interopRequireDefault(__webpack_require__(/*! ../bar-button/bar-button */ "../modules/admin-top-bar/assets/js/components/bar-button/bar-button.js")); |
| 237 |
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } |
| 238 |
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
| 239 |
function ConnectionButton() { |
| 240 |
var buttonRef = (0, _react.useRef)(); |
| 241 |
var isUserConnected = elementorAdminTopBarConfig.is_user_connected; |
| 242 |
(0, _react.useEffect)(function () { |
| 243 |
if (!buttonRef.current || isUserConnected) { |
| 244 |
return; |
| 245 |
} |
| 246 |
jQuery(buttonRef.current).elementorConnect(); |
| 247 |
}, []); |
| 248 |
var tooltipText = __('Connect your account to get access to Elementor\'s Template Library & more.', 'elementor'), |
| 249 |
connectUrl = elementorAdminTopBarConfig.connect_url, |
| 250 |
buttonText = __('Connect Account', 'elementor'), |
| 251 |
targetUrl = '_self'; |
| 252 |
if (isUserConnected) { |
| 253 |
tooltipText = ''; |
| 254 |
connectUrl = 'https://go.elementor.com/wp-dash-admin-bar-account/'; |
| 255 |
buttonText = __('My Elementor', 'elementor'); |
| 256 |
targetUrl = '_blank'; |
| 257 |
} |
| 258 |
return /*#__PURE__*/_react.default.createElement(_barButton.default, { |
| 259 |
icon: "eicon-user-circle-o", |
| 260 |
buttonRef: buttonRef, |
| 261 |
dataInfo: tooltipText, |
| 262 |
href: connectUrl, |
| 263 |
target: targetUrl |
| 264 |
}, buttonText); |
| 265 |
} |
| 266 |
|
| 267 |
/***/ }), |
| 268 |
|
| 269 |
/***/ "../modules/admin-top-bar/assets/js/hooks/use-page-title/use-page-title.js": |
| 270 |
/*!*********************************************************************************!*\ |
| 271 |
!*** ../modules/admin-top-bar/assets/js/hooks/use-page-title/use-page-title.js ***! |
| 272 |
\*********************************************************************************/ |
| 273 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 274 |
|
| 275 |
"use strict"; |
| 276 |
|
| 277 |
|
| 278 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 279 |
Object.defineProperty(exports, "__esModule", ({ |
| 280 |
value: true |
| 281 |
})); |
| 282 |
exports.usePageTitle = void 0; |
| 283 |
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 284 |
var _react = __webpack_require__(/*! react */ "react"); |
| 285 |
var usePageTitle = function usePageTitle() { |
| 286 |
var _useState = (0, _react.useState)('Elementor'), |
| 287 |
_useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 288 |
pageTitle = _useState2[0], |
| 289 |
setPageTitle = _useState2[1]; |
| 290 |
(0, _react.useEffect)(function () { |
| 291 |
var pageTitleElement = document.querySelector('.wp-heading-inline'); |
| 292 |
if (!pageTitleElement) { |
| 293 |
return; |
| 294 |
} |
| 295 |
setPageTitle(pageTitleElement.innerText); |
| 296 |
}, []); |
| 297 |
return pageTitle; |
| 298 |
}; |
| 299 |
exports.usePageTitle = usePageTitle; |
| 300 |
|
| 301 |
/***/ }), |
| 302 |
|
| 303 |
/***/ "../node_modules/object-assign/index.js": |
| 304 |
/*!**********************************************!*\ |
| 305 |
!*** ../node_modules/object-assign/index.js ***! |
| 306 |
\**********************************************/ |
| 307 |
/***/ ((module) => { |
| 308 |
|
| 309 |
"use strict"; |
| 310 |
/* |
| 311 |
object-assign |
| 312 |
(c) Sindre Sorhus |
| 313 |
@license MIT |
| 314 |
*/ |
| 315 |
|
| 316 |
|
| 317 |
/* eslint-disable no-unused-vars */ |
| 318 |
var getOwnPropertySymbols = Object.getOwnPropertySymbols; |
| 319 |
var hasOwnProperty = Object.prototype.hasOwnProperty; |
| 320 |
var propIsEnumerable = Object.prototype.propertyIsEnumerable; |
| 321 |
|
| 322 |
function toObject(val) { |
| 323 |
if (val === null || val === undefined) { |
| 324 |
throw new TypeError('Object.assign cannot be called with null or undefined'); |
| 325 |
} |
| 326 |
|
| 327 |
return Object(val); |
| 328 |
} |
| 329 |
|
| 330 |
function shouldUseNative() { |
| 331 |
try { |
| 332 |
if (!Object.assign) { |
| 333 |
return false; |
| 334 |
} |
| 335 |
|
| 336 |
// Detect buggy property enumeration order in older V8 versions. |
| 337 |
|
| 338 |
// https://bugs.chromium.org/p/v8/issues/detail?id=4118 |
| 339 |
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers |
| 340 |
test1[5] = 'de'; |
| 341 |
if (Object.getOwnPropertyNames(test1)[0] === '5') { |
| 342 |
return false; |
| 343 |
} |
| 344 |
|
| 345 |
// https://bugs.chromium.org/p/v8/issues/detail?id=3056 |
| 346 |
var test2 = {}; |
| 347 |
for (var i = 0; i < 10; i++) { |
| 348 |
test2['_' + String.fromCharCode(i)] = i; |
| 349 |
} |
| 350 |
var order2 = Object.getOwnPropertyNames(test2).map(function (n) { |
| 351 |
return test2[n]; |
| 352 |
}); |
| 353 |
if (order2.join('') !== '0123456789') { |
| 354 |
return false; |
| 355 |
} |
| 356 |
|
| 357 |
// https://bugs.chromium.org/p/v8/issues/detail?id=3056 |
| 358 |
var test3 = {}; |
| 359 |
'abcdefghijklmnopqrst'.split('').forEach(function (letter) { |
| 360 |
test3[letter] = letter; |
| 361 |
}); |
| 362 |
if (Object.keys(Object.assign({}, test3)).join('') !== |
| 363 |
'abcdefghijklmnopqrst') { |
| 364 |
return false; |
| 365 |
} |
| 366 |
|
| 367 |
return true; |
| 368 |
} catch (err) { |
| 369 |
// We don't expect any of the above to throw, but better to be safe. |
| 370 |
return false; |
| 371 |
} |
| 372 |
} |
| 373 |
|
| 374 |
module.exports = shouldUseNative() ? Object.assign : function (target, source) { |
| 375 |
var from; |
| 376 |
var to = toObject(target); |
| 377 |
var symbols; |
| 378 |
|
| 379 |
for (var s = 1; s < arguments.length; s++) { |
| 380 |
from = Object(arguments[s]); |
| 381 |
|
| 382 |
for (var key in from) { |
| 383 |
if (hasOwnProperty.call(from, key)) { |
| 384 |
to[key] = from[key]; |
| 385 |
} |
| 386 |
} |
| 387 |
|
| 388 |
if (getOwnPropertySymbols) { |
| 389 |
symbols = getOwnPropertySymbols(from); |
| 390 |
for (var i = 0; i < symbols.length; i++) { |
| 391 |
if (propIsEnumerable.call(from, symbols[i])) { |
| 392 |
to[symbols[i]] = from[symbols[i]]; |
| 393 |
} |
| 394 |
} |
| 395 |
} |
| 396 |
} |
| 397 |
|
| 398 |
return to; |
| 399 |
}; |
| 400 |
|
| 401 |
|
| 402 |
/***/ }), |
| 403 |
|
| 404 |
/***/ "../node_modules/prop-types/checkPropTypes.js": |
| 405 |
/*!****************************************************!*\ |
| 406 |
!*** ../node_modules/prop-types/checkPropTypes.js ***! |
| 407 |
\****************************************************/ |
| 408 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 409 |
|
| 410 |
"use strict"; |
| 411 |
/** |
| 412 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 413 |
* |
| 414 |
* This source code is licensed under the MIT license found in the |
| 415 |
* LICENSE file in the root directory of this source tree. |
| 416 |
*/ |
| 417 |
|
| 418 |
|
| 419 |
|
| 420 |
var printWarning = function() {}; |
| 421 |
|
| 422 |
if (true) { |
| 423 |
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); |
| 424 |
var loggedTypeFailures = {}; |
| 425 |
var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); |
| 426 |
|
| 427 |
printWarning = function(text) { |
| 428 |
var message = 'Warning: ' + text; |
| 429 |
if (typeof console !== 'undefined') { |
| 430 |
console.error(message); |
| 431 |
} |
| 432 |
try { |
| 433 |
// --- Welcome to debugging React --- |
| 434 |
// This error was thrown as a convenience so that you can use this stack |
| 435 |
// to find the callsite that caused this warning to fire. |
| 436 |
throw new Error(message); |
| 437 |
} catch (x) { /**/ } |
| 438 |
}; |
| 439 |
} |
| 440 |
|
| 441 |
/** |
| 442 |
* Assert that the values match with the type specs. |
| 443 |
* Error messages are memorized and will only be shown once. |
| 444 |
* |
| 445 |
* @param {object} typeSpecs Map of name to a ReactPropType |
| 446 |
* @param {object} values Runtime values that need to be type-checked |
| 447 |
* @param {string} location e.g. "prop", "context", "child context" |
| 448 |
* @param {string} componentName Name of the component for error messages. |
| 449 |
* @param {?Function} getStack Returns the component stack. |
| 450 |
* @private |
| 451 |
*/ |
| 452 |
function checkPropTypes(typeSpecs, values, location, componentName, getStack) { |
| 453 |
if (true) { |
| 454 |
for (var typeSpecName in typeSpecs) { |
| 455 |
if (has(typeSpecs, typeSpecName)) { |
| 456 |
var error; |
| 457 |
// Prop type validation may throw. In case they do, we don't want to |
| 458 |
// fail the render phase where it didn't fail before. So we log it. |
| 459 |
// After these have been cleaned up, we'll let them throw. |
| 460 |
try { |
| 461 |
// This is intentionally an invariant that gets caught. It's the same |
| 462 |
// behavior as without this statement except with a better message. |
| 463 |
if (typeof typeSpecs[typeSpecName] !== 'function') { |
| 464 |
var err = Error( |
| 465 |
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + |
| 466 |
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + |
| 467 |
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.' |
| 468 |
); |
| 469 |
err.name = 'Invariant Violation'; |
| 470 |
throw err; |
| 471 |
} |
| 472 |
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); |
| 473 |
} catch (ex) { |
| 474 |
error = ex; |
| 475 |
} |
| 476 |
if (error && !(error instanceof Error)) { |
| 477 |
printWarning( |
| 478 |
(componentName || 'React class') + ': type specification of ' + |
| 479 |
location + ' `' + typeSpecName + '` is invalid; the type checker ' + |
| 480 |
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + |
| 481 |
'You may have forgotten to pass an argument to the type checker ' + |
| 482 |
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + |
| 483 |
'shape all require an argument).' |
| 484 |
); |
| 485 |
} |
| 486 |
if (error instanceof Error && !(error.message in loggedTypeFailures)) { |
| 487 |
// Only monitor this failure once because there tends to be a lot of the |
| 488 |
// same error. |
| 489 |
loggedTypeFailures[error.message] = true; |
| 490 |
|
| 491 |
var stack = getStack ? getStack() : ''; |
| 492 |
|
| 493 |
printWarning( |
| 494 |
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') |
| 495 |
); |
| 496 |
} |
| 497 |
} |
| 498 |
} |
| 499 |
} |
| 500 |
} |
| 501 |
|
| 502 |
/** |
| 503 |
* Resets warning cache when testing. |
| 504 |
* |
| 505 |
* @private |
| 506 |
*/ |
| 507 |
checkPropTypes.resetWarningCache = function() { |
| 508 |
if (true) { |
| 509 |
loggedTypeFailures = {}; |
| 510 |
} |
| 511 |
} |
| 512 |
|
| 513 |
module.exports = checkPropTypes; |
| 514 |
|
| 515 |
|
| 516 |
/***/ }), |
| 517 |
|
| 518 |
/***/ "../node_modules/prop-types/factoryWithTypeCheckers.js": |
| 519 |
/*!*************************************************************!*\ |
| 520 |
!*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***! |
| 521 |
\*************************************************************/ |
| 522 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 523 |
|
| 524 |
"use strict"; |
| 525 |
/** |
| 526 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 527 |
* |
| 528 |
* This source code is licensed under the MIT license found in the |
| 529 |
* LICENSE file in the root directory of this source tree. |
| 530 |
*/ |
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); |
| 535 |
var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js"); |
| 536 |
|
| 537 |
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); |
| 538 |
var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); |
| 539 |
var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js"); |
| 540 |
|
| 541 |
var printWarning = function() {}; |
| 542 |
|
| 543 |
if (true) { |
| 544 |
printWarning = function(text) { |
| 545 |
var message = 'Warning: ' + text; |
| 546 |
if (typeof console !== 'undefined') { |
| 547 |
console.error(message); |
| 548 |
} |
| 549 |
try { |
| 550 |
// --- Welcome to debugging React --- |
| 551 |
// This error was thrown as a convenience so that you can use this stack |
| 552 |
// to find the callsite that caused this warning to fire. |
| 553 |
throw new Error(message); |
| 554 |
} catch (x) {} |
| 555 |
}; |
| 556 |
} |
| 557 |
|
| 558 |
function emptyFunctionThatReturnsNull() { |
| 559 |
return null; |
| 560 |
} |
| 561 |
|
| 562 |
module.exports = function(isValidElement, throwOnDirectAccess) { |
| 563 |
/* global Symbol */ |
| 564 |
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; |
| 565 |
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. |
| 566 |
|
| 567 |
/** |
| 568 |
* Returns the iterator method function contained on the iterable object. |
| 569 |
* |
| 570 |
* Be sure to invoke the function with the iterable as context: |
| 571 |
* |
| 572 |
* var iteratorFn = getIteratorFn(myIterable); |
| 573 |
* if (iteratorFn) { |
| 574 |
* var iterator = iteratorFn.call(myIterable); |
| 575 |
* ... |
| 576 |
* } |
| 577 |
* |
| 578 |
* @param {?object} maybeIterable |
| 579 |
* @return {?function} |
| 580 |
*/ |
| 581 |
function getIteratorFn(maybeIterable) { |
| 582 |
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); |
| 583 |
if (typeof iteratorFn === 'function') { |
| 584 |
return iteratorFn; |
| 585 |
} |
| 586 |
} |
| 587 |
|
| 588 |
/** |
| 589 |
* Collection of methods that allow declaration and validation of props that are |
| 590 |
* supplied to React components. Example usage: |
| 591 |
* |
| 592 |
* var Props = require('ReactPropTypes'); |
| 593 |
* var MyArticle = React.createClass({ |
| 594 |
* propTypes: { |
| 595 |
* // An optional string prop named "description". |
| 596 |
* description: Props.string, |
| 597 |
* |
| 598 |
* // A required enum prop named "category". |
| 599 |
* category: Props.oneOf(['News','Photos']).isRequired, |
| 600 |
* |
| 601 |
* // A prop named "dialog" that requires an instance of Dialog. |
| 602 |
* dialog: Props.instanceOf(Dialog).isRequired |
| 603 |
* }, |
| 604 |
* render: function() { ... } |
| 605 |
* }); |
| 606 |
* |
| 607 |
* A more formal specification of how these methods are used: |
| 608 |
* |
| 609 |
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) |
| 610 |
* decl := ReactPropTypes.{type}(.isRequired)? |
| 611 |
* |
| 612 |
* Each and every declaration produces a function with the same signature. This |
| 613 |
* allows the creation of custom validation functions. For example: |
| 614 |
* |
| 615 |
* var MyLink = React.createClass({ |
| 616 |
* propTypes: { |
| 617 |
* // An optional string or URI prop named "href". |
| 618 |
* href: function(props, propName, componentName) { |
| 619 |
* var propValue = props[propName]; |
| 620 |
* if (propValue != null && typeof propValue !== 'string' && |
| 621 |
* !(propValue instanceof URI)) { |
| 622 |
* return new Error( |
| 623 |
* 'Expected a string or an URI for ' + propName + ' in ' + |
| 624 |
* componentName |
| 625 |
* ); |
| 626 |
* } |
| 627 |
* } |
| 628 |
* }, |
| 629 |
* render: function() {...} |
| 630 |
* }); |
| 631 |
* |
| 632 |
* @internal |
| 633 |
*/ |
| 634 |
|
| 635 |
var ANONYMOUS = '<<anonymous>>'; |
| 636 |
|
| 637 |
// Important! |
| 638 |
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`. |
| 639 |
var ReactPropTypes = { |
| 640 |
array: createPrimitiveTypeChecker('array'), |
| 641 |
bigint: createPrimitiveTypeChecker('bigint'), |
| 642 |
bool: createPrimitiveTypeChecker('boolean'), |
| 643 |
func: createPrimitiveTypeChecker('function'), |
| 644 |
number: createPrimitiveTypeChecker('number'), |
| 645 |
object: createPrimitiveTypeChecker('object'), |
| 646 |
string: createPrimitiveTypeChecker('string'), |
| 647 |
symbol: createPrimitiveTypeChecker('symbol'), |
| 648 |
|
| 649 |
any: createAnyTypeChecker(), |
| 650 |
arrayOf: createArrayOfTypeChecker, |
| 651 |
element: createElementTypeChecker(), |
| 652 |
elementType: createElementTypeTypeChecker(), |
| 653 |
instanceOf: createInstanceTypeChecker, |
| 654 |
node: createNodeChecker(), |
| 655 |
objectOf: createObjectOfTypeChecker, |
| 656 |
oneOf: createEnumTypeChecker, |
| 657 |
oneOfType: createUnionTypeChecker, |
| 658 |
shape: createShapeTypeChecker, |
| 659 |
exact: createStrictShapeTypeChecker, |
| 660 |
}; |
| 661 |
|
| 662 |
/** |
| 663 |
* inlined Object.is polyfill to avoid requiring consumers ship their own |
| 664 |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is |
| 665 |
*/ |
| 666 |
/*eslint-disable no-self-compare*/ |
| 667 |
function is(x, y) { |
| 668 |
// SameValue algorithm |
| 669 |
if (x === y) { |
| 670 |
// Steps 1-5, 7-10 |
| 671 |
// Steps 6.b-6.e: +0 != -0 |
| 672 |
return x !== 0 || 1 / x === 1 / y; |
| 673 |
} else { |
| 674 |
// Step 6.a: NaN == NaN |
| 675 |
return x !== x && y !== y; |
| 676 |
} |
| 677 |
} |
| 678 |
/*eslint-enable no-self-compare*/ |
| 679 |
|
| 680 |
/** |
| 681 |
* We use an Error-like object for backward compatibility as people may call |
| 682 |
* PropTypes directly and inspect their output. However, we don't use real |
| 683 |
* Errors anymore. We don't inspect their stack anyway, and creating them |
| 684 |
* is prohibitively expensive if they are created too often, such as what |
| 685 |
* happens in oneOfType() for any type before the one that matched. |
| 686 |
*/ |
| 687 |
function PropTypeError(message, data) { |
| 688 |
this.message = message; |
| 689 |
this.data = data && typeof data === 'object' ? data: {}; |
| 690 |
this.stack = ''; |
| 691 |
} |
| 692 |
// Make `instanceof Error` still work for returned errors. |
| 693 |
PropTypeError.prototype = Error.prototype; |
| 694 |
|
| 695 |
function createChainableTypeChecker(validate) { |
| 696 |
if (true) { |
| 697 |
var manualPropTypeCallCache = {}; |
| 698 |
var manualPropTypeWarningCount = 0; |
| 699 |
} |
| 700 |
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { |
| 701 |
componentName = componentName || ANONYMOUS; |
| 702 |
propFullName = propFullName || propName; |
| 703 |
|
| 704 |
if (secret !== ReactPropTypesSecret) { |
| 705 |
if (throwOnDirectAccess) { |
| 706 |
// New behavior only for users of `prop-types` package |
| 707 |
var err = new Error( |
| 708 |
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + |
| 709 |
'Use `PropTypes.checkPropTypes()` to call them. ' + |
| 710 |
'Read more at http://fb.me/use-check-prop-types' |
| 711 |
); |
| 712 |
err.name = 'Invariant Violation'; |
| 713 |
throw err; |
| 714 |
} else if ( true && typeof console !== 'undefined') { |
| 715 |
// Old behavior for people using React.PropTypes |
| 716 |
var cacheKey = componentName + ':' + propName; |
| 717 |
if ( |
| 718 |
!manualPropTypeCallCache[cacheKey] && |
| 719 |
// Avoid spamming the console because they are often not actionable except for lib authors |
| 720 |
manualPropTypeWarningCount < 3 |
| 721 |
) { |
| 722 |
printWarning( |
| 723 |
'You are manually calling a React.PropTypes validation ' + |
| 724 |
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + |
| 725 |
'and will throw in the standalone `prop-types` package. ' + |
| 726 |
'You may be seeing this warning due to a third-party PropTypes ' + |
| 727 |
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' |
| 728 |
); |
| 729 |
manualPropTypeCallCache[cacheKey] = true; |
| 730 |
manualPropTypeWarningCount++; |
| 731 |
} |
| 732 |
} |
| 733 |
} |
| 734 |
if (props[propName] == null) { |
| 735 |
if (isRequired) { |
| 736 |
if (props[propName] === null) { |
| 737 |
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); |
| 738 |
} |
| 739 |
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); |
| 740 |
} |
| 741 |
return null; |
| 742 |
} else { |
| 743 |
return validate(props, propName, componentName, location, propFullName); |
| 744 |
} |
| 745 |
} |
| 746 |
|
| 747 |
var chainedCheckType = checkType.bind(null, false); |
| 748 |
chainedCheckType.isRequired = checkType.bind(null, true); |
| 749 |
|
| 750 |
return chainedCheckType; |
| 751 |
} |
| 752 |
|
| 753 |
function createPrimitiveTypeChecker(expectedType) { |
| 754 |
function validate(props, propName, componentName, location, propFullName, secret) { |
| 755 |
var propValue = props[propName]; |
| 756 |
var propType = getPropType(propValue); |
| 757 |
if (propType !== expectedType) { |
| 758 |
// `propValue` being instance of, say, date/regexp, pass the 'object' |
| 759 |
// check, but we can offer a more precise error message here rather than |
| 760 |
// 'of type `object`'. |
| 761 |
var preciseType = getPreciseType(propValue); |
| 762 |
|
| 763 |
return new PropTypeError( |
| 764 |
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), |
| 765 |
{expectedType: expectedType} |
| 766 |
); |
| 767 |
} |
| 768 |
return null; |
| 769 |
} |
| 770 |
return createChainableTypeChecker(validate); |
| 771 |
} |
| 772 |
|
| 773 |
function createAnyTypeChecker() { |
| 774 |
return createChainableTypeChecker(emptyFunctionThatReturnsNull); |
| 775 |
} |
| 776 |
|
| 777 |
function createArrayOfTypeChecker(typeChecker) { |
| 778 |
function validate(props, propName, componentName, location, propFullName) { |
| 779 |
if (typeof typeChecker !== 'function') { |
| 780 |
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); |
| 781 |
} |
| 782 |
var propValue = props[propName]; |
| 783 |
if (!Array.isArray(propValue)) { |
| 784 |
var propType = getPropType(propValue); |
| 785 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); |
| 786 |
} |
| 787 |
for (var i = 0; i < propValue.length; i++) { |
| 788 |
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); |
| 789 |
if (error instanceof Error) { |
| 790 |
return error; |
| 791 |
} |
| 792 |
} |
| 793 |
return null; |
| 794 |
} |
| 795 |
return createChainableTypeChecker(validate); |
| 796 |
} |
| 797 |
|
| 798 |
function createElementTypeChecker() { |
| 799 |
function validate(props, propName, componentName, location, propFullName) { |
| 800 |
var propValue = props[propName]; |
| 801 |
if (!isValidElement(propValue)) { |
| 802 |
var propType = getPropType(propValue); |
| 803 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); |
| 804 |
} |
| 805 |
return null; |
| 806 |
} |
| 807 |
return createChainableTypeChecker(validate); |
| 808 |
} |
| 809 |
|
| 810 |
function createElementTypeTypeChecker() { |
| 811 |
function validate(props, propName, componentName, location, propFullName) { |
| 812 |
var propValue = props[propName]; |
| 813 |
if (!ReactIs.isValidElementType(propValue)) { |
| 814 |
var propType = getPropType(propValue); |
| 815 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); |
| 816 |
} |
| 817 |
return null; |
| 818 |
} |
| 819 |
return createChainableTypeChecker(validate); |
| 820 |
} |
| 821 |
|
| 822 |
function createInstanceTypeChecker(expectedClass) { |
| 823 |
function validate(props, propName, componentName, location, propFullName) { |
| 824 |
if (!(props[propName] instanceof expectedClass)) { |
| 825 |
var expectedClassName = expectedClass.name || ANONYMOUS; |
| 826 |
var actualClassName = getClassName(props[propName]); |
| 827 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); |
| 828 |
} |
| 829 |
return null; |
| 830 |
} |
| 831 |
return createChainableTypeChecker(validate); |
| 832 |
} |
| 833 |
|
| 834 |
function createEnumTypeChecker(expectedValues) { |
| 835 |
if (!Array.isArray(expectedValues)) { |
| 836 |
if (true) { |
| 837 |
if (arguments.length > 1) { |
| 838 |
printWarning( |
| 839 |
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + |
| 840 |
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' |
| 841 |
); |
| 842 |
} else { |
| 843 |
printWarning('Invalid argument supplied to oneOf, expected an array.'); |
| 844 |
} |
| 845 |
} |
| 846 |
return emptyFunctionThatReturnsNull; |
| 847 |
} |
| 848 |
|
| 849 |
function validate(props, propName, componentName, location, propFullName) { |
| 850 |
var propValue = props[propName]; |
| 851 |
for (var i = 0; i < expectedValues.length; i++) { |
| 852 |
if (is(propValue, expectedValues[i])) { |
| 853 |
return null; |
| 854 |
} |
| 855 |
} |
| 856 |
|
| 857 |
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { |
| 858 |
var type = getPreciseType(value); |
| 859 |
if (type === 'symbol') { |
| 860 |
return String(value); |
| 861 |
} |
| 862 |
return value; |
| 863 |
}); |
| 864 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); |
| 865 |
} |
| 866 |
return createChainableTypeChecker(validate); |
| 867 |
} |
| 868 |
|
| 869 |
function createObjectOfTypeChecker(typeChecker) { |
| 870 |
function validate(props, propName, componentName, location, propFullName) { |
| 871 |
if (typeof typeChecker !== 'function') { |
| 872 |
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); |
| 873 |
} |
| 874 |
var propValue = props[propName]; |
| 875 |
var propType = getPropType(propValue); |
| 876 |
if (propType !== 'object') { |
| 877 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); |
| 878 |
} |
| 879 |
for (var key in propValue) { |
| 880 |
if (has(propValue, key)) { |
| 881 |
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
| 882 |
if (error instanceof Error) { |
| 883 |
return error; |
| 884 |
} |
| 885 |
} |
| 886 |
} |
| 887 |
return null; |
| 888 |
} |
| 889 |
return createChainableTypeChecker(validate); |
| 890 |
} |
| 891 |
|
| 892 |
function createUnionTypeChecker(arrayOfTypeCheckers) { |
| 893 |
if (!Array.isArray(arrayOfTypeCheckers)) { |
| 894 |
true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0; |
| 895 |
return emptyFunctionThatReturnsNull; |
| 896 |
} |
| 897 |
|
| 898 |
for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
| 899 |
var checker = arrayOfTypeCheckers[i]; |
| 900 |
if (typeof checker !== 'function') { |
| 901 |
printWarning( |
| 902 |
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + |
| 903 |
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' |
| 904 |
); |
| 905 |
return emptyFunctionThatReturnsNull; |
| 906 |
} |
| 907 |
} |
| 908 |
|
| 909 |
function validate(props, propName, componentName, location, propFullName) { |
| 910 |
var expectedTypes = []; |
| 911 |
for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
| 912 |
var checker = arrayOfTypeCheckers[i]; |
| 913 |
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret); |
| 914 |
if (checkerResult == null) { |
| 915 |
return null; |
| 916 |
} |
| 917 |
if (checkerResult.data && has(checkerResult.data, 'expectedType')) { |
| 918 |
expectedTypes.push(checkerResult.data.expectedType); |
| 919 |
} |
| 920 |
} |
| 921 |
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': ''; |
| 922 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.')); |
| 923 |
} |
| 924 |
return createChainableTypeChecker(validate); |
| 925 |
} |
| 926 |
|
| 927 |
function createNodeChecker() { |
| 928 |
function validate(props, propName, componentName, location, propFullName) { |
| 929 |
if (!isNode(props[propName])) { |
| 930 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); |
| 931 |
} |
| 932 |
return null; |
| 933 |
} |
| 934 |
return createChainableTypeChecker(validate); |
| 935 |
} |
| 936 |
|
| 937 |
function invalidValidatorError(componentName, location, propFullName, key, type) { |
| 938 |
return new PropTypeError( |
| 939 |
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + |
| 940 |
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.' |
| 941 |
); |
| 942 |
} |
| 943 |
|
| 944 |
function createShapeTypeChecker(shapeTypes) { |
| 945 |
function validate(props, propName, componentName, location, propFullName) { |
| 946 |
var propValue = props[propName]; |
| 947 |
var propType = getPropType(propValue); |
| 948 |
if (propType !== 'object') { |
| 949 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); |
| 950 |
} |
| 951 |
for (var key in shapeTypes) { |
| 952 |
var checker = shapeTypes[key]; |
| 953 |
if (typeof checker !== 'function') { |
| 954 |
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); |
| 955 |
} |
| 956 |
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
| 957 |
if (error) { |
| 958 |
return error; |
| 959 |
} |
| 960 |
} |
| 961 |
return null; |
| 962 |
} |
| 963 |
return createChainableTypeChecker(validate); |
| 964 |
} |
| 965 |
|
| 966 |
function createStrictShapeTypeChecker(shapeTypes) { |
| 967 |
function validate(props, propName, componentName, location, propFullName) { |
| 968 |
var propValue = props[propName]; |
| 969 |
var propType = getPropType(propValue); |
| 970 |
if (propType !== 'object') { |
| 971 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); |
| 972 |
} |
| 973 |
// We need to check all keys in case some are required but missing from props. |
| 974 |
var allKeys = assign({}, props[propName], shapeTypes); |
| 975 |
for (var key in allKeys) { |
| 976 |
var checker = shapeTypes[key]; |
| 977 |
if (has(shapeTypes, key) && typeof checker !== 'function') { |
| 978 |
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); |
| 979 |
} |
| 980 |
if (!checker) { |
| 981 |
return new PropTypeError( |
| 982 |
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + |
| 983 |
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') + |
| 984 |
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') |
| 985 |
); |
| 986 |
} |
| 987 |
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
| 988 |
if (error) { |
| 989 |
return error; |
| 990 |
} |
| 991 |
} |
| 992 |
return null; |
| 993 |
} |
| 994 |
|
| 995 |
return createChainableTypeChecker(validate); |
| 996 |
} |
| 997 |
|
| 998 |
function isNode(propValue) { |
| 999 |
switch (typeof propValue) { |
| 1000 |
case 'number': |
| 1001 |
case 'string': |
| 1002 |
case 'undefined': |
| 1003 |
return true; |
| 1004 |
case 'boolean': |
| 1005 |
return !propValue; |
| 1006 |
case 'object': |
| 1007 |
if (Array.isArray(propValue)) { |
| 1008 |
return propValue.every(isNode); |
| 1009 |
} |
| 1010 |
if (propValue === null || isValidElement(propValue)) { |
| 1011 |
return true; |
| 1012 |
} |
| 1013 |
|
| 1014 |
var iteratorFn = getIteratorFn(propValue); |
| 1015 |
if (iteratorFn) { |
| 1016 |
var iterator = iteratorFn.call(propValue); |
| 1017 |
var step; |
| 1018 |
if (iteratorFn !== propValue.entries) { |
| 1019 |
while (!(step = iterator.next()).done) { |
| 1020 |
if (!isNode(step.value)) { |
| 1021 |
return false; |
| 1022 |
} |
| 1023 |
} |
| 1024 |
} else { |
| 1025 |
// Iterator will provide entry [k,v] tuples rather than values. |
| 1026 |
while (!(step = iterator.next()).done) { |
| 1027 |
var entry = step.value; |
| 1028 |
if (entry) { |
| 1029 |
if (!isNode(entry[1])) { |
| 1030 |
return false; |
| 1031 |
} |
| 1032 |
} |
| 1033 |
} |
| 1034 |
} |
| 1035 |
} else { |
| 1036 |
return false; |
| 1037 |
} |
| 1038 |
|
| 1039 |
return true; |
| 1040 |
default: |
| 1041 |
return false; |
| 1042 |
} |
| 1043 |
} |
| 1044 |
|
| 1045 |
function isSymbol(propType, propValue) { |
| 1046 |
// Native Symbol. |
| 1047 |
if (propType === 'symbol') { |
| 1048 |
return true; |
| 1049 |
} |
| 1050 |
|
| 1051 |
// falsy value can't be a Symbol |
| 1052 |
if (!propValue) { |
| 1053 |
return false; |
| 1054 |
} |
| 1055 |
|
| 1056 |
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' |
| 1057 |
if (propValue['@@toStringTag'] === 'Symbol') { |
| 1058 |
return true; |
| 1059 |
} |
| 1060 |
|
| 1061 |
// Fallback for non-spec compliant Symbols which are polyfilled. |
| 1062 |
if (typeof Symbol === 'function' && propValue instanceof Symbol) { |
| 1063 |
return true; |
| 1064 |
} |
| 1065 |
|
| 1066 |
return false; |
| 1067 |
} |
| 1068 |
|
| 1069 |
// Equivalent of `typeof` but with special handling for array and regexp. |
| 1070 |
function getPropType(propValue) { |
| 1071 |
var propType = typeof propValue; |
| 1072 |
if (Array.isArray(propValue)) { |
| 1073 |
return 'array'; |
| 1074 |
} |
| 1075 |
if (propValue instanceof RegExp) { |
| 1076 |
// Old webkits (at least until Android 4.0) return 'function' rather than |
| 1077 |
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/ |
| 1078 |
// passes PropTypes.object. |
| 1079 |
return 'object'; |
| 1080 |
} |
| 1081 |
if (isSymbol(propType, propValue)) { |
| 1082 |
return 'symbol'; |
| 1083 |
} |
| 1084 |
return propType; |
| 1085 |
} |
| 1086 |
|
| 1087 |
// This handles more types than `getPropType`. Only used for error messages. |
| 1088 |
// See `createPrimitiveTypeChecker`. |
| 1089 |
function getPreciseType(propValue) { |
| 1090 |
if (typeof propValue === 'undefined' || propValue === null) { |
| 1091 |
return '' + propValue; |
| 1092 |
} |
| 1093 |
var propType = getPropType(propValue); |
| 1094 |
if (propType === 'object') { |
| 1095 |
if (propValue instanceof Date) { |
| 1096 |
return 'date'; |
| 1097 |
} else if (propValue instanceof RegExp) { |
| 1098 |
return 'regexp'; |
| 1099 |
} |
| 1100 |
} |
| 1101 |
return propType; |
| 1102 |
} |
| 1103 |
|
| 1104 |
// Returns a string that is postfixed to a warning about an invalid type. |
| 1105 |
// For example, "undefined" or "of type array" |
| 1106 |
function getPostfixForTypeWarning(value) { |
| 1107 |
var type = getPreciseType(value); |
| 1108 |
switch (type) { |
| 1109 |
case 'array': |
| 1110 |
case 'object': |
| 1111 |
return 'an ' + type; |
| 1112 |
case 'boolean': |
| 1113 |
case 'date': |
| 1114 |
case 'regexp': |
| 1115 |
return 'a ' + type; |
| 1116 |
default: |
| 1117 |
return type; |
| 1118 |
} |
| 1119 |
} |
| 1120 |
|
| 1121 |
// Returns class name of the object, if any. |
| 1122 |
function getClassName(propValue) { |
| 1123 |
if (!propValue.constructor || !propValue.constructor.name) { |
| 1124 |
return ANONYMOUS; |
| 1125 |
} |
| 1126 |
return propValue.constructor.name; |
| 1127 |
} |
| 1128 |
|
| 1129 |
ReactPropTypes.checkPropTypes = checkPropTypes; |
| 1130 |
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; |
| 1131 |
ReactPropTypes.PropTypes = ReactPropTypes; |
| 1132 |
|
| 1133 |
return ReactPropTypes; |
| 1134 |
}; |
| 1135 |
|
| 1136 |
|
| 1137 |
/***/ }), |
| 1138 |
|
| 1139 |
/***/ "../node_modules/prop-types/index.js": |
| 1140 |
/*!*******************************************!*\ |
| 1141 |
!*** ../node_modules/prop-types/index.js ***! |
| 1142 |
\*******************************************/ |
| 1143 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1144 |
|
| 1145 |
/** |
| 1146 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 1147 |
* |
| 1148 |
* This source code is licensed under the MIT license found in the |
| 1149 |
* LICENSE file in the root directory of this source tree. |
| 1150 |
*/ |
| 1151 |
|
| 1152 |
if (true) { |
| 1153 |
var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); |
| 1154 |
|
| 1155 |
// By explicitly using `prop-types` you are opting into new development behavior. |
| 1156 |
// http://fb.me/prop-types-in-prod |
| 1157 |
var throwOnDirectAccess = true; |
| 1158 |
module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess); |
| 1159 |
} else {} |
| 1160 |
|
| 1161 |
|
| 1162 |
/***/ }), |
| 1163 |
|
| 1164 |
/***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js": |
| 1165 |
/*!**************************************************************!*\ |
| 1166 |
!*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***! |
| 1167 |
\**************************************************************/ |
| 1168 |
/***/ ((module) => { |
| 1169 |
|
| 1170 |
"use strict"; |
| 1171 |
/** |
| 1172 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 1173 |
* |
| 1174 |
* This source code is licensed under the MIT license found in the |
| 1175 |
* LICENSE file in the root directory of this source tree. |
| 1176 |
*/ |
| 1177 |
|
| 1178 |
|
| 1179 |
|
| 1180 |
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; |
| 1181 |
|
| 1182 |
module.exports = ReactPropTypesSecret; |
| 1183 |
|
| 1184 |
|
| 1185 |
/***/ }), |
| 1186 |
|
| 1187 |
/***/ "../node_modules/prop-types/lib/has.js": |
| 1188 |
/*!*********************************************!*\ |
| 1189 |
!*** ../node_modules/prop-types/lib/has.js ***! |
| 1190 |
\*********************************************/ |
| 1191 |
/***/ ((module) => { |
| 1192 |
|
| 1193 |
module.exports = Function.call.bind(Object.prototype.hasOwnProperty); |
| 1194 |
|
| 1195 |
|
| 1196 |
/***/ }), |
| 1197 |
|
| 1198 |
/***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js": |
| 1199 |
/*!************************************************************************************!*\ |
| 1200 |
!*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***! |
| 1201 |
\************************************************************************************/ |
| 1202 |
/***/ ((__unused_webpack_module, exports) => { |
| 1203 |
|
| 1204 |
"use strict"; |
| 1205 |
/** @license React v16.13.1 |
| 1206 |
* react-is.development.js |
| 1207 |
* |
| 1208 |
* Copyright (c) Facebook, Inc. and its affiliates. |
| 1209 |
* |
| 1210 |
* This source code is licensed under the MIT license found in the |
| 1211 |
* LICENSE file in the root directory of this source tree. |
| 1212 |
*/ |
| 1213 |
|
| 1214 |
|
| 1215 |
|
| 1216 |
|
| 1217 |
|
| 1218 |
if (true) { |
| 1219 |
(function() { |
| 1220 |
'use strict'; |
| 1221 |
|
| 1222 |
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol |
| 1223 |
// nor polyfill, then a plain number is used for performance. |
| 1224 |
var hasSymbol = typeof Symbol === 'function' && Symbol.for; |
| 1225 |
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; |
| 1226 |
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; |
| 1227 |
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; |
| 1228 |
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; |
| 1229 |
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; |
| 1230 |
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; |
| 1231 |
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary |
| 1232 |
// (unstable) APIs that have been removed. Can we remove the symbols? |
| 1233 |
|
| 1234 |
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; |
| 1235 |
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; |
| 1236 |
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; |
| 1237 |
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; |
| 1238 |
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; |
| 1239 |
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; |
| 1240 |
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; |
| 1241 |
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; |
| 1242 |
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; |
| 1243 |
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; |
| 1244 |
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; |
| 1245 |
|
| 1246 |
function isValidElementType(type) { |
| 1247 |
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. |
| 1248 |
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); |
| 1249 |
} |
| 1250 |
|
| 1251 |
function typeOf(object) { |
| 1252 |
if (typeof object === 'object' && object !== null) { |
| 1253 |
var $$typeof = object.$$typeof; |
| 1254 |
|
| 1255 |
switch ($$typeof) { |
| 1256 |
case REACT_ELEMENT_TYPE: |
| 1257 |
var type = object.type; |
| 1258 |
|
| 1259 |
switch (type) { |
| 1260 |
case REACT_ASYNC_MODE_TYPE: |
| 1261 |
case REACT_CONCURRENT_MODE_TYPE: |
| 1262 |
case REACT_FRAGMENT_TYPE: |
| 1263 |
case REACT_PROFILER_TYPE: |
| 1264 |
case REACT_STRICT_MODE_TYPE: |
| 1265 |
case REACT_SUSPENSE_TYPE: |
| 1266 |
return type; |
| 1267 |
|
| 1268 |
default: |
| 1269 |
var $$typeofType = type && type.$$typeof; |
| 1270 |
|
| 1271 |
switch ($$typeofType) { |
| 1272 |
case REACT_CONTEXT_TYPE: |
| 1273 |
case REACT_FORWARD_REF_TYPE: |
| 1274 |
case REACT_LAZY_TYPE: |
| 1275 |
case REACT_MEMO_TYPE: |
| 1276 |
case REACT_PROVIDER_TYPE: |
| 1277 |
return $$typeofType; |
| 1278 |
|
| 1279 |
default: |
| 1280 |
return $$typeof; |
| 1281 |
} |
| 1282 |
|
| 1283 |
} |
| 1284 |
|
| 1285 |
case REACT_PORTAL_TYPE: |
| 1286 |
return $$typeof; |
| 1287 |
} |
| 1288 |
} |
| 1289 |
|
| 1290 |
return undefined; |
| 1291 |
} // AsyncMode is deprecated along with isAsyncMode |
| 1292 |
|
| 1293 |
var AsyncMode = REACT_ASYNC_MODE_TYPE; |
| 1294 |
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; |
| 1295 |
var ContextConsumer = REACT_CONTEXT_TYPE; |
| 1296 |
var ContextProvider = REACT_PROVIDER_TYPE; |
| 1297 |
var Element = REACT_ELEMENT_TYPE; |
| 1298 |
var ForwardRef = REACT_FORWARD_REF_TYPE; |
| 1299 |
var Fragment = REACT_FRAGMENT_TYPE; |
| 1300 |
var Lazy = REACT_LAZY_TYPE; |
| 1301 |
var Memo = REACT_MEMO_TYPE; |
| 1302 |
var Portal = REACT_PORTAL_TYPE; |
| 1303 |
var Profiler = REACT_PROFILER_TYPE; |
| 1304 |
var StrictMode = REACT_STRICT_MODE_TYPE; |
| 1305 |
var Suspense = REACT_SUSPENSE_TYPE; |
| 1306 |
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated |
| 1307 |
|
| 1308 |
function isAsyncMode(object) { |
| 1309 |
{ |
| 1310 |
if (!hasWarnedAboutDeprecatedIsAsyncMode) { |
| 1311 |
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint |
| 1312 |
|
| 1313 |
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.'); |
| 1314 |
} |
| 1315 |
} |
| 1316 |
|
| 1317 |
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; |
| 1318 |
} |
| 1319 |
function isConcurrentMode(object) { |
| 1320 |
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; |
| 1321 |
} |
| 1322 |
function isContextConsumer(object) { |
| 1323 |
return typeOf(object) === REACT_CONTEXT_TYPE; |
| 1324 |
} |
| 1325 |
function isContextProvider(object) { |
| 1326 |
return typeOf(object) === REACT_PROVIDER_TYPE; |
| 1327 |
} |
| 1328 |
function isElement(object) { |
| 1329 |
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; |
| 1330 |
} |
| 1331 |
function isForwardRef(object) { |
| 1332 |
return typeOf(object) === REACT_FORWARD_REF_TYPE; |
| 1333 |
} |
| 1334 |
function isFragment(object) { |
| 1335 |
return typeOf(object) === REACT_FRAGMENT_TYPE; |
| 1336 |
} |
| 1337 |
function isLazy(object) { |
| 1338 |
return typeOf(object) === REACT_LAZY_TYPE; |
| 1339 |
} |
| 1340 |
function isMemo(object) { |
| 1341 |
return typeOf(object) === REACT_MEMO_TYPE; |
| 1342 |
} |
| 1343 |
function isPortal(object) { |
| 1344 |
return typeOf(object) === REACT_PORTAL_TYPE; |
| 1345 |
} |
| 1346 |
function isProfiler(object) { |
| 1347 |
return typeOf(object) === REACT_PROFILER_TYPE; |
| 1348 |
} |
| 1349 |
function isStrictMode(object) { |
| 1350 |
return typeOf(object) === REACT_STRICT_MODE_TYPE; |
| 1351 |
} |
| 1352 |
function isSuspense(object) { |
| 1353 |
return typeOf(object) === REACT_SUSPENSE_TYPE; |
| 1354 |
} |
| 1355 |
|
| 1356 |
exports.AsyncMode = AsyncMode; |
| 1357 |
exports.ConcurrentMode = ConcurrentMode; |
| 1358 |
exports.ContextConsumer = ContextConsumer; |
| 1359 |
exports.ContextProvider = ContextProvider; |
| 1360 |
exports.Element = Element; |
| 1361 |
exports.ForwardRef = ForwardRef; |
| 1362 |
exports.Fragment = Fragment; |
| 1363 |
exports.Lazy = Lazy; |
| 1364 |
exports.Memo = Memo; |
| 1365 |
exports.Portal = Portal; |
| 1366 |
exports.Profiler = Profiler; |
| 1367 |
exports.StrictMode = StrictMode; |
| 1368 |
exports.Suspense = Suspense; |
| 1369 |
exports.isAsyncMode = isAsyncMode; |
| 1370 |
exports.isConcurrentMode = isConcurrentMode; |
| 1371 |
exports.isContextConsumer = isContextConsumer; |
| 1372 |
exports.isContextProvider = isContextProvider; |
| 1373 |
exports.isElement = isElement; |
| 1374 |
exports.isForwardRef = isForwardRef; |
| 1375 |
exports.isFragment = isFragment; |
| 1376 |
exports.isLazy = isLazy; |
| 1377 |
exports.isMemo = isMemo; |
| 1378 |
exports.isPortal = isPortal; |
| 1379 |
exports.isProfiler = isProfiler; |
| 1380 |
exports.isStrictMode = isStrictMode; |
| 1381 |
exports.isSuspense = isSuspense; |
| 1382 |
exports.isValidElementType = isValidElementType; |
| 1383 |
exports.typeOf = typeOf; |
| 1384 |
})(); |
| 1385 |
} |
| 1386 |
|
| 1387 |
|
| 1388 |
/***/ }), |
| 1389 |
|
| 1390 |
/***/ "../node_modules/prop-types/node_modules/react-is/index.js": |
| 1391 |
/*!*****************************************************************!*\ |
| 1392 |
!*** ../node_modules/prop-types/node_modules/react-is/index.js ***! |
| 1393 |
\*****************************************************************/ |
| 1394 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1395 |
|
| 1396 |
"use strict"; |
| 1397 |
|
| 1398 |
|
| 1399 |
if (false) {} else { |
| 1400 |
module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"); |
| 1401 |
} |
| 1402 |
|
| 1403 |
|
| 1404 |
/***/ }), |
| 1405 |
|
| 1406 |
/***/ "react": |
| 1407 |
/*!************************!*\ |
| 1408 |
!*** external "React" ***! |
| 1409 |
\************************/ |
| 1410 |
/***/ ((module) => { |
| 1411 |
|
| 1412 |
"use strict"; |
| 1413 |
module.exports = React; |
| 1414 |
|
| 1415 |
/***/ }), |
| 1416 |
|
| 1417 |
/***/ "react-dom": |
| 1418 |
/*!***************************!*\ |
| 1419 |
!*** external "ReactDOM" ***! |
| 1420 |
\***************************/ |
| 1421 |
/***/ ((module) => { |
| 1422 |
|
| 1423 |
"use strict"; |
| 1424 |
module.exports = ReactDOM; |
| 1425 |
|
| 1426 |
/***/ }), |
| 1427 |
|
| 1428 |
/***/ "@wordpress/i18n": |
| 1429 |
/*!**************************!*\ |
| 1430 |
!*** external "wp.i18n" ***! |
| 1431 |
\**************************/ |
| 1432 |
/***/ ((module) => { |
| 1433 |
|
| 1434 |
"use strict"; |
| 1435 |
module.exports = wp.i18n; |
| 1436 |
|
| 1437 |
/***/ }), |
| 1438 |
|
| 1439 |
/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": |
| 1440 |
/*!******************************************************************!*\ |
| 1441 |
!*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! |
| 1442 |
\******************************************************************/ |
| 1443 |
/***/ ((module) => { |
| 1444 |
|
| 1445 |
function _arrayLikeToArray(arr, len) { |
| 1446 |
if (len == null || len > arr.length) len = arr.length; |
| 1447 |
for (var i = 0, arr2 = new Array(len); i < len; i++) { |
| 1448 |
arr2[i] = arr[i]; |
| 1449 |
} |
| 1450 |
return arr2; |
| 1451 |
} |
| 1452 |
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1453 |
|
| 1454 |
/***/ }), |
| 1455 |
|
| 1456 |
/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": |
| 1457 |
/*!****************************************************************!*\ |
| 1458 |
!*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! |
| 1459 |
\****************************************************************/ |
| 1460 |
/***/ ((module) => { |
| 1461 |
|
| 1462 |
function _arrayWithHoles(arr) { |
| 1463 |
if (Array.isArray(arr)) return arr; |
| 1464 |
} |
| 1465 |
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1466 |
|
| 1467 |
/***/ }), |
| 1468 |
|
| 1469 |
/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": |
| 1470 |
/*!***********************************************************************!*\ |
| 1471 |
!*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! |
| 1472 |
\***********************************************************************/ |
| 1473 |
/***/ ((module) => { |
| 1474 |
|
| 1475 |
function _interopRequireDefault(obj) { |
| 1476 |
return obj && obj.__esModule ? obj : { |
| 1477 |
"default": obj |
| 1478 |
}; |
| 1479 |
} |
| 1480 |
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1481 |
|
| 1482 |
/***/ }), |
| 1483 |
|
| 1484 |
/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": |
| 1485 |
/*!**********************************************************************!*\ |
| 1486 |
!*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! |
| 1487 |
\**********************************************************************/ |
| 1488 |
/***/ ((module) => { |
| 1489 |
|
| 1490 |
function _iterableToArrayLimit(arr, i) { |
| 1491 |
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; |
| 1492 |
if (null != _i) { |
| 1493 |
var _s, |
| 1494 |
_e, |
| 1495 |
_x, |
| 1496 |
_r, |
| 1497 |
_arr = [], |
| 1498 |
_n = !0, |
| 1499 |
_d = !1; |
| 1500 |
try { |
| 1501 |
if (_x = (_i = _i.call(arr)).next, 0 === i) { |
| 1502 |
if (Object(_i) !== _i) return; |
| 1503 |
_n = !1; |
| 1504 |
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { |
| 1505 |
; |
| 1506 |
} |
| 1507 |
} catch (err) { |
| 1508 |
_d = !0, _e = err; |
| 1509 |
} finally { |
| 1510 |
try { |
| 1511 |
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; |
| 1512 |
} finally { |
| 1513 |
if (_d) throw _e; |
| 1514 |
} |
| 1515 |
} |
| 1516 |
return _arr; |
| 1517 |
} |
| 1518 |
} |
| 1519 |
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1520 |
|
| 1521 |
/***/ }), |
| 1522 |
|
| 1523 |
/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": |
| 1524 |
/*!*****************************************************************!*\ |
| 1525 |
!*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! |
| 1526 |
\*****************************************************************/ |
| 1527 |
/***/ ((module) => { |
| 1528 |
|
| 1529 |
function _nonIterableRest() { |
| 1530 |
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 1531 |
} |
| 1532 |
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1533 |
|
| 1534 |
/***/ }), |
| 1535 |
|
| 1536 |
/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": |
| 1537 |
/*!***************************************************************!*\ |
| 1538 |
!*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! |
| 1539 |
\***************************************************************/ |
| 1540 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1541 |
|
| 1542 |
var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); |
| 1543 |
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); |
| 1544 |
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); |
| 1545 |
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); |
| 1546 |
function _slicedToArray(arr, i) { |
| 1547 |
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); |
| 1548 |
} |
| 1549 |
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1550 |
|
| 1551 |
/***/ }), |
| 1552 |
|
| 1553 |
/***/ "../node_modules/@babel/runtime/helpers/typeof.js": |
| 1554 |
/*!********************************************************!*\ |
| 1555 |
!*** ../node_modules/@babel/runtime/helpers/typeof.js ***! |
| 1556 |
\********************************************************/ |
| 1557 |
/***/ ((module) => { |
| 1558 |
|
| 1559 |
function _typeof(obj) { |
| 1560 |
"@babel/helpers - typeof"; |
| 1561 |
|
| 1562 |
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { |
| 1563 |
return typeof obj; |
| 1564 |
} : function (obj) { |
| 1565 |
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; |
| 1566 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); |
| 1567 |
} |
| 1568 |
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1569 |
|
| 1570 |
/***/ }), |
| 1571 |
|
| 1572 |
/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": |
| 1573 |
/*!****************************************************************************!*\ |
| 1574 |
!*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! |
| 1575 |
\****************************************************************************/ |
| 1576 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1577 |
|
| 1578 |
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); |
| 1579 |
function _unsupportedIterableToArray(o, minLen) { |
| 1580 |
if (!o) return; |
| 1581 |
if (typeof o === "string") return arrayLikeToArray(o, minLen); |
| 1582 |
var n = Object.prototype.toString.call(o).slice(8, -1); |
| 1583 |
if (n === "Object" && o.constructor) n = o.constructor.name; |
| 1584 |
if (n === "Map" || n === "Set") return Array.from(o); |
| 1585 |
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); |
| 1586 |
} |
| 1587 |
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1588 |
|
| 1589 |
/***/ }) |
| 1590 |
|
| 1591 |
/******/ }); |
| 1592 |
/************************************************************************/ |
| 1593 |
/******/ // The module cache |
| 1594 |
/******/ var __webpack_module_cache__ = {}; |
| 1595 |
/******/ |
| 1596 |
/******/ // The require function |
| 1597 |
/******/ function __webpack_require__(moduleId) { |
| 1598 |
/******/ // Check if module is in cache |
| 1599 |
/******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 1600 |
/******/ if (cachedModule !== undefined) { |
| 1601 |
/******/ return cachedModule.exports; |
| 1602 |
/******/ } |
| 1603 |
/******/ // Create a new module (and put it into the cache) |
| 1604 |
/******/ var module = __webpack_module_cache__[moduleId] = { |
| 1605 |
/******/ // no module.id needed |
| 1606 |
/******/ // no module.loaded needed |
| 1607 |
/******/ exports: {} |
| 1608 |
/******/ }; |
| 1609 |
/******/ |
| 1610 |
/******/ // Execute the module function |
| 1611 |
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 1612 |
/******/ |
| 1613 |
/******/ // Return the exports of the module |
| 1614 |
/******/ return module.exports; |
| 1615 |
/******/ } |
| 1616 |
/******/ |
| 1617 |
/************************************************************************/ |
| 1618 |
var __webpack_exports__ = {}; |
| 1619 |
// This entry need to be wrapped in an IIFE because it need to be in strict mode. |
| 1620 |
(() => { |
| 1621 |
"use strict"; |
| 1622 |
/*!***************************************************!*\ |
| 1623 |
!*** ../modules/admin-top-bar/assets/js/admin.js ***! |
| 1624 |
\***************************************************/ |
| 1625 |
/* provided dependency */ var ReactDOM = __webpack_require__(/*! react-dom */ "react-dom"); |
| 1626 |
|
| 1627 |
|
| 1628 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1629 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 1630 |
var _adminTopBar = _interopRequireDefault(__webpack_require__(/*! ./admin-top-bar */ "../modules/admin-top-bar/assets/js/admin-top-bar.js")); |
| 1631 |
var AppWrapper = elementorCommon.config.isDebug ? _react.default.StrictMode : _react.default.Fragment; |
| 1632 |
var adminTopBarElement = document.getElementById('e-admin-top-bar-root'); |
| 1633 |
var elementorMenuItemIds = ['toplevel_page_elementor', 'menu-posts-elementor_library']; |
| 1634 |
var menuItemSelector = elementorMenuItemIds.map(function (itemId) { |
| 1635 |
return "#".concat(itemId, " .wp-menu-open"); |
| 1636 |
}).join(', '); |
| 1637 |
var isElementorPage = !!document.querySelector(menuItemSelector); |
| 1638 |
if (isElementorPage) { |
| 1639 |
ReactDOM.render( /*#__PURE__*/_react.default.createElement(AppWrapper, null, /*#__PURE__*/_react.default.createElement(_adminTopBar.default, null)), adminTopBarElement); |
| 1640 |
} |
| 1641 |
})(); |
| 1642 |
|
| 1643 |
/******/ })() |
| 1644 |
; |
| 1645 |
//# sourceMappingURL=admin-top-bar.js.map |