PageSourceSearch

https://woocommerce.com/wp-content/themes/woo/dist/wccom-comp-prod…=b58a3deaff6bd364111c055a04eb005148a7033e

js woocommerce.com collected 2026-09-24 07:55:42 UTC 5,789 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkwoo_commerce_com=globalThis.webpackChunkwoo_commerce_com||[]).push([[7867],{9472(e,t,a){var c=a(1386),r=a(7562),s=a(2470),i=a(4164),l=a(5556),n=a.n(l),o=a(7958),m=a(5336),u=a(3713);const d=e=>{const{className:t,image:a,productName:r,showTrigger:l,openLightbox:n,altText:d}=e,g=(0,c.useRef)(null),h=(0,o.F)(a,{w:900}),p=(0,o.F)(a,{w:1800});return(0,u.jsxs)("div",{className:(0,i.A)("wccom-product-heading-image",t,l&&"wccom-product-heading-image__has-background"),children:[(0,u.jsxs)("picture",{children:[(0,u.jsx)("source",{media:"(max-width: 473px)",srcSet:h}),(0,u.jsx)("source",{media:"(min-width: 474px)",srcSet:p}),(0,u.jsx)("img",{ref:g,fetchpriority:"high",src:h,alt:d?(0,s.sprintf)((0,s.__)("Gallery Image: %s","wccom"),d):l?(0,s.sprintf)((0,s.__)("%s Product gallery image","wccom"),r):(0,s.sprintf)((0,s.__)("Product header image: %s","wccom"),d),tabIndex:"0",onClick:()=>l&&n(!0),onKeyDown:e=>l&&"Enter"===e.key&&n(!0)},a)]}),l&&(0,u.jsx)("button",{onClick:()=>n(!0),"aria-label":(0,s.__)("Show lightbox","wccom"),children:(0,u.jsx)(m.A,{icon:"magnifying-glass-plus"})})]})};d.propTypes={className:n().string,image:n().string.isRequired,productName:n().string,showTrigger:n().bool,openLightbox:n().func,altText:n().string};const g=d,h=e=>{const{className:t,iframeSrc:a,productName:r}=e,[l,n]=(0,c.useState)(a),[o,m]=(0,c.useState)(!1);if((0,c.useEffect)((()=>{const e=setInterval((()=>{document.activeElement===document.getElementById("wccom-product-video-iframe")&&(window.setTimeout((()=>{m(!0)}),100),clearInterval(e))}),100);return()=>clearInterval(e)})),l.includes("<iframe")){const e=/<iframe.*?src="(.*?)"/g.exec(l);e[1]&&n(e[1])}return(0,u.jsx)("div",{className:(0,i.A)("wccom-product-video",t,o?"is-playing":""),children:(0,u.jsx)("div",{className:"wccom-product-video__container",children:(0,u.jsx)("iframe",{id:"wccom-product-video-iframe",src:l,title:r?(0,s.sprintf)((0,s.__)("%s Product Video","wccom"),r):(0,s.__)("Product Video","wccom")})})})};h.propTypes={className:n().string,iframeSrc:n().string.isRequired,productName:n().string};const p=h;var w=a(6736),f=a(8221),x=a.n(f);const b=({galleryItems:e,handleImageClick:t,currentImage:a})=>{const r=e=>{const t=(e=>{const t=/<iframe.*?src="(.*?)"/g.exec(e);return t?t[1]:""})(e);let a;if(a=t.match(/youtube\.com\/embed\/([^/]+)/)){const e=a[1];return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)("div",{className:"wccom-product-gallery-thumbnails__thumbnail-with-play-button",style:{backgroundImage:`url('//i3.ytimg.com/vi/${e}/hqdefault.jpg')`},children:(0,u.jsx)("i",{className:"fa-regular fa-play"})})})}if(a=t.match(/wistia\.net\/embed\/iframe\/([^/]+)/)){const e=a[1];return fetch(`https://fast.wistia.net/oembed?url=https://fast.wistia.net/embed/iframe/${e}`).then((e=>e.json())).then((t=>{const a=document.querySelector(`[data-wistia-id="${e}"]`);a&&(a.style.backgroundImage=`url('${t.thumbnail_url}')`)})),(0,u.jsx)(u.Fragment,{children:(0,u.jsx)("div",{"data-wistia-id":e,className:"wccom-product-gallery-thumbnails__thumbnail-with-play-button",children:(0,u.jsx)("i",{className:"fa-regular fa-play"})})})}return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)("div",{className:"wccom-product-gallery-thumbnails__thumbnail-iframe-container",children:(0,u.jsx)("iframe",{src:t,title:(0,s.__)("Product Video","wccom"),tabIndex:-1,loading:"lazy"})})})},l=(0,c.useRef)(null),[n,o]=(0,c.useState)([]),[m,d]=(0,c.useState)(0),[g,h]=(0,c.useState)(!1);return(0,c.useLayoutEffect)((()=>{const t=x()((()=>{h(!1);const t=l.current,a=t?.parentNode?.clientWidth;let c=Math.min(Math.floor(a/96),e.length);a-96*c<80&&c!==e.length&&(c-=1),o(e.slice(0,c)),d(e.length-c)}),100);return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]),(0,u.jsxs)("div",{className:(0,i.A)("wccom-product-gallery-thumbnails",g&&"view-all"),ref:l,children:[n.map(((e,c)=>(0,u.jsx)("button",{className:"wccom-product-gallery-thumbnails__thumbnail",onClick:()=>t(e),"aria-label":e.includes("<iframe")?(0,s.__)("product video thumbnail","wccom"):(0,s.sprintf)((0,s.__)("gallery image thumbanail %1$d of %2$d","wccom"),c+1,n.length),children:e.includes("<iframe")?(0,u.jsx)("div",{className:(0,i.A)("wccom-product-gallery-thumbn
1ails__thumbnail-iframe",a===e&&"is-selected"),children:r(e)}):(0,u.jsx)("img",{src:`${e}?resize=80,80`,alt:"",className:(0,i.A)(a===e&&"is-selected"),loading:"lazy"})},c))),e.length>n.length&&(0,u.jsxs)("div",{className:"wccom-product-gallery-thumbnails__view-all",children:[(0,u.jsxs)("span",{children:[" +",m]}),(0,u.jsx)(w.A,{isLink:!0,onClick:()=>{h(!0),o(e)},children:(0,s.__)("View All","wccom")})]})]})};var _=a(1971),y=a(4460);const j=(0,c.lazy)((()=>Promise.resolve().then(a.bind(a,9128))));_.y.add("product-gallery",(({onReady:e})=>{const{productName:t,featuredImage:a,featuredVideo:s,featuredImageGallery:l}=(0,r.useSelect)((e=>e(y.M).getProduct()),[]),n=(0,c.useMemo)((()=>[...s?[{url:s,alt:""}]:[],...a?[a]:[],...l||[]]),[s,a,l]),o=(0,c.useMemo)((()=>n.map((e=>e.url))),[n]),[m,d]=(0,c.useState)(!1),[h,w]=(0,c.useState)(n[0]?.url||""),[f,x]=(0,c.useState)(n[0]?.alt||""),[_,v]=(0,c.useState)(!1);return(0,c.useLayoutEffect)((()=>{e?.()}),[e]),a||s?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:(0,i.A)("wccom-product-gallery",m&&"is-new-image"),children:h&&(h.includes("<iframe")?(0,u.jsx)(p,{iframeSrc:s||"",productName:t}):(0,u.jsx)(g,{productName:t,image:h,altText:f,showTrigger:1<n.length,openLightbox:v}))}),1<n.length&&(0,u.jsx)(b,{galleryItems:o,handleImageClick:e=>{d(!0),w(e),x(n.find((t=>t.url===e))?.alt||"")},currentImage:h}),_&&(0,u.jsx)(c.Suspense,{fallback:null,children:(0,u.jsx)(j,{imageList:n,currentImage:h,active:_,onClose:()=>{v(!1)}})})]}):null}))}},e=>{e.O(0,[9574,2397],(()=>e(e.s=9472))),e.O()}]);

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.