import"./ebc50768.js";import{r as k,R as Q,j as P,a as ce,F as Oe}from"./index.1ec44e23.js";import{s as Le,I as Ce}from"./7a5e5627.js";import{ModelViewer as Be}from"./5dfad0e1.js";import{M as de}from"./ef11f8a9.js";import"./2d3554bc.js";import"./616890f5.js";import{u as Pe}from"./c0ec5803.js";import"./3c10424c.js";import"./a8ae7088.js";import"./c268d3e4.js";import{c as Y}from"./2e4f433f.js";import"./6cbd8241.js";import"./8bce3399.js";import"./5ba52db2.js";import"./2dce7371.js";import"./b9494af1.js";import"./d6282b27.js";function ke(e,r){if(r==null)return e;const i=Object.keys(r).reduce((t,a)=>{const s=r[a];return s==null?t:t+`&${a}=${s}`},"");return`${e}?${i}`}function ze(e,r){return k.exports.useMemo(()=>r?ke(e,r):e,[e,r])}function Ve(e){var c,u;const{data:r,previewImageOptions:i,id:t=r.id,playsInline:a=!0,controls:s=!0,sourceProps:o={},...l}=e,f=Le({src:(u=(c=r.previewImage)==null?void 0:c.url)!=null?u:"",...i});if(!r.sources)throw new Error("<Video/> requires a 'data.sources' array");return Q.createElement("video",{...l,id:t,playsInline:a,controls:s,poster:f},r.sources.map(n=>{if(!((n==null?void 0:n.url)&&(n==null?void 0:n.mimeType)))throw new Error("<Video/> needs 'source.url' and 'source.mimeType'");return Q.createElement("source",{...o,key:n.url,src:n.url,type:n.mimeType})}))}function Fe(e){const{data:r,options:i,id:t=r.id,frameBorder:a="0",allow:s="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:o=!0,loading:l="lazy",...f}=e;if(!r.embedUrl)throw new Error("<ExternalVideo/> requires the 'embedUrl' property");const c=ze(r.embedUrl,i);return Q.createElement("iframe",{...f,id:t!=null?t:r.embedUrl,frameBorder:a,allow:s,allowFullScreen:o,src:c,loading:l})}function we({data:e,options:r,...i}){switch(e.mediaContentType){case"IMAGE":{const t=e.image;return!t||!t.url?(console.warn(`No "image" property was found on the "data" prop for <MediaFile/>, for the "type='image'"`),null):Q.createElement(Ce,{...i,data:t,loaderOptions:r})}case"VIDEO":return Q.createElement(Ve,{...i,data:e,previewImageOptions:r});case"EXTERNAL_VIDEO":return Q.createElement(Fe,{...i,data:e,options:r});case"MODEL_3D":return Q.createElement(Be,{...i,data:e});default:return null}}function Re(e,r,i,t,a){return t+(a-t)*((e-r)/(i-r))}function pe(e){return typeof e=="number"}function ve(e){return Object.prototype.toString.call(e)==="[object Object]"}function He(e){return Array.isArray(e)}function ye(e){return ve(e)||He(e)}function D(e){return Math.abs(e)}function me(e){return e?e/D(e):0}function se(e,r){return D(e-r)}function Ue(e,r){if(e===0||r===0||D(e)<=D(r))return 0;var i=se(D(e),D(r));return D(i/e)}function _e(e){var r=Math.pow(10,e);return function(i){return Math.round(i*r)/r}}function ue(e){return ee(e).map(Number)}function X(e){return e[fe(e)]}function fe(e){return Math.max(0,e.length-1)}function ee(e){return Object.keys(e)}function Ee(e,r){return[e,r].reduce(function(i,t){return ee(t).forEach(function(a){var s=i[a],o=t[a],l=ve(s)&&ve(o);i[a]=l?Ee(s,o):o}),i},{})}function be(e,r){var i=ee(e),t=ee(r);return i.length!==t.length?!1:i.every(function(a){var s=e[a],o=r[a];return typeof s=="function"?"".concat(s)==="".concat(o):!ye(s)||!ye(o)?s===o:be(s,o)})}function je(e,r){var i={start:t,center:a,end:s};function t(){return 0}function a(c){return s(c)/2}function s(c){return r-c}function o(){return r*Number(e)}function l(c){return pe(e)?o():i[e](c)}var f={measure:l};return f}function qe(e){var r=0;function i(o,l){return function(){o===!!r&&l()}}function t(){r=window.requestAnimationFrame(e)}function a(){window.cancelAnimationFrame(r),r=0}var s={proceed:i(!0,t),start:i(!1,t),stop:i(!0,a)};return s}function Ge(e,r){var i=e==="y"?"y":"x",t=e==="y"?"x":"y",a=l(),s=f();function o(u){var n=u.width,v=u.height;return i==="x"?n:v}function l(){return i==="y"?"top":r==="rtl"?"right":"left"}function f(){return i==="y"?"bottom":r==="rtl"?"left":"right"}var c={scroll:i,cross:t,startEdge:a,endEdge:s,measureSize:o};return c}function oe(e,r){var i=D(e-r);function t(c){return c<e}function a(c){return c>r}function s(c){return t(c)||a(c)}function o(c){return s(c)?t(c)?e:r:c}function l(c){return i?c-i*Math.ceil((c-r)/i):c}var f={length:i,max:r,min:e,constrain:o,reachedAny:s,reachedMax:a,reachedMin:t,removeOffset:l};return f}function Ae(e,r,i){var t=oe(0,e),a=t.min,s=t.constrain,o=e+1,l=f(r);function f(m){return i?D((o+m)%o):s(m)}function c(){return l}function u(m){return l=f(m),g}function n(m){return u(c()+m)}function v(){return Ae(e,c(),i)}var g={add:n,clone:v,get:c,set:u,min:a,max:e};return g}function We(e){var r=e==="rtl"?-1:1;function i(a){return a*r}var t={apply:i};return t}function le(){var e=[];function r(a,s,o,l){return l===void 0&&(l=!1),a.addEventListener(s,o,l),e.push(function(){return a.removeEventListener(s,o,l)}),t}function i(){return e=e.filter(function(a){return a()}),t}var t={add:r,removeAll:i};return t}function Z(e){var r=e;function i(){return r}function t(n){return r=c(n),u}function a(n){return r+=c(n),u}function s(n){return r-=c(n),u}function o(n){return r*=n,u}function l(n){return r/=n,u}function f(){return r!==0&&l(r),u}function c(n){return pe(n)?n:n.get()}var u={add:a,divide:l,get:i,multiply:o,normalize:f,set:t,subtract:s};return u}function Ke(e,r,i,t,a,s,o,l,f,c,u,n,v,g,m,E){var d=e.cross,h=["INPUT","SELECT","TEXTAREA"],x=Z(0),w=le(),S=le(),y=v.measure(20),b={mouse:300,touch:400},A={mouse:500,touch:600},M=m?5:16,O=1,V=0,G=0,H=!1,W=!1,z=!1,L=!1;function U(){var p=i;w.add(p,"touchmove",function(){}).add(p,"touchend",function(){}).add(p,"touchstart",te).add(p,"mousedown",te).add(p,"touchcancel",j).add(p,"contextmenu",j).add(p,"click",ie)}function J(){var p=L?document:i;S.add(p,"touchmove",ae).add(p,"touchend",j).add(p,"mousemove",ae).add(p,"mouseup",j)}function _(){w.removeAll(),S.removeAll()}function C(p){var I=p.nodeName||"";return h.indexOf(I)>-1}function $(){var p=m?A:b,I=L?"mouse":"touch";return p[I]}function ne(p,I){var B=u.clone().add(me(p)*-1),R=B.get()===u.min||B.get()===u.max,N=c.byDistance(p,!m).distance;return m||D(p)<y?N:!g&&R?N*.4:E&&I?N*.5:c.byIndex(B.get(),0).distance}function te(p){if(L=p.type==="mousedown",!(L&&p.button!==0)){var I=se(t.get(),s.get())>=2,B=L||!I,R=!C(p.target),N=I||L&&R;H=!0,a.pointerDown(p),x.set(t),t.set(s),f.useBaseMass().useSpeed(80),J(),V=a.readPoint(p),G=a.readPoint(p,d),n.emit("pointerDown"),B&&(z=!1),N&&p.preventDefault()}}function ae(p){if(!W&&!L){if(!p.cancelable)return j(p);var I=a.readPoint(p),B=a.readPoint(p,d),R=se(I,V),N=se(B,G);if(W=R>N,!W&&!z)return j(p)}var K=a.pointerMove(p);!z&&K&&(z=!0),o.start(),t.add(r.apply(K)),p.preventDefault()}function j(p){var I=c.byDistance(0,!1),B=I.index!==u.get(),R=a.pointerUp(p)*$(),N=ne(r.apply(R),B),K=Ue(R,N),Ie=se(t.get(),x.get())>=.5,xe=B&&K>.75,Me=D(R)<y,Ne=xe?10:M,De=xe?O+2.5*K:O;Ie&&!L&&(z=!0),W=!1,H=!1,S.removeAll(),f.useSpeed(Me?9:Ne).useMass(De),l.distance(N,!m),L=!1,n.emit("pointerUp")}function ie(p){z&&p.preventDefault()}function q(){return!z}function F(){return H}var T={addActivationEvents:U,clickAllowed:q,pointerDown:F,removeAllEvents:_};return T}function $e(e){var r=170,i,t;function a(n){return typeof TouchEvent!="undefined"&&n instanceof TouchEvent}function s(n){return n.timeStamp}function o(n,v){var g=v||e.scroll,m="client".concat(g==="x"?"X":"Y");return(a(n)?n.touches[0]:n)[m]}function l(n){return i=n,t=n,o(n)}function f(n){var v=o(n)-o(t),g=s(n)-s(i)>r;return t=n,g&&(i=n),v}function c(n){if(!i||!t)return 0;var v=o(t)-o(i),g=s(n)-s(i),m=s(n)-s(t)>r,E=v/g,d=g&&!m&&D(E)>.1;return d?E:0}var u={isTouchEvent:a,pointerDown:l,pointerMove:f,pointerUp:c,readPoint:o};return u}function Xe(e){function r(t){return e*(t/100)}var i={measure:r};return i}function Ze(e,r,i){var t=_e(2),a=Z(0),s=Z(0),o=Z(0),l=0,f=r,c=i;function u(){a.add(s),e.add(a),s.multiply(0)}function n(S){S.divide(c),s.add(S)}function v(S){o.set(S).subtract(e);var y=Re(o.get(),0,100,0,f);return l=me(o.get()),o.normalize().multiply(y).subtract(a),n(o),w}function g(S){var y=S.get()-e.get(),b=!t(y);return b&&e.set(S),b}function m(){return l}function E(){return h(r)}function d(){return x(i)}function h(S){return f=S,w}function x(S){return c=S,w}var w={direction:m,seek:v,settle:g,update:u,useBaseMass:d,useBaseSpeed:E,useMass:x,useSpeed:h};return w}function Je(e,r,i,t,a){var s=a.measure(10),o=a.measure(50),l=.85,f=!1;function c(){return!(f||!e.reachedAny(i.get())||!e.reachedAny(r.get()))}function u(g){if(!!c()){var m=e.reachedMin(r.get())?"min":"max",E=D(e[m]-r.get()),d=i.get()-r.get(),h=Math.min(E/o,l);i.subtract(d*h),!g&&D(d)<s&&(i.set(e.constrain(i.get())),t.useSpeed(10).useMass(3))}}function n(g){f=!g}var v={constrain:u,toggleActive:n};return v}function Ye(e,r,i,t){var a=oe(-r+e,i[0]),s=i.map(a.constrain),o=f();function l(){var u=s[0],n=X(s),v=s.lastIndexOf(u),g=s.indexOf(n)+1;return oe(v,g)}function f(){if(r<=e)return[a.max];if(t==="keepSnaps")return s;var u=l(),n=u.min,v=u.max;return s.slice(n,v)}var c={snapsContained:o};return c}function Qe(e,r,i){var t=a();function a(){var o=r[0],l=X(r),f=i?o-e:l,c=o;return oe(f,c)}var s={limit:t};return s}function er(e,r,i,t){var a=.1,s=r.min+a,o=r.max+a,l=oe(s,o),f=l.reachedMin,c=l.reachedMax;function u(g){return g===1?c(i.get()):g===-1?f(i.get()):!1}function n(g){if(!!u(g)){var m=e*(g*-1);t.forEach(function(E){return E.add(m)})}}var v={loop:n};return v}function rr(e){var r=e.max,i=e.length;function t(s){var o=s-r;return o/-i}var a={get:t};return a}function nr(e,r,i,t,a,s,o){var l=e.startEdge,f=e.endEdge,c=s.groupSlides,u=g().map(r.measure),n=m(),v=E();function g(){return c(t).map(function(h){return X(h)[f]-h[0][l]}).map(D)}function m(){return t.map(function(h){return i[l]-h[l]}).map(function(h){return-D(h)})}function E(){var h=0,x=X(n)-X(a);return c(n).map(function(w){return w[0]}).map(function(w,S,y){var b=!S,A=S===fe(y);return o&&b?h:o&&A?x:w+u[S]})}var d={snaps:n,snapsAligned:v};return d}function tr(e,r,i,t,a){var s=t.reachedAny,o=t.removeOffset,l=t.constrain;function f(m){return m.concat().sort(function(E,d){return D(E)-D(d)})[0]}function c(m){var E=e?o(m):l(m),d=r.map(function(x){return x-E}).map(function(x){return u(x,0)}).map(function(x,w){return{diff:x,index:w}}).sort(function(x,w){return D(x.diff)-D(w.diff)}),h=d[0].index;return{index:h,distance:E}}function u(m,E){var d=[m,m+i,m-i];if(!e)return d[0];if(!E)return f(d);var h=d.filter(function(x){return me(x)===E});return f(h)}function n(m,E){var d=r[m]-a.get(),h=u(d,E);return{index:m,distance:h}}function v(m,E){var d=a.get()+m,h=c(d),x=h.index,w=h.distance,S=!e&&s(d);if(!E||S)return{index:x,distance:m};var y=r[x]-w,b=m+u(y,0);return{index:x,distance:b}}var g={byDistance:v,byIndex:n,shortcut:u};return g}function ar(e,r,i,t,a,s){function o(u){var n=u.distance,v=u.index!==r.get();n&&(e.start(),a.add(n)),v&&(i.set(r.get()),r.set(u.index),s.emit("select"))}function l(u,n){var v=t.byDistance(u,n);o(v)}function f(u,n){var v=r.clone().set(u),g=t.byIndex(v.get(),n);o(g)}var c={distance:l,index:f};return c}function Te(e,r,i){var t=e.scroll==="x"?o:l,a=i.style,s=!1;function o(v){return"translate3d(".concat(v,"px,0px,0px)")}function l(v){return"translate3d(0px,".concat(v,"px,0px)")}function f(v){s||(a.transform=t(r.apply(v.get())))}function c(v){s=!v}function u(){s||(a.transform="",i.getAttribute("style")||i.removeAttribute("style"))}var n={clear:u,to:f,toggleActive:c};return n}function ir(e,r,i,t,a,s,o,l,f){var c=ue(a),u=ue(a).reverse(),n=E().concat(d());function v(y,b){return y.reduce(function(A,M){return A-a[M]},b)}function g(y,b){return y.reduce(function(A,M){var O=v(A,b);return O>0?A.concat([M]):A},[])}function m(y,b){var A=b==="start",M=A?-t:t,O=o.findSlideBounds([M]);return y.map(function(V){var G=A?0:-t,H=A?t:0,W=O.filter(function(C){return C.index===V})[0],z=W[A?"end":"start"],L=Z(-1),U=Z(-1),J=Te(e,r,f[V]),_=function(){return L.set(l.get()>z?G:H)};return{index:V,location:U,translate:J,target:_}})}function E(){var y=s[0]-1,b=g(u,y);return m(b,"end")}function d(){var y=i-s[0]-1,b=g(c,y);return m(b,"start")}function h(){return n.every(function(y){var b=y.index,A=c.filter(function(M){return M!==b});return v(A,i)<=.1})}function x(){n.forEach(function(y){var b=y.target,A=y.translate,M=y.location,O=b();O.get()!==M.get()&&(O.get()===0?A.clear():A.to(O),M.set(O))})}function w(){n.forEach(function(y){return y.translate.clear()})}var S={canLoop:h,clear:w,loop:x,loopPoints:n};return S}function or(e,r,i,t,a,s,o){var l=a.removeOffset,f=a.constrain,c=.5,u=s?[0,r,-r]:[0],n=g(u,o);function v(d){var h=d||0;return i.map(function(x){var w=oe(c,x-c);return w.constrain(x*h)})}function g(d,h){var x=d||u,w=v(h);return x.reduce(function(S,y){var b=t.map(function(A,M){return{start:A-i[M]+w[M]+y,end:A+e-w[M]+y,index:M}});return S.concat(b)},[])}function m(d,h){var x=s?l(d):f(d),w=h||n;return w.reduce(function(S,y){var b=y.index,A=y.start,M=y.end,O=S.indexOf(b)!==-1,V=A<x&&M>x;return!O&&V?S.concat([b]):S},[])}var E={check:m,findSlideBounds:g};return E}function sr(e,r,i,t,a){var s=e.measureSize,o=e.startEdge,l=e.endEdge,f=v(),c=g(),u=i.map(s),n=m();function v(){if(!a)return 0;var d=i[0];return D(r[o]-d[o])}function g(){if(!a)return 0;var d=window.getComputedStyle(X(t));return parseFloat(d.getPropertyValue("margin-".concat(l)))}function m(){return i.map(function(d,h,x){var w=!h,S=h===fe(x);return w?u[h]+f:S?u[h]+c:x[h+1][o]-d[o]}).map(D)}var E={slideSizes:u,slideSizesWithGaps:n};return E}function ur(e,r,i){var t=pe(i);function a(f,c){return ue(f).filter(function(u){return u%c===0}).map(function(u){return f.slice(u,u+c)})}function s(f){return ue(f).reduce(function(c,u){var n=r.slice(X(c),u+1),v=n.reduce(function(g,m){return g+m},0);return!u||v>e?c.concat(u):c},[]).map(function(c,u,n){return f.slice(c,n[u+1])})}function o(f){return t?a(f,i):s(f)}var l={groupSlides:o};return l}function cr(e,r,i,t,a){var s=t.align,o=t.axis,l=t.direction,f=t.startIndex,c=t.inViewThreshold,u=t.loop,n=t.speed,v=t.dragFree,g=t.slidesToScroll,m=t.skipSnaps,E=t.containScroll,d=r.getBoundingClientRect(),h=i.map(function(K){return K.getBoundingClientRect()}),x=We(l),w=Ge(o,l),S=w.measureSize(d),y=Xe(S),b=je(s,S),A=!u&&E!=="",M=u||E!=="",O=sr(w,d,h,i,M),V=O.slideSizes,G=O.slideSizesWithGaps,H=ur(S,G,g),W=nr(w,b,d,h,G,H,A),z=W.snaps,L=W.snapsAligned,U=-X(z)+X(G),J=Ye(S,U,L,E).snapsContained,_=A?J:L,C=Qe(U,_,u).limit,$=Ae(fe(_),f,u),ne=$.clone(),te=ue(i),ae=function(){u||N.scrollBounds.constrain(N.dragHandler.pointerDown()),N.scrollBody.seek(F).update();var K=N.scrollBody.settle(F);K&&!N.dragHandler.pointerDown()&&(N.animation.stop(),a.emit("settle")),K||a.emit("scroll"),u&&(N.scrollLooper.loop(N.scrollBody.direction()),N.slideLooper.loop()),N.translate.to(q),N.animation.proceed()},j=qe(ae),ie=_[$.get()],q=Z(ie),F=Z(ie),T=Ze(q,n,1),p=tr(u,_,U,C,F),I=ar(j,$,ne,p,F,a),B=or(S,U,V,z,C,u,c),R=Ke(w,x,e,F,$e(w),q,j,I,T,p,$,a,y,u,v,m),N={containerRect:d,slideRects:h,animation:j,axis:w,direction:x,dragHandler:R,eventStore:le(),percentOfView:y,index:$,indexPrevious:ne,limit:C,location:q,options:t,scrollBody:T,scrollBounds:Je(C,q,F,T,y),scrollLooper:er(U,C,q,[q,F]),scrollProgress:rr(C),scrollSnaps:_,scrollTarget:p,scrollTo:I,slideLooper:ir(w,x,S,U,G,_,B,q,i),slidesToScroll:H,slidesInView:B,slideIndexes:te,target:F,translate:Te(w,x,r)};return N}function lr(){var e={};function r(o){return e[o]||[]}function i(o){return r(o).forEach(function(l){return l(o)}),s}function t(o,l){return e[o]=r(o).concat([l]),s}function a(o,l){return e[o]=r(o).filter(function(f){return f!==l}),s}var s={emit:i,off:a,on:t};return s}var fr={align:"center",axis:"x",containScroll:"",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,draggable:!0,inViewThreshold:0,loop:!1,skipSnaps:!1,speed:10,startIndex:0,active:!0};function ge(){function e(a,s){return Ee(a,s||{})}function r(a,s){var o=JSON.stringify(ee(a.breakpoints||{})),l=JSON.stringify(ee(s.breakpoints||{}));return o!==l?!1:be(a,s)}function i(a){var s=a.breakpoints||{},o=ee(s).filter(function(l){return window.matchMedia(l).matches}).map(function(l){return s[l]}).reduce(function(l,f){return e(l,f)},{});return e(a,o)}var t={merge:e,areEqual:r,atMedia:i};return t}function dr(){var e=ge(),r=e.atMedia,i=e.areEqual,t=[],a=[];function s(){return a.some(function(u){return u()})}function o(u){var n=r(u.options);return function(){return!i(n,r(u.options))}}function l(u,n){return a=u.map(o),t=u.filter(function(v){return r(v.options).active}),t.forEach(function(v){return v.init(n)}),u.reduce(function(v,g){var m;return Object.assign(v,(m={},m[g.name]=g,m))},{})}function f(){t=t.filter(function(u){return u.destroy()})}var c={init:l,destroy:f,haveChanged:s};return c}function re(e,r,i){var t=le(),a=ge(),s=dr(),o=lr(),l=o.on,f=o.off,c=b,u=!1,n,v=a.merge(fr,re.globalOptions),g=a.merge(v),m=[],E,d=0,h,x,w;function S(){var T="container"in e&&e.container,p="slides"in e&&e.slides;h="root"in e?e.root:e,x=T||h.children[0],w=p||[].slice.call(x.children)}function y(T,p){if(!u){if(S(),v=a.merge(v,T),g=a.atMedia(v),n=cr(h,x,w,g,o),d=n.axis.measureSize(h.getBoundingClientRect()),!g.active)return A();if(n.translate.to(n.location),m=p||m,E=s.init(m,F),g.loop){if(!n.slideLooper.canLoop())return A(),y({loop:!1},p);n.slideLooper.loop()}g.draggable&&x.offsetParent&&w.length&&n.dragHandler.addActivationEvents()}}function b(T,p){var I=C();A(),y(a.merge({startIndex:I},T),p),o.emit("reInit")}function A(){n.dragHandler.removeAllEvents(),n.animation.stop(),n.eventStore.removeAll(),n.translate.clear(),n.slideLooper.clear(),s.destroy()}function M(){u||(u=!0,t.removeAll(),A(),o.emit("destroy"))}function O(){var T=a.atMedia(v),p=!a.areEqual(T,g),I=n.axis.measureSize(h.getBoundingClientRect()),B=d!==I,R=s.haveChanged();(B||p||R)&&b(),o.emit("resize")}function V(T){var p=n[T?"target":"location"].get(),I=g.loop?"removeOffset":"constrain";return n.slidesInView.check(n.limit[I](p))}function G(T){var p=V(T);return n.slideIndexes.filter(function(I){return p.indexOf(I)===-1})}function H(T,p,I){!g.active||u||(n.scrollBody.useBaseMass().useSpeed(p?100:g.speed),n.scrollTo.index(T,I||0))}function W(T){var p=n.index.clone().add(1);H(p.get(),T===!0,-1)}function z(T){var p=n.index.clone().add(-1);H(p.get(),T===!0,1)}function L(){var T=n.index.clone().add(1);return T.get()!==C()}function U(){var T=n.index.clone().add(-1);return T.get()!==C()}function J(){return n.scrollSnaps.map(n.scrollProgress.get)}function _(){return n.scrollProgress.get(n.location.get())}function C(){return n.index.get()}function $(){return n.indexPrevious.get()}function ne(){return n.dragHandler.clickAllowed()}function te(){return E}function ae(){return n}function j(){return h}function ie(){return x}function q(){return w}var F={canScrollNext:L,canScrollPrev:U,clickAllowed:ne,containerNode:ie,internalEngine:ae,destroy:M,off:f,on:l,plugins:te,previousScrollSnap:$,reInit:c,rootNode:j,scrollNext:W,scrollPrev:z,scrollProgress:_,scrollSnapList:J,scrollTo:H,selectedScrollSnap:C,slideNodes:q,slidesInView:V,slidesNotInView:G};return y(r,i),t.add(window,"resize",O),setTimeout(function(){return o.emit("init")},0),F}re.globalOptions=void 0;re.optionsHandler=ge;function vr(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function Se(e){return e.concat().sort(function(r,i){return r.name>i.name?1:-1}).map(function(r){return r.options})}function pr(e,r){if(e.length!==r.length)return!1;var i=re.optionsHandler().areEqual,t=Se(e),a=Se(r);return t.every(function(s,o){var l=a[o];return i(s,l)})}function he(e,r){e===void 0&&(e={}),r===void 0&&(r=[]);var i=k.exports.useRef(re.optionsHandler()),t=k.exports.useRef(e),a=k.exports.useRef(r),s=k.exports.useState(),o=s[0],l=s[1],f=k.exports.useState(),c=f[0],u=f[1],n=k.exports.useCallback(function(){o&&o.reInit(t.current,a.current)},[o]);return k.exports.useEffect(function(){if(vr()&&c){re.globalOptions=he.globalOptions;var v=re(c,t.current,a.current);return l(v),function(){return v.destroy()}}else l(void 0)},[c,l]),k.exports.useEffect(function(){i.current.areEqual(t.current,e)||(t.current=e,n())},[e,n]),k.exports.useEffect(function(){pr(a.current,r)||(a.current=r,n())},[r,n]),[u,o]}he.globalOptions=void 0;const mr={interactionPromptThreshold:"0"};function Pr({storefrontProduct:e}){var m,E;const r=(m=e==null?void 0:e.media)==null?void 0:m.nodes,[i,t]=k.exports.useState(!1),[a,s]=k.exports.useState(),[o,l]=k.exports.useState(0);k.exports.useEffect(()=>{l(window.innerWidth);const d=()=>{l(window.innerWidth)};return window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d)}},[]);const f=d=>{o>=1024&&d.mediaContentType==="IMAGE"&&(t(!i),s(d))},{selectedVariant:c}=Pe(),[u,n]=he({align:"start",draggable:!(o>=1024),loop:!0,skipSnaps:!0,speed:7}),v=()=>{n&&n.scrollNext()},g=()=>{n&&n.scrollPrev()};return k.exports.useEffect(()=>{var x,w,S;if(!c)return;const d=(w=(x=c==null?void 0:c.image)==null?void 0:x.url)==null?void 0:w.split("?")[0],h=(S=r==null?void 0:r.findIndex(y=>{var b;return y.mediaContentType===de.Image?((b=y==null?void 0:y.image)==null?void 0:b.url.split("?")[0])===d:!1}))!=null?S:-1;n&&h>=0&&n.scrollTo(h,!0)},[n,r,c]),r!=null&&r.length?ce("div",{className:Y("relative bg-white px-10 mb-20 pt-edit"),tabIndex:-1,children:[i&&ce("div",{className:"fixed inset-0 z-[9999] h-screen w-screen bg-white overflow-y-scroll",onClick:()=>f(a),children:[P(we,{className:Y("relative w-full","cursor-zoom-out"),data:a,alt:e.title,draggable:!1,fetchpriority:"high",options:{crop:"center"},tabIndex:0},a.id),((E=a==null?void 0:a.image)==null?void 0:E.altText)&&P("div",{className:Y("fixed bottom-5 left-5 w-full"),children:P("span",{className:"bg-highlight px-5",children:a.image.altText})})]}),P("div",{className:"overflow-hidden w-full",ref:u,children:P("div",{className:"flex w-full",children:[...Array(2)].map(()=>r.map(d=>{var x,w;let h={};return d.mediaContentType===de.Model_3D&&(h=mr),ce("div",{className:Y("relative flex w-full shrink-0 grow-0 select-none object-cover mr-5","sm:h-[calc(calc(100vw-25px)/2)] sm:w-[calc(calc(100vw-25px)/2)]","lg:h-[calc(calc(100vw-35px)/4)] lg:w-[calc(calc(100vw-35px)/4)]","cursor-zoom-in"),children:[P(we,{className:Y("cursor-zoom-in"),data:d,alt:e.title,draggable:!1,fetchpriority:"high",options:{crop:"center"},tabIndex:0,onClick:()=>f(d),...h},d.id),d.mediaContentType===de.Image&&((x=d==null?void 0:d.image)==null?void 0:x.altText)&&P("div",{className:Y("absolute bottom-5 left-5 truncate z-50","w-[calc(calc(100vw-30px))]","sm:w-[calc(calc(100vw-45px)/2)]","lg:w-[calc(calc(100vw-75px)/4)]"),children:P("span",{className:"bg-highlight px-5",children:(w=d==null?void 0:d.image)==null?void 0:w.altText})})]},d.id)}))})}),r.length>1&&ce(Oe,{children:[P("div",{className:"absolute left-0 top-0 h-full p-10 flex items-center cursor-w-resize",onClick:g,children:P("span",{className:"ml-10 text-small select-none scale-[1.15]",children:"\u2190"})}),P("div",{className:"absolute right-0 top-0 h-full p-10 flex items-center cursor-e-resize",onClick:v,children:P("span",{className:"mr-10 text-small select-none scale-[1.15]",children:"\u2192"})})]})]}):P("div",{className:"px-10 overflow-hidden w-full",ref:u,children:P("div",{className:"px-10 mb-20 pt-edit flex w-full",children:[...Array(4)].map(d=>P("div",{className:Y("relative flex w-full bg-lightGray shrink-0 grow-0 select-none object-cover mr-5","sm:h-[calc(calc(100vw-25px)/2)] sm:w-[calc(calc(100vw-25px)/2)]","lg:h-[calc(calc(100vw-35px)/4)] lg:w-[calc(calc(100vw-35px)/4)]","cursor-zoom-in")},d))})})}export{Pr as default}; //# sourceMappingURL=603dd8ae.js.map