https://makezine.com/wp-content/plugins/shopwp-pro/dist/ProductImages-public.beb4161cb668bc78427e.js
1"use strict";(self.webpackChunkshopwp=self.webpackChunkshopwp||[]).push([["ProductImages-public"],{"./node_modules/@zoom-image/react/dist/chunk-LJUIFZRA.mjs"(e,t,n){n.d(t,{j:()=>p});var o=n("react"),r=(e,t,n)=>{if(e.src===t)return;e.src=t;let o=!1;e.onload=()=>{o=!0,n.setState({zoomedImgStatus:"loaded"})},e.onerror=()=>{o=!0,n.setState({zoomedImgStatus:"error"})},setTimeout((()=>{o||n.setState({zoomedImgStatus:"loading"})}),50)};function a(e){e.preventDefault()}var s=new Set(["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]);function i(e){if(s.has(e.key))return a(e),!1}var l=new AbortController,c=l.signal;function u(){window.addEventListener("DOMMouseScroll",a,{signal:c}),window.addEventListener("wheel",a,{passive:!1,signal:c}),window.addEventListener("touchmove",a,{passive:!1,signal:c}),window.addEventListener("keydown",i,{signal:c})}function d(){l?.abort()}function m(e,t={}){let n=null;const o=function(e){if(!e)throw new Error("Please specify a container for the zoom image");const t=e.querySelector("img");if(!t)throw new Error("Please place an image inside the container");return t}(e),a={zoomFactor:t.zoomFactor??4,zoomImageSource:t.zoomImageSource??o.src,disabledContextMenu:t.disabledContextMenu??!1},{disabledContextMenu:s,zoomFactor:i,zoomImageSource:l}=a,c=function(){let e,t=new Set,n=!1,o={zoomedImgStatus:"idle"},r=()=>{if(n)return;let r=!1;if(e)for(let t in e)if(o[t]!==e[t]){r=!0;break}r&&(o={...o,...e},t.forEach((t=>t({state:o,updatedProperties:e}))),e=void 0)};return{subscribe:e=>(t.add(e),()=>{t.delete(e)}),cleanup:()=>t.clear(),getState:()=>o,setState:(t={})=>{e={...e,...t},r()},batch:e=>{n=!0,e(),n=!1,r()}}}(),m=document.createElement("img");t.zoomImageProps?.alt&&(m.alt=t.zoomImageProps.alt),t.zoomImageProps?.className&&(m.className=t.zoomImageProps.className),m.style.maxWidth="none",m.style.position="absolute",m.style.top="0",m.style.left="0",s&&(m.style["-webkit-user-select"]="none",m.style["-webkit-touch-callout"]="none",m.oncontextmenu=()=>!1);const p=e=>e.pointerId===n;function g(t){m.style.display="block";const n=e.getBoundingClientRect(),o=t.clientX-n.left,r=t.clientY-n.top,a=(t=>{const n=e.clientWidth;return t>0?0:t+n*i<n?-n*(i-1):t})(-o*i+o),s=(t=>{const n=e.clientHeight;return t>0?0:t+n*i<n?-n*(i-1):t})(-r*i+r);m.style.transform=`translate(${a}px, ${s}px)`}const f=new AbortController,{signal:w}=f;return e.addEventListener("pointerenter",(function(t){if(null===n){n=t.pointerId,e.appendChild(m),m.style.display="block";const a=o.clientWidth*i,s=o.clientHeight*i;m.style.width=`${a}px`,m.style.height=`${s}px`,r(m,l,c),g(t),"mouse"!==t.pointerType&&u()}}),{signal:w}),e.addEventListener("pointermove",(function(e){p(e)&&g(e)}),{signal:w}),e.addEventListener("pointerleave",(function(t){p(t)&&(e.contains(m)&&e.removeChild(m),m.style.display="none",m.style.transform="none",d(),n=null)}),{signal:w}),e.addEventListener("touchstart",(e=>{s&&e.preventDefault()}),{signal:w}),{cleanup:()=>{f.abort(),e.contains(m)&&e.removeChild(m),c.cleanup()},subscribe:c.subscribe,getState:c.getState}}function p(){const e=(0,o.useRef)(),[t,n]=(0,o.useState)({zoomedImgStatus:"idle"}),r=(0,o.useCallback)(((...t)=>{e.current?.cleanup(),e.current=m(...t),n(e.current.getState()),e.current.subscribe((({state:e})=>{n(e)}))}),[]);return(0,o.useEffect)((()=>()=>{e.current?.cleanup()}),[]),{createZoomImage:r,zoomImageState:t}}}}]);
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.