1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7626],{68974:e=>{e.exports={section:"ProductTabSlider_section__9oDBL",skeletonSection:"ProductTabSlider_skeletonSection__LwAN8",skeletonTabs:"ProductTabSlider_skeletonTabs__5ir0K",skeletonTab:"ProductTabSlider_skeletonTab__YaonH",skeletonCard:"ProductTabSlider_skeletonCard__9QXZz",skeletonImage:"ProductTabSlider_skeletonImage__lPMNU",skeletonBody:"ProductTabSlider_skeletonBody__Ic8SC",skeletonLine:"ProductTabSlider_skeletonLine__MwrUZ",skeletonBrand:"ProductTabSlider_skeletonBrand__zIJ8I",skeletonName:"ProductTabSlider_skeletonName__kbYyF",skeletonPrice:"ProductTabSlider_skeletonPrice__52iBx",skeletonChips:"ProductTabSlider_skeletonChips__IeE64",skeletonBtn:"ProductTabSlider_skeletonBtn__C_jrP",skeletonChip:"ProductTabSlider_skeletonChip__mAZR5",ptsShimmer:"ProductTabSlider_ptsShimmer__BqVvZ",header:"ProductTabSlider_header__N8_Hm",title:"ProductTabSlider_title__hJCtr",tabsWrap:"ProductTabSlider_tabsWrap__bD_fZ",tabsWrapFadeLeft:"ProductTabSlider_tabsWrapFadeLeft__cK_Wz",tabsWrapFadeRight:"ProductTabSlider_tabsWrapFadeRight__70Do0",tabs:"ProductTabSlider_tabs__dl2Yr",tab:"ProductTabSlider_tab__P8zDT",tabActive:"ProductTabSlider_tabActive__RXE2B",sliderWrap:"ProductTabSlider_sliderWrap__Z66Ls",controlBtn:"ProductTabSlider_controlBtn__6tNlg",prev:"ProductTabSlider_prev__d1Rfb",next:"ProductTabSlider_next__3BPKd",controlBtnDisabled:"ProductTabSlider_controlBtnDisabled__rM_ux",more:"ProductTabSlider_more__ea4wh",viewport:"ProductTabSlider_viewport__RD03m",container:"ProductTabSlider_container__0A1Kw",slide:"ProductTabSlider_slide__5qlt7",slideVisible:"ProductTabSlider_slideVisible__UxghJ"}},87626:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>f});var a=r(95155),l=r(12115),n=r(2821),s=r(12758),i=r.n(s),o=r(64512),c=r(37818),d=r(72687),u=r(36157),b=r(1688),_=r(3418),m=r(68974),p=r.n(m);let v=(0,l.forwardRef)(function(e,t){let{className:r="",classes:l="",title:s,tabCount:i=4,cardCount:c=5}=e,d=function(e,t){for(var a=arguments.length,s=Array(a>2?a-2:0),i=2;i<a;i++)s[i-2]=arguments[i];return(0,n.A)(e,"".concat(r).concat(t||""),{["".concat(l).concat(t)]:l&&""!==l},...s)};return(0,a.jsxs)("section",{ref:t,className:d(p().section,"",p().skeletonSection),"aria-busy":"true",children:[(0,a.jsxs)("div",{className:d(p().header,"Header"),children:[s&&(0,a.jsx)(o.Ay,{className:d(p().title,"Title"),options:{forceBlock:!0,wrapper:"div"},children:String(s)}),(0,a.jsx)("div",{className:d(p().tabs,"Tabs",p().skeletonTabs),"aria-hidden":"true",children:Array.from({length:i}).map((e,t)=>(0,a.jsx)("span",{className:p().skeletonTab},t))})]}),(0,a.jsx)("div",{className:d(p().viewport,"Viewport"),children:(0,a.jsx)("div",{className:d(p().container,"Container"),children:Array.from({length:c}).map((e,t)=>(0,a.jsx)("div",{className:d(p().slide,"Slide"),style:{opacity:1,transform:"none"},children:(0,a.jsxs)("div",{className:p().skeletonCard,"aria-hidden":"true",children:[(0,a.jsx)("div",{className:p().skeletonImage}),(0,a.jsxs)("div",{className:p().skeletonBody,children:[(0,a.jsx)("div",{className:(0,n.A)(p().skeletonLine,p().skeletonBrand)}),(0,a.jsx)("div",{className:(0,n.A)(p().skeletonLine,p().skeletonName)}),(0,a.jsxs)("div",{className:p().skeletonChips,children:[(0,a.jsx)("span",{className:p().skeletonChip}),(0,a.jsx)("span",{className:p().skeletonChip}),(0,a.jsx)("span",{className:p().skeletonChip})]}),(0,a.jsx)("div",{className:(0,n.A)(p().skeletonLine,p().skeletonPrice)}),(0,a.jsx)("div",{className:p().skeletonBtn})]})]})},t))})})]})});v.propTypes={className:i().string,classes:i().string,title:i().string,tabCount:i().number,cardCount:i().number};let h=e=>{var t,r;let{children:s,classes:i="",elementName:m,data:h={}}=e,f=(0,l.useMemo)(()=>{var e;return(null==(e=l.Children.toArray(s)[0])?void 0:e.props)||null},[s]),{title:T="Akcije",moreHref:S,moreLabel:g="Pogledaj sve",tabs:k=[],visibilityMargin:x}=h,N=(0,l.useMemo)(()=>{let{title:e,moreHref:t,moreLabel:r,tabs:a,variantId:l,visibilityMargin:n,...s}=h;return s},[h]),{onGetProducts:P}=(0,u.nm)()||{},y=function(e,t){for(var r=arguments.length,a=Array(r>2?r-2:0),l=2;l<r;l++)a[l-2]=arguments[l];
1return(0,n.A)(e,"".concat(m).concat(t||""),{["".concat(i).concat(t)]:i&&""!==i},...a)},j=(0,l.useMemo)(()=>{if(Array.isArray(k))return k;if("string"==typeof k)try{let e=JSON.parse(k);return Array.isArray(e)?e:[]}catch(e){}return[]},[k]),[C,w]=(0,l.useState)([]),[A,B]=(0,l.useState)(0),[L,W]=(0,l.useState)(!1),[F,E]=(0,l.useState)(!1),[D,M]=(0,l.useState)(0),R=(0,l.useRef)(null),I=(0,l.useMemo)(()=>{if("string"==typeof x&&x.trim().split(/\s+/).length>1)return x.trim();let e="string"==typeof x?x.trim().replace(/px$/i,""):x,t=Number(e),r=""!==e&&null!=e&&Number.isFinite(t)?Math.trunc(t):200;return r<0&&(r=Math.max(r,-Math.max(window.innerHeight-100,0))),"0px 0px ".concat(r,"px 0px")},[x]),z=(0,b.A)(R,I,!0),H=(0,l.useRef)(!1),V=(0,l.useRef)(null),[Z,q]=(0,l.useState)({left:!1,right:!1});(0,l.useEffect)(()=>{let e=V.current;if(!e)return;let t=()=>{let t=e.scrollWidth-e.clientWidth,r=t>1&&e.scrollLeft>1,a=t>1&&e.scrollLeft<t-1;q(e=>e.left===r&&e.right===a?e:{left:r,right:a})};return t(),e.addEventListener("scroll",t,{passive:!0}),window.addEventListener("resize",t),()=>{e.removeEventListener("scroll",t),window.removeEventListener("resize",t)}},[L,C]),(0,l.useEffect)(()=>{if(!z||H.current||!j.length||"function"!=typeof P)return;let e=!1;return(async()=>{let t=await Promise.all(j.map(async e=>{try{let t=await P(e.query),r=(null==t?void 0:t.products)||[];return{...e,products:r}}catch(t){return console.error("ProductTabSlider fetch error",t),{...e,products:[]}}}));if(e)return;let r=t.filter(e=>{var t;return(null==(t=e.products)?void 0:t.length)>0});H.current=!0,w(r),B(0),W(!0)})(),()=>{e=!0}},[z,j,P]);let[O,U]=(0,c.A)({align:"start",containScroll:"trimSnaps",dragFree:!0}),J=(0,l.useRef)(1);(0,l.useEffect)(()=>{var e;if(!window.matchMedia)return;let t=window.matchMedia("(min-width: 960px)"),r=()=>{J.current=t.matches?2:1};return r(),null==(e=t.addEventListener)||e.call(t,"change",r),()=>{var e;return null==(e=t.removeEventListener)?void 0:e.call(t,"change",r)}},[]);let K=(0,l.useCallback)(e=>{if(!U)return;let t=U.selectedScrollSnap();U.scrollTo(t+e*J.current)},[U]),[Y,X]=(0,l.useState)(!0),[Q,$]=(0,l.useState)(!0),G=(0,l.useCallback)(()=>{U&&(X(!U.canScrollPrev()),$(!U.canScrollNext()))},[U]);if((0,l.useEffect)(()=>{if(U)return G(),U.on("select",G).on("reInit",G),()=>{U.off("select",G).off("reInit",G)}},[U,G]),(0,l.useEffect)(()=>{U&&(U.scrollTo(0,!0),U.reInit())},[U,A,C]),(0,l.useEffect)(()=>{if(!L)return;E(!1),M(e=>e+1);let e=0,t=requestAnimationFrame(()=>{e=requestAnimationFrame(()=>E(!0))});return()=>{cancelAnimationFrame(t),e&&cancelAnimationFrame(e)}},[L]),!L)return(0,a.jsx)(v,{ref:R,className:m,classes:i,title:T});if(0===C.length)return null;let ee=(null==(t=C[A])?void 0:t.products)||[],et=(null==(r=C[A])?void 0:r.href)||S;return(0,a.jsxs)("section",{className:y(p().section,""),children:[(0,a.jsxs)("div",{className:y(p().header,"Header"),children:[T&&(0,a.jsx)(o.Ay,{className:y(p().title,"Title"),options:{forceBlock:!0,wrapper:"div"},children:String(T)}),(0,a.jsx)("div",{className:y(p().tabsWrap,"TabsWrap",{[p().tabsWrapFadeLeft]:Z.left,["".concat(m,"TabsWrapFadeLeft")]:Z.left,["".concat(i,"TabsWrapFadeLeft")]:i&&""!==i&&Z.left,[p().tabsWrapFadeRight]:Z.right,["".concat(m,"TabsWrapFadeRight")]:Z.right,["".concat(i,"TabsWrapFadeRight")]:i&&""!==i&&Z.right}),children:(0,a.jsx)("div",{className:y(p().tabs,"Tabs"),ref:V,children:C.map((e,t)=>{let r=t===A;return(0,a.jsx)("button",{type:"button",className:y(p().tab,"Tab",{[p().tabActive]:r,["".concat(m,"TabActive")]:r,["".concat(i,"TabActive")]:i&&""!==i&&r}),onClick:()=>B(t),children:e.label},"".concat(e.label,"-").concat(t))})})}),et&&(0,a.jsxs)("a",{className:y(p().more,"More"),href:et,children:[g," â"]})]}),(0,a.jsxs)("div",{className:y(p().sliderWrap,"SliderWrap"),children:[(0,a.jsx)("div",{className:y(p().viewport,"Viewport"),ref:O,children:(0,a.jsx)("div",{className:y(p().container,"Container"),children:ee.map((e,t)=>(0,a.jsx)("div",{className:y(p().slide,"Slide",{[p().slideVisible]:F}),style:{transitionDelay:"".concat(.04*(t+1),"s")},children:(0,a.jsx)(d.default,{classes:i?"".concat(i,"Card"):"",elementName:"".concat(m,"Card"),data:{...N,variant:"compact",productId:null==e?void 0:e.id,productC
1ode:null==e?void 0:e.code,name:null==e?void 0:e.name,imageUrl:null==e?void 0:e.imageUrl,filters:(null==e?void 0:e.productDataTypeFilters)||{},variants:(null==e?void 0:e.variants)||[],tags:(null==e?void 0:e.tags)||[],catalogTags:(null==e?void 0:e.catalogTags)||[],prices:(null==e?void 0:e.prices)||[],rating:null==e?void 0:e.reviewScore,reviewCount:null==e?void 0:e.reviewCount,brand:(null==e?void 0:e["proizvoÄaÄ"])||(null==e?void 0:e.brand),slug:null==e?void 0:e.slug,availableOnline:null==e?void 0:e.availableOnline},children:f&&(0,a.jsx)(_.A,{element:f,items:e})})},"".concat(D,"-").concat((null==e?void 0:e.id)||t)))})}),(0,a.jsx)("button",{type:"button",className:y(p().controlBtn,"ControlBtn",p().prev,{[p().controlBtnDisabled]:Y,["".concat(m,"ControlBtnDisabled")]:Y,["".concat(i,"ControlBtnDisabled")]:i&&""!==i&&Y}),onClick:()=>K(-1),disabled:Y,"aria-label":"Previous",children:"â¹"}),(0,a.jsx)("button",{type:"button",className:y(p().controlBtn,"ControlBtn",p().next,{[p().controlBtnDisabled]:Q,["".concat(m,"ControlBtnDisabled")]:Q,["".concat(i,"ControlBtnDisabled")]:i&&""!==i&&Q}),onClick:()=>K(1),disabled:Q,"aria-label":"Next",children:"âº"})]})]})};h.propTypes={classes:i().string,elementName:i().string,data:i().shape({title:i().string,moreHref:i().string,moreLabel:i().string,tabs:i().oneOfType([i().array,i().string]),visibilityMargin:i().oneOfType([i().number,i().string]),whitelistTags:i().string})};let f=h}}]);
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.