vendor: 112 bytes, lines 1-5
1/******/ (() => { // webpackBootstrap 2/******/ "use strict"; 3/******/ var __webpack_modules__ = ({ 4 5/***/ "./s
5rc/js/components/faq.js": 6/*!**********************************!*\ 7 !*** ./src/js/components/faq.js ***! 8 \**********************************/ 9/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 10 11__webpack_require__.r(__webpack_exports__); 12/* harmony export */ __webpack_require__.d(__webpack_exports__, { 13/* harmony export */ initFaqAccordion: () => (/* binding */ initFaqAccordion) 14/* harmony export */ }); 15/** 16 * FAQ accordion functionality for Drupal 17 * @param {object} Drupal - Drupal object 18 * @param {function} once - Drupal once function 19 */ 20function initFaqAccordion(Drupal, once) { 21 Drupal.behaviors.faqAccordion = { 22 attach: function attach(context) { 23 once("faq-init", ".faq-item", context).forEach(function (item) { 24 var toggleBtn = item.querySelector(".faq-toggle"); 25 if (!toggleBtn) return; 26 var answer = item.querySelector(".faq-answer"); 27 if (!answer) return; 28 29 // ÐниÑиализаÑÐ¸Ñ Ð½Ð°ÑалÑного ÑоÑÑоÑÐ½Ð¸Ñ 30 if (!toggleBtn.hasAttribute("aria-expanded")) { 31 toggleBtn.setAttribute("aria-expanded", "false"); 32 } 33 if (!answer.hasAttribute("aria-hidden")) { 34 answer.setAttribute("aria-hidden", "true"); 35 } 36 answer.style.height = "0px"; 37 38 // ÐобавлÑем обÑабоÑÑик клика 39 toggleBtn.addEventListener("click", function (event) { 40 event.preventDefault(); 41 var expanded = toggleBtn.getAttribute("aria-expanded") === "true"; 42 toggleBtn.setAttribute("aria-expanded", (!expanded).toString()); 43 44 // ÐбновлÑем клаÑÑ ÐºÐ¾Ñневого ÑлеменÑа 45 item.classList.toggle("faq-item--expanded", !expanded); 46 var answerInner = answer.querySelector(".faq-answer-inner"); 47 var newHeight = expanded ? "0" : "".concat(answerInner.offsetHeight, "px"); 48 answer.style.height = newHeight; 49 answer.setAttribute("aria-hidden", expanded.toString()); 50 }); 51 }); 52 } 53 }; 54} 55// HTML structure 56/* 57<div class="faq-item"> 58 <h4 class="faq-toggle" aria-expanded="false"> 59 Question text here 60 </h4> 61 <div class="faq-answer" aria-hidden="true"> 62 <div class="faq-answer-inner"> 63 Answer text here 64 </div> 65 </div> 66</div> 67*/ 68 69/***/ }), 70
71/***/ "./src/js/components/modal.js": 72/*!************************************!*\ 73 !*** ./src/js/components/modal.js ***! 74 \************************************/ 75/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 76 77__webpack_require__.r(__webpack_exports__); 78/* harmony export */ __webpack_require__.d(__webpack_exports__, { 79/* harmony export */ openModal: () => (/* binding */ openModal) 80/* harmony export */ }); 81// ФÑнкÑÐ¸Ñ ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð´Ð°Ð»ÑнÑм окном 82// https://wiki.zina.company/books/frontend/page/modal 83 84function openModal() { 85 var modalTarget = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "#modal"; 86 var contentSelector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ".modal-content"; 87 var closeSelector = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ".close"; 88 var activeSelector = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "modal-open"; 89 var compensateElements = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : []; 90 var linksInsideCloseModal = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false; 91 var triggerElement = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null; 92 var body = document.querySelector("body"); 93 var modal = document.querySelector(modalTarget); 94 // console.log("modalTarget: " + modalTarget); 95 96 // WCAG: Ð¡Ð¾Ñ ÑанÑем ÑлеменÑ, вÑзвавÑий оÑкÑÑÑие модалки 97 var previousActiveElement = triggerElement || document.activeElement; 98 var modalContent = modal.querySelector(contentSelector); 99 // console.log("contentSelector: " + contentSelector); 100 101 var modalClose = modal.querySelector(closeSelector); 102 var modalDismisses = modal.querySelectorAll("[data-dismiss]"); 103 var scrollWidth = window.innerWidth - document.documentElement.clientWidth; 104 // console.log('scrollWidth: ' + scrollWidth); 105 106 if (body.classList.contains(activeSelector)) { 107 // console.log("closed-modal"); 108 closeModal(); 109 } else { 110 // console.log("opened-modal"); 111 // ÐÑовеÑÑем налиÑие полоÑÑ Ð¿ÑокÑÑÑки, ÑÑÐ¾Ð±Ñ ÐºÐ¾Ð¼Ð¿ÐµÐ½ÑиÑоваÑÑ "overflow: hidden;" 112 if (scrollWidth > 0) { 113 body.style.paddingRight = "".concat(scrollWidth, "px"); 114 adjustScrollbarPadding(scrollWidth, compensateElements); 115 } 116 body.style.overflow = "hidden"; 117 118 // Ðелаем модалÑное окно видимÑм 119 modal.style.display = ""; 120 modal.classList.add(activeSelector); 121 body.classList.add(activeSelector); 122 123 // WCAG: ФокÑÑиÑÑемÑÑ Ð½Ð° пеÑвом ÑокÑÑиÑÑемом ÑлеменÑе внÑÑÑи модалÑного окна 124 var focusableElements = modalContent.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'); 125 var firstFocusable = focusableElements[0]; 126 if (firstFocusable) { 127 firstFocusable.focus(); 128 } else { 129 // ÐÑли Ð½ÐµÑ ÑокÑÑиÑÑемÑÑ ÑлеменÑов, ÑокÑÑиÑÑемÑÑ Ð½Ð° конÑенÑе модалки 130 modalContent.setAttribute('tabindex', '-1'); 131 modalContent.focus(); 132 } 133 134 // ÐобавлÑем обÑабоÑÑики ÑобÑÑий Ð´Ð»Ñ Ð·Ð°ÐºÑÑÑÐ¸Ñ Ð¼Ð¾Ð´Ð°Ð»Ñного окна 135 // Ðлик на кнопке "ÐакÑÑÑÑ" 136 if (modalClose) { 137 modalClose.addEventListener("click", closeModal); 138 } 139 140 // Ðлик на лÑбой ÑÑÑлке внÑÑÑи модалÑного окна (еÑли ÑÑо Ñказано в паÑамеÑÑÐ°Ñ ) 141 if (linksInsideCloseModal) { 142 modalContent.querySelectorAll("a").forEach(function (link) { 143 link.addEventListener("click", closeModal); 144 }); 145 } 146 147 // Ðлик на каждой кнопке Ñ Ð°ÑÑибÑÑом "data-dismiss" 148 modalDismisses.forEach(function (dismiss) { 149 dismiss.addEventListener("click", closeModal); 150 }); 151 152 // Ðлик на Ñоне 153 // modal.addEventListener("click", closeModal); 154 $('body').on('click', '.modal-open', function (e) {
155 if ($(e.target).is('.modal-open')) { 156 // $(this).modal('hide'); 157 // console.log($(this)); 158 closeModal(); 159 } 160 }); 161 162 // ÐÑклÑÑаем закÑÑÑие пÑи клике внÑÑÑи модалÑного окна 163 modalContent.addEventListener("click", function (event) { 164 // пÑи клике в модалке ÐоÑÐ·Ð¸Ð½Ñ Ð¿Ð¾ УдалиÑÑ ÑÐ¾Ð²Ð°Ñ Ð¿ÐµÑÐµÑ Ð²Ð°ÑÑÐ²Ð°ÐµÑ ÐºÐ»Ð¸Ðº на ÑÐµÐ±Ñ Ð¸ не даÑÑ ÑдалиÑÑ 165 if (!event.target.parentElement.matches('.cart-block__remove')) { 166 event.stopPropagation(); 167 } 168 }); 169 170 // ÐлавиÑа Esc 171 document.addEventListener("keydown", function (event) { 172 if (event.key === "Escape") { 173 closeModal(scrollWidth); 174 } 175 }); 176 } 177 178 // ФÑнкÑÐ¸Ñ Ð´Ð»Ñ Ð·Ð°ÐºÑÑÑÐ¸Ñ Ð¼Ð¾Ð´Ð°Ð»Ñного окна 179 function closeModal() { 180 modal.style.display = "none"; 181 modal.classList.remove(activeSelector); 182 body.style.overflow = ""; 183 body.style.paddingRight = ""; 184 body.classList.remove(activeSelector); 185 186 // ÐÑовеÑÑем налиÑие полоÑÑ Ð¿ÑокÑÑÑки, ÑÑÐ¾Ð±Ñ ÐºÐ¾Ð¼Ð¿ÐµÐ½ÑиÑоваÑÑ "overflow: hidden;" 187 var scrollWidth = window.innerWidth - document.documentElement.clientWidth; 188 if (scrollWidth > 0) { 189 adjustScrollbarPadding(-scrollWidth, compensateElements); 190 } 191 192 // WCAG: ÐозвÑаÑаем ÑокÑÑ Ð½Ð° ÑлеменÑ, вÑзвавÑий оÑкÑÑÑие 193 if (previousActiveElement && document.body.contains(previousActiveElement)) { 194 previousActiveElement.focus(); 195 } 196 197 // УдалÑем обÑабоÑÑики ÑобÑÑий 198 if (modalClose) { 199 modalClose.removeEventListener("click", closeModal); 200 } 201 modalDismisses.forEach(function (dismiss) { 202 dismiss.removeEventListener("click", closeModal); 203 }); 204 modal.removeEventListener("click", closeModal); 205 modalContent.removeEventListener("click", function (event) { 206 event.stopPropagation(); 207 }); 208 document.removeEventListener("keydown", function (event) { 209 if (event.key === "Escape") { 210 closeModal(); 211 } 212 }); 213 } 214 215 // ФÑнкÑÐ¸Ñ Ð´Ð»Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð¸ ÑбиÑÐ°Ð½Ð¸Ñ Ð¾ÑÑÑÑпа, компенÑиÑÑÑÑего ÑиÑÐ¸Ð½Ñ Ð¿ÑокÑÑÑки 216 function adjustScrollbarPadding(scrollWidth, compensateElements) { 217 if (scrollWidth != 0 && compensateElements) { 218 compensateElements.forEach(function (className) { 219 console.log(className); 220 var compensateElementsElement = document.querySelector(className); 221 if (compensateElementsElement) { 222 var currentPaddingRight = parseInt(getComputedStyle(compensateElementsElement).paddingRight, 10); 223 compensateElementsElement.style.paddingRight = "".concat(currentPaddingRight + scrollWidth, "px"); 224 } 225 }); 226 } 227 } 228} 229 230/***/ }), 231
232/***/ "./src/js/components/up.js": 233/*!*********************************!*\ 234 !*** ./src/js/components/up.js ***! 235 \*********************************/ 236/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 237 238__webpack_require__.r(__webpack_exports__); 239/* harmony export */ __webpack_require__.d(__webpack_exports__, { 240/* harmony export */ initializeScrollToTopButton: () => (/* binding */ initializeScrollToTopButton) 241/* harmony export */ }); 242function initializeScrollToTopButton(buttonClass, topThreshold) { 243 var bottomThreshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 400; 244 var button = document.querySelector(buttonClass); 245 window.addEventListener("scroll", function () { 246 // ÐÑÑиÑлÑем ÑаÑÑÑоÑние Ð¾Ñ Ð½Ð¸Ð·Ð° ÑÑÑаниÑÑ 247 var scrollPositionFromBottom = document.documentElement.scrollHeight - window.scrollY - window.innerHeight; 248 if (window.scrollY > topThreshold) { 249 button.classList.add("is-visible"); // ÐобавлÑем клаÑÑ Ð¿Ñи пÑокÑÑÑке ÑвеÑÑ Ñ 250 } else { 251 button.classList.remove("is-visible"); // УбиÑаем клаÑÑ, еÑли пÑокÑÑÑка менÑÑе заданного ÑаÑÑÑоÑÐ½Ð¸Ñ 252 } 253 254 if (scrollPositionFromBottom < bottomThreshold) { 255 button.classList.add("is-bottom"); // ÐобавлÑем клаÑÑ Ð¿Ñи пÑокÑÑÑке до низа 256 } else { 257 button.classList.remove("is-bottom"); // УбиÑаем клаÑÑ, еÑли пÑокÑÑÑка менÑÑе заданного ÑаÑÑÑоÑÐ½Ð¸Ñ 258 } 259 }); 260 261 button.addEventListener("click", function () { 262 window.scrollTo({ 263 top: 0, 264 behavior: "smooth" 265 }); 266 }); 267} 268 269/***/ }), 270
271/***/ "./src/js/main.js": 272/*!************************!*\ 273 !*** ./src/js/main.js ***! 274 \************************/ 275/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 276 277__webpack_require__.r(__webpack_exports__); 278/* harmony import */ var _components_modal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/modal.js */ "./src/js/components/modal.js"); 279/* harmony import */ var _components_up_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/up.js */ "./src/js/components/up.js"); 280/* harmony import */ var _components_faq_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/faq.js */ "./src/js/components/faq.js"); 281 282 283 284function attach_modals() { 285 document.querySelectorAll("[data-target]").forEach(function (button) { 286 var modalTarget = button.getAttribute("data-target"); 287 if (button.onclick == null // пÑезеÑваÑив Ð¾Ñ Ð¿Ð¾Ð²ÑоÑного (дÑблÑ) навеÑÐ¸Ð²Ð°Ð½Ð¸Ñ Ñ ÐµÐ½Ð´Ð»ÐµÑа ÑобÑÑÐ¸Ñ 288 // && modalTarget !=='#cart-ajax-modal' 289 ) { 290 // button.onclick = () => openModal(modalTarget); 291 button.onclick = function () { 292 return (0,_components_modal_js__WEBPACK_IMPORTED_MODULE_0__.openModal)(modalTarget, undefined, undefined, undefined, undefined, undefined, button); 293 }; 294 } 295 }); 296} 297window.onload = function (event) { 298 attach_modals(); 299}; 300 301// import initSplide from "./components/splide.js"; 302// initSplide(); 303 304// ÐниÑиализаÑÐ¸Ñ ÐºÐ½Ð¾Ð¿ÐºÐ¸ back to top 305var selection = document.querySelector(".btn-slide-up") !== null; 306if (selection) { 307 window.addEventListener("DOMContentLoaded", function () { 308 (0,_components_up_js__WEBPACK_IMPORTED_MODULE_1__.initializeScrollToTopButton)(".btn-slide-up", 300, 400); 309 }); 310} 311 312// const body = document.querySelector("body"); 313 314(function ($, Drupal, once) { 315 // show submenu on hover while li float:none 316 var viewport = Math.max(document.documentElement.clientWidth, window.innerWidth); 317 if (viewport > 991) { 318 $("ul.main-menu li.dropdown").hover(function () { 319 $(this).addClass("open"); 320 $(this).find(".dropdown-menu").stop(true, true).delay(200).fadeIn(); 321 }, function () { 322 $(this).removeClass("open"); 323 $(this).find(".dropdown-menu").stop(true, true).delay(200).fadeOut().hover(function () { 324 $(this).stop(true, true); 325 }); 326 }); 327 } 328 329 // ÑÑÐ¾Ð±Ñ ÐºÐ»Ð¸Ðº по ÑогглеÑам модалок (иконка ÐоÑÐ·Ð¸Ð½Ñ Ð² ÑопбаÑе) 330 // оÑÑабаÑÑвал и поÑле аÑкÑов (Add to cart и пÑоÑ.) 331 // once('modals_init', 'html').forEach(function (element) { 332 // $(document).ajaxSuccess(function () { 333 // attach_modals(); 334 // }); 335 // }); 336 337 // on bigpipe + ajax 338 Drupal.behaviors.tiun_js = { 339 attach: function attach(context, settings) { 340 // updateEmptyClass(); 341 // пÑи загÑÑзке пеÑвой, до Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð½Ð¾Ð²ÑÑ Ð±Ð»Ð¾ÐºÐ¾Ð² биг пайпом 342 // const elements = once('wrapped', '.bef-exposed-form', context); 343 // elements.forEach(function (element) { 344 // 345 // }); 346 // пÑи загÑÑзке + добавлении новÑÑ Ð±Ð»Ð¾ÐºÐ¾Ð² биг пайпом + аÑкÑом 347 // $(context).find("[id*=stara-tsina].panel").once("attribs-inited").each(function () { 348 // console.log($(this)); 349 // }); 350 // disount_lbl(); 351 } 352 }; 353 Drupal.attachBehaviors(); 354 355 // по Ñмене аÑÑибÑÑа 356 $(document).ajaxSuccess(function () { 357 // менÑем ÑÐ²ÐµÑ ÑелекÑа под ÑÐ²ÐµÑ Ð¿Ð»ÐµÐ¹ÑÑ Ð¾Ð»Ð´ÐµÑов 358 var selects = $(".has-placeholder select"); 359 selects.css("color", "gray"); 360 selects.change(function () { 361 var current = $(this).val(); 362 if (current !== "_none") { 363 $(this).css("color", "black"); 364 } else { 365 $(this).css("color", "gray"); 366 } 367 }); 368 }); 369 $(window).on("load", function () { 370 // пÑи наÑалÑной загÑÑзке из кеÑа 371 372 // Ð¼ÐµÐ½Ñ superfish не ÑвоÑаÑиваÑÑ Ð² бÑÑÐ³ÐµÑ 373 $(".sf-menu.sf-accordion").each(function () { 374 // каждое Ð¼ÐµÐ½Ñ 375 var $e = $(".sf-menu.sf-accordion"); 376 if (!$e.hasClass("sf-expanded")) { 377 var toggle = $e.siblings(".sf-accordion-toggle"); // кликаем по ÑогглеÑÑ 378 toggle.children("a").click(); 379 toggle.hide(); // пÑÑеÑм ÑÐ¾Ð³Ð³Ð»ÐµÑ Ñ ÐµÐ³Ð¾ <a 380 } 381 }); 382 383 // tb_megamenu: click instead of hover
384 $(".tbm-toggle").click(function (e) { 385 e.preventDefault(); 386 $(this).parent().find(".tbm-submenu-toggle").click(); 387 }); 388 389 // адапÑаÑиÑ: бÑÑÐ³ÐµÑ 390 var elements = document.querySelectorAll(".burger-button"); // Ñ Ð½Ð°Ñ ÐºÐ»Ð¾Ð½Ð¸ÑÑеÑÑÑ topbar, поÑÑÐ¾Ð¼Ñ Ð±ÑÑгеÑов 2 391 for (var i = 0; i < elements.length; i++) { 392 var _elements$i; 393 (_elements$i = elements[i]) === null || _elements$i === void 0 ? void 0 : _elements$i.addEventListener("click", function () { 394 return (0,_components_modal_js__WEBPACK_IMPORTED_MODULE_0__.openModal)(".burger-menu", ".burger-content", ".burger-close", "burger-is-open", [".navbar", ".btn-up"], { 395 linksInsideCloseModal: true 396 }); 397 }); 398 } 399 400 // topbar searchform 401 // let viewport = Math.max(document.documentElement.clientWidth, window.innerWidth); 402 // let search_toggler = $('.btn__search'); 403 // 404 // var search_form; 405 // var search_wrap; 406 // if (viewport > 991) { 407 // search_wrap = $('header [id*=block-search-api]'); 408 // search_form = $('header [id$=\'form-search-api\']'); 409 // } else { 410 // search_wrap = $('.burger-menu [id*=block-search-api]'); 411 // search_form = $('.burger-menu [id$=\'form-search-api\']'); 412 // } 413 // search_toggler.click(function (event) { 414 // event.preventDefault(); 415 // 416 // toggleSearchForm(); 417 // 418 // }); 419 // function toggleSearchForm() { 420 // let navIsVisible = (!search_form.hasClass('search-form-is-active')); 421 // search_form.toggleClass('search-form-is-active', navIsVisible); 422 // search_wrap.toggleClass('visible', navIsVisible); 423 // } 424 // // ÑкÑÑваем ÑоÑÐ¼Ñ search_api по ÐºÐ»Ð¸ÐºÑ Ð²Ð½Ðµ ÐµÑ 425 // document.querySelector('body').addEventListener('click', function (e) { 426 // if (!e.target.closest('#block-search-api-block') 427 // && !e.target.closest('#block-search-api-block form') 428 // && !$(event.target).hasClass('btn__search') 429 // ) { 430 // search_wrap.removeClass('visible'); 431 // search_form.removeClass('search-form-is-active'); 432 // } 433 // }); 434 435 // маÑка ÑелеÑона (на ÑÑÑ. ÑекаÑÑа, в модалке колбÑка) 436 // let phone_mask = { 437 // UA: '+380(99) 999-99-99' 438 // }; 439 // try { 440 // phone_mask = phone_mask['UA']; 441 // } 442 // catch(e){ 443 // phone_mask = phone_mask['UA']; 444 // } 445 // let inputs = $('[type="tel"]'); 446 // inputs.inputmask(phone_mask); 447 // inputs.attr("oninvalid", "this.setCustomValidity(Drupal.t('Enter your phone number'))"); 448 // inputs.attr("oninput", "setCustomValidity('')"); 449 }); 450 451 // search api 452 $(window).on("load", function () { 453 var searchApiBlock = $("#block-search-api-block"); 454 var searchApiToggler = $(".search-api-toggler"); 455 456 // ÐбÑабоÑÑик клика по кнопке поиÑка 457 searchApiToggler.on("click", function (e) { 458 e.preventDefault(); 459 var wasActive = searchApiBlock.hasClass("is-active"); 460 searchApiBlock.toggleClass("is-active"); 461 searchApiBlock.parent().toggleClass("has-active"); 462 463 // ÐомпенÑаÑÐ¸Ñ ÑкÑоллбаÑа пÑи оÑкÑÑÑии/закÑÑÑии 464 if (searchApiBlock.hasClass("is-active")) { 465 var scrollbarWidth = window.innerWidth - document.documentElement.clientWidth; 466 $("body").css({ 467 overflow: "hidden", 468 paddingRight: scrollbarWidth + "px" 469 }); 470 471 // УÑÑанавливаем аÑÑибÑÑÑ tabindex и ÑокÑÑ Ð½Ð° инпÑÑ 472 searchApiBlock.find('#edit-search-api-fulltext').attr('tabindex', '0') // WCAG 473 .focus(); 474 searchApiBlock.find('#edit-submit-search-api').attr('tabindex', '0'); 475 476 // Ð¡Ð¾Ñ ÑанÑем ÑÑÑÐ»ÐºÑ Ð½Ð° ÑлеменÑ, коÑоÑÑй оÑкÑÑл окно 477 searchApiBlock.data('opener', this); 478 } else { 479 $("body").css({ 480 overflow: "", 481 paddingRight: "" 482 }); 483 484 // УбиÑаем аÑÑибÑÑÑ tabindex 485 searchApiBlock.find('#edit-search-api-fulltext').attr('tabindex', '-1'); 486 searchApiBlock.find('#edit-submit-search-api').attr('tabindex', '-1'); 487 488 // ÐозвÑаÑаем ÑокÑÑ Ð½Ð° кнопкÑ, еÑли окно бÑло акÑивно 489 if (wasActive) { 490 $(this).focus(); 491 } 492 } 493 }); 494 495 // ÐбÑабоÑÑик клика вне ÑоÑÐ¼Ñ Ð¿Ð¾Ð¸Ñка 496 $(document).on("click", function (e) { 497 if (!$(e.target).closest("#block-search-api-block").length && !$(e.target).closest(".search-api-toggler").length) { 498 // Ð¡Ð¾Ñ ÑанÑем ÑÑÑÐ»ÐºÑ Ð½Ð° ÑлеменÑ, коÑоÑÑй оÑкÑÑл окно, пеÑед закÑÑÑием 499 var opener = searchApiBlock.data('opener'); 500 searchApiBlock.removeClass("is-active"); 501 searchApiBlock.parent().removeClass("has-active"); 502 searchApiBlock.find('#edit-search-api-fulltext').attr('tabindex', '-1'); 503 searchApiBlock.find('#edit-submit-search-api').attr('tabindex', '-1'); 504 $("body").css({ 505 overflow: "", 506 paddingRight: "" 507 }); 508 509 // ÐозвÑаÑаем ÑокÑÑ Ð½Ð° ÑлеменÑ, коÑоÑÑй оÑкÑÑл окно 510 if (opener) { 511 $(opener).focus(); 512 } else { 513 searchApiToggler.blur(); 514 } 515 } 516 }); 517 518 // ÐбÑабоÑÑик нажаÑÐ¸Ñ ÐºÐ»Ð°Ð²Ð¸Ñи Esc 519 $(document).on("keyup", function (e) { 520 if (e.key === "Escape") { 521 // Ð¡Ð¾Ñ ÑанÑем ÑÑÑÐ»ÐºÑ Ð½Ð° ÑлеменÑ, коÑоÑÑй оÑкÑÑл окно, пеÑед закÑÑÑием 522 var opener = searchApiBlock.data('opener'); 523 searchApiBlock.removeClass("is-active"); 524 searchApiBlock.parent().removeClass("has-active"); 525 $("body").css({ 526 overflow: "", 527 paddingRight: "" 528 }); 529 530 // ÐозвÑаÑаем ÑокÑÑ Ð½Ð° ÑлеменÑ, коÑоÑÑй оÑкÑÑл окно 531 if (opener) { 532 $(opener).focus(); 533 } else { 534 searchApiToggler.blur(); 535 } 536 } 537 }); 538 539 // ÐÑедоÑвÑаÑаем закÑÑÑие пÑи клике внÑÑÑи блока поиÑка 540 searchApiBlock.on("click", function (e) { 541 e.stopPropagation(); 542 }); 543 }); 544 545 // Initialize FAQ accordion 546 (0,_components_faq_js__WEBPACK_IMPORTED_MODULE_2__.initFaqAccordion)(Drupal, once); 547 548 // глаз WCAG в Ñапке 549 document.querySelectorAll(".accessibility-switcher").forEach(function (element) { 550 element.addEventListener("click", function () { 551 return (0,_components_modal_js__WEBPACK_IMPORTED_MODULE_0__.openModal)("#block-a11y", "#a11y-container", ".a11y-close"); 552 }); 553 }); 554 // WCAG Ñ lang-switcher`а (оÑкÑÑÑие submenu по Enter/space) 555 $(window).on("load", function () { 556 var toggler = document.getElementById('lang-switch-toggler'); 557 var submenu = document.getElementById('lang-switcher'); 558 function toggleMenu() { 559 var isExpanded = toggler.getAttribute('aria-expanded') === 'true'; 560 if (isExpanded) { 561 submenu.style.visibility = 'hidden'; 562 submenu.style.opacity = '0'; 563 toggler.setAttribute('aria-expanded', 'false'); 564 } else { 565 submenu.style.visibility = 'visible'; 566 submenu.style.opacity = '1'; 567 toggler.setAttribute('aria-expanded', 'true'); 568 } 569 } 570 toggler.addEventListener('keydown', function (event) { 571 // ÐÑовеÑÑем нажаÑÐ¸Ñ Enter (13) и Space (32) 572 // if (event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar') { // ÐнÑÐµÑ Ð¼ÐµÑÐ°ÐµÑ ÐºÐ»Ð¸ÐºÑ Ð¼ÑÑей в NVDA 573 if (event.key === ' ' || event.key === 'Spacebar') { 574 /*if (!event.repeat && event.target === toggler) {*/ 575 event.preventDefault(); // пÑедоÑвÑаÑаем пÑокÑÑÑÐºÑ ÑÑÑаниÑÑ Ð¿Ñи пÑобеле 576 toggleMenu(); 577 // } 578 } 579 }); 580 581 $('body').on('click', '#lang-switch-toggler', function () { 582 toggleMenu(); 583 }); 584 }); 585})(jQuery, Drupal, once); 586 587// ÑоÑма ÐнÑеÑнеÑ-пÑиймалÑÐ½Ñ /web-reception 588(function ($, Drupal, cookies) { 589 $(window).on("load", function () { 590 // console.log( window.Cookies); 591 // console.log( cookies); 592 593 // ÑиÑÑим ÑоÑÐ¼Ñ Ð¾Ñ Ñанее введÑннÑÑ Ð·Ð½Ð°Ñений, коÑоÑÑе запомнил бÑаÑÐ·ÐµÑ 594 var $form = $(".node-web-reception-form"); 595 // $form.find('select option[selected]').removeAttr('selected'); 596 // $form.find('input[type=radio]').removeAttr('checked'); 597 $form.find("input[type=text]").attr("value", ""); 598 $form.find("input[type=email]").attr("value", ""); 599 $form.find("textarea").val(""); 600 // $form.find('input[type=checkbox][checked]').removeAttr('checked'); 601 602 // модалка ÑÑÐ¿ÐµÑ Ð° поÑле ÑабмиÑа 603 // в php Ð¼Ñ ÑеÑили кÑкÑ, ÑÑÐ¾Ð±Ñ Ð¿Ñи ÑледÑÑÑей загÑÑзке оÑобÑазиÑÑ Ð¼Ð¾Ð´Ð°Ð»ÐºÑ Ð¾Ð± ÑÑÐ¿ÐµÑ Ðµ ÑабмиÑа 604 if (window.Cookies.get("Drupal.visitor.load_success_modal") === "1") { 605 (0,_components_modal_js__WEBPACK_IMPORTED_MODULE_0__.openModal)("#form-success", ".modal-content", ".modal-close", "modal-open", [".main-container"], { 606 linksInsideCloseModal: false 607 }); 608 window.Cookies.remove("Drupal.visitor.load_success_modal"); // 1-го Ñаза доÑÑаÑоÑно 609 } 610 }); 611})(jQuery, Drupal, window.Cookies); 612 613// когда оÑкÑÑваеÑÑÑ top-Ð¼ÐµÐ½Ñ Ð½Ð° Ð¼Ð¾Ð±Ð¸Ð»ÐºÐ°Ñ , нÑжно Ð´Ð»Ñ Ñ.Ñ. не пеÑекÑÑваÑÑ ÑоÑедние ÑлеменÑÑ Ð²ÑаппеÑом 614// (на .menu-opened навеÑиваеÑÑÑ display: inline-block) 615// var elemToObserve = document.getElementById("tbm-main-new-menu"); 616var elemToObserve = document.getElementsByClassName('tbm')[0]; 617if (elemToObserve !== null) { 618 var prevClassState = elemToObserve.classList.contains("tbm--mobile-show"); 619 var observer = new MutationObserver(function (mutations) { 620 mutations.forEach(function (mutation) { 621 if (mutation.attributeName === "class") { 622 var currentClassState = mutation.target.classList.contains("tbm--mobile-show"); 623 if (prevClassState !== currentClassState) { 624 prevClassState = currentClassState; 625 if (currentClassState) $(".hdr-row2").addClass("menu-opened");else $(".hdr-row2").removeClass("menu-opened"); 626 } 627 } 628 }); 629 }); 630 observer.observe(elemToObserve, { 631 attributes: true 632 }); 633} 634 635/***/ }), 636 637/***/ "./src/css/terms.pcss": 638/*!****************************!*\ 639 !*** ./src/css/terms.pcss ***! 640 \****************************/ 641/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 642 643__webpack_require__.r(__webpack_exports__); 644// extracted by mini-css-extract-plugin 645 646 647/***/ }), 648
649/***/ "./back/admin.scss": 650/*!*************************!*\ 651 !*** ./back/admin.scss ***! 652 \*************************/ 653/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 654 655__webpack_require__.r(__webpack_exports__); 656// extracted by mini-css-extract-plugin 657 658 659/***/ })
vendor: 9,148 bytes, lines 659-873
659, 660 661/***/ "./src/css/colorbox.pcss": 662/*!*******************************!*\ 663 !*** ./src/css/colorbox.pcss ***! 664 \*******************************/ 665/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 666 667__webpack_require__.r(__webpack_exports__); 668// extracted by mini-css-extract-plugin 669 670 671/***/ }), 672 673/***/ "./src/css/editor.pcss": 674/*!*****************************!*\ 675 !*** ./src/css/editor.pcss ***! 676 \*****************************/ 677/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 678 679__webpack_require__.r(__webpack_exports__); 680// extracted by mini-css-extract-plugin 681 682 683/***/ }), 684 685/***/ "./src/css/frpage.pcss": 686/*!*****************************!*\ 687 !*** ./src/css/frpage.pcss ***! 688 \*****************************/ 689/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 690 691__webpack_require__.r(__webpack_exports__); 692// extracted by mini-css-extract-plugin 693 694 695/***/ }), 696 697/***/ "./src/css/secondary.pcss": 698/*!********************************!*\ 699 !*** ./src/css/secondary.pcss ***! 700 \********************************/ 701/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 702 703__webpack_require__.r(__webpack_exports__); 704// extracted by mini-css-extract-plugin 705 706 707/***/ }) 708 709/******/ }); 710/************************************************************************/ 711/******/ // The module cache 712/******/ var __webpack_module_cache__ = {}; 713/******/ 714/******/ // The require function 715/******/ function __webpack_require__(moduleId) { 716/******/ // Check if module is in cache 717/******/ var cachedModule = __webpack_module_cache__[moduleId]; 718/******/ if (cachedModule !== undefined) { 719/******/ return cachedModule.exports; 720/******/ } 721/******/ // Create a new module (and put it into the cache) 722/******/ var module = __webpack_module_cache__[moduleId] = { 723/******/ // no module.id needed 724/******/ // no module.loaded needed 725/******/ exports: {} 726/******/ }; 727/******/ 728/******/ // Execute the module function 729/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 730/******/ 731/******/ // Return the exports of the module 732/******/ return module.exports; 733/******/ } 734/******/ 735/******/ // expose the modules object (__webpack_modules__) 736/******/ __webpack_require__.m = __webpack_modules__; 737/******/ 738/************************************************************************/ 739/******/ /* webpack/runtime/chunk loaded */ 740/******/ (() => { 741/******/ var deferred = []; 742/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { 743/******/ if(chunkIds) { 744/******/ priority = priority || 0; 745/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; 746/******/ deferred[i] = [chunkIds, fn, priority]; 747/******/ return; 748/******/ } 749/******/ var notFulfilled = Infinity; 750/******/ for (var i = 0; i < deferred.length; i++) { 751/******/ var [chunkIds, fn, priority] = deferred[i]; 752/******/ var fulfilled = true; 753/******/ for (var j = 0; j < chunkIds.length; j++) { 754/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { 755/******/ chunkIds.splice(j--, 1); 756/******/ } else { 757/******/ fulfilled = false; 758/******/ if(priority < notFulfilled) notFulfilled = priority; 759/******/ } 760/******/ } 761/******/ if(fulfilled) { 762/******/ deferred.splice(i--, 1) 763/******/ var r = fn(); 764/******/ if (r !== undefined) result = r; 765/******/ } 766/******/ } 767/******/ return result; 768/******/ }; 769/******/ })(); 770/******/ 771/******/ /* webpack/runtime/define property getters */ 772/******/ (() => { 773/******/ // define getter functions for harmony exports 774/******/ __webpack_require__.d = (exports, definition) => { 775/******/ for(var key in definition) { 776/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 777/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 778/******/ } 779/******/ } 780/******/ }; 781/******/ })(); 782/******/ 783/******/ /* webpack/runtime/hasOwnProperty shorthand */ 784/******/ (() => { 785/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 786/******/ })(); 787/******/ 788/******/ /* webpack/runtime/make namespace object */ 789/******/ (() => { 790/******/ // define __esModule on exports 791/******/ __webpack_require__.r = (exports) => { 792/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 793/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 794/******/ } 795/******/ Object.defineProperty(exports, '__esModule', { value: true }); 796/******/ }; 797/******/ })(); 798/******/ 799/******/ /* webpack/runtime/jsonp chunk loading */ 800/******/ (() => { 801/******/ // no baseURI 802/******/ 803/******/ // object to store loaded and loading chunks 804/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched 805/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded 806/******/ var installedChunks = { 807/******/ "/dist/js/main": 0, 808/******/ "dist/css/secondary": 0, 809/******/ "dist/css/frpage": 0, 810/******/ "dist/css/editor": 0, 811/******/ "dist/css/colorbox": 0, 812/******/ "dist/css/admin": 0, 813/******/ "dist/css/terms": 0 814/******/ }; 815/******/ 816/******/ // no chunk on demand loading 817/******/ 818/******/ // no prefetching 819/******/ 820/******/ // no preloaded 821/******/ 822/******/ // no HMR 823/******/ 824/******/ // no HMR manifest 825/******/ 826/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); 827/******/ 828/******/ // install a JSONP callback for chunk loading 829/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { 830/******/ var [chunkIds, moreModules, runtime] = data; 831/******/ // add "moreModules" to the modules object, 832/******/ // then flag all "chunkIds" as loaded and fire callback 833/******/ var moduleId, chunkId, i = 0; 834/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { 835/******/ for(moduleId in moreModules) { 836/******/ if(__webpack_require__.o(moreModules, moduleId)) { 837/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; 838/******/ } 839/******/ } 840/******/ if(runtime) var result = runtime(__webpack_require__); 841/******/ } 842/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); 843/******/ for(;i < chunkIds.length; i++) { 844/******/ chunkId = chunkIds[i]; 845/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { 846/******/ installedChunks[chunkId][0](); 847/******/ } 848/******/ installedChunks[chunkId] = 0; 849/******/ } 850/******/ return __webpack_require__.O(result); 851/******/ } 852/******/ 853/******/ var chunkLoadingGlobal = self["webpackChunktiun_drupal10"] = self["webpackChunktiun_drupal10"] || []; 854/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); 855/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); 856/******/ })(); 857/******/ 858/************************************************************************/ 859/******/ 860/******/ // startup 861/******/ // Load entry module and return exports 862/******/ // This entry module depends on other loaded chunks and execution need to be delayed 863/******/ __webpack_require__.O(undefined, ["dist/css/secondary","dist/css/frpage","dist/css/editor","dist/css/colorbox","dist/css/admin","dist/css/terms"], () => (__webpack_require__("./src/js/main.js"))) 864/******/ __webpack_require__.O(undefined, ["dist/css/secondary","dist/css/frpage","dist/css/editor","dist/css/colorbox","dist/css/admin","dist/css/terms"], () => (__webpack_require__("./back/admin.scss"))) 865/******/ __webpack_require__.O(undefined, ["dist/css/secondary","dist/css/frpage","dist/css/editor","dist/css/colorbox","dist/css/admin","dist/css/terms"], () => (__webpack_require__("./src/css/colorbox.pcss"))) 866/******/ __webpack_require__.O(undefined, ["dist/css/secondary","dist/css/frpage","dist/css/editor","dist/css/colorbox","dist/css/admin","dist/css/terms"], () => (__webpack_require__("./src/css/editor.pcss"))) 867/******/ __webpack_require__.O(undefined, ["dist/css/secondary","dist/css/frpage","dist/css/editor","dist/css/colorbox","dist/css/admin","dist/css/terms"], () => (__webpack_require__("./src/css/frpage.pcss"))) 868/******/ __webpack_require__.O(undefined, ["dist/css/secondary","dist/css/frpage","dist/css/editor","dist/css/colorbox","dist/css/admin","dist/css/terms"], () => (__webpack_require__("./src/css/secondary.pcss"))) 869/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["dist/css/secondary","dist/css/frpage","dist/css/editor","dist/css/colorbox","dist/css/admin","dist/css/terms"], () => (__webpack_require__("./src/css/terms.pcss"))) 870/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); 871/******/ 872/******/ })() 873;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.