PageSourceSearch

https://www.petpassion.hu/!common_design/base/002600/main.min.js?ver=11

js petpassion.hu collected 2026-10-08 02:36:42 UTC 18,790 bytes, 1 lines download raw bytes

1const ROOT=document.documentElement,HEADER_STICKY_OFFSET=150;let headerHeight=0,scrollPosition=0;function isTouchPointer(){return matchMedia("(pointer: coarse)").matches}isTouchPointer()?ROOT.classList.add("touch-device"):ROOT.classList.add("not-touch-device");const debouncedPaging=debounce(function(e,t){e&&loadNextPage(e,t)},1e3);function scrollLock(e){let t=document.body;e&&!t.classList.contains("scroll-lock")&&(scrollPosition=window.pageYOffset,t.style.overflow="hidden scroll",t.style.position="fixed",t.style.top=`-${scrollPosition}px`,t.style.width="100%",ROOT.style.scrollBehavior="auto",t.style.scrollBehavior="auto",t.classList.add("scroll-lock")),!e&&t.classList.contains("scroll-lock")&&(t.style.removeProperty("overflow"),t.style.removeProperty("position"),t.style.removeProperty("top"),t.style.removeProperty("width"),t.classList.remove("scroll-lock"),window.scrollTo(0,scrollPosition),t.style.scrollBehavior="",ROOT.style.scrollBehavior="")}function debounce(e,t=500,s){var i;return function(){var a=this,n=arguments;clearTimeout(i),i=setTimeout(function(){i=null,s||e.apply(a,n)},t),s&&!i&&e.apply(a,n)}}function throttle(e,t=300){var s=null;return function(){null==s&&(s=setTimeout(function(){e(),s=null},t))}}function closeNanobar(e,t,s,i){var a=$(e).closest("#nanobar");a.stop().animate({height:"0px"},500,function(){a.remove(),set_front_var(t,1,s)})}function getContrastYIQ(e){return(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=128?"light":"dark"}function getHeight(e){return e.length>0?e.outerHeight():0}let headerCorrection=function(e,t){let s=12;return(ROOT.classList.contains("header-with-sticky-behavior")||ROOT.classList.contains("header-with-sticky-behavior-on-scroll-up")&&e>t)&&(s+=getHeaderHeight()),s};function getHeaderHeight(){return $("#header").outerHeight()}function altPicHover(){let e=$(this),t=e.find(".js-main-img"),s=t.attr("data-src-orig"),i=t.attr("data-srcset-orig");null==i&&(i="");let a=e.find(".js-alt-img-wrap");e.find(".js-alt-images").mouseleave(function(){t.attr("src",s),t.attr("srcset",i)}),a.each(function(){let e=$(this);function a(){let s=e.find("img").attr("data-src-orig");t.attr("src",s);let i=e.find("img").attr("data-srcset-orig");void 0===i&&(i=""),t.attr("srcset",i)}e.mouseover(a),e.focus(a),e.blur(function(){t.attr("src",s),t.attr("srcset",i)})})}function checkForInput(e){let t=$(e),s=t.val(),i=t.siblings(".search-box__search-btn");t.toggleClass("not-empty",s.length>=1).toggleClass("search-enable",s.length>=t.data("search-min-length")),s.length<t.data("search-min-length")?i.attr({"aria-disabled":!0,disabled:!0}):i.attr({"aria-disabled":!1,disabled:!1})}function getScrollTop(){return $(window).scrollTop()}function getWindowWidth(){return $(window).width()}function getVisibleDistanceTillHeaderBottom(){let e=$("#header"),t=e.offset().top-$(window).scrollTop();return getHeight(e)+t}function positionStickyDisable(){ROOT.classList.remove("header-is-sticky","header-is-visible-by-scroll-up","header-is-hidden-by-scroll-down","header-is-sticky-with-transition")}function handleStickyHeader(){let e=$(this).scrollTop();Math.abs(lastScrollTop-e)<=DELTA||(e>headerHeight+HEADER_STICKY_OFFSET?(ROOT.classList.remove("header-is-visible-by-scroll-up"),ROOT.classList.add("header-is-sticky","header-is-hidden-by-scroll-down"),setTimeout(function(){ROOT.classList.add("header-is-sticky-with-transition")},100),e>lastScrollTop?(ROOT.classList.add("header-is-hidden-by-scroll-down"),ROOT.classList.remove("header-is-visible-by-scroll-up")):(ROOT.classList.remove("header-is-hidden-by-scroll-down"),ROOT.classList.add("header-is-visible-by-scroll-up"))):positionStickyDisable(),lastScrollTop=e)}function initDrag(e){const t=document.getElementById(e);if(t){t.classList.add("draggable");let e,s,i,a,n=!1;t.addEventListener("mousedown",o=>{n=!0,e=o.pageX-t.offsetLeft,s=o.pageY-t.offsetTop,i=t.scrollLeft,a=t.scrollTop,t.classList.add("is-pointer-down")}),t.addEventListener("mouseleave",()=>{n=!1,t.classList.remove("dragging","is-pointer-down")}),t.addEventListener("mouseup",()=>{n=!1,t.classList.remove("dragging","is-pointer-down")}),t.addEventListener("mousemove",o=>{if(!n)return;o.preventDefault();const l=o.pageX-t.offsetLeft,r=o.pageY-t.offsetTop,c=1*(l-e),d=1*(r-s);(Math.abs(c)>0||Math.abs(d)>0)&&t.classList.add("dragging"),t.scrollLeft=i-c,t.scrollTop=a-d})}}let lastScrollTop=0;const DELTA=1;function changeVariant(e){let t=$(e);t.hasClass("is-selected")||(t.addClass("is-selected").removeClass("is-invalid"),t.attr("aria-invalid","false"),t.removeAttr("aria-describedby")),checkVariants(e,!0)}let $faultInVariants,lastFocusedElement;function checkVariants(e,t){$faultInVariants=!1;
1let s=$(e).closest(".js-product"),i=null;i="string"==typeof e&&e.includes("artdet")?$(".js-variant-wrap",$(e)):$(".js-variant-wrap",s),i.length>0&&i.each(function(){let e=$(this),s=$(e).find("select");s.hasClass("is-selected")?t||s.attr("aria-invalid","false").removeAttr("aria-describedby").removeClass("is-invalid"):(t||(s.attr("aria-invalid","true").addClass("is-invalid"),s.attr("aria-describedby","error-"+s.attr("id")),$faultInVariants||s.focus()),$faultInVariants=!0)}),$faultInVariants?(s.addClass("has-unselected-variant"),s.removeClass("all-variant-selected")):(s.removeClass("has-unselected-variant"),s.addClass("all-variant-selected"))}function inputsErrorHandling(isTooltip,el){let faultInInputs=0;faultInInputs=1===isTooltip?check_cust_input(null,"tooltip"):check_cust_input();let faultInVariant=$faultInVariants;const faultContainers=[],product=$(el).closest(".js-product");if(1===faultInInputs||!0===faultInVariant){function createScrollCallback(e){const t=$(e);return function(){t.removeClass("scroll-to-highlighted"),t[0].offsetWidth,t.addClass("scroll-to-highlighted");let e=t.data("highlight-timeout");e&&clearTimeout(e);let s=setTimeout(function(){t.removeClass("scroll-to-highlighted"),t.removeData("highlight-timeout")},1e3);t.data("highlight-timeout",s)}}if(!0===faultInVariant){const t=product.find(".artdet__variants");if(t.length>0){const s=createScrollCallback(t);if(faultContainers.push(t[0]),1===isTooltip)s();else{const i=t.parent(),a="sticky"===i.css("position");a||isInViewport(t)?s():scrollToElement({element:t,offset:headerHeight+20,callback:s})}}}if(1===faultInInputs){const n=product.find(".js-spec-params-input");if(n.length>0){const o=createScrollCallback(n);if(faultContainers.push(n[0]),1===isTooltip)scrollToElement({element:n,offset:headerHeight+20,scrollIn:"#modal-tooltip .modal-body",container:"#modal-tooltip",callback:o});else{const l=n.parent(),r="sticky"===l.css("position");isInViewport(n)?o():r?scrollToElement({element:n,offset:headerHeight+20,scrollIn:l,container:l,callback:o}):scrollToElement({element:n,offset:headerHeight+20,callback:o})}}}const e=faultContainers.reduce((e,t)=>e&&e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?e:t,null);if(e){const c=e.querySelector("input.is-invalid, select.is-invalid");c&&c.focus()}}else{let mainBtn=$(el),onclickFn=mainBtn.data("onclick");mainBtn.addClass("call-onclick"),mainBtn.hasClass("artdet__quick-order-btn")&&mainBtn.addClass("loader"),eval(onclickFn)}}function closeVariantsOverlay(e){variantsHandle.controllers&&(variantsHandle.controllers.forEach(e=>{"function"==typeof e.onKeydown&&(!function(e){let t=$(e).closest(".js-product"),s=t.find(".js-variants");t.removeClass("is-variants-opened"),s.removeClass("show"),t.find(".product__variants-btn").attr("aria-expanded",!1).focus()}(e.openButton),document.removeEventListener("keydown",e.onKeydown))}),variantsHandle.controllers=[],announceToScreenReader?.("listCollapse",{label:UNAS.text.product_variants}))}function handleFocusIn(e){lastFocusedElement=e.target}function openVariantsOverlay(el){let $thisOpenBtn=$(el),$thisProduct=$thisOpenBtn.closest(".js-product"),$thisVariants=$thisProduct.find(".js-variants"),focusableSelectors=[],focusableElements=[],firstEl,lastEl;function onKeydown(e){if("Escape"!==e.key&&"Esc"!==e.key){if("Tab"===e.key)if(e.shiftKey){if(lastFocusedElement===$thisOpenBtn[0])return e.preventDefault(),void firstEl.focus();document.activeElement!==firstEl&&lastFocusedElement!==$thisVariants[0]||(e.preventDefault(),$thisOpenBtn.focus())}else{if(lastFocusedElement===$thisOpenBtn[0])return e.preventDefault(),void firstEl.focus();document.activeElement===lastEl&&(e.preventDefault(),$thisOpenBtn.focus())}}else closeVariantsOverlay()}if($thisProduct.is(".all-variant-selected.is-variants-opened")||$thisProduct.is(".all-variant-selected.js-variant-type-2")){let cartadd=$thisOpenBtn.data("cartadd");return eval(cartadd),$thisProduct.removeClass("is-variants-opened"),$thisVariants.removeClass("show"),void $thisOpenBtn.attr("aria-expanded",!1)}if($thisProduct.hasClass("is-variants-opened")||$thisProduct.hasClass("js-variant-type-2"))checkVariants(el);else{if(focusableSelectors=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not
1([tabindex="-1"])'],focusableElements=Array.from($thisVariants[0].querySelectorAll(focusableSelectors.join(","))).filter(e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden")),0===focusableElements.length)return;firstEl=focusableElements[0],lastEl=focusableElements[focusableElements.length-1],$thisVariants.addClass("show").attr("tabindex","-1").focus(),$thisVariants[0].removeAttribute("tabindex"),$thisProduct.addClass("is-variants-opened"),$thisOpenBtn.attr("aria-expanded",!0),announceToScreenReader?.("listExpand",{label:UNAS.text.product_variants}),document.addEventListener("keydown",onKeydown),variantsHandle.controllers.push({openButton:$thisOpenBtn[0],onKeydown:onKeydown})}}$(document).ready(function(){const e=document.getElementById("header"),t=document.getElementById("header__inner"),s=$("#scroll-to-top-btn");if(s.on("click",function(e){return e.preventDefault(),window.scrollTo({top:0,behavior:"smooth"}),!1}),$(window).on("load scroll",throttle(function(){!function(e=500){$(window).scrollTop()>e?s.addClass("show"):s.removeClass("show")}()},100)),initTippy(),null!==e&&(ROOT.classList.contains("header-with-sticky-behavior")||ROOT.classList.contains("header-with-sticky-behavior-on-scroll-up"))){if(headerHeight=getHeight($(t)),ROOT.style.setProperty("--header-height",headerHeight+"px"),ROOT.classList.contains("header-with-sticky-behavior")){function i(){let t=parseInt(window.getComputedStyle(e).top),s=window.pageYOffset,i=e.offsetTop-s;i<1&&(i=0),s>0&&i===t?ROOT.classList.add("header-is-sticky"):ROOT.classList.remove("header-is-sticky")}$(window).on("scroll",{passive:!0},throttle(function(){i()},100)),window.onload=e=>{i()}}ROOT.classList.contains("header-with-sticky-behavior-on-scroll-up")&&(handleStickyHeader(),$(window).on("scroll",{passive:!0},throttle(function(){ROOT.classList.contains("freeze-sticky-header")||handleStickyHeader()},100)))}$(window).on("resize",debounce(function(){null!==e&&(ROOT.classList.contains("header-with-sticky-behavior")||ROOT.classList.contains("header-with-sticky-behavior-on-scroll-up"))&&(headerHeight=getHeight($(t)),ROOT.style.setProperty("--header-height",headerHeight+"px"))},100)),$("#box_search_input").on("input blur focus",function(e){const t=e.type;"focus"===t?ROOT.classList.add("freeze-sticky-header"):(checkForInput(this),"blur"===t&&ROOT.classList.remove("freeze-sticky-header"))}),$(document).on("click","[data-js-scroll-to]",function(e){e.preventDefault();let t=$(this).data("js-scroll-to"),s=$(t);if(s.length>0){let e=s.data("highlight-timeout");e&&(clearTimeout(e),s.removeClass("scroll-to-highlighted"));let t=function(){s.addClass("scroll-to-highlighted");let e=setTimeout(function(){s.removeClass("scroll-to-highlighted"),s.removeData("highlight-timeout")},1e3);s.data("highlight-timeout",e)};if(isInViewport(s))t();else if(ROOT.style.scrollBehavior="auto","sticky"==s.parent().css("position")||s.closest(".modal").length>0){let e=s[0].parentElement;if(s.closest(".modal").length>0)e=s.closest(".modal-body"),scrollToElement({element:s,scrollIn:e,container:e,callback:t});else{new Promise(i=>{scrollToElement({element:e,callback:()=>{scrollToElement({element:s,scrollIn:e,container:e,callback:()=>{t(),i()}})}})}).then(()=>{})}}else scrollToElement({element:s,callback:t})}}),$(document).on("productTooltipButtonClicked",function(e,t){t.event.currentTarget.classList.add("loader","active"),EVENT_DATA.product_tooltip_opened_by=t.event.currentTarget})}),document.addEventListener("focusin",handleFocusIn);let variantsHandle={controllers:[]};function file_input_filname_change(e){let t=$(e),s=t.next(".custom-file-label"),i=s.find(".custom-file-name"),a=s.find(".custom-file-delete-button"),n=s.find(".custom-file-name-text"),o=t.val().split("\\").pop();""===o?(n.html(s.attr("data-text")).removeClass("not-empty"),a.prop("disabled",!0).attr("aria-hidden","true"),t.hasClass("required")&&(t.addClass("is-invalid"),i.addClass("is-invalid"))):(n.html(o).addClass("not-empty"),a.prop("disabled",!1).attr("aria-hidden","false"),t.hasClass("required")&&(t.removeClass("is-invalid"),i.removeClass("is-invalid"))),t.focus()}function file_input_filename_delete(e,t){e.stopPropagation(),e.preventDefault();let s=$(t).closest(".form-group"),i=s.find(".custom-file-label"),a=i.find(".custom-file-name"),n=i.find(".custom-file-delete-button"),o=i.find(".custom-file-name-text"),l=s.find(".custom-file-input");o.removeClass("not-empty").html(i.attr("data-text")),n.prop("disabled",!0).attr("aria-hidden","true"),l.hasClass("required")&&(l.addClass("is-invalid"),a.addClass("is-invalid")),l[0].value="",l.focus()}function readMoreOpener(){let e=$(this),t=$(".read-more__content",e),s=$(".read-more__btn",e),i=$(".read-more__btn-wrap",e),a=t.outerHeight(!0),n=e.css("max-height");-1!==n.indexOf("px")&&(n=parseInt(n.replace(/[^-\d\.]/g,""))),a>n&&(e.addClass("has-button").css({height:n}),s.prop("disabled",!1),s.on("click",function(){a=t.outerHeight(!0),s.hasClass("is-active")?(e.animate({height:n},400).removeClass("is-opened"),s.removeClass("is-active").attr("aria-label",s.data("closed")),isInViewport(e)||scrollToElement({element:e})):(e.css("max-height","unset").animate({height:a+i.outerHeight(!0)},400,function(){isInViewport(e)||scrollToElement({element:e})}).addClass("is-opened"),s.addClass("is-active").attr("aria-label",s.data("opened")))})),$(this).addClass("is-processed")}function initTippy(e){let t=document.getElementById(e);function s(e){const t=e.closest(".form-group")?.querySelector(".info-icon svg")||e.querySelector(".info-icon svg")||e;tippy(e,{allowHTML:!0,content:e.getAttribute("data-tippy"),getReferenceClientRect:()=>t.getBoundingClientRect(),hideOnClick:!1,zIndex:1e4,maxWidth:"320px",showOnCreate:!0,onCreate:function(e){const t=e.reference;t.classList.add("inited"),["DIV","SPAN"].includes(t.tagName)&&"0"===t.getAttribute("tabindex")&&(t.setAttribute("role","button"),t.setAttribute("aria-expanded","fal
1se"))},onShow(e){const t=e.reference;t.setAttribute("aria-live","polite"),t.setAttribute("aria-expanded","true"),e.popper.setAttribute("role","tooltip")},onHide(e){const t=e.reference;if(!e._onLabelClicked&&"LABEL"===t.tagName&&t.matches(":hover")){const s=document.getElementById(t.htmlFor)||t.querySelector("input");if(s&&document.activeElement===s)return setTimeout(function(){e._onLabelClicked=!0},50),!1}t.removeAttribute("aria-live"),t.setAttribute("aria-expanded","false"),e._onLabelClicked=!1}})}t=t?t.querySelectorAll("[data-tippy]:not(.binded)"):document.querySelectorAll("[data-tippy]:not(.binded)"),t.forEach(e=>{let t;["focus","mouseenter","focusin"].forEach(t=>{e.addEventListener(t,async t=>{if(!e.classList.contains("inited"))if(t.preventDefault(),"not_loaded"===EVENT_DATA.tippy_state){e.classList.add("tippy-module-loading"),EVENT_DATA.tippy_state="loading";try{if(console.info("Loading TippyJS..."),await import(shop_url_main+"/!common_packages/jquery/plugins/tippy/tippy-bundle.umd.min.js"),"undefined"==typeof tippy)throw new Error("Tippy did not load correctly");EVENT_DATA.tippy_state="loaded",e.classList.contains("mouseleave")||s(e)}catch(e){console.error("Error loading modules: ",e),EVENT_DATA.tippy_state="not_loaded"}e.classList.remove("tippy-module-loading")}else"loaded"!==EVENT_DATA.tippy_state||e.classList.contains("inited")||s(e)})}),e.addEventListener("mouseleave",()=>{e.classList.add("mouseleave")},{once:!0}),e.classList.add("binded"),["focusin","click","focusout"].forEach(s=>{e.addEventListener(s,()=>{const i=e._tippy;if(i){const e=i.popper,a=e._tippy;"focusin"==s&&clearTimeout(t),e&&(!1===a.state.isShown&&"focusout"!=s?a.show():("click"==s&&i&&"BUTTON"!=i.reference.nodeName||"focusout"==s)&&(t=setTimeout(()=>{a.hide()},0)))}})})})}$(window).bind("pageshow",function(){$(".js-variant-wrap").each(function(){$("select option",this).each(function(){if(this.defaultSelected)return this.selected=!0,!1})}),$(".cust_input_select:not(.param_cust_input_save_select)").each(function(){$("option",this).each(function(){if(this.defaultSelected)return this.selected=!0,!1})}),$(".cust_input_file, .cust_input_text").each(function(){let e=$(this);e.hasClass("param_cust_input_save")||e.val(""),e.hasClass("cust_input_file")&&e.siblings(".file-name").html(e.siblings(".file-name").attr("data-empty"))})}),"shop"==service_type&&($(document).on("show.bs.modal",function(e){if("overlay_login_outer"==e.target.id){passwordShowHide();document.querySelectorAll(".orderflow-main-btn").forEach(e=>{e.classList.remove("loader")})}"undefined"!=typeof tippy&&tippy.hideAll({duration:0})}),$(document).on("hide.bs.modal",function(){"undefined"!=typeof tippy&&tippy.hideAll({duration:0})}),$(document).on("clickOrderButton",function(e,t){if(!t.direction){document.querySelectorAll(".orderflow-main-btn").forEach(e=>{e.classList.add("loader")})}}));const eventTippyReady=new CustomEvent("initTippyReady");function changeTippyText(e,t){t.setAttribute("data-tippy",e);const s=t._tippy;s&&s.setContent(e)}document.dispatchEvent(eventTippyReady),$(document).ready(function(){$(document).on("addToFavourites",function(e,t){let s=$(".page_artdet_func_favourites_outer_"+t.sku_id+"[data-tippy]"),i=UNAS.text.delete_from_favourites;s.each(function(){changeTippyText(i,this)})}),$(document).on("removeFromFavourites",function(e,t){let s=$(".page_artdet_func_favourites_outer_"+t.sku_id+"[data-tippy]"),i=UNAS.text.add_to_favourites;s.each(function(){changeTippyText(i,this)})}),$(document).on("addToCompare",function(e,t){let s=$(".page_artdet_func_compare_"+t.sku_id+"[data-tippy]"),i=UNAS.text.delete_from_compare;s.each(function(){changeTippyText(i,this)})}),$(document).on("removeFromCompare",function(e,t){let s=$(".page_artdet_func_compare_"+t.sku_id+"[data-tippy]"),i=UNAS.text.comparison;s.each(function(){changeTippyText(i,this)})})});

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.