PageSourceSearch

https://www.harrydaposten.se/_next/static/chunks/pages/sok-70e034c1de06175f.js

js harrydaposten.se collected 2026-10-02 13:27:36 UTC 7,092 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8481],{4501:(e,t,a)=>{"use strict";a.d(t,{z:()=>g});var r=a(94513),n=a(94285),s=a(79018),i=a(41066),l=a(60930),o=a(11730);let c=({label:e,value:t,checked:a,handleChange:n})=>(0,r.jsxs)(d,{children:[(0,r.jsx)(u,{type:"radio",role:"radio",value:t,checked:a,onChange:n,tabIndex:0,"aria-checked":a}),e]}),d=o.Ay.label.withConfig({componentId:"sc-90c360a9-0"})(["display:flex;align-items:center;gap:4px;"," cursor:pointer;"],(0,l.I)({fontFamily:"var(--font-family-sans-serif)",fontSize:"1rem",fontWeight:500})),u=o.Ay.input.withConfig({componentId:"sc-90c360a9-1"})(["min-width:20px;min-height:20px;appearance:none;border:2px solid var(--corp-color-darken);border-radius:50%;background-color:transparent;display:inline-block;position:relative;cursor:pointer;&:checked::before{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:10px;height:10px;background-color:var(--corp-color-darken);border-radius:50%;}"]),g=({options:e,direction:t="row",checked:a,handleChange:l})=>{let[o,d]=(0,n.useState)(a),u=e=>{d(e.target.value),l(e)};return(0,r.jsx)(i.BJ,{spacing:s.B.Spacing16,direction:t,children:e.map(({label:e,value:t})=>(0,r.jsx)(c,{label:e,value:t,checked:t===o,handleChange:u},t))})}},14014:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>J});var r=a(94513),n=a(10485),s=a(38255),i=a(10288),l=a(89381),o=a(54020),c=a(5305),d=a(3197),u=a(10413),g=a(93612);let p=e=>fetch(e).then(e=>e.json());var h=a(82945),m=a(94285),x=a(91544),f=a(53327),j=a(57005),b=a(11730),v=a(33104),y=a(34087),w=a(96703),S=a(41528),k=a(59003),I=a(41066),C=a(79018),_=a(60930),A=a(96075),B=a(2089),E=a(37564),N=a(83941),L=a(4501);let P=[{value:g._6.NEWEST,label:"Nyast"},{value:g._6.OLDEST,label:"\xc4ldst"},{value:g._6.RELEVANCE,label:"Relevans"}],R=({value:e,onChange:t})=>(0,r.jsxs)(I.BJ,{direction:"row",spacing:C.B.Spacing16,flexProps:{alignItems:"center"},children:[(0,r.jsx)(D,{children:"Sortera efter:"}),(0,r.jsx)(L.z,{options:P,checked:e,handleChange:e=>{t(e.target.value)}})]}),D=b.Ay.span.withConfig({componentId:"sc-1c4c8bac-0"})(["color:var(--gray-700);",""],(0,_.I)({fontSize:"1rem"})),O=({search:e,items:t,totalHits:a,suggestions:n=[],currentSort:s,onSortChange:i})=>{let l=(0,x.useRouter)(),{isFirstPage:o,isLastPage:c,page:d,setPage:g,resetPage:p}=(0,A.P)({totalCount:a??0,pageSize:u.y}),h=e=>{l.push(`/sok/?q=${encodeURIComponent(e)}`)},f=(0,m.useMemo)(()=>t.map(F),[t]);return t&&void 0!==a?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(I.BJ,{spacing:C.B.Spacing16,children:[e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(I.Lc,{}),(0,r.jsx)(B.r.ResultsTitle,{children:a>0?(0,r.jsxs)(I.BJ,{direction:{mobile:"column",tablet:"row"},spacing:{mobile:C.B.Spacing8,tablet:C.B.Spacing2},flexProps:{mobile:{justifyContent:"space-between"},tablet:{justifyContent:"space-between"}},children:[(0,r.jsxs)("div",{children:["S\xf6kresultat f\xf6r"," ",(0,r.jsx)("span",{className:"results-title","data-testid":"search-article-page_fragment_result",children:e})]}),a>0&&s?(0,r.jsx)(I.BJ,{spacing:C.B.Spacing8,direction:"row",flexProps:{mobile:{justifyContent:"flex-start"},tablet:{justifyContent:"flex-end"}},px:{mobile:C.B.Spacing2,tablet:C.B.Spacing2},children:(0,r.jsx)(R,{value:s,onChange:e=>{i(e),p()},"data-testid":"search-sort-dropdown"})}):null]}):(0,r.jsxs)(r.Fragment,{children:["Din s\xf6kning p\xe5"," ",(0,r.jsx)("span",{className:"results-title","data-testid":"search-article-page_fragment_no-result",children:e})," ","gav inga resultat."," ",n.length>0&&(0,r.jsxs)(r.Fragment,{children:["Menade du:"," ",n.map((e,t)=>(0,r.jsxs)("span",{children:[(0,r.jsx)(T,{onClick:()=>h(e),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),h(e))},tabIndex:0,role:"button","aria-label":`S\xf6k efter ${e}`,"data-testid":`search-suggestion-${t}`,children:e}),t<n.length-1&&(0,r.jsx)("span",{children:", "})]},e)),"?"]})]})})]}):null,f.length>0?(0,r.jsx)(E.A,{articles:f}):null,(0,r.jsx)(I.Lc,{})]}),void 0!==a&&a>u.y&&(0,r.jsx)(N.A,{totalCount:a,currentPage:d,isFirstPage:o,isLastPage:c,setPage:g})]}):null},T=b.Ay.span.withConfig({componentId:"sc-31c68021-0"})(["color:var(--corp-color-primary);cursor:pointer;text-decoration:underline;"," &:hover{color:var(--corp-color-darken);text-decoration:none;}&:focus{outline:2px solid var(--corp-color-primary);outline-offset:2px;border-radius:2px;}"],(0,_.I)({fontWeight:"500"})),F=({...e})=>{let t=e.teaserImage&&!e.teaserImage.includes(".jpg");return{teaserTitle:e.teaserTitle,teaserLead:e.teaserLead,uuid:e.uuid,teaserImage:{image:e.teaserImage,wide:e.teaserImage.replace(".","-WIDE."),regular:e.teaserImage.replace(".","-REGULAR."),square:e.teaserImage.replace(".","-SQUARE.")},canonical:`/${e.uuid}`,publishDate:e.publishDate,bylines:e.bylines.map(e=>({uuid:e.uuid,name:e.name,organisation:"",urlName:e.nameUrl})),categories:e.categories,type:"article",native:e.categories.some(e=>"native"===e.name),teaserImageInfo:t?JSON.stringify({cnpTeaserImageId:e.teaserImage}):void 0}},q=(0,b.Ay)(w.fI).withConfig({componentId:"sc-771ca3df-0"})(["min-height:calc(100vh);"]),$=(0,b.Ay)(s.m).withConfig({componentId:"sc-771ca3df-1"})(["background-color:white;"]),z=(0,b.Ay)(s.m).withConfig({componentId:"sc-771ca3df-2"})(["",""],(0,o.xe)({px:[3,0]})),J=()=>{let e=(0,h.R)(),t=e.get("q")??"",{currentSort:a,handleSortChange:s}=(()=>{let e=(0,x.useRouter)(),[t,a]=(0,f.ZA)("sort",(0,f.Oq)(Object.values(g._6)).withDefault(g.MZ).withOptions({shallow:!1,clearOnDefault:!1,scroll:!1}));return(0,m.useEffect)(()=>{let t=e.query?.sort;void 0===t||(0,g.wL)(t)||a(g.MZ)},[e.query?.sort,a]),{currentSort:t,handleSortChange:(0,m.useCallback)(e=>{a(e)},[a])}})(),{isLoading:o,items:b,totalHits:w,suggestions:I}=(e=>{let t=e.get("q"),a=new URLSearchParams(e);a.set("size",u.y.toString()),a.has("sort")&&(0,g.wL)(a.get("sort")??"")||a.set("sort",g.MZ);let r=`/api/queryArticle/search?${a.toString()}`,{data:n,error:s,isValidating:i}=(0,d.Ay)(t?r:null,p,{revalidateOnFocus:!1,revalidateOnReconnect:!1});return{isLoading:(!n&&!s||i)&&!!t,items:n?.articles??[],suggestions:n?.suggestions??[],totalHits:n?.totalHits}})(e),C=(0,j.Pj)(),{isMobile:_,screenSizesResolved:A}=(0,c.al)(),B=t?`S\xf6kresultat f\xf6r "${t}" | ${C.getFullTitleName()}`:`S\xf6k | ${C.getFullTitleName()}`,E={title:B,description:B,image:C.getLogoUrl()};return(0,r.jsxs)(k.P,{fluid:_,children:[(0,r.jsx)(S.A,{titleMetaData:E,openGraphData:E,pageTitle:"S\xf6k"}),(0,r.jsxs)(q,{withOutsider:!0,children:[A?_?(0,r.jsxs)($,{children:[(0,r.jsx)(i.h,{value:l.B.Spacing16}),(0,r.jsx)(y.B,{value:t}),(0,r.jsx)(i.h,{value:l.B.Spacing16})]}):(0,r.jsx)(v.A,{"data-testid":"landingpage_panorama"}):null,!o||b.length?(0,r.jsx)(z,{children:(0,r.jsx)(O,{totalHits:w,search:t,items:b,suggestions:I,currentSort:a,onSortChange:s})}):(0,r.jsx)(n.r,{children:(0,r.jsx)(n.y,{role:"alert","aria-busy":"true"})})]})]})}},49378:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/sok",function(){return a(14014)}])}},e=>{e.O(0,[1985,5599,1960,1633,2665,4973,640,3327,7318,1482,3864,4314,2463,4440,2113,636,6593,8792],()=>e(e.s=49378)),_N_E=e.O()}]);

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.