PageSourceSearch

https://hobbii.pl/cdn/shop/t/4/assets/hobbii-collection-Bz7kBoZS.min.js

js hobbii.pl collected 2026-09-26 15:09:55 UTC 5,847 bytes, 2 lines download raw bytes

1var e=Object.defineProperty,t=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,c=(t,o,r)=>o in t?e(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r;import{p as i}from"./hobbii-index-iMsuhaEa.min.js";import{U as l,V as a}from"./hobbii-country-switcher-BNm3Hsht.min.js";import{p as s}from"./hobbii-constants-DXYrb0R4.min.js";import{p as u}from"./hobbii-logger-kjAx_iy-.min.js";import{handleContextualError as d,contextualError as h}from"./hobbii-error-2u2rc1Ql.min.js";import{t as f}from"./hobbii-tracking-RMINnNnb.min.js";import"./hobbii-cookie-C8mkdIlf.min.js";import"./hobbii-notifier-BLiA8JPX.min.js";import"./hobbii-intl-tel-input-BoEFiupD.min.js";var m,p,y=(m={"hobbii-collection-Bz7kBoZS.min.js"(e){const t="#collection",m="#custom-filter-panel",p="#custom-filter-panel-scrollable-content",y=".js-custom-facet-active-tag",b=".js-custom-facet-checkbox",w=".js-custom-facet-clear-all",v=".js-custom-facet-filter-toggle",E=".js-custom-facet-price-input",g=".js-custom-facet-sort-radio",j=".js-custom-facet-sort-select",L=".js-shopify-search-replace-content",S=["Backspace","Delete","ArrowUp","ArrowDown"],q=[...S,"Tab","Enter","ArrowLeft","ArrowRight"];function A(){$(`${window.location.origin}${this.value}`)}function k(e){q.includes(e.key)||!isNaN(parseInt(e.key))||e.preventDefault()}function P(e){if(e.preventDefault(),!S.includes(e.key)&&isNaN(parseInt(e.key)))return;const{minParam:t,maxParam:o}=this.dataset,r=document.querySelector(`input[name="${t}"]`),n=document.querySelector(`input[name="${o}"]`),c=new URL(window.location.href);r&&c.searchParams.set(r.name,r.value),n&&c.searchParams.set(n.name,n.value),_(c.href)}function O(e){e.preventDefault(),$(this.href),this.remove()}function D(e){e.preventDefault(),$(this.href)}function x(e){e.preventDefault();const t=this.options[this.selectedIndex].value,o=new URL(window.location.href);o.searchParams.set("sort_by",t),$(o.href)}function N(){const e=new URL(window.location.href);e.searchParams.set("sort_by",this.value),$(e.href)}let I=!1;function U(){I=!I,function(e){const t=document.querySelector(m),o=document.querySelector(p);e?l(o,{overflowType:"clip"}):a(o),null==t||t.classList.toggle("is-active",e)}(I)}const M=()=>{const e=document.querySelectorAll(j),t=document.querySelectorAll(g),o=document.querySelectorAll(b),r=document.querySelectorAll(E),n=document.querySelectorAll(y),c=document.querySelectorAll(w),i=document.querySelectorAll(v);o.forEach((e=>e.addEventListener("change",A))),r.forEach((e=>{e.addEventListener("keydown",k),e.addEventListener("keyup",P)})),n.forEach((e=>e.addEventListener("click",O))),c.forEach((e=>e.addEventListener("click",D))),e.forEach((e=>e.addEventListener("change",x))),t.forEach((e=>e.addEventListener("change",N))),i.forEach((e=>e.addEventListener("click",U)))},R=(e,t)=>{e.disabled=t},T=e=>{const o=document.querySelectorAll(j),r=document.querySelectorAll(b),n=document.querySelectorAll(y),c=document.querySelector(p),i=document.querySelector(t);null==c||c.classList.toggle("is-loading",e),null==i||i.classList.toggle("is-loading",e),n.forEach((t=>((e,t)=>{e.classList.toggle("pointer-events-none",t)})(t,e))),e&&(o.forEach((t=>R(t,e))),r.forEach((t=>R(t,e))))},$=e=>{return t=null,o=null,r=function*(){const t=new URL(e);let o;window.history.replaceState({},"",t),t.searchParams.set("sections","collection,collection-header,search-header"),T(!0);try{const e=yield fetch(t);o=yield e.json(),C(o.collection),o["collection-header"]&&C(o["collection-header"]),o["search-header"]&&C(o["search-header"]),M(),T(!1)}catch(r){d(h("UpdateCollectionError",r,{data:o}))}},new Promise(((e,n)=>{var c=e=>{try{l(r.next(e))}catch(t){n(t)}},i=e=>{try{l(r.throw(e))}catch(t){n(t)}},l=t=>t.done?e(t.value):Promise.resolve(t.value).then(c,i);l((r=r.apply(t,o)).next())}));var t,o,r},_=i($,1e3),C=e=>{const{html:t,cleanup:o}=(e=>{const t=document.createElement("div");return t.innerHTML=e,{cleanup:()=>t.remove(),html:t}})(e),r=t.querySelectorAll(L),n=t.querySelectorAll(E);r.forEach((e=>{if(!e.id)throw new Error(`Could not find id for Shopify search element with class ${e.className}: Could not update DOM`);const t=document.getElementById(e.id);t&&(t.innerHTML=e.innerHTML)}
1)),n.forEach((e=>{if(!e.id)throw new Error(`Could not find id for Shopify price input element with class ${e.className}: Could not update DOM`);const t=document.getElementById(e.id);if(!t)throw new Error(`No element with id ${e.id} found in the current DOM`);t.value=e.value})),o()};M(),(()=>{let e={};const t=()=>{const t=new URL(window.location.href),i=(e=>Array.from(e.searchParams.entries()).reduce(((e,[t,o])=>t.startsWith("filter.")&&t.includes("hobbii")?(e[t]||(e[t]=[]),e[t].push(o),e):e),{}))(t),l=((e,t)=>{const o={},r=(e,t)=>{if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0};for(const n of Object.keys(t)){const c=e[n]||[],i=t[n]||[];r(c,i)||(o[n]=[...i])}for(const n of Object.keys(e))n in t||(o[n]=[]);return o})(e,i);Object.keys(l).length>0&&(((e,t)=>{Object.entries(e).forEach((([e,o])=>{var r;const n={filter_type:e.split(".").pop(),filter_value:o.join(","),url:t.toString()};u("filter_applied",n),null==(r=null==window?void 0:window.posthog)||r.capture(s.FILTER_APPLIED,n)}))})(l,t),e=((e,t)=>{for(var i in t||(t={}))r.call(t,i)&&c(e,i,t[i]);if(o)for(var i of o(t))n.call(t,i)&&c(e,i,t[i]);return e})({},i))},i=document.querySelector("#custom-filter-panel-scrollable-content");null==i||i.addEventListener("change",t),null==i||i.addEventListener("click",t)})(),(()=>{var e;const t=null==(e=window.Hobbii)?void 0:e.collectionMetadata;t&&f("collection_metadata",t)})()}},function(){return p||(0,m[t(m)[0]])((p={exports:{}}).exports,p),p.exports});export default y();
2//# sourceMappingURL=hobbii-collection-Bz7kBoZS.min.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.