"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[34],{470(e,t,i){i.d(t,["a",0,{sliderContainer:"Uq_vaulr",sliderItem:"C0m7EVOb",embeddedImage:"K93xnXzl",modelOverlay:"wiZ9m0Zl"}])},471(e,t,i){i.d(t,["a",0,{container:"uiIFALZT",item:"rkFfQnYn",pswpOverride:"PMoHGRtp"}])},95(e,t,i){i.d(t,{a:()=>f});var n=i(0),a=i(1),o=i(470),d=i(471),s=i(96),r=i(97),l=i(5),c=i(56),p=i(27),u=i(46),h=i(42);const{sliderContainer:m,sliderItem:v}=o.a;function w(e){(new Image).src=e.src}function b({image:e,index:t,isDesktop:i,embedded:a,showModelInformation:s,maxFullSizeWidth:r}){const{src:p,altText:u,model:h,width:m,height:w}=e,b=null==p?void 0:p.endsWith(".mp4");return(0,n.b)("a",{class:[i?d.a.item:v,a?o.a.embeddedImage:""].join(" "),"data-pswp-type":b?"video":"image",href:p,"data-pswp-width":m,"data-pswp-height":w,target:"_blank",rel:"noreferrer",children:[b?(0,n.jsx)(c.a,{sources:[{url:p,mimeType:"video/mp4",width:m,height:w}],preload:"metadata",className:i?d.a.item:v}):(0,n.jsx)(l.a,{src:p,alt:u,initialWidth:300,fullSizeWidth:r,width:m,height:w}),s&&h&&(0,n.jsx)("div",{class:o.a.modelOverlay,children:h})]},t)}function f({product:e,selectedVariant:t,pdpVideo:i,showModelInformation:l,isDesktop:c,embedded:v,includeDefaultImages:f}){const g=function({product:e,selectedVariant:t,pdpVideo:i,isDesktop:n,includeDefaultImages:o}){return(0,a.h)((()=>{var a,d;const s=(0,p.a)(e.imageMap,t,void 0,o),r=null==t?void 0:t.selectedOptions.Color;return i&&r&&(null===(a=e.productVideos)||void 0===a?void 0:a[r])?[...s.slice(0,n?2:1),{altText:r,src:null===(d=e.productVideos)||void 0===d?void 0:d[r]},...s.slice(n?2:1)]:s}),[t])}({product:e,selectedVariant:t,pdpVideo:i,isDesktop:c,includeDefaultImages:f}),y=(0,u.a)(),x=(0,a.j)(null),[k,I]=(0,a.k)(!1);return(0,a.c)((()=>{g.forEach(w),Object.values(e.imageMap).forEach((e=>{e.slice(0,2).forEach(w)}));const t=new s.a({mainClass:d.a.pswpOverride,gallery:"#hero-slider",children:"a",pswpModule:r.a,bgOpacity:.9,arrowKeys:!0,showHideAnimationType:"none"});return i&&t.on("contentLoad",(e=>{var t;const{content:i}=e;if(null===(t=i.data.src)||void 0===t?void 0:t.endsWith(".mp4")){e.preventDefault(),i.element=document.createElement("div"),i.element.className="pswp__video-container";const t=document.createElement("video");t.setAttribute("playsinline",""),t.setAttribute("muted",""),t.setAttribute("loop",""),t.setAttribute("style","width: 100vw;"),t.setAttribute("autoplay",""),t.src=i.data.src,i.element.appendChild(t)}})),t.init(),k?!c&&x.current&&(x.current.scrollLeft=0):I(!0),()=>{null==t||t.destroy()}}),[g,f]),(0,n.b)("section",{"aria-labelledby":"product-photos-heading",class:["pswp-gallery",c?d.a.container:m,v?o.a.embeddedContainer:""].join(" "),ref:x,id:"hero-slider",children:[(0,n.jsx)("h2",{id:"product-photos-heading",class:"visually-hidden",children:"Product Photos"}),(0,n.jsx)("style",{dangerouslySetInnerHTML:{__html:".pswp--touch .pswp__button--arrow { visibility: visible; };\n "+(i?" .pswp__video-container {\n position: relative;\n width: 100%;\n height: 100%;\n pointer-events: none;\n }\n .pswp__video-container video {\n background: #444;\n object-fit: cover;\n width: 100%;\n height: 100%;\n max-width: 800px;\n pointer-events: auto;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }":"")}}),(0,n.jsx)(h.a,{appearance:"pdp",location:"image",product:e,selectedVariant:t}),g.map(((e,t)=>(0,n.jsx)(b,{image:e,index:t,isDesktop:c,embedded:v,showModelInformation:l,maxFullSizeWidth:y},t)))]})}}}]);