1const HOTSPOTS_GQL={HOTSPOT:(t,e)=>`${t}: hotspots(${e}) {\n products {\n id\n type\n code\n name\n link\n zones\n icon\n iconSecond\n iconSmall\n iconSmallSecond\n enclosuresImages {\n iconUrl\n iconUrlSecond\n mediumUrl\n mediumUrlSecond\n }\n price {\n rebateCodeActive\n price {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n omnibusPrice {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n omnibusPriceDetails {\n unit {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n youSavePercent\n omnibusPriceIsHigherThanSellingPrice\n newPriceEffectiveUntil {\n formatted\n }\n }\n max {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n unit {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n unitConvertedPrice {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n youSavePercent\n beforeRebate {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n beforeRebateDetails {\n youSavePercent\n unit {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n }\n advancePrice {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n suggested {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n rebateNumber {\n number\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n }\n sizes {\n id\n price {\n rebateCodeActive\n price {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n omnibusPrice {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n omnibusPriceDetails {\n unit {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n youSavePercent\n omnibusPriceIsHigherThanSellingPrice\n newPriceEffectiveUntil {\n formatted\n }\n }\n max {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n unit {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n unitConvertedPrice {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n youSavePercent\n beforeRebate {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n beforeRebateDetails {\n youSavePercent\n unit {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n }\n advancePrice {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n suggested {\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n rebateNumber {\n number\n ${app_shop.vars.priceType} {\n value\n formatted\n }\n }\n }\n }\n unit {\n sellBy\n plural\n singular\n unitConvertedFormat\n }\n points\n }\n name\n url\n type\n took\n ${"function"==typeof app_shop?.vars?.additionalHotspotQueryReduce?app_shop?.vars?.additionalHotspotQueryReduce():""}\n }`,HOTSPOTS_ALL_QUERY:t=>JSON.stringify({query:`query {\n ${t}\n }`})};class GetHotspots{constructor(t={}){this.allHotspots=[...document.querySelectorAll(".hotspot__wrapper[data-
1pagetype]")],this.allHotspotsData=[],this.hotspotsToLoad=[...this.allHotspots],this.hotspotsInView=[],this.loadedHotspots=[],this.hotspotsInViewDelay=400,this.priceType=t.priceType,this.callbacksBeforeAppend=t.callbacksBeforeAppend||{},this.callbacksAfterAppend=t.callbacksAfterAppend||{},this.productsMinHeight=t.productsMinHeight??!1,this.omnibusDataAll=[],this.txt={pkt:"pkt"}}async fetchData(t={}){const{data:e,link:s,linkParameter:n=""}=t;if(!e)return!1;try{const t=await fetch(`${s||app_shop.urls.graphql||"/graphql/v1"}${n}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:e});return await t.json()}catch(t){return!1}}async loadHotspots(){const t=HOTSPOTS_GQL.HOTSPOTS_ALL_QUERY(this.hotspotsInView.reduce(((t,e)=>{const s=this.allHotspotsData.filter((t=>e.id===t.id))?.[0],n=`hotspotsPanelParamsInput: { page: ${s?.page}, zone: zone${s?.zone} ${s.products?`, products: [${s.products}]`:""}}`;return t+=HOTSPOTS_GQL.HOTSPOT(s.id,n)}),""));this.hotspotsInView=[];const e=await this.fetchData({data:t,linkParameter:"?hotspots"});e.data&&(Object.entries(e?.data),this.loadedHotspots=[...this.loadedHotspots,...Object.entries(e?.data)],this.hotspotsToSet=[...Object.entries(e?.data)]),this.hotspotsToSet?.forEach((t=>{const e=this.allHotspots.filter((e=>t[0]===e.id))?.[0];return!!e&&(this.setHotspot(t[1],e),!0)}))}loadHotspotsDelay(){clearTimeout(this.loadingTimer),this.loadingTimer=setTimeout((()=>{this.loadHotspots()}),this.hotspotsInViewDelay)}getHotspotsInPage(){this.allHotspotsData=this.allHotspots.map((t=>({id:t?.id,page:t.dataset?.pagetype,zone:t.dataset?.zone,products:t.dataset?.products||null})))}hotspotObserverFunc(t){t.forEach((t=>{if(!t.isIntersecting)return!1;if(this.hotspotsToLoad.includes(t.target)){if(t.target.querySelector(".hotspot.--initialized"))return;this.hotspotsToLoad=this.hotspotsToLoad.filter((e=>e!==t.target)),this.hotspotsInView.push(t.target),this.loadHotspotsDelay(),this.hotspotObserver.unobserve(t.target)}return!0}))}hotspotObserverInit(){this.hotspotObserver=new IntersectionObserver((t=>{this.hotspotObserverFunc(t)})),this.allHotspots.forEach((t=>this.hotspotObserver.observe(t)))}setHtml(t,e,s,n){const o=this.activeTemplate.querySelector(`${t}`);return s?.forEach((t=>{o.setAttribute(t?.name,t?.val)})),!(!o||!e)&&(e&&o?.insertAdjacentHTML(n||"beforeend",e),o?.classList.remove("--hidden"),!0)}getHotspotWrapperName(t,e,s){const n=e?".hotspot_link_headline":".hotspot_headline",o=s.querySelector(n)?.content.cloneNode(!0);return o&&t?(o.querySelector(".headline__name")?.insertAdjacentHTML("afterbegin",t),o.querySelector("a.headline")?.setAttribute("href",e),o.querySelector("a.headline")?.setAttribute("title",t),o.querySelector("a.headline__after")?.setAttribute("href",e),o.querySelector("a.headline__after")?.setAttribute("title",t),o):null}getHotspotWrapper(t,e){const s=e.querySelector("template.hotspot_wrapper")?.content.cloneNode(!0);if(!s)return null;const{name:n,url:o}=t,i=this.getHotspotWrapperName(n,o,e);return i?(s.querySelector(".hotspot__name").append(i),s):s}getImgElement(){return""+(void 0!==this.currProductsData.iconSecond&&void 0!==this.currProductsData.iconSmallSecond?`<picture>\n <source media="(min-width: 421px)" type="image/webp" srcset="${this.currProductsData.icon}"/>\n <source media="(min-width: 421px)" type="image/jpeg" srcset="${this.currProductsData.iconSecond}"/>\n <source media="(max-width: 420px)" type="image/webp" srcset="${this.currProductsData.iconSmall}"/>\n <source media="(max-width: 420px)" type="image/jpeg" srcset="${this.currProductsData.iconSmallSecond}"/>\n <img src="${this.currProductsData.iconSecond}" loading="lazy" alt="${this.currProductsData.name}">\n </picture>`:`<picture>\n <source media="(min-width: 421px)" srcset="${this.currProductsData.icon}"/>\n <source media="(max-width: 420px)" srcset="${this.currProductsData.iconSmall}"/>\n <img src="${this.currProductsData.icon}" loading="lazy" alt="${this.currProductsData.name}">\n </picture>`)}getSecondIcon=()=>{const t=this.currProductsData.enclosuresImages;if(!(t?.length>1))return!1;const{mediumUrl:e,mediumUrlSecond:s,iconUrl:n,iconUrlSecond:o}=t[1];return""+(void 0!==s&&void 0!==o?`<picture>\n <source media="(min-width: 421px)" type="image/webp" srcset="${e}"/>\n <source media="(min-width: 421px)" type="image/jpeg" srcset="${s}"/>\n <source media="(max-width: 420px)" type="image/webp" srcset="${n}"/>\n <source media="(max-width: 420px)" type="image/jpeg" srcset="${o}"/>\n <img src="${o}" loading="lazy" alt="${this.currProductsData.name}">\n </picture>`:`<picture>\n <source media="(min-width: 421px)" srcset="${e}"/>\n <source media="(max-width: 420px)" srcset="${n}"/>\n <img src="${o}" loading="lazy" alt="${this.currProductsData.name}">\n </picture>`)};setOmnibus(t,e){if(!t||!e)return!1;this.omnibusData=app_shop.fn.getOmnibusDetails?.({productData:this.currProductsData});const s=this.activeTemplate.querySelector(".product__prices");return!!this.omnibusData&&(s?.classList.add(...this.omnibusData.classes.add),s?.classList.remove(...this.omnibusData.classes.remove),this.setHtml(".price.--omnibus",this.omnibusData?.omnibus?.visible?this.omnibusData?.omnibus?.html:null),this.setHtml(".price.--max",this.omnibusData?.max?.visible?this.omnibusData?.max?.html:null),this.setHtml(".price.--before-rebate",this.omnibusData?.beforeRebate?.visible?this.omnibusData?.beforeRebate?.html:null),this.setHtml(".price.--new-price",this.omnibusData?.newPriceEffectiveUntil?.visible?this.omnibusData?.newPriceEffectiveUntil?.html:null),this.omnibusDataAll?.push(this.omnibusData),!0)}setPrices(){const{price:t}=this.currProductsData.price,{unit:e}=this.currProductsData,s=this.priceType;if(0===t[s].value)return this.activeTemplate.querySelector(".price.--phone")?.classList.remove("--hidden"),this.activeTemplate.querySelector(".price.--normal.--main")?.classList.add("--hidden"),this.activeTemplate.querySelector(".product")?.classList.add("--phone"),!1;const{sizes:n,id:o}=this.currProductsData,i=n?.map((t=>t?.price?.unit?.[s]||t?.price?.price?.[s])),a=((t=[])=>t.reduce(((t,e)=>t?.value>e?.value?e:t),t[0]))(i),r=((t=[])=>t.reduce(((t,e)=>t?.value<e?.value?e:t),t[0]))(i);this.setHtml(".price_sellby__sellby",`${e?.sellBy}`,[{name:"data-sellby",val:e?.sellBy}]),this.setHtml(".price_sellby__unit",`${e?.sellBy>1?e?.plural:e?.singular}`),this.setHtml(".price_sellby__sep","/");const p=this.currProductsData.price?.unitConvertedPrice?.[s]?.formatted;p&&this.setHtml(".price.--convert",`(${p} / ${e?.unitConvertedFormat})`);const c=this.currProductsData?.points;return c&&this.setHtml(".price.--points",`${c} ${this.txt?.pkt}`),a?.value!==r?.value?(this.setHtml(".price.--normal .price__range.--min",a.formatted),this.setHtml(".price.--normal .price__range.--max",r.formatted),this.setHtml(".price.--normal .price__sep"," - "),!1):(this.setOmnibus(o,n),!t?.[s]||(this.setHtml(".price.--normal .price__sub",this.currProductsData.price?.unit?.[s]?.formatted||t?.[s]?.formatted),!1))}getHotspotProducts(t,e){const s=t?.products,n=[];return s?.forEach((t=>{const o=e.querySelector("template.hotspot_product")?.content.cloneNode(!0);if(!s||!o)return;this.currProductsData=t,this.activeTemplate=o;const{id:i,name:a,link:r,enclosuresImages:p,icon:c}=this.currProductsData,l=[{name:"href",val:r},{name:"title",val:a}];this.setHtml(".product",!1,[{name:"data-id",val:i}]),this.setHtml(".product__name",a,l),this.setHtml(".product__icon",this.getImgElement(),l,"afterbegin"),this.setHtml(".product__icon picture",this.get
1SecondIcon(),[],"afterend"),this.setPrices(),n.push(o)})),n}async initCallback(t,e,s,n){t&&await Object.values(t).reduce((async(t,o)=>{await t,await(o?.(e,s,n))}),Promise.resolve())}hideHotspotWrapper(t){const e=t.querySelector(".skeleton");e?.parentNode?.classList?.add?.("--hidden"),e?.parentNode?.removeChild(e)}async setHotspot(t,e){if(null===t)return void this.hideHotspotWrapper(e);const s=this.getHotspotWrapper(t,e);if(!s)return;const n=e.querySelector(".skeleton"),o=this.getHotspotProducts(t,e);o&&0!==o.length?(o?.forEach((t=>{s?.querySelector(".hotspot__products")?.append(t)})),await this.initCallback(this.callbacksBeforeAppend,t,s,e),n?.parentNode?.removeChild(n),e.prepend(s),this.productsMinHeight&&app_shop.fn?.setHeight({selectors:[`#${e?.id} .product__prices`,`#${e?.id} .product__name`,`#${e?.id} .product__opinion`],container:`#${e?.id} .products`}),await this.initCallback(this.callbacksAfterAppend,t,s,e)):this.hideHotspotWrapper(e)}init(){this.allHotspots=[...document.querySelectorAll(".hotspot__wrapper[data-pagetype]")].filter((t=>t.querySelector(".hotspot:not(.--initialized)"))),this.allHotspotsData=[],this.hotspotsToLoad=[...this.allHotspots],this.hotspotsInView=[],this.getHotspotsInPage(),this.hotspotObserverInit()}}app_shop.vars.hotspotCallbacksBeforeAppend={},app_shop.vars.hotspotCallbacksAfterAppend={},app_shop.vars.additionalHotspotQueryObj={},app_shop.vars.productsMinHeight=app_shop?.vars?.hotspotsConfig?.productsMinHeight??!1,app_shop.vars.additionalHotspotQueryReduce=()=>"object"!=typeof app_shop.vars.additionalHotspotQueryObj?"":Object.values(app_shop.vars.additionalHotspotQueryObj).reduce(((t,e,s)=>`${0!==s?`${t} \n `:""} ${e}`),"");const hotspotOptions={priceType:app_shop.vars.priceType||"net",callbacksBeforeAppend:app_shop.vars.hotspotCallbacksBeforeAppend||[],callbacksAfterAppend:app_shop.vars.hotspotCallbacksAfterAppend||[],productsMinHeight:app_shop.vars.productsMinHeight??!1};app_shop.vars.hotspotCallbacksAfterAppend.omnibus=()=>{"function"==typeof runOmnibusFallback&&runOmnibusFallback()},app_shop.vars.hotspots=new GetHotspots(hotspotOptions),app_shop.run((function(){app_shop.vars.hotspots.init()}),"all",".hotspot__wrapper",!0);const HOTSPOTS_OPINION_GQL={OPINION:(t,e)=>`${t}: opinion(${e}) {\n id\n author\n content\n rating\n confirmedByPurchase\n }`,OPINION_ALL_QUERY:t=>JSON.stringify({query:`query {\n ${t}\n }`})};class HotspotOpinionsPlugin extends GetHotspots{constructor(){super(),this.txt={"Potwierdzona zakupem":"Potwierdzona zakupem"}}async getOpinion(){const t=this.products.filter((t=>!sessionStorage.getItem(`productOpinions_${t}`))),e=this.products.filter((t=>sessionStorage.getItem(`productOpinions_${t}`))),s=HOTSPOTS_OPINION_GQL.OPINION_ALL_QUERY(t.reduce(((t,e)=>t+=HOTSPOTS_OPINION_GQL.OPINION(`productOpinions_${e}`,`SearchOpinionsInput: { type: "product", ordersBy: "date", sourceId: "${e}", resultsLimit: 1 }`)),"")),n={};e.forEach((t=>{n[`productOpinions_${t}`]=JSON.parse(sessionStorage.getItem(`productOpinions_${t}`))}));const o=t.length?await this.fetchData({data:s,linkParameter:"?opinion"}):{data:n};if(!o)return!1;const i=t.length?{...o.data,...n}:{...o.data};return Object.keys(i)?.forEach((t=>{const e=t.replace("productOpinions_","");sessionStorage.getItem(t)||sessionStorage.setItem(t,JSON.stringify(i[t])),this.setOpinion(e,i[t])})),!0}setOpinionValues(){const t=this.activeTemplate.querySelector(".opinions_element_confirmed"),e=this.activeTemplate.querySelector(".opinions_element_confirmed_text");t&&e&&this.opinionData?.confirmedByPurchase&&(t?.classList.add("--true"),t?.classList.remove("--false"),e.innerText=this.txt["Potwierdzona zakupem"]),this.setHtml(".product__opinion_client",this.opinionData?.author),this.setHtml(".note_value",this.opinionData?.rating),this.setHtml(".product__opinion_content",this.opinionData?.content),this.activeTemplate.querySelectorAll(".note .icon-star").forEach(((t,e)=>{e<(this.opinionData?.rating||0)&&t.classList.add("--active")}))}getOpinionElement(){const t=this.hotspotElement.querySelector(".hotspot_opinion")?.content.cloneNode(!0);return!!t&&(this.activeTemplate=t,this.setOpinionValues(t),t)}setOpinion(t,e){if(!e.length)return!1;const s=e[0];this.opinionData=s;const n=this.getOpinionElement(),o=this.hotspotTemplate?.querySelector(`.product[data-id="${t}"] .product__content_wrapper`);return!(!o||!n)&&(o.append(n),!0)}async init(t){const[e,s,n]=t;return this.hotspotData=e,this.hotspotTemplate=s,this.hotspotElement=n,"opinion"===this.hotspotData?.type&&(this.products=this.hotspotData?.products.map((t=>t.id)),await this.getOpinion(),!0)}}app_shop.vars.hotspotCallbacksBeforeAppend.opinion=async(...t)=>{const e=new HotspotOpinionsPlugin;await e.init(t)},document.addEventListener("mouseover",(function(t){let e=t.target.closest(".product__icon");if(e){let t=e.querySelector("picture + picture img");t&&(t.classList.remove("hide","fadeOut-animation"),t.classList.add("fadeIn-animation","show-block"))}})),document.addEventListener("mouseout",(function(t){let e=t.target.closest(".product__icon");if(e){let t=e.querySelector("picture + picture img");t&&(t.classList.remove("fadeIn-animation"),t.classList.add("fadeOut-animation"))}}));
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.