/*
 * 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__ = ({

/***/ "./src/templates/site-layout/component/site-header/site-header.js":
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _site_header_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"./src/templates/site-layout/component/site-header/site-header.scss\");\n\nDrupal.behaviors.siteHeader = {\n  attach: function attach(context) {\n    // Amount to scroll before the site_header gets small.\n    var DESKTOP_THRESHOLD = 50;\n    var HTML = document.documentElement;\n    var SMALL_HEADER_MQ = window.matchMedia(\"(max-width: \".concat(getComputedStyle(HTML).getPropertyValue('--small-header-mq'), \")\"));\n    var SITE_HEADER = context.querySelector('[data-js=\"site-header\"]');\n    if (!SITE_HEADER) return;\n    var SITE_HEADER_CONTENT = SITE_HEADER.querySelector('.site-header__content');\n    if (!SITE_HEADER_CONTENT) return;\n    var debounceTimeout;\n    var scrollTicking = false;\n    var isHeaderSmall = false;\n    var lastScrollY = window.scrollY || HTML.scrollTop || 0;\n\n    // Get the threshold amount based on the mobile breakpoint.\n    var getCurrentThreshold = function getCurrentThreshold() {\n      return SMALL_HEADER_MQ.matches ? 0 : DESKTOP_THRESHOLD;\n    };\n    var shouldHeaderBeSmall = function shouldHeaderBeSmall() {\n      return SMALL_HEADER_MQ.matches || lastScrollY >= getCurrentThreshold();\n    };\n    var updateHeaderHeight = function updateHeaderHeight() {\n      // If there's a CSS transition, wait for it to complete.\n      var hasTransition = getComputedStyle(SITE_HEADER_CONTENT).transition !== 'none';\n      if (hasTransition) {\n        var _handleTransitionEnd = function handleTransitionEnd() {\n          HTML.style.setProperty('--site-header-height', \"\".concat(SITE_HEADER_CONTENT.clientHeight, \"px\"));\n          SITE_HEADER_CONTENT.removeEventListener('transitionend', _handleTransitionEnd);\n        };\n        SITE_HEADER_CONTENT.addEventListener('transitionend', _handleTransitionEnd, {\n          once: true\n        });\n\n        // Fallback timeout in case transitionend doesn't fire.\n        setTimeout(function () {\n          HTML.style.setProperty('--site-header-height', \"\".concat(SITE_HEADER_CONTENT.clientHeight, \"px\"));\n          SITE_HEADER_CONTENT.removeEventListener('transitionend', _handleTransitionEnd);\n        }, 500);\n      } else {\n        // No transition, update immediately.\n        HTML.style.setProperty('--site-header-height', \"\".concat(SITE_HEADER_CONTENT.clientHeight, \"px\"));\n      }\n    };\n    var handleHeaderStateChange = function handleHeaderStateChange(event) {\n      var EVENT_TYPE = event.type;\n      var executeUpdate = function executeUpdate() {\n        // Update scroll position if this is a scroll event\n        if (EVENT_TYPE === 'scroll') {\n          lastScrollY = window.scrollY || HTML.scrollTop || 0;\n          scrollTicking = false;\n        }\n        HTML.removeAttribute('data-site-header-small');\n        isHeaderSmall = false;\n        updateHeaderHeight();\n        if (shouldHeaderBeSmall() && !isHeaderSmall) {\n          HTML.setAttribute('data-site-header-small', true);\n          isHeaderSmall = true;\n          updateHeaderHeight();\n        }\n      };\n      if (EVENT_TYPE === 'scroll') {\n        // Use requestAnimationFrame for scroll events (better performance)\n        if (!scrollTicking) {\n          window.requestAnimationFrame(executeUpdate);\n        }\n        scrollTicking = true;\n      } else {\n        // Use debounced timeout for media query changes\n        clearTimeout(debounceTimeout);\n        debounceTimeout = setTimeout(executeUpdate, 16); // roughly 60fps.\n      }\n    };\n\n    // Initialize header state\n    if (shouldHeaderBeSmall()) {\n      HTML.setAttribute('data-site-header-small', true);\n      isHeaderSmall = true;\n      updateHeaderHeight();\n    }\n    SMALL_HEADER_MQ.addEventListener('change', handleHeaderStateChange);\n    window.addEventListener('resize', handleHeaderStateChange, {\n      passive: true\n    });\n    window.addEventListener('scroll', handleHeaderStateChange, {\n      passive: true\n    });\n    updateHeaderHeight();\n  }\n};\n\n//# sourceURL=webpack://@naomi-2025/ui/./src/templates/site-layout/component/site-header/site-header.js?\n}");

/***/ }),

/***/ "./src/templates/site-layout/component/site-header/site-header.scss":
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://@naomi-2025/ui/./src/templates/site-layout/component/site-header/site-header.scss?\n}");

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/************************************************************************/
/******/ 	
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	// This entry module can't be inlined because the eval devtool is used.
/******/ 	var __webpack_exports__ = __webpack_require__("./src/templates/site-layout/component/site-header/site-header.js");
/******/ 	
/******/ })()
;