PageSourceSearch

https://www.toryburch.com/_next/static/chunks/zoom-chunk.42361ec150c5efd0.js

js toryburch.com collected 2026-09-24 17:16:05 UTC 10,496 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5022],{74452:(e,o,t)=>{t.d(o,{H9:()=>n,Wr:()=>l,_3:()=>a,od:()=>s});var i=t(78805),r=t(73320);let n=(e,o)=>Math.min(Math.max(e,-o),o),a=(e,o)=>{let t=e-o;return t>0?t/2:0},s=(e,o)=>{let t=e.findIndex(e=>e.isVideo);return t<0?{items:e,currentIndex:o}:{items:e.filter(e=>!e.isVideo),currentIndex:t>o?o:o-1,videoIndex:t}},l=()=>a((0,r.aW)(window.innerWidth,i.jV),window.innerHeight)},80608:(e,o,t)=>{t.r(o),t.d(o,{DesktopZoom:()=>W});var i=t(95155),r=t(12115),n=t(48860),a=t.n(n),s=t(85097),l=t(44413),m=t(32582),d=t(97323),p=t(24445),c=t(35505),_=t(12691),w=t(28058),h=t(327),u=t(74452);let z=[{imageWidth:1920,breakpointWidth:1681},{imageWidth:1680,breakpointWidth:1441},{imageWidth:1440,breakpointWidth:1024}];var x=t(74228),g=t(78805),v=t(83509),k=t(20695),b=t(73444),f=t(59322);let j=(0,m.s)({"zoomed-image":"zoomed-image-euB"}),I=e=>{let{name:o,onLoad:t}=e,n=(0,r.useRef)(),[a,s]=(0,r.useState)((0,u.Wr)()),[{swipe:l,savedSwipe:m},d]=(0,r.useState)({swipe:0,savedSwipe:0});(0,b.By)(()=>s((0,u.Wr)())),(0,v.M)("mousemove",e=>{let{screenY:o,movementY:t}=e,i=t;t||0===t||(i=n.current?o-n.current:0,n.current=o),Math.abs(i)>0&&d(e=>({swipe:(0,u.H9)(e.swipe+1.5*i,a)}))});let p={transform:`translateY(${-l}px)`},c=k.pO.getImagePlaceholderColor(),w=(0,x.uh)({onSwiping:e=>{let{deltaY:o}=e;d({swipe:(0,u.H9)(m+o,a),savedSwipe:m})},onSwiped:()=>{d({swipe:l,savedSwipe:l})}});return(0,i.jsx)("div",{className:j("zoomed-image"),children:(0,i.jsx)("div",{style:p,children:(0,i.jsx)("div",{...w,children:(0,i.jsx)(f.lt,{isProductImage:!0,name:o,alt:o,profile:_.jI.spp,ext:_.Z1.jpg,breakpoints:z,placeholderColor:c,ratio:g.jV,onLoad:t})})})})};I.propTypes={name:a().string,onLoad:a().func};let N=(0,m.s)({"desktop-zoom__overlay":"desktop-zoom__overlay-v1R","desktop-zoom__portal":"desktop-zoom__portal-imV","desktop-zoom__portal--full-width":"desktop-zoom__portal--full-width-xtp","desktop-zoom__cross":"desktop-zoom__cross-vFl","desktop-zoom__control":"desktop-zoom__control-hn3","desktop-zoom__control--hidden":"desktop-zoom__control--hidden-LJh","desktop-zoom__control--next":"desktop-zoom__control--next-hRv","desktop-zoom__control--prev":"desktop-zoom__control--prev-fl3","desktop-zoom__image-wrapper":"desktop-zoom__image-wrapper-iOw","desktop-zoom__image-wrapper--enter":"desktop-zoom__image-wrapper--enter-tq6","desktop-zoom__image-wrapper--enter-active":"desktop-zoom__image-wrapper--enter-active-LWt","desktop-zoom__image-wrapper--exit":"desktop-zoom__image-wrapper--exit-Yw6","desktop-zoom__image-wrapper--exit-active":"desktop-zoom__image-wrapper--exit-active-k_7"}),S={enter:N("desktop-zoom__image-wrapper--enter"),enterActive:N("desktop-zoom__image-wrapper--enter-active"),exit:N("desktop-zoom__image-wrapper--exit"),exitActive:N("desktop-zoom__image-wrapper--exit-active")},W=e=>{let{items:o,onClose:t,onIndexChange:n,currentIndex:a,onNext:m,onPrev:x}=e,g=(0,r.useRef)(),[{items:v,currentIndex:k,videoIndex:b}]=(0,r.useState)((0,u.od)(o,a)),[{index:f},j,W]=w.FN.useSlideSwitch({items:v,isInfinite:!0,initialIndex:k});(0,r.useEffect)(()=>{let e=g.current;return(0,s.mh)(e),()=>{(0,s.fY)(e)}},[]),(0,r.useEffect)(()=>{let e=f;b<=f&&(e=f+1),n(e)},[f,b,n]),(0,p.i)();let C=(0,c.R8v)(v[f]),L=v.length<=1,R=(0,d.UE)(d.A8.SITE_FULL_WIDTH);return(0,i.jsxs)(h.ZL.Portal,{elementId:"desktop-zoom",onEscapePressed:t,compId:"DesktopZoom",shouldDisableScroll:!1,children:[(0,i.jsx)("div",{className:N("desktop-zoom__overlay"),children:(0,i.jsx)(h.ZL.Overlay,{onClick:t})}),(0,i.jsxs)("div",{className:N("desktop-zoom__portal",{"desktop-zoom__portal--full-width":R}),children:[(0,i.jsx)("div",{id:"desktop-zoom-close",className:N("desktop-zoom__cross"),children:(0,i.jsx)(h.ZL.CloseButton,{onClick:t,compId:"DesktopZoom-Close",size:h.lw.large})}),(0,i.jsx)("div",{className:N("desktop-zoom__control","desktop-zoom__control--prev",{"desktop-zoom__control--hidden":L}),children:(0,i.jsx)(w.FN.PrevButton,{onClick:()=>{let e=W();x(e,v[e])},compId:"DesktopZoom-PrevButton",size:_.MY.LARGE})}),(0,i.jsx)("div",{className:N("desktop-zoom__control","desktop-zoom__control--next",{"desktop-zoom__control--hidden":L}),children:(0,i.jsx)(w.FN.NextButton,{onClick:()=>{let e=j();m(e,v[e])},compId:"DesktopZoom-NextButton",size:_.MY.LARGE})}),(0,i.jsx)("div",{className:N("desktop-zoom__image-wrapper"),onClick:t,ref:g,children:(0,i.jsx)(l.g,{timeout:300,classNames:S,children:(0,i.jsx)(I,{name:C,onLoad:()=>{w.FN.preloadNextAndPreviousItems(v,f,{profile:_.jI.spp,breakpoints:z})}})},C)})]})]})};W.propTypes={items:a().arrayOf(a().shape({code:a().string,isVideo:a().bool})),onClose:a().func,onIndexChange:a().func,currentIndex:a().number,onNext:a().func,onPrev:a().func}},97180:(e,o,t)=>{t.r(o),t.d(o,{MobileZoom:()=>E});var i=t(95155),r=t(12115),n=t(48860),a=t.n(n),s=t(44413),l=t(32582),m=t(24445),d=t(35505),p=t(28058),c=t(327),_=t(74452),w=t(78805),h=t(73320),u=t(12691),z=t(59322);let x=[{imageWidth:1920,breakpointWidth:0}],g={swipeX:0,swipeY:0,savedSwipeX:0,savedSwipeY:0},v=(e,o)=>o>e?1:e/(0,h.aW)(o,w.jV),k=(e,o,t)=>
1({...g,maxSwipeX:(0,_._3)(e*t,e),maxSwipeY:(0,_._3)((0,h.aW)(e,w.jV)*t,o)}),b=(e,o)=>{let t=e[o+1]||e[0],i=e[o-1]||e[e.length-1],r=(0,p.aE)((0,d.R8v)(t),1920,u.jI.spp),n=(0,p.aE)((0,d.R8v)(i),1920,u.jI.spp);(0,z.xg)(r),(0,z.xg)(n)};var f=t(74228),j=t(31707),I=t(47166),N=t(20695),S=t(73444);let W=(0,l.s)({zoomable:"zoomable-x_4",zoomable__image:"zoomable__image-Qwo"}),C=e=>{let{item:o,onClose:t,onHiResLoaded:n}=e,{zoomRef:a,widthRef:s}={zoomRef:(0,r.useRef)(),widthRef:(0,r.useRef)(0)},[{windowWidth:l,windowHeight:m,initialScale:p,scaleLimit:c},g]=(0,r.useState)(()=>({windowWidth:window.innerWidth,windowHeight:window.innerHeight,initialScale:v(window.innerHeight,window.innerWidth),scaleLimit:1920/window.innerWidth})),[b,C]=(0,r.useState)(p),[{swipeX:L,swipeY:R,savedSwipeX:E,savedSwipeY:Z,maxSwipeX:H,maxSwipeY:y},P]=(0,r.useState)(()=>k(l,m,p)),[B,M]=(0,r.useState)(!1),Y=(0,r.useRef)(!1),V=(0,h.aW)(l,w.jV);(0,r.useEffect)(()=>{let e=e=>e.preventDefault(),o=()=>{if(!((0,I.ox)()&&window.innerWidth===s.current)){let e=v(window.innerHeight,window.innerWidth);g({windowWidth:window.innerWidth,windowHeight:window.innerHeight,initialScale:e,scaleLimit:1920/window.innerWidth}),C(e),P(k(window.innerWidth,window.innerHeight,e))}};s.current=window.innerWidth,document.addEventListener("gesturestart",e),document.addEventListener("gesturechange",e);let t=(0,I.ox)()?(0,S.wB)("resize",()=>setTimeout(o,100)):(0,S.wB)("orientationchange",o);return()=>{document.removeEventListener("gesturestart",e),document.removeEventListener("gesturechange",e),t()}},[s]);let D=(0,j.NH)({onPinchStart:()=>{Y.current=!0},onPinch:e=>{let{values:o,previous:t}=e,[i]=o,[r]=t,n=Math.min(Math.max(b+(i-r)*b/300,p),c);if(n!==p&&n!==c){let e=(0,_._3)(l*n,l,n),o=(0,_._3)(V*n,m,n),t=L&&L/H*e,i=R&&R/y*o;C(n),P({swipeX:t,swipeY:i,savedSwipeX:t,savedSwipeY:i,maxSwipeX:e,maxSwipeY:o})}},onPinchEnd:()=>{setTimeout(()=>{Y.current=!1})}},{domTarget:a});(0,r.useEffect)(D,[D]);let T={transform:`translate3D(calc(-50% - ${L}px), calc(-50% - ${R}px), 0)`,width:l*b,height:V*b},X=(0,f.uh)({onSwiping:e=>{let{deltaX:o,deltaY:t}=e;Y.current||P({swipeX:(0,_.H9)(E-o,H),swipeY:(0,_.H9)(Z-t,y),savedSwipeX:E,savedSwipeY:Z,maxSwipeX:H,maxSwipeY:y})},onSwiped:()=>{Y.current&&(Y.current=!1),P({swipeX:L,swipeY:R,savedSwipeX:L,savedSwipeY:R,maxSwipeX:H,maxSwipeY:y})}}),A=(0,d.R8v)(o),F={isProductImage:!0,name:A,alt:A,profile:u.jI.spp,ext:u.Z1.jpg,placeholderColor:N.pO.getImagePlaceholderColor(),ratio:w.jV,shouldShowAnimationOnLoad:!1};return(0,i.jsx)("div",{className:W("zoomable"),onClick:t,ref:a,"data-id":"ZoomableImage",children:(0,i.jsxs)("div",{...X,children:[(0,i.jsx)("div",{className:W("zoomable__image"),style:T,"data-id":"ZoomableImage-Hi-Res",children:(0,i.jsx)(z.lt,{...F,breakpoints:x,onLoad:()=>{n(),M(!0)}})}),!B&&(0,i.jsx)("div",{className:W("zoomable__image"),style:T,"data-id":"ZoomableImage-Low-Res",children:(0,i.jsx)(z.lt,{...F,breakpoints:d.q$y,shouldHaveIphoneBreakpoint:!0})})]})})};C.propTypes={item:a().shape({code:a().string,isVideo:a().bool}),onClose:a().func,onHiResLoaded:a().func};let L=(0,l.s)({"mobile-zoom__cross":"mobile-zoom__cross-1D8","mobile-zoom__control":"mobile-zoom__control-J36","mobile-zoom__control--hidden":"mobile-zoom__control--hidden-Nyq","mobile-zoom__control--next":"mobile-zoom__control--next-u95","mobile-zoom__control--prev":"mobile-zoom__control--prev-ToJ","mobile-zoom__image-wrapper":"mobile-zoom__image-wrapper-CuX","mobile-zoom__image-wrapper--enter":"mobile-zoom__image-wrapper--enter-SkN","mobile-zoom__image-wrapper--enter-active":"mobile-zoom__image-wrapper--enter-active-wIM","mobile-zoom__image-wrapper--exit":"mobile-zoom__image-wrapper--exit-jfi","mobile-zoom__image-wrapper--exit-active":"mobile-zoom__image-wrapper--exit-active-yE6"}),R={enter:L("mobile-zoom__image-wrapper--enter"),enterActive:L("mobile-zoom__image-wrapper--enter-active"),exit:L("mobile-zoom__image-wrapper--exit"),exitActive:L("mobile-zoom__image-wrapper--exit-active")},E=e=>{let{items:o,onClose:t,onIndexChange:n,currentIndex:a,onNext:l,onPrev:w}=e,h=(0,r.useRef)(),[{items:u,currentIndex:z,videoIndex:x}]=(0,r.useState)((0,_.od)(o,a)),[{index:g},v,k]=p.FN.useSlideSwitch({items:u,isInfinite:!0,initialIndex:z,preloadCallback:e=>b(u,e)});(0,r.useEffect)(()=>{let e=g;x<=g&&(e=g+1),n(e)},[g,x,n]),(0,m.i)();let f=u.length<=1;return(0,i.jsxs)(c.ZL.Portal,{elementId:"mobile-zoom",compId:"MobileZoom",scrollableContentRef:h,children:[(0,i.jsx)("div",{id:"mobile-zoom-close",className:L("mobile-zoom__cross"),children:(0,i.jsx)(c.ZL.CloseButton,{onClick:t,compId:"MobileZoom-Close"})}),(0,i.jsx)("div",{className:L("mobile-zoom__control","mobile-zoom__control--next",{"mobile-zoom__control--hidden":f}),children:(0,i.jsx)(p.FN.NextButton,{onClick:()=>{let e=v();l(e,u[e])},compId:"MobileZoom-NextButton"})}),(0,i.jsx)("div",{className:L("mobile-zoom__control","mobile-zoom__control--prev",{"mobile-zoom__control--hidden":f}),children:(0,i.jsx)(p.FN.PrevButton,{onClick:()=>{let e=k();w(e,u[e])},compId:"MobileZoom-PrevButton"})}),(0,i.jsx)("div",{className:L("mobile-zoom__image-wrapper"),ref:h,children:(0,i.jsx)(s.g,{timeout:300,classNames:R,children:(0,i.jsx)(C,{item:u[g],onClose:t,onHiResLoaded:()=>b(u,z)})},(0,d.R8v)(u[g]))})]})};E.propTypes={items:a().arrayOf(a().shape({code:a().string,isVideo:a().bool})),onClose:a().func,onIndexChange:a().func,currentIndex:a().number,onNext:a().func,onPrev:a().func}}}]);

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.