1(()=>{function hr(n,t){n.indexOf(t)===-1&&n.push(t)}function We(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var Kt=(n,t,e)=>e>t?t:e<n?n:e,Ee=()=>{},Qt=()=>{},jt={},Ai=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function pr(n){return typeof n=="object"&&n!==null}var Ci=n=>/^0[^.\s]+$/u.test(n);function Ei(n){let t;return()=>(t===void 0&&(t=n()),t)}var ne=n=>n,il=(n,t)=>e=>t(n(e)),Ue=(...n)=>n.reduce(il),Ze=(n,t,e)=>{let i=t-n;return i===0?1:(e-n)/i},Ge=class{constructor(){this.subscriptions=[]}add(t){return hr(this.subscriptions,t),()=>We(this.subscriptions,t)}notify(t,e,i){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,e,i);else for(let s=0;s<r;s++){let o=this.subscriptions[s];o&&o(t,e,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},Pt=n=>n*1e3,Ht=n=>n/1e3;function Ii(n,t){return t?n*(1e3/t):0}var Bs=(n,t,e)=>{let i=t-n;return((e-n)%i+i)%i+n},Ns=(n,t,e)=>(((1-3*e+3*t)*n+(3*e-6*t))*n+3*t)*n,nl=1e-7,rl=12;function sl(n,t,e,i,r){let s,o,a=0;do o=t+(e-t)/2,s=Ns(o,i,r)-n,s>0?e=o:t=o;while(Math.abs(s)>nl&&++a<rl);return o}function Ve(n,t,e,i){if(n===t&&e===i)return ne;let r=s=>sl(s,0,1,n,e);return s=>s===0||s===1?s:Ns(r(s),t,i)}var yn=n=>t=>t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2,vn=n=>t=>1-n(1-t),bn=Ve(.33,1.53,.69,.99),ri=vn(bn),Pi=yn(ri),Li=n=>n>=1?1:(n*=2)<1?.5*ri(n):.5*(2-Math.pow(2,-10*(n-1))),Mi=n=>1-Math.sin(Math.acos(n)),fr=vn(Mi),ki=yn(Mi),mr=Ve(.42,0,1,1),gr=Ve(0,0,.58,1),Di=Ve(.42,0,.58,1),Vi=n=>Array.isArray(n)&&typeof n[0]!="number";function Oi(n,t){return Vi(n)?n[Bs(0,n.length,t)]:n}var Fi=n=>Array.isArray(n)&&typeof n[0]=="number",zs={linear:ne,easeIn:mr,easeInOut:Di,easeOut:gr,circIn:Mi,circInOut:ki,circOut:fr,backIn:ri,backInOut:Pi,backOut:bn,anticipate:Li},ol=n=>typeof n=="string",Sn=n=>{if(Fi(n)){Qt(n.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,e,i,r]=n;return Ve(t,e,i,r)}else if(ol(n))return Qt(zs[n]!==void 0,`Invalid easing type '${n}'`,"invalid-easing-type"),zs[n];return n},Ri=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],si={value:null,addProjectionMetrics:null};function $s(n,t){let e=new Set,i=new Set,r=!1,s=!1,o=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){o.has(d)&&(u.schedule(d),n()),l++,d(a)}let u={schedule:(d,p=!1,g=!1)=>{let y=g&&r?e:i;return p&&o.add(d),y.add(d),d},cancel:d=>{i.delete(d),o.delete(d)},process:d=>{if(a=d,r){s=!0;return}r=!0;let p=e;e=i,i=p,e.forEach(c),t&&si.value&&si.value.frameloop[t].push(l),l=0,e.clear(),r=!1,s&&(s=!1,u.process(d))}};return u}var al=40;function xn(n,t){let e=!1,i=!0,r={delta:0,timestamp:0,isProcessing:!1},s=()=>e=!0,o=Ri.reduce((T,I)=>(T[I]=$s(s,t?I:void 0),T),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:p,render:g,postRender:m}=o,y=()=>{let T=jt.useManualTiming,I=T?r.timestamp:performance.now();e=!1,T||(r.delta=i?1e3/60:Math.max(Math.min(I-r.timestamp,al),1)),r.timestamp=I,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),u.process(r),d.process(r),p.process(r),g.process(r),m.process(r),r.isProcessing=!1,e&&t&&(i=!1,n(y))},v=()=>{e=!0,i=!0,r.isProcessing||n(y)};return{schedule:Ri.reduce((T,I)=>{let L=o[I];return T[I]=(R,F=!1,P=!1)=>(e||v(),L.schedule(R,F,P)),T},{}),cancel:T=>{for(let I=0;I<Ri.length;I++)o[Ri[I]].cancel(T)},state:r,steps:o}}var{schedule:Wt,cancel:qi,state:oi,steps:qh}=xn(typeof requestAnimationFrame<"u"?requestAnimationFrame:ne,!0),wn;function ll(){wn=void 0}var Vt={now:()=>(wn===void 0&&Vt.set(oi.isProcessing||jt.useManualTiming?oi.timestamp:performance.now()),wn),set:n=>{wn=n,queueMicrotask(ll)}},ai={layout:0,mainThread:0,waapi:0},Hs=n=>t=>typeof t=="string"&&t.startsWith(n),_n=Hs("--"),cl=Hs("var(--"),li=n=>cl(n)?ul.test(n.split("/*")[0].trim()):!1,ul=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function yr(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}var Se={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Ie={...Se,transform:n=>Kt(0,1,n)},Bi={...Se,default:1},Oe=n=>Math.round(n*1e5)/1e5,ci=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ws(n){return n==null}var Us=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ui=(n,t)=>e=>!!(typeof e=="string"&&Us.test(e)&&e.startsWith(n)||t&&!Ws(e)&&Object.prototype.hasOwnProperty.call(e,t)),Tn=(n,t,e)=>i=>
1{if(typeof i!="string")return i;let[r,s,o,a]=i.match(ci);return{[n]:parseFloat(r),[t]:parseFloat(s),[e]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},dl=n=>Kt(0,255,n),vr={...Se,transform:n=>Math.round(dl(n))},xe={test:ui("rgb","red"),parse:Tn("red","green","blue"),transform:({red:n,green:t,blue:e,alpha:i=1})=>"rgba("+vr.transform(n)+", "+vr.transform(t)+", "+vr.transform(e)+", "+Oe(Ie.transform(i))+")"};function hl(n){let t="",e="",i="",r="";return n.length>5?(t=n.substring(1,3),e=n.substring(3,5),i=n.substring(5,7),r=n.substring(7,9)):(t=n.substring(1,2),e=n.substring(2,3),i=n.substring(3,4),r=n.substring(4,5),t+=t,e+=e,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}var Ni={test:ui("#"),parse:hl,transform:xe.transform},zi=n=>({test:t=>typeof t=="string"&&t.endsWith(n)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${n}`}),we=zi("deg"),Fe=zi("%"),O=zi("px"),Zs=zi("vh"),Gs=zi("vw"),br={...Fe,parse:n=>Fe.parse(n)/100,transform:n=>Fe.transform(n*100)},Re={test:ui("hsl","hue"),parse:Tn("hue","saturation","lightness"),transform:({hue:n,saturation:t,lightness:e,alpha:i=1})=>"hsla("+Math.round(n)+", "+Fe.transform(Oe(t))+", "+Fe.transform(Oe(e))+", "+Oe(Ie.transform(i))+")"},gt={test:n=>xe.test(n)||Ni.test(n)||Re.test(n),parse:n=>xe.test(n)?xe.parse(n):Re.test(n)?Re.parse(n):Ni.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?xe.transform(n):Re.transform(n),getAnimatableNone:n=>{let t=gt.parse(n);return t.alpha=0,gt.transform(t)}},Ks=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function pl(n){return isNaN(n)&&typeof n=="string"&&(n.match(ci)?.length||0)+(n.match(Ks)?.length||0)>0}var Xs="number",Ys="color",fl="var",ml="var(",js="${}",gl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function qe(n){let t=n.toString(),e=[],i={color:[],number:[],var:[]},r=[],s=0,a=t.replace(gl,l=>(gt.test(l)?(i.color.push(s),r.push(Ys),e.push(gt.parse(l))):l.startsWith(ml)?(i.var.push(s),r.push(fl),e.push(l)):(i.number.push(s),r.push(Xs),e.push(parseFloat(l))),++s,js)).split(js);return{values:e,split:a,indexes:i,types:r}}function yl(n){return qe(n).values}function Qs({split:n,types:t}){let e=n.length;return i=>{let r="";for(let s=0;s<e;s++)if(r+=n[s],i[s]!==void 0){let o=t[s];o===Xs?r+=Oe(i[s]):o===Ys?r+=gt.transform(i[s]):r+=i[s]}return r}}function vl(n){return Qs(qe(n))}var bl=n=>typeof n=="number"?0:gt.test(n)?gt.getAnimatableNone(n):n,Sl=(n,t)=>typeof n=="number"?t?.trim().endsWith("/")?n:0:bl(n);function xl(n){let t=qe(n);return Qs(t)(t.values.map((i,r)=>Sl(i,t.split[r])))}var Ot={test:pl,parse:yl,createTransformer:vl,getAnimatableNone:xl};function Sr(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*6*e:e<1/2?t:e<2/3?n+(t-n)*(2/3-e)*6:n}function Js({hue:n,saturation:t,lightness:e,alpha:i}){n/=360,t/=100,e/=100;let r=0,s=0,o=0;if(!t)r=s=o=e;else{let a=e<.5?e*(1+t):e+t-e*t,l=2*e-a;r=Sr(l,a,n+1/3),s=Sr(l,a,n),o=Sr(l,a,n-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}function di(n,t){return e=>e>0?t:n}var re=(n,t,e)=>n+(t-n)*e,xr=(n,t,e)=>{let i=n*n,r=e*(t*t-i)+i;return r<0?0:Math.sqrt(r)},wl=[Ni,xe,Re],_l=n=>wl.find(t=>t.test(n));function to(n){let t=_l(n);if(Ee(!!t,`'${n}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let e=t.parse(n);return t===Re&&(e=Js(e)),e}var wr=(n,t)=>{let e=to(n),i=to(t);if(!e||!i)return di(n,t);let r={...e};return s=>(r.red=xr(e.red,i.red,s),r.green=xr(e.green,i.green,s),r.blue=xr(e.blue,i.blue,s),r.alpha=re(e.alpha,i.alpha,s),xe.transform(r))},An=new Set(["none","hidden"]);function eo(n,t){return An.has(n)?e=>e<=0?n:t:e=>e>=1?t:n}function Tl(n,t){return e=>re(n,t,e)}function Cn(n){return typeof n=="number"?Tl:typeof n=="string"?li(n)?di:gt.test(n)?wr:El:Array.isArray(n)?io:typeof n=="object"?gt.test(n)?wr:Al:di}
1function io(n,t){let e=[...n],i=e.length,r=n.map((s,o)=>Cn(s)(s,t[o]));return s=>{for(let o=0;o<i;o++)e[o]=r[o](s);return e}}function Al(n,t){let e={...n,...t},i={};for(let r in e)n[r]!==void 0&&t[r]!==void 0&&(i[r]=Cn(n[r])(n[r],t[r]));return r=>{for(let s in i)e[s]=i[s](r);return e}}function Cl(n,t){let e=[],i={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){let s=t.types[r],o=n.indexes[s][i[s]],a=n.values[o]??0;e[r]=a,i[s]++}return e}var El=(n,t)=>{let e=Ot.createTransformer(t),i=qe(n),r=qe(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?An.has(n)&&!r.values.length||An.has(t)&&!i.values.length?eo(n,t):Ue(io(Cl(i,r),r.values),e):(Ee(!0,`Complex values '${n}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),di(n,t))};function En(n,t,e){return typeof n=="number"&&typeof t=="number"&&typeof e=="number"?re(n,t,e):Cn(n)(n,t)}var no=n=>{let t=({timestamp:e})=>n(e);return{start:(e=!0)=>Wt.update(t,e),stop:()=>qi(t),now:()=>oi.isProcessing?oi.timestamp:Vt.now()}},In=(n,t,e=10)=>{let i="",r=Math.max(Math.round(t/e),2);for(let s=0;s<r;s++)i+=Math.round(n(s/(r-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`};function hi(n){let t=0,e=50,i=n.next(t);for(;!i.done&&t<2e4;)t+=e,i=n.next(t);return t>=2e4?1/0:t}function $i(n,t=100,e){let i=e({...n,keyframes:[0,t]}),r=Math.min(hi(i),2e4);return{type:"keyframes",ease:s=>i.next(r*s).value/t,duration:Ht(r)}}var St={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Ar(n,t){return n*Math.sqrt(1-t*t)}var Il=12;function Pl(n,t,e){let i=e;for(let r=1;r<Il;r++)i=i-n(i)/t(i);return i}var Tr=.001;function Ll({duration:n=St.duration,bounce:t=St.bounce,velocity:e=St.velocity,mass:i=St.mass}){let r,s;Ee(n<=Pt(St.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Kt(St.minDamping,St.maxDamping,o),n=Kt(St.minDuration,St.maxDuration,Ht(n)),o<1?(r=c=>{let u=c*o,d=u*n,p=u-e,g=Ar(c,o),m=Math.exp(-d);return Tr-p/g*m},s=c=>{let d=c*o*n,p=d*e+e,g=Math.pow(o,2)*Math.pow(c,2)*n,m=Math.exp(-d),y=Ar(Math.pow(c,2),o);return(-r(c)+Tr>0?-1:1)*((p-g)*m)/y}):(r=c=>{let u=Math.exp(-c*n),d=(c-e)*n+1;return-Tr+u*d},s=c=>{let u=Math.exp(-c*n),d=(e-c)*(n*n);return u*d});let a=5/n,l=Pl(r,s,a);if(n=Pt(n),isNaN(l))return{stiffness:St.stiffness,damping:St.damping,duration:n};{let c=Math.pow(l,2)*i;return{stiffness:c,damping:o*2*Math.sqrt(i*c),duration:n}}}var Ml=["duration","bounce"],kl=["stiffness","damping","mass"];function ro(n,t){return t.some(e=>n[e]!==void 0)}function Dl(n){let t={velocity:St.velocity,stiffness:St.stiffness,damping:St.damping,mass:St.mass,isResolvedFromDuration:!1,...n};if(!ro(n,kl)&&ro(n,Ml))if(t.velocity=0,n.visualDuration){let e=n.visualDuration,i=2*Math.PI/(e*1.2),r=i*i,s=2*Kt(.05,1,1-(n.bounce||0))*Math.sqrt(r);t={...t,mass:St.mass,stiffness:r,damping:s}}else{let e=Ll({...n,velocity:0});t={...t,...e,mass:St.mass},t.isResolvedFromDuration=!0}return t}function Pe(n=St.visualDuration,t=St.bounce){let e=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:t}:n,{restSpeed:i,restDelta:r}=e,s=e.keyframes[0],o=e.keyframes[e.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:g}=Dl({...e,velocity:-Ht(e.velocity||0)}),m=p||0,y=c/(2*Math.sqrt(l*u)),v=o-s,b=Ht(Math.sqrt(l/u)),_=Math.abs(v)<5;i||(i=_?St.restSpeed.granular:St.restSpeed.default),r||(r=_?St.restDelta.granular:St.restDelta.default);let T,I,L,R,F,P;if(y<1)L=Ar(b,y),R=(m+y*b*v)/L,T=E=>{let B=Math.exp(-y*b*E);return o-B*(R*Math.sin(L*E)+v*Math.cos(L*E))},F=y*b*R+v*L,P=y*b*v-R*L,I=E=>Math.exp(-y*b*E)*(F*Math.sin(L*E)+P*Math.cos(L*E));else if(y===1){T=B=>o-Math.exp(-b*B)*(v+(m+b*v)*B);let E=m+b*v;I=B=>Math.exp(-b*B)*(b*E*B-m)}else{let E=b*Math.sqrt(y*y-1);T=ut=>{let yt=Math.exp(-y*b*ut),_t=Math.min(E*ut,300);return o-yt*((m+y*b*v)*Math.sinh(_t)+E*v*Math.cosh(_t))/E};let B=(m+y*b*v)/E,X=y*b*B-v*E,ot=y*b*v-B*E;I=ut=>{let yt=Math.exp(-y*b*ut),_t=Math.min(E*ut,300);return yt*(X*Math.sinh(_t)+ot*Math.cosh(_t))}}let k={calculatedDuration:g&&d||null,velocity:E=>Pt(I(E)),next:E=>{if(!g&&y<1){let X=Math.exp(-y*b*E),ot=Math.sin(L*E),ut=Math.cos(L*E),yt=o-X*(R*ot+v*ut),_t=Pt(X*(F*ot+P*ut));return a.done=Math.abs(_t)<=i&&Math.abs(o-yt)<=r,a.value=a.done?o:yt,a}let B=T(E);if(g)a.done=E>=d;else{let X=Pt(I(E));a.done=Math.abs(X)<=i&&Math.abs(o-B)<=r}return a.value=a.done?o:B,a},toString:()=>{let E=Math.min(hi(k),2e4),B=In(X=>k.next(E*X).value,E,30);return E+"ms "+B},toTransition:()=>{}};return k}Pe.applyToOptions=n=>{let t=$i(n,100,Pe);return n.ease=t.ease,n.duration=Pt(t.duration),n.type="keyframes",n};var Vl=5;function Pn(n,t,e){let i=Math.max(t-Vl,0);return Ii(e-n(i),t-i)}function Hi({keyframes:n,velocity:t=0,power:e=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){let d=n[0],p={done:!1,value:d},g=P=>a!==void 0&&P<a||l!==void 0&&P>l,m=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l,y=e*t,v=d+y,b=o===void 0?v:o(v);b!==v&&(y=b-d);let _=P=>-y*Math.exp(-P/i),T=P=>b+_(P),I=P=>{let k=_(P),E=T(P);p.done=Math.abs(k)<=c,p.value=p.done?b:E},L,R,F=P=>{g(p.value)&&(L=P,R=Pe({keyframes:[p.value,m(p.value)],velocity:Pn(T,P,p.value),damping:r,stiffness:s,restDelta:c,restSpeed:u}))};return F(0),{calculatedDuration:null,next:P=>{let k=!1;return!R&&L===void 0&&(k=!0,I(P),F(P)),L!==void 0&&P>=L?R.next(P-L):(!k&&I(P),p)}}}function Ol(n,t,e){let i=[],r=e||jt.mix||En,s=n.length-1;for(let o=0;o<s;o++){let a=r(n[o],n[o+1]);if(t){let l=Array.isArray(t)?t[o]||ne:t;a=Ue(l,a)}i.push(a)}return i}function so(n,t,{clamp:e=!0,ease:i,mixer:r}={}){let s=n.length;if(Qt(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];let o=n[0]===n[1];n[0]>n[s-1]&&(n=[...n].reverse(),t=[...t].reverse());let a=Ol(t,i,r),l=a.length,c=u=>{if(o&&u<n[0])return t[0];let d=0;if(l>1)for(;d<n.length-2&&!(u<n[d+1]);d++);let p=Ze(n[d],n[d+1],u);return a[d](p)};return e?u=>c(Kt(n[0],n[s-1],u)):c}function Wi(n,t){let e=n[n.length-1];for(let i=1;i<=t;i++){let r=Ze(0,t,i);n.push(re(e,1,r))}}function Ui(n){let t=[0];return Wi(t,n.length-1),t}function oo(n,t){return n.map(e=>e*t)}function Fl(n,t){return n.map(()=>t||Di).splice(0,n.length-1)}function Ke({duration:n=300,keyframes:t,times:e,ease:i="easeInOut"}){let r=Vi(i)?i.map(Sn):Sn(i),s={done:!1,value:t[0]},o=oo(e&&e.length===t.length?e:Ui(t),n),a=so(o,t,{ease:Array.isArray(r)?r:Fl(t,r)});return{calculatedDuration:n,next:l=>(s.value=a(l),s.done=l>=n,s)}}var Rl=n=>n!==null;function Be(n,{repeat:t,repeatType:e="loop"},i,r=1){let s=n.filter(Rl),a=r<0||t&&e!=="loop"&&t%2===1?0:s.length-1;return!a||i===void 0?s[a]:i}var ql={decay:Hi,inertia:Hi,tween:Ke,keyframes:Ke,spring:Pe};function Ln(n){typeof n.type=="string"&&(n.type=ql[n.type])}var Ne=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}},Bl=n=>n/100,Le=class extends Ne{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Vt.now()&&this.tick(Vt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},ai.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;Ln(t);let{type:e=Ke,repeat:i=0,repeatDelay:r=0,repeatType:s,velocity:o=0}=t,{keyframes:a}=t,l=e||Ke;l!==Ke&&typeof a[0]!="number"&&(this.mixKeyframes=Ue(Bl,En(a[0],a[1])),a=[0,100]);let c=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=hi(c));let{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(i+1)-r,this.generator=c}updateTime(t){let e=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){let{generator:i,totalDuration:r,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);let{delay:c=0,keyframes:u,repeat:d,repeatType:p,repeatDelay:g,type:m,onUpdate:y,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);let b=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?b<0:b>r;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let T=this.currentTime,I=i;if(d){let P=Math.min(this.currentTime,r)/a,k=Math.floor(P),E=P%1;!E&&P>=1&&(E=1),E===1&&k--,k=Math.min(k,d+1),k%2&&(p==="reverse"?(E=1-E,g&&(E-=g/a)):p==="mirror"&&(I=o)),T=Kt(0,1,E)*a}let L;_?(this.delayState.value=u[0],L=this.delayState):L=I.next(T),s&&!_&&(L.value=s(L.value));let{done:R}=L;!_&&l!==null&&(R=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let F=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return F&&m!==Hi&&(L.value=Be(u,this.options,v,this.speed)),y&&y(L.value),F&&this.finish(),L}then(t,e){return this.finished.then(t,e)}get duration(){return Ht(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Ht(t)}get time(){return Ht(this.currentTime)}set time(t){t=Pt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){let t=this.currentTime;
1if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);let e=this.generator.next(t).value;return Pn(i=>this.generator.next(i).value,t,e)}get speed(){return this.playbackSpeed}set speed(t){let e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(Vt.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=Ht(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=no,startTime:e}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),this.options.onPlay?.();let i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=e??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Vt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,ai.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}};function ao(n){for(let t=1;t<n.length;t++)n[t]??(n[t]=n[t-1])}var je=n=>n*180/Math.PI,Cr=n=>{let t=je(Math.atan2(n[1],n[0]));return Er(t)},Nl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:Cr,rotateZ:Cr,skewX:n=>je(Math.atan(n[1])),skewY:n=>je(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},Er=n=>(n=n%360,n<0&&(n+=360),n),lo=Cr,co=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),uo=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),zl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:co,scaleY:uo,scale:n=>(co(n)+uo(n))/2,rotateX:n=>Er(je(Math.atan2(n[6],n[5]))),rotateY:n=>Er(je(Math.atan2(-n[2],n[0]))),rotateZ:lo,rotate:lo,skewX:n=>je(Math.atan(n[4])),skewY:n=>je(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function Mn(n){return n.includes("scale")?1:0}function kn(n,t){if(!n||n==="none")return Mn(t);let e=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),i,r;if(e)i=zl,r=e;else{let a=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Nl,r=a}if(!r)return Mn(t);let s=i[t],o=r[1].split(",").map($l);return typeof s=="function"?s(o):o[s]}var ho=(n,t)=>{let{transform:e="none"}=getComputedStyle(n);return kn(e,t)};function $l(n){return parseFloat(n.trim())}var _e=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ue=new Set(_e),Ir=n=>n===Se||n===O,Hl=new Set(["x","y","z"]),Wl=_e.filter(n=>!Hl.has(n));function po(n){let t=[];return Wl.forEach(e=>{let i=n.getValue(e);i!==void 0&&(t.push([e,i.get()]),i.set(e.startsWith("scale")?1:0))}),t}var Me={width:({x:n},{paddingLeft:t="0",paddingRight:e="0",boxSizing:i})=>{let r=n.max-n.min;return i==="border-box"?r:r-parseFloat(t)-parseFloat(e)},height:({y:n},{paddingTop:t="0",paddingBottom:e="0",boxSizing:i})=>{let r=n.max-n.min;return i==="border-box"?r:r-parseFloat(t)-parseFloat(e)},top:(n,{top:t})=>parseFloat(t),left:(n,{left:t})=>parseFloat(t),bottom:({y:n},{top:t})=>parseFloat(t)+(n.max-n.min),right:({x:n},{left:t})=>parseFloat(t)+(n.max-n.min),x:(n,{transform:t})=>kn(t,"x"),y:(n,{transform:t})=>kn(t,"y")};Me.translateX=Me.x,Me.translateY=Me.y;var Xe=new Set,Pr=!1,Lr=!1,Mr=!1;function fo(){if(Lr){let n=Array.from(Xe).filter(i=>i.needsMeasurement),t=new Set(n.map(i=>i.element)),e=new Map;t.forEach(i=>{let r=po(i);r.length&&(e.set(i,r),i.render())}),n.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();let r=e.get(i);r&&r.forEach(([s,o])=>{i.getValue(s)?.set(o)})}
1),n.forEach(i=>i.measureEndState()),n.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Lr=!1,Pr=!1,Xe.forEach(n=>n.complete(Mr)),Xe.clear()}function mo(){Xe.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(Lr=!0)})}function go(){Mr=!0,mo(),fo(),Mr=!1}var ze=class{constructor(t,e,i,r,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=r,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Xe.add(this),Pr||(Pr=!0,Wt.read(mo),Wt.resolveKeyframes(fo))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:r}=this;if(t[0]===null){let s=r?.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(i&&e){let a=i.readValue(e,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),r&&s===void 0&&r.set(t[0])}ao(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Xe.delete(this)}cancel(){this.state==="scheduled"&&(Xe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}},yo=n=>n.startsWith("--");function Dn(n,t,e){yo(t)?n.style.setProperty(t,e):n.style[t]=e}var vo={};function Vn(n,t){let e=Ei(n);return()=>vo[t]??e()}var bo=Vn(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),On=Vn(()=>{try{document.createElement("div").animate({opacity:0}
1,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ye=([n,t,e,i])=>`cubic-bezier(${n}, ${t}, ${e}, ${i})`,kr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ye([0,.65,.55,1]),circOut:Ye([.55,0,1,.45]),backIn:Ye([.31,.01,.66,-.59]),backOut:Ye([.33,1.53,.69,.99])};function Dr(n,t){if(n)return typeof n=="function"?On()?In(n,t):"ease-out":Fi(n)?Ye(n):Array.isArray(n)?n.map(e=>Dr(e,t)||kr.easeOut):kr[n]}function So(n,t,e,{delay:i=0,duration:r=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){let u={[t]:e};l&&(u.offset=l);let d=Dr(a,r);Array.isArray(d)&&(u.easing=d),si.value&&ai.waapi++;let p={delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};c&&(p.pseudoElement=c);let g=n.animate(u,p);return si.value&&g.finished.finally(()=>{ai.waapi--}),g}function Qe(n){return typeof n=="function"&&"applyToOptions"in n}function xo({type:n,...t}){return Qe(n)&&On()?n.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var pi=class extends Ne{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;let{element:e,name:i,keyframes:r,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=t,Qt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let c=xo(t);this.animation=So(e,i,r,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let u=Be(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),Dn(e,i,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return Ht(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Ht(t)}get time(){return Ht(Number(this.animation.currentTime)||0)}set time(t){let e=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Pt(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:i,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&bo()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),i&&(this.animation.rangeEnd=i),ne):r(this)}},wo={anticipate:Li,backInOut:Pi,circInOut:ki};function Ul(n){return n in wo}function _o(n){typeof n.ease=="string"&&Ul(n.ease)&&(n.ease=wo[n.ease])}var Vr=10,Fn=class extends pi{constructor(t){_o(t),Ln(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:e,onUpdate:i,onComplete:r,element:s,...o}=this.options;if(!e)return;if(t!==void 0){e.set(t);return}let a=new Le({...o,autoplay:!1}),l=Math.max(Vr,Vt.now()-this.startTime),c=Kt(0,Vr,l-Vr),u=a.sample(l).value,{name:d}=this.options;s&&d&&Dn(s,d,u),e.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}},Or=(n,t)=>t==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(Ot.test(n)||n==="0")&&!n.startsWith("url("));function Zl(n){let t=n[0];if(n.length===1)return!0;for(let e=0;e<n.length;e++)if(n[e]!==t)return!0}function To(n,t,e,i){let r=n[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;let s=n[n.length-1],o=Or(r,t),a=Or(s,t);return Ee(o===a,`You are trying to animate ${t} from "${r}" to "${s}". "${o?s:r}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Zl(n)||(e==="spring"||Qe(e))&&i}function Zi(n){n.duration=0,n.type="keyframes"}var Rn=new Set(["opacity","clipPath","filter","transform"]),Gl=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Ao(n){for(let t=0;t<n.length;
1t++)if(typeof n[t]=="string"&&Gl.test(n[t]))return!0;return!1}var Kl=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),jl=Ei(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Co(n){let{motionValue:t,name:e,repeatDelay:i,repeatType:r,damping:s,type:o,keyframes:a}=n;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:u}=t.owner.getProps();return jl()&&e&&(Rn.has(e)||Kl.has(e)&&Ao(a))&&(e!=="transform"||!u)&&!c&&!i&&r!=="mirror"&&s!==0&&o!=="inertia"}var Xl=40,qn=class extends Ne{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Vt.now();let p={autoplay:t,delay:e,type:i,repeat:r,repeatDelay:s,repeatType:o,name:l,motionValue:c,element:u,...d},g=u?.KeyframeResolver||ze;this.keyframeResolver=new g(a,(m,y,v)=>this.onKeyframesResolved(m,y,p,!v),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,r){this.keyframeResolver=void 0;let{name:s,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=Vt.now();let d=!0;To(t,s,o,a)||(d=!1,(jt.instantAnimations||!l)&&u?.(Be(t,i,e)),t[0]=t[t.length-1],Zi(i),i.repeat=0);let g={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>Xl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:e,...i,keyframes:t},m=d&&!c&&Co(g),y=g.motionValue?.owner?.current,v;if(m)try{v=new Fn({...g,element:y})}catch{v=new Le(g)}else v=new Le(g);v.finished.then(()=>{this.notifyFinished()}).catch(ne),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),go()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},Bn=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let i=0;i<this.animations.length;i++)this.animations[i][t]=e}attachTimeline(t){let e=this.animations.map(i=>i.attachTimeline(t));return()=>{e.forEach((i,r)=>{i&&i(),this.animations[r].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Eo(this.animations,"duration")}get iterationDuration(){return Eo(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};function Eo(n,t){let e=0;for(let i=0;i<n.length;i++){let r=n[i][t];r!==null&&r>e&&(e=r)}return e}var Gi=class extends Bn{then(t,e){return this.finished.finally(t).then(()=>{})}},Yl=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ql(n){let t=Yl.exec(n);if(!t)return[,];let[,e,i,r]=t;return[`--${e??i}`,r]}var Jl=4;function Fr(n,t,e=1){Qt(e<=Jl,`Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[i,r]=Ql(n);if(!i)return;let s=window.getComputedStyle(t).getPropertyValue(i);if(s){let o=s.trim();return Ai(o)?parseFloat(o):o}return li(r)?Fr(r,t,e+1):r}var tc={type:"spring",stiffness:500,damping:25,restSpeed:10},ec=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),ic={type:"keyframes",duration:.8},nc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Io=(n,{keyframes:t})=>t.length>2?ic:ue.has(n)?n.startsWith("scale")?ec(t[1]):tc:nc;function Nn(n,t){if(n?.inherit&&t){let{inherit:e,...i}=n;return{...t,...i}}return n}function zn(n,t){let e=n?.[t]??n?.default??n;return e!==n?Nn(e,n):e}var rc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Po(n){for(let t in n)if(!rc.has(t))return!0;return!1}var $n=(n,t,e,i={},r,s)=>o=>{let a=zn(i,n)||{},l=a.delay||i.delay||0,{elapsed:c=0}=i;c=c-Pt(l);let u={keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:n,motionValue:t,element:s?void 0:r};Po(a)||Object.assign(u,Io(n,u)),u.duration&&(u.duration=Pt(u.duration)),u.repeatDelay&&(u.repeatDelay=Pt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Zi(u),u.delay===0&&(
1d=!0)),(jt.instantAnimations||jt.skipAnimations||r?.shouldSkipAnimations)&&(d=!0,Zi(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){let p=Be(u.keyframes,a);if(p!==void 0){Wt.update(()=>{u.onUpdate(p),u.onComplete()});return}}return a.isSync?new Le(u):new qn(u)};function Lo(n){let t=[{},{}];return n?.values.forEach((e,i)=>{t[0][i]=e.get(),t[1][i]=e.getVelocity()}),t}function Hn(n,t,e,i){if(typeof t=="function"){let[r,s]=Lo(i);t=t(e!==void 0?e:n.custom,r,s)}if(typeof t=="string"&&(t=n.variants&&n.variants[t]),typeof t=="function"){let[r,s]=Lo(i);t=t(e!==void 0?e:n.custom,r,s)}return t}function Mo(n,t,e){let i=n.getProps();return Hn(i,t,e!==void 0?e:i.custom,n)}var Wn=new Set(["width","height","top","left","right","bottom",..._e]),ko=30,sc=n=>!isNaN(parseFloat(n)),Rr={current:void 0},Un=class{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{let r=Vt.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=Vt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=sc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Ge);let i=this.events[t].add(e);return t==="change"?()=>{i(),Wt.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Rr.current&&Rr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=Vt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ko)return 0;let e=Math.min(this.updatedAt-this.prevUpdatedAt,ko);return Ii(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function de(n,t){return new Un(n,t)}var Do=n=>Array.isArray(n);function oc(n,t,e){n.hasValue(t)?n.getValue(t).set(e):n.addValue(t,de(e))}function ac(n){return Do(n)?n[n.length-1]||0:n}function Vo(n,t){let e=Mo(n,t),{transitionEnd:i={},transition:r={},...s}=e||{};s={...s,...i};for(let o in s){let a=ac(s[o]);oc(n,o,a)}}var pt=n=>!!(n&&n.getVelocity);function Oo(n){return!!(pt(n)&&n.add)}function Fo(n,t){let e=n.getValue("willChange");if(Oo(e))return e.add(t);if(!e&&jt.WillChange){let i=new jt.WillChange("auto");n.addValue("willChange",i),i.add(t)}}function fi(n){return n.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var lc="framerAppearId",Ro="data-"+fi(lc);function qo(n){return n.props[Ro]}function cc({protectedKeys:n,needsAnimating:t},e){let i=n.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,i}function qr(n,t,{delay:e=0,transitionOverride:i,type:r}={}){let{transition:s,transitionEnd:o,...a}=t,l=n.getDefaultTransition();s=s?Nn(s,l):l;let c=s?.reduceMotion;i&&(s=i);let u=[],d=r&&n.animationState&&n.animationState.getState()[r];for(let p in a){let g=n.getValue(p,n.latestValues[p]??null),m=a[p];if(m===void 0||d&&cc(d,p))continue;let y={delay:e,...zn(s||{},p)},v=g.get();if(v!==void 0&&!g.isAnimating()&&!Array.isArray(m)&&m===v&&!y.velocity){Wt.update(()=>
1g.set(m));continue}let b=!1;if(window.MotionHandoffAnimation){let I=qo(n);if(I){let L=window.MotionHandoffAnimation(I,p,Wt);L!==null&&(y.startTime=L,b=!0)}}Fo(n,p);let _=c??n.shouldReduceMotion;g.start($n(p,g,m,_&&Wn.has(p)?{type:!1}:y,n,b));let T=g.animation;T&&u.push(T)}if(o){let p=()=>Wt.update(()=>{o&&Vo(n,o)});u.length?Promise.all(u).then(p):p()}return u}var Bo={test:n=>n==="auto",parse:n=>n},Zn=n=>t=>t.test(n),Br=[Se,O,Fe,we,Gs,Zs,Bo],Nr=n=>Br.find(Zn(n));function No(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Ci(n):!0}var uc=new Set(["brightness","contrast","saturate","opacity"]);function dc(n){let[t,e]=n.slice(0,-1).split("(");if(t==="drop-shadow")return n;let[i]=e.match(ci)||[];if(!i)return n;let r=e.replace(i,""),s=uc.has(t)?1:0;return i!==e&&(s*=100),t+"("+s+r+")"}var hc=/\b([a-z-]*)\(.*?\)/gu,Ki={...Ot,getAnimatableNone:n=>{let t=n.match(hc);return t?t.map(dc).join(" "):n}},ji={...Ot,getAnimatableNone:n=>{let t=Ot.parse(n);return Ot.createTransformer(n)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},zr={...Se,transform:Math.round},zo={rotate:we,rotateX:we,rotateY:we,rotateZ:we,scale:Bi,scaleX:Bi,scaleY:Bi,scaleZ:Bi,skew:we,skewX:we,skewY:we,distance:O,translateX:O,translateY:O,translateZ:O,x:O,y:O,z:O,perspective:O,transformPerspective:O,opacity:Ie,originX:br,originY:br,originZ:O},mi={borderWidth:O,borderTopWidth:O,borderRightWidth:O,borderBottomWidth:O,borderLeftWidth:O,borderRadius:O,borderTopLeftRadius:O,borderTopRightRadius:O,borderBottomRightRadius:O,borderBottomLeftRadius:O,width:O,maxWidth:O,height:O,maxHeight:O,top:O,right:O,bottom:O,left:O,inset:O,insetBlock:O,insetBlockStart:O,insetBlockEnd:O,insetInline:O,insetInlineStart:O,insetInlineEnd:O,padding:O,paddingTop:O,paddingRight:O,paddingBottom:O,paddingLeft:O,paddingBlock:O,paddingBlockStart:O,paddingBlockEnd:O,paddingInline:O,paddingInlineStart:O,paddingInlineEnd:O,margin:O,marginTop:O,marginRight:O,marginBottom:O,marginLeft:O,marginBlock:O,marginBlockStart:O,marginBlockEnd:O,marginInline:O,marginInlineStart:O,marginInlineEnd:O,fontSize:O,backgroundPositionX:O,backgroundPositionY:O,...zo,zIndex:zr,fillOpacity:Ie,strokeOpacity:Ie,numOctaves:zr},pc={...mi,color:gt,backgroundColor:gt,outlineColor:gt,fill:gt,stroke:gt,borderColor:gt,borderTopColor:gt,borderRightColor:gt,borderBottomColor:gt,borderLeftColor:gt,filter:Ki,WebkitFilter:Ki,mask:ji,WebkitMask:ji},Gn=n=>pc[n],fc=new Set([Ki,ji]);function Kn(n,t){let e=Gn(n);return fc.has(e)||(e=Ot),e.getAnimatableNone?e.getAnimatableNone(t):void 0}var mc=new Set(["auto","none","0"]);function $o(n,t,e){let i=0,r;for(;i<n.length&&!r;){let s=n[i];typeof s=="string"&&!mc.has(s)&&qe(s).values.length&&(r=n[i]),i++}if(r&&e)for(let s of t)n[s]=Kn(e,r)}var jn=class extends ze{constructor(t,e,i,r,s){super(t,e,i,r,s,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),li(d))){let p=Fr(d,e.current);p!==void 0&&(t[u]=p),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Wn.has(i)||t.length!==2)return;let[r,s]=t,o=Nr(r),a=Nr(s),l=yr(r),c=yr(s);if(l!==c&&Me[i]){this.needsMeasurement=!0;return}if(o!==a)if(Ir(o)&&Ir(a))for(let u=0;u<t.length;u++){let d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Me[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:e}=this,i=[];for(let r=0;r<t.length;r++)(t[r]===null||No(t[r]))&&i.push(r);i.length&&$o(t,i,e)}measureInitialState(){let{element:t,unresolvedKeyframes:e,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Me[i](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;let r=e[e.length-1];r!==void 0&&t.getValue(i,r).jump(r,!1)}measureEndState(){let{element:t,name:e,unresolvedKeyframes:i}=this;if(!t||!t.current)return;let r=t.getValue(e);r&&r.jump(this.measuredOrigin,!1);let s=i.length-1,o=i[s];i[s]=Me[e](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEac
1h(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}};function $r(n,t,e){if(n==null)return[];if(n instanceof EventTarget)return[n];if(typeof n=="string"){let i=document;t&&(i=t.current);let r=e?.[n]??i.querySelectorAll(n);return r?Array.from(r):[]}return Array.from(n).filter(i=>i!=null)}var Xn=(n,t)=>t&&typeof n=="number"?t.transform(n):n,{schedule:Ho,cancel:Sv}=xn(queueMicrotask,!1);function Xi(n){return pr(n)&&"ownerSVGElement"in n}function Hr(n){return Xi(n)&&n.tagName==="svg"}var gc=[...Br,gt,Ot],Wo=n=>gc.find(Zn(n)),Uo=()=>({min:0,max:0}),gi=()=>({x:Uo(),y:Uo()}),ke=new WeakMap;function Zo(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function Go(n){return typeof n=="string"||Array.isArray(n)}var yc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ko=["initial",...yc];function Wr(n){return Zo(n.animate)||Ko.some(t=>Go(n[t]))}function jo(n){return!!(Wr(n)||n.variants)}function Xo(n,t,e){for(let i in t){let r=t[i],s=e[i];if(pt(r))n.addValue(i,r);else if(pt(s))n.addValue(i,de(r,{owner:n}));else if(s!==r)if(n.hasValue(i)){let o=n.getValue(i);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{let o=n.getStaticValue(i);n.addValue(i,de(o!==void 0?o:r,{owner:n}))}}for(let i in e)t[i]===void 0&&n.removeValue(i);return t}var Yi={current:null},Yn={current:!1},vc=typeof window<"u";function Yo(){if(Yn.current=!0,!!vc)if(window.matchMedia){let n=window.matchMedia("(prefers-reduced-motion)"),t=()=>Yi.current=n.matches;n.addEventListener("change",t),t()}else Yi.current=!1}var Qo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Jo={},yi=class{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:r,skipAnimations:s,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ze,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let g=Vt.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Wt.render(this.render,!1,!0))};let{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=e.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Wr(e),this.isVariantNode=jo(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:d,...p}=this.scrapeMotionValuesFromProps(e,{},this);for(let g in p){let m=p[g];c[g]!==void 0&&pt(m)&&m.set(c[g])}}mount(t){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=t,ke.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,i)=>this.bindToMotionValue(i,e)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Yn.current||Yo(),this.shouldReduceMotion=Yi.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),qi(this.notifyUpdate),qi(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&Rn.has(t)&&this.current instanceof HTMLElement){let{factory:o,keyframes:a,times:l,ease:c,duration:u}=e.accelerate,d=new pi({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:Pt(u)}),p=o(d);this.valueSubscriptions.set(t,()=>{p(),d.cancel()});return}let i=ue.has(t);i&&this.onBindTransform&&this.onBindTransform();let r=e.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Wt.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{r(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Jo){let e=Jo[t];if(!e)continue;let{isEnabled:i,Feature:r}=e;if(!this.features[t]&&r&&i(this.props)&&(this.features[t]=new r(this)),this.features[t]){let s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gi()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let i=0;
1i<Qo.length;i++){let r=Qo[i];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);let s="on"+r,o=t[s];o&&(this.propEventSubscriptions[r]=this.on(r,o))}this.prevMotionValues=Xo(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){let i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);let e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&e!==void 0&&(i=de(e===null?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Ai(i)||Ci(i))?i=parseFloat(i):!Wo(i)&&Ot.test(e)&&(i=Kn(t,e)),this.setBaseTarget(t,pt(i)?i.get():i)),pt(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){let{initial:e}=this.props,i;if(typeof e=="string"||typeof e=="object"){let s=Hn(this.props,e,this.presenceContext?.custom);s&&(i=s[t])}if(e&&i!==void 0)return i;let r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!pt(r)?r:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new Ge),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Ho.render(this.render)}},vi=class extends yi{constructor(){super(...arguments),this.KeyframeResolver=jn}sortInstanceNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1}getBaseTargetFromProps(t,e){let i=t.style;return i?i[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;pt(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}};function ta({top:n,left:t,right:e,bottom:i}){return{x:{min:t,max:e},y:{min:n,max:i}}}function ea(n,t){if(!t)return n;let e=t({x:n.left,y:n.top}),i=t({x:n.right,y:n.bottom});return{top:e.y,left:e.x,bottom:i.y,right:i.x}}function ia(n,t){return ta(ea(n.getBoundingClientRect(),t))}var bc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Sc=_e.length;function na(n,t,e){let i="",r=!0;for(let s=0;s<Sc;s++){let o=_e[s],a=n[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{let c=parseFloat(a);l=o.startsWith("scale")?c===1:c===0}if(!l||e){let c=Xn(a,mi[o]);if(!l){r=!1;let u=bc[o]||o;i+=`${u}(${c}) `}e&&(t[o]=c)}}return i=i.trim(),e?i=e(t,r?"":i):r&&(i="none"),i}function Qn(n,t,e){let{style:i,vars:r,transformOrigin:s}=n,o=!1,a=!1;for(let l in t){let c=t[l];if(ue.has(l)){o=!0;continue}else if(_n(l)){r[l]=c;continue}else{let u=Xn(c,mi[l]);l.startsWith("origin")?(a=!0,s[l]=u):i[l]=u}}if(t.transform||(o||e?i.transform=na(t,n.transform,e):i.transform&&(i.transform="none")),a){let{originX:l="50%",originY:c="50%",originZ:u=0}=s;i.transformOrigin=`${l} ${c} ${u}`}}function Jn(n,{style:t,vars:e},i,r){let s=n.style,o;for(o in t)s[o]=t[o];r?.applyProjectionStyles(s,i);for(o in e)s.setProperty(o,e[o])}function ra(n,t){return t.max===t.min?0:n/(t.max-t.min)*100}var bi={correct:(n,t)=>{if(!t.target)return n;if(typeof n=="string")if(O.test(n))n=parseFloat(n);else return n;let e=ra(n,t.target.x),i=ra(n,t.target.y);return`${e}% ${i}%`}},sa={correct:(n,{treeScale:t,projectionDelta:e})=>{let i=n,r=Ot.parse(n);if(r.length>5)return i;let s=Ot.createTransformer(n),o=typeof r[0]!="number"?1:0,a=e.x.scale*t.x,l=e.y.scale*t.y;r[0+o]/=a,r[1+o]/=l;let c=re(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=c),typeof r[3+o]=="number"&&(r[3+o]/=c),s(r)}},oa={borderRadius:{...bi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bi,borderTopRightRadius:bi,borderBottomLeftRadius:bi,borderBottomRightRadius:bi,boxShadow:sa};function aa(n,{layout:t,layoutId:e}){return ue.has(n)||n.startsWith("origin")||(t||e!==void 0)&&(!!oa[n]||n==="opacity")}function tr(n,t,e){let i=n.style,r=t?.style,s={};if(!i)return s;for(let o in i)(pt(i[o])||r&&pt(r[o])||aa(o,n)||e?.getValue(o)?.liveStyle!==void 0)&&(s[o]=i[o]);return s}function xc(n){return window.getComputedStyle(n)}var Qi=class extends vi{constructor(){super(...arguments),this.type="html",this.renderInstance=Jn}readValueFromInstance(t,e){if(ue.has(e))return this.projection?.isProjecting?Mn(e):ho(t,e);{let i=xc(t),r=(_n(e)?i.getPropertyValue(e):i[e])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:e}){return ia(t,e)}build(t,e,i){Qn(t,e,i.transformTemplate)}
1scrapeMotionValuesFromProps(t,e,i){return tr(t,e,i)}};function wc(n,t){return n in t}var Ji=class extends yi{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(wc(e,t)){let i=t[e];if(typeof i=="string"||typeof i=="number")return i}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return gi()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}},_c={offset:"stroke-dashoffset",array:"stroke-dasharray"},Tc={offset:"strokeDashoffset",array:"strokeDasharray"};function la(n,t,e=1,i=0,r=!0){n.pathLength=1;let s=r?_c:Tc;n[s.offset]=`${-i}`,n[s.array]=`${t} ${e}`}var Ac=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ca(n,{attrX:t,attrY:e,attrScale:i,pathLength:r,pathSpacing:s=1,pathOffset:o=0,...a},l,c,u){if(Qn(n,a,c),l){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};let{attrs:d,style:p}=n;d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(let g of Ac)d[g]!==void 0&&(p[g]=d[g],delete d[g]);t!==void 0&&(d.x=t),e!==void 0&&(d.y=e),i!==void 0&&(d.scale=i),r!==void 0&&la(d,r,s,o,!1)}var er=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),ua=n=>typeof n=="string"&&n.toLowerCase()==="svg";function da(n,t,e,i){Jn(n,t,void 0,i);for(let r in t.attrs)n.setAttribute(er.has(r)?r:fi(r),t.attrs[r])}function ha(n,t,e){let i=tr(n,t,e);for(let r in n)if(pt(n[r])||pt(t[r])){let s=_e.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[s]=n[r]}return i}var tn=class extends vi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gi}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(ue.has(e)){let i=Gn(e);return i&&i.default||0}return e=er.has(e)?e:fi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return ha(t,e,i)}build(t,e,i){ca(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,r){da(t,e,i,r)}mount(t){this.isSVGTag=ua(t.tagName),super.mount(t)}};function Ur(n,t,e){let i=pt(n)?n:de(n);return i.start($n("",i,t,e)),i.animation}function en(n){return typeof n=="object"&&!Array.isArray(n)}function ir(n,t,e,i){return n==null?[]:typeof n=="string"&&en(t)?$r(n,e,i):n instanceof NodeList?Array.from(n):Array.isArray(n)?n.filter(r=>r!=null):[n]}function pa(n,t,e){return n*(t+1)}function Zr(n,t,e,i){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,n+parseFloat(t)):t==="<"?e:t.startsWith("<")?Math.max(0,e+parseFloat(t.slice(1))):i.get(t)??n}function Cc(n,t,e){for(let i=0;i<n.length;i++){let r=n[i];r.at>t&&r.at<e&&(We(n,r),i--)}}function fa(n,t,e,i,r,s){Cc(n,r,s);for(let o=0;o<t.length;o++)n.push({value:t[o],at:re(r,s,i[o]),easing:Oi(e,o)})}function ma(n,t){for(let e=0;e<n.length;e++)n[e]=n[e]/(t+1)}function ga(n,t){return n.at===t.at?n.value===null?1:t.value===null?-1:0:n.at-t.at}var Ec="easeInOut",Ic=20;function ba(n,{defaultTransition:t={},...e}={},i,r){let s=t.duration||.3,o=new Map,a=new Map,l={},c=new Map,u=0,d=0,p=0;for(let g=0;g<n.length;g++){let m=n[g];if(typeof m=="string"){c.set(m,d);continue}else if(!Array.isArray(m)){c.set(m.name,Zr(d,m.at,u,c));continue}let[y,v,b={}]=m;b.at!==void 0&&(d=Zr(d,b.at,u,c));let _=0,T=(I,L,R,F=0,P=0)=>{let k=Pc(I),{delay:E=0,times:B=Ui(k),type:X=t.type||"keyframes",repeat:ot,repeatType:ut,repeatDelay:yt=0,..._t}=L,{ease:ft=t.ease||"easeOut",duration:st}=L,qt=typeof E=="function"?E(F,P):E,Xt=k.length,Ft=Qe(X)?X:r?.[X||"keyframes"];if(Xt<=2&&Ft){let Jt=100;if(Xt===2&&kc(k)){let vt=k[1]-k[0];Jt=Math.abs(vt)}let te={...t,..._t};st!==void 0&&(te.duration=Pt(st));let At=$i(te,Jt,Ft);ft=At.ease,st=At.duration}st??(st=s);let oe=d+qt;B.length===1&&B[0]===0&&(B[1]=1);let fe=B.length-k.length;if(fe>0&&Wi(B,fe),k.length===1&&k.unshift(null),ot){Qt(ot<Ic,"Repeat count too high, must be less than 20","repeat-count-high"),st=pa(st,ot);let Jt=[...k],te=[...B];ft=Array.isArray(ft)?[...ft]:[ft];let At=[...ft];for(let vt=0;vt<ot;vt++){k.push(...Jt);for(let kt=0;kt<Jt.length;kt++)B.push(te[kt]+(vt+1)),ft.push(kt===0?"linear":Oi(At,kt-1))}ma(B,ot)}let Mt=oe+st;fa(R,k,ft,B,oe,Mt),_=Math.max(qt+st,_),p=Math.max(Mt,p)};if(pt(y)){let I=ya(y,a);T(v,b,va("default",I))}else{let I=ir(y,v,i,l),L=I.length;for(let R=0;R<L;R++){v=v,b=b;let F=I[R],P=ya(F,a);for(let k in v)T(v[k],Lc(b,k),va(k,P),R,L)}}u=d,d+=_}return a.forEach((g,m)=>{for(let y in g){let v=g[y];v.sort(ga);let b=[],_=[],T=[];for(let F=0;F<v.length;F++){let{at:P,value:k,easing:E}=v[F];b.push(k),_.push(Ze(0,p,P)),T.push(E||"easeOut")}_[0]!==0&&(_.unshift(0),b.unshift(b[0]),T.unshift(Ec)),_[_.length-1]!==1&&(_.push(1),b.push(null)),o.has(m)||o.set(m,{keyframes:{},transition:{}});let I=o.get(m);I.keyframes[y]=b;let{type:L,...R}=t;I.transition[y]={...R,duration:p,ease:T,times:_,...e}}}),o}function ya(n,t){return!t.has(n)&&t.set(n,{}),t.get(n)}function va(n,t){return t[n]||(t[n]=[]),t[n]}function Pc(n){return Array.isArray(n)?n:[n]}function Lc(n,t){return n&&n[t]?{...n,...n[t]}:{...n}}var Mc=n=>
1typeof n=="number",kc=n=>n.every(Mc);function Sa(n){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},e=Xi(n)&&!Hr(n)?new tn(t):new Qi(t);e.mount(n),ke.set(n,e)}function xa(n){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},e=new Ji(t);e.mount(n),ke.set(n,e)}function Dc(n,t){return pt(n)||typeof n=="number"||typeof n=="string"&&!en(t)}function nr(n,t,e,i){let r=[];if(Dc(n,t))r.push(Ur(n,en(t)&&t.default||t,e&&(e.default||e)));else{if(n==null)return r;let s=ir(n,t,i),o=s.length;Qt(!!o,"No valid elements provided.","no-valid-elements");for(let a=0;a<o;a++){let l=s[a],c=l instanceof Element?Sa:xa;ke.has(l)||c(l);let u=ke.get(l),d={...e};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,o)),r.push(...qr(u,{...t,transition:d},{}))}}return r}function wa(n,t,e){let i=[],r=n.map(o=>{if(Array.isArray(o)&&typeof o[0]=="function"){let a=o[0],l=de(0);return l.on("change",a),o.length===1?[l,[0,1]]:o.length===2?[l,[0,1],o[1]]:[l,o[1],o[2]]}return o});return ba(r,t,e,{spring:Pe}).forEach(({keyframes:o,transition:a},l)=>{i.push(...nr(l,o,a))}),i}function Vc(n){return Array.isArray(n)&&n.some(Array.isArray)}function _a(n={}){let{scope:t,reduceMotion:e}=n;function i(r,s,o){let a=[],l;if(Vc(r)){let{onComplete:u,...d}=s||{};typeof u=="function"&&(l=u),a=wa(r,e!==void 0?{reduceMotion:e,...d}:d,t)}else{let{onComplete:u,...d}=o||{};typeof u=="function"&&(l=u),a=nr(r,s,e!==void 0?{reduceMotion:e,...d}:d,t)}let c=new Gi(a);return l&&c.finished.then(l),t&&(t.animations.push(c),c.finished.then(()=>{We(t.animations,c)})),c}return i}var De=_a();document.addEventListener("alpine:init",()=>{Alpine.data("headerNavigation",()=>({currentMenu:null,prevMenu:null,mobileOpen:!1,mobileTab:1,_closeTimeout:null,_heightAnim:null,_reducedMotion:!1,_usingDialogFallback:!1,_boundHandleEscapeKey:null,get submenuLabels(){return JSON.parse(this.$el.dataset.submenuLabels||"[]")},init(){this._reducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this._boundHandleEscapeKey=this._handleEscapeKey.bind(this),this.$watch("currentMenu",(n,t)=>{n?this._animateOpen(n,t):this._animateClose()})},getMenuIndex(n){return n?this.submenuLabels.indexOf(n):-1},openMenu(n){this._closeTimeout&&(clearTimeout(this._closeTimeout),this._closeTimeout=null),n!==this.currentMenu&&(this.prevMenu=this.currentMenu,this.currentMenu=n)},closeMenu(){this._closeTimeout&&(clearTimeout(this._closeTimeout),this._closeTimeout=null),this.prevMenu=this.currentMenu,this.currentMenu=null},handleMouseLeave(){this.currentMenu&&(this._closeTimeout=setTimeout(()=>{this.prevMenu=this.currentMenu,this.currentMenu=null},150))},_animateOpen(n,t){let e=this.$refs.megaContainer;if(!e)return;let i=this.getMenuIndex(t),r=this.getMenuIndex(n),s="initial";i!==-1&&r!==-1&&i!==r&&(s=r>i?"from-end":"from-start"),this.$nextTick(()=>{if(this.currentMenu!==n)return;let o=e.querySelector(`[data-half="${n}-left"]`),a=e.querySelector(`[data-half="${n}-right"]`);if(!this._reducedMotion&&o&&a)if(s==="initial")De(o,{opacity:[0,1],y:[20,0]},{duration:.5,delay:.15,easing:"ease-out"}),De(a,{opacity:[0,1],y:[-20,0]},{duration:.5,delay:.15,easing:"ease-out"});else{let u=s==="from-end"?32:-32;De(o,{opacity:[0,1],x:[u,0]},{duration:.15,easing:"ease-in-out"}),De(a,{opacity:[0,1],x:[u,0]},{duration:.15,easing:"ease-in-out"})}
1let l=e.querySelector(`[data-panel="${n}"]`),c=l?l.scrollHeight:0;this._heightAnim&&this._heightAnim.stop(),this._reducedMotion?e.style.height=`${c}px`:this._heightAnim=De(e,{height:`${c}px`},{duration:.35,easing:[.22,1,.36,1]})})},_animateClose(){let n=this.$refs.megaContainer;if(n){if(this._heightAnim&&this._heightAnim.stop(),this._reducedMotion){n.style.height="0px";return}this._heightAnim=De(n,{height:"0px"},{duration:.32,easing:[.4,0,.2,1]})}},toggleMobile(){this.mobileOpen?this.closeMobileMenu():this.openMobileMenu()},openMobileMenu(){let n=this.$refs.mobileMenuElDialog;if(!n)return;let t=n.querySelector("dialog");if(t){if(!t.open)if(this._usingDialogFallback=!1,typeof n.show=="function")try{n.show()}catch{this._openMobileMenuFallback(t)}else this._openMobileMenuFallback(t);this.mobileOpen=!0,this._usingDialogFallback&&document.addEventListener("keydown",this._boundHandleEscapeKey),this.$nextTick(()=>this._moveMobileTabIndicator())}},_openMobileMenuFallback(n){if(this._supportsDialogModal(n))try{n.showModal(),this._usingDialogFallback=!1}catch{n.setAttribute("open",""),this._usingDialogFallback=!0}else n.setAttribute("open",""),this._usingDialogFallback=!0},closeMobileMenu(){let n=this.$refs.mobileMenuElDialog;if(!n)return;let t=n.querySelector("dialog");if(!t?.open){this._handleMobileMenuClose();return}if(this._usingDialogFallback){if(document.removeEventListener("keydown",this._boundHandleEscapeKey),this._supportsDialogModal(t))try{t.close();return}catch{}t.removeAttribute("open"),this._handleMobileMenuClose();return}if(typeof n.hide=="function")try{n.hide();return}catch{}t.close()},_handleMobileMenuClose(){this.mobileOpen=!1,document.removeEventListener("keydown",this._boundHandleEscapeKey),this._usingDialogFallback=!1},handleMobileMenuDialogClose(){this._handleMobileMenuClose()},_supportsDialogModal(n){return typeof n?.showModal=="function"&&typeof n?.close=="function"},_handleEscapeKey(n){n.key==="Escape"&&this.mobileOpen&&this.closeMobileMenu()},selectMobileTab(n,t){this.mobileTab=n,this.$nextTick(()=>this._moveMobileTabIndicator(t))},focusMobileTab(n){let t=this.$refs.mobileTabList;if(!t)return;let e=[...t.querySelectorAll('[role="tab"]')],i=e.findIndex(s=>s.getAttribute("aria-selected")==="true"),r;n==="next"?r=(i+1)%e.length:n==="prev"?r=(i-1+e.length)%e.length:n==="first"?r=0:r=e.length-1,e[r]?.focus()},_moveMobileTabIndicator(n){let t=this.$refs.mobileTabsNav,e=this.$refs.mobileTabIndicator;if(!t||!e)return;let i=n||t.querySelector('[role="tab"][aria-selected="true"]');if(!i)return;let r=e.parentElement;if(!r)return;let s=r.getBoundingClientRect(),o=i.getBoundingClientRect(),a=o.left-s.left,l=o.width;this._reducedMotion?(e.style.width=`${l}px`,e.style.transform=`translateX(${a}px)`):De(e,{x:a,width:l},{type:"spring",stiffness:520,damping:42,mass:.7}),e.dataset.ready="true"},openSearch(){window.dispatchEvent(new CustomEvent("open-mobile-search"))},_lockBodyScroll(){document.body.style.overflow="hidden"},_unlockBodyScroll(){document.body.style.overflow=""}})),Alpine.data("navigationMenu",()=>({currentMenu:null,prevMenu:null,_closeTimeout:null,_heightAnim:null,_reducedMotion:!1,init(){this._reducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)").matches,document.addEventListener("click",n=>{this.$el.contains(n.target)||this.closeMenu()}),this.$watch("currentMenu",(n,t)=>{n&&this._animateOpen(n,t)})},get submenuLabels(){try{return JSON.parse(this.$el.dataset.submenuLabels||"[]")}catch{return[]}},getMenuIndex(n){return n?this.submenuLabels.indexOf(n):-1},openMenu(n){this._closeTimeout&&(clearTimeout(this._closeTimeout),this._closeTimeout=null),this._cancelHeightAnim(),n!==this.currentMenu&&(this.prevMenu=this.currentMenu,this.currentMenu=n)},closeMenu(){this._closeTimeout&&(clearTimeout(this._closeTimeout),this._closeTimeout=null),this._runCloseHeightAnimation()},handleMouseLeave(){this.currentMenu&&(this._closeTimeout=setTimeout(()=>{this._closeTimeout=null,this._runCloseHeightAnimation()},150))},_cancelHeightAnim(){this._heightAnim&&(this._heightAnim.cancel(),this._heightAnim=null)},_findPanel(n,t){return Array.from(n.querySelectorAll("[data-panel]")).find(e=>e.dataset.panel===t)},_runCloseHeightAnimation(){let t=this.$refs.megaContainer;if(!t||!this.currentMenu)return;if(this._cancelHeightAnim(),this._reducedMotion){this.prevMenu=this.currentMenu,this.currentMenu=null,t.style.height="0px";return}let e=t.getBoundingClientRect().height;if(e<=.5){this.prevMenu=this.currentMenu,this.currentMenu=null,t.style.height="0px";return}this.prevMenu=this.currentMenu;let i=t.animate([{height:`${e}px`},{height:"0px"}],{duration:520,easing:"ease-out",fill:"forwards"});this._heightAnim=i,i.onfinish=()=>{this._heightAnim=null,this.currentMenu=null,t.style.height="0px",
1i.cancel()}},_animateOpen(n,t){this.$nextTick(()=>{let o=this.$refs.megaContainer;if(!o||this.currentMenu!==n)return;let a=this._findPanel(o,n),l=a?a.scrollHeight:0,c=this.getMenuIndex(t),u=this.getMenuIndex(n),d="initial";c!==-1&&u!==-1&&c!==u&&(d=u>c?"from-end":"from-start");let p=a?.querySelector(`[data-half="${n}-left"]`),g=a?.querySelector(`[data-half="${n}-right"]`);if(!this._reducedMotion&&p&&g)if(d==="initial")p.animate({opacity:[0,1],transform:["translateY(20px)","translateY(0)"]},{duration:620,delay:200,easing:"ease-out",fill:"both"}),g.animate({opacity:[0,1],transform:["translateY(-20px)","translateY(0)"]},{duration:620,delay:200,easing:"ease-out",fill:"both"});else{let v=d==="from-end"?32:-32;p.animate({opacity:[0,1],transform:[`translateX(${v}px)`,"translateX(0)"]},{duration:260,easing:"ease-in-out",fill:"both"}),g.animate({opacity:[0,1],transform:[`translateX(${v}px)`,"translateX(0)"]},{duration:260,easing:"ease-in-out",fill:"both"})}if(this._cancelHeightAnim(),this._reducedMotion){o.style.height=`${l}px`;return}let m=o.getBoundingClientRect().height,y=o.animate([{height:`${m}px`},{height:`${l}px`}],{duration:520,easing:"ease-out",fill:"forwards"});this._heightAnim=y,y.onfinish=()=>{this._heightAnim=null,o.style.height=`${l}px`,y.cancel()}})}}))});var Gr=class extends HTMLElement{constructor(){super(),this._initialized=!1}connectedCallback(){if(this._initialized)return;this._initialized=!0;let t=this.querySelector('[ref="videoElement"]')||this.querySelector("video"),e=[...this.querySelectorAll('[ref="videoSources[]"]'),...this.querySelectorAll("[data-video-source]")];if(t){for(let i of e){let r=i.dataset.videoSource;r&&i.getAttribute("src")!==r&&i.setAttribute("src",r)}t.load()}}};customElements.get("video-background-component")||customElements.define("video-background-component",Gr),(function(){let n="playing",t="hidden",e=[0,100,500];function i(l,c){c.classList.remove(t),c.classList.add(n),l.classList.add(n)}function r(l,c){c.classList.remove(t,n),l.classList.remove(n)}function s(){document.querySelectorAll(".product-video-element").forEach(c=>{let u=c.parentElement&&c.parentElement.querySelector(".product-video-play-button");if(!u||c.dataset.videoControlsInitialized==="true")return;c.dataset.videoControlsInitialized="true";let d=()=>i(c,u),p=()=>r(c,u);u.addEventListener("click",function(g){if(g.preventDefault(),g.stopPropagation(),c.paused){let m=c.play();m&&typeof m.then=="function"?m.then(d).catch(()=>p()):d()}else c.pause(),p()}),c.addEventListener("pause",p),c.addEventListener("play",d),c.addEventListener("ended",function(){c.loop||p()}),c.addEventListener("click",function(g){u.classList.contains(t)||(g.preventDefault(),c.paused?c.play():c.pause())}),c.paused?p():d()})}function o(){e.forEach(l=>{setTimeout(s,l)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",o):o(),window.addEventListener("load",function(){setTimeout(s,100)}),new MutationObserver(function(l){let c=!1;l.forEach(function(u){u.addedNodes.forEach(function(d){d.nodeType===1&&d.classList&&(d.classList.contains("product-video-element")||d.querySelector&&d.querySelector(".product-video-element"))&&(c=!0)})}),c&&setTimeout(s,50)}).observe(document.body,{childList:!0,subtree:!0})})();function Xr(n){return typeof n=="number"}function Kr(n){return typeof n=="string"}function rr(n){return typeof n=="boolean"}function Ta(n){return Object.prototype.toString.call(n)==="[object Object]"}function xt(n){return Math.abs(n)}function Yr(n){return Math.sign(n)}function rn(n,t){return xt(n-t)}function Oc(n,t){if(n===0||t===0||xt(n)<=xt(t))return 0;let e=rn(xt(n),xt(t));return xt(e/n)}function Fc(n){return Math.round(n*100)/100}function sn(n){return on(n).map(Number)}function ve(n){return n[ln(n)]}function ln(n){return Math.max(0,n.length-1)}function Qr(n,t){return t===ln(n)}function Aa(n,t=0){return Array.from(Array(n),(e,i)=>t+i)}function on(n){return Object.keys(n)}function Ca(n,t){return[n,t].reduce((e,i)=>
vendor: 18,771 bytes, line 1
1(on(i).forEach(r=>{let s=e[r],o=i[r],a=Ta(s)&&Ta(o);e[r]=a?Ca(s,o):o}),e),{})}function jr(n,t){return typeof t.MouseEvent<"u"&&n instanceof t.MouseEvent}function Rc(n,t){let e={start:i,center:r,end:s};function i(){return 0}function r(l){return s(l)/2}function s(l){return t-l}function o(l,c){return Kr(n)?e[n](l):n(t,l,c)}return{measure:o}}function an(){let n=[];function t(r,s,o,a={passive:!0}){let l;if("addEventListener"in r)r.addEventListener(s,o,a),l=()=>r.removeEventListener(s,o,a);else{let c=r;c.addListener(o),l=()=>c.removeListener(o)}return n.push(l),i}function e(){n=n.filter(r=>r())}let i={add:t,clear:e};return i}function qc(n,t,e,i){let r=an(),s=1e3/60,o=null,a=0,l=0;function c(){r.add(n,"visibilitychange",()=>{n.hidden&&m()})}function u(){g(),r.clear()}function d(v){if(!l)return;o||(o=v,e(),e());let b=v-o;for(o=v,a+=b;a>=s;)e(),a-=s;let _=a/s;i(_),l&&(l=t.requestAnimationFrame(d))}function p(){l||(l=t.requestAnimationFrame(d))}function g(){t.cancelAnimationFrame(l),o=null,a=0,l=0}function m(){o=null,a=0}return{init:c,destroy:u,start:p,stop:g,update:e,render:i}}function Bc(n,t){let e=t==="rtl",i=n==="y",r=i?"y":"x",s=i?"x":"y",o=!i&&e?-1:1,a=u(),l=d();function c(m){let{height:y,width:v}=m;return i?y:v}function u(){return i?"top":e?"right":"left"}function d(){return i?"bottom":e?"left":"right"}function p(m){return m*o}return{scroll:r,cross:s,startEdge:a,endEdge:l,measureSize:c,direction:p}}function Je(n=0,t=0){let e=xt(n-t);function i(c){return c<n}function r(c){return c>t}function s(c){return i(c)||r(c)}function o(c){return s(c)?i(c)?n:t:c}function a(c){return e?c-e*Math.ceil((c-t)/e):c}return{length:e,max:t,min:n,constrain:o,reachedAny:s,reachedMax:r,reachedMin:i,removeOffset:a}}function Ea(n,t,e){let{constrain:i}=Je(0,n),r=n+1,s=o(t);function o(p){return e?xt((r+p)%r):i(p)}function a(){return s}function l(p){return s=o(p),d}function c(p){return u().set(a()+p)}function u(){return Ea(n,a(),e)}let d={get:a,set:l,add:c,clone:u};return d}function Nc(n,t,e,i,r,s,o,a,l,c,u,d,p,g,m,y,v,b,_){let{cross:T,direction:I}=n,L=["INPUT","SELECT","TEXTAREA"],R={passive:!1},F=an(),P=an(),k=Je(50,225).constrain(g.measure(20)),E={mouse:300,touch:400},B={mouse:500,touch:600},X=m?43:25,ot=!1,ut=0,yt=0,_t=!1,ft=!1,st=!1,qt=!1;function Xt(N){if(!_)return;function et(Dt){(rr(_)||_(N,Dt))&&te(Dt)}let wt=t;F.add(wt,"dragstart",Dt=>Dt.preventDefault(),R).add(wt,"touchmove",()=>{},R).add(wt,"touchend",()=>{}).add(wt,"touchstart",et).add(wt,"mousedown",et).add(wt,"touchcancel",vt).add(wt,"contextmenu",vt).add(wt,"click",kt,!0)}function Ft(){F.clear(),P.clear()}function oe(){let N=qt?e:t;P.add(N,"touchmove",At,R).add(N,"touchend",vt).add(N,"mousemove",At,R).add(N,"mouseup",vt)}function fe(N){let et=N.nodeName||"";return L.includes(et)}function Mt(){return(m?B:E)[qt?"mouse":"touch"]}function Jt(N,et){let wt=d.add(Yr(N)*-1),Dt=u.byDistance(N,!m).distance;return m||xt(N)<k?Dt:v&&et?Dt*.5:u.byIndex(wt.get(),0).distance}function te(N){let et=jr(N,i);qt=et,st=m&&et&&!N.buttons&&ot,ot=rn(r.get(),o.get())>=2,!(et&&N.button!==0)&&(fe(N.target)||(_t=!0,s.pointerDown(N),c.useFriction(0).useDuration(0),r.set(o),oe(),ut=s.readPoint(N),yt=s.readPoint(N,T),p.emit("pointerDown")))}function At(N){if(!jr(N,i)&&N.touches.length>=2)return vt(N);let wt=s.readPoint(N),Dt=s.readPoint(N,T),ae=rn(wt,ut),me=rn(Dt,yt);if(!ft&&!qt&&(!N.cancelable||(ft=ae>me,!ft)))return vt(N);let Bt=s.pointerMove(N);ae>y&&(st=!0),c.useFriction(.3).useDuration(.75),a.start(),r.add(I(Bt)),N.preventDefault()}function vt(N){let wt=u.byDistance(0,!1).index!==d.get(),Dt=s.pointerUp(N)*Mt(),ae=Jt(I(Dt),wt),me=Oc(Dt,ae),Bt=X-10*me,Yt=b+me/50;ft=!1,_t=!1,P.clear(),c.useDuration(Bt).useFriction(Yt),l.distance(ae,!m),qt=!1,p.emit("pointerUp")}function kt(N){st&&(N.stopPropagation(),N.preventDefault(),st=!1)}function Ut(){return _t}return{init:Xt,destroy:Ft,pointerDown:Ut}}function zc(n,t){let i,r;function s(d){return d.timeStamp}function o(d,p){let m=`client${(p||n.scroll)==="x"?"X":"Y"}`;return(jr(d,t)?d:d.touches[0])[m]}function a(d){return i=d,r=d,o(d)}function l(d){let p=o(d)-o(r),g=s(d)-s(i)>170;return r=d,g&&(i=d),p}function c(d){if(!i||!r)return 0;let p=o(r)-o(i),g=s(d)-s(i),m=s(d)-s(r)>170,y=p/g;return g&&!m&&xt(y)>.1?y:0}return{pointerDown:a,pointerMove:l,pointerUp:c,readPoint:o}}function $c(){function n(e){let{offsetTop:i,offsetLeft:r,offsetWidth:s,offsetHeight:o}=e;return{top:i,right:r+s,bottom:i+o,left:r,width:s,height:o}}return{measure:n}}function Hc(n){function t(i){return n*(i/100)}return{measure:t}}function Wc(n,t,e,i,r,s,o){let a=[n].concat(i),l,c,u=[],d=!1;function p(v){return r.measureSize(o.measure(v))}function g(v){if(!s)return;c=p(n),u=i.map(p);function b(_){for(let T of _){if(d)return;let I=T.target===n,L=i.indexOf(T.target),R=I?c:u[L],F=p(I?n:i[L]);if(xt(F-R)>=.5){v.reInit(),t.emit("resize");break}}}l=new ResizeObserver(_=>{(rr(s)||s(v,_))&&b(_)}),e.requestAnimationFrame(()=>{a.forEach(_=>l.observe(_))})}function m(){d=!0,l&&l.disconnect()}return{init:g,destroy:m}}function Uc(n,t,e,i,r,s){let o=0,a=0,l=r,c=s,u=n.get(),d=0;function p(){let R=i.get()-n.get(),F=!l,P=0;return F?(o=0,e.set(i),n.set(i),P=R):(e.set(n),o+=R/l,o*=c,u+=o,n.add(o),P=u-d),a=Yr(P),d=u,L}function g(){let R=i.get()-t.get();return xt(R)<.001}function m(){return l}function y(){return a}function v(){return o}function b(){return T(r)}function _(){return I(s)}function T(R){return l=R,L}function I(R){return c=R,L}let L={direction:y,duration:m,velocity:v,seek:p,settled:g,useBaseFriction:_,useBaseDuration:b,useFriction:I,useDuration:T};return L}function Zc(n,t,e,i,r){let s=r.measure(10),o=r.measure(50),a=Je(.1,.99),l=!1;function c(){return!(l||!n.reachedAny(e.get())||!n.reachedAny(t.get()))}function u(g){if(!c())return;let m=n.reachedMin(t.get())?"min":"max",y=xt(n[m]-t.get()),v=e.get()-t.get(),b=a.constrain(y/o);e.subtract(v*b),!g&&xt(v)<s&&(e.set(n.constrain(e.get())),i.useDuration(25).useBaseFriction())}function d(g){l=!g}return{shouldConstrain:c,constrain:u,toggleActive:d}}function Gc(n,t,e,i,r){let s=Je(-t+n,0),o=d(),a=u(),l=p();function c(m,y){return rn(m,y)<=1}function u(){let m=o[0],y=ve(o),v=o.lastIndexOf(m),b=o.indexOf(y)+1;return Je(v,b)}function d(){return e.map((m,y)=>{let{min:v,max:b}=s,_=s.constrain(m),T=!y,I=Qr(e,y);return T?b:I||c(v,_)?v:c(b,_)?b:_}).map(m=>parseFloat(m.toFixed(3)))}function p(){if(t<=n+r)return[s.max];if(i==="keepSnaps")return o;let{min:m,max:y}=a;return o.slice(m,y)}return{snapsContained:l,scrollContainLimit:a}}function Kc(n,t,e){let i=t[0],r=e?i-n:ve(t);return{limit:Je(r,i)}}function jc(n,t,e,i){let s=t.min+.1,o=t.max+.1,{reachedMin:a,reachedMax:l}=Je(s,o);function c(p){return p===1?l(e.get()):p===-1?a(e.get()):!1}function u(p){if(!c(p))return;let g=n*(p*-1);i.forEach(m=>m.add(g))}return{loop:u}}function Xc(n){let{max:t,length:e}=n;function i(s){let o=s-t;return e?o/-e:0}return{get:i}}function Yc(n,t,e,i,r){let{startEdge:s,endEdge:o}=n,{groupSlides:a}=r,l=d().map(t.measure),c=p(),u=g();function d(){return a(i).map(y=>ve(y)[o]-y[0][s]).map(xt)}function p(){return i.map(y=>e[s]-y[s]).map(y=>-xt(y))}function g(){return a(c).map(y=>y[0]).map((y,v)=>y+l[v])}return{snaps:c,snapsAligned:u}}function Qc(n,t,e,i,r,s){let{groupSlides:o}=r,{min:a,max:l}=i,c=u();function u(){let p=o(s),g=!n||t==="keepSnaps";return e.length===1?[s]:g?p:p.slice(a,l).map((m,y,v)=>{let b=!y,_=Qr(v,y);if(b){let T=ve(v[0])+1;return Aa(T)}if(_){let T=ln(s)-ve(v)[0]+1;return Aa(T,ve(v)[0])}return m})}return{slideRegistry:c}}function Jc(n,t,e,i,r){let{reachedAny:s,removeOffset:o,constrain:a}=i;function l(m){return m.concat().sort((y,v)=>xt(y)-xt(v))[0]}function c(m){let y=n?o(m):a(m),v=t.map((_,T)=>({diff:u(_-y,0),index:T})).sort((_,T)=>xt(_.diff)-xt(T.diff)),{index:b}=v[0];return{index:b,distance:y}}function u(m,y){let v=[m,m+e,m-e];if(!n)return m;if(!y)return l(v);let b=v.filter(_=>Yr(_)===y);return b.length?l(b):ve(v)-e}function d(m,y){let v=t[m]-r.get(),b=u(v,y);return{index:m,distance:b}}function p(m,y){let v=r.get()+m,{index:b,distance:_}=c(v),T=!n&&s(v);if(!y||T)return{index:b,distance:m};let I=t[b]-_,L=m+u(I,0);return{index:b,distance:L}}return{byDistance:p,byIndex:d,shortcut:u}}function tu(n,t,e,i,r,s,o){function a(d){let p=d.distance,g=d.index!==t.get();s.add(p),p&&(i.duration()?n.start():(n.update(),n.render(1),n.update())),g&&(e.set(t.get()),t.set(d.index),o.emit("select"))}function l(d,p){let g=r.byDistance(d,p);a(g)}function c(d,p){let g=t.clone().set(d),m=r.byIndex(g.get(),p);a(m)}return{distance:l,index:c}}function eu(n,t,e,i,r,s,o,a){let l={passive:!0,capture:!0},c=0;function u(g){if(!a)return;function m(y){if(new Date().getTime()-c>10)return;o.emit("slideFocusStart"),n.scrollLeft=0;let _=e.findIndex(T=>T.includes(y));Xr(_)&&(r.useDuration(0),i.index(_,0),o.emit("slideFocus"))}s.add(document,"keydown",d,!1),t.forEach((y,v)=>{s.add(y,"focus",b=>{(rr(a)||a(g,b))&&m(v)},l)})}function d(g){g.code==="Tab"&&(c=new Date().getTime())}return{init:u}}function nn(n){let t=n;function e(){return t}function i(l){t=o(l)}function r(l){t+=o(l)}function s(l){t-=o(l)}function o(l){return Xr(l)?l:l.get()}return{get:e,set:i,add:r,subtract:s}}function Ia(n,t){let e=n.scroll==="x"?o:a,i=t.style,r=null,s=!1;function o(p){return`translate3d(${p}px,0px,0px)`}function a(p){return`translate3d(0px,${p}px,0px)`}function l(p){if(s)return;let g=Fc(n.direction(p));g!==r&&(i.transform=e(g),r=g)}function c(p){s=!p}function u(){s||(i.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:u,to:l,toggleActive:c}}function iu(n,t,e,i,r,s,o,a,l){let u=sn(r),d=sn(r).reverse(),p=b().concat(_());function g(F,P){return F.reduce((k,E)=>k-r[E],P)}function m(F,P){return F.reduce((k,E)=>g(k,P)>0?k.concat([E]):k,[])}function y(F){return s.map((P,k)=>({start:P-i[k]+.5+F,end:P+t-.5+F}))}function v(F,P,k){let E=y(P);return F.map(B=>{let X=k?0:-e,ot=k?e:0,ut=k?"end":"start",yt=E[B][ut];return{index:B,loopPoint:yt,slideLocation:nn(-1),translate:Ia(n,l[B]),target:()=>a.get()>yt?X:ot}})}function b(){let F=o[0],P=m(d,F);return v(P,e,!1)}function _(){let F=t-o[0]-1,P=m(u,F);return v(P,-e,!0)}function T(){return p.every(({index:F})=>{let P=u.filter(k=>k!==F);return g(P,t)<=.1})}function I(){p.forEach(F=>{let{target:P,translate:k,slideLocation:E}=F,B=P();B!==E.get()&&(k.to(B),E.set(B))})}function L(){p.forEach(F=>F.translate.clear())}return{canLoop:T,clear:L,loop:I,loopPoints:p}}function nu(n,t,e){let i,r=!1;function s(l){if(!e)return;function c(u){for(let d of u)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}i=new MutationObserver(u=>{r||(rr(e)||e(l,u))&&c(u)}),i.observe(n,{childList:!0})}function o(){i&&i.disconnect(),r=!0}return{init:s,destroy:o}}function ru(n,t,e,i){let r={},s=null,o=null,a,l=!1;function c(){a=new IntersectionObserver(m=>{l||(m.forEach(y=>{let v=t.indexOf(y.target);r[v]=y}),s=null,o=null,e.emit("slidesInView"))},{root:n.parentElement,threshold:i}),t.forEach(m=>a.observe(m))}function u(){a&&a.disconnect(),l=!0}function d(m){return on(r).reduce((y,v)=>{let b=parseInt(v),{isIntersecting:_}=r[b];return(m&&_||!m&&!_)&&y.push(b),y},[])}function p(m=!0){if(m&&s)return s;if(!m&&o)return o;let y=d(m);return m&&(s=y),m||(o=y),y}return{init:c,destroy:u,get:p}}function su(n,t,e,i,r,s){let{measureSize:o,startEdge:a,endEdge:l}=n,c=e[0]&&r,u=m(),d=y(),p=e.map(o),g=v();function m(){if(!c)return 0;let _=e[0];return xt(t[a]-_[a])}function y(){if(!c)return 0;let _=s.getComputedStyle(ve(i));return parseFloat(_.getPropertyValue(`margin-${l}`))}function v(){return e.map((_,T,I)=>{let L=!T,R=Qr(I,T);return L?p[T]+u:R?p[T]+d:I[T+1][a]-_[a]}).map(xt)}return{slideSizes:p,slideSizesWithGaps:g,startGap:u,endGap:d}}function ou(n,t,e,i,r,s,o,a,l){let{startEdge:c,endEdge:u,direction:d}=n,p=Xr(e);function g(b,_){return sn(b).filter(T=>T%_===0).map(T=>b.slice(T,T+_))}function m(b){return b.length?sn(b).reduce((_,T,I)=>{let L=ve(_)||0,R=L===0,F=T===ln(b),P=r[c]-s[L][c],k=r[c]-s[T][u],E=!i&&R?d(o):0,B=!i&&F?d(a):0,X=xt(k-B-(P+E));return I&&X>t+l&&_.push(T),F&&_.push(b.length),_},[]).map((_,T,I)=>{let L=Math.max(I[T-1]||0);return b.slice(L,_)}):[]}function y(b){return p?g(b,e):m(b)}return{groupSlides:y}}function au(n,t,e,i,r,s,o){let{align:a,axis:l,direction:c,startIndex:u,loop:d,duration:p,dragFree:g,dragThreshold:m,inViewThreshold:y,slidesToScroll:v,skipSnaps:b,containScroll:_,watchResize:T,watchSlides:I,watchDrag:L,watchFocus:R}=s,F=2,P=$c(),k=P.measure(t),E=e.map(P.measure),B=Bc(l,c),X=B.measureSize(k),ot=Hc(X),ut=Rc(a,X),yt=!d&&!!_,_t=d||!!_,{slideSizes:ft,slideSizesWithGaps:st,startGap:qt,endGap:Xt}=su(B,k,E,e,_t,r),Ft=ou(B,X,v,d,k,E,qt,Xt,F),{snaps:oe,snapsAligned:fe}=Yc(B,ut,k,E,Ft),Mt=-ve(oe)+ve(st),{snapsContained:Jt,scrollContainLimit:te}=Gc(X,Mt,fe,_,F),At=yt?Jt:fe,{limit:vt}=Kc(Mt,At,d),kt=Ea(ln(At),u,d),Ut=kt.clone(),nt=sn(e),N=({dragHandler:S,scrollBody:x,scrollBounds:w,options:{loop:A}})=>{A||w.constrain(S.pointerDown()),x.seek()},et=({scrollBody:S,translate:x,location:w,offsetLocation:A,previousLocation:q,scrollLooper:C,slideLooper:M,dragHandler:$,animation:it,eventHandler:Q,scrollBounds:Nt,options:{loop:ge}},Y)=>{let j=S.settled(),at=!Nt.shouldConstrain(),tt=ge?j:j&&at,lt=tt&&!$.pointerDown();lt&&it.stop();let ye=w.get()*Y+q.get()*(1-Y);A.set(ye),ge&&(C.loop(S.direction()),M.loop()),x.to(A.get()),lt&&Q.emit("settle"),tt||Q.emit("scroll")},wt=qc(i,r,()=>N(f),S=>et(f,S)),Dt=.68,ae=At[kt.get()],me=nn(ae),Bt=nn(ae),Yt=nn(ae),Ae=nn(ae),Ce=Uc(me,Yt,Bt,Ae,p,Dt),ii=Jc(d,At,Mt,vt,Ae),ni=tu(wt,kt,Ut,Ce,ii,Ae,o),$e=Xc(vt),He=an(),cr=ru(t,e,o,y),{slideRegistry:xi}=Qc(yt,_,At,te,Ft,nt),h=eu(n,e,xi,ni,Ce,He,o,R),f={ownerDocument:i,ownerWindow:r,eventHandler:o,containerRect:k,slideRects:E,animation:wt,axis:B,dragHandler:Nc(B,n,i,r,Ae,zc(B,r),me,wt,ni,Ce,ii,kt,o,ot,g,m,b,Dt,L),eventStore:He,percentOfView:ot,index:kt,indexPrevious:Ut,limit:vt,location:me,offsetLocation:Yt,previousLocation:Bt,options:s,resizeHandler:Wc(t,o,r,e,B,T,P),scrollBody:Ce,scrollBounds:Zc(vt,Yt,Ae,Ce,ot),scrollLooper:jc(Mt,vt,Yt,[me,Yt,Bt,Ae]),scrollProgress:$e,scrollSnapList:At.map($e.get),scrollSnaps:At,scrollTarget:ii,scrollTo:ni,slideLooper:iu(B,X,Mt,ft,st,oe,At,Yt,e),slideFocus:h,slidesHandler:nu(t,o,I),slidesInView:cr,slideIndexes:nt,slideRegistry:xi,slidesToScroll:Ft,target:Ae,translate:Ia(B,t)};return f}function lu(){let n={},t;function e(c){t=c}function i(c){return n[c]||[]}function r(c){return i(c).forEach(u=>u(t,c)),l}function s(c,u){return n[c]=i(c).concat([u]),l}function o(c,u){return n[c]=i(c).filter(d=>d!==u),l}function a(){n={}}let l={init:e,emit:r,off:o,on:s,clear:a};return l}var cu={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function uu(n){function t(s,o){return Ca(s,o||{})}function e(s){let o=s.breakpoints||{},a=on(o).filter(l=>n.matchMedia(l).matches).map(l=>o[l]).reduce((l,c)=>t(l,c),{});return t(s,a)}function i(s){return s.map(o=>on(o.breakpoints||{})).reduce((o,a)=>o.concat(a),[]).map(n.matchMedia)}return{mergeOptions:t,optionsAtMedia:e,optionsMediaQueries:i}}function du(n){let t=[];function e(s,o){return t=o.filter(({options:a})=>n.optionsAtMedia(a).active!==!1),t.forEach(a=>a.init(s,n)),o.reduce((a,l)=>Object.assign(a,{[l.name]:l}),{})}function i(){t=t.filter(s=>s.destroy())}return{init:e,destroy:i}}function Te(n,t,e){let i=n.ownerDocument,r=i.defaultView,s=uu(r),o=du(s),a=an(),l=lu(),{mergeOptions:c,optionsAtMedia:u,optionsMediaQueries:d}=s,{on:p,off:g,emit:m}=l,y=B,v=!1,b,_=c(cu,Te.globalOptions),T=c(_),I=[],L,R,F;function P(){let{container:nt,slides:N}=T;R=(Kr(nt)?n.querySelector(nt):nt)||n.children[0];let wt=Kr(N)?R.querySelectorAll(N):N;F=[].slice.call(wt||R.children)}function k(nt){let N=au(n,R,F,i,r,nt,l);if(nt.loop&&!N.slideLooper.canLoop()){let et=Object.assign({},nt,{loop:!1});return k(et)}return N}function E(nt,N){v||(_=c(_,nt),T=u(_),I=N||I,P(),b=k(T),d([_,...I.map(({options:et})=>et)]).forEach(et=>a.add(et,"change",B)),T.active&&(b.translate.to(b.location.get()),b.animation.init(),b.slidesInView.init(),b.slideFocus.init(Ut),b.eventHandler.init(Ut),b.resizeHandler.init(Ut),b.slidesHandler.init(Ut),b.options.loop&&b.slideLooper.loop(),R.offsetParent&&F.length&&b.dragHandler.init(Ut),L=o.init(Ut,I)))}function B(nt,N){let et=Ft();X(),E(c({startIndex:et},nt),N),l.emit("reInit")}function X(){b.dragHandler.destroy(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),b.slidesInView.destroy(),b.animation.destroy(),o.destroy(),a.clear()}function ot(){v||(v=!0,a.clear(),X(),l.emit("destroy"),l.clear())}function ut(nt,N,et){!T.active||v||(b.scrollBody.useBaseFriction().useDuration(N===!0?0:T.duration),b.scrollTo.index(nt,et||0))}function yt(nt){let N=b.index.add(1).get();ut(N,nt,-1)}function _t(nt){let N=b.index.add(-1).get();ut(N,nt,1)}function ft(){return b.index.add(1).get()!==Ft()}function st(){return b.index.add(-1).get()!==Ft()}function qt(){return b.scrollSnapList}function Xt(){return b.scrollProgress.get(b.offsetLocation.get())}function Ft(){return b.index.get()}function oe(){return b.indexPrevious.get()}function fe(){return b.slidesInView.get()}function Mt(){return b.slidesInView.get(!1)}function Jt(){return L}function te(){return b}function At(){return n}function vt(){return R}function kt(){return F}let Ut={canScrollNext:ft,canScrollPrev:st,containerNode:vt,internalEngine:te,destroy:ot,off:g,on:p,emit:m,plugins:Jt,previousScrollSnap:oe,reInit:y,rootNode:At,scrollNext:yt,scrollPrev:_t,scrollProgress:Xt,scrollSnapList:qt,scrollTo:ut,selectedScrollSnap:Ft,slideNodes:kt,slidesInView:fe,slidesNotInView:Mt};return E(t,e),setTimeout(()=>l.emit("init"),0),Ut}Te.globalOptions=void 0,(function(){"use strict";if(window.__productCarouselEmblaInit)return;window.__productCarouselEmblaInit=!0;function n(){!window.Alpine||window.__productCarouselEmblaRegistered||(window.Alpine.data("productCarousel",function(t){return{carouselId:t.carouselId,paginationStyle:t.paginationStyle,mobilePaginationStyle:t.mobilePaginationStyle||"dots",currentSlide:0,totalSlides:0,canScrollPrev:!1,canScrollNext:!1,emblaApi:null,emblaThumbsApi:null,syncingThumbs:!1,thumbButtons:[],thumbSlides:[],thumbObserver:null,dots:[],dotsMobile:[],dotsContainer:null,dotsContainerMobile:null,maxVisibleDots:5,maxVisibleDotsDesktop:7,init:function(){let e=this.$refs.carousel;if(!e)return;let i=e.querySelector(".embla__viewport");if(!i)return;let r=Array.from(i.querySelectorAll(".embla__slide"));this.totalSlides=r.length,this.totalSlides!==0&&(this.emblaApi=Te(i,{align:"start",containScroll:"trimSnaps",dragFree:!1,loop:!1,skipSnaps:!1,slidesToScroll:1,duration:25}
1),this.setupThumbsCarousel(),this.thumbButtons=Array.from(this.$root.querySelectorAll('[data-thumb-for="'+this.carouselId+'"] .embla-thumbs__slide__button')),this.thumbSlides=Array.from(this.$root.querySelectorAll('[data-thumb-for="'+this.carouselId+'"] .embla-thumbs__slide')),this.setupEmblaEvents(),this.setupThumbLazyLoading(),this.setupKeyboardNavigation(),this.setupThumbScrollIndicators(),this.syncThumbnailDimensions(),this.updateButtonStates(),this.currentSlide=this.emblaApi.selectedScrollSnap(),this.setupDots(),this.setupCounter(),this.$nextTick?this.$nextTick(()=>{this.dots.length===0&&this.dotsMobile.length===0&&this.setupDots()}):setTimeout(()=>{this.dots.length===0&&this.dotsMobile.length===0&&this.setupDots()},100))},setupDots:function(){let e=this.paginationStyle==="dots",i=this.mobilePaginationStyle==="dots";if(!e&&!i)return;let r=this.$refs.carousel;if(!r)return;let s=this.$root,o=r.closest(".relative");e&&(this.dotsContainer=s.querySelector('[data-embla-dots="'+this.carouselId+'"]')||(o?o.querySelector('[data-embla-dots="'+this.carouselId+'"]'):null)||document.querySelector('[data-embla-dots="'+this.carouselId+'"]')),i&&(this.dotsContainerMobile=s.querySelector('[data-embla-dots-mobile="'+this.carouselId+'"]')||(o?o.querySelector('[data-embla-dots-mobile="'+this.carouselId+'"]'):null)||document.querySelector('[data-embla-dots-mobile="'+this.carouselId+'"]')),!(e&&!this.dotsContainer&&i&&!this.dotsContainerMobile)&&(this.dotsContainer&&this.createDots(this.dotsContainer,this.dots),this.dotsContainerMobile&&this.createDots(this.dotsContainerMobile,this.dotsMobile),(this.dots.length>0||this.dotsMobile.length>0)&&(this.updateDots(),requestAnimationFrame(()=>{this.updateDots()})))},createDots:function(e,i){let r=e.querySelector("[data-embla-dots-track]")||e;r.innerHTML="",i.length=0;let s="embla__dot h-2 w-2 shrink-0 cursor-pointer rounded-full border-0 bg-black/50 p-0 transition-[transform,opacity] duration-200 hover:opacity-80 focus:outline-none focus-visible:ring-2 focus-visible:ring-black/40",o=this;for(let a=0;a<this.totalSlides;a++){let l=document.createElement("button");l.type="button",l.className=s,l.setAttribute("aria-label","Go to slide "+(a+1)),l.addEventListener("click",()=>{o.emblaApi&&o.emblaApi.scrollTo(a)}),r.appendChild(l),i.push(l)}},getDotsWindowStart:function(e,i,r){if(i<=r)return 0;let s=Math.floor(r/2),o=i-r;return Math.max(0,Math.min(e-s,o))},updateDotsWindow:function(e,i,r,s){if(!e||i.length===0)return;let o=e.querySelector("[data-embla-dots-track]")||e,a=i.length,l=i[0],c=window.getComputedStyle(o),u=Number.parseFloat(c.columnGap||c.gap)||8,p=(l.offsetWidth||8)+u;if(a<=s){o.style.transform="translate3d(0, 0, 0)",e.style.width="auto",i.forEach(y=>{y.style.transform="",y.tabIndex=0});return}let g=this.getDotsWindowStart(r,a,s),m=g+s-1;e.style.width=s*p-u+"px",o.style.transform="translate3d("+-g*p+"px, 0, 0)",i.forEach((y,v)=>{let b=v>=g&&v<=m;y.tabIndex=b?0:-1;let _=.7;v===r?_=1:Math.abs(v-r)===1?_=.85:b&&(v===g&&g>0||v===m&&m<a-1)&&(_=.5),y.style.transform="scale("+_+")"})},updateDots:function(){if(!this.emblaApi)return;let e=this.emblaApi.selectedScrollSnap(),i=r=>{r.forEach((s,o)=>{o===e?(s.classList.add("embla__dot--selected","!bg-black"),s.classList.remove("!bg-black/50"),s.setAttribute("aria-current","true")):(s.classList.remove("embla__dot--selected","!bg-black"),s.classList.add("!bg-black/50"),s.removeAttribute("aria-current"))})};if(this.dots.length>0){i(this.dots);let r=Number.parseInt(this.dotsContainer&&this.dotsContainer.getAttribute("data-max-visible-dots"),10)||this.maxVisibleDotsDesktop;this.updateDotsWindow(this.dotsContainer,this.dots,e,r)}if(this.dotsMobile.length>0){i(this.dotsMobile);let r=Number.parseInt(this.dotsContainerMobile&&this.dotsContainerMobile.getAttribute("data-max-visible-dots"),10)||this.maxVisibleDots;this.updateDotsWindow(this.dotsContainerMobile,this.dotsMobile,e,r)}},setupThumbsCarousel:function(){if(this.paginationStyle!=="thumbnails")return;let e=this.$refs.thumbs;if(!e)return;let i=e.querySelector(".embla-thumbs__viewport");if(!i)return;let r=e.querySelector(".embla-thumbs__container"),s=r&&r.classList.contains("flex-col");s&&i.classList.contains("overflow-y-auto")?this.emblaThumbsApi=Te(i,{containScroll:"keepSnaps",dragFree:!0,axis:"y",align:"start"}):this.emblaThumbsApi=Te(i,{containScroll:"keepSnaps",dragFree:!1,axis:s?"y":"x",align:"start"});let o=this;this.emblaApi&&this.emblaThumbsApi&&this.emblaThumbsApi.on("select",()=>{o.emblaApi&&!o.syncingThumbs&&(o.syncingThumbs=!0,o.emblaApi.scrollTo(o.emblaThumbsApi.selectedScrollSnap()),setTimeout(()=>{o.syncingThumbs=!1},50))})},setupThumbScrollIndicators:function(){if(this.paginationStyle!=="thumbnails")return;let e=this.$refs.thumbs;if(!e)return;let i=e.querySelector(".embla-thumbs__viewport");if(!i)return;let r=e.querySelector(".embla-thumbs__container"),s=r&&r.classList.contains("flex-col"),o=r&&r.classList.contains("flex-row"),a=()=>
1{if(s){let l=i.scrollTop,c=i.scrollHeight,u=i.clientHeight,d=c>u,p=l<=5,g=l+u>=c-5;d&&!p?i.classList.add("scrolled"):i.classList.remove("scrolled"),d&&!g?i.classList.add("scrollable"):i.classList.remove("scrollable"),d&&!p?e.classList.add("has-scrolled"):e.classList.remove("has-scrolled"),d&&!g?e.classList.add("has-scrollable"):e.classList.remove("has-scrollable")}else if(o){let l=i.scrollLeft,c=i.scrollWidth,u=i.clientWidth,d=c>u,p=l<=5,g=l+u>=c-5;d&&!p?i.classList.add("scrolled-left"):i.classList.remove("scrolled-left"),d&&!g?i.classList.add("scrollable-right"):i.classList.remove("scrollable-right"),d&&!p?e.classList.add("has-scrolled-left"):e.classList.remove("has-scrolled-left"),d&&!g?e.classList.add("has-scrollable-right"):e.classList.remove("has-scrollable-right")}};if(a(),i.addEventListener("scroll",a),window.ResizeObserver){let l=new ResizeObserver(()=>{a()});l.observe(i),l.observe(r)}this.emblaThumbsApi&&this.emblaThumbsApi.on("scroll",a)},syncThumbnailDimensions:function(){if(this.paginationStyle!=="thumbnails")return;let e=this.$refs.carousel;if(!e)return;let i=e.querySelector(".embla__viewport");if(!i)return;let r=this.$refs.thumbs;if(!r)return;let s=r.querySelector("[data-thumb-viewport]");if(!s)return;let o=r.getAttribute("data-thumb-container"),a=null,l=null,c=(d=!1)=>{if(!i||!s)return;let p=()=>{if(!(!i||!s)){if(o==="vertical"){let g=i.offsetHeight;g>0&&g!==a&&(a!==null&&!d?s.style.transition="height 0.2s ease-out":s.style.transition="none",s.style.height=g+"px",a=g,a!==null&&!d&&setTimeout(()=>{s&&(s.style.transition="")},200))}else if(o==="horizontal"){let g=i.offsetWidth;if(g>0&&g!==l){let m=r.closest(".w-full.max-w-4xl");l!==null&&!d?(m&&(m.style.transition="max-width 0.2s ease-out, width 0.2s ease-out"),s.style.transition="width 0.2s ease-out"):(m&&(m.style.transition="none"),s.style.transition="none"),m&&(m.style.maxWidth=g+"px",m.style.width=g+"px"),s.style.width=g+"px",l=g,l!==null&&!d&&setTimeout(()=>{m&&(m.style.transition=""),s&&(s.style.transition="")},200)}}}};d?p():requestAnimationFrame(()=>{requestAnimationFrame(p)})};if(c(!0),requestAnimationFrame(()=>{setTimeout(()=>{c()},50)}),window.ResizeObserver){let d;new ResizeObserver(()=>{clearTimeout(d),d=setTimeout(()=>{c()},16)}).observe(i)}i.querySelectorAll("img").forEach(d=>{d.complete?requestAnimationFrame(()=>{c()}):d.addEventListener("load",()=>{requestAnimationFrame(()=>{c()})},{once:!0})}),this.emblaApi&&this.emblaApi.on("select",()=>{requestAnimationFrame(()=>{c()})})},setupEmblaEvents:function(){if(!this.emblaApi)return;let e=this;this.emblaApi.on("select",()=>{let i=e.emblaApi.selectedScrollSnap();e.currentSlide=i,e.ensureThumbLoaded(i+1),e.syncThumbnails(i),e.updateDots(),e.updateCounter(),e.updateButtonStates(),e.emblaThumbsApi&&!e.syncingThumbs&&(e.syncingThumbs=!0,e.emblaThumbsApi.scrollTo(i,!0),setTimeout(()=>{e.syncingThumbs=!1},50))}),this.emblaApi.on("reInit",()=>{e.updateButtonStates()}),this.updateDots(),this.updateCounter()},setupCounter:function(){let e=this.paginationStyle==="counter",i=this.mobilePaginationStyle==="counter";if(!e&&!i)return;let r=this.$root,s=this.$refs.carousel,o=s?s.closest(".relative"):null;if(!this.emblaApi)return;let a=this.emblaApi.slideNodes().length,l=this.emblaApi.selectedScrollSnap()+1;if(e){let c=r.querySelector("#"+this.carouselId+"-counter")||(o?o.querySelector("#"+this.carouselId+"-counter"):null)||document.querySelector("#"+this.carouselId+"-counter");if(c){let u=c.querySelector(".total-slides"),d=c.querySelector(".current-slide");
1u&&(u.textContent=a),d&&(d.textContent=l)}}if(i){let c=r.querySelector("#"+this.carouselId+"-counter-mobile")||(o?o.querySelector("#"+this.carouselId+"-counter-mobile"):null)||document.querySelector("#"+this.carouselId+"-counter-mobile");if(c){let u=c.querySelector(".total-slides"),d=c.querySelector(".current-slide");u&&(u.textContent=a),d&&(d.textContent=l)}}},updateCounter:function(){if(!this.emblaApi)return;let e=this.emblaApi.selectedScrollSnap()+1,i=this.$root,r=this.$refs.carousel,s=r?r.closest(".relative"):null,o=this.paginationStyle==="counter",a=this.mobilePaginationStyle==="counter";if(o){let l=i.querySelector("#"+this.carouselId+"-counter")||(s?s.querySelector("#"+this.carouselId+"-counter"):null)||document.querySelector("#"+this.carouselId+"-counter");if(l){let c=l.querySelector(".current-slide");c&&(c.textContent=e)}}if(a){let l=i.querySelector("#"+this.carouselId+"-counter-mobile")||(s?s.querySelector("#"+this.carouselId+"-counter-mobile"):null)||document.querySelector("#"+this.carouselId+"-counter-mobile");if(l){let c=l.querySelector(".current-slide");c&&(c.textContent=e)}}},setupKeyboardNavigation:function(){let e=this.$refs.carousel;if(!e)return;let i=this;e.addEventListener("keydown",r=>{r.key==="ArrowLeft"?(r.preventDefault(),i.showPrev()):r.key==="ArrowRight"&&(r.preventDefault(),i.showNext())})},showPrev:function(){this.emblaApi?.scrollPrev()},showNext:function(){this.emblaApi?.scrollNext()},goTo:function(e){let i=e-1;this.emblaApi&&i>=0&&i<this.totalSlides&&this.emblaApi.scrollTo(i)},isActive:function(e){return this.currentSlide===e-1},syncThumbnails:function(e){this.thumbSlides.forEach((i,r)=>{if(r===e){i.classList.add("embla-thumbs__slide--selected"),i.setAttribute("aria-current","true");let s=i.querySelector(".embla-thumbs__slide__button");s&&(s.classList.add("active"),s.setAttribute("aria-current","true"))}else{i.classList.remove("embla-thumbs__slide--selected"),i.removeAttribute("aria-current");let s=i.querySelector(".embla-thumbs__slide__button");s&&(s.classList.remove("active"),s.removeAttribute("aria-current"))}})},loadThumbImage:function(e){if(!e||e.dataset.thumbLoaded==="true")return;let i=e.dataset.thumbSrc;i&&(e.src=i,e.removeAttribute("data-thumb-src")),e.dataset.thumbLoaded="true"},loadThumbFromButton:function(e){if(!e)return;let i=e.querySelector("img");this.loadThumbImage(i)},ensureThumbLoaded:function(e){if(!this.thumbButtons?.length)return;let i=this.thumbButtons[e-1];i&&this.loadThumbFromButton(i)},setupThumbLazyLoading:function(){if(!this.thumbButtons?.length)return;let e=this,i=this.thumbButtons.map(r=>r.querySelector("img")).filter(r=>r&&r.dataset.thumbLoaded!=="true");if(i.length!==0){if(!("IntersectionObserver"in window)){i.forEach(r=>e.loadThumbImage(r));return}this.thumbObserver=new IntersectionObserver((r,s)=>{r.forEach(o=>{o.isIntersecting&&(e.loadThumbImage(o.target),s.unobserve(o.target))})},{rootMargin:"200px"}),i.forEach(r=>this.thumbObserver.observe(r))}},thumbClasses:function(e){return this.isActive(e)?"!border-[var(--button-border-color)] border-2":"border-base-300"},updateButtonStates:function(){if(!this.emblaApi)return;this.canScrollPrev=this.emblaApi.canScrollPrev(),this.canScrollNext=this.emblaApi.canScrollNext();let e=this.$root,i=e.querySelector("#"+this.carouselId+"-prevBtn"),r=e.querySelector("#"+this.carouselId+"-nextBtn");i&&(this.canScrollPrev?(i.removeAttribute("disabled"),i.classList.remove("embla__button--disabled")):(i.setAttribute("disabled","disabled"),i.classList.add("embla__button--disabled"))),r&&(this.canScrollNext?(r.removeAttribute("disabled"),r.classList.remove("embla__button--disabled")):(r.setAttribute("disabled","disabled"),r.classList.add("embla__button--disabled")))}}}),window.__productCarouselEmblaRegistered=!0)}window.Alpine&&window.Alpine.version?n():document.addEventListener("alpine:init",n)})();function cn(n,t,e){let i=document.createElement(t);return n&&(i.className=n),e&&e.appendChild(i),i}function hu(n,t,e){let i=`translate3d(${n}px,${t||0}px,0)`;return e!==void 0&&(i+=` scale3d(${e},${e},1)`),i}function Jr(n,t,e){n.style.width=typeof t=="number"?`${t}px`:t,n.style.height=typeof e=="number"?`${e}px`:e}
vendor: 50,106 bytes, line 1
1var he={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function pu(n){return"button"in n&&n.button===1||n.ctrlKey||n.metaKey||n.altKey||n.shiftKey}function un(n,t,e=document){let i=[];if(n instanceof Element)i=[n];else if(n instanceof NodeList||Array.isArray(n))i=Array.from(n);else{let r=typeof n=="string"?n:t;r&&(i=Array.from(e.querySelectorAll(r)))}return i}function fu(n){return typeof n=="function"&&n.prototype&&n.prototype.goTo}function Pa(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}var ts=class{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}},es=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var r,s,o;this._filters[t]||(this._filters[t]=[]),(r=this._filters[t])===null||r===void 0||r.push({fn:e,priority:i}),(s=this._filters[t])===null||s===void 0||s.sort((a,l)=>a.priority-l.priority),(o=this.pswp)===null||o===void 0||o.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(r=>{e[0]=r.fn.apply(this,e)}),e[0]}on(t,e){var i,r;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(e),(r=this.pswp)===null||r===void 0||r.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(r=>e!==r)),(i=this.pswp)===null||i===void 0||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);let r=new ts(t,e);return(i=this._listeners[t])===null||i===void 0||i.forEach(s=>{s.call(this,r)}),r}},is=class{constructor(t,e){if(this.element=cn("pswp__img pswp__img--placeholder",t?"img":"div",e),t){let i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&(this.element.tagName==="IMG"?(Jr(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=hu(0,0,t/250)):Jr(this.element,t,e))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}},ns=class{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=he.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){let i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{let i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new is(i,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=cn("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=cn("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;let r=this.element;this.updateSrcsetSizes(),this.data.srcset&&(r.srcset=this.data.srcset),r.src=(e=this.data.src)!==null&&e!==void 0?e:"",r.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=he.LOADING,r.complete?this.onLoaded():(r.onload=()=>{this.onLoaded()},r.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=he.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===he.LOADED||this.state===he.ERROR)&&this.removePlaceholder())}onError(){this.state=he.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===he.LOADING,this)}isError(){return this.state===he.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(Jr(this.element,t,e),this.isImageContent()&&!this.isError()))){let i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==he.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;let t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,e;let i=cn("pswp__error-msg","div");i.innerText=(t=(e=this.instance.options)===null||e===void 0?void 0:e.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=cn("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===he.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;let t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||Pa())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!Pa()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===he.LOADED||this.state===he.ERROR)&&this.removePlaceholder()))}};function mu(n,t){if(n.getViewportSizeFn){let e=n.getViewportSizeFn(n,t);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function sr(n,t,e,i,r){let s=0;if(t.paddingFn)s=t.paddingFn(e,i,r)[n];else if(t.padding)s=t.padding[n];else{let o="padding"+n[0].toUpperCase()+n.slice(1);t[o]&&(s=t[o])}return Number(s)||0}function gu(n,t,e,i){return{x:t.x-sr("left",n,t,e,i)-sr("right",n,t,e,i),y:t.y-sr("top",n,t,e,i)-sr("bottom",n,t,e,i)}}var La=4e3,rs=class{constructor(t,e,i,r){this.pswp=r,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){let r={x:t,y:e};this.elementSize=r,this.panAreaSize=i;let s=i.x/r.x,o=i.y/r.y;this.fit=Math.min(1,s<o?s:o),this.fill=Math.min(1,s>o?s:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){let e=t+"ZoomLevel",i=this.options[e];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>La&&(t=La/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}};function Ma(n,t,e){let i=t.createContentFromData(n,e),r,{options:s}=t;if(s){r=new rs(s,n,-1);let o;t.pswp?o=t.pswp.viewportSize:o=mu(s,t);let a=gu(s,o,n,e);r.update(i.width,i.height,a)}return i.lazyLoad(),r&&i.setDisplayedSize(Math.ceil(i.width*r.initial),Math.ceil(i.height*r.initial)),i}function yu(n,t){let e=t.getItemData(n);if(!t.dispatch("lazyLoadSlide",{index:n,itemData:e}).defaultPrevented)return Ma(e,t,n)}var ss=class extends es{getNumItems(){var t;let e=0,i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(e=i.items.length));let r=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",r.numItems,i)}createContentFromData(t,e){return new ns(t,this,e)}getItemData(t){var e;let i=(e=this.options)===null||e===void 0?void 0:e.dataSource,r={};Array.isArray(i)?r=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),r=i.items[t]);let s=r;s instanceof Element&&(s=this._domElementToItemData(s));let o=this.dispatch("itemData",{itemData:s||{},index:t});return this.applyFilters("itemData",o.itemData,t)}_getGalleryDOMElements(t){var e,i;return(e=this.options)!==null&&e!==void 0&&e.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?un(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){let e={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);let s=t.querySelector("img");if(s){var r;e.msrc=s.currentSrc||s.src,e.alt=(r=s.getAttribute("alt"))!==null&&r!==void 0?r:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return Ma(t,this,e)}},or=class extends ss{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){un(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(pu(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};!e.x&&!e.y&&(e=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);let r={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,r,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);let e=t.target,r=un(this.options.children,this.options.childSelector,t.currentTarget).findIndex(s=>s===e||s.contains(e));return r!==-1?r:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,i){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){let r=un(this.options.gallery);r[0]&&(e={gallery:r[0]})}return this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){let{options:i}=this;e&&(i.dataSource=e);let r=[],s=typeof i.pswpModule;if(fu(i.pswpModule))r.push(Promise.resolve(i.pswpModule));else{if(s==="string")throw new Error("pswpModule as string is no longer supported");if(s==="function")r.push(i.pswpModule());else throw new Error("pswpModule is not valid")}typeof i.openPromise=="function"&&r.push(i.openPromise()),i.preloadFirstSlide!==!1&&t>=0&&(this._preloadedContent=yu(t,this));let o=++this._uid;Promise.all(r).then(a=>{if(this.shouldOpen){let l=a[0];this._openPhotoswipe(l,o)}})}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;let i=typeof t=="object"?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach(r=>{var s;(s=this._listeners[r])===null||s===void 0||s.forEach(o=>{i.on(r,o)})}),Object.keys(this._filters).forEach(r=>{var s;(s=this._filters[r])===null||s===void 0||s.forEach(o=>{i.addFilter(r,o.fn,o.priority)})}),this._preloadedContent&&(i.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),i.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),i.init()}destroy(){var t;(t=this.pswp)===null||t===void 0||t.destroy(),this.shouldOpen=!1,this._listeners={},un(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)})}};function se(n,t,e){let i=document.createElement(t);return n&&(i.className=n),e&&e.appendChild(i),i}function Lt(n,t){return n.x=t.x,n.y=t.y,t.id!==void 0&&(n.id=t.id),n}function Ba(n){n.x=Math.round(n.x),n.y=Math.round(n.y)}function os(n,t){let e=Math.abs(n.x-t.x),i=Math.abs(n.y-t.y);return Math.sqrt(e*e+i*i)}function pn(n,t){return n.x===t.x&&n.y===t.y}function mn(n,t,e){return Math.min(Math.max(n,t),e)}function fn(n,t,e){let i=`translate3d(${n}px,${t||0}px,0)`;return e!==void 0&&(i+=` scale3d(${e},${e},1)`),i}function ei(n,t,e,i){n.style.transform=fn(t,e,i)}var vu="cubic-bezier(.4,0,.22,1)";function Na(n,t,e,i){n.style.transition=t?`${t} ${e}ms ${i||vu}`:"none"}function as(n,t,e){n.style.width=typeof t=="number"?`${t}px`:t,n.style.height=typeof e=="number"?`${e}px`:e}function bu(n){Na(n)}function Su(n){return"decode"in n?n.decode().catch(()=>{}):n.complete?Promise.resolve(n):new Promise((t,e)=>{n.onload=()=>t(n),n.onerror=e})}var pe={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function xu(n){return"button"in n&&n.button===1||n.ctrlKey||n.metaKey||n.altKey||n.shiftKey}function wu(n,t,e=document){let i=[];if(n instanceof Element)i=[n];else if(n instanceof NodeList||Array.isArray(n))i=Array.from(n);else{let r=typeof n=="string"?n:t;r&&(i=Array.from(e.querySelectorAll(r)))}return i}function ka(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}var za=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{za=!0}}))}catch{}var ls=class{constructor(){this._pool=[]}add(t,e,i,r){this._toggleListener(t,e,i,r)}remove(t,e,i,r){this._toggleListener(t,e,i,r,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,e,i,r,s,o){if(!t)return;let a=s?"removeEventListener":"addEventListener";e.split(" ").forEach(c=>{if(c){o||(s?this._pool=this._pool.filter(d=>d.type!==c||d.listener!==i||d.target!==t):this._pool.push({target:t,type:c,listener:i,passive:r}));let u=za?{passive:r||!1}:!1;t[a](c,i,u)}})}};function $a(n,t){if(n.getViewportSizeFn){let e=n.getViewportSizeFn(n,t);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function hn(n,t,e,i,r){let s=0;if(t.paddingFn)s=t.paddingFn(e,i,r)[n];else if(t.padding)s=t.padding[n];else{let o="padding"+n[0].toUpperCase()+n.slice(1);t[o]&&(s=t[o])}return Number(s)||0}function Ha(n,t,e,i){return{x:t.x-hn("left",n,t,e,i)-hn("right",n,t,e,i),y:t.y-hn("top",n,t,e,i)-hn("bottom",n,t,e,i)}}var cs=class{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){let{pswp:e}=this.slide,i=this.slide[t==="x"?"width":"height"]*this.currZoomLevel,s=hn(t==="x"?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),o=this.slide.panAreaSize[t];this.center[t]=Math.round((o-i)/2)+s,this.max[t]=i>o?Math.round(o-i)+s:this.center[t],this.min[t]=i>o?s:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,e){return mn(e,this.max[t],this.min[t])}},Da=4e3,ar=class{constructor(t,e,i,r){this.pswp=r,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){let r={x:t,y:e};this.elementSize=r,this.panAreaSize=i;let s=i.x/r.x,o=i.y/r.y;this.fit=Math.min(1,s<o?s:o),this.fill=Math.min(1,s>o?s:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){let e=t+"ZoomLevel",i=this.options[e];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>Da&&(t=Da/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}},us=class{constructor(t,e,i){this.data=t,this.index=e,this.pswp=i,this.isActive=e===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new ar(i.options,t,e,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:e}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=se("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new cs(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){let{pswp:t}=this;this.heavyAppended||!t.opener.isOpen||t.mainScroll.isShifted()||!this.isActive&&!1||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel===this.zoomLevels.initial||!this.isActive?(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize()):(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y))}updateContentSize(t){let e=this.currentResolution||this.zoomLevels.initial;if(!e)return;let i=Math.round(this.width*e)||this.pswp.viewportSize.x,r=Math.round(this.height*e)||this.pswp.viewportSize.y;!this.sizeChanged(i,r)&&!t||this.content.setDisplayedSize(i,r)}sizeChanged(t,e){return t!==this.prevDisplayedWidth||e!==this.prevDisplayedHeight?(this.prevDisplayedWidth=t,this.prevDisplayedHeight=e,!0):!1}getPlaceholderElement(){var t;return(t=this.content.placeholder)===null||t===void 0?void 0:t.element}zoomTo(t,e,i,r){let{pswp:s}=this;if(!this.isZoomable()||s.mainScroll.isShifted())return;s.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:i}),s.animations.stopAllPan();let o=this.currZoomLevel;r||(t=mn(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,o),this.pan.y=this.calculateZoomToPanOffset("y",e,o),Ba(this.pan);let a=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?s.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:i,easing:s.options.easing}):a()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,e,i){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];e||(e=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);let s=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-e[t])*s+e[t])}panTo(t,e){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",e),this.applyCurrentZoomPan()}isPannable(){return!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),Lt(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,ei(this.container,t,e,i)}calculateSize(){let{pswp:t}=this;Lt(this.panAreaSize,Ha(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){let t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return fn(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}},_u=.35,Tu=.6,Va=.4,Oa=.5;function Au(n,t){return n*t/(1-t)}var ds=class{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&Lt(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){let{p1:t,prevP1:e,dragAxis:i}=this.gestures,{currSlide:r}=this.pswp;if(i==="y"&&this.pswp.options.closeOnVerticalDrag&&r&&r.currZoomLevel<=r.zoomLevels.fit&&!this.gestures.isMultitouch){let s=r.pan.y+(t.y-e.y);if(!this.pswp.dispatch("verticalDrag",{panY:s}).defaultPrevented){this._setPanWithFriction("y",s,Tu);let o=1-Math.abs(this._getVerticalDragRatio(r.pan.y));this.pswp.applyBgOpacity(o),r.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),r&&(Ba(r.pan),r.applyCurrentZoomPan()))}end(){let{velocity:t}=this.gestures,{mainScroll:e,currSlide:i}=this.pswp,r=0;if(this.pswp.animations.stopAll(),e.isShifted()){let o=(e.x-e.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-Oa&&o<0||t.x<.1&&o<-.5?(r=1,t.x=Math.min(t.x,0)):(t.x>Oa&&o>0||t.x>-.1&&o>.5)&&(r=-1,t.x=Math.max(t.x,0)),e.moveIndexBy(r,!0,t.x)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){let{velocity:e}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;let{pan:r,bounds:s}=i,o=r[t],a=this.pswp.bgOpacity<1&&t==="y",c=o+Au(e[t],.995);if(a){let m=this._getVerticalDragRatio(o),y=this._getVerticalDragRatio(c);if(m<0&&y<-Va||m>0&&y>Va){this.pswp.close();return}}let u=s.correctPan(t,c);if(o===u)return;let d=u===c?1:.82,p=this.pswp.bgOpacity,g=u-o;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:o,end:u,velocity:e[t],dampingRatio:d,onUpdate:m=>{if(a&&this.pswp.bgOpacity<1){let y=1-(u-m)/g;this.pswp.applyBgOpacity(mn(p+(1-p)*y,0,1))}r[t]=Math.floor(m),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){let{p1:e,dragAxis:i,prevP1:r,isMultitouch:s}=this.gestures,{currSlide:o,mainScroll:a}=this.pswp,l=e[t]-r[t],c=a.x+l;if(!l||!o)return!1;if(t==="x"&&!o.isPannable()&&!s)return a.moveTo(c,!0),!0;let{bounds:u}=o,d=o.pan[t]+l;if(this.pswp.options.allowPanToNext&&i==="x"&&t==="x"&&!s){let p=a.getCurrSlideX(),g=a.x-p,m=l>0,y=!m;if(d>u.min[t]&&m){if(u.min[t]<=this.startPan[t])return a.moveTo(c,!0),!0;this._setPanWithFriction(t,d)}else if(d<u.max[t]&&y){if(this.startPan[t]<=u.max[t])return a.moveTo(c,!0),!0;this._setPanWithFriction(t,d)}else if(g!==0){if(g>0)return a.moveTo(Math.max(c,p),!0),!0;if(g<0)return a.moveTo(Math.min(c,p),!0),!0}else this._setPanWithFriction(t,d)}else t==="y"?!a.isShifted()&&u.min.y!==u.max.y&&this._setPanWithFriction(t,d):this._setPanWithFriction(t,d);return!1}_getVerticalDragRatio(t){var e,i;return(t-((e=(i=this.pswp.currSlide)===null||i===void 0?void 0:i.bounds.center.y)!==null&&e!==void 0?e:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,e,i){let{currSlide:r}=this.pswp;if(!r)return;let{pan:s,bounds:o}=r;if(o.correctPan(t,e)!==e||i){let l=Math.round(e-s[t]);s[t]+=l*(i||_u)}else s[t]=e}},Cu=.05,Eu=.15;function Fa(n,t,e){return n.x=(t.x+e.x)/2,n.y=(t.y+e.y)/2,n}var hs=class{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){let{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,Lt(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){let{p1:t,startP1:e,p2:i,startP2:r,pswp:s}=this.gestures,{currSlide:o}=s;if(!o)return;let a=o.zoomLevels.min,l=o.zoomLevels.max;if(!o.isZoomable()||s.mainScroll.isShifted())return;Fa(this._startZoomPoint,e,r),Fa(this._zoomPoint,t,i);let c=1/os(e,r)*os(t,i)*this._startZoomLevel;if(c>o.zoomLevels.initial+o.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),c<a)if(s.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=o.zoomLevels.initial){let u=1-(a-c)/(a/1.2);s.dispatch("pinchClose",{bgOpacity:u}).defaultPrevented||s.applyBgOpacity(u)}else c=a-(a-c)*Eu;else c>l&&(c=l+(c-l)*Cu);o.pan.x=this._calculatePanForZoomLevel("x",c),o.pan.y=this._calculatePanForZoomLevel("y",c),o.setZoomLevel(c),o.applyCurrentZoomPan()}end(){let{pswp:t}=this.gestures,{currSlide:e}=t;(!e||e.currZoomLevel<e.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,e){let i=e/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*i}correctZoomPan(t){let{pswp:e}=this.gestures,{currSlide:i}=e;if(!(i!=null&&i.isZoomable()))return;this._zoomPoint.x===0&&(t=!0);let r=i.currZoomLevel,s,o=!0;r<i.zoomLevels.initial?s=i.zoomLevels.initial:r>i.zoomLevels.max?s=i.zoomLevels.max:(o=!1,s=r);let a=e.bgOpacity,l=e.bgOpacity<1,c=Lt({x:0,y:0},i.pan),u=Lt({x:0,y:0},c);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=r,Lt(this._startPan,c)),o&&(u={x:this._calculatePanForZoomLevel("x",s),y:this._calculatePanForZoomLevel("y",s)}),i.setZoomLevel(s),u={x:i.bounds.correctPan("x",u.x),y:i.bounds.correctPan("y",u.y)},i.setZoomLevel(r);let d=!pn(u,c);if(!d&&!o&&!l){i._setResolution(s),i.applyCurrentZoomPan();return}e.animations.stopAllPan(),e.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:p=>{if(p/=1e3,d||o){if(d&&(i.pan.x=c.x+(u.x-c.x)*p,i.pan.y=c.y+(u.y-c.y)*p),o){let g=r+(s-r)*p;i.setZoomLevel(g)}i.applyCurrentZoomPan()}l&&e.bgOpacity<1&&e.applyBgOpacity(mn(a+(1-a)*p,0,1))},onComplete:()=>{i._setResolution(s),i.applyCurrentZoomPan()}})}};function Ra(n){return!!n.target.closest(".pswp__container")}var ps=class{constructor(t){this.gestures=t}click(t,e){let i=e.target.classList,r=i.contains("pswp__img"),s=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");r?this._doClickOrTapAction("imageClick",t,e):s&&this._doClickOrTapAction("bgClick",t,e)}tap(t,e){Ra(e)&&this._doClickOrTapAction("tap",t,e)}doubleTap(t,e){Ra(e)&&this._doClickOrTapAction("doubleTap",t,e)}_doClickOrTapAction(t,e,i){var r;let{pswp:s}=this.gestures,{currSlide:o}=s,a=t+"Action",l=s.options[a];if(!s.dispatch(a,{point:e,originalEvent:i}).defaultPrevented){if(typeof l=="function"){l.call(s,e,i);return}switch(l){case"close":case"next":s[l]();break;case"zoom":o?.toggleZoom(e);break;case"zoom-or-close":o!=null&&o.isZoomable()&&o.zoomLevels.secondary!==o.zoomLevels.initial?o.toggleZoom(e):s.options.clickToCloseNonZoomable&&s.close();break;case"toggle-controls":(r=this.gestures.pswp.element)===null||r===void 0||r.classList.toggle("pswp--ui-visible");break}}}},Iu=10,Pu=300,Lu=25,fs=class{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new ds(this),this.zoomLevels=new hs(this),this.tapHandler=new ps(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,e,i,r){let{pswp:s}=this,{events:o}=s,a=r?t+r:"";o.add(s.scrollWrap,t+e,this.onPointerDown.bind(this)),o.add(window,t+"move",this.onPointerMove.bind(this)),o.add(window,t+i,this.onPointerUp.bind(this)),a&&o.add(s.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(t){let e=t.type==="mousedown"||t.pointerType==="mouse";if(e&&t.button>0)return;let{pswp:i}=this;if(!i.opener.isOpen){t.preventDefault();return}i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(e&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),this._numActivePoints===1&&(this.dragAxis=null,Lt(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1)}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===1&&!this.isDragging?(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,Lt(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop())):this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop())))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===0&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),this._numActivePoints===1&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?pn(this.p1,this.prevP1)||this.drag.change():(!pn(this.p1,this.prevP1)||!pn(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){let e=Date.now(),i=e-this._intervalTime;i<50&&!t||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=e,Lt(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){let{mainScroll:e}=this.pswp;if(e.isShifted()){e.moveIndexBy(0,!0);return}if(t.type.indexOf("cancel")>0)return;if(t.type==="mouseup"||t.pointerType==="mouse"){this.tapHandler.click(this.startP1,t);return}let i=this.pswp.options.doubleTapAction?Pu:0;this._tapTimer?(this._clearTapTimer(),os(this._lastStartP1,this.startP1)<Lu&&this.tapHandler.doubleTap(this.startP1,t)):(Lt(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,e){let i=this.p1[t]-this._intervalP1[t];return Math.abs(i)>1&&e>5?i/e:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,e){this.pswp.applyFilters("preventPointerEvent",!0,t,e)&&t.preventDefault()}_updatePoints(t,e){if(this._pointerEventEnabled){let i=t,r=this._ongoingPointers.findIndex(s=>s.id===i.pointerId);e==="up"&&r>-1?this._ongoingPointers.splice(r,1):e==="down"&&r===-1?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):r>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[r]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&Lt(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&Lt(this.p2,this._ongoingPointers[1])}else{let i=t;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),e==="up"?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){Lt(this.prevP1,this.p1),Lt(this.prevP2,this.p2)}_updateStartPoints(){Lt(this.startP1,this.p1),Lt(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{let t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(t!==0){let e=t>0?"x":"y";Math.abs(this.p1[e]-this.startP1[e])>=Iu&&(this.dragAxis=e)}}}_convertEventPosToPoint(t,e){return e.x=t.pageX-this.pswp.offset.x,e.y=t.pageY-this.pswp.offset.y,"pointerId"in t?e.id=t.pointerId:t.identifier!==void 0&&(e.id=t.identifier),e}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}},Mu=.35,ms=class{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){let{pswp:e}=this,i=Math.round(e.viewportSize.x+e.viewportSize.x*e.options.spacing),r=i!==this.slideWidth;r&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((s,o)=>{r&&ei(s.el,(o+this._containerShiftIndex)*this.slideWidth),t&&s.slide&&s.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){let e=se("pswp__item","div",this.pswp.container);e.setAttribute("role","group"),e.setAttribute("aria-roledescription","slide"),e.setAttribute("aria-hidden","true"),e.style.display=t===1?"block":"none",this.itemHolders.push({el:e})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,e,i){let{pswp:r}=this,s=r.potentialIndex+t,o=r.getNumItems();if(r.canLoop()){s=r.getLoopedIndex(s);let l=(t+o)%o;l<=o/2?t=l:t=l-o}else s<0?s=0:s>=o&&(s=o-1),t=s-r.potentialIndex;r.potentialIndex=s,this._currPositionIndex-=t,r.animations.stopMainScroll();let a=this.getCurrSlideX();if(!e)this.moveTo(a),this.updateCurrItem();else{r.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:c=>{this.moveTo(c)},onComplete:()=>{this.updateCurrItem(),r.appendHeavy()}});let l=r.potentialIndex-r.currIndex;if(r.canLoop()){let c=(l+o)%o;c<=o/2?l=c:l=c-o}Math.abs(l)>1&&this.updateCurrItem()}return!!t}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t;let{pswp:e}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,e.currIndex=e.potentialIndex;let r=Math.abs(i),s;r>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),r=3,this.itemHolders.forEach(o=>{var a;(a=o.slide)===null||a===void 0||a.destroy(),o.slide=void 0}));for(let o=0;o<r;o++)i>0?(s=this.itemHolders.shift(),s&&(this.itemHolders[2]=s,this._containerShiftIndex++,ei(s.el,(this._containerShiftIndex+2)*this.slideWidth),e.setContent(s,e.currIndex-r+o+2))):(s=this.itemHolders.pop(),s&&(this.itemHolders.unshift(s),this._containerShiftIndex--,ei(s.el,this._containerShiftIndex*this.slideWidth),e.setContent(s,e.currIndex+r-o-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),e.animations.stopAllPan(),this.itemHolders.forEach((o,a)=>{o.slide&&o.slide.setIsActive(a===1)}),e.currSlide=(t=this.itemHolders[1])===null||t===void 0?void 0:t.slide,e.contentLoader.updateLazy(i),e.currSlide&&e.currSlide.applyCurrentZoomPan(),e.dispatch("change")}moveTo(t,e){if(!this.pswp.canLoop()&&e){let i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;let r=Math.round(t-this.x);(i<0&&r>0||i>=this.pswp.getNumItems()-1&&r<0)&&(t=this.x+r*Mu)}this.x=t,this.pswp.container&&ei(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:e??!1})}},ku={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},ti=(n,t)=>t?n:ku[n],gs=class{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});let e=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&e&&this._wasFocused&&e.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){let{pswp:e}=this;if(e.dispatch("keydown",{originalEvent:t}).defaultPrevented||xu(t))return;let i,r,s=!1,o="key"in t;switch(o?t.key:t.keyCode){case ti("Escape",o):e.options.escKey&&(i="close");break;case ti("z",o):i="toggleZoom";break;case ti("ArrowLeft",o):r="x";break;case ti("ArrowUp",o):r="y";break;case ti("ArrowRight",o):r="x",s=!0;break;case ti("ArrowDown",o):s=!0,r="y";break;case ti("Tab",o):this._focusRoot();break}if(r){t.preventDefault();let{currSlide:a}=e;e.options.arrowKeys&&r==="x"&&e.getNumItems()>1?i=s?"next":"prev":a&&a.currZoomLevel>a.zoomLevels.fit&&(a.pan[r]+=s?-80:80,a.panTo(a.pan.x,a.pan.y))}i&&(t.preventDefault(),e[i]())}_onFocusIn(t){let{template:e}=this.pswp;e&&document!==t.target&&e!==t.target&&!e.contains(t.target)&&e.focus()}},Du="cubic-bezier(.4,0,.22,1)",ys=class{constructor(t){var e;this.props=t;let{target:i,onComplete:r,transform:s,onFinish:o=()=>{},duration:a=333,easing:l=Du}=t;this.onFinish=o;let c=s?"transform":"opacity",u=(e=t[c])!==null&&e!==void 0?e:"";this._target=i,this._onComplete=r,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{Na(i,c,a,l),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},a+500),i.style[c]=u},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),bu(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}},Vu=12,Ou=.75,vs=class{constructor(t,e,i){this.velocity=t*1e3,this._dampingRatio=e||Ou,this._naturalFrequency=i||Vu,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,e){let i=0,r;e/=1e3;let s=Math.E**(-this._dampingRatio*this._naturalFrequency*e);if(this._dampingRatio===1)r=this.velocity+this._naturalFrequency*t,i=(t+r*e)*s,this.velocity=i*-this._naturalFrequency+r*s;else if(this._dampingRatio<1){r=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);let o=Math.cos(this._dampedFrequency*e),a=Math.sin(this._dampedFrequency*e);i=s*(t*o+r*a),this.velocity=i*-this._naturalFrequency*this._dampingRatio+s*(-this._dampedFrequency*t*a+this._dampedFrequency*r*o)}return i}},bs=class{constructor(t){this.props=t,this._raf=0;let{start:e,end:i,velocity:r,onUpdate:s,onComplete:o,onFinish:a=()=>{},dampingRatio:l,naturalFrequency:c}=t;this.onFinish=a;let u=new vs(r,l,c),d=Date.now(),p=e-i,g=()=>{this._raf&&(p=u.easeFrame(p,Date.now()-d),Math.abs(p)<1&&Math.abs(u.velocity)<50?(s(i),o&&o(),this.onFinish()):(d=Date.now(),s(p+i),this._raf=requestAnimationFrame(g)))};this._raf=requestAnimationFrame(g)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}},Ss=class{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,e){let i=e?new bs(t):new ys(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(t){t.destroy();let e=this.activeAnimations.indexOf(t);e>-1&&this.activeAnimations.splice(e,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isPan?(t.destroy(),!1):!0)}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isMainScroll?(t.destroy(),!1):!0)}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}},xs=class{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();let{currSlide:e}=this.pswp,{deltaX:i,deltaY:r}=t;if(e&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(e.isZoomable()){let s=-r;t.deltaMode===1?s*=.05:s*=t.deltaMode?1:.002,s=2**s;let o=e.currZoomLevel*s;e.zoomTo(o,{x:t.clientX,y:t.clientY})}}else e.isPannable()&&(t.deltaMode===1&&(i*=18,r*=18),e.panTo(e.pan.x-i,e.pan.y-r))}};function Fu(n){if(typeof n=="string")return n;if(!n||!n.isCustomSVG)return"";let t=n,e='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return e=e.split("%d").join(t.size||32),t.outlineID&&(e+='<use class="pswp__icn-shadow" xlink:href="#'+t.outlineID+'"/>'),e+=t.inner,e+="</svg>",e}var ws=class{constructor(t,e){var i;let r=e.name||e.className,s=e.html;if(t.options[r]===!1)return;typeof t.options[r+"SVG"]=="string"&&(s=t.options[r+"SVG"]),t.dispatch("uiElementCreate",{data:e});let o="";e.isButton?(o+="pswp__button ",o+=e.className||`pswp__button--${e.name}`):o+=e.className||`pswp__${e.name}`;let a=e.isButton?e.tagName||"button":e.tagName||"div";a=a.toLowerCase();let l=se(o,a);if(e.isButton){a==="button"&&(l.type="button");let{title:d}=e,{ariaLabel:p}=e;typeof t.options[r+"Title"]=="string"&&(d=t.options[r+"Title"]),d&&(l.title=d);let g=p||d;g&&l.setAttribute("aria-label",g)}l.innerHTML=Fu(s),e.onInit&&e.onInit(l,t),e.onClick&&(l.onclick=d=>{typeof e.onClick=="string"?t[e.onClick]():typeof e.onClick=="function"&&e.onClick(d,l,t)});let c=e.appendTo||"bar",u=t.element;c==="bar"?(t.topBar||(t.topBar=se("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),u=t.topBar):(l.classList.add("pswp__hide-on-close"),c==="wrapper"&&(u=t.scrollWrap)),(i=u)===null||i===void 0||i.appendChild(t.applyFilters("uiElement",l,e))}};function Wa(n,t,e){n.classList.add("pswp__button--arrow"),n.setAttribute("aria-controls","pswp__items"),t.on("change",()=>{t.options.loop||(e?n.disabled=!(t.currIndex<t.getNumItems()-1):n.disabled=!(t.currIndex>0))})}var Ru={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:Wa},qu={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(n,t)=>{Wa(n,t,!0)}},Bu={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},Nu={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},zu={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(n,t)=>{let e,i=null,r=(a,l)=>{n.classList.toggle("pswp__preloader--"+a,l)},s=a=>{e!==a&&(e=a,r("active",a))},o=()=>{var a;if(!((a=t.currSlide)!==null&&a!==void 0&&a.content.isLoading())){s(!1),i&&(clearTimeout(i),i=null);return}i||(i=setTimeout(()=>{var l;s(!!(!((l=t.currSlide)===null||l===void 0)&&l.content.isLoading())),i=null},t.options.preloaderDelay))};t.on("change",o),t.on("loadComplete",a=>{t.currSlide===a.slide&&o()}),t.ui&&(t.ui.updatePreloaderVisibility=o)}},$u={name:"counter",order:5,onInit:(n,t)=>{t.on("change",()=>{n.innerText=t.currIndex+1+t.options.indexIndicatorSep+t.getNumItems()})}};function qa(n,t){n.classList.toggle("pswp--zoomed-in",t)}var _s=class{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){let{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[Bu,Ru,qu,Nu,zu,$u],t.dispatch("uiRegister"),this.uiElementsData.sort((e,i)=>(e.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(e=>{this.registerElement(e)}),t.on("change",()=>{var e;(e=t.element)===null||e===void 0||e.classList.toggle("pswp--one-slide",t.getNumItems()===1)}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new ws(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){let{template:t,currSlide:e,options:i}=this.pswp;if(this.pswp.opener.isClosing||!t||!e)return;let{currZoomLevel:r}=e;if(this.pswp.opener.isOpen||(r=e.zoomLevels.initial),r===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=r;let s=e.zoomLevels.initial-e.zoomLevels.secondary;if(Math.abs(s)<.01||!e.isZoomable()){qa(t,!1),t.classList.remove("pswp--zoom-allowed");return}t.classList.add("pswp--zoom-allowed");let o=r===e.zoomLevels.initial?e.zoomLevels.secondary:e.zoomLevels.initial;qa(t,o<=r),(i.imageClickAction==="zoom"||i.imageClickAction==="zoom-or-close")&&t.classList.add("pswp--cl
1ick-to-zoom")}};function Hu(n){let t=n.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width}}function Wu(n,t,e){let i=n.getBoundingClientRect(),r=i.width/t,s=i.height/e,o=r>s?r:s,a=(i.width-t*o)/2,l=(i.height-e*o)/2,c={x:i.left+a,y:i.top+l,w:t*o};return c.innerRect={w:i.width,h:i.height,x:a,y:l},c}function Uu(n,t,e){let i=e.dispatch("thumbBounds",{index:n,itemData:t,instance:e});if(i.thumbBounds)return i.thumbBounds;let{element:r}=t,s,o;if(r&&e.options.thumbSelector!==!1){let a=e.options.thumbSelector||"img";o=r.matches(a)?r:r.querySelector(a)}return o=e.applyFilters("thumbEl",o,t,n),o&&(t.thumbCropped?s=Wu(o,t.width||t.w||0,t.height||t.h||0):s=Hu(o)),e.applyFilters("thumbBounds",s,t,n)}var Ts=class{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}},As=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var r,s,o;this._filters[t]||(this._filters[t]=[]),(r=this._filters[t])===null||r===void 0||r.push({fn:e,priority:i}),(s=this._filters[t])===null||s===void 0||s.sort((a,l)=>a.priority-l.priority),(o=this.pswp)===null||o===void 0||o.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(r=>{e[0]=r.fn.apply(this,e)}),e[0]}on(t,e){var i,r;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(e),(r=this.pswp)===null||r===void 0||r.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(r=>e!==r)),(i=this.pswp)===null||i===void 0||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);let r=new Ts(t,e);return(i=this._listeners[t])===null||i===void 0||i.forEach(s=>{s.call(this,r)}),r}},Cs=class{constructor(t,e){if(this.element=se("pswp__img pswp__img--placeholder",t?"img":"div",e),t){let i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&(this.element.tagName==="IMG"?(as(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=fn(0,0,t/250)):as(this.element,t,e))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}},Es=class{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=pe.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){let i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{let i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new Cs(i,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=se("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=se("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;let r=this.element;this.updateSrcsetSizes(),this.data.srcset&&(r.srcset=this.data.srcset),r.src=(e=this.data.src)!==null&&e!==void 0?e:"",r.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=pe.LOADING,r.complete?this.onLoaded():(r.onload=()=>{this.onLoaded()},r.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=pe.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===pe.LOADED||this.state===pe.ERROR)&&this.removePlaceholder())}onError(){this.state=pe.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,
vendor: 11,802 bytes, line 1
1content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===pe.LOADING,this)}isError(){return this.state===pe.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(as(this.element,t,e),this.isImageContent()&&!this.isError()))){let i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==pe.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;let t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,e;let i=se("pswp__error-msg","div");i.innerText=(t=(e=this.instance.options)===null||e===void 0?void 0:e.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=se("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===pe.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;let t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||ka())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!ka()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===pe.LOADED||this.state===pe.ERROR)&&this.removePlaceholder()))}},Zu=5;function Ua(n,t,e){let i=t.createContentFromData(n,e),r,{options:s}=t;if(s){r=new ar(s,n,-1);let o;t.pswp?o=t.pswp.viewportSize:o=$a(s,t);let a=Ha(s,o,n,e);r.update(i.width,i.height,a)}return i.lazyLoad(),r&&i.setDisplayedSize(Math.ceil(i.width*r.initial),Math.ceil(i.height*r.initial)),i}function Gu(n,t){let e=t.getItemData(n);if(!t.dispatch("lazyLoadSlide",{index:n,itemData:e}).defaultPrevented)return Ua(e,t,n)}var Is=class{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,Zu),this._cachedItems=[]}updateLazy(t){let{pswp:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;let{preload:i}=e.options,r=t===void 0?!0:t>=0,s;for(s=0;s<=i[1];s++)this.loadSlideByIndex(e.currIndex+(r?s:-s));for(s=1;s<=i[0];s++)this.loadSlideByIndex(e.currIndex+(r?-s:s))}loadSlideByIndex(t){let e=this.pswp.getLoopedIndex(t),i=this.getContentByIndex(e);i||(i=Gu(e,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let e=this.getContentByIndex(t.index);return e||(e=this.pswp.createContentFromData(t.data,t.index),this.addToCache(e)),e.setSlide(t),e}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){let e=this._cachedItems.findIndex(i=>!i.isAttached&&!i.hasSlide);e!==-1&&this._cachedItems.splice(e,1)[0].destroy()}}removeByIndex(t){let e=this._cachedItems.findIndex(i=>i.index===t);e!==-1&&this._cachedItems.splice(e,1)}getContentByIndex(t){return this._cachedItems.find(e=>e.index===t)}destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}},Ps=class extends As{getNumItems(){var t;let e=0,i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(e=i.items.length));let r=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",r.numItems,i)}createContentFromData(t,e){return new Es(t,this,e)}getItemData(t){var e;let i=(e=this.options)===null||e===void 0?void 0:e.dataSource,r={};Array.isArray(i)?r=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),r=i.items[t]);let s=r;s instanceof Element&&(s=this._domElementToItemData(s));let o=this.dispatch("itemData",{itemData:s||{},index:t});return this.applyFilters("itemData",o.itemData,t)}_getGalleryDOMElements(t){var e,i;return(e=this.options)!==null&&e!==void 0&&e.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?wu(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){let e={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);let s=t.querySelector("img");if(s){var r;e.msrc=s.currentSrc||s.src,e.alt=(r=s.getAttribute("alt"))!==null&&r!==void 0?r:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return Ua(t,this,e)}},dn=.003,Ls=class{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;let t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){let t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){let{pswp:t}=this,e=this.pswp.currSlide,{options:i}=t;if(i.showHideAnimationType==="fade"?(i.showHideOpacity=!0,this._thumbBounds=void 0):i.showHideAnimationType==="none"?(i.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=e?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&e?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),!this._animateZoom)this._animateRootOpacity=!0,this.isOpening&&e&&(e.zoomAndPanToInitial(),e.applyCurrentZoomPan());else{var r;this._animateRootOpacity=(r=i.showHideOpacity)!==null&&r!==void 0?r:!1}if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>dn,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation){this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,this.isOpening&&(t.element&&(t.element.style.opacity=String(dn)),t.applyBgOpacity(1));return}if(this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect){var s;this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=(s=this.pswp.currSlide)===null||s===void 0?void 0:s.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")}else this._croppedZoom=!1;this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(dn)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(dn)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(dn)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&t.mainScroll.x!==0&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&this._placeholder.tagName==="IMG"?new Promise(t=>{let e=!1,i=!0;Su(this._placeholder).finally(()=>{e=!0,i||t(!0)}),setTimeout(()=>{i=!1,e&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){var t,e;(t=this.pswp.element)===null||t===void 0||t.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),(e=this.pswp.element)===null||e===void 0||e.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){let{pswp:t}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)t.destroy();else if(this.isOpen){var e;this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),(e=t.currSlide)===null||e===void 0||e.applyCurrentZoomPan()}}_animateToOpenState(){let{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,
10,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){let{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;let{pswp:e}=this,{innerRect:i}=this._thumbBounds,{currSlide:r,viewportSize:s}=e;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){let o=-s.x+(this._thumbBounds.x-i.x)+i.w,a=-s.y+(this._thumbBounds.y-i.y)+i.h,l=s.x-i.w,c=s.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",fn(o,a)),this._animateTo(this._cropContainer2,"transform",fn(l,c))):(ei(this._cropContainer1,o,a),ei(this._cropContainer2,l,c))}r&&(Lt(r.pan,i||this._thumbBounds),r.currZoomLevel=this._thumbBounds.w/r.width,t?this._animateTo(r.container,"transform",r.getCurrentTransform()):r.applyCurrentZoomPan())}_animateTo(t,e,i){if(!this._duration){t.style[e]=i;return}let{animations:r}=this.pswp,s={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{r.activeAnimations.length||this._onAnimationComplete()},target:t};s[e]=i,r.startTransition(s)}},Ku={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"},lr=class extends Ps{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new ls,this.animations=new Ss,this.mainScroll=new ms(this),this.gestures=new fs(this),this.opener=new Ls(this),this.keyboard=new gs(this),this.contentLoader=new Is(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new xs(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{let{itemHolders:e}=this.mainScroll;e[0]&&(e[0].el.style.display="block",this.setContent(e[0],this.currIndex-1)),e[2]&&(e[2].el.style.display="block",this.setContent(e[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){let e=this.getNumItems();return this.options.loop&&(t>e-1&&(t-=e),t<0&&(t+=e)),mn(t,0,e-1)}
1appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{var e;(e=t.slide)===null||e===void 0||e.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){var e;(e=this.currSlide)===null||e===void 0||e.zoomTo(...t)}toggleZoom(){var t;(t=this.currSlide)===null||t===void 0||t.toggleZoom()}close(){!this.opener.isOpen||this.isDestroying||(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var t;if(!this.isDestroying){this.options.showHideAnimationType="none",this.close();return}this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),(t=this.element)===null||t===void 0||t.remove(),this.mainScroll.itemHolders.forEach(e=>{var i;(i=e.slide)===null||i===void 0||i.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((e,i)=>{var r,s;let o=((r=(s=this.currSlide)===null||s===void 0?void 0:s.index)!==null&&r!==void 0?r:0)-1+i;if(this.canLoop()&&(o=this.getLoopedIndex(o)),o===t&&(this.setContent(e,t,!0),i===1)){var a;this.currSlide=e.slide,(a=e.slide)===null||a===void 0||a.setIsActive(!0)}}),this.dispatch("change")}setContent(t,e,i){if(this.canLoop()&&(e=this.getLoopedIndex(e)),t.slide){if(t.slide.index===e&&!i)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(e<0||e>=this.getNumItems()))return;let r=this.getItemData(e);t.slide=new us(r,e,this),e===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;let e=$a(this.options,this);!t&&pn(e,this._prevViewportSize)||(Lt(this._prevViewportSize,e),this.dispatch("beforeResize"),Lt(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){if(!this.hasMouse){var t;this.hasMouse=!0,(t=this.element)===null||t===void 0||t.classList.add("pswp--has_mouse")}}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,e){this.offset.x=t,this.offset.y=e,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=se("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=se("pswp__bg","div",this.element),this.scrollWrap=se("pswp__scroll-wrap","section",this.element),this.container=se("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new _s(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return Uu(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...Ku,...t}}},Ms={in:"cubic-bezier(0.6, -0.28, 0.7, 1)",out:"cubic-bezier(0.3, 0, 0.32, 1.275)",inOut:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},Z=null;function gn(){if(Z){try{Z.destroy()}catch{}Z=null}let n=document.querySelectorAll(".product-image-zoom");if(n.length===0)return;let t=[],e=new Map;function i(a){let l=window.getComputedStyle(a);if(l.display==="none"||l.visibility==="hidden")return!1;let c=a.closest("[data-media-carousel-container], [data-media-grid-container]");if(c){let d=window.getComputedStyle(c);if(d.display==="none"||d.visibility==="hidden")return!1}let u=a.parentElement;for(;u&&u!==document.body;){let d=window.getComputedStyle(u);if(d.display==="none"||d.visibility==="hidden")return!1;u=u.parentElement}return!0}if(n.forEach((a,l)=>{if(!i(a))return;let c=a.getAttribute("data-pswp-src"),u=a.getAttribute("data-pswp-width"),d=a.getAttribute("data-pswp-height"),p=a.getAttribute("data-pswp-alt");if(c){let g=t.length,m=a.querySelector("img"),y=m?m.src||m.currentSrc||m.getAttribute("src"):null,v={src:c,width:parseInt(u)||parseInt(a.getAttribute("data-pswp-w"))||2048,height:parseInt(d)||parseInt(a.getAttribute("data-pswp-h"))||2048,w:parseInt(u)||parseInt(a.getAttribute("data-pswp-w"))||2048,h:parseInt(d)||parseInt(a.getAttribute("data-pswp-h"))||2048,alt:p||""};v.msrc=y||c,t.push(v),e.set(a,g)}}),t.length===0)return;Z=new or({dataSource:t,showHideAnimationType:"zoom",showAnimationDuration:800,hideAnimationDuration:800,pswpModule:lr,preload:[1,2]});let r=new Map;function s(a){if(!a)return null;let l=a.querySelector("img")||a;if(!l)return null;
1let c=l.getBoundingClientRect();return{x:c.left,y:c.top+window.pageYOffset,w:c.width}}Z.on("initialLayout",()=>{if(Z.pswp){let a=Z.pswp.currIndex,l=Array.from(n).find(c=>e.get(c)===a);if(l){let c=s(l);c&&(r.set(a,c),Z.pswp._initialThumbBounds=c)}if(Z.pswp.currSlide){Z.pswp.currSlide.load();let c=Z.pswp.currSlide;if(c.content&&c.content.element){let u=c.content.element;u&&u.tagName==="IMG"&&u.complete&&u.naturalWidth>0&&(u.style.display="block",u.style.opacity="1")}}}}),Z.on("change",()=>{if(Z.pswp){let a=Z.pswp.currIndex,l=Array.from(n).find(c=>e.get(c)===a);if(l){let c=s(l);c&&(r.set(a,c),Z.pswp._initialThumbBounds=c)}}}),Z.on("thumbBounds",a=>{if(Z.pswp&&!a.thumbBounds){let l=Z.pswp.currIndex,c=r.get(l);if(c)a.thumbBounds=c;else{let u=Array.from(n).find(p=>e.get(p)===l),d=s(u);d&&(a.thumbBounds=d,r.set(l,d))}}}),Z.on("firstUpdate",()=>{Z.pswp&&(Z.pswp.options.easing=Ms.out)}),Z.on("initialZoomIn",()=>{if(Z.pswp&&Z.pswp.currSlide){let a=Z.pswp.currSlide;if(a.content&&a.content.element){let l=a.content.element;l&&l.tagName==="IMG"&&l.complete&&l.naturalWidth>0&&(l.style.display="block",l.style.opacity="1")}}}),Z.on("initialZoomInEnd",()=>{Z.pswp&&(Z.pswp.options.easing=Ms.inOut)});function o(a){return new Promise((l,c)=>{let u=new Image;u.onload=()=>l(u),u.onerror=c,u.src=a})}Z.on("beforeOpen",()=>{if(Z.pswp&&Z.pswp.currSlide){let a=Z.pswp.currSlide;if(a.content&&a.content.element){let l=a.content.element;l&&l.tagName==="IMG"&&(l.style.display="block",l.style.opacity="1")}}}),Z.on("loadComplete",({slide:a})=>{if(a&&a.content){let l=a.content.element;l&&l.tagName==="IMG"&&(l.style.display="block",l.style.opacity="1")}}),Z.on("closingAnimationStart",()=>{if(Z.pswp){let a=Z.pswp.currIndex,l=r.get(a);if(!l){let c=Array.from(n).find(u=>e.get(u)===a);l=s(c),l&&r.set(a,l)}l&&(Z.pswp._initialThumbBounds=l)}}),Z.on("close",()=>{Z.pswp&&(Z.pswp.options.easing=Ms.in),r.clear()}),n.forEach(a=>{if(!e.has(a))return;let l=a._pswpClickHandler;l&&(a.removeEventListener("click",l),a.removeEventListener("keydown",a._pswpKeydownHandler)),a.hasAttribute("role")||(a.setAttribute("role","button"),a.setAttribute("tabindex","0")),a.style.cursor="zoom-in",a._pswpClickHandler=async c=>{if(c.target.closest("button"))return;c.preventDefault(),c.stopPropagation();let d=e.get(a);if(d!==void 0&&Z){let p=s(a);p&&r.set(d,p);let g=t[d];if(g&&g.src)try{await o(g.src)}catch(m){console.warn("Failed to preload image:",m)}Z.loadAndOpen(d)}},a._pswpKeydownHandler=c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),a._pswpClickHandler(c))},a.addEventListener("click",a._pswpClickHandler,{passive:!1}),a.addEventListener("keydown",a._pswpKeydownHandler)}),Z.init()}function Ds(){gn()}window.initPhotoSwipe=gn,window.reinitPhotoSwipe=Ds,window.initGalleryPhotoSwipe=gn,window.initCarouselPhotoSwipe=gn,window.reinitGalleryPhotoSwipe=Ds,window.reinitCarouselPhotoSwipe=Ds;var Za=window.innerWidth>=768?"desktop":"mobile",ks=null;function ju(){ks&&clearTimeout(ks),ks=setTimeout(()=>{let n=window.innerWidth>=768?"desktop":"mobile";n!==Za&&(Za=n,document.querySelector(".product-image-zoom")&&gn())},150)}window.addEventListener("resize",ju,{passive:!0});function Ga(){requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.querySelector(".product-image-zoom")&&window.initPhotoSwipe()})})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Ga):Ga(),(function(){"use strict";if(window.__productMediaGalleryVariantUpdateInit)return;window.__productMediaGalleryVariantUpdateInit=!0;class n{constructor(){this.mediaGalleries=[],this.productDataCache=new Map,this.placeholderSrc="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",this.init()}init(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>this.setup()):this.setup()}setup(){this.mediaGalleries=Array.from(document.querySelectorAll("[data-product-media-gallery]")),this.mediaGalleries.length!==0&&document.addEventListener("variant:change",e=>this.handleVariantChange(e))}async handleVariantChange(e){let i=e.detail?.variant;if(i)for(let r of this.mediaGalleries)await this.updateMediaGallery(r,i)}async updateMediaGallery(e,i){let r=e.dataset.productHandle;if(r)try{let s=await this.getProductData(r);if(!s?.variants)return;let o=s.variants.find(p=>String(p.id)===String(i.id));if(!o)return;let a=s.media||[];if(a.length===0)return;let l=e.dataset.hideVariants==="true",c=this.sortMedia(a,o,s.variants,l),u=String(o.id),d=e.querySelector("[data-media-carousel-container]");if(d)await this.updateCarousel(d,c,o,u);else{let p=e.querySelector("[data-media-grid-container]");p&&await this.updateGridFromServer(e,p,o,u)}}catch{}}sortMedia(e,i,r,s){let o=[],a=i?.featured_media?.id;if(a){let l=e.find(c=>c.id===a);l&&o.push(l)}for(let l of e)a&&l.id===a||s&&r.some(u=>u.id!==i.id&&u.featured_media?.id===l.id)||o.push(l);return o}async updateCarousel(e,i,r){let s=e.querySelector("[data-product-carou
1sel]");if(!s)return;let o=s.id||"product-media-carousel",a=r?.featured_media?.id,l=a?Math.max(0,i.findIndex(u=>u.id===a)):0,c=String(r.id);await this.fetchAndUpdateCarouselHTML(e,i,o,l,c)}async fetchAndUpdateCarouselHTML(e,i,r,s,o){let a=e.closest("[data-product-media-gallery]"),l=a?.dataset.productHandle,c=a?.dataset.sectionId;if(!(!l||!o))try{let u;if(c){let y=await fetch(`${window.location.pathname}?section_id=${c}&variant=${o}`,{headers:{"X-Requested-With":"XMLHttpRequest"}});y.ok&&(u=await y.text())}if(!u){let y=await fetch(`/products/${l}?variant=${o}`,{headers:{"X-Requested-With":"XMLHttpRequest"}});if(!y.ok)throw new Error(`HTTP ${y.status}`);u=await y.text()}let p=new DOMParser().parseFromString(u,"text/html").querySelector("[data-product-media-gallery]");if(!p)return;let g=this.preserveThumbnailDimensions(a),m=this.preserveLoadedThumbnails(a);a.classList.add("updating-media-gallery"),a.innerHTML=p.innerHTML,this.restoreThumbnailDimensions(a,g),this.restoreLoadedThumbnails(a,m),requestAnimationFrame(()=>a.classList.remove("updating-media-gallery")),window.reinitCarouselPhotoSwipe&&setTimeout(()=>{window.reinitCarouselPhotoSwipe()},200),window.Alpine&&(window.Alpine.initTree(a),requestAnimationFrame(()=>{setTimeout(()=>{let y=a.querySelector("[data-media-carousel-container]");if(y){this.restoreThumbnailDimensions(a,g);let v=this.getAlpineComponent(y);v?.goTo?v.goTo(s+1):v?.emblaApi&&v.emblaApi.scrollTo(s),v?.syncThumbnailDimensions&&requestAnimationFrame(()=>{v.syncThumbnailDimensions()})}},100)}))}catch{this.reorderCarouselSlides(e,i,s)}}reorderCarouselSlides(e,i,r){let s=e.querySelector(".embla__viewport");if(!s)return;let o=s.querySelector(".embla__container");if(!o)return;let a=Array.from(o.querySelectorAll(".embla__slide"));if(a.length===0)return;let l=new Map;a.forEach(d=>{let p=this.extractMediaId(d.querySelector("img")?.src);p&&l.set(p,d)});let c=document.createDocumentFragment();i.forEach(d=>{let p=l.get(d.id);p&&c.appendChild(p)}),a.forEach(d=>{c.contains(d)||c.appendChild(d)}),o.innerHTML="",o.appendChild(c);let u=this.getAlpineComponent(e);u?.emblaApi&&(u.emblaApi.reInit(),setTimeout(()=>{u.goTo&&u.goTo(r+1)},50)),window.reinitCarouselPhotoSwipe&&setTimeout(()=>{window.reinitCarouselPhotoSwipe()},200)}async updateGridFromServer(e,i,r,s){let o=e.dataset.productHandle,a=e.dataset.sectionId;if(!(!o||!s))try{let l;if(a){let u=await fetch(`${window.location.pathname}?section_id=${a}&variant=${s}`,{headers:{"X-Requested-With":"XMLHttpRequest"}});u.ok&&(l=await u.text())}if(!l){let u=await fetch(`/products/${o}?variant=${s}`,{headers:{"X-Requested-With":"XMLHttpRequest"}});if(!u.ok)throw new Error(`HTTP ${u.status}`);l=await u.text()}let c=new DOMParser().parseFromString(l,"text/html").querySelector("[data-product-media-gallery]");if(c){let u=c.querySelector("[data-media-grid-container]");u&&(i.innerHTML=u.innerHTML,window.reinitGalleryPhotoSwipe&&setTimeout(()=>{window.reinitGalleryPhotoSwipe()},200))}}catch{}}preserveThumbnailDimensions(e){let i={vertical:null,horizontal:null},r=e.querySelector("[data-thumb-viewport]"),s=e.querySelector("[data-thumb-for]");if(r&&s){let o=s.getAttribute("data-thumb-container");if(o==="vertical"){let a=r.style.height||r.offsetHeight;a&&(typeof a=="string"?parseFloat(a)>0:a>0)&&(i.vertical=a)}else if(o==="horizontal"){let a=r.style.width||r.offsetWidth,l=s.closest(".w-full.max-w-4xl");a&&(typeof a=="string"?parseFloat(a)>0:a>0)&&(i.horizontal={viewportWidth:a,containerWidth:l?l.style.width||l.offsetWidth:null,containerMaxWidth:l?l.style.maxWidth||getComputedStyle(l).maxWidth:null})}}return i}restoreThumbnailDimensions(e,i){if(!i)return;let r=e.querySelector("[data-thumb-viewport]"),s=e.querySelector("[data-thumb-for]");if(!r||!s)return;let o=s.getAttribute("data-thumb-container");if(o==="vertical"&&i.vertical)r.style.transition="none",r.style.height=typeof i.vertical=="number"?i.vertical+"px":i.vertical,requestAnimationFrame(()=>{setTimeout(()=>{r&&(r.style.transition="")},50)});else if(o==="horizontal"&&i.horizontal){let a=s.closest(".w-full.max-w-4xl"),l=i.horizontal;a&&(a.style.transition="none",l.containerWidth&&(a.style.width=typeof l.containerWidth=="number"?l.containerWidth+"px":l.containerWidth),l.containerMaxWidth&&(a.style.maxWidth=typeof l.containerMaxWidth=="number"?l.containerMaxWidth+"px":l.containerMaxWidth)),r.style.transition="none",r.style.width=typeof l.viewportWidth=="number"?l.viewportWidth+"px":l.viewportWidth,requestAnimationFrame(()=>{setTimeout(()=>{a&&(a.style.transition=""),r&&(r.style.transition="")},50)})}}preserveLoadedThumbnails(e){let i=new Map;return e.querySelectorAll(".embla-thumbs__slide__button img").forEach(s=>{let o=s.src||s.getAttribute("src"),a=s.dataset.thumbSrc||o;if(o&&o!==this.placeholderSrc&&s.dataset.thumbLoaded==="true"){let l=a||o,c={src:o,loaded:!0};i.set(l,c),o!==l&&i.set(o,c);let u=this.extractMediaId(o);u&&i.set(`media_${u}`,c)}else a&&a!==this.placeholderSrc&&!i.has(a)&&i.set(a,{src:a,loaded:!1})}),i}restoreLoadedThumbnails(e,i){i?.size&&e.querySelectorAll(".embla-thumbs__slide__button img").forEach(s=>{let o=s.dataset.thumbSrc||s.src,a=s.src||s.getAttribute("src"),l=null;if(o&&o!==this.placeholderSrc&&(l=i.get(o),!l)){let c=this.normalizeUrl(o);if(c){for(let[u,d]of i.entries())if(this.normalizeUrl(u)===c){l=d;break}}}if(!l){let c=this.extractMediaId(o||a);if(c&&(l=i.get(`media_${c}`),!l)){for(let[u,d]of i.entries())if(this.extractMediaId(u)===c){l=d;break}}}l?.loaded&&(s.src=l.src,s.dataset.thumbLoaded="true",s.hasAttribute("data-thumb-src")&&s.removeAttribute("data-thumb-src"),s.loading="eager")})}extractMediaId(e){if(!e)return null;let i=e.match(/\/files\/(\d+)\//);return i?i[1]:null}normalizeUrl(e){if(!e||e===this.placeholderSrc)return null;try{return new URL(e,window.location.origin).pathname}catch{return e.split("?")[0].split("#")[0]}}getAlpineComponent(e){let i=e.querySelector('[x-data*="productCarousel"]');return!i||!window.Alpine?null:window.Alpine.$data(i)}async getProductData(e){if(this.productDataCache.has(e))return this.productDataCache.get(e);
1try{let i=await fetch(`/products/${e}.js`,{headers:{Accept:"application/json"}});if(!i.ok)throw new Error(`HTTP ${i.status}`);let r=await i.json();return this.productDataCache.set(e,r),r}catch{return null}}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>new n):new n})(),(()=>{if(typeof window>"u"||customElements.get("variant-selects"))return;class n extends HTMLElement{constructor(){super(),this.onOptionChange=this.onOptionChange.bind(this)}connectedCallback(){this.dataset.variantSelectsInitialized!=="true"&&(this.dataset.variantSelectsInitialized="true",document.readyState==="complete"||document.readyState==="interactive"?requestAnimationFrame(()=>this.setup()):document.addEventListener("DOMContentLoaded",()=>this.setup(),{once:!0}))}setup(e=0){this.setupInternal(e).catch(i=>{console.error("variant-selects: setup error",i)})}async setupInternal(e=0){if(this.formId=this.dataset.formId,this.form=this.getFormElement(),!this.form){if(e<5)requestAnimationFrame(()=>this.setupInternal(e+1));else if(this.form=this.createFormIfNeeded(),!this.form){console.warn("variant-selects: unable to locate or create product form",this.formId);return}}if(this.variantInput=this.form.querySelector('[name="id"]'),!this.variantInput){this.variantInput=document.createElement("input"),this.variantInput.type="hidden",this.variantInput.name="id",this.variantInput.setAttribute("data-variant-input","");let i=this.dataset.initialVariantId;i&&(this.variantInput.value=i,this.variantInput.setAttribute("value",i)),this.form.appendChild(this.variantInput)}this.submitButton=this.form.querySelector('[type="submit"]'),this.dynamicCheckoutWrappers=Array.from(this.form.querySelectorAll("[data-dynamic-checkout-wrapper]")),this.buyButtonWrapper=this.form.closest("[data-buy-block]"),this.optionWrappers=Array.from(this.querySelectorAll("[data-option-wrapper]")),this.inputs=Array.from(this.querySelectorAll('select[name^="options"], input[type="radio"][name^="options"]')),await this.loadProductData(),this.inputs.forEach(i=>i.addEventListener("change",this.onOptionChange)),this.initializeFromCurrentState(),this.applyState()}getFormElement(){if(this.formId){let i=document.getElementById(this.formId);if(i)return i}return this.closest("section, product-information, product-form, form")?.querySelector(this.formId?`#${CSS.escape(this.formId)}`:'form[action*="/cart/add"]')||null}createFormIfNeeded(){if(!this.formId)return null;let e=document.getElementById(this.formId);if(e)return e;if(!this.dataset.productHandle)return null;let r=document.createElement("form");r.id=this.formId,r.action="/cart/add",r.method="post",r.enctype="multipart/form-data",r.style.display="none";let s=document.createElement("input");s.type="hidden",s.name="id",s.setAttribute("data-variant-input","");let o=this.dataset.initialVariantId;return o&&(s.value=o,s.setAttribute("value",o)),r.appendChild(s),(this.parentElement||document.body).appendChild(r),r}async loadProductData(){if(this.productData&&this.productData.variants){this.variantData=this.productData.variants;return}let e=this.dataset.productHandle,i=this.dataset.productUrl;if(!e&&!i){console.warn("variant-selects: missing product handle or URL"),this.productData=null,this.variantData=[];return}let r=i||`/products/${e}`,s;try{let o=new URL(r,window.location.origin);o.pathname=o.pathname.replace(/\.js$/,""),s=`${o.pathname}.js`}catch{s=`${r.replace(/\.js$/,"")}.js`}try{let o=await fetch(s,{credentials:"same-origin",headers:{Accept:"application/json"}});if(!o.ok)throw new Error(`HTTP ${o.status}`);let a=await o.json();this.productData=a,this.variantData=a.variants||[]}catch(o){console.warn("variant-selects: failed to load product JSON",s,o),this.productData=null,this.variantData=[]}}initializeFromCurrentState(){if(!this.variantData||!this.variantData.length)return;let e=this.getAttribute("data-initial-variant-id")||this.variantInput.value;if(e&&(this.currentVariant=this.variantData.find(i=>String(i.id)===String(e)),this.currentVariant&&!this.variantInput.value)){let i=String(this.currentVariant.id);this.variantInput.value=i,this.variantInput.setAttribute("value",i)}}onOptionChange(){this.applyState()}applyState(){if(!(!this.variantData||!this.variantData.length)){if(this.selectedOptions=this.collectSelectedOptions(),this.updateOptionAvailability(),this.updateDropdownSwatches(),this.updateSelectedValueText(),this.currentVariant=this.findMatchingVariant(),this.currentVariant){let e=String(this.currentVariant.id);this.variantInput.value!==e&&(this.variantInput.value=e,this.variantInput.setAttribute("value",e),this.variantInput.dispatchEvent(new Event("change",{bubbles:!0}))),this.toggleAddToCart(this.currentVariant),this.updateUrl(e)}else this.variantInput.value="",this.variantInput.removeAttribute("value"),this.toggleAddToCart(null),this.updateUrl(null);this.dispatchVariantEvent(this.currentVariant)}}collectSelectedOptions(){let e=this.getOrderedOptionWrappers();return e.length?e.map(i=>{let r=i.querySelector('select[name^="options"]');if(r)return r.value;let s=i.querySelector('input[type="radio"][name^="options"]:checked');return s?s.value:""}):[]}
1findMatchingVariant(){return!this.selectedOptions.length||this.selectedOptions.some(e=>e==null||e==="")?null:this.variantData.find(e=>e.options.every((i,r)=>i===this.selectedOptions[r]))}getOrderedOptionWrappers(){return this.optionWrappers.slice().sort((e,i)=>Number(e.dataset.optionPosition||0)-Number(i.dataset.optionPosition||0))}updateOptionAvailability(){if(!this.variantData?.length||!this.optionWrappers.length)return;let e=this.getOrderedOptionWrappers(),i=Array.isArray(this.selectedOptions)?[...this.selectedOptions]:[];e.forEach((r,s)=>{this.updateWrapperAvailability(r,s,i)})}updateWrapperAvailability(e,i,r){let s=e.querySelector('select[name^="options"]');if(s){let a=s.value;Array.from(s.options).forEach(l=>{if(!l.value){l.disabled=!1;return}let c=this.isOptionValueAvailable(i,l.value,r);l.disabled=!1,l.dataset.optionUnavailable=c?"false":"true",l.setAttribute("aria-disabled",String(!c));let u=l.dataset.optionLabel,d=l.dataset.optionUnavailableText;u!==void 0&&(c?l.textContent=u:d!==void 0&&(l.textContent=d)),l.value===a?l.className="bg-[var(--text-color)] text-[var(--background)]":l.className="bg-[var(--background)] text-[var(--text-color)]"});return}e.querySelectorAll('input[type="radio"][name^="options"]').forEach(a=>{let l=this.isOptionValueAvailable(i,a.value,r);a.disabled=!1,a.dataset.optionUnavailable=l?"false":"true",a.setAttribute("aria-disabled",String(!l)),this.updateInputUnavailableState(a,!l)})}isOptionValueAvailable(e,i,r){if(!i)return!0;let s=r.slice();return s[e]=i,this.variantData.some(o=>o.available?s.every((a,l)=>a?o.options[l]===a:!0):!1)}updateDropdownSwatches(){this.querySelectorAll(".dropdown-swatch[data-selected-value]").forEach(i=>{let r=i.closest("[data-option-wrapper]");if(!r)return;let s=r.querySelector('select[name^="options"]');if(!s)return;let o=s.options[s.selectedIndex];if(!o)return;let a=o.dataset.optionSwatchValue,l=o.dataset.optionSwatchFocalPoint,c=i.dataset.swatchShape||"circle";if(a){let u=i.querySelector(".swatch");u&&(u.style.setProperty("--swatch--background",a),l&&u.style.setProperty("--swatch-focal-point",l),u.className=c==="square"?"swatch block h-full w-full swatch--square rounded-md bg-center bg-cover [background:var(--swatch--background)]":"swatch block h-full w-full rounded-full bg-center bg-cover [background:var(--swatch--background)]")}})}updateSelectedValueText(){this.querySelectorAll("[data-selected-value]:not(.dropdown-swatch)").forEach(i=>{let r=i.closest("[data-option-wrapper]");if(!r)return;let s=r.querySelector('select[name^="options"]');if(s){let a=s.options[s.selectedIndex];if(a){let l=a.dataset.optionLabel||a.textContent.trim();i.textContent=l}return}let o=r.querySelector('input[type="radio"][name^="options"]:checked');if(o){let a=o.getAttribute("aria-label");if(a){i.textContent=a;return}let l=r.querySelector(`label[for="${o.id}"]`);if(l){let c=l.cloneNode(!0);c.querySelectorAll(".visually-hidden").forEach(p=>p.remove());let d=c.textContent.trim();i.textContent=d||o.value}else i.textContent=o.value}})}updateInputUnavailableState(e,i){if(!e)return;let r=this.getInputLabel(e);!r||r.classList.contains("swatch-input__label")||(["opacity-50","line-through"].forEach(o=>r.classList.toggle(o,i)),r.classList.remove("cursor-not-allowed","!cursor-not-allowed","pointer-events-none"))}getInputLabel(e){if(!e||e.tagName!=="INPUT")return null;if(e.nextElementSibling&&e.nextElementSibling.tagName==="LABEL")return e.nextElementSibling;if(e.id){let i=`label[for="${CSS.escape(e.id)}"]`;return this.querySelector(i)}return null}toggleAddToCart(e){if(!this.submitButton)return;if(this.submitButton.dataset.defaultText||(this.submitButton.dataset.defaultText=this.getSubmitButtonText()),!this.submitButton.dataset.soldOutText){let a=this.submitButton.getAttribute("data-sold-out-text");this.submitButton.dataset.soldOutText=a||"Sold out"}let i=this.submitButton.dataset.defaultText,r=this.submitButton.dataset.soldOutText||"Sold out",s=this.buyButtonWrapper?.dataset.expiredKeepSeo==="true",o=s||!e||!e.available;if(this.updateSubmitButtonUnavailableState(o),this.updateDynamicCheckoutState(o),this.updateBuyBlockState(o),!e){this.submitButton.disabled=!0,this.setSubmitButtonText(i);return}!s&&e.available?(this.submitButton.disabled=!1,this.setSubmitButtonText(i)):(this.submitButton.disabled=!0,this.setSubmitButtonText(r))}getSubmitButtonText(){if(!this.submitButton)return"";if(this.submitButton.tagName==="INPUT")return this.submitButton.value?.trim()||"";let e=this.submitButton.querySelector(".add-to-cart-button-text");return e?e.textContent.trim():this.submitButton.textContent.trim()}setSubmitButtonText(e){if(this.submitButton)if(this.submitButton.tagName==="INPUT")this.submitButton.value=e;else{let i=this.submitButton.querySelector(".add-to-cart-button-text");i?i.textContent=e:this.submitButton.textContent=e}}updateSubmitButtonUnavailableState(e){this.submitButton&&(this.submitButton.classList.toggle("opacity-50",!!e),e?this.submitButton.setAttribute("aria-disabled","true"):this.submitButton.removeAttribute("aria-disabled"))}updateDynamicCheckoutState(e){!Array.isArray(this.dynamicCheckoutWrappers)||!this.dynamicCheckoutWrappers.length||this.dynamicCheckoutWrappers.forEac
1h(i=>{i&&(i.classList.toggle("opacity-50",!!e),i.classList.toggle("pointer-events-none",!!e),e?i.setAttribute("aria-disabled","true"):i.removeAttribute("aria-disabled"))})}updateBuyBlockState(e){this.buyButtonWrapper&&this.buyButtonWrapper.classList.toggle("cursor-not-allowed",!!e)}dispatchVariantEvent(e){let i={variant:e,selectedOptions:[...this.selectedOptions||[]]};this.dispatchEvent(new CustomEvent("variant:change",{bubbles:!0,detail:i})),this.form&&this.form.dispatchEvent(new CustomEvent("variant:change",{bubbles:!0,detail:i}))}updateUrl(e){if(typeof window>"u"||typeof history>"u"||!history.replaceState||window.Shopify&&window.Shopify.designMode)return;let i=new URL(window.location.href);if(!e){i.searchParams.has("variant")&&(i.searchParams.delete("variant"),history.replaceState({},"",i.toString()));return}i.searchParams.get("variant")!==e&&(i.searchParams.set("variant",e),history.replaceState({},"",i.toString()))}}customElements.define("variant-selects",n)})(),(()=>{if(typeof window>"u")return;class n extends HTMLElement{constructor(){super(),this.productId=this.dataset.productId,this.showSalePriceFirst=this.hasAttribute("data-show-sale-price-first"),this.showComparePriceInfo=this.hasAttribute("data-show-compare-price-info"),this.variantChangeHandler=this.handleVariantChange.bind(this),this.currentVariant=null}connectedCallback(){document.addEventListener("variant:change",this.variantChangeHandler);let e=this.findRelatedVariantSelects();e&&e.addEventListener("variant:change",this.variantChangeHandler),document.querySelectorAll('form[action*="/cart/add"]').forEach(s=>{s.addEventListener("variant:change",this.variantChangeHandler)});let r=()=>this.updateFromCurrentVariant();document.readyState==="loading"?document.addEventListener("DOMContentLoaded",r,{once:!0}):requestAnimationFrame(r)}findBreakdownFirstVisibleVariant(){let e=document.querySelector("[data-breakdown-active][data-sync-pdp-price]");if(!e)return null;let i=e.dataset.firstVisibleVariantId;if(!i)return null;let r=parseInt(e.dataset.firstVisibleVariantPrice,10),s=parseInt(e.dataset.firstVisibleVariantCompareAtPrice,10);return{id:i,price:Number.isNaN(r)?0:r,compare_at_price:Number.isNaN(s)?0:s,product_id:this.productId}}updateFromCurrentVariant(){let e=this.findBreakdownFirstVisibleVariant();if(e){this.handleVariantChange({detail:{variant:e}});return}let i=this.findRelatedVariantSelects();if(i&&i.currentVariant){this.handleVariantChange({detail:{variant:i.currentVariant}});return}let r=document.querySelector('form[action*="/cart/add"]');if(r){let s=r.querySelector('input[name="id"]');s&&s.value}}disconnectedCallback(){document.removeEventListener("variant:change",this.variantChangeHandler);let e=this.findRelatedVariantSelects();e&&e.removeEventListener("variant:change",this.variantChangeHandler),document.querySelectorAll('form[action*="/cart/add"]').forEach(r=>{r.removeEventListener("variant:change",this.variantChangeHandler)})}findRelatedVariantSelects(){let e=this.closest("section, product-information");if(e){let i=e.querySelector("variant-selects");if(i)return i}return document.querySelector("variant-selects")}handleVariantChange(e){let i=e.detail?.variant;i&&(this.productId&&i.product_id&&String(i.product_id)!==String(this.productId)||(this.currentVariant=i,this.updatePrice(i),this.updateUnitPrice(i)))}updatePrice(e){let i=e.price||0;if(i===0){this.hidden=!0;return}this.hidden=!1;let r=this.querySelector('[ref="priceContainer"]');if(r||(r=this.querySelector(".price")?.closest("div")),r||this.querySelector(".price")&&(r=this),!r)return;let s=e.compare_at_price||0,o=s>i&&s>0;this.updateFromPrefix(r);let a=this.formatMoney(i),l=this.formatMoney(s),c=r.querySelector(".price"),u=r.querySelector(".compare-at-price");if(c){if(c.textContent=a||"\xA0",o){if(u){u.textContent=l;let p=u.closest('[role="group"]');p&&this.appendComparePriceInfo(p)}else{let p=c.closest('[role="group"]'),g=this.showSalePriceFirst?p||c:null,m=this.showSalePriceFirst?null:p||c,y=document.createElement("span");y.setAttribute("role","group"),y.className="inline-flex items-center gap-1.5";let v=document.createElement("span");v.className="visually-hidden",v.textContent="Regular price ";let b=document.createElement("span");
1b.className="compare-at-price line-through text-[var(--product-card-price-original,#999)] text-[0.8em] font-medium",b.textContent=l,y.appendChild(v),y.appendChild(b),this.appendComparePriceInfo(y),g?g.parentNode.insertBefore(y,g.nextSibling):m&&m.parentNode.insertBefore(y,m)}let d=c.closest('[role="group"]');if(d){let p=d.querySelector(".visually-hidden");p||(p=document.createElement("span"),p.className="visually-hidden",p.textContent="Sale price ",d.insertBefore(p,c))}else if(o){let p=document.createElement("span");p.setAttribute("role","group");let g=document.createElement("span");g.className="visually-hidden",g.textContent="Sale price ",c.parentNode.replaceChild(p,c),p.appendChild(g),p.appendChild(c)}}else{if(u){let p=u.closest('[role="group"]');p?p.remove():u.remove()}r.querySelectorAll("[data-compare-price-info]").forEach(p=>{p.remove()});let d=c.closest('[role="group"]');if(d&&d.children.length===2){let p=Array.from(d.children);p.length===2&&p[0].classList.contains("visually-hidden")&&p[1]===c&&d.parentNode.replaceChild(c,d)}}this.updateDiscountBadge(r,i,s)}}updateFromPrefix(e){let i=e.querySelector(".flex.items-baseline");if(!i)return;if(!this.hasAttribute("data-show-from-prefix")){let s=i.querySelector("[data-from-prefix]");s&&s.remove();return}let r=i.querySelector("[data-from-prefix]");r||(r=document.createElement("span"),r.setAttribute("data-from-prefix",""),r.className="price-from-prefix text-[16px] font-normal leading-[1.5] tracking-[-0.16px] text-[#414141]",r.textContent=this.dataset.fromPrefixLabel||"vanaf",i.insertBefore(r,i.firstChild)),r.classList.remove("hidden")}updateDiscountBadge(e,i,r){if(!this.hasAttribute("data-has-badge"))return;let s=this.dataset.saveLabel||"Save",o=this.dataset.discountMode||"percentage",a=r>i&&r>0,l=e.querySelector("[data-discount-badge]");if(!a){l&&l.remove();return}let c=r-i,u=Math.round(c/r*100),d=o==="saving"?`${s} ${this.formatMoney(c)}`:`${s} ${u}%`;if(l){l.textContent=d;return}let p=this.querySelector("[data-discount-badge-template]");!p||!(p instanceof HTMLTemplateElement)||(l=p.content.firstElementChild?.cloneNode(!0),l&&(l.textContent=d,e.appendChild(l)))}updateUnitPrice(e){let i=this.querySelector('[ref="priceContainer"]');if(!i)return;let r=e.unit_price,s=e.unit_price_measurement,o=i.querySelector(".unit-price");if(!r||!s){o&&o.remove();return}let a=this.formatMoney(r),l=s.reference_value||1,c=s.reference_unit||"";if(o){let u=o.querySelector(".visually-hidden");if(u){let d=u.nextSibling;for(;d;){let p=d;d=d.nextSibling,p.remove()}o.appendChild(document.createTextNode(` ${a} / ${l}${c}`))}}else{o=document.createElement("small"),o.className="unit-price";let u=document.createElement("span");u.className="visually-hidden",u.textContent="Unit price ",o.appendChild(u);let d=` ${a} / ${l}${c}`;o.appendChild(document.createTextNode(d)),i.appendChild(o)}}appendComparePriceInfo(e){if(!this.showComparePriceInfo||!e||e.querySelector("[data-compare-price-info]"))return;let i=this.querySelector("[data-compare-price-info-template]");if(!i||!(i instanceof HTMLTemplateElement))return;let r=i.content.firstElementChild?.cloneNode(!0);r&&e.appendChild(r)}formatMoney(e){return typeof e=="string"&&(e=parseInt(e,10)),isNaN(e)||e===null||e===void 0?"":typeof Shopify<"u"&&typeof Shopify.formatMoney=="function"?Shopify.formatMoney(e):`$${(e/100).toFixed(2)}`}}customElements.define("product-price",n)})(),(()=>{if(typeof window>"u"||customElements.get("product-sku"))return;class n extends HTMLElement{constructor(){super(),this.productId=this.dataset.productId,this.hideWhenBlank=this.hasAttribute("data-hide-when-blank"),this.variantChangeHandler=this.handleVariantChange.bind(this)}connectedCallback(){document.addEventListener("variant:change",this.variantChangeHandler);let e=this.findRelatedVariantSelects();e&&e.addEventListener("variant:change",this.variantChangeHandler),document.querySelectorAll('form[action*="/cart/add"]').forEach(i=>{i.addEventListener("variant:change",this.variantChangeHandler)}),this.updateFromCurrentVariant()}disconnectedCallback(){document.removeEventListener("variant:change",this.variantChangeHandler);let e=this.findRelatedVariantSelects();e&&e.removeEventListener("variant:change",this.variantChangeHandler),document.querySelectorAll('form[action*="/cart/add"]').forEach(i=>
1{i.removeEventListener("variant:change",this.variantChangeHandler)})}findRelatedVariantSelects(){let e=this.closest("section, product-information");if(e){let i=e.querySelector("variant-selects");if(i)return i}return document.querySelector("variant-selects")}updateFromCurrentVariant(){let e=this.findRelatedVariantSelects();e?.currentVariant&&this.handleVariantChange({detail:{variant:e.currentVariant}})}handleVariantChange(e){let i=e.detail?.variant;i&&(this.productId&&i.product_id&&String(i.product_id)!==String(this.productId)||this.updateSku(i.sku||""))}updateSku(e){let i=this.querySelector("[data-sku-value]");i&&(i.textContent=e),this.hideWhenBlank&&(e?(this.hidden=!1,this.removeAttribute("hidden")):(this.hidden=!0,this.setAttribute("hidden","")))}}customElements.define("product-sku",n)})();function Xu(n){if(typeof document>"u")return null;let t=null;if(n&&typeof n.closest=="function"){let e=n.closest(".product-info");e?.parentElement&&(t=e.parentElement.querySelector("#nf-product-meta-json"))}if(t||(t=document.getElementById("nf-product-meta-json")),!t?.textContent)return null;try{return JSON.parse(t.textContent.trim())}catch{return null}}function Xa(n){if(!n||typeof n.closest!="function")return{locatie:null,rating:null};let t=Xu(n),e=n.closest("[data-product-locatie], [data-product-rating]"),i=e?.getAttribute("data-product-locatie"),r=e?.getAttribute("data-product-rating"),s=null;i!=null&&String(i).trim()!==""?s=String(i).trim():t?.locatie!=null&&String(t.locatie).trim()!==""&&(s=String(t.locatie).trim());let o=null;return r!=null&&String(r).trim()!==""?o=String(r).trim():t?.rating!=null&&String(t.rating)!==""&&(o=String(t.rating).trim()),{locatie:s,rating:o}}window.__NF_PRODUCT_PAGE_CONTEXT__=Xa,Yu();function Yu(){window.__ajaxProductFormsInitialized||(window.__ajaxProductFormsInitialized=!0,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Ka):Ka())}function Ka(){document.addEventListener("submit",Qu,!0)}async function Qu(n){let t=n.target;if(!(t instanceof HTMLFormElement)||!t.matches('form[action*="/cart/add"]')||t.id&&document.querySelector('[data-breakdown-active][data-product-form-id="'+t.id+'"]')||t.dataset.noAjaxCart==="true"||n.defaultPrevented)return;let e=t.querySelector('[type="submit"]'),i=id(e);n.preventDefault();try{let r=await Ju(t),s=Xa(t);document.dispatchEvent(new CustomEvent("cart:item:added",{bubbles:!0,detail:{item:r,form:t,productPageLocatie:s.locatie,productPageRating:s.rating}}))}catch(r){console.error("Failed to add item to cart via AJAX",r);let s=r?.message||"Unable to add this product to your cart. Please try again.";window.Shopify?.flashErrors?Shopify.flashErrors([s]):alert(s)}finally{i?.()}}async function Ju(n){let t=td(n.action),e=new FormData(n),i=await fetch(t,{method:"POST",credentials:"same-origin",headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"},body:e}),r=await ed(i);if(!i.ok){let s=r?.description||r?.message||"Something went wrong while adding to cart.";throw new Error(s)}return r}function td(n){try{let t=new URL(n||"/cart/add",window.location.origin);return t.pathname=t.pathname.replace(/\/cart\/add(\.js)?$/,"/cart/add.js"),t.toString()}catch{return"/cart/add.js"}}async function ed(n){try{return await n.json()}catch{return null}}function id(n){if(!n)return()=>{};let t=nd(n),e=n.closest(".add-to-cart-button-wrapper");return ja(n,!0),n.classList.add("is-adding-to-cart"),e?.classList.add("is-loading"),t&&(t.hidden=!1,t.setAttribute("aria-hidden","false")),()=>{ja(n,!1),n.classList.remove("is-adding-to-cart"),e?.classList.remove("is-loading"),t&&(t.hidden=!0,t.setAttribute("aria-hidden","true"))}}function nd(n){let t=n.closest(".add-to-cart-button-wrapper");return t?t.querySelector(".add-to-cart-spinner"):null}function ja(n,t){n&&(n.disabled=t,n.setAttribute("aria-busy",t?"true":"false"))}var Ya="preorder",Qa="_preorder",Ja=0,Vs=!1;function rd(){let n=window.Shopify?.routes?.root||"/";return n.endsWith("/")?n:`${n}/`}function sd(n){let t=n?.properties;return!t||typeof t!="object"?!1:Array.isArray(t)?t.some(e=>e&&e.name===Qa&&String(e.value)==="true"):String(t[Qa]??"")==="true"}function Si(){window.clearTimeout(Ja),Ja=window.setTimeout(()=>{od()},50)}async function od(){if(Vs){Si();return}Vs=!0;try{let n=rd(),t=await fetch(`${n}cart.js`,{credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"}});if(!t.ok)return;let e=await t.json(),i=Array.isArray(e?.items)&&e.items.some(sd),r=e?.attributes?.[Ya],s=r==null?"":String(r),o=i?"true":"";if(s===o)return;await fetch(`${n}cart/update.js`,{method:"POST",credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({attributes:{[Ya]:o}})})}catch(n){console.error("Failed to sync preorder cart attribute",n)}finally{Vs=!1}}function ad(){document.addEventListener("cart:item:added",Si),document.addEventListener("cart:update",Si),document.addEventListener("cart:updated",Si),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Si):Si()}ad(),window.Alpine&&(window.Alpine.data("sortingForm",n=>({formEl:n,get gridEl(){return document.getElementById(this.formEl.dataset.productsGridId)},get paginationEl(){return document.getElementById(this.formEl.dataset.paginationId)},init(){this.formEl.addEventListener("submit",t=>{t.preventDefault(),this.submit()})},get fetchUrl(){let t=new URL(window.location.href),e=t.searchParams.get("q"),i=new Set;
1if(t.searchParams.forEach((s,o)=>{o.startsWith("filter.")&&i.add(o)}),i.forEach(s=>t.searchParams.delete(s)),this.formEl.action){let s=new URL(this.formEl.action,window.location.origin);t.pathname=s.pathname}return e&&t.searchParams.set("q",e),new FormData(this.formEl).forEach((s,o)=>{String(s).trim()&&(o.startsWith("filter.")?t.searchParams.append(o,s):t.searchParams.set(o,s))}),t.searchParams.set("section_id",this.formEl.dataset.sectionId),t},captureRects(){let t=new Map;return this.gridEl?.querySelectorAll("[data-collection-card]").forEach((e,i)=>{let r=e.dataset.productId||e.dataset.cardKey||String(i);t.set(r,e.getBoundingClientRect())}),t},animateCards(t=new Map){(this.gridEl?this.gridEl.querySelectorAll("[data-collection-card]"):[]).forEach((i,r)=>{let s=i.dataset.productId||i.dataset.cardKey||String(r),o=t.get(s);if(o){let a=i.getBoundingClientRect(),l=o.left-a.left,c=o.top-a.top,u=o.width/(a.width||1),d=o.height/(a.height||1);i.style.willChange="transform",i.style.transition="none",i.style.transformOrigin="top left",i.style.transform=`translate(${l}px, ${c}px) scale(${u}, ${d})`,requestAnimationFrame(()=>{i.style.transition="transform 320ms ease",i.style.transform=""}),i.addEventListener("transitionend",()=>{i.style.transition="",i.style.removeProperty("will-change")},{once:!0})}else i.style.willChange="transform, opacity",i.classList.add("is-entering"),i.addEventListener("animationend",()=>{i.classList.remove("is-entering"),i.style.removeProperty("will-change")},{once:!0})})},syncFormInputs(){let t=this.formEl.dataset.sectionId,i=this.formEl.id.includes("mobile")?`FacetFiltersForm--${t}-sorting-desktop`:`FacetFiltersForm--${t}-sorting-mobile`,r=document.getElementById(i);if(!r)return;this.formEl.querySelectorAll('input[type="checkbox"]').forEach(l=>{let c=l.name,u=l.value,d=r.querySelector(`input[type="checkbox"][name="${c}"][value="${u}"]`);d&&(d.checked=l.checked)}),this.formEl.querySelectorAll('input[type="text"][name*="filter.price"]').forEach(l=>{let c=l.name,u=r.querySelector(`input[type="text"][name="${c}"]`);u&&(u.value=l.value)});let a=this.formEl.querySelector('select[name="sort_by"]');if(a){let l=r.querySelector('select[name="sort_by"]');l&&(l.value=a.value)}},updateHistory(){let t=new URL(window.location.href),e=t.searchParams.get("q");if(this.formEl.action){let s=new URL(this.formEl.action,window.location.origin);t.pathname=s.pathname}let i=new Set;t.searchParams.forEach((s,o)=>{o.startsWith("filter.")&&i.add(o)}
1),i.forEach(s=>t.searchParams.delete(s)),e&&t.searchParams.set("q",e),new FormData(this.formEl).forEach((s,o)=>{String(s).trim()&&(o.startsWith("filter.")?t.searchParams.append(o,s):t.searchParams.set(o,s))}),window.history.replaceState({},"",t.pathname+"?"+t.searchParams.toString())},async submit(){if(!this.formEl)return;let t=this.captureRects();this.gridEl&&(this.gridEl.dataset.sortingState="loading");try{let e=await fetch(this.fetchUrl.toString(),{headers:{"X-Requested-With":"XMLHttpRequest"}});if(!e.ok)throw new Error("Request failed");let i=await e.text(),s=new DOMParser().parseFromString(i,"text/html"),o=s.getElementById(this.formEl.dataset.productsGridId),a=s.getElementById(this.formEl.dataset.paginationId),l=this.formEl.dataset.sectionId,c=this.formEl.id.includes("mobile"),u=`FilterContainer-${l}-${c?"mobile":"desktop"}`,d=s.getElementById(u),p=`FilterContainer-${l}-${c?"desktop":"mobile"}`,g=s.getElementById(p),m=`FiltersHeader-${l}-desktop`,y=s.getElementById(m);if(this.gridEl&&o&&(this.gridEl.innerHTML=o.innerHTML,requestAnimationFrame(()=>{this.gridEl.dataset.sortingState="idle",this.animateCards(t)})),this.paginationEl&&a&&(this.paginationEl.innerHTML=a.innerHTML),d){let v=document.getElementById(u);v&&(v.innerHTML=d.innerHTML,window.Alpine&&window.Alpine.initTree(v))}else{let v=document.getElementById(u);v&&(v.innerHTML="")}if(g){let v=document.getElementById(p);v&&(v.innerHTML=g.innerHTML,window.Alpine&&window.Alpine.initTree(v))}else{let v=document.getElementById(p);v&&(v.innerHTML="")}if(y){let v=document.getElementById(m);v&&(v.innerHTML=y.innerHTML,window.Alpine&&window.Alpine.initTree(v))}this.syncFormInputs(),this.updateHistory()}catch(e){console.warn("[sorting] Falling back to full page reload",e),this.formEl.removeEventListener("submit",this.submit),this.formEl.submit()}finally{this.gridEl&&(this.gridEl.dataset.sortingState="idle")}}})),window.Alpine.data("sortingOption",()=>({init(){this.$el.addEventListener("change",()=>{let n=this.$el.closest("details");n?.open&&n.removeAttribute("open");let t=n?.querySelector("[data-sorting-status-text]");t&&this.$el.dataset.optionName&&(t.textContent=this.$el.dataset.optionName),this.$el.closest("form")?.dispatchEvent(new Event("submit",{cancelable:!0}))})}})),window.clearFiltersAndSubmit=function(n,t={}){if(!n)return;let{clearCheckboxes:e=!1,clearPriceInputs:i=!1,clearSpecificCheckbox:r=null}=t;if(e&&n.querySelectorAll('input[type="checkbox"]:checked').forEach(l=>{l.checked=!1}),r){let a=n.querySelector(`input[type="checkbox"][name="${r.name}"][value="${r.value}"]`);a&&(a.checked=!1)}let s=!1;if(i){n.querySelectorAll("price-facet-component").forEach(c=>{c.querySelectorAll('input.price-input__control[type="text"]').forEach(d=>{d.value=""})});let l=n.querySelectorAll('[x-data*="priceRangeFilter"]');s=l.length>0,l.forEach(c=>{let u=c.querySelectorAll('input[type="hidden"][name*="filter.price"]'),d=c.querySelector('[x-ref="minInput"]')||(u.length>0?u[0]:null),p=c.querySelector('[x-ref="maxInput"]')||(u.length>1?u[1]:null);if(d&&(d.value=""),p&&(p.value=""),window.Alpine&&c._x_dataStack&&c._x_dataStack.length>0){let y=c._x_dataStack[0];if(y){let v=y.rangeMax||parseInt(c.dataset.rangeMax||"0",10);y.minValue=0,y.maxValue=v,typeof y.updateSliderRange=="function"&&y.updateSliderRange();let b=c.querySelector('[x-ref="minRange"]'),_=c.querySelector('[x-ref="maxRange"]');b&&(b.value="0"),_&&(_.value=v.toString());return}}let g=c.querySelector('[x-ref="minRange"]')||c.querySelector("input.price-facet__range--min"),m=c.querySelector('[x-ref="maxRange"]')||c.querySelector("input.price-facet__range--max");if(g&&m){let y=parseInt(c.dataset.rangeMax||"0",10);g.value="0",m.value=y.toString(),g.dispatchEvent(new Event("input",{bubbles:!0})),m.dispatchEvent(new Event("input",{bubbles:!0}))}})}let o=n.dataset.sectionId;if(o){let l=n.id.includes("mobile")?`FacetFiltersForm--${o}-sorting-desktop`:`FacetFiltersForm--${o}-sorting-mobile`,c=document.getElementById(l);if(c){if(e&&c.querySelectorAll('input[type="checkbox"]:checked').forEach(d=>{d.checked=!1}),r){let u=c.querySelector(`input[type="checkbox"][name="${r.name}"][value="${r.value}"]`);u&&(u.checked=!1)}i&&(c.querySelectorAll("price-facet-component").forEach(p=>{p.querySelectorAll('input.price-input__control[type="text"]').forEach(m=>{m.value=""})}),c.querySelectorAll('[x-data*="priceRangeFilter"]').forEach(p=>{let g=p.querySelectorAll('input[type="hidden"][name*="filter.price"]'),m=p.querySelector('[x-ref="minInput"]')||(g.length>0?g[0]:null),y=p.querySelector('[x-ref="maxInput"]')||(g.length>1?g[1]:null);if(m&&(m.value=""),y&&(y.value=""),window.Alpine&&p._x_dataStack&&p._x_dataStack.length>0){let _=p._x_dataStack[0];if(_){let T=_.rangeMax||parseInt(p.dataset.rangeMax||"0",10);_.minValue=0,_.maxValue=T,typeof _.updateSliderRange=="function"&&_.updateSliderRange();let I=p.querySelector('[x-ref="minRange"]'),L=p.querySelector('[x-ref="maxRange"]');
1I&&(I.value="0"),L&&(L.value=T.toString());return}}let v=p.querySelector('[x-ref="minRange"]')||p.querySelector("input.price-facet__range--min"),b=p.querySelector('[x-ref="maxRange"]')||p.querySelector("input.price-facet__range--max");if(v&&b){let _=parseInt(p.dataset.rangeMax||"0",10);v.value="0",b.value=_.toString(),v.dispatchEvent(new Event("input",{bubbles:!0})),b.dispatchEvent(new Event("input",{bubbles:!0}))}}))}}if(i&&s){let a=()=>{n.querySelectorAll('input[type="hidden"][name*="filter.price"]').forEach(l=>{l.value="",l.removeAttribute("value")})};a(),requestAnimationFrame(()=>{a(),setTimeout(()=>{a();let l=new Event("submit",{cancelable:!0,bubbles:!0});n.dispatchEvent(l)},50)})}else{let a=new Event("submit",{cancelable:!0,bubbles:!0});n.dispatchEvent(a)}},window.Alpine.data("priceRangeFilter",n=>{let t=parseInt(n.dataset.rangeMax||"0",10),e=n.querySelector('[x-ref="minRange"]')||n.querySelector("input.price-facet__range--min"),i=n.querySelector('[x-ref="maxRange"]')||n.querySelector("input.price-facet__range--max"),r=e?parseInt(e.value||"0",10):0,s=i?parseInt(i.value||t.toString(),10):t;return{minValue:r,maxValue:s,rangeMax:t,updateTimeoutId:null,inputTimeoutId:null,isUpdating:!1,mutationObserver:null,init(){console.log("PriceRangeFilter: Alpine init started",{minValue:this.minValue,maxValue:this.maxValue,rangeMax:this.rangeMax}),this.minValue>this.maxValue&&(this.minValue=this.maxValue),this.setupMutationObserver(),typeof ThemeEvents<"u"&&document.addEventListener(ThemeEvents.FilterUpdate,()=>this.scheduleRobustUpdate());let o=this.$el.closest("form");o&&(o.addEventListener("change",a=>{a.target instanceof HTMLInputElement&&(a.target.closest('[x-data*="priceRangeFilter"]')||this.scheduleRobustUpdate())}),o.addEventListener("input",a=>{a.target instanceof HTMLInputElement&&(a.target.closest('[x-data*="priceRangeFilter"]')||(this.inputTimeoutId&&clearTimeout(this.inputTimeoutId),this.inputTimeoutId=setTimeout(()=>this.scheduleRobustUpdate(),300)))})),this.$nextTick(()=>{this.updateSliderRange(),this.updateHiddenInputs()}),setTimeout(()=>{this.$el.isConnected&&this.updateSliderRange()},500)},destroy(){this.mutationObserver&&this.mutationObserver.disconnect(),this.updateTimeoutId&&clearTimeout(this.updateTimeoutId),this.inputTimeoutId&&clearTimeout(this.inputTimeoutId)},setupMutationObserver(){this.mutationObserver&&this.mutationObserver.disconnect(),this.mutationObserver=new MutationObserver(()=>{requestAnimationFrame(()=>{this.updateSliderRange()})});let o=this.$refs.minRange,a=this.$refs.maxRange;o&&this.mutationObserver.observe(o,{attributes:!0,attributeFilter:["value","max","min"]}),a&&this.mutationObserver.observe(a,{attributes:!0,attributeFilter:["value","max","min"]}),this.$el&&this.mutationObserver.observe(this.$el,{attributes:!0,attributeFilter:["data-range-max"],childList:!0,subtree:!0});let l=this.$el.closest("form");l&&this.mutationObserver.observe(l,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","data-*"]})},scheduleRobustUpdate(){this.updateTimeoutId&&clearTimeout(this.updateTimeoutId),this.updateTimeoutId=setTimeout(()=>{this.updateTimeoutId=null,this.performRobustUpdate()},150)},performRobustUpdate(){this.isUpdating||(this.isUpdating=!0,this.updateSliderRange(),requestAnimationFrame(()=>{this.updateSliderRange(),requestAnimationFrame(()=>{this.updateSliderRange(),setTimeout(()=>{this.updateSliderRange(),this.isUpdating=!1},100)})}))},onMinRangeInput(){this.minValue>this.maxValue&&(this.minValue=this.maxValue),this.updateHiddenInputs(),this.updateSliderRange()},onMaxRangeInput(){this.maxValue<this.minValue&&(this.maxValue=this.minValue),this.updateHiddenInputs(),this.updateSliderRange()},onRangeChange(){this.updateHiddenInputs();let o=this.$el.closest("facets-form-component");if(o&&typeof FacetsFormComponent<"u"&&o instanceof FacetsFormComponent)o.updateFilters(),this.updateSummary();else{let a=this.$el.closest("form");a&&a.requestSubmit()}},updateSliderRange(){let o=this.$refs.sliderRange;if(!o||!this.$refs.minRange||!this.$refs.maxRange||this.rangeMax===0)return;let a=Math.max(0,this.minValue/this.rangeMax*100),l=Math.min(100,this.maxValue/this.rangeMax*100),c=o.style.transition;o.style.transition="none",o.style.left=a+"%",o.style.right=100-l+"%",o.style.width=l-a+"%",o.style.display="block",o.style.visibility="visible",o.style.opacity="1",o.offsetHeight,requestAnimationFrame(()=>{o.style.transition=c||"left 0.15s ease, right 0.15s ease, width 0.15s ease"})}
1,updateHiddenInputs(){},formatValue(o){return(o/100).toFixed(2).replace(/\.00$/,"")},updateSummary(){let a=this.$el.closest("details")?.querySelector("facet-status-component");if(a&&typeof FacetStatusComponent<"u"&&a instanceof FacetStatusComponent){let l=document.createElement("input"),c=document.createElement("input");l.value=this.$refs.minInput?.value||"",c.value=this.$refs.maxInput?.value||"",a.updatePriceSummary(l,c)}},clear(){this.minValue=0,this.maxValue=this.rangeMax,this.$nextTick(()=>{this.updateSliderRange(),this.updateHiddenInputs(),this.onRangeChange()})}}})),(function(){"use strict";if(window.__productCardAddToCartInitialized)return;window.__productCardAddToCartInitialized=!0;function n(){document.addEventListener("click",function(t){let e=t.target.closest("button.product-card__add-to-cart[data-product-id]");if(!e||(t.preventDefault(),t.stopPropagation(),e.disabled))return;let i=e.getAttribute("data-product-id");if(!i)return;let r=new FormData;r.append("id",i),r.append("quantity",1);let s=e.querySelector(".add-to-cart-spinner"),o=e.querySelector(".product-card__cart-icon");e.disabled=!0,e.classList.add("is-adding-to-cart"),o&&(o.style.opacity="0"),s&&(s.hidden=!1,s.setAttribute("aria-hidden","false")),fetch("/cart/add.js",{method:"POST",body:r}).then(a=>{if(!a.ok)throw new Error("Failed to add to cart");return a.json()}).then(a=>{document.dispatchEvent(new CustomEvent("cart:update")),document.dispatchEvent(new CustomEvent("cart:item:added",{bubbles:!0,detail:{item:a,button:e}}))}).catch(a=>{console.error("Error adding to cart:",a);let l=a?.message||"Unable to add this product to your cart. Please try again.";window.Shopify?.flashErrors?window.Shopify.flashErrors([l]):alert(l)}).finally(()=>{let a=e.querySelector(".product-card__cart-icon");e.disabled=!1,e.classList.remove("is-adding-to-cart"),a&&(a.style.opacity=""),s&&(s.hidden=!0,s.setAttribute("aria-hidden","true"))})})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",n):n()})(),(function(){"use strict";function n(){document.querySelectorAll("[data-featured-collection-carousel]").forEach(i=>{let r=i.getAttribute("data-featured-collection-carousel");if(!r)return;let s=i.querySelector(".embla__viewport");s&&s.dataset.emblaInitialized==="true"||t(r,i)})}function t(e,i){let r=i.querySelector("[data-embla-wrapper]"),s=i.querySelector(".embla__viewport");if(!r||!s)return;let o=i.getAttribute("data-columns"),a=o?parseInt(o,10):4,l=null,c=!1;function u(){let g=window.innerWidth<768;g?(r.style.marginRight="-20px",r.style.width="calc(100% + 20px)"):(r.style.marginRight="",r.style.width="");let y=s.getBoundingClientRect().width||window.innerWidth,v=g?1.2:a,b=g?12:24,_=g?1:a-1,T=(y-_*b)/v;s.querySelectorAll(".embla__slide").forEach(L=>{L.style.width=T+"px",L.style.marginRight=b+"px"})}function d(){if(c)return!0;if(!i)return!1;let g=i.querySelectorAll(".embla__prev"),m=i.querySelectorAll(".embla__next");if(!s||g.length===0||m.length===0)return!1;if(s.dataset.emblaInitialized==="true")return c=!0,!0;s.offsetWidth;let v=s.getBoundingClientRect().width||window.innerWidth,b=v<768,_=b?1.2:a,T=b?12:24,I=b?1:a-1,L=(v-I*T)/_,R=s.querySelectorAll(".embla__slide");R.forEach(E=>{E.style.width=L+"px",E.style.marginRight=T+"px"});try{l=Te(s,{loop:!1,align:"start",dragFree:!1,slidesToScroll:1,containScroll:"trimSnaps"})}catch(E){return console.error("Failed to initialize EmblaCarousel:",E),!1}let F,P=()=>{clearTimeout(F),F=setTimeout(()=>{let E=window.innerWidth<768;r&&(E?(r.style.marginRight="-20px",r.style.width="calc(100% + 20px)"):(r.style.marginRight="",r.style.width="")),s.offsetWidth;let X=s.getBoundingClientRect().width||window.innerWidth,ot=E?1.2:a,ut=E?12:24,yt=E?1:a-1,_t=(X-yt*ut)/ot;R.forEach(ft=>{ft.style.width=_t+"px",ft.style.marginRight=ut+"px"}),l&&l.reInit()},250)};window.addEventListener("resize",P),s.dataset.emblaInitialized="true",c=!0;let k=()=>{if(l){let E=l.canScrollPrev(),B=l.canScrollNext();g.forEach(X=>{X.disabled=!E}),m.forEach(X=>{X.disabled=!B})}};return l.on("select",k),l.on("init",k),l.on("reInit",k),k(),g.forEach(E=>{E.addEventListener("click",()=>{l&&l.scrollPrev()})}),m.forEach(E=>{E.addEventListener("click",()=>{l&&l.scrollNext()})}),!0}requestAnimationFrame(u);let p;window.addEventListener("resize",function(){clearTimeout(p),p=setTimeout(()=>{u()},100)}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{d()}):setTimeout(()=>{d()},0)}if(window.initFeaturedCollectionCarousels=n,!window.__featuredCollectionCarouselInit&&(window.__featuredCollectionCarouselInit=!0,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",n):n(),typeof MutationObserver<"u")){let e;new MutationObserver(()=>{clearTimeout(e),e=setTimeout(()=>{n()},100)}).observe(document.body,{childList:!0,subtree:!0})}})(),(function(){"use strict";if(window.__announcementBarCarouselInit)return;window.__announcementBarCarouselInit=!0;function n(){document.querySelectorAll("[data-announcement-carou
1sel]").forEach(i=>{let r=i.getAttribute("data-announcement-carousel");if(!r)return;let s=i.querySelector(".embla__viewport");s&&s.dataset.emblaInitialized==="true"||t(r,i)})}function t(e,i){let r=i.querySelector(".embla__viewport");if(!r||r.dataset.emblaInitialized==="true")return;if(typeof window.EmblaCarousel>"u"){console.warn("EmblaCarousel not available, retrying..."),setTimeout(()=>t(e,i),100);return}let s=i.dataset.autoScroll==="true",o=parseInt(i.dataset.scrollInterval,10)||5e3,a=window.EmblaCarousel(r,{loop:!0,align:"start",dragFree:!1,slidesToScroll:1,duration:25});r.dataset.emblaInitialized="true";let l={autoScrollTimer:null,isPaused:!1,emblaInstance:a},c=i.querySelector(".embla__prev"),u=i.querySelector(".embla__next");function d(){!s||l.isPaused||(l.autoScrollTimer=setInterval(()=>{!l.isPaused&&l.emblaInstance&&l.emblaInstance.scrollNext()},o))}function p(){l.autoScrollTimer&&(clearInterval(l.autoScrollTimer),l.autoScrollTimer=null)}function g(){p(),s&&d()}c&&c.addEventListener("click",()=>{l.emblaInstance.scrollPrev(),g()}),u&&u.addEventListener("click",()=>{l.emblaInstance.scrollNext(),g()});let m=()=>{c&&(c.disabled=!l.emblaInstance.canScrollPrev()),u&&(u.disabled=!l.emblaInstance.canScrollNext())};l.emblaInstance.on("select",m),l.emblaInstance.on("init",m),m();let y=()=>{l.isPaused=!0,p()},v=()=>{l.isPaused=!1,s&&d()};i.addEventListener("mouseenter",y),i.addEventListener("mouseleave",v),l.emblaInstance.on("pointerDown",()=>{l.isPaused=!0,p()}),l.emblaInstance.on("pointerUp",()=>{setTimeout(()=>{l.isPaused=!1,s&&d()},1e3)}),s&&d(),i._announcementBarCleanup=()=>{p(),i.removeEventListener("mouseenter",y),i.removeEventListener("mouseleave",v)}}if(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",n):setTimeout(n,0),typeof MutationObserver<"u"){let e;new MutationObserver(()=>{clearTimeout(e),e=setTimeout(()=>{n()},100)}).observe(document.body,{childList:!0,subtree:!0})}})(),(function(){"use strict";if(window.__sliderMenuInit)return;window.__sliderMenuInit=!0;let n=new WeakSet;function t(i){if(n.has(i))return;let r=i.closest(".slider-menu-container");if(!r)return;let s=r.querySelector("[data-scroll-left]"),o=r.querySelector("[data-scroll-right]"),a=r.querySelector("[data-fade-left]"),l=r.querySelector("[data-fade-right]");if(!s||!o)return;n.add(i);function c(){let v=r.closest(".section-overlay-wrapper"),b=r.closest(".section"),_=v||b;if(_){let F=window.getComputedStyle(_),P=F.backgroundColor;if(P&&P!=="rgba(0, 0, 0, 0)"&&P!=="transparent")return P;let k=F.getPropertyValue("--background");if(k)return k.trim()}let I=window.getComputedStyle(r).backgroundColor;if(I&&I!=="rgba(0, 0, 0, 0)"&&I!=="transparent")return I;let R=window.getComputedStyle(document.body).backgroundColor;return R&&R!=="rgba(0, 0, 0, 0)"&&R!=="transparent"?R:"rgb(245, 245, 220)"}function u(){if(!a||!l)return;let v=r.closest(".section"),b="rgb(245, 245, 220)";if(v){let T=window.getComputedStyle(v).backgroundColor;T&&T!=="rgba(0, 0, 0, 0)"&&T!=="transparent"&&(b=T)}a.style.background=`linear-gradient(to right, ${b}, transparent)`,l.style.background=`linear-gradient(to left, ${b}, transparent)`}function d(){let v=i.scrollWidth>i.clientWidth,b=i.scrollLeft<=10,_=i.scrollLeft+i.clientWidth>=i.scrollWidth-10;v?(s.classList.toggle("visible",!b),o.classList.toggle("visible",!_),a&&a.classList.toggle("visible",!b),l&&l.classList.toggle("visible",!_)):(s.classList.remove("visible"),o.classList.remove("visible"),a&&a.classList.remove("visible"),l&&l.classList.remove("visible"))}u();let p=function(){i.scrollBy({left:-300,behavior:"smooth"})},g=function(){i.scrollBy({left:300,behavior:"smooth"})},m=d,y=function(){u(),d()};s.addEventListener("click",p),o.addEventListener("click",g),i.addEventListener("scroll",m),window.addEventListener("resize",y),i._sliderMenuCleanup=()=>{s.removeEventListener("click",p),o.removeEventListener("click",g),i.removeEventListener("scroll",m),window.removeEventListener("resize",y)},setTimeout(function(){u(),d()},100),setTimeout(function(){u(),d()},500)}function e(){document.querySelectorAll("[data-slider-menu]").forEach(i=>
1{n.has(i)||t(i)})}if(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):setTimeout(e,0),typeof MutationObserver<"u"){let i;new MutationObserver(()=>{clearTimeout(i),i=setTimeout(()=>{e()},100)}).observe(document.body,{childList:!0,subtree:!0})}})(),document.addEventListener("alpine:init",()=>{Alpine.data("nfSearchModal",()=>({isOpen:!1,query:"",resultsHTML:"",hasResults:!1,isLoading:!1,recentlyViewed:[],trendingSearches:[],_debounceTimer:null,_abortController:null,_lastRequestedQuery:"",_requestVersion:0,_predictiveSearchUrl:"",_searchUrl:"",init(){this._predictiveSearchUrl=this.$el.dataset.predictiveSearchUrl||window.Theme?.routes?.predictive_search_url||"/search/suggest",this._searchUrl=this.$el.dataset.searchUrl||window.Theme?.routes?.search_url||"/search",this._loadTrendingSearchesFromDOM(),this.trendingSearches.length||(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this._loadTrendingSearchesFromDOM()},{once:!0}):setTimeout(()=>this._loadTrendingSearchesFromDOM(),0)),this.$watch("query",n=>this._onInput(n))},openSearch(){let n=this.$refs.searchDialog;if(n){if(this.trendingSearches.length||this._loadTrendingSearchesFromDOM(),n.open){this.$nextTick(()=>this.$refs.searchInput?.focus());return}n.showModal(),this.isOpen=!0,this._lockBodyScroll(),this._hideThirdPartyWidgets(),this._loadRecentlyViewed(),this.$refs.searchInput?.focus(),this.$nextTick(()=>this.$refs.searchInput?.focus())}},closeSearch(){let n=this.$refs.searchDialog;!n||!n.open||(clearTimeout(this._debounceTimer),this._debounceTimer=null,this._closeWithAnimation())},handleBackdropClick(n){n.target===this.$refs.searchDialog&&this.closeSearch()},_closeWithAnimation(){let n=this.$refs.searchDialog;!n||!n.open||n.close()},onDialogClose(){this.isOpen=!1,this._unlockBodyScroll(),this._restoreThirdPartyWidgets(),clearTimeout(this._debounceTimer),this._debounceTimer=null,this._cancelFetch(),this._lastRequestedQuery="",this.query="",this.resultsHTML="",this.hasResults=!1,this.isLoading=!1},viewAllResults(){let n=this.query.trim();if(!n)return;let t=new URLSearchParams({q:n});t.set("type","product"),t.set("options[prefix]","last"),window.location.assign(this._searchUrl+"?"+t.toString())},hasProductRating(n){return this.formatProductRating(n).length>0},formatProductRating(n){if(!n)return"";let t=typeof n.ratingLabel=="string"?n.ratingLabel.trim():"";if(t)return t;let e=n.metafields?.reviews;if(Number(e?.rating_count?.value??0)>0){let s=e?.rating?.value,o=s?.rating??s,a=Number(o);if(Number.isFinite(a)){let l=Number(s?.scale_max??5);return`${a.toFixed(1)}/${Number.isFinite(l)?l:5}`}}let r=n.metafields?.custom?.rating?.value;if(r!=null&&r!==""){let s=Number(r);if(Number.isFinite(s))return`${s.toFixed(1)}/5`}return""},clearRecentlyViewed(){this.recentlyViewed=[];try{localStorage.removeItem("viewedProducts"),localStorage.removeItem("viewedProductsData")}catch{}},_loadRecentlyViewed(){try{let n=localStorage.getItem("viewedProductsData");if(!n){this.recentlyViewed=[];return}let t=JSON.parse(n);if(!Array.isArray(t)){this.recentlyViewed=[];return}if(t.length>0&&t.every(s=>s&&typeof s=="object"&&!("subtitle"in s)&&!("price"in s)&&!("compareAtPrice"in s)&&!("metafields"in s))){localStorage.removeItem("viewedProducts"),localStorage.removeItem("viewedProductsData"),this.recentlyViewed=[];return}let i=2;if(t.some(s=>s&&typeof s=="object"&&s.priceLogicVersion!==i)){let s=t.filter(o=>o&&typeof o=="object"&&o.priceLogicVersion===i);s.length>0?(localStorage.setItem("viewedProductsData",JSON.stringify(s)),localStorage.setItem("viewedProducts",JSON.stringify(s.map(o=>String(o.id))))):(localStorage.removeItem("viewedProducts"),localStorage.removeItem("viewedProductsData"))}this.recentlyViewed=t.filter(s=>s&&s.id&&s.url&&s.priceLogicVersion===i).slice(0,8).map(s=>({id:String(s.id),title:s.title||"",url:s.url,image:s.imageUrl||"",subtitle:s.subtitle||"",price:s.price||"",compareAtPrice:s.compareAtPrice||"",ratingLabel:typeof s.ratingLabel=="string"?s.ratingLabel:"",metafields:typeof s.metafields=="object"&&s.metafields!==null?s.metafields:{hygraph:{location:{value:""}}}}))}catch{this.recentlyViewed=[]}},_onInput(n){clearTimeout(this._debounceTimer);let t=n.trim();if(!t){this._lastRequestedQuery="",this.resultsHTML="",this.hasResults=!1,this.isLoading=!1,this._cancelFetch();return}t===this._lastRequestedQuery&&this.hasResults||(this.isLoading=!0,this._debounceTimer=setTimeout(()=>this._fetchResults(t),180))},_loadTrendingSearchesFromDOM(){let n=document.getElementById("trending-searches-data");if(n?.textContent)try{let t=JSON.parse(n.textContent);Array.isArray(t)&&t.length>0&&(this.trendingSearches=t)}catch{}},async _fetchResults(n){this._cancelFetch(),this._lastRequestedQuery=n;let t=++this._requestVersion;this._abortController=new AbortController;let e=this._predictiveSearchUrl+"?q="+encodeURIComponent(n)+"§ion_id=nf-search-results&resources[type]=product,query,collection&resources[limit]=8&resources[options][fields]=title,product_type,variants.sku,tag";try{let i=await fetch(e,{signal:this._abortController.signal});if(t!==this._requestVersion)return;if(!i.ok){this.isLoading=!1;return}let r=await i.text();if(t!==this._requestVersion)return;let s=document.createElement("div");s.innerHTML=r;let o=s.querySelector("#nf-search-results");o&&this._highlightMatches(o,n),this.resultsHTML=o?o.outerHTML:r,this.hasResults=!!o,this.isLoading=!1}catch(i){if(i.name==="AbortError")return;console.error("[nf-search-modal]",i),t===this._requestVersion&&(this.isLoading=!1)}}
1,_cancelFetch(){this._requestVersion+=1,this._abortController&&(this._abortController.abort(),this._abortController=null)},_highlightMatches(n,t){let e=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=new RegExp(`(${e})`,"gi");for(let r of n.querySelectorAll("[data-search-highlight]"))this._wrapTextMatches(r,i)},_wrapTextMatches(n,t){for(let e of[...n.childNodes]){if(e.nodeType!==Node.TEXT_NODE)continue;let i=e.textContent;if(!t.test(i)){t.lastIndex=0;continue}t.lastIndex=0;let r=document.createDocumentFragment(),s=0,o;for(;(o=t.exec(i))!==null;){o.index>s&&r.appendChild(document.createTextNode(i.slice(s,o.index)));let a=document.createElement("strong");a.textContent=o[1],r.appendChild(a),s=t.lastIndex}s<i.length&&r.appendChild(document.createTextNode(i.slice(s))),e.parentNode.replaceChild(r,e)}},_lockBodyScroll(){document.body.style.overflow="hidden"},_unlockBodyScroll(){document.body.style.overflow=""},_hideThirdPartyWidgets(){let n=document.querySelector("gty-whatsapp-chat-button");n&&n.style.setProperty("display","none","important")},_restoreThirdPartyWidgets(){let n=document.querySelector("gty-whatsapp-chat-button");n&&n.style.removeProperty("display")}}))}),window.initSearchPage=function(){let n=document.getElementById("search_page_input"),t=document.getElementById("search_page_label"),e=document.getElementById("search_page_clear");if(!n)return;let i=()=>{if(!t)return;let s=document.activeElement===n,o=n.value.length>0;s||o?t.style.cssText="top:5px;transform:translateY(0) scale(0.85);font-size:10px;":t.style.cssText="top:50%;transform:translateY(-50%) scale(1);font-size:14px;"},r=()=>{e&&(e.style.display=n.value.length>0?"flex":"none")};i(),r(),n.addEventListener("focus",i),n.addEventListener("blur",i),n.addEventListener("input",()=>{i(),r()}),e&&e.addEventListener("click",()=>{n.value="",n.focus(),i(),r()})},document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{document.getElementById("search_page_input")&&window.initSearchPage()}):document.getElementById("search_page_input")&&window.initSearchPage(),(function(){"use strict";if(window.__tabSectionInit)return;window.__tabSectionInit=!0;function n(){document.querySelectorAll("[data-tab-section]").forEach(i=>{let r=i.getAttribute("data-tab-section"),s=i.getAttribute("data-default-tab")||"";r&&i.dataset.tabSectionInitialized!=="true"&&(t(r,s),i.dataset.tabSectionInitialized="true")})}function t(e,i){function r(){if(window.Alpine&&window.Alpine.store)try{window.Alpine.store(e)||window.Alpine.store(e,{activeTab:i,setActiveTab(o){this.activeTab=o}})}catch(s){console.warn("Failed to initialize tab store:",s)}}window.Alpine&&r(),document.addEventListener("alpine:init",r)}if(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",n):setTimeout(n,0),typeof MutationObserver<"u"){let e;new MutationObserver(()=>{clearTimeout(e),e=setTimeout(()=>{n()},100)}).observe(document.body,{childList:!0,subtree:!0})}})();var Os=class extends HTMLElement{#i=new IntersectionObserver((t,e)=>{t[0]?.isIntersecting&&(e.disconnect(),this.#s())},{rootMargin:"0px 0px 400px 0px"});#n=new MutationObserver(t=>{for(let e of t)if(!(e.target!==this||e.type!=="attributes")&&e.attributeName!=="data-error"&&!(e.attributeName==="class"&&this.classList.contains("hidden"))&&!(e.attributeName==="data-recommendations-performed"&&this.dataset.recommendationsPerformed==="true")){this.#s();break}});#r={};#t=null;connectedCallback(){this.#i.observe(this),this.#n.observe(this,{attributes:!0})}disconnectedCallback(){this.#i.disconnect(),this.#n.disconnect(),this.#t?.abort()}#s(){let{productId:t,recommendationsPerformed:e,sectionId:i,intent:r}=this.dataset,s=this.id;if(!t||!s)throw new Error("Product ID and an ID attribute are required");e!=="true"&&this.#o(t,i,r).then(o=>{if(!o.success){Shopify.designMode||this.#e(new Error(`Server returned ${o.status}`));return}let a=document.createElement("div");a.innerHTML=o.data||"";let l=a.querySelector(`product-recommendations[id="${s}"]`);if(l?.innerHTML&&l.innerHTML.trim().length){let c=this.offsetHeight;c>0&&(this.style.minHeight=`${c}px`),this.dataset.recommendationsPerformed="true",this.innerHTML=l.innerHTML,window.initFeaturedCollectionCarousels?.(),requestAnimationFrame(()=>{requestAnimationFrame(()=>{this.style.minHeight=""})})}else this.#e(new Error("No recommendations available"))}).catch(o=>{this.#e(o)})}
1async#o(t,e,i){let r=`${this.dataset.url}&product_id=${t}§ion_id=${e}&intent=${i}`,s=this.#r[r];if(s)return{success:!0,data:s};this.#t?.abort(),this.#t=new AbortController;try{let o=await fetch(r,{signal:this.#t.signal});if(!o.ok)return{success:!1,status:o.status};let a=await o.text();return this.#r[r]=a,{success:!0,data:a}}finally{this.#t=null}}#e(t){console.error("Product recommendations error:",t.message),this.classList.add("hidden"),this.dataset.error="Error loading product recommendations"}};customElements.get("product-recommendations")||customElements.define("product-recommendations",Os);var Fs=class extends HTMLElement{constructor(){super(),this.lastButtonWidth=0,this.observer=void 0,this.adjustInputPadding=this.adjustInputPadding.bind(this)}connectedCallback(){this.button=this.querySelector(".email-signup-button--integrated"),this.input=this.querySelector(".email-signup-input"),this.inputGroup=this.querySelector(".email-signup-input-group");let t=this.button&&this.button.classList.contains("email-signup-button--text");this.button&&this.input&&this.inputGroup&&t&&(this.adjustInputPadding(),this.observer=new ResizeObserver(()=>{this.adjustInputPadding()}),this.observer.observe(this.button),"fonts"in document&&document.fonts.ready.then(()=>{this.adjustInputPadding()}))}disconnectedCallback(){this.observer&&this.observer.disconnect()}adjustInputPadding(){if(!this.button||!this.input)return;let t=this.button.offsetWidth;if(t!==this.lastButtonWidth){this.lastButtonWidth=t;let e=t+16;this.input.style.paddingRight=`${e}px`}}};customElements.get("email-signup-block")||customElements.define("email-signup-block",Fs),(function(){let n=["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],t=["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"];function e(){let h=new Date;return h.setHours(0,0,0,0),h}function i(h){return h.getFullYear()+"-"+String(h.getMonth()+1).padStart(2,"0")+"-"+String(h.getDate()).padStart(2,"0")}function r(h,f,S){var x=h.querySelector("[data-datepicker-calendar-input]");x&&(f?x.setAttribute("min",f):x.removeAttribute("min"),S?x.setAttribute("max",S):x.removeAttribute("max"))}function s(h,f){var S=h.querySelector("[data-datepicker-calendar-input]");!S||!f||S.value!==f&&(S.value=f)}function o(h,f,S){if(!(!h||!f||!S)){for(var x=h.querySelectorAll(".embla__slide"),w=0;w<x.length;w++)if(x[w].contains(S)){f.scrollTo(w);return}}}var a="Europe/Amsterdam";function l(h){var f=new Date(h);if(isNaN(f.getTime()))return"";try{var S=new Intl.DateTimeFormat("sv-SE",{timeZone:a,year:"numeric",month:"2-digit",day:"2-digit"}).format(f);return S}catch{return i(f)}}function c(h){let f=e(),S=new Date(h);return S.setHours(0,0,0,0),S.getTime()<f.getTime()}let u=768;function d(){return typeof window<"u"&&window.innerWidth<u?2:4}let p={daysCount:32,allowPast:!1,get initialSelected(){return e()},onSelect:function(h){typeof console<"u"&&console.log&&console.log("Selected:",h.toLocaleDateString("nl-NL"))}},g=!1,m=null;function y(){if(!g){g=!0;var h;window.addEventListener("resize",function(){clearTimeout(h),h=setTimeout(function(){m&&m.handleResize&&m.handleResize()},60)}),document.addEventListener("visibilitychange",function(){document.visibilityState==="visible"&&m&&m.syncAndRender&&m.syncAndRender()}),window.addEventListener("focus",function(){m&&m.syncAndRender&&m.syncAndRender()}),setInterval(function(){m&&m.syncAndRender&&m.syncAndRender()},6e4)}}function v(){var h=[];return document.querySelectorAll("[data-breakdown-active] .nf-quantity-breakdown__row").forEach(function(f){var S=f.querySelector("[data-breakdown-input]"),x=S&&parseInt(S.value,10)||0;h.push({sku:(f.dataset.variantSku||"").trim(),variantId:(f.dataset.variantId||"").trim(),qty:x,requiresSlot:f.dataset.requiresCapacitySlot==="true"})}),h}function b(h,f){if(!h||typeof h!="object")return null;var S=(f.sku||"").trim();if(S!==""&&Object.prototype.hasOwnProperty.call(h,S))return h[S];var x=(f.variantId||"").trim();if(x!==""){if(Object.prototype.hasOwnProperty.call(h,x))return h[x];var w=Number(x);if(Number.isFinite(w)&&Object.prototype.hasOwnProperty.call(h,String(w)))return h[String(w)]}var A=Object.keys(h);return A.length===1?h[A[0]]:null}function _(){var h=document.querySelectorAll("[data-breakdown-active] .nf-quantity-breakdown__row");
1if(!h.length)return null;for(var f=0,S=0;S<h.length;S++){var x=h[S].querySelector("[data-breakdown-input]");f+=x&&parseInt(x.value,10)||0}return f}function T(){var h=0;return document.querySelectorAll("[data-breakdown-active] .nf-quantity-breakdown__row").forEach(function(f){var S=f.querySelector("[data-breakdown-input]"),x=S&&parseInt(S.value,10)||0;h+=x}),h}function I(){var h=T();return h<1?1:h}function L(h,f,S){for(var x=I(),w=0;w<f.length;w++){var A=f[w];if(!(!A||A.date!==h)){if(S==="PerDay"){var q=A.availableQuantity!=null?A.availableQuantity:0;return q>=x&&q>0}if(S==="PerSlot")for(var C=A.timeSlots||[],M=0;M<C.length;M++){var $=C[M].availableQuantity!=null?C[M].availableQuantity:0;if($>=x&&$>0)return!0}}}return!1}function R(h){for(var f=[],S=0;S<h.length;S++)h[S]&&h[S].date&&f.push(h[S].date);return f.sort()}function F(h,f){var S=_();if(S!==null&&S<1)return!1;for(var x=h.availablePerPriceKey||{},w=!1,A=0;A<f.length;A++){var q=f[A];if(!(!q.requiresSlot||q.qty<1)){w=!0;var C=b(x,q);if(C==null||C<q.qty)return!1}}if(w)return!0;for(var M=0;M<f.length;M++){var $=f[M];if(!($.qty<1)){var it=b(x,$);if(it==null||it<$.qty)return!1}}return!0}function P(h,f,S){for(var x=_(),w=0;w<f.length;w++)if(l(f[w].startTime)===h&&(x!==null&&x<1||F(f[w],S)))return!0;return!1}function k(h){var f=new Date(h);if(isNaN(f.getTime()))return"";try{return f.toLocaleTimeString("nl-NL",{hour:"2-digit",minute:"2-digit",timeZone:a})}catch{try{return new Intl.DateTimeFormat("nl-NL",{hour:"2-digit",minute:"2-digit",timeZone:a}).format(f)}catch{return f.toLocaleTimeString("nl-NL",{hour:"2-digit",minute:"2-digit"})}}}function E(h,f){function S(A){if(A==null||String(A).trim()==="")return"";var q=String(A).trim(),C=new Date(q);if(!isNaN(C.getTime()))try{return C.toLocaleTimeString("nl-NL",{hour:"2-digit",minute:"2-digit",timeZone:a})}catch{try{return new Intl.DateTimeFormat("nl-NL",{hour:"2-digit",minute:"2-digit",timeZone:a}).format(C)}catch{return C.toLocaleTimeString("nl-NL",{hour:"2-digit",minute:"2-digit"})}}var M=q.match(/^(\d{1,2}):(\d{2})/);if(M)return String(parseInt(M[1],10)).padStart(2,"0")+":"+M[2];var $=q.match(/T(\d{2}:\d{2})/);return $?$[1]:""}var x=S(h),w=S(f);return x&&w?x+" \u2013 "+w:x||w||""}function B(h){var f=h==null?"":String(h).trim();if(!f)return 0;var S=new Date(f).getTime();if(!isNaN(S))return S;var x=f.match(/^(\d{1,2}):(\d{2})/);return x?parseInt(x[1],10)*60+parseInt(x[2],10):f.localeCompare("")}function X(h){if(h==null||String(h).trim()==="")return"";var f=String(h).trim();if(f.length>=19&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(f))return f.slice(0,19);var S="(?:Z|[+-]\\d{2}:?\\d{2}(?::\\d{2})?)?$",x=f.match(new RegExp("^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2})(?:\\.\\d+)?"+S,"i"));if(x)return x[1];var w=f.match(new RegExp("^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2})(?:\\.\\d+)?"+S,"i"));return w?w[1]+":00":""}function ot(h){var f=document.querySelector("[data-capacity-date-input]");f&&(f.value=h!=null&&h!==""?X(String(h).trim()):"",f.dispatchEvent(new Event("change",{bubbles:!0})))}function ut(h){for(var f={},S=0;S<h.length;S++)f[l(h[S].startTime)]=!0;return Object.keys(f).sort()}function yt(h){for(var f={},S=0;S<h.length;S++){var x=h[S];if(!(!x||x.startTime==null)){var w=String(x.startTime).trim();if(w){var A=f[w];if(!A){f[w]=Object.assign({},x),f[w].availablePerPriceKey=Object.assign({},x.availablePerPriceKey||{});continue}var q=Object.assign({},A.availablePerPriceKey||{}),C=x.availablePerPriceKey||{};for(var M in C)if(Object.prototype.hasOwnProperty.call(C,M)){var $=C[M],it=q[M];it==null?q[M]=$:$!=null&&(q[M]=Math.max(Number(it),Number($)))}A.availablePerPriceKey=q}}}return Object.keys(f).sort(function(Q,Nt){return new Date(Q)-new Date(Nt)}).map(function(Q){return f[Q]})}function _t(h){if(!h||h.startTime==null||h.isFullyBooked===!0||h.fullyBooked===!0||h.available===!1)return!1;var f=h.availablePerPriceKey;if(f==null||typeof f!="object")return!0;var S=Object.keys(f);if(S.length===0)return!0;for(var x=!1,w=!1,A=0;A<S.length;A++){var q=f[S[A]],C=Number(q);Number.isFinite(C)&&(x=!0,C>0&&(w=!0))}return x?w:!0}function ft(h){for(var f=[],S=0;S<h.length;S++)_t(h[S])&&f.push(h[S]);return f}function st(h,f){if(!(typeof console>"u"||!console.log)){var S=Ut();f&&typeof f=="object"?console.log("[NF Ticketcounter]",h,Object.assign({context:S},f)):console.log("[NF Ticketcounter]",h,{context:S})}}function qt(h,f){if(!(typeof console>"u")){var S="[Ticketcounter proxy]",x=f&&typeof f=="object"?f:{info:f};h==="connecting"?console.log&&console.log(S,"Connecting (theme setting ticketcounter_app_proxy_prefix)\u2026",x):h==="connected"?console.log&&console.log(S,"\u2705 CONNECTED \u2014 app proxy returned JSON with slots.",x):h==="empty"?console.warn&&console.warn(S,"\u26A0\uFE0F Reached app proxy (HTTP OK) but slots array is empty.",x):h==="failed"&&console.warn&&console.warn(S,"\u274C NOT CONNECTED \u2014 request failed or response was not val
1id JSON.",x)}}function Xt(h,f){if(!(typeof console>"u")){var S="[Vintia proxy]",x=f&&typeof f=="object"?f:{info:f};h==="connecting"?console.log&&console.log(S,"Connecting (theme setting vintia_app_proxy_prefix)\u2026",x):h==="connected"?console.log&&console.log(S,"\u2705 CONNECTED \u2014 app proxy returned JSON with slots.",x):h==="empty"?console.warn&&console.warn(S,"\u26A0\uFE0F Reached app proxy (HTTP OK) but slots array is empty.",x):h==="failed"&&console.warn&&console.warn(S,"\u274C NOT CONNECTED \u2014 request failed or response was not valid JSON.",x)}}function Ft(h,f){if(!(typeof console>"u"||!console.log)){var S=Ut();f&&typeof f=="object"?console.log("[NF Vintia]",h,Object.assign({context:S},f)):console.log("[NF Vintia]",h,{context:S})}}function oe(h){var f=(h||"").trim();return f?f.indexOf("/apps/")===0?f.replace(/\/$/,""):f.indexOf("apps/")===0?("/"+f).replace(/\/$/,""):("/apps/"+f.replace(/^\/+/,"")).replace(/\/$/,""):"/apps/dpg-tc-integration"}function fe(){try{var h=typeof window<"u"&&window.location?window.location.hostname:"";return h==="127.0.0.1"||h==="localhost"||h==="0.0.0.0"}catch{return!1}}function Mt(h){if(!h||typeof h!="string")return h;var f=h.trim();if(/^https?:\/\//i.test(f)||f.indexOf("/")!==0)return f;var S=document.getElementById("datepicker-embla-root"),x=S&&S.dataset.shopOrigin?String(S.dataset.shopOrigin).trim().replace(/\/$/,""):"";if(!x||!fe())return f;try{return new URL(f,x+"/").href}catch{return f}}function Jt(h,f){var S=oe(h)+"/api/proxy/capacity-slots",x="shopifyProductId="+encodeURIComponent(f),w=document.getElementById("datepicker-embla-root"),A=w&&w.dataset.capacityUrlOverride?String(w.dataset.capacityUrlOverride).trim():"";if(!A)return Mt(S+"?"+x);try{var q=typeof window<"u"&&window.location&&window.location.href?window.location.href:"http://localhost/",C=new URL(A,q),M=C.pathname||"";if(M===""||M==="/")return Mt(C.origin+S+"?"+x)}catch{}var $=A.indexOf("?")>=0?"&":"?";return Mt(A.replace(/\/$/,"")+$+x)}function te(h){var f=(h||"").trim();return f?f.indexOf("/apps/")===0?f.replace(/\/$/,""):f.indexOf("apps/")===0?("/"+f).replace(/\/$/,""):("/apps/"+f.replace(/^\/+/,"")).replace(/\/$/,""):"/apps/dpg-v-integration"}function At(h){if(h==null)return null;if(typeof h=="string"){var f=h.trim();if(f===""||f.toLowerCase()==="null")return null;var S=f.toLowerCase();if(S==="perday")return"PerDay";if(S==="perslot")return"PerSlot"}return h}function vt(h,f){var S=te(h)+"/api/proxy/vintia/capacity-slots",x="shopifyProductId="+encodeURIComponent(f),w=document.getElementById("datepicker-embla-root"),A=w&&w.dataset.vintiaCapacityUrlOverride?String(w.dataset.vintiaCapacityUrlOverride).trim():"";if(!A)return Mt(S+"?"+x);try{var q=typeof window<"u"&&window.location&&window.location.href?window.location.href:"http://localhost/",C=new URL(A,q),M=C.pathname||"";if(M===""||M==="/")return Mt(C.origin+S+"?"+x)}catch{}var $=A.indexOf("?")>=0?"&":"?";return Mt(A.replace(/\/$/,"")+$+x)}function kt(h){var f=!1;try{if(typeof window<"u"&&window.location&&window.location.href){var S=new URL(h,window.location.href);f=S.origin!==window.location.origin}}catch{f=!1}return fetch(h,{credentials:f?"omit":"same-origin",mode:"cors",headers:{Accept:"application/json"}}).then(function(x){var w=(x.headers.get("content-type")||"").toLowerCase();return x.text().then(function(A){var q=(A||"").trim();if(!q)throw new Error("Empty body (HTTP "+x.status+")");if(q.charAt(0)==="<"||w.indexOf("text/html")!==-1)throw new Error("App proxy returned HTML, not JSON (HTTP "+x.status+"). Check: embedded app installed on this shop, App proxy URL matches theme setting (e.g. /apps/dpg-tc-integration-dev), and the route exists in the app.");var C;try{C=JSON.parse(A)}catch(M){throw new Error("Response is not JSON (HTTP "+x.status+"): "+(M&&M.message))}if(!x.ok)throw new Error(C&&(C.message||C.description||C.error)||"HTTP "+x.status);return C})})}function Ut(){var h=document.getElementById("datepicker-embla-root"),f=[];return document.querySelectorAll("[data-breakdown-active] .nf-quantity-breakdown__row").forEach(function(S){f.push({variantId:S.dataset.variantId||null,sku:(S.dataset.variantSku||"").trim()||null,requiresCapacitySlot:S.dataset.requiresCapacitySlot==="true"})}),{productGid:h&&h.dataset.productGid?h.dataset.productGid:null,appProxyPrefix:h&&h.dataset.appProxyPrefix?h.dataset.appProxyPrefix:null,vintiaAppProxyPrefix:h&&h.dataset.vintiaAppProxyPrefix?h.dataset.vintiaAppProxyPrefix:null,ticketcounterBlocks:{datepicker:h?h.dataset.ticketcounter==="true":!1,timepicker:!!document.querySelector('[data-timepicker][data-ticketcounter="true"]')},vintiaBlocks:{datepicker:h?h.dataset.vintia==="true":!1,timepicker:!!document.querySelector('[data-timepicker][data-vintia="true"]')},breakdownVariants:f}}var nt=["19:00","19:30","20:00","20:30","21:00","21:30","22:00","22:30","23:00","23:30","24:00"];function N(){var h=document.querySelector("[data-datepicker-input]");return h&&h.value?String(h.value).trim():""}function et(h,f){if(!h||!f)return"";var S=String(f).match(/^(\d{1,2}):(\d{2})/);if(!S)return"";var x=String(parseInt(S[1],10)).padStart(2,"0"),w=String(parseInt(S[2],10)).padStart(2,"0");return x==="24"?h+"T23:59:59":h+"T"+x+":"+w+":00"}function wt(h){var f=h.querySelector("[data-ticketcounter-slot-grid]");if(f){var S=8;f.innerHTML="",nt.forEach(function(C,M){var $=document.createElement("button");$.type="button",$.className="nf-timepicker-slot flex flex-col items-center justify-center rounded-[8px] !max-h-[36px] !bg-white py-1.5 w-full font-medium leading-[1.5] !text-[#414141] text-center tracking-[-0.16px] transition-opacity disabled:cursor-not-allowed data-[selected=true]:ring-1 data-[selected=true]:ring-[var(--button-background)] data-[selected=true]:ring-inset hover:opacity-90",M>=S&&$.classList.add("nf-timepicker-slot-more","hidden"),$.setAttribute("data-time-slot",C),$.setAttribute("aria-pressed",M===0?"true":"false"),$.setAttribute("data-selected",M===0?"true":"false"),$.setAttribute("aria-label","Tijd "+C),$.textContent=C,f.appendChild($)});var x=h.querySelector("[data-timepicker-show-more]");x&&(x.classList.remove("hidden"),x.setAttribute("aria-expanded","fal
1se"));var w=h.querySelector("[data-timepicker-input]");if(w){var A=N(),q=et(A,nt[0]);w.value=q||nt[0]}h.dataset.nfFallbackDateBridge||(h.dataset.nfFallbackDateBridge="true",document.addEventListener("datepicker:change",function(){if(h.dataset.tcApiFailed==="true"){var C=h.querySelector("[data-timepicker-input]"),M=h.querySelector('.nf-timepicker-slot[data-selected="true"]');if(!(!C||!M)){var $=M.getAttribute("data-time-slot")||"",it=et(N(),$);it&&(C.value=it)}}}))}}function Dt(h,f,S,x){if(st("pickerMode: FALLBACK \u2014 dates & times use static UI (not live Ticketcounter slots)",{reason:x||"unknown",ui:"datepicker: 32-day rolling calendar \xB7 timepicker: hardcoded slot list",note:S||null}),h&&(h.dataset.tcApiFailed="true",delete h.dataset.tcPickerReady),f){f.dataset.tcApiFailed="true",delete f.dataset.timepickerInited;var w=f.querySelector("[data-ticketcounter-time-status]");w&&S&&(w.textContent=S,w.classList.remove("hidden")),wt(f)}$e(),He(),Bt()}function ae(){var h=document.getElementById("datepicker-embla-root");if(!h||h.dataset.ticketcounter!=="true")return!1;var f=document.querySelector('[data-breakdown-active][data-fulfillment-vendor="ticketcounter"]');if(!f)return!1;var S=0;if(f.querySelectorAll("[data-breakdown-input]").forEach(function(C){S+=parseInt(C.value,10)||0}),S<1)return!1;if(h.dataset.tcApiFailed==="true"||h.dataset.tcFetching==="true"||h.dataset.tcRefreshing==="true"||h.dataset.tcPickerReady!=="true")return!0;var x=document.querySelector('[data-timepicker][data-ticketcounter="true"]'),w=x&&x.querySelector("[data-ticketcounter-slot-grid]"),A=w?w.querySelectorAll(".nf-timepicker-slot"):[];if(A.length===0)return!0;var q=x&&x.querySelector('.nf-timepicker-slot[data-selected="true"]');return!!(!q||q.disabled)}function me(){var h=ae(),f=document.getElementById("datepicker-embla-root");f&&f.dataset.ticketcounter==="true"&&(f.dataset.nfTcAtcBlocked=h?"true":"false"),document.querySelectorAll('[data-breakdown-active][data-fulfillment-vendor="ticketcounter"]').forEach(function(S){var x=S.dataset.productFormId,w=x?document.getElementById(x):null;if(w){var A=w.querySelector('.add-to-cart-button[type="submit"], button[type="submit"]');if(A){var q=document.querySelector('variant-selects[data-form-id="'+w.id+'"]');h?(A.dataset.nfTcGateBlocked="true",A.disabled=!0,A.classList.add("opacity-50","cursor-not-allowed"),A.setAttribute("aria-disabled","true"),w.querySelectorAll("[data-dynamic-checkout-wrapper]").forEach(function(C){C.dataset.nfTcExpressBlocked="true",C.classList.add("pointer-events-none","opacity-50"),C.setAttribute("aria-disabled","true")})):A.dataset.nfTcGateBlocked==="true"&&(delete A.dataset.nfTcGateBlocked,w.querySelectorAll("[data-dynamic-checkout-wrapper]").forEach(function(C){C.dataset.nfTcExpressBlocked==="true"&&delete C.dataset.nfTcExpressBlocked}),q&&typeof q.toggleAddToCart=="function"?q.toggleAddToCart(q.currentVariant):(A.disabled=!1,A.classList.remove("opacity-50","cursor-not-allowed"),A.removeAttribute("aria-disabled"),w.querySelectorAll("[data-dynamic-checkout-wrapper]").forEach(function(C){C.classList.remove("pointer-events-none","opacity-50"),C.removeAttribute("aria-disabled")})))}}}),document.dispatchEvent(new CustomEvent("nf-ticketcounter:atc-gate",{bubbles:!0,detail:{blocked:h}}))}function Bt(){me()}function Yt(h){var f=document.querySelector("[data-vintia-time-slot-id]");f&&(f.value=h!=null&&h!==""?String(h):"",f.dispatchEvent(new Event("change",{bubbles:!0})))}function Ae(h){var f=h.querySelector("[data-vintia-slot-grid]");if(f){var S=8;f.innerHTML="",nt.forEach(function(A,q){var C=document.createElement("button");C.type="button",C.className="nf-timepicker-slot flex flex-col items-center justify-center rounded-[8px] !max-h-[36px] !bg-white py-1.5 w-full font-medium leading-[1.5] !text-[#414141] text-center tracking-[-0.16px] transition-opacity disabled:cursor-not-allowed data-[selected=true]:ring-1 data-[selected=true]:ring-[var(--button-background)] data-[selected=true]:ring-inset hover:opacity-90",q>=S&&C.classList.add("nf-timepicker-slot-more","hidden"),C.setAttribute("data-time-slot",A),C.setAttribute("data-time-label",A),C.setAttribute("aria-pressed",q===0?"true":"false"),C.setAttribute("data-selected",q===0?"true":"false"),C.setAttribute("aria-label","Tijd "+A),C.textContent=A,f.appendChild(C)});var x=h.querySelector("[data-timepicker-show-more]");x&&(x.classList.remove("hidden"),x.setAttribute("aria-expanded","fal
1se"));var w=h.querySelector("[data-timepicker-input]");w&&(w.value=nt[0]||""),Yt("")}}function Ce(h,f,S,x){if(Ft("pickerMode: FALLBACK \u2014 static UI (Vintia app proxy error or empty)",{reason:x||"unknown",note:S||null}),h&&(h.dataset.vintiaApiFailed="true",delete h.dataset.vintiaPickerReady,delete h.dataset.vintiaFrequencyType),f){delete f.dataset.timepickerInited;var w=f.querySelector("[data-vintia-time-status]");w&&S&&(w.textContent=S,w.classList.remove("hidden")),Ae(f)}h&&h.classList.remove("nf-vintia--hidden"),f&&f.classList.remove("nf-vintia--hidden"),$e(),He()}function ii(){var h=document.getElementById("datepicker-embla-root"),f=document.querySelector('[data-timepicker][data-vintia="true"]');if(!h||h.dataset.vintia!=="true"||!f||h.dataset.vintiaInited==="true"||h.dataset.vintiaFetching==="true")return;var S=te(h.dataset.vintiaAppProxyPrefix||"/apps/dpg-v-integration"),x=h.dataset.productGid||"",w=h.querySelector("[data-vintia-datepicker-status]"),A=f.querySelector("[data-vintia-time-status]"),q=h.querySelector("[data-datepicker-viewport]"),C=h.querySelector("[data-datepicker-container]"),M=h.querySelector(".datepicker-embla__prev"),$=h.querySelector(".datepicker-embla__next"),it=h.querySelector("[data-datepicker-input]");if(!x||!q||!C||!M||!$){w&&(w.textContent="Product ontbreekt.",w.classList.remove("hidden")),h.dataset.vintiaInited="true",Ce(h,f,"","missing_product_gid_or_datepicker_dom");return}h.dataset.vintiaFetching="true",delete h.dataset.vintiaApiFailed;var Q=vt(S,x);Xt("connecting",{themeSettingAppProxyPrefix:S,requestUrl:Q,shopOrigin:h.dataset.shopOrigin||"",capacityUrlOverride:h.dataset.vintiaCapacityUrlOverride||"(none)"});try{var Nt=typeof window<"u"&&window.location?window.location.hostname:"",ge=Nt==="127.0.0.1"||Nt==="localhost"||Nt==="0.0.0.0"||window.location.port==="9292";ge&&!h.dataset.vintiaCapacityUrlOverride&&console.info&&console.info("[Vintia proxy] Localhost dev: capacity URL is resolved against data-shop-origin so /apps/\u2026 hits Shopify (not this dev server). If fetch fails with CORS, set Theme settings \u2192 Vintia \u2192 Capacity URL override to your app\u2019s CORS URL, or open the theme preview on *.myshopify.com.")}catch{}Ft("Vintia: fetching capacity-slots\u2026",{url:Q}),w&&w.classList.remove("hidden");var Y=[],j=null,at=null,tt=null,lt=null,ye=0;function ee(){let V=q.parentElement;V.style.width="",V.style.maxWidth="",q.style.width="",q.style.maxWidth="",V.offsetWidth;let W=V.getBoundingClientRect().width||0,U=typeof window<"u"?window.innerWidth:9999,H=Math.max(260,Math.min(W||U,U));C.querySelectorAll(".embla__slide").forEach(function(K){K.style.flex="0 0 "+H+"px",K.style.width=H+"px",K.style.maxWidth=H+"px"})}function le(){lt&&(M.disabled=!lt.canScrollPrev(),$.disabled=!lt.canScrollNext())}function J(V,D,W,U,z,H){return'<button type="button" class="datepicker-card flex flex-col gap-1 items-center justify-center text-center cursor-pointer border-0 w-full rounded-[8px] p-[8px] !bg-white !text-[#414141] [-webkit-tap-highlight-color:transparent]'+(H&&!z?" datepicker-card--selected":"")+(z?" opacity-60 cursor-not-allowed pointer-events-none":"")+'" data-date="'+V+'" role="option" aria-selected="'+(H?"true":"false")+'"'+(z?' aria-disabled="true"':"")+'><span class="datepicker-day text-sm font-normal leading-normal m-0">'+D+'</span><span class="datepicker-num font-bold text-3xl leading-tight m-0">'+W+'</span><span class="datepicker-month text-sm font-normal leading-normal m-0">'+U+"</span></button>"}function Tt(V){at=V,it&&(it.value=V||"",it.dispatchEvent(new Event("change",{bubbles:!0}))),h.dispatchEvent(new CustomEvent("datepicker:change",{bubbles:!0,detail:{date:V?new Date(V+"T12:00:00"):null,value:V||""}}))}function Ct(V){for(var D=0;D<Y.length;D++)if(Y[D].date===V)return Y[D];return null}function dt(){if(j==="PerSlot"){var V=f.querySelector("[data-vintia-slot-grid]");if(V){var D=I(),W=Ct(at),U=W&&W.timeSlots||[],z=U.slice().sort(function(mt,_i){return B(mt.startTime)-B(_i.startTime)});V.innerHTML="";var H=8;z.forEach(function(mt,_i){var Rs=mt.availableQuantity!=null?mt.availableQuantity:0,ur=Rs>=D&&Rs>0,el=String(mt.startTime||"").trim()+" \u2013 "+String(mt.endTime||"").trim(),Ti=E(mt.startTime,mt.endTime)||el,Rt=document.createElement("button");Rt.type="button",Rt.className="nf-timepicker-slot nf-timepicker-slot--range flex flex-col items-center justify-center rounded-[8px] min-h-[36px] !max-h-none !bg-white py-1.5 px-1 w-full font-medium leading-[1.5] !text-[#414141] text-center tracking-[-0.16px] transition-opacity disabled:cursor-not-allowed data-[selected=true]:ring-1 data-[selected=true]:ring-[var(--button-background)] data-[selected=true]:ring-inset",_i>=H&&Rt.classList.add("nf-timepicker-slot-more","hidden"),ur||Rt.classList.add("opacity-30"),Rt.setAttribute("data-vintia-time-slot-id-val",mt.timeSlotId!=null?String(mt.timeSlotId):""),Rt.setAttribute("data-time-label",Ti),Rt.setAttribute("data-time-slot",Ti),Rt.setAttribute("data-vintia-start-iso",(mt.startTime||"").trim()),Rt.setAttribute("data-vintia-end-iso",(mt.endTime||"").trim()),Rt.disabled=!ur,Rt.setAttribute("aria-pressed","fal
1se"),Rt.setAttribute("data-selected","false"),Rt.setAttribute("aria-label","Tijd "+Ti),Rt.textContent=Ti,Rt.addEventListener("click",function(){if(ur){V.querySelectorAll(".nf-timepicker-slot").forEach(function(qs){qs.setAttribute("aria-pressed","false"),qs.setAttribute("data-selected","false")}),Rt.setAttribute("aria-pressed","true"),Rt.setAttribute("data-selected","true"),tt=mt.timeSlotId,Yt(mt.timeSlotId);var dr=f.querySelector("[data-timepicker-input]");dr&&(dr.value=Ti,dr.dispatchEvent(new Event("change",{bubbles:!0})))}}),V.appendChild(Rt)});var G=f.querySelector("[data-timepicker-show-more]"),K=V.querySelectorAll(".nf-timepicker-slot-more");if(G)if(z.length>H){G.classList.remove("hidden"),G.setAttribute("aria-expanded","false");var rt=G.querySelector(".nf-timepicker-show-more-label"),ct=G.querySelector(".nf-timepicker-show-more-icon");rt&&(rt.textContent="Meer tonen"),ct&&(ct.style.transform=""),G.onclick=function(){var mt=G.getAttribute("aria-expanded")==="true";K.forEach(function(_i){_i.classList.toggle("hidden",mt)}),G.setAttribute("aria-expanded",mt?"false":"true"),rt&&(rt.textContent=mt?"Meer tonen":"Minder tonen"),ct&&(ct.style.transform=mt?"":"rotate(180deg)")}}else G.classList.add("hidden");A&&A.classList.add("hidden");var $t=null;if(tt!=null&&W){for(var Zt=0;Zt<z.length;Zt++)if(String(z[Zt].timeSlotId)===String(tt)){var be=z[Zt].availableQuantity!=null?z[Zt].availableQuantity:0;be>=D&&be>0&&($t=tt);break}}if($t==null&&z.length)for(var ht=0;ht<z.length;ht++){var Gt=z[ht].availableQuantity!=null?z[ht].availableQuantity:0;if(Gt>=D&&Gt>0){$t=z[ht].timeSlotId;break}}if($t!=null){tt=$t,Yt($t);var ie=V.querySelector('[data-vintia-time-slot-id-val="'+String($t)+'"]');if(ie&&!ie.disabled){ie.setAttribute("aria-pressed","true"),ie.setAttribute("data-selected","true");var bt=f.querySelector("[data-timepicker-input]");bt&&(bt.value=ie.getAttribute("data-time-label")||"")}}else tt=null,Yt("")}}}function Et(){var V=R(Y);if(C.innerHTML="",V.length===0){w&&(w.textContent="Geen beschikbare data.",w.classList.remove("hidden")),r(h,null,null);return}w&&w.classList.add("hidden");var D=d();if(ye=D,!at||V.indexOf(at)===-1){at=null;for(var W=0;W<V.length;W++)if(L(V[W],Y,j)){at=V[W];break}at||(at=V[0])}for(var U=document.createDocumentFragment(),z=0;z<V.length;z+=D){var H=document.createElement("div");H.className="embla__slide flex-shrink-0 flex !gap-[10px]";for(var G=0;G<D&&z+G<V.length;G++){var K=V[z+G],rt=new Date(K+"T12:00:00"),ct=!L(K,Y,j),$t=K===at,Zt=n[rt.getDay()],be=rt.getDate(),ht=t[rt.getMonth()],Gt=document.createElement("div");Gt.className="datepicker-card-wrap min-w-0",Gt.innerHTML=J(K,Zt,be,ht,ct,$t);var ie=Gt.querySelector(".datepicker-card");It(ie,K,ct),H.appendChild(Gt)}U.appendChild(H)}C.appendChild(U),Tt(at),ee(),r(h,V[0],V[V.length-1]),s(h,at)}function It(V,D,W){V.addEventListener("click",function(){W||(h.querySelectorAll('.datepicker-card[aria-selected="true"]').forEach(function(U){U.classList.remove("datepicker-card--selected"),U.setAttribute("aria-selected","false")}),V.classList.add("datepicker-card--selected"),V.setAttribute("aria-selected","true"),at=D,Tt(D),s(h,D),dt())})}function ce(){lt&&(lt.destroy(),lt=null),lt=window.EmblaCarousel(q,{loop:!1,align:"start",containScroll:"trimSnaps",dragFree:!1,skipSnaps:!1,slidesToScroll:1,duration:25}),lt.on("init",function(){ee(),le()}),lt.on("select",le),lt.on("reInit",le),le()}function zt(){Y.length&&(Et(),typeof window.EmblaCarousel=="function"&&requestAnimationFrame(function(){ee(),ce()}),j==="PerSlot"&&dt())}function wi(){var V=d();V!==ye?(ye=V,Et(),requestAnimationFrame(function(){ee(),ce()})):(ee(),lt&<.reInit())}kt(Q).then(function(V){delete h.dataset.vintiaFetching;var D=V&&Object.prototype.hasOwnProperty.call(V,"frequencyType")?V.frequencyType:null;if(j=At(D),Y=V&&V.slots||[],j==null){h.dataset.vintiaInited="true",h.dataset.vintiaPickerReady="true",h.dataset.vintiaFrequencyType="none",h.classList.add("nf-vintia--hidden"),f.classList.add("nf-vintia--hidden"),w&&w.classList.add("hidden"),A&&A.classList.add("hidden"),Xt("connected",{themeSettingAppProxyPrefix:S,frequencyType:null,requestUrl:Q}),Ft("pickerMode: Vintia \u2014 no calendar (frequencyType null, total capacity)",{});return}
1if(Y.length===0){Xt("empty",{themeSettingAppProxyPrefix:S,requestUrl:Q,frequencyType:j}),w&&(w.textContent="Geen tijdsloten beschikbaar.",w.classList.remove("hidden")),h.dataset.vintiaInited="true",Ce(h,f,"Geen Vintia-slots \u2014 kies hieronder (controleer app-proxy).","api_returned_zero_slots");return}Xt("connected",{themeSettingAppProxyPrefix:S,slotCount:Y.length,frequencyType:j,requestUrl:Q}),h.dataset.vintiaInited="true",f.dataset.timepickerInited="true",h.dataset.vintiaPickerReady="true",h.dataset.vintiaFrequencyType=j,h.classList.remove("nf-vintia--hidden"),f.classList.remove("nf-vintia--hidden"),j==="PerDay"?(f.classList.add("nf-vintia--hidden"),Yt("")):f.classList.remove("nf-vintia--hidden"),w&&w.classList.add("hidden");function W(){if(typeof window.EmblaCarousel!="function"){setTimeout(W,50);return}Et(),ce(),it&&at&&(it.value=at),M.addEventListener("click",function(){lt&<.scrollPrev()}),$.addEventListener("click",function(){lt&<.scrollNext()}),j==="PerSlot"&&dt(),Ft("pickerMode: DYNAMIC \u2014 dates from Vintia (app proxy)",{frequencyType:j,dayCount:R(Y).length});var U=h.querySelector("[data-datepicker-calendar-input]");U&&(h._nfCalendarInputHandler&&U.removeEventListener("change",h._nfCalendarInputHandler),h._nfCalendarInputHandler=function(){var z=U.value;if(z){var H=C.querySelector('.datepicker-card[data-date="'+z+'"]');!H||H.getAttribute("aria-disabled")==="true"||(h.querySelectorAll('.datepicker-card[aria-selected="true"]').forEach(function(G){G.classList.remove("datepicker-card--selected"),G.setAttribute("aria-selected","false")}),H.classList.add("datepicker-card--selected"),H.setAttribute("aria-selected","true"),at=z,Tt(z),dt(),o(C,lt,H))}},U.addEventListener("change",h._nfCalendarInputHandler))}W(),m={syncAndRender:function(){},handleResize:wi},y(),h.dataset.vintiaDemandListener||(h.dataset.vintiaDemandListener="true",document.addEventListener("nf-vintia:demand-changed",function(){j==="PerSlot"&&dt(),zt()},!1))}).catch(function(V){delete h.dataset.vintiaFetching,Xt("failed",{themeSettingAppProxyPrefix:S,requestUrl:Q,error:V&&V.message?V.message:String(V)}),w&&(w.textContent="Geen tijdsloten geladen. Probeer het later opnieuw.",w.classList.remove("hidden")),h.dataset.vintiaInited="true",Ce(h,f,"Kon Vintia-slots niet laden \u2014 controleer app-proxy.","fetch_or_http_error: "+(V&&V.message?V.message:String(V)))})}function ni(){var h=document.getElementById("datepicker-embla-root"),f=document.querySelector('[data-timepicker][data-ticketcounter="true"]');if(h&&h.dataset.vintia==="true"||!h||h.dataset.ticketcounter!=="true"||!f||h.dataset.tcInited==="true"||h.dataset.tcFetching==="true")return;var S=oe(h.dataset.appProxyPrefix||"/apps/dpg-tc-integration"),x=h.dataset.productGid||"",w=h.querySelector("[data-ticketcounter-datepicker-status]"),A=f.querySelector("[data-ticketcounter-time-status]"),q=h.querySelector("[data-datepicker-viewport]"),C=h.querySelector("[data-datepicker-container]"),M=h.querySelector(".datepicker-embla__prev"),$=h.querySelector(".datepicker-embla__next"),it=h.querySelector("[data-datepicker-input]");if(!x||!q||!C||!M||!$){w&&(w.textContent="Product ontbreekt.",w.classList.remove("hidden")),h.dataset.tcInited="true",Dt(h,f,"","missing_product_gid_or_datepicker_dom");return}h.dataset.tcFetching="true";var Q=Jt(S,x);qt("connecting",{themeSettingAppProxyPrefix:S,requestUrl:Q,shopOrigin:h.dataset.shopOrigin||"",capacityUrlOverride:h.dataset.capacityUrlOverride||"(none \u2014 uses same-origin /apps/... on your shop)",note:"On localhost, relative /apps/\u2026 is rewritten to your shop URL (data-shop-origin) so the app proxy runs on Shopify."});try{var Nt=typeof window<"u"&&window.location?window.location.hostname:"",ge=Nt==="127.0.0.1"||Nt==="localhost"||Nt==="0.0.0.0"||window.location.port==="9292";ge&&!h.dataset.capacityUrlOverride&&console.info&&console.info("[Ticketcounter proxy] Localhost dev: capacity URL is resolved against data-shop-origin so /apps/\u2026 hits Shopify. If fetch fails with CORS, set Theme settings \u2192 Ticketcounter \u2192 Capacity URL override (or use theme preview on *.myshopify.com).")}catch{}st("Ticketcounter: fetching capacity-slots\u2026",{url:Q,note:"On localhost, relative /apps/\u2026 is rewritten to shop origin (see resolveAppProxyFetchUrlForLocalDev)."}),w&&w.classList.remove("hidden");var Y=[],j=null,at=null,tt=null,lt=0,ye=0;function ee(){let D=q.parentElement;D.style.width="",D.style.maxWidth="",q.style.width="",q.style.maxWidth="",D.offsetWidth;let U=D.getBoundingClientRect().width||0,z=typeof window<"u"?window.innerWidth:9999,G=Math.max(260,Math.min(U||z,z));C.querySelectorAll(".embla__slide").forEach(function(rt){rt.style.flex="0 0 "+G+"px",rt.style.width=G+"px",rt.style.maxWidth=G+"px"})}function le(){tt&&(M.disabled=!tt.canScrollPrev(),$.disabled=!tt.canScrollNext())}function J(D,W,U,z,H,G){return'<button type="button" class="datepicker-card flex flex-col gap-1 items-center justify-center text-center cursor-pointer border-0 w-full rounded-[8px] p-[8px] !bg-white !text-[#414141] [-webkit-tap-highlight-color:transparent]'+(G&&!H?" datepicker-card--selected":"")+(H?" opacity-60 cursor-not-allowed pointer-events-none":"")+'" data-date="'+D+'" role="option" aria-selected="'+(G?"true":"false")+'"'+(H?' aria-disabled="true"':"")+'><span class="datepicker-day text-sm font-normal leading-normal m-0">'+W+'</span><span class="datepicker-num font-bold text-3xl leading-tight m-0">'+U+'</span><span class="datepicker-month text-sm font-normal leading-normal m-0">'+z+"</span></button>"}function Tt(D){j=D,it&&(it.value=D||"",it.dispatchEvent(new Event("change",{bubbles:!0}))),h.dispatchEvent(new CustomEvent("datepicker:change",{bubbles:!0,detail:{date:D?new Date(D+"T12:00:00"):null,value:D||""}}))}function Ct(){var D=f.querySelector("[data-ticketcounter-slot-grid]");if(D){var W=v(),U=Y.filter(function(ht){return l(ht.startTime)===j});
1U.sort(function(ht,Gt){return new Date(ht.startTime)-new Date(Gt.startTime)}),D.innerHTML="";var z=8;U.forEach(function(ht,Gt){var ie=F(ht,W),bt=document.createElement("button");bt.type="button",bt.className="nf-timepicker-slot flex flex-col items-center justify-center rounded-[8px] !max-h-[36px] !bg-white py-1.5 w-full font-medium leading-[1.5] !text-[#414141] text-center tracking-[-0.16px] transition-opacity disabled:cursor-not-allowed data-[selected=true]:ring-1 data-[selected=true]:ring-[var(--button-background)] data-[selected=true]:ring-inset",Gt>=z&&bt.classList.add("nf-timepicker-slot-more","hidden"),ie||bt.classList.add("opacity-30"),bt.setAttribute("data-capacity-start-iso",ht.startTime),bt.setAttribute("data-time-slot",k(ht.startTime)),bt.disabled=!ie,bt.setAttribute("aria-pressed","false"),bt.setAttribute("data-selected","false"),bt.setAttribute("aria-label","Tijd "+k(ht.startTime)),bt.textContent=k(ht.startTime),bt.addEventListener("click",function(){ie&&(D.querySelectorAll(".nf-timepicker-slot").forEach(function(mt){mt.setAttribute("aria-pressed","false"),mt.setAttribute("data-selected","false")}),bt.setAttribute("aria-pressed","true"),bt.setAttribute("data-selected","true"),at=ht.startTime,ot(ht.startTime),zt("time-slot").catch(function(){}))}),D.appendChild(bt)});var H=f.querySelector("[data-timepicker-show-more]"),G=D.querySelectorAll(".nf-timepicker-slot-more");if(H)if(U.length>z){H.classList.remove("hidden"),H.setAttribute("aria-expanded","false");var K=H.querySelector(".nf-timepicker-show-more-label"),rt=H.querySelector(".nf-timepicker-show-more-icon");K&&(K.textContent="Meer tonen"),rt&&(rt.style.transform=""),H.onclick=function(){var ht=H.getAttribute("aria-expanded")==="true";G.forEach(function(Gt){Gt.classList.toggle("hidden",ht)}),H.setAttribute("aria-expanded",ht?"false":"true"),K&&(K.textContent=ht?"Meer tonen":"Minder tonen"),rt&&(rt.style.transform=ht?"":"rotate(180deg)")}}else H.classList.add("hidden");A&&A.classList.add("hidden");var ct=null;if(at&&l(at)===j){var $t=D.querySelector('[data-capacity-start-iso="'+at+'"]');$t&&!$t.disabled&&(ct=at)}if(!ct&&U.length){for(var Zt=0;Zt<U.length;Zt++)if(F(U[Zt],W)){ct=U[Zt].startTime;break}}if(ct){at=ct,ot(ct);var be=D.querySelector('[data-capacity-start-iso="'+ct+'"]');be&&(be.setAttribute("aria-pressed","true"),be.setAttribute("data-selected","true"))}else at=null,ot("");Bt()}}function dt(){var D=v(),W=ut(Y);if(C.innerHTML="",W.length===0){w&&(w.textContent="Geen beschikbare tijden.",w.classList.remove("hidden")),r(h,null,null);return}w&&w.classList.add("hidden");var U=d();if(lt=U,!j||W.indexOf(j)===-1){j=null;for(var z=0;z<W.length;z++)if(P(W[z],Y,D)){j=W[z];break}j||(j=W[0])}for(var H=document.createDocumentFragment(),G=0;G<W.length;G+=U){var K=document.createElement("div");K.className="embla__slide flex-shrink-0 flex !gap-[10px]";for(var rt=0;rt<U&&G+rt<W.length;rt++){var ct=W[G+rt],$t=new Date(ct+"T12:00:00"),Zt=!P(ct,Y,D),be=ct===j,ht=n[$t.getDay()],Gt=$t.getDate(),ie=t[$t.getMonth()],bt=document.createElement("div");bt.className="datepicker-card-wrap min-w-0",bt.innerHTML=J(ct,ht,Gt,ie,Zt,be);var mt=bt.querySelector(".datepicker-card");Et(mt,ct,Zt),K.appendChild(bt)}H.appendChild(K)}C.appendChild(H),Tt(j),ee(),r(h,W[0],W[W.length-1]),s(h,j)}function Et(D,W,U){D.addEventListener("click",function(){U||(h.querySelectorAll('.datepicker-card[aria-selected="true"]').forEach(function(z){z.classList.remove("datepicker-card--selected"),z.setAttribute("aria-selected","false")}),D.classList.add("datepicker-card--selected"),D.setAttribute("aria-selected","true"),j=W,Tt(W),s(h,W),zt("date-card").catch(function(){}))})}function It(){tt&&(tt.destroy(),tt=null),tt=window.EmblaCarousel(q,{loop:!1,align:"start",containScroll:"trimSnaps",dragFree:!1,skipSnaps:!1,slidesToScroll:1,duration:25}),tt.on("init",function(){ee(),le()}),tt.on("select",le),tt.on("reInit",le),le()}function ce(){if(!Y.length){Bt();return}dt(),typeof window.EmblaCarousel=="function"&&requestAnimationFrame(function(){ee(),It()}),Ct()}function zt(D){if(h.dataset.tcApiFailed==="true")return Promise.resolve({skipped:!0});var W=++ye;h.dataset.tcRefreshing="true",Bt();var U=f.querySelector("[data-ticketcounter-slot-grid]"),z=D||"unknown";return U&&(z==="date-card"||z==="calendar")&&(U.innerHTML=""),A&&(A.textContent="Beschikbaarheid bijwerken\u2026",A.classList.remove("hidden")),st("Ticketcounter: refetch capacity-slots",{reason:z}),kt(Q).then(function(H){return W!==ye?{stale:!0}:(delete h.dataset.tcRefreshing,Y=ft(yt(H&&H.slots||[])),Y.length===0?w&&(w.textContent="Geen tijdsloten beschikbaar.",w.classList.remove("hidden")):w&&w.classList.add("hidden"),A&&A.classList.add("hidden"),ce(),Bt(),{ok:!0,slotCount:Y.length})}).catch(function(H){return W!==ye?Promise.reject({stale:!0}):(delete h.dataset.tcRefreshing,A&&A.classList.add("hidden"),Bt(),st("Ticketcounter: refetch failed",{reason:z,error:H&&H.message?H.message:String(H)}),Promise.reject(H))})}function wi(){var D=d();D!==lt?(lt=D,dt(),requestAnimationFrame(function(){ee(),It()})):(ee(),tt&&tt.reInit())}kt(Q).then(function(D){if(delete h.dataset.tcFetching,Y=ft(yt(D&&D.slots||[])),Y.length===0){qt("empty",{themeSettingAppProxyPrefix:S,requestUrl:Q}),w&&(w.textContent="Geen tijdsloten beschikbaar.",w.classList.remove("hidden")),h.dataset.tcInited="true",Dt(h,f,"Geen Ticketcounter-tijden \u2014 kies een tijd hieronder (controleer app-proxy).","api_returned_zero_slots");return}qt("connected",{themeSettingAppProxyPrefix:S,slotCount:Y.length,requestUrl:Q}),h.dataset.tcInited="true",f.dataset.timepickerInited="true",h.dataset.tcPickerReady="true",w&&w.classList.add("hidden");function W(){if(typeof window.EmblaCarousel!="function"){setTimeout(W,50);return}dt(),It(),it&&j&&(it.value=j),M.addEventListener("click",function(){tt&&tt.scrollPrev()}),$.addEventListener("click",function(){tt&&tt.scrollNext()}),Ct();var U=ut(Y),z=Y.map(function(K){return K&&K.startTime!=null?String(K.startTime).trim():""}).filter(function(K){return K}),H=80;st("pickerMode: DYNAMIC \u2014 dates & times from Ticketcounter (app proxy)",{slotCount:Y.length,uniqueDates:U.length,dateKeysSample:U.slice(0,8),firstSlotStart:Y[0]&&Y[0].startTime?Y[0].startTime:null,availableStartTimesFromApi:z.length>H?z.slice(0,H):z,availableStartTimesFromApiTotal:z.length,availableStartTimesFromApiTruncated:z.length>H});var G=h.querySelector("[data-datepicker-calendar-input]");G&&(h._nfCalendarInputHandler&&G.removeEventListener("change",h._nfCalendarInputHandler),h._nfCalendarInputHandler=function(){var K=G.value;if(K){var rt=C.querySelector('.datepicker-card[data-date="'+K+'"]');!rt||rt.getAttribute("aria-disabled")==="true"||(h.querySelectorAll('.datepicker-card[aria-selected="true"]').forEach(function(ct){ct.classList.remove("datepicker-card--selected"),ct.setAttribute("aria-selected","false")}),rt.classList.add("datepicker-card--selected"),rt.setAttribute("aria-selected","true"),j=K,Tt(K),zt("calendar").then(function(){var ct=C.querySelector('.datepicker-card[data-date="'+K+'"]');ct&&o(C,tt,ct)}).catch(function(){}))}},G.addEventListener("change",h._nfCalendarInputHandler))}W(),h.__nfRefetchTcSlots=zt,m={syncAndRender:function(){},handleResize:wi,refetchCapacitySlots:zt},y()}).catch(function(D){delete h.dataset.tcFetching,qt("failed",{themeSettingAppProxyPrefix:S,requestUrl:Q,error:D&&D.message?D.message:String(D)}),w&&(w.textContent="Geen tijdsloten geladen. Probeer het later opnieuw.",w.classList.remove("hidden")),h.dataset.tcInited="true",Dt(h,f,"Kon Ticketcounter-tijden niet laden \u2014 tijden hieronder zijn alleen ter weergave; controleer app-proxy.","fetch_or_http_error: "+(D&&D.message?D.message:String(D)))});var V=null;document.addEventListener("nf-ticketcounter:demand-changed",function(){ce(),clearTimeout(V),V=setTimeout(function(){zt("demand").catch(function(){})},450)},!1)}function $e(){let h=document.getElementById("datepicker-embla-root");
1if(!h||h.dataset.tcPickerReady==="true"||h.dataset.vintiaPickerReady==="true")return;if(h.dataset.ticketcounter==="true"){var f=document.querySelector('[data-timepicker][data-ticketcounter="true"]');if(f&&h.dataset.tcApiFailed!=="true")return}if(h.dataset.vintia==="true"){var S=document.querySelector('[data-timepicker][data-vintia="true"]');if(S&&h.dataset.vintiaApiFailed!=="true")return}let x=h.querySelector("[data-datepicker-viewport]"),w=h.querySelector("[data-datepicker-container]"),A=h.querySelector(".datepicker-embla__prev"),q=h.querySelector(".datepicker-embla__next"),C=h.querySelector("[data-datepicker-input]");if(!x||!w||!A||!q)return;let M=null,$=null,it="",Q=0;function Nt(){let J=x.parentElement;J.style.width="",J.style.maxWidth="",x.style.width="",x.style.maxWidth="",J.offsetWidth;let Ct=J.getBoundingClientRect().width||0,dt=typeof window<"u"?window.innerWidth:9999,It=Math.max(260,Math.min(Ct||dt,dt));w.querySelectorAll(".embla__slide").forEach(function(zt){zt.style.flex="0 0 "+It+"px",zt.style.width=It+"px",zt.style.maxWidth=It+"px"})}function ge(){M&&(A.disabled=!M.canScrollPrev(),q.disabled=!M.canScrollNext())}function Y(J,Tt,Ct,dt,Et,It){return'<button type="button" class="datepicker-card flex flex-col gap-1 items-center justify-center text-center cursor-pointer border-0 w-full rounded-[8px] p-[8px] !bg-white !text-[#414141] [-webkit-tap-highlight-color:transparent]'+(It&&!Et?" datepicker-card--selected":"")+(Et?" opacity-60 cursor-not-allowed pointer-events-none":"")+'" data-date="'+J+'" role="option" aria-selected="'+(It?"true":"false")+'"'+(Et?' aria-disabled="true"':"")+'><span class="datepicker-day text-sm font-normal leading-normal m-0">'+Tt+'</span><span class="datepicker-num font-bold text-3xl leading-tight m-0">'+Ct+'</span><span class="datepicker-month text-sm font-normal leading-normal m-0">'+dt+"</span></button>"}function j(J){$=J,C&&(C.value=J||"",C.dispatchEvent(new Event("change",{bubbles:!0}))),h.dispatchEvent(new CustomEvent("datepicker:change",{bubbles:!0,detail:{date:J?new Date(J):null,value:J||""}}))}function at(J,Tt,Ct){J.addEventListener("click",function(){Ct||(h.querySelectorAll('.datepicker-card[aria-selected="true"]').forEach(function(dt){dt.classList.remove("datepicker-card--selected"),dt.setAttribute("aria-selected","false")}),J.classList.add("datepicker-card--selected"),J.setAttribute("aria-selected","true"),j(Tt),s(h,Tt),p.onSelect&&p.onSelect(new Date(Tt)))})}function tt(){let J=d();Q=J;let Tt=e(),Ct=new Date(Tt.getFullYear(),Tt.getMonth(),Tt.getDate());$||($=i(Ct)),w.innerHTML="";let dt=document.createDocumentFragment();for(let It=0;It<p.daysCount;It+=J){let ce=document.createElement("div");ce.className="embla__slide flex-shrink-0 flex !gap-[10px]";for(let zt=0;zt<J&&It+zt<p.daysCount;zt++){let wi=It+zt,V=new Date(Ct);V.setDate(V.getDate()+wi);let D=i(V),W=!p.allowPast&&c(V),U=D===$,z=n[V.getDay()],H=V.getDate(),G=t[V.getMonth()],K=document.createElement("div");K.className="datepicker-card-wrap min-w-0",K.innerHTML=Y(D,z,H,G,W,U);let rt=K.querySelector(".datepicker-card");at(rt,D,W),ce.appendChild(K)}dt.appendChild(ce)}w.appendChild(dt),Nt();let Et=new Date(Ct);Et.setDate(Et.getDate()+p.daysCount-1),r(h,i(Ct),i(Et)),s(h,$)}function lt(){M&&(M.destroy(),M=null),M=window.EmblaCarousel(x,{loop:!1,align:"start",containScroll:"trimSnaps",dragFree:!1,skipSnaps:!1,slidesToScroll:1,duration:25}),M.on("init",function(){Nt(),ge()}),M.on("select",ge),M.on("reInit",ge),ge()}function ye(){let J=i(e());J!==it&&(it=J,tt(),Nt(),M&&M.reInit())}function ee(){var J=d();J!==Q?(Q=J,tt(),requestAnimationFrame(function(){Nt(),lt()})):(Nt(),M&&M.reInit())}function le(){if(typeof window.EmblaCarousel!="function"){setTimeout(le,50);return}if(!h.dataset.nfStaticPickerLogged&&(h.dataset.nfStaticPickerLogged="true",h.dataset.tcApiFailed!=="true")){var J=document.querySelector('[data-timepicker][data-ticketcounter="true"]'),Tt="product_not_using_ticketcounter_blocks";h.dataset.ticketcounter==="true"&&(Tt=J?"unexpected_static_with_TC_flags":"TC_datepicker_without_TC_timepicker_block_on_template"),st("pickerMode: STATIC \u2014 classic datepicker (32 rolling days, no API dates)",{staticReason:Tt})}tt(),lt(),C&&$&&(C.value=$),A.addEventListener("click",function(){M&&M.scrollPrev()}),q.addEventListener("click",function(){M&&M.scrollNext()});var Ct=h.querySelector("[data-datepicker-calendar-input]");Ct&&(h._nfCalendarInputHandler&&Ct.removeEventListener("change",h._nfCalendarInputHandler),h._nfCalendarInputHandler=function(){var dt=Ct.value;if(dt){var Et=w.querySelector('.datepicker-card[data-date="'+dt+'"]');!Et||Et.getAttribute("aria-disabled")==="true"||(h.querySelectorAll('.datepicker-card[aria-selected="true"]').forEach(function(It){It.classList.remove("datepicker-card--selected"),It.setAttribute("aria-selected","false")}),Et.classList.add("datepicker-card--selected"),Et.setAttribute("aria-selected","true"),j(dt),s(h,dt),p.onSelect&&p.onSelect(new Date(dt)),o(w,M,Et))}},Ct.addEventListener("change",h._nfCalendarInputHandler))}le(),m={syncAndRender:ye,handleResize:ee},y()}function He(){document.querySelectorAll("[data-timepicker]").forEach(function(h){if(h.dataset.timepickerInited==="true"||h.dataset.ticketcounter==="true"&&h.dataset.tcApiFailed!=="true")return;if(h.dataset.vintia==="true"){var f=document.getElementById("datepicker-embla-root");
1if(f&&f.dataset.vintiaPickerReady==="true"&&f.dataset.vintiaApiFailed!=="true")return}if(h.dataset.timepickerInited="true",!h.dataset.nfStaticTimeLogged){h.dataset.nfStaticTimeLogged="true";let M=h.querySelectorAll(".nf-timepicker-slot").length;h.dataset.tcApiFailed==="true"?st("pickerMode: STATIC \u2014 time buttons (fallback list after Ticketcounter error/empty)",{slotButtonCount:M}):h.dataset.ticketcounter!=="true"&&st("pickerMode: STATIC \u2014 time buttons (Liquid hardcoded list)",{slotButtonCount:M})}let S=h.querySelector("[data-timepicker-input]"),x=h.querySelectorAll(".nf-timepicker-slot:not([disabled])"),w=h.querySelectorAll(".nf-timepicker-slot-more"),A=h.querySelector("[data-timepicker-show-more]"),q=h.querySelector(".nf-timepicker-show-more-label"),C=h.querySelector(".nf-timepicker-show-more-icon");x.forEach(function(M){M.addEventListener("click",function(){let $=this.getAttribute("data-time-slot")||"";if(S){if(h.dataset.tcApiFailed==="true"&&h.dataset.ticketcounter==="true"){var it=et(N(),$);S.value=it||$}else S.value=$;S.dispatchEvent(new Event("change",{bubbles:!0}))}x.forEach(function(Q){Q.setAttribute("aria-pressed",Q===M?"true":"false"),Q.setAttribute("data-selected",Q===M?"true":"false")})})}),A&&w.length>0?A.addEventListener("click",function(){let M=this.getAttribute("aria-expanded")==="true";w.forEach(function($){$.classList.toggle("hidden",M)}
1),this.setAttribute("aria-expanded",M?"false":"true"),q&&(q.textContent=M?"Meer tonen":"Minder tonen"),C&&(C.style.transform=M?"":"rotate(180deg)")}):A&&w.length===0&&A.classList.add("!hidden")})}function cr(){document.documentElement.dataset.nfDatepickerCalendarTriggerBound!=="true"&&(document.documentElement.dataset.nfDatepickerCalendarTriggerBound="true",document.addEventListener("click",function(h){var f=h.target&&h.target.closest("[data-datepicker-calendar-trigger]");if(!f)return;var S=document.getElementById("datepicker-embla-root");if(!S||!S.contains(f))return;h.preventDefault();var x=S.querySelector("[data-datepicker-calendar-input]");if(!x)return;function w(){try{if(typeof x.showPicker=="function"){var A=x.showPicker();if(A&&typeof A.then=="function"){A.catch(function(){x.focus({preventScroll:!0}),typeof x.click=="function"&&x.click()});return}return}}catch{}x.focus({preventScroll:!0});try{typeof x.click=="function"&&x.click()}catch{}}w()},!0))}function xi(){cr(),ii(),ni(),$e(),He(),Bt()}document.documentElement.dataset.nfTicketcounterAtcGateBound!=="true"&&(document.documentElement.dataset.nfTicketcounterAtcGateBound="true",document.addEventListener("variant:change",function(){Bt()})),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",xi):setTimeout(xi,0),document.addEventListener("shopify:section:load",function(){ii(),ni(),$e(),He(),Bt()}),window.__nfTicketcounterRefetchCapacity=function(){var h=document.getElementById("datepicker-embla-root");return!h||typeof h.__nfRefetchTcSlots!="function"?Promise.resolve({skipped:!0}):h.__nfRefetchTcSlots("pre-cart")}})();var ld='a[data-clickout-url][data-copy-utm="true"]';function cd(){try{return new URLSearchParams(window.location.search).get("utm_medium")}catch{return null}}function ud(n,t,e){let i=n.toLowerCase().includes("eventim"),r=encodeURIComponent(t);if(i){let s=e?`${t}_${e}`:t;return`referer_info=${encodeURIComponent(s)}`}return e?`utm_source=${r}&utm_medium=${encodeURIComponent(e)}`:`utm_source=${r}`}function dd(n,t){let e=n.indexOf("?");if(e===-1)return!1;let i=new URLSearchParams(n.slice(e+1)),r=new URLSearchParams(t);for(let[s,o]of r.entries())if(i.get(s)!==o)return!1;return!0}function hd(n){let t=n.dataset.clickoutUrl,e=(n.dataset.shopCode||"").trim();if(!t)return;if(!e){console.warn("[clickout-utm] shop_code theme setting is empty; leaving destination URL unchanged.",n);return}let i=cd(),r=ud(t,e,i);if(!r||dd(t,r))return;let s=t.includes("?")?"&":"?";n.href=`${t}${s}${r}`}function tl(){document.querySelectorAll(ld).forEach(hd)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",tl,{once:!0}):tl(),window.EmblaCarousel=Te,window.Alpine&&!window.__alpineStarted&&(window.__alpineStarted=!0,window.Alpine.start())})();/*! Bundled license information: 2 3photoswipe/dist/photoswipe-lightbox.esm.js: 4 (*! 5 * PhotoSwipe Lightbox 5.4.4 - https://photoswipe.com 6 * (c) 2024 Dmytro Semenov 7 *) 8 9photoswipe/dist/photoswipe.esm.js: 10 (*! 11 * PhotoSwipe 5.4.4 - https://photoswipe.com 12 * (c) 2024 Dmytro Semenov 13 *) 14*/ 15//# sourceMappingURL=/cdn/shop/t/2/assets/main.js.map?v=87506469466798538731790697025
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.