var Ii=Object.defineProperty;var Ai=(t,e)=>{for(var i in e)Ii(t,i,{get:e[i],enumerable:!0})};var Pe=null,At,Ft,Dt,Pt=65,rt,he,It=new Set,Nt=1111;Fi();function Fi(){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&&(Pe=parseInt(navigator.userAgent.substring(i+7))),e&&Pe&&Pe<110)return;let r="instantMousedownShortcut"in document.body.dataset;At="instantAllowQueryString"in document.body.dataset,Ft="instantAllowExternalLinks"in document.body.dataset,Dt="instantWhitelist"in document.body.dataset;let n={capture:!0,passive:!0},o=!1,s=!1,l=!1;if("instantIntensity"in document.body.dataset){let u=document.body.dataset.instantIntensity;if(u.startsWith("mousedown"))o=!0,u=="mousedown-only"&&(s=!0);else if(u.startsWith("viewport")){let c=navigator.connection&&navigator.connection.saveData,m=navigator.connection&&navigator.connection.effectiveType&&navigator.connection.effectiveType.includes("2g");!c&&!m&&(u=="viewport"?document.documentElement.clientWidth*document.documentElement.clientHeight<45e4&&(l=!0):u=="viewport-all"&&(l=!0))}else{let c=parseInt(u);isNaN(c)||(Pt=c)}}if(s||document.addEventListener("touchstart",Di,n),o?r||document.addEventListener("mousedown",Ni,n):document.addEventListener("mouseover",Pi,n),r&&document.addEventListener("mousedown",Ci,n),l){let u=window.requestIdleCallback;u||(u=c=>{c()}),u(function(){let m=new IntersectionObserver(h=>{h.forEach(d=>{if(d.isIntersecting){let x=d.target;m.unobserve(x),Le(x.href)}})});document.querySelectorAll("a").forEach(h=>{Ne(h)&&m.observe(h)})},{timeout:1500})}}function Di(t){rt=performance.now();let e=t.target.closest("a");Ne(e)&&Le(e.href,"high")}function Pi(t){if(performance.now()-rt{Le(e.href,"high"),he=void 0},Pt))}function Ni(t){let e=t.target.closest("a");Ne(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 Ne(t){if(!(!t||!t.href)&&!(Dt&&!("instant"in t.dataset))&&!(t.origin!=location.origin&&(!(Ft||"instant"in t.dataset)||!Pe))&&["http:","https:"].includes(t.protocol)&&!(t.protocol=="http:"&&location.protocol=="https:")&&!(!At&&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(It.has(t))return;let i=document.createElement("link");i.rel="prefetch",i.href=t,i.fetchPriority=e,i.as="document",document.head.appendChild(i),It.add(t)}var Ut={};Ai(Ut,{createFocusTrap:()=>cr});var Ct=["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=Ct.join(","),Rt=typeof Element>"u",re=Rt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Re=!Rt&&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"},kt=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},Mt=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 l=s.assignedElements(),u=l.length?l:s.children,c=t(u,!0,r);r.flatten?n.push.apply(n,c):n.push({scopeParent:s,candidates:c})}else{var m=re.call(s,Ce);m&&r.filter(s)&&(i||!e.includes(s))&&n.push(s);var h=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),d=!ke(h,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(h&&d){var x=t(h===!0?s.children:h.children,!0,r);r.flatten?n.push.apply(n,x):n.push({scopeParent:s,candidates:x})}else o.unshift.apply(o,s.children)}}return n},jt=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))&&!jt(e)?0:e.tabIndex},ki=function(e,i){var r=Z(e);return r<0&&i&&!jt(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"},ji=function(e){return zt(e)&&e.type==="hidden"},zi=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 l=e;e;){var u=e.parentElement,c=Re(e);if(u&&!u.shadowRoot&&n(u)===!0)return Lt(e);e.assignedSlot?e=e.assignedSlot:!u&&c!==e.ownerDocument?e=c.host:e=u}e=l}if(Ki(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Lt(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,l=s?n.scopeParent:n,u=ki(l,s),c=s?t(n.candidates):l;u===0?s?i.push.apply(i,c):i.push(l):r.push({documentOrder:o,tabIndex:u,item:n,isScope:s,content:c})}),r.sort(Mi).reduce(function(n,o){return o.isScope?n.push.apply(n,o.content):n.push(o.content),n},[]).concat(i)},Wt=function(e,i){i=i||{};var r;return i.getShadowRoot?r=Mt([e],i.includeContainer,{filter:nt.bind(null,i),flatten:!1,getShadowRoot:i.getShadowRoot,shadowRootFilter:Gi}):r=kt(e,i.includeContainer,nt.bind(null,i)),qi(r)},Bt=function(e,i){i=i||{};var r;return i.getShadowRoot?r=Mt([e],i.includeContainer,{filter:Me.bind(null,i),flatten:!0,getShadowRoot:i.getShadowRoot}):r=kt(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=Ct.concat("iframe").join(","),je=function(e,i){if(i=i||{},!e)throw new Error("No node provided");return re.call(e,Zi)===!1?!1:Me(i,e)};function st(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,r=Array(e);i0){var r=e[e.length-1];r!==i&&r._setPausedState(!0)}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]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}},nr=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},sr=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},me=function(e){return e?.key==="Tab"||e?.keyCode===9},or=function(e){return me(e)&&!e.shiftKey},ar=function(e){return me(e)&&e.shiftKey},Ht=function(e){return setTimeout(e,0)},pe=function(e){for(var i=arguments.length,r=new Array(i>1?i-1:0),n=1;n1&&arguments[1]!==void 0?arguments[1]:{},p=f.hasFallback,g=p===void 0?!1:p,y=f.params,O=y===void 0?[]:y,b=o[a];if(typeof b=="function"&&(b=b.apply(void 0,er(O))),b===!0&&(b=void 0),!b){if(b===void 0||b===!1)return b;throw new Error("`".concat(a,"` was specified but was not a node, or did not return a node"))}var F=b;if(typeof b=="string"){try{F=r.querySelector(b)}catch(P){throw new Error("`".concat(a,'` appears to be an invalid selector; error="').concat(P.message,'"'))}if(!F&&!g)throw new Error("`".concat(a,"` as selector refers to no known node"))}return F},h=function(){var a=m("initialFocus",{hasFallback:!0});if(a===!1)return!1;if(a===void 0||a&&!je(a,o.tabbableOptions))if(c(r.activeElement)>=0)a=r.activeElement;else{var f=s.tabbableGroups[0],p=f&&f.firstTabbableNode;a=p||m("fallbackFocus")}else a===null&&(a=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 f=Wt(a,o.tabbableOptions),p=Bt(a,o.tabbableOptions),g=f.length>0?f[0]:void 0,y=f.length>0?f[f.length-1]:void 0,O=p.find(function(P){return ne(P)}),b=p.slice().reverse().find(function(P){return ne(P)}),F=!!f.find(function(P){return Z(P)>0});return{container:a,tabbableNodes:f,focusableNodes:p,posTabIndexesFound:F,firstTabbableNode:g,lastTabbableNode:y,firstDomTabbableNode:O,lastDomTabbableNode:b,nextTabbableNode:function(ie){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,q=f.indexOf(ie);return q<0?fe?p.slice(p.indexOf(ie)+1).find(function(de){return ne(de)}):p.slice(0,p.indexOf(ie)).reverse().find(function(de){return ne(de)}):f[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.")},x=function(a){var f=a.activeElement;if(f)return f.shadowRoot&&f.shadowRoot.activeElement!==null?x(f.shadowRoot):f},E=function(a){if(a!==!1&&a!==x(document)){if(!a||!a.focus){E(h());return}a.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=a,nr(a)&&a.select()}},T=function(a){var f=m("setReturnFocus",{params:[a]});return f||(f===!1?!1:a)},A=function(a){var f=a.target,p=a.event,g=a.isBackward,y=g===void 0?!1:g;f=f||ze(p),d();var O=null;if(s.tabbableGroups.length>0){var b=c(f,p),F=b>=0?s.containerGroups[b]:void 0;if(b<0)y?O=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:O=s.tabbableGroups[0].firstTabbableNode;else if(y){var P=s.tabbableGroups.findIndex(function(tt){var it=tt.firstTabbableNode;return f===it});if(P<0&&(F.container===f||je(f,o.tabbableOptions)&&!ne(f,o.tabbableOptions)&&!F.nextTabbableNode(f,!1))&&(P=b),P>=0){var ie=P===0?s.tabbableGroups.length-1:P-1,fe=s.tabbableGroups[ie];O=Z(f)>=0?fe.lastTabbableNode:fe.lastDomTabbableNode}else me(p)||(O=F.nextTabbableNode(f,!1))}else{var q=s.tabbableGroups.findIndex(function(tt){var it=tt.lastTabbableNode;return f===it});if(q<0&&(F.container===f||je(f,o.tabbableOptions)&&!ne(f,o.tabbableOptions)&&!F.nextTabbableNode(f))&&(q=b),q>=0){var de=q===s.tabbableGroups.length-1?0:q+1,Tt=s.tabbableGroups[de];O=Z(f)>=0?Tt.firstTabbableNode:Tt.firstDomTabbableNode}else me(p)||(O=F.nextTabbableNode(f))}}else O=m("fallbackFocus");return O},I=function(a){var f=ze(a);if(!(c(f,a)>=0)){if(pe(o.clickOutsideDeactivates,a)){l.deactivate({returnFocus:o.returnFocusOnDeactivate});return}pe(o.allowOutsideClick,a)||a.preventDefault()}},k=function(a){var f=ze(a),p=c(f,a)>=0;if(p||f instanceof Document)p&&(s.mostRecentlyFocusedNode=f);else{a.stopImmediatePropagation();var g,y=!0;if(s.mostRecentlyFocusedNode)if(Z(s.mostRecentlyFocusedNode)>0){var O=c(s.mostRecentlyFocusedNode),b=s.containerGroups[O].tabbableNodes;if(b.length>0){var F=b.findIndex(function(P){return P===s.mostRecentlyFocusedNode});F>=0&&(o.isKeyForward(s.recentNavEvent)?F+1=0&&(g=b[F-1],y=!1))}}else s.containerGroups.some(function(P){return P.tabbableNodes.some(function(ie){return Z(ie)>0})})||(y=!1);else y=!1;y&&(g=A({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),E(g||s.mostRecentlyFocusedNode||h())}s.recentNavEvent=void 0},M=function(a){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;s.recentNavEvent=a;var p=A({event:a,isBackward:f});p&&(me(a)&&a.preventDefault(),E(p))},z=function(a){(o.isKeyForward(a)||o.isKeyBackward(a))&&M(a,o.isKeyBackward(a))},D=function(a){sr(a)&&pe(o.escapeDeactivates,a)!==!1&&(a.preventDefault(),l.deactivate())},j=function(a){var f=ze(a);c(f,a)>=0||pe(o.clickOutsideDeactivates,a)||pe(o.allowOutsideClick,a)||(a.preventDefault(),a.stopImmediatePropagation())},W=function(){if(s.active)return Kt.activateTrap(n,l),s.delayInitialFocusTimer=o.delayInitialFocus?Ht(function(){E(h())}):E(h()),r.addEventListener("focusin",k,!0),r.addEventListener("mousedown",I,{capture:!0,passive:!1}),r.addEventListener("touchstart",I,{capture:!0,passive:!1}),r.addEventListener("click",j,{capture:!0,passive:!1}),r.addEventListener("keydown",z,{capture:!0,passive:!1}),r.addEventListener("keydown",D),l},L=function(){if(s.active)return r.removeEventListener("focusin",k,!0),r.removeEventListener("mousedown",I,!0),r.removeEventListener("touchstart",I,!0),r.removeEventListener("click",j,!0),r.removeEventListener("keydown",z,!0),r.removeEventListener("keydown",D),l},S=function(a){var f=a.some(function(p){var g=Array.from(p.removedNodes);return g.some(function(y){return y===s.mostRecentlyFocusedNode})});f&&E(h())},$=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(S):void 0,w=function(){$&&($.disconnect(),s.active&&!s.paused&&s.containers.map(function(a){$.observe(a,{subtree:!0,childList:!0})}))};return l={get active(){return s.active},get paused(){return s.paused},activate:function(a){if(s.active)return this;var f=u(a,"onActivate"),p=u(a,"onPostActivate"),g=u(a,"checkCanFocusTrap");g||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=r.activeElement,f?.();var y=function(){g&&d(),W(),w(),p?.()};return g?(g(s.containers.concat()).then(y,y),this):(y(),this)},deactivate:function(a){if(!s.active)return this;var f=Vt({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},a);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,L(),s.active=!1,s.paused=!1,w(),Kt.deactivateTrap(n,l);var p=u(f,"onDeactivate"),g=u(f,"onPostDeactivate"),y=u(f,"checkCanReturnFocus"),O=u(f,"returnFocus","returnFocusOnDeactivate");p?.();var b=function(){Ht(function(){O&&E(T(s.nodeFocusedBeforeActivation)),g?.()})};return O&&y?(y(T(s.nodeFocusedBeforeActivation)).then(b,b),this):(b(),this)},pause:function(a){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,a)):this},unpause:function(a){return s.active?(s.manuallyPaused=!1,n[n.length-1]!==this?this:this._setPausedState(!1,a)):this},updateContainerElements:function(a){var f=[].concat(a).filter(Boolean);return s.containers=f.map(function(p){return typeof p=="string"?r.querySelector(p):p}),s.active&&d(),w(),this}},Object.defineProperties(l,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(a,f){if(s.paused===a)return this;if(s.paused=a,a){var p=u(f,"onPause"),g=u(f,"onPostPause");p?.(),L(),w(),g?.()}else{var y=u(f,"onUnpause"),O=u(f,"onPostUnpause");y?.(),d(),W(),w(),O?.()}return this}}}),l.updateContainerElements(e),l};function ot(t,e){t.indexOf(e)===-1&&t.push(e)}function at(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 _={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"};var R=t=>typeof t=="number";var K=t=>Array.isArray(t)&&!R(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=()=>{},C=t=>t;var V=(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=V(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=C){let r=t.length,n=r-e.length;return n>0&&ce(e,n),o=>{let s=0;for(;sArray.isArray(t)&&R(t[0]);var X=t=>typeof t=="object"&&!!t.createAnimation;var N=t=>typeof t=="function";var H=t=>typeof t=="string";var Y={ms:t=>t*1e3,s:t=>t/1e3};function lt(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,ur=1e-7,fr=12;function dr(t,e,i,r,n){let o,s,l=0;do s=e+(i-e)/2,o=qt(s,r,n)-t,o>0?i=s:e=s;while(Math.abs(o)>ur&&++ldr(o,0,1,t,i);return o=>o===0||o===1?o:qt(n(o),e,r)}var ct=(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 hr={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)},pr=/\((.*?)\)/;function ue(t){if(N(t))return t;if(we(t))return ae(...t);let e=hr[t];if(e)return e;if(t.startsWith("steps")){let i=pr.exec(t);if(i){let r=i[1].split(",");return ct(parseFloat(r[0]),r[1].trim())}}return C}var U=class{constructor(e,i=[0,1],{easing:r,duration:n=_.duration,delay:o=_.delay,endDelay:s=_.endDelay,repeat:l=_.repeat,offset:u,direction:c="normal",autoplay:m=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=C,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((d,x)=>{this.resolve=d,this.reject=x}),r=r||_.easing,X(r)){let d=r.createAnimation(i);r=d.easing,i=d.keyframes||i,n=d.duration||n}this.repeat=l,this.easing=K(r)?C:ue(r),this.updateDuration(n);let h=be(i,u,K(r)?r.map(ue):C);this.tick=d=>{var x;o=o;let E=0;this.pauseTime!==void 0?E=this.pauseTime:E=(d-this.startTime)*this.rate,this.t=E,E/=1e3,E=Math.max(E-o,0),this.playState==="finished"&&this.pauseTime===void 0&&(E=this.totalDuration);let T=E/this.duration,A=Math.floor(T),I=T%1;!I&&T>=1&&(I=1),I===1&&A--;let k=A%2;(c==="reverse"||c==="alternate"&&k||c==="alternate-reverse"&&!k)&&(I=1-I);let M=E>=this.totalDuration?1:Math.min(I,1),z=h(this.easing(M));e(z),this.pauseTime===void 0&&(this.playState==="finished"||E>=this.totalDuration+s)?(this.playState="finished",(x=this.resolve)===null||x===void 0||x.call(this,z)):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 ut=new WeakMap;function We(t){return ut.has(t)||ut.set(t,{transforms:[],values:new Map}),ut.get(t)}function Zt(t,e){return t.has(e)||t.set(e,new xe),t.get(e)}var mr=["","X","Y","Z"],vr=["translate","scale","rotate","skew"],Se={x:"translateX",y:"translateY",z:"translateZ"},Xt={syntax:"",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},gr={translate:{syntax:"",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:Xt,scale:{syntax:"",initialValue:1,toDefaultUnit:C},skew:Xt},Q=new Map,$e=t=>`--motion-${t}`,Be=["x","y","z"];vr.forEach(t=>{mr.forEach(e=>{Be.push(t+e),Q.set($e(t+e),gr[t])})});var yr=(t,e)=>Be.indexOf(t)-Be.indexOf(e),br=new Set(Be),Ve=t=>br.has(t),Yt=(t,e)=>{Se[e]&&(e=Se[e]);let{transforms:i}=We(t);ot(i,e),t.style.transform=wr(i)},wr=t=>t.sort(yr).reduce(Er,"").trim(),Er=(t,e)=>`${t} ${e}(var(${$e(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 ft=(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{ft({opacity:[1]})}catch{return!1}return!0},finished:()=>!!ft({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{ft({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},dt={},J={};for(let t in ei)J[t]=()=>(dt[t]===void 0&&(dt[t]=ei[t]()),dt[t]);var xr=.015,Sr=(t,e)=>{let i="",r=Math.round(e/xr);for(let n=0;nN(t)?J.linearEasing()?`linear(${Sr(t,e)})`:_.easing:we(t)?Or(t):t,Or=([t,e,i,r])=>`cubic-bezier(${t}, ${e}, ${i}, ${r})`;function ti(t,e){for(let i=0;iArray.isArray(t)?t:[t];function _e(t){return Se[t]&&(t=Se[t]),Ve(t)?$e(t):t}var Te={get:(t,e)=>{e=_e(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=_e(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||C,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 _r(){return window.__MOTION_DEV_TOOLS_RECORD}function Ue(t,e,i,r={},n){let o=_r(),s=r.record!==!1&&o,l,{duration:u=_.duration,delay:c=_.delay,endDelay:m=_.endDelay,repeat:h=_.repeat,easing:d=_.easing,persist:x=!1,direction:E,offset:T,allowWebkitAcceleration:A=!1,autoplay:I=!0}=r,k=We(t),M=Ve(e),z=J.waapi();M&&Yt(t,e);let D=_e(e),j=Zt(k.values,D),W=Q.get(D);return He(j.animation,!(X(d)&&j.generator)&&r.record!==!1),()=>{let L=()=>{var w,v;return(v=(w=Te.get(t,D))!==null&&w!==void 0?w:W?.initialValue)!==null&&v!==void 0?v:0},S=ti(Ke(i),L),$=ii(S,W);if(X(d)){let w=d.createAnimation(S,e!=="opacity",L,D,j);d=w.easing,S=w.keyframes||S,u=w.duration||u}if(Oe(D)&&(J.cssRegisterProperty()?Jt(D):z=!1),M&&!J.linearEasing()&&(N(d)||K(d)&&d.some(N))&&(z=!1),z){W&&(S=S.map(a=>R(a)?W.toDefaultUnit(a):a)),S.length===1&&(!J.partialKeyframes()||s)&&S.unshift(L());let w={delay:Y.ms(c),duration:Y.ms(u),endDelay:Y.ms(m),easing:K(d)?void 0:ht(d,u),direction:E,iterations:h+1,fill:"both"};l=t.animate({[D]:S,offset:T,easing:K(d)?d.map(a=>ht(a,u)):void 0},w),l.finished||(l.finished=new Promise((a,f)=>{l.onfinish=a,l.oncancel=f}));let v=S[S.length-1];l.finished.then(()=>{x||(Te.set(t,D,v),l.cancel())}).catch(ye),A||(l.playbackRate=1.000001)}else if(n&&M)S=S.map(w=>typeof w=="string"?parseFloat(w):w),S.length===1&&S.unshift(parseFloat(L())),l=new n(w=>{Te.set(t,D,$?$(w):w)},S,Object.assign(Object.assign({},r),{duration:u,easing:d}));else{let w=S[S.length-1];Te.set(t,D,W&&R(w)?W.toDefaultUnit(w):w)}return s&&o(t,e,S,{duration:u,delay:c,easing:d,repeat:h,offset:T},"motion-one"),j.setAnimation(l),l&&!I&&l.pause(),l}}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 Tr=t=>t(),le=(t,e,i=_.duration)=>new Proxy({animations:t.map(Tr).filter(Boolean),duration:i,options:e},Ar),Ir=t=>t.animations[0],Ar={get:(t,e)=>{let i=Ir(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(Fr)).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=R(i)?i:Dr(i,o),l=Math.abs(s-n),u=t*l;if(r){let c=o*t;u=ue(r)(u/c)*c}return e+u}}function Dr(t,e){if(t==="first")return 0;{let i=e-1;return t==="last"?i:i/2}}function qe(t,e,i){return N(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 l=0;le&&n.atUe(...o,U)).filter(Boolean);return le(n,e,(i=r[0])===null||i===void 0?void 0:i[3].duration)}function Nr(t,e={}){var{defaultOptions:i={}}=e,r=Ze(e,["defaultOptions"]);let n=[],o=new Map,s={},l=new Map,u=0,c=0,m=0;for(let h=0;h1,"spring must be provided 2 keyframes within timeline()");let y=w.createAnimation(L,j!=="opacity",()=>0,j);w=y.easing,L=y.keyframes||L,$=y.duration||$}let v=qe(T.delay,M,k)||0,a=c+v,f=a+$,{offset:p=oe(L.length)}=S;p.length===1&&p[0]===0&&(p[1]=1);let g=p.length-L.length;g>0&&ce(p,g),L.length===1&&L.unshift(null),si(W,L,w,p,a,f),A=Math.max(v+$,A),m=Math.max(f,m)}}u=c,c+=A}return o.forEach((h,d)=>{for(let x in h){let E=h[x];E.sort(oi);let T=[],A=[],I=[];for(let k=0;k"u")return()=>{};let o=ee(t),s=new WeakMap,l=c=>{c.forEach(m=>{let h=s.get(m.target);if(m.isIntersecting!==!!h)if(m.isIntersecting){let d=e(m);N(d)?s.set(m.target,d):u.unobserve(m.target)}else h&&(h(m),s.delete(m.target))})},u=new IntersectionObserver(l,{root:i,rootMargin:r,threshold:typeof n=="number"?n:Rr[n]});return o.forEach(c=>u.observe(c)),()=>u.disconnect()}var Xe=new WeakMap,te;function kr(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 Mr({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 kr(t,i)}})})}function jr(t){t.forEach(Mr)}function zr(){typeof ResizeObserver>"u"||(te=new ResizeObserver(jr))}function ci(t,e){te||zr();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 Wr(){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||Wr(),()=>{Ye.delete(t),!Ye.size&&Ie&&(Ie=void 0)}}function fi(t,e){return N(t)?ui(t):ci(t,e)}var Br=50,di=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),pi=()=>({time:0,x:di(),y:di()}),$r={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function hi(t,e,i,r){let n=i[e],{length:o,position:s}=$r[e],l=n.current,u=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=V(0,n.scrollLength,n.current);let c=r-u;n.velocity=c>Br?0:lt(n.current-l,c)}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 vt(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 R(t)&&(r=e*t),i+r}var Vr=[0,0];function gi(t,e,i,r){let n=Array.isArray(t)?t:Vr,o=0,s=0;return R(t)?n=[t,t]:H(t)&&(t=t.trim(),t.includes(" ")?n=t.split(" "):n=[t,Je[t]?t:"0"]),o=vt(n[0],i,r),s=vt(n[1],e),o-s}var Kr={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",l=n!==t?vi(n,t):Kr,u=n===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:n.clientWidth,height:n.clientHeight},c={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let m=!e[o].interpolate,h=r.length;for(let d=0;dHr(t,r.target,i),update:o=>{mi(t,i,o),(r.offset||r.target)&&yi(t,i,r)},notify:N(e)?()=>e(i):Ur(e,i[n])}}function Ur(t,e){return t.pause(),t.forEachNative((i,{easing:r})=>{var n,o;if(i.updateDuration)r||(i.easing=C),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,gt=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=gt.get(i);n||(n=new Set,gt.set(i,n));let o=pi(),s=bi(i,t,o,r);if(n.add(s),!Ae.has(i)){let c=()=>{let h=performance.now();for(let d of n)d.measure();for(let d of n)d.update(h);for(let d of n)d.notify()};Ae.set(i,c);let m=Ei(i);window.addEventListener("resize",c,{passive:!0}),i!==document.documentElement&&wi.set(i,fi(i,c)),m.addEventListener("scroll",c,{passive:!0})}let l=Ae.get(i),u=requestAnimationFrame(l);return()=>{var c;typeof t!="function"&&t.stop(),cancelAnimationFrame(u);let m=gt.get(i);if(!m||(m.delete(s),m.size))return;let h=Ae.get(i);Ae.delete(i),h&&(Ei(i).removeEventListener("scroll",h),(c=wi.get(i))===null||c===void 0||c(),window.removeEventListener("resize",h))}}function Gr(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(N(t)?Gr:pt)(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,l;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)?(l=e,s=qr):/^#[a-z0-9\-_]+$/i.test(e)?(l=e.slice(1),s=Xr):(l=e,s=Element.prototype.matches):(l=null,s=Zr.bind(this)),o[t].push({selector:e,handler:i,matcher:s,matcherParam:l}),this};G.prototype.off=function(t,e,i,r){let n,o,s,l,u;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(u in s)s.hasOwnProperty(u)&&this.off(u,e,i);return this}if(l=s[t],!l||!l.length)return this;for(n=l.length-1;n>=0;n--)o=l[n],(!e||e===o.selector)&&(!i||i===o.handler)&&(this._removedListeners.push(o),l.splice(n,1));return l.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,l,u=[],c,m="ftLabsDelegateIgnore";if(t[m]===!0)return;switch(c=t.target,c.nodeType===3&&(c=c.parentNode),c.correspondingUseElement&&(c=c.correspondingUseElement),n=this.rootElement,o=t.eventPhase||(t.target!==t.currentTarget?3:2),o){case 1:u=this.listenerMap[1][r];break;case 2:this.listenerMap[0]&&this.listenerMap[0][r]&&(u=u.concat(this.listenerMap[0][r])),this.listenerMap[1]&&this.listenerMap[1][r]&&(u=u.concat(this.listenerMap[1][r]));break;case 3:u=this.listenerMap[0][r];break}let h=[];for(i=u.length;c&&i;){for(e=0;e-1&&c.hasAttribute("disabled")?h=[]:s.matcher.call(c,s.matcherParam,c)&&h.push([t,c,s]);if(c===n||(i=u.length,c=c.parentElement||c.parentNode,c instanceof HTMLDocument))break}let d;for(e=0;e-1)&&(l=this.fire.apply(this,h[e]),l===!1)){h[e][0][m]=!0,h[e][0].preventDefault(),d=!1;break}return d};G.prototype.fire=function(t,e,i){return i.handler.call(e,t,e)};function qr(t,e){return t.toLowerCase()===e.tagName.toLowerCase()}function Zr(t,e){return this.rootElement===window?e===document||e===document.documentElement||e===window:this.rootElement===e}function Xr(t,e){return t===e.id}G.prototype.destroy=function(){this.off(),this.root()};var Yr=G;function Fe(t,e,i){let r=document.createElement(e);return t&&(r.className=t),i&&i.appendChild(r),r}function Qr(t,e,i){let r=`translate3d(${t}px,${e||0}px,0)`;return i!==void 0&&(r+=` scale3d(${i},${i},1)`),r}function yt(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 Jr(t){return"button"in t&&t.button===1||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function De(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 en(t){return typeof t=="function"&&t.prototype&&t.prototype.goTo}function Oi(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}var bt=class{constructor(e,i){this.type=e,this.defaultPrevented=!1,i&&Object.assign(this,i)}preventDefault(){this.defaultPrevented=!0}},wt=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((l,u)=>l.priority-u.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 bt(e,i);return(r=this._listeners[e])===null||r===void 0||r.forEach(o=>{o.call(this,n)}),n}},Et=class{constructor(e,i){if(this.element=Fe("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"?(yt(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=Qr(0,0,e/250)):yt(this.element,e,i))}destroy(){var e;(e=this.element)!==null&&e!==void 0&&e.parentNode&&this.element.remove(),this.element=null}},xt=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 Et(r,this.slide.container)}this.element&&!i||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=Fe("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=Fe("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&&(yt(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=Fe("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=Fe("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 tn(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 rn(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 _i=4e3,St=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>_i&&(e=_i/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}};function Ti(t,e,i){let r=e.createContentFromData(t,i),n,{options:o}=e;if(o){n=new St(o,t,-1);let s;e.pswp?s=e.pswp.viewportSize:s=tn(o,e);let l=rn(o,s,t,i);n.update(r.width,r.height,l)}return r.lazyLoad(),n&&r.setDisplayedSize(Math.ceil(r.width*n.initial),Math.ceil(r.height*n.initial)),r}function nn(t,e){let i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return Ti(i,e,t)}var Ot=class extends wt{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 xt(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?De(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 Ti(e,this,i)}},_t=class extends Ot{constructor(e){super(),this.options=e||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){De(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(e){if(Jr(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=De(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=De(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(en(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=nn(e,this));let s=++this._uid;Promise.all(n).then(l=>{if(this.shouldOpen){let u=l[0];this._openPhotoswipe(u,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={},De(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{Yr as Delegate,Ut as FocusTrap,_t 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.4 * @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 *) */