PageSourceSearch

https://www.parc-animalier-verdon.com/content/themes/verdon-theme/build/module-wc-search-overlay-754739c2.js

js parc-animalier-verdon.com collected 2026-10-01 23:53:14 UTC 4,140 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunklesaiglesduverdon_theme=self.webpackChunklesaiglesduverdon_theme||[]).push([[9748],{4055:function(e,r,t){t.r(r),t.d(r,{default:function(){return l}});var a=t(9978),s=t(6975);class l extends s.A{constructor(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];super(r),this._overlayWrapperEl=null,this._displayToggleEl=null,this._productSearchEl=null,this._productSearchInnerEl=null,this._searchProductCategoriesEl=null,this._searchInputEl=null}getName(){return"wcSearchOverlay"}_onLoad(){super._onLoad(),this._initElements(),this._handleSearchOverlayDisplay(),this._handleFormAutofill()}getDefaultConfig(){return{searchOverlayWrapperSelector:".wp-alpha-product-search-wrapper",searchOverlayDisplayToggleSelector:".wp-alpha-products-search .product-search-toggle-btn",searchProductSearchSelector:".wp-alpha-product-search",searchProductSearchInnerSelector:".wp-alpha-product-search-inner",searchProductCategoriesSelector:'.wp-alpha-products-search [name="product-cat[]"]',searchInputSelector:".wp-alpha-products-search .search-product-field",searchOverlayActiveClass:"search-overlay-active",searchFieldExpandedClass:"search-field-expanded",searchOverlayAnimationDurationMs:600}}_initElements(){const e=this.getConfig();this._overlayWrapperEl=document.querySelector(e.searchOverlayWrapperSelector),this._displayToggleEl=document.querySelector(e.searchOverlayDisplayToggleSelector),this._productSearchEl=document.querySelector(e.searchProductSearchSelector),this._productSearchInnerEl=document.querySelector(e.searchProductSearchInnerSelector),this._searchProductCategoriesEl=document.querySelector(e.searchProductCategoriesSelector),this._searchInputEl=document.querySelector(e.searchInputSelector)}_isValid(){const e=this._overlayWrapperEl&&this._displayToggleEl&&this._searchInputEl,r=this._productSearchEl&&this._productSearchInnerEl;return e&&r}_handleSearchOverlayDisplay(){if(!this._isValid())return;const e=this.getConfig(),r=this.getProductSearchEl(),t=this.getProductSearchInnerElement(),a=this.getSearchInputElement();this.getOverlayDisplayToggleElement().addEventListener("click",(()=>this._toggleSearchOverlay())),r.addEventListener("click",(r=>{r.target.closest(e.searchProductSearchInnerSelector)!==t&&this._toggleSearchOverlay()})),document.addEventListener("keyup",(e=>{"Escape"===e.key&&this.overlayIsActive()&&this._toggleSearchOverlay()})),a.addEventListener("focus",(()=>this.getSearchFormElement().classList.add("search-focused"))),a.addEventListener("blur",(()=>this.getSearchFormElement().classList.remove("search-focused")))}_toggleSearchOverlay(){const e=this.getConfig(),r=this.getOverlayWrapperElement(),t=this.getOverlayDisplayToggleElement(),a=this.getSearchInputElement();this.overlayIsActive()?a.classList.remove(e.searchFieldExpandedClass):setTimeout((()=>{a.focus(),a.classList.add(e.searchFieldExpandedClass)}),e.searchOverlayAnimationDurationMs),document.body.classList.toggle("lock-body-scroll"),r.classList.toggle(e.searchOverlayActiveClass),t.classList.toggle(e.searchOverlayActiveClass),t.blur()}_handleFormAutofill(){if(!this._isValid()||!this.isProductSearchPage())return;const e=this.getSearchProductCategoriesElement();if(e){const r=a.A.getQueryStringParams();if(r){const t=r.getAll("product-cat[]");if(t.length){const r=parseInt(t[0],10);e.querySelector(`option[value="${r}"]`)&&(e.value=r)}}}}overlayIsActive(){return!!this._isValid()&&this.getOverlayWrapperElement().classList.contains(this.getConfig().searchOverlayActiveClass)}isProductSearchPage(){const e=a.A.getQueryStringParams();return!!e&&1===parseInt(e.get("is-product-search"),10)}getOverlayWrapperElement(){return this._overlayWrapperEl}getOverlayDisplayToggleElement(){return this._displayToggleEl}getProductSearchEl(){return this._productSearchEl}getProductSearchInnerElement(){return this._productSearchInnerEl}getSearchProductCategoriesElement(){return this._searchProductCategoriesEl}getSearchInputElement(){return this._searchInputEl}getSearchFormElement(){return this.getSearchInputElement().closest("form")}}}}]);
2//# sourceMappingURL=module-wc-search-overlay-754739c2.js.map

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.