PageSourceSearch

https://www.werkstatt-verlag.de/_next/static/chunks/StructureModellSearch.b557b88d7bc60427.js

js werkstatt-verlag.de collected 2026-09-24 22:39:12 UTC 4,417 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3267],{5041:(e,r,t)=>{t.r(r),t.d(r,{ModellSearch:()=>f});var a=t(6029),s=t(55729),n=t(683),i=t(13301),l=t(19844),c=t(49037),o=t.n(c),d=t(93158),u=t(67756),h=t(89557),m=t(5700),p=t(91694),b=t(21202);let f=({placeholder:e,brand:r,onSearch:t,initialValue:c=""})=>{let f=(0,m.c)("common"),g=(0,p.Ym)(),[v,w]=(0,s.useState)(c||""),y=(0,d.A)(v,300),[x,k]=(0,s.useState)(!1),$=(0,s.useRef)(null);(0,s.useEffect)(()=>{(0,u.trackPiwikEvent)("Modelldetailsuche","visible","view"),(0,h.Sc)("view",{type:"modellsearch",name:"visible",action:"view"})},[]),(0,s.useEffect)(()=>{w(c||"")},[c]);let{isLoading:N,error:M,data:E,refetch:_,isFetching:j}=(0,i.I)(["structure/modellsearch",y,r],async()=>{let e=`/api/loader/?${new URLSearchParams({portal:(0,n.getActive)()?.id,block:"Structure/ModellSearch",variables:JSON.stringify({queryName:y,brand:r,__loaderFinished:!0})})}`,t=await fetch(e);return await t.json()||{}},{enabled:""!==y.trim(),refetchOnMount:!1,refetchOnWindowFocus:!1,keepPreviousData:!1});return(0,a.jsxs)("div",{className:"relative w-full",children:[(0,a.jsxs)("div",{className:"relative flex",children:[(0,a.jsx)("input",{ref:$,type:"text",value:v,onChange:e=>w(e.target.value),onFocus:()=>k(!0),onKeyDown:e=>{"Enter"===e.key&&v.trim()&&t&&(e.preventDefault(),k(!1),(0,u.trackPiwikEvent)("Modelldetailsuche",v.trim(),"search"),(0,h.Qd)("search"),(0,h.Mx)("searchType","modell:search"),(0,h.Mx)("searchTerm",v.trim()),t(v.trim()))},placeholder:e,className:"w-full rounded-none border border-gray-600 bg-white px-4 py-2 text-base focus:border-gray-500 focus:outline-none focus:ring focus:ring-gray-200"}),t&&(0,a.jsx)("button",{type:"button",onClick:()=>{v.trim()&&t&&(k(!1),(0,u.trackPiwikEvent)("Modelldetailsuche",v.trim(),"click"),(0,h.Qd)("search"),(0,h.Mx)("searchType","modell:submit"),(0,h.Mx)("searchTerm",v.trim()),t(v.trim()))},className:"border border-l-0 border-gray-600 bg-skin-primary px-4 py-2 text-base text-white hover:opacity-90",children:f("SEARCH_TITLE")})]}),x&&E?.entries?.data?.length>0&&(0,a.jsx)("div",{className:"absolute z-50 mt-1 max-h-[300px] w-full overflow-y-auto rounded-md border border-gray-200 bg-white shadow-md",children:(0,a.jsx)("ul",{children:E.entries.data.map(e=>(0,a.jsx)(l.default,{href:(0,b.getModelUrl)(g,o()(e._search?.brand?.name?.toLowerCase?.()),`${o()(e?.name)}-${e._id}`),target:"_blank",children:(0,a.jsxs)("li",{className:"cursor-pointer border-b border-gray-100 px-3 py-2 text-sm hover:bg-gray-50",onClick:()=>{k(!1),(0,u.trackPiwikEvent)("Modelldetailsuche",`${e?._search?.brand?.name} ${e?.name}`,"click"),(0,h.Qd)("search"),(0,h.Mx)("searchType","modell:autocomplete"),(0,h.Mx)("searchTerm",`${e?._search?.brand?.name} ${e?.name}`)},children:[e?._search?.brand?.name," ",e?.name]})},e?._id))})}),x&&(0,a.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>k(!1)})]})}},21202:e=>{let r={de:{brands:"marken",brand:"marke",model:"modell",testsAndNews:"tests-und-neuheiten",topic:"thema",editorial:"redaktion",preview:"vorschau",search:"suche",proCycling:"profi-radsport",races:"rennen",stage:"etappe",riders:"fahrer"},en:{brands:"brands",brand:"brand",model:"model",testsAndNews:"tests-and-news",topic:"topic",editorial:"editorial",preview:"preview",search:"search",proCycling:"professional-cycling",races:"races",stage:"stage",riders:"riders"},fr:{brands:"marques",brand:"marque",model:"modele",testsAndNews:"tests-et-nouveautes",topic:"sujet",editorial:"redaction",preview:"apercu",search:"recherche",proCycling:"professionnel-cyclisme",races:"courses",stage:"etape",riders:"coureurs"}};function t(e,t){return r[e]?.[t]||r.de[t]}e.exports={ROUTE_SEGMENTS:r,getLocalePath:t,getBrandUrl:function(e,r){return`/${t(e,"brands")}/${r}`},getModelUrl:function(e,r,a){return`/${t(e,"brands")}/${r}/${t(e,"model")}/${a}`},getBrandTestsUrl:function(e,r){return`/${t(e,"brands")}/${r}/${t(e,"testsAndNews")}`},convertPathLocale:function(e,t,a){if(!e||t===a)return e;let s=r[t]||r.de,n=r[a]||r.de,i=e;return Object.keys(s).sort((e,r)=>s[r].length-s[e].length).forEach(e=>{s[e]!==n[e]&&(i=i.replace(RegExp(`(^|/)${s[e]}(/|$)`,"g"),`$1${n[e]}$2`))}),i}}},93158:(e,r,t)=>{t.d(r,{A:()=>s});var a=t(55729);function s(e,r,t=!1){let[n,i]=(0,a.useState)(e);return(0,a.useEffect)(()=>
1{if(t&&JSON.stringify(e)===JSON.stringify(n))return;let a=setTimeout(()=>{i(e)},r);return()=>{clearTimeout(a)}},[e]),n}}}]);

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.