PageSourceSearch

https://horsesmart.store/blog/wp-content/themes/horse_smart/dist/js/516.chunk.js

js horsesmart.store collected 2026-10-02 15:33:37 UTC 2,751 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkhorse_smart=self.webpackChunkhorse_smart||[]).push([[516],{516:function(t,e,s){s.r(e);e.default=class{header=(()=>document.querySelector("#hs-header"))();constructor(){this.toggleCatsBtn=this.header.querySelector(".hs-header__toggle-cats-btn"),this.categoryList=this.header.querySelector(".hs-header-cats-categories"),this.subcategoryWrapper=this.header.querySelector(".hs-header-cats-subcategories"),this.searchForm=document.querySelector(".hs-header__external-search"),this.wrap=document.querySelector(".hs-header__extend-categories-nav"),this.mediaQuery=window.matchMedia("(max-width: 767px)"),this.init()}init(){this.initCategoriesButton(),this.initCategoryHover(),this.searchForm&&Promise.all([s.e(96),s.e(364)]).then(s.bind(s,364)).then((t=>{let{default:e}=t;return new e})),document.addEventListener("click",this.handleClickOutside.bind(this)),document.addEventListener("touchstart",this.handleClickOutside.bind(this))}handleClickOutside(t){const e=t.composedPath?t.composedPath():[];!this.wrap||this.wrap.contains(t.target)||this.toggleCatsBtn.contains(t.target)||e&&e.includes(this.wrap)||(this.toggleCatsBtn.setAttribute("aria-expanded","false"),this.toggleCatsBtn.setAttribute("title","Раскрыть список категорий"),this.header.classList.remove("hs-categories-open"))}initCategoriesButton(){this.toggleCatsBtn&&this.toggleCatsBtn.addEventListener("click",this.openCategoriesButton.bind(this))}openCategoriesButton(t){t.preventDefault();const e=t.currentTarget;if("true"===e.getAttribute("aria-expanded"))return e.setAttribute("aria-expanded","false"),e.setAttribute("title","Раскрыть список категорий"),void this.header.classList.remove("hs-categories-open");e.setAttribute("aria-expanded","true"),e.setAttribute("title","Скрыть список категорий"),this.header.classList.add("hs-categories-open")}initCategoryHover(){if(!this.categoryList)return;const t=[...this.categoryList.querySelectorAll("li[data-slug]")];if(!t.length)return;const e="ontouchstart"in window||navigator.maxTouchPoints>0?"click":"mouseenter";t.forEach((t=>{t.addEventListener(e,(s=>{"click"===e&&s.preventDefault();const i=t.getAttribute("data-slug");if(!i)return;if(this.mediaQuery.matches)return t.classList.contains("mob-active")?void t.classList.remove("mob-active"):void t.classList.add("mob-active");this.clearActiveStates(),t.classList.add("active");const a=this.subcategoryWrapper.querySelector(`ul[data-cat="${i}"]`);a&&a.classList.add("active")}))}))}clearActiveStates(){this.categoryList.querySelectorAll("li.active").forEach((t=>t.classList.remove("active"))),this.subcategoryWrapper.querySelectorAll("ul.active").forEach((t=>t.classList.remove("active")))}}}}]);

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.