PageSourceSearch

https://www.nikon.ch/dist-client/ProductCarousel-Chunk-48f63b6954f57e2c93b1.js

js nikon.ch collected 2026-09-26 05:23:23 UTC 7,602 bytes, 2 lines download raw bytes

1"use strict";(globalThis.webpackChunknikon_client=globalThis.webpackChunknikon_client||[]).push([[2330,5298,5763],{10466(e,t,a){a.d(t,{A:()=>v});var r=a(2511),i=a(97729),l=a(11183),n=a(64363),o=a(8933),c=a(80372),s=a(16014),d=a(39418),u=a(55169),m=a(20973),p=a(26093),f=a(97500),h=a.n(f),g=a(59471);const v=({addToBasketLabel:e,buyNowLink:t,category:a,className:f,fromPriceLabel:v,hidePriceFromSavePill:b,image:x,learnMoreLink:C,name:y,newProductLabel:P,pricingData:w,productNameClasses:A,savePriceLabel:k,shippingLabel:E,sku:R,statusLabels:L,tabletImageContainerHeight:N,thumbnail:T,trackingData:S,useShortCardOnMobile:I=!1,vatLabel:j,dataTestId:F,onAddToCart:O})=>{const[D,M]=(0,g.useState)(!1),$=(0,p.A)(1440),[B,W]=(0,g.useState)(0),z=(0,g.useRef)(null),H=JSON.stringify(S??""),_=e=>{S&&(0,u.A)({event:"intentToBuy",content_type:e,items:[(0,m.A)(S)]})},q=()=>{S&&(0,u.A)({event:"selectItem",ecommerce:{currency:S.currency,items:[(0,m.A)(S)]}})};(0,g.useEffect)(()=>{W(z.current?.clientHeight||0)},[]);const G={hover:{y:-B},initial:{y:0}},J={hover:{opacity:1},initial:{opacity:$?1:0}};return React.createElement("div",{onFocus:()=>M(!0),onBlur:()=>M(!1),onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),"track-product-impression":"true","data-product":H,className:h()("pointer-events-auto relative flex h-full w-full flex-col justify-end gap-5 overflow-hidden rounded-[10px] bg-grey-200 px-5 py-8 xl:px-7 xl:py-15 dark:bg-grey-600",f),"data-testid":F},x&&React.createElement(l.A,{image:x,classes:"z-5 absolute top-0 right-0 left-0 m-2.5 md:m-5",imageClasses:"rounded-[10px] object-contain"}),(k||P||L)&&React.createElement("div",{className:"absolute top-0 left-0 z-20 flex w-full flex-row flex-wrap gap-4 p-5"},React.createElement(d.A,{dataTestId:"Product-Card-Tag",hidePriceFromSavePill:b,newProductLabel:P,pricingData:w,savePriceLabel:k,statusLabels:L})),React.createElement("div",{className:h()("relative flex h-full w-full flex-col lg:gap-4 2xl:gap-7.5",I?"gap-4":"gap-8")},React.createElement(n.A,{initial:"initial",className:h()("relative flex h-[254px] w-full shrink-0 items-center justify-center lg:h-[220px] xl:h-[250px] xl:pb-10 2xl:h-[300px]",N||"md:h-[165px]"),animate:D&&!$?"hover":"initial",variants:{hover:{y:-15,scale:1.1},initial:{y:0,scale:1}},transition:c.am},T&&React.createElement("a",{href:C?.url||t?.url,onClick:()=>{C?.url?_("product picture"):t?.url&&q()},"aria-label":y,className:"flex h-full w-full"},React.createElement(l.A,{image:T,classes:"z-10 w-full h-full",imageClasses:"w-full h-full object-contain",sizes:"(max-width: 768px) 376px, 500px",dataTestId:"Product-Card-Image"}),React.createElement(n.A,{initial:"initial",animate:D&&!$?"hover":"initial",variants:{hover:{opacity:.2},initial:{opacity:0}
1},className:"pointer-events-none absolute top-10 left-0 z-0 flex h-full scale-150 items-center justify-center"},React.createElement(r.A,{colour:s.A.Yellow,className:"hidden w-full object-contain dark:block"})))),React.createElement(n.A,{initial:"initial",animate:D&&!$?"hover":"initial",variants:G,transition:c.am,className:"relative flex w-full grow flex-col items-center justify-center gap-3 dark:text-white"},a&&React.createElement("p",{className:"body-two text-center","data-testid":"Product-Card-Category"},a),y&&React.createElement("p",{className:h()("h5 pb-7.5 text-center",A),"data-testid":"Product-Card-Name"},y),w?.formattedCalculatedPrice&&React.createElement(o.A,{pricingData:w,vatLabel:j,shippingLabel:E,fromPriceLabel:v,centerText:!0,containerClassName:"mt-auto",dataTestId:"Product-Card-Price-Display-Text"}),React.createElement(n.A,{initial:"initial",animate:D&&!$?"hover":"initial",variants:J,transition:{duration:.3},ref:z,className:h()("flex flex-col flex-wrap items-center justify-center gap-5 xl:absolute xl:top-full xl:flex-row xl:gap-[10px]",I?"pt-2":"pt-5"),"data-testid":"Product-Card-Item-Hover"},C?.name&&C?.url&&React.createElement(i.A,{link:C,secondary:!0,linkCallback:()=>_(C.name||"Learn more"),dataTestId:"Product-Card-Learn More"}),t?.url&&t?.name&&React.createElement("a",{href:t.url,"track-product-click":"true","data-product":H,className:"cta primary","data-testid":"Product-Card-Buy-Now",onClick:q},t.name),!(t?.url&&t?.name)&&e&&R&&O&&React.createElement(i.A,{onClick:()=>O(R),dataTestId:"Product-Card-Add-To-Cart"},e)))))}},21974(e,t,a){a.r(t),a.d(t,{default:()=>f});var r=a(64363),i=a(87529),l=a(10466),n=a(22715),o=a(40736),c=a(97500),s=a.n(c),d=a(32088),u=a(59471),m=a(90683);function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)({}).hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},p.apply(null,arguments)}const f=({title:e="",items:t,isScrollAnimationEnabled:a=!1,embedded:c=!1,headerWrapperClassName:f,headerSlot:h,meta:g,anchorId:v="featured-product-carousel"})=>{const{productPageContent:b}=(0,n.A)(),{compatibleProducts:x}=b,C=(0,u.useRef)(null),y=(0,d.W)(C,{amount:.25}),[P,w]=(0,u.useState)(!1),A=void 0===x?t:x?.items??[];return(0,u.useEffect)(()=>{y&&w(!0)},[y]),A?.length?React.createElement("section",{ref:C,className:s()({"component-padding":!c},"bg-white text-black-100 dark:bg-black-100 dark:text-white"),id:`a-${v}`,"data-testid":"CT-35-Product-Carousel-Block"},React.createElement(i.A,{id:`product-carousel-${g?.contentLink??""}`,items:A,shadows:!0,slidesToShowDesktop:4,title:x?.title??e,headerWrapperClassName:a?"container":f,headerSlot:h,isScrollAnimationEnabled:a,isSoftLoadAnimationDisabled:c,isLoadedInView:P},e=>e.map(({ariaHidden:e,ariaLabel:t,...i},n)=>React.createElement(m.qr,{key:(0,o.A)(`${i.name}-${n}`),className:"stretch-card","aria-hidden":e,"aria-label":t},a?React.createElement(r.A,{className:"h-full",initial:{opacity:0,x:100},animate:P?{opacity:1,x:0}:{},transition:{duration:.75,ease:"easeInOut",delay:.2*(n+1)}},React.createElement(l.A,p({},i,{hidePriceFromSavePill:i.hidePriceFromSavePill,dataTestId:`CT-35-Product-Carousel-Card-${n}`}))):React.createElement(l.A,p({},i,{hidePriceFromSavePill:i.hidePriceFromSavePill,dataTestId:`CT-35-Product-Carousel-Card-${n}`})))))):null}},22715(e,t,a){a.d(t,{A:()=>r});const r=(0,a(44285).A)(e=>({productPageContent:{awardsCarousel:void 0,breadcrumbs:void 0,cardCarousel:void 0,customerQuotes:void 0,compatibleProducts:void 0,extendedWarrantyCTAFeature:void 0,featuredImageGallery:void 0,includedAccessories:void 0,optionalAccessories:void 0,productFootnote:void 0,productOverview:void 0,subheaderStatementCards:void 0,tabbedProductsCrossSellList:void 0,technicalSpecifications:void 0},setProductPageContent:t=>e({productPageContent:t})}))},40736(e,t,a){a.d(t,{A:()=>r});const r=e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/(?:^-+|-+$)/g,"")},32088(e,t,a){a.d(t,{W:()=>n});var r=a(59471),i=a(20818);const l={some:0,all:1};function n(e,{root:t,margin:a,amount:n,once:o=!1,initial:c=!1}={}){const[s,d]=(0,r.useState)(c);return(0,r.useEffect)(()=>
1{if(!e.current||o&&s)return;const r={root:t&&t.current||void 0,margin:a,amount:n};return function(e,t,{root:a,margin:r,amount:n="some"}={}){const o=(0,i.K)(e),c=new WeakMap,s=new IntersectionObserver(e=>{e.forEach(e=>{const a=c.get(e.target);if(e.isIntersecting!==Boolean(a))if(e.isIntersecting){const a=t(e.target,e);"function"==typeof a?c.set(e.target,a):s.unobserve(e.target)}else"function"==typeof a&&(a(e),c.delete(e.target))})},{root:a,rootMargin:r,threshold:"number"==typeof n?n:l[n]});return o.forEach(e=>s.observe(e)),()=>s.disconnect()}(e.current,()=>(d(!0),o?void 0:()=>d(!1)),r)},[t,e,a,o,n]),s}}}]);
2//# sourceMappingURL=ProductCarousel-Chunk-48f63b6954f57e2c93b1.js.map

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.