PageSourceSearch

https://www.prisjakt.no/_next/static/chunks/0k-8tyuka5yzz.js?dpl=no_8cc0f584

js prisjakt.no collected 2026-10-02 06:24:11 UTC 94,880 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="26aa79bc-8ab8-0cac-69fa-55b5a214beaa")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,863741,e=>{"use strict";var t=e.i(682881),r=e.i(882432);e.s(["formatScaledPrice",0,function({scaledAmount:e,currency:a}){return(0,t.getCurrencyString)((0,r.unscaled)(e),a)}])},766255,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(674215),i=e.i(722388),n=e.i(596909),l=e.i(890184),s=e.i(479967),o=e.i(684973),c=e.i(504877),d=e.i(451915),u=e.i(907796);e.i(637094);var m=e.i(534237),p=e.i(615379),f=e.i(291911);function h(e){return!e}e.s(["CompareInsightCard",0,function(e){let x,v,y,g,S,_,b,j,w,N,k,I,T,C,P,R,L,M,O,A,E=(0,r.c)(41),{comparison:D,baseImageUrl:z,comparedImageUrl:B}=e,[F,q]=(0,f.useState)(!1);E[0]!==D.compared_product.id?(x=m.linkTo.product(D.compared_product.id),E[0]=D.compared_product.id,E[1]=x):x=E[1];let H=x;E[2]!==D.base_product.id||E[3]!==D.compared_product.id?(v=m.linkTo.compareProducts([D.base_product.id,D.compared_product.id]),E[2]=D.base_product.id,E[3]=D.compared_product.id,E[4]=v):v=E[4];let V=v;E[5]===Symbol.for("react.memo_cache_sentinel")?(y=()=>q(h),E[5]=y):y=E[5];let U=y;E[6]!==z||E[7]!==D.base_product.name?(g=(0,t.jsx)(a.ProductImage,{src:z,alt:D.base_product.name,size:"small",sizeClassNames:"size-[100px]",width:100,height:100,"data-sentry-element":"ProductImage","data-sentry-source-file":"compare-insight-card.tsx"}),E[6]=z,E[7]=D.base_product.name,E[8]=g):g=E[8],E[9]===Symbol.for("react.memo_cache_sentinel")?(S=(0,t.jsx)("div",{className:"bg-surface-background flex size-250 items-center justify-center rounded-full",children:(0,t.jsx)(o.Text,{variant:"BodySmall","data-sentry-element":"Text","data-sentry-source-file":"compare-insight-card.tsx",children:"vs."})}),E[9]=S):S=E[9],E[10]!==B||E[11]!==D.compared_product.name?(_=(0,t.jsx)(a.ProductImage,{src:B,alt:D.compared_product.name,size:"small",sizeClassNames:"size-[100px]",width:100,height:100,"data-sentry-element":"ProductImage","data-sentry-source-file":"compare-insight-card.tsx"}),E[10]=B,E[11]=D.compared_product.name,E[12]=_):_=E[12],E[13]!==g||E[14]!==_?(b=(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-100",children:[g,S,_]}),E[13]=g,E[14]=_,E[15]=b):b=E[15],E[16]===Symbol.for("react.memo_cache_sentinel")?(j=((e={})=>(d.experimentalStaticLocale??e.locale??(0,d.getLocale)(),"I sammenligning med"))(),E[16]=j):j=E[16],E[17]===Symbol.for("react.memo_cache_sentinel")?(w={scope:u.InternalNavigationScope.COMPARE_INSIGHT_CARD},E[17]=w):w=E[17],E[18]!==H||E[19]!==D.compared_product.name?(N=(0,t.jsxs)(o.Text,{variant:"H4",className:"line-clamp-2","data-sentry-element":"Text","data-sentry-source-file":"compare-insight-card.tsx",children:[j," ",(0,t.jsx)(s.TextLinkWithTracking,{href:H,tracking:w,"data-sentry-element":"TextLinkWithTracking","data-sentry-source-file":"compare-insight-card.tsx",children:D.compared_product.name})]}),E[18]=H,E[19]=D.compared_product.name,E[20]=N):N=E[20];let K=!F&&"line-clamp-4 overflow-hidden";return E[21]!==K?(k=(0,p.default)("cursor-pointer",K),E[21]=K,E[22]=k):k=E[22],E[23]!==D.comparison.summary?(I=(0,t.jsx)(o.Text,{variant:"BodySmall","data-sentry-element":"Text","data-sentry-source-file":"compare-insight-card.tsx",children:D.comparison.summary}),E[23]=D.comparison.summary,E[24]=I):I=E[24],E[25]!==k||E[26]!==I?(T=(0,t.jsx)("div",{className:k,onClick:U,children:I}),E[25]=k,E[26]=I,E[27]=T):T=E[27],E[28]===Symbol.for("react.memo_cache_sentinel")?(C=(0,t.jsx)(n.IconInfoOutlined,{className:"size-75 shrink-0","data-sentry-element":"IconInfoOutlined","data-sentry-source-file":"compare-insight-card.tsx"}),E[28]=C):C=E[28],E[29]===Symbol.for("react.memo_cache_sentinel")?(P=(0,t.jsxs)("div",{className:"text-text-secondary mt-100 flex items-center gap-50",children:[C,(0,t.jsx)(o.Text,{variant:"CaptionStrong","data-sentry-element":"Text","data-sentry-source-file":"compare-insight-card.tsx",children:((e={})=>
2(d.experimentalStaticLocale??e.locale??(0,d.getLocale)(),"Sammenligningen er gjort med støtte fra AI-verktøy."))()})]}),E[29]=P):P=E[29],E[30]!==N||E[31]!==T?(R=(0,t.jsxs)("div",{className:"flex grow flex-col gap-75",children:[N,T,P]}),E[30]=N,E[31]=T,E[32]=R):R=E[32],E[33]===Symbol.for("react.memo_cache_sentinel")?(L={scope:u.InternalNavigationScope.COMPARE_INSIGHT_CARD},E[33]=L):L=E[33],E[34]===Symbol.for("react.memo_cache_sentinel")?(M=(0,c.product__product_compare_compare_products)(),E[34]=M):M=E[34],E[35]!==V?(O=(0,t.jsx)("div",{className:"w-full xl:w-auto xl:shrink-0",children:(0,t.jsx)(l.ButtonLinkWithTracking,{variant:"tonal",href:V,className:"w-full",icon:"compare",tracking:L,"data-sentry-element":"ButtonLinkWithTracking","data-sentry-source-file":"compare-insight-card.tsx",children:M})}),E[35]=V,E[36]=O):O=E[36],E[37]!==R||E[38]!==O||E[39]!==b?(A=(0,t.jsxs)(i.Card,{padding:"large",className:"flex w-full flex-col items-center gap-125 xl:flex-row","data-sentry-element":"Card","data-sentry-component":"CompareInsightCard","data-sentry-source-file":"compare-insight-card.tsx",children:[b,R,O]}),E[37]=R,E[38]=O,E[39]=b,E[40]=A):A=E[40],A}],766255)},116239,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(194313);e.i(43784);var i=e.i(35830),n=e.i(701143);function l(e){let l,s,o,c=(0,r.c)(8),{adId:d,offerRow:u,variantLabel:m}=e;return c[0]!==d?(l=()=>(0,n.sendJsonBeacon)("/api/sponsored-content/offer-impression",{adId:d,pageUrl:window.location.href}),c[0]=d,c[1]=l):l=c[1],c[2]!==u||c[3]!==m?(s=(0,t.jsx)(i.SponsoredOfferListItem,{offerRow:u,variantLabel:m,"data-sentry-element":"SponsoredOfferListItem","data-sentry-source-file":"sponsored-offer-card.tsx"}),c[2]=u,c[3]=m,c[4]=s):s=c[4],c[5]!==l||c[6]!==s?(o=(0,t.jsx)(a.AdImpression,{onImpression:l,className:"my-75 md:my-100","data-test":"SponsoredOfferCard","data-sentry-element":"AdImpression","data-sentry-component":"SponsoredOfferCard","data-sentry-source-file":"sponsored-offer-card.tsx",children:s}),c[5]=l,c[6]=s,c[7]=o):o=c[7],o}var s=e.i(316375),o=e.i(299452);async function c(e){try{let t=await fetch(e);return t.ok?await t.json():null}catch{return null}}var d=e.i(902899);function u(e){return{...e,priceValidUntil:e.priceValidUntil&&new Date(e.priceValidUntil),availabilityDate:e.availabilityDate&&new Date(e.availabilityDate)}}var m=e.i(75303);e.s(["SponsoredOfferSlot",0,function(e){var a;let i,n,p,f,h,x,v,y,g,S,_=(0,r.c)(21),{productId:b,variantLabels:j}=e,{offerRows:w}=(0,d.useFilter)(),N=((S=(0,r.c)(7))[0]!==b?(v=s.queryKeys.sponsoredContent.offer(b),S[0]=b,S[1]=v):v=S[1],S[2]!==b?(y=()=>c(`/api/sponsored-content/offer/${b}`),S[2]=b,S[3]=y):y=S[3],S[4]!==v||S[5]!==y?(g={queryKey:v,queryFn:y,staleTime:1/0,gcTime:0,retry:!1},S[4]=v,S[5]=y,S[6]=g):g=S[6],(0,o.useQuery)(g)).data??void 0;_[0]!==(null==N?void 0:N.shopId)||_[1]!==(null==N?void 0:N.shopOfferId)?(i=e=>e.shopId===(null==N?void 0:N.shopId)&&e.shopOfferId===(null==N?void 0:N.shopOfferId),_[0]=null==N?void 0:N.shopId,_[1]=null==N?void 0:N.shopOfferId,_[2]=i):i=_[2];let k=i;_[3]!==N||_[4]!==k||_[5]!==w?(n=N&&w.find(k),_[3]=N,_[4]=k,_[5]=w,_[6]=n):n=_[6];let I=n,T=(a=N&&!I?b:void 0,(0,o.useQuery)({queryKey:s.queryKeys.offerList.root(a),queryFn:async()=>{try{let e=await fetch(`/api/offer-list/${a}`);return(e.ok?await e.json():[]).map(u)}catch{return[]}},enabled:void 0!==a})).data;_[7]!==T||_[8]!==k||_[9]!==I?(p=I??(null==T?void 0:T.find(k)),_[7]=T,_[8]=k,_[9]=I,_[10]=p):p=_[10];let C=p;if(!N||!(null==C?void 0:C.isFeatured))return null;let P=N.adId;_[11]!==N.adId||_[12]!==C.clickoutUrl?(f=(0,m.toSponsoredOfferUrl)(C.clickoutUrl,N.adId),_[11]=N.adId,_[12]=C.clickoutUrl,_[13]=f):f=_[13],_[14]!==C||_[15]!==f?(h={...C,clickoutUrl:f},_[14]=C,_[15]=f,_[16]=h):h=_[16];let R=void 0===C.variantId?void 0:j[C.variantId];return _[17]!==N.adId||_[18]!==h||_[19]!==R?(x=(0,t.jsx)(l,{adId:P,offerRow:h,variantLabel:R,"data-sentry-element":"SponsoredOfferCard","data-sentry-component":"SponsoredOfferSlot","data-sentry-source-file":"sponsored-offer-slot.tsx"}),_[17]=N.adId,_[18]=h,_[19]=R,_[20]=x):x=_[20],x}],116239)},274099,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(863741),i=e.i(674215),n=e.i(588660),l=e.i(890184),s=e.i(684973),o=e.i(605990),c=e.i(451915),d=e.i(907796),u=e.i(615379),m=e.i(291911),p=e.i(929614);let f={scope:d.InternalNavigationScope.PRODUCT_STICKY_BAR};e.s(["StickyBottomBar",0,function(e){let d,h,x,v,y,g,S,_,b,j,w,N,k,I,T=(0,r.c)(29),{productTitle:C,productImage:P,productPrice:R}
2=e,[L,M]=(0,m.useState)(!1),[O,A]=(0,m.useState)(!1);if(T[0]!==O?(d=()=>{let e=()=>{let e=document.documentElement.scrollHeight,t=document.documentElement.scrollTop,r=document.documentElement.clientHeight;M(O&&!(t+r>=e-10))};return window.addEventListener("scroll",e,{passive:!0}),e(),()=>window.removeEventListener("scroll",e)},h=[O],T[0]=O,T[1]=d,T[2]=h):(d=T[1],h=T[2]),(0,m.useEffect)(d,h),!R)return;T[3]!==R?(x=(0,a.formatScaledPrice)(R),T[3]=R,T[4]=x):x=T[4];let E=x;T[5]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsx)(p.InView,{as:"div",threshold:0,onChange:(e,t)=>{A(!e&&t.boundingClientRect.top<0)},"data-sentry-element":"InView","data-sentry-source-file":"index.tsx"}),T[5]=v):v=T[5];let D=!L,z=!L,B=L?"translate-y-0":"translate-y-full";return T[6]!==B?(y=(0,u.clsx)("fixed inset-x-0 bottom-0 isolate z-30 transition-transform duration-500 ease-out md:inset-x-[anchor(--page-content_inside)]",B),T[6]=B,T[7]=y):y=T[7],T[8]!==P?(g=(0,t.jsx)(i.ProductImage,{size:"small",src:P,sizeClassNames:"aspect-square size-250",loading:"eager","data-sentry-element":"ProductImage","data-sentry-source-file":"index.tsx"}),T[8]=P,T[9]=g):g=T[9],T[10]!==C?(S=(0,t.jsx)(s.Text,{maxNumLines:"line-clamp-1",variant:"TitleSmall",className:"text-text-secondary mr-50","data-sentry-element":"Text","data-sentry-source-file":"index.tsx",children:C}),T[10]=C,T[11]=S):S=T[11],T[12]===Symbol.for("react.memo_cache_sentinel")?(_=(0,o.product__price_from_abbr)(),T[12]=_):_=T[12],T[13]!==E?(b=(0,t.jsxs)(s.Text,{variant:"TitleSmall",className:"text-text-secondary","data-sentry-element":"Text","data-sentry-source-file":"index.tsx",children:[_," ",(0,t.jsx)("b",{children:E})]}),T[13]=E,T[14]=b):b=T[14],T[15]!==S||T[16]!==b?(j=(0,t.jsxs)("div",{className:"ml-50",children:[S,b]}),T[15]=S,T[16]=b,T[17]=j):j=T[17],T[18]!==j||T[19]!==g?(w=(0,t.jsxs)("div",{className:"flex items-center",children:[g,j]}),T[18]=j,T[19]=g,T[20]=w):w=T[20],T[21]===Symbol.for("react.memo_cache_sentinel")?(N=(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)(l.ButtonLinkWithTracking,{variant:"secondary",href:`#${n.Anchors.OFFERS}`,openInNewTab:!1,className:"w-full",tracking:f,maxNumLines:"line-clamp-1","data-sentry-element":"ButtonLinkWithTracking","data-sentry-source-file":"index.tsx",children:((e={})=>(c.experimentalStaticLocale??e.locale??(0,c.getLocale)(),"Sammenlign alle priser"))()})}),T[21]=N):N=T[21],T[22]!==w?(k=(0,t.jsx)("div",{className:"max-w-page-content rounded-t-75 border-border-card-outline bg-surface-background-lighter shadow-high h-[5rem] w-full border border-solid px-100 py-100",children:(0,t.jsxs)("div",{className:"flex h-full items-center justify-between",children:[w,N]})}),T[22]=w,T[23]=k):k=T[23],T[24]!==k||T[25]!==D||T[26]!==z||T[27]!==y?(I=(0,t.jsxs)(t.Fragment,{children:[v,(0,t.jsx)("div",{inert:D,"aria-hidden":z,className:y,children:k})]}),T[24]=k,T[25]=D,T[26]=z,T[27]=y,T[28]=I):I=T[28],I}],274099)},613339,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(842561),i=e.i(522115),n=e.i(684973),l=e.i(316375),s=e.i(493831),o=e.i(299452);let c=async e=>{let{productId:t,timeRange:r,shopIds:a,variantIds:i}=e;try{let e=await fetch("/api/price-history",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productId:t,timeRange:r,shopIds:a||[],variantIds:i||[]})});if(!e.ok)throw Error(`Failed to fetch price history for product ${t}: ${e.statusText}`);return e.json()}catch(e){throw(0,s.captureException)(e),e}};var d=e.i(854880);let u=(0,e.i(437749).default)(()=>e.A(575282).then(e=>e.PriceHistoryChart),{loadableGenerated:{modules:[786135]},loading:()=>(0,t.jsx)(m,{}),ssr:!1}),m=()=>{let e,a=(0,r.c)(1);return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-white/50","data-sentry-component":"PriceHistoryChartSpinner","data-sentry-source-file":"price-history-chart-container.tsx",children:(0,t.jsx)(i.Spinner,{size:40,isActive:!0,"data-sentry-element":"Spinner","data-sentry-source-file":"price-history-chart-container.tsx"})}),a[0]=e):e=a[0],e};function p(e){return e.active}e.s(["PriceHistoryChartContainer",0,function(e){let s,f,h,x,v,y,g,S,_=(0,r.c)(24),{productId:b,variantIds:j,legendLabel:w,marketConfig:N,importantDates:k,initialData:I,initialTimeRange:T}=e,{timeRange:C,selectedShopIds:P,showSalePeriods:R}=(0,a.usePriceHistoryContext)();_[0]!==b||_[1]!==P||_[2]!==C||_[3]!==j?(s={productId:b,timeRange:C,shopIds:P,variantIds:j},_[0]=b,_[1]=P,_[2]=C,_[3]=j,_[4]=s):s=_[4];let L=C===T&&0===P.length?I:void 0;_[5]!==L?(f={initialData:L},_[5]=L,_[6]=f):f=_[6];let{data:M,isFetching:O,error:A}=function(e,t){let a,i,n,s=(0,r.c)(15),{productId:d,timeRange:u,shopIds:m,variantIds:p}=e;s[0]!==d||s[1]!==m||s[2]!==u||s[3]!==p?(a=l.queryKeys.product.priceHistory(d,{timeRange:u,shopIds:m,variantIds:p}),s[0]=d,s[1]=m,s[2]=u,s[3]=p,s[4]=a):a=s[4],s[5]!==d||s[6]!==m||s[7]!==u||s[8]!==p?(i=()=>c({productId:d,timeRange:u,shopIds:m,variantIds:p}),s[5]=d,s[6]=m,s[7]=u,s[8]=p,s[9]=i):i=s[9];let f=(null==t?void 0:t.enabled)??!!d,h=null==t?void 0:t.initialData;return s[10]!==a||s[11]!==i||s[12]!==f||s[13]!==h?(n={queryKey:a,queryFn:i,enabled:f,retry:2,staleTime:3e5,initialData:h},s[10]=a,s[11]=i,s[12]=f,s[13]=h,s[14]=n):n=s[14],(0,o.useQuery)(n)}(s,f);
2if(_[7]!==M||_[8]!==k||_[9]!==w||_[10]!==N||_[11]!==R){v=Symbol.for("react.early_return_sentinel");e:{let e=R?k:[];if(!(h=M?{historyItems:M.priceHistory.historyItems??[],marketConfig:N,shops:M.selectedShops,importantDates:e,legendLabel:w}:null)){let e;_[15]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,t.jsx)(i.Spinner,{size:40,isActive:!0})}),_[15]=e):e=_[15],v=e;break e}x=h.historyItems.some(p)}_[7]=M,_[8]=k,_[9]=w,_[10]=N,_[11]=R,_[12]=h,_[13]=x,_[14]=v}else h=_[12],x=_[13],v=_[14];if(v!==Symbol.for("react.early_return_sentinel"))return v;let E=!x;if(A||E){let e;return _[16]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,t.jsx)(n.Text,{variant:"BodySmall",className:"text-text-tertiary",children:(0,d.product__price_history_no_data)()})}),_[16]=e):e=_[16],e}return _[17]!==O?(y=O&&(0,t.jsx)(m,{}),_[17]=O,_[18]=y):y=_[18],_[19]!==h?(g=(0,t.jsx)(u,{...h,"data-sentry-element":"PriceHistoryChartImplementation","data-sentry-source-file":"price-history-chart-container.tsx"}),_[19]=h,_[20]=g):g=_[20],_[21]!==y||_[22]!==g?(S=(0,t.jsxs)("div",{className:"relative h-full w-full","data-sentry-component":"PriceHistoryChartContainer","data-sentry-source-file":"price-history-chart-container.tsx",children:[y,g]}),_[21]=y,_[22]=g,_[23]=S):S=_[23],S}],613339)},336453,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(842561),i=e.i(445680),n=e.i(67437),l=e.i(451915);let s=(e={},t={})=>(l.experimentalStaticLocale??t.locale??(0,l.getLocale)(),"Vis salgsperioder");e.s(["SalePeriodToggle",0,function(){let e,l,o,c=(0,r.c)(6),{showSalePeriods:d,setShowSalePeriods:u}=(0,a.usePriceHistoryContext)();c[0]!==u?(e=e=>{let t=s();(0,i.trackToggleShowSalePeriods)(e,t),u(e)},c[0]=u,c[1]=e):e=c[1];let m=e;return c[2]===Symbol.for("react.memo_cache_sentinel")?(l=s(),c[2]=l):l=c[2],c[3]!==m||c[4]!==d?(o=(0,t.jsx)("div",{className:"text-s","data-sentry-component":"SalePeriodToggle","data-sentry-source-file":"sale-period-toggle.tsx",children:(0,t.jsx)(n.Switch,{id:"sale-period-toggle",checked:d,onCheckedChange:m,label:l,"data-sentry-element":"Switch","data-sentry-source-file":"sale-period-toggle.tsx"})}),c[3]=m,c[4]=d,c[5]=o):o=c[5],o}],336453)},327781,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(842561),i=e.i(445680),n=e.i(856360),l=e.i(889223),s=e.i(451915);function o(e){let a,o,p,f,h,x,v,y,g,S=(0,r.c)(29),{shops:_,selectedShopIds:b,onToggleShop:j,onClearAll:w}=e;S[0]!==_?(a=new Map(_.map(u)),S[0]=_,S[1]=a):a=S[1];let N=a;S[2]!==b?(o=(0,n.createShopColorMap)(b),S[2]=b,S[3]=o):o=S[3];let k=o;if(S[4]!==k||S[5]!==b||S[6]!==N){let e;S[8]!==k||S[9]!==N?(e=(e,t)=>{let r=N.get(e);return r?{shop:r,color:k.get(e)??(0,n.getShopColor)(t)}:null},S[8]=k,S[9]=N,S[10]=e):e=S[10],p=b.map(e).filter(d),S[4]=k,S[5]=b,S[6]=N,S[7]=p}else p=S[7];let I=p;S[11]!==j||S[12]!==N?(f=e=>{let t=N.get(e);t&&(0,i.trackShopRemove)(t.name,"applied-filter"),j(e)},S[11]=j,S[12]=N,S[13]=f):f=S[13];let T=f;S[14]!==w||S[15]!==b||S[16]!==N?(h=()=>{let e=b.map(e=>{var t;return null==(t=N.get(e))?void 0:t.name}).filter(c);e.length>0&&(0,i.trackClearAllShops)(e),w()},S[14]=w,S[15]=b,S[16]=N,S[17]=h):h=S[17];let C=h;if(0===I.length)return null;if(S[18]!==T||S[19]!==I){let e;S[21]!==T?(e=e=>{let{shop:r,color:a}=e;return(0,t.jsx)(m,{shopName:r.name,color:a,onRemove:()=>T(r.id)},r.id)},S[21]=T,S[22]=e):e=S[22],x=I.map(e),S[18]=T,S[19]=I,S[20]=x}else x=S[20];return S[23]===Symbol.for("react.memo_cache_sentinel")?(v=((e={})=>(s.experimentalStaticLocale??e.locale??(0,s.getLocale)(),"Tøm"))(),S[23]=v):v=S[23],S[24]!==C?(y=(0,t.jsx)(l.Button,{variant:"transparent",size:"small",onClick:C,"data-sentry-element":"Button","data-sentry-source-file":"selected-shops.tsx",children:v}),S[24]=C,S[25]=y):y=S[25],S[26]!==x||S[27]!==y?(g=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-50","data-sentry-component":"SelectedShops","data-sentry-source-file":"selected-shops.tsx",children:[x,y]}),S[26]=x,S[27]=y,S[28]=g):g=S[28],g}function c(e){return void 0!==e}function d(e){return null!==e}function u(e){return[e.id,e]}function m(e){let a,i,n,s,o=(0,r.c)(11),{shopName:c,color:d,onRemove:u}=e,m=`Remove ${c}`;return o[0]!==d?(a=(0,t.jsx)("div",{className:"h-75 w-75 rounded-full",style:{backgroundColor:d}}),o[0]=d,o[1]=a):a=o[1],o[2]!==c?(i=(0,t.jsx)("span",{children:c}),o[2]=c,o[3]=i):i=o[3],o[4]!==a||o[5]!==i?(n=(0,t.jsxs)("div",{className:"flex items-center gap-50",children:[a,i]}),o[4]=a,o[5]=i,o[6]=n):n=o[6],o[7]!==u||o[8]!==m||o[9]!==n?(s=(0,t.jsx)(l.Button,{variant:"tonal",size:"small",onClick:u,"aria-label":m,icon:"close",iconPlacement:"end","data-sentry-element":"Button","data-sentry-component":"SelectedShopBadge","data-sentry-source-file":"selected-shops.tsx",children:n}),o[7]=u,o[8]=m,o[9]=n,o[10]=s):s=o[10],s}
2e.s(["SelectedShopsRow",0,function(e){let i,n=(0,r.c)(5),{shops:l}=e,{selectedShopIds:s,toggleShop:c,clearShops:d}=(0,a.usePriceHistoryContext)();return n[0]!==d||n[1]!==s||n[2]!==l||n[3]!==c?(i=(0,t.jsx)(o,{shops:l,selectedShopIds:s,onToggleShop:c,onClearAll:d,"data-sentry-element":"SelectedShops","data-sentry-component":"SelectedShopsRow","data-sentry-source-file":"selected-shops-row.tsx"}),n[0]=d,n[1]=s,n[2]=l,n[3]=c,n[4]=i):i=n[4],i}],327781)},40047,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(842561),i=e.i(445680),n=e.i(889223),l=e.i(780176),s=e.i(451915);let o=(e={},t={})=>(s.experimentalStaticLocale??t.locale??(0,s.getLocale)(),"Velg butikk");var c=e.i(426080);let d=[1751,15581,38435,18708,26551,38513,28651];function u(e,t){return e.name.localeCompare(t.name)}function m(e){return[e.id,e]}function p(e){return!d.includes(e.id)}e.s(["ShopSelector",0,function(e){let s,d,f,h,x,v,y,g,S,_,b,j=(0,r.c)(34),{shops:w}=e,{selectedShopIds:N,toggleShop:k}=(0,a.usePriceHistoryContext)();j[0]!==w?(s=w.filter(p),j[0]=w,j[1]=s):s=j[1];let I=s;j[2]!==I?(d=new Map(I.map(m)),j[2]=I,j[3]=d):d=j[3];let T=d;j[4]!==I?(f=[...I].sort(u),j[4]=I,j[5]=f):f=j[5];let C=f;if((null==N?void 0:N.length)===0){let e;j[6]===Symbol.for("react.memo_cache_sentinel")?(e=o(),j[6]=e):e=j[6],h=e}else if((null==N?void 0:N.length)===1&&void 0!==N[0]){let e,t;j[7]!==N[0]||j[8]!==T?(e=T.get(N[0]),j[7]=N[0],j[8]=T,j[9]=e):e=j[9];let r=e;j[10]!==(null==r?void 0:r.name)?(t=(null==r?void 0:r.name)||(0,c.product__shop_count)({count:1}),j[10]=null==r?void 0:r.name,j[11]=t):t=j[11],h=t}else{let e,t=null==N?void 0:N.length;j[12]!==t?(e=(0,c.product__shop_count)({count:t}),j[12]=t,j[13]=e):e=j[13],h=e}j[14]!==N||j[15]!==T||j[16]!==k?(x=e=>{let t=T.get(e);t&&(N.includes(e)?(0,i.trackShopRemove)(t.name,"quick-filter"):(0,i.trackShopSelect)(t.name),k(e))},j[14]=N,j[15]=T,j[16]=k,j[17]=x):x=j[17];let P=x;if(0===I.length)return null;if(j[18]!==h?(v=(0,t.jsx)(l.DropdownMenuTrigger,{render:(0,t.jsx)(n.Button,{variant:"outline",icon:"chevronDown",iconPlacement:"end",children:h}),"data-sentry-element":"DropdownMenuTrigger","data-sentry-source-file":"shop-selector.tsx"}),j[18]=h,j[19]=v):v=j[19],j[20]===Symbol.for("react.memo_cache_sentinel")?(y=(0,t.jsx)(l.DropdownMenuGroupLabel,{"data-sentry-element":"DropdownMenuGroupLabel","data-sentry-source-file":"shop-selector.tsx",children:o()}),g=(0,t.jsx)(l.DropdownMenuSeparator,{"data-sentry-element":"DropdownMenuSeparator","data-sentry-source-file":"shop-selector.tsx"}),j[20]=y,j[21]=g):(y=j[20],g=j[21]),j[22]!==P||j[23]!==N||j[24]!==C){let e;j[26]!==P||j[27]!==N?(e=e=>(0,t.jsx)(l.DropdownMenuCheckItem,{checked:null==N?void 0:N.includes(e.id),onCheckedChange:()=>P(e.id),children:e.name},e.id),j[26]=P,j[27]=N,j[28]=e):e=j[28],S=C.map(e),j[22]=P,j[23]=N,j[24]=C,j[25]=S}else S=j[25];return j[29]!==S?(_=(0,t.jsx)(l.DropdownMenuContent,{align:"start",width:250,"data-sentry-element":"DropdownMenuContent","data-sentry-source-file":"shop-selector.tsx",children:(0,t.jsxs)(l.DropdownMenuGroup,{"data-sentry-element":"DropdownMenuGroup","data-sentry-source-file":"shop-selector.tsx",children:[y,g,(0,t.jsx)("div",{className:"max-h-[300px] overflow-y-auto",children:S})]})}),j[29]=S,j[30]=_):_=j[30],j[31]!==v||j[32]!==_?(b=(0,t.jsxs)(l.DropdownMenuRoot,{"data-sentry-element":"DropdownMenuRoot","data-sentry-component":"ShopSelector","data-sentry-source-file":"shop-selector.tsx",children:[v,_]}),j[31]=v,j[32]=_,j[33]=b):b=j[33],b}],40047)},924644,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(172932);e.i(908169);var i=e.i(873991),n=e.i(454352),l=e.i(684973),s=e.i(451915),o=e.i(772647),c=e.i(738356);e.s(["ForecastAlertTrigger",0,function(e){let d,u,m,p,f,h=(0,r.c)(11),{productId:x}=e,[,v]=(0,c.useQueryState)(a.paramKeys.Modal),{data:y}=(0,o.useUserResources)();h[0]!==x||h[1]!==(null==y?void 0:y.alertProductIds)?(d=(null==y?void 0:y.alertProductIds.includes(x))??!1,h[0]=x,h[1]=null==y?void 0:y.alertProductIds,h[2]=d):d=h[2];let g=d;return h[3]!==v?(u=()=>v(a.paramValues.Modal_CreateAlert),h[3]=v,h[4]=u):u=h[4],h[5]!==g?(m=g?(0,t.jsx)(i.IconNotificationFilled,{size:20}):(0,t.jsx)(n.IconNotificationOutlined,{size:20}),h[5]=g,h[6]=m):m=h[6],h[7]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)(l.Text,{variant:"BodySmall","data-sentry-element":"Text","data-sentry-source-file":"forecast-alert-trigger.tsx",children:((e={})=>(s.experimentalStaticLocale??e.locale??(0,s.getLocale)(),"Følg pris"))()}),h[7]=p):p=h[7],h[8]!==u||h[9]!==m?(f=(0,t.jsxs)("button",{type:"button",onClick:u,className:"text-text-link flex shrink-0 items-center gap-25","data-sentry-component":"ForecastAlertTrigger","data-sentry-source-file":"forecast-alert-trigger.tsx",children:[m,p]}),h[8]=u,h[9]=m,h[10]=f):f=h[10],f}],924644)},796728,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(588660),i=e.i(667469),n=e.i(856360),l=e.i(15986),s=e.i(897963),o=e.i(684973),c=e.i(854880),d=e.i(530397),u=e.i(561395),m=e.i(145217),p=e.i(979335),f=e.i(445828),h=e.i(160125),x=e.i(173544);let v=e=>{var a;let i,n,l,o,c,d=(0,r.c)(11),{active:u,payload:m}=e;if(!u||!m||0===m.length)return null;let p=null==(a=m[0])?void 0:a.payload;return p?(d[0]!==p.price?(i=(0,s.formatPrice)(p.price),d[0]=p.price,d[1]=i):i=d[1],d[2]!==i?(n=(0,t.jsx)("div",{className:"text-sm font-bold",children:i}),d[2]=i,d[3]=n):n=d[3],d[4]!==p.date?(l=(0,s.formatDateFull)(p.date),d[4]=p.date,d[5]=l):l=d[5],d[6]!==l?(o=(0,t.jsx)("div",{className:"text-text-secondary text-xs",children:l}),d[6]=l,d[7]=o):o=d[7],d[8]!==n||d[9]!==o?(c=(0,t.jsxs)("div",{className:"rounded-100 border-border-card-outline bg-surface-background-lighter border p-50 shadow-lg","data-sentry-component":"SimpleMiniTooltip","data-sentry-source-file":"mini-price-history-chart.tsx",children:[n,o]}),d[8]=n,d[9]=o,d[10]=c):c=d[10],c):null};function y(e){let a,s,y,S,_,b,j,w,N,k,I,T,C=(0,r.c)(23),{historyItems:P,marketConfig:R}=e,L=(0,x.useIsClient)();C[0]!==P||C[1]!==R.currency?(a=(0,i.buildChartData)({historyItems:P,shops:[],currency:R.currency}),C[0]=P,C[1]=R.currency,C[2]=a):a=C[2];let M=a,O=M.some(g);if(C[3]!==M){let e,t;e=M[0],t=M.at(-1),s=e&&t?[e.date,Math.max(t.date,(0,l.todayUTCTimestamp)())]:[0,1],C[3]=M,C[4]=s}else s=C[4];let A=s;C[5]!==M?(y=function(e){if(0===e.length)return[0,100];let t=e.map(e=>e.price).filter(e=>null!==e);if(0===t.length)return[0,100];let r=Math.min(...t),a=Math.max(...t),i=Math.max(a-r,.2*a,1),n=.1*i;return[Math.max(0,r-.5*i-n),a+n]}(M),C[5]=M,C[6]=y):y=C[6];let E=y;if(!L){let e;return C[7]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"h-full w-full"}),C[7]=e):e=C[7],e}if(!O){let e;return C[8]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,t.jsx)(o.Text,{variant:"BodySmall",className:"text-text-tertiary",children:(0,c.product__price_history_n
2o_data)()})}),C[8]=e):e=C[8],e}return C[9]===Symbol.for("react.memo_cache_sentinel")?(S={top:5,right:5,left:5,bottom:5},_={cursor:"pointer"},C[9]=S,C[10]=_):(S=C[9],_=C[10]),C[11]===Symbol.for("react.memo_cache_sentinel")?(b=(0,t.jsx)("defs",{"data-sentry-element":"defs","data-sentry-source-file":"mini-price-history-chart.tsx",children:(0,t.jsxs)("linearGradient",{id:"miniPriceGradient",x1:"0",y1:"0",x2:"0",y2:"1","data-sentry-element":"linearGradient","data-sentry-source-file":"mini-price-history-chart.tsx",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:n.PRIMARY_LINE_COLOR,stopOpacity:.3,"data-sentry-element":"stop","data-sentry-source-file":"mini-price-history-chart.tsx"}),(0,t.jsx)("stop",{offset:"100%",stopColor:n.PRIMARY_LINE_COLOR,stopOpacity:0,"data-sentry-element":"stop","data-sentry-source-file":"mini-price-history-chart.tsx"})]})}),C[11]=b):b=C[11],C[12]!==A?(j=(0,t.jsx)(f.XAxis,{dataKey:"date",type:"number",domain:A,hide:!0,"data-sentry-element":"XAxis","data-sentry-source-file":"mini-price-history-chart.tsx"}),C[12]=A,C[13]=j):j=C[13],C[14]!==E?(w=(0,t.jsx)(h.YAxis,{domain:E,hide:!0,"data-sentry-element":"YAxis","data-sentry-source-file":"mini-price-history-chart.tsx"}),C[14]=E,C[15]=w):w=C[15],C[16]===Symbol.for("react.memo_cache_sentinel")?(N={stroke:n.PRIMARY_LINE_COLOR,strokeWidth:1,strokeDasharray:"5 5"},C[16]=N):N=C[16],C[17]===Symbol.for("react.memo_cache_sentinel")?(k=(0,t.jsx)(p.Tooltip,{content:v,cursor:N,isAnimationActive:!1,wrapperStyle:{outline:"none",zIndex:1},"data-sentry-element":"Tooltip","data-sentry-source-file":"mini-price-history-chart.tsx"}),C[17]=k):k=C[17],C[18]===Symbol.for("react.memo_cache_sentinel")?(I=(0,t.jsx)(d.Area,{type:"linear",dataKey:"price",stroke:n.PRIMARY_LINE_COLOR,strokeWidth:2,fill:"url(#miniPriceGradient)",fillOpacity:1,dot:!1,isAnimationActive:!1,activeDot:{r:5,fill:n.PRIMARY_LINE_COLOR,stroke:n.CHART_BACKGROUND_COLOR,strokeWidth:2},"data-sentry-element":"Area","data-sentry-source-file":"mini-price-history-chart.tsx"}),C[18]=I):I=C[18],C[19]!==M||C[20]!==w||C[21]!==j?(T=(0,t.jsx)("div",{className:"relative h-full w-full cursor-pointer","data-sentry-component":"MiniPriceHistoryChart","data-sentry-source-file":"mini-price-history-chart.tsx",children:(0,t.jsx)(m.ResponsiveContainer,{width:"100%",height:"100%",className:"[&_svg]:outline-hidden","data-sentry-element":"ResponsiveContainer","data-sentry-source-file":"mini-price-history-chart.tsx",children:(0,t.jsxs)(u.ComposedChart,{data:M,margin:S,style:_,"data-sentry-element":"ComposedCh
2art","data-sentry-source-file":"mini-price-history-chart.tsx",children:[b,j,w,k,I]})})}),C[19]=M,C[20]=w,C[21]=j,C[22]=T):T=C[22],T}function g(e){return null!==e.price}var S=e.i(991669);e.s(["MiniPriceHistory",0,function(e){let i,n=(0,r.c)(3),{historyItems:l,marketConfig:s}=e;return n[0]!==l||n[1]!==s?(i=(0,t.jsx)(S.Link,{href:`#${a.Anchors.STATISTICS}`,className:"rounded-100 border-border-card-outline bg-surface-card block h-full cursor-pointer content-center border p-50 transition-shadow hover:shadow-md",children:(0,t.jsx)("div",{className:"h-[120px]",children:(0,t.jsx)(y,{historyItems:l,marketConfig:s,"data-sentry-element":"MiniPriceHistoryChart","data-sentry-source-file":"mini-price-history.tsx"})})}),n[0]=l,n[1]=s,n[2]=i):i=n[2],i}],796728)},925316,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(842561),i=e.i(445680),n=e.i(889223);e.s(["TimeRangeSelectorClient",0,function(e){let l,s,o,c=(0,r.c)(11),{options:d}=e,{timeRange:u,setTimeRange:m}=(0,a.usePriceHistoryContext)();c[0]!==m?(l=(e,t)=>{(0,i.trackTimeRangeSelect)(e,t),m(e)},c[0]=m,c[1]=l):l=c[1];let p=l;if(c[2]!==p||c[3]!==d||c[4]!==u){let e;c[6]!==p||c[7]!==u?(e=e=>(0,t.jsx)(n.Button,{variant:"tonal",state:u===e.value?"active":"base",onClick:()=>p(e.value,e.label),children:e.label},e.value),c[6]=p,c[7]=u,c[8]=e):e=c[8],s=d.map(e),c[2]=p,c[3]=d,c[4]=u,c[5]=s}else s=c[5];return c[9]!==s?(o=(0,t.jsx)("div",{className:"flex flex-wrap gap-50","data-sentry-component":"TimeRangeSelectorClient","data-sentry-source-file":"time-range-selector-client.tsx",children:s}),c[9]=s,c[10]=o):o=c[10],o}])},842561,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(291911);let i=(0,a.createContext)(null);e.s(["PriceHistoryProvider",0,function(e){let n,l,s,o,c,d,u,m=(0,r.c)(13),{children:p,defaultTimeRange:f,defaultShopIds:h,defaultShowSalePeriods:x}=e;m[0]!==h?(n=void 0===h?[]:h,m[0]=h,m[1]=n):n=m[1];let v=n,[y,g]=(0,a.useState)(f),[S,_]=(0,a.useState)(v),[b,j]=(0,a.useState)(void 0!==x&&x);m[2]===Symbol.for("react.memo_cache_sentinel")?(l=e=>{g(e)},m[2]=l):l=m[2];let w=l;m[3]===Symbol.for("react.memo_cache_sentinel")?(s=e=>{_(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},m[3]=s):s=m[3];let N=s;m[4]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{_([])},m[4]=o):o=m[4];let k=o;m[5]===Symbol.for("react.memo_cache_sentinel")?(c=e=>{j(e)},m[5]=c):c=m[5];let I=c;m[6]!==S||m[7]!==b||m[8]!==y?(d={timeRange:y,selectedShopIds:S,showSalePeriods:b,setTimeRange:w,toggleShop:N,clearShops:k,setShowSalePeriods:I},m[6]=S,m[7]=b,m[8]=y,m[9]=d):d=m[9];let T=d;return m[10]!==p||m[11]!==T?(u=(0,t.jsx)(i.Provider,{value:T,"data-sentry-element":"PriceHistoryContext.Provider","data-sentry-component":"PriceHistoryProvider","data-sentry-source-file":"price-history-context.tsx",children:p}),m[10]=p,m[11]=T,m[12]=u):u=m[12],u},"usePriceHistoryContext",0,function(){let e=(0,a.useContext)(i);if(!e)throw Error("usePriceHistoryContext must be used within PriceHistoryProvider");return e}])},445680,e=>{"use strict";var t=e.i(165749),r=e.i(873510);e.s(["trackClearAllShops",0,e=>{e.forEach(e=>{(0,t.trackFilterRemoveEvent)({value:e,scope:r.PageScope.PRICE_HISTORY_GRAPH,property:"Store",layout:"applied-filter-clear-all",type:"list"})})},"trackShopRemove",0,(e,a="quick-filter")=>{(0,t.trackFilterRemoveEvent)({value:e,scope:r.PageScope.PRICE_HISTORY_GRAPH,property:"Store",layout:a,type:"list"})},"trackShopSelect",0,e=>{(0,t.trackFilterSelectEvent)({value:e,scope:r.PageScope.PRICE_HISTORY_GRAPH,property:"Store",layout:"quick-filter",type:"list"})},"trackTimeRangeSelect",0,(e,a)=>{(0,t.trackFilterSelectEvent)({value:e,scope:r.PageScope.PRICE_HISTORY_GRAPH,property:"Time Interval",layout:"quick-filter",type:"range-groups",translatedValue:a})},"trackToggleShowSalePeriods",0,(e,a)=>{let i={value:"On",scope:r.PageScope.PRICE_HISTORY_GRAPH,property:a,layout:"quick-filter",type:"boolean"};e?(0,t.trackFilterSelectEvent)(i):(0,t.trackFilterRemoveEvent)(i)}])},57930,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(889223),i=e.i(615379),n=e.i(291911);e.s(["Expandable",0,function(e){let l,s,o,c,d=(0,r.c)(12),{children:u,label:m,className:p}
2=e,[f,h]=(0,n.useState)(!1),x=!f&&"hidden";return d[0]!==p||d[1]!==x?(l=(0,i.default)(x,p),d[0]=p,d[1]=x,d[2]=l):l=d[2],d[3]!==u||d[4]!==l?(s=(0,t.jsx)("div",{className:l,children:u}),d[3]=u,d[4]=l,d[5]=s):s=d[5],d[6]!==m||d[7]!==f?(o=!f&&(0,t.jsx)(a.Button,{variant:"tonal",className:"mx-auto",onClick:()=>h(!0),children:m}),d[6]=m,d[7]=f,d[8]=o):o=d[8],d[9]!==s||d[10]!==o?(c=(0,t.jsxs)(t.Fragment,{children:[s,o]}),d[9]=s,d[10]=o,d[11]=c):c=d[11],c}])},777651,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(172932),i=e.i(437749),n=e.i(738356);let l=(0,i.default)(()=>e.A(100926).then(e=>e.PriceAlertModal),{loadableGenerated:{modules:[412620]},ssr:!1});e.s(["ProductAlertModal",0,function(e){let i,s,o=(0,r.c)(7),[c,d]=(0,n.useQueryState)(a.paramKeys.Modal),[u,m]=(0,n.useQueryState)(a.paramKeys.CreateAlert),p=c===a.paramValues.Modal_CreateAlert||null!==u;o[0]!==m||o[1]!==d?(i=()=>{d(null),m(null)},o[0]=m,o[1]=d,o[2]=i):i=o[2];let f=i;return o[3]!==f||o[4]!==p||o[5]!==e?(s=p&&(0,t.jsx)(l,{onClose:f,...e}),o[3]=f,o[4]=p,o[5]=e,o[6]=s):s=o[6],s}])},818133,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(172932),i=e.i(542377),n=e.i(738356);function l(e){let l,s,o=(0,r.c)(5),{productId:c}=e,[,d]=(0,n.useQueryState)(a.paramKeys.Modal);return o[0]!==d?(l=()=>d(a.paramValues.Modal_CreateAlert),o[0]=d,o[1]=l):l=o[1],o[2]!==c||o[3]!==l?(s=(0,t.jsx)(i.PriceAlertTrigger,{productId:c,onOpen:l,"data-sentry-element":"PriceAlertTrigger","data-sentry-component":"ProductAlertTrigger","data-sentry-source-file":"trigger.tsx"}),o[2]=c,o[3]=l,o[4]=s):s=o[4],s}var s=e.i(924320);function o(e){let i,l,o=(0,r.c)(5),{productId:c}=e,[,d]=(0,n.useQueryState)(a.paramKeys.Modal);return o[0]!==d?(i=()=>d(a.paramValues.Modal_CreateList),o[0]=d,o[1]=i):i=o[1],o[2]!==c||o[3]!==i?(l=(0,t.jsx)(s.UserListTrigger,{buttonVariant:"outline",productId:c,onOpen:i,"data-sentry-element":"UserListTrigger","data-sentry-component":"ProductListTrigger","data-sentry-source-file":"trigger.tsx"}),o[2]=c,o[3]=i,o[4]=l):l=o[4],l}var c=e.i(890184),d=e.i(632139),u=e.i(504877),m=e.i(907796);e.i(637094);var p=e.i(534237);let f={scope:m.InternalNavigationScope.PRODUCT_PRODUCT_HEADER};function h(e){return e.stopPropagation()}e.s(["ProductInteractionBar",0,function(e){let a,i,n,s,m=(0,r.c)(10),{productId:x}=e;return m[0]!==x?(a=d.clientConfig.features.account.enabled&&(0,t.jsx)(l,{productId:x}),m[0]=x,m[1]=a):a=m[1],m[2]!==x?(i=d.clientConfig.features.account.enabled&&(0,t.jsx)(o,{productId:x}),m[2]=x,m[3]=i):i=m[3],m[4]!==x?(n=d.clientConfig.pages.comparePage.enabled&&(0,t.jsx)(c.ButtonLinkWithTracking,{href:p.linkTo.compareProducts([x]),tracking:f,variant:"outline",icon:"compare","aria-label":(0,u.product__product_compare_compare_products)()}),m[4]=x,m[5]=n):n=m[5],m[6]!==a||m[7]!==i||m[8]!==n?(s=(0,t.jsxs)("div",{className:"grid gap-50 md:gap-100",onClick:h,"data-sentry-component":"ProductInteractionBar","data-sentry-source-file":"product-interaction-bar.tsx",children:[a,i,n]}),m[6]=a,m[7]=i,m[8]=n,m[9]=s):s=m[9],s}],818133)},910570,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(172932),i=e.i(873510),n=e.i(437749),l=e.i(738356);let s=(0,n.default)(()=>e.A(345964).then(({UserListModal:e})=>e),{loadableGenerated:{modules:[962863]},ssr:!1});e.s(["ProductListModal",0,function(e){let n,o=(0,r.c)(5),{productId:c,productName:d}=e,[u,m]=(0,l.useQueryState)(a.paramKeys.Modal),p=u===a.paramValues.Modal_CreateList;return o[0]!==p||o[1]!==c||o[2]!==d||o[3]!==m?(n=p&&(0,t.jsx)(s,{onClose:()=>m(null),productId:c,productName:d,trackingData:{scope:i.PageScope.HEADER,type:"user-list"}}),o[0]=p,o[1]=c,o[2]=d,o[3]=m,o[4]=n):n=o[4],n}])},549098,e=>{"use strict";var t=e.i(748922),r=e.i(485932),a=e.i(291911);e.s(["TrackViewItem",0,function(e){let i,n,l=(0,t.c)(2),{data:s}=e,o=(0,a.useRef)(s);return l[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{let e=o.current;(0,r.pushEvent)("viewItem",{ecommerce:{items:[{item_id:e.productId,item_name:e.productName}]},nbr_of_offers:e.nbrOfOffers,nbr_of_featured_offers:e.nbrOfFeaturedOffers,nbr_of_images:e.nbrOfImages,highest_price:e.highestPrice,lowest_price:e.lowestPrice,review_rating:e.reviewRating,nbr_of_used_offers:e.nbrOfUsedOffers,nbr_of_promotions:e.nbrOfPromotions,product_id:e.productId,product_name:e.productName,has_pj_deal:e.hasPjDeal,has_sponsored_article:e.hasSponsoredArticle,has_variants:e.hasVariants},{clearExistingData:!0,eventNameAsKey:!1})},n=[],l[0]=i,l[1]=n):(i=l[0],n=l[1]),(0,a.useEffect)(i,n),null}])},559730,e=>{"use strict";let t;var r=e.i(262757),a=e.i(748922),i=e.i(889223),n=e.i(316375),l=e.i(451915);e.i(507755);let s={DK:(e={},t={})=>(l.experimentalStaticLocale??t.locale??(0,l.getLocale)(),"Dansk bruker"),FI:(e={},t={})=>(l.experimentalStaticLocale??t.locale??(0,l.getLocale)(),"Finsk bruker"),FR:(e={},t={})=>(l.experimentalStaticLocale??t.locale??(0,l.getLocale)(),"Fransk bruker"),GB:(e={},t={})=>(l.experimentalStaticLocale??t.locale??(0,l.getLocale)(),"Britisk bruker"),NO:(e={},t={})=>(l.experimentalStaticLocale??t.locale??(0,l.getLocale)(),"Norsk bruker"),NZ:(e={},t={})=>(l.experimentalStaticLocale??t.locale??(0,l.getLocale)(),"Newzealandsk bruker"),SE:(e={},t={})=>(l.experimentalStaticLocale??t.locale??(0,l.getLocale)(),"Svensk bruker")},o=e=>({reviews:[],nextCursor:e.cursor??null});var c=e.i(493831),d=e.i(778957),u=e.i(88590),m=e.i(442276),p=class extends u.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:(0,m.infiniteQueryBehavior)()},t)}getOptimisticResult(e){return e.behavior=(0,m.infiniteQueryBehavior)(),super.getOptimisticResult(e)}
2fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var r,a;let{state:i}=e,n=super.createResult(e,t),{isFetching:l,isRefetching:s,isError:o,isRefetchError:c}=n,d=null==(a=i.fetchMeta)||null==(r=a.fetchMore)?void 0:r.direction,u=o&&"forward"===d,p=l&&"forward"===d,f=o&&"backward"===d,h=l&&"backward"===d;return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,m.hasNextPage)(t,i.data),hasPreviousPage:(0,m.hasPreviousPage)(t,i.data),isFetchNextPageError:u,isFetchingNextPage:p,isFetchPreviousPageError:f,isFetchingPreviousPage:h,isRefetchError:c&&!u&&!f,isRefetching:s&&!p&&!h}}},f=e.i(460501);function h(e,t){return(0,f.useBaseQuery)(e,p,t)}var x=e.i(299452),v=e.i(805966);let y=async(e,t)=>{try{let r=await fetch(`/api/products/${encodeURIComponent(e)}/reviews`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let a=await r.text().catch(()=>"(unreadable)"),i=Error(`Failed to fetch product reviews for ${e}: ${r.statusText}`);return(0,c.captureException)(i,{extra:{status:r.status,body:a,options:t,headers:Object.fromEntries(r.headers.entries())}}),o(t)}return await r.json()}catch(e){return(0,c.captureException)(e),o(t)}};function g(e,r){let i,l,s,o,c,u=(0,a.c)(13),m=(0,v.useQueryClient)(),p=r===t?void 0:r;u[0]!==e||u[1]!==p?(i={pageSize:3,nextPageSize:10,rating:p},s=h,l=[...n.queryKeys.user.reviews.productReviews(e,i)],u[0]=e,u[1]=p,u[2]=i,u[3]=l,u[4]=s):(i=u[2],l=u[3],s=u[4]),u[5]!==i||u[6]!==e||u[7]!==m?(o=async t=>{let{pageParam:r}=t,{nextPageSize:a,...l}=i,s=void 0===r?l.pageSize:a??l.pageSize,o=await y(e,{...l,pageSize:s,cursor:r});return void 0===r&&void 0!==o.userContext&&m.setQueryData(n.queryKeys.user.reviews.userContext(e),o.userContext),o},u[5]=i,u[6]=e,u[7]=m,u[8]=o):o=u[8];let f=!!e;return u[9]!==l||u[10]!==o||u[11]!==f?(c={queryKey:l,queryFn:o,enabled:f,placeholderData:d.keepPreviousData,retry:2,staleTime:6e5,initialPageParam:void 0,getNextPageParam:S},u[9]=l,u[10]=o,u[11]=f,u[12]=c):c=u[12],s(c)}function S(e){return e.nextCursor??void 0}var _=e.i(853245),b=e.i(873510);function j(e){let t,n,s,o,c=(0,a.c)(9),{productId:d,selectedRate:u}=e,{data:m,hasNextPage:p,fetchNextPage:f,isFetchingNextPage:h}=g(d,u);c[0]!==(null==m?void 0:m.pages)?(t=(null==m?void 0:m.pages.flatMap(w).length)??0,c[0]=null==m?void 0:m.pages,c[1]=t):t=c[1];let x=t;if(!p)return null;c[2]!==x||c[3]!==f?(n=()=>{f(),(0,_.trackExpandedEvent)({scope:b.PageScope.PRODUCT,type:"product-reviews",numberOfReviewsDisplayed:x+10})},c[2]=x,c[3]=f,c[4]=n):n=c[4];let v=n;return c[5]===Symbol.for("react.memo_cache_sentinel")?(s=((e={})=>(l.experimentalStaticLocale??e.locale??(0,l.getLocale)(),"Vis flere anmeldelser"))(),c[5]=s):s=c[5],c[6]!==v||c[7]!==h?(o=(0,r.jsx)(i.Button,{variant:"tonal",className:"mx-auto mt-100",onClick:v,disabled:h,"data-sentry-element":"Button","data-sentry-component":"LoadMoreButton","data-sentry-source-file":"load-more-button.tsx",children:s}),c[6]=v,c[7]=h,c[8]=o):o=c[8],o}function w(e){return e.reviews}var N=e.i(716042),k=e.i(437749),I=e.i(291911);let T=(0,k.default)(()=>e.A(599201).then(({ReportReviewModal:e})=>e),{loadableGenerated:{modules:[700870]}});function C(e){let t,n,l,s=(0,a.c)(6),{reviewId:o}=e,[c,d]=(0,I.useState)(!1);return P(o)?(s[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,r.jsx)(i.Button,{variant:"transparent",onClick:()=>d(!0),"aria-label":(0,N.feedback__report_review_title)(),icon:"flagOutlined","data-sentry-element":"Button","data-sentry-source-file":"report-review.tsx"}),s[0]=t):t=s[0],s[1]!==o||s[2]!==c?(n=c&&(0,r.jsx)(I.Suspense,{children:(0,r.jsx)(T,{reviewId:o,onClose:()=>d(!1),trackingData:{scope:b.PageScope.REVIEW,type:"review-report"}})}),s[1]=o,s[2]=c,s[3]=n):n=s[3],s[4]!==n?(l=(0,r.jsxs)(r.Fragment,{children:[t,n]}),s[4]=n,s[5]=l):l=s[5],l):null}let P=e=>"number"==typeof e;var R=e.i(722388),L=e.i(991669),M=e.i(701210),O=e.i(871527),A=e.i(684973),E=e.i(535152),D=e.i(107599),z=e.i(415203),B=e.i(564437);e.i(637094);var F=e.i(534237),q=e.i(615379);let H=e=>{let t,i,n,o,c,d,u,m,p,f,h,x,v,y,g,S,_,b,j,w,N,k,T,C=(0,a.c)(87),{review:P,controls:H}=e,{ref:$,isOverflowing:G}=(0,E.useIsOverflowing)(),[Q,W]=(0,I.useState)(!1),[Y,X]=(0,I.useState)(G);if(C[0]!==H||C[1]!==Q||C[2]!==P.author||C[3]!==P.createdAt||C[4]!==P.id||C[5]!==P.market||C[6]!==P.rating||C[7]!==P.text||C[8]!==P.translations||C[9]!==P.updatedAt||C[10]!==$||C[11]!==Y){var J;let e,a,w,N,k,I,T,E,z,B,K=null==(J=P.translations)?void 0:J.map(V).join("\n"),G=Y||!K?P.text:K;if(C[31]!==Y?(e=()=>{X(!Y)},C[31]=Y,C[32]=e):e=C[32],_=e,C[33]===Symbol.for("react.memo_cache_sentinel")?(a=((e={})=>(l.experimentalStaticLocale??e.locale??(0,l.getLocale)(),"![Google](https://cdn.pji.nu/g/style/[email protected])"))().replace(/!\[([^\]]*)\]\(([^)]+)\)/g,'<img src="$2" alt="$1" />'),C[33]=a):a=C[33],b=a,j=!!K,C[34]!==P.author||C[35]!==P.market)w=P.author?P.author.displayName:(s[P.market]??((e={},t={})=>(l.experimentalStaticLocale??t.locale??(0,l.getLocale)(),"Gjestebruker")))(),C[34]=P.author,C[35]=P.market,C[36]=w;else w=C[36];let W=w,Z=P.updatedAt??P.createdAt;
2i=R.Card,g="mb-100",S=P.id,o="large",c="Card",d="Review",u="review.tsx",C[37]===Symbol.for("react.memo_cache_sentinel")?(N=(0,r.jsx)(M.IconPrisjakt,{size:48,className:"text-legacy-text-subtle","data-sentry-element":"IconPrisjakt","data-sentry-source-file":"review.tsx"}),C[37]=N):N=C[37],C[38]!==P.author||C[39]!==W?(k=(0,r.jsx)("div",{className:"flex gap-50",children:P.author&&P.author.legacyId?(0,r.jsx)(L.Link,{href:F.linkTo.user(P.author.legacyId),children:(0,r.jsx)(A.Text,{variant:"TitleSmall",className:"hover:text-text-link",children:W})}):(0,r.jsx)(A.Text,{variant:"TitleSmall",children:W})}),C[38]=P.author,C[39]=W,C[40]=k):k=C[40];let ee=P.rating||0;C[41]!==ee?(I=(0,r.jsx)(O.Rating,{rate:ee,"data-sentry-element":"Rating","data-sentry-source-file":"review.tsx"}),C[41]=ee,C[42]=I):I=C[42],C[43]!==Z?(T=Z?(0,r.jsx)(A.Text,{variant:"Caption",className:"text-text-tertiary",children:(0,D.formatRelativeDate)(new Date(Z))}):null,C[43]=Z,C[44]=T):T=C[44],C[45]!==I||C[46]!==T?(E=(0,r.jsxs)("div",{className:"flex flex-wrap gap-50",children:[I,T]}),C[45]=I,C[46]=T,C[47]=E):E=C[47],C[48]!==k||C[49]!==E?(z=(0,r.jsxs)("div",{className:"flex gap-50",children:[N,(0,r.jsxs)("div",{children:[k,E]})]}),C[48]=k,C[49]=E,C[50]=z):z=C[50],C[51]!==H?(B=(0,r.jsx)("div",{className:"shrink-0 items-center gap-25 empty:hidden",children:H}),C[51]=H,C[52]=B):B=C[52],C[53]!==z||C[54]!==B?(m=(0,r.jsxs)("div",{className:"mb-50 flex items-start justify-between gap-50",children:[z,B]}),C[53]=z,C[54]=B,C[55]=m):m=C[55],x=`review-text-${P.id}`;let et=!Q&&"line-clamp-5 overflow-hidden";C[56]!==et?(v=(0,q.default)("mt-25 [overflow-wrap:anywhere]",et),C[56]=et,C[57]=v):v=C[57],y=$,t=A.Text,n="BodySmall",p="Text",f="review.tsx",h=null==G?void 0:G.split("\n").flatMap(U),C[0]=H,C[1]=Q,C[2]=P.author,C[3]=P.createdAt,C[4]=P.id,C[5]=P.market,C[6]=P.rating,C[7]=P.text,C[8]=P.translations,C[9]=P.updatedAt,C[10]=$,C[11]=Y,C[12]=t,C[13]=i,C[14]=n,C[15]=o,C[16]=c,C[17]=d,C[18]=u,C[19]=m,C[20]=p,C[21]=f,C[22]=h,C[23]=x,C[24]=v,C[25]=y,C[26]=g,C[27]=S,C[28]=_,C[29]=b,C[30]=j}else t=C[12],i=C[13],n=C[14],o=C[15],c=C[16],d=C[17],u=C[18],m=C[19],p=C[20],f=C[21],h=C[22],x=C[23],v=C[24],y=C[25],g=C[26],S=C[27],_=C[28],b=C[29],j=C[30];return C[58]!==t||C[59]!==n||C[60]!==p||C[61]!==f||C[62]!==h?(w=(0,r.jsx)(t,{variant:n,"data-sentry-element":p,"data-sentry-source-file":f,children:h}),C[58]=t,C[59]=n,C[60]=p,C[61]=f,C[62]=h,C[63]=w):w=C[63],C[64]!==w||C[65]!==x||C[66]!==v||C[67]!==y?(N=(0,r.jsx)("div",{id:x,className:v,ref:y,children:w}),C[64]=w,C[65]=x,C[66]=v,C[67]=y,C[68]=N):N=C[68],C[69]!==Q||C[70]!==G||C[71]!==Y||C[72]!==_||C[73]!==b||C[74]!==j?(k=(G||j)&&(0,r.jsxs)("div",{className:"mt-75 flex flex-col items-start gap-50 sm:flex-row sm:items-center sm:justify-between",children:[G&&(0,r.jsx)(A.Text,{variant:"BodySmall",className:"cursor-pointer underline",onClick:()=>W(K),children:Q?(0,z.common__button_show_less)():(0,B.common__button_show_more)()}),j&&(0,r.jsxs)("div",{className:(0,q.default)("flex items-center gap-50",!G&&"ml-auto"),children:[(0,r.jsx)("span",{className:"[&>img]:h-[16px]",dangerouslySetInnerHTML:{__html:b}}),(0,r.jsx)(A.Text,{variant:"Caption",className:"text-text-link cursor-pointer underline",onClick:_,children:Y?((e={})=>(l.experimentalStaticLocale??e.locale??(0,l.getLocale)(),"Vis oversettelse"))():((e={})=>(l.experimentalStaticLocale??e.locale??(0,l.getLocale)(),"Vis original"))()})]})]}),C[69]=Q,C[70]=G,C[71]=Y,C[72]=_,C[73]=b,C[74]=j,C[75]=k):k=C[75],C[76]!==i||C[77]!==o||C[78]!==c||C[79]!==d||C[80]!==u||C[81]!==m||C[82]!==N||C[83]!==k||C[84]!==g||C[85]!==S?(T=(0,r.jsxs)(i,{className:g,padding:o,"data-sentry-element":c,"data-sentry-component":d,"data-sentry-source-file":u,children:[m,N,k]},S),C[76]=i,C[77]=o,C[78]=c,C[79]=d,C[80]=u,C[81]=m,C[82]=N,C[83]=k,C[84]=g,C[85]=S,C[86]=T):T=C[86],T};function V(e){return e.text}function U(e,t,a){return t<a.length-1?[e,(0,r.jsx)("br",{},t)]:e}function K(e){return!e}var $=e.i(172932),G=e.i(899529),Q=e.i(568848),W=e.i(720562);e.i(900188);var Y=e.i(702745),X=e.i(891701),J=e.i(774713),Z=e.i(882433),ee=e.i(522115),et=e.i(141901),er=e.i(56113),ea=e.i(58521),ei=e.i(150652),en=e.i(100170),el=e.i(797874),es=e.i(771642),eo=e.i(738356);let ec=(0,k.default)(()=>e.A(848345).then(({ReviewCreateForm:e})=>e),{loadableGenerated:{modules:[122895]}}),ed=({productId:e,reviewId:t,queryClient:r,onClose:a})=>{et.toastManager.add({title:((e={})=>(l.experimentalStaticLocale??e.locale??(0,l.getLocale)(),"Anmeldelsen din har blitt fjernet"))()}),(0,G.trackDeleteReview)({reviewId:t.toString(),belongsToId:e}),r.setQueryData(n.queryKeys.user.reviews.userContext(e),{review:null}),r.invalidateQueries({queryKey:n.queryKeys.user.reviews.root(e)}),a()},eu=e=>{var t;let s,o,c,u,m,p,f,h,y,g,S,_,j,w,N,k,I,T=(0,a.c)(46),{productId:C,card:P}=e,R=(0,v.useQueryClient)(),{data:L}=((I=(0,a.c)(4))[0]!==C?(N=n.queryKeys.user.reviews.userContext(C),I[0]=C,I[1]=N):N=I[1],I[2]!==N?(k={queryKey:N,queryFn:d.skipToken,staleTime:6e5},I[2]=N,I[3]=k):k=I[3],(0,x.useQuery)(k)),[M,O]=(0,eo.useQueryState)($.paramKeys.Mod
2al),A=M===$.paramValues.Modal_ProductCreateReview;T[0]!==O?(s=()=>O($.paramValues.Modal_ProductCreateReview),T[0]=O,T[1]=s):s=T[1];let E=s,D=null==L?void 0:L.review,z=!!D;T[2]!==O?(o=()=>O(null),T[2]=O,T[3]=o):o=T[3];let B=o;T[4]!==D||T[5]!==z||T[6]!==B||T[7]!==C||T[8]!==R?(c=e=>{et.toastManager.add({title:((e={})=>(l.experimentalStaticLocale??e.locale??(0,l.getLocale)(),"Anmeldelsen din har blitt oppdatert"))()}),z?(0,G.trackEditReview)({reviewId:e.reviewId||D.id.toString(),reviewText:e.reviewText||"",rating:e.rating||"",belongsToId:C}):(0,G.trackCreateReview)({reviewText:e.reviewText||"",rating:e.rating||"",belongsToId:C}),R.invalidateQueries({queryKey:n.queryKeys.user.reviews.root(C)}),B()},T[4]=D,T[5]=z,T[6]=B,T[7]=C,T[8]=R,T[9]=c):c=T[9];let F=c;T[10]!==D||T[11]!==z||T[12]!==B||T[13]!==C||T[14]!==R?(u=()=>{z&&ed({productId:C,reviewId:D.id,queryClient:R,onClose:B})},T[10]=D,T[11]=z,T[12]=B,T[13]=C,T[14]=R,T[15]=u):u=T[15];let q=u;return(T[16]!==z?(m=z?(0,ea.reviews__dialog_title_edit)():(0,ei.reviews__dialog_title_write)(),T[16]=z,T[17]=m):m=T[17],T[18]!==E||T[19]!==m?(p=(0,r.jsx)(i.Button,{variant:"secondary",className:"w-full",onClick:E,"data-sentry-element":"Button","data-sentry-source-file":"review-edit-controls.tsx",children:m}),T[18]=E,T[19]=m,T[20]=p):p=T[20],T[21]===Symbol.for("react.memo_cache_sentinel")?(f={scope:b.PageScope.REVIEW,type:"review-create"},T[21]=f):f=T[21],T[22]===Symbol.for("react.memo_cache_sentinel")?(h={scope:b.PageScope.REVIEW,type:"authorize"},T[22]=h):h=T[22],T[23]===Symbol.for("react.memo_cache_sentinel")?(y=(0,r.jsx)("div",{className:"grid aspect-square place-items-center",children:(0,r.jsx)(ee.Spinner,{isActive:!0,size:40})}),T[23]=y):y=T[23],T[24]!==D||T[25]!==z)?(g=z?{rating:(null==(t=D.rating)?void 0:t.toString())||"0",reviewText:D.text||"",reviewId:D.id.toString()}:void 0,T[24]=D,T[25]=z,T[26]=g):g=T[26],T[27]!==P||T[28]!==z||T[29]!==B||T[30]!==q||T[31]!==F||T[32]!==C||T[33]!==g?(S=(0,r.jsx)(ec,{onClose:B,onSave:F,onDelete:q,productId:C,card:P,editing:z,defaultState:g,"data-sentry-element":"ReviewCreateForm","data-sentry-source-file":"review-edit-controls.tsx"}),T[27]=P,T[28]=z,T[29]=B,T[30]=q,T[31]=F,T[32]=C,T[33]=g,T[34]=S):S=T[34],T[35]!==A||T[36]!==B||T[37]!==S?(_=(0,r.jsx)(W.AuthorizedModal,{isOpen:A,setIsOpen:B,trackingData:h,fallbackSkeleton:y,"data-sentry-element":"AuthorizedModal","data-sentry-source-file":"review-edit-controls.tsx",children:S}),T[35]=A,T[36]=B,T[37]=S,T[38]=_):_=T[38],T[39]!==A||T[40]!==B||T[41]!==_?(j=(0,r.jsx)(Y.Modal,{isOpen:A,setIsOpen:B,trackingData:f,"data-sentry-element":"Modal","data-sentry-source-file":"review-edit-controls.tsx",children:_}),T[39]=A,T[40]=B,T[41]=_,T[42]=j):j=T[42],T[43]!==j||T[44]!==p?(w=(0,r.jsxs)(r.Fragment,{children:[p,j]}),T[43]=j,T[44]=p,T[45]=w):w=T[45],w},em=e=>{let t,n,s,o,c,d,u,m,p,f,h,x,y,g,S,_,j,w=(0,a.c)(32),{productId:N,review:k}=e,T=(0,v.useQueryClient)(),[C,P]=(0,I.useTransition)(),[R,L]=(0,I.useState)(!1);w[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>L(!1),w[0]=t):t=w[0];let M=t;w[1]!==N||w[2]!==T||w[3]!==k?(n=()=>{P(async()=>{switch(await (0,Q.productDeleteReview)(k.id.toString())){case es.HttpStatus.NoContent:ed({productId:N,reviewId:k.id,queryClient:T,onClose:M});break;case es.HttpStatus.Unauthorized:et.toastManager.add({title:(0,en.reviews__dialog_unauthorized_error)()});break;default:et.toastManager.add({title:(0,el.reviews__dialog_unknown_error)()})}})},w[1]=N,w[2]=T,w[3]=k,w[4]=n):n=w[4];let O=n;return w[5]===Symbol.for("react.memo_cache_sentinel")?(s=()=>L(!0),w[5]=s):s=w[5],w[6]!==C?(o=(0,r.jsx)(i.Button,{variant:"transparent",onClick:s,disabled:C,icon:"trash","data-sentry-element":"Button","data-sentry-source-file":"review-edit-controls.tsx"}),w[6]=C,w[7]=o):o=w[7],w[8]===Symbol.for("react.memo_cache_sentinel")?(c={scope:b.PageScope.REVIEW,type:"review-delete"},w[8]=c):c=w[8],w[9]===Symbol.for("react.memo_cache_sentinel")?(d={scope:b.PageScope.REVIEW,type:"review-delete"},w[9]=d):d=w[9],w[10]===Symbol.for("react.memo_cache_sentinel")?(u=(0,r.jsx)("div",{className:"grid aspect-square place-items-center",children:(0,r.jsx)(ee.Spinner,{isActive:!0,size:40})}),w[10]=u):u=w[10],w[11]===Symbol.for("react.memo_cache_sentinel")?(m=(0,r.jsx)(Z.ModalHeader,{"data-sentry-element":"ModalHeader","data-sentry-source-file":"review-edit-control
2s.tsx",children:(0,r.jsx)(A.Text,{component:"h1",variant:"H3","data-sentry-element":"Text","data-sentry-source-file":"review-edit-controls.tsx",children:(0,er.reviews__dialog_delete)()})}),w[11]=m):m=w[11],w[12]===Symbol.for("react.memo_cache_sentinel")?(p=(0,r.jsx)(X.ModalBody,{className:"flex justify-center pb-300","data-sentry-element":"ModalBody","data-sentry-source-file":"review-edit-controls.tsx",children:((e={})=>(l.experimentalStaticLocale??e.locale??(0,l.getLocale)(),"Vil du slette denne anmeldelsen?"))()}),w[12]=p):p=w[12],w[13]===Symbol.for("react.memo_cache_sentinel")?(f=((e={})=>(l.experimentalStaticLocale??e.locale??(0,l.getLocale)(),"Nei"))(),w[13]=f):f=w[13],w[14]!==C?(h=(0,r.jsx)(i.Button,{variant:"tonal",disabled:C,onClick:M,className:"grow","data-sentry-element":"Button","data-sentry-source-file":"review-edit-controls.tsx",children:f}),w[14]=C,w[15]=h):h=w[15],w[16]===Symbol.for("react.memo_cache_sentinel")?(x=((e={})=>(l.experimentalStaticLocale??e.locale??(0,l.getLocale)(),"Ja"))(),w[16]=x):x=w[16],w[17]!==C||w[18]!==O?(y=(0,r.jsx)(i.Button,{variant:"secondary",disabled:C,className:"grow-3",onClick:O,"data-sentry-element":"Button","data-sentry-source-file":"review-edit-controls.tsx",children:x}),w[17]=C,w[18]=O,w[19]=y):y=w[19],w[20]!==h||w[21]!==y?(g=(0,r.jsxs)(J.ModalFooter,{"data-sentry-element":"ModalFooter","data-sentry-source-file":"review-edit-controls.tsx",children:[h,y]}),w[20]=h,w[21]=y,w[22]=g):g=w[22],w[23]!==R||w[24]!==g?(S=(0,r.jsxs)(W.AuthorizedModal,{isOpen:R,setIsOpen:M,trackingData:d,fallbackSkeleton:u,"data-sentry-element":"AuthorizedModal","data-sentry-source-file":"review-edit-controls.tsx",children:[m,p,g]}),w[23]=R,w[24]=g,w[25]=S):S=w[25],w[26]!==R||w[27]!==S?(_=(0,r.jsx)(Y.Modal,{isOpen:R,setIsOpen:M,trackingData:c,"data-sentry-element":"Modal","data-sentry-source-file":"review-edit-controls.tsx",children:S}),w[26]=R,w[27]=S,w[28]=_):_=w[28],w[29]!==_||w[30]!==o?(j=(0,r.jsxs)(r.Fragment,{children:[o,_]}),w[29]=_,w[30]=o,w[31]=j):j=w[31],j},ep=()=>{let e,t,n,l=(0,a.c)(5),[,s]=(0,eo.useQueryState)($.paramKeys.Modal);l[0]!==s?(e=()=>s($.paramValues.Modal_ProductCreateReview),l[0]=s,l[1]=e):e=l[1];let o=e;return l[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,ea.reviews__dialog_title_edit)(),l[2]=t):t=l[2],l[3]!==o?(n=(0,r.jsx)(i.Button,{variant:"transparent",onClick:o,"aria-label":t,icon:"edit","data-sentry-element":"Button","data-sentry-component":"EditReviewButton","data-sentry-source-file":"review-edit-controls.tsx"}),l[3]=o,l[4]=n):n=l[4],n},ef=e=>{var t,i;let n,l,s,o=(0,a.c)(11),{productId:c,review:d}=e,u=null==(t=d.userContext)?void 0:t.canEdit,m=null==(i=d.userContext)?void 0:i.canDelete;if(!u&&!m){let e;return o[0]!==d.id?(e=(0,r.jsx)(C,{reviewId:d.id}),o[0]=d.id,o[1]=e):e=o[1],e}return o[2]!==m||o[3]!==c||o[4]!==d?(n=m&&(0,r.jsx)(em,{productId:c,review:d}),o[2]=m,o[3]=c,o[4]=d,o[5]=n):n=o[5],o[6]!==u?(l=u&&(0,r.jsx)(ep,{}),o[6]=u,o[7]=l):l=o[7],o[8]!==n||o[9]!==l?(s=(0,r.jsxs)(r.Fragment,{children:[n,l]}),o[8]=n,o[9]=l,o[10]=s):s=o[10],s};e.i(908169);var eh=e.i(858780);e.s([],483377),e.i(483377);var ex=e.i(947341),ev=e.i(963170);let ey=I.createContext(void 0);function eg(){let e=I.useContext(ey);if(void 0===e)throw Error((0,ev.default)(38));return e}var eS=e.i(214891),e_=e.i(526406);let eb=I.forwardRef(function(e,t){let{format:a,getAriaValueText:i,locale:n,max:l=100,min:s=0,value:o,render:c,className:d,children:u,...m}=e,[p,f]=I.useState(),h=(0,eS.formatNumberValue)(o,n,a),x=`${o}%`;i?x=i(h,o):a&&(x=h);let v={"aria-labelledby":p,"aria-valuemax":l,"aria-valuemin":s,"aria-valuenow":o,"aria-valuetext":x,role:"meter",children:(0,r.jsxs)(I.Fragment,{children:[u,(0,r.jsx)("span",{role:"presentation",style:ex.visuallyHidden,children:"x"})]})},y=I.useMemo(()=>({formattedValue:h,max:l,min:s,setLabelId:f,value:o}),[h,l,s,f,o]),g=(0,e_.useRenderElement)("div",e,{ref:t,props:[v,m]});return(0,r.jsx)(ey.Provider,{value:y,children:g})}),ej=I.forwardRef(function(e,t){let{render:r,className:a,...i}=e;return(0,e_.useRenderElement)("div",e,{ref:t,props:i})});var ew=e.i(208952);let eN=I.forwardRef(function(e,t){let{render:r,className:a,...i}
2=e,n=eg(),l=(0,ew.valueToPercent)(n.value,n.min,n.max);return(0,e_.useRenderElement)("div",e,{ref:t,props:[{style:{insetInlineStart:0,height:"inherit",width:`${l}%`}},i]})}),ek=I.forwardRef(function(e,t){let{className:r,render:a,children:i,...n}=e,{value:l,formattedValue:s}=eg();return(0,e_.useRenderElement)("span",e,{ref:t,props:[{"aria-hidden":!0,children:"function"==typeof i?i(s,l):(s||l)??""},n]})});var eI=e.i(906110);let eT=I.forwardRef(function(e,t){let{render:r,className:a,id:i,...n}=e,{setLabelId:l}=eg(),s=(0,eI.useRegisteredLabelId)(i,l);return(0,e_.useRenderElement)("span",e,{ref:t,props:[{id:s,role:"presentation"},n]})});e.s(["Indicator",0,eN,"Label",0,eT,"Root",0,eb,"Track",0,ej,"Value",0,ek],19949);var eC=e.i(19949),eC=eC;function eP(e){let t,i,n=(0,a.c)(3);return n[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,r.jsx)(eC.Track,{className:"bg-legacy-control-track h-[6px] w-full rounded-full","data-sentry-element":"MeterPrimitive.Track","data-sentry-source-file":"index.tsx",children:(0,r.jsx)(eC.Indicator,{className:"bg-legacy-control-indicator rounded-full","data-sentry-element":"MeterPrimitive.Indicator","data-sentry-source-file":"index.tsx"})}),n[0]=t):t=n[0],n[1]!==e?(i=(0,r.jsx)(eC.Root,{...e,"data-sentry-element":"MeterPrimitive.Root","data-sentry-component":"Meter","data-sentry-source-file":"index.tsx",children:t}),n[1]=e,n[2]=i):i=n[2],i}var eR=e.i(189486),eL=e.i(930048);let eM=e=>{let t,i,n,l,s=(0,a.c)(11),{selectedRate:o,onSelectRate:c,controls:d,summary:u}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,q.default)("flex flex-col gap-150 md:shrink-0 md:basis-[324px]"),s[0]=t):t=s[0],s[1]!==u?(i=(null==u?void 0:u.rating)&&(0,r.jsxs)("div",{className:"flex w-full flex-col items-center justify-center gap-75",children:[(0,r.jsx)(A.Text,{variant:"H3",className:"text-xxl!",children:u.avarageRating}),(0,r.jsx)(O.Rating,{size:"large",rate:u.avarageRating,className:"flex"}),(0,r.jsxs)(A.Text,{variant:"BodySmall",className:"text-text-secondary",children:["(",(0,eR.reviews__rating_n_reviews)({count:u.reviewCount}),")"]})]}),s[1]=u,s[2]=i):i=s[2],s[3]!==c||s[4]!==o||s[5]!==u?(n=(null==u?void 0:u.rating)&&(0,r.jsx)(eA,{summary:u,onSelectRate:c,selectedRate:o}),s[3]=c,s[4]=o,s[5]=u,s[6]=n):n=s[6],s[7]!==d||s[8]!==i||s[9]!==n?(l=(0,r.jsxs)("div",{className:t,"data-sentry-component":"ReviewsDistribution","data-sentry-source-file":"reviews-distribution.tsx",children:[i,d,n]}),s[7]=d,s[8]=i,s[9]=n,s[10]=l):l=s[10],l},eO=[1,2,3,4,5].reverse();function eA(e){let i,n,l,s,o,c=(0,a.c)(17),{summary:d,selectedRate:u,onSelectRate:m}=e;if(c[0]!==m||c[1]!==u||c[2]!==(null==d?void 0:d.distribution)){let e,a;c[7]!==(null==d?void 0:d.distribution)?(e=e=>(null==d?void 0:d.distribution.find(t=>t.rating===e))||{rating:e,reviewCount:0,percentage:0},c[7]=null==d?void 0:d.distribution,c[8]=e):e=c[8];let o=eO.map(e);i="grid grid-cols-[repeat(2,min-content)_auto_min-content] gap-x-50 gap-y-100",n="Distribution",l="reviews-distribution.tsx",c[9]!==m||c[10]!==u?(a=e=>(0,r.jsxs)("div",{className:(0,q.default)("col-span-4 grid grid-cols-subgrid items-center",u!==e.rating&&u!==t&&"opacity-40",e.reviewCount&&"cursor-pointer"),onClick:()=>{if(!e.reviewCount)return;let r=u===e.rating?t:e.rating;m(r),(0,G.trackReviewsRatingFilter)(r)},children:[(0,r.jsx)(eh.IconStarFull,{className:"text-legacy-icon-warning"}),(0,r.jsx)(A.Text,{children:e.rating}),(0,r.jsx)(eP,{value:e.percentage,max:100,min:0,"aria-label":`${(0,eL.reviews__rating_rate_n_text_version)({count:e.rating})}: ${e.percentage}%`}),(0,r.jsxs)(A.Text,{children:["(",e.reviewCount,")"]})]},e.rating),c[9]=m,c[10]=u,c[11]=a):a=c[11],s=o.map(a),c[0]=m,c[1]=u,c[2]=null==d?void 0:d.distribution,c[3]=i,c[4]=n,c[5]=l,c[6]=s}else i=c[3],n=c[4],l=c[5],s=c[6];return c[12]!==i||c[13]!==n||c[14]!==l||c[15]!==s?(o=(0,r.jsx)("div",{className:i,"data-sentry-component":n,"data-sentry-source-file":l,children:s}),c[12]=i,c[13]=n,c[14]=l,c[15]=s,c[16]=o):o=c[16],o}var eE=e.i(761900);let eD=()=>{let e,t,i,n,l=(0,a.c)(4);return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("div",{className:"bg-surface-skeleton h-[48px] w-[48px] shrink-0 rounded-full"}),t=(0,r.jsx)("div",{className:"bg-surface-skeleton mb-25 h-125 w-[120px] rounded"}),l[0]=e,l[1]=t):(e=l[0],t=l[1]),l[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,r.jsxs)("div",{className:"mb-50 flex items-start justify-between gap-50",children:[(0,r.jsxs)("div",{className:"flex gap-50",children:[e,(0,r.jsxs)("div",{children:[t,(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-50",children:[(0,r.jsx)("div",{className:"flex gap-25",children:[void 0,void 0,void 0,void 0,void 0].map(eF)}),(0,r.jsx)("div",{className:"bg-surface-skeleton h-100 w-[96px] rounded"})]})]})]}),(0,r.jsx)("div",{className:"bg-surface-skeleton h-150 w-150 shrink-0 rounded"})]}),l[2]=i):i=l[2],l[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,r.jsxs)("div",{className:"rounded-50 border-border-card-outline animate-pulse border p-100","data-sentry-component":"ReviewSkeleton","data-sentry-source-file":"product-review.tsx",children:[i,(0,r.jsxs)("div",{className:"mt-25 space-y-75",children:[(0,r.jsx)("div",{className:"bg-surface-skeleton h-100 w-full rounded"}),(0,r.jsx)("div",{className:"bg-surface-skeleton h-100 w-full rounded"}),(0,r.jsx)("div",{className:"bg-surface-skeleton h-100 w-3/4 rounded"})]})]}),l[3]=n):n=l[3],n},ez=e=>{let t,i=(0,a.c)(2),{count:n}=e,l=void 0===n?2:n;return i[0]!==l?(t=(0,r.jsx)("div",{className:"mx-auto w-full space-y-100 p-100","data-sentry-component":"ProductReviewsSkeleton","data-sentry-source-file":"product-review.tsx",children:[...Array(l)].map(eq)}),i[0]=l,i[1]=t):t=i[1],t},eB=()=>{let e,t,i,n=(0,a.c)(3);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsxs)("div",{className:"flex items-center justify-center gap-75 md:flex-col",children:[(0,r.jsx)("div",{className:"bg-surface-skeleton h-200 w-200 rounded-full md:h-250 md:w-250"}
2),(0,r.jsx)("div",{className:"bg-surface-skeleton h-250 w-[64px] rounded md:h-125 md:w-[96px]"}),(0,r.jsx)("div",{className:"bg-surface-skeleton h-125 w-[96px] rounded"})]}),t=(0,r.jsx)("div",{className:"bg-surface-skeleton h-250 w-full rounded-full"}),n[0]=e,n[1]=t):(e=n[0],t=n[1]),n[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,r.jsxs)("div",{className:"flex animate-pulse flex-col gap-250 md:shrink-0 md:basis-[324px]","data-sentry-component":"ProductRatingsSkeleton","data-sentry-source-file":"product-review.tsx",children:[e,t,(0,r.jsx)("div",{className:"space-y-100",children:[5,4,3,2,1].map(eH)})]}),n[2]=i):i=n[2],i};function eF(e,t){return(0,r.jsx)("div",{className:"bg-surface-skeleton h-100 w-100 rounded"},t)}function eq(e,t){return(0,r.jsx)(eD,{},t)}function eH(e){return(0,r.jsxs)("div",{className:"flex items-center gap-75",children:[(0,r.jsx)("div",{className:"bg-surface-skeleton h-125 w-125 shrink-0 rounded"}),(0,r.jsx)("div",{className:"bg-surface-skeleton h-100 w-100 shrink-0 rounded"}),(0,r.jsx)("div",{className:"bg-surface-skeleton h-75 flex-1 rounded-full"}),(0,r.jsx)("div",{className:"bg-surface-skeleton h-100 w-[32px] shrink-0 rounded"})]},e)}var eV=e.i(632139);let eU=async e=>{try{let t=await fetch(`/api/products/${encodeURIComponent(e)}/rating-summary`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error(`Failed to fetch product rating summary for ${e}: ${t.statusText}`);return await t.json()}catch(e){return(0,c.captureException)(e),null}};function eK(e){return e.reviews}e.s(["ReviewsWithRateDistribution",0,e=>{var i,s;let o,c,d,u,m,p,f,h,v,y,S,_,b=(0,a.c)(35),{productId:w,productName:N,card:k}=e,[T,P]=(0,I.useState)(t),R=g(w,T),L=((S=(0,a.c)(7))[0]!==w?(h=[...n.queryKeys.user.reviews.productRatingSummary(w)],v=()=>eU(w),S[0]=w,S[1]=h,S[2]=v):(h=S[1],v=S[2]),_=!!w,S[3]!==h||S[4]!==v||S[5]!==_?(y={queryKey:h,queryFn:v,enabled:_,retry:2,staleTime:6e5},S[3]=h,S[4]=v,S[5]=_,S[6]=y):y=S[6],(0,x.useQuery)(y)),M=R.isLoading,O=L.isLoading,E=null==(s=R.data)||null==(i=s.pages)?void 0:i.flatMap(eK),D=L.data,z=!!(null==E?void 0:E.length);if(b[0]!==z||b[1]!==T?(o=()=>{T===t||z||P(t)},c=[T,z],b[0]=z,b[1]=T,b[2]=o,b[3]=c):(o=b[2],c=b[3]),(0,I.useEffect)(o,c),!M&&!O&&!z&&T===t){let e,t,a,i,n,s,o;return b[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(A.Text,{variant:"TitleSmall",children:((e={})=>(l.experimentalStaticLocale??e.locale??(0,l.getLocale)(),"Bli den første til å skrive en anmeldelse!"))()}),b[4]=e):e=b[4],b[5]!==N?(t=((e,t={})=>(l.experimentalStaticLocale??t.locale??(0,l.getLocale)(),`Hva synes du om ${null==e?void 0:e.name}?`))({name:N}),b[5]=N,b[6]=t):t=b[6],b[7]!==t?(a=(0,r.jsx)(A.Text,{variant:"BodySmall",children:t}),b[7]=t,b[8]=a):a=b[8],b[9]!==k||b[10]!==w?(i=eV.clientConfig.features.account.enabled&&(0,r.jsx)("div",{className:"mt-100",children:(0,r.jsx)(eu,{productId:w,card:k})}),b[9]=k,b[10]=w,b[11]=i):i=b[11],b[12]!==a||b[13]!==i?(n=(0,r.jsxs)("div",{className:"flex flex-col gap-50 md:shrink-0 md:basis-[324px]",children:[e,a,i]}),b[12]=a,b[13]=i,b[14]=n):n=b[14],b[15]===Symbol.for("react.memo_cache_sentinel")?(s=(0,r.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,r.jsx)("div",{className:"flex h-full flex-col items-center justify-center gap-100",children:(0,r.jsx)(eE.Image,{src:`${eV.clientConfig.general.cdnUrlBase}/g/rfe/illustrations/no-product-reviews-illustration-400x218px.png`,width:360,height:180})})}),b[15]=s):s=b[15],b[16]!==n?(o=(0,r.jsxs)("div",{className:"mt-200 flex w-full flex-col-reverse gap-250 md:flex-row md:items-stretch",children:[n,s]}),b[16]=n,b[17]=o):o=b[17],o}b[18]!==O?(d=O&&(0,r.jsx)(eB,{}),b[18]=O,b[19]=d):d=b[19],b[20]!==k||b[21]!==w||b[22]!==T||b[23]!==D||b[24]!==O?(u=!O&&D&&(0,r.jsx)(eM,{productId:w,selectedRate:T,onSelectRate:P,summary:D,controls:eV.clientConfig.features.account.enabled&&(0,r.jsx)(eu,{productId:w,card:k})}),b[20]=k,b[21]=w,b[22]=T,b[23]=D,b[24]=O,b[25]=u):u=b[25],b[26]!==M?(m=M&&(0,r.jsx)(ez,{}),b[26]=M,b[27]=m):m=b[27];let B=!M&&z&&(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)(A.Text,{variant:"Caption",className:"text-text-tertiary mb-75",children:((e={})=>(l.experimentalStaticLocale??e.locale??(0,l.getLocale)(),"Sortert etter siste anmeldelse"))()}),E.map(e=>(0,r.jsx)(H,{review:e,controls:eV.clientConfig.features.account.enabled?(0,r.jsx)(ef,{productId:w,review:e}):(0,r.jsx)(C,{reviewId:e.id})},e.id)),(0,r.jsx)(j,{productId:w,selectedRate:T})]});return b[28]!==m||b[29]!==B?(p=(0,r.jsxs)("div",{className:"flex flex-1 items-center justify-center",children:[m,B]}),b[28]=m,b[29]=B,b[30]=p):p=b[30],b[31]!==d||b[32]!==u||b[33]!==p?(f=(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"flex w-full flex-col gap-250 md:flex-row md:items-start",children:[d,u,p]})}),b[31]=d,b[32]=u,b[33]=p,b[34]=f):f=b[34],f}],559730)},132441,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(863741),i=e.i(95283),n=e.i(165749),l=e.i(873510);function s(e){let t={property:e.property,value:e.value,type:"list",scope:l.PageScope.PRODUCT,layout:"variant-selector"};"add"===e.action?(0,n.trackFilterSelectEvent)(t):(0,n.trackFilterRemoveEvent)(t)}var o=e.i(674215),c=e.i(889223);e.i(908169);var d=e.i(205153);e.i(900188);var u=e.i(702745),m=e.i(891701),p=e.i(882433),f=e.i(684973),h=e.i(798750),x=e.i(605990),v=e.i(782913),y=e.i(451915);let g=(e,t={})=>(y.experimentalStaticLocale??t.locale??(0,y.getLocale)(),`Velg ${null==e?void 0:e.name}`);var S=e.i(615379),_=e.i(870572),b=e.i(291911);function j(e){var a;
2let n,l,o,d,u,m,p,x,y,g,S,j,k,I,T,C=(0,r.c)(30),{attribute:P}=e,[R,L]=(0,b.useState)(!1),M=(n=(a=P.values).length<=5?a.length:4,l=a.slice(0,n),o=a.findIndex(e=>e.isSelected),(d=a[o])&&o>=n&&l.splice(-1,1,d),l),O=P.values.length-M.length;C[0]!==P.values?(u=P.values.find(w),C[0]=P.values,C[1]=u):u=C[1];let A=u,E=(0,_.useRouter)();C[2]!==P.canonicalName||C[3]!==P.resetHref||C[4]!==E?(m=function(e){e.isAvailable&&(s({action:e.isSelected?"remove":"add",property:P.canonicalName,value:e.displayValue}),E.push(e.isSelected?P.resetHref:e.href))},C[2]=P.canonicalName,C[3]=P.resetHref,C[4]=E,C[5]=m):m=C[5];let D=m;C[6]!==P.name?(p=(0,t.jsx)(f.Text,{variant:"TitleSmall",component:"span","data-sentry-element":"Text","data-sentry-source-file":"image.tsx",children:P.name}),C[6]=P.name,C[7]=p):p=C[7],C[8]!==(null==A?void 0:A.displayValue)?(x=(null==A?void 0:A.displayValue)||(0,v.product__variants_all)(),C[8]=null==A?void 0:A.displayValue,C[9]=x):x=C[9],C[10]!==x?(y=(0,t.jsx)(f.Text,{variant:"BodySmall",component:"span","data-sentry-element":"Text","data-sentry-source-file":"image.tsx",children:x}),C[10]=x,C[11]=y):y=C[11],C[12]!==p||C[13]!==y?(g=(0,t.jsxs)("p",{className:"mb-25 text-left",children:[p," ",y]}),C[12]=p,C[13]=y,C[14]=g):g=C[14],C[15]!==D?(S=e=>(0,t.jsxs)("div",{children:[e.isIndexable&&(0,t.jsx)("a",{"aria-hidden":"true",className:"hidden",href:e.href,children:e.displayValue}),(0,t.jsx)(h.Tooltip,{content:e.displayValue,children:(0,t.jsx)(i.Thumbnail,{size:"medium",src:e.image,highlighted:!0,selected:e.isSelected,disabled:!e.isAvailable,onClick:()=>D(e)})},e.displayValue)]},e.value),C[15]=D,C[16]=S):S=C[16];let z=M.map(S);return C[17]!==O?(j=O>0&&(0,t.jsxs)(c.Button,{variant:"outline",size:"large",forceRound:!0,className:"[&]:rounded-50",onClick:()=>L(!0),children:["+",O]}),C[17]=O,C[18]=j):j=C[18],C[19]!==z||C[20]!==j?(k=(0,t.jsxs)("div",{className:"flex gap-75",children:[z,j]}),C[19]=z,C[20]=j,C[21]=k):k=C[21],C[22]!==P||C[23]!==D||C[24]!==R?(I=R&&(0,t.jsx)(N,{attribute:P,onSelect:e=>{D(e),L(!1)},onClose:()=>L(!1)}),C[22]=P,C[23]=D,C[24]=R,C[25]=I):I=C[25],C[26]!==k||C[27]!==I||C[28]!==g?(T=(0,t.jsxs)("div",{"data-sentry-component":"ImageVariant","data-sentry-source-file":"image.tsx",children:[g,k,I]}),C[26]=k,C[27]=I,C[28]=g,C[29]=T):T=C[29],T}function w(e){return e.isSelected}function N(e){let i,n,s,c,h,v,y=(0,r.c)(16),{attribute:_,onSelect:b,onClose:j}=e;if(y[0]===Symbol.for("react.memo_cache_sentinel")?(i={scope:l.PageScope.HEADER,type:"variant-selector"},y[0]=i):i=y[0],y[1]!==_.name?(n=g({name:_.name.toLowerCase()}),y[1]=_.name,y[2]=n):n=y[2],y[3]!==n?(s=(0,t.jsx)(p.ModalHeader,{title:n,"data-sentry-element":"ModalHeader","data-sentry-source-file":"image.tsx"}),y[3]=n,y[4]=s):s=y[4],y[5]!==_.values||y[6]!==b){let e;y[8]!==b?(e=e=>(0,t.jsxs)("button",{disabled:!e.isAvailable,className:(0,S.default)("border-border-divider flex items-center gap-75 border-b px-150 py-100 last:border-none",e.isAvailable?"hover:bg-surface-hover":"cursor-not-allowed"),onClick:()=>b(e),children:[(0,t.jsx)(o.ProductImage,{sizeClassNames:(0,S.default)("box-content size-[40px] shrink-0 p-50",!e.isAvailable&&"opacity-50"),size:"small",src:e.image,className:"object-contain"}),(0,t.jsx)(f.Text,{variant:"BodySmall",className:(0,S.default)("text-left",!e.isAvailable&&"text-text-secondary line-through"),children:e.displayValue}),e.lowestPrice&&(0,t.jsxs)(f.Text,{variant:"BodySmall",className:"text-text-secondary ms-auto shrink-0",children:[(0,x.product__price_from_abbr)()," ",(0,t.jsx)(f.Text,{variant:"H5",component:"span",children:(0,a.formatScaledPrice)(e.lowestPrice)})]}),e.isAvailable&&(0,t.jsx)(d.IconChevronRight,{size:24})]},e.value),y[8]=b,y[9]=e):e=y[9],c=_.values.map(e),y[5]=_.values,y[6]=b,y[7]=c}else c=y[7];return y[10]!==c?(h=(0,t.jsx)(m.ModalBody,{className:"flex flex-col [&]:p-0","data-sentry-element":"ModalBody","data-sentry-source-file":"image.tsx",children:c}),y[10]=c,y[11]=h):h=y[11],y[12]!==j||y[13]!==s||y[14]!==h?(v=(0,t.jsxs)(u.Modal,{isOpen:!0,setIsOpen:j,trackingData:i,"data-sentry-element":"Modal","data-sentry-component":"ImageVariantModal","data-sentry-source-file":"image.tsx",children:[s,h]}),y[12]=j,y[13]=s,y[14]=h,y[15]=v):v=y[15],v}var k=e.i(151163);function I(e){let a,i,n,o,c,d,u,m,p,h,x,y,S=(0,r.c)(30),{attribute:b}=e,j=(0,_.useRouter)();S[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,v.product__variants_all)(),S[0]=a):a=S[0];let w=a;S[1]!==b.values?(i=b.values.find(C),S[1]=b.values,S[2]=i):i=S[2];let N=i;S[3]!==b.canonicalName||S[4]!==b.resetHref||S[5]!==b.values||S[6]!==j||S[7]!==N?(n=function(e){if(e){let t=b.values.find(t=>t.value===e);s({property:b.canonicalName,value:t.displayValue,action:"add"}),j.push(t.href);return}N&&(s({property:b.canonicalName,value:N.displayValue,action:"remove"}),j.push(b.resetHref))},S[3]=b.canonicalName,S[4]=b.resetHref,S[5]=b.values,S[6]=j,S[7]=N,S[8]=n):n=S[8];let I=n;S[9]!==b.name?(o=(0,t.jsxs)(f.Text,{variant:"TitleSmall","data-sentry-element":"Text","data-sentry-source-file":"text.tsx",children:[b.name," "]}),S[9]=b.name,S[10]=o):o=S[10];let P=(null==N?void 0:N.value)||"";S[11]===Symbol.for("react.memo_cache_sentinel")?(c={type:"variant-selector",scope:l.PageScope.HEADER},S[11]=c):c=S[11],S[12]!==b.name?(d=g({name:b.name.toLowerCase()}),S[12]=b.name,S[13]=d):d=S[13];let R=(null==N?void 0:N.displayValue)||w;return S[14]!==R?(u=(0,t.jsx)(k.AdaptiveSelect.Trigger,{variant:"outline",icon:"dropdownDown",iconPlacement:"end",className:"max-md:w-full max-md:justify-between","data-sentry-element":"AdaptiveSelect.Trigger","data-sentry-source-file":"text.tsx",children:R}),S[14]=R,S[15]=u):u=S[15],S[16]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)(k.AdaptiveSelect.Item,{value:"","data-sentry-element":"AdaptiveSelect.Item","data-sentry-source-file":"text.tsx",children:w}),S[16]=m):m=S[16],S[17]!==b.values?(p=b.values.map(T),S[17]=b.values,S[18]=p):p=S[18],S[19]!==p?(h=(0,t.jsxs)(k.AdaptiveSelect.Content,{className:"md:max-h-[300px] md:min-w-[150px]","data-sentry-element":"AdaptiveSelect.Content","data-sentry-source-file":"text.tsx",children:[m,p]}),S[19]=p,S[20]=h):h=S[20],S[21]!==I||S[22]!==h||S[23]!==P||S[24]!==d||S[25]!==u?(x=(0,t.jsxs)(k.AdaptiveSelect.Root,{value:P,onValueChange:I,trackingData:c,title:d,"data-sentry-element":"AdaptiveSelect.Root","data-sentry-source-file":"text.tsx",children:[u,h]}),S[21]=I,S[22]=h,S[23]=P,S[24]=d,S[25]=u,S[26]=x):x=S[26],S[27]!==x||S[28]!==o?(y=(0,t.jsxs)("div",{className:"flex items-center gap-50","data-sentry-component":"TextVariant","data-sentry-source-file":"text.tsx",children:[o,x]}),S[27]=x,S[28]=o,S[29]=y):y=S[29],y}function T(e){return(0,t.jsx)(k.AdaptiveSelect.Item,{value:e.value,disabled:!e.isAvailable,className:"block",children:e.displayValue},e.value)}function C(e){return e.isSelected}function P(e){return(0,t.jsxs)("div",{className:"flex flex-col gap-75",children:["image"===e.type&&(0,t.jsx)(j,{attribute:e}),"text"===e.type&&(0,t.jsx)(I,{attribute:e})]},e.id)}e.s(["VariantSelector",0,function(e){let a,i,n=(0,r.c)(4),{attributes:l}=e;return l.length?(n[0]!==l?(a=l.map(P),n[0]=l,n[1]=a):a=n[1],n[2]!==a?(i=(0,t.jsx)("div",{className:"flex w-full flex-col gap-100","data-sentry-component":"VariantSelector","data-sentry-source-file":"index.tsx",children:a}),n[2]=a,n[3]=i):i=n[3],i):null}],132441)},588660,e=>{"use strict";e.s(["Anchors",0,{ALL:"all",OFFERS:"prices",STATISTICS:"statistics",REVIEWS:"reviews",PROPERTIES:"properties",INSIGHTS:"insights"}])},172932,738356,e=>{"use strict";var t,r=e.i(291911),a=Symbol("Input"),i=function(){try{if("u"<typeof localStorage)return!1;let e="nuqs-localStorage-test";localStorage.setItem(e,e);let t=localStorage.getItem(e)===e;if(localStorage.removeItem(e),!t)return!1}catch(e){return console.error("[nuqs]: debug mode is disabled (localStorage unavailable).",e),!1}return(localStorage.getItem("debug")??"").includes("nuqs")}();function n(e,t,r){try{return e(t)}catch(e){return!function(e,...t){i&&console.warn(e,...t)}("[nuqs] Error while parsing value `%s`: %O"+(r?" (for key `%s`)":""),t,e,r),null}}function l(e){function t(t){if(void 0===t)return null;let r="";if(Array.isArray(t)){if(void 0===t[0])return null;r=t[0]}return"string"==typeof t&&(r=t),n(e.parse,r)}return{eq:(e,t)=>
2e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide:r=>t(r)??e}},withOptions(e){return{...this,...e}}}}l({parse:e=>e,serialize:e=>`${e}`});var s=l({parse:e=>{let t=parseInt(e);return Number.isNaN(t)?null:t},serialize:e=>Math.round(e).toFixed()});l({parse:e=>{let t=s.parse(e);return null===t?null:t-1},serialize:e=>s.serialize(e+1)}),l({parse:e=>{let t=parseInt(e,16);return Number.isNaN(t)?null:t},serialize:e=>{let t=Math.round(e).toString(16);return t.padStart(t.length+t.length%2,"0")}}),l({parse:e=>{let t=parseFloat(e);return Number.isNaN(t)?null:t},serialize:e=>e.toString()});var o=l({parse:e=>"true"===e,serialize:e=>e?"true":"false"});function c(e,t){return e.valueOf()===t.valueOf()}function d(e){return l({parse:t=>e.includes(t)?t:null,serialize:e=>e.toString()})}function u(e,t=","){let r=e.eq??((e,t)=>e===t),a=encodeURIComponent(t);return l({parse:r=>""===r?[]:r.split(t).map((r,i)=>n(e.parse,r.replaceAll(a,t),`[${i}]`)).filter(e=>null!=e),serialize:r=>r.map(r=>(e.serialize?e.serialize(r):String(r)).replaceAll(t,a)).join(t),eq:(e,t)=>e===t||e.length===t.length&&e.every((e,a)=>r(e,t[a]))})}l({parse:e=>{let t=parseInt(e);return Number.isNaN(t)?null:new Date(t)},serialize:e=>e.valueOf().toString(),eq:c}),l({parse:e=>{let t=new Date(e);return Number.isNaN(t.valueOf())?null:t},serialize:e=>e.toISOString(),eq:c}),l({parse:e=>{let t=new Date(e.slice(0,10));return Number.isNaN(t.valueOf())?null:t},serialize:e=>e.toISOString().slice(0,10),eq:c});var m=e.i(42659);let p={ProductId:"p",CreateAlert:"create_alert",Expand:"expand",Filters:"filters",List:"list",Modal:"modal"},f={Expand_Used:"used",Expand_Offers:"offers",Filter_PriceIncShipping:"price_inc_shipping",Filter_InStock:"in_stock",Filter_AuthorizedDealer:"authorized_dealer",List_MobileContract:"mobile-contract",Modal_CreateAlert:"create_alert",Modal_ProductCreateReview:"product-create-review",Modal_CreateList:"create_list"},h=l({parse:m.z.coerce.number().int().positive().nullable().parse,serialize:s.serialize});!function(e,{urlKeys:t={}}={}){(function(e,{urlKeys:t={}}={}){;})(e,{urlKeys:t}),(0,r.cache)(()=>({searchParams:{}}))}(Object.assign({[p.ProductId]:h.withDefault(-1),[p.CreateAlert]:o,[p.Expand]:u(d([f.Expand_Used,f.Expand_Offers]),",").withDefault([]),[p.Filters]:u(d([f.Filter_PriceIncShipping,f.Filter_InStock,f.Filter_AuthorizedDealer]),",").withDefault([]),[p.List]:u(d([f.List_MobileContract]),",").withDefault([]),[p.Modal]:d([f.Modal_CreateAlert,f.Modal_ProductCreateReview])},{})),e.s(["paramKeys",0,p,"paramValues",0,f],172932);var x=e.i(951135);function v(e,t,r){try{return e(t)}catch(e){return(0,x.warn)("[nuqs] Error while parsing value `%s`: %O"+(r?" (for key `%s`)":""),t,e,r),null}}var y=function(){if("u"<typeof window||!window.GestureEvent)return 50;try{var e;let t=null==(e=navigator.userAgent)?void 0:e.match(/version\/([\d\.]+) safari/i);return parseFloat(t[1])>=17?120:320}catch{return 320}}(),g=new Map,S={history:"replace",scroll:!1,shallow:!0,throttleMs:y},_=new Set,b=0,j=null;function w(e){function t(t){if(void 0===t)return null;let r="";if(Array.isArray(t)){if(void 0===t[0])return null;r=t[0]}return"string"==typeof t&&(r=t),v(e.parse,r)}return{eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide:r=>t(r)??e}},withOptions(e){return{...this,...e}}}}w({parse:e=>e,serialize:e=>`${e}`});var N=w({parse:e=>{let t=parseInt(e);return Number.isNaN(t)?null:t},serialize:e=>Math.round(e).toFixed()});function k(e,t){return e.valueOf()===t.valueOf()}w({parse:e=>{let t=N.parse(e);return null===t?null:t-1},serialize:e=>N.serialize(e+1)}),w({parse:e=>{let t=parseInt(e,16);return Number.isNaN(t)?null:t},serialize:e=>{let t=Math.round(e).toString(16);return t.padStart(t.length+t.length%2,"0")}}),w({parse:e=>{let t=parseFloat(e);return Number.isNaN(t)?null:t},serialize:e=>e.toString()}),w({parse:e=>"true"===e,serialize:e=>e?"true":"false"}),w({parse:e=>{let t=parseInt(e);return Number.isNaN(t)?null:new Date(t)},serialize:e=>e.valueOf().toString(),eq:k}),w({parse:e=>{let t=new Date(e);return Number.isNaN(t.valueOf())?null:t},serialize:e=>e.toISOString(),eq:k}),w({parse:e=>{let t=new Date(e.slice(0,10));return Number.isNaN(t.valueOf())?null:t},serialize:e=>e.toISOString().slice(0,10),eq:k});var I={all:t=t||new Map,on:function(e,r){var a=t.get(e);a?a.push(r):t.set(e,[r])},off:function(e,r){var a=t.get(e);a&&(r?a.splice(a.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var a=t.get(e);a&&a.slice().map(function(e){e(r)}),(a=t.get("*"))&&a.slice().map(function(t){t(e,r)})}};e.s(["useQueryState",0,function(e,{history:t="replace",shallow:a=!0,scroll:i=!1,throttleMs:n=y,parse:l=e=>e,serialize:s=String,eq:o=(e,t)=>e===t,defaultValue:c,clearOnDefault:d=!0,startTransition:u}={history:"replace",scroll:!1,shallow:!0,throttleMs:y,parse:e=>e,serialize:String,eq:(e,t)=>
2e===t,clearOnDefault:!0,defaultValue:void 0}){let m=(0,x.useAdapter)(),p=m.searchParams,f=(0,r.useRef)((null==p?void 0:p.get(e))??null),[h,w]=(0,r.useState)(()=>{let t=g.get(e),r=void 0===t?(null==p?void 0:p.get(e))??null:t;return null===r?null:v(l,r,e)}),N=(0,r.useRef)(h);(0,x.debug)("[nuqs `%s`] render - state: %O, iSP: %s",e,h,(null==p?void 0:p.get(e))??null),(0,r.useEffect)(()=>{let t=(null==p?void 0:p.get(e))??null;if(t===f.current)return;let r=null===t?null:v(l,t,e);(0,x.debug)("[nuqs `%s`] syncFromUseSearchParams %O",e,r),N.current=r,f.current=t,w(r)},[null==p?void 0:p.get(e),e]),(0,r.useEffect)(()=>{function t({state:r,query:a}){(0,x.debug)("[nuqs `%s`] updateInternalState %O",e,r),N.current=r,f.current=a,w(r)}return(0,x.debug)("[nuqs `%s`] subscribing to sync",e),I.on(e,t),()=>{(0,x.debug)("[nuqs `%s`] unsubscribing from sync",e),I.off(e,t)}},[e]);let k=(0,r.useCallback)((r,l={})=>{var p,f;let h,v="function"==typeof r?r(N.current??c??null):r;(l.clearOnDefault??d)&&null!==v&&void 0!==c&&o(v,c)&&(v=null);let w=(p=v,f={history:l.history??t,shallow:l.shallow??a,scroll:l.scroll??i,throttleMs:l.throttleMs??n,startTransition:l.startTransition??u},h=null===p?null:s(p),(0,x.debug)("[nuqs queue] Enqueueing %s=%s %O",e,h,f),g.set(e,h),"push"===f.history&&(S.history="push"),f.scroll&&(S.scroll=!0),!1===f.shallow&&(S.shallow=!1),f.startTransition&&_.add(f.startTransition),S.throttleMs=Math.max(f.throttleMs??y,Number.isFinite(S.throttleMs)?S.throttleMs:0),h);return I.emit(e,{state:v,query:w}),function({getSearchParamsSnapshot:e=function(){return new URLSearchParams(location.search)},updateUrl:t,rateLimitFactor:r=1}){return null===j&&(j=new Promise((a,i)=>{if(!Number.isFinite(S.throttleMs)){(0,x.debug)("[nuqs queue] Skipping flush due to throttleMs=Infinity"),a(e()),setTimeout(()=>{j=null},0);return}function n(){b=performance.now();let[r,n]=function({updateUrl:e,getSearchParamsSnapshot:t}){let r=t();if(0===g.size)return[r,null];let a=Array.from(g.entries()),i={...S},n=Array.from(_);for(let[e,t]of(g.clear(),_.clear(),S.history="replace",S.scroll=!1,S.shallow=!0,S.throttleMs=y,(0,x.debug)("[nuqs queue] Flushing queue %O with options %O",a,i),a))null===t?r.delete(e):r.set(e,t);try{var l,s;let t;return l=n,s=()=>{e(r,{history:i.history,scroll:i.scroll,shallow:i.shallow})},(t=e=>{if(e===l.length)return s();let r=l[e];if(!r)throw Error("Invalid transition function");r(()=>t(e+1))})(0),[r,null]}catch(e){return console.error((0,x.error)(429),a.map(([e])=>e).join(),e),[r,e]}}({updateUrl:t,getSearchParamsSnapshot:e});null===n?a(r):i(r),j=null}setTimeout(function(){let e=performance.now()-b,t=S.throttleMs,a=r*Math.max(0,Math.min(t,t-e));(0,x.debug)("[nuqs queue] Scheduling flush in %f ms. Throttled at %f ms",a,t),0===a?n():setTimeout(n,a)},0)})),j}(m)},[e,t,a,i,n,u,m.updateUrl,m.getSearchParamsSnapshot,m.rateLimitFactor]);return[h??c??null,k]}],738356)},239578,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(398198),i=e.i(615379),n=e.i(291911);let l={none:"p-0",small:"p-50",medium:"p-75",large:"p-100",xlarge:"p-150"},s={none:"rounded-0",small:"rounded-25",medium:"rounded-50",large:"rounded-75",xlarge:"rounded-100"};function o(e,t){return(0,n.isValidElement)(e)&&"object"==typeof e.props&&null!==e.props&&t in e.props}function c(e){let a,n,c,d,u,m,p,f,h,x=(0,r.c)(19);x[0]!==e?({children:a,className:n,padding:d,rounded:u,forceHover:m,...c}=e,x[0]=e,x[1]=a,x[2]=n,x[3]=c,x[4]=d,x[5]=u,x[6]=m):(a=x[1],n=x[2],c=x[3],d=x[4],u=x[5],m=x[6]);let v=void 0===d?"medium":d,y=void 0===u?"medium":u,g=void 0!==m&&m;if(x[7]!==a||x[8]!==g){var S;p=g||!!(S=a)&&(Array.isArray(S)?S.some(e=>o(e,"href")):o(S,"href")),x[7]=a,x[8]=g,x[9]=p}else p=x[9];let _=p;if(x[10]!==n||x[11]!==_||x[12]!==v||x[13]!==y){let e=(0,i.default)("border border-solid border-border-card-outline",!!_&&"hover:shadow-md transition-shadow duration-200 ease-in-out cursor-pointer",l[v],s[y]);f=(0,i.default)(e,n),x[10]=n,x[11]=_,x[12]=v,x[13]=y,x[14]=f}else f=x[14];return x[15]!==a||x[16]!==c||x[17]!==f?(h=(0,t.jsx)("div",{className:f,...c,"data-sentry-component":"Card","data-sentry-source-file":"index.tsx",children:a}),x[15]=a,x[16]=c,x[17]=f,x[18]=h):h=x[18],h}var d=e.i(761900),u=e.i(138488),m=e.i(684973),p=e.i(808609),f=e.i(907796);e.i(637094);var h=e.i(534237);function x(e){let a,i,n,l,s,o,c=(0,r.c)(14),{expert:x}=e;c[0]!==x.slug?(a=h.linkTo.expertsProfile(x.slug),c[0]=x.slug,c[1]=a):a=c[1];let v=a;return c[2]!==x.imageUrl||c[3]!==x.name?(i=x.imageUrl&&(0,t.jsx)("div",{className:"h-300 w-300 shrink-0 overflow-hidden rounded-full",children:(0,t.jsx)(d.Image,{src:(0,p.urlFor)(x.imageUrl).width(48).toString(),alt:x.name,className:"object-cover",sizes:"48px"})}),c[2]=x.imageUrl,c[3]=x.name,c[4]=i):i=c[4],c[5]===Symbol.for("react.memo_cache_sentinel")?(n={scope:f.InternalNavigationScope.EXPERT_PROFILE_GO_TO},c[5]=n):n=c[5],c[6]!==x.name?(l=(0,t.jsx)(m.Text,{variant:"BodyMedium","data-sentry-element":"Text","data-sentry-source-file":"expert-info.tsx",children:x.name}
2),c[6]=x.name,c[7]=l):l=c[7],c[8]!==v||c[9]!==l?(s=(0,t.jsx)(u.LinkWithTracking,{href:v,tracking:n,className:"hover:underline","data-sentry-element":"LinkWithTracking","data-sentry-source-file":"expert-info.tsx",children:l}),c[8]=v,c[9]=l,c[10]=s):s=c[10],c[11]!==i||c[12]!==s?(o=(0,t.jsxs)("div",{className:"flex items-center gap-100","data-sentry-component":"ExpertInfo","data-sentry-source-file":"expert-info.tsx",children:[i,s]}),c[11]=i,c[12]=s,c[13]=o):o=c[13],o}var v=e.i(956100);e.i(908169);var y=e.i(966902),g=e.i(973303);function S(e){let a,i,n,l=(0,r.c)(7),{positive:s,negative:o}=e;return(null==s?void 0:s.length)||(null==o?void 0:o.length)?(l[0]!==s?(a=null==s?void 0:s.map(b),l[0]=s,l[1]=a):a=l[1],l[2]!==o?(i=null==o?void 0:o.map(_),l[2]=o,l[3]=i):i=l[3],l[4]!==a||l[5]!==i?(n=(0,t.jsxs)("div",{className:"flex flex-col gap-50","data-sentry-component":"ProsAndCons","data-sentry-source-file":"pros-and-cons.tsx",children:[a,i]}),l[4]=a,l[5]=i,l[6]=n):n=l[6],n):null}function _(e,r){return(0,t.jsxs)("div",{className:"rounded-50 bg-surface-background-darker flex items-center gap-50 p-50",children:[(0,t.jsx)(y.IconDislikeOutlined,{size:20}),(0,t.jsx)(m.Text,{variant:"TitleMedium",children:e})]},r)}function b(e,r){return(0,t.jsxs)("div",{className:"rounded-50 bg-legacy-surface-brand-subtle flex items-center gap-50 p-50",children:[(0,t.jsx)(g.IconLikeOutlined,{size:20}),(0,t.jsx)(m.Text,{variant:"TitleMedium",children:e})]},r)}var j=e.i(890184),w=e.i(777662),N=e.i(415203),k=e.i(451915);let I=(e,t={})=>(k.experimentalStaticLocale??t.locale??(0,k.getLocale)(),`Nr. ${null==e?void 0:e.pos}`);var T=e.i(615117),C=e.i(674412);e.s(["ProductTopListCard",0,function(e){let l,s,o,p,h,y,g,_,b,P,R,L,M,O,A,E,D,z,B=(0,r.c)(44),{topList:F,currentProduct:q,position:H,product:V}=e,[U,K]=(0,n.useState)(!1);B[0]!==F.slug?(l=(0,C.getUrlByArticle)("topList",F.slug),B[0]=F.slug,B[1]=l):l=B[1];let $=l;return B[2]!==H||B[3]!==V.image||B[4]!==V.name?(s=V.image&&(0,t.jsxs)("div",{className:"relative flex min-h-[140px] shrink-0 items-center justify-center md:w-[20%]",children:[(0,t.jsx)(d.Image,{src:V.image,alt:V.name,width:400,height:400,className:"rounded-50 h-[140px] w-full object-contain"}),(0,t.jsx)(a.Badge,{size:"Normal",intent:"INFO",text:I({pos:H}),className:"absolute top-100 left-100"})]}),B[2]=H,B[3]=V.image,B[4]=V.name,B[5]=s):s=B[5],B[6]!==H||B[7]!==V.image?(o=!V.image&&(0,t.jsx)(a.Badge,{size:"Small",intent:"INFO",text:I({pos:H})}),B[6]=H,B[7]=V.image,B[8]=o):o=B[8],B[9]===Symbol.for("react.memo_cache_sentinel")?(p={scope:f.InternalNavigationScope.EXPERT_TOP_LIST},B[9]=p):p=B[9],B[10]===Symbol.for("react.memo_cache_sentinel")?(h=(0,T.expert__toplist_toplist)(),B[10]=h):h=B[10],B[11]!==F.title?(y=(0,t.jsxs)(m.Text,{variant:"H3","data-sentry-element":"Text","data-sentry-source-file":"product-top-list-card.tsx",children:[h,": ",F.title]}),B[11]=F.title,B[12]=y):y=B[12],B[13]!==$||B[14]!==y?(g=(0,t.jsx)(u.LinkWithTracking,{href:$,tracking:p,className:"hover:text-action","data-sentry-element":"LinkWithTracking","data-sentry-source-file":"product-top-list-card.tsx",children:y}),B[13]=$,B[14]=y,B[15]=g):g=B[15],B[16]!==o||B[17]!==g?(_=(0,t.jsxs)("div",{className:"flex flex-col gap-100",children:[o,g]}),B[16]=o,B[17]=g,B[18]=_):_=B[18],B[19]!==q.positive?(b=q.positive?[q.positive]:void 0,B[19]=q.positive,B[20]=b):b=B[20],B[21]!==q.negative?(P=q.negative?[q.negative]:void 0,B[21]=q.negative,B[22]=P):P=B[22],B[23]!==P||B[24]!==b?(R=(0,t.jsx)(S,{positive:b,negative:P,"data-sentry-element":"ProsAndCons","data-sentry-source-file":"product-top-list-card.tsx"}),B[23]=P,B[24]=b,B[25]=R):R=B[25],B[26]!==q.description||B[27]!==U?(L=q.description&&(0,t.jsxs)("div",{className:"flex flex-col gap-50",children:[(0,t.jsx)(v.MarkdownBodyMediumText,{className:(0,i.default)(!U&&"line-clamp-5","*:mb-100"),children:q.description}),(0,t.jsx)(m.Text,{variant:"BodyMedium",className:"text-action cursor-pointer self-start hover:underline",onClick:()=>K(!U),children:U?(0,N.common__button_show_less)():(0,w.common__button_read_more)()})]}),B[26]=q.description,B[27]=U,B[28]=L):L=B[28],B[29]!==F.expert?(M=F.expert&&(0,t.jsx)(x,{expert:F.expert}),B[29]=F.expert,B[30]=M):M=B[30],B[31]===Symbol.for("react.memo_cache_sentinel")?(O={scope:f.InternalNavigationScope.EXPERT_TOP_LIST},B[31]=O):O=B[31],B[32]===Symbol.for("react.memo_cache_sentinel")?(A=((e={})=>(k.experimentalStaticLocale??e.locale??(0,k.getLocale)(),"Se hele topplisten"))(),B[32]=A):A=B[32],B[33]!==$?(E=(0,t.jsx)(j.ButtonLinkWithTracking,{href:$,tracking:O,variant:"outline","data-sentry-element":"ButtonLinkWithTracking","data-sentry-source-file":"product-top-list-card.tsx",children:A}),B[33]=$,B[34]=E):E=B[34],B[35]!==R||B[36]!==L||B[37]!==M||B[38]!==E||B[39]!==_?(D=(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-150",children:[_,R,L,M,E]}),B[35]=R,B[36]=L,B[37]=M,B[38]=E,B[39]=_,B[40]=D):D=B[40],B[41]!==D||B[42]!==s?(z=(0,t.jsx)(c,{padding:"medium",rounded:"xlarge",className:"border-border-card-outline bg-surface-card","data-sentry-element":"Card","data-sentry-component":"ProductTopListCard","data-sentry-source-file":"product-top-list-card.tsx",children:(0,t.jsxs)("div",{className:"flex flex-col gap-150 md:flex-row",children:[s,D]})}),B[41]=D,B[42]=s,B[43]=z):z=B[43],z}
2],239578)},644438,e=>{"use strict";var t=e.i(262757),r=e.i(748922),a=e.i(21420),i=e.i(991669),n=e.i(684973),l=e.i(899929),s=e.i(907796),o=e.i(615379),c=e.i(291911);let d={scope:s.InternalNavigationScope.PRODUCT_TAB_BAR},u=e=>{let c,u,m,p,f=(0,r.c)(13),{title:h,id:x,active:v,className:y,scrollToTop:g}=e,S=g?"#":`#${x}`;f[0]!==S||f[1]!==g?(c=function(e){if(g){e.preventDefault(),(0,a.scrollToTop)("smooth");return}(0,s.trackInternalNavigationClick)({...d,nextPage:(0,l.getTrackingNextPage)(S)})},f[0]=S,f[1]=g,f[2]=c):c=f[2];let _=c,b=v&&"shadow-inner-bottom shadow-surface-brand no-underline hover:text-inherit";return f[3]!==y||f[4]!==b?(u=(0,o.default)("text-text-tertiary hover:text-text-secondary m-auto inline-block h-full w-fit cursor-pointer px-10 text-center whitespace-nowrap transition-shadow hover:no-underline",b,y),f[3]=y,f[4]=b,f[5]=u):u=f[5],f[6]!==h?(m=(0,t.jsx)(n.Text,{variant:"TitleSmall",className:"inline-block p-100","data-sentry-element":"Text","data-sentry-source-file":"anchor-tabs.tsx",children:h}),f[6]=h,f[7]=m):m=f[7],f[8]!==_||f[9]!==S||f[10]!==u||f[11]!==m?(p=(0,t.jsx)("li",{className:"m-0 list-none p-0","data-sentry-component":"AnchorTab","data-sentry-source-file":"anchor-tabs.tsx",children:(0,t.jsx)(i.Link,{className:u,href:S,onClick:_,children:m})}),f[8]=_,f[9]=S,f[10]=u,f[11]=m,f[12]=p):p=f[12],p};function m(e){return document.getElementById(e)}function p(e){return null!==e}function f(e){return e.id}e.s(["AnchorNavbar",0,e=>{let a,i,n,l,s,d=(0,r.c)(14),{className:h,tabs:x,topMargin:v}=e;d[0]!==x?(a=x.map(f),d[0]=x,d[1]=a):a=d[1];let y=((e,t)=>{let a,i,n=(0,r.c)(4),[l,s]=(0,c.useState)(void 0);return n[0]!==e||n[1]!==t?(a=()=>{let r=e.map(m).filter(p),a=new Set,i=new IntersectionObserver(t=>{for(let e of t)e.isIntersecting?a.add(e.target.id):a.delete(e.target.id);s(e.find(e=>a.has(e))??"")},{rootMargin:`-${t}px 0px 0px 0px`});return r.forEach(e=>i.observe(e)),()=>{i.disconnect()}},i=[e,t],n[0]=e,n[1]=t,n[2]=a,n[3]=i):(a=n[2],i=n[3]),(0,c.useEffect)(a,i),l})(a,v);if(d[2]!==h?(i=(0,o.default)("border-border-divider bg-surface-background-lighter flex h-(--tab-nav-height) max-w-[100vw] border-b max-md:overflow-x-auto",h),d[2]=h,d[3]=i):i=d[3],d[4]!==y||d[5]!==x){let e;d[7]!==y?(e=e=>(0,t.jsx)(u,{...e,active:y===e.id},e.id),d[7]=y,d[8]=e):e=d[8],n=x.map(e),d[4]=y,d[5]=x,d[6]=n}else n=d[6];return d[9]!==n?(l=(0,t.jsx)("ul",{className:"contents",children:n}),d[9]=n,d[10]=l):l=d[10],d[11]!==i||d[12]!==l?(s=(0,t.jsx)("nav",{className:i,"data-sentry-component":"AnchorNavbar","data-sentry-source-file":"anchor-tabs.tsx",children:l}),d[11]=i,d[12]=l,d[13]=s):s=d[13],s}])},854880,e=>{"use strict";var t=e.i(451915);e.s(["product__price_history_no_data",0,(e={},r={})=>(t.experimentalStaticLocale??r.locale??(0,t.getLocale)(),"Det finnes ingen prishistorikk for dette produktet")])},504877,e=>{"use strict";var t=e.i(451915);e.s(["product__product_compare_compare_products",0,(e={},r={})=>(t.experimentalStaticLocale??r.locale??(0,t.getLocale)(),"Sammenlign produkter")])}]);
3
4//# debugId=26aa79bc-8ab8-0cac-69fa-55b5a214beaa

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.