PageSourceSearch

https://baza-oze.pl/_next/static/chunks/9e550e1a4fee1da3.js

js baza-oze.pl collected 2026-10-06 13:15:17 UTC 3,339 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,80983,e=>{"use strict";var t=e.i(87012),r=e.i(75522);function n({children:e,className:n,id:s}){let i=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let e=()=>{if(!i.current)return;let e=i.current;if(window.innerWidth<992){e.style.top="";return}let t=e.offsetHeight,r=window.innerHeight;t>r-100?e.style.top=`${r-t-20}px`:e.style.top="100px"};e(),window.addEventListener("resize",e);let t=i.current?.querySelectorAll("img");return t?.forEach(t=>{t.complete||t.addEventListener("load",e)}),()=>{window.removeEventListener("resize",e)}},[]),(0,t.jsx)("div",{ref:i,className:n,id:s,children:e})}e.s(["default",()=>n])},99677,e=>{"use strict";var t=e.i(87012),r=e.i(75522),n=e.i(8164),s=e.i(20956);function i(e){return e.replace(/<[^>]*>/g," ").replace(/&[^;]+;/g," ").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim()}function a(e,t){if(!t.trim())return[];let r=i(t).split(" ").filter(e=>e.length>1);return 0===r.length?[]:e.map(e=>{let t=i(e.title),n=i(e.excerpt||""),s=e.categories?.map(e=>i(`${e.name||""} ${e.slug}`)).join(" ")||"",a=0;for(let e of r)t.includes(e)&&(a+=10,t.split(" ").includes(e)&&(a+=5)),n.includes(e)&&(a+=2),s.includes(e)&&(a+=4);return{article:e,score:a}}).filter(({score:e})=>e>0).sort((e,t)=>t.score-e.score).map(({article:e})=>e)}async function l(e){let t=await fetch(`/api/search?q=${encodeURIComponent(e)}`);
1if(!t.ok)throw Error(`Search failed: ${t.status}`);let r=await t.json();return Array.isArray(r.results)?r.results:[]}function c({articles:e=[]}){let[i,c]=(0,r.useState)(!1),[u,o]=(0,r.useState)(""),[d,p]=(0,r.useState)([]),[h,f]=(0,r.useState)(!1),m=async t=>{f(!0);try{let r=e.length>0?a(e,t):await l(t);p(r)}catch(e){console.error("Search error:",e),p([])}finally{f(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"aside-widget",children:[(0,t.jsx)("div",{className:"section-title",children:(0,t.jsx)("p",{id:"panel",children:"Szukaj"})}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),u.trim()&&(c(!0),m(u.trim()))},children:[(0,t.jsx)("input",{required:!0,placeholder:"Znajdź artykuł",value:u,onChange:e=>o(e.target.value),id:"search-bar"}),(0,t.jsx)("button",{type:"submit",id:"search-btn","aria-label":"Szukaj",children:(0,t.jsx)(n.IconSearch,{})})]})]}),(0,t.jsx)(s.default,{isOpen:i,onClose:()=>{c(!1),p([])},searchQuery:u,onSearchQueryChange:o,onSearch:m,searchResults:d,isSearching:h})]})}e.s(["default",()=>c,"normalizeText",()=>i,"searchArticles",()=>a])},17138,(e,t,r)=>{t.exports=e.r(7919)},76688,e=>{"use strict";var t=e.i(87012),r=e.i(75522),n=e.i(17138);let s="schema-org-json-ld";function i({data:e}){let i=(0,r.useId)(),a=(0,r.useRef)(!1),l=JSON.stringify(e).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026");return(0,n.useServerInsertedHTML)(()=>a.current?null:(a.current=!0,(0,t.jsx)("script",{id:s,type:"application/ld+json",dangerouslySetInnerHTML:{__html:l}}))),(0,r.useEffect)(()=>{let e=document.head.querySelector(`#${s}`);return e||((e=document.createElement("script")).id=s,e.type="application/ld+json",document.head.appendChild(e)),e.dataset.structuredDataOwner=i,e.textContent=l,()=>{e?.dataset.structuredDataOwner===i&&e.remove()}},[i,l]),null}e.s(["default",()=>i])}]);

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.