| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | /******/ (() => { // webpackBootstrap |
| 2 | +/******/ "use strict"; | |
| 2 | 3 | /******/ var __webpack_modules__ = ({ |
| 3 | 4 | |
| 4 | 5 | /***/ "./assets/src/apps/js/admin/pages/tools/database/clean_database.js" |
| 5 | 6 | /*!*************************************************************************!*\ |
| @@ -6,9 +7,8 @@ | ||
| 6 | 7 | !*** ./assets/src/apps/js/admin/pages/tools/database/clean_database.js ***! |
| 7 | 8 | \*************************************************************************/ |
| 8 | 9 | (__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 9 | 10 | |
| 10 | -"use strict"; | |
| 11 | 11 | __webpack_require__.r(__webpack_exports__); |
| 12 | 12 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 13 | 13 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 14 | 14 | /* harmony export */ }); |
| @@ -141,9 +141,8 @@ | ||
| 141 | 141 | !*** ./assets/src/apps/js/admin/pages/tools/database/create_indexs.js ***! |
| 142 | 142 | \************************************************************************/ |
| 143 | 143 | (__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 144 | 144 | |
| 145 | -"use strict"; | |
| 146 | 145 | __webpack_require__.r(__webpack_exports__); |
| 147 | 146 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 148 | 147 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 149 | 148 | /* harmony export */ }); |
| @@ -275,9 +274,8 @@ | ||
| 275 | 274 | !*** ./assets/src/apps/js/admin/pages/tools/database/re-upgrade-db.js ***! |
| 276 | 275 | \************************************************************************/ |
| 277 | 276 | (__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 278 | 277 | |
| 279 | -"use strict"; | |
| 280 | 278 | __webpack_require__.r(__webpack_exports__); |
| 281 | 279 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 282 | 280 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 283 | 281 | /* harmony export */ }); |
| @@ -344,9 +342,8 @@ | ||
| 344 | 342 | !*** ./assets/src/apps/js/admin/pages/tools/database/upgrade.js ***! |
| 345 | 343 | \******************************************************************/ |
| 346 | 344 | (__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 347 | 345 | |
| 348 | -"use strict"; | |
| 349 | 346 | __webpack_require__.r(__webpack_exports__); |
| 350 | 347 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 351 | 348 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 352 | 349 | /* harmony export */ }); |
| @@ -602,378 +599,8 @@ | ||
| 602 | 599 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getStepsUpgradeStatus); |
| 603 | 600 | |
| 604 | 601 | /***/ }, |
| 605 | 602 | |
| 606 | -/***/ "./assets/src/apps/js/admin/pages/tools/handle-sample-data.js" | |
| 607 | -/*!********************************************************************!*\ | |
| 608 | - !*** ./assets/src/apps/js/admin/pages/tools/handle-sample-data.js ***! | |
| 609 | - \********************************************************************/ | |
| 610 | -(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 611 | - | |
| 612 | -"use strict"; | |
| 613 | -__webpack_require__.r(__webpack_exports__); | |
| 614 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 615 | -/* harmony export */ "default": () => (/* binding */ HandleSampleData) | |
| 616 | -/* harmony export */ }); | |
| 617 | -/* harmony import */ var lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lpAssetsJsPath/utils.js */ "./assets/src/js/utils.js"); | |
| 618 | -/* harmony import */ var lpAssetsJsPath_lpToastify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lpAssetsJsPath/lpToastify.js */ "./assets/src/js/lpToastify.js"); | |
| 619 | -/** | |
| 620 | - * Handle install/uninstall sample course data on the Tools page. | |
| 621 | - * | |
| 622 | - * @since 4.4.5 | |
| 623 | - * @version 1.0.0 | |
| 624 | - */ | |
| 625 | - | |
| 626 | - | |
| 627 | -class HandleSampleData { | |
| 628 | - static selectors = { | |
| 629 | - wrapper: '.lp-install-sample', | |
| 630 | - form: '.lp-form-handle-sample-data', | |
| 631 | - elBtnHandleSampleData: '.lp-btn-install-sample-handle', | |
| 632 | - elTriggerToggle: '.lp-install-sample__toggle-options', | |
| 633 | - elMessage: '.lp-install-sample-message' | |
| 634 | - }; | |
| 635 | - constructor() { | |
| 636 | - this.wrapper = null; | |
| 637 | - } | |
| 638 | - init() { | |
| 639 | - this.wrapper = document.querySelector(HandleSampleData.selectors.wrapper); | |
| 640 | - if (!this.wrapper) { | |
| 641 | - return; | |
| 642 | - } | |
| 643 | - this.preventFormSubmit(); | |
| 644 | - this.events(); | |
| 645 | - } | |
| 646 | - preventFormSubmit() { | |
| 647 | - const form = this.wrapper.querySelector(HandleSampleData.selectors.form); | |
| 648 | - if (form) { | |
| 649 | - form.addEventListener('submit', e => { | |
| 650 | - e.preventDefault(); | |
| 651 | - }); | |
| 652 | - } | |
| 653 | - } | |
| 654 | - events() { | |
| 655 | - if (HandleSampleData._loadedEvents) { | |
| 656 | - return; | |
| 657 | - } | |
| 658 | - HandleSampleData._loadedEvents = this; | |
| 659 | - lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__.eventHandlers('click', [{ | |
| 660 | - selector: HandleSampleData.selectors.elBtnHandleSampleData, | |
| 661 | - class: this, | |
| 662 | - callBack: this.handleAction.name | |
| 663 | - }, { | |
| 664 | - selector: HandleSampleData.selectors.elTriggerToggle, | |
| 665 | - callBack: args => { | |
| 666 | - const { | |
| 667 | - e, | |
| 668 | - target | |
| 669 | - } = args; | |
| 670 | - const elForm = this.wrapper.querySelector(HandleSampleData.selectors.form); | |
| 671 | - if (elForm) { | |
| 672 | - elForm.classList.toggle('lp-hidden'); | |
| 673 | - const textShow = target.dataset.showText; | |
| 674 | - const textHide = target.dataset.hideText; | |
| 675 | - target.textContent = elForm.classList.contains('lp-hidden') ? textShow : textHide; | |
| 676 | - } | |
| 677 | - } | |
| 678 | - }]); | |
| 679 | - } | |
| 680 | - handleAction(args) { | |
| 681 | - const { | |
| 682 | - e, | |
| 683 | - target | |
| 684 | - } = args; | |
| 685 | - const button = target.closest(HandleSampleData.selectors.elBtnHandleSampleData); | |
| 686 | - e.preventDefault(); | |
| 687 | - const elMessage = this.wrapper.querySelector(HandleSampleData.selectors.elMessage); | |
| 688 | - const message = button.dataset.message; | |
| 689 | - if (!message || !confirm(message)) { | |
| 690 | - return; | |
| 691 | - } | |
| 692 | - elMessage.innerHTML = ''; | |
| 693 | - lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__.lpSetLoadingEl(button, true); | |
| 694 | - const wrapper = button.closest(HandleSampleData.selectors.wrapper); | |
| 695 | - const elForm = wrapper.querySelector(HandleSampleData.selectors.form); | |
| 696 | - let dataSend = lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__.getDataOfForm(elForm); | |
| 697 | - dataSend.action = button.dataset.action; | |
| 698 | - dataSend.id_url = 'handle-sample-data'; | |
| 699 | - const callBack = { | |
| 700 | - success: response => { | |
| 701 | - const { | |
| 702 | - status, | |
| 703 | - message, | |
| 704 | - data | |
| 705 | - } = response; | |
| 706 | - if ('success' === status) { | |
| 707 | - this.wrapper.querySelector(HandleSampleData.selectors.elMessage).innerHTML = data.html; | |
| 708 | - } else { | |
| 709 | - throw new Error(message); | |
| 710 | - } | |
| 711 | - }, | |
| 712 | - error: error => { | |
| 713 | - lpAssetsJsPath_lpToastify_js__WEBPACK_IMPORTED_MODULE_1__.show(error, 'error'); | |
| 714 | - }, | |
| 715 | - completed: () => { | |
| 716 | - lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__.lpSetLoadingEl(button, false); | |
| 717 | - setTimeout(() => { | |
| 718 | - elMessage.innerHTML = ''; | |
| 719 | - }, 3000); | |
| 720 | - } | |
| 721 | - }; | |
| 722 | - window.lpAJAXG.fetchAJAX(dataSend, callBack); | |
| 723 | - } | |
| 724 | -} | |
| 725 | - | |
| 726 | -/***/ }, | |
| 727 | - | |
| 728 | -/***/ "./assets/src/apps/js/admin/pages/tools/reset-data/course.js" | |
| 729 | -/*!*******************************************************************!*\ | |
| 730 | - !*** ./assets/src/apps/js/admin/pages/tools/reset-data/course.js ***! | |
| 731 | - \*******************************************************************/ | |
| 732 | -(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 733 | - | |
| 734 | -"use strict"; | |
| 735 | -__webpack_require__.r(__webpack_exports__); | |
| 736 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 737 | -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 738 | -/* harmony export */ }); | |
| 739 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 740 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 741 | - | |
| 742 | -/** | |
| 743 | - * Reset course progress. | |
| 744 | - * | |
| 745 | - * @since 4.0.5. | |
| 746 | - * @author Nhamdv - Code choi choi in Physcode. | |
| 747 | - */ | |
| 748 | -const { | |
| 749 | - __ | |
| 750 | -} = wp.i18n; | |
| 751 | -const { | |
| 752 | - TextControl, | |
| 753 | - Button, | |
| 754 | - Spinner, | |
| 755 | - CheckboxControl, | |
| 756 | - Notice | |
| 757 | -} = wp.components; | |
| 758 | -const { | |
| 759 | - useState, | |
| 760 | - useEffect | |
| 761 | -} = wp.element; | |
| 762 | -const { | |
| 763 | - addQueryArgs | |
| 764 | -} = wp.url; | |
| 765 | -const ResetCourse = () => { | |
| 766 | - const [loading, setLoading] = useState(false); | |
| 767 | - const [search, setSearch] = useState(''); | |
| 768 | - const [data, setData] = useState([]); | |
| 769 | - const [checkData, setCheckData] = useState([]); | |
| 770 | - const [message, setMessage] = useState([]); | |
| 771 | - const [loadingReset, setLoadingReset] = useState(false); | |
| 772 | - useEffect(() => { | |
| 773 | - responsiveData(search); | |
| 774 | - }, [search]); | |
| 775 | - const responsiveData = async s => { | |
| 776 | - try { | |
| 777 | - if (!s || loading) { | |
| 778 | - setMessage([]); | |
| 779 | - setData([]); | |
| 780 | - return; | |
| 781 | - } | |
| 782 | - if (s.length < 3) { | |
| 783 | - setMessage([{ | |
| 784 | - status: 'error', | |
| 785 | - message: 'Please enter at least 3 characters to searching course.' | |
| 786 | - }]); | |
| 787 | - setData([]); | |
| 788 | - return; | |
| 789 | - } | |
| 790 | - setLoading(true); | |
| 791 | - const response = await wp.apiFetch({ | |
| 792 | - path: addQueryArgs('lp/v1/admin/tools/reset-data/search-courses', { | |
| 793 | - s | |
| 794 | - }), | |
| 795 | - method: 'GET' | |
| 796 | - }); | |
| 797 | - const { | |
| 798 | - status, | |
| 799 | - data | |
| 800 | - } = response; | |
| 801 | - setLoading(false); | |
| 802 | - if (status === 'success') { | |
| 803 | - setData(data); | |
| 804 | - setMessage([]); | |
| 805 | - } else { | |
| 806 | - setMessage([{ | |
| 807 | - status: 'error', | |
| 808 | - message: response.message || 'LearnPress: Search Course Fail!' | |
| 809 | - }]); | |
| 810 | - setData([]); | |
| 811 | - } | |
| 812 | - } catch (error) { | |
| 813 | - console.log(error.message); | |
| 814 | - } | |
| 815 | - }; | |
| 816 | - function checkItems(id) { | |
| 817 | - const datas = [...checkData]; | |
| 818 | - if (datas.includes(id)) { | |
| 819 | - const index = datas.indexOf(id); | |
| 820 | - if (index > -1) { | |
| 821 | - datas.splice(index, 1); | |
| 822 | - } | |
| 823 | - } else { | |
| 824 | - datas.push(id); | |
| 825 | - } | |
| 826 | - setCheckData(datas); | |
| 827 | - } | |
| 828 | - const resetCourse = async () => { | |
| 829 | - if (checkData.length === 0) { | |
| 830 | - setMessage([{ | |
| 831 | - status: 'error', | |
| 832 | - message: 'Please chooce Course for reset data!' | |
| 833 | - }]); | |
| 834 | - return; | |
| 835 | - } | |
| 836 | - | |
| 837 | - // eslint-disable-next-line no-alert | |
| 838 | - if (!confirm('Are you sure to reset course progress of all users enrolled this course?')) { | |
| 839 | - return; | |
| 840 | - } | |
| 841 | - const notice = []; | |
| 842 | - try { | |
| 843 | - setLoadingReset(true); | |
| 844 | - for (const courseId of checkData) { | |
| 845 | - const response = await wp.apiFetch({ | |
| 846 | - path: addQueryArgs('lp/v1/admin/tools/reset-data/reset-courses', { | |
| 847 | - courseId | |
| 848 | - }), | |
| 849 | - method: 'GET' | |
| 850 | - }); | |
| 851 | - const { | |
| 852 | - status, | |
| 853 | - data, | |
| 854 | - message | |
| 855 | - } = response; | |
| 856 | - notice.push({ | |
| 857 | - status, | |
| 858 | - message: message || `Course #${courseId} reset successfully!` | |
| 859 | - }); | |
| 860 | - } | |
| 861 | - setLoadingReset(false); | |
| 862 | - } catch (error) { | |
| 863 | - notice.push({ | |
| 864 | - status: 'error', | |
| 865 | - message: error.message || `LearnPress Error: Reset Course Data.` | |
| 866 | - }); | |
| 867 | - } | |
| 868 | - setMessage(notice); | |
| 869 | - }; | |
| 870 | - return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, __('Reset Course Progress', 'learnpress')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { | |
| 871 | - className: "description" | |
| 872 | - }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, __('This action will reset course progress of all users who have enrolled.', 'learnpress')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, __('Search results only show if courses have user data.', 'learnpress')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, { | |
| 873 | - placeholder: __('Search course by name', 'learnpress'), | |
| 874 | - value: search, | |
| 875 | - onChange: value => setSearch(value), | |
| 876 | - style: { | |
| 877 | - width: 300 | |
| 878 | - } | |
| 879 | - }))), loading && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Spinner, null), data.length > 0 && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { | |
| 880 | - className: "lp-reset-course_progress", | |
| 881 | - style: { | |
| 882 | - border: '1px solid #eee' | |
| 883 | - } | |
| 884 | - }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { | |
| 885 | - style: { | |
| 886 | - background: '#eee' | |
| 887 | - } | |
| 888 | - }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(CheckboxControl, { | |
| 889 | - checked: checkData.length === data.length, | |
| 890 | - onChange: () => { | |
| 891 | - if (checkData.length === data.length) { | |
| 892 | - setCheckData([]); | |
| 893 | - } else { | |
| 894 | - setCheckData(data.map(dt => dt.id)); | |
| 895 | - } | |
| 896 | - }, | |
| 897 | - style: { | |
| 898 | - margin: 0 | |
| 899 | - } | |
| 900 | - })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, __('ID', 'learnpress')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, __('Name', 'learnpress')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, __('Students', 'learnpress')))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { | |
| 901 | - style: { | |
| 902 | - height: '100%', | |
| 903 | - maxHeight: 200, | |
| 904 | - overflow: 'auto' | |
| 905 | - } | |
| 906 | - }, data.map(dt => { | |
| 907 | - return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { | |
| 908 | - style: { | |
| 909 | - borderTop: '1px solid #eee' | |
| 910 | - }, | |
| 911 | - key: dt.id | |
| 912 | - }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(CheckboxControl, { | |
| 913 | - checked: checkData.includes(dt.id), | |
| 914 | - onChange: () => checkItems(dt.id) | |
| 915 | - })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "#", dt.id), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, dt.title), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, dt.students)); | |
| 916 | - }))), loadingReset ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Spinner, null) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, { | |
| 917 | - isPrimary: true, | |
| 918 | - onClick: () => resetCourse(), | |
| 919 | - style: { | |
| 920 | - marginTop: 10, | |
| 921 | - height: 30 | |
| 922 | - } | |
| 923 | - }, __('Reset now', 'learnpress'))), message.length > 0 && message.map((mess, index) => { | |
| 924 | - return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Notice, { | |
| 925 | - status: mess.status, | |
| 926 | - key: index, | |
| 927 | - isDismissible: false | |
| 928 | - }, mess.message); | |
| 929 | - }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("style", null, '\ | |
| 930 | - .lp-reset-course_progress .components-base-control__field {\ | |
| 931 | - margin: 0;\ | |
| 932 | - }\ | |
| 933 | - .components-notice{\ | |
| 934 | - margin-left: 0;\ | |
| 935 | - }\ | |
| 936 | - .lp-reset-course_progress > div > div{\ | |
| 937 | - display: grid;\ | |
| 938 | - grid-template-columns: 80px 50px 1fr 80px;\ | |
| 939 | - align-items: center;\ | |
| 940 | - }\ | |
| 941 | - .lp-reset-course_progress > div > div > div{\ | |
| 942 | - maegin: 0;\ | |
| 943 | - padding: 8px 10px;\ | |
| 944 | - }\ | |
| 945 | - ')); | |
| 946 | -}; | |
| 947 | -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ResetCourse); | |
| 948 | - | |
| 949 | -/***/ }, | |
| 950 | - | |
| 951 | -/***/ "./assets/src/apps/js/admin/pages/tools/reset-data/index.js" | |
| 952 | -/*!******************************************************************!*\ | |
| 953 | - !*** ./assets/src/apps/js/admin/pages/tools/reset-data/index.js ***! | |
| 954 | - \******************************************************************/ | |
| 955 | -(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 956 | - | |
| 957 | -"use strict"; | |
| 958 | -__webpack_require__.r(__webpack_exports__); | |
| 959 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 960 | -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 961 | -/* harmony export */ }); | |
| 962 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 963 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 964 | -/* harmony import */ var _course__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./course */ "./assets/src/apps/js/admin/pages/tools/reset-data/course.js"); | |
| 965 | - | |
| 966 | - | |
| 967 | -const resetData = () => { | |
| 968 | - if (document.querySelectorAll('#learn-press-reset-course-users').length > 0) { | |
| 969 | - wp.element.render((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_course__WEBPACK_IMPORTED_MODULE_1__["default"], null), [...document.querySelectorAll('#learn-press-reset-course-users')][0]); | |
| 970 | - } | |
| 971 | -}; | |
| 972 | -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (resetData); | |
| 973 | - | |
| 974 | -/***/ }, | |
| 975 | - | |
| 976 | 603 | /***/ "./assets/src/apps/js/utils/handle-ajax-api.js" |
| 977 | 604 | /*!*****************************************************!*\ |
| 978 | 605 | !*** ./assets/src/apps/js/utils/handle-ajax-api.js ***! |
| 979 | 606 | \*****************************************************/ |
| @@ -978,9 +605,8 @@ | ||
| 978 | 605 | !*** ./assets/src/apps/js/utils/handle-ajax-api.js ***! |
| 979 | 606 | \*****************************************************/ |
| 980 | 607 | (__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 981 | 608 | |
| 982 | -"use strict"; | |
| 983 | 609 | __webpack_require__.r(__webpack_exports__); |
| 984 | 610 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 985 | 611 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 986 | 612 | /* harmony export */ }); |
| @@ -1012,9 +638,8 @@ | ||
| 1012 | 638 | !*** ./assets/src/apps/js/utils/lp-modal-overlay.js ***! |
| 1013 | 639 | \******************************************************/ |
| 1014 | 640 | (__unused_webpack_module, __webpack_exports__, __webpack_require__) { |
| 1015 | 641 | |
| 1016 | -"use strict"; | |
| 1017 | 642 | __webpack_require__.r(__webpack_exports__); |
| 1018 | 643 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1019 | 644 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 1020 | 645 | /* harmony export */ }); |
| @@ -1071,1606 +696,25 @@ | ||
| 1071 | 696 | } |
| 1072 | 697 | }; |
| 1073 | 698 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (lpModalOverlay); |
| 1074 | 699 | |
| 1075 | -/***/ }, | |
| 1076 | - | |
| 1077 | -/***/ "./assets/src/js/lpToastify.js" | |
| 1078 | -/*!*************************************!*\ | |
| 1079 | - !*** ./assets/src/js/lpToastify.js ***! | |
| 1080 | - \*************************************/ | |
| 1081 | -(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1082 | - | |
| 1083 | -"use strict"; | |
| 1084 | -__webpack_require__.r(__webpack_exports__); | |
| 1085 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1086 | -/* harmony export */ show: () => (/* binding */ show) | |
| 1087 | -/* harmony export */ }); | |
| 1088 | -/* harmony import */ var toastify_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! toastify-js */ "./node_modules/toastify-js/src/toastify.js"); | |
| 1089 | -/* harmony import */ var toastify_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(toastify_js__WEBPACK_IMPORTED_MODULE_0__); | |
| 1090 | -/* harmony import */ var toastify_js_src_toastify_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! toastify-js/src/toastify.css */ "./node_modules/toastify-js/src/toastify.css"); | |
| 1091 | -/** | |
| 1092 | - * Utils functions | |
| 1093 | - * | |
| 1094 | - * @param url | |
| 1095 | - * @param data | |
| 1096 | - * @param functions | |
| 1097 | - * @since 4.3.0 | |
| 1098 | - * @version 1.0.0 | |
| 1099 | - */ | |
| 1100 | - | |
| 1101 | - | |
| 1102 | -const argsToastify = { | |
| 1103 | - text: '', | |
| 1104 | - gravity: lpData.toast.gravity, | |
| 1105 | - // `top` or `bottom` | |
| 1106 | - position: lpData.toast.position, | |
| 1107 | - // `left`, `center` or `right` | |
| 1108 | - className: `${lpData.toast.classPrefix}`, | |
| 1109 | - close: lpData.toast.close == 1, | |
| 1110 | - stopOnFocus: lpData.toast.stopOnFocus == 1, | |
| 1111 | - duration: lpData.toast.duration | |
| 1112 | -}; | |
| 1113 | -const show = (message, status = 'success', argsCustom) => { | |
| 1114 | - let args = argsToastify; | |
| 1115 | - if (argsCustom) { | |
| 1116 | - args = { | |
| 1117 | - ...args, | |
| 1118 | - ...argsCustom | |
| 1119 | - }; | |
| 1120 | - } | |
| 1121 | - const toastify = new (toastify_js__WEBPACK_IMPORTED_MODULE_0___default())({ | |
| 1122 | - ...args, | |
| 1123 | - text: message, | |
| 1124 | - className: `${lpData.toast.classPrefix} ${status}` | |
| 1125 | - }); | |
| 1126 | - toastify.showToast(); | |
| 1127 | -}; | |
| 1128 | - | |
| 1129 | -/***/ }, | |
| 1130 | - | |
| 1131 | -/***/ "./assets/src/js/utils.js" | |
| 1132 | -/*!********************************!*\ | |
| 1133 | - !*** ./assets/src/js/utils.js ***! | |
| 1134 | - \********************************/ | |
| 1135 | -(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1136 | - | |
| 1137 | -"use strict"; | |
| 1138 | -__webpack_require__.r(__webpack_exports__); | |
| 1139 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1140 | -/* harmony export */ debounce: () => (/* binding */ debounce), | |
| 1141 | -/* harmony export */ eventHandlers: () => (/* binding */ eventHandlers), | |
| 1142 | -/* harmony export */ fullScreenView: () => (/* binding */ fullScreenView), | |
| 1143 | -/* harmony export */ getDataOfForm: () => (/* binding */ getDataOfForm), | |
| 1144 | -/* harmony export */ getFieldKeysOfForm: () => (/* binding */ getFieldKeysOfForm), | |
| 1145 | -/* harmony export */ listenElementCreated: () => (/* binding */ listenElementCreated), | |
| 1146 | -/* harmony export */ listenElementViewed: () => (/* binding */ listenElementViewed), | |
| 1147 | -/* harmony export */ lpAddQueryArgs: () => (/* binding */ lpAddQueryArgs), | |
| 1148 | -/* harmony export */ lpAjaxParseJsonOld: () => (/* binding */ lpAjaxParseJsonOld), | |
| 1149 | -/* harmony export */ lpClassName: () => (/* binding */ lpClassName), | |
| 1150 | -/* harmony export */ lpFetchAPI: () => (/* binding */ lpFetchAPI), | |
| 1151 | -/* harmony export */ lpGetCurrentURLNoParam: () => (/* binding */ lpGetCurrentURLNoParam), | |
| 1152 | -/* harmony export */ lpOnElementReady: () => (/* binding */ lpOnElementReady), | |
| 1153 | -/* harmony export */ lpSetLoadingEl: () => (/* binding */ lpSetLoadingEl), | |
| 1154 | -/* harmony export */ lpShowHideEl: () => (/* binding */ lpShowHideEl), | |
| 1155 | -/* harmony export */ mergeDataWithDatForm: () => (/* binding */ mergeDataWithDatForm), | |
| 1156 | -/* harmony export */ toggleCollapse: () => (/* binding */ toggleCollapse), | |
| 1157 | -/* harmony export */ toggleEnable: () => (/* binding */ toggleEnable) | |
| 1158 | -/* harmony export */ }); | |
| 1159 | -/** | |
| 1160 | - * Utils functions | |
| 1161 | - * | |
| 1162 | - * @param url | |
| 1163 | - * @param data | |
| 1164 | - * @param functions | |
| 1165 | - * @since 4.2.5.1 | |
| 1166 | - * @version 1.0.7 | |
| 1167 | - */ | |
| 1168 | -const lpClassName = { | |
| 1169 | - hidden: 'lp-hidden', | |
| 1170 | - loading: 'loading', | |
| 1171 | - elCollapse: 'lp-collapse', | |
| 1172 | - elSectionToggle: '.lp-section-toggle', | |
| 1173 | - elTriggerToggle: '.lp-trigger-toggle', | |
| 1174 | - elBtnFullScreen: '.lp-btn-full-screen-view', | |
| 1175 | - elFullScreen: 'lp-full-screen-view', | |
| 1176 | - elBtnFullScreenClose: 'lp-full-screen-view__close' | |
| 1177 | -}; | |
| 1178 | -const lpFetchAPI = (url, data = {}, functions = {}) => { | |
| 1179 | - if ('function' === typeof functions.before) { | |
| 1180 | - functions.before(); | |
| 1181 | - } | |
| 1182 | - fetch(url, { | |
| 1183 | - method: 'GET', | |
| 1184 | - ...data | |
| 1185 | - }).then(response => response.json()).then(response => { | |
| 1186 | - if ('function' === typeof functions.success) { | |
| 1187 | - functions.success(response); | |
| 1188 | - } | |
| 1189 | - }).catch(err => { | |
| 1190 | - if ('function' === typeof functions.error) { | |
| 1191 | - functions.error(err); | |
| 1192 | - } | |
| 1193 | - }).finally(() => { | |
| 1194 | - if ('function' === typeof functions.completed) { | |
| 1195 | - functions.completed(); | |
| 1196 | - } | |
| 1197 | - }); | |
| 1198 | -}; | |
| 1199 | - | |
| 1200 | -/** | |
| 1201 | - * Get current URL without params. | |
| 1202 | - * | |
| 1203 | - * @since 4.2.5.1 | |
| 1204 | - */ | |
| 1205 | -const lpGetCurrentURLNoParam = () => { | |
| 1206 | - let currentUrl = window.location.href; | |
| 1207 | - const hasParams = currentUrl.includes('?'); | |
| 1208 | - if (hasParams) { | |
| 1209 | - currentUrl = currentUrl.split('?')[0]; | |
| 1210 | - } | |
| 1211 | - return currentUrl; | |
| 1212 | -}; | |
| 1213 | -const lpAddQueryArgs = (endpoint, args) => { | |
| 1214 | - const url = new URL(endpoint); | |
| 1215 | - Object.keys(args).forEach(arg => { | |
| 1216 | - url.searchParams.set(arg, args[arg]); | |
| 1217 | - }); | |
| 1218 | - return url; | |
| 1219 | -}; | |
| 1220 | - | |
| 1221 | -/** | |
| 1222 | - * Listen element viewed. | |
| 1223 | - * | |
| 1224 | - * @param el | |
| 1225 | - * @param callback | |
| 1226 | - * @since 4.2.5.8 | |
| 1227 | - */ | |
| 1228 | -const listenElementViewed = (el, callback) => { | |
| 1229 | - const observerSeeItem = new IntersectionObserver(function (entries) { | |
| 1230 | - for (const entry of entries) { | |
| 1231 | - if (entry.isIntersecting) { | |
| 1232 | - callback(entry); | |
| 1233 | - } | |
| 1234 | - } | |
| 1235 | - }); | |
| 1236 | - observerSeeItem.observe(el); | |
| 1237 | -}; | |
| 1238 | - | |
| 1239 | -/** | |
| 1240 | - * Listen element created. | |
| 1241 | - * | |
| 1242 | - * @param callback | |
| 1243 | - * @since 4.2.5.8 | |
| 1244 | - */ | |
| 1245 | -const listenElementCreated = callback => { | |
| 1246 | - const observerCreateItem = new MutationObserver(function (mutations) { | |
| 1247 | - mutations.forEach(function (mutation) { | |
| 1248 | - if (mutation.addedNodes) { | |
| 1249 | - mutation.addedNodes.forEach(function (node) { | |
| 1250 | - if (node.nodeType === 1) { | |
| 1251 | - callback(node); | |
| 1252 | - } | |
| 1253 | - }); | |
| 1254 | - } | |
| 1255 | - }); | |
| 1256 | - }); | |
| 1257 | - observerCreateItem.observe(document, { | |
| 1258 | - childList: true, | |
| 1259 | - subtree: true | |
| 1260 | - }); | |
| 1261 | - // End. | |
| 1262 | -}; | |
| 1263 | - | |
| 1264 | -/** | |
| 1265 | - * Listen element created. | |
| 1266 | - * | |
| 1267 | - * @param selector | |
| 1268 | - * @param callback | |
| 1269 | - * @since 4.2.7.1 | |
| 1270 | - */ | |
| 1271 | -const lpOnElementReady = (selector, callback) => { | |
| 1272 | - const element = document.querySelector(selector); | |
| 1273 | - if (element) { | |
| 1274 | - callback(element); | |
| 1275 | - return; | |
| 1276 | - } | |
| 1277 | - const observer = new MutationObserver((mutations, obs) => { | |
| 1278 | - const element = document.querySelector(selector); | |
| 1279 | - if (element) { | |
| 1280 | - obs.disconnect(); | |
| 1281 | - callback(element); | |
| 1282 | - } | |
| 1283 | - }); | |
| 1284 | - observer.observe(document.documentElement, { | |
| 1285 | - childList: true, | |
| 1286 | - subtree: true | |
| 1287 | - }); | |
| 1288 | -}; | |
| 1289 | - | |
| 1290 | -// Parse JSON from string with content include LP_AJAX_START. | |
| 1291 | -const lpAjaxParseJsonOld = data => { | |
| 1292 | - if (typeof data !== 'string') { | |
| 1293 | - return data; | |
| 1294 | - } | |
| 1295 | - const m = String.raw({ | |
| 1296 | - raw: data | |
| 1297 | - }).match(/<-- LP_AJAX_START -->(.*)<-- LP_AJAX_END -->/s); | |
| 1298 | - try { | |
| 1299 | - if (m) { | |
| 1300 | - data = JSON.parse(m[1].replace(/(?:\r\n|\r|\n)/g, '')); | |
| 1301 | - } else { | |
| 1302 | - data = JSON.parse(data); | |
| 1303 | - } | |
| 1304 | - } catch (e) { | |
| 1305 | - data = {}; | |
| 1306 | - } | |
| 1307 | - return data; | |
| 1308 | -}; | |
| 1309 | - | |
| 1310 | -// status 0: hide, 1: show | |
| 1311 | -const lpShowHideEl = (el, status = 0) => { | |
| 1312 | - if (!el) { | |
| 1313 | - return; | |
| 1314 | - } | |
| 1315 | - if (!status) { | |
| 1316 | - el.classList.add(lpClassName.hidden); | |
| 1317 | - } else { | |
| 1318 | - el.classList.remove(lpClassName.hidden); | |
| 1319 | - } | |
| 1320 | -}; | |
| 1321 | - | |
| 1322 | -// status 0: hide, 1: show | |
| 1323 | -const lpSetLoadingEl = (el, status) => { | |
| 1324 | - if (!el) { | |
| 1325 | - return; | |
| 1326 | - } | |
| 1327 | - if (!status) { | |
| 1328 | - el.classList.remove(lpClassName.loading); | |
| 1329 | - } else { | |
| 1330 | - el.classList.add(lpClassName.loading); | |
| 1331 | - } | |
| 1332 | -}; | |
| 1333 | - | |
| 1334 | -// Toggle collapse section | |
| 1335 | -const toggleCollapse = (e, target, elTriggerClassName = '', elsExclude = [], callback) => { | |
| 1336 | - if (!elTriggerClassName) { | |
| 1337 | - elTriggerClassName = lpClassName.elTriggerToggle; | |
| 1338 | - } | |
| 1339 | - | |
| 1340 | - // Exclude elements, which should not trigger the collapse toggle | |
| 1341 | - if (elsExclude && elsExclude.length > 0) { | |
| 1342 | - for (const elExclude of elsExclude) { | |
| 1343 | - if (target.closest(elExclude)) { | |
| 1344 | - return; | |
| 1345 | - } | |
| 1346 | - } | |
| 1347 | - } | |
| 1348 | - const elTrigger = target.closest(elTriggerClassName); | |
| 1349 | - if (!elTrigger) { | |
| 1350 | - return; | |
| 1351 | - } | |
| 1352 | - | |
| 1353 | - //console.log( 'elTrigger', elTrigger ); | |
| 1354 | - | |
| 1355 | - const elSectionToggle = elTrigger.closest(`${lpClassName.elSectionToggle}`); | |
| 1356 | - if (!elSectionToggle) { | |
| 1357 | - return; | |
| 1358 | - } | |
| 1359 | - elSectionToggle.classList.toggle(`${lpClassName.elCollapse}`); | |
| 1360 | - if ('function' === typeof callback) { | |
| 1361 | - callback(elSectionToggle); | |
| 1362 | - } | |
| 1363 | -}; | |
| 1364 | - | |
| 1365 | -// Get data of form | |
| 1366 | -const getDataOfForm = form => { | |
| 1367 | - const dataSend = {}; | |
| 1368 | - const formData = new FormData(form); | |
| 1369 | - for (const pair of formData.entries()) { | |
| 1370 | - const key = pair[0]; | |
| 1371 | - const value = formData.getAll(key); | |
| 1372 | - if (!dataSend.hasOwnProperty(key)) { | |
| 1373 | - // Convert value array to string. | |
| 1374 | - dataSend[key] = value.join(','); | |
| 1375 | - } | |
| 1376 | - } | |
| 1377 | - return dataSend; | |
| 1378 | -}; | |
| 1379 | - | |
| 1380 | -// Get field keys of form | |
| 1381 | -const getFieldKeysOfForm = form => { | |
| 1382 | - const keys = []; | |
| 1383 | - const elements = form.elements; | |
| 1384 | - for (let i = 0; i < elements.length; i++) { | |
| 1385 | - const name = elements[i].name; | |
| 1386 | - if (name && !keys.includes(name)) { | |
| 1387 | - keys.push(name); | |
| 1388 | - } | |
| 1389 | - } | |
| 1390 | - return keys; | |
| 1391 | -}; | |
| 1392 | - | |
| 1393 | -// Merge data handle with data form. | |
| 1394 | -const mergeDataWithDatForm = (elForm, dataHandle) => { | |
| 1395 | - const dataForm = getDataOfForm(elForm); | |
| 1396 | - const keys = getFieldKeysOfForm(elForm); | |
| 1397 | - keys.forEach(key => { | |
| 1398 | - if (!dataForm.hasOwnProperty(key)) { | |
| 1399 | - delete dataHandle[key]; | |
| 1400 | - } else if (dataForm[key][0] === '') { | |
| 1401 | - delete dataForm[key]; | |
| 1402 | - delete dataHandle[key]; | |
| 1403 | - } | |
| 1404 | - }); | |
| 1405 | - dataHandle = { | |
| 1406 | - ...dataHandle, | |
| 1407 | - ...dataForm | |
| 1408 | - }; | |
| 1409 | - return dataHandle; | |
| 1410 | -}; | |
| 1411 | - | |
| 1412 | -/** | |
| 1413 | - * Event trigger | |
| 1414 | - * For each list of event handlers, listen event on document. | |
| 1415 | - * | |
| 1416 | - * eventName: 'click', 'change', ... | |
| 1417 | - * eventHandlers = [ { selector: '.lp-button', callBack: function(){}, class: object } ] | |
| 1418 | - * | |
| 1419 | - * @param eventName | |
| 1420 | - * @param eventHandlers | |
| 1421 | - */ | |
| 1422 | -const eventHandlers = (eventName, eventHandlers) => { | |
| 1423 | - document.addEventListener(eventName, e => { | |
| 1424 | - const target = e.target; | |
| 1425 | - let args = { | |
| 1426 | - e, | |
| 1427 | - target | |
| 1428 | - }; | |
| 1429 | - eventHandlers.forEach(eventHandler => { | |
| 1430 | - args = { | |
| 1431 | - ...args, | |
| 1432 | - ...eventHandler | |
| 1433 | - }; | |
| 1434 | - | |
| 1435 | - //console.log( args ); | |
| 1436 | - | |
| 1437 | - // Check condition before call back | |
| 1438 | - if (eventHandler.conditionBeforeCallBack) { | |
| 1439 | - if (eventHandler.conditionBeforeCallBack(args) !== true) { | |
| 1440 | - return; | |
| 1441 | - } | |
| 1442 | - } | |
| 1443 | - | |
| 1444 | - // Special check for keydown event with checkIsEventEnter = true | |
| 1445 | - if (eventName === 'keydown' && eventHandler.checkIsEventEnter) { | |
| 1446 | - if (e.key !== 'Enter') { | |
| 1447 | - return; | |
| 1448 | - } | |
| 1449 | - } | |
| 1450 | - if (target.closest(eventHandler.selector)) { | |
| 1451 | - if (eventHandler.class) { | |
| 1452 | - // Call method of class, function callBack will understand exactly {this} is class object. | |
| 1453 | - eventHandler.class[eventHandler.callBack](args); | |
| 1454 | - } else { | |
| 1455 | - // For send args is objected, {this} is eventHandler object, not class object. | |
| 1456 | - eventHandler.callBack(args); | |
| 1457 | - } | |
| 1458 | - } | |
| 1459 | - }); | |
| 1460 | - }); | |
| 1461 | -}; | |
| 1462 | - | |
| 1463 | -/** | |
| 1464 | - * Debounce - delays function execution until after `wait` ms of inactivity. | |
| 1465 | - * | |
| 1466 | - * Each call resets the timer. Only the last call in a burst executes. | |
| 1467 | - * | |
| 1468 | - * USE CASES: | |
| 1469 | - * - Search inputs, form validation, window resize | |
| 1470 | - * - Multiple elements need independent timers | |
| 1471 | - * - When you need to call with different arguments | |
| 1472 | - * | |
| 1473 | - * EXAMPLES: | |
| 1474 | - * const debouncedSearch = debounce( (query) => fetchResults(query), 300 ); | |
| 1475 | - * searchInput.addEventListener('input', (e) => debouncedSearch(e.target.value)); | |
| 1476 | - * | |
| 1477 | - * const debouncedResize = debounce( recalculateLayout, 250 ); | |
| 1478 | - * window.addEventListener('resize', debouncedResize); | |
| 1479 | - * | |
| 1480 | - * ⚠️ Create ONCE outside event handlers, not inside. | |
| 1481 | - * | |
| 1482 | - * @param {Function} func - Function to debounce (can be anonymous) | |
| 1483 | - * @param {number} wait - Milliseconds to wait (default: 500) | |
| 1484 | - * @return {Function} Debounced wrapper function | |
| 1485 | - * @since 4.3.7 | |
| 1486 | - * @version 1.0.0 | |
| 1487 | - */ | |
| 1488 | -const debounce = (func, wait = 500) => { | |
| 1489 | - let timer; | |
| 1490 | - return args => { | |
| 1491 | - clearTimeout(timer); | |
| 1492 | - timer = setTimeout(() => func(args), wait); | |
| 1493 | - }; | |
| 1494 | -}; | |
| 1495 | - | |
| 1496 | -/** | |
| 1497 | - * Initialize lp-toggle-enable components. | |
| 1498 | - * | |
| 1499 | - * Finds all `.lp-toggle-enable` elements and wires up toggle behavior. | |
| 1500 | - * Reads initial state from `data-enabled` attribute ("true"/"false"). | |
| 1501 | - * Calls `data-on-toggle` callback (if provided via options) on state change. | |
| 1502 | - * | |
| 1503 | - * HTML structure: | |
| 1504 | - * <label class="lp-toggle-enable" data-enabled="true"> | |
| 1505 | - * <input type="checkbox" class="lp-toggle-enable__input" /> | |
| 1506 | - * <span class="lp-toggle-enable__track"></span> | |
| 1507 | - * </label> | |
| 1508 | - * | |
| 1509 | - * @param {string} selector CSS selector for toggle elements (default: '.lp-toggle-enable') | |
| 1510 | - * @param {Function} onToggle Optional callback( el, isEnabled ) called on state change | |
| 1511 | - * @since 4.4.5 | |
| 1512 | - * @version 1.0.0 | |
| 1513 | - */ | |
| 1514 | -window.lpToggleEnableInit = 0; | |
| 1515 | -const toggleEnable = (onToggle = null) => { | |
| 1516 | - if (window.lpToggleEnableInit) { | |
| 1517 | - return; | |
| 1518 | - } | |
| 1519 | - window.lpToggleEnableInit = 1; | |
| 1520 | - const selector = '.lp-toggle-enable'; | |
| 1521 | - const updateUI = (toggle, isEnabled) => { | |
| 1522 | - toggle.classList.toggle('is-enabled', isEnabled); | |
| 1523 | - const input = toggle.querySelector('.lp-toggle-enable__input'); | |
| 1524 | - if (input) { | |
| 1525 | - input.checked = isEnabled; | |
| 1526 | - input.value = isEnabled ? '1' : '0'; | |
| 1527 | - } | |
| 1528 | - }; | |
| 1529 | - | |
| 1530 | - // Delegate click handling via eventHandlers. | |
| 1531 | - eventHandlers('click', [{ | |
| 1532 | - selector, | |
| 1533 | - callBack: args => { | |
| 1534 | - const { | |
| 1535 | - e, | |
| 1536 | - target | |
| 1537 | - } = args; | |
| 1538 | - const toggle = target.closest(selector); | |
| 1539 | - if (!toggle || toggle.classList.contains('is-disabled')) { | |
| 1540 | - return; | |
| 1541 | - } | |
| 1542 | - e.preventDefault(); | |
| 1543 | - const isEnabled = !toggle.classList.contains('is-enabled'); | |
| 1544 | - updateUI(toggle, isEnabled); | |
| 1545 | - if ('function' === typeof onToggle) { | |
| 1546 | - onToggle(toggle, isEnabled); | |
| 1547 | - } | |
| 1548 | - } | |
| 1549 | - }]); | |
| 1550 | -}; | |
| 1551 | - | |
| 1552 | -/** | |
| 1553 | - * Initialize custom fullscreen view buttons. | |
| 1554 | - * | |
| 1555 | - * Delegates clicks on `.lp-btn-full-screen-view` buttons to | |
| 1556 | - * `lpToggleFullscreenView`. Reads the `data-target` attribute to find the | |
| 1557 | - * target element. Falls back to the button's parent element when | |
| 1558 | - * `data-target` is not provided. | |
| 1559 | - * | |
| 1560 | - * @since 4.4.5 | |
| 1561 | - * @version 1.0.0 | |
| 1562 | - */ | |
| 1563 | -window.lpFullScreenViewInit = 0; | |
| 1564 | -const fullScreenView = () => { | |
| 1565 | - if (window.lpFullScreenViewInit) { | |
| 1566 | - return; | |
| 1567 | - } | |
| 1568 | - window.lpFullScreenViewInit = 1; | |
| 1569 | - let lastScrollY = 0; | |
| 1570 | - const lpToggleFullscreenView = (elTarget, elBtnFullScreen = null) => { | |
| 1571 | - const isFullscreen = elTarget.classList.contains(lpClassName.elFullScreen); | |
| 1572 | - if (isFullscreen) { | |
| 1573 | - elTarget.classList.remove(lpClassName.elFullScreen); | |
| 1574 | - document.documentElement.classList.remove('lp-full-screen-active'); | |
| 1575 | - window.scrollTo(0, lastScrollY); | |
| 1576 | - } else { | |
| 1577 | - lastScrollY = window.scrollY; | |
| 1578 | - elTarget.classList.add(lpClassName.elFullScreen); | |
| 1579 | - document.documentElement.classList.add('lp-full-screen-active'); | |
| 1580 | - } | |
| 1581 | - if (!isFullscreen) { | |
| 1582 | - if (!elTarget.querySelector(`.${lpClassName.elBtnFullScreenClose}`)) { | |
| 1583 | - const closeButton = document.createElement('button'); | |
| 1584 | - closeButton.type = 'button'; | |
| 1585 | - closeButton.className = lpClassName.elBtnFullScreenClose; | |
| 1586 | - closeButton.setAttribute('aria-label', 'Close'); | |
| 1587 | - closeButton.innerHTML = lpData.i18n.closeButtonFullScreen || 'Close ×'; | |
| 1588 | - closeButton.addEventListener('click', e => { | |
| 1589 | - e.preventDefault(); | |
| 1590 | - lpToggleFullscreenView(elTarget); | |
| 1591 | - }); | |
| 1592 | - elTarget.appendChild(closeButton); | |
| 1593 | - } | |
| 1594 | - } else { | |
| 1595 | - const closeButton = elTarget.querySelector(`.${lpClassName.elBtnFullScreenClose}`); | |
| 1596 | - if (closeButton) { | |
| 1597 | - closeButton.remove(); | |
| 1598 | - } | |
| 1599 | - } | |
| 1600 | - }; | |
| 1601 | - eventHandlers('click', [{ | |
| 1602 | - selector: lpClassName.elBtnFullScreen, | |
| 1603 | - callBack: args => { | |
| 1604 | - const { | |
| 1605 | - e, | |
| 1606 | - target | |
| 1607 | - } = args; | |
| 1608 | - const elBtnFullScreen = target.closest(lpClassName.elBtnFullScreen); | |
| 1609 | - if (!elBtnFullScreen) { | |
| 1610 | - console.log('No full screen button found'); | |
| 1611 | - return; | |
| 1612 | - } | |
| 1613 | - e.preventDefault(); | |
| 1614 | - let elTarget = null; | |
| 1615 | - const targetSelector = elBtnFullScreen.dataset.targetFullscreen; | |
| 1616 | - console.log(targetSelector); | |
| 1617 | - if (targetSelector) { | |
| 1618 | - elTarget = document.querySelector(targetSelector); | |
| 1619 | - } | |
| 1620 | - if (!elTarget) { | |
| 1621 | - console.log('No target element found'); | |
| 1622 | - return; | |
| 1623 | - } | |
| 1624 | - lpToggleFullscreenView(elTarget, elBtnFullScreen); | |
| 1625 | - } | |
| 1626 | - }]); | |
| 1627 | -}; | |
| 1628 | - | |
| 1629 | -/***/ }, | |
| 1630 | - | |
| 1631 | -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/toastify-js/src/toastify.css" | |
| 1632 | -/*!*****************************************************************************************!*\ | |
| 1633 | - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/toastify-js/src/toastify.css ***! | |
| 1634 | - \*****************************************************************************************/ | |
| 1635 | -(module, __webpack_exports__, __webpack_require__) { | |
| 1636 | - | |
| 1637 | -"use strict"; | |
| 1638 | -__webpack_require__.r(__webpack_exports__); | |
| 1639 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1640 | -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 1641 | -/* harmony export */ }); | |
| 1642 | -/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js"); | |
| 1643 | -/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); | |
| 1644 | -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); | |
| 1645 | -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); | |
| 1646 | -// Imports | |
| 1647 | - | |
| 1648 | - | |
| 1649 | -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); | |
| 1650 | -// Module | |
| 1651 | -___CSS_LOADER_EXPORT___.push([module.id, `/*! | |
| 1652 | - * Toastify js 1.12.0 | |
| 1653 | - * https://github.com/apvarun/toastify-js | |
| 1654 | - * @license MIT licensed | |
| 1655 | - * | |
| 1656 | - * Copyright (C) 2018 Varun A P | |
| 1657 | - */ | |
| 1658 | - | |
| 1659 | -.toastify { | |
| 1660 | - padding: 12px 20px; | |
| 1661 | - color: #ffffff; | |
| 1662 | - display: inline-block; | |
| 1663 | - box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3); | |
| 1664 | - background: -webkit-linear-gradient(315deg, #73a5ff, #5477f5); | |
| 1665 | - background: linear-gradient(135deg, #73a5ff, #5477f5); | |
| 1666 | - position: fixed; | |
| 1667 | - opacity: 0; | |
| 1668 | - transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1); | |
| 1669 | - border-radius: 2px; | |
| 1670 | - cursor: pointer; | |
| 1671 | - text-decoration: none; | |
| 1672 | - max-width: calc(50% - 20px); | |
| 1673 | - z-index: 2147483647; | |
| 1674 | -} | |
| 1675 | - | |
| 1676 | -.toastify.on { | |
| 1677 | - opacity: 1; | |
| 1678 | -} | |
| 1679 | - | |
| 1680 | -.toast-close { | |
| 1681 | - background: transparent; | |
| 1682 | - border: 0; | |
| 1683 | - color: white; | |
| 1684 | - cursor: pointer; | |
| 1685 | - font-family: inherit; | |
| 1686 | - font-size: 1em; | |
| 1687 | - opacity: 0.4; | |
| 1688 | - padding: 0 5px; | |
| 1689 | -} | |
| 1690 | - | |
| 1691 | -.toastify-right { | |
| 1692 | - right: 15px; | |
| 1693 | -} | |
| 1694 | - | |
| 1695 | -.toastify-left { | |
| 1696 | - left: 15px; | |
| 1697 | -} | |
| 1698 | - | |
| 1699 | -.toastify-top { | |
| 1700 | - top: -150px; | |
| 1701 | -} | |
| 1702 | - | |
| 1703 | -.toastify-bottom { | |
| 1704 | - bottom: -150px; | |
| 1705 | -} | |
| 1706 | - | |
| 1707 | -.toastify-rounded { | |
| 1708 | - border-radius: 25px; | |
| 1709 | -} | |
| 1710 | - | |
| 1711 | -.toastify-avatar { | |
| 1712 | - width: 1.5em; | |
| 1713 | - height: 1.5em; | |
| 1714 | - margin: -7px 5px; | |
| 1715 | - border-radius: 2px; | |
| 1716 | -} | |
| 1717 | - | |
| 1718 | -.toastify-center { | |
| 1719 | - margin-left: auto; | |
| 1720 | - margin-right: auto; | |
| 1721 | - left: 0; | |
| 1722 | - right: 0; | |
| 1723 | - max-width: fit-content; | |
| 1724 | - max-width: -moz-fit-content; | |
| 1725 | -} | |
| 1726 | - | |
| 1727 | -@media only screen and (max-width: 360px) { | |
| 1728 | - .toastify-right, .toastify-left { | |
| 1729 | - margin-left: auto; | |
| 1730 | - margin-right: auto; | |
| 1731 | - left: 0; | |
| 1732 | - right: 0; | |
| 1733 | - max-width: fit-content; | |
| 1734 | - } | |
| 1735 | -} | |
| 1736 | -`, "",{"version":3,"sources":["webpack://./node_modules/toastify-js/src/toastify.css"],"names":[],"mappings":"AAAA;;;;;;EAME;;AAEF;IACI,kBAAkB;IAClB,cAAc;IACd,qBAAqB;IACrB,uFAAuF;IACvF,6DAA6D;IAC7D,qDAAqD;IACrD,eAAe;IACf,UAAU;IACV,wDAAwD;IACxD,kBAAkB;IAClB,eAAe;IACf,qBAAqB;IACrB,2BAA2B;IAC3B,mBAAmB;AACvB;;AAEA;IACI,UAAU;AACd;;AAEA;IACI,uBAAuB;IACvB,SAAS;IACT,YAAY;IACZ,eAAe;IACf,oBAAoB;IACpB,cAAc;IACd,YAAY;IACZ,cAAc;AAClB;;AAEA;IACI,WAAW;AACf;;AAEA;IACI,UAAU;AACd;;AAEA;IACI,WAAW;AACf;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,YAAY;IACZ,aAAa;IACb,gBAAgB;IAChB,kBAAkB;AACtB;;AAEA;IACI,iBAAiB;IACjB,kBAAkB;IAClB,OAAO;IACP,QAAQ;IACR,sBAAsB;IACtB,2BAA2B;AAC/B;;AAEA;IACI;QACI,iBAAiB;QACjB,kBAAkB;QAClB,OAAO;QACP,QAAQ;QACR,sBAAsB;IAC1B;AACJ","sourcesContent":["/*!\n * Toastify js 1.12.0\n * https://github.com/apvarun/toastify-js\n * @license MIT licensed\n *\n * Copyright (C) 2018 Varun A P\n */\n\n.toastify {\n padding: 12px 20px;\n color: #ffffff;\n display: inline-block;\n box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3);\n background: -webkit-linear-gradient(315deg, #73a5ff, #5477f5);\n background: linear-gradient(135deg, #73a5ff, #5477f5);\n position: fixed;\n opacity: 0;\n transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);\n border-radius: 2px;\n cursor: pointer;\n text-decoration: none;\n max-width: calc(50% - 20px);\n z-index: 2147483647;\n}\n\n.toastify.on {\n opacity: 1;\n}\n\n.toast-close {\n background: transparent;\n border: 0;\n color: white;\n cursor: pointer;\n font-family: inherit;\n font-size: 1em;\n opacity: 0.4;\n padding: 0 5px;\n}\n\n.toastify-right {\n right: 15px;\n}\n\n.toastify-left {\n left: 15px;\n}\n\n.toastify-top {\n top: -150px;\n}\n\n.toastify-bottom {\n bottom: -150px;\n}\n\n.toastify-rounded {\n border-radius: 25px;\n}\n\n.toastify-avatar {\n width: 1.5em;\n height: 1.5em;\n margin: -7px 5px;\n border-radius: 2px;\n}\n\n.toastify-center {\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n max-width: fit-content;\n max-width: -moz-fit-content;\n}\n\n@media only screen and (max-width: 360px) {\n .toastify-right, .toastify-left {\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n max-width: fit-content;\n }\n}\n"],"sourceRoot":""}]); | |
| 1737 | -// Exports | |
| 1738 | -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); | |
| 1739 | - | |
| 1740 | - | |
| 1741 | -/***/ }, | |
| 1742 | - | |
| 1743 | -/***/ "./node_modules/css-loader/dist/runtime/api.js" | |
| 1744 | -/*!*****************************************************!*\ | |
| 1745 | - !*** ./node_modules/css-loader/dist/runtime/api.js ***! | |
| 1746 | - \*****************************************************/ | |
| 1747 | -(module) { | |
| 1748 | - | |
| 1749 | -"use strict"; | |
| 1750 | - | |
| 1751 | - | |
| 1752 | -/* | |
| 1753 | - MIT License http://www.opensource.org/licenses/mit-license.php | |
| 1754 | - Author Tobias Koppers @sokra | |
| 1755 | -*/ | |
| 1756 | -module.exports = function (cssWithMappingToString) { | |
| 1757 | - var list = []; | |
| 1758 | - | |
| 1759 | - // return the list of modules as css string | |
| 1760 | - list.toString = function toString() { | |
| 1761 | - return this.map(function (item) { | |
| 1762 | - var content = ""; | |
| 1763 | - var needLayer = typeof item[5] !== "undefined"; | |
| 1764 | - if (item[4]) { | |
| 1765 | - content += "@supports (".concat(item[4], ") {"); | |
| 1766 | - } | |
| 1767 | - if (item[2]) { | |
| 1768 | - content += "@media ".concat(item[2], " {"); | |
| 1769 | - } | |
| 1770 | - if (needLayer) { | |
| 1771 | - content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {"); | |
| 1772 | - } | |
| 1773 | - content += cssWithMappingToString(item); | |
| 1774 | - if (needLayer) { | |
| 1775 | - content += "}"; | |
| 1776 | - } | |
| 1777 | - if (item[2]) { | |
| 1778 | - content += "}"; | |
| 1779 | - } | |
| 1780 | - if (item[4]) { | |
| 1781 | - content += "}"; | |
| 1782 | - } | |
| 1783 | - return content; | |
| 1784 | - }).join(""); | |
| 1785 | - }; | |
| 1786 | - | |
| 1787 | - // import a list of modules into the list | |
| 1788 | - list.i = function i(modules, media, dedupe, supports, layer) { | |
| 1789 | - if (typeof modules === "string") { | |
| 1790 | - modules = [[null, modules, undefined]]; | |
| 1791 | - } | |
| 1792 | - var alreadyImportedModules = {}; | |
| 1793 | - if (dedupe) { | |
| 1794 | - for (var k = 0; k < this.length; k++) { | |
| 1795 | - var id = this[k][0]; | |
| 1796 | - if (id != null) { | |
| 1797 | - alreadyImportedModules[id] = true; | |
| 1798 | - } | |
| 1799 | - } | |
| 1800 | - } | |
| 1801 | - for (var _k = 0; _k < modules.length; _k++) { | |
| 1802 | - var item = [].concat(modules[_k]); | |
| 1803 | - if (dedupe && alreadyImportedModules[item[0]]) { | |
| 1804 | - continue; | |
| 1805 | - } | |
| 1806 | - if (typeof layer !== "undefined") { | |
| 1807 | - if (typeof item[5] === "undefined") { | |
| 1808 | - item[5] = layer; | |
| 1809 | - } else { | |
| 1810 | - item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}"); | |
| 1811 | - item[5] = layer; | |
| 1812 | - } | |
| 1813 | - } | |
| 1814 | - if (media) { | |
| 1815 | - if (!item[2]) { | |
| 1816 | - item[2] = media; | |
| 1817 | - } else { | |
| 1818 | - item[1] = "@media ".concat(item[2], " {").concat(item[1], "}"); | |
| 1819 | - item[2] = media; | |
| 1820 | - } | |
| 1821 | - } | |
| 1822 | - if (supports) { | |
| 1823 | - if (!item[4]) { | |
| 1824 | - item[4] = "".concat(supports); | |
| 1825 | - } else { | |
| 1826 | - item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}"); | |
| 1827 | - item[4] = supports; | |
| 1828 | - } | |
| 1829 | - } | |
| 1830 | - list.push(item); | |
| 1831 | - } | |
| 1832 | - }; | |
| 1833 | - return list; | |
| 1834 | -}; | |
| 1835 | - | |
| 1836 | -/***/ }, | |
| 1837 | - | |
| 1838 | -/***/ "./node_modules/css-loader/dist/runtime/sourceMaps.js" | |
| 1839 | -/*!************************************************************!*\ | |
| 1840 | - !*** ./node_modules/css-loader/dist/runtime/sourceMaps.js ***! | |
| 1841 | - \************************************************************/ | |
| 1842 | -(module) { | |
| 1843 | - | |
| 1844 | -"use strict"; | |
| 1845 | - | |
| 1846 | - | |
| 1847 | -module.exports = function (item) { | |
| 1848 | - var content = item[1]; | |
| 1849 | - var cssMapping = item[3]; | |
| 1850 | - if (!cssMapping) { | |
| 1851 | - return content; | |
| 1852 | - } | |
| 1853 | - if (typeof btoa === "function") { | |
| 1854 | - var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping)))); | |
| 1855 | - var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64); | |
| 1856 | - var sourceMapping = "/*# ".concat(data, " */"); | |
| 1857 | - return [content].concat([sourceMapping]).join("\n"); | |
| 1858 | - } | |
| 1859 | - return [content].join("\n"); | |
| 1860 | -}; | |
| 1861 | - | |
| 1862 | -/***/ }, | |
| 1863 | - | |
| 1864 | -/***/ "./node_modules/toastify-js/src/toastify.css" | |
| 1865 | -/*!***************************************************!*\ | |
| 1866 | - !*** ./node_modules/toastify-js/src/toastify.css ***! | |
| 1867 | - \***************************************************/ | |
| 1868 | -(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1869 | - | |
| 1870 | -"use strict"; | |
| 1871 | -__webpack_require__.r(__webpack_exports__); | |
| 1872 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1873 | -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 1874 | -/* harmony export */ }); | |
| 1875 | -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); | |
| 1876 | -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); | |
| 1877 | -/* harmony import */ var _style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js"); | |
| 1878 | -/* harmony import */ var _style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__); | |
| 1879 | -/* harmony import */ var _style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js"); | |
| 1880 | -/* harmony import */ var _style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__); | |
| 1881 | -/* harmony import */ var _style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"); | |
| 1882 | -/* harmony import */ var _style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__); | |
| 1883 | -/* harmony import */ var _style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js"); | |
| 1884 | -/* harmony import */ var _style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__); | |
| 1885 | -/* harmony import */ var _style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js"); | |
| 1886 | -/* harmony import */ var _style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__); | |
| 1887 | -/* harmony import */ var _css_loader_dist_cjs_js_toastify_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../css-loader/dist/cjs.js!./toastify.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/toastify-js/src/toastify.css"); | |
| 1888 | - | |
| 1889 | - | |
| 1890 | - | |
| 1891 | - | |
| 1892 | - | |
| 1893 | - | |
| 1894 | - | |
| 1895 | - | |
| 1896 | - | |
| 1897 | - | |
| 1898 | - | |
| 1899 | -var options = {}; | |
| 1900 | - | |
| 1901 | -options.styleTagTransform = (_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default()); | |
| 1902 | -options.setAttributes = (_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default()); | |
| 1903 | - | |
| 1904 | - options.insert = _style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head"); | |
| 1905 | - | |
| 1906 | -options.domAPI = (_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default()); | |
| 1907 | -options.insertStyleElement = (_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default()); | |
| 1908 | - | |
| 1909 | -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_toastify_css__WEBPACK_IMPORTED_MODULE_6__["default"], options); | |
| 1910 | - | |
| 1911 | - | |
| 1912 | - | |
| 1913 | - | |
| 1914 | - /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_toastify_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _css_loader_dist_cjs_js_toastify_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _css_loader_dist_cjs_js_toastify_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined); | |
| 1915 | - | |
| 1916 | - | |
| 1917 | -/***/ }, | |
| 1918 | - | |
| 1919 | -/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js" | |
| 1920 | -/*!****************************************************************************!*\ | |
| 1921 | - !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! | |
| 1922 | - \****************************************************************************/ | |
| 1923 | -(module) { | |
| 1924 | - | |
| 1925 | -"use strict"; | |
| 1926 | - | |
| 1927 | - | |
| 1928 | -var stylesInDOM = []; | |
| 1929 | -function getIndexByIdentifier(identifier) { | |
| 1930 | - var result = -1; | |
| 1931 | - for (var i = 0; i < stylesInDOM.length; i++) { | |
| 1932 | - if (stylesInDOM[i].identifier === identifier) { | |
| 1933 | - result = i; | |
| 1934 | - break; | |
| 1935 | - } | |
| 1936 | - } | |
| 1937 | - return result; | |
| 1938 | -} | |
| 1939 | -function modulesToDom(list, options) { | |
| 1940 | - var idCountMap = {}; | |
| 1941 | - var identifiers = []; | |
| 1942 | - for (var i = 0; i < list.length; i++) { | |
| 1943 | - var item = list[i]; | |
| 1944 | - var id = options.base ? item[0] + options.base : item[0]; | |
| 1945 | - var count = idCountMap[id] || 0; | |
| 1946 | - var identifier = "".concat(id, " ").concat(count); | |
| 1947 | - idCountMap[id] = count + 1; | |
| 1948 | - var indexByIdentifier = getIndexByIdentifier(identifier); | |
| 1949 | - var obj = { | |
| 1950 | - css: item[1], | |
| 1951 | - media: item[2], | |
| 1952 | - sourceMap: item[3], | |
| 1953 | - supports: item[4], | |
| 1954 | - layer: item[5] | |
| 1955 | - }; | |
| 1956 | - if (indexByIdentifier !== -1) { | |
| 1957 | - stylesInDOM[indexByIdentifier].references++; | |
| 1958 | - stylesInDOM[indexByIdentifier].updater(obj); | |
| 1959 | - } else { | |
| 1960 | - var updater = addElementStyle(obj, options); | |
| 1961 | - options.byIndex = i; | |
| 1962 | - stylesInDOM.splice(i, 0, { | |
| 1963 | - identifier: identifier, | |
| 1964 | - updater: updater, | |
| 1965 | - references: 1 | |
| 1966 | - }); | |
| 1967 | - } | |
| 1968 | - identifiers.push(identifier); | |
| 1969 | - } | |
| 1970 | - return identifiers; | |
| 1971 | -} | |
| 1972 | -function addElementStyle(obj, options) { | |
| 1973 | - var api = options.domAPI(options); | |
| 1974 | - api.update(obj); | |
| 1975 | - var updater = function updater(newObj) { | |
| 1976 | - if (newObj) { | |
| 1977 | - if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) { | |
| 1978 | - return; | |
| 1979 | - } | |
| 1980 | - api.update(obj = newObj); | |
| 1981 | - } else { | |
| 1982 | - api.remove(); | |
| 1983 | - } | |
| 1984 | - }; | |
| 1985 | - return updater; | |
| 1986 | -} | |
| 1987 | -module.exports = function (list, options) { | |
| 1988 | - options = options || {}; | |
| 1989 | - list = list || []; | |
| 1990 | - var lastIdentifiers = modulesToDom(list, options); | |
| 1991 | - return function update(newList) { | |
| 1992 | - newList = newList || []; | |
| 1993 | - for (var i = 0; i < lastIdentifiers.length; i++) { | |
| 1994 | - var identifier = lastIdentifiers[i]; | |
| 1995 | - var index = getIndexByIdentifier(identifier); | |
| 1996 | - stylesInDOM[index].references--; | |
| 1997 | - } | |
| 1998 | - var newLastIdentifiers = modulesToDom(newList, options); | |
| 1999 | - for (var _i = 0; _i < lastIdentifiers.length; _i++) { | |
| 2000 | - var _identifier = lastIdentifiers[_i]; | |
| 2001 | - var _index = getIndexByIdentifier(_identifier); | |
| 2002 | - if (stylesInDOM[_index].references === 0) { | |
| 2003 | - stylesInDOM[_index].updater(); | |
| 2004 | - stylesInDOM.splice(_index, 1); | |
| 2005 | - } | |
| 2006 | - } | |
| 2007 | - lastIdentifiers = newLastIdentifiers; | |
| 2008 | - }; | |
| 2009 | -}; | |
| 2010 | - | |
| 2011 | -/***/ }, | |
| 2012 | - | |
| 2013 | -/***/ "./node_modules/style-loader/dist/runtime/insertBySelector.js" | |
| 2014 | -/*!********************************************************************!*\ | |
| 2015 | - !*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***! | |
| 2016 | - \********************************************************************/ | |
| 2017 | -(module) { | |
| 2018 | - | |
| 2019 | -"use strict"; | |
| 2020 | - | |
| 2021 | - | |
| 2022 | -var memo = {}; | |
| 2023 | - | |
| 2024 | -/* istanbul ignore next */ | |
| 2025 | -function getTarget(target) { | |
| 2026 | - if (typeof memo[target] === "undefined") { | |
| 2027 | - var styleTarget = document.querySelector(target); | |
| 2028 | - | |
| 2029 | - // Special case to return head of iframe instead of iframe itself | |
| 2030 | - if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { | |
| 2031 | - try { | |
| 2032 | - // This will throw an exception if access to iframe is blocked | |
| 2033 | - // due to cross-origin restrictions | |
| 2034 | - styleTarget = styleTarget.contentDocument.head; | |
| 2035 | - } catch (e) { | |
| 2036 | - // istanbul ignore next | |
| 2037 | - styleTarget = null; | |
| 2038 | - } | |
| 2039 | - } | |
| 2040 | - memo[target] = styleTarget; | |
| 2041 | - } | |
| 2042 | - return memo[target]; | |
| 2043 | -} | |
| 2044 | - | |
| 2045 | -/* istanbul ignore next */ | |
| 2046 | -function insertBySelector(insert, style) { | |
| 2047 | - var target = getTarget(insert); | |
| 2048 | - if (!target) { | |
| 2049 | - throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); | |
| 2050 | - } | |
| 2051 | - target.appendChild(style); | |
| 2052 | -} | |
| 2053 | -module.exports = insertBySelector; | |
| 2054 | - | |
| 2055 | -/***/ }, | |
| 2056 | - | |
| 2057 | -/***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js" | |
| 2058 | -/*!**********************************************************************!*\ | |
| 2059 | - !*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***! | |
| 2060 | - \**********************************************************************/ | |
| 2061 | -(module) { | |
| 2062 | - | |
| 2063 | -"use strict"; | |
| 2064 | - | |
| 2065 | - | |
| 2066 | -/* istanbul ignore next */ | |
| 2067 | -function insertStyleElement(options) { | |
| 2068 | - var element = document.createElement("style"); | |
| 2069 | - options.setAttributes(element, options.attributes); | |
| 2070 | - options.insert(element, options.options); | |
| 2071 | - return element; | |
| 2072 | -} | |
| 2073 | -module.exports = insertStyleElement; | |
| 2074 | - | |
| 2075 | -/***/ }, | |
| 2076 | - | |
| 2077 | -/***/ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js" | |
| 2078 | -/*!**********************************************************************************!*\ | |
| 2079 | - !*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***! | |
| 2080 | - \**********************************************************************************/ | |
| 2081 | -(module, __unused_webpack_exports, __webpack_require__) { | |
| 2082 | - | |
| 2083 | -"use strict"; | |
| 2084 | - | |
| 2085 | - | |
| 2086 | -/* istanbul ignore next */ | |
| 2087 | -function setAttributesWithoutAttributes(styleElement) { | |
| 2088 | - var nonce = true ? __webpack_require__.nc : 0; | |
| 2089 | - if (nonce) { | |
| 2090 | - styleElement.setAttribute("nonce", nonce); | |
| 2091 | - } | |
| 2092 | -} | |
| 2093 | -module.exports = setAttributesWithoutAttributes; | |
| 2094 | - | |
| 2095 | -/***/ }, | |
| 2096 | - | |
| 2097 | -/***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js" | |
| 2098 | -/*!***************************************************************!*\ | |
| 2099 | - !*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***! | |
| 2100 | - \***************************************************************/ | |
| 2101 | -(module) { | |
| 2102 | - | |
| 2103 | -"use strict"; | |
| 2104 | - | |
| 2105 | - | |
| 2106 | -/* istanbul ignore next */ | |
| 2107 | -function apply(styleElement, options, obj) { | |
| 2108 | - var css = ""; | |
| 2109 | - if (obj.supports) { | |
| 2110 | - css += "@supports (".concat(obj.supports, ") {"); | |
| 2111 | - } | |
| 2112 | - if (obj.media) { | |
| 2113 | - css += "@media ".concat(obj.media, " {"); | |
| 2114 | - } | |
| 2115 | - var needLayer = typeof obj.layer !== "undefined"; | |
| 2116 | - if (needLayer) { | |
| 2117 | - css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {"); | |
| 2118 | - } | |
| 2119 | - css += obj.css; | |
| 2120 | - if (needLayer) { | |
| 2121 | - css += "}"; | |
| 2122 | - } | |
| 2123 | - if (obj.media) { | |
| 2124 | - css += "}"; | |
| 2125 | - } | |
| 2126 | - if (obj.supports) { | |
| 2127 | - css += "}"; | |
| 2128 | - } | |
| 2129 | - var sourceMap = obj.sourceMap; | |
| 2130 | - if (sourceMap && typeof btoa !== "undefined") { | |
| 2131 | - css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); | |
| 2132 | - } | |
| 2133 | - | |
| 2134 | - // For old IE | |
| 2135 | - /* istanbul ignore if */ | |
| 2136 | - options.styleTagTransform(css, styleElement, options.options); | |
| 2137 | -} | |
| 2138 | -function removeStyleElement(styleElement) { | |
| 2139 | - // istanbul ignore if | |
| 2140 | - if (styleElement.parentNode === null) { | |
| 2141 | - return false; | |
| 2142 | - } | |
| 2143 | - styleElement.parentNode.removeChild(styleElement); | |
| 2144 | -} | |
| 2145 | - | |
| 2146 | -/* istanbul ignore next */ | |
| 2147 | -function domAPI(options) { | |
| 2148 | - if (typeof document === "undefined") { | |
| 2149 | - return { | |
| 2150 | - update: function update() {}, | |
| 2151 | - remove: function remove() {} | |
| 2152 | - }; | |
| 2153 | - } | |
| 2154 | - var styleElement = options.insertStyleElement(options); | |
| 2155 | - return { | |
| 2156 | - update: function update(obj) { | |
| 2157 | - apply(styleElement, options, obj); | |
| 2158 | - }, | |
| 2159 | - remove: function remove() { | |
| 2160 | - removeStyleElement(styleElement); | |
| 2161 | - } | |
| 2162 | - }; | |
| 2163 | -} | |
| 2164 | -module.exports = domAPI; | |
| 2165 | - | |
| 2166 | -/***/ }, | |
| 2167 | - | |
| 2168 | -/***/ "./node_modules/style-loader/dist/runtime/styleTagTransform.js" | |
| 2169 | -/*!*********************************************************************!*\ | |
| 2170 | - !*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***! | |
| 2171 | - \*********************************************************************/ | |
| 2172 | -(module) { | |
| 2173 | - | |
| 2174 | -"use strict"; | |
| 2175 | - | |
| 2176 | - | |
| 2177 | -/* istanbul ignore next */ | |
| 2178 | -function styleTagTransform(css, styleElement) { | |
| 2179 | - if (styleElement.styleSheet) { | |
| 2180 | - styleElement.styleSheet.cssText = css; | |
| 2181 | - } else { | |
| 2182 | - while (styleElement.firstChild) { | |
| 2183 | - styleElement.removeChild(styleElement.firstChild); | |
| 2184 | - } | |
| 2185 | - styleElement.appendChild(document.createTextNode(css)); | |
| 2186 | - } | |
| 2187 | -} | |
| 2188 | -module.exports = styleTagTransform; | |
| 2189 | - | |
| 2190 | -/***/ }, | |
| 2191 | - | |
| 2192 | -/***/ "./node_modules/toastify-js/src/toastify.js" | |
| 2193 | -/*!**************************************************!*\ | |
| 2194 | - !*** ./node_modules/toastify-js/src/toastify.js ***! | |
| 2195 | - \**************************************************/ | |
| 2196 | -(module) { | |
| 2197 | - | |
| 2198 | -/*! | |
| 2199 | - * Toastify js 1.12.0 | |
| 2200 | - * https://github.com/apvarun/toastify-js | |
| 2201 | - * @license MIT licensed | |
| 2202 | - * | |
| 2203 | - * Copyright (C) 2018 Varun A P | |
| 2204 | - */ | |
| 2205 | -(function(root, factory) { | |
| 2206 | - if ( true && module.exports) { | |
| 2207 | - module.exports = factory(); | |
| 2208 | - } else { | |
| 2209 | - root.Toastify = factory(); | |
| 2210 | - } | |
| 2211 | -})(this, function(global) { | |
| 2212 | - // Object initialization | |
| 2213 | - var Toastify = function(options) { | |
| 2214 | - // Returning a new init object | |
| 2215 | - return new Toastify.lib.init(options); | |
| 2216 | - }, | |
| 2217 | - // Library version | |
| 2218 | - version = "1.12.0"; | |
| 2219 | - | |
| 2220 | - // Set the default global options | |
| 2221 | - Toastify.defaults = { | |
| 2222 | - oldestFirst: true, | |
| 2223 | - text: "Toastify is awesome!", | |
| 2224 | - node: undefined, | |
| 2225 | - duration: 3000, | |
| 2226 | - selector: undefined, | |
| 2227 | - callback: function () { | |
| 2228 | - }, | |
| 2229 | - destination: undefined, | |
| 2230 | - newWindow: false, | |
| 2231 | - close: false, | |
| 2232 | - gravity: "toastify-top", | |
| 2233 | - positionLeft: false, | |
| 2234 | - position: '', | |
| 2235 | - backgroundColor: '', | |
| 2236 | - avatar: "", | |
| 2237 | - className: "", | |
| 2238 | - stopOnFocus: true, | |
| 2239 | - onClick: function () { | |
| 2240 | - }, | |
| 2241 | - offset: {x: 0, y: 0}, | |
| 2242 | - escapeMarkup: true, | |
| 2243 | - ariaLive: 'polite', | |
| 2244 | - style: {background: ''} | |
| 2245 | - }; | |
| 2246 | - | |
| 2247 | - // Defining the prototype of the object | |
| 2248 | - Toastify.lib = Toastify.prototype = { | |
| 2249 | - toastify: version, | |
| 2250 | - | |
| 2251 | - constructor: Toastify, | |
| 2252 | - | |
| 2253 | - // Initializing the object with required parameters | |
| 2254 | - init: function(options) { | |
| 2255 | - // Verifying and validating the input object | |
| 2256 | - if (!options) { | |
| 2257 | - options = {}; | |
| 2258 | - } | |
| 2259 | - | |
| 2260 | - // Creating the options object | |
| 2261 | - this.options = {}; | |
| 2262 | - | |
| 2263 | - this.toastElement = null; | |
| 2264 | - | |
| 2265 | - // Validating the options | |
| 2266 | - this.options.text = options.text || Toastify.defaults.text; // Display message | |
| 2267 | - this.options.node = options.node || Toastify.defaults.node; // Display content as node | |
| 2268 | - this.options.duration = options.duration === 0 ? 0 : options.duration || Toastify.defaults.duration; // Display duration | |
| 2269 | - this.options.selector = options.selector || Toastify.defaults.selector; // Parent selector | |
| 2270 | - this.options.callback = options.callback || Toastify.defaults.callback; // Callback after display | |
| 2271 | - this.options.destination = options.destination || Toastify.defaults.destination; // On-click destination | |
| 2272 | - this.options.newWindow = options.newWindow || Toastify.defaults.newWindow; // Open destination in new window | |
| 2273 | - this.options.close = options.close || Toastify.defaults.close; // Show toast close icon | |
| 2274 | - this.options.gravity = options.gravity === "bottom" ? "toastify-bottom" : Toastify.defaults.gravity; // toast position - top or bottom | |
| 2275 | - this.options.positionLeft = options.positionLeft || Toastify.defaults.positionLeft; // toast position - left or right | |
| 2276 | - this.options.position = options.position || Toastify.defaults.position; // toast position - left or right | |
| 2277 | - this.options.backgroundColor = options.backgroundColor || Toastify.defaults.backgroundColor; // toast background color | |
| 2278 | - this.options.avatar = options.avatar || Toastify.defaults.avatar; // img element src - url or a path | |
| 2279 | - this.options.className = options.className || Toastify.defaults.className; // additional class names for the toast | |
| 2280 | - this.options.stopOnFocus = options.stopOnFocus === undefined ? Toastify.defaults.stopOnFocus : options.stopOnFocus; // stop timeout on focus | |
| 2281 | - this.options.onClick = options.onClick || Toastify.defaults.onClick; // Callback after click | |
| 2282 | - this.options.offset = options.offset || Toastify.defaults.offset; // toast offset | |
| 2283 | - this.options.escapeMarkup = options.escapeMarkup !== undefined ? options.escapeMarkup : Toastify.defaults.escapeMarkup; | |
| 2284 | - this.options.ariaLive = options.ariaLive || Toastify.defaults.ariaLive; | |
| 2285 | - this.options.style = options.style || Toastify.defaults.style; | |
| 2286 | - if(options.backgroundColor) { | |
| 2287 | - this.options.style.background = options.backgroundColor; | |
| 2288 | - } | |
| 2289 | - | |
| 2290 | - // Returning the current object for chaining functions | |
| 2291 | - return this; | |
| 2292 | - }, | |
| 2293 | - | |
| 2294 | - // Building the DOM element | |
| 2295 | - buildToast: function() { | |
| 2296 | - // Validating if the options are defined | |
| 2297 | - if (!this.options) { | |
| 2298 | - throw "Toastify is not initialized"; | |
| 2299 | - } | |
| 2300 | - | |
| 2301 | - // Creating the DOM object | |
| 2302 | - var divElement = document.createElement("div"); | |
| 2303 | - divElement.className = "toastify on " + this.options.className; | |
| 2304 | - | |
| 2305 | - // Positioning toast to left or right or center | |
| 2306 | - if (!!this.options.position) { | |
| 2307 | - divElement.className += " toastify-" + this.options.position; | |
| 2308 | - } else { | |
| 2309 | - // To be depreciated in further versions | |
| 2310 | - if (this.options.positionLeft === true) { | |
| 2311 | - divElement.className += " toastify-left"; | |
| 2312 | - console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.') | |
| 2313 | - } else { | |
| 2314 | - // Default position | |
| 2315 | - divElement.className += " toastify-right"; | |
| 2316 | - } | |
| 2317 | - } | |
| 2318 | - | |
| 2319 | - // Assigning gravity of element | |
| 2320 | - divElement.className += " " + this.options.gravity; | |
| 2321 | - | |
| 2322 | - if (this.options.backgroundColor) { | |
| 2323 | - // This is being deprecated in favor of using the style HTML DOM property | |
| 2324 | - console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.'); | |
| 2325 | - } | |
| 2326 | - | |
| 2327 | - // Loop through our style object and apply styles to divElement | |
| 2328 | - for (var property in this.options.style) { | |
| 2329 | - divElement.style[property] = this.options.style[property]; | |
| 2330 | - } | |
| 2331 | - | |
| 2332 | - // Announce the toast to screen readers | |
| 2333 | - if (this.options.ariaLive) { | |
| 2334 | - divElement.setAttribute('aria-live', this.options.ariaLive) | |
| 2335 | - } | |
| 2336 | - | |
| 2337 | - // Adding the toast message/node | |
| 2338 | - if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) { | |
| 2339 | - // If we have a valid node, we insert it | |
| 2340 | - divElement.appendChild(this.options.node) | |
| 2341 | - } else { | |
| 2342 | - if (this.options.escapeMarkup) { | |
| 2343 | - divElement.innerText = this.options.text; | |
| 2344 | - } else { | |
| 2345 | - divElement.innerHTML = this.options.text; | |
| 2346 | - } | |
| 2347 | - | |
| 2348 | - if (this.options.avatar !== "") { | |
| 2349 | - var avatarElement = document.createElement("img"); | |
| 2350 | - avatarElement.src = this.options.avatar; | |
| 2351 | - | |
| 2352 | - avatarElement.className = "toastify-avatar"; | |
| 2353 | - | |
| 2354 | - if (this.options.position == "left" || this.options.positionLeft === true) { | |
| 2355 | - // Adding close icon on the left of content | |
| 2356 | - divElement.appendChild(avatarElement); | |
| 2357 | - } else { | |
| 2358 | - // Adding close icon on the right of content | |
| 2359 | - divElement.insertAdjacentElement("afterbegin", avatarElement); | |
| 2360 | - } | |
| 2361 | - } | |
| 2362 | - } | |
| 2363 | - | |
| 2364 | - // Adding a close icon to the toast | |
| 2365 | - if (this.options.close === true) { | |
| 2366 | - // Create a span for close element | |
| 2367 | - var closeElement = document.createElement("button"); | |
| 2368 | - closeElement.type = "button"; | |
| 2369 | - closeElement.setAttribute("aria-label", "Close"); | |
| 2370 | - closeElement.className = "toast-close"; | |
| 2371 | - closeElement.innerHTML = "✖"; | |
| 2372 | - | |
| 2373 | - // Triggering the removal of toast from DOM on close click | |
| 2374 | - closeElement.addEventListener( | |
| 2375 | - "click", | |
| 2376 | - function(event) { | |
| 2377 | - event.stopPropagation(); | |
| 2378 | - this.removeElement(this.toastElement); | |
| 2379 | - window.clearTimeout(this.toastElement.timeOutValue); | |
| 2380 | - }.bind(this) | |
| 2381 | - ); | |
| 2382 | - | |
| 2383 | - //Calculating screen width | |
| 2384 | - var width = window.innerWidth > 0 ? window.innerWidth : screen.width; | |
| 2385 | - | |
| 2386 | - // Adding the close icon to the toast element | |
| 2387 | - // Display on the right if screen width is less than or equal to 360px | |
| 2388 | - if ((this.options.position == "left" || this.options.positionLeft === true) && width > 360) { | |
| 2389 | - // Adding close icon on the left of content | |
| 2390 | - divElement.insertAdjacentElement("afterbegin", closeElement); | |
| 2391 | - } else { | |
| 2392 | - // Adding close icon on the right of content | |
| 2393 | - divElement.appendChild(closeElement); | |
| 2394 | - } | |
| 2395 | - } | |
| 2396 | - | |
| 2397 | - // Clear timeout while toast is focused | |
| 2398 | - if (this.options.stopOnFocus && this.options.duration > 0) { | |
| 2399 | - var self = this; | |
| 2400 | - // stop countdown | |
| 2401 | - divElement.addEventListener( | |
| 2402 | - "mouseover", | |
| 2403 | - function(event) { | |
| 2404 | - window.clearTimeout(divElement.timeOutValue); | |
| 2405 | - } | |
| 2406 | - ) | |
| 2407 | - // add back the timeout | |
| 2408 | - divElement.addEventListener( | |
| 2409 | - "mouseleave", | |
| 2410 | - function() { | |
| 2411 | - divElement.timeOutValue = window.setTimeout( | |
| 2412 | - function() { | |
| 2413 | - // Remove the toast from DOM | |
| 2414 | - self.removeElement(divElement); | |
| 2415 | - }, | |
| 2416 | - self.options.duration | |
| 2417 | - ) | |
| 2418 | - } | |
| 2419 | - ) | |
| 2420 | - } | |
| 2421 | - | |
| 2422 | - // Adding an on-click destination path | |
| 2423 | - if (typeof this.options.destination !== "undefined") { | |
| 2424 | - divElement.addEventListener( | |
| 2425 | - "click", | |
| 2426 | - function(event) { | |
| 2427 | - event.stopPropagation(); | |
| 2428 | - if (this.options.newWindow === true) { | |
| 2429 | - window.open(this.options.destination, "_blank"); | |
| 2430 | - } else { | |
| 2431 | - window.location = this.options.destination; | |
| 2432 | - } | |
| 2433 | - }.bind(this) | |
| 2434 | - ); | |
| 2435 | - } | |
| 2436 | - | |
| 2437 | - if (typeof this.options.onClick === "function" && typeof this.options.destination === "undefined") { | |
| 2438 | - divElement.addEventListener( | |
| 2439 | - "click", | |
| 2440 | - function(event) { | |
| 2441 | - event.stopPropagation(); | |
| 2442 | - this.options.onClick(); | |
| 2443 | - }.bind(this) | |
| 2444 | - ); | |
| 2445 | - } | |
| 2446 | - | |
| 2447 | - // Adding offset | |
| 2448 | - if(typeof this.options.offset === "object") { | |
| 2449 | - | |
| 2450 | - var x = getAxisOffsetAValue("x", this.options); | |
| 2451 | - var y = getAxisOffsetAValue("y", this.options); | |
| 2452 | - | |
| 2453 | - var xOffset = this.options.position == "left" ? x : "-" + x; | |
| 2454 | - var yOffset = this.options.gravity == "toastify-top" ? y : "-" + y; | |
| 2455 | - | |
| 2456 | - divElement.style.transform = "translate(" + xOffset + "," + yOffset + ")"; | |
| 2457 | - | |
| 2458 | - } | |
| 2459 | - | |
| 2460 | - // Returning the generated element | |
| 2461 | - return divElement; | |
| 2462 | - }, | |
| 2463 | - | |
| 2464 | - // Displaying the toast | |
| 2465 | - showToast: function() { | |
| 2466 | - // Creating the DOM object for the toast | |
| 2467 | - this.toastElement = this.buildToast(); | |
| 2468 | - | |
| 2469 | - // Getting the root element to with the toast needs to be added | |
| 2470 | - var rootElement; | |
| 2471 | - if (typeof this.options.selector === "string") { | |
| 2472 | - rootElement = document.getElementById(this.options.selector); | |
| 2473 | - } else if (this.options.selector instanceof HTMLElement || (typeof ShadowRoot !== 'undefined' && this.options.selector instanceof ShadowRoot)) { | |
| 2474 | - rootElement = this.options.selector; | |
| 2475 | - } else { | |
| 2476 | - rootElement = document.body; | |
| 2477 | - } | |
| 2478 | - | |
| 2479 | - // Validating if root element is present in DOM | |
| 2480 | - if (!rootElement) { | |
| 2481 | - throw "Root element is not defined"; | |
| 2482 | - } | |
| 2483 | - | |
| 2484 | - // Adding the DOM element | |
| 2485 | - var elementToInsert = Toastify.defaults.oldestFirst ? rootElement.firstChild : rootElement.lastChild; | |
| 2486 | - rootElement.insertBefore(this.toastElement, elementToInsert); | |
| 2487 | - | |
| 2488 | - // Repositioning the toasts in case multiple toasts are present | |
| 2489 | - Toastify.reposition(); | |
| 2490 | - | |
| 2491 | - if (this.options.duration > 0) { | |
| 2492 | - this.toastElement.timeOutValue = window.setTimeout( | |
| 2493 | - function() { | |
| 2494 | - // Remove the toast from DOM | |
| 2495 | - this.removeElement(this.toastElement); | |
| 2496 | - }.bind(this), | |
| 2497 | - this.options.duration | |
| 2498 | - ); // Binding `this` for function invocation | |
| 2499 | - } | |
| 2500 | - | |
| 2501 | - // Supporting function chaining | |
| 2502 | - return this; | |
| 2503 | - }, | |
| 2504 | - | |
| 2505 | - hideToast: function() { | |
| 2506 | - if (this.toastElement.timeOutValue) { | |
| 2507 | - clearTimeout(this.toastElement.timeOutValue); | |
| 2508 | - } | |
| 2509 | - this.removeElement(this.toastElement); | |
| 2510 | - }, | |
| 2511 | - | |
| 2512 | - // Removing the element from the DOM | |
| 2513 | - removeElement: function(toastElement) { | |
| 2514 | - // Hiding the element | |
| 2515 | - // toastElement.classList.remove("on"); | |
| 2516 | - toastElement.className = toastElement.className.replace(" on", ""); | |
| 2517 | - | |
| 2518 | - // Removing the element from DOM after transition end | |
| 2519 | - window.setTimeout( | |
| 2520 | - function() { | |
| 2521 | - // remove options node if any | |
| 2522 | - if (this.options.node && this.options.node.parentNode) { | |
| 2523 | - this.options.node.parentNode.removeChild(this.options.node); | |
| 2524 | - } | |
| 2525 | - | |
| 2526 | - // Remove the element from the DOM, only when the parent node was not removed before. | |
| 2527 | - if (toastElement.parentNode) { | |
| 2528 | - toastElement.parentNode.removeChild(toastElement); | |
| 2529 | - } | |
| 2530 | - | |
| 2531 | - // Calling the callback function | |
| 2532 | - this.options.callback.call(toastElement); | |
| 2533 | - | |
| 2534 | - // Repositioning the toasts again | |
| 2535 | - Toastify.reposition(); | |
| 2536 | - }.bind(this), | |
| 2537 | - 400 | |
| 2538 | - ); // Binding `this` for function invocation | |
| 2539 | - }, | |
| 2540 | - }; | |
| 2541 | - | |
| 2542 | - // Positioning the toasts on the DOM | |
| 2543 | - Toastify.reposition = function() { | |
| 2544 | - | |
| 2545 | - // Top margins with gravity | |
| 2546 | - var topLeftOffsetSize = { | |
| 2547 | - top: 15, | |
| 2548 | - bottom: 15, | |
| 2549 | - }; | |
| 2550 | - var topRightOffsetSize = { | |
| 2551 | - top: 15, | |
| 2552 | - bottom: 15, | |
| 2553 | - }; | |
| 2554 | - var offsetSize = { | |
| 2555 | - top: 15, | |
| 2556 | - bottom: 15, | |
| 2557 | - }; | |
| 2558 | - | |
| 2559 | - // Get all toast messages on the DOM | |
| 2560 | - var allToasts = document.getElementsByClassName("toastify"); | |
| 2561 | - | |
| 2562 | - var classUsed; | |
| 2563 | - | |
| 2564 | - // Modifying the position of each toast element | |
| 2565 | - for (var i = 0; i < allToasts.length; i++) { | |
| 2566 | - // Getting the applied gravity | |
| 2567 | - if (containsClass(allToasts[i], "toastify-top") === true) { | |
| 2568 | - classUsed = "toastify-top"; | |
| 2569 | - } else { | |
| 2570 | - classUsed = "toastify-bottom"; | |
| 2571 | - } | |
| 2572 | - | |
| 2573 | - var height = allToasts[i].offsetHeight; | |
| 2574 | - classUsed = classUsed.substr(9, classUsed.length-1) | |
| 2575 | - // Spacing between toasts | |
| 2576 | - var offset = 15; | |
| 2577 | - | |
| 2578 | - var width = window.innerWidth > 0 ? window.innerWidth : screen.width; | |
| 2579 | - | |
| 2580 | - // Show toast in center if screen with less than or equal to 360px | |
| 2581 | - if (width <= 360) { | |
| 2582 | - // Setting the position | |
| 2583 | - allToasts[i].style[classUsed] = offsetSize[classUsed] + "px"; | |
| 2584 | - | |
| 2585 | - offsetSize[classUsed] += height + offset; | |
| 2586 | - } else { | |
| 2587 | - if (containsClass(allToasts[i], "toastify-left") === true) { | |
| 2588 | - // Setting the position | |
| 2589 | - allToasts[i].style[classUsed] = topLeftOffsetSize[classUsed] + "px"; | |
| 2590 | - | |
| 2591 | - topLeftOffsetSize[classUsed] += height + offset; | |
| 2592 | - } else { | |
| 2593 | - // Setting the position | |
| 2594 | - allToasts[i].style[classUsed] = topRightOffsetSize[classUsed] + "px"; | |
| 2595 | - | |
| 2596 | - topRightOffsetSize[classUsed] += height + offset; | |
| 2597 | - } | |
| 2598 | - } | |
| 2599 | - } | |
| 2600 | - | |
| 2601 | - // Supporting function chaining | |
| 2602 | - return this; | |
| 2603 | - }; | |
| 2604 | - | |
| 2605 | - // Helper function to get offset. | |
| 2606 | - function getAxisOffsetAValue(axis, options) { | |
| 2607 | - | |
| 2608 | - if(options.offset[axis]) { | |
| 2609 | - if(isNaN(options.offset[axis])) { | |
| 2610 | - return options.offset[axis]; | |
| 2611 | - } | |
| 2612 | - else { | |
| 2613 | - return options.offset[axis] + 'px'; | |
| 2614 | - } | |
| 2615 | - } | |
| 2616 | - | |
| 2617 | - return '0px'; | |
| 2618 | - | |
| 2619 | - } | |
| 2620 | - | |
| 2621 | - function containsClass(elem, yourClass) { | |
| 2622 | - if (!elem || typeof yourClass !== "string") { | |
| 2623 | - return false; | |
| 2624 | - } else if ( | |
| 2625 | - elem.className && | |
| 2626 | - elem.className | |
| 2627 | - .trim() | |
| 2628 | - .split(/\s+/gi) | |
| 2629 | - .indexOf(yourClass) > -1 | |
| 2630 | - ) { | |
| 2631 | - return true; | |
| 2632 | - } else { | |
| 2633 | - return false; | |
| 2634 | - } | |
| 2635 | - } | |
| 2636 | - | |
| 2637 | - // Setting up the prototype for the init object | |
| 2638 | - Toastify.lib.init.prototype = Toastify.lib; | |
| 2639 | - | |
| 2640 | - // Returning the Toastify function to be assigned to the window object/module | |
| 2641 | - return Toastify; | |
| 2642 | -}); | |
| 2643 | - | |
| 2644 | - | |
| 2645 | -/***/ }, | |
| 2646 | - | |
| 2647 | -/***/ "react" | |
| 2648 | -/*!************************!*\ | |
| 2649 | - !*** external "React" ***! | |
| 2650 | - \************************/ | |
| 2651 | -(module) { | |
| 2652 | - | |
| 2653 | -"use strict"; | |
| 2654 | -module.exports = window["React"]; | |
| 2655 | - | |
| 2656 | 700 | /***/ } |
| 2657 | 701 | |
| 2658 | 702 | /******/ }); |
| 2659 | 703 | /************************************************************************/ |
| 2660 | 704 | /******/ // The module cache |
| 2661 | -/******/ const __webpack_module_cache__ = {}; | |
| 705 | +/******/ var __webpack_module_cache__ = {}; | |
| 2662 | 706 | /******/ |
| 2663 | 707 | /******/ // The require function |
| 2664 | 708 | /******/ function __webpack_require__(moduleId) { |
| 2665 | 709 | /******/ // Check if module is in cache |
| 2666 | -/******/ const cachedModule = __webpack_module_cache__[moduleId]; | |
| 710 | +/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 2667 | 711 | /******/ if (cachedModule !== undefined) { |
| 2668 | 712 | /******/ return cachedModule.exports; |
| 2669 | 713 | /******/ } |
| 2670 | 714 | /******/ // Create a new module (and put it into the cache) |
| 2671 | -/******/ const module = __webpack_module_cache__[moduleId] = { | |
| 2672 | -/******/ id: moduleId, | |
| 715 | +/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 716 | +/******/ // no module.id needed | |
| 2673 | 717 | /******/ // no module.loaded needed |
| 2674 | 718 | /******/ exports: {} |
| 2675 | 719 | /******/ }; |
| 2676 | 720 | /******/ |
| @@ -2676,13 +720,13 @@ | ||
| 2676 | 720 | /******/ |
| 2677 | 721 | /******/ // Execute the module function |
| 2678 | 722 | /******/ if (!(moduleId in __webpack_modules__)) { |
| 2679 | 723 | /******/ delete __webpack_module_cache__[moduleId]; |
| 2680 | -/******/ const e = new Error("Cannot find module '" + moduleId + "'"); | |
| 724 | +/******/ var e = new Error("Cannot find module '" + moduleId + "'"); | |
| 2681 | 725 | /******/ e.code = 'MODULE_NOT_FOUND'; |
| 2682 | 726 | /******/ throw e; |
| 2683 | 727 | /******/ } |
| 2684 | -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); | |
| 728 | +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 2685 | 729 | /******/ |
| 2686 | 730 | /******/ // Return the exports of the module |
| 2687 | 731 | /******/ return module.exports; |
| 2688 | 732 | /******/ } |
| @@ -2687,43 +731,16 @@ | ||
| 2687 | 731 | /******/ return module.exports; |
| 2688 | 732 | /******/ } |
| 2689 | 733 | /******/ |
| 2690 | 734 | /************************************************************************/ |
| 2691 | -/******/ /* webpack/runtime/compat get default export */ | |
| 2692 | -/******/ (() => { | |
| 2693 | -/******/ // getDefaultExport function for compatibility with non-harmony modules | |
| 2694 | -/******/ __webpack_require__.n = (module) => { | |
| 2695 | -/******/ const getter = module && module.__esModule ? | |
| 2696 | -/******/ () => (module['default']) : | |
| 2697 | -/******/ () => (module); | |
| 2698 | -/******/ __webpack_require__.d(getter, { a: getter }); | |
| 2699 | -/******/ return getter; | |
| 2700 | -/******/ }; | |
| 2701 | -/******/ })(); | |
| 2702 | -/******/ | |
| 2703 | 735 | /******/ /* webpack/runtime/define property getters */ |
| 2704 | 736 | /******/ (() => { |
| 2705 | -/******/ // define getter/value functions for harmony exports | |
| 737 | +/******/ // define getter functions for harmony exports | |
| 2706 | 738 | /******/ __webpack_require__.d = (exports, definition) => { |
| 2707 | -/******/ if(Array.isArray(definition)) { | |
| 2708 | -/******/ var i = 0; | |
| 2709 | -/******/ while(i < definition.length) { | |
| 2710 | -/******/ var key = definition[i++]; | |
| 2711 | -/******/ var binding = definition[i++]; | |
| 2712 | -/******/ if(!__webpack_require__.o(exports, key)) { | |
| 2713 | -/******/ if(binding === 0) { | |
| 2714 | -/******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] }); | |
| 2715 | -/******/ } else { | |
| 2716 | -/******/ Object.defineProperty(exports, key, { enumerable: true, get: binding }); | |
| 2717 | -/******/ } | |
| 2718 | -/******/ } else if(binding === 0) { i++; } | |
| 739 | +/******/ for(var key in definition) { | |
| 740 | +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 741 | +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 2719 | 742 | /******/ } |
| 2720 | -/******/ } else { | |
| 2721 | -/******/ for(var key in definition) { | |
| 2722 | -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 2723 | -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 2724 | -/******/ } | |
| 2725 | -/******/ } | |
| 2726 | 743 | /******/ } |
| 2727 | 744 | /******/ }; |
| 2728 | 745 | /******/ })(); |
| 2729 | 746 | /******/ |
| @@ -2728,9 +745,9 @@ | ||
| 2728 | 745 | /******/ })(); |
| 2729 | 746 | /******/ |
| 2730 | 747 | /******/ /* webpack/runtime/hasOwnProperty shorthand */ |
| 2731 | 748 | /******/ (() => { |
| 2732 | -/******/ __webpack_require__.o = (obj, prop) => (Object.hasOwn(obj, prop)) | |
| 749 | +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) | |
| 2733 | 750 | /******/ })(); |
| 2734 | 751 | /******/ |
| 2735 | 752 | /******/ /* webpack/runtime/make namespace object */ |
| 2736 | 753 | /******/ (() => { |
| @@ -2735,9 +752,9 @@ | ||
| 2735 | 752 | /******/ /* webpack/runtime/make namespace object */ |
| 2736 | 753 | /******/ (() => { |
| 2737 | 754 | /******/ // define __esModule on exports |
| 2738 | 755 | /******/ __webpack_require__.r = (exports) => { |
| 2739 | -/******/ if(Symbol.toStringTag) { | |
| 756 | +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
| 2740 | 757 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
| 2741 | 758 | /******/ } |
| 2742 | 759 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 2743 | 760 | /******/ }; |
| @@ -2742,18 +759,12 @@ | ||
| 2742 | 759 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 2743 | 760 | /******/ }; |
| 2744 | 761 | /******/ })(); |
| 2745 | 762 | /******/ |
| 2746 | -/******/ /* webpack/runtime/nonce */ | |
| 2747 | -/******/ (() => { | |
| 2748 | -/******/ __webpack_require__.nc = undefined; | |
| 2749 | -/******/ })(); | |
| 2750 | -/******/ | |
| 2751 | 763 | /************************************************************************/ |
| 2752 | -let __webpack_exports__ = {}; | |
| 2753 | -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 764 | +var __webpack_exports__ = {}; | |
| 765 | +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. | |
| 2754 | 766 | (() => { |
| 2755 | -"use strict"; | |
| 2756 | 767 | /*!*************************************************!*\ |
| 2757 | 768 | !*** ./assets/src/apps/js/admin/pages/tools.js ***! |
| 2758 | 769 | \*************************************************/ |
| 2759 | 770 | __webpack_require__.r(__webpack_exports__); |
| @@ -2760,16 +771,12 @@ | ||
| 2760 | 771 | /* harmony import */ var _tools_database_upgrade__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tools/database/upgrade */ "./assets/src/apps/js/admin/pages/tools/database/upgrade.js"); |
| 2761 | 772 | /* harmony import */ var _tools_database_create_indexs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tools/database/create_indexs */ "./assets/src/apps/js/admin/pages/tools/database/create_indexs.js"); |
| 2762 | 773 | /* harmony import */ var _tools_database_re_upgrade_db__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tools/database/re-upgrade-db */ "./assets/src/apps/js/admin/pages/tools/database/re-upgrade-db.js"); |
| 2763 | 774 | /* harmony import */ var _tools_database_clean_database__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tools/database/clean_database */ "./assets/src/apps/js/admin/pages/tools/database/clean_database.js"); |
| 2764 | -/* harmony import */ var _tools_reset_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tools/reset-data */ "./assets/src/apps/js/admin/pages/tools/reset-data/index.js"); | |
| 2765 | -/* harmony import */ var _tools_handle_sample_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./tools/handle-sample-data */ "./assets/src/apps/js/admin/pages/tools/handle-sample-data.js"); | |
| 2766 | 775 | |
| 2767 | 776 | |
| 2768 | 777 | |
| 2769 | 778 | |
| 2770 | - | |
| 2771 | - | |
| 2772 | 779 | (function ($) { |
| 2773 | 780 | const $doc = $(document); |
| 2774 | 781 | const clearHardCache = function clearHardCache(e) { |
| 2775 | 782 | e.preventDefault(); |
| @@ -2802,11 +809,9 @@ | ||
| 2802 | 809 | $(function () { |
| 2803 | 810 | (0,_tools_database_upgrade__WEBPACK_IMPORTED_MODULE_0__["default"])(); |
| 2804 | 811 | (0,_tools_database_create_indexs__WEBPACK_IMPORTED_MODULE_1__["default"])(); |
| 2805 | 812 | (0,_tools_database_re_upgrade_db__WEBPACK_IMPORTED_MODULE_2__["default"])(); |
| 2806 | - (0,_tools_reset_data__WEBPACK_IMPORTED_MODULE_4__["default"])(); | |
| 2807 | 813 | (0,_tools_database_clean_database__WEBPACK_IMPORTED_MODULE_3__["default"])(); |
| 2808 | - new _tools_handle_sample_data__WEBPACK_IMPORTED_MODULE_5__["default"]().init(); | |
| 2809 | 814 | $doc.on('click', '#learn-press-clear-cache', clearHardCache).on('click', 'input[name="enable_hard_cache"]', toggleHardCache); |
| 2810 | 815 | }); |
| 2811 | 816 | })(jQuery); |
| 2812 | 817 | })(); |