PATH:
home
/
lab2454c
/
veritserv.net
/
wp-content
/
plugins
/
elementor-pro
/
assets
/
js
/*! elementor-pro - v3.6.4 - 15-03-2022 */ "use strict"; (self["webpackChunkelementor_pro"] = self["webpackChunkelementor_pro"] || []).push([["table-of-contents"],{ /***/ "../modules/table-of-contents/assets/js/frontend/handlers/table-of-contents.js": /*!*************************************************************************************!*\ !*** ../modules/table-of-contents/assets/js/frontend/handlers/table-of-contents.js ***! \*************************************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; class TOCHandler extends elementorModules.frontend.handlers.Base { getDefaultSettings() { const elementSettings = this.getElementSettings(), listWrapperTag = 'numbers' === elementSettings.marker_view ? 'ol' : 'ul'; return { selectors: { widgetContainer: '.elementor-widget-container', postContentContainer: '.elementor:not([data-elementor-type="header"]):not([data-elementor-type="footer"]):not([data-elementor-type="popup"])', expandButton: '.elementor-toc__toggle-button--expand', collapseButton: '.elementor-toc__toggle-button--collapse', body: '.elementor-toc__body', headerTitle: '.elementor-toc__header-title' }, classes: { anchor: 'elementor-menu-anchor', listWrapper: 'elementor-toc__list-wrapper', listItem: 'elementor-toc__list-item', listTextWrapper: 'elementor-toc__list-item-text-wrapper', firstLevelListItem: 'elementor-toc__top-level', listItemText: 'elementor-toc__list-item-text', activeItem: 'elementor-item-active', headingAnchor: 'elementor-toc__heading-anchor', collapsed: 'elementor-toc--collapsed' }, listWrapperTag }; } getDefaultElements() { const settings = this.getSettings(); return { $pageContainer: this.getContainer(), $widgetContainer: this.$element.find(settings.selectors.widgetContainer), $expandButton: this.$element.find(settings.selectors.expandButton), $collapseButton: this.$element.find(settings.selectors.collapseButton), $tocBody: this.$element.find(settings.selectors.body), $listItems: this.$element.find('.' + settings.classes.listItem) }; } getContainer() { const settings = this.getSettings(), elementSettings = this.getElementSettings(); // If there is a custom container defined by the user, use it as the headings-scan container if (elementSettings.container) { return jQuery(elementSettings.container); } // Get the document wrapper element in which the TOC is located const $documentWrapper = this.$element.parents('.elementor'); // If the TOC container is a popup, only scan the popup for headings if ('popup' === $documentWrapper.attr('data-elementor-type')) { return $documentWrapper; } // If the TOC container is anything other than a popup, scan only the post/page content for headings return jQuery(settings.selectors.postContentContainer); } bindEvents() { const elementSettings = this.getElementSettings(); if (elementSettings.minimize_box) { this.elements.$expandButton.on('click', () => this.expandBox()); this.elements.$collapseButton.on('click', () => this.collapseBox()); } if (elementSettings.collapse_subitems) { this.elements.$listItems.on('hover', event => jQuery(event.target).slideToggle()); } } getHeadings() { // Get all headings from document by user-selected tags const elementSettings = this.getElementSettings(), tags = elementSettings.headings_by_tags.join(','), selectors = this.getSettings('selectors'), excludedSelectors = elementSettings.exclude_headings_by_selector; return this.elements.$pageContainer.find(tags).not(selectors.headerTitle).filter((index, heading) => { return !jQuery(heading).closest(excludedSelectors).length; // Handle excluded selectors if there are any }); } addAnchorsBeforeHeadings() { const classes = this.getSettings('classes'); // Add an anchor element right before each TOC heading to create anchors for TOC links this.elements.$headings.before(index => { // Check if the heading element itself has an ID, or if it is a widget which includes a main heading element, whether the widget wrapper has an ID if (jQuery(this.elements.$headings[index]).data('hasOwnID')) { return; } return `<span id="${classes.headingAnchor}-${index}" class="${classes.anchor} "></span>`; }); } activateItem($listItem) { const classes = this.getSettings('classes'); this.deactivateActiveItem($listItem); $listItem.addClass(classes.activeItem); this.$activeItem = $listItem; if (!this.getElementSettings('collapse_subitems')) { return; } let $activeList; if ($listItem.hasClass(classes.firstLevelListItem)) { $activeList = $listItem.parent().next(); } else { $activeList = $listItem.parents('.' + classes.listWrapper).eq(-2); } if (!$activeList.length) { delete this.$activeList; return; } this.$activeList = $activeList; this.$activeList.stop().slideDown(); } deactivateActiveItem($activeToBe) { if (!this.$activeItem || this.$activeItem.is($activeToBe)) { return; } const { classes } = this.getSettings(); this.$activeItem.removeClass(classes.activeItem); if (this.$activeList && (!$activeToBe || !this.$activeList[0].contains($activeToBe[0]))) { this.$activeList.slideUp(); } } followAnchor($element, index) { const anchorSelector = $element[0].hash; let $anchor; try { // `decodeURIComponent` for UTF8 characters in the hash. $anchor = jQuery(decodeURIComponent(anchorSelector)); } catch (e) { return; } elementorFrontend.waypoint($anchor, direction => { if (this.itemClicked) { return; } const id = $anchor.attr('id'); if ('down' === direction) { this.viewportItems[id] = true; this.activateItem($element); } else { delete this.viewportItems[id]; this.activateItem(this.$listItemTexts.eq(index - 1)); } }, { offset: 'bottom-in-view', triggerOnce: false }); elementorFrontend.waypoint($anchor, direction => { if (this.itemClicked) { return; } const id = $anchor.attr('id'); if ('down' === direction) { delete this.viewportItems[id]; if (Object.keys(this.viewportItems).length) { this.activateItem(this.$listItemTexts.eq(index + 1)); } } else { this.viewportItems[id] = true; this.activateItem($element); } }, { offset: 0, triggerOnce: false }); } followAnchors() { this.$listItemTexts.each((index, element) => this.followAnchor(jQuery(element), index)); } populateTOC() { this.listItemPointer = 0; const elementSettings = this.getElementSettings(); if (elementSettings.hierarchical_view) { this.createNestedList(); } else { this.createFlatList(); } this.$listItemTexts = this.$element.find('.elementor-toc__list-item-text'); this.$listItemTexts.on('click', this.onListItemClick.bind(this)); if (!elementorFrontend.isEditMode()) { this.followAnchors(); } } createNestedList() { this.headingsData.forEach((heading, index) => { heading.level = 0; for (let i = index - 1; i >= 0; i--) { const currentOrderedItem = this.headingsData[i]; if (currentOrderedItem.tag <= heading.tag) { heading.level = currentOrderedItem.level; if (currentOrderedItem.tag < heading.tag) { heading.level++; } break; } } }); this.elements.$tocBody.html(this.getNestedLevel(0)); } createFlatList() { this.elements.$tocBody.html(this.getNestedLevel()); } getNestedLevel(level) { const settings = this.getSettings(), elementSettings = this.getElementSettings(), icon = this.getElementSettings('icon'); let renderedIcon; if (icon) { // We generate the icon markup in PHP and make it available via get_frontend_settings(). As a result, the // rendered icon is not available in the editor, so in the editor we use the regular <i> tag. if (elementorFrontend.config.experimentalFeatures.e_font_icon_svg && !elementorFrontend.isEditMode()) { renderedIcon = icon.rendered_tag; } else { renderedIcon = `<i class="${icon.value}"></i>`; } } // Open new list/nested list let html = `<${settings.listWrapperTag} class="${settings.classes.listWrapper}">`; // for each list item, build its markup. while (this.listItemPointer < this.headingsData.length) { const currentItem = this.headingsData[this.listItemPointer]; let listItemTextClasses = settings.classes.listItemText; if (0 === currentItem.level) { // If the current list item is a top level item, give it the first level class listItemTextClasses += ' ' + settings.classes.firstLevelListItem; } if (level > currentItem.level) { break; } if (level === currentItem.level) { html += `<li class="${settings.classes.listItem}">`; html += `<div class="${settings.classes.listTextWrapper}">`; let liContent = `<a href="#${currentItem.anchorLink}" class="${listItemTextClasses}">${currentItem.text}</a>`; // If list type is bullets, add the bullet icon as an <i> tag if ('bullets' === elementSettings.marker_view && icon) { liContent = `${renderedIcon}${liContent}`; } html += liContent; html += '</div>'; this.listItemPointer++; const nextItem = this.headingsData[this.listItemPointer]; if (nextItem && level < nextItem.level) { // If a new nested list has to be created under the current item, // this entire method is called recursively (outside the while loop, a list wrapper is created) html += this.getNestedLevel(nextItem.level); } html += '</li>'; } } html += `</${settings.listWrapperTag}>`; return html; } handleNoHeadingsFound() { let noHeadingsText = __('No headings were found on this page.', 'elementor-pro'); return this.elements.$tocBody.html(noHeadingsText); } collapseOnInit() { const minimizedOn = this.getElementSettings('minimized_on'), currentDeviceMode = elementorFrontend.getCurrentDeviceMode(); if ('tablet' === minimizedOn && 'desktop' !== currentDeviceMode || 'mobile' === minimizedOn && 'mobile' === currentDeviceMode) { this.collapseBox(); } } getHeadingAnchorLink(index, classes) { const headingID = this.elements.$headings[index].id, wrapperID = this.elements.$headings[index].closest('.elementor-widget').id; let anchorLink = ''; if (headingID) { anchorLink = headingID; } else if (wrapperID) { // If the heading itself has an ID, we don't want to overwrite it anchorLink = wrapperID; } // If there is no existing ID, use the heading text to create a semantic ID if (headingID || wrapperID) { jQuery(this.elements.$headings[index]).data('hasOwnID', true); } else { anchorLink = `${classes.headingAnchor}-${index}`; } return anchorLink; } setHeadingsData() { this.headingsData = []; const classes = this.getSettings('classes'); // Create an array for simplifying TOC list creation this.elements.$headings.each((index, element) => { const anchorLink = this.getHeadingAnchorLink(index, classes); this.headingsData.push({ tag: +element.nodeName.slice(1), text: element.textContent, anchorLink }); }); } run() { this.elements.$headings = this.getHeadings(); if (!this.elements.$headings.length) { return this.handleNoHeadingsFound(); } this.setHeadingsData(); if (!elementorFrontend.isEditMode()) { this.addAnchorsBeforeHeadings(); } this.populateTOC(); if (this.getElementSettings('minimize_box')) { this.collapseOnInit(); } } expandBox() { const boxHeight = this.getCurrentDeviceSetting('min_height'); this.$element.removeClass(this.getSettings('classes.collapsed')); this.elements.$tocBody.slideDown(); // return container to the full height in case a min-height is defined by the user this.elements.$widgetContainer.css('min-height', boxHeight.size + boxHeight.unit); } collapseBox() { this.$element.addClass(this.getSettings('classes.collapsed')); this.elements.$tocBody.slideUp(); // close container in case a min-height is defined by the user this.elements.$widgetContainer.css('min-height', '0px'); } onInit() { super.onInit(...arguments); this.viewportItems = []; jQuery(() => this.run()); } onListItemClick(event) { this.itemClicked = true; setTimeout(() => this.itemClicked = false, 2000); const $clickedItem = jQuery(event.target), $list = $clickedItem.parent().next(), collapseNestedList = this.getElementSettings('collapse_subitems'); let listIsActive; if (collapseNestedList && $clickedItem.hasClass(this.getSettings('classes.firstLevelListItem'))) { if ($list.is(':visible')) { listIsActive = true; } } this.activateItem($clickedItem); if (collapseNestedList && listIsActive) { $list.slideUp(); } } } exports["default"] = TOCHandler; /***/ }) }]); //# sourceMappingURL=table-of-contents.4c67276d84a32454299a.bundle.js.map
[+]
..
[-] frontend.min.js
[edit]
[-] table-of-contents.4b2c027c1b14bc6856bb.bundle.min.js
[edit]
[-] elements-handlers.js
[edit]
[-] woocommerce-menu-cart.cedd0e5dff14e897d7f2.bundle.js
[edit]
[-] editor.js
[edit]
[-] popup.4567e25e40bd00bdcd10.bundle.js
[edit]
[-] screenshot.min.js
[edit]
[-] qunit-tests.min.js
[edit]
[-] elements-handlers.min.js
[edit]
[-] code-highlight.e520eaa79dbee1cfac29.bundle.js
[edit]
[-] form.358793a6bb3724ab5f99.bundle.min.js
[edit]
[-] archive-posts.a89b5dc0ebe0af8113c4.bundle.min.js
[edit]
[-] form-submission-admin.js
[edit]
[-] frontend.js
[edit]
[-] form-submission-admin.min.js
[edit]
[-] nav-menu.3de49ba5ef86f9a22ff5.bundle.min.js
[edit]
[-] carousel.8af41a7f7916e49faa64.bundle.js
[edit]
[-] carousel.fc5e450716cd11d05beb.bundle.min.js
[edit]
[-] admin.js
[edit]
[-] preview.min.js
[edit]
[-] woocommerce-notices.9d7a1628d10a597bd42e.bundle.js
[edit]
[-] share-buttons.0bdd88c45462dfb2b073.bundle.min.js
[edit]
[-] webpack-pro.runtime.min.js
[edit]
[-] app.min.js
[edit]
[-] app.js
[edit]
[-] lottie.6edefd55e83420c3e577.bundle.js
[edit]
[-] animated-headline.9d0deabe7a095aba599a.bundle.js
[edit]
[-] page-transitions.min.js
[edit]
[-] hotspot.6ab1751404c381bfe390.bundle.min.js
[edit]
[-] popup.483b906ddaa1af17ff14.bundle.min.js
[edit]
[-] woocommerce-menu-cart.1fdfc1bdbd743360a054.bundle.min.js
[edit]
[-] video-playlist.e85695d7b9171d89c565.bundle.min.js
[edit]
[-] media-carousel.24f26a220d051ebe9cf0.bundle.js
[edit]
[-] social.2d2e44e8608690943f29.bundle.min.js
[edit]
[-] progress-tracker.7a4e50d1be14525d8ffb.bundle.min.js
[edit]
[-] video-playlist.35b54e34a5cb0387ddc0.bundle.js
[edit]
[-] slides.b2be07a53adca10fb263.bundle.js
[edit]
[-] woocommerce-cart.de67cf3afe8ce5d8311a.bundle.js
[edit]
[-] jszip.vendor.5f2c698c31faa5dfdb7c.bundle.min.js.LICENSE.txt
[edit]
[-] editor.min.js
[edit]
[-] jszip.vendor.fca003f76cde32380bb2.bundle.js
[edit]
[-] custom-code.js
[edit]
[-] woocommerce-checkout-page.c51ad6b97bbcc4d7f461.bundle.js
[edit]
[-] social.a44d2048d9b1fcb6c560.bundle.js
[edit]
[-] woocommerce-purchase-summary.986abc6a2956fbf75429.bundle.min.js
[edit]
[-] search-form.a396372f407d3c16a0ef.bundle.min.js
[edit]
[-] archive-posts.543f7a304d84538a71f2.bundle.js
[edit]
[-] gallery.80bd2ebe264e5ec1e591.bundle.js
[edit]
[-] woocommerce-my-account.b271ccbc23c638cdf33a.bundle.js
[edit]
[-] media-carousel.3a1cfc78c5d3383e935d.bundle.min.js
[edit]
[-] slides.b3c3013aaf60282ce45b.bundle.min.js
[edit]
[-] page-transitions-editor.30a228b929697de976ce.bundle.min.js
[edit]
[-] woocommerce-checkout-page.de22c838bda146ca0a77.bundle.min.js
[edit]
[-] woocommerce-notices.da27b22c491f7cbe9158.bundle.min.js
[edit]
[-] preloaded-elements-handlers.js
[edit]
[-] page-transitions-editor.f316a6908f6ddd23835f.bundle.js
[edit]
[-] webpack-pro.runtime.js
[edit]
[-] load-more.80eb3caec79a44347d74.bundle.min.js
[edit]
[-] jszip.vendor.5f2c698c31faa5dfdb7c.bundle.min.js
[edit]
[-] woocommerce-cart.6d2d2476f49308596186.bundle.min.js
[edit]
[-] countdown.b0ef6392ec4ff09ca2f2.bundle.min.js
[edit]
[-] portfolio.2fe17780e07233672e3b.bundle.min.js
[edit]
[-] nav-menu.1dac4a83f83a7b3c7934.bundle.js
[edit]
[-] paypal-button.3d0d5af7df85963df32c.bundle.min.js
[edit]
[-] form.40d683f118e1e1f37822.bundle.js
[edit]
[-] search-form.b54087cb78208841e9e9.bundle.js
[edit]
[-] gallery.9c61bb9957e10e6d7bda.bundle.min.js
[edit]
[-] screenshot.js
[edit]
[-] preview.js
[edit]
[-] portfolio.472eaa4ac6ea33e02365.bundle.js
[edit]
[-] progress-tracker.93daadba13b5e1d2c129.bundle.js
[edit]
[-] woocommerce-my-account.6c5bcaba786bebe3123b.bundle.min.js
[edit]
[-] countdown.494333ff20e0a2ae981c.bundle.js
[edit]
[-] share-buttons.da3a2fe5589f4d6df8be.bundle.js
[edit]
[-] hotspot.6561fc82c7a4cd4ad252.bundle.js
[edit]
[-] code-highlight.28a979661569ddbbf60d.bundle.min.js
[edit]
[-] table-of-contents.4c67276d84a32454299a.bundle.js
[edit]
[-] posts.5e1be2ed6501aa917477.bundle.js
[edit]
[-] admin.min.js
[edit]
[-] woocommerce-purchase-summary.6f7dc47a408b6b1e11cc.bundle.js
[edit]
[-] posts.fb47ff5b9f7ecb0aba80.bundle.min.js
[edit]
[-] preloaded-elements-handlers.min.js
[edit]
[-] page-transitions.js
[edit]
[-] qunit-tests.js
[edit]
[-] custom-code.min.js
[edit]
[-] animated-headline.2084307f107ab81be69e.bundle.min.js
[edit]
[-] lottie.147bf20db94f86cc4295.bundle.min.js
[edit]
[-] paypal-button.00c5c212bbc3b1d155b0.bundle.js
[edit]
[-] load-more.ac40b4a3f37f08bbeba2.bundle.js
[edit]