/*
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./js/src/front-end.js":
/*!*****************************!*\
!*** ./js/src/front-end.js ***!
\*****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reframe_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! reframe.js */ \"./node_modules/reframe.js/dist/reframe.es.js\");\n/* harmony import */ var _modules_external_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/external-link */ \"./js/src/modules/external-link.js\");\n/* harmony import */ var _modules_anchors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/anchors */ \"./js/src/modules/anchors.js\");\n/* harmony import */ var _modules_top__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/top */ \"./js/src/modules/top.js\");\n/* harmony import */ var _modules_a11y_skip_link__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/a11y-skip-link */ \"./js/src/modules/a11y-skip-link.js\");\n/* harmony import */ var _modules_navigation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/navigation */ \"./js/src/modules/navigation.js\");\n/* eslint-disable max-len, no-param-reassign, no-unused-vars */\n/**\n * Air theme JavaScript.\n */\n\n// Import modules\n\n\n\n\n\n\ndocument.addEventListener('DOMContentLoaded', function () {\n (0,_modules_anchors__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n (0,_modules_top__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n (0,_modules_external_link__WEBPACK_IMPORTED_MODULE_1__.styleExternalLinks)();\n (0,_modules_external_link__WEBPACK_IMPORTED_MODULE_1__.initExternalLinkLabels)();\n (0,_modules_a11y_skip_link__WEBPACK_IMPORTED_MODULE_4__[\"default\"])();\n\n // Init navigation\n (0,_modules_navigation__WEBPACK_IMPORTED_MODULE_5__.navDesktop)();\n (0,_modules_navigation__WEBPACK_IMPORTED_MODULE_5__.navMobile)();\n\n // Fit video embeds to container\n (0,reframe_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.wp-has-aspect-ratio iframe');\n});\n\n//# sourceURL=webpack://air-light/./js/src/front-end.js?");
/***/ }),
/***/ "./js/src/modules/a11y-skip-link.js":
/*!******************************************!*\
!*** ./js/src/modules/a11y-skip-link.js ***!
\******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var moveto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moveto */ \"./node_modules/moveto/dist/moveTo.js\");\n/* harmony import */ var moveto__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moveto__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * @Author: Roni Laukkarinen\n * @Date: 2022-05-12 17:32:43\n * @Last Modified by: Roni Laukkarinen\n * @Last Modified time: 2022-10-12 15:06:50\n */\n\nvar initA11ySkipLink = function initA11ySkipLink() {\n // Go through all the headings of the page and select the first one\n var a11ySkipLinkTarget = document.querySelectorAll('h1, h2, h3, h4, h5, h6')[0];\n var a11ySkipLink = document.querySelectorAll('.skip-link')[0];\n\n // Register trigger element\n // eslint-disable-next-line no-unused-vars, no-restricted-globals\n var moveTo = new (moveto__WEBPACK_IMPORTED_MODULE_0___default())();\n\n // When clicked, move focus to the target element\n\n if (a11ySkipLink) {\n a11ySkipLink.addEventListener('click', function () {\n a11ySkipLinkTarget.setAttribute('tabindex', '-1');\n a11ySkipLinkTarget.focus();\n moveTo.move(a11ySkipLinkTarget);\n });\n }\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (initA11ySkipLink);\n\n//# sourceURL=webpack://air-light/./js/src/modules/a11y-skip-link.js?");
/***/ }),
/***/ "./js/src/modules/anchors.js":
/*!***********************************!*\
!*** ./js/src/modules/anchors.js ***!
\***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var moveto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moveto */ \"./node_modules/moveto/dist/moveTo.js\");\n/* harmony import */ var moveto__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moveto__WEBPACK_IMPORTED_MODULE_0__);\n/* eslint-disable no-param-reassign, no-undef */\n/**\n * @Author: Roni Laukkarinen\n * @Date: 2022-05-07 12:20:13\n * @Last Modified by: Roni Laukkarinen\n * @Last Modified time: 2022-09-28 14:33:09\n */\n\nvar initAnchors = function initAnchors() {\n // General anchors used in links with class \"js-trigger\"\n var easeFunctions = {\n easeInQuad: function easeInQuad(t, b, c, d) {\n t /= d;\n return c * t * t + b;\n },\n easeOutQuad: function easeOutQuad(t, b, c, d) {\n t /= d;\n return -c * t * (t - 2) + b;\n }\n };\n var moveTo = new (moveto__WEBPACK_IMPORTED_MODULE_0___default())({\n ease: 'easeInQuad'\n }, easeFunctions);\n var triggers = document.getElementsByClassName('js-trigger');\n // eslint-disable-next-line no-plusplus\n for (var i = 0; i < triggers.length; i++) {\n moveTo.registerTrigger(triggers[i]);\n }\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (initAnchors);\n\n//# sourceURL=webpack://air-light/./js/src/modules/anchors.js?");
/***/ }),
/***/ "./js/src/modules/external-link.js":
/*!*****************************************!*\
!*** ./js/src/modules/external-link.js ***!
\*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getChildAltText\": () => (/* binding */ getChildAltText),\n/* harmony export */ \"initExternalLinkLabels\": () => (/* binding */ initExternalLinkLabels),\n/* harmony export */ \"styleExternalLinks\": () => (/* binding */ styleExternalLinks)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _localization__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./localization */ \"./js/src/modules/localization.js\");\n\n/* eslint-disable no-param-reassign */\n/**\n * @Author: Roni Laukkarinen\n * @Date: 2021-09-01 11:55:37\n * @Last Modified by: Roni Laukkarinen\n * @Last Modified time: 2022-10-31 16:23:45\n */\n/**\n * Style external links\n */\n\n\nfunction isLinkExternal(link, localDomains) {\n // Empty links are not external\n if (!link.length) {\n return false;\n }\n var exceptions = ['#', 'tel:', 'mailto:', '/'];\n\n // Check if the url starts with some of the exceptions\n var isException = exceptions.some(function (exception) {\n var compare = new RegExp(\"^\".concat(exception), 'g');\n return compare.test(link);\n });\n if (isException) {\n return false;\n }\n var linkUrl;\n try {\n linkUrl = new URL(link);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.log(\"Invalid URL: \".concat(link));\n return false;\n }\n // Check if host is one of the local domains\n return !localDomains.some(function (domain) {\n return linkUrl.host === domain;\n });\n}\n\n/**\n * Try to get image alt texts from inside a link\n * to use in aria-label, when only elements inside\n * of link are images\n * @param {*} link DOM link element\n * @returns string\n */\nfunction getChildAltText(link) {\n var children = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(link.children);\n if (children.length === 0) {\n return '';\n }\n var childImgs = children.filter(function (child) {\n return child.tagName.toLowerCase() === 'img';\n });\n\n // If there are other elements than img elements, no need to add aria-label\n if (children.length !== childImgs.length) {\n return '';\n }\n\n // Find alt texts and add to array\n var altTexts = childImgs.filter(function (child) {\n return child.alt && child.alt !== '';\n }).map(function (child) {\n return child.alt;\n });\n\n // If there is no alt texts,\n if (!altTexts.length) {\n return '';\n }\n return altTexts.join(', ');\n}\nfunction styleExternalLinks() {\n var localDomains = [window.location.host];\n if (typeof window.air_light_externalLinkDomains !== 'undefined') {\n localDomains = localDomains.concat(window.air_light_externalLinkDomains);\n }\n var links = document.querySelectorAll('a');\n var externalLinks = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(links).filter(function (link) {\n return isLinkExternal(link.href, localDomains);\n });\n\n // eslint-disable-next-line consistent-return\n externalLinks.forEach(function (externalLink) {\n // Abort mission if there is only img element inside of link\n if (externalLink.childElementCount === 1 && externalLink.children[0].tagName.toLowerCase() === 'img') {\n return false;\n }\n if (!externalLink.classList.contains('no-external-link-label')) {\n var textContent = externalLink.textContent.trim().length ? externalLink.textContent.trim() : getChildAltText(externalLink);\n var ariaLabel = externalLink.target === '_blank' ? \"\".concat(textContent, \": \").concat((0,_localization__WEBPACK_IMPORTED_MODULE_1__[\"default\"])('external_link'), \", \").concat((0,_localization__WEBPACK_IMPORTED_MODULE_1__[\"default\"])('target_blank')) : \"\".concat(textContent, \": \").concat((0,_localization__WEBPACK_IMPORTED_MODULE_1__[\"default\"])('external_link'));\n externalLink.setAttribute('aria-label', ariaLabel);\n }\n\n // Arrow icon won't be added if one of these classes is defined for the link\n var classExceptions = ['no-external-link-indicator', 'global-link', 'button'];\n if (!classExceptions.some(function (className) {\n return externalLink.classList.contains(className);\n })) {\n // Add SVG arrow icon\n externalLink.insertAdjacentHTML('beforeend', '');\n }\n });\n}\nfunction initExternalLinkLabels() {\n // Add aria-labels to links without text or aria-labels and contain image with alt text\n var links = (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(document.querySelectorAll('a'));\n // eslint-disable-next-line no-unused-vars\n var linksWithImgChildren = links.forEach(function (link) {\n // If link already has text content or an aria label no need to add aria-label\n if (link.textContent.trim() !== '' || link.ariaLabel) {\n return;\n }\n var ariaLabel = getChildAltText(link);\n if (ariaLabel !== '') {\n link.ariaLabel = ariaLabel;\n }\n });\n}\n\n//# sourceURL=webpack://air-light/./js/src/modules/external-link.js?");
/***/ }),
/***/ "./js/src/modules/localization.js":
/*!****************************************!*\
!*** ./js/src/modules/localization.js ***!
\****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ getLocalization)\n/* harmony export */ });\nfunction getLocalization(stringKey) {\n if (typeof window.air_light_screenReaderText === 'undefined' || typeof window.air_light_screenReaderText[stringKey] === 'undefined') {\n // eslint-disable-next-line no-console\n console.error(\"Missing translation for \".concat(stringKey));\n return '';\n }\n return window.air_light_screenReaderText[stringKey];\n}\n\n//# sourceURL=webpack://air-light/./js/src/modules/localization.js?");
/***/ }),
/***/ "./js/src/modules/navigation.js":
/*!**************************************!*\
!*** ./js/src/modules/navigation.js ***!
\**************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"navDesktop\": () => (/* binding */ navDesktop),\n/* harmony export */ \"navMobile\": () => (/* binding */ navMobile),\n/* harmony export */ \"navSticky\": () => (/* binding */ navSticky)\n/* harmony export */ });\n/* harmony import */ var _navigation_add_multiple_event_listeners__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./navigation/add-multiple-event-listeners */ \"./js/src/modules/navigation/add-multiple-event-listeners.js\");\n/* harmony import */ var _navigation_calculate_burger_menu_position__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./navigation/calculate-burger-menu-position */ \"./js/src/modules/navigation/calculate-burger-menu-position.js\");\n/* harmony import */ var _navigation_a11y_focus_trap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./navigation/a11y-focus-trap */ \"./js/src/modules/navigation/a11y-focus-trap.js\");\n/* harmony import */ var _navigation_calculate_dropdown_toggle_height__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./navigation/calculate-dropdown-toggle-height */ \"./js/src/modules/navigation/calculate-dropdown-toggle-height.js\");\n/* harmony import */ var _navigation_check_for_submenu_overflow__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./navigation/check-for-submenu-overflow */ \"./js/src/modules/navigation/check-for-submenu-overflow.js\");\n/* harmony import */ var _navigation_dropdown_menu_on_hover__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./navigation/dropdown-menu-on-hover */ \"./js/src/modules/navigation/dropdown-menu-on-hover.js\");\n/* harmony import */ var _navigation_a11y_add_dropdown_toggle_labels__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./navigation/a11y-add-dropdown-toggle-labels */ \"./js/src/modules/navigation/a11y-add-dropdown-toggle-labels.js\");\n/* harmony import */ var _navigation_a11y_dropdown_menu_keyboard_navigation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./navigation/a11y-dropdown-menu-keyboard-navigation */ \"./js/src/modules/navigation/a11y-dropdown-menu-keyboard-navigation.js\");\n/**\n * Navigation.js module\n * The original, accessible navigation module for Air-light\n *\n * @Author: Roni Laukkarinen\n * @Date: 2022-06-30 16:24:47\n * @Last Modified by: Roni Laukkarinen\n * @Last Modified time: 2022-12-31 01:48:34\n */\n\n// Import functions needed for the navigation module\n\n\n\n\n\n\n\n\nvar navDesktop = function navDesktop() {\n // Define globals\n var menuItems = document.querySelectorAll('.menu-item');\n\n // Define focusable elements on sub-menu (.menu-item a, .dropdown button)\n var focusableElementsforDropdown = document.querySelectorAll('.menu-item a, .dropdown button, .button-nav');\n\n // If main-menu is not found, bail\n if (!document.getElementById('main-menu')) {\n return;\n }\n\n // Dropdown menus\n (0,_navigation_a11y_add_dropdown_toggle_labels__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(menuItems);\n (0,_navigation_a11y_dropdown_menu_keyboard_navigation__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(menuItems, focusableElementsforDropdown);\n\n // Dropdown on mouse hover\n (0,_navigation_dropdown_menu_on_hover__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(menuItems);\n\n // Check for submenu overflow\n (0,_navigation_check_for_submenu_overflow__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(menuItems);\n};\nvar navMobile = function navMobile() {\n // If burger toggle is not found, bail\n if (!document.getElementById('nav-toggle')) {\n // eslint-disable-next-line no-console\n console.log('Warning: No nav-toggle found.');\n return;\n }\n function navToggle(e) {\n // If clicked with mouse or enter key\n if (e.type === 'click' || e.keyCode === 13) {\n // Activate nav\n document.body.classList.toggle('js-nav-active');\n\n // Toggle aria-expanded attribute, if it's false, change to true and vice versa\n if (document.getElementById('nav-toggle').getAttribute('aria-expanded') === 'false') {\n document.getElementById('nav-toggle').setAttribute('aria-expanded', 'true');\n } else {\n document.getElementById('nav-toggle').setAttribute('aria-expanded', 'false');\n }\n\n // Toggle aria-label\n // eslint-disable-next-line camelcase, no-undef\n if (document.getElementById('nav-toggle').getAttribute('aria-label') === air_light_screenReaderText.expand_toggle) {\n // eslint-disable-next-line camelcase, no-undef\n document.getElementById('nav-toggle').setAttribute('aria-label', air_light_screenReaderText.collapse_toggle);\n } else {\n // eslint-disable-next-line camelcase, no-undef\n document.getElementById('nav-toggle').setAttribute('aria-label', air_light_screenReaderText.expand_toggle);\n }\n\n // Center vertically the absolute positioned mobile dropdown toggles by setting fixed height\n (0,_navigation_calculate_dropdown_toggle_height__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n }\n }\n\n // When clicking #nav-toggle, add .js-nav-active body class\n (0,_navigation_add_multiple_event_listeners__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(document.getElementById('nav-toggle'), ['click', 'keydown', 'keypress'], navToggle);\n\n // Get all dropdown-toggles\n var dropdownToggles = document.querySelectorAll('.dropdown-toggle');\n\n // Loop through dropdown-toggles\n dropdownToggles.forEach(function (dropdownToggle) {\n // When clicking a dropdown-toggle, add .js-dropdown-active class to the parent .menu-item\n (0,_navigation_add_multiple_event_listeners__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dropdownToggle, ['click', 'keydown', 'keypress'], _navigation_calculate_dropdown_toggle_height__WEBPACK_IMPORTED_MODULE_3__[\"default\"]);\n });\n\n // Calculate mobile nav-toggle position\n (0,_navigation_calculate_burger_menu_position__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\n\n // Focusable elements\n var focusableElements = document.getElementById('nav').querySelectorAll('a, button');\n focusableElements.forEach(function (menuItem) {\n menuItem.addEventListener('keyup', _navigation_a11y_focus_trap__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n });\n};\n\n// Sticky navigation\n// eslint-disable-next-line no-unused-vars\nvar navSticky = function navSticky() {\n function initStickyNavStyles() {\n // Add default styles for sticky navigation as