{"version":3,"sources":["../../node_modules/anchor-js/anchor.js","main.js","index.ts"],"names":["_anchorJs","_interopRequireDefault","require","e","__esModule","default","utils","debounce","func","wait","immediate","timeout","executedFunction","args","context","later","apply","callNow","clearTimeout","setTimeout","urlify","text","trim","replace","toLowerCase","substring","initializeAnchors","anchors","AnchorJS","options","visible","class","add","document","querySelectorAll","forEach","heading","newId","textContent","id","anchorLink","querySelector","setAttribute","item","href","getAttribute","value","startsWith","headingText","tagName","isDesignGuidelinesPage","window","location","pathname","hasTaxonomySlugWhitePaper","setupAnchors","setupHeaderShadow","siteHeader","toggleHeaderShadow","scrollY","classList","remove","addEventListener","setupAccordion","toggleAccordionOnResize","screenWidth","innerWidth","accordionNavs","nav","accordionContainer","event","accordionTitleLink","target","closest","preventDefault","accordionItem","arrow","toggle","setupBackToTop","backToTopButton","footer","scrollFunction","footerTop","getBoundingClientRect","top","footerHeight","offsetHeight","windowHeight","innerHeight","buttonHeight","style","position","bottom","easeInOutQuad","t","b","c","d","smoothScrollToTop","start","change","duration","currentTime","increment","animateScroll","val","scrollTo","requestAnimationFrame"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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","sourceRoot":"../src/js","sourcesContent":["/* eslint-env amd */\n/* globals module:false */\n\n// https://github.com/umdjs/umd/blob/master/templates/returnExports.js\n(function(root, factory) {\n 'use strict';\n\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory();\n } else {\n // Browser globals (root is window)\n root.AnchorJS = factory();\n root.anchors = new root.AnchorJS();\n }\n}(globalThis, function() {\n 'use strict';\n\n function AnchorJS(options) {\n this.options = options || {};\n this.elements = [];\n\n /**\n * Assigns options to the internal options object, and provides defaults.\n * @param {Object} opts - Options object\n */\n function _applyRemainingDefaultOptions(opts) {\n opts.icon = Object.prototype.hasOwnProperty.call(opts, 'icon') ? opts.icon : '\\uE9CB'; // Accepts characters (and also URLs?), like '#', '¶', '❡', or '§'.\n opts.visible = Object.prototype.hasOwnProperty.call(opts, 'visible') ? opts.visible : 'hover'; // Also accepts 'always'\n opts.placement = Object.prototype.hasOwnProperty.call(opts, 'placement') ? opts.placement : 'right'; // Also accepts 'left'\n opts.ariaLabel = Object.prototype.hasOwnProperty.call(opts, 'ariaLabel') ? opts.ariaLabel : 'Anchor'; // Accepts any text.\n opts.class = Object.prototype.hasOwnProperty.call(opts, 'class') ? opts.class : ''; // Accepts any class name.\n opts.base = Object.prototype.hasOwnProperty.call(opts, 'base') ? opts.base : ''; // Accepts any base URI.\n // Using Math.floor here will ensure the value is Number-cast and an integer.\n opts.truncate = Object.prototype.hasOwnProperty.call(opts, 'truncate') ? Math.floor(opts.truncate) : 64; // Accepts any value that can be typecast to a number.\n opts.titleText = Object.prototype.hasOwnProperty.call(opts, 'titleText') ? opts.titleText : ''; // Accepts any text.\n }\n\n _applyRemainingDefaultOptions(this.options);\n\n /**\n * Add anchor links to page elements.\n * @param {String|Array|Nodelist} selector - A CSS selector for targeting the elements you wish to add anchor links\n * to. Also accepts an array or nodeList containing the relavant elements.\n * @return {this} - The AnchorJS object\n */\n this.add = function(selector) {\n var elements,\n elsWithIds,\n idList,\n elementID,\n i,\n index,\n count,\n tidyText,\n newTidyText,\n anchor,\n hrefBase,\n indexesToDrop = [];\n\n // We reapply options here because somebody may have overwritten the default options object when setting options.\n // For example, this overwrites all options but visible:\n //\n // anchors.options = { visible: 'always'; }\n _applyRemainingDefaultOptions(this.options);\n\n // Provide a sensible default selector, if none is given.\n if (!selector) {\n selector = 'h2, h3, h4, h5, h6';\n }\n\n elements = _getElements(selector);\n\n if (elements.length === 0) {\n return this;\n }\n\n _addBaselineStyles();\n\n // We produce a list of existing IDs so we don't generate a duplicate.\n elsWithIds = document.querySelectorAll('[id]');\n idList = [].map.call(elsWithIds, function(el) {\n return el.id;\n });\n\n for (i = 0; i < elements.length; i++) {\n if (this.hasAnchorJSLink(elements[i])) {\n indexesToDrop.push(i);\n continue;\n }\n\n if (elements[i].hasAttribute('id')) {\n elementID = elements[i].getAttribute('id');\n } else if (elements[i].hasAttribute('data-anchor-id')) {\n elementID = elements[i].getAttribute('data-anchor-id');\n } else {\n tidyText = this.urlify(elements[i].textContent);\n\n // Compare our generated ID to existing IDs (and increment it if needed)\n // before we add it to the page.\n newTidyText = tidyText;\n count = 0;\n do {\n if (index !== undefined) {\n newTidyText = tidyText + '-' + count;\n }\n\n index = idList.indexOf(newTidyText);\n count += 1;\n } while (index !== -1);\n\n index = undefined;\n idList.push(newTidyText);\n\n elements[i].setAttribute('id', newTidyText);\n elementID = newTidyText;\n }\n\n // The following code efficiently builds this DOM structure:\n // `\n // ;`\n anchor = document.createElement('a');\n anchor.className = 'anchorjs-link ' + this.options.class;\n anchor.setAttribute('aria-label', this.options.ariaLabel);\n anchor.setAttribute('data-anchorjs-icon', this.options.icon);\n if (this.options.titleText) {\n anchor.title = this.options.titleText;\n }\n\n // Adjust the href if there's a tag. See https://github.com/bryanbraun/anchorjs/issues/98\n hrefBase = document.querySelector('base') ? window.location.pathname + window.location.search : '';\n hrefBase = this.options.base || hrefBase;\n anchor.href = hrefBase + '#' + elementID;\n\n if (this.options.visible === 'always') {\n anchor.style.opacity = '1';\n }\n\n if (this.options.icon === '\\uE9CB') {\n anchor.style.font = '1em/1 anchorjs-icons';\n\n // We set lineHeight = 1 here because the `anchorjs-icons` font family could otherwise affect the\n // height of the heading. This isn't the case for icons with `placement: left`, so we restore\n // line-height: inherit in that case, ensuring they remain positioned correctly. For more info,\n // see https://github.com/bryanbraun/anchorjs/issues/39.\n if (this.options.placement === 'left') {\n anchor.style.lineHeight = 'inherit';\n }\n }\n\n if (this.options.placement === 'left') {\n anchor.style.position = 'absolute';\n anchor.style.marginLeft = '-1.25em';\n anchor.style.paddingRight = '.25em';\n anchor.style.paddingLeft = '.25em';\n elements[i].insertBefore(anchor, elements[i].firstChild);\n } else { // if the option provided is `right` (or anything else).\n anchor.style.marginLeft = '.1875em';\n anchor.style.paddingRight = '.1875em';\n anchor.style.paddingLeft = '.1875em';\n elements[i].appendChild(anchor);\n }\n }\n\n for (i = 0; i < indexesToDrop.length; i++) {\n elements.splice(indexesToDrop[i] - i, 1);\n }\n\n this.elements = this.elements.concat(elements);\n\n return this;\n };\n\n /**\n * Removes all anchorjs-links from elements targeted by the selector.\n * @param {String|Array|Nodelist} selector - A CSS selector string targeting elements with anchor links,\n * OR a nodeList / array containing the DOM elements.\n * @return {this} - The AnchorJS object\n */\n this.remove = function(selector) {\n var index,\n domAnchor,\n elements = _getElements(selector);\n\n for (var i = 0; i < elements.length; i++) {\n domAnchor = elements[i].querySelector('.anchorjs-link');\n if (domAnchor) {\n // Drop the element from our main list, if it's in there.\n index = this.elements.indexOf(elements[i]);\n if (index !== -1) {\n this.elements.splice(index, 1);\n }\n\n // Remove the anchor from the DOM.\n elements[i].removeChild(domAnchor);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all anchorjs links. Mostly used for tests.\n */\n this.removeAll = function() {\n this.remove(this.elements);\n };\n\n /**\n * Urlify - Refine text so it makes a good ID.\n *\n * To do this, we remove apostrophes, replace non-safe characters with hyphens,\n * remove extra hyphens, truncate, trim hyphens, and make lowercase.\n *\n * @param {String} text - Any text. Usually pulled from the webpage element we are linking to.\n * @return {String} - hyphen-delimited text for use in IDs and URLs.\n */\n this.urlify = function(text) {\n // Decode HTML characters such as ' ' first.\n var textareaElement = document.createElement('textarea');\n textareaElement.innerHTML = text;\n text = textareaElement.value;\n\n // Regex for finding the non-safe URL characters (many need escaping):\n // & +$,:;=?@\"#{}|^~[`%!'<>]./()*\\ (newlines, tabs, backspace, vertical tabs, and non-breaking space)\n var nonsafeChars = /[& +$,:;=?@\"#{}|^~[`%!'<>\\]./()*\\\\\\n\\t\\b\\v\\u00A0]/g;\n\n // The reason we include this _applyRemainingDefaultOptions is so urlify can be called independently,\n // even after setting options. This can be useful for tests or other applications.\n if (!this.options.truncate) {\n _applyRemainingDefaultOptions(this.options);\n }\n\n // Note: we trim hyphens after truncating because truncating can cause dangling hyphens.\n // Example string: // \" ⚡⚡ Don't forget: URL fragments should be i18n-friendly, hyphenated, short, and clean.\"\n return text.trim() // \"⚡⚡ Don't forget: URL fragments should be i18n-friendly, hyphenated, short, and clean.\"\n .replace(/'/gi, '') // \"⚡⚡ Dont forget: URL fragments should be i18n-friendly, hyphenated, short, and clean.\"\n .replace(nonsafeChars, '-') // \"⚡⚡-Dont-forget--URL-fragments-should-be-i18n-friendly--hyphenated--short--and-clean-\"\n .replace(/-{2,}/g, '-') // \"⚡⚡-Dont-forget-URL-fragments-should-be-i18n-friendly-hyphenated-short-and-clean-\"\n .substring(0, this.options.truncate) // \"⚡⚡-Dont-forget-URL-fragments-should-be-i18n-friendly-hyphenated-\"\n .replace(/^-+|-+$/gm, '') // \"⚡⚡-Dont-forget-URL-fragments-should-be-i18n-friendly-hyphenated\"\n .toLowerCase(); // \"⚡⚡-dont-forget-url-fragments-should-be-i18n-friendly-hyphenated\"\n };\n\n /**\n * Determines if this element already has an AnchorJS link on it.\n * Uses this technique: https://stackoverflow.com/a/5898748/1154642\n * @param {HTMLElement} el - a DOM node\n * @return {Boolean} true/false\n */\n this.hasAnchorJSLink = function(el) {\n var hasLeftAnchor = el.firstChild && (' ' + el.firstChild.className + ' ').indexOf(' anchorjs-link ') > -1,\n hasRightAnchor = el.lastChild && (' ' + el.lastChild.className + ' ').indexOf(' anchorjs-link ') > -1;\n\n return hasLeftAnchor || hasRightAnchor || false;\n };\n\n /**\n * Turns a selector, nodeList, or array of elements into an array of elements (so we can use array methods).\n * It also throws errors on any other inputs. Used to handle inputs to .add and .remove.\n * @param {String|Array|Nodelist} input - A CSS selector string targeting elements with anchor links,\n * OR a nodeList / array containing the DOM elements.\n * @return {Array} - An array containing the elements we want.\n */\n function _getElements(input) {\n var elements;\n if (typeof input === 'string' || input instanceof String) {\n // See https://davidwalsh.name/nodelist-array for the technique transforming nodeList -> Array.\n elements = [].slice.call(document.querySelectorAll(input));\n } else if (Array.isArray(input) || input instanceof NodeList) {\n elements = [].slice.call(input);\n } else {\n throw new TypeError('The selector provided to AnchorJS was invalid.');\n }\n\n return elements;\n }\n\n /**\n * _addBaselineStyles\n * Adds baseline styles to the page, used by all AnchorJS links irregardless of configuration.\n */\n function _addBaselineStyles() {\n // We don't want to add global baseline styles if they've been added before.\n if (document.head.querySelector('style.anchorjs') !== null) {\n return;\n }\n\n var style = document.createElement('style'),\n linkRule =\n '.anchorjs-link{' +\n 'opacity:0;' +\n 'text-decoration:none;' +\n '-webkit-font-smoothing:antialiased;' +\n '-moz-osx-font-smoothing:grayscale' +\n '}',\n hoverRule =\n ':hover>.anchorjs-link,' +\n '.anchorjs-link:focus{' +\n 'opacity:1' +\n '}',\n anchorjsLinkFontFace =\n '@font-face{' +\n 'font-family:anchorjs-icons;' + // Icon from icomoon; 10px wide & 10px tall; 2 empty below & 4 above\n 'src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x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MAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format(\"truetype\")' +\n '}',\n pseudoElContent =\n '[data-anchorjs-icon]::after{' +\n 'content:attr(data-anchorjs-icon)' +\n '}',\n firstStyleEl;\n\n style.className = 'anchorjs';\n style.appendChild(document.createTextNode('')); // Necessary for Webkit.\n\n // We place it in the head with the other style tags, if possible, so as to\n // not look out of place. We insert before the others so these styles can be\n // overridden if necessary.\n firstStyleEl = document.head.querySelector('[rel=\"stylesheet\"],style');\n if (firstStyleEl === undefined) {\n document.head.appendChild(style);\n } else {\n document.head.insertBefore(style, firstStyleEl);\n }\n\n style.sheet.insertRule(linkRule, style.sheet.cssRules.length);\n style.sheet.insertRule(hoverRule, style.sheet.cssRules.length);\n style.sheet.insertRule(pseudoElContent, style.sheet.cssRules.length);\n style.sheet.insertRule(anchorjsLinkFontFace, style.sheet.cssRules.length);\n }\n }\n\n return AnchorJS;\n}));\n","import AnchorJS from \"anchor-js\";\n\n// Utility Functions\nconst utils = {\n debounce(func, wait, immediate) {\n let timeout;\n return function executedFunction(...args) {\n const context = this;\n const later = () => {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n const callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n },\n urlify(text) {\n return text\n .trim()\n .replace(/^[\\d\\.]+\\s*/, \"\") // Remove leading numbers and dots\n .toLowerCase()\n .replace(/[^a-z0-9 -]/g, \"\") // Remove invalid chars\n .replace(/\\s+/g, \"-\") // Replace spaces with -\n .replace(/-+/g, \"-\") // Replace multiple - with single -\n .substring(0, 64); // Trim to 64 characters\n },\n};\n\n// Anchor Initialization\nfunction initializeAnchors() {\n const anchors = new AnchorJS();\n anchors.options.visible = \"always\";\n anchors.options.class = \"anchor-link\";\n anchors.options.urlify = utils.urlify;\n\n anchors.add(\".wp-block-post-content h2\");\n\n document.querySelectorAll(\".wp-block-post-content h2\").forEach((heading) => {\n const newId = anchors.options.urlify(heading.textContent);\n heading.id = newId;\n const anchorLink = heading.querySelector(\".anchorjs-link\");\n if (anchorLink) {\n anchorLink.setAttribute(\"href\", `#${newId}`);\n }\n });\n\n document\n .querySelectorAll(\"#toc-list a, #toc-select option\")\n .forEach((item) => {\n const href = item.getAttribute(\"href\") || item.value;\n if (href && href.startsWith(\"#\")) {\n const headingText = item.textContent.trim();\n const newId = anchors.options.urlify(headingText);\n if (item.tagName === \"A\") {\n item.setAttribute(\"href\", `#${newId}`);\n } else {\n item.value = `#${newId}`;\n }\n }\n });\n}\n\n// Page Condition Checks\nfunction isDesignGuidelinesPage() {\n return window.location.pathname.startsWith(\"/design-guidelines/\");\n}\n\nfunction hasTaxonomySlugWhitePaper() {\n return document.querySelector(\".content-type-white-paper\") !== null;\n}\n\n// Initialize Anchors Based on Conditions\nfunction setupAnchors() {\n if (isDesignGuidelinesPage() || hasTaxonomySlugWhitePaper()) {\n initializeAnchors();\n }\n}\n\n// Header Shadow on Scroll\nfunction setupHeaderShadow() {\n const siteHeader = document.querySelector(\".site-header\");\n\n const toggleHeaderShadow = () => {\n if (window.scrollY > 100) {\n siteHeader.classList.add(\"header-box-shadow\");\n } else {\n siteHeader.classList.remove(\"header-box-shadow\");\n }\n };\n\n window.addEventListener(\"scroll\", utils.debounce(toggleHeaderShadow, 50));\n}\n\n// Accordion Functionality\nfunction setupAccordion() {\n const toggleAccordionOnResize = () => {\n const screenWidth = window.innerWidth;\n const accordionNavs = document.querySelectorAll(\".accordion-item nav\");\n\n accordionNavs.forEach((nav) => {\n if (screenWidth <= 991) {\n nav.classList.add(\"collapsed\");\n } else {\n nav.classList.remove(\"collapsed\");\n }\n });\n };\n\n const accordionContainer = document.querySelector(\".accordion-container\");\n if (accordionContainer) {\n accordionContainer.addEventListener(\"click\", (event) => {\n const accordionTitleLink = event.target.closest(\".accordion-title a\");\n if (accordionTitleLink) {\n event.preventDefault();\n const accordionItem = accordionTitleLink.closest(\".accordion-item\");\n const nav = accordionItem.querySelector(\"nav\");\n const arrow = accordionItem.querySelector(\"img\");\n\n nav.classList.toggle(\"collapsed\");\n if (arrow) {\n arrow.classList.toggle(\"collapsed\");\n }\n }\n });\n }\n\n utils.debounce(toggleAccordionOnResize, 100)();\n window.addEventListener(\n \"resize\",\n utils.debounce(toggleAccordionOnResize, 100)\n );\n}\n\n// Back to Top Button\nfunction setupBackToTop() {\n const backToTopButton = document.querySelector(\".back-to-top\");\n const footer = document.querySelector(\".site-footer\");\n\n if (!backToTopButton || !footer) return;\n\n const scrollFunction = () => {\n if (window.scrollY > 20) {\n backToTopButton.classList.add(\"show\");\n } else {\n backToTopButton.classList.remove(\"show\");\n }\n\n const footerTop = footer.getBoundingClientRect().top;\n const footerHeight = footer.offsetHeight;\n const windowHeight = window.innerHeight;\n const buttonHeight = backToTopButton.offsetHeight;\n\n if (footerTop < windowHeight - buttonHeight) {\n backToTopButton.style.position = \"absolute\";\n backToTopButton.style.bottom = `${footerHeight - buttonHeight - 150}px`;\n backToTopButton.classList.add(\"stuck\");\n } else {\n backToTopButton.style.position = \"fixed\";\n backToTopButton.style.bottom = \"50px\";\n backToTopButton.classList.remove(\"stuck\");\n }\n };\n\n const easeInOutQuad = (t, b, c, d) => {\n t /= d / 2;\n if (t < 1) return (c / 2) * t * t + b;\n t--;\n return (-c / 2) * (t * (t - 2) - 1) + b;\n };\n\n const smoothScrollToTop = () => {\n const start = window.scrollY;\n const change = 0 - start;\n const duration = 500;\n let currentTime = 0;\n const increment = 20;\n\n const animateScroll = () => {\n currentTime += increment;\n const val = easeInOutQuad(currentTime, start, change, duration);\n window.scrollTo(0, val);\n if (currentTime < duration) {\n window.requestAnimationFrame(animateScroll);\n }\n };\n\n animateScroll();\n };\n\n window.addEventListener(\"scroll\", utils.debounce(scrollFunction, 50));\n backToTopButton.addEventListener(\"click\", (event) => {\n event.preventDefault();\n smoothScrollToTop();\n });\n}\n\n// Initialize All Functions on DOM Content Loaded\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n setupAnchors();\n setupHeaderShadow();\n setupAccordion();\n setupBackToTop();\n});\n","// JS\nimport \"./main\";\n\n// SCSS\nimport \"../scss/core-blocks\";\nimport \"../scss/legacy-styles\";\nimport \"../scss/tribe-events-pro\";\nimport \"../scss/algolia-theme\";\nimport \"../scss/cf7\";\nimport \"../scss/fonts\";\n//import \"../scss/bootstrap-5.3.2/scss/bootstrap.scss\";\n"]}