var Ii=Object.defineProperty;var Ai=(t,e)=>{for(var i in e)Ii(t,i,{get:e[i],enumerable:!0})};var Ne=null,It,At,Dt,Ft=65,rt,he,_t=new Set,Nt=1111;Di();function Di(){if(!document.createElement("link").relList.supports("prefetch"))return;let e="instantVaryAccept"in document.body.dataset||"Shopify"in window,i=navigator.userAgent.indexOf("Chrome/");if(i>-1&&(Ne=parseInt(navigator.userAgent.substring(i+7))),e&&Ne&&Ne<110)return;let r="instantMousedownShortcut"in document.body.dataset;It="instantAllowQueryString"in document.body.dataset,At="instantAllowExternalLinks"in document.body.dataset,Dt="instantWhitelist"in document.body.dataset;let n={capture:!0,passive:!0},o=!1,s=!1,c=!1;if("instantIntensity"in document.body.dataset){let f=document.body.dataset.instantIntensity;if(f.startsWith("mousedown"))o=!0,f=="mousedown-only"&&(s=!0);else if(f.startsWith("viewport")){let u=navigator.connection&&navigator.connection.saveData,m=navigator.connection&&navigator.connection.effectiveType&&navigator.connection.effectiveType.includes("2g");!u&&!m&&(f=="viewport"?document.documentElement.clientWidth*document.documentElement.clientHeight<45e4&&(c=!0):f=="viewport-all"&&(c=!0))}else{let u=parseInt(f);isNaN(u)||(Ft=u)}}if(s||document.addEventListener("touchstart",Fi,n),o?r||document.addEventListener("mousedown",Pi,n):document.addEventListener("mouseover",Ni,n),r&&document.addEventListener("mousedown",Ci,n),c){let f=window.requestIdleCallback;f||(f=u=>{u()}),f(function(){let m=new IntersectionObserver(p=>{p.forEach(d=>{if(d.isIntersecting){let E=d.target;m.unobserve(E),Le(E.href)}})});document.querySelectorAll("a").forEach(p=>{Pe(p)&&m.observe(p)})},{timeout:1500})}}function Fi(t){rt=performance.now();let e=t.target.closest("a");Pe(e)&&Le(e.href,"high")}function Ni(t){if(performance.now()-rt{Le(e.href,"high"),he=void 0},Ft))}function Pi(t){let e=t.target.closest("a");Pe(e)&&Le(e.href,"high")}function Li(t){t.relatedTarget&&t.target.closest("a")==t.relatedTarget.closest("a")||he&&(clearTimeout(he),he=void 0)}function Ci(t){if(performance.now()-rt1||t.metaKey||t.ctrlKey||!e)return;e.addEventListener("click",function(r){r.detail!=1337&&r.preventDefault()},{capture:!0,passive:!1,once:!0});let i=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1,detail:1337});e.dispatchEvent(i)}function Pe(t){if(!(!t||!t.href)&&!(Dt&&!("instant"in t.dataset))&&!(t.origin!=location.origin&&(!(At||"instant"in t.dataset)||!Ne))&&["http:","https:"].includes(t.protocol)&&!(t.protocol=="http:"&&location.protocol=="https:")&&!(!It&&t.search&&!("instant"in t.dataset))&&!(t.hash&&t.pathname+t.search==location.pathname+location.search)&&!("noInstant"in t.dataset))return!0}function Le(t,e="auto"){if(_t.has(t))return;let i=document.createElement("link");i.rel="prefetch",i.href=t,i.fetchPriority=e,i.as="document",document.head.appendChild(i),_t.add(t)}var Ut={};Ai(Ut,{createFocusTrap:()=>nr});var Lt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ce=Lt.join(","),Ct=typeof Element>"u",re=Ct?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Re=!Ct&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},ke=function t(e,i){var r;i===void 0&&(i=!0);var n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),o=n===""||n==="true",s=o||i&&e&&t(e.parentNode);return s},Ri=function(e){var i,r=e==null||(i=e.getAttribute)===null||i===void 0?void 0:i.call(e,"contenteditable");return r===""||r==="true"},Rt=function(e,i,r){if(ke(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(Ce));return i&&re.call(e,Ce)&&n.unshift(e),n=n.filter(r),n},kt=function t(e,i,r){for(var n=[],o=Array.from(e);o.length;){var s=o.shift();if(!ke(s,!1))if(s.tagName==="SLOT"){var c=s.assignedElements(),f=c.length?c:s.children,u=t(f,!0,r);r.flatten?n.push.apply(n,u):n.push({scopeParent:s,candidates:u})}else{var m=re.call(s,Ce);m&&r.filter(s)&&(i||!e.includes(s))&&n.push(s);var p=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),d=!ke(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(p&&d){var E=t(p===!0?s.children:p.children,!0,r);r.flatten?n.push.apply(n,E):n.push({scopeParent:s,candidates:E})}else o.unshift.apply(o,s.children)}}return n},Mt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Z=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Ri(e))&&!Mt(e)?0:e.tabIndex},ki=function(e,i){var r=Z(e);return r<0&&i&&!Mt(e)?0:r},Mi=function(e,i){return e.tabIndex===i.tabIndex?e.documentOrder-i.documentOrder:e.tabIndex-i.tabIndex},zt=function(e){return e.tagName==="INPUT"},zi=function(e){return zt(e)&&e.type==="hidden"},ji=function(e){var i=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return i},Wi=function(e,i){for(var r=0;rsummary:first-of-type"),s=o?e.parentElement:e;if(re.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof n=="function"){for(var c=e;e;){var f=e.parentElement,u=Re(e);if(f&&!f.shadowRoot&&n(f)===!0)return Pt(e);e.assignedSlot?e=e.assignedSlot:!f&&u!==e.ownerDocument?e=u.host:e=f}e=c}if(Ki(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Pt(e);return!1},Ui=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var i=e.parentElement;i;){if(i.tagName==="FIELDSET"&&i.disabled){for(var r=0;r=0)},qi=function t(e){var i=[],r=[];return e.forEach(function(n,o){var s=!!n.scopeParent,c=s?n.scopeParent:n,f=ki(c,s),u=s?t(n.candidates):c;f===0?s?i.push.apply(i,u):i.push(c):r.push({documentOrder:o,tabIndex:f,item:n,isScope:s,content:u})}),r.sort(Mi).reduce(function(n,o){return o.isScope?n.push.apply(n,o.content):n.push(o.content),n},[]).concat(i)},jt=function(e,i){i=i||{};var r;return i.getShadowRoot?r=kt([e],i.includeContainer,{filter:nt.bind(null,i),flatten:!1,getShadowRoot:i.getShadowRoot,shadowRootFilter:Gi}):r=Rt(e,i.includeContainer,nt.bind(null,i)),qi(r)},Wt=function(e,i){i=i||{};var r;return i.getShadowRoot?r=kt([e],i.includeContainer,{filter:Me.bind(null,i),flatten:!0,getShadowRoot:i.getShadowRoot}):r=Rt(e,i.includeContainer,Me.bind(null,i)),r},ne=function(e,i){if(i=i||{},!e)throw new Error("No node provided");return re.call(e,Ce)===!1?!1:nt(i,e)},Zi=Lt.concat("iframe").join(","),ze=function(e,i){if(i=i||{},!e)throw new Error("No node provided");return re.call(e,Zi)===!1?!1:Me(i,e)};function Xi(t,e,i){return(e=Qi(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Bt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,r)}return i}function Vt(t){for(var e=1;e0){var r=e[e.length-1];r!==i&&r.pause()}var n=e.indexOf(i);n===-1||e.splice(n,1),e.push(i)},deactivateTrap:function(e,i){var r=e.indexOf(i);r!==-1&&e.splice(r,1),e.length>0&&e[e.length-1].unpause()}},Ji=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},er=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},me=function(e){return e?.key==="Tab"||e?.keyCode===9},tr=function(e){return me(e)&&!e.shiftKey},ir=function(e){return me(e)&&e.shiftKey},Kt=function(e){return setTimeout(e,0)},Ht=function(e,i){var r=-1;return e.every(function(n,o){return i(n)?(r=o,!1):!0}),r},pe=function(e){for(var i=arguments.length,r=new Array(i>1?i-1:0),n=1;n1?h-1:0),y=1;y=0)a=r.activeElement;else{var l=s.tabbableGroups[0],h=l&&l.firstTabbableNode;a=h||m("fallbackFocus")}if(!a)throw new Error("Your focus-trap needs to have at least one focusable element");return a},d=function(){if(s.containerGroups=s.containers.map(function(a){var l=jt(a,o.tabbableOptions),h=Wt(a,o.tabbableOptions),b=l.length>0?l[0]:void 0,y=l.length>0?l[l.length-1]:void 0,S=h.find(function(L){return ne(L)}),A=h.slice().reverse().find(function(L){return ne(L)}),R=!!l.find(function(L){return Z(L)>0});return{container:a,tabbableNodes:l,focusableNodes:h,posTabIndexesFound:R,firstTabbableNode:b,lastTabbableNode:y,firstDomTabbableNode:S,lastDomTabbableNode:A,nextTabbableNode:function(ie){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,q=l.indexOf(ie);return q<0?fe?h.slice(h.indexOf(ie)+1).find(function(de){return ne(de)}):h.slice(0,h.indexOf(ie)).reverse().find(function(de){return ne(de)}):l[q+(fe?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(a){return a.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!m("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(a){return a.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},E=function(a){var l=a.activeElement;if(l)return l.shadowRoot&&l.shadowRoot.activeElement!==null?E(l.shadowRoot):l},w=function(a){if(a!==!1&&a!==E(document)){if(!a||!a.focus){w(p());return}a.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=a,Ji(a)&&a.select()}},T=function(a){var l=m("setReturnFocus",a);return l||(l===!1?!1:a)},I=function(a){var l=a.target,h=a.event,b=a.isBackward,y=b===void 0?!1:b;l=l||je(h),d();var S=null;if(s.tabbableGroups.length>0){var A=u(l,h),R=A>=0?s.containerGroups[A]:void 0;if(A<0)y?S=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:S=s.tabbableGroups[0].firstTabbableNode;else if(y){var L=Ht(s.tabbableGroups,function(tt){var it=tt.firstTabbableNode;return l===it});if(L<0&&(R.container===l||ze(l,o.tabbableOptions)&&!ne(l,o.tabbableOptions)&&!R.nextTabbableNode(l,!1))&&(L=A),L>=0){var ie=L===0?s.tabbableGroups.length-1:L-1,fe=s.tabbableGroups[ie];S=Z(l)>=0?fe.lastTabbableNode:fe.lastDomTabbableNode}else me(h)||(S=R.nextTabbableNode(l,!1))}else{var q=Ht(s.tabbableGroups,function(tt){var it=tt.lastTabbableNode;return l===it});if(q<0&&(R.container===l||ze(l,o.tabbableOptions)&&!ne(l,o.tabbableOptions)&&!R.nextTabbableNode(l))&&(q=A),q>=0){var de=q===s.tabbableGroups.length-1?0:q+1,Tt=s.tabbableGroups[de];S=Z(l)>=0?Tt.firstTabbableNode:Tt.firstDomTabbableNode}else me(h)||(S=R.nextTabbableNode(l))}}else S=m("fallbackFocus");return S},_=function(a){var l=je(a);if(!(u(l,a)>=0)){if(pe(o.clickOutsideDeactivates,a)){c.deactivate({returnFocus:o.returnFocusOnDeactivate});return}pe(o.allowOutsideClick,a)||a.preventDefault()}},k=function(a){var l=je(a),h=u(l,a)>=0;if(h||l instanceof Document)h&&(s.mostRecentlyFocusedNode=l);else{a.stopImmediatePropagation();var b,y=!0;if(s.mostRecentlyFocusedNode)if(Z(s.mostRecentlyFocusedNode)>0){var S=u(s.mostRecentlyFocusedNode),A=s.containerGroups[S].tabbableNodes;if(A.length>0){var R=A.findIndex(function(L){return L===s.mostRecentlyFocusedNode});R>=0&&(o.isKeyForward(s.recentNavEvent)?R+1=0&&(b=A[R-1],y=!1))}}else s.containerGroups.some(function(L){return L.tabbableNodes.some(function(ie){return Z(ie)>0})})||(y=!1);else y=!1;y&&(b=I({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),w(b||s.mostRecentlyFocusedNode||p())}s.recentNavEvent=void 0},M=function(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;s.recentNavEvent=a;var h=I({event:a,isBackward:l});h&&(me(a)&&a.preventDefault(),w(h))},j=function(a){(o.isKeyForward(a)||o.isKeyBackward(a))&&M(a,o.isKeyBackward(a))},D=function(a){er(a)&&pe(o.escapeDeactivates,a)!==!1&&(a.preventDefault(),c.deactivate())},z=function(a){var l=je(a);u(l,a)>=0||pe(o.clickOutsideDeactivates,a)||pe(o.allowOutsideClick,a)||(a.preventDefault(),a.stopImmediatePropagation())},W=function(){if(s.active)return $t.activateTrap(n,c),s.delayInitialFocusTimer=o.delayInitialFocus?Kt(function(){w(p())}):w(p()),r.addEventListener("focusin",k,!0),r.addEventListener("mousedown",_,{capture:!0,passive:!1}),r.addEventListener("touchstart",_,{capture:!0,passive:!1}),r.addEventListener("click",z,{capture:!0,passive:!1}),r.addEventListener("keydown",j,{capture:!0,passive:!1}),r.addEventListener("keydown",D),c},N=function(){if(s.active)return r.removeEventListener("focusin",k,!0),r.removeEventListener("mousedown",_,!0),r.removeEventListener("touchstart",_,!0),r.removeEventListener("click",z,!0),r.removeEventListener("keydown",j,!0),r.removeEventListener("keydown",D),c},x=function(a){var l=a.some(function(h){var b=Array.from(h.removedNodes);return b.some(function(y){return y===s.mostRecentlyFocusedNode})});l&&w(p())},V=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(x):void 0,g=function(){V&&(V.disconnect(),s.active&&!s.paused&&s.containers.map(function(a){V.observe(a,{subtree:!0,childList:!0})}))};return c={get active(){return s.active},get paused(){return s.paused},activate:function(a){if(s.active)return this;var l=f(a,"onActivate"),h=f(a,"onPostActivate"),b=f(a,"checkCanFocusTrap");b||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=r.activeElement,l?.();var y=function(){b&&d(),W(),g(),h?.()};return b?(b(s.containers.concat()).then(y,y),this):(y(),this)},deactivate:function(a){if(!s.active)return this;var l=Vt({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},a);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,N(),s.active=!1,s.paused=!1,g(),$t.deactivateTrap(n,c);var h=f(l,"onDeactivate"),b=f(l,"onPostDeactivate"),y=f(l,"checkCanReturnFocus"),S=f(l,"returnFocus","returnFocusOnDeactivate");h?.();var A=function(){Kt(function(){S&&w(T(s.nodeFocusedBeforeActivation)),b?.()})};return S&&y?(y(T(s.nodeFocusedBeforeActivation)).then(A,A),this):(A(),this)},pause:function(a){if(s.paused||!s.active)return this;var l=f(a,"onPause"),h=f(a,"onPostPause");return s.paused=!0,l?.(),N(),g(),h?.(),this},unpause:function(a){if(!s.paused||!s.active)return this;var l=f(a,"onUnpause"),h=f(a,"onPostUnpause");return s.paused=!1,l?.(),d(),W(),g(),h?.(),this},updateContainerElements:function(a){var l=[].concat(a).filter(Boolean);return s.containers=l.map(function(h){return typeof h=="string"?r.querySelector(h):h}),s.active&&d(),g(),this}},c.updateContainerElements(e),c};function st(t,e){t.indexOf(e)===-1&&t.push(e)}function ot(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}var ve=(t,e,i)=>Math.min(Math.max(i,t),e);var O={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"};var C=t=>typeof t=="number";var K=t=>Array.isArray(t)&&!C(t[0]);var Gt=(t,e,i)=>{let r=e-t;return((i-t)%r+r)%r+t};function ge(t,e){return K(t)?t[Gt(0,t.length,e)]:t}var se=(t,e,i)=>-i*t+i*e+t;var ye=()=>{},P=t=>t;var $=(t,e,i)=>e-t===0?1:(i-t)/(e-t);function ce(t,e){let i=t[t.length-1];for(let r=1;r<=e;r++){let n=$(0,e,r);t.push(se(i,1,n))}}function oe(t){let e=[0];return ce(e,t-1),e}function be(t,e=oe(t.length),i=P){let r=t.length,n=r-e.length;return n>0&&ce(e,n),o=>{let s=0;for(;sArray.isArray(t)&&C(t[0]);var X=t=>typeof t=="object"&&!!t.createAnimation;var F=t=>typeof t=="function";var H=t=>typeof t=="string";var Y={ms:t=>t*1e3,s:t=>t/1e3};function at(t,e){return e?t*(1e3/e):0}var qt=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t,sr=1e-7,or=12;function ar(t,e,i,r,n){let o,s,c=0;do s=e+(i-e)/2,o=qt(s,r,n)-t,o>0?i=s:e=s;while(Math.abs(o)>sr&&++car(o,0,1,t,i);return o=>o===0||o===1?o:qt(n(o),e,r)}var lt=(t,e="end")=>i=>{i=e==="end"?Math.min(i,.999):Math.max(i,.001);let r=i*t,n=e==="end"?Math.floor(r):Math.ceil(r);return ve(0,1,n/t)};var lr={ease:ae(.25,.1,.25,1),"ease-in":ae(.42,0,1,1),"ease-in-out":ae(.42,0,.58,1),"ease-out":ae(0,0,.58,1)},cr=/\((.*?)\)/;function ue(t){if(F(t))return t;if(we(t))return ae(...t);let e=lr[t];if(e)return e;if(t.startsWith("steps")){let i=cr.exec(t);if(i){let r=i[1].split(",");return lt(parseFloat(r[0]),r[1].trim())}}return P}var U=class{constructor(e,i=[0,1],{easing:r,duration:n=O.duration,delay:o=O.delay,endDelay:s=O.endDelay,repeat:c=O.repeat,offset:f,direction:u="normal",autoplay:m=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=P,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((d,E)=>{this.resolve=d,this.reject=E}),r=r||O.easing,X(r)){let d=r.createAnimation(i);r=d.easing,i=d.keyframes||i,n=d.duration||n}this.repeat=c,this.easing=K(r)?P:ue(r),this.updateDuration(n);let p=be(i,f,K(r)?r.map(ue):P);this.tick=d=>{var E;o=o;let w=0;this.pauseTime!==void 0?w=this.pauseTime:w=(d-this.startTime)*this.rate,this.t=w,w/=1e3,w=Math.max(w-o,0),this.playState==="finished"&&this.pauseTime===void 0&&(w=this.totalDuration);let T=w/this.duration,I=Math.floor(T),_=T%1;!_&&T>=1&&(_=1),_===1&&I--;let k=I%2;(u==="reverse"||u==="alternate"&&k||u==="alternate-reverse"&&!k)&&(_=1-_);let M=w>=this.totalDuration?1:Math.min(_,1),j=p(this.easing(M));e(j),this.pauseTime===void 0&&(this.playState==="finished"||w>=this.totalDuration+s)?(this.playState="finished",(E=this.resolve)===null||E===void 0||E.call(this,j)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},m&&this.play()}play(){let e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}};var Ee=function(){};var xe=class{setAnimation(e){this.animation=e,e?.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}};var ct=new WeakMap;function We(t){return ct.has(t)||ct.set(t,{transforms:[],values:new Map}),ct.get(t)}function Zt(t,e){return t.has(e)||t.set(e,new xe),t.get(e)}var ur=["","X","Y","Z"],fr=["translate","scale","rotate","skew"],Se={x:"translateX",y:"translateY",z:"translateZ"},Xt={syntax:"",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},dr={translate:{syntax:"",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:Xt,scale:{syntax:"",initialValue:1,toDefaultUnit:P},skew:Xt},Q=new Map,Ve=t=>`--motion-${t}`,Be=["x","y","z"];fr.forEach(t=>{ur.forEach(e=>{Be.push(t+e),Q.set(Ve(t+e),dr[t])})});var hr=(t,e)=>Be.indexOf(t)-Be.indexOf(e),pr=new Set(Be),$e=t=>pr.has(t),Yt=(t,e)=>{Se[e]&&(e=Se[e]);let{transforms:i}=We(t);st(i,e),t.style.transform=mr(i)},mr=t=>t.sort(hr).reduce(vr,"").trim(),vr=(t,e)=>`${t} ${e}(var(${Ve(e)}))`;var Oe=t=>t.startsWith("--"),Qt=new Set;function Jt(t){if(!Qt.has(t)){Qt.add(t);try{let{syntax:e,initialValue:i}=Q.has(t)?Q.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:i})}catch{}}}var ut=(t,e)=>document.createElement("div").animate(t,e),ei={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{ut({opacity:[1]})}catch{return!1}return!0},finished:()=>!!ut({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{ut({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},ft={},J={};for(let t in ei)J[t]=()=>(ft[t]===void 0&&(ft[t]=ei[t]()),ft[t]);var gr=.015,yr=(t,e)=>{let i="",r=Math.round(e/gr);for(let n=0;nF(t)?J.linearEasing()?`linear(${yr(t,e)})`:O.easing:we(t)?br(t):t,br=([t,e,i,r])=>`cubic-bezier(${t}, ${e}, ${i}, ${r})`;function ti(t,e){for(let i=0;iArray.isArray(t)?t:[t];function Te(t){return Se[t]&&(t=Se[t]),$e(t)?Ve(t):t}var _e={get:(t,e)=>{e=Te(e);let i=Oe(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!i&&i!==0){let r=Q.get(e);r&&(i=r.initialValue)}return i},set:(t,e,i)=>{e=Te(e),Oe(e)?t.style.setProperty(e,i):t.style[e]=i}};function He(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch{}}function ii(t,e){var i;let r=e?.toDefaultUnit||P,n=t[t.length-1];if(H(n)){let o=((i=n.match(/(-?[\d.]+)([a-z%]*)/))===null||i===void 0?void 0:i[2])||"";o&&(r=s=>s+o)}return r}function wr(){return window.__MOTION_DEV_TOOLS_RECORD}function Ue(t,e,i,r={},n){let o=wr(),s=r.record!==!1&&o,c,{duration:f=O.duration,delay:u=O.delay,endDelay:m=O.endDelay,repeat:p=O.repeat,easing:d=O.easing,persist:E=!1,direction:w,offset:T,allowWebkitAcceleration:I=!1,autoplay:_=!0}=r,k=We(t),M=$e(e),j=J.waapi();M&&Yt(t,e);let D=Te(e),z=Zt(k.values,D),W=Q.get(D);return He(z.animation,!(X(d)&&z.generator)&&r.record!==!1),()=>{let N=()=>{var g,v;return(v=(g=_e.get(t,D))!==null&&g!==void 0?g:W?.initialValue)!==null&&v!==void 0?v:0},x=ti(Ke(i),N),V=ii(x,W);if(X(d)){let g=d.createAnimation(x,e!=="opacity",N,D,z);d=g.easing,x=g.keyframes||x,f=g.duration||f}if(Oe(D)&&(J.cssRegisterProperty()?Jt(D):j=!1),M&&!J.linearEasing()&&(F(d)||K(d)&&d.some(F))&&(j=!1),j){W&&(x=x.map(a=>C(a)?W.toDefaultUnit(a):a)),x.length===1&&(!J.partialKeyframes()||s)&&x.unshift(N());let g={delay:Y.ms(u),duration:Y.ms(f),endDelay:Y.ms(m),easing:K(d)?void 0:dt(d,f),direction:w,iterations:p+1,fill:"both"};c=t.animate({[D]:x,offset:T,easing:K(d)?d.map(a=>dt(a,f)):void 0},g),c.finished||(c.finished=new Promise((a,l)=>{c.onfinish=a,c.oncancel=l}));let v=x[x.length-1];c.finished.then(()=>{E||(_e.set(t,D,v),c.cancel())}).catch(ye),I||(c.playbackRate=1.000001)}else if(n&&M)x=x.map(g=>typeof g=="string"?parseFloat(g):g),x.length===1&&x.unshift(parseFloat(N())),c=new n(g=>{_e.set(t,D,V?V(g):g)},x,Object.assign(Object.assign({},r),{duration:f,easing:d}));else{let g=x[x.length-1];_e.set(t,D,W&&C(g)?W.toDefaultUnit(g):g)}return s&&o(t,e,x,{duration:f,delay:u,easing:d,repeat:p,offset:T},"motion-one"),z.setAnimation(c),c&&!_&&c.pause(),c}}var Ge=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function ee(t,e){var i;return typeof t=="string"?e?((i=e[t])!==null&&i!==void 0||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}var Er=t=>t(),le=(t,e,i=O.duration)=>new Proxy({animations:t.map(Er).filter(Boolean),duration:i,options:e},Sr),xr=t=>t.animations[0],Sr={get:(t,e)=>{let i=xr(t);switch(e){case"duration":return t.duration;case"currentTime":return Y.s(i?.[e]||0);case"playbackRate":case"playState":return i?.[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(Or)).catch(ye)),t.finished;case"stop":return()=>{t.animations.forEach(r=>He(r))};case"forEachNative":return r=>{t.animations.forEach(n=>r(n,t))};default:return typeof i?.[e]>"u"?void 0:()=>t.animations.forEach(r=>r[e]())}},set:(t,e,i)=>{switch(e){case"currentTime":i=Y.ms(i);case"playbackRate":for(let r=0;rt.finished;function ri(t=.1,{start:e=0,from:i=0,easing:r}={}){return(n,o)=>{let s=C(i)?i:Tr(i,o),c=Math.abs(s-n),f=t*c;if(r){let u=o*t;f=ue(r)(f/u)*u}return e+f}}function Tr(t,e){if(t==="first")return 0;{let i=e-1;return t==="last"?i:i/2}}function qe(t,e,i){return F(t)?t(e,i):t}function ni(t){return function(i,r,n={}){i=ee(i);let o=i.length;Ee(!!o,"No valid element provided."),Ee(!!r,"No keyframes defined.");let s=[];for(let c=0;ce&&n.atUe(...o,U)).filter(Boolean);return le(n,e,(i=r[0])===null||i===void 0?void 0:i[3].duration)}function Ir(t,e={}){var{defaultOptions:i={}}=e,r=Ze(e,["defaultOptions"]);let n=[],o=new Map,s={},c=new Map,f=0,u=0,m=0;for(let p=0;p1,"spring must be provided 2 keyframes within timeline()");let y=g.createAnimation(N,z!=="opacity",()=>0,z);g=y.easing,N=y.keyframes||N,V=y.duration||V}let v=qe(T.delay,M,k)||0,a=u+v,l=a+V,{offset:h=oe(N.length)}=x;h.length===1&&h[0]===0&&(h[1]=1);let b=h.length-N.length;b>0&&ce(h,b),N.length===1&&N.unshift(null),si(W,N,g,h,a,l),I=Math.max(v+V,I),m=Math.max(l,m)}}f=u,u+=I}return o.forEach((p,d)=>{for(let E in p){let w=p[E];w.sort(oi);let T=[],I=[],_=[];for(let k=0;k"u")return()=>{};let o=ee(t),s=new WeakMap,c=u=>{u.forEach(m=>{let p=s.get(m.target);if(m.isIntersecting!==!!p)if(m.isIntersecting){let d=e(m);F(d)?s.set(m.target,d):f.unobserve(m.target)}else p&&(p(m),s.delete(m.target))})},f=new IntersectionObserver(c,{root:i,rootMargin:r,threshold:typeof n=="number"?n:Fr[n]});return o.forEach(u=>f.observe(u)),()=>f.disconnect()}var Xe=new WeakMap,te;function Nr(t,e){if(e){let{inlineSize:i,blockSize:r}=e[0];return{width:i,height:r}}else return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}function Pr({target:t,contentRect:e,borderBoxSize:i}){var r;(r=Xe.get(t))===null||r===void 0||r.forEach(n=>{n({target:t,contentSize:e,get size(){return Nr(t,i)}})})}function Lr(t){t.forEach(Pr)}function Cr(){typeof ResizeObserver>"u"||(te=new ResizeObserver(Lr))}function ci(t,e){te||Cr();let i=ee(t);return i.forEach(r=>{let n=Xe.get(r);n||(n=new Set,Xe.set(r,n)),n.add(e),te?.observe(r)}),()=>{i.forEach(r=>{let n=Xe.get(r);n?.delete(e),n?.size||te?.unobserve(r)})}}var Ye=new Set,Ie;function Rr(){Ie=()=>{let t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Ye.forEach(i=>i(e))},window.addEventListener("resize",Ie)}function ui(t){return Ye.add(t),Ie||Rr(),()=>{Ye.delete(t),!Ye.size&&Ie&&(Ie=void 0)}}function fi(t,e){return F(t)?ui(t):ci(t,e)}var kr=50,di=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),pi=()=>({time:0,x:di(),y:di()}),Mr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function hi(t,e,i,r){let n=i[e],{length:o,position:s}=Mr[e],c=n.current,f=i.time;n.current=t[`scroll${s}`],n.scrollLength=t[`scroll${o}`]-t[`client${o}`],n.offset.length=0,n.offset[0]=0,n.offset[1]=n.scrollLength,n.progress=$(0,n.scrollLength,n.current);let u=r-f;n.velocity=u>kr?0:at(n.current-c,u)}function mi(t,e,i){hi(t,"x",e,i),hi(t,"y",e,i),e.time=i}function vi(t,e){let i={x:0,y:0},r=t;for(;r&&r!==e;)if(r instanceof HTMLElement)i.x+=r.offsetLeft,i.y+=r.offsetTop,r=r.offsetParent;else if(r instanceof SVGGraphicsElement&&"getBBox"in r){let{top:n,left:o}=r.getBBox();for(i.x+=o,i.y+=n;r&&r.tagName!=="svg";)r=r.parentNode}return i}var Qe={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]};var Je={start:0,center:.5,end:1};function mt(t,e,i=0){let r=0;if(Je[t]!==void 0&&(t=Je[t]),H(t)){let n=parseFloat(t);t.endsWith("px")?r=n:t.endsWith("%")?t=n/100:t.endsWith("vw")?r=n/100*document.documentElement.clientWidth:t.endsWith("vh")?r=n/100*document.documentElement.clientHeight:t=n}return C(t)&&(r=e*t),i+r}var zr=[0,0];function gi(t,e,i,r){let n=Array.isArray(t)?t:zr,o=0,s=0;return C(t)?n=[t,t]:H(t)&&(t=t.trim(),t.includes(" ")?n=t.split(" "):n=[t,Je[t]?t:"0"]),o=mt(n[0],i,r),s=mt(n[1],e),o-s}var jr={x:0,y:0};function yi(t,e,i){let{offset:r=Qe.All}=i,{target:n=t,axis:o="y"}=i,s=o==="y"?"height":"width",c=n!==t?vi(n,t):jr,f=n===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:n.clientWidth,height:n.clientHeight},u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let m=!e[o].interpolate,p=r.length;for(let d=0;dWr(t,r.target,i),update:o=>{mi(t,i,o),(r.offset||r.target)&&yi(t,i,r)},notify:F(e)?()=>e(i):Br(e,i[n])}}function Br(t,e){return t.pause(),t.forEachNative((i,{easing:r})=>{var n,o;if(i.updateDuration)r||(i.easing=P),i.updateDuration(1);else{let s={duration:1e3};r||(s.easing="linear"),(o=(n=i.effect)===null||n===void 0?void 0:n.updateTiming)===null||o===void 0||o.call(n,s)}}),()=>{t.currentTime=e.progress}}var Ae=new WeakMap,wi=new WeakMap,vt=new WeakMap,Ei=t=>t===document.documentElement?window:t;function xi(t,e={}){var{container:i=document.documentElement}=e,r=Ze(e,["container"]);let n=vt.get(i);n||(n=new Set,vt.set(i,n));let o=pi(),s=bi(i,t,o,r);if(n.add(s),!Ae.has(i)){let u=()=>{let p=performance.now();for(let d of n)d.measure();for(let d of n)d.update(p);for(let d of n)d.notify()};Ae.set(i,u);let m=Ei(i);window.addEventListener("resize",u,{passive:!0}),i!==document.documentElement&&wi.set(i,fi(i,u)),m.addEventListener("scroll",u,{passive:!0})}let c=Ae.get(i),f=requestAnimationFrame(c);return()=>{var u;typeof t!="function"&&t.stop(),cancelAnimationFrame(f);let m=vt.get(i);if(!m||(m.delete(s),m.size))return;let p=Ae.get(i);Ae.delete(i),p&&(Ei(i).removeEventListener("scroll",p),(u=wi.get(i))===null||u===void 0||u(),window.removeEventListener("resize",p))}}function Vr(t,e={}){return le([()=>{let i=new U(t,[0,1],e);return i.finished.catch(()=>{}),i}],e,e.duration)}function Si(t,e,i){return(F(t)?Vr:ht)(t,e,i)}function G(t){this.listenerMap=[{},{}],t&&this.root(t),this.handle=G.prototype.handle.bind(this),this._removedListeners=[]}G.prototype.root=function(t){let e=this.listenerMap,i;if(this.rootElement){for(i in e[1])e[1].hasOwnProperty(i)&&this.rootElement.removeEventListener(i,this.handle,!0);for(i in e[0])e[0].hasOwnProperty(i)&&this.rootElement.removeEventListener(i,this.handle,!1)}if(!t||!t.addEventListener)return this.rootElement&&delete this.rootElement,this;this.rootElement=t;for(i in e[1])e[1].hasOwnProperty(i)&&this.rootElement.addEventListener(i,this.handle,!0);for(i in e[0])e[0].hasOwnProperty(i)&&this.rootElement.addEventListener(i,this.handle,!1);return this};G.prototype.captureForType=function(t){return["blur","error","focus","load","resize","scroll"].indexOf(t)!==-1};G.prototype.on=function(t,e,i,r){let n,o,s,c;if(!t)throw new TypeError("Invalid event type: "+t);if(typeof e=="function"&&(r=i,i=e,e=null),r===void 0&&(r=this.captureForType(t)),typeof i!="function")throw new TypeError("Handler must be a type of Function");return n=this.rootElement,o=this.listenerMap[r?1:0],o[t]||(n&&n.addEventListener(t,this.handle,r),o[t]=[]),e?/^[a-z]+$/i.test(e)?(c=e,s=$r):/^#[a-z0-9\-_]+$/i.test(e)?(c=e.slice(1),s=Hr):(c=e,s=Element.prototype.matches):(c=null,s=Kr.bind(this)),o[t].push({selector:e,handler:i,matcher:s,matcherParam:c}),this};G.prototype.off=function(t,e,i,r){let n,o,s,c,f;if(typeof e=="function"&&(r=i,i=e,e=null),r===void 0)return this.off(t,e,i,!0),this.off(t,e,i,!1),this;if(s=this.listenerMap[r?1:0],!t){for(f in s)s.hasOwnProperty(f)&&this.off(f,e,i);return this}if(c=s[t],!c||!c.length)return this;for(n=c.length-1;n>=0;n--)o=c[n],(!e||e===o.selector)&&(!i||i===o.handler)&&(this._removedListeners.push(o),c.splice(n,1));return c.length||(delete s[t],this.rootElement&&this.rootElement.removeEventListener(t,this.handle,r)),this};G.prototype.handle=function(t){let e,i,r=t.type,n,o,s,c,f=[],u,m="ftLabsDelegateIgnore";if(t[m]===!0)return;switch(u=t.target,u.nodeType===3&&(u=u.parentNode),u.correspondingUseElement&&(u=u.correspondingUseElement),n=this.rootElement,o=t.eventPhase||(t.target!==t.currentTarget?3:2),o){case 1:f=this.listenerMap[1][r];break;case 2:this.listenerMap[0]&&this.listenerMap[0][r]&&(f=f.concat(this.listenerMap[0][r])),this.listenerMap[1]&&this.listenerMap[1][r]&&(f=f.concat(this.listenerMap[1][r]));break;case 3:f=this.listenerMap[0][r];break}let p=[];for(i=f.length;u&&i;){for(e=0;e-1&&u.hasAttribute("disabled")?p=[]:s.matcher.call(u,s.matcherParam,u)&&p.push([t,u,s]);if(u===n||(i=f.length,u=u.parentElement||u.parentNode,u instanceof HTMLDocument))break}let d;for(e=0;e-1)&&(c=this.fire.apply(this,p[e]),c===!1)){p[e][0][m]=!0,p[e][0].preventDefault(),d=!1;break}return d};G.prototype.fire=function(t,e,i){return i.handler.call(e,t,e)};function $r(t,e){return t.toLowerCase()===e.tagName.toLowerCase()}function Kr(t,e){return this.rootElement===window?e===document||e===document.documentElement||e===window:this.rootElement===e}function Hr(t,e){return t===e.id}G.prototype.destroy=function(){this.off(),this.root()};var Ur=G;function De(t,e,i){let r=document.createElement(e);return t&&(r.className=t),i&&i.appendChild(r),r}function Gr(t,e,i){let r=`translate3d(${t}px,${e||0}px,0)`;return i!==void 0&&(r+=` scale3d(${i},${i},1)`),r}function gt(t,e,i){t.style.width=typeof e=="number"?`${e}px`:e,t.style.height=typeof i=="number"?`${i}px`:i}var B={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function qr(t){return"button"in t&&t.button===1||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function Fe(t,e,i=document){let r=[];if(t instanceof Element)r=[t];else if(t instanceof NodeList||Array.isArray(t))r=Array.from(t);else{let n=typeof t=="string"?t:e;n&&(r=Array.from(i.querySelectorAll(n)))}return r}function Zr(t){return typeof t=="function"&&t.prototype&&t.prototype.goTo}function Oi(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}var yt=class{constructor(e,i){this.type=e,this.defaultPrevented=!1,i&&Object.assign(this,i)}preventDefault(){this.defaultPrevented=!0}},bt=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,i,r=100){var n,o,s;this._filters[e]||(this._filters[e]=[]),(n=this._filters[e])===null||n===void 0||n.push({fn:i,priority:r}),(o=this._filters[e])===null||o===void 0||o.sort((c,f)=>c.priority-f.priority),(s=this.pswp)===null||s===void 0||s.addFilter(e,i,r)}removeFilter(e,i){this._filters[e]&&(this._filters[e]=this._filters[e].filter(r=>r.fn!==i)),this.pswp&&this.pswp.removeFilter(e,i)}applyFilters(e,...i){var r;return(r=this._filters[e])===null||r===void 0||r.forEach(n=>{i[0]=n.fn.apply(this,i)}),i[0]}on(e,i){var r,n;this._listeners[e]||(this._listeners[e]=[]),(r=this._listeners[e])===null||r===void 0||r.push(i),(n=this.pswp)===null||n===void 0||n.on(e,i)}off(e,i){var r;this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(n=>i!==n)),(r=this.pswp)===null||r===void 0||r.off(e,i)}dispatch(e,i){var r;if(this.pswp)return this.pswp.dispatch(e,i);let n=new yt(e,i);return(r=this._listeners[e])===null||r===void 0||r.forEach(o=>{o.call(this,n)}),n}},wt=class{constructor(e,i){if(this.element=De("pswp__img pswp__img--placeholder",e?"img":"div",i),e){let r=this.element;r.decoding="async",r.alt="",r.src=e,r.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,i){this.element&&(this.element.tagName==="IMG"?(gt(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=Gr(0,0,e/250)):gt(this.element,e,i))}destroy(){var e;(e=this.element)!==null&&e!==void 0&&e.parentNode&&this.element.remove(),this.element=null}},Et=class{constructor(e,i,r){this.instance=i,this.data=e,this.index=r,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=B.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(e,i){if(this.slide&&this.usePlaceholder())if(this.placeholder){let r=this.placeholder.element;r&&!r.parentElement&&this.slide.container.prepend(r)}else{let r=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new wt(r,this.slide.container)}this.element&&!i||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=De("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=De("pswp__content","div"),this.element.innerHTML=this.data.html||""),i&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){var i,r;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;let n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=(i=this.data.src)!==null&&i!==void 0?i:"",n.alt=(r=this.data.alt)!==null&&r!==void 0?r:"",this.state=B.LOADING,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=B.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===B.LOADED||this.state===B.ERROR)&&this.removePlaceholder())}onError(){this.state=B.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===B.LOADING,this)}isError(){return this.state===B.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(e,i){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,i),!this.instance.dispatch("contentResize",{content:this,width:e,height:i}).defaultPrevented&&(gt(this.element,e,i),this.isImageContent()&&!this.isError()))){let r=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=i,r?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:i,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==B.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;let e=this.element,i=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||i>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=i+"px",e.dataset.largestUsedSize=String(i))}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 e,i;let r=De("pswp__error-msg","div");r.innerText=(e=(i=this.instance.options)===null||i===void 0?void 0:i.errorMsg)!==null&&e!==void 0?e:"",r=this.instance.applyFilters("contentErrorElement",r,this),this.element=De("pswp__content pswp__error-msg-container","div"),this.element.appendChild(r),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===B.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;let e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||Oi())?(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&&!Oi()?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===B.LOADED||this.state===B.ERROR)&&this.removePlaceholder()))}};function Xr(t,e){if(t.getViewportSizeFn){let i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function et(t,e,i,r,n){let o=0;if(e.paddingFn)o=e.paddingFn(i,r,n)[t];else if(e.padding)o=e.padding[t];else{let s="padding"+t[0].toUpperCase()+t.slice(1);e[s]&&(o=e[s])}return Number(o)||0}function Yr(t,e,i,r){return{x:e.x-et("left",t,e,i,r)-et("right",t,e,i,r),y:e.y-et("top",t,e,i,r)-et("bottom",t,e,i,r)}}var Ti=4e3,xt=class{constructor(e,i,r,n){this.pswp=n,this.options=e,this.itemData=i,this.index=r,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(e,i,r){let n={x:e,y:i};this.elementSize=n,this.panAreaSize=r;let o=r.x/n.x,s=r.y/n.y;this.fit=Math.min(1,os?o:s),this.vFill=Math.min(1,s),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(e){let i=e+"ZoomLevel",r=this.options[i];if(r)return typeof r=="function"?r(this):r==="fill"?this.fill:r==="fit"?this.fit:Number(r)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,this.fit*3),this.elementSize&&e*this.elementSize.x>Ti&&(e=Ti/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}};function _i(t,e,i){let r=e.createContentFromData(t,i),n,{options:o}=e;if(o){n=new xt(o,t,-1);let s;e.pswp?s=e.pswp.viewportSize:s=Xr(o,e);let c=Yr(o,s,t,i);n.update(r.width,r.height,c)}return r.lazyLoad(),n&&r.setDisplayedSize(Math.ceil(r.width*n.initial),Math.ceil(r.height*n.initial)),r}function Qr(t,e){let i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return _i(i,e,t)}var St=class extends bt{getNumItems(){var e;let i=0,r=(e=this.options)===null||e===void 0?void 0:e.dataSource;r&&"length"in r?i=r.length:r&&"gallery"in r&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),r.items&&(i=r.items.length));let n=this.dispatch("numItems",{dataSource:r,numItems:i});return this.applyFilters("numItems",n.numItems,r)}createContentFromData(e,i){return new Et(e,this,i)}getItemData(e){var i;let r=(i=this.options)===null||i===void 0?void 0:i.dataSource,n={};Array.isArray(r)?n=r[e]:r&&"gallery"in r&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),n=r.items[e]);let o=n;o instanceof Element&&(o=this._domElementToItemData(o));let s=this.dispatch("itemData",{itemData:o||{},index:e});return this.applyFilters("itemData",s.itemData,e)}_getGalleryDOMElements(e){var i,r;return(i=this.options)!==null&&i!==void 0&&i.children||(r=this.options)!==null&&r!==void 0&&r.childSelector?Fe(this.options.children,this.options.childSelector,e)||[]:[e]}_domElementToItemData(e){let i={element:e},r=e.tagName==="A"?e:e.querySelector("a");if(r){i.src=r.dataset.pswpSrc||r.href,r.dataset.pswpSrcset&&(i.srcset=r.dataset.pswpSrcset),i.width=r.dataset.pswpWidth?parseInt(r.dataset.pswpWidth,10):0,i.height=r.dataset.pswpHeight?parseInt(r.dataset.pswpHeight,10):0,i.w=i.width,i.h=i.height,r.dataset.pswpType&&(i.type=r.dataset.pswpType);let o=e.querySelector("img");if(o){var n;i.msrc=o.currentSrc||o.src,i.alt=(n=o.getAttribute("alt"))!==null&&n!==void 0?n:""}(r.dataset.pswpCropped||r.dataset.cropped)&&(i.thumbCropped=!0)}return this.applyFilters("domItemData",i,e,r)}lazyLoadData(e,i){return _i(e,this,i)}},Ot=class extends St{constructor(e){super(),this.options=e||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){Fe(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(e){if(qr(e)||window.pswp)return;let i={x:e.clientX,y:e.clientY};!i.x&&!i.y&&(i=null);let r=this.getClickedIndex(e);r=this.applyFilters("clickedIndex",r,e,this);let n={gallery:e.currentTarget};r>=0&&(e.preventDefault(),this.loadAndOpen(r,n,i))}getClickedIndex(e){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,e);let i=e.target,n=Fe(this.options.children,this.options.childSelector,e.currentTarget).findIndex(o=>o===i||o.contains(i));return n!==-1?n:this.options.children||this.options.childSelector?-1:0}loadAndOpen(e,i,r){if(window.pswp||!this.options)return!1;if(!i&&this.options.gallery&&this.options.children){let n=Fe(this.options.gallery);n[0]&&(i={gallery:n[0]})}return this.options.index=e,this.options.initialPointerPos=r,this.shouldOpen=!0,this.preload(e,i),!0}preload(e,i){let{options:r}=this;i&&(r.dataSource=i);let n=[],o=typeof r.pswpModule;if(Zr(r.pswpModule))n.push(Promise.resolve(r.pswpModule));else{if(o==="string")throw new Error("pswpModule as string is no longer supported");if(o==="function")n.push(r.pswpModule());else throw new Error("pswpModule is not valid")}typeof r.openPromise=="function"&&n.push(r.openPromise()),r.preloadFirstSlide!==!1&&e>=0&&(this._preloadedContent=Qr(e,this));let s=++this._uid;Promise.all(n).then(c=>{if(this.shouldOpen){let f=c[0];this._openPhotoswipe(f,s)}})}_openPhotoswipe(e,i){if(i!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;let r=typeof e=="object"?new e.default(this.options):new e(this.options);this.pswp=r,window.pswp=r,Object.keys(this._listeners).forEach(n=>{var o;(o=this._listeners[n])===null||o===void 0||o.forEach(s=>{r.on(n,s)})}),Object.keys(this._filters).forEach(n=>{var o;(o=this._filters[n])===null||o===void 0||o.forEach(s=>{r.addFilter(n,s.fn,s.priority)})}),this._preloadedContent&&(r.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),r.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),r.init()}destroy(){var e;(e=this.pswp)===null||e===void 0||e.destroy(),this.shouldOpen=!1,this._listeners={},Fe(this.options.gallery,this.options.gallerySelector).forEach(i=>{i.removeEventListener("click",this.onThumbnailsClick,!1)})}};(function(){let t=!1;if(document.createElement("i").addEventListener("click",()=>{},{get signal(){t=!0}}),t||!window.AbortController)return;let e=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,r,n){if(n&&n.signal){if(n.signal.aborted)return;n.signal.addEventListener("abort",()=>this.removeEventListener(i,r,{...n}))}return e.call(this,i,r,n)}})();export{Ur as Delegate,Ut as FocusTrap,Ot as PhotoSwipeLightbox,Qe as ScrollOffset,Si as animate,li as inView,xi as scroll,ri as stagger,ai as timeline}; /*! Bundled license information: instant.page/instantpage.js: (*! instant.page v5.2.0 - (C) 2019-2023 Alexandre Dieulot - https://instant.page/license *) tabbable/dist/index.esm.js: (*! * tabbable 6.2.0 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE *) focus-trap/dist/focus-trap.esm.js: (*! * focus-trap 7.6.0 * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE *) photoswipe/dist/photoswipe-lightbox.esm.js: (*! * PhotoSwipe Lightbox 5.4.4 - https://photoswipe.com * (c) 2024 Dmytro Semenov *) */