PageSourceSearch

https://www.nikon.ch/dist-client/ProductNavigation-Chunk-4640bcb1de02d7b8002d.js

js nikon.ch collected 2026-09-26 05:22:39 UTC 6,643 bytes, 2 lines download raw bytes

1"use strict";(globalThis.webpackChunknikon_client=globalThis.webpackChunknikon_client||[]).push([[2554],{92075(e,t,a){a.r(t),a.d(t,{default:()=>T});var i=a(9026),n=a(97729),l=a(11183),c=a(64363),o=a(8933),s=a(12518),r=a(30680),d=a(25131),m=a(55169),b=a(26093),g=a(59471);var u=a(8383),v=a(97500),f=a.n(v),h=a(34629);const p=({buyNowLink:e,fromPriceLabel:t,icon:a,pricingData:i,shippingLabel:v,shouldHavePadding:p,subTitle:N,tabbedNavigation:T,thumbnail:y,title:x,vatLabel:w})=>{const E=(0,b.A)(1024),k=function(){const[e,t]=(0,g.useState)(0);return(0,g.useEffect)(()=>{const e=()=>{const e=window.scrollY,a=document.documentElement.scrollHeight-window.innerHeight;t(e/a)};return e(),window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),e}(),P=(0,b.A)(1024,r.A.Screen),R=(0,g.useRef)(null),C=(0,g.useRef)(null),A=!P&&E,[L,H]=(0,g.useState)(!1),{setTabbedProductNavigationTopHeight:I,setTabbedProductNavigationBottomHeight:_}=(0,d.A)(e=>({setTabbedProductNavigationTopHeight:e.setTabbedProductNavigationTopHeight,setTabbedProductNavigationBottomHeight:e.setTabbedProductNavigationBottomHeight})),[D,{clientHeight:S}]=(0,u.A)(),[j,{clientHeight:B}]=(0,u.A)(),[z,{clientHeight:M}]=(0,u.A)();(0,g.useEffect)(()=>{I(S)},[I,S]),(0,g.useEffect)(()=>{_(B+M)},[_,B,M]),(0,g.useEffect)(()=>{const e=R.current?.querySelector('a[data-nav-active="true"]');if(e&&L){const t=C.current.getOffsetWidth(),a=e.offsetLeft+e.offsetWidth/2-t/2,i=Math.max(0,a);C.current.scrollTo(i)}},[L]),(0,g.useEffect)(()=>{document.getElementById("ProductNavigation")?.classList[A?"remove":"add"]("sticky")},[A]);const O=e=>{(0,m.A)({event:"menuUsed",content_type:"tabbed_pdp_menu",main_category:e})};return React.createElement(React.Fragment,null,T.length>1&&React.createElement(c.A,{tag:"section",ref:D,className:f()("hidden h-15 overflow-hidden bg-grey-600 lg:flex",{"mb-24":p}),initial:{opacity:0}
1,animate:{opacity:1},"data-testid":"CT-63-Tabbed-Product-Navigation-Desktop-Nav"},React.createElement("div",{className:"grid w-full grid-cols-[repeat(auto-fit,_minmax(0,_1fr))] gap-x-1 lg:gap-x-7.5"},T.map(({name:e,url:t,isActive:a},i)=>React.createElement("div",{key:e,className:"relative flex items-center justify-center","data-testid":`CT-63-Tabbed-Product-Navigation-Desktop-Nav-Item-${i}`},React.createElement("a",{href:t,className:f()("small-text !font-bold !tracking-[0.3em] text-center text-grey-500 uppercase hover:text-yellow motion-safe:transition-all motion-safe:duration-100",{"text-white":a}),onClick:()=>{O(e)},"data-testid":`CT-63-Tabbed-Product-Navigation-Desktop-Nav-Item-${i}-Link`},e),a&&React.createElement("div",{className:"absolute bottom-0 h-1 w-full bg-grey-450"},React.createElement("span",{className:"block h-full bg-yellow",style:{width:100*k+"%"}})))))),React.createElement("div",{className:f()("lg:hidden",{"mb-7.5":p})}),React.createElement(c.A,{tag:"section",ref:j,className:f()({"pt-20":0===T.length,"fixed bottom-0":!A,relative:A},"dark z-10 flex min-h-[76px] w-full flex-row items-center bg-black-100 px-5 py-[15px] lg:bg-black-100 xl:px-7.5 xl:py-6"),style:{...A?{marginTop:M-4}:{}},"data-testid":"CT-63-Tabbed-Product-Navigation"},React.createElement(h.N,null,T.length>1&&React.createElement(c.A,{ref:e=>{R.current=e,z(e)},className:"absolute right-0 bottom-0 left-0 bg-grey-600 text-center lg:hidden lg:pr-0",initial:{opacity:0}
1,animate:{opacity:1},transition:{duration:.5,ease:[.74,0,.19,1.02]},"data-testid":"CT-63-Tabbed-Product-Navigation-Mobile-Nav",style:{...E||A?{bottom:B-(A?4:0)}:{}},onAnimationComplete:()=>H(!0)},React.createElement(s.A,{ref:C,shadowColour:"from-black-100",className:"flex h-15 items-center",threshold:.01,hasTabbableNestedItems:!0},T.map(({name:e,url:t,isActive:a},i)=>React.createElement("a",{key:e,href:t,onClick:()=>{O(e)},className:f()("small-text !font-bold !tracking-[0.3em] ml-10 text-grey-500 uppercase hover:text-grey-500 motion-safe:transition-all motion-safe:duration-100",{"text-white":a},{"ml-8":0===i},{"mr-8":i===T.length-1}),"data-nav-active":a?.toString(),"data-testid":`CT-63-Tabbed-Product-Navigation-Mobile-Nav-Item-${i}`},e))),React.createElement("div",{className:"h-1 w-full bg-grey-450"},React.createElement("span",{className:"block h-full bg-yellow",style:{width:100*k+"%"}})))),e?.name&&React.createElement("div",{className:"flex w-1/2 flex-col items-start text-white md:flex-row md:items-center xl:w-1/3"},y&&React.createElement(l.A,{image:y,imageClasses:"md:mr-6 w-20 object-contain hidden md:block",sizes:"300px",dataTestId:"CT-63-Tabbed-Product-Navigation-Thumbnail"}),React.createElement("div",{className:"md:pr-7.5"},a?React.createElement(l.A,{image:a,imageClasses:"w-7.5 mb-2",sizes:"300px",dataTestId:"CT-63-Tabbed-Product-Navigation-Icon"}):React.createElement("p",{className:"body-two","data-testid":"CT-63-Tabbed-Product-Navigation-Title"},x),N&&React.createElement("p",{className:"body-four hidden md:block","data-testid":"CT-63-Tabbed-Product-Navigation-Subtitle"},N)),i?.formattedCalculatedPrice&&React.createElement("div",{className:"border-white md:mt-0 md:border-l md:pl-7.5"},React.createElement(o.A,{pricingData:i,vatLabel:E?void 0:w,shippingLabel:E?void 0:v,fromPriceLabel:t,dataTestId:"CT-63-Tabbed-Product-Navigation-Price-Display-Text",containerFontSize:E?"body-four":"body-two",containerClassName:"text-grey-400 lg:text-white",priceClassName:"!font-light",taxesTopMarginClassName:"mt-0.5"}))),e?.name&&e.url&&React.createElement("div",{className:"ml-auto flex h-full w-1/2 select-none items-center justify-end xl:w-2/3"},React.createElement("div",{className:"flex items-center"},React.createElement(n.A,{link:e,linkCallback:()=>{(0,m.A)({event:"menuUsed",content_type:"sticky_buy_bar",main_category:e.name})},dataTestId:"CT-63-Tabbed-Product-Navigation-Buy-Now-Link",className:"text-center lg:ml-5 xl:ml-7.5"})))))};function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e},N.apply(null,arguments)}const T=({title:e,subTitle:t,vatLabel:a,shippingLabel:n,thumbnail:l,icon:c,buyNowLink:o,anchorNavigation:s,tabbedNavigation:r,pricingData:d,fromPriceLabel:m,navPosition:b,shouldHavePadding:g})=>{const u=!!r?.tabItems,v=!!s?.items,f={buyNowLink:o,fromPriceLabel:m,icon:c,pricingData:d,shippingLabel:n,shouldHavePadding:g,subTitle:t,thumbnail:l,title:e,vatLabel:a};return u?React.createElement(p,N({},f,{tabbedNavigation:r.tabItems})):v?React.createElement(i.A,N({},f,{navPosition:b,anchorNavigationItems:s.items})):void 0}}}]);
2//# sourceMappingURL=ProductNavigation-Chunk-4640bcb1de02d7b8002d.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.