PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9.1
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9.1
4.4.9.1 4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 All 141 releases
← All changes | assets/js/dist/admin/admin.js +1914 -231 4.3.9 → 4.4.9.1 View file →
@@ -1,6 +1,5 @@
1 1 /******/ (() => { // webpackBootstrap
2 -/******/ "use strict";
3 2 /******/ var __webpack_modules__ = ({
4 3
5 4 /***/ "./assets/src/js/admin/init-tom-select.js"
6 5 /*!************************************************!*\
@@ -7,8 +6,9 @@
7 6 !*** ./assets/src/js/admin/init-tom-select.js ***!
8 7 \************************************************/
9 8 (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
10 9
10 +"use strict";
11 11 __webpack_require__.r(__webpack_exports__);
12 12 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13 13 /* harmony export */ initElsTomSelect: () => (/* binding */ initElsTomSelect),
14 14 /* harmony export */ initTomSelect: () => (/* binding */ initTomSelect),
@@ -16,17 +16,17 @@
16 16 /* harmony export */ });
17 17 /* harmony import */ var _utils_admin_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils-admin.js */ "./assets/src/js/admin/utils-admin.js");
18 18
19 19
20 -/**
21 - * Handle data response from API for tom-select
22 - *
23 - * @param {*} response
24 - * @param {*} tomSelectEl
25 - * @param dataStruct
26 - * @param fetchAPI
27 - * @param customOptions
28 - * @param {*} callBack
20 +/**
21 + * Handle data response from API for tom-select
22 + *
23 + * @param {*} response
24 + * @param {*} tomSelectEl
25 + * @param dataStruct
26 + * @param fetchAPI
27 + * @param customOptions
28 + * @param {*} callBack
29 29 */
30 30 const handleResponse = (response, tomSelectEl, dataStruct, fetchAPI, customOptions = {}, callBack) => {
31 31 if (!response || !tomSelectEl || !dataStruct || !fetchAPI || !callBack) {
32 32 return;
@@ -250,8 +250,319 @@
250 250
251 251
252 252 /***/ },
253 253
254 +/***/ "./assets/src/js/admin/share/dropdown-pages.js"
255 +/*!*****************************************************!*\
256 + !*** ./assets/src/js/admin/share/dropdown-pages.js ***!
257 + \*****************************************************/
258 +(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
259 +
260 +"use strict";
261 +__webpack_require__.r(__webpack_exports__);
262 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
263 +/* harmony export */ DropdownPages: () => (/* binding */ DropdownPages)
264 +/* harmony export */ });
265 +/* harmony import */ var lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lpAssetsJsPath/utils.js */ "./assets/src/js/utils.js");
266 +/* harmony import */ var lpAssetsJsPath_lpToastify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lpAssetsJsPath/lpToastify.js */ "./assets/src/js/lpToastify.js");
267 +/**
268 + * Dropdown Pages
269 + *
270 + * @since 4.2.5.1
271 + * @version 1.0.0
272 + */
273 +
274 +
275 +class DropdownPages {
276 + static selectors = {
277 + elDropdown: '.learn-press-dropdown-pages',
278 + elSelect: 'select',
279 + elListWrap: '.list-pages-wrapper',
280 + elActions: '.quick-add-page-actions',
281 + elForm: '.quick-add-page-inline',
282 + elButtonQuickAdd: '.button-quick-add-page',
283 + elInput: '.quick-add-page-inline input[type="text"]',
284 + elButtonSubmit: '.quick-add-page-inline button',
285 + elButtonCancel: '.quick-add-page-inline a'
286 + };
287 + constructor() {
288 + this.elDropdowns = [];
289 + }
290 + init() {
291 + this.elDropdowns = document.querySelectorAll(DropdownPages.selectors.elDropdown);
292 + if (!this.elDropdowns.length) {
293 + return;
294 + }
295 + this.events();
296 + }
297 + events() {
298 + // Check and attach events only once
299 + if (DropdownPages._loadedEvents) {
300 + return;
301 + }
302 + DropdownPages._loadedEvents = this;
303 +
304 + // Change events
305 + lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__.eventHandlers('change', [{
306 + selector: DropdownPages.selectors.elDropdown,
307 + class: this,
308 + callBack: this.handleChangeSelect.name
309 + }]);
310 +
311 + // Click events
312 + lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__.eventHandlers('click', [{
313 + selector: DropdownPages.selectors.elButtonSubmit,
314 + class: this,
315 + callBack: this.handleSubmit.name
316 + }, {
317 + selector: DropdownPages.selectors.elButtonCancel,
318 + class: this,
319 + callBack: this.handleCancel.name
320 + }, {
321 + selector: DropdownPages.selectors.elButtonQuickAdd,
322 + class: this,
323 + callBack: this.handleQuickAdd.name
324 + }]);
325 +
326 + // Keydown events
327 + lpAssetsJsPath_utils_js__WEBPACK_IMPORTED_MODULE_0__.eventHandlers('keydown', [{
328 + selector: DropdownPages.selectors.elInput,
329 + class: this,
330 + callBack: this.handleInputEnter.name,
331 + checkIsEventEnter: true
332 + }, {
333 + selector: DropdownPages.selectors.elInput,
334 + class: this,
335 + callBack: this.handleInputEscape.name
336 + }]);
337 + }
338 + handleChangeSelect(args) {
339 + const {
340 + e
341 + } = args;
342 + const elSelect = e.target;
343 + if (!elSelect.matches(DropdownPages.selectors.elSelect)) {
344 + return;
345 + }
346 + const elDropdown = elSelect.closest(DropdownPages.selectors.elDropdown);
347 + if (!elDropdown) {
348 + return;
349 + }
350 + const elActions = elDropdown.querySelector(DropdownPages.selectors.elActions);
351 + if (elActions) {
352 + elActions.classList.add('hide-if-js');
353 + }
354 + if (parseInt(elSelect.value, 10)) {
355 + if (elActions) {
356 + const editLink = elActions.querySelector('a.edit-page');
357 + const viewLink = elActions.querySelector('a.view-page');
358 + if (editLink) {
359 + editLink.href = `post.php?post=${elSelect.value}&action=edit`;
360 + }
361 + if (viewLink) {
362 + viewLink.href = `${window.lpGlobalSettings.siteurl}?page_id=${elSelect.value}`;
363 + }
364 + elActions.classList.remove('hide-if-js');
365 + }
366 + elSelect.setAttribute('data-selected', elSelect.value);
367 + }
368 + }
369 + openQuickAddForm(elDropdown) {
370 + const elListWrap = elDropdown.querySelector(DropdownPages.selectors.elListWrap);
371 + const elForm = elDropdown.querySelector(DropdownPages.selectors.elForm);
372 + if (elListWrap) {
373 + elListWrap.classList.add('hide-if-js');
374 + }
375 + if (elForm) {
376 + elForm.classList.remove('hide-if-js');
377 + const elInput = elForm.querySelector('input');
378 + if (elInput) {
379 + elInput.value = '';
380 + elInput.focus();
381 + }
382 + }
383 + }
384 + handleSubmit(args) {
385 + const {
386 + e
387 + } = args;
388 + e.preventDefault();
389 + const elButton = e.target.closest(DropdownPages.selectors.elButtonSubmit);
390 + if (!elButton) {
391 + return;
392 + }
393 + const elForm = elButton.closest(DropdownPages.selectors.elForm);
394 + if (!elForm) {
395 + return;
396 + }
397 + const elDropdown = elForm.closest(DropdownPages.selectors.elDropdown);
398 + if (!elDropdown) {
399 + return;
400 + }
401 + const elInput = elForm.querySelector('input');
402 + const elListWrap = elDropdown.querySelector(DropdownPages.selectors.elListWrap);
403 + const pageName = elInput ? elInput.value.trim() : '';
404 + if (!pageName) {
405 + alert('Please enter the name of page');
406 + if (elInput) {
407 + elInput.focus();
408 + }
409 + return;
410 + }
411 + elButton.disabled = true;
412 + let fieldName = '';
413 + const elFieldName = elDropdown.querySelector('select');
414 + fieldName = elFieldName ? elFieldName.name : '';
415 + if (!window.lpGlobalSettings || !window.lpGlobalSettings.ajax || !window.lpDataAdmin || !window.lpDataAdmin.nonce) {
416 + elButton.disabled = false;
417 + return;
418 + }
419 + const formData = new FormData();
420 + formData.append('action', 'learnpress_create_page');
421 + formData.append('page_name', pageName);
422 + formData.append('field_name', fieldName);
423 + formData.append('nonce', window.lpDataAdmin.nonce);
424 + fetch(window.lpGlobalSettings.ajax, {
425 + method: 'POST',
426 + body: formData
427 + }).then(response => response.json()).then(response => {
428 + const {
429 + message,
430 + status,
431 + data
432 + } = response;
433 + if (status === 'success') {
434 + elForm.classList.add('hide-if-js');
435 + lpAssetsJsPath_lpToastify_js__WEBPACK_IMPORTED_MODULE_1__.show(message, 'success');
436 + setTimeout(() => {
437 + window.location.reload();
438 + }, 1000);
439 + } else {
440 + throw new Error(message);
441 + }
442 + }).catch(error => {
443 + lpAssetsJsPath_lpToastify_js__WEBPACK_IMPORTED_MODULE_1__.show(error.message, 'error');
444 + }).finally(() => {
445 + elButton.disabled = false;
446 + if (elListWrap) {
447 + elListWrap.classList.remove('hide-if-js');
448 + }
449 + });
450 + }
451 + addNewPageToList(args) {
452 + const {
453 + ID,
454 + name,
455 + positions
456 + } = args;
457 + const option = document.createElement('option');
458 + option.value = ID;
459 + option.textContent = name;
460 + const position = positions.indexOf(ID + '');
461 + document.querySelectorAll(`${DropdownPages.selectors.elDropdown} ${DropdownPages.selectors.elSelect}`).forEach(select => {
462 + const newOption = option.cloneNode(true);
463 + if (position === 0) {
464 + const options = select.querySelectorAll('option');
465 + for (const opt of options) {
466 + if (parseInt(opt.value, 10)) {
467 + opt.before(newOption);
468 + break;
469 + }
470 + }
471 + } else if (position === positions.length - 1) {
472 + select.appendChild(newOption);
473 + } else {
474 + const prevOption = select.querySelector(`option[value="${positions[position - 1]}"]`);
475 + if (prevOption) {
476 + prevOption.after(newOption);
477 + } else {
478 + select.appendChild(newOption);
479 + }
480 + }
481 + });
482 + }
483 + handleCancel(args) {
484 + const {
485 + e
486 + } = args;
487 + e.preventDefault();
488 + const elCancel = e.target.closest(DropdownPages.selectors.elButtonCancel);
489 + if (!elCancel) {
490 + return;
491 + }
492 + const elForm = elCancel.closest(DropdownPages.selectors.elForm);
493 + if (!elForm) {
494 + return;
495 + }
496 + const elDropdown = elForm.closest(DropdownPages.selectors.elDropdown);
497 + if (!elDropdown) {
498 + return;
499 + }
500 + const elSelect = elDropdown.querySelector(DropdownPages.selectors.elSelect);
501 + const elListWrap = elDropdown.querySelector(DropdownPages.selectors.elListWrap);
502 + const selected = elSelect ? elSelect.getAttribute('data-selected') : '';
503 + elForm.classList.add('hide-if-js');
504 + if (elSelect) {
505 + elSelect.value = selected + '';
506 + elSelect.removeAttribute('disabled');
507 + elSelect.dispatchEvent(new Event('change', {
508 + bubbles: true
509 + }));
510 + }
511 + if (elListWrap) {
512 + elListWrap.classList.remove('hide-if-js');
513 + }
514 + }
515 + handleQuickAdd(args) {
516 + const {
517 + e
518 + } = args;
519 + const elButton = e.target.closest(DropdownPages.selectors.elButtonQuickAdd);
520 + if (!elButton) {
521 + return;
522 + }
523 + const elDropdown = elButton.closest(DropdownPages.selectors.elDropdown);
524 + if (!elDropdown) {
525 + return;
526 + }
527 + this.openQuickAddForm(elDropdown);
528 + }
529 + handleInputEnter(args) {
530 + const {
531 + e
532 + } = args;
533 + e.preventDefault();
534 + const elInput = e.target;
535 + const elForm = elInput.closest(DropdownPages.selectors.elForm);
536 + if (!elForm) {
537 + return;
538 + }
539 + const elButton = elForm.querySelector('button');
540 + if (elButton) {
541 + elButton.click();
542 + }
543 + }
544 + handleInputEscape(args) {
545 + const {
546 + e
547 + } = args;
548 + if (e.key !== 'Escape') {
549 + return;
550 + }
551 + const elInput = e.target;
552 + const elForm = elInput.closest(DropdownPages.selectors.elForm);
553 + if (!elForm) {
554 + return;
555 + }
556 + const elCancel = elForm.querySelector('a');
557 + if (elCancel) {
558 + elCancel.click();
559 + }
560 + }
561 +}
562 +
563 +/***/ },
564 +
254 565 /***/ "./assets/src/js/admin/utils-admin.js"
255 566 /*!********************************************!*\
256 567 !*** ./assets/src/js/admin/utils-admin.js ***!
257 568 \********************************************/
@@ -256,8 +567,9 @@
256 567 !*** ./assets/src/js/admin/utils-admin.js ***!
257 568 \********************************************/
258 569 (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
259 570
571 +"use strict";
260 572 __webpack_require__.r(__webpack_exports__);
261 573 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
262 574 /* harmony export */ AdminUtilsFunctions: () => (/* binding */ AdminUtilsFunctions),
263 575 /* harmony export */ Api: () => (/* reexport safe */ _api_js__WEBPACK_IMPORTED_MODULE_2__["default"]),
@@ -265,13 +577,13 @@
265 577 /* harmony export */ });
266 578 /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./assets/src/js/utils.js");
267 579 /* harmony import */ var tom_select__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tom-select */ "./node_modules/tom-select/dist/esm/tom-select.complete.js");
268 580 /* harmony import */ var _api_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../api.js */ "./assets/src/js/api.js");
269 -/**
270 - * Library run on Admin
271 - *
272 - * @since 4.2.6.9
273 - * @version 1.0.1
581 +/**
582 + * Library run on Admin
583 + *
584 + * @since 4.2.6.9
585 + * @version 1.0.1
274 586 */
275 587
276 588
277 589
@@ -311,26 +623,26 @@
311 623 ...optionDefault,
312 624 ...options
313 625 };
314 626 const items_selected = options.options;
315 - /*if ( options?.options?.length > 20 ) {
316 - const chunkSize = 20;
317 - const length = options.options.length;
318 - let i = 0;
319 - const chunkedOptions = { ...options };
320 - chunkedOptions.options = items_selected.slice( i, chunkSize );
321 - const tomSelect = new TomSelect( elTomSelect, chunkedOptions );
322 - i += chunkSize;
323 - const interval = setInterval( () => {
324 - if ( i > ( length - 1 ) ) {
325 - clearInterval( interval );
326 - }
327 - const optionsSlice = items_selected.slice( i, i + chunkSize );
328 - i += chunkSize;
329 - tomSelect.addOptions( optionsSlice );
330 - tomSelect.setValue( options.items );
331 - }, 200 );
332 - return tomSelect;
627 + /*if ( options?.options?.length > 20 ) {
628 + const chunkSize = 20;
629 + const length = options.options.length;
630 + let i = 0;
631 + const chunkedOptions = { ...options };
632 + chunkedOptions.options = items_selected.slice( i, chunkSize );
633 + const tomSelect = new TomSelect( elTomSelect, chunkedOptions );
634 + i += chunkSize;
635 + const interval = setInterval( () => {
636 + if ( i > ( length - 1 ) ) {
637 + clearInterval( interval );
638 + }
639 + const optionsSlice = items_selected.slice( i, i + chunkSize );
640 + i += chunkSize;
641 + tomSelect.addOptions( optionsSlice );
642 + tomSelect.setValue( options.items );
643 + }, 200 );
644 + return tomSelect;
333 645 }*/
334 646
335 647 return new tom_select__WEBPACK_IMPORTED_MODULE_1__["default"](elTomSelect, options);
336 648 },
@@ -378,17 +690,18 @@
378 690 !*** ./assets/src/js/api.js ***!
379 691 \******************************/
380 692 (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
381 693
694 +"use strict";
382 695 __webpack_require__.r(__webpack_exports__);
383 696 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
384 697 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
385 698 /* harmony export */ });
386 -/**
387 - * List API on backend
388 - *
389 - * @since 4.2.6
390 - * @version 1.0.2
699 +/**
700 + * List API on backend
701 + *
702 + * @since 4.2.6
703 + * @version 1.0.2
391 704 */
392 705
393 706 const lplistAPI = {};
394 707 let lp_rest_url;
@@ -394,12 +707,9 @@
394 707 let lp_rest_url;
395 708 if ('undefined' !== typeof lpDataAdmin) {
396 709 lp_rest_url = lpDataAdmin.lp_rest_url;
397 710 lplistAPI.admin = {
398 - apiAdminNotice: lp_rest_url + 'lp/v1/admin/tools/admin-notices',
399 - apiAddons: lp_rest_url + 'lp/v1/addon/all',
400 - apiAddonAction: lp_rest_url + 'lp/v1/addon/action-n',
401 - apiAddonsPurchase: lp_rest_url + 'lp/v1/addon/info-addons-purchase',
711 + // apiAdminNotice: lp_rest_url + 'lp/v1/admin/tools/admin-notices',
402 712 apiSearchCourses: lp_rest_url + 'lp/v1/admin/tools/search-course',
403 713 apiSearchUsers: lp_rest_url + 'lp/v1/admin/tools/search-user',
404 714 apiAssignUserCourse: lp_rest_url + 'lp/v1/admin/tools/assign-user-course',
405 715 apiUnAssignUserCourse: lp_rest_url + 'lp/v1/admin/tools/unassign-user-course'
@@ -424,8 +734,62 @@
424 734 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (lplistAPI);
425 735
426 736 /***/ },
427 737
738 +/***/ "./assets/src/js/lpToastify.js"
739 +/*!*************************************!*\
740 + !*** ./assets/src/js/lpToastify.js ***!
741 + \*************************************/
742 +(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
743 +
744 +"use strict";
745 +__webpack_require__.r(__webpack_exports__);
746 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
747 +/* harmony export */ show: () => (/* binding */ show)
748 +/* harmony export */ });
749 +/* harmony import */ var toastify_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! toastify-js */ "./node_modules/toastify-js/src/toastify.js");
750 +/* harmony import */ var toastify_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(toastify_js__WEBPACK_IMPORTED_MODULE_0__);
751 +/* 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");
752 +/**
753 + * Utils functions
754 + *
755 + * @param url
756 + * @param data
757 + * @param functions
758 + * @since 4.3.0
759 + * @version 1.0.0
760 + */
761 +
762 +
763 +const argsToastify = {
764 + text: '',
765 + gravity: lpData.toast.gravity,
766 + // `top` or `bottom`
767 + position: lpData.toast.position,
768 + // `left`, `center` or `right`
769 + className: `${lpData.toast.classPrefix}`,
770 + close: lpData.toast.close == 1,
771 + stopOnFocus: lpData.toast.stopOnFocus == 1,
772 + duration: lpData.toast.duration
773 +};
774 +const show = (message, status = 'success', argsCustom) => {
775 + let args = argsToastify;
776 + if (argsCustom) {
777 + args = {
778 + ...args,
779 + ...argsCustom
780 + };
781 + }
782 + const toastify = new (toastify_js__WEBPACK_IMPORTED_MODULE_0___default())({
783 + ...args,
784 + text: message,
785 + className: `${lpData.toast.classPrefix} ${status}`
786 + });
787 + toastify.showToast();
788 +};
789 +
790 +/***/ },
791 +
428 792 /***/ "./assets/src/js/utils.js"
429 793 /*!********************************!*\
430 794 !*** ./assets/src/js/utils.js ***!
431 795 \********************************/
@@ -430,12 +794,14 @@
430 794 !*** ./assets/src/js/utils.js ***!
431 795 \********************************/
432 796 (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
433 797
798 +"use strict";
434 799 __webpack_require__.r(__webpack_exports__);
435 800 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
436 801 /* harmony export */ debounce: () => (/* binding */ debounce),
437 802 /* harmony export */ eventHandlers: () => (/* binding */ eventHandlers),
803 +/* harmony export */ fullScreenView: () => (/* binding */ fullScreenView),
438 804 /* harmony export */ getDataOfForm: () => (/* binding */ getDataOfForm),
439 805 /* harmony export */ getFieldKeysOfForm: () => (/* binding */ getFieldKeysOfForm),
440 806 /* harmony export */ listenElementCreated: () => (/* binding */ listenElementCreated),
441 807 /* harmony export */ listenElementViewed: () => (/* binding */ listenElementViewed),
@@ -447,18 +813,19 @@
447 813 /* harmony export */ lpOnElementReady: () => (/* binding */ lpOnElementReady),
448 814 /* harmony export */ lpSetLoadingEl: () => (/* binding */ lpSetLoadingEl),
449 815 /* harmony export */ lpShowHideEl: () => (/* binding */ lpShowHideEl),
450 816 /* harmony export */ mergeDataWithDatForm: () => (/* binding */ mergeDataWithDatForm),
451 -/* harmony export */ toggleCollapse: () => (/* binding */ toggleCollapse)
817 +/* harmony export */ toggleCollapse: () => (/* binding */ toggleCollapse),
818 +/* harmony export */ toggleEnable: () => (/* binding */ toggleEnable)
452 819 /* harmony export */ });
453 -/**
454 - * Utils functions
455 - *
456 - * @param url
457 - * @param data
458 - * @param functions
459 - * @since 4.2.5.1
460 - * @version 1.0.6
820 +/**
821 + * Utils functions
822 + *
823 + * @param url
824 + * @param data
825 + * @param functions
826 + * @since 4.2.5.1
827 + * @version 1.0.7
461 828 */
462 829 const lpClassName = {
463 830 hidden: 'lp-hidden',
464 831 loading: 'loading',
@@ -463,9 +830,12 @@
463 830 hidden: 'lp-hidden',
464 831 loading: 'loading',
465 832 elCollapse: 'lp-collapse',
466 833 elSectionToggle: '.lp-section-toggle',
467 - elTriggerToggle: '.lp-trigger-toggle'
834 + elTriggerToggle: '.lp-trigger-toggle',
835 + elBtnFullScreen: '.lp-btn-full-screen-view',
836 + elFullScreen: 'lp-full-screen-view',
837 + elBtnFullScreenClose: 'lp-full-screen-view__close'
468 838 };
469 839 const lpFetchAPI = (url, data = {}, functions = {}) => {
470 840 if ('function' === typeof functions.before) {
471 841 functions.before();
@@ -487,12 +857,12 @@
487 857 }
488 858 });
489 859 };
490 860
491 -/**
492 - * Get current URL without params.
493 - *
494 - * @since 4.2.5.1
861 +/**
862 + * Get current URL without params.
863 + *
864 + * @since 4.2.5.1
495 865 */
496 866 const lpGetCurrentURLNoParam = () => {
497 867 let currentUrl = window.location.href;
498 868 const hasParams = currentUrl.includes('?');
@@ -508,14 +878,14 @@
508 878 });
509 879 return url;
510 880 };
511 881
512 -/**
513 - * Listen element viewed.
514 - *
515 - * @param el
516 - * @param callback
517 - * @since 4.2.5.8
882 +/**
883 + * Listen element viewed.
884 + *
885 + * @param el
886 + * @param callback
887 + * @since 4.2.5.8
518 888 */
519 889 const listenElementViewed = (el, callback) => {
520 890 const observerSeeItem = new IntersectionObserver(function (entries) {
521 891 for (const entry of entries) {
@@ -526,13 +896,13 @@
526 896 });
527 897 observerSeeItem.observe(el);
528 898 };
529 899
530 -/**
531 - * Listen element created.
532 - *
533 - * @param callback
534 - * @since 4.2.5.8
900 +/**
901 + * Listen element created.
902 + *
903 + * @param callback
904 + * @since 4.2.5.8
535 905 */
536 906 const listenElementCreated = callback => {
537 907 const observerCreateItem = new MutationObserver(function (mutations) {
538 908 mutations.forEach(function (mutation) {
@@ -551,14 +921,14 @@
551 921 });
552 922 // End.
553 923 };
554 924
555 -/**
556 - * Listen element created.
557 - *
558 - * @param selector
559 - * @param callback
560 - * @since 4.2.7.1
925 +/**
926 + * Listen element created.
927 + *
928 + * @param selector
929 + * @param callback
930 + * @since 4.2.7.1
561 931 */
562 932 const lpOnElementReady = (selector, callback) => {
563 933 const element = document.querySelector(selector);
564 934 if (element) {
@@ -699,17 +1069,17 @@
699 1069 };
700 1070 return dataHandle;
701 1071 };
702 1072
703 -/**
704 - * Event trigger
705 - * For each list of event handlers, listen event on document.
706 - *
707 - * eventName: 'click', 'change', ...
708 - * eventHandlers = [ { selector: '.lp-button', callBack: function(){}, class: object } ]
709 - *
710 - * @param eventName
711 - * @param eventHandlers
1073 +/**
1074 + * Event trigger
1075 + * For each list of event handlers, listen event on document.
1076 + *
1077 + * eventName: 'click', 'change', ...
1078 + * eventHandlers = [ { selector: '.lp-button', callBack: function(){}, class: object } ]
1079 + *
1080 + * @param eventName
1081 + * @param eventHandlers
712 1082 */
713 1083 const eventHandlers = (eventName, eventHandlers) => {
714 1084 document.addEventListener(eventName, e => {
715 1085 const target = e.target;
@@ -750,32 +1120,32 @@
750 1120 });
751 1121 });
752 1122 };
753 1123
754 -/**
755 - * Debounce - delays function execution until after `wait` ms of inactivity.
756 - *
757 - * Each call resets the timer. Only the last call in a burst executes.
758 - *
759 - * USE CASES:
760 - * - Search inputs, form validation, window resize
761 - * - Multiple elements need independent timers
762 - * - When you need to call with different arguments
763 - *
764 - * EXAMPLES:
765 - * const debouncedSearch = debounce( (query) => fetchResults(query), 300 );
766 - * searchInput.addEventListener('input', (e) => debouncedSearch(e.target.value));
767 - *
768 - * const debouncedResize = debounce( recalculateLayout, 250 );
769 - * window.addEventListener('resize', debouncedResize);
770 - *
771 - * ⚠️ Create ONCE outside event handlers, not inside.
772 - *
773 - * @param {Function} func - Function to debounce (can be anonymous)
774 - * @param {number} wait - Milliseconds to wait (default: 500)
775 - * @return {Function} Debounced wrapper function
776 - * @since 4.3.7
777 - * @version 1.0.0
1124 +/**
1125 + * Debounce - delays function execution until after `wait` ms of inactivity.
1126 + *
1127 + * Each call resets the timer. Only the last call in a burst executes.
1128 + *
1129 + * USE CASES:
1130 + * - Search inputs, form validation, window resize
1131 + * - Multiple elements need independent timers
1132 + * - When you need to call with different arguments
1133 + *
1134 + * EXAMPLES:
1135 + * const debouncedSearch = debounce( (query) => fetchResults(query), 300 );
1136 + * searchInput.addEventListener('input', (e) => debouncedSearch(e.target.value));
1137 + *
1138 + * const debouncedResize = debounce( recalculateLayout, 250 );
1139 + * window.addEventListener('resize', debouncedResize);
1140 + *
1141 + * ⚠️ Create ONCE outside event handlers, not inside.
1142 + *
1143 + * @param {Function} func - Function to debounce (can be anonymous)
1144 + * @param {number} wait - Milliseconds to wait (default: 500)
1145 + * @return {Function} Debounced wrapper function
1146 + * @since 4.3.7
1147 + * @version 1.0.0
778 1148 */
779 1149 const debounce = (func, wait = 500) => {
780 1150 let timer;
781 1151 return args => {
@@ -783,10 +1153,1159 @@
783 1153 timer = setTimeout(() => func(args), wait);
784 1154 };
785 1155 };
786 1156
1157 +/**
1158 + * Initialize lp-toggle-enable components.
1159 + *
1160 + * Finds all `.lp-toggle-enable` elements and wires up toggle behavior.
1161 + * Reads initial state from `data-enabled` attribute ("true"/"false").
1162 + * Calls `data-on-toggle` callback (if provided via options) on state change.
1163 + *
1164 + * HTML structure:
1165 + * <label class="lp-toggle-enable" data-enabled="true">
1166 + * <input type="checkbox" class="lp-toggle-enable__input" />
1167 + * <span class="lp-toggle-enable__track"></span>
1168 + * </label>
1169 + *
1170 + * @param {string} selector CSS selector for toggle elements (default: '.lp-toggle-enable')
1171 + * @param {Function} onToggle Optional callback( el, isEnabled ) called on state change
1172 + * @since 4.4.5
1173 + * @version 1.0.0
1174 + */
1175 +window.lpToggleEnableInit = 0;
1176 +const toggleEnable = (onToggle = null) => {
1177 + if (window.lpToggleEnableInit) {
1178 + return;
1179 + }
1180 + window.lpToggleEnableInit = 1;
1181 + const selector = '.lp-toggle-enable';
1182 + const updateUI = (toggle, isEnabled) => {
1183 + toggle.classList.toggle('is-enabled', isEnabled);
1184 + const input = toggle.querySelector('.lp-toggle-enable__input');
1185 + if (input) {
1186 + input.checked = isEnabled;
1187 + input.value = isEnabled ? '1' : '0';
1188 + }
1189 + };
1190 +
1191 + // Delegate click handling via eventHandlers.
1192 + eventHandlers('click', [{
1193 + selector,
1194 + callBack: args => {
1195 + const {
1196 + e,
1197 + target
1198 + } = args;
1199 + const toggle = target.closest(selector);
1200 + if (!toggle || toggle.classList.contains('is-disabled')) {
1201 + return;
1202 + }
1203 + e.preventDefault();
1204 + const isEnabled = !toggle.classList.contains('is-enabled');
1205 + updateUI(toggle, isEnabled);
1206 + if ('function' === typeof onToggle) {
1207 + onToggle(toggle, isEnabled);
1208 + }
1209 + }
1210 + }]);
1211 +};
1212 +
1213 +/**
1214 + * Initialize custom fullscreen view buttons.
1215 + *
1216 + * Delegates clicks on `.lp-btn-full-screen-view` buttons to
1217 + * `lpToggleFullscreenView`. Reads the `data-target` attribute to find the
1218 + * target element. Falls back to the button's parent element when
1219 + * `data-target` is not provided.
1220 + *
1221 + * @since 4.4.5
1222 + * @version 1.0.0
1223 + */
1224 +window.lpFullScreenViewInit = 0;
1225 +const fullScreenView = () => {
1226 + if (window.lpFullScreenViewInit) {
1227 + return;
1228 + }
1229 + window.lpFullScreenViewInit = 1;
1230 + let lastScrollY = 0;
1231 + const lpToggleFullscreenView = (elTarget, elBtnFullScreen = null) => {
1232 + const isFullscreen = elTarget.classList.contains(lpClassName.elFullScreen);
1233 + if (isFullscreen) {
1234 + elTarget.classList.remove(lpClassName.elFullScreen);
1235 + document.documentElement.classList.remove('lp-full-screen-active');
1236 + window.scrollTo(0, lastScrollY);
1237 + } else {
1238 + lastScrollY = window.scrollY;
1239 + elTarget.classList.add(lpClassName.elFullScreen);
1240 + document.documentElement.classList.add('lp-full-screen-active');
1241 + }
1242 + if (!isFullscreen) {
1243 + if (!elTarget.querySelector(`.${lpClassName.elBtnFullScreenClose}`)) {
1244 + const closeButton = document.createElement('button');
1245 + closeButton.type = 'button';
1246 + closeButton.className = lpClassName.elBtnFullScreenClose;
1247 + closeButton.setAttribute('aria-label', 'Close');
1248 + closeButton.innerHTML = lpData.i18n.closeButtonFullScreen || 'Close &times;';
1249 + closeButton.addEventListener('click', e => {
1250 + e.preventDefault();
1251 + lpToggleFullscreenView(elTarget);
1252 + });
1253 + elTarget.appendChild(closeButton);
1254 + }
1255 + } else {
1256 + const closeButton = elTarget.querySelector(`.${lpClassName.elBtnFullScreenClose}`);
1257 + if (closeButton) {
1258 + closeButton.remove();
1259 + }
1260 + }
1261 + };
1262 + eventHandlers('click', [{
1263 + selector: lpClassName.elBtnFullScreen,
1264 + callBack: args => {
1265 + const {
1266 + e,
1267 + target
1268 + } = args;
1269 + const elBtnFullScreen = target.closest(lpClassName.elBtnFullScreen);
1270 + if (!elBtnFullScreen) {
1271 + console.log('No full screen button found');
1272 + return;
1273 + }
1274 + e.preventDefault();
1275 + let elTarget = null;
1276 + const targetSelector = elBtnFullScreen.dataset.targetFullscreen;
1277 + console.log(targetSelector);
1278 + if (targetSelector) {
1279 + elTarget = document.querySelector(targetSelector);
1280 + }
1281 + if (!elTarget) {
1282 + console.log('No target element found');
1283 + return;
1284 + }
1285 + lpToggleFullscreenView(elTarget, elBtnFullScreen);
1286 + }
1287 + }]);
1288 +};
1289 +
787 1290 /***/ },
788 1291
1292 +/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/toastify-js/src/toastify.css"
1293 +/*!*****************************************************************************************!*\
1294 + !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/toastify-js/src/toastify.css ***!
1295 + \*****************************************************************************************/
1296 +(module, __webpack_exports__, __webpack_require__) {
1297 +
1298 +"use strict";
1299 +__webpack_require__.r(__webpack_exports__);
1300 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1301 +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1302 +/* harmony export */ });
1303 +/* 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");
1304 +/* 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__);
1305 +/* 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");
1306 +/* 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__);
1307 +// Imports
1308 +
1309 +
1310 +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()));
1311 +// Module
1312 +___CSS_LOADER_EXPORT___.push([module.id, `/*!
1313 + * Toastify js 1.12.0
1314 + * https://github.com/apvarun/toastify-js
1315 + * @license MIT licensed
1316 + *
1317 + * Copyright (C) 2018 Varun A P
1318 + */
1319 +
1320 +.toastify {
1321 + padding: 12px 20px;
1322 + color: #ffffff;
1323 + display: inline-block;
1324 + box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3);
1325 + background: -webkit-linear-gradient(315deg, #73a5ff, #5477f5);
1326 + background: linear-gradient(135deg, #73a5ff, #5477f5);
1327 + position: fixed;
1328 + opacity: 0;
1329 + transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
1330 + border-radius: 2px;
1331 + cursor: pointer;
1332 + text-decoration: none;
1333 + max-width: calc(50% - 20px);
1334 + z-index: 2147483647;
1335 +}
1336 +
1337 +.toastify.on {
1338 + opacity: 1;
1339 +}
1340 +
1341 +.toast-close {
1342 + background: transparent;
1343 + border: 0;
1344 + color: white;
1345 + cursor: pointer;
1346 + font-family: inherit;
1347 + font-size: 1em;
1348 + opacity: 0.4;
1349 + padding: 0 5px;
1350 +}
1351 +
1352 +.toastify-right {
1353 + right: 15px;
1354 +}
1355 +
1356 +.toastify-left {
1357 + left: 15px;
1358 +}
1359 +
1360 +.toastify-top {
1361 + top: -150px;
1362 +}
1363 +
1364 +.toastify-bottom {
1365 + bottom: -150px;
1366 +}
1367 +
1368 +.toastify-rounded {
1369 + border-radius: 25px;
1370 +}
1371 +
1372 +.toastify-avatar {
1373 + width: 1.5em;
1374 + height: 1.5em;
1375 + margin: -7px 5px;
1376 + border-radius: 2px;
1377 +}
1378 +
1379 +.toastify-center {
1380 + margin-left: auto;
1381 + margin-right: auto;
1382 + left: 0;
1383 + right: 0;
1384 + max-width: fit-content;
1385 + max-width: -moz-fit-content;
1386 +}
1387 +
1388 +@media only screen and (max-width: 360px) {
1389 + .toastify-right, .toastify-left {
1390 + margin-left: auto;
1391 + margin-right: auto;
1392 + left: 0;
1393 + right: 0;
1394 + max-width: fit-content;
1395 + }
1396 +}
1397 +`, "",{"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":""}]);
1398 +// Exports
1399 +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
1400 +
1401 +
1402 +/***/ },
1403 +
1404 +/***/ "./node_modules/css-loader/dist/runtime/api.js"
1405 +/*!*****************************************************!*\
1406 + !*** ./node_modules/css-loader/dist/runtime/api.js ***!
1407 + \*****************************************************/
1408 +(module) {
1409 +
1410 +"use strict";
1411 +
1412 +
1413 +/*
1414 + MIT License http://www.opensource.org/licenses/mit-license.php
1415 + Author Tobias Koppers @sokra
1416 +*/
1417 +module.exports = function (cssWithMappingToString) {
1418 + var list = [];
1419 +
1420 + // return the list of modules as css string
1421 + list.toString = function toString() {
1422 + return this.map(function (item) {
1423 + var content = "";
1424 + var needLayer = typeof item[5] !== "undefined";
1425 + if (item[4]) {
1426 + content += "@supports (".concat(item[4], ") {");
1427 + }
1428 + if (item[2]) {
1429 + content += "@media ".concat(item[2], " {");
1430 + }
1431 + if (needLayer) {
1432 + content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
1433 + }
1434 + content += cssWithMappingToString(item);
1435 + if (needLayer) {
1436 + content += "}";
1437 + }
1438 + if (item[2]) {
1439 + content += "}";
1440 + }
1441 + if (item[4]) {
1442 + content += "}";
1443 + }
1444 + return content;
1445 + }).join("");
1446 + };
1447 +
1448 + // import a list of modules into the list
1449 + list.i = function i(modules, media, dedupe, supports, layer) {
1450 + if (typeof modules === "string") {
1451 + modules = [[null, modules, undefined]];
1452 + }
1453 + var alreadyImportedModules = {};
1454 + if (dedupe) {
1455 + for (var k = 0; k < this.length; k++) {
1456 + var id = this[k][0];
1457 + if (id != null) {
1458 + alreadyImportedModules[id] = true;
1459 + }
1460 + }
1461 + }
1462 + for (var _k = 0; _k < modules.length; _k++) {
1463 + var item = [].concat(modules[_k]);
1464 + if (dedupe && alreadyImportedModules[item[0]]) {
1465 + continue;
1466 + }
1467 + if (typeof layer !== "undefined") {
1468 + if (typeof item[5] === "undefined") {
1469 + item[5] = layer;
1470 + } else {
1471 + item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
1472 + item[5] = layer;
1473 + }
1474 + }
1475 + if (media) {
1476 + if (!item[2]) {
1477 + item[2] = media;
1478 + } else {
1479 + item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
1480 + item[2] = media;
1481 + }
1482 + }
1483 + if (supports) {
1484 + if (!item[4]) {
1485 + item[4] = "".concat(supports);
1486 + } else {
1487 + item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
1488 + item[4] = supports;
1489 + }
1490 + }
1491 + list.push(item);
1492 + }
1493 + };
1494 + return list;
1495 +};
1496 +
1497 +/***/ },
1498 +
1499 +/***/ "./node_modules/css-loader/dist/runtime/sourceMaps.js"
1500 +/*!************************************************************!*\
1501 + !*** ./node_modules/css-loader/dist/runtime/sourceMaps.js ***!
1502 + \************************************************************/
1503 +(module) {
1504 +
1505 +"use strict";
1506 +
1507 +
1508 +module.exports = function (item) {
1509 + var content = item[1];
1510 + var cssMapping = item[3];
1511 + if (!cssMapping) {
1512 + return content;
1513 + }
1514 + if (typeof btoa === "function") {
1515 + var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
1516 + var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
1517 + var sourceMapping = "/*# ".concat(data, " */");
1518 + return [content].concat([sourceMapping]).join("\n");
1519 + }
1520 + return [content].join("\n");
1521 +};
1522 +
1523 +/***/ },
1524 +
1525 +/***/ "./node_modules/toastify-js/src/toastify.css"
1526 +/*!***************************************************!*\
1527 + !*** ./node_modules/toastify-js/src/toastify.css ***!
1528 + \***************************************************/
1529 +(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1530 +
1531 +"use strict";
1532 +__webpack_require__.r(__webpack_exports__);
1533 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1534 +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1535 +/* harmony export */ });
1536 +/* 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");
1537 +/* 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__);
1538 +/* 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");
1539 +/* 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__);
1540 +/* 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");
1541 +/* 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__);
1542 +/* 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");
1543 +/* 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__);
1544 +/* 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");
1545 +/* 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__);
1546 +/* 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");
1547 +/* 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__);
1548 +/* 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");
1549 +
1550 +
1551 +
1552 +
1553 +
1554 +
1555 +
1556 +
1557 +
1558 +
1559 +
1560 +var options = {};
1561 +
1562 +options.styleTagTransform = (_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
1563 +options.setAttributes = (_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
1564 +
1565 + options.insert = _style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
1566 +
1567 +options.domAPI = (_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
1568 +options.insertStyleElement = (_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
1569 +
1570 +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);
1571 +
1572 +
1573 +
1574 +
1575 + /* 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);
1576 +
1577 +
1578 +/***/ },
1579 +
1580 +/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"
1581 +/*!****************************************************************************!*\
1582 + !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
1583 + \****************************************************************************/
1584 +(module) {
1585 +
1586 +"use strict";
1587 +
1588 +
1589 +var stylesInDOM = [];
1590 +function getIndexByIdentifier(identifier) {
1591 + var result = -1;
1592 + for (var i = 0; i < stylesInDOM.length; i++) {
1593 + if (stylesInDOM[i].identifier === identifier) {
1594 + result = i;
1595 + break;
1596 + }
1597 + }
1598 + return result;
1599 +}
1600 +function modulesToDom(list, options) {
1601 + var idCountMap = {};
1602 + var identifiers = [];
1603 + for (var i = 0; i < list.length; i++) {
1604 + var item = list[i];
1605 + var id = options.base ? item[0] + options.base : item[0];
1606 + var count = idCountMap[id] || 0;
1607 + var identifier = "".concat(id, " ").concat(count);
1608 + idCountMap[id] = count + 1;
1609 + var indexByIdentifier = getIndexByIdentifier(identifier);
1610 + var obj = {
1611 + css: item[1],
1612 + media: item[2],
1613 + sourceMap: item[3],
1614 + supports: item[4],
1615 + layer: item[5]
1616 + };
1617 + if (indexByIdentifier !== -1) {
1618 + stylesInDOM[indexByIdentifier].references++;
1619 + stylesInDOM[indexByIdentifier].updater(obj);
1620 + } else {
1621 + var updater = addElementStyle(obj, options);
1622 + options.byIndex = i;
1623 + stylesInDOM.splice(i, 0, {
1624 + identifier: identifier,
1625 + updater: updater,
1626 + references: 1
1627 + });
1628 + }
1629 + identifiers.push(identifier);
1630 + }
1631 + return identifiers;
1632 +}
1633 +function addElementStyle(obj, options) {
1634 + var api = options.domAPI(options);
1635 + api.update(obj);
1636 + var updater = function updater(newObj) {
1637 + if (newObj) {
1638 + if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
1639 + return;
1640 + }
1641 + api.update(obj = newObj);
1642 + } else {
1643 + api.remove();
1644 + }
1645 + };
1646 + return updater;
1647 +}
1648 +module.exports = function (list, options) {
1649 + options = options || {};
1650 + list = list || [];
1651 + var lastIdentifiers = modulesToDom(list, options);
1652 + return function update(newList) {
1653 + newList = newList || [];
1654 + for (var i = 0; i < lastIdentifiers.length; i++) {
1655 + var identifier = lastIdentifiers[i];
1656 + var index = getIndexByIdentifier(identifier);
1657 + stylesInDOM[index].references--;
1658 + }
1659 + var newLastIdentifiers = modulesToDom(newList, options);
1660 + for (var _i = 0; _i < lastIdentifiers.length; _i++) {
1661 + var _identifier = lastIdentifiers[_i];
1662 + var _index = getIndexByIdentifier(_identifier);
1663 + if (stylesInDOM[_index].references === 0) {
1664 + stylesInDOM[_index].updater();
1665 + stylesInDOM.splice(_index, 1);
1666 + }
1667 + }
1668 + lastIdentifiers = newLastIdentifiers;
1669 + };
1670 +};
1671 +
1672 +/***/ },
1673 +
1674 +/***/ "./node_modules/style-loader/dist/runtime/insertBySelector.js"
1675 +/*!********************************************************************!*\
1676 + !*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***!
1677 + \********************************************************************/
1678 +(module) {
1679 +
1680 +"use strict";
1681 +
1682 +
1683 +var memo = {};
1684 +
1685 +/* istanbul ignore next */
1686 +function getTarget(target) {
1687 + if (typeof memo[target] === "undefined") {
1688 + var styleTarget = document.querySelector(target);
1689 +
1690 + // Special case to return head of iframe instead of iframe itself
1691 + if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
1692 + try {
1693 + // This will throw an exception if access to iframe is blocked
1694 + // due to cross-origin restrictions
1695 + styleTarget = styleTarget.contentDocument.head;
1696 + } catch (e) {
1697 + // istanbul ignore next
1698 + styleTarget = null;
1699 + }
1700 + }
1701 + memo[target] = styleTarget;
1702 + }
1703 + return memo[target];
1704 +}
1705 +
1706 +/* istanbul ignore next */
1707 +function insertBySelector(insert, style) {
1708 + var target = getTarget(insert);
1709 + if (!target) {
1710 + throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
1711 + }
1712 + target.appendChild(style);
1713 +}
1714 +module.exports = insertBySelector;
1715 +
1716 +/***/ },
1717 +
1718 +/***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js"
1719 +/*!**********************************************************************!*\
1720 + !*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***!
1721 + \**********************************************************************/
1722 +(module) {
1723 +
1724 +"use strict";
1725 +
1726 +
1727 +/* istanbul ignore next */
1728 +function insertStyleElement(options) {
1729 + var element = document.createElement("style");
1730 + options.setAttributes(element, options.attributes);
1731 + options.insert(element, options.options);
1732 + return element;
1733 +}
1734 +module.exports = insertStyleElement;
1735 +
1736 +/***/ },
1737 +
1738 +/***/ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"
1739 +/*!**********************************************************************************!*\
1740 + !*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!
1741 + \**********************************************************************************/
1742 +(module, __unused_webpack_exports, __webpack_require__) {
1743 +
1744 +"use strict";
1745 +
1746 +
1747 +/* istanbul ignore next */
1748 +function setAttributesWithoutAttributes(styleElement) {
1749 + var nonce = true ? __webpack_require__.nc : 0;
1750 + if (nonce) {
1751 + styleElement.setAttribute("nonce", nonce);
1752 + }
1753 +}
1754 +module.exports = setAttributesWithoutAttributes;
1755 +
1756 +/***/ },
1757 +
1758 +/***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js"
1759 +/*!***************************************************************!*\
1760 + !*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***!
1761 + \***************************************************************/
1762 +(module) {
1763 +
1764 +"use strict";
1765 +
1766 +
1767 +/* istanbul ignore next */
1768 +function apply(styleElement, options, obj) {
1769 + var css = "";
1770 + if (obj.supports) {
1771 + css += "@supports (".concat(obj.supports, ") {");
1772 + }
1773 + if (obj.media) {
1774 + css += "@media ".concat(obj.media, " {");
1775 + }
1776 + var needLayer = typeof obj.layer !== "undefined";
1777 + if (needLayer) {
1778 + css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
1779 + }
1780 + css += obj.css;
1781 + if (needLayer) {
1782 + css += "}";
1783 + }
1784 + if (obj.media) {
1785 + css += "}";
1786 + }
1787 + if (obj.supports) {
1788 + css += "}";
1789 + }
1790 + var sourceMap = obj.sourceMap;
1791 + if (sourceMap && typeof btoa !== "undefined") {
1792 + css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
1793 + }
1794 +
1795 + // For old IE
1796 + /* istanbul ignore if */
1797 + options.styleTagTransform(css, styleElement, options.options);
1798 +}
1799 +function removeStyleElement(styleElement) {
1800 + // istanbul ignore if
1801 + if (styleElement.parentNode === null) {
1802 + return false;
1803 + }
1804 + styleElement.parentNode.removeChild(styleElement);
1805 +}
1806 +
1807 +/* istanbul ignore next */
1808 +function domAPI(options) {
1809 + if (typeof document === "undefined") {
1810 + return {
1811 + update: function update() {},
1812 + remove: function remove() {}
1813 + };
1814 + }
1815 + var styleElement = options.insertStyleElement(options);
1816 + return {
1817 + update: function update(obj) {
1818 + apply(styleElement, options, obj);
1819 + },
1820 + remove: function remove() {
1821 + removeStyleElement(styleElement);
1822 + }
1823 + };
1824 +}
1825 +module.exports = domAPI;
1826 +
1827 +/***/ },
1828 +
1829 +/***/ "./node_modules/style-loader/dist/runtime/styleTagTransform.js"
1830 +/*!*********************************************************************!*\
1831 + !*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***!
1832 + \*********************************************************************/
1833 +(module) {
1834 +
1835 +"use strict";
1836 +
1837 +
1838 +/* istanbul ignore next */
1839 +function styleTagTransform(css, styleElement) {
1840 + if (styleElement.styleSheet) {
1841 + styleElement.styleSheet.cssText = css;
1842 + } else {
1843 + while (styleElement.firstChild) {
1844 + styleElement.removeChild(styleElement.firstChild);
1845 + }
1846 + styleElement.appendChild(document.createTextNode(css));
1847 + }
1848 +}
1849 +module.exports = styleTagTransform;
1850 +
1851 +/***/ },
1852 +
1853 +/***/ "./node_modules/toastify-js/src/toastify.js"
1854 +/*!**************************************************!*\
1855 + !*** ./node_modules/toastify-js/src/toastify.js ***!
1856 + \**************************************************/
1857 +(module) {
1858 +
1859 +/*!
1860 + * Toastify js 1.12.0
1861 + * https://github.com/apvarun/toastify-js
1862 + * @license MIT licensed
1863 + *
1864 + * Copyright (C) 2018 Varun A P
1865 + */
1866 +(function(root, factory) {
1867 + if ( true && module.exports) {
1868 + module.exports = factory();
1869 + } else {
1870 + root.Toastify = factory();
1871 + }
1872 +})(this, function(global) {
1873 + // Object initialization
1874 + var Toastify = function(options) {
1875 + // Returning a new init object
1876 + return new Toastify.lib.init(options);
1877 + },
1878 + // Library version
1879 + version = "1.12.0";
1880 +
1881 + // Set the default global options
1882 + Toastify.defaults = {
1883 + oldestFirst: true,
1884 + text: "Toastify is awesome!",
1885 + node: undefined,
1886 + duration: 3000,
1887 + selector: undefined,
1888 + callback: function () {
1889 + },
1890 + destination: undefined,
1891 + newWindow: false,
1892 + close: false,
1893 + gravity: "toastify-top",
1894 + positionLeft: false,
1895 + position: '',
1896 + backgroundColor: '',
1897 + avatar: "",
1898 + className: "",
1899 + stopOnFocus: true,
1900 + onClick: function () {
1901 + },
1902 + offset: {x: 0, y: 0},
1903 + escapeMarkup: true,
1904 + ariaLive: 'polite',
1905 + style: {background: ''}
1906 + };
1907 +
1908 + // Defining the prototype of the object
1909 + Toastify.lib = Toastify.prototype = {
1910 + toastify: version,
1911 +
1912 + constructor: Toastify,
1913 +
1914 + // Initializing the object with required parameters
1915 + init: function(options) {
1916 + // Verifying and validating the input object
1917 + if (!options) {
1918 + options = {};
1919 + }
1920 +
1921 + // Creating the options object
1922 + this.options = {};
1923 +
1924 + this.toastElement = null;
1925 +
1926 + // Validating the options
1927 + this.options.text = options.text || Toastify.defaults.text; // Display message
1928 + this.options.node = options.node || Toastify.defaults.node; // Display content as node
1929 + this.options.duration = options.duration === 0 ? 0 : options.duration || Toastify.defaults.duration; // Display duration
1930 + this.options.selector = options.selector || Toastify.defaults.selector; // Parent selector
1931 + this.options.callback = options.callback || Toastify.defaults.callback; // Callback after display
1932 + this.options.destination = options.destination || Toastify.defaults.destination; // On-click destination
1933 + this.options.newWindow = options.newWindow || Toastify.defaults.newWindow; // Open destination in new window
1934 + this.options.close = options.close || Toastify.defaults.close; // Show toast close icon
1935 + this.options.gravity = options.gravity === "bottom" ? "toastify-bottom" : Toastify.defaults.gravity; // toast position - top or bottom
1936 + this.options.positionLeft = options.positionLeft || Toastify.defaults.positionLeft; // toast position - left or right
1937 + this.options.position = options.position || Toastify.defaults.position; // toast position - left or right
1938 + this.options.backgroundColor = options.backgroundColor || Toastify.defaults.backgroundColor; // toast background color
1939 + this.options.avatar = options.avatar || Toastify.defaults.avatar; // img element src - url or a path
1940 + this.options.className = options.className || Toastify.defaults.className; // additional class names for the toast
1941 + this.options.stopOnFocus = options.stopOnFocus === undefined ? Toastify.defaults.stopOnFocus : options.stopOnFocus; // stop timeout on focus
1942 + this.options.onClick = options.onClick || Toastify.defaults.onClick; // Callback after click
1943 + this.options.offset = options.offset || Toastify.defaults.offset; // toast offset
1944 + this.options.escapeMarkup = options.escapeMarkup !== undefined ? options.escapeMarkup : Toastify.defaults.escapeMarkup;
1945 + this.options.ariaLive = options.ariaLive || Toastify.defaults.ariaLive;
1946 + this.options.style = options.style || Toastify.defaults.style;
1947 + if(options.backgroundColor) {
1948 + this.options.style.background = options.backgroundColor;
1949 + }
1950 +
1951 + // Returning the current object for chaining functions
1952 + return this;
1953 + },
1954 +
1955 + // Building the DOM element
1956 + buildToast: function() {
1957 + // Validating if the options are defined
1958 + if (!this.options) {
1959 + throw "Toastify is not initialized";
1960 + }
1961 +
1962 + // Creating the DOM object
1963 + var divElement = document.createElement("div");
1964 + divElement.className = "toastify on " + this.options.className;
1965 +
1966 + // Positioning toast to left or right or center
1967 + if (!!this.options.position) {
1968 + divElement.className += " toastify-" + this.options.position;
1969 + } else {
1970 + // To be depreciated in further versions
1971 + if (this.options.positionLeft === true) {
1972 + divElement.className += " toastify-left";
1973 + console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.')
1974 + } else {
1975 + // Default position
1976 + divElement.className += " toastify-right";
1977 + }
1978 + }
1979 +
1980 + // Assigning gravity of element
1981 + divElement.className += " " + this.options.gravity;
1982 +
1983 + if (this.options.backgroundColor) {
1984 + // This is being deprecated in favor of using the style HTML DOM property
1985 + console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');
1986 + }
1987 +
1988 + // Loop through our style object and apply styles to divElement
1989 + for (var property in this.options.style) {
1990 + divElement.style[property] = this.options.style[property];
1991 + }
1992 +
1993 + // Announce the toast to screen readers
1994 + if (this.options.ariaLive) {
1995 + divElement.setAttribute('aria-live', this.options.ariaLive)
1996 + }
1997 +
1998 + // Adding the toast message/node
1999 + if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) {
2000 + // If we have a valid node, we insert it
2001 + divElement.appendChild(this.options.node)
2002 + } else {
2003 + if (this.options.escapeMarkup) {
2004 + divElement.innerText = this.options.text;
2005 + } else {
2006 + divElement.innerHTML = this.options.text;
2007 + }
2008 +
2009 + if (this.options.avatar !== "") {
2010 + var avatarElement = document.createElement("img");
2011 + avatarElement.src = this.options.avatar;
2012 +
2013 + avatarElement.className = "toastify-avatar";
2014 +
2015 + if (this.options.position == "left" || this.options.positionLeft === true) {
2016 + // Adding close icon on the left of content
2017 + divElement.appendChild(avatarElement);
2018 + } else {
2019 + // Adding close icon on the right of content
2020 + divElement.insertAdjacentElement("afterbegin", avatarElement);
2021 + }
2022 + }
2023 + }
2024 +
2025 + // Adding a close icon to the toast
2026 + if (this.options.close === true) {
2027 + // Create a span for close element
2028 + var closeElement = document.createElement("button");
2029 + closeElement.type = "button";
2030 + closeElement.setAttribute("aria-label", "Close");
2031 + closeElement.className = "toast-close";
2032 + closeElement.innerHTML = "&#10006;";
2033 +
2034 + // Triggering the removal of toast from DOM on close click
2035 + closeElement.addEventListener(
2036 + "click",
2037 + function(event) {
2038 + event.stopPropagation();
2039 + this.removeElement(this.toastElement);
2040 + window.clearTimeout(this.toastElement.timeOutValue);
2041 + }.bind(this)
2042 + );
2043 +
2044 + //Calculating screen width
2045 + var width = window.innerWidth > 0 ? window.innerWidth : screen.width;
2046 +
2047 + // Adding the close icon to the toast element
2048 + // Display on the right if screen width is less than or equal to 360px
2049 + if ((this.options.position == "left" || this.options.positionLeft === true) && width > 360) {
2050 + // Adding close icon on the left of content
2051 + divElement.insertAdjacentElement("afterbegin", closeElement);
2052 + } else {
2053 + // Adding close icon on the right of content
2054 + divElement.appendChild(closeElement);
2055 + }
2056 + }
2057 +
2058 + // Clear timeout while toast is focused
2059 + if (this.options.stopOnFocus && this.options.duration > 0) {
2060 + var self = this;
2061 + // stop countdown
2062 + divElement.addEventListener(
2063 + "mouseover",
2064 + function(event) {
2065 + window.clearTimeout(divElement.timeOutValue);
2066 + }
2067 + )
2068 + // add back the timeout
2069 + divElement.addEventListener(
2070 + "mouseleave",
2071 + function() {
2072 + divElement.timeOutValue = window.setTimeout(
2073 + function() {
2074 + // Remove the toast from DOM
2075 + self.removeElement(divElement);
2076 + },
2077 + self.options.duration
2078 + )
2079 + }
2080 + )
2081 + }
2082 +
2083 + // Adding an on-click destination path
2084 + if (typeof this.options.destination !== "undefined") {
2085 + divElement.addEventListener(
2086 + "click",
2087 + function(event) {
2088 + event.stopPropagation();
2089 + if (this.options.newWindow === true) {
2090 + window.open(this.options.destination, "_blank");
2091 + } else {
2092 + window.location = this.options.destination;
2093 + }
2094 + }.bind(this)
2095 + );
2096 + }
2097 +
2098 + if (typeof this.options.onClick === "function" && typeof this.options.destination === "undefined") {
2099 + divElement.addEventListener(
2100 + "click",
2101 + function(event) {
2102 + event.stopPropagation();
2103 + this.options.onClick();
2104 + }.bind(this)
2105 + );
2106 + }
2107 +
2108 + // Adding offset
2109 + if(typeof this.options.offset === "object") {
2110 +
2111 + var x = getAxisOffsetAValue("x", this.options);
2112 + var y = getAxisOffsetAValue("y", this.options);
2113 +
2114 + var xOffset = this.options.position == "left" ? x : "-" + x;
2115 + var yOffset = this.options.gravity == "toastify-top" ? y : "-" + y;
2116 +
2117 + divElement.style.transform = "translate(" + xOffset + "," + yOffset + ")";
2118 +
2119 + }
2120 +
2121 + // Returning the generated element
2122 + return divElement;
2123 + },
2124 +
2125 + // Displaying the toast
2126 + showToast: function() {
2127 + // Creating the DOM object for the toast
2128 + this.toastElement = this.buildToast();
2129 +
2130 + // Getting the root element to with the toast needs to be added
2131 + var rootElement;
2132 + if (typeof this.options.selector === "string") {
2133 + rootElement = document.getElementById(this.options.selector);
2134 + } else if (this.options.selector instanceof HTMLElement || (typeof ShadowRoot !== 'undefined' && this.options.selector instanceof ShadowRoot)) {
2135 + rootElement = this.options.selector;
2136 + } else {
2137 + rootElement = document.body;
2138 + }
2139 +
2140 + // Validating if root element is present in DOM
2141 + if (!rootElement) {
2142 + throw "Root element is not defined";
2143 + }
2144 +
2145 + // Adding the DOM element
2146 + var elementToInsert = Toastify.defaults.oldestFirst ? rootElement.firstChild : rootElement.lastChild;
2147 + rootElement.insertBefore(this.toastElement, elementToInsert);
2148 +
2149 + // Repositioning the toasts in case multiple toasts are present
2150 + Toastify.reposition();
2151 +
2152 + if (this.options.duration > 0) {
2153 + this.toastElement.timeOutValue = window.setTimeout(
2154 + function() {
2155 + // Remove the toast from DOM
2156 + this.removeElement(this.toastElement);
2157 + }.bind(this),
2158 + this.options.duration
2159 + ); // Binding `this` for function invocation
2160 + }
2161 +
2162 + // Supporting function chaining
2163 + return this;
2164 + },
2165 +
2166 + hideToast: function() {
2167 + if (this.toastElement.timeOutValue) {
2168 + clearTimeout(this.toastElement.timeOutValue);
2169 + }
2170 + this.removeElement(this.toastElement);
2171 + },
2172 +
2173 + // Removing the element from the DOM
2174 + removeElement: function(toastElement) {
2175 + // Hiding the element
2176 + // toastElement.classList.remove("on");
2177 + toastElement.className = toastElement.className.replace(" on", "");
2178 +
2179 + // Removing the element from DOM after transition end
2180 + window.setTimeout(
2181 + function() {
2182 + // remove options node if any
2183 + if (this.options.node && this.options.node.parentNode) {
2184 + this.options.node.parentNode.removeChild(this.options.node);
2185 + }
2186 +
2187 + // Remove the element from the DOM, only when the parent node was not removed before.
2188 + if (toastElement.parentNode) {
2189 + toastElement.parentNode.removeChild(toastElement);
2190 + }
2191 +
2192 + // Calling the callback function
2193 + this.options.callback.call(toastElement);
2194 +
2195 + // Repositioning the toasts again
2196 + Toastify.reposition();
2197 + }.bind(this),
2198 + 400
2199 + ); // Binding `this` for function invocation
2200 + },
2201 + };
2202 +
2203 + // Positioning the toasts on the DOM
2204 + Toastify.reposition = function() {
2205 +
2206 + // Top margins with gravity
2207 + var topLeftOffsetSize = {
2208 + top: 15,
2209 + bottom: 15,
2210 + };
2211 + var topRightOffsetSize = {
2212 + top: 15,
2213 + bottom: 15,
2214 + };
2215 + var offsetSize = {
2216 + top: 15,
2217 + bottom: 15,
2218 + };
2219 +
2220 + // Get all toast messages on the DOM
2221 + var allToasts = document.getElementsByClassName("toastify");
2222 +
2223 + var classUsed;
2224 +
2225 + // Modifying the position of each toast element
2226 + for (var i = 0; i < allToasts.length; i++) {
2227 + // Getting the applied gravity
2228 + if (containsClass(allToasts[i], "toastify-top") === true) {
2229 + classUsed = "toastify-top";
2230 + } else {
2231 + classUsed = "toastify-bottom";
2232 + }
2233 +
2234 + var height = allToasts[i].offsetHeight;
2235 + classUsed = classUsed.substr(9, classUsed.length-1)
2236 + // Spacing between toasts
2237 + var offset = 15;
2238 +
2239 + var width = window.innerWidth > 0 ? window.innerWidth : screen.width;
2240 +
2241 + // Show toast in center if screen with less than or equal to 360px
2242 + if (width <= 360) {
2243 + // Setting the position
2244 + allToasts[i].style[classUsed] = offsetSize[classUsed] + "px";
2245 +
2246 + offsetSize[classUsed] += height + offset;
2247 + } else {
2248 + if (containsClass(allToasts[i], "toastify-left") === true) {
2249 + // Setting the position
2250 + allToasts[i].style[classUsed] = topLeftOffsetSize[classUsed] + "px";
2251 +
2252 + topLeftOffsetSize[classUsed] += height + offset;
2253 + } else {
2254 + // Setting the position
2255 + allToasts[i].style[classUsed] = topRightOffsetSize[classUsed] + "px";
2256 +
2257 + topRightOffsetSize[classUsed] += height + offset;
2258 + }
2259 + }
2260 + }
2261 +
2262 + // Supporting function chaining
2263 + return this;
2264 + };
2265 +
2266 + // Helper function to get offset.
2267 + function getAxisOffsetAValue(axis, options) {
2268 +
2269 + if(options.offset[axis]) {
2270 + if(isNaN(options.offset[axis])) {
2271 + return options.offset[axis];
2272 + }
2273 + else {
2274 + return options.offset[axis] + 'px';
2275 + }
2276 + }
2277 +
2278 + return '0px';
2279 +
2280 + }
2281 +
2282 + function containsClass(elem, yourClass) {
2283 + if (!elem || typeof yourClass !== "string") {
2284 + return false;
2285 + } else if (
2286 + elem.className &&
2287 + elem.className
2288 + .trim()
2289 + .split(/\s+/gi)
2290 + .indexOf(yourClass) > -1
2291 + ) {
2292 + return true;
2293 + } else {
2294 + return false;
2295 + }
2296 + }
2297 +
2298 + // Setting up the prototype for the init object
2299 + Toastify.lib.init.prototype = Toastify.lib;
2300 +
2301 + // Returning the Toastify function to be assigned to the window object/module
2302 + return Toastify;
2303 +});
2304 +
2305 +
2306 +/***/ },
2307 +
789 2308 /***/ "./node_modules/@orchidjs/sifter/dist/esm/sifter.js"
790 2309 /*!**********************************************************!*\
791 2310 !*** ./node_modules/@orchidjs/sifter/dist/esm/sifter.js ***!
792 2311 \**********************************************************/
@@ -791,8 +2310,9 @@
791 2310 !*** ./node_modules/@orchidjs/sifter/dist/esm/sifter.js ***!
792 2311 \**********************************************************/
793 2312 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
794 2313
2314 +"use strict";
795 2315 __webpack_require__.r(__webpack_exports__);
796 2316 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
797 2317 /* harmony export */ Sifter: () => (/* binding */ Sifter),
798 2318 /* harmony export */ cmp: () => (/* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_0__.cmp),
@@ -1118,8 +2638,9 @@
1118 2638 !*** ./node_modules/@orchidjs/sifter/dist/esm/types.js ***!
1119 2639 \*********************************************************/
1120 2640 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1121 2641
2642 +"use strict";
1122 2643 __webpack_require__.r(__webpack_exports__);
1123 2644
1124 2645 //# sourceMappingURL=types.js.map
1125 2646
@@ -1130,8 +2651,9 @@
1130 2651 !*** ./node_modules/@orchidjs/sifter/dist/esm/utils.js ***!
1131 2652 \*********************************************************/
1132 2653 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1133 2654
2655 +"use strict";
1134 2656 __webpack_require__.r(__webpack_exports__);
1135 2657 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1136 2658 /* harmony export */ cmp: () => (/* binding */ cmp),
1137 2659 /* harmony export */ getAttr: () => (/* binding */ getAttr),
@@ -1242,8 +2764,9 @@
1242 2764 !*** ./node_modules/@orchidjs/unicode-variants/dist/esm/index.js ***!
1243 2765 \*******************************************************************/
1244 2766 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1245 2767
2768 +"use strict";
1246 2769 __webpack_require__.r(__webpack_exports__);
1247 2770 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1248 2771 /* harmony export */ _asciifold: () => (/* binding */ _asciifold),
1249 2772 /* harmony export */ asciifold: () => (/* binding */ asciifold),
@@ -1645,8 +3168,9 @@
1645 3168 !*** ./node_modules/@orchidjs/unicode-variants/dist/esm/regex.js ***!
1646 3169 \*******************************************************************/
1647 3170 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1648 3171
3172 +"use strict";
1649 3173 __webpack_require__.r(__webpack_exports__);
1650 3174 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1651 3175 /* harmony export */ arrayToPattern: () => (/* binding */ arrayToPattern),
1652 3176 /* harmony export */ escape_regex: () => (/* binding */ escape_regex),
@@ -1730,8 +3254,9 @@
1730 3254 !*** ./node_modules/@orchidjs/unicode-variants/dist/esm/strings.js ***!
1731 3255 \*********************************************************************/
1732 3256 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1733 3257
3258 +"use strict";
1734 3259 __webpack_require__.r(__webpack_exports__);
1735 3260 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1736 3261 /* harmony export */ allSubstrings: () => (/* binding */ allSubstrings)
1737 3262 /* harmony export */ });
@@ -1764,8 +3289,9 @@
1764 3289 !*** ./node_modules/tom-select/dist/esm/constants.js ***!
1765 3290 \*******************************************************/
1766 3291 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1767 3292
3293 +"use strict";
1768 3294 __webpack_require__.r(__webpack_exports__);
1769 3295 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1770 3296 /* harmony export */ IS_MAC: () => (/* binding */ IS_MAC),
1771 3297 /* harmony export */ KEY_A: () => (/* binding */ KEY_A),
@@ -1801,8 +3327,9 @@
1801 3327 !*** ./node_modules/tom-select/dist/esm/contrib/highlight.js ***!
1802 3328 \***************************************************************/
1803 3329 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1804 3330
3331 +"use strict";
1805 3332 __webpack_require__.r(__webpack_exports__);
1806 3333 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1807 3334 /* harmony export */ highlight: () => (/* binding */ highlight),
1808 3335 /* harmony export */ removeHighlight: () => (/* binding */ removeHighlight)
@@ -1880,8 +3407,9 @@
1880 3407 !*** ./node_modules/tom-select/dist/esm/contrib/microevent.js ***!
1881 3408 \****************************************************************/
1882 3409 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1883 3410
3411 +"use strict";
1884 3412 __webpack_require__.r(__webpack_exports__);
1885 3413 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1886 3414 /* harmony export */ "default": () => (/* binding */ MicroEvent)
1887 3415 /* harmony export */ });
@@ -1954,8 +3482,9 @@
1954 3482 !*** ./node_modules/tom-select/dist/esm/contrib/microplugin.js ***!
1955 3483 \*****************************************************************/
1956 3484 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1957 3485
3486 +"use strict";
1958 3487 __webpack_require__.r(__webpack_exports__);
1959 3488 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1960 3489 /* harmony export */ "default": () => (/* binding */ MicroPlugin)
1961 3490 /* harmony export */ });
@@ -2076,8 +3605,9 @@
2076 3605 !*** ./node_modules/tom-select/dist/esm/defaults.js ***!
2077 3606 \******************************************************/
2078 3607 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2079 3608
3609 +"use strict";
2080 3610 __webpack_require__.r(__webpack_exports__);
2081 3611 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2082 3612 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2083 3613 /* harmony export */ });
@@ -2091,8 +3621,9 @@
2091 3621 diacritics: true,
2092 3622 create: null,
2093 3623 createOnBlur: false,
2094 3624 createFilter: null,
3625 + clearAfterSelect: false,
2095 3626 highlight: true,
2096 3627 openOnFocus: true,
2097 3628 shouldOpen: null,
2098 3629 maxOptions: 50,
@@ -2171,8 +3702,9 @@
2171 3702 !*** ./node_modules/tom-select/dist/esm/getSettings.js ***!
2172 3703 \*********************************************************/
2173 3704 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2174 3705
3706 +"use strict";
2175 3707 __webpack_require__.r(__webpack_exports__);
2176 3708 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2177 3709 /* harmony export */ "default": () => (/* binding */ getSettings)
2178 3710 /* harmony export */ });
@@ -2289,11 +3821,12 @@
2289 3821 * Initialize from a <input type="text"> element.
2290 3822 *
2291 3823 */
2292 3824 var init_textbox = () => {
3825 + var _a, _b;
2293 3826 const data_raw = input.getAttribute(attr_data);
2294 3827 if (!data_raw) {
2295 - var value = input.value.trim() || '';
3828 + var value = (_b = (_a = input === null || input === void 0 ? void 0 : input.value) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '';
2296 3829 if (!settings.allowEmptyOption && !value.length)
2297 3830 return;
2298 3831 const values = value.split(settings.delimiter);
2299 3832 (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.iterate)(values, (value) => {
@@ -2329,14 +3862,15 @@
2329 3862 !*** ./node_modules/tom-select/dist/esm/plugins/caret_position/plugin.js ***!
2330 3863 \***************************************************************************/
2331 3864 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2332 3865
3866 +"use strict";
2333 3867 __webpack_require__.r(__webpack_exports__);
2334 3868 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2335 3869 /* harmony export */ "default": () => (/* binding */ plugin)
2336 3870 /* harmony export */ });
2337 3871 /**
2338 -* Tom Select v2.4.3
3872 +* Tom Select v2.6.2
2339 3873 * Licensed under the Apache License, Version 2.0 (the "License");
2340 3874 */
2341 3875
2342 3876 /**
@@ -2506,14 +4040,15 @@
2506 4040 !*** ./node_modules/tom-select/dist/esm/plugins/change_listener/plugin.js ***!
2507 4041 \****************************************************************************/
2508 4042 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2509 4043
4044 +"use strict";
2510 4045 __webpack_require__.r(__webpack_exports__);
2511 4046 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2512 4047 /* harmony export */ "default": () => (/* binding */ plugin)
2513 4048 /* harmony export */ });
2514 4049 /**
2515 -* Tom Select v2.4.3
4050 +* Tom Select v2.6.2
2516 4051 * Licensed under the Apache License, Version 2.0 (the "License");
2517 4052 */
2518 4053
2519 4054 /**
@@ -2571,14 +4106,15 @@
2571 4106 !*** ./node_modules/tom-select/dist/esm/plugins/checkbox_options/plugin.js ***!
2572 4107 \*****************************************************************************/
2573 4108 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2574 4109
4110 +"use strict";
2575 4111 __webpack_require__.r(__webpack_exports__);
2576 4112 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2577 4113 /* harmony export */ "default": () => (/* binding */ plugin)
2578 4114 /* harmony export */ });
2579 4115 /**
2580 -* Tom Select v2.4.3
4116 +* Tom Select v2.6.2
2581 4117 * Licensed under the Apache License, Version 2.0 (the "License");
2582 4118 */
2583 4119
2584 4120 /**
@@ -2764,14 +4300,15 @@
2764 4300 !*** ./node_modules/tom-select/dist/esm/plugins/clear_button/plugin.js ***!
2765 4301 \*************************************************************************/
2766 4302 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2767 4303
4304 +"use strict";
2768 4305 __webpack_require__.r(__webpack_exports__);
2769 4306 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2770 4307 /* harmony export */ "default": () => (/* binding */ plugin)
2771 4308 /* harmony export */ });
2772 4309 /**
2773 -* Tom Select v2.4.3
4310 +* Tom Select v2.6.2
2774 4311 * Licensed under the Apache License, Version 2.0 (the "License");
2775 4312 */
2776 4313
2777 4314 /**
@@ -2820,10 +4357,12 @@
2820 4357 const self = this;
2821 4358 const options = Object.assign({
2822 4359 className: 'clear-button',
2823 4360 title: 'Clear All',
4361 + role: 'button',
4362 + tabindex: 0,
2824 4363 html: data => {
2825 - return `<div class="${data.className}" title="${data.title}">&#10799;</div>`;
4364 + return `<div class="${data.className}" title="${data.title}" role="${data.role}" tabindex="${data.tabindex}">&times;</div>`;
2826 4365 }
2827 4366 }, userOptions);
2828 4367 self.on('initialize', () => {
2829 4368 var button = getDom(options.html(options));
@@ -2832,8 +4371,9 @@
2832 4371 self.clear();
2833 4372 if (self.settings.mode === 'single' && self.settings.allowEmptyOption) {
2834 4373 self.addItem('');
2835 4374 }
4375 + self.refreshOptions(false);
2836 4376 evt.preventDefault();
2837 4377 evt.stopPropagation();
2838 4378 });
2839 4379 self.control.appendChild(button);
@@ -2851,14 +4391,15 @@
2851 4391 !*** ./node_modules/tom-select/dist/esm/plugins/drag_drop/plugin.js ***!
2852 4392 \**********************************************************************/
2853 4393 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
2854 4394
4395 +"use strict";
2855 4396 __webpack_require__.r(__webpack_exports__);
2856 4397 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2857 4398 /* harmony export */ "default": () => (/* binding */ plugin)
2858 4399 /* harmony export */ });
2859 4400 /**
2860 -* Tom Select v2.4.3
4401 +* Tom Select v2.6.2
2861 4402 * Licensed under the Apache License, Version 2.0 (the "License");
2862 4403 */
2863 4404
2864 4405 /**
@@ -3085,14 +4626,15 @@
3085 4626 !*** ./node_modules/tom-select/dist/esm/plugins/dropdown_header/plugin.js ***!
3086 4627 \****************************************************************************/
3087 4628 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3088 4629
4630 +"use strict";
3089 4631 __webpack_require__.r(__webpack_exports__);
3090 4632 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3091 4633 /* harmony export */ "default": () => (/* binding */ plugin)
3092 4634 /* harmony export */ });
3093 4635 /**
3094 -* Tom Select v2.4.3
4636 +* Tom Select v2.6.2
3095 4637 * Licensed under the Apache License, Version 2.0 (the "License");
3096 4638 */
3097 4639
3098 4640 /**
@@ -3201,14 +4743,15 @@
3201 4743 !*** ./node_modules/tom-select/dist/esm/plugins/dropdown_input/plugin.js ***!
3202 4744 \***************************************************************************/
3203 4745 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3204 4746
4747 +"use strict";
3205 4748 __webpack_require__.r(__webpack_exports__);
3206 4749 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3207 4750 /* harmony export */ "default": () => (/* binding */ plugin)
3208 4751 /* harmony export */ });
3209 4752 /**
3210 -* Tom Select v2.4.3
4753 +* Tom Select v2.6.2
3211 4754 * Licensed under the Apache License, Version 2.0 (the "License");
3212 4755 */
3213 4756
3214 4757 const KEY_ESC = 27;
@@ -3361,8 +4904,9 @@
3361 4904 const self = this;
3362 4905 self.settings.shouldOpen = true; // make sure the input is shown even if there are no options to display in the dropdown
3363 4906
3364 4907 self.hook('before', 'setup', () => {
4908 + var _self$input;
3365 4909 self.focus_node = self.control;
3366 4910 addClasses(self.control_input, 'dropdown-input');
3367 4911 const div = getDom('<div class="dropdown-input-wrap">');
3368 4912 div.append(self.control_input);
@@ -3371,8 +4915,17 @@
3371 4915 // set a placeholder in the select control
3372 4916 const placeholder = getDom('<input class="items-placeholder" tabindex="-1" />');
3373 4917 placeholder.placeholder = self.settings.placeholder || '';
3374 4918 self.control.append(placeholder);
4919 + /**
4920 + * TomSelect renders a custom control with a focusable <input class="items-placeholder">.
4921 + * The source <select>'s aria-label is not automatically propagated to that input,
4922 + * which triggers "Missing form label" accessibility warnings.
4923 + * This helper copies the label from the <select> onto the generated input.
4924 + */
4925 + const label = (_self$input = self.input) == null ? void 0 : _self$input.getAttribute('aria-label');
4926 + if (!label) return;
4927 + placeholder.setAttribute('aria-label', label);
3375 4928 });
3376 4929 self.on('initialize', () => {
3377 4930 // set tabIndex on control to -1, otherwise [shift+tab] will put focus right back on control_input
3378 4931 self.control_input.addEventListener('keydown', evt => {
@@ -3429,14 +4982,15 @@
3429 4982 !*** ./node_modules/tom-select/dist/esm/plugins/input_autogrow/plugin.js ***!
3430 4983 \***************************************************************************/
3431 4984 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3432 4985
4986 +"use strict";
3433 4987 __webpack_require__.r(__webpack_exports__);
3434 4988 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3435 4989 /* harmony export */ "default": () => (/* binding */ plugin)
3436 4990 /* harmony export */ });
3437 4991 /**
3438 -* Tom Select v2.4.3
4992 +* Tom Select v2.6.2
3439 4993 * Licensed under the Apache License, Version 2.0 (the "License");
3440 4994 */
3441 4995
3442 4996 /**
@@ -3517,14 +5071,15 @@
3517 5071 !*** ./node_modules/tom-select/dist/esm/plugins/no_active_items/plugin.js ***!
3518 5072 \****************************************************************************/
3519 5073 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3520 5074
5075 +"use strict";
3521 5076 __webpack_require__.r(__webpack_exports__);
3522 5077 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3523 5078 /* harmony export */ "default": () => (/* binding */ plugin)
3524 5079 /* harmony export */ });
3525 5080 /**
3526 -* Tom Select v2.4.3
5081 +* Tom Select v2.6.2
3527 5082 * Licensed under the Apache License, Version 2.0 (the "License");
3528 5083 */
3529 5084
3530 5085 /**
@@ -3557,14 +5112,15 @@
3557 5112 !*** ./node_modules/tom-select/dist/esm/plugins/no_backspace_delete/plugin.js ***!
3558 5113 \********************************************************************************/
3559 5114 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3560 5115
5116 +"use strict";
3561 5117 __webpack_require__.r(__webpack_exports__);
3562 5118 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3563 5119 /* harmony export */ "default": () => (/* binding */ plugin)
3564 5120 /* harmony export */ });
3565 5121 /**
3566 -* Tom Select v2.4.3
5122 +* Tom Select v2.6.2
3567 5123 * Licensed under the Apache License, Version 2.0 (the "License");
3568 5124 */
3569 5125
3570 5126 /**
@@ -3603,14 +5159,15 @@
3603 5159 !*** ./node_modules/tom-select/dist/esm/plugins/optgroup_columns/plugin.js ***!
3604 5160 \*****************************************************************************/
3605 5161 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3606 5162
5163 +"use strict";
3607 5164 __webpack_require__.r(__webpack_exports__);
3608 5165 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3609 5166 /* harmony export */ "default": () => (/* binding */ plugin)
3610 5167 /* harmony export */ });
3611 5168 /**
3612 -* Tom Select v2.4.3
5169 +* Tom Select v2.6.2
3613 5170 * Licensed under the Apache License, Version 2.0 (the "License");
3614 5171 */
3615 5172
3616 5173 const KEY_LEFT = 37;
@@ -3703,14 +5260,15 @@
3703 5260 !*** ./node_modules/tom-select/dist/esm/plugins/remove_button/plugin.js ***!
3704 5261 \**************************************************************************/
3705 5262 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3706 5263
5264 +"use strict";
3707 5265 __webpack_require__.r(__webpack_exports__);
3708 5266 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3709 5267 /* harmony export */ "default": () => (/* binding */ plugin)
3710 5268 /* harmony export */ });
3711 5269 /**
3712 -* Tom Select v2.4.3
5270 +* Tom Select v2.6.2
3713 5271 * Licensed under the Apache License, Version 2.0 (the "License");
3714 5272 */
3715 5273
3716 5274 /**
@@ -3728,16 +5286,8 @@
3728 5286 *
3729 5287 */
3730 5288
3731 5289 /**
3732 - * Escapes a string for use within HTML.
3733 - *
3734 - */
3735 -const escape_html = str => {
3736 - return (str + '').replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
3737 -};
3738 -
3739 -/**
3740 5290 * Prevent default
3741 5291 *
3742 5292 */
3743 5293 const preventDefault = (evt, stop = false) => {
@@ -3799,28 +5349,31 @@
3799 5349 *
3800 5350 */
3801 5351
3802 5352 function plugin (userOptions) {
5353 + const self = this;
3803 5354 const options = Object.assign({
3804 - label: '&times;',
5355 + label: '×',
3805 5356 title: 'Remove',
3806 5357 className: 'remove',
3807 - append: true
5358 + tabindex: -1,
5359 + role: 'button',
5360 + html: data => {
5361 + var _data$tabindex;
5362 + const el = document.createElement('div');
5363 + el.className = data.className || '';
5364 + el.title = data.title || '';
5365 + el.setAttribute('role', data.role || 'button');
5366 + el.tabIndex = (_data$tabindex = data.tabindex) != null ? _data$tabindex : -1;
5367 + el.textContent = data.label || '';
5368 + return el;
5369 + }
3808 5370 }, userOptions);
3809 -
3810 - //options.className = 'remove-single';
3811 - var self = this;
3812 -
3813 - // override the render method to add remove button to each item
3814 - if (!options.append) {
3815 - return;
3816 - }
3817 - var html = '<a href="javascript:void(0)" class="' + options.className + '" tabindex="-1" title="' + escape_html(options.title) + '">' + options.label + '</a>';
3818 5371 self.hook('after', 'setupTemplates', () => {
3819 5372 var orig_render_item = self.settings.render.item;
3820 5373 self.settings.render.item = (data, escape) => {
3821 5374 var item = getDom(orig_render_item.call(self, data, escape));
3822 - var close_button = getDom(html);
5375 + var close_button = getDom(options.html(options));
3823 5376 item.appendChild(close_button);
3824 5377 addEvent(close_button, 'mousedown', evt => {
3825 5378 preventDefault(evt, true);
3826 5379 });
@@ -3851,14 +5404,15 @@
3851 5404 !*** ./node_modules/tom-select/dist/esm/plugins/restore_on_backspace/plugin.js ***!
3852 5405 \*********************************************************************************/
3853 5406 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3854 5407
5408 +"use strict";
3855 5409 __webpack_require__.r(__webpack_exports__);
3856 5410 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3857 5411 /* harmony export */ "default": () => (/* binding */ plugin)
3858 5412 /* harmony export */ });
3859 5413 /**
3860 -* Tom Select v2.4.3
5414 +* Tom Select v2.6.2
3861 5415 * Licensed under the Apache License, Version 2.0 (the "License");
3862 5416 */
3863 5417
3864 5418 /**
@@ -3907,14 +5461,15 @@
3907 5461 !*** ./node_modules/tom-select/dist/esm/plugins/virtual_scroll/plugin.js ***!
3908 5462 \***************************************************************************/
3909 5463 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3910 5464
5465 +"use strict";
3911 5466 __webpack_require__.r(__webpack_exports__);
3912 5467 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3913 5468 /* harmony export */ "default": () => (/* binding */ plugin)
3914 5469 /* harmony export */ });
3915 5470 /**
3916 -* Tom Select v2.4.3
5471 +* Tom Select v2.6.2
3917 5472 * Licensed under the Apache License, Version 2.0 (the "License");
3918 5473 */
3919 5474
3920 5475 /**
@@ -3996,9 +5551,9 @@
3996 5551 return arg;
3997 5552 };
3998 5553
3999 5554 /**
4000 - * Plugin: "restore_on_backspace" (Tom Select)
5555 + * Plugin: "virtual_scroll" (Tom Select)
4001 5556 * Copyright (c) contributors
4002 5557 *
4003 5558 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
4004 5559 * file except in compliance with the License. You may obtain a copy of the License at:
@@ -4020,8 +5575,12 @@
4020 5575 var dropdown_content;
4021 5576 var loading_more = false;
4022 5577 var load_more_opt;
4023 5578 var default_values = [];
5579 + var default_values_loaded = false;
5580 + var default_pagination;
5581 + var default_options = [];
5582 + var html_values = [];
4024 5583 if (!self.settings.shouldLoadMore) {
4025 5584 // return true if additional results should be loaded
4026 5585 self.settings.shouldLoadMore = () => {
4027 5586 const scroll_percent = dropdown_content.clientHeight / (dropdown_content.scrollHeight - dropdown_content.scrollTop);
@@ -4051,9 +5610,9 @@
4051 5610 }];
4052 5611
4053 5612 // can we load more results for given query?
4054 5613 const canLoadMore = query => {
4055 - if (typeof self.settings.maxOptions === 'number' && dropdown_content.children.length >= self.settings.maxOptions) {
5614 + if (self.settings.maxOptions !== null && typeof self.settings.maxOptions === 'number' && dropdown_content.children.length >= self.settings.maxOptions) {
4056 5615 return false;
4057 5616 }
4058 5617 if (query in pagination && pagination[query]) {
4059 5618 return true;
@@ -4111,9 +5670,13 @@
4111 5670
4112 5671 // wrap the load
4113 5672 self.hook('instead', 'loadCallback', (options, optgroups) => {
4114 5673 if (!loading_more) {
4115 - self.clearOptions(clearFilter);
5674 + // When searching (non-empty query), keep selected items and HTML default options,
5675 + // but remove preloaded remote options so they don't bleed into search results.
5676 + // For empty query, use clearFilter (keeps default_values + items).
5677 + const activeFilter = self.lastValue !== '' ? (_option, value) => self.items.indexOf(value) >= 0 || html_values.indexOf(value) >= 0 : clearFilter;
5678 + self.clearOptions(activeFilter);
4116 5679 } else if (load_more_opt) {
4117 5680 const first_option = options[0];
4118 5681 if (first_option !== undefined) {
4119 5682 load_more_opt.dataset.value = first_option[self.settings.valueField];
@@ -4119,11 +5682,31 @@
4119 5682 load_more_opt.dataset.value = first_option[self.settings.valueField];
4120 5683 }
4121 5684 }
4122 5685 orig_loadCallback.call(self, options, optgroups);
5686 +
5687 + // After the initial preload (empty query), snapshot default_values and option objects
5688 + // so they can be restored when the user clears their search.
5689 + if (!loading_more && !default_values_loaded) {
5690 + default_values_loaded = true;
5691 + if (self.lastValue === '') {
5692 + default_values = Object.keys(self.options);
5693 + default_pagination = pagination[''];
5694 + default_options = Object.values(self.options);
5695 + }
5696 + }
4123 5697 loading_more = false;
4124 5698 });
4125 5699
5700 + // as the “loading_more” element will be removed from the dropdown,
5701 + // we activate the previous option if needed
5702 + // to avoid the dropdown being scrolled back to the first one
5703 + self.hook('before', 'refreshOptions', () => {
5704 + if (self.activeOption && "option" !== self.activeOption.getAttribute("role")) {
5705 + self.setActiveOption(self.activeOption.previousElementSibling);
5706 + }
5707 + });
5708 +
4126 5709 // add templates to dropdown
4127 5710 // loading_more if we have another url in the queue
4128 5711 // no_more_results if we don't have another url in the queue
4129 5712 self.hook('after', 'refreshOptions', () => {
@@ -4147,10 +5730,32 @@
4147 5730 dropdown_content.append(option);
4148 5731 }
4149 5732 });
4150 5733
5734 + // Restore preloaded options and pagination when clearing search
5735 + const restoreDefaults = () => {
5736 + if (!default_values_loaded) {
5737 + return;
5738 + }
5739 + // Re-add preloaded option objects (clearOptions can only remove, not restore)
5740 + self.addOptions(default_options);
5741 + // Remove any search results that are not part of the preloaded defaults
5742 + self.clearOptions(clearFilter);
5743 + if (default_pagination) {
5744 + pagination[''] = default_pagination;
5745 + }
5746 + };
5747 + self.on('type', query => {
5748 + if (query === '') {
5749 + restoreDefaults();
5750 + self.refreshOptions(false);
5751 + }
5752 + });
5753 + self.on('dropdown_close', restoreDefaults);
5754 +
4151 5755 // add scroll listener and default templates
4152 5756 self.on('initialize', () => {
5757 + html_values = Object.keys(self.options);
4153 5758 default_values = Object.keys(self.options);
4154 5759 dropdown_content = self.dropdown_content;
4155 5760
4156 5761 // default templates
@@ -4193,8 +5798,9 @@
4193 5798 !*** ./node_modules/tom-select/dist/esm/tom-select.complete.js ***!
4194 5799 \*****************************************************************/
4195 5800 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
4196 5801
5802 +"use strict";
4197 5803 __webpack_require__.r(__webpack_exports__);
4198 5804 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4199 5805 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
4200 5806 /* harmony export */ });
@@ -4252,8 +5858,9 @@
4252 5858 !*** ./node_modules/tom-select/dist/esm/tom-select.js ***!
4253 5859 \********************************************************/
4254 5860 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
4255 5861
5862 +"use strict";
4256 5863 __webpack_require__.r(__webpack_exports__);
4257 5864 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4258 5865 /* harmony export */ "default": () => (/* binding */ TomSelect)
4259 5866 /* harmony export */ });
@@ -4288,8 +5895,9 @@
4288 5895 this.isLocked = false;
4289 5896 this.isFocused = false;
4290 5897 this.isInputHidden = false;
4291 5898 this.isSetup = false;
5899 + this.isDropdownContentStale = true;
4292 5900 this.ignoreFocus = false;
4293 5901 this.ignoreHover = false;
4294 5902 this.hasOptions = false;
4295 5903 this.lastValue = '';
@@ -4364,9 +5972,9 @@
4364 5972 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(dropdown, settings.dropdownClass, inputMode);
4365 5973 if (settings.copyClassesToDropdown) {
4366 5974 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(dropdown, classes);
4367 5975 }
4368 - (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(dropdown_content, settings.dropdownContentClass);
5976 + ;(0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(dropdown_content, settings.dropdownContentClass);
4369 5977 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.append)(dropdown, dropdown_content);
4370 5978 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.getDom)(settings.dropdownParent || wrapper).appendChild(dropdown);
4371 5979 // default controlInput
4372 5980 if ((0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.isHtmlString)(settings.controlInput)) {
@@ -4371,9 +5979,9 @@
4371 5979 // default controlInput
4372 5980 if ((0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.isHtmlString)(settings.controlInput)) {
4373 5981 control_input = (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.getDom)(settings.controlInput);
4374 5982 // set attributes
4375 - var attrs = ['autocorrect', 'autocapitalize', 'autocomplete', 'spellcheck'];
5983 + var attrs = ['autocorrect', 'autocapitalize', 'autocomplete', 'spellcheck', 'aria-label'];
4376 5984 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(attrs, (attr) => {
4377 5985 if (input.getAttribute(attr)) {
4378 5986 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.setAttr)(control_input, { [attr]: input.getAttribute(attr) });
4379 5987 }
@@ -4434,8 +6042,10 @@
4434 6042 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.setAttr)(focus_node, { 'aria-labelledby': label_id });
4435 6043 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.setAttr)(dropdown_content, { 'aria-labelledby': label_id });
4436 6044 }
4437 6045 wrapper.style.width = input.style.width;
6046 + wrapper.style.minWidth = input.style.minWidth;
6047 + wrapper.style.maxWidth = input.style.maxWidth;
4438 6048 if (self.plugins.names.length) {
4439 6049 const classes_plugins = 'plugin-' + self.plugins.names.join(' plugin-');
4440 6050 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)([wrapper, dropdown], classes_plugins);
4441 6051 }
@@ -4453,9 +6063,9 @@
4453 6063 // after initializePlugins() so plugins can create/modify user defined loaders
4454 6064 if (settings.load && settings.loadThrottle) {
4455 6065 settings.load = (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.loadDebounce)(settings.load, settings.loadThrottle);
4456 6066 }
4457 - (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(dropdown, 'mousemove', () => {
6067 + ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(dropdown, 'mousemove', () => {
4458 6068 self.ignoreHover = false;
4459 6069 });
4460 6070 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(dropdown, 'mouseenter', (e) => {
4461 6071 var target_match = (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.parentMatch)(e.target, '[data-selectable]', dropdown);
@@ -4518,12 +6128,21 @@
4518 6128 if (self.isOpen) {
4519 6129 self.positionDropdown();
4520 6130 }
4521 6131 };
6132 + const input_invalid = () => {
6133 + if (self.isValid) {
6134 + self.isValid = false;
6135 + self.isInvalid = true;
6136 + self.refreshState();
6137 + }
6138 + };
6139 + (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(input, 'invalid', input_invalid);
4522 6140 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(document, 'mousedown', doc_mousedown);
4523 6141 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(window, 'scroll', win_scroll, passive_event);
4524 6142 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(window, 'resize', win_scroll, passive_event);
4525 6143 this._destroy = () => {
6144 + input.removeEventListener('invalid', input_invalid);
4526 6145 document.removeEventListener('mousedown', doc_mousedown);
4527 6146 window.removeEventListener('scroll', win_scroll);
4528 6147 window.removeEventListener('resize', win_scroll);
4529 6148 if (label)
@@ -4540,29 +6159,12 @@
4540 6159 self.sync(false);
4541 6160 settings.items = [];
4542 6161 delete settings.optgroups;
4543 6162 delete settings.options;
4544 - (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.addEvent)(input, 'invalid', () => {
4545 - if (self.isValid) {
4546 - self.isValid = false;
4547 - self.isInvalid = true;
4548 - self.refreshState();
4549 - }
4550 - });
4551 - self.updateOriginalInput();
4552 6163 self.refreshItems();
4553 6164 self.close(false);
4554 6165 self.inputState();
4555 6166 self.isSetup = true;
4556 - if (input.disabled) {
4557 - self.disable();
4558 - }
4559 - else if (input.readOnly) {
4560 - self.setReadOnly(true);
4561 - }
4562 - else {
4563 - self.enable(); //sets tabIndex
4564 - }
4565 6167 self.on('change', this.onChange);
4566 6168 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(input, 'tomselected', 'ts-hidden-accessible');
4567 6169 self.trigger('initialize');
4568 6170 // preload options
@@ -4658,11 +6260,20 @@
4658 6260 *
4659 6261 */
4660 6262 sync(get_settings = true) {
4661 6263 const self = this;
4662 - const settings = get_settings ? (0,_getSettings_js__WEBPACK_IMPORTED_MODULE_6__["default"])(self.input, { delimiter: self.settings.delimiter }) : self.settings;
6264 + const settings = get_settings ? (0,_getSettings_js__WEBPACK_IMPORTED_MODULE_6__["default"])(self.input, { delimiter: self.settings.delimiter, allowEmptyOption: self.settings.allowEmptyOption }) : self.settings;
4663 6265 self.setupOptions(settings.options, settings.optgroups);
4664 6266 self.setValue(settings.items || [], true); // silent prevents recursion
6267 + if (self.input.disabled) {
6268 + self.disable();
6269 + }
6270 + else if (self.input.readOnly) {
6271 + self.setReadOnly(true);
6272 + }
6273 + else {
6274 + self.enable(); //sets tabIndex
6275 + }
4665 6276 self.lastQuery = null; // so updated options will be displayed in dropdown
4666 6277 }
4667 6278 /**
4668 6279 * Triggered when the main control element
@@ -4693,9 +6304,9 @@
4693 6304 * This should propagate the event to the original DOM
4694 6305 * input / select element.
4695 6306 */
4696 6307 onChange() {
4697 - (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.triggerEvent)(this.input, 'input');
6308 + ;(0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.triggerEvent)(this.input, 'input');
4698 6309 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.triggerEvent)(this.input, 'change');
4699 6310 }
4700 6311 /**
4701 6312 * Triggered on <input> paste.
@@ -4790,9 +6401,9 @@
4790 6401 let next = self.getAdjacent(self.activeOption, 1);
4791 6402 if (next)
4792 6403 self.setActiveOption(next);
4793 6404 }
4794 - (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
6405 + ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
4795 6406 return;
4796 6407 // up: move selection up
4797 6408 case _constants_js__WEBPACK_IMPORTED_MODULE_5__.KEY_UP:
4798 6409 if (self.activeOption) {
@@ -4799,9 +6410,9 @@
4799 6410 let prev = self.getAdjacent(self.activeOption, -1);
4800 6411 if (prev)
4801 6412 self.setActiveOption(prev);
4802 6413 }
4803 - (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
6414 + ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
4804 6415 return;
4805 6416 // return: select active option
4806 6417 case _constants_js__WEBPACK_IMPORTED_MODULE_5__.KEY_RETURN:
4807 6418 if (self.canSelect(self.activeOption)) {
@@ -4833,9 +6444,9 @@
4833 6444 // prevent default [tab] behaviour of jump to the next field
4834 6445 // if select isFull, then the dropdown won't be open and [tab] will work normally
4835 6446 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
4836 6447 }
4837 - if (self.settings.create && self.createItem()) {
6448 + else if (self.settings.create && self.createItem()) {
4838 6449 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
4839 6450 }
4840 6451 }
4841 6452 return;
@@ -4957,18 +6568,24 @@
4957 6568 self.createItem(null, () => {
4958 6569 if (self.settings.closeAfterSelect) {
4959 6570 self.close();
4960 6571 }
6572 + else if (self.settings.clearAfterSelect) {
6573 + self.setTextboxValue();
6574 + }
4961 6575 });
4962 6576 }
4963 6577 else {
4964 6578 value = option.dataset.value;
4965 6579 if (typeof value !== 'undefined') {
4966 - self.lastQuery = null;
6580 + self.isDropdownContentStale = self.settings.hideSelected;
4967 6581 self.addItem(value);
4968 6582 if (self.settings.closeAfterSelect) {
4969 6583 self.close();
4970 6584 }
6585 + else if (self.settings.clearAfterSelect) {
6586 + self.setTextboxValue();
6587 + }
4971 6588 if (!self.settings.hideSelected && evt.type && /click/.test(evt.type)) {
4972 6589 self.setActiveOption(option);
4973 6590 }
4974 6591 }
@@ -5040,9 +6657,9 @@
5040 6657 */
5041 6658 loadCallback(options, optgroups) {
5042 6659 const self = this;
5043 6660 self.loading = Math.max(self.loading - 1, 0);
5044 - self.lastQuery = null;
6661 + self.isDropdownContentStale = true;
5045 6662 self.clearActiveOption(); // when new results load, focus should be on first option
5046 6663 self.setupOptions(options, optgroups);
5047 6664 self.refreshOptions(self.isFocused && !self.isInputHidden);
5048 6665 if (!self.loading) {
@@ -5139,9 +6756,9 @@
5139 6756 if (self.activeItems.indexOf(item) === -1) {
5140 6757 self.setActiveItemClass(item);
5141 6758 }
5142 6759 }
5143 - (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
6760 + ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e);
5144 6761 }
5145 6762 else if ((eventName === 'click' && (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.isKeyDown)(_constants_js__WEBPACK_IMPORTED_MODULE_5__.KEY_SHORTCUT, e)) || (eventName === 'keydown' && (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.isKeyDown)('shiftKey', e))) {
5146 6763 if (item.classList.contains('active')) {
5147 6764 self.removeActiveItem(item);
@@ -5188,9 +6805,9 @@
5188 6805 * Clears all the active items
5189 6806 *
5190 6807 */
5191 6808 clearActiveItems() {
5192 - (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.removeClasses)(this.activeItems, 'active');
6809 + ;(0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.removeClasses)(this.activeItems, 'active');
5193 6810 this.activeItems = [];
5194 6811 }
5195 6812 /**
5196 6813 * Sets the selected item in the dropdown menu
@@ -5305,17 +6922,21 @@
5305 6922 var self = this;
5306 6923 if (self.isDisabled || self.isReadOnly)
5307 6924 return;
5308 6925 self.ignoreFocus = true;
5309 - if (self.control_input.offsetWidth) {
5310 - self.control_input.focus();
5311 - }
5312 - else {
5313 - self.focus_node.focus();
5314 - }
6926 + const focusTarget = this.control_input.offsetWidth ? this.control_input : this.focus_node;
6927 + focusTarget.focus();
5315 6928 setTimeout(() => {
5316 6929 self.ignoreFocus = false;
5317 - self.onFocus();
6930 + // Fix https://github.com/orchidjs/tom-select/issues/806
6931 + // Only proceed if this instance's element is still the active element. If Edge autofill
6932 + // (or anything else) has moved focus to a different element in the interim, calling
6933 + // onFocus() here would steal focus back and restart the cascade loop.
6934 + const root = focusTarget.getRootNode();
6935 + if (root.activeElement !== focusTarget) {
6936 + return;
6937 + }
6938 + this.onFocus();
5318 6939 }, 0);
5319 6940 }
5320 6941 /**
5321 6942 * Forces the control out of focus.
@@ -5371,10 +6992,15 @@
5371 6992 throw new Error('Tom Select "score" setting must be a function that returns a function');
5372 6993 }
5373 6994 }
5374 6995 // perform search
5375 - if (query !== self.lastQuery) {
6996 + if (self.isDropdownContentStale || query !== self.lastQuery) {
5376 6997 self.lastQuery = query;
6998 + // temp fix for https://github.com/orchidjs/tom-select/issues/987
6999 + // UI crashed when more than 30 same chars in a row, prevent search and return empt result
7000 + if (/(.)\1{15,}/.test(query)) {
7001 + query = '';
7002 + }
5377 7003 result = self.sifter.search(query, Object.assign(options, { score: calculateScore }));
5378 7004 self.currentResults = result;
5379 7005 }
5380 7006 else {
@@ -5383,9 +7009,9 @@
5383 7009 // filter out selected items
5384 7010 if (self.settings.hideSelected) {
5385 7011 result.items = result.items.filter((item) => {
5386 7012 let hashed = (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.hash_key)(item.id);
5387 - return !(hashed && self.items.indexOf(hashed) !== -1);
7013 + return !(hashed !== null && self.items.indexOf(hashed) !== -1);
5388 7014 });
5389 7015 }
5390 7016 return result;
5391 7017 }
@@ -5455,8 +7081,15 @@
5455 7081 for (j = 0, k = optgroups && optgroups.length; j < k; j++) {
5456 7082 optgroup = optgroups[j];
5457 7083 let order = option.$order;
5458 7084 let self_optgroup = self.optgroups[optgroup];
7085 + if (self_optgroup === undefined && typeof self.settings.optionGroupRegister === 'function') {
7086 + var regGroup;
7087 + if (regGroup = self.settings.optionGroupRegister.apply(self, [optgroup])) {
7088 + self.registerOptionGroup(regGroup);
7089 + }
7090 + }
7091 + self_optgroup = self.optgroups[optgroup];
5459 7092 if (self_optgroup === undefined) {
5460 7093 optgroup = '';
5461 7094 }
5462 7095 else {
@@ -5509,8 +7142,9 @@
5509 7142 }
5510 7143 });
5511 7144 dropdown_content.innerHTML = '';
5512 7145 (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.append)(dropdown_content, html);
7146 + self.isDropdownContentStale = false;
5513 7147 // highlight matching terms inline
5514 7148 if (self.settings.highlight) {
5515 7149 (0,_contrib_highlight_js__WEBPACK_IMPORTED_MODULE_4__.removeHighlight)(dropdown_content);
5516 7150 if (results.query.length && results.tokens.length) {
@@ -5603,14 +7237,15 @@
5603 7237 return false;
5604 7238 }
5605 7239 const key = (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.hash_key)(data[self.settings.valueField]);
5606 7240 if (key === null || self.options.hasOwnProperty(key)) {
7241 + self.updateOption(data[self.settings.valueField], data);
5607 7242 return false;
5608 7243 }
5609 7244 data.$order = data.$order || ++self.order;
5610 7245 data.$id = self.inputId + '-opt-' + data.$order;
5611 7246 self.options[key] = data;
5612 - self.lastQuery = null;
7247 + self.isDropdownContentStale = true;
5613 7248 if (user_created) {
5614 7249 self.userOptions[key] = user_created;
5615 7250 self.trigger('option_add', key, data);
5616 7251 }
@@ -5620,9 +7255,9 @@
5620 7255 * Add multiple options
5621 7256 *
5622 7257 */
5623 7258 addOptions(data, user_created = false) {
5624 - (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(data, (dat) => {
7259 + ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(data, (dat) => {
5625 7260 this.addOption(dat, user_created);
5626 7261 });
5627 7262 }
5628 7263 /**
@@ -5724,10 +7359,10 @@
5724 7359 if (item.classList.contains('active'))
5725 7360 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.addClasses)(item_new, 'active');
5726 7361 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.replaceNode)(item, item_new);
5727 7362 }
5728 - // invalidate last query because we might have updated the sortField
5729 - self.lastQuery = null;
7363 + // we might have updated the sortField
7364 + self.isDropdownContentStale = true;
5730 7365 }
5731 7366 /**
5732 7367 * Removes a single option.
5733 7368 *
@@ -5737,9 +7372,9 @@
5737 7372 value = (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.get_hash)(value);
5738 7373 self.uncacheValue(value);
5739 7374 delete self.userOptions[value];
5740 7375 delete self.options[value];
5741 - self.lastQuery = null;
7376 + self.isDropdownContentStale = true;
5742 7377 self.trigger('option_remove', value);
5743 7378 self.removeItem(value, silent);
5744 7379 }
5745 7380 /**
@@ -5756,9 +7391,9 @@
5756 7391 selected[key] = option;
5757 7392 }
5758 7393 });
5759 7394 this.options = this.sifter.items = selected;
5760 - this.lastQuery = null;
7395 + this.isDropdownContentStale = true;
5761 7396 this.trigger('option_clear');
5762 7397 }
5763 7398 /**
5764 7399 * Used by clearOptions() to decide whether or not an option should be removed
@@ -5888,8 +7523,12 @@
5888 7523 if (next) {
5889 7524 self.setActiveOption(next);
5890 7525 }
5891 7526 }
7527 + //remove input value when enabled
7528 + if (self.settings.clearAfterSelect) {
7529 + self.setTextboxValue();
7530 + }
5892 7531 // refreshOptions after setActiveOption(),
5893 7532 // otherwise setActiveOption() will be called by refreshOptions() with the wrong value
5894 7533 if (!self.isPending && !self.settings.closeAfterSelect) {
5895 7534 self.refreshOptions(self.isFocused && inputMode !== 'single');
@@ -5931,9 +7570,9 @@
5931 7570 self.activeItems.splice(idx, 1);
5932 7571 (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.removeClasses)(item, 'active');
5933 7572 }
5934 7573 self.items.splice(i, 1);
5935 - self.lastQuery = null;
7574 + self.isDropdownContentStale = true;
5936 7575 if (!self.settings.persist && self.userOptions.hasOwnProperty(value)) {
5937 7576 self.removeOption(value, silent);
5938 7577 }
5939 7578 if (i < self.caretPos) {
@@ -5965,8 +7604,14 @@
5965 7604 var caret = self.caretPos;
5966 7605 var output;
5967 7606 input = input || self.inputValue();
5968 7607 if (!self.canCreate(input)) {
7608 + const hash = (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.hash_key)(input);
7609 + if (hash) {
7610 + if (this.options[input]) {
7611 + self.addItem(input);
7612 + }
7613 + }
5969 7614 callback();
5970 7615 return false;
5971 7616 }
5972 7617 self.lock();
@@ -6004,9 +7649,9 @@
6004 7649 * Re-renders the selected item lists.
6005 7650 */
6006 7651 refreshItems() {
6007 7652 var self = this;
6008 - self.lastQuery = null;
7653 + self.isDropdownContentStale = true;
6009 7654 if (self.isSetup) {
6010 7655 self.addItems(self.items);
6011 7656 }
6012 7657 self.updateOriginalInput();
@@ -6083,9 +7728,9 @@
6083 7728 }
6084 7729 selected.push(option_el);
6085 7730 // marking empty option as selected can break validation
6086 7731 // fixes https://github.com/orchidjs/tom-select/issues/303
6087 - if (option_el != empty_option || has_selected > 0) {
7732 + if (option_el != empty_option || has_selected > 0 || self.settings.mode == 'multi') {
6088 7733 option_el.selected = true;
6089 7734 }
6090 7735 return option_el;
6091 7736 }
@@ -6226,9 +7871,9 @@
6226 7871 caret = (0,_vanilla_js__WEBPACK_IMPORTED_MODULE_8__.nodeIndex)(tail);
6227 7872 if (direction > 0) {
6228 7873 caret++;
6229 7874 }
6230 - (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(self.activeItems, (item) => rm_items.push(item));
7875 + ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(self.activeItems, (item) => rm_items.push(item));
6231 7876 }
6232 7877 else if ((self.isFocused || self.settings.mode === 'single') && self.items.length) {
6233 7878 const items = self.controlChildren();
6234 7879 let rm_item;
@@ -6244,9 +7889,9 @@
6244 7889 }
6245 7890 if (!self.shouldDelete(rm_items, e)) {
6246 7891 return false;
6247 7892 }
6248 - (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e, true);
7893 + ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.preventDefault)(e, true);
6249 7894 // perform removal
6250 7895 if (typeof caret !== 'undefined') {
6251 7896 self.setCaret(caret);
6252 7897 }
@@ -6263,9 +7908,9 @@
6263 7908 */
6264 7909 shouldDelete(items, evt) {
6265 7910 const values = items.map(item => item.dataset.value);
6266 7911 // allow the callback to abort
6267 - if (!values.length || (typeof this.settings.onDelete === 'function' && this.settings.onDelete(values, evt) === false)) {
7912 + if (!values.length || (typeof this.settings.onDelete === 'function' && this.settings.onDelete.call(this, values, evt) === false)) {
6268 7913 return false;
6269 7914 }
6270 7915 return true;
6271 7916 }
@@ -6482,9 +8127,9 @@
6482 8127 * caches.
6483 8128 *
6484 8129 */
6485 8130 clearCache() {
6486 - (0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(this.options, (option) => {
8131 + ;(0,_utils_js__WEBPACK_IMPORTED_MODULE_7__.iterate)(this.options, (option) => {
6487 8132 if (option.$div) {
6488 8133 option.$div.remove();
6489 8134 delete option.$div;
6490 8135 }
@@ -6543,8 +8188,9 @@
6543 8188 !*** ./node_modules/tom-select/dist/esm/utils.js ***!
6544 8189 \***************************************************/
6545 8190 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
6546 8191
8192 +"use strict";
6547 8193 __webpack_require__.r(__webpack_exports__);
6548 8194 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6549 8195 /* harmony export */ addEvent: () => (/* binding */ addEvent),
6550 8196 /* harmony export */ addSlashes: () => (/* binding */ addSlashes),
@@ -6764,8 +8410,9 @@
6764 8410 !*** ./node_modules/tom-select/dist/esm/vanilla.js ***!
6765 8411 \*****************************************************/
6766 8412 (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
6767 8413
8414 +"use strict";
6768 8415 __webpack_require__.r(__webpack_exports__);
6769 8416 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6770 8417 /* harmony export */ addClasses: () => (/* binding */ addClasses),
6771 8418 /* harmony export */ applyCSS: () => (/* binding */ applyCSS),
@@ -6961,20 +8608,20 @@
6961 8608
6962 8609 /******/ });
6963 8610 /************************************************************************/
6964 8611 /******/ // The module cache
6965 -/******/ var __webpack_module_cache__ = {};
8612 +/******/ const __webpack_module_cache__ = {};
6966 8613 /******/
6967 8614 /******/ // The require function
6968 8615 /******/ function __webpack_require__(moduleId) {
6969 8616 /******/ // Check if module is in cache
6970 -/******/ var cachedModule = __webpack_module_cache__[moduleId];
8617 +/******/ const cachedModule = __webpack_module_cache__[moduleId];
6971 8618 /******/ if (cachedModule !== undefined) {
6972 8619 /******/ return cachedModule.exports;
6973 8620 /******/ }
6974 8621 /******/ // Create a new module (and put it into the cache)
6975 -/******/ var module = __webpack_module_cache__[moduleId] = {
6976 -/******/ // no module.id needed
8622 +/******/ const module = __webpack_module_cache__[moduleId] = {
8623 +/******/ id: moduleId,
6977 8624 /******/ // no module.loaded needed
6978 8625 /******/ exports: {}
6979 8626 /******/ };
6980 8627 /******/
@@ -6980,13 +8627,13 @@
6980 8627 /******/
6981 8628 /******/ // Execute the module function
6982 8629 /******/ if (!(moduleId in __webpack_modules__)) {
6983 8630 /******/ delete __webpack_module_cache__[moduleId];
6984 -/******/ var e = new Error("Cannot find module '" + moduleId + "'");
8631 +/******/ const e = new Error("Cannot find module '" + moduleId + "'");
6985 8632 /******/ e.code = 'MODULE_NOT_FOUND';
6986 8633 /******/ throw e;
6987 8634 /******/ }
6988 -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
8635 +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
6989 8636 /******/
6990 8637 /******/ // Return the exports of the module
6991 8638 /******/ return module.exports;
6992 8639 /******/ }
@@ -6991,16 +8638,43 @@
6991 8638 /******/ return module.exports;
6992 8639 /******/ }
6993 8640 /******/
6994 8641 /************************************************************************/
8642 +/******/ /* webpack/runtime/compat get default export */
8643 +/******/ (() => {
8644 +/******/ // getDefaultExport function for compatibility with non-harmony modules
8645 +/******/ __webpack_require__.n = (module) => {
8646 +/******/ const getter = module && module.__esModule ?
8647 +/******/ () => (module['default']) :
8648 +/******/ () => (module);
8649 +/******/ __webpack_require__.d(getter, { a: getter });
8650 +/******/ return getter;
8651 +/******/ };
8652 +/******/ })();
8653 +/******/
6995 8654 /******/ /* webpack/runtime/define property getters */
6996 8655 /******/ (() => {
6997 -/******/ // define getter functions for harmony exports
8656 +/******/ // define getter/value functions for harmony exports
6998 8657 /******/ __webpack_require__.d = (exports, definition) => {
6999 -/******/ for(var key in definition) {
7000 -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
7001 -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
8658 +/******/ if(Array.isArray(definition)) {
8659 +/******/ var i = 0;
8660 +/******/ while(i < definition.length) {
8661 +/******/ var key = definition[i++];
8662 +/******/ var binding = definition[i++];
8663 +/******/ if(!__webpack_require__.o(exports, key)) {
8664 +/******/ if(binding === 0) {
8665 +/******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
8666 +/******/ } else {
8667 +/******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
8668 +/******/ }
8669 +/******/ } else if(binding === 0) { i++; }
7002 8670 /******/ }
8671 +/******/ } else {
8672 +/******/ for(var key in definition) {
8673 +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
8674 +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
8675 +/******/ }
8676 +/******/ }
7003 8677 /******/ }
7004 8678 /******/ };
7005 8679 /******/ })();
7006 8680 /******/
@@ -7005,9 +8679,9 @@
7005 8679 /******/ })();
7006 8680 /******/
7007 8681 /******/ /* webpack/runtime/hasOwnProperty shorthand */
7008 8682 /******/ (() => {
7009 -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
8683 +/******/ __webpack_require__.o = (obj, prop) => (Object.hasOwn(obj, prop))
7010 8684 /******/ })();
7011 8685 /******/
7012 8686 /******/ /* webpack/runtime/make namespace object */
7013 8687 /******/ (() => {
@@ -7012,9 +8686,9 @@
7012 8686 /******/ /* webpack/runtime/make namespace object */
7013 8687 /******/ (() => {
7014 8688 /******/ // define __esModule on exports
7015 8689 /******/ __webpack_require__.r = (exports) => {
7016 -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
8690 +/******/ if(Symbol.toStringTag) {
7017 8691 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
7018 8692 /******/ }
7019 8693 /******/ Object.defineProperty(exports, '__esModule', { value: true });
7020 8694 /******/ };
@@ -7019,12 +8693,18 @@
7019 8693 /******/ Object.defineProperty(exports, '__esModule', { value: true });
7020 8694 /******/ };
7021 8695 /******/ })();
7022 8696 /******/
8697 +/******/ /* webpack/runtime/nonce */
8698 +/******/ (() => {
8699 +/******/ __webpack_require__.nc = undefined;
8700 +/******/ })();
8701 +/******/
7023 8702 /************************************************************************/
7024 -var __webpack_exports__ = {};
7025 -// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
8703 +let __webpack_exports__ = {};
8704 +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
7026 8705 (() => {
8706 +"use strict";
7027 8707 /*!**************************************!*\
7028 8708 !*** ./assets/src/js/admin/admin.js ***!
7029 8709 \**************************************/
7030 8710 __webpack_require__.r(__webpack_exports__);
@@ -7029,15 +8709,17 @@
7029 8709 \**************************************/
7030 8710 __webpack_require__.r(__webpack_exports__);
7031 8711 /* harmony import */ var _init_tom_select_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./init-tom-select.js */ "./assets/src/js/admin/init-tom-select.js");
7032 8712 /* harmony import */ var _utils_admin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils-admin.js */ "./assets/src/js/admin/utils-admin.js");
8713 +/* harmony import */ var _share_dropdown_pages_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./share/dropdown-pages.js */ "./assets/src/js/admin/share/dropdown-pages.js");
7033 8714
7034 8715
8716 +
7035 8717 (function ($) {
7036 - /**
7037 - * Callback event for button to creating pages inside error message.
7038 - *
7039 - * @param {Event} e
8718 + /**
8719 + * Callback event for button to creating pages inside error message.
8720 + *
8721 + * @param {Event} e
7040 8722 */
7041 8723
7042 8724 const createPages = function createPages(e) {
7043 8725 const $button = $(this).addClass('disabled');
@@ -7146,9 +8828,10 @@
7146 8828 };
7147 8829 const onReady = function onReady() {
7148 8830 lpMetaboxFileInput();
7149 8831 //updateDb();
7150 - $('.learn-press-dropdown-pages').LP('DropdownPages');
8832 + const dropdownPages = new _share_dropdown_pages_js__WEBPACK_IMPORTED_MODULE_2__.DropdownPages();
8833 + dropdownPages.init();
7151 8834 //$( '.learn-press-advertisement-slider' ).LP( 'Advertisement', 'a', 's' ).appendTo( $( '#wpbody-content' ) );
7152 8835 //$( '.learn-press-toggle-item-preview' ).on( 'change', updateItemPreview );
7153 8836 $('.learn-press-tip').LP('QuickTip'); //$('.learn-press-tabs').LP('AdminTab');
7154 8837
@@ -7176,24 +8859,24 @@
7176 8859 }
7177 8860 }
7178 8861
7179 8862 // Show/hide meta-box field with type checkbox
7180 - /*$( 'input' ).on( 'click', function( e ) {
7181 - const el = $( e.target );
7182 - if ( ! el.length ) {
7183 - return;
7184 - }
7185 - const id = el.attr( 'id' );
7186 - if ( ! id ) {
7187 - return;
7188 - }
7189 - const classHide = id.replace( 'learn_press_', '' );
7190 - const elHide = $( `.show_if_${ classHide }` );
7191 - if ( el.is( ':checked' ) ) {
7192 - elHide.show();
7193 - } else {
7194 - elHide.hide();
7195 - }
8863 + /*$( 'input' ).on( 'click', function( e ) {
8864 + const el = $( e.target );
8865 + if ( ! el.length ) {
8866 + return;
8867 + }
8868 + const id = el.attr( 'id' );
8869 + if ( ! id ) {
8870 + return;
8871 + }
8872 + const classHide = id.replace( 'learn_press_', '' );
8873 + const elHide = $( `.show_if_${ classHide }` );
8874 + if ( el.is( ':checked' ) ) {
8875 + elHide.show();
8876 + } else {
8877 + elHide.hide();
8878 + }
7196 8879 } );*/
7197 8880 };
7198 8881 $(document).ready(onReady);
7199 8882 })(jQuery);