packages
1 week ago
012778ff5828d0d1739f.bundle.js
2 weeks ago
02ab54a3328c55e115ea.bundle.min.js
2 weeks ago
0352e30f394e8e1dd4dc.bundle.js
2 months ago
06dbd869189450c5db6c.bundle.js
2 weeks ago
0982f37bec0944fbcb10.bundle.js
4 months ago
0bc41c4656ca54cf2aca.bundle.min.js
4 months ago
14bcbc91620c14a7112c.bundle.min.js
2 weeks ago
1564d2bfa4591bf857f3.bundle.min.js
4 months ago
197583acd246fea0e25d.bundle.js
5 months ago
20866d9d9e34bf3cb0a7.bundle.min.js
2 weeks ago
2140afa714e988f1069e.bundle.js
2 months ago
220e9c3d1caa01726b1a.bundle.js
2 weeks ago
29c342e9c10e3f13f498.bundle.js
2 weeks ago
2bac2875cdf51a1f8140.bundle.min.js
2 weeks ago
32f7c5e8db4c8976b254.bundle.js
2 months ago
35423d812dc1d52fdb27.bundle.min.js
4 months ago
397f2d183c19202777d6.bundle.min.js
3 months ago
397f2d183c19202777d6.bundle.min.js.LICENSE.txt
3 months ago
3c838288a9b7ddd2aea4.bundle.min.js
4 months ago
3d410a099008411bb011.bundle.js
5 months ago
3df4dbb5d612dbdab477.bundle.min.js
2 months ago
40d841f4b4ce7b1928f5.bundle.js
4 months ago
435080452e81c388e779.bundle.min.js
2 months ago
4927500be197e062162e.bundle.min.js
2 months ago
4c96eab5a48ee097dcb2.bundle.js
2 weeks ago
59845ab5a628d2b79f57.bundle.js
2 weeks ago
5b575dffd21b0cec15a5.bundle.js
2 weeks ago
6117d083decd13b6ed73.bundle.js
2 months ago
6844b6c0a66040e3ca12.bundle.js
2 months ago
687979ffbcfd58352c29.bundle.min.js
2 weeks ago
6936b079b4e7c28cd901.bundle.min.js
2 weeks ago
6a19e86dd8c1f9165dbe.bundle.js
5 months ago
6caa76d2f6eec6c4e665.bundle.js
3 months ago
6d09ff0398a56a60654b.bundle.min.js
3 months ago
6f779545aaa23e951088.bundle.min.js
2 months ago
73f63f9507c306870586.bundle.min.js
2 weeks ago
7698e0d50a8ad7ecc822.bundle.js
2 weeks ago
77b60be7dc925a32f560.bundle.min.js
2 weeks ago
78dd4dee6173d40eb75a.bundle.min.js
2 months ago
7dae73b622bebe8a5d94.bundle.js
4 months ago
8277989eebcfba278cb0.bundle.min.js
7 months ago
831aea236b1ddda24f0c.bundle.js
2 weeks ago
845418a5488e9937fc99.bundle.min.js
2 weeks ago
8ad22e7ba800b096313c.bundle.min.js
2 weeks ago
8c20eb5e96967d3016b2.bundle.js
2 weeks ago
8e5b42844d27eada9b53.bundle.min.js
2 months ago
8e80438d29fc79b648e5.bundle.js
2 months ago
8e8b47ad5b4e4d038c80.bundle.js
4 months ago
8ecfd8495b7ec419862a.bundle.js
4 months ago
979a9c03fe10da23400d.bundle.js
2 months ago
9b0cc3aa93cf287cd0a2.bundle.min.js
2 weeks ago
9b97a73ee8fdc5fb7dc3.bundle.js
3 months ago
9bd390911e34b349d8cb.bundle.min.js
2 months ago
9dcd9e88237da6496816.bundle.min.js
4 months ago
9e7e356552c03a622b0f.bundle.js
2 months ago
9ffe53753902b9aca176.bundle.js
2 weeks ago
a0f667abb781daab8e48.bundle.js
2 weeks ago
a9c3d5b02d26399aebfb.bundle.js
2 weeks ago
accordion.8b0db5058afeb74622f5.bundle.min.js
7 months ago
accordion.b9a0ab19c7c872c405d7.bundle.js
5 months ago
admin-feedback.js
7 months ago
admin-feedback.min.js
7 months ago
admin-feedback.strings.js
2 weeks ago
admin-modules.js
5 months ago
admin-modules.min.js
5 months ago
admin-modules.min.js.LICENSE.txt
10 months ago
admin-modules.strings.js
1 month ago
admin-notifications.js
7 months ago
admin-notifications.min.js
7 months ago
admin-notifications.strings.js
5 months ago
admin-top-bar.js
2 months ago
admin-top-bar.min.js
2 months ago
admin-top-bar.strings.js
5 months ago
admin.js
2 weeks ago
admin.min.js
2 weeks ago
admin.min.js.LICENSE.txt
10 months ago
admin.strings.js
5 months ago
aee13673e923469c3275.bundle.min.js
4 months ago
af05aac2eb23e7438265.bundle.js
2 weeks ago
ai-admin.js
5 months ago
ai-admin.min.js
5 months ago
ai-admin.min.js.LICENSE.txt
10 months ago
ai-admin.strings.js
5 months ago
ai-gutenberg.js
5 months ago
ai-gutenberg.min.js
5 months ago
ai-gutenberg.min.js.LICENSE.txt
10 months ago
ai-gutenberg.strings.js
5 months ago
ai-layout.js
3 months ago
ai-layout.min.js
3 months ago
ai-layout.min.js.LICENSE.txt
10 months ago
ai-layout.strings.js
1 week ago
ai-media-library.js
5 months ago
ai-media-library.min.js
5 months ago
ai-media-library.min.js.LICENSE.txt
10 months ago
ai-media-library.strings.js
5 months ago
ai-unify-product-images.js
5 months ago
ai-unify-product-images.min.js
5 months ago
ai-unify-product-images.min.js.LICENSE.txt
10 months ago
ai-unify-product-images.strings.js
5 months ago
ai.js
5 months ago
ai.min.js
5 months ago
ai.min.js.LICENSE.txt
10 months ago
ai.strings.js
1 week ago
alert.b4336601ffdb6086d1b5.bundle.min.js
2 weeks ago
alert.fd509aa768e7b35a8e32.bundle.js
5 months ago
announcements-app.js
2 weeks ago
announcements-app.min.js
2 weeks ago
announcements-app.min.js.LICENSE.txt
10 months ago
announcements-app.strings.js
5 months ago
app-loader.js
5 months ago
app-loader.min.js
7 months ago
app-loader.strings.js
1 week ago
app-packages.js
4 months ago
app-packages.min.js
4 months ago
app-packages.min.js.LICENSE.txt
10 months ago
app-packages.strings.js
1 week ago
app.js
2 weeks ago
app.min.js
2 weeks ago
app.min.js.LICENSE.txt
10 months ago
app.strings.js
1 week ago
atomic-widgets-action-link-handler.js
2 weeks ago
atomic-widgets-action-link-handler.min.js
2 weeks ago
atomic-widgets-editor.js
2 weeks ago
atomic-widgets-editor.min.js
2 weeks ago
atomic-widgets-editor.min.js.LICENSE.txt
4 months ago
atomic-widgets-editor.strings.js
2 months ago
atomic-widgets-form-handler.js
1 week ago
atomic-widgets-form-handler.min.js
1 week ago
atomic-widgets-form-handler.min.js.LICENSE.txt
2 weeks ago
b4d39e5186d768f79598.bundle.js
2 weeks ago
b96d70044d0d67c2df19.bundle.min.js
7 months ago
bcb5135af6b817bc9708.bundle.min.js
2 months ago
beta-tester.js
7 months ago
beta-tester.min.js
7 months ago
beta-tester.strings.js
5 months ago
bf2fa9f81b3d78f5858f.bundle.min.js
2 weeks ago
c13d205fa26f8af1ce7c.bundle.js
5 months ago
c73a7d15e48e3305780a.bundle.min.js
2 weeks ago
cf6ec600fcf4e08ba6d3.bundle.js
4 months ago
checklist.js
5 months ago
checklist.min.js
5 months ago
checklist.min.js.LICENSE.txt
10 months ago
checklist.strings.js
5 months ago
cloud-library-screenshot.js
5 months ago
cloud-library-screenshot.min.js
5 months ago
cloud-library-screenshot.min.js.LICENSE.txt
7 months ago
cloud-library-screenshot.strings.js
5 months ago
common-modules.js
2 months ago
common-modules.min.js
2 months ago
common-modules.strings.js
5 months ago
common.js
2 weeks ago
common.min.js
2 weeks ago
common.min.js.LICENSE.txt
10 months ago
common.strings.js
5 months ago
contact-buttons.086261d3e9c4d8037686.bundle.js
5 months ago
contact-buttons.e98d0220ce8c38404e7e.bundle.min.js
7 months ago
container-converter.js
7 months ago
container-converter.min.js
7 months ago
container-converter.strings.js
5 months ago
container-editor-handlers.a2e8e48d28c5544fb183.bundle.min.js
4 months ago
container-editor-handlers.e7e069c4e656425c51f8.bundle.js
4 months ago
counter.12335f45aaa79d244f24.bundle.min.js
7 months ago
counter.7310c276bc7865a3d438.bundle.js
5 months ago
d39cd4cb3d5b09b11c14.bundle.min.js
2 weeks ago
d42de03ef4a0f50e39ca.bundle.min.js
4 months ago
d4c67aa71d8173f6201f.bundle.js
2 months ago
d52aa05c75af56327744.bundle.js
5 months ago
d67ddd6f08b08392c42f.bundle.js
5 months ago
d8a330693f9211e2166e.bundle.min.js
2 weeks ago
daedc6797eaad5c82711.bundle.min.js
7 months ago
de7511b88f9ec0968921.bundle.js
2 weeks ago
design-system-sync.js
1 month ago
design-system-sync.min.js
1 month ago
design-system-sync.strings.js
2 months ago
dev-tools.js
7 months ago
dev-tools.min.js
7 months ago
dev-tools.strings.js
5 months ago
df2f2a2ae20e0181ec2d.bundle.js
2 months ago
df4ff09f2b412abf0cd3.bundle.js
2 weeks ago
dff865a4d52c12bcf996.bundle.min.js
2 weeks ago
e-home-screen.js
2 weeks ago
e-home-screen.min.js
2 weeks ago
e-home-screen.min.js.LICENSE.txt
2 weeks ago
e-home-screen.strings.js
2 weeks ago
e-react-promotions.js
1 month ago
e-react-promotions.min.js
1 month ago
e-react-promotions.min.js.LICENSE.txt
1 month ago
e-react-promotions.strings.js
5 months ago
e-wc-product-editor.js
5 months ago
e-wc-product-editor.min.js
7 months ago
e-wc-product-editor.min.js.LICENSE.txt
1 year ago
e-wc-product-editor.strings.js
5 months ago
e1cb4d726bb59646c677.bundle.min.js
7 months ago
e459c6c89c0c0899c850.bundle.js
5 months ago
e9a764dcd37c06162942.bundle.js
2 weeks ago
eb5018119ee87fd6a7fc.bundle.min.js
2 months ago
ec1ee92b2a471389c7b9.bundle.min.js
2 weeks ago
editor-document.js
5 months ago
editor-document.min.js
7 months ago
editor-document.strings.js
1 week ago
editor-environment-v2.js
7 months ago
editor-environment-v2.min.js
7 months ago
editor-environment-v2.strings.js
5 months ago
editor-interactions.js
2 weeks ago
editor-interactions.min.js
2 weeks ago
editor-interactions.strings.js
5 months ago
editor-loader-v1.js
7 months ago
editor-loader-v1.min.js
7 months ago
editor-loader-v1.strings.js
5 months ago
editor-loader-v2.js
7 months ago
editor-loader-v2.min.js
7 months ago
editor-loader-v2.strings.js
5 months ago
editor-modules.js
2 months ago
editor-modules.min.js
2 months ago
editor-modules.min.js.LICENSE.txt
10 months ago
editor-modules.strings.js
1 week ago
editor-notifications.js
7 months ago
editor-notifications.min.js
7 months ago
editor-notifications.strings.js
5 months ago
editor-one-admin.js
5 months ago
editor-one-admin.min.js
5 months ago
editor-one-admin.strings.js
5 months ago
editor-one-menu.js
4 months ago
editor-one-menu.min.js
4 months ago
editor-one-menu.strings.js
5 months ago
editor-one-sidebar-navigation.js
2 months ago
editor-one-sidebar-navigation.min.js
2 months ago
editor-one-sidebar-navigation.min.js.LICENSE.txt
5 months ago
editor-one-sidebar-navigation.strings.js
5 months ago
editor-one-top-bar.js
2 weeks ago
editor-one-top-bar.min.js
2 weeks ago
editor-one-top-bar.min.js.LICENSE.txt
4 months ago
editor-one-top-bar.strings.js
4 months ago
editor-v4-opt-in-alphachip.js
2 months ago
editor-v4-opt-in-alphachip.min.js
2 months ago
editor-v4-opt-in-alphachip.strings.js
2 months ago
editor-v4-opt-in.js
2 months ago
editor-v4-opt-in.min.js
2 months ago
editor-v4-opt-in.min.js.LICENSE.txt
5 months ago
editor-v4-opt-in.strings.js
2 months ago
editor.js
2 weeks ago
editor.min.js
2 weeks ago
editor.min.js.LICENSE.txt
5 months ago
editor.strings.js
2 weeks ago
ef2100ac3eda1a957819.bundle.min.js
7 months ago
ef35c83e4628f0a5c328.bundle.js
4 months ago
element-manager-admin.js
2 months ago
element-manager-admin.min.js
2 months ago
element-manager-admin.min.js.LICENSE.txt
10 months ago
element-manager-admin.strings.js
2 months ago
elementor-admin-bar.js
7 months ago
elementor-admin-bar.min.js
7 months ago
elementor-admin-bar.strings.js
5 months ago
f3b4453f66034a6655a7.bundle.min.js
2 weeks ago
f56b0d1257a5346afe64.bundle.min.js
2 months ago
fdda4547e887fbda71b3.bundle.js
2 months ago
fdf69f4e1f300fb27472.bundle.min.js
2 months ago
floating-bars.740d06d17cea5cebdb61.bundle.min.js
7 months ago
floating-bars.a6e6a043444b62f64f82.bundle.js
5 months ago
floating-elements-modal.js
2 months ago
floating-elements-modal.min.js
2 months ago
floating-elements-modal.strings.js
5 months ago
frontend-modules.js
2 months ago
frontend-modules.min.js
2 months ago
frontend.js
2 weeks ago
frontend.min.js
2 weeks ago
gutenberg.js
7 months ago
gutenberg.min.js
7 months ago
gutenberg.strings.js
2 months ago
image-carousel.6167d20b95b33386757b.bundle.min.js
7 months ago
image-carousel.8b25f3674c29b829a867.bundle.js
5 months ago
import-export-admin.js
5 months ago
import-export-admin.min.js
5 months ago
import-export-admin.strings.js
1 week ago
import-export-customization-admin.js
2 weeks ago
import-export-customization-admin.min.js
2 weeks ago
import-export-customization-admin.min.js.LICENSE.txt
7 months ago
import-export-customization-admin.strings.js
1 week ago
interactions-shared-utils.js
2 weeks ago
interactions-shared-utils.min.js
2 weeks ago
interactions-shared-utils.strings.js
2 months ago
interactions.js
2 weeks ago
interactions.min.js
2 weeks ago
interactions.strings.js
5 months ago
kit-elements-defaults-editor.js
5 months ago
kit-elements-defaults-editor.min.js
5 months ago
kit-elements-defaults-editor.min.js.LICENSE.txt
10 months ago
kit-elements-defaults-editor.strings.js
5 months ago
kit-library.a394510096bc447f636d.bundle.min.js
2 months ago
kit-library.b768952e1d4177aa68d8.bundle.js
2 months ago
lightbox.570c05c5a283cfb6b223.bundle.min.js
3 months ago
lightbox.d9ea72d232a14f514ee2.bundle.js
3 months ago
media-hints.js
7 months ago
media-hints.min.js
7 months ago
media-hints.strings.js
5 months ago
nested-accordion.294d40984397351fd0f5.bundle.min.js
4 months ago
nested-accordion.4340b64226322f36bcc0.bundle.js
4 months ago
nested-accordion.js
5 months ago
nested-accordion.min.js
5 months ago
nested-accordion.min.js.LICENSE.txt
10 months ago
nested-accordion.strings.js
5 months ago
nested-elements.js
3 months ago
nested-elements.min.js
3 months ago
nested-elements.strings.js
5 months ago
nested-tabs.7a338e6d7e060c473993.bundle.js
5 months ago
nested-tabs.a2401356d329f179475e.bundle.min.js
6 months ago
nested-tabs.js
5 months ago
nested-tabs.min.js
5 months ago
nested-tabs.min.js.LICENSE.txt
10 months ago
nested-tabs.strings.js
5 months ago
nested-title-keyboard-handler.0c2b498e3e0695a1dc19.bundle.js
5 months ago
nested-title-keyboard-handler.2a67d3cc630e11815acc.bundle.min.js
6 months ago
new-template.js
4 months ago
new-template.min.js
4 months ago
new-template.strings.js
5 months ago
notes.js
7 months ago
notes.min.js
7 months ago
notes.strings.js
5 months ago
pro-free-trial-popup.js
7 months ago
pro-free-trial-popup.min.js
7 months ago
pro-free-trial-popup.strings.js
5 months ago
pro-install-events.js
7 months ago
pro-install-events.min.js
7 months ago
pro-install-events.strings.js
5 months ago
progress.0ea083b809812c0e3aa1.bundle.min.js
7 months ago
progress.b1057ba870016558bce1.bundle.js
5 months ago
responsive-bar.js
7 months ago
responsive-bar.min.js
7 months ago
responsive-bar.strings.js
5 months ago
section-editor-handlers.53ffedef32043348b99b.bundle.min.js
7 months ago
section-editor-handlers.d65899d232b5339510d7.bundle.js
5 months ago
section-frontend-handlers.c3950c6b190ca134bc8d.bundle.js
5 months ago
section-frontend-handlers.d85ab872da118940910d.bundle.min.js
7 months ago
shared-editor-handlers.3023894100138e442ab0.bundle.js
4 months ago
shared-editor-handlers.cacdcbed391abf4b48b0.bundle.min.js
4 months ago
shared-frontend-handlers.03caa53373b56d3bab67.bundle.min.js
7 months ago
shared-frontend-handlers.3b079824c37a5fe2bdaa.bundle.js
5 months ago
styleguide-app-initiator.js
5 months ago
styleguide-app-initiator.min.js
5 months ago
styleguide-app-initiator.min.js.LICENSE.txt
10 months ago
styleguide-app-initiator.strings.js
5 months ago
styleguide-app.04340244193733d78622.bundle.min.js
7 months ago
styleguide-app.36ecabae74d9b87fc5a8.bundle.js
5 months ago
styleguide.js
7 months ago
styleguide.min.js
7 months ago
styleguide.strings.js
4 months ago
tabs-handler.js
2 weeks ago
tabs-handler.min.js
2 weeks ago
tabs-preview-handler.js
2 weeks ago
tabs-preview-handler.min.js
2 weeks ago
tabs.18344b05d8d1ea0702bc.bundle.min.js
7 months ago
tabs.40498fa771d612162c53.bundle.js
5 months ago
text-editor.0c9960167105139d27c9.bundle.js
5 months ago
text-editor.45609661e409413f1cef.bundle.min.js
7 months ago
text-path.6db73cc0a10a70f128eb.bundle.js
3 months ago
text-path.a67c1f3a78d208bc7e1b.bundle.min.js
3 months ago
toggle.2a177a3ef4785d3dfbc5.bundle.min.js
7 months ago
toggle.b75e66d2aca6f6ee742e.bundle.js
5 months ago
video.6e96510afa701d1f2ebc.bundle.js
5 months ago
video.86d44e46e43d0807e708.bundle.min.js
7 months ago
web-cli.js
5 months ago
web-cli.min.js
5 months ago
web-cli.min.js.LICENSE.txt
10 months ago
web-cli.strings.js
5 months ago
webpack.runtime.js
2 weeks ago
webpack.runtime.min.js
2 weeks ago
wp-audio.0ba9114964acf4c37ca2.bundle.js
5 months ago
wp-audio.c9624cb6e5dc9de86abd.bundle.min.js
7 months ago
youtube-handler.js
5 months ago
youtube-handler.min.js
5 months ago
checklist.js
3721 lines
| 1 | /******/ (() => { // webpackBootstrap |
| 2 | /******/ var __webpack_modules__ = ({ |
| 3 | |
| 4 | /***/ "../app/assets/js/hooks/use-ajax.js": |
| 5 | /*!******************************************!*\ |
| 6 | !*** ../app/assets/js/hooks/use-ajax.js ***! |
| 7 | \******************************************/ |
| 8 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 9 | |
| 10 | "use strict"; |
| 11 | |
| 12 | |
| 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["default"] = useAjax; |
| 18 | var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); |
| 19 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 20 | var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); |
| 21 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 22 | var _react = __webpack_require__(/*! react */ "react"); |
| 23 | 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; } |
| 24 | 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; } |
| 25 | function useAjax() { |
| 26 | var _useState = (0, _react.useState)(null), |
| 27 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 28 | ajax = _useState2[0], |
| 29 | setAjax = _useState2[1], |
| 30 | initialStatusKey = 'initial', |
| 31 | uploadInitialState = { |
| 32 | status: initialStatusKey, |
| 33 | isComplete: false, |
| 34 | response: null |
| 35 | }, |
| 36 | _useState3 = (0, _react.useState)(uploadInitialState), |
| 37 | _useState4 = (0, _slicedToArray2.default)(_useState3, 2), |
| 38 | ajaxState = _useState4[0], |
| 39 | setAjaxState = _useState4[1], |
| 40 | ajaxActions = { |
| 41 | reset: function reset() { |
| 42 | return setAjaxState(initialStatusKey); |
| 43 | } |
| 44 | }; |
| 45 | var runRequest = /*#__PURE__*/function () { |
| 46 | var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(config) { |
| 47 | return _regenerator.default.wrap(function (_context) { |
| 48 | while (1) switch (_context.prev = _context.next) { |
| 49 | case 0: |
| 50 | return _context.abrupt("return", new Promise(function (resolve, reject) { |
| 51 | var formData = new FormData(); |
| 52 | if (config.data) { |
| 53 | for (var key in config.data) { |
| 54 | formData.append(key, config.data[key]); |
| 55 | } |
| 56 | if (!config.data.nonce) { |
| 57 | formData.append('_nonce', elementorCommon.config.ajax.nonce); |
| 58 | } |
| 59 | } |
| 60 | var options = _objectSpread(_objectSpread({ |
| 61 | type: 'post', |
| 62 | url: elementorCommon.config.ajax.url, |
| 63 | headers: {}, |
| 64 | cache: false, |
| 65 | contentType: false, |
| 66 | processData: false |
| 67 | }, config), {}, { |
| 68 | data: formData, |
| 69 | success: function success(response) { |
| 70 | resolve(response); |
| 71 | }, |
| 72 | error: function error(_error) { |
| 73 | reject(_error); |
| 74 | } |
| 75 | }); |
| 76 | jQuery.ajax(options); |
| 77 | })); |
| 78 | case 1: |
| 79 | case "end": |
| 80 | return _context.stop(); |
| 81 | } |
| 82 | }, _callee); |
| 83 | })); |
| 84 | return function runRequest(_x) { |
| 85 | return _ref.apply(this, arguments); |
| 86 | }; |
| 87 | }(); |
| 88 | (0, _react.useEffect)(function () { |
| 89 | if (ajax) { |
| 90 | runRequest(ajax).then(function (response) { |
| 91 | var status = response.success ? 'success' : 'error'; |
| 92 | setAjaxState(function (prevState) { |
| 93 | return _objectSpread(_objectSpread({}, prevState), {}, { |
| 94 | status: status, |
| 95 | response: response === null || response === void 0 ? void 0 : response.data |
| 96 | }); |
| 97 | }); |
| 98 | }).catch(function (error) { |
| 99 | var _error$responseJSON; |
| 100 | var response = 408 === error.status ? 'timeout' : (_error$responseJSON = error.responseJSON) === null || _error$responseJSON === void 0 ? void 0 : _error$responseJSON.data; |
| 101 | setAjaxState(function (prevState) { |
| 102 | return _objectSpread(_objectSpread({}, prevState), {}, { |
| 103 | status: 'error', |
| 104 | response: response |
| 105 | }); |
| 106 | }); |
| 107 | }).finally(function () { |
| 108 | setAjaxState(function (prevState) { |
| 109 | return _objectSpread(_objectSpread({}, prevState), {}, { |
| 110 | isComplete: true |
| 111 | }); |
| 112 | }); |
| 113 | }); |
| 114 | } |
| 115 | }, [ajax]); |
| 116 | return { |
| 117 | ajax: ajax, |
| 118 | setAjax: setAjax, |
| 119 | ajaxState: ajaxState, |
| 120 | ajaxActions: ajaxActions, |
| 121 | runRequest: runRequest |
| 122 | }; |
| 123 | } |
| 124 | |
| 125 | /***/ }), |
| 126 | |
| 127 | /***/ "../modules/checklist/assets/js/app/app.js": |
| 128 | /*!*************************************************!*\ |
| 129 | !*** ../modules/checklist/assets/js/app/app.js ***! |
| 130 | \*************************************************/ |
| 131 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 132 | |
| 133 | "use strict"; |
| 134 | |
| 135 | |
| 136 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 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"] = void 0; |
| 142 | var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 143 | var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); |
| 144 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 145 | var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query"); |
| 146 | var _editorV1Adapters = __webpack_require__(/*! @elementor/editor-v1-adapters */ "@elementor/editor-v1-adapters"); |
| 147 | var _checklist = _interopRequireDefault(__webpack_require__(/*! ./components/checklist */ "../modules/checklist/assets/js/app/components/checklist.js")); |
| 148 | var _functions = __webpack_require__(/*! ../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 149 | 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); } |
| 150 | var App = function App() { |
| 151 | var isRTL = elementorCommon.config.isRTL, |
| 152 | _useQuery = (0, _query.useQuery)({ |
| 153 | queryKey: ['steps'], |
| 154 | queryFn: _functions.fetchSteps, |
| 155 | gcTime: 0, |
| 156 | enabled: false |
| 157 | }), |
| 158 | stepsError = _useQuery.error, |
| 159 | steps = _useQuery.data, |
| 160 | refetchSteps = _useQuery.refetch, |
| 161 | _useQuery2 = (0, _query.useQuery)({ |
| 162 | queryKey: ['statusData'], |
| 163 | queryFn: _functions.fetchUserProgress, |
| 164 | gcTime: 0, |
| 165 | enabled: false |
| 166 | }), |
| 167 | userProgressError = _useQuery2.error, |
| 168 | userProgress = _useQuery2.data, |
| 169 | refetchUserProgress = _useQuery2.refetch; |
| 170 | var fetchData = function fetchData() { |
| 171 | refetchSteps(); |
| 172 | refetchUserProgress(); |
| 173 | }; |
| 174 | (0, _react.useEffect)(function () { |
| 175 | fetchData(); |
| 176 | return (0, _editorV1Adapters.__privateListenTo)((0, _editorV1Adapters.commandEndEvent)('document/save/save'), function (_ref) { |
| 177 | var _args$document; |
| 178 | var args = _ref.args; |
| 179 | if ('kit' === (args === null || args === void 0 || (_args$document = args.document) === null || _args$document === void 0 || (_args$document = _args$document.config) === null || _args$document === void 0 ? void 0 : _args$document.type)) { |
| 180 | fetchData(); |
| 181 | } |
| 182 | }); |
| 183 | }, []); |
| 184 | if (userProgressError || !userProgress || stepsError || !(steps !== null && steps !== void 0 && steps.length)) { |
| 185 | return null; |
| 186 | } |
| 187 | return /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, { |
| 188 | rtl: isRTL |
| 189 | }, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, { |
| 190 | colorScheme: "light" |
| 191 | }, /*#__PURE__*/_react.default.createElement(_checklist.default, { |
| 192 | steps: (0, _toConsumableArray2.default)(steps), |
| 193 | userProgress: userProgress |
| 194 | }))); |
| 195 | }; |
| 196 | var _default = exports["default"] = App; |
| 197 | |
| 198 | /***/ }), |
| 199 | |
| 200 | /***/ "../modules/checklist/assets/js/app/components/checklist-card-content.js": |
| 201 | /*!*******************************************************************************!*\ |
| 202 | !*** ../modules/checklist/assets/js/app/components/checklist-card-content.js ***! |
| 203 | \*******************************************************************************/ |
| 204 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 205 | |
| 206 | "use strict"; |
| 207 | |
| 208 | |
| 209 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 210 | Object.defineProperty(exports, "__esModule", ({ |
| 211 | value: true |
| 212 | })); |
| 213 | exports["default"] = void 0; |
| 214 | var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 215 | var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); |
| 216 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 217 | var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); |
| 218 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 219 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 220 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 221 | var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 222 | var _consts = __webpack_require__(/*! ../../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); |
| 223 | var IS_MARKED_COMPLETED = _consts.STEP.IS_MARKED_COMPLETED, |
| 224 | IS_ABSOLUTE_COMPLETED = _consts.STEP.IS_ABSOLUTE_COMPLETED, |
| 225 | IS_IMMUTABLE_COMPLETED = _consts.STEP.IS_IMMUTABLE_COMPLETED; |
| 226 | var DONE = _consts.MIXPANEL_CHECKLIST_STEPS.DONE, |
| 227 | UNDONE = _consts.MIXPANEL_CHECKLIST_STEPS.UNDONE, |
| 228 | ACTION = _consts.MIXPANEL_CHECKLIST_STEPS.ACTION, |
| 229 | UPGRADE = _consts.MIXPANEL_CHECKLIST_STEPS.UPGRADE; |
| 230 | var ChecklistCardContent = function ChecklistCardContent(_ref) { |
| 231 | var step = _ref.step, |
| 232 | setSteps = _ref.setSteps; |
| 233 | var _step$config = step.config, |
| 234 | id = _step$config.id, |
| 235 | description = _step$config.description, |
| 236 | learnMoreUrl = _step$config.learn_more_url, |
| 237 | learnMoreText = _step$config.learn_more_text, |
| 238 | imageSrc = _step$config.image_src, |
| 239 | promotionData = _step$config.promotion_data; |
| 240 | var ctaText = promotionData ? (promotionData === null || promotionData === void 0 ? void 0 : promotionData.text) || (0, _i18n.__)('Upgrade Now', 'elementor') : step.config.cta_text, |
| 241 | ctaUrl = promotionData ? promotionData.url : step.config.cta_url, |
| 242 | isAbsoluteCompleted = step[IS_ABSOLUTE_COMPLETED], |
| 243 | isImmutableCompleted = step[IS_IMMUTABLE_COMPLETED], |
| 244 | isMarkedCompleted = step[IS_MARKED_COMPLETED], |
| 245 | shouldShowMarkAsDone = !isAbsoluteCompleted && !isImmutableCompleted && !promotionData; |
| 246 | var redirectHandler = /*#__PURE__*/function () { |
| 247 | var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { |
| 248 | return _regenerator.default.wrap(function (_context) { |
| 249 | while (1) switch (_context.prev = _context.next) { |
| 250 | case 0: |
| 251 | if (promotionData) { |
| 252 | (0, _functions.addMixpanelTrackingChecklistSteps)(step.config.id, UPGRADE); |
| 253 | } else { |
| 254 | (0, _functions.addMixpanelTrackingChecklistSteps)(step.config.id, ACTION); |
| 255 | } |
| 256 | if (!(!elementor || !_consts.STEP_IDS_TO_COMPLETE_IN_EDITOR.includes(id) || !_consts.PANEL_ROUTES[id])) { |
| 257 | _context.next = 1; |
| 258 | break; |
| 259 | } |
| 260 | return _context.abrupt("return", window.open(ctaUrl, '_blank')); |
| 261 | case 1: |
| 262 | _context.next = 2; |
| 263 | return $e.run('panel/global/open'); |
| 264 | case 2: |
| 265 | $e.route(_consts.PANEL_ROUTES[id]); |
| 266 | case 3: |
| 267 | case "end": |
| 268 | return _context.stop(); |
| 269 | } |
| 270 | }, _callee); |
| 271 | })); |
| 272 | return function redirectHandler() { |
| 273 | return _ref2.apply(this, arguments); |
| 274 | }; |
| 275 | }(); |
| 276 | var toggleMarkAsDone = /*#__PURE__*/function () { |
| 277 | var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { |
| 278 | var currState, _t; |
| 279 | return _regenerator.default.wrap(function (_context2) { |
| 280 | while (1) switch (_context2.prev = _context2.next) { |
| 281 | case 0: |
| 282 | currState = isMarkedCompleted; |
| 283 | if (isMarkedCompleted) { |
| 284 | (0, _functions.addMixpanelTrackingChecklistSteps)(step.config.id, UNDONE); |
| 285 | } else { |
| 286 | (0, _functions.addMixpanelTrackingChecklistSteps)(step.config.id, DONE); |
| 287 | } |
| 288 | _context2.prev = 1; |
| 289 | updateStepsState(IS_MARKED_COMPLETED, !currState); |
| 290 | _context2.next = 2; |
| 291 | return (0, _functions.updateStep)(id, (0, _defineProperty2.default)({}, IS_MARKED_COMPLETED, !currState)); |
| 292 | case 2: |
| 293 | _context2.next = 4; |
| 294 | break; |
| 295 | case 3: |
| 296 | _context2.prev = 3; |
| 297 | _t = _context2["catch"](1); |
| 298 | updateStepsState(IS_MARKED_COMPLETED, currState); |
| 299 | case 4: |
| 300 | case "end": |
| 301 | return _context2.stop(); |
| 302 | } |
| 303 | }, _callee2, null, [[1, 3]]); |
| 304 | })); |
| 305 | return function toggleMarkAsDone() { |
| 306 | return _ref3.apply(this, arguments); |
| 307 | }; |
| 308 | }(); |
| 309 | var updateStepsState = function updateStepsState(key, value) { |
| 310 | setSteps(function (steps) { |
| 311 | return steps.map(function (iteratedStep) { |
| 312 | return (0, _functions.getAndUpdateStep)(step.config.id, iteratedStep, key, value); |
| 313 | }); |
| 314 | }); |
| 315 | }; |
| 316 | return /*#__PURE__*/_react.default.createElement(_ui.Card, { |
| 317 | elevation: 0, |
| 318 | square: true, |
| 319 | "data-step-id": id |
| 320 | }, /*#__PURE__*/_react.default.createElement(_ui.CardMedia, { |
| 321 | image: imageSrc, |
| 322 | sx: { |
| 323 | height: 180 |
| 324 | } |
| 325 | }), /*#__PURE__*/_react.default.createElement(_ui.CardContent, null, /*#__PURE__*/_react.default.createElement(_ui.Typography, { |
| 326 | variant: "body2", |
| 327 | color: "text.secondary", |
| 328 | component: "p" |
| 329 | }, description + ' ', /*#__PURE__*/_react.default.createElement(_ui.Link, { |
| 330 | href: learnMoreUrl, |
| 331 | target: "_blank", |
| 332 | rel: "noreferrer", |
| 333 | underline: "hover", |
| 334 | color: "info.main", |
| 335 | noWrap: true |
| 336 | }, learnMoreText))), /*#__PURE__*/_react.default.createElement(_ui.CardActions, null, shouldShowMarkAsDone ? /*#__PURE__*/_react.default.createElement(_ui.Button, { |
| 337 | size: "small", |
| 338 | color: "secondary", |
| 339 | variant: "text", |
| 340 | onClick: toggleMarkAsDone |
| 341 | }, isMarkedCompleted ? (0, _i18n.__)('Unmark as done', 'elementor') : (0, _i18n.__)('Mark as done', 'elementor')) : null, /*#__PURE__*/_react.default.createElement(_ui.Button, { |
| 342 | color: promotionData ? 'promotion' : 'primary', |
| 343 | size: "small", |
| 344 | variant: "contained", |
| 345 | onClick: redirectHandler |
| 346 | }, ctaText))); |
| 347 | }; |
| 348 | var _default = exports["default"] = ChecklistCardContent; |
| 349 | ChecklistCardContent.propTypes = { |
| 350 | step: _propTypes.default.object.isRequired, |
| 351 | setSteps: _propTypes.default.func.isRequired |
| 352 | }; |
| 353 | |
| 354 | /***/ }), |
| 355 | |
| 356 | /***/ "../modules/checklist/assets/js/app/components/checklist-item.js": |
| 357 | /*!***********************************************************************!*\ |
| 358 | !*** ../modules/checklist/assets/js/app/components/checklist-item.js ***! |
| 359 | \***********************************************************************/ |
| 360 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 361 | |
| 362 | "use strict"; |
| 363 | |
| 364 | |
| 365 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 366 | Object.defineProperty(exports, "__esModule", ({ |
| 367 | value: true |
| 368 | })); |
| 369 | exports["default"] = void 0; |
| 370 | var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 371 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 372 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 373 | var _checklistCardContent = _interopRequireDefault(__webpack_require__(/*! ./checklist-card-content */ "../modules/checklist/assets/js/app/components/checklist-card-content.js")); |
| 374 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 375 | var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); |
| 376 | var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 377 | var _consts = __webpack_require__(/*! ../../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); |
| 378 | 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; } |
| 379 | 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; } |
| 380 | var PROMOTION_DATA = _consts.STEP.PROMOTION_DATA; |
| 381 | var TITLE = _consts.MIXPANEL_CHECKLIST_STEPS.TITLE, |
| 382 | ACCORDION_SECTION = _consts.MIXPANEL_CHECKLIST_STEPS.ACCORDION_SECTION; |
| 383 | function CheckListItem(props) { |
| 384 | var expandedIndex = props.expandedIndex, |
| 385 | setExpandedIndex = props.setExpandedIndex, |
| 386 | setSteps = props.setSteps, |
| 387 | index = props.index, |
| 388 | step = props.step, |
| 389 | chevronStyle = index === expandedIndex ? { |
| 390 | transform: 'rotate(180deg)' |
| 391 | } : {}, |
| 392 | isChecked = (0, _functions.isStepChecked)(step), |
| 393 | promotionData = step.config[PROMOTION_DATA]; |
| 394 | var handleExpandClick = function handleExpandClick() { |
| 395 | (0, _functions.addMixpanelTrackingChecklistSteps)(step.config.id, TITLE, ACCORDION_SECTION); |
| 396 | setExpandedIndex(index === expandedIndex ? -1 : index); |
| 397 | }; |
| 398 | var getUpgradeIcon = function getUpgradeIcon() { |
| 399 | return 'default' === (promotionData === null || promotionData === void 0 ? void 0 : promotionData.icon) ? /*#__PURE__*/_react.default.createElement(_icons.UpgradeIcon, { |
| 400 | color: "promotion", |
| 401 | sx: { |
| 402 | mr: 1 |
| 403 | } |
| 404 | }) : /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, { |
| 405 | color: "promotion", |
| 406 | sx: { |
| 407 | mr: 1 |
| 408 | } |
| 409 | }, /*#__PURE__*/_react.default.createElement("img", { |
| 410 | src: promotionData === null || promotionData === void 0 ? void 0 : promotionData.icon, |
| 411 | alt: promotionData.iconAlt || '' |
| 412 | })); |
| 413 | }; |
| 414 | return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.ListItemButton, { |
| 415 | onClick: handleExpandClick, |
| 416 | "data-step-id": step.config.id, |
| 417 | dense: true |
| 418 | }, /*#__PURE__*/_react.default.createElement(_ui.ListItemIcon, null, /*#__PURE__*/_react.default.createElement(_ui.Checkbox, { |
| 419 | "data-is-checked": isChecked, |
| 420 | icon: /*#__PURE__*/_react.default.createElement(_icons.RadioButtonUncheckedIcon, null), |
| 421 | checkedIcon: /*#__PURE__*/_react.default.createElement(_icons.CircleCheckFilledIcon, { |
| 422 | color: "primary" |
| 423 | }), |
| 424 | edge: "start", |
| 425 | checked: isChecked, |
| 426 | tabIndex: -1, |
| 427 | inputProps: { |
| 428 | 'aria-labelledby': step.config.title |
| 429 | } |
| 430 | })), /*#__PURE__*/_react.default.createElement(_ui.ListItemText, { |
| 431 | primary: step.config.title, |
| 432 | primaryTypographyProps: { |
| 433 | variant: 'body2' |
| 434 | } |
| 435 | }), promotionData ? getUpgradeIcon() : null, /*#__PURE__*/_react.default.createElement(_icons.ChevronDownIcon, { |
| 436 | sx: _objectSpread(_objectSpread({}, chevronStyle), {}, { |
| 437 | transition: '300ms' |
| 438 | }) |
| 439 | })), /*#__PURE__*/_react.default.createElement(_ui.Collapse, { |
| 440 | in: index === expandedIndex |
| 441 | }, /*#__PURE__*/_react.default.createElement(_checklistCardContent.default, { |
| 442 | step: step, |
| 443 | setSteps: setSteps |
| 444 | }))); |
| 445 | } |
| 446 | var _default = exports["default"] = CheckListItem; |
| 447 | CheckListItem.propTypes = { |
| 448 | step: _propTypes.default.object.isRequired, |
| 449 | expandedIndex: _propTypes.default.number, |
| 450 | setExpandedIndex: _propTypes.default.func.isRequired, |
| 451 | setSteps: _propTypes.default.func.isRequired, |
| 452 | index: _propTypes.default.number.isRequired |
| 453 | }; |
| 454 | |
| 455 | /***/ }), |
| 456 | |
| 457 | /***/ "../modules/checklist/assets/js/app/components/checklist-wrapper.js": |
| 458 | /*!**************************************************************************!*\ |
| 459 | !*** ../modules/checklist/assets/js/app/components/checklist-wrapper.js ***! |
| 460 | \**************************************************************************/ |
| 461 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 462 | |
| 463 | "use strict"; |
| 464 | |
| 465 | |
| 466 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 467 | var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 468 | Object.defineProperty(exports, "__esModule", ({ |
| 469 | value: true |
| 470 | })); |
| 471 | exports["default"] = void 0; |
| 472 | var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 473 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 474 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 475 | var _checklistItem = _interopRequireDefault(__webpack_require__(/*! ./checklist-item */ "../modules/checklist/assets/js/app/components/checklist-item.js")); |
| 476 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 477 | var _successMessage = _interopRequireDefault(__webpack_require__(/*! ./success-message */ "../modules/checklist/assets/js/app/components/success-message.js")); |
| 478 | var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 479 | 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); } |
| 480 | var ChecklistWrapper = function ChecklistWrapper(_ref) { |
| 481 | var steps = _ref.steps, |
| 482 | setSteps = _ref.setSteps, |
| 483 | isMinimized = _ref.isMinimized; |
| 484 | var _useState = (0, _react.useState)(-1), |
| 485 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 486 | expandedIndex = _useState2[0], |
| 487 | setExpandedIndex = _useState2[1]; |
| 488 | var isChecklistCompleted = steps.filter(_functions.isStepChecked).length === steps.length; |
| 489 | return /*#__PURE__*/_react.default.createElement(_ui.Box, { |
| 490 | sx: { |
| 491 | transition: '400ms', |
| 492 | maxHeight: isMinimized ? 0 : '645px' |
| 493 | } |
| 494 | }, /*#__PURE__*/_react.default.createElement(_ui.List, { |
| 495 | component: "div", |
| 496 | sx: { |
| 497 | py: 0 |
| 498 | } |
| 499 | }, steps.map(function (step, index) { |
| 500 | return /*#__PURE__*/_react.default.createElement(_react.Fragment, { |
| 501 | key: index |
| 502 | }, index ? /*#__PURE__*/_react.default.createElement(_ui.Divider, null) : null, /*#__PURE__*/_react.default.createElement(_checklistItem.default, { |
| 503 | step: step, |
| 504 | setSteps: setSteps, |
| 505 | setExpandedIndex: setExpandedIndex, |
| 506 | expandedIndex: expandedIndex, |
| 507 | index: index |
| 508 | })); |
| 509 | })), isChecklistCompleted ? /*#__PURE__*/_react.default.createElement(_successMessage.default, null) : null); |
| 510 | }; |
| 511 | var _default = exports["default"] = ChecklistWrapper; |
| 512 | ChecklistWrapper.propTypes = { |
| 513 | steps: _propTypes.default.array.isRequired, |
| 514 | setSteps: _propTypes.default.func.isRequired, |
| 515 | isMinimized: _propTypes.default.bool.isRequired |
| 516 | }; |
| 517 | |
| 518 | /***/ }), |
| 519 | |
| 520 | /***/ "../modules/checklist/assets/js/app/components/checklist.js": |
| 521 | /*!******************************************************************!*\ |
| 522 | !*** ../modules/checklist/assets/js/app/components/checklist.js ***! |
| 523 | \******************************************************************/ |
| 524 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 525 | |
| 526 | "use strict"; |
| 527 | /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); |
| 528 | |
| 529 | |
| 530 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 531 | var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 532 | Object.defineProperty(exports, "__esModule", ({ |
| 533 | value: true |
| 534 | })); |
| 535 | exports["default"] = void 0; |
| 536 | var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 537 | var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); |
| 538 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 539 | var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); |
| 540 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 541 | var _header = _interopRequireDefault(__webpack_require__(/*! ./header */ "../modules/checklist/assets/js/app/components/header.js")); |
| 542 | var _checklistWrapper = _interopRequireDefault(__webpack_require__(/*! ./checklist-wrapper */ "../modules/checklist/assets/js/app/components/checklist-wrapper.js")); |
| 543 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 544 | var _consts = __webpack_require__(/*! ../../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); |
| 545 | var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 546 | 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 _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); } |
| 547 | var IS_POPUP_MINIMIZED = _consts.USER_PROGRESS.IS_POPUP_MINIMIZED; |
| 548 | var Checklist = function Checklist(props) { |
| 549 | var _useState = (0, _react.useState)(props.steps), |
| 550 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 551 | steps = _useState2[0], |
| 552 | setSteps = _useState2[1], |
| 553 | _useState3 = (0, _react.useState)(!!props.userProgress[IS_POPUP_MINIMIZED]), |
| 554 | _useState4 = (0, _slicedToArray2.default)(_useState3, 2), |
| 555 | isMinimized = _useState4[0], |
| 556 | setIsMinimized = _useState4[1]; |
| 557 | var toggleIsMinimized = /*#__PURE__*/function () { |
| 558 | var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { |
| 559 | var currState, _t; |
| 560 | return _regenerator.default.wrap(function (_context) { |
| 561 | while (1) switch (_context.prev = _context.next) { |
| 562 | case 0: |
| 563 | currState = isMinimized; |
| 564 | _context.prev = 1; |
| 565 | setIsMinimized(!currState); |
| 566 | _context.next = 2; |
| 567 | return (0, _functions.updateUserProgress)((0, _defineProperty2.default)({}, IS_POPUP_MINIMIZED, !currState)); |
| 568 | case 2: |
| 569 | _context.next = 4; |
| 570 | break; |
| 571 | case 3: |
| 572 | _context.prev = 3; |
| 573 | _t = _context["catch"](1); |
| 574 | setIsMinimized(currState); |
| 575 | case 4: |
| 576 | case "end": |
| 577 | return _context.stop(); |
| 578 | } |
| 579 | }, _callee, null, [[1, 3]]); |
| 580 | })); |
| 581 | return function toggleIsMinimized() { |
| 582 | return _ref.apply(this, arguments); |
| 583 | }; |
| 584 | }(); |
| 585 | (0, _react.useEffect)(function () { |
| 586 | setSteps(props.steps); |
| 587 | }, [props.steps]); |
| 588 | return /*#__PURE__*/_react.default.createElement(_ui.Paper, { |
| 589 | elevation: 5, |
| 590 | sx: { |
| 591 | position: 'fixed', |
| 592 | width: '360px', |
| 593 | bottom: '40px', |
| 594 | insetInlineEnd: '40px', |
| 595 | zIndex: '99999', |
| 596 | hidden: true, |
| 597 | maxHeight: '645px', |
| 598 | overflowY: 'auto' |
| 599 | } |
| 600 | }, /*#__PURE__*/_react.default.createElement(_header.default, { |
| 601 | steps: steps, |
| 602 | isMinimized: isMinimized, |
| 603 | toggleIsMinimized: toggleIsMinimized |
| 604 | }), /*#__PURE__*/_react.default.createElement(_checklistWrapper.default, { |
| 605 | steps: steps, |
| 606 | setSteps: setSteps, |
| 607 | isMinimized: isMinimized |
| 608 | })); |
| 609 | }; |
| 610 | Checklist.propTypes = { |
| 611 | steps: PropTypes.array.isRequired, |
| 612 | userProgress: PropTypes.object.isRequired |
| 613 | }; |
| 614 | var _default = exports["default"] = Checklist; |
| 615 | |
| 616 | /***/ }), |
| 617 | |
| 618 | /***/ "../modules/checklist/assets/js/app/components/header.js": |
| 619 | /*!***************************************************************!*\ |
| 620 | !*** ../modules/checklist/assets/js/app/components/header.js ***! |
| 621 | \***************************************************************/ |
| 622 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 623 | |
| 624 | "use strict"; |
| 625 | |
| 626 | |
| 627 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 628 | var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 629 | Object.defineProperty(exports, "__esModule", ({ |
| 630 | value: true |
| 631 | })); |
| 632 | exports["default"] = void 0; |
| 633 | var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); |
| 634 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 635 | var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); |
| 636 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 637 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 638 | var _progress = _interopRequireDefault(__webpack_require__(/*! ./progress */ "../modules/checklist/assets/js/app/components/progress.js")); |
| 639 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 640 | var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query"); |
| 641 | var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 642 | var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 643 | var _consts = __webpack_require__(/*! ../../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); |
| 644 | var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); |
| 645 | 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); } |
| 646 | var CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME = _consts.USER_PROGRESS.CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME; |
| 647 | var CHECKLIST_HEADER_CLOSE = _consts.MIXPANEL_CHECKLIST_STEPS.CHECKLIST_HEADER_CLOSE; |
| 648 | var Header = function Header(_ref) { |
| 649 | var steps = _ref.steps, |
| 650 | isMinimized = _ref.isMinimized, |
| 651 | toggleIsMinimized = _ref.toggleIsMinimized; |
| 652 | var _useQuery = (0, _query.useQuery)({ |
| 653 | queryKey: ['closedForFirstTime'], |
| 654 | queryFn: _functions.fetchUserProgress |
| 655 | }), |
| 656 | userProgress = _useQuery.data, |
| 657 | closedForFirstTime = (userProgress === null || userProgress === void 0 ? void 0 : userProgress[CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME]) || false; |
| 658 | var closeChecklist = /*#__PURE__*/function () { |
| 659 | var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { |
| 660 | return _regenerator.default.wrap(function (_context) { |
| 661 | while (1) switch (_context.prev = _context.next) { |
| 662 | case 0: |
| 663 | (0, _functions.addMixpanelTrackingChecklistHeader)(CHECKLIST_HEADER_CLOSE); |
| 664 | if (closedForFirstTime) { |
| 665 | _context.next = 2; |
| 666 | break; |
| 667 | } |
| 668 | _context.next = 1; |
| 669 | return (0, _functions.updateUserProgress)((0, _defineProperty2.default)({}, CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME, true)); |
| 670 | case 1: |
| 671 | window.dispatchEvent(new CustomEvent('elementor/checklist/first_close', { |
| 672 | detail: { |
| 673 | message: 'firstClose' |
| 674 | } |
| 675 | })); |
| 676 | case 2: |
| 677 | (0, _functions.toggleChecklistPopup)(); |
| 678 | case 3: |
| 679 | case "end": |
| 680 | return _context.stop(); |
| 681 | } |
| 682 | }, _callee); |
| 683 | })); |
| 684 | return function closeChecklist() { |
| 685 | return _ref2.apply(this, arguments); |
| 686 | }; |
| 687 | }(); |
| 688 | return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_ui.AppBar, { |
| 689 | elevation: 0, |
| 690 | position: "sticky", |
| 691 | sx: { |
| 692 | p: 2, |
| 693 | backgroundColor: 'background.default' |
| 694 | } |
| 695 | }, /*#__PURE__*/React.createElement(_ui.Toolbar, { |
| 696 | variant: "dense", |
| 697 | disableGutters: true |
| 698 | }, /*#__PURE__*/React.createElement(_ui.Typography, { |
| 699 | variant: "subtitle1", |
| 700 | sx: { |
| 701 | flexGrow: 1 |
| 702 | } |
| 703 | }, (0, _i18n.__)('Let\'s make a productivity boost', 'elementor')), /*#__PURE__*/React.createElement(_ui.IconButton, { |
| 704 | size: "small", |
| 705 | onClick: toggleIsMinimized, |
| 706 | "aria-expanded": !isMinimized |
| 707 | }, isMinimized ? /*#__PURE__*/React.createElement(_icons.ExpandDiagonalIcon, null) : /*#__PURE__*/React.createElement(_icons.MinimizeDiagonalIcon, null)), /*#__PURE__*/React.createElement(_ui.CloseButton, { |
| 708 | sx: { |
| 709 | mr: -0.5 |
| 710 | }, |
| 711 | size: "small", |
| 712 | onClick: closeChecklist |
| 713 | })), /*#__PURE__*/React.createElement(_progress.default, { |
| 714 | steps: steps |
| 715 | })), /*#__PURE__*/React.createElement(_ui.Divider, null)); |
| 716 | }; |
| 717 | Header.propTypes = { |
| 718 | steps: _propTypes.default.array.isRequired, |
| 719 | isMinimized: _propTypes.default.bool.isRequired, |
| 720 | toggleIsMinimized: _propTypes.default.func.isRequired |
| 721 | }; |
| 722 | var _default = exports["default"] = Header; |
| 723 | |
| 724 | /***/ }), |
| 725 | |
| 726 | /***/ "../modules/checklist/assets/js/app/components/progress.js": |
| 727 | /*!*****************************************************************!*\ |
| 728 | !*** ../modules/checklist/assets/js/app/components/progress.js ***! |
| 729 | \*****************************************************************/ |
| 730 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 731 | |
| 732 | "use strict"; |
| 733 | |
| 734 | |
| 735 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 736 | Object.defineProperty(exports, "__esModule", ({ |
| 737 | value: true |
| 738 | })); |
| 739 | exports["default"] = void 0; |
| 740 | var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 741 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 742 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 743 | var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 744 | var Progress = function Progress(_ref) { |
| 745 | var steps = _ref.steps; |
| 746 | var progress = steps.filter(_functions.isStepChecked).length * 100 / steps.length; |
| 747 | return /*#__PURE__*/_react.default.createElement(_ui.Box, { |
| 748 | sx: { |
| 749 | display: 'flex', |
| 750 | alignItems: 'center', |
| 751 | gap: 1 |
| 752 | } |
| 753 | }, /*#__PURE__*/_react.default.createElement(_ui.Box, { |
| 754 | sx: { |
| 755 | width: '100%' |
| 756 | } |
| 757 | }, /*#__PURE__*/_react.default.createElement(_ui.LinearProgress, { |
| 758 | variant: "determinate", |
| 759 | value: progress |
| 760 | })), /*#__PURE__*/_react.default.createElement(_ui.Box, { |
| 761 | sx: { |
| 762 | width: 'fit-content' |
| 763 | } |
| 764 | }, /*#__PURE__*/_react.default.createElement(_ui.Typography, { |
| 765 | variant: "body2", |
| 766 | color: "text.secondary" |
| 767 | }, "".concat(Math.round(progress), "%")))); |
| 768 | }; |
| 769 | var _default = exports["default"] = Progress; |
| 770 | Progress.propTypes = { |
| 771 | steps: _propTypes.default.array.isRequired |
| 772 | }; |
| 773 | |
| 774 | /***/ }), |
| 775 | |
| 776 | /***/ "../modules/checklist/assets/js/app/components/reminder-modal.js": |
| 777 | /*!***********************************************************************!*\ |
| 778 | !*** ../modules/checklist/assets/js/app/components/reminder-modal.js ***! |
| 779 | \***********************************************************************/ |
| 780 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 781 | |
| 782 | "use strict"; |
| 783 | |
| 784 | |
| 785 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 786 | Object.defineProperty(exports, "__esModule", ({ |
| 787 | value: true |
| 788 | })); |
| 789 | exports["default"] = void 0; |
| 790 | var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 791 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 792 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 793 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 794 | var ReminderModal = function ReminderModal(_ref) { |
| 795 | var setOpen = _ref.setOpen; |
| 796 | var closeChecklist = function closeChecklist(e) { |
| 797 | e.stopPropagation(); |
| 798 | setOpen(false); |
| 799 | }; |
| 800 | return /*#__PURE__*/_react.default.createElement(_ui.Card, { |
| 801 | elevation: 0, |
| 802 | sx: { |
| 803 | maxWidth: 336 |
| 804 | }, |
| 805 | className: "e-checklist-infotip-first-time-closed" |
| 806 | }, /*#__PURE__*/_react.default.createElement(_ui.CardContent, null, /*#__PURE__*/_react.default.createElement(_ui.Typography, { |
| 807 | variant: "subtitle2", |
| 808 | sx: { |
| 809 | mb: 2 |
| 810 | } |
| 811 | }, (0, _i18n.__)('Looking for your Launchpad Checklist?', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Typography, { |
| 812 | variant: "body2" |
| 813 | }, (0, _i18n.__)('Click the launch icon to continue setting up your site.', 'elementor'))), /*#__PURE__*/_react.default.createElement(_ui.CardActions, null, /*#__PURE__*/_react.default.createElement(_ui.Button, { |
| 814 | size: "small", |
| 815 | variant: "contained", |
| 816 | className: "infotip-first-time-closed-button", |
| 817 | onClick: closeChecklist |
| 818 | }, (0, _i18n.__)('Got it', 'elementor')))); |
| 819 | }; |
| 820 | var _default = exports["default"] = ReminderModal; |
| 821 | ReminderModal.propTypes = { |
| 822 | setOpen: _propTypes.default.func.isRequired |
| 823 | }; |
| 824 | |
| 825 | /***/ }), |
| 826 | |
| 827 | /***/ "../modules/checklist/assets/js/app/components/success-message.js": |
| 828 | /*!************************************************************************!*\ |
| 829 | !*** ../modules/checklist/assets/js/app/components/success-message.js ***! |
| 830 | \************************************************************************/ |
| 831 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 832 | |
| 833 | "use strict"; |
| 834 | |
| 835 | |
| 836 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 837 | var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 838 | Object.defineProperty(exports, "__esModule", ({ |
| 839 | value: true |
| 840 | })); |
| 841 | exports["default"] = void 0; |
| 842 | var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 843 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 844 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 845 | var _useAjax2 = _interopRequireDefault(__webpack_require__(/*! elementor-app/hooks/use-ajax */ "../app/assets/js/hooks/use-ajax.js")); |
| 846 | var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 847 | var _consts = __webpack_require__(/*! ../../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); |
| 848 | 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); } |
| 849 | var ACTION = _consts.MIXPANEL_CHECKLIST_STEPS.ACTION, |
| 850 | WELL_DONE = _consts.MIXPANEL_CHECKLIST_STEPS.WELL_DONE; |
| 851 | var SuccessMessage = function SuccessMessage() { |
| 852 | var _useAjax = (0, _useAjax2.default)(), |
| 853 | ajaxState = _useAjax.ajaxState, |
| 854 | setAjax = _useAjax.setAjax; |
| 855 | var hideChecklist = function hideChecklist() { |
| 856 | (0, _functions.addMixpanelTrackingChecklistSteps)(WELL_DONE, ACTION); |
| 857 | setAjax({ |
| 858 | data: { |
| 859 | action: 'elementor_ajax', |
| 860 | actions: JSON.stringify({ |
| 861 | save_editorPreferences_settings: { |
| 862 | action: 'save_editorPreferences_settings', |
| 863 | data: { |
| 864 | data: { |
| 865 | show_launchpad_checklist: '' |
| 866 | } |
| 867 | } |
| 868 | } |
| 869 | }) |
| 870 | } |
| 871 | }); |
| 872 | }; |
| 873 | (0, _react.useEffect)(function () { |
| 874 | switch (ajaxState.status) { |
| 875 | case 'success': |
| 876 | setTimeout(function () { |
| 877 | $e.commands.run('checklist/toggle-icon', false); |
| 878 | }, 0); |
| 879 | break; |
| 880 | case 'error': |
| 881 | break; |
| 882 | } |
| 883 | }, [ajaxState]); |
| 884 | return /*#__PURE__*/_react.default.createElement(_ui.Card, { |
| 885 | elevation: 0, |
| 886 | square: true, |
| 887 | className: "e-checklist-done" |
| 888 | }, /*#__PURE__*/_react.default.createElement(_ui.CardMedia, { |
| 889 | image: "https://assets.elementor.com/checklist/v1/images/checklist-step-7.jpg", |
| 890 | sx: { |
| 891 | height: 180 |
| 892 | } |
| 893 | }), /*#__PURE__*/_react.default.createElement(_ui.CardContent, { |
| 894 | sx: { |
| 895 | textAlign: 'center' |
| 896 | } |
| 897 | }, /*#__PURE__*/_react.default.createElement(_ui.Typography, { |
| 898 | variant: "h6", |
| 899 | color: "text.primary" |
| 900 | }, (0, _i18n.__)('You\'re on your way!', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Typography, { |
| 901 | variant: "body2", |
| 902 | color: "text.secondary", |
| 903 | component: "p" |
| 904 | }, (0, _i18n.__)('With these steps, you\'ve got a great base for a robust website. Enjoy your web creation journey!', 'elementor'))), /*#__PURE__*/_react.default.createElement(_ui.CardActions, { |
| 905 | sx: { |
| 906 | justifyContent: 'center' |
| 907 | } |
| 908 | }, /*#__PURE__*/_react.default.createElement(_ui.Button, { |
| 909 | color: "primary", |
| 910 | size: "small", |
| 911 | variant: "contained", |
| 912 | onClick: hideChecklist |
| 913 | }, (0, _i18n.__)('Got it', 'elementor')))); |
| 914 | }; |
| 915 | var _default = exports["default"] = SuccessMessage; |
| 916 | |
| 917 | /***/ }), |
| 918 | |
| 919 | /***/ "../modules/checklist/assets/js/commands-data/index.js": |
| 920 | /*!*************************************************************!*\ |
| 921 | !*** ../modules/checklist/assets/js/commands-data/index.js ***! |
| 922 | \*************************************************************/ |
| 923 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 924 | |
| 925 | "use strict"; |
| 926 | |
| 927 | |
| 928 | Object.defineProperty(exports, "__esModule", ({ |
| 929 | value: true |
| 930 | })); |
| 931 | Object.defineProperty(exports, "Steps", ({ |
| 932 | enumerable: true, |
| 933 | get: function get() { |
| 934 | return _steps.Steps; |
| 935 | } |
| 936 | })); |
| 937 | Object.defineProperty(exports, "UserProgress", ({ |
| 938 | enumerable: true, |
| 939 | get: function get() { |
| 940 | return _userProgress.UserProgress; |
| 941 | } |
| 942 | })); |
| 943 | var _steps = __webpack_require__(/*! ./steps */ "../modules/checklist/assets/js/commands-data/steps.js"); |
| 944 | var _userProgress = __webpack_require__(/*! ./user-progress */ "../modules/checklist/assets/js/commands-data/user-progress.js"); |
| 945 | |
| 946 | /***/ }), |
| 947 | |
| 948 | /***/ "../modules/checklist/assets/js/commands-data/steps.js": |
| 949 | /*!*************************************************************!*\ |
| 950 | !*** ../modules/checklist/assets/js/commands-data/steps.js ***! |
| 951 | \*************************************************************/ |
| 952 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 953 | |
| 954 | "use strict"; |
| 955 | |
| 956 | |
| 957 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 958 | Object.defineProperty(exports, "__esModule", ({ |
| 959 | value: true |
| 960 | })); |
| 961 | exports["default"] = exports.Steps = void 0; |
| 962 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 963 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 964 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 965 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 966 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 967 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 968 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 969 | var Steps = exports.Steps = /*#__PURE__*/function (_$e$modules$CommandDa) { |
| 970 | function Steps() { |
| 971 | (0, _classCallCheck2.default)(this, Steps); |
| 972 | return _callSuper(this, Steps, arguments); |
| 973 | } |
| 974 | (0, _inherits2.default)(Steps, _$e$modules$CommandDa); |
| 975 | return (0, _createClass2.default)(Steps, null, [{ |
| 976 | key: "getEndpointFormat", |
| 977 | value: function getEndpointFormat() { |
| 978 | return 'checklist/steps/{id}'; |
| 979 | } |
| 980 | }]); |
| 981 | }($e.modules.CommandData); |
| 982 | var _default = exports["default"] = Steps; |
| 983 | |
| 984 | /***/ }), |
| 985 | |
| 986 | /***/ "../modules/checklist/assets/js/commands-data/user-progress.js": |
| 987 | /*!*********************************************************************!*\ |
| 988 | !*** ../modules/checklist/assets/js/commands-data/user-progress.js ***! |
| 989 | \*********************************************************************/ |
| 990 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 991 | |
| 992 | "use strict"; |
| 993 | |
| 994 | |
| 995 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 996 | Object.defineProperty(exports, "__esModule", ({ |
| 997 | value: true |
| 998 | })); |
| 999 | exports["default"] = exports.UserProgress = void 0; |
| 1000 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1001 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1002 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1003 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1004 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1005 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 1006 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1007 | var UserProgress = exports.UserProgress = /*#__PURE__*/function (_$e$modules$CommandDa) { |
| 1008 | function UserProgress() { |
| 1009 | (0, _classCallCheck2.default)(this, UserProgress); |
| 1010 | return _callSuper(this, UserProgress, arguments); |
| 1011 | } |
| 1012 | (0, _inherits2.default)(UserProgress, _$e$modules$CommandDa); |
| 1013 | return (0, _createClass2.default)(UserProgress, null, [{ |
| 1014 | key: "getEndpointFormat", |
| 1015 | value: function getEndpointFormat() { |
| 1016 | return 'checklist/user-progress'; |
| 1017 | } |
| 1018 | }]); |
| 1019 | }($e.modules.CommandData); |
| 1020 | var _default = exports["default"] = UserProgress; |
| 1021 | |
| 1022 | /***/ }), |
| 1023 | |
| 1024 | /***/ "../modules/checklist/assets/js/commands/index.js": |
| 1025 | /*!********************************************************!*\ |
| 1026 | !*** ../modules/checklist/assets/js/commands/index.js ***! |
| 1027 | \********************************************************/ |
| 1028 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1029 | |
| 1030 | "use strict"; |
| 1031 | |
| 1032 | |
| 1033 | Object.defineProperty(exports, "__esModule", ({ |
| 1034 | value: true |
| 1035 | })); |
| 1036 | Object.defineProperty(exports, "ToggleIcon", ({ |
| 1037 | enumerable: true, |
| 1038 | get: function get() { |
| 1039 | return _toggleIcon.ToggleIcon; |
| 1040 | } |
| 1041 | })); |
| 1042 | Object.defineProperty(exports, "TogglePopup", ({ |
| 1043 | enumerable: true, |
| 1044 | get: function get() { |
| 1045 | return _togglePopup.TogglePopup; |
| 1046 | } |
| 1047 | })); |
| 1048 | var _togglePopup = __webpack_require__(/*! ./toggle-popup */ "../modules/checklist/assets/js/commands/toggle-popup.js"); |
| 1049 | var _toggleIcon = __webpack_require__(/*! ./toggle-icon */ "../modules/checklist/assets/js/commands/toggle-icon.js"); |
| 1050 | |
| 1051 | /***/ }), |
| 1052 | |
| 1053 | /***/ "../modules/checklist/assets/js/commands/toggle-icon.js": |
| 1054 | /*!**************************************************************!*\ |
| 1055 | !*** ../modules/checklist/assets/js/commands/toggle-icon.js ***! |
| 1056 | \**************************************************************/ |
| 1057 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1058 | |
| 1059 | "use strict"; |
| 1060 | |
| 1061 | |
| 1062 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1063 | Object.defineProperty(exports, "__esModule", ({ |
| 1064 | value: true |
| 1065 | })); |
| 1066 | exports["default"] = exports.ToggleIcon = void 0; |
| 1067 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1068 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1069 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1070 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1071 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1072 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 1073 | var _togglePopup = _interopRequireDefault(__webpack_require__(/*! ./toggle-popup */ "../modules/checklist/assets/js/commands/toggle-popup.js")); |
| 1074 | var _functions = __webpack_require__(/*! ../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 1075 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 1076 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1077 | var ToggleIcon = exports.ToggleIcon = /*#__PURE__*/function (_$e$modules$CommandBa) { |
| 1078 | function ToggleIcon() { |
| 1079 | (0, _classCallCheck2.default)(this, ToggleIcon); |
| 1080 | return _callSuper(this, ToggleIcon, arguments); |
| 1081 | } |
| 1082 | (0, _inherits2.default)(ToggleIcon, _$e$modules$CommandBa); |
| 1083 | return (0, _createClass2.default)(ToggleIcon, [{ |
| 1084 | key: "apply", |
| 1085 | value: function apply(shouldShow) { |
| 1086 | document.body.querySelector('[aria-label="Checklist"]').parentElement.style.display = shouldShow ? 'block' : 'none'; |
| 1087 | if (!shouldShow && _togglePopup.default.isOpen) { |
| 1088 | (0, _functions.toggleChecklistPopup)(); |
| 1089 | } |
| 1090 | } |
| 1091 | }]); |
| 1092 | }($e.modules.CommandBase); |
| 1093 | (0, _defineProperty2.default)(ToggleIcon, "isSettingsOn", true); |
| 1094 | var _default = exports["default"] = ToggleIcon; |
| 1095 | |
| 1096 | /***/ }), |
| 1097 | |
| 1098 | /***/ "../modules/checklist/assets/js/commands/toggle-popup.js": |
| 1099 | /*!***************************************************************!*\ |
| 1100 | !*** ../modules/checklist/assets/js/commands/toggle-popup.js ***! |
| 1101 | \***************************************************************/ |
| 1102 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1103 | |
| 1104 | "use strict"; |
| 1105 | |
| 1106 | |
| 1107 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1108 | Object.defineProperty(exports, "__esModule", ({ |
| 1109 | value: true |
| 1110 | })); |
| 1111 | exports["default"] = exports.TogglePopup = void 0; |
| 1112 | var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 1113 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1114 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1115 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1116 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1117 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1118 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 1119 | var _app = _interopRequireDefault(__webpack_require__(/*! ../app/app */ "../modules/checklist/assets/js/app/app.js")); |
| 1120 | var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query"); |
| 1121 | var _client = _interopRequireDefault(__webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js")); |
| 1122 | var _functions = __webpack_require__(/*! ../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 1123 | var _consts = __webpack_require__(/*! ../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); |
| 1124 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 1125 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1126 | var queryClient = new _query.QueryClient(); |
| 1127 | var TogglePopup = exports.TogglePopup = /*#__PURE__*/function (_$e$modules$CommandBa) { |
| 1128 | function TogglePopup() { |
| 1129 | (0, _classCallCheck2.default)(this, TogglePopup); |
| 1130 | return _callSuper(this, TogglePopup, arguments); |
| 1131 | } |
| 1132 | (0, _inherits2.default)(TogglePopup, _$e$modules$CommandBa); |
| 1133 | return (0, _createClass2.default)(TogglePopup, [{ |
| 1134 | key: "apply", |
| 1135 | value: function apply(args) { |
| 1136 | if (!TogglePopup.isOpen) { |
| 1137 | this.mount(); |
| 1138 | } else { |
| 1139 | this.unmount(); |
| 1140 | } |
| 1141 | TogglePopup.isOpen = !TogglePopup.isOpen; |
| 1142 | args.isOpen = TogglePopup.isOpen; |
| 1143 | (0, _functions.updateUserProgress)((0, _defineProperty2.default)({}, _consts.USER_PROGRESS.LAST_OPENED_TIMESTAMP, TogglePopup.isOpen)); |
| 1144 | } |
| 1145 | }, { |
| 1146 | key: "mount", |
| 1147 | value: function mount() { |
| 1148 | this.setRootElement(); |
| 1149 | TogglePopup.rootElement.render(/*#__PURE__*/_react.default.createElement(_query.QueryClientProvider, { |
| 1150 | client: queryClient |
| 1151 | }, /*#__PURE__*/_react.default.createElement(_app.default, null))); |
| 1152 | } |
| 1153 | }, { |
| 1154 | key: "unmount", |
| 1155 | value: function unmount() { |
| 1156 | TogglePopup.rootElement.unmount(); |
| 1157 | document.body.removeChild(document.body.querySelector('#e-checklist')); |
| 1158 | } |
| 1159 | }, { |
| 1160 | key: "setRootElement", |
| 1161 | value: function setRootElement() { |
| 1162 | var root = document.body.querySelector('#e-checklist'); |
| 1163 | if (!root) { |
| 1164 | root = document.createElement('div'); |
| 1165 | root.id = 'e-checklist'; |
| 1166 | document.body.appendChild(root); |
| 1167 | } |
| 1168 | TogglePopup.rootElement = _client.default.createRoot(root); |
| 1169 | } |
| 1170 | }]); |
| 1171 | }($e.modules.CommandBase); |
| 1172 | (0, _defineProperty2.default)(TogglePopup, "rootElement", null); |
| 1173 | (0, _defineProperty2.default)(TogglePopup, "isOpen", false); |
| 1174 | var _default = exports["default"] = TogglePopup; |
| 1175 | |
| 1176 | /***/ }), |
| 1177 | |
| 1178 | /***/ "../modules/checklist/assets/js/component.js": |
| 1179 | /*!***************************************************!*\ |
| 1180 | !*** ../modules/checklist/assets/js/component.js ***! |
| 1181 | \***************************************************/ |
| 1182 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1183 | |
| 1184 | "use strict"; |
| 1185 | |
| 1186 | |
| 1187 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1188 | var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 1189 | Object.defineProperty(exports, "__esModule", ({ |
| 1190 | value: true |
| 1191 | })); |
| 1192 | exports["default"] = void 0; |
| 1193 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1194 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1195 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1196 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1197 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1198 | var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../modules/checklist/assets/js/commands/index.js")); |
| 1199 | var commandsData = _interopRequireWildcard(__webpack_require__(/*! ./commands-data/ */ "../modules/checklist/assets/js/commands-data/index.js")); |
| 1200 | 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); } |
| 1201 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 1202 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1203 | var Component = exports["default"] = /*#__PURE__*/function (_$e$modules$Component) { |
| 1204 | function Component() { |
| 1205 | (0, _classCallCheck2.default)(this, Component); |
| 1206 | return _callSuper(this, Component, arguments); |
| 1207 | } |
| 1208 | (0, _inherits2.default)(Component, _$e$modules$Component); |
| 1209 | return (0, _createClass2.default)(Component, [{ |
| 1210 | key: "getNamespace", |
| 1211 | value: function getNamespace() { |
| 1212 | return 'checklist'; |
| 1213 | } |
| 1214 | }, { |
| 1215 | key: "defaultCommands", |
| 1216 | value: function defaultCommands() { |
| 1217 | return this.importCommands(commands); |
| 1218 | } |
| 1219 | }, { |
| 1220 | key: "defaultData", |
| 1221 | value: function defaultData() { |
| 1222 | return this.importCommands(commandsData); |
| 1223 | } |
| 1224 | }], [{ |
| 1225 | key: "getEndpointFormat", |
| 1226 | value: function getEndpointFormat() { |
| 1227 | return 'checklist'; |
| 1228 | } |
| 1229 | }]); |
| 1230 | }($e.modules.ComponentBase); |
| 1231 | |
| 1232 | /***/ }), |
| 1233 | |
| 1234 | /***/ "../modules/checklist/assets/js/editor-app-bar-link.js": |
| 1235 | /*!*************************************************************!*\ |
| 1236 | !*** ../modules/checklist/assets/js/editor-app-bar-link.js ***! |
| 1237 | \*************************************************************/ |
| 1238 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1239 | |
| 1240 | "use strict"; |
| 1241 | |
| 1242 | |
| 1243 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1244 | var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 1245 | Object.defineProperty(exports, "__esModule", ({ |
| 1246 | value: true |
| 1247 | })); |
| 1248 | exports.editorAppBarLink = void 0; |
| 1249 | var EditorAppBar = _interopRequireWildcard(__webpack_require__(/*! @elementor/editor-app-bar */ "@elementor/editor-app-bar")); |
| 1250 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1251 | var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 1252 | var _topbarIcon = _interopRequireDefault(__webpack_require__(/*! ./topbar-icon */ "../modules/checklist/assets/js/topbar-icon.js")); |
| 1253 | var _functions = __webpack_require__(/*! ./utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 1254 | var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query"); |
| 1255 | var _commands = __webpack_require__(/*! ./commands */ "../modules/checklist/assets/js/commands/index.js"); |
| 1256 | 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); } |
| 1257 | var queryClient = new _query.QueryClient(); |
| 1258 | var editorAppBarLink = exports.editorAppBarLink = function editorAppBarLink() { |
| 1259 | var utilitiesMenu = EditorAppBar.utilitiesMenu; |
| 1260 | utilitiesMenu.registerLink({ |
| 1261 | id: 'app-bar-menu-item-checklist', |
| 1262 | priority: 5, |
| 1263 | useProps: function useProps() { |
| 1264 | return { |
| 1265 | title: (0, _i18n.__)('Checklist', 'elementor'), |
| 1266 | icon: function icon() { |
| 1267 | return /*#__PURE__*/React.createElement(_query.QueryClientProvider, { |
| 1268 | client: queryClient |
| 1269 | }, /*#__PURE__*/React.createElement(_topbarIcon.default, null)); |
| 1270 | }, |
| 1271 | onClick: function onClick() { |
| 1272 | (0, _functions.addMixpanelTrackingChecklistTopBar)(_commands.TogglePopup.isOpen); |
| 1273 | (0, _functions.toggleChecklistPopup)(); |
| 1274 | } |
| 1275 | }; |
| 1276 | } |
| 1277 | }); |
| 1278 | }; |
| 1279 | |
| 1280 | /***/ }), |
| 1281 | |
| 1282 | /***/ "../modules/checklist/assets/js/topbar-icon.js": |
| 1283 | /*!*****************************************************!*\ |
| 1284 | !*** ../modules/checklist/assets/js/topbar-icon.js ***! |
| 1285 | \*****************************************************/ |
| 1286 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1287 | |
| 1288 | "use strict"; |
| 1289 | |
| 1290 | |
| 1291 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1292 | var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 1293 | Object.defineProperty(exports, "__esModule", ({ |
| 1294 | value: true |
| 1295 | })); |
| 1296 | exports["default"] = void 0; |
| 1297 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 1298 | var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 1299 | var React = _react; |
| 1300 | var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query"); |
| 1301 | var _editorV1Adapters = __webpack_require__(/*! @elementor/editor-v1-adapters */ "@elementor/editor-v1-adapters"); |
| 1302 | var _RocketIcon = _interopRequireDefault(__webpack_require__(/*! @elementor/icons/RocketIcon */ "@elementor/icons/RocketIcon")); |
| 1303 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 1304 | var _reminderModal = _interopRequireDefault(__webpack_require__(/*! ./app/components/reminder-modal */ "../modules/checklist/assets/js/app/components/reminder-modal.js")); |
| 1305 | var _consts = __webpack_require__(/*! ./utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); |
| 1306 | var _functions = __webpack_require__(/*! ./utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 1307 | 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); } |
| 1308 | var CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME = _consts.USER_PROGRESS.CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME; |
| 1309 | var TopBarIcon = function TopBarIcon() { |
| 1310 | var _useState = (0, _react.useState)(false), |
| 1311 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 1312 | hasRoot = _useState2[0], |
| 1313 | setHasRoot = _useState2[1], |
| 1314 | _useState3 = (0, _react.useState)(false), |
| 1315 | _useState4 = (0, _slicedToArray2.default)(_useState3, 2), |
| 1316 | open = _useState4[0], |
| 1317 | setOpen = _useState4[1], |
| 1318 | _useQuery = (0, _query.useQuery)({ |
| 1319 | queryKey: ['closedForFirstTime'], |
| 1320 | queryFn: _functions.fetchUserProgress |
| 1321 | }), |
| 1322 | error = _useQuery.error, |
| 1323 | userProgress = _useQuery.data, |
| 1324 | closedForFirstTime = userProgress === null || userProgress === void 0 ? void 0 : userProgress[CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME]; |
| 1325 | (0, _react.useEffect)(function () { |
| 1326 | return (0, _editorV1Adapters.__privateListenTo)((0, _editorV1Adapters.commandEndEvent)('checklist/toggle-popup'), function (e) { |
| 1327 | setHasRoot(e.args.isOpen); |
| 1328 | }); |
| 1329 | }, [hasRoot]); |
| 1330 | (0, _react.useEffect)(function () { |
| 1331 | var handleFirstClosed = function handleFirstClosed() { |
| 1332 | setOpen(true); |
| 1333 | }; |
| 1334 | window.addEventListener('elementor/checklist/first_close', handleFirstClosed); |
| 1335 | return function () { |
| 1336 | window.removeEventListener('elementor/checklist/first_close', handleFirstClosed); |
| 1337 | }; |
| 1338 | }, []); |
| 1339 | if (error) { |
| 1340 | return null; |
| 1341 | } |
| 1342 | return hasRoot && !closedForFirstTime ? /*#__PURE__*/React.createElement(_RocketIcon.default, null) : /*#__PURE__*/React.createElement(_ui.Infotip, { |
| 1343 | placement: "bottom-start", |
| 1344 | content: /*#__PURE__*/React.createElement(_reminderModal.default, { |
| 1345 | setHasRoot: setHasRoot, |
| 1346 | setOpen: setOpen |
| 1347 | }), |
| 1348 | open: open, |
| 1349 | PopperProps: { |
| 1350 | modifiers: [{ |
| 1351 | name: 'offset', |
| 1352 | options: { |
| 1353 | offset: [-16, 12] |
| 1354 | } |
| 1355 | }] |
| 1356 | } |
| 1357 | }, /*#__PURE__*/React.createElement(_RocketIcon.default, null)); |
| 1358 | }; |
| 1359 | var _default = exports["default"] = TopBarIcon; |
| 1360 | |
| 1361 | /***/ }), |
| 1362 | |
| 1363 | /***/ "../modules/checklist/assets/js/utils/consts.js": |
| 1364 | /*!******************************************************!*\ |
| 1365 | !*** ../modules/checklist/assets/js/utils/consts.js ***! |
| 1366 | \******************************************************/ |
| 1367 | /***/ ((__unused_webpack_module, exports) => { |
| 1368 | |
| 1369 | "use strict"; |
| 1370 | |
| 1371 | |
| 1372 | Object.defineProperty(exports, "__esModule", ({ |
| 1373 | value: true |
| 1374 | })); |
| 1375 | exports.USER_PROGRESS_ROUTE = exports.USER_PROGRESS = exports.STEP_IDS_TO_COMPLETE_IN_EDITOR = exports.STEPS_ROUTE = exports.STEP = exports.PANEL_ROUTES = exports.MIXPANEL_CHECKLIST_STEPS = void 0; |
| 1376 | var STEPS_ROUTE = exports.STEPS_ROUTE = 'checklist/steps', |
| 1377 | USER_PROGRESS_ROUTE = exports.USER_PROGRESS_ROUTE = 'checklist/user-progress'; |
| 1378 | var STEP = exports.STEP = { |
| 1379 | IS_MARKED_COMPLETED: 'is_marked_completed', |
| 1380 | IS_IMMUTABLE_COMPLETED: 'is_immutable_completed', |
| 1381 | IS_ABSOLUTE_COMPLETED: 'is_absolute_completed', |
| 1382 | PROMOTION_DATA: 'promotion_data' |
| 1383 | }; |
| 1384 | var USER_PROGRESS = exports.USER_PROGRESS = { |
| 1385 | LAST_OPENED_TIMESTAMP: 'last_opened_timestamp', |
| 1386 | SHOULD_OPEN_IN_EDITOR: 'should_open_in_editor', |
| 1387 | CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME: 'first_closed_checklist_in_editor', |
| 1388 | IS_POPUP_MINIMIZED: 'is_popup_minimized', |
| 1389 | EDITOR_VISIT_COUNT: 'e_editor_counter' |
| 1390 | }; |
| 1391 | var STEP_IDS_TO_COMPLETE_IN_EDITOR = exports.STEP_IDS_TO_COMPLETE_IN_EDITOR = ['add_logo', 'set_fonts_and_colors']; |
| 1392 | var PANEL_ROUTES = exports.PANEL_ROUTES = { |
| 1393 | add_logo: 'panel/global/settings-site-identity', |
| 1394 | set_fonts_and_colors: 'panel/global/global-typography' |
| 1395 | }; |
| 1396 | var MIXPANEL_CHECKLIST_STEPS = exports.MIXPANEL_CHECKLIST_STEPS = { |
| 1397 | UPGRADE: 'upgrade', |
| 1398 | ACTION: 'action', |
| 1399 | DONE: 'done', |
| 1400 | UNDONE: 'undone', |
| 1401 | TITLE: 'title', |
| 1402 | WELL_DONE: 'well_done', |
| 1403 | CHECKLIST_HEADER_CLOSE: 'checklistHeaderClose', |
| 1404 | ACCORDION_SECTION: 'accordionSection' |
| 1405 | }; |
| 1406 | |
| 1407 | /***/ }), |
| 1408 | |
| 1409 | /***/ "../modules/checklist/assets/js/utils/functions.js": |
| 1410 | /*!*********************************************************!*\ |
| 1411 | !*** ../modules/checklist/assets/js/utils/functions.js ***! |
| 1412 | \*********************************************************/ |
| 1413 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1414 | |
| 1415 | "use strict"; |
| 1416 | |
| 1417 | |
| 1418 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1419 | Object.defineProperty(exports, "__esModule", ({ |
| 1420 | value: true |
| 1421 | })); |
| 1422 | exports.addMixpanelTrackingChecklistHeader = addMixpanelTrackingChecklistHeader; |
| 1423 | exports.addMixpanelTrackingChecklistSteps = addMixpanelTrackingChecklistSteps; |
| 1424 | exports.addMixpanelTrackingChecklistTopBar = addMixpanelTrackingChecklistTopBar; |
| 1425 | exports.dispatchChecklistOpenEvent = dispatchChecklistOpenEvent; |
| 1426 | exports.fetchSteps = fetchSteps; |
| 1427 | exports.fetchUserProgress = fetchUserProgress; |
| 1428 | exports.getAndUpdateStep = getAndUpdateStep; |
| 1429 | exports.getDocumentMetaDataMixpanel = getDocumentMetaDataMixpanel; |
| 1430 | exports.isStepChecked = isStepChecked; |
| 1431 | exports.toggleChecklistPopup = toggleChecklistPopup; |
| 1432 | exports.updateStep = updateStep; |
| 1433 | exports.updateUserProgress = updateUserProgress; |
| 1434 | var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); |
| 1435 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 1436 | var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); |
| 1437 | var _consts = __webpack_require__(/*! ./consts */ "../modules/checklist/assets/js/utils/consts.js"); |
| 1438 | 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; } |
| 1439 | 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; } |
| 1440 | var IS_MARKED_COMPLETED = _consts.STEP.IS_MARKED_COMPLETED, |
| 1441 | IS_ABSOLUTE_COMPLETED = _consts.STEP.IS_ABSOLUTE_COMPLETED, |
| 1442 | IS_IMMUTABLE_COMPLETED = _consts.STEP.IS_IMMUTABLE_COMPLETED, |
| 1443 | PROMOTION_DATA = _consts.STEP.PROMOTION_DATA; |
| 1444 | function isStepChecked(step) { |
| 1445 | return !step[PROMOTION_DATA] && (step[IS_MARKED_COMPLETED] || step[IS_ABSOLUTE_COMPLETED] || step[IS_IMMUTABLE_COMPLETED]); |
| 1446 | } |
| 1447 | function toggleChecklistPopup() { |
| 1448 | $e.run('checklist/toggle-popup'); |
| 1449 | } |
| 1450 | function fetchSteps() { |
| 1451 | return _fetchSteps.apply(this, arguments); |
| 1452 | } |
| 1453 | function _fetchSteps() { |
| 1454 | _fetchSteps = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { |
| 1455 | var _response$data; |
| 1456 | var response; |
| 1457 | return _regenerator.default.wrap(function (_context) { |
| 1458 | while (1) switch (_context.prev = _context.next) { |
| 1459 | case 0: |
| 1460 | _context.next = 1; |
| 1461 | return $e.data.get(_consts.STEPS_ROUTE, {}, { |
| 1462 | refresh: true |
| 1463 | }); |
| 1464 | case 1: |
| 1465 | response = _context.sent; |
| 1466 | return _context.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.data) || null); |
| 1467 | case 2: |
| 1468 | case "end": |
| 1469 | return _context.stop(); |
| 1470 | } |
| 1471 | }, _callee); |
| 1472 | })); |
| 1473 | return _fetchSteps.apply(this, arguments); |
| 1474 | } |
| 1475 | function fetchUserProgress() { |
| 1476 | return _fetchUserProgress.apply(this, arguments); |
| 1477 | } |
| 1478 | function _fetchUserProgress() { |
| 1479 | _fetchUserProgress = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { |
| 1480 | var _response$data2; |
| 1481 | var response; |
| 1482 | return _regenerator.default.wrap(function (_context2) { |
| 1483 | while (1) switch (_context2.prev = _context2.next) { |
| 1484 | case 0: |
| 1485 | _context2.next = 1; |
| 1486 | return $e.data.get(_consts.USER_PROGRESS_ROUTE, {}, { |
| 1487 | refresh: true |
| 1488 | }); |
| 1489 | case 1: |
| 1490 | response = _context2.sent; |
| 1491 | return _context2.abrupt("return", (response === null || response === void 0 || (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.data) || null); |
| 1492 | case 2: |
| 1493 | case "end": |
| 1494 | return _context2.stop(); |
| 1495 | } |
| 1496 | }, _callee2); |
| 1497 | })); |
| 1498 | return _fetchUserProgress.apply(this, arguments); |
| 1499 | } |
| 1500 | function updateStep(_x, _x2) { |
| 1501 | return _updateStep.apply(this, arguments); |
| 1502 | } |
| 1503 | function _updateStep() { |
| 1504 | _updateStep = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(id, data) { |
| 1505 | return _regenerator.default.wrap(function (_context3) { |
| 1506 | while (1) switch (_context3.prev = _context3.next) { |
| 1507 | case 0: |
| 1508 | _context3.next = 1; |
| 1509 | return $e.data.update(_consts.STEPS_ROUTE, _objectSpread({ |
| 1510 | id: id |
| 1511 | }, data), { |
| 1512 | id: id |
| 1513 | }); |
| 1514 | case 1: |
| 1515 | return _context3.abrupt("return", _context3.sent); |
| 1516 | case 2: |
| 1517 | case "end": |
| 1518 | return _context3.stop(); |
| 1519 | } |
| 1520 | }, _callee3); |
| 1521 | })); |
| 1522 | return _updateStep.apply(this, arguments); |
| 1523 | } |
| 1524 | function updateUserProgress(_x3) { |
| 1525 | return _updateUserProgress.apply(this, arguments); |
| 1526 | } |
| 1527 | function _updateUserProgress() { |
| 1528 | _updateUserProgress = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4(data) { |
| 1529 | return _regenerator.default.wrap(function (_context4) { |
| 1530 | while (1) switch (_context4.prev = _context4.next) { |
| 1531 | case 0: |
| 1532 | _context4.next = 1; |
| 1533 | return $e.data.update(_consts.USER_PROGRESS_ROUTE, data); |
| 1534 | case 1: |
| 1535 | return _context4.abrupt("return", _context4.sent); |
| 1536 | case 2: |
| 1537 | case "end": |
| 1538 | return _context4.stop(); |
| 1539 | } |
| 1540 | }, _callee4); |
| 1541 | })); |
| 1542 | return _updateUserProgress.apply(this, arguments); |
| 1543 | } |
| 1544 | function getAndUpdateStep(id, step, key, value) { |
| 1545 | if (step.config.id !== id) { |
| 1546 | return step; |
| 1547 | } |
| 1548 | return _objectSpread(_objectSpread({}, step), {}, (0, _defineProperty2.default)({}, key, value)); |
| 1549 | } |
| 1550 | function addMixpanelTrackingChecklistSteps(name, action) { |
| 1551 | var element = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'button'; |
| 1552 | var documentMetaData = getDocumentMetaDataMixpanel(); |
| 1553 | name = name.replace(/_/g, ''); |
| 1554 | var eventName = "checklist_steps_".concat(action, "_").concat(name); |
| 1555 | return elementorCommon.eventsManager.dispatchEvent(eventName, _objectSpread({ |
| 1556 | location: elementorCommon.eventsManager.config.locations.elementorEditor, |
| 1557 | secondaryLocation: elementorCommon.eventsManager.config.secondaryLocations.checklistSteps, |
| 1558 | trigger: elementorCommon.eventsManager.config.triggers.click, |
| 1559 | element: elementorCommon.eventsManager.config.elements[element] |
| 1560 | }, documentMetaData)); |
| 1561 | } |
| 1562 | function addMixpanelTrackingChecklistHeader(name) { |
| 1563 | var documentMetaData = getDocumentMetaDataMixpanel(); |
| 1564 | return elementorCommon.eventsManager.dispatchEvent(elementorCommon.eventsManager.config.names.elementorEditor.checklist[name], _objectSpread({ |
| 1565 | location: elementorCommon.eventsManager.config.locations.elementorEditor, |
| 1566 | secondaryLocation: elementorCommon.eventsManager.config.secondaryLocations.checklistHeader, |
| 1567 | trigger: elementorCommon.eventsManager.config.triggers.click, |
| 1568 | element: elementorCommon.eventsManager.config.elements.buttonIcon |
| 1569 | }, documentMetaData)); |
| 1570 | } |
| 1571 | function addMixpanelTrackingChecklistTopBar(togglePopupState) { |
| 1572 | var documentMetaData = getDocumentMetaDataMixpanel(); |
| 1573 | var name = !togglePopupState ? 'launchpadOn' : 'launchpadOff'; |
| 1574 | return elementorCommon.eventsManager.dispatchEvent(elementorCommon.eventsManager.config.names.topBar[name], _objectSpread({ |
| 1575 | location: elementorCommon.eventsManager.config.locations.topBar, |
| 1576 | secondaryLocation: elementorCommon.eventsManager.config.secondaryLocations.launchpad, |
| 1577 | trigger: elementorCommon.eventsManager.config.triggers.toggleClick, |
| 1578 | element: elementorCommon.eventsManager.config.elements.buttonIcon |
| 1579 | }, documentMetaData)); |
| 1580 | } |
| 1581 | function dispatchChecklistOpenEvent() { |
| 1582 | var documentMetaData = getDocumentMetaDataMixpanel(); |
| 1583 | return elementorCommon.eventsManager.dispatchEvent(elementorCommon.eventsManager.config.names.elementorEditor.checklist.checklistFirstPopup, _objectSpread({ |
| 1584 | location: elementorCommon.eventsManager.config.locations.elementorEditor, |
| 1585 | secondaryLocation: elementorCommon.eventsManager.config.secondaryLocations.launchpad, |
| 1586 | trigger: elementorCommon.eventsManager.config.triggers.editorLoaded, |
| 1587 | element: elementorCommon.eventsManager.config.elements.launchpadChecklist |
| 1588 | }, documentMetaData)); |
| 1589 | } |
| 1590 | function getDocumentMetaDataMixpanel() { |
| 1591 | var postId = elementor.getPreviewContainer().document.config.id; |
| 1592 | var postTitle = elementor.getPreviewContainer().model.attributes.settings.attributes.post_title; |
| 1593 | var postTypeTitle = elementor.getPreviewContainer().document.config.post_type_title; |
| 1594 | var documentType = elementor.getPreviewContainer().document.config.type; |
| 1595 | return { |
| 1596 | postId: postId, |
| 1597 | postTitle: postTitle, |
| 1598 | postTypeTitle: postTypeTitle, |
| 1599 | documentType: documentType |
| 1600 | }; |
| 1601 | } |
| 1602 | |
| 1603 | /***/ }), |
| 1604 | |
| 1605 | /***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js": |
| 1606 | /*!***************************************************************!*\ |
| 1607 | !*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***! |
| 1608 | \***************************************************************/ |
| 1609 | /***/ ((module) => { |
| 1610 | |
| 1611 | function _OverloadYield(e, d) { |
| 1612 | this.v = e, this.k = d; |
| 1613 | } |
| 1614 | module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1615 | |
| 1616 | /***/ }), |
| 1617 | |
| 1618 | /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": |
| 1619 | /*!******************************************************************!*\ |
| 1620 | !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! |
| 1621 | \******************************************************************/ |
| 1622 | /***/ ((module) => { |
| 1623 | |
| 1624 | function _arrayLikeToArray(r, a) { |
| 1625 | (null == a || a > r.length) && (a = r.length); |
| 1626 | for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; |
| 1627 | return n; |
| 1628 | } |
| 1629 | module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1630 | |
| 1631 | /***/ }), |
| 1632 | |
| 1633 | /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": |
| 1634 | /*!****************************************************************!*\ |
| 1635 | !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! |
| 1636 | \****************************************************************/ |
| 1637 | /***/ ((module) => { |
| 1638 | |
| 1639 | function _arrayWithHoles(r) { |
| 1640 | if (Array.isArray(r)) return r; |
| 1641 | } |
| 1642 | module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1643 | |
| 1644 | /***/ }), |
| 1645 | |
| 1646 | /***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": |
| 1647 | /*!*******************************************************************!*\ |
| 1648 | !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! |
| 1649 | \*******************************************************************/ |
| 1650 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1651 | |
| 1652 | var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); |
| 1653 | function _arrayWithoutHoles(r) { |
| 1654 | if (Array.isArray(r)) return arrayLikeToArray(r); |
| 1655 | } |
| 1656 | module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1657 | |
| 1658 | /***/ }), |
| 1659 | |
| 1660 | /***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": |
| 1661 | /*!***********************************************************************!*\ |
| 1662 | !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! |
| 1663 | \***********************************************************************/ |
| 1664 | /***/ ((module) => { |
| 1665 | |
| 1666 | function _assertThisInitialized(e) { |
| 1667 | if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 1668 | return e; |
| 1669 | } |
| 1670 | module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1671 | |
| 1672 | /***/ }), |
| 1673 | |
| 1674 | /***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": |
| 1675 | /*!******************************************************************!*\ |
| 1676 | !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! |
| 1677 | \******************************************************************/ |
| 1678 | /***/ ((module) => { |
| 1679 | |
| 1680 | function asyncGeneratorStep(n, t, e, r, o, a, c) { |
| 1681 | try { |
| 1682 | var i = n[a](c), |
| 1683 | u = i.value; |
| 1684 | } catch (n) { |
| 1685 | return void e(n); |
| 1686 | } |
| 1687 | i.done ? t(u) : Promise.resolve(u).then(r, o); |
| 1688 | } |
| 1689 | function _asyncToGenerator(n) { |
| 1690 | return function () { |
| 1691 | var t = this, |
| 1692 | e = arguments; |
| 1693 | return new Promise(function (r, o) { |
| 1694 | var a = n.apply(t, e); |
| 1695 | function _next(n) { |
| 1696 | asyncGeneratorStep(a, r, o, _next, _throw, "next", n); |
| 1697 | } |
| 1698 | function _throw(n) { |
| 1699 | asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); |
| 1700 | } |
| 1701 | _next(void 0); |
| 1702 | }); |
| 1703 | }; |
| 1704 | } |
| 1705 | module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1706 | |
| 1707 | /***/ }), |
| 1708 | |
| 1709 | /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": |
| 1710 | /*!****************************************************************!*\ |
| 1711 | !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! |
| 1712 | \****************************************************************/ |
| 1713 | /***/ ((module) => { |
| 1714 | |
| 1715 | function _classCallCheck(a, n) { |
| 1716 | if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); |
| 1717 | } |
| 1718 | module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1719 | |
| 1720 | /***/ }), |
| 1721 | |
| 1722 | /***/ "../node_modules/@babel/runtime/helpers/createClass.js": |
| 1723 | /*!*************************************************************!*\ |
| 1724 | !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! |
| 1725 | \*************************************************************/ |
| 1726 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1727 | |
| 1728 | var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); |
| 1729 | function _defineProperties(e, r) { |
| 1730 | for (var t = 0; t < r.length; t++) { |
| 1731 | var o = r[t]; |
| 1732 | o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); |
| 1733 | } |
| 1734 | } |
| 1735 | function _createClass(e, r, t) { |
| 1736 | return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { |
| 1737 | writable: !1 |
| 1738 | }), e; |
| 1739 | } |
| 1740 | module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1741 | |
| 1742 | /***/ }), |
| 1743 | |
| 1744 | /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": |
| 1745 | /*!****************************************************************!*\ |
| 1746 | !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! |
| 1747 | \****************************************************************/ |
| 1748 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1749 | |
| 1750 | var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); |
| 1751 | function _defineProperty(e, r, t) { |
| 1752 | return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { |
| 1753 | value: t, |
| 1754 | enumerable: !0, |
| 1755 | configurable: !0, |
| 1756 | writable: !0 |
| 1757 | }) : e[r] = t, e; |
| 1758 | } |
| 1759 | module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1760 | |
| 1761 | /***/ }), |
| 1762 | |
| 1763 | /***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": |
| 1764 | /*!****************************************************************!*\ |
| 1765 | !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! |
| 1766 | \****************************************************************/ |
| 1767 | /***/ ((module) => { |
| 1768 | |
| 1769 | function _getPrototypeOf(t) { |
| 1770 | return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { |
| 1771 | return t.__proto__ || Object.getPrototypeOf(t); |
| 1772 | }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); |
| 1773 | } |
| 1774 | module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1775 | |
| 1776 | /***/ }), |
| 1777 | |
| 1778 | /***/ "../node_modules/@babel/runtime/helpers/inherits.js": |
| 1779 | /*!**********************************************************!*\ |
| 1780 | !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! |
| 1781 | \**********************************************************/ |
| 1782 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1783 | |
| 1784 | var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); |
| 1785 | function _inherits(t, e) { |
| 1786 | if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); |
| 1787 | t.prototype = Object.create(e && e.prototype, { |
| 1788 | constructor: { |
| 1789 | value: t, |
| 1790 | writable: !0, |
| 1791 | configurable: !0 |
| 1792 | } |
| 1793 | }), Object.defineProperty(t, "prototype", { |
| 1794 | writable: !1 |
| 1795 | }), e && setPrototypeOf(t, e); |
| 1796 | } |
| 1797 | module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1798 | |
| 1799 | /***/ }), |
| 1800 | |
| 1801 | /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": |
| 1802 | /*!***********************************************************************!*\ |
| 1803 | !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! |
| 1804 | \***********************************************************************/ |
| 1805 | /***/ ((module) => { |
| 1806 | |
| 1807 | function _interopRequireDefault(e) { |
| 1808 | return e && e.__esModule ? e : { |
| 1809 | "default": e |
| 1810 | }; |
| 1811 | } |
| 1812 | module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1813 | |
| 1814 | /***/ }), |
| 1815 | |
| 1816 | /***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": |
| 1817 | /*!*****************************************************************!*\ |
| 1818 | !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! |
| 1819 | \*****************************************************************/ |
| 1820 | /***/ ((module) => { |
| 1821 | |
| 1822 | function _iterableToArray(r) { |
| 1823 | if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); |
| 1824 | } |
| 1825 | module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1826 | |
| 1827 | /***/ }), |
| 1828 | |
| 1829 | /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": |
| 1830 | /*!**********************************************************************!*\ |
| 1831 | !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! |
| 1832 | \**********************************************************************/ |
| 1833 | /***/ ((module) => { |
| 1834 | |
| 1835 | function _iterableToArrayLimit(r, l) { |
| 1836 | var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; |
| 1837 | if (null != t) { |
| 1838 | var e, |
| 1839 | n, |
| 1840 | i, |
| 1841 | u, |
| 1842 | a = [], |
| 1843 | f = !0, |
| 1844 | o = !1; |
| 1845 | try { |
| 1846 | if (i = (t = t.call(r)).next, 0 === l) { |
| 1847 | if (Object(t) !== t) return; |
| 1848 | f = !1; |
| 1849 | } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); |
| 1850 | } catch (r) { |
| 1851 | o = !0, n = r; |
| 1852 | } finally { |
| 1853 | try { |
| 1854 | if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; |
| 1855 | } finally { |
| 1856 | if (o) throw n; |
| 1857 | } |
| 1858 | } |
| 1859 | return a; |
| 1860 | } |
| 1861 | } |
| 1862 | module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1863 | |
| 1864 | /***/ }), |
| 1865 | |
| 1866 | /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": |
| 1867 | /*!*****************************************************************!*\ |
| 1868 | !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! |
| 1869 | \*****************************************************************/ |
| 1870 | /***/ ((module) => { |
| 1871 | |
| 1872 | function _nonIterableRest() { |
| 1873 | throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 1874 | } |
| 1875 | module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1876 | |
| 1877 | /***/ }), |
| 1878 | |
| 1879 | /***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": |
| 1880 | /*!*******************************************************************!*\ |
| 1881 | !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! |
| 1882 | \*******************************************************************/ |
| 1883 | /***/ ((module) => { |
| 1884 | |
| 1885 | function _nonIterableSpread() { |
| 1886 | throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 1887 | } |
| 1888 | module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1889 | |
| 1890 | /***/ }), |
| 1891 | |
| 1892 | /***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": |
| 1893 | /*!***************************************************************************!*\ |
| 1894 | !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! |
| 1895 | \***************************************************************************/ |
| 1896 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1897 | |
| 1898 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 1899 | var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); |
| 1900 | function _possibleConstructorReturn(t, e) { |
| 1901 | if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; |
| 1902 | if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); |
| 1903 | return assertThisInitialized(t); |
| 1904 | } |
| 1905 | module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1906 | |
| 1907 | /***/ }), |
| 1908 | |
| 1909 | /***/ "../node_modules/@babel/runtime/helpers/regenerator.js": |
| 1910 | /*!*************************************************************!*\ |
| 1911 | !*** ../node_modules/@babel/runtime/helpers/regenerator.js ***! |
| 1912 | \*************************************************************/ |
| 1913 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1914 | |
| 1915 | var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); |
| 1916 | function _regenerator() { |
| 1917 | /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ |
| 1918 | var e, |
| 1919 | t, |
| 1920 | r = "function" == typeof Symbol ? Symbol : {}, |
| 1921 | n = r.iterator || "@@iterator", |
| 1922 | o = r.toStringTag || "@@toStringTag"; |
| 1923 | function i(r, n, o, i) { |
| 1924 | var c = n && n.prototype instanceof Generator ? n : Generator, |
| 1925 | u = Object.create(c.prototype); |
| 1926 | return regeneratorDefine(u, "_invoke", function (r, n, o) { |
| 1927 | var i, |
| 1928 | c, |
| 1929 | u, |
| 1930 | f = 0, |
| 1931 | p = o || [], |
| 1932 | y = !1, |
| 1933 | G = { |
| 1934 | p: 0, |
| 1935 | n: 0, |
| 1936 | v: e, |
| 1937 | a: d, |
| 1938 | f: d.bind(e, 4), |
| 1939 | d: function d(t, r) { |
| 1940 | return i = t, c = 0, u = e, G.n = r, a; |
| 1941 | } |
| 1942 | }; |
| 1943 | function d(r, n) { |
| 1944 | for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { |
| 1945 | var o, |
| 1946 | i = p[t], |
| 1947 | d = G.p, |
| 1948 | l = i[2]; |
| 1949 | 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)); |
| 1950 | } |
| 1951 | if (o || r > 1) return a; |
| 1952 | throw y = !0, n; |
| 1953 | } |
| 1954 | return function (o, p, l) { |
| 1955 | if (f > 1) throw TypeError("Generator is already running"); |
| 1956 | for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { |
| 1957 | i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); |
| 1958 | try { |
| 1959 | if (f = 2, i) { |
| 1960 | if (c || (o = "next"), t = i[o]) { |
| 1961 | if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); |
| 1962 | if (!t.done) return t; |
| 1963 | u = t.value, c < 2 && (c = 0); |
| 1964 | } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); |
| 1965 | i = e; |
| 1966 | } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; |
| 1967 | } catch (t) { |
| 1968 | i = e, c = 1, u = t; |
| 1969 | } finally { |
| 1970 | f = 1; |
| 1971 | } |
| 1972 | } |
| 1973 | return { |
| 1974 | value: t, |
| 1975 | done: y |
| 1976 | }; |
| 1977 | }; |
| 1978 | }(r, o, i), !0), u; |
| 1979 | } |
| 1980 | var a = {}; |
| 1981 | function Generator() {} |
| 1982 | function GeneratorFunction() {} |
| 1983 | function GeneratorFunctionPrototype() {} |
| 1984 | t = Object.getPrototypeOf; |
| 1985 | var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { |
| 1986 | return this; |
| 1987 | }), t), |
| 1988 | u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); |
| 1989 | function f(e) { |
| 1990 | return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; |
| 1991 | } |
| 1992 | 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 () { |
| 1993 | return this; |
| 1994 | }), regeneratorDefine(u, "toString", function () { |
| 1995 | return "[object Generator]"; |
| 1996 | }), (module.exports = _regenerator = function _regenerator() { |
| 1997 | return { |
| 1998 | w: i, |
| 1999 | m: f |
| 2000 | }; |
| 2001 | }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); |
| 2002 | } |
| 2003 | module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2004 | |
| 2005 | /***/ }), |
| 2006 | |
| 2007 | /***/ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js": |
| 2008 | /*!******************************************************************!*\ |
| 2009 | !*** ../node_modules/@babel/runtime/helpers/regeneratorAsync.js ***! |
| 2010 | \******************************************************************/ |
| 2011 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2012 | |
| 2013 | var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); |
| 2014 | function _regeneratorAsync(n, e, r, t, o) { |
| 2015 | var a = regeneratorAsyncGen(n, e, r, t, o); |
| 2016 | return a.next().then(function (n) { |
| 2017 | return n.done ? n.value : a.next(); |
| 2018 | }); |
| 2019 | } |
| 2020 | module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2021 | |
| 2022 | /***/ }), |
| 2023 | |
| 2024 | /***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js": |
| 2025 | /*!*********************************************************************!*\ |
| 2026 | !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js ***! |
| 2027 | \*********************************************************************/ |
| 2028 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2029 | |
| 2030 | var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); |
| 2031 | var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); |
| 2032 | function _regeneratorAsyncGen(r, e, t, o, n) { |
| 2033 | return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); |
| 2034 | } |
| 2035 | module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2036 | |
| 2037 | /***/ }), |
| 2038 | |
| 2039 | /***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js": |
| 2040 | /*!**************************************************************************!*\ |
| 2041 | !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js ***! |
| 2042 | \**************************************************************************/ |
| 2043 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2044 | |
| 2045 | var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); |
| 2046 | var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); |
| 2047 | function AsyncIterator(t, e) { |
| 2048 | function n(r, o, i, f) { |
| 2049 | try { |
| 2050 | var c = t[r](o), |
| 2051 | u = c.value; |
| 2052 | return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { |
| 2053 | n("next", t, i, f); |
| 2054 | }, function (t) { |
| 2055 | n("throw", t, i, f); |
| 2056 | }) : e.resolve(u).then(function (t) { |
| 2057 | c.value = t, i(c); |
| 2058 | }, function (t) { |
| 2059 | return n("throw", t, i, f); |
| 2060 | }); |
| 2061 | } catch (t) { |
| 2062 | f(t); |
| 2063 | } |
| 2064 | } |
| 2065 | var r; |
| 2066 | this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { |
| 2067 | return this; |
| 2068 | })), regeneratorDefine(this, "_invoke", function (t, o, i) { |
| 2069 | function f() { |
| 2070 | return new e(function (e, r) { |
| 2071 | n(t, i, e, r); |
| 2072 | }); |
| 2073 | } |
| 2074 | return r = r ? r.then(f, f) : f(); |
| 2075 | }, !0); |
| 2076 | } |
| 2077 | module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2078 | |
| 2079 | /***/ }), |
| 2080 | |
| 2081 | /***/ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js": |
| 2082 | /*!*******************************************************************!*\ |
| 2083 | !*** ../node_modules/@babel/runtime/helpers/regeneratorDefine.js ***! |
| 2084 | \*******************************************************************/ |
| 2085 | /***/ ((module) => { |
| 2086 | |
| 2087 | function _regeneratorDefine(e, r, n, t) { |
| 2088 | var i = Object.defineProperty; |
| 2089 | try { |
| 2090 | i({}, "", {}); |
| 2091 | } catch (e) { |
| 2092 | i = 0; |
| 2093 | } |
| 2094 | module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { |
| 2095 | function o(r, n) { |
| 2096 | _regeneratorDefine(e, r, function (e) { |
| 2097 | return this._invoke(r, n, e); |
| 2098 | }); |
| 2099 | } |
| 2100 | r ? i ? i(e, r, { |
| 2101 | value: n, |
| 2102 | enumerable: !t, |
| 2103 | configurable: !t, |
| 2104 | writable: !t |
| 2105 | }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); |
| 2106 | }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); |
| 2107 | } |
| 2108 | module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2109 | |
| 2110 | /***/ }), |
| 2111 | |
| 2112 | /***/ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js": |
| 2113 | /*!*****************************************************************!*\ |
| 2114 | !*** ../node_modules/@babel/runtime/helpers/regeneratorKeys.js ***! |
| 2115 | \*****************************************************************/ |
| 2116 | /***/ ((module) => { |
| 2117 | |
| 2118 | function _regeneratorKeys(e) { |
| 2119 | var n = Object(e), |
| 2120 | r = []; |
| 2121 | for (var t in n) r.unshift(t); |
| 2122 | return function e() { |
| 2123 | for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; |
| 2124 | return e.done = !0, e; |
| 2125 | }; |
| 2126 | } |
| 2127 | module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2128 | |
| 2129 | /***/ }), |
| 2130 | |
| 2131 | /***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": |
| 2132 | /*!********************************************************************!*\ |
| 2133 | !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! |
| 2134 | \********************************************************************/ |
| 2135 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2136 | |
| 2137 | var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); |
| 2138 | var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); |
| 2139 | var regeneratorAsync = __webpack_require__(/*! ./regeneratorAsync.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js"); |
| 2140 | var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); |
| 2141 | var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); |
| 2142 | var regeneratorKeys = __webpack_require__(/*! ./regeneratorKeys.js */ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js"); |
| 2143 | var regeneratorValues = __webpack_require__(/*! ./regeneratorValues.js */ "../node_modules/@babel/runtime/helpers/regeneratorValues.js"); |
| 2144 | function _regeneratorRuntime() { |
| 2145 | "use strict"; |
| 2146 | |
| 2147 | var r = regenerator(), |
| 2148 | e = r.m(_regeneratorRuntime), |
| 2149 | t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; |
| 2150 | function n(r) { |
| 2151 | var e = "function" == typeof r && r.constructor; |
| 2152 | return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); |
| 2153 | } |
| 2154 | var o = { |
| 2155 | "throw": 1, |
| 2156 | "return": 2, |
| 2157 | "break": 3, |
| 2158 | "continue": 3 |
| 2159 | }; |
| 2160 | function a(r) { |
| 2161 | var e, t; |
| 2162 | return function (n) { |
| 2163 | e || (e = { |
| 2164 | stop: function stop() { |
| 2165 | return t(n.a, 2); |
| 2166 | }, |
| 2167 | "catch": function _catch() { |
| 2168 | return n.v; |
| 2169 | }, |
| 2170 | abrupt: function abrupt(r, e) { |
| 2171 | return t(n.a, o[r], e); |
| 2172 | }, |
| 2173 | delegateYield: function delegateYield(r, o, a) { |
| 2174 | return e.resultName = o, t(n.d, regeneratorValues(r), a); |
| 2175 | }, |
| 2176 | finish: function finish(r) { |
| 2177 | return t(n.f, r); |
| 2178 | } |
| 2179 | }, t = function t(r, _t, o) { |
| 2180 | n.p = e.prev, n.n = e.next; |
| 2181 | try { |
| 2182 | return r(_t, o); |
| 2183 | } finally { |
| 2184 | e.next = n.n; |
| 2185 | } |
| 2186 | }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; |
| 2187 | try { |
| 2188 | return r.call(this, e); |
| 2189 | } finally { |
| 2190 | n.p = e.prev, n.n = e.next; |
| 2191 | } |
| 2192 | }; |
| 2193 | } |
| 2194 | return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { |
| 2195 | return { |
| 2196 | wrap: function wrap(e, t, n, o) { |
| 2197 | return r.w(a(e), t, n, o && o.reverse()); |
| 2198 | }, |
| 2199 | isGeneratorFunction: n, |
| 2200 | mark: r.m, |
| 2201 | awrap: function awrap(r, e) { |
| 2202 | return new OverloadYield(r, e); |
| 2203 | }, |
| 2204 | AsyncIterator: regeneratorAsyncIterator, |
| 2205 | async: function async(r, e, t, o, u) { |
| 2206 | return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); |
| 2207 | }, |
| 2208 | keys: regeneratorKeys, |
| 2209 | values: regeneratorValues |
| 2210 | }; |
| 2211 | }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); |
| 2212 | } |
| 2213 | module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2214 | |
| 2215 | /***/ }), |
| 2216 | |
| 2217 | /***/ "../node_modules/@babel/runtime/helpers/regeneratorValues.js": |
| 2218 | /*!*******************************************************************!*\ |
| 2219 | !*** ../node_modules/@babel/runtime/helpers/regeneratorValues.js ***! |
| 2220 | \*******************************************************************/ |
| 2221 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2222 | |
| 2223 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 2224 | function _regeneratorValues(e) { |
| 2225 | if (null != e) { |
| 2226 | var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], |
| 2227 | r = 0; |
| 2228 | if (t) return t.call(e); |
| 2229 | if ("function" == typeof e.next) return e; |
| 2230 | if (!isNaN(e.length)) return { |
| 2231 | next: function next() { |
| 2232 | return e && r >= e.length && (e = void 0), { |
| 2233 | value: e && e[r++], |
| 2234 | done: !e |
| 2235 | }; |
| 2236 | } |
| 2237 | }; |
| 2238 | } |
| 2239 | throw new TypeError(_typeof(e) + " is not iterable"); |
| 2240 | } |
| 2241 | module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2242 | |
| 2243 | /***/ }), |
| 2244 | |
| 2245 | /***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": |
| 2246 | /*!****************************************************************!*\ |
| 2247 | !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! |
| 2248 | \****************************************************************/ |
| 2249 | /***/ ((module) => { |
| 2250 | |
| 2251 | function _setPrototypeOf(t, e) { |
| 2252 | return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { |
| 2253 | return t.__proto__ = e, t; |
| 2254 | }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); |
| 2255 | } |
| 2256 | module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2257 | |
| 2258 | /***/ }), |
| 2259 | |
| 2260 | /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": |
| 2261 | /*!***************************************************************!*\ |
| 2262 | !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! |
| 2263 | \***************************************************************/ |
| 2264 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2265 | |
| 2266 | var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); |
| 2267 | var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); |
| 2268 | var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); |
| 2269 | var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); |
| 2270 | function _slicedToArray(r, e) { |
| 2271 | return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); |
| 2272 | } |
| 2273 | module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2274 | |
| 2275 | /***/ }), |
| 2276 | |
| 2277 | /***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": |
| 2278 | /*!*******************************************************************!*\ |
| 2279 | !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! |
| 2280 | \*******************************************************************/ |
| 2281 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2282 | |
| 2283 | var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); |
| 2284 | var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); |
| 2285 | var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); |
| 2286 | var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); |
| 2287 | function _toConsumableArray(r) { |
| 2288 | return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); |
| 2289 | } |
| 2290 | module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2291 | |
| 2292 | /***/ }), |
| 2293 | |
| 2294 | /***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": |
| 2295 | /*!*************************************************************!*\ |
| 2296 | !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! |
| 2297 | \*************************************************************/ |
| 2298 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2299 | |
| 2300 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 2301 | function toPrimitive(t, r) { |
| 2302 | if ("object" != _typeof(t) || !t) return t; |
| 2303 | var e = t[Symbol.toPrimitive]; |
| 2304 | if (void 0 !== e) { |
| 2305 | var i = e.call(t, r || "default"); |
| 2306 | if ("object" != _typeof(i)) return i; |
| 2307 | throw new TypeError("@@toPrimitive must return a primitive value."); |
| 2308 | } |
| 2309 | return ("string" === r ? String : Number)(t); |
| 2310 | } |
| 2311 | module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2312 | |
| 2313 | /***/ }), |
| 2314 | |
| 2315 | /***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": |
| 2316 | /*!***************************************************************!*\ |
| 2317 | !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! |
| 2318 | \***************************************************************/ |
| 2319 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2320 | |
| 2321 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 2322 | var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); |
| 2323 | function toPropertyKey(t) { |
| 2324 | var i = toPrimitive(t, "string"); |
| 2325 | return "symbol" == _typeof(i) ? i : i + ""; |
| 2326 | } |
| 2327 | module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2328 | |
| 2329 | /***/ }), |
| 2330 | |
| 2331 | /***/ "../node_modules/@babel/runtime/helpers/typeof.js": |
| 2332 | /*!********************************************************!*\ |
| 2333 | !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! |
| 2334 | \********************************************************/ |
| 2335 | /***/ ((module) => { |
| 2336 | |
| 2337 | function _typeof(o) { |
| 2338 | "@babel/helpers - typeof"; |
| 2339 | |
| 2340 | return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { |
| 2341 | return typeof o; |
| 2342 | } : function (o) { |
| 2343 | return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 2344 | }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); |
| 2345 | } |
| 2346 | module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2347 | |
| 2348 | /***/ }), |
| 2349 | |
| 2350 | /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": |
| 2351 | /*!****************************************************************************!*\ |
| 2352 | !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! |
| 2353 | \****************************************************************************/ |
| 2354 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2355 | |
| 2356 | var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); |
| 2357 | function _unsupportedIterableToArray(r, a) { |
| 2358 | if (r) { |
| 2359 | if ("string" == typeof r) return arrayLikeToArray(r, a); |
| 2360 | var t = {}.toString.call(r).slice(8, -1); |
| 2361 | 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; |
| 2362 | } |
| 2363 | } |
| 2364 | module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2365 | |
| 2366 | /***/ }), |
| 2367 | |
| 2368 | /***/ "../node_modules/@babel/runtime/regenerator/index.js": |
| 2369 | /*!***********************************************************!*\ |
| 2370 | !*** ../node_modules/@babel/runtime/regenerator/index.js ***! |
| 2371 | \***********************************************************/ |
| 2372 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2373 | |
| 2374 | // TODO(Babel 8): Remove this file. |
| 2375 | |
| 2376 | var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); |
| 2377 | module.exports = runtime; |
| 2378 | |
| 2379 | // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= |
| 2380 | try { |
| 2381 | regeneratorRuntime = runtime; |
| 2382 | } catch (accidentalStrictMode) { |
| 2383 | if (typeof globalThis === "object") { |
| 2384 | globalThis.regeneratorRuntime = runtime; |
| 2385 | } else { |
| 2386 | Function("r", "regeneratorRuntime = r")(runtime); |
| 2387 | } |
| 2388 | } |
| 2389 | |
| 2390 | |
| 2391 | /***/ }), |
| 2392 | |
| 2393 | /***/ "../node_modules/object-assign/index.js": |
| 2394 | /*!**********************************************!*\ |
| 2395 | !*** ../node_modules/object-assign/index.js ***! |
| 2396 | \**********************************************/ |
| 2397 | /***/ ((module) => { |
| 2398 | |
| 2399 | "use strict"; |
| 2400 | /* |
| 2401 | object-assign |
| 2402 | (c) Sindre Sorhus |
| 2403 | @license MIT |
| 2404 | */ |
| 2405 | |
| 2406 | |
| 2407 | /* eslint-disable no-unused-vars */ |
| 2408 | var getOwnPropertySymbols = Object.getOwnPropertySymbols; |
| 2409 | var hasOwnProperty = Object.prototype.hasOwnProperty; |
| 2410 | var propIsEnumerable = Object.prototype.propertyIsEnumerable; |
| 2411 | |
| 2412 | function toObject(val) { |
| 2413 | if (val === null || val === undefined) { |
| 2414 | throw new TypeError('Object.assign cannot be called with null or undefined'); |
| 2415 | } |
| 2416 | |
| 2417 | return Object(val); |
| 2418 | } |
| 2419 | |
| 2420 | function shouldUseNative() { |
| 2421 | try { |
| 2422 | if (!Object.assign) { |
| 2423 | return false; |
| 2424 | } |
| 2425 | |
| 2426 | // Detect buggy property enumeration order in older V8 versions. |
| 2427 | |
| 2428 | // https://bugs.chromium.org/p/v8/issues/detail?id=4118 |
| 2429 | var test1 = new String('abc'); // eslint-disable-line no-new-wrappers |
| 2430 | test1[5] = 'de'; |
| 2431 | if (Object.getOwnPropertyNames(test1)[0] === '5') { |
| 2432 | return false; |
| 2433 | } |
| 2434 | |
| 2435 | // https://bugs.chromium.org/p/v8/issues/detail?id=3056 |
| 2436 | var test2 = {}; |
| 2437 | for (var i = 0; i < 10; i++) { |
| 2438 | test2['_' + String.fromCharCode(i)] = i; |
| 2439 | } |
| 2440 | var order2 = Object.getOwnPropertyNames(test2).map(function (n) { |
| 2441 | return test2[n]; |
| 2442 | }); |
| 2443 | if (order2.join('') !== '0123456789') { |
| 2444 | return false; |
| 2445 | } |
| 2446 | |
| 2447 | // https://bugs.chromium.org/p/v8/issues/detail?id=3056 |
| 2448 | var test3 = {}; |
| 2449 | 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { |
| 2450 | test3[letter] = letter; |
| 2451 | }); |
| 2452 | if (Object.keys(Object.assign({}, test3)).join('') !== |
| 2453 | 'abcdefghijklmnopqrst') { |
| 2454 | return false; |
| 2455 | } |
| 2456 | |
| 2457 | return true; |
| 2458 | } catch (err) { |
| 2459 | // We don't expect any of the above to throw, but better to be safe. |
| 2460 | return false; |
| 2461 | } |
| 2462 | } |
| 2463 | |
| 2464 | module.exports = shouldUseNative() ? Object.assign : function (target, source) { |
| 2465 | var from; |
| 2466 | var to = toObject(target); |
| 2467 | var symbols; |
| 2468 | |
| 2469 | for (var s = 1; s < arguments.length; s++) { |
| 2470 | from = Object(arguments[s]); |
| 2471 | |
| 2472 | for (var key in from) { |
| 2473 | if (hasOwnProperty.call(from, key)) { |
| 2474 | to[key] = from[key]; |
| 2475 | } |
| 2476 | } |
| 2477 | |
| 2478 | if (getOwnPropertySymbols) { |
| 2479 | symbols = getOwnPropertySymbols(from); |
| 2480 | for (var i = 0; i < symbols.length; i++) { |
| 2481 | if (propIsEnumerable.call(from, symbols[i])) { |
| 2482 | to[symbols[i]] = from[symbols[i]]; |
| 2483 | } |
| 2484 | } |
| 2485 | } |
| 2486 | } |
| 2487 | |
| 2488 | return to; |
| 2489 | }; |
| 2490 | |
| 2491 | |
| 2492 | /***/ }), |
| 2493 | |
| 2494 | /***/ "../node_modules/prop-types/checkPropTypes.js": |
| 2495 | /*!****************************************************!*\ |
| 2496 | !*** ../node_modules/prop-types/checkPropTypes.js ***! |
| 2497 | \****************************************************/ |
| 2498 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2499 | |
| 2500 | "use strict"; |
| 2501 | /** |
| 2502 | * Copyright (c) 2013-present, Facebook, Inc. |
| 2503 | * |
| 2504 | * This source code is licensed under the MIT license found in the |
| 2505 | * LICENSE file in the root directory of this source tree. |
| 2506 | */ |
| 2507 | |
| 2508 | |
| 2509 | |
| 2510 | var printWarning = function() {}; |
| 2511 | |
| 2512 | if (true) { |
| 2513 | var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); |
| 2514 | var loggedTypeFailures = {}; |
| 2515 | var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); |
| 2516 | |
| 2517 | printWarning = function(text) { |
| 2518 | var message = 'Warning: ' + text; |
| 2519 | if (typeof console !== 'undefined') { |
| 2520 | console.error(message); |
| 2521 | } |
| 2522 | try { |
| 2523 | // --- Welcome to debugging React --- |
| 2524 | // This error was thrown as a convenience so that you can use this stack |
| 2525 | // to find the callsite that caused this warning to fire. |
| 2526 | throw new Error(message); |
| 2527 | } catch (x) { /**/ } |
| 2528 | }; |
| 2529 | } |
| 2530 | |
| 2531 | /** |
| 2532 | * Assert that the values match with the type specs. |
| 2533 | * Error messages are memorized and will only be shown once. |
| 2534 | * |
| 2535 | * @param {object} typeSpecs Map of name to a ReactPropType |
| 2536 | * @param {object} values Runtime values that need to be type-checked |
| 2537 | * @param {string} location e.g. "prop", "context", "child context" |
| 2538 | * @param {string} componentName Name of the component for error messages. |
| 2539 | * @param {?Function} getStack Returns the component stack. |
| 2540 | * @private |
| 2541 | */ |
| 2542 | function checkPropTypes(typeSpecs, values, location, componentName, getStack) { |
| 2543 | if (true) { |
| 2544 | for (var typeSpecName in typeSpecs) { |
| 2545 | if (has(typeSpecs, typeSpecName)) { |
| 2546 | var error; |
| 2547 | // Prop type validation may throw. In case they do, we don't want to |
| 2548 | // fail the render phase where it didn't fail before. So we log it. |
| 2549 | // After these have been cleaned up, we'll let them throw. |
| 2550 | try { |
| 2551 | // This is intentionally an invariant that gets caught. It's the same |
| 2552 | // behavior as without this statement except with a better message. |
| 2553 | if (typeof typeSpecs[typeSpecName] !== 'function') { |
| 2554 | var err = Error( |
| 2555 | (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + |
| 2556 | 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + |
| 2557 | 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.' |
| 2558 | ); |
| 2559 | err.name = 'Invariant Violation'; |
| 2560 | throw err; |
| 2561 | } |
| 2562 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); |
| 2563 | } catch (ex) { |
| 2564 | error = ex; |
| 2565 | } |
| 2566 | if (error && !(error instanceof Error)) { |
| 2567 | printWarning( |
| 2568 | (componentName || 'React class') + ': type specification of ' + |
| 2569 | location + ' `' + typeSpecName + '` is invalid; the type checker ' + |
| 2570 | 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + |
| 2571 | 'You may have forgotten to pass an argument to the type checker ' + |
| 2572 | 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + |
| 2573 | 'shape all require an argument).' |
| 2574 | ); |
| 2575 | } |
| 2576 | if (error instanceof Error && !(error.message in loggedTypeFailures)) { |
| 2577 | // Only monitor this failure once because there tends to be a lot of the |
| 2578 | // same error. |
| 2579 | loggedTypeFailures[error.message] = true; |
| 2580 | |
| 2581 | var stack = getStack ? getStack() : ''; |
| 2582 | |
| 2583 | printWarning( |
| 2584 | 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') |
| 2585 | ); |
| 2586 | } |
| 2587 | } |
| 2588 | } |
| 2589 | } |
| 2590 | } |
| 2591 | |
| 2592 | /** |
| 2593 | * Resets warning cache when testing. |
| 2594 | * |
| 2595 | * @private |
| 2596 | */ |
| 2597 | checkPropTypes.resetWarningCache = function() { |
| 2598 | if (true) { |
| 2599 | loggedTypeFailures = {}; |
| 2600 | } |
| 2601 | } |
| 2602 | |
| 2603 | module.exports = checkPropTypes; |
| 2604 | |
| 2605 | |
| 2606 | /***/ }), |
| 2607 | |
| 2608 | /***/ "../node_modules/prop-types/factoryWithTypeCheckers.js": |
| 2609 | /*!*************************************************************!*\ |
| 2610 | !*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***! |
| 2611 | \*************************************************************/ |
| 2612 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2613 | |
| 2614 | "use strict"; |
| 2615 | /** |
| 2616 | * Copyright (c) 2013-present, Facebook, Inc. |
| 2617 | * |
| 2618 | * This source code is licensed under the MIT license found in the |
| 2619 | * LICENSE file in the root directory of this source tree. |
| 2620 | */ |
| 2621 | |
| 2622 | |
| 2623 | |
| 2624 | var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); |
| 2625 | var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js"); |
| 2626 | |
| 2627 | var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); |
| 2628 | var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); |
| 2629 | var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js"); |
| 2630 | |
| 2631 | var printWarning = function() {}; |
| 2632 | |
| 2633 | if (true) { |
| 2634 | printWarning = function(text) { |
| 2635 | var message = 'Warning: ' + text; |
| 2636 | if (typeof console !== 'undefined') { |
| 2637 | console.error(message); |
| 2638 | } |
| 2639 | try { |
| 2640 | // --- Welcome to debugging React --- |
| 2641 | // This error was thrown as a convenience so that you can use this stack |
| 2642 | // to find the callsite that caused this warning to fire. |
| 2643 | throw new Error(message); |
| 2644 | } catch (x) {} |
| 2645 | }; |
| 2646 | } |
| 2647 | |
| 2648 | function emptyFunctionThatReturnsNull() { |
| 2649 | return null; |
| 2650 | } |
| 2651 | |
| 2652 | module.exports = function(isValidElement, throwOnDirectAccess) { |
| 2653 | /* global Symbol */ |
| 2654 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; |
| 2655 | var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. |
| 2656 | |
| 2657 | /** |
| 2658 | * Returns the iterator method function contained on the iterable object. |
| 2659 | * |
| 2660 | * Be sure to invoke the function with the iterable as context: |
| 2661 | * |
| 2662 | * var iteratorFn = getIteratorFn(myIterable); |
| 2663 | * if (iteratorFn) { |
| 2664 | * var iterator = iteratorFn.call(myIterable); |
| 2665 | * ... |
| 2666 | * } |
| 2667 | * |
| 2668 | * @param {?object} maybeIterable |
| 2669 | * @return {?function} |
| 2670 | */ |
| 2671 | function getIteratorFn(maybeIterable) { |
| 2672 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); |
| 2673 | if (typeof iteratorFn === 'function') { |
| 2674 | return iteratorFn; |
| 2675 | } |
| 2676 | } |
| 2677 | |
| 2678 | /** |
| 2679 | * Collection of methods that allow declaration and validation of props that are |
| 2680 | * supplied to React components. Example usage: |
| 2681 | * |
| 2682 | * var Props = require('ReactPropTypes'); |
| 2683 | * var MyArticle = React.createClass({ |
| 2684 | * propTypes: { |
| 2685 | * // An optional string prop named "description". |
| 2686 | * description: Props.string, |
| 2687 | * |
| 2688 | * // A required enum prop named "category". |
| 2689 | * category: Props.oneOf(['News','Photos']).isRequired, |
| 2690 | * |
| 2691 | * // A prop named "dialog" that requires an instance of Dialog. |
| 2692 | * dialog: Props.instanceOf(Dialog).isRequired |
| 2693 | * }, |
| 2694 | * render: function() { ... } |
| 2695 | * }); |
| 2696 | * |
| 2697 | * A more formal specification of how these methods are used: |
| 2698 | * |
| 2699 | * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) |
| 2700 | * decl := ReactPropTypes.{type}(.isRequired)? |
| 2701 | * |
| 2702 | * Each and every declaration produces a function with the same signature. This |
| 2703 | * allows the creation of custom validation functions. For example: |
| 2704 | * |
| 2705 | * var MyLink = React.createClass({ |
| 2706 | * propTypes: { |
| 2707 | * // An optional string or URI prop named "href". |
| 2708 | * href: function(props, propName, componentName) { |
| 2709 | * var propValue = props[propName]; |
| 2710 | * if (propValue != null && typeof propValue !== 'string' && |
| 2711 | * !(propValue instanceof URI)) { |
| 2712 | * return new Error( |
| 2713 | * 'Expected a string or an URI for ' + propName + ' in ' + |
| 2714 | * componentName |
| 2715 | * ); |
| 2716 | * } |
| 2717 | * } |
| 2718 | * }, |
| 2719 | * render: function() {...} |
| 2720 | * }); |
| 2721 | * |
| 2722 | * @internal |
| 2723 | */ |
| 2724 | |
| 2725 | var ANONYMOUS = '<<anonymous>>'; |
| 2726 | |
| 2727 | // Important! |
| 2728 | // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. |
| 2729 | var ReactPropTypes = { |
| 2730 | array: createPrimitiveTypeChecker('array'), |
| 2731 | bigint: createPrimitiveTypeChecker('bigint'), |
| 2732 | bool: createPrimitiveTypeChecker('boolean'), |
| 2733 | func: createPrimitiveTypeChecker('function'), |
| 2734 | number: createPrimitiveTypeChecker('number'), |
| 2735 | object: createPrimitiveTypeChecker('object'), |
| 2736 | string: createPrimitiveTypeChecker('string'), |
| 2737 | symbol: createPrimitiveTypeChecker('symbol'), |
| 2738 | |
| 2739 | any: createAnyTypeChecker(), |
| 2740 | arrayOf: createArrayOfTypeChecker, |
| 2741 | element: createElementTypeChecker(), |
| 2742 | elementType: createElementTypeTypeChecker(), |
| 2743 | instanceOf: createInstanceTypeChecker, |
| 2744 | node: createNodeChecker(), |
| 2745 | objectOf: createObjectOfTypeChecker, |
| 2746 | oneOf: createEnumTypeChecker, |
| 2747 | oneOfType: createUnionTypeChecker, |
| 2748 | shape: createShapeTypeChecker, |
| 2749 | exact: createStrictShapeTypeChecker, |
| 2750 | }; |
| 2751 | |
| 2752 | /** |
| 2753 | * inlined Object.is polyfill to avoid requiring consumers ship their own |
| 2754 | * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is |
| 2755 | */ |
| 2756 | /*eslint-disable no-self-compare*/ |
| 2757 | function is(x, y) { |
| 2758 | // SameValue algorithm |
| 2759 | if (x === y) { |
| 2760 | // Steps 1-5, 7-10 |
| 2761 | // Steps 6.b-6.e: +0 != -0 |
| 2762 | return x !== 0 || 1 / x === 1 / y; |
| 2763 | } else { |
| 2764 | // Step 6.a: NaN == NaN |
| 2765 | return x !== x && y !== y; |
| 2766 | } |
| 2767 | } |
| 2768 | /*eslint-enable no-self-compare*/ |
| 2769 | |
| 2770 | /** |
| 2771 | * We use an Error-like object for backward compatibility as people may call |
| 2772 | * PropTypes directly and inspect their output. However, we don't use real |
| 2773 | * Errors anymore. We don't inspect their stack anyway, and creating them |
| 2774 | * is prohibitively expensive if they are created too often, such as what |
| 2775 | * happens in oneOfType() for any type before the one that matched. |
| 2776 | */ |
| 2777 | function PropTypeError(message, data) { |
| 2778 | this.message = message; |
| 2779 | this.data = data && typeof data === 'object' ? data: {}; |
| 2780 | this.stack = ''; |
| 2781 | } |
| 2782 | // Make `instanceof Error` still work for returned errors. |
| 2783 | PropTypeError.prototype = Error.prototype; |
| 2784 | |
| 2785 | function createChainableTypeChecker(validate) { |
| 2786 | if (true) { |
| 2787 | var manualPropTypeCallCache = {}; |
| 2788 | var manualPropTypeWarningCount = 0; |
| 2789 | } |
| 2790 | function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { |
| 2791 | componentName = componentName || ANONYMOUS; |
| 2792 | propFullName = propFullName || propName; |
| 2793 | |
| 2794 | if (secret !== ReactPropTypesSecret) { |
| 2795 | if (throwOnDirectAccess) { |
| 2796 | // New behavior only for users of `prop-types` package |
| 2797 | var err = new Error( |
| 2798 | 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + |
| 2799 | 'Use `PropTypes.checkPropTypes()` to call them. ' + |
| 2800 | 'Read more at http://fb.me/use-check-prop-types' |
| 2801 | ); |
| 2802 | err.name = 'Invariant Violation'; |
| 2803 | throw err; |
| 2804 | } else if ( true && typeof console !== 'undefined') { |
| 2805 | // Old behavior for people using React.PropTypes |
| 2806 | var cacheKey = componentName + ':' + propName; |
| 2807 | if ( |
| 2808 | !manualPropTypeCallCache[cacheKey] && |
| 2809 | // Avoid spamming the console because they are often not actionable except for lib authors |
| 2810 | manualPropTypeWarningCount < 3 |
| 2811 | ) { |
| 2812 | printWarning( |
| 2813 | 'You are manually calling a React.PropTypes validation ' + |
| 2814 | 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + |
| 2815 | 'and will throw in the standalone `prop-types` package. ' + |
| 2816 | 'You may be seeing this warning due to a third-party PropTypes ' + |
| 2817 | 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' |
| 2818 | ); |
| 2819 | manualPropTypeCallCache[cacheKey] = true; |
| 2820 | manualPropTypeWarningCount++; |
| 2821 | } |
| 2822 | } |
| 2823 | } |
| 2824 | if (props[propName] == null) { |
| 2825 | if (isRequired) { |
| 2826 | if (props[propName] === null) { |
| 2827 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); |
| 2828 | } |
| 2829 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); |
| 2830 | } |
| 2831 | return null; |
| 2832 | } else { |
| 2833 | return validate(props, propName, componentName, location, propFullName); |
| 2834 | } |
| 2835 | } |
| 2836 | |
| 2837 | var chainedCheckType = checkType.bind(null, false); |
| 2838 | chainedCheckType.isRequired = checkType.bind(null, true); |
| 2839 | |
| 2840 | return chainedCheckType; |
| 2841 | } |
| 2842 | |
| 2843 | function createPrimitiveTypeChecker(expectedType) { |
| 2844 | function validate(props, propName, componentName, location, propFullName, secret) { |
| 2845 | var propValue = props[propName]; |
| 2846 | var propType = getPropType(propValue); |
| 2847 | if (propType !== expectedType) { |
| 2848 | // `propValue` being instance of, say, date/regexp, pass the 'object' |
| 2849 | // check, but we can offer a more precise error message here rather than |
| 2850 | // 'of type `object`'. |
| 2851 | var preciseType = getPreciseType(propValue); |
| 2852 | |
| 2853 | return new PropTypeError( |
| 2854 | 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), |
| 2855 | {expectedType: expectedType} |
| 2856 | ); |
| 2857 | } |
| 2858 | return null; |
| 2859 | } |
| 2860 | return createChainableTypeChecker(validate); |
| 2861 | } |
| 2862 | |
| 2863 | function createAnyTypeChecker() { |
| 2864 | return createChainableTypeChecker(emptyFunctionThatReturnsNull); |
| 2865 | } |
| 2866 | |
| 2867 | function createArrayOfTypeChecker(typeChecker) { |
| 2868 | function validate(props, propName, componentName, location, propFullName) { |
| 2869 | if (typeof typeChecker !== 'function') { |
| 2870 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); |
| 2871 | } |
| 2872 | var propValue = props[propName]; |
| 2873 | if (!Array.isArray(propValue)) { |
| 2874 | var propType = getPropType(propValue); |
| 2875 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); |
| 2876 | } |
| 2877 | for (var i = 0; i < propValue.length; i++) { |
| 2878 | var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); |
| 2879 | if (error instanceof Error) { |
| 2880 | return error; |
| 2881 | } |
| 2882 | } |
| 2883 | return null; |
| 2884 | } |
| 2885 | return createChainableTypeChecker(validate); |
| 2886 | } |
| 2887 | |
| 2888 | function createElementTypeChecker() { |
| 2889 | function validate(props, propName, componentName, location, propFullName) { |
| 2890 | var propValue = props[propName]; |
| 2891 | if (!isValidElement(propValue)) { |
| 2892 | var propType = getPropType(propValue); |
| 2893 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); |
| 2894 | } |
| 2895 | return null; |
| 2896 | } |
| 2897 | return createChainableTypeChecker(validate); |
| 2898 | } |
| 2899 | |
| 2900 | function createElementTypeTypeChecker() { |
| 2901 | function validate(props, propName, componentName, location, propFullName) { |
| 2902 | var propValue = props[propName]; |
| 2903 | if (!ReactIs.isValidElementType(propValue)) { |
| 2904 | var propType = getPropType(propValue); |
| 2905 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); |
| 2906 | } |
| 2907 | return null; |
| 2908 | } |
| 2909 | return createChainableTypeChecker(validate); |
| 2910 | } |
| 2911 | |
| 2912 | function createInstanceTypeChecker(expectedClass) { |
| 2913 | function validate(props, propName, componentName, location, propFullName) { |
| 2914 | if (!(props[propName] instanceof expectedClass)) { |
| 2915 | var expectedClassName = expectedClass.name || ANONYMOUS; |
| 2916 | var actualClassName = getClassName(props[propName]); |
| 2917 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); |
| 2918 | } |
| 2919 | return null; |
| 2920 | } |
| 2921 | return createChainableTypeChecker(validate); |
| 2922 | } |
| 2923 | |
| 2924 | function createEnumTypeChecker(expectedValues) { |
| 2925 | if (!Array.isArray(expectedValues)) { |
| 2926 | if (true) { |
| 2927 | if (arguments.length > 1) { |
| 2928 | printWarning( |
| 2929 | 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + |
| 2930 | 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' |
| 2931 | ); |
| 2932 | } else { |
| 2933 | printWarning('Invalid argument supplied to oneOf, expected an array.'); |
| 2934 | } |
| 2935 | } |
| 2936 | return emptyFunctionThatReturnsNull; |
| 2937 | } |
| 2938 | |
| 2939 | function validate(props, propName, componentName, location, propFullName) { |
| 2940 | var propValue = props[propName]; |
| 2941 | for (var i = 0; i < expectedValues.length; i++) { |
| 2942 | if (is(propValue, expectedValues[i])) { |
| 2943 | return null; |
| 2944 | } |
| 2945 | } |
| 2946 | |
| 2947 | var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { |
| 2948 | var type = getPreciseType(value); |
| 2949 | if (type === 'symbol') { |
| 2950 | return String(value); |
| 2951 | } |
| 2952 | return value; |
| 2953 | }); |
| 2954 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); |
| 2955 | } |
| 2956 | return createChainableTypeChecker(validate); |
| 2957 | } |
| 2958 | |
| 2959 | function createObjectOfTypeChecker(typeChecker) { |
| 2960 | function validate(props, propName, componentName, location, propFullName) { |
| 2961 | if (typeof typeChecker !== 'function') { |
| 2962 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); |
| 2963 | } |
| 2964 | var propValue = props[propName]; |
| 2965 | var propType = getPropType(propValue); |
| 2966 | if (propType !== 'object') { |
| 2967 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); |
| 2968 | } |
| 2969 | for (var key in propValue) { |
| 2970 | if (has(propValue, key)) { |
| 2971 | var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
| 2972 | if (error instanceof Error) { |
| 2973 | return error; |
| 2974 | } |
| 2975 | } |
| 2976 | } |
| 2977 | return null; |
| 2978 | } |
| 2979 | return createChainableTypeChecker(validate); |
| 2980 | } |
| 2981 | |
| 2982 | function createUnionTypeChecker(arrayOfTypeCheckers) { |
| 2983 | if (!Array.isArray(arrayOfTypeCheckers)) { |
| 2984 | true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0; |
| 2985 | return emptyFunctionThatReturnsNull; |
| 2986 | } |
| 2987 | |
| 2988 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
| 2989 | var checker = arrayOfTypeCheckers[i]; |
| 2990 | if (typeof checker !== 'function') { |
| 2991 | printWarning( |
| 2992 | 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + |
| 2993 | 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' |
| 2994 | ); |
| 2995 | return emptyFunctionThatReturnsNull; |
| 2996 | } |
| 2997 | } |
| 2998 | |
| 2999 | function validate(props, propName, componentName, location, propFullName) { |
| 3000 | var expectedTypes = []; |
| 3001 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
| 3002 | var checker = arrayOfTypeCheckers[i]; |
| 3003 | var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret); |
| 3004 | if (checkerResult == null) { |
| 3005 | return null; |
| 3006 | } |
| 3007 | if (checkerResult.data && has(checkerResult.data, 'expectedType')) { |
| 3008 | expectedTypes.push(checkerResult.data.expectedType); |
| 3009 | } |
| 3010 | } |
| 3011 | var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': ''; |
| 3012 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.')); |
| 3013 | } |
| 3014 | return createChainableTypeChecker(validate); |
| 3015 | } |
| 3016 | |
| 3017 | function createNodeChecker() { |
| 3018 | function validate(props, propName, componentName, location, propFullName) { |
| 3019 | if (!isNode(props[propName])) { |
| 3020 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); |
| 3021 | } |
| 3022 | return null; |
| 3023 | } |
| 3024 | return createChainableTypeChecker(validate); |
| 3025 | } |
| 3026 | |
| 3027 | function invalidValidatorError(componentName, location, propFullName, key, type) { |
| 3028 | return new PropTypeError( |
| 3029 | (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + |
| 3030 | 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.' |
| 3031 | ); |
| 3032 | } |
| 3033 | |
| 3034 | function createShapeTypeChecker(shapeTypes) { |
| 3035 | function validate(props, propName, componentName, location, propFullName) { |
| 3036 | var propValue = props[propName]; |
| 3037 | var propType = getPropType(propValue); |
| 3038 | if (propType !== 'object') { |
| 3039 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); |
| 3040 | } |
| 3041 | for (var key in shapeTypes) { |
| 3042 | var checker = shapeTypes[key]; |
| 3043 | if (typeof checker !== 'function') { |
| 3044 | return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); |
| 3045 | } |
| 3046 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
| 3047 | if (error) { |
| 3048 | return error; |
| 3049 | } |
| 3050 | } |
| 3051 | return null; |
| 3052 | } |
| 3053 | return createChainableTypeChecker(validate); |
| 3054 | } |
| 3055 | |
| 3056 | function createStrictShapeTypeChecker(shapeTypes) { |
| 3057 | function validate(props, propName, componentName, location, propFullName) { |
| 3058 | var propValue = props[propName]; |
| 3059 | var propType = getPropType(propValue); |
| 3060 | if (propType !== 'object') { |
| 3061 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); |
| 3062 | } |
| 3063 | // We need to check all keys in case some are required but missing from props. |
| 3064 | var allKeys = assign({}, props[propName], shapeTypes); |
| 3065 | for (var key in allKeys) { |
| 3066 | var checker = shapeTypes[key]; |
| 3067 | if (has(shapeTypes, key) && typeof checker !== 'function') { |
| 3068 | return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); |
| 3069 | } |
| 3070 | if (!checker) { |
| 3071 | return new PropTypeError( |
| 3072 | 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + |
| 3073 | '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + |
| 3074 | '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') |
| 3075 | ); |
| 3076 | } |
| 3077 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
| 3078 | if (error) { |
| 3079 | return error; |
| 3080 | } |
| 3081 | } |
| 3082 | return null; |
| 3083 | } |
| 3084 | |
| 3085 | return createChainableTypeChecker(validate); |
| 3086 | } |
| 3087 | |
| 3088 | function isNode(propValue) { |
| 3089 | switch (typeof propValue) { |
| 3090 | case 'number': |
| 3091 | case 'string': |
| 3092 | case 'undefined': |
| 3093 | return true; |
| 3094 | case 'boolean': |
| 3095 | return !propValue; |
| 3096 | case 'object': |
| 3097 | if (Array.isArray(propValue)) { |
| 3098 | return propValue.every(isNode); |
| 3099 | } |
| 3100 | if (propValue === null || isValidElement(propValue)) { |
| 3101 | return true; |
| 3102 | } |
| 3103 | |
| 3104 | var iteratorFn = getIteratorFn(propValue); |
| 3105 | if (iteratorFn) { |
| 3106 | var iterator = iteratorFn.call(propValue); |
| 3107 | var step; |
| 3108 | if (iteratorFn !== propValue.entries) { |
| 3109 | while (!(step = iterator.next()).done) { |
| 3110 | if (!isNode(step.value)) { |
| 3111 | return false; |
| 3112 | } |
| 3113 | } |
| 3114 | } else { |
| 3115 | // Iterator will provide entry [k,v] tuples rather than values. |
| 3116 | while (!(step = iterator.next()).done) { |
| 3117 | var entry = step.value; |
| 3118 | if (entry) { |
| 3119 | if (!isNode(entry[1])) { |
| 3120 | return false; |
| 3121 | } |
| 3122 | } |
| 3123 | } |
| 3124 | } |
| 3125 | } else { |
| 3126 | return false; |
| 3127 | } |
| 3128 | |
| 3129 | return true; |
| 3130 | default: |
| 3131 | return false; |
| 3132 | } |
| 3133 | } |
| 3134 | |
| 3135 | function isSymbol(propType, propValue) { |
| 3136 | // Native Symbol. |
| 3137 | if (propType === 'symbol') { |
| 3138 | return true; |
| 3139 | } |
| 3140 | |
| 3141 | // falsy value can't be a Symbol |
| 3142 | if (!propValue) { |
| 3143 | return false; |
| 3144 | } |
| 3145 | |
| 3146 | // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' |
| 3147 | if (propValue['@@toStringTag'] === 'Symbol') { |
| 3148 | return true; |
| 3149 | } |
| 3150 | |
| 3151 | // Fallback for non-spec compliant Symbols which are polyfilled. |
| 3152 | if (typeof Symbol === 'function' && propValue instanceof Symbol) { |
| 3153 | return true; |
| 3154 | } |
| 3155 | |
| 3156 | return false; |
| 3157 | } |
| 3158 | |
| 3159 | // Equivalent of `typeof` but with special handling for array and regexp. |
| 3160 | function getPropType(propValue) { |
| 3161 | var propType = typeof propValue; |
| 3162 | if (Array.isArray(propValue)) { |
| 3163 | return 'array'; |
| 3164 | } |
| 3165 | if (propValue instanceof RegExp) { |
| 3166 | // Old webkits (at least until Android 4.0) return 'function' rather than |
| 3167 | // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ |
| 3168 | // passes PropTypes.object. |
| 3169 | return 'object'; |
| 3170 | } |
| 3171 | if (isSymbol(propType, propValue)) { |
| 3172 | return 'symbol'; |
| 3173 | } |
| 3174 | return propType; |
| 3175 | } |
| 3176 | |
| 3177 | // This handles more types than `getPropType`. Only used for error messages. |
| 3178 | // See `createPrimitiveTypeChecker`. |
| 3179 | function getPreciseType(propValue) { |
| 3180 | if (typeof propValue === 'undefined' || propValue === null) { |
| 3181 | return '' + propValue; |
| 3182 | } |
| 3183 | var propType = getPropType(propValue); |
| 3184 | if (propType === 'object') { |
| 3185 | if (propValue instanceof Date) { |
| 3186 | return 'date'; |
| 3187 | } else if (propValue instanceof RegExp) { |
| 3188 | return 'regexp'; |
| 3189 | } |
| 3190 | } |
| 3191 | return propType; |
| 3192 | } |
| 3193 | |
| 3194 | // Returns a string that is postfixed to a warning about an invalid type. |
| 3195 | // For example, "undefined" or "of type array" |
| 3196 | function getPostfixForTypeWarning(value) { |
| 3197 | var type = getPreciseType(value); |
| 3198 | switch (type) { |
| 3199 | case 'array': |
| 3200 | case 'object': |
| 3201 | return 'an ' + type; |
| 3202 | case 'boolean': |
| 3203 | case 'date': |
| 3204 | case 'regexp': |
| 3205 | return 'a ' + type; |
| 3206 | default: |
| 3207 | return type; |
| 3208 | } |
| 3209 | } |
| 3210 | |
| 3211 | // Returns class name of the object, if any. |
| 3212 | function getClassName(propValue) { |
| 3213 | if (!propValue.constructor || !propValue.constructor.name) { |
| 3214 | return ANONYMOUS; |
| 3215 | } |
| 3216 | return propValue.constructor.name; |
| 3217 | } |
| 3218 | |
| 3219 | ReactPropTypes.checkPropTypes = checkPropTypes; |
| 3220 | ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; |
| 3221 | ReactPropTypes.PropTypes = ReactPropTypes; |
| 3222 | |
| 3223 | return ReactPropTypes; |
| 3224 | }; |
| 3225 | |
| 3226 | |
| 3227 | /***/ }), |
| 3228 | |
| 3229 | /***/ "../node_modules/prop-types/index.js": |
| 3230 | /*!*******************************************!*\ |
| 3231 | !*** ../node_modules/prop-types/index.js ***! |
| 3232 | \*******************************************/ |
| 3233 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3234 | |
| 3235 | /** |
| 3236 | * Copyright (c) 2013-present, Facebook, Inc. |
| 3237 | * |
| 3238 | * This source code is licensed under the MIT license found in the |
| 3239 | * LICENSE file in the root directory of this source tree. |
| 3240 | */ |
| 3241 | |
| 3242 | if (true) { |
| 3243 | var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); |
| 3244 | |
| 3245 | // By explicitly using `prop-types` you are opting into new development behavior. |
| 3246 | // http://fb.me/prop-types-in-prod |
| 3247 | var throwOnDirectAccess = true; |
| 3248 | module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess); |
| 3249 | } else // removed by dead control flow |
| 3250 | {} |
| 3251 | |
| 3252 | |
| 3253 | /***/ }), |
| 3254 | |
| 3255 | /***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js": |
| 3256 | /*!**************************************************************!*\ |
| 3257 | !*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***! |
| 3258 | \**************************************************************/ |
| 3259 | /***/ ((module) => { |
| 3260 | |
| 3261 | "use strict"; |
| 3262 | /** |
| 3263 | * Copyright (c) 2013-present, Facebook, Inc. |
| 3264 | * |
| 3265 | * This source code is licensed under the MIT license found in the |
| 3266 | * LICENSE file in the root directory of this source tree. |
| 3267 | */ |
| 3268 | |
| 3269 | |
| 3270 | |
| 3271 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; |
| 3272 | |
| 3273 | module.exports = ReactPropTypesSecret; |
| 3274 | |
| 3275 | |
| 3276 | /***/ }), |
| 3277 | |
| 3278 | /***/ "../node_modules/prop-types/lib/has.js": |
| 3279 | /*!*********************************************!*\ |
| 3280 | !*** ../node_modules/prop-types/lib/has.js ***! |
| 3281 | \*********************************************/ |
| 3282 | /***/ ((module) => { |
| 3283 | |
| 3284 | module.exports = Function.call.bind(Object.prototype.hasOwnProperty); |
| 3285 | |
| 3286 | |
| 3287 | /***/ }), |
| 3288 | |
| 3289 | /***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js": |
| 3290 | /*!************************************************************************************!*\ |
| 3291 | !*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***! |
| 3292 | \************************************************************************************/ |
| 3293 | /***/ ((__unused_webpack_module, exports) => { |
| 3294 | |
| 3295 | "use strict"; |
| 3296 | /** @license React v16.13.1 |
| 3297 | * react-is.development.js |
| 3298 | * |
| 3299 | * Copyright (c) Facebook, Inc. and its affiliates. |
| 3300 | * |
| 3301 | * This source code is licensed under the MIT license found in the |
| 3302 | * LICENSE file in the root directory of this source tree. |
| 3303 | */ |
| 3304 | |
| 3305 | |
| 3306 | |
| 3307 | |
| 3308 | |
| 3309 | if (true) { |
| 3310 | (function() { |
| 3311 | 'use strict'; |
| 3312 | |
| 3313 | // The Symbol used to tag the ReactElement-like types. If there is no native Symbol |
| 3314 | // nor polyfill, then a plain number is used for performance. |
| 3315 | var hasSymbol = typeof Symbol === 'function' && Symbol.for; |
| 3316 | var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; |
| 3317 | var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; |
| 3318 | var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; |
| 3319 | var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; |
| 3320 | var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; |
| 3321 | var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; |
| 3322 | var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary |
| 3323 | // (unstable) APIs that have been removed. Can we remove the symbols? |
| 3324 | |
| 3325 | var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; |
| 3326 | var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; |
| 3327 | var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; |
| 3328 | var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; |
| 3329 | var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; |
| 3330 | var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; |
| 3331 | var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; |
| 3332 | var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; |
| 3333 | var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; |
| 3334 | var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; |
| 3335 | var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; |
| 3336 | |
| 3337 | function isValidElementType(type) { |
| 3338 | return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. |
| 3339 | 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); |
| 3340 | } |
| 3341 | |
| 3342 | function typeOf(object) { |
| 3343 | if (typeof object === 'object' && object !== null) { |
| 3344 | var $$typeof = object.$$typeof; |
| 3345 | |
| 3346 | switch ($$typeof) { |
| 3347 | case REACT_ELEMENT_TYPE: |
| 3348 | var type = object.type; |
| 3349 | |
| 3350 | switch (type) { |
| 3351 | case REACT_ASYNC_MODE_TYPE: |
| 3352 | case REACT_CONCURRENT_MODE_TYPE: |
| 3353 | case REACT_FRAGMENT_TYPE: |
| 3354 | case REACT_PROFILER_TYPE: |
| 3355 | case REACT_STRICT_MODE_TYPE: |
| 3356 | case REACT_SUSPENSE_TYPE: |
| 3357 | return type; |
| 3358 | |
| 3359 | default: |
| 3360 | var $$typeofType = type && type.$$typeof; |
| 3361 | |
| 3362 | switch ($$typeofType) { |
| 3363 | case REACT_CONTEXT_TYPE: |
| 3364 | case REACT_FORWARD_REF_TYPE: |
| 3365 | case REACT_LAZY_TYPE: |
| 3366 | case REACT_MEMO_TYPE: |
| 3367 | case REACT_PROVIDER_TYPE: |
| 3368 | return $$typeofType; |
| 3369 | |
| 3370 | default: |
| 3371 | return $$typeof; |
| 3372 | } |
| 3373 | |
| 3374 | } |
| 3375 | |
| 3376 | case REACT_PORTAL_TYPE: |
| 3377 | return $$typeof; |
| 3378 | } |
| 3379 | } |
| 3380 | |
| 3381 | return undefined; |
| 3382 | } // AsyncMode is deprecated along with isAsyncMode |
| 3383 | |
| 3384 | var AsyncMode = REACT_ASYNC_MODE_TYPE; |
| 3385 | var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; |
| 3386 | var ContextConsumer = REACT_CONTEXT_TYPE; |
| 3387 | var ContextProvider = REACT_PROVIDER_TYPE; |
| 3388 | var Element = REACT_ELEMENT_TYPE; |
| 3389 | var ForwardRef = REACT_FORWARD_REF_TYPE; |
| 3390 | var Fragment = REACT_FRAGMENT_TYPE; |
| 3391 | var Lazy = REACT_LAZY_TYPE; |
| 3392 | var Memo = REACT_MEMO_TYPE; |
| 3393 | var Portal = REACT_PORTAL_TYPE; |
| 3394 | var Profiler = REACT_PROFILER_TYPE; |
| 3395 | var StrictMode = REACT_STRICT_MODE_TYPE; |
| 3396 | var Suspense = REACT_SUSPENSE_TYPE; |
| 3397 | var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated |
| 3398 | |
| 3399 | function isAsyncMode(object) { |
| 3400 | { |
| 3401 | if (!hasWarnedAboutDeprecatedIsAsyncMode) { |
| 3402 | hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint |
| 3403 | |
| 3404 | 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.'); |
| 3405 | } |
| 3406 | } |
| 3407 | |
| 3408 | return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; |
| 3409 | } |
| 3410 | function isConcurrentMode(object) { |
| 3411 | return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; |
| 3412 | } |
| 3413 | function isContextConsumer(object) { |
| 3414 | return typeOf(object) === REACT_CONTEXT_TYPE; |
| 3415 | } |
| 3416 | function isContextProvider(object) { |
| 3417 | return typeOf(object) === REACT_PROVIDER_TYPE; |
| 3418 | } |
| 3419 | function isElement(object) { |
| 3420 | return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; |
| 3421 | } |
| 3422 | function isForwardRef(object) { |
| 3423 | return typeOf(object) === REACT_FORWARD_REF_TYPE; |
| 3424 | } |
| 3425 | function isFragment(object) { |
| 3426 | return typeOf(object) === REACT_FRAGMENT_TYPE; |
| 3427 | } |
| 3428 | function isLazy(object) { |
| 3429 | return typeOf(object) === REACT_LAZY_TYPE; |
| 3430 | } |
| 3431 | function isMemo(object) { |
| 3432 | return typeOf(object) === REACT_MEMO_TYPE; |
| 3433 | } |
| 3434 | function isPortal(object) { |
| 3435 | return typeOf(object) === REACT_PORTAL_TYPE; |
| 3436 | } |
| 3437 | function isProfiler(object) { |
| 3438 | return typeOf(object) === REACT_PROFILER_TYPE; |
| 3439 | } |
| 3440 | function isStrictMode(object) { |
| 3441 | return typeOf(object) === REACT_STRICT_MODE_TYPE; |
| 3442 | } |
| 3443 | function isSuspense(object) { |
| 3444 | return typeOf(object) === REACT_SUSPENSE_TYPE; |
| 3445 | } |
| 3446 | |
| 3447 | exports.AsyncMode = AsyncMode; |
| 3448 | exports.ConcurrentMode = ConcurrentMode; |
| 3449 | exports.ContextConsumer = ContextConsumer; |
| 3450 | exports.ContextProvider = ContextProvider; |
| 3451 | exports.Element = Element; |
| 3452 | exports.ForwardRef = ForwardRef; |
| 3453 | exports.Fragment = Fragment; |
| 3454 | exports.Lazy = Lazy; |
| 3455 | exports.Memo = Memo; |
| 3456 | exports.Portal = Portal; |
| 3457 | exports.Profiler = Profiler; |
| 3458 | exports.StrictMode = StrictMode; |
| 3459 | exports.Suspense = Suspense; |
| 3460 | exports.isAsyncMode = isAsyncMode; |
| 3461 | exports.isConcurrentMode = isConcurrentMode; |
| 3462 | exports.isContextConsumer = isContextConsumer; |
| 3463 | exports.isContextProvider = isContextProvider; |
| 3464 | exports.isElement = isElement; |
| 3465 | exports.isForwardRef = isForwardRef; |
| 3466 | exports.isFragment = isFragment; |
| 3467 | exports.isLazy = isLazy; |
| 3468 | exports.isMemo = isMemo; |
| 3469 | exports.isPortal = isPortal; |
| 3470 | exports.isProfiler = isProfiler; |
| 3471 | exports.isStrictMode = isStrictMode; |
| 3472 | exports.isSuspense = isSuspense; |
| 3473 | exports.isValidElementType = isValidElementType; |
| 3474 | exports.typeOf = typeOf; |
| 3475 | })(); |
| 3476 | } |
| 3477 | |
| 3478 | |
| 3479 | /***/ }), |
| 3480 | |
| 3481 | /***/ "../node_modules/prop-types/node_modules/react-is/index.js": |
| 3482 | /*!*****************************************************************!*\ |
| 3483 | !*** ../node_modules/prop-types/node_modules/react-is/index.js ***! |
| 3484 | \*****************************************************************/ |
| 3485 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3486 | |
| 3487 | "use strict"; |
| 3488 | |
| 3489 | |
| 3490 | if (false) // removed by dead control flow |
| 3491 | {} else { |
| 3492 | module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"); |
| 3493 | } |
| 3494 | |
| 3495 | |
| 3496 | /***/ }), |
| 3497 | |
| 3498 | /***/ "../node_modules/react-dom/client.js": |
| 3499 | /*!*******************************************!*\ |
| 3500 | !*** ../node_modules/react-dom/client.js ***! |
| 3501 | \*******************************************/ |
| 3502 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 3503 | |
| 3504 | "use strict"; |
| 3505 | |
| 3506 | |
| 3507 | var m = __webpack_require__(/*! react-dom */ "react-dom"); |
| 3508 | if (false) // removed by dead control flow |
| 3509 | {} else { |
| 3510 | var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; |
| 3511 | exports.createRoot = function(c, o) { |
| 3512 | i.usingClientEntryPoint = true; |
| 3513 | try { |
| 3514 | return m.createRoot(c, o); |
| 3515 | } finally { |
| 3516 | i.usingClientEntryPoint = false; |
| 3517 | } |
| 3518 | }; |
| 3519 | exports.hydrateRoot = function(c, h, o) { |
| 3520 | i.usingClientEntryPoint = true; |
| 3521 | try { |
| 3522 | return m.hydrateRoot(c, h, o); |
| 3523 | } finally { |
| 3524 | i.usingClientEntryPoint = false; |
| 3525 | } |
| 3526 | }; |
| 3527 | } |
| 3528 | |
| 3529 | |
| 3530 | /***/ }), |
| 3531 | |
| 3532 | /***/ "@elementor/editor-app-bar": |
| 3533 | /*!*******************************************!*\ |
| 3534 | !*** external "elementorV2.editorAppBar" ***! |
| 3535 | \*******************************************/ |
| 3536 | /***/ ((module) => { |
| 3537 | |
| 3538 | "use strict"; |
| 3539 | module.exports = elementorV2.editorAppBar; |
| 3540 | |
| 3541 | /***/ }), |
| 3542 | |
| 3543 | /***/ "@elementor/editor-v1-adapters": |
| 3544 | /*!***********************************************!*\ |
| 3545 | !*** external "elementorV2.editorV1Adapters" ***! |
| 3546 | \***********************************************/ |
| 3547 | /***/ ((module) => { |
| 3548 | |
| 3549 | "use strict"; |
| 3550 | module.exports = elementorV2.editorV1Adapters; |
| 3551 | |
| 3552 | /***/ }), |
| 3553 | |
| 3554 | /***/ "@elementor/icons": |
| 3555 | /*!************************************!*\ |
| 3556 | !*** external "elementorV2.icons" ***! |
| 3557 | \************************************/ |
| 3558 | /***/ ((module) => { |
| 3559 | |
| 3560 | "use strict"; |
| 3561 | module.exports = elementorV2.icons; |
| 3562 | |
| 3563 | /***/ }), |
| 3564 | |
| 3565 | /***/ "@elementor/icons/RocketIcon": |
| 3566 | /*!**************************************************!*\ |
| 3567 | !*** external "elementorV2.icons['RocketIcon']" ***! |
| 3568 | \**************************************************/ |
| 3569 | /***/ ((module) => { |
| 3570 | |
| 3571 | "use strict"; |
| 3572 | module.exports = elementorV2.icons['RocketIcon']; |
| 3573 | |
| 3574 | /***/ }), |
| 3575 | |
| 3576 | /***/ "@elementor/query": |
| 3577 | /*!************************************!*\ |
| 3578 | !*** external "elementorV2.query" ***! |
| 3579 | \************************************/ |
| 3580 | /***/ ((module) => { |
| 3581 | |
| 3582 | "use strict"; |
| 3583 | module.exports = elementorV2.query; |
| 3584 | |
| 3585 | /***/ }), |
| 3586 | |
| 3587 | /***/ "@elementor/ui": |
| 3588 | /*!*********************************!*\ |
| 3589 | !*** external "elementorV2.ui" ***! |
| 3590 | \*********************************/ |
| 3591 | /***/ ((module) => { |
| 3592 | |
| 3593 | "use strict"; |
| 3594 | module.exports = elementorV2.ui; |
| 3595 | |
| 3596 | /***/ }), |
| 3597 | |
| 3598 | /***/ "@wordpress/i18n": |
| 3599 | /*!**************************!*\ |
| 3600 | !*** external "wp.i18n" ***! |
| 3601 | \**************************/ |
| 3602 | /***/ ((module) => { |
| 3603 | |
| 3604 | "use strict"; |
| 3605 | module.exports = wp.i18n; |
| 3606 | |
| 3607 | /***/ }), |
| 3608 | |
| 3609 | /***/ "react": |
| 3610 | /*!************************!*\ |
| 3611 | !*** external "React" ***! |
| 3612 | \************************/ |
| 3613 | /***/ ((module) => { |
| 3614 | |
| 3615 | "use strict"; |
| 3616 | module.exports = React; |
| 3617 | |
| 3618 | /***/ }), |
| 3619 | |
| 3620 | /***/ "react-dom": |
| 3621 | /*!***************************!*\ |
| 3622 | !*** external "ReactDOM" ***! |
| 3623 | \***************************/ |
| 3624 | /***/ ((module) => { |
| 3625 | |
| 3626 | "use strict"; |
| 3627 | module.exports = ReactDOM; |
| 3628 | |
| 3629 | /***/ }) |
| 3630 | |
| 3631 | /******/ }); |
| 3632 | /************************************************************************/ |
| 3633 | /******/ // The module cache |
| 3634 | /******/ var __webpack_module_cache__ = {}; |
| 3635 | /******/ |
| 3636 | /******/ // The require function |
| 3637 | /******/ function __webpack_require__(moduleId) { |
| 3638 | /******/ // Check if module is in cache |
| 3639 | /******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 3640 | /******/ if (cachedModule !== undefined) { |
| 3641 | /******/ return cachedModule.exports; |
| 3642 | /******/ } |
| 3643 | /******/ // Create a new module (and put it into the cache) |
| 3644 | /******/ var module = __webpack_module_cache__[moduleId] = { |
| 3645 | /******/ // no module.id needed |
| 3646 | /******/ // no module.loaded needed |
| 3647 | /******/ exports: {} |
| 3648 | /******/ }; |
| 3649 | /******/ |
| 3650 | /******/ // Execute the module function |
| 3651 | /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 3652 | /******/ |
| 3653 | /******/ // Return the exports of the module |
| 3654 | /******/ return module.exports; |
| 3655 | /******/ } |
| 3656 | /******/ |
| 3657 | /************************************************************************/ |
| 3658 | var __webpack_exports__ = {}; |
| 3659 | // This entry needs to be wrapped in an IIFE because it needs to be in strict mode. |
| 3660 | (() => { |
| 3661 | "use strict"; |
| 3662 | /*!************************************************!*\ |
| 3663 | !*** ../modules/checklist/assets/js/editor.js ***! |
| 3664 | \************************************************/ |
| 3665 | |
| 3666 | |
| 3667 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 3668 | var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); |
| 3669 | var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); |
| 3670 | var _editorAppBarLink = __webpack_require__(/*! ./editor-app-bar-link */ "../modules/checklist/assets/js/editor-app-bar-link.js"); |
| 3671 | var _component = _interopRequireDefault(__webpack_require__(/*! ./component */ "../modules/checklist/assets/js/component.js")); |
| 3672 | var _consts = __webpack_require__(/*! ./utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); |
| 3673 | var _functions = __webpack_require__(/*! ./utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 3674 | $e.components.register(new _component.default()); |
| 3675 | (0, _editorAppBarLink.editorAppBarLink)(); |
| 3676 | elementorCommon.elements.$window.on('elementor:loaded', elementorLoaded); |
| 3677 | function elementorLoaded() { |
| 3678 | elementor.on('document:loaded', checklistStartup); |
| 3679 | elementorCommon.elements.$window.off('elementor:loaded', elementorLoaded); |
| 3680 | } |
| 3681 | function checklistStartup() { |
| 3682 | return _checklistStartup.apply(this, arguments); |
| 3683 | } |
| 3684 | function _checklistStartup() { |
| 3685 | _checklistStartup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { |
| 3686 | var shouldHide, userProgress; |
| 3687 | return _regenerator.default.wrap(function (_context) { |
| 3688 | while (1) switch (_context.prev = _context.next) { |
| 3689 | case 0: |
| 3690 | shouldHide = 'yes' !== elementor.getPreferences('show_launchpad_checklist'); |
| 3691 | if (!shouldHide) { |
| 3692 | _context.next = 1; |
| 3693 | break; |
| 3694 | } |
| 3695 | $e.commands.run('checklist/toggle-icon', false); |
| 3696 | _context.next = 3; |
| 3697 | break; |
| 3698 | case 1: |
| 3699 | _context.next = 2; |
| 3700 | return (0, _functions.fetchUserProgress)(); |
| 3701 | case 2: |
| 3702 | userProgress = _context.sent; |
| 3703 | if (userProgress !== null && userProgress !== void 0 && userProgress[_consts.USER_PROGRESS.SHOULD_OPEN_IN_EDITOR]) { |
| 3704 | (0, _functions.toggleChecklistPopup)(); |
| 3705 | (0, _functions.dispatchChecklistOpenEvent)(); |
| 3706 | } |
| 3707 | case 3: |
| 3708 | elementor.off('document:loaded', checklistStartup); |
| 3709 | case 4: |
| 3710 | case "end": |
| 3711 | return _context.stop(); |
| 3712 | } |
| 3713 | }, _callee); |
| 3714 | })); |
| 3715 | return _checklistStartup.apply(this, arguments); |
| 3716 | } |
| 3717 | })(); |
| 3718 | |
| 3719 | /******/ })() |
| 3720 | ; |
| 3721 | //# sourceMappingURL=checklist.js.map |