var En=Object.create;var Nt=Object.defineProperty;var xn=Object.getOwnPropertyDescriptor;var Sn=Object.getOwnPropertyNames;var On=Object.getPrototypeOf,Tn=Object.prototype.hasOwnProperty;var _n=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),An=(t,e)=>{for(var r in e)Nt(t,r,{get:e[r],enumerable:!0})},In=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Sn(e))!Tn.call(t,i)&&i!==r&&Nt(t,i,{get:()=>e[i],enumerable:!(n=xn(e,i))||n.enumerable});return t};var Pn=(t,e,r)=>(r=t!=null?En(On(t)):{},In(e||!t||!t.__esModule?Nt(r,"default",{value:t,enumerable:!0}):r,t));var Tr=_n(()=>{(function(){"use strict";var t=function(h,l){var p=function(N){for(var E=0,F=N.length;Eh.length)&&(l=h.length);for(var p=0,b=new Array(l);p=h.length?{done:!0}:{done:!1,value:h[b++]}},e:function(G){throw G},f:w}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var N=!0,E=!1,F;return{s:function(){p=p.call(h)},n:function(){var G=p.next();return N=G.done,G},e:function(G){E=!0,F=G},f:function(){try{!N&&p.return!=null&&p.return()}finally{if(E)throw F}}}}var i=!0,o=!1,a="querySelectorAll",c=function(l){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document,b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:MutationObserver,w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:["*"],N=function G(me,ve,ee,O,B,q){var ne=n(me),Ne;try{for(ne.s();!(Ne=ne.n()).done;){var Q=Ne.value;(q||a in Q)&&(B?ee.has(Q)||(ee.add(Q),O.delete(Q),l(Q,B)):O.has(Q)||(O.add(Q),ee.delete(Q),l(Q,B)),q||G(Q[a](ve),ve,ee,O,B,i))}}catch(Ft){ne.e(Ft)}finally{ne.f()}},E=new b(function(G){if(w.length){var me=w.join(","),ve=new Set,ee=new Set,O=n(G),B;try{for(O.s();!(B=O.n()).done;){var q=B.value,ne=q.addedNodes,Ne=q.removedNodes;N(Ne,me,ve,ee,o,o),N(ne,me,ve,ee,i,o)}}catch(Q){O.e(Q)}finally{O.f()}}}),F=E.observe;return(E.observe=function(G){return F.call(E,G,{subtree:i,childList:i})})(p),E},d="querySelectorAll",f=self,y=f.document,g=f.Element,v=f.MutationObserver,M=f.Set,I=f.WeakMap,k=function(l){return d in l},j=[].filter,R=function(h){var l=new I,p=function(O){for(var B=0,q=O.length;B1&&arguments[1]!==void 0?arguments[1]:!0,q=0,ne=O.length;qii});var dr=["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])"],it=dr.join(","),hr=typeof Element>"u",Oe=hr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,at=!hr&&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},ot=function t(e,r){var n;r===void 0&&(r=!0);var i=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),o=i===""||i==="true",a=o||r&&e&&t(e.parentNode);return a},Fn=function(e){var r,n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"contenteditable");return n===""||n==="true"},pr=function(e,r,n){if(ot(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(it));return r&&Oe.call(e,it)&&i.unshift(e),i=i.filter(n),i},mr=function t(e,r,n){for(var i=[],o=Array.from(e);o.length;){var a=o.shift();if(!ot(a,!1))if(a.tagName==="SLOT"){var c=a.assignedElements(),d=c.length?c:a.children,f=t(d,!0,n);n.flatten?i.push.apply(i,f):i.push({scopeParent:a,candidates:f})}else{var y=Oe.call(a,it);y&&n.filter(a)&&(r||!e.includes(a))&&i.push(a);var g=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),v=!ot(g,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(g&&v){var M=t(g===!0?a.children:g.children,!0,n);n.flatten?i.push.apply(i,M):i.push({scopeParent:a,candidates:M})}else o.unshift.apply(o,a.children)}}return i},vr=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ge=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Fn(e))&&!vr(e)?0:e.tabIndex},Nn=function(e,r){var n=ge(e);return n<0&&r&&!vr(e)?0:n},Dn=function(e,r){return e.tabIndex===r.tabIndex?e.documentOrder-r.documentOrder:e.tabIndex-r.tabIndex},gr=function(e){return e.tagName==="INPUT"},Ln=function(e){return gr(e)&&e.type==="hidden"},Cn=function(e){var r=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return r},Rn=function(e,r){for(var n=0;nsummary:first-of-type"),a=o?e.parentElement:e;if(Oe.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof i=="function"){for(var c=e;e;){var d=e.parentElement,f=at(e);if(d&&!d.shadowRoot&&i(d)===!0)return fr(e);e.assignedSlot?e=e.assignedSlot:!d&&f!==e.ownerDocument?e=f.host:e=d}e=c}if(zn(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return fr(e);return!1},Wn=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var r=e.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n=0)},Vn=function t(e){var r=[],n=[];return e.forEach(function(i,o){var a=!!i.scopeParent,c=a?i.scopeParent:i,d=Nn(c,a),f=a?t(i.candidates):c;d===0?a?r.push.apply(r,f):r.push(c):n.push({documentOrder:o,tabIndex:d,item:i,isScope:a,content:f})}),n.sort(Dn).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(r)},yr=function(e,r){r=r||{};var n;return r.getShadowRoot?n=mr([e],r.includeContainer,{filter:Dt.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:Bn}):n=pr(e,r.includeContainer,Dt.bind(null,r)),Vn(n)},br=function(e,r){r=r||{};var n;return r.getShadowRoot?n=mr([e],r.includeContainer,{filter:st.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=pr(e,r.includeContainer,st.bind(null,r)),n},Te=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return Oe.call(e,it)===!1?!1:Dt(r,e)},Hn=dr.concat("iframe").join(","),lt=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return Oe.call(e,Hn)===!1?!1:st(r,e)};function Lt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0){var n=e[e.length-1];n!==r&&n._setPausedState(!0)}var i=e.indexOf(r);i===-1||e.splice(i,1),e.push(r)},deactivateTrap:function(e,r){var n=e.indexOf(r);n!==-1&&e.splice(n,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}},Jn=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},ei=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},Me=function(e){return e?.key==="Tab"||e?.keyCode===9},ti=function(e){return Me(e)&&!e.shiftKey},ri=function(e){return Me(e)&&e.shiftKey},Sr=function(e){return setTimeout(e,0)},Re=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i1&&arguments[1]!==void 0?arguments[1]:{},m=u.hasFallback,T=m===void 0?!1:m,_=u.params,P=_===void 0?[]:_,x=o[s];if(typeof x=="function"&&(x=x.apply(void 0,Zn(P))),x===!0&&(x=void 0),!x){if(x===void 0||x===!1)return x;throw new Error("`".concat(s,"` was specified but was not a node, or did not return a node"))}var $=x;if(typeof x=="string"){try{$=n.querySelector(x)}catch(W){throw new Error("`".concat(s,'` appears to be an invalid selector; error="').concat(W.message,'"'))}if(!$&&!T)throw new Error("`".concat(s,"` as selector refers to no known node"))}return $},g=function(){var s=y("initialFocus",{hasFallback:!0});if(s===!1)return!1;if(s===void 0||s&&!lt(s,o.tabbableOptions))if(f(n.activeElement)>=0)s=n.activeElement;else{var u=a.tabbableGroups[0],m=u&&u.firstTabbableNode;s=m||y("fallbackFocus")}else s===null&&(s=y("fallbackFocus"));if(!s)throw new Error("Your focus-trap needs to have at least one focusable element");return s},v=function(){if(a.containerGroups=a.containers.map(function(s){var u=yr(s,o.tabbableOptions),m=br(s,o.tabbableOptions),T=u.length>0?u[0]:void 0,_=u.length>0?u[u.length-1]:void 0,P=m.find(function(W){return Te(W)}),x=m.slice().reverse().find(function(W){return Te(W)}),$=!!u.find(function(W){return ge(W)>0});return{container:s,tabbableNodes:u,focusableNodes:m,posTabIndexesFound:$,firstTabbableNode:T,lastTabbableNode:_,firstDomTabbableNode:P,lastDomTabbableNode:x,nextTabbableNode:function(oe){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,re=u.indexOf(oe);return re<0?ce?m.slice(m.indexOf(oe)+1).find(function(he){return Te(he)}):m.slice(0,m.indexOf(oe)).reverse().find(function(he){return Te(he)}):u[re+(ce?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(s){return s.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!y("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(a.containerGroups.find(function(s){return s.posTabIndexesFound})&&a.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.")},M=function(s){var u=s.activeElement;if(u)return u.shadowRoot&&u.shadowRoot.activeElement!==null?M(u.shadowRoot):u},I=function(s){if(s!==!1&&s!==M(document)){if(!s||!s.focus){I(g());return}s.focus({preventScroll:!!o.preventScroll}),a.mostRecentlyFocusedNode=s,Jn(s)&&s.select()}},k=function(s){var u=y("setReturnFocus",{params:[s]});return u||(u===!1?!1:s)},j=function(s){var u=s.target,m=s.event,T=s.isBackward,_=T===void 0?!1:T;u=u||ct(m),v();var P=null;if(a.tabbableGroups.length>0){var x=f(u,m),$=x>=0?a.containerGroups[x]:void 0;if(x<0)_?P=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:P=a.tabbableGroups[0].firstTabbableNode;else if(_){var W=a.tabbableGroups.findIndex(function(Fe){var Ce=Fe.firstTabbableNode;return u===Ce});if(W<0&&($.container===u||lt(u,o.tabbableOptions)&&!Te(u,o.tabbableOptions)&&!$.nextTabbableNode(u,!1))&&(W=x),W>=0){var oe=W===0?a.tabbableGroups.length-1:W-1,ce=a.tabbableGroups[oe];P=ge(u)>=0?ce.lastTabbableNode:ce.lastDomTabbableNode}else Me(m)||(P=$.nextTabbableNode(u,!1))}else{var re=a.tabbableGroups.findIndex(function(Fe){var Ce=Fe.lastTabbableNode;return u===Ce});if(re<0&&($.container===u||lt(u,o.tabbableOptions)&&!Te(u,o.tabbableOptions)&&!$.nextTabbableNode(u))&&(re=x),re>=0){var he=re===a.tabbableGroups.length-1?0:re+1,pe=a.tabbableGroups[he];P=ge(u)>=0?pe.firstTabbableNode:pe.firstDomTabbableNode}else Me(m)||(P=$.nextTabbableNode(u))}}else P=y("fallbackFocus");return P},R=function(s){var u=ct(s);if(!(f(u,s)>=0)){if(Re(o.clickOutsideDeactivates,s)){c.deactivate({returnFocus:o.returnFocusOnDeactivate});return}Re(o.allowOutsideClick,s)||s.preventDefault()}},D=function(s){var u=ct(s),m=f(u,s)>=0;if(m||u instanceof Document)m&&(a.mostRecentlyFocusedNode=u);else{s.stopImmediatePropagation();var T,_=!0;if(a.mostRecentlyFocusedNode)if(ge(a.mostRecentlyFocusedNode)>0){var P=f(a.mostRecentlyFocusedNode),x=a.containerGroups[P].tabbableNodes;if(x.length>0){var $=x.findIndex(function(W){return W===a.mostRecentlyFocusedNode});$>=0&&(o.isKeyForward(a.recentNavEvent)?$+1=0&&(T=x[$-1],_=!1))}}else a.containerGroups.some(function(W){return W.tabbableNodes.some(function(oe){return ge(oe)>0})})||(_=!1);else _=!1;_&&(T=j({target:a.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(a.recentNavEvent)})),I(T||a.mostRecentlyFocusedNode||g())}a.recentNavEvent=void 0},L=function(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=s;var m=j({event:s,isBackward:u});m&&(Me(s)&&s.preventDefault(),I(m))},z=function(s){(o.isKeyForward(s)||o.isKeyBackward(s))&&L(s,o.isKeyBackward(s))},V=function(s){ei(s)&&Re(o.escapeDeactivates,s)!==!1&&(s.preventDefault(),c.deactivate())},K=function(s){var u=ct(s);f(u,s)>=0||Re(o.clickOutsideDeactivates,s)||Re(o.allowOutsideClick,s)||(s.preventDefault(),s.stopImmediatePropagation())},Y=function(){if(a.active)return xr.activateTrap(i,c),a.delayInitialFocusTimer=o.delayInitialFocus?Sr(function(){I(g())}):I(g()),n.addEventListener("focusin",D,!0),n.addEventListener("mousedown",R,{capture:!0,passive:!1}),n.addEventListener("touchstart",R,{capture:!0,passive:!1}),n.addEventListener("click",K,{capture:!0,passive:!1}),n.addEventListener("keydown",z,{capture:!0,passive:!1}),n.addEventListener("keydown",V),c},U=function(){if(a.active)return n.removeEventListener("focusin",D,!0),n.removeEventListener("mousedown",R,!0),n.removeEventListener("touchstart",R,!0),n.removeEventListener("click",K,!0),n.removeEventListener("keydown",z,!0),n.removeEventListener("keydown",V),c},C=function(s){var u=s.some(function(m){var T=Array.from(m.removedNodes);return T.some(function(_){return _===a.mostRecentlyFocusedNode})});u&&I(g())},te=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(C):void 0,A=function(){te&&(te.disconnect(),a.active&&!a.paused&&a.containers.map(function(s){te.observe(s,{subtree:!0,childList:!0})}))};return c={get active(){return a.active},get paused(){return a.paused},activate:function(s){if(a.active)return this;var u=d(s,"onActivate"),m=d(s,"onPostActivate"),T=d(s,"checkCanFocusTrap");T||v(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=n.activeElement,u?.();var _=function(){T&&v(),Y(),A(),m?.()};return T?(T(a.containers.concat()).then(_,_),this):(_(),this)},deactivate:function(s){if(!a.active)return this;var u=Er({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},s);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,U(),a.active=!1,a.paused=!1,A(),xr.deactivateTrap(i,c);var m=d(u,"onDeactivate"),T=d(u,"onPostDeactivate"),_=d(u,"checkCanReturnFocus"),P=d(u,"returnFocus","returnFocusOnDeactivate");m?.();var x=function(){Sr(function(){P&&I(k(a.nodeFocusedBeforeActivation)),T?.()})};return P&&_?(_(k(a.nodeFocusedBeforeActivation)).then(x,x),this):(x(),this)},pause:function(s){return a.active?(a.manuallyPaused=!0,this._setPausedState(!0,s)):this},unpause:function(s){return a.active?(a.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,s)):this},updateContainerElements:function(s){var u=[].concat(s).filter(Boolean);return a.containers=u.map(function(m){return typeof m=="string"?n.querySelector(m):m}),a.active&&v(),A(),this}},Object.defineProperties(c,{_isManuallyPaused:{value:function(){return a.manuallyPaused}},_setPausedState:{value:function(s,u){if(a.paused===s)return this;if(a.paused=s,s){var m=d(u,"onPause"),T=d(u,"onPostPause");m?.(),U(),A(),T?.()}else{var _=d(u,"onUnpause"),P=d(u,"onPostUnpause");_?.(),v(),Y(),A(),P?.()}return this}}}),c.updateContainerElements(e),c};var Cl=Pn(Tr());function Ct(t,e){t.indexOf(e)===-1&&t.push(e)}function Rt(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1)}var ke=(t,e,r)=>Math.min(Math.max(r,t),e);var H={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"};var J=t=>typeof t=="number";var le=t=>Array.isArray(t)&&!J(t[0]);var _r=(t,e,r)=>{let n=e-t;return((r-t)%n+n)%n+t};function je(t,e){return le(t)?t[_r(0,t.length,e)]:t}var _e=(t,e,r)=>-r*t+r*e+t;var ze=()=>{},X=t=>t;var ae=(t,e,r)=>e-t===0?1:(r-t)/(e-t);function De(t,e){let r=t[t.length-1];for(let n=1;n<=e;n++){let i=ae(0,e,n);t.push(_e(r,1,i))}}function Ae(t){let e=[0];return De(e,t-1),e}function $e(t,e=Ae(t.length),r=X){let n=t.length,i=n-e.length;return i>0&&De(e,i),o=>{let a=0;for(;aArray.isArray(t)&&J(t[0]);var ye=t=>typeof t=="object"&&!!t.createAnimation;var Z=t=>typeof t=="function";var ue=t=>typeof t=="string";var be={ms:t=>t*1e3,s:t=>t/1e3};function Mt(t,e){return e?t*(1e3/e):0}var Ar=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,ai=1e-7,oi=12;function si(t,e,r,n,i){let o,a,c=0;do a=e+(r-e)/2,o=Ar(a,n,i)-t,o>0?r=a:e=a;while(Math.abs(o)>ai&&++csi(o,0,1,t,r);return o=>o===0||o===1?o:Ar(i(o),e,n)}var kt=(t,e="end")=>r=>{r=e==="end"?Math.min(r,.999):Math.max(r,.001);let n=r*t,i=e==="end"?Math.floor(n):Math.ceil(n);return ke(0,1,i/t)};var li={ease:Ie(.25,.1,.25,1),"ease-in":Ie(.42,0,1,1),"ease-in-out":Ie(.42,0,.58,1),"ease-out":Ie(0,0,.58,1)},ci=/\((.*?)\)/;function Le(t){if(Z(t))return t;if(We(t))return Ie(...t);let e=li[t];if(e)return e;if(t.startsWith("steps")){let r=ci.exec(t);if(r){let n=r[1].split(",");return kt(parseFloat(n[0]),n[1].trim())}}return X}var fe=class{constructor(e,r=[0,1],{easing:n,duration:i=H.duration,delay:o=H.delay,endDelay:a=H.endDelay,repeat:c=H.repeat,offset:d,direction:f="normal",autoplay:y=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=X,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((v,M)=>{this.resolve=v,this.reject=M}),n=n||H.easing,ye(n)){let v=n.createAnimation(r);n=v.easing,r=v.keyframes||r,i=v.duration||i}this.repeat=c,this.easing=le(n)?X:Le(n),this.updateDuration(i);let g=$e(r,d,le(n)?n.map(Le):X);this.tick=v=>{var M;o=o;let I=0;this.pauseTime!==void 0?I=this.pauseTime:I=(v-this.startTime)*this.rate,this.t=I,I/=1e3,I=Math.max(I-o,0),this.playState==="finished"&&this.pauseTime===void 0&&(I=this.totalDuration);let k=I/this.duration,j=Math.floor(k),R=k%1;!R&&k>=1&&(R=1),R===1&&j--;let D=j%2;(f==="reverse"||f==="alternate"&&D||f==="alternate-reverse"&&!D)&&(R=1-R);let L=I>=this.totalDuration?1:Math.min(R,1),z=g(this.easing(L));e(z),this.pauseTime===void 0&&(this.playState==="finished"||I>=this.totalDuration+a)?(this.playState="finished",(M=this.resolve)===null||M===void 0||M.call(this,z)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},y&&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 Be=function(){};var Ve=class{setAnimation(e){this.animation=e,e?.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}};var jt=new WeakMap;function ut(t){return jt.has(t)||jt.set(t,{transforms:[],values:new Map}),jt.get(t)}function Ir(t,e){return t.has(e)||t.set(e,new Ve),t.get(e)}var ui=["","X","Y","Z"],fi=["translate","scale","rotate","skew"],He={x:"translateX",y:"translateY",z:"translateZ"},Pr={syntax:"",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},di={translate:{syntax:"",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:Pr,scale:{syntax:"",initialValue:1,toDefaultUnit:X},skew:Pr},we=new Map,dt=t=>`--motion-${t}`,ft=["x","y","z"];fi.forEach(t=>{ui.forEach(e=>{ft.push(t+e),we.set(dt(t+e),di[t])})});var hi=(t,e)=>ft.indexOf(t)-ft.indexOf(e),pi=new Set(ft),ht=t=>pi.has(t),Fr=(t,e)=>{He[e]&&(e=He[e]);let{transforms:r}=ut(t);Ct(r,e),t.style.transform=mi(r)},mi=t=>t.sort(hi).reduce(vi,"").trim(),vi=(t,e)=>`${t} ${e}(var(${dt(e)}))`;var Ke=t=>t.startsWith("--"),Nr=new Set;function Dr(t){if(!Nr.has(t)){Nr.add(t);try{let{syntax:e,initialValue:r}=we.has(t)?we.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:r})}catch{}}}var zt=(t,e)=>document.createElement("div").animate(t,e),Lr={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{zt({opacity:[1]})}catch{return!1}return!0},finished:()=>!!zt({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{zt({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},$t={},Ee={};for(let t in Lr)Ee[t]=()=>($t[t]===void 0&&($t[t]=Lr[t]()),$t[t]);var gi=.015,yi=(t,e)=>{let r="",n=Math.round(e/gi);for(let i=0;iZ(t)?Ee.linearEasing()?`linear(${yi(t,e)})`:H.easing:We(t)?bi(t):t,bi=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`;function Cr(t,e){for(let r=0;rArray.isArray(t)?t:[t];function Ue(t){return He[t]&&(t=He[t]),ht(t)?dt(t):t}var Ge={get:(t,e)=>{e=Ue(e);let r=Ke(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!r&&r!==0){let n=we.get(e);n&&(r=n.initialValue)}return r},set:(t,e,r)=>{e=Ue(e),Ke(e)?t.style.setProperty(e,r):t.style[e]=r}};function mt(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch{}}function Rr(t,e){var r;let n=e?.toDefaultUnit||X,i=t[t.length-1];if(ue(i)){let o=((r=i.match(/(-?[\d.]+)([a-z%]*)/))===null||r===void 0?void 0:r[2])||"";o&&(n=a=>a+o)}return n}function wi(){return window.__MOTION_DEV_TOOLS_RECORD}function vt(t,e,r,n={},i){let o=wi(),a=n.record!==!1&&o,c,{duration:d=H.duration,delay:f=H.delay,endDelay:y=H.endDelay,repeat:g=H.repeat,easing:v=H.easing,persist:M=!1,direction:I,offset:k,allowWebkitAcceleration:j=!1,autoplay:R=!0}=n,D=ut(t),L=ht(e),z=Ee.waapi();L&&Fr(t,e);let V=Ue(e),K=Ir(D.values,V),Y=we.get(V);return mt(K.animation,!(ye(v)&&K.generator)&&n.record!==!1),()=>{let U=()=>{var A,S;return(S=(A=Ge.get(t,V))!==null&&A!==void 0?A:Y?.initialValue)!==null&&S!==void 0?S:0},C=Cr(pt(r),U),te=Rr(C,Y);if(ye(v)){let A=v.createAnimation(C,e!=="opacity",U,V,K);v=A.easing,C=A.keyframes||C,d=A.duration||d}if(Ke(V)&&(Ee.cssRegisterProperty()?Dr(V):z=!1),L&&!Ee.linearEasing()&&(Z(v)||le(v)&&v.some(Z))&&(z=!1),z){Y&&(C=C.map(s=>J(s)?Y.toDefaultUnit(s):s)),C.length===1&&(!Ee.partialKeyframes()||a)&&C.unshift(U());let A={delay:be.ms(f),duration:be.ms(d),endDelay:be.ms(y),easing:le(v)?void 0:Wt(v,d),direction:I,iterations:g+1,fill:"both"};c=t.animate({[V]:C,offset:k,easing:le(v)?v.map(s=>Wt(s,d)):void 0},A),c.finished||(c.finished=new Promise((s,u)=>{c.onfinish=s,c.oncancel=u}));let S=C[C.length-1];c.finished.then(()=>{M||(Ge.set(t,V,S),c.cancel())}).catch(ze),j||(c.playbackRate=1.000001)}else if(i&&L)C=C.map(A=>typeof A=="string"?parseFloat(A):A),C.length===1&&C.unshift(parseFloat(U())),c=new i(A=>{Ge.set(t,V,te?te(A):A)},C,Object.assign(Object.assign({},n),{duration:d,easing:v}));else{let A=C[C.length-1];Ge.set(t,V,Y&&J(A)?Y.toDefaultUnit(A):A)}return a&&o(t,e,C,{duration:d,delay:f,easing:v,repeat:g,offset:k},"motion-one"),K.setAnimation(c),c&&!R&&c.pause(),c}}var gt=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function xe(t,e){var r;return typeof t=="string"?e?((r=e[t])!==null&&r!==void 0||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}var Ei=t=>t(),Pe=(t,e,r=H.duration)=>new Proxy({animations:t.map(Ei).filter(Boolean),duration:r,options:e},Si),xi=t=>t.animations[0],Si={get:(t,e)=>{let r=xi(t);switch(e){case"duration":return t.duration;case"currentTime":return be.s(r?.[e]||0);case"playbackRate":case"playState":return r?.[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(Oi)).catch(ze)),t.finished;case"stop":return()=>{t.animations.forEach(n=>mt(n))};case"forEachNative":return n=>{t.animations.forEach(i=>n(i,t))};default:return typeof r?.[e]>"u"?void 0:()=>t.animations.forEach(n=>n[e]())}},set:(t,e,r)=>{switch(e){case"currentTime":r=be.ms(r);case"playbackRate":for(let n=0;nt.finished;function Mr(t=.1,{start:e=0,from:r=0,easing:n}={}){return(i,o)=>{let a=J(r)?r:Ti(r,o),c=Math.abs(a-i),d=t*c;if(n){let f=o*t;d=Le(n)(d/f)*f}return e+d}}function Ti(t,e){if(t==="first")return 0;{let r=e-1;return t==="last"?r:r/2}}function yt(t,e,r){return Z(t)?t(e,r):t}function kr(t){return function(r,n,i={}){r=xe(r);let o=r.length;Be(!!o,"No valid element provided."),Be(!!n,"No keyframes defined.");let a=[];for(let c=0;ce&&i.atvt(...o,fe)).filter(Boolean);return Pe(i,e,(r=n[0])===null||r===void 0?void 0:r[3].duration)}function Ai(t,e={}){var{defaultOptions:r={}}=e,n=bt(e,["defaultOptions"]);let i=[],o=new Map,a={},c=new Map,d=0,f=0,y=0;for(let g=0;g1,"spring must be provided 2 keyframes within timeline()");let _=A.createAnimation(U,K!=="opacity",()=>0,K);A=_.easing,U=_.keyframes||U,te=_.duration||te}let S=yt(k.delay,L,D)||0,s=f+S,u=s+te,{offset:m=Ae(U.length)}=C;m.length===1&&m[0]===0&&(m[1]=1);let T=m.length-U.length;T>0&&De(m,T),U.length===1&&U.unshift(null),jr(Y,U,A,m,s,u),j=Math.max(S+te,j),y=Math.max(u,y)}}d=f,f+=j}return o.forEach((g,v)=>{for(let M in g){let I=g[M];I.sort(zr);let k=[],j=[],R=[];for(let D=0;D"u")return()=>{};let o=xe(t),a=new WeakMap,c=f=>{f.forEach(y=>{let g=a.get(y.target);if(y.isIntersecting!==!!g)if(y.isIntersecting){let v=e(y);Z(v)?a.set(y.target,v):d.unobserve(y.target)}else g&&(g(y),a.delete(y.target))})},d=new IntersectionObserver(c,{root:r,rootMargin:n,threshold:typeof i=="number"?i:Fi[i]});return o.forEach(f=>d.observe(f)),()=>d.disconnect()}var wt=new WeakMap,Se;function Ni(t,e){if(e){let{inlineSize:r,blockSize:n}=e[0];return{width:r,height:n}}else return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}function Di({target:t,contentRect:e,borderBoxSize:r}){var n;(n=wt.get(t))===null||n===void 0||n.forEach(i=>{i({target:t,contentSize:e,get size(){return Ni(t,r)}})})}function Li(t){t.forEach(Di)}function Ci(){typeof ResizeObserver>"u"||(Se=new ResizeObserver(Li))}function Br(t,e){Se||Ci();let r=xe(t);return r.forEach(n=>{let i=wt.get(n);i||(i=new Set,wt.set(n,i)),i.add(e),Se?.observe(n)}),()=>{r.forEach(n=>{let i=wt.get(n);i?.delete(e),i?.size||Se?.unobserve(n)})}}var Et=new Set,qe;function Ri(){qe=()=>{let t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Et.forEach(r=>r(e))},window.addEventListener("resize",qe)}function Vr(t){return Et.add(t),qe||Ri(),()=>{Et.delete(t),!Et.size&&qe&&(qe=void 0)}}function Hr(t,e){return Z(t)?Vr(t):Br(t,e)}var Mi=50,Kr=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),Gr=()=>({time:0,x:Kr(),y:Kr()}),ki={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Ur(t,e,r,n){let i=r[e],{length:o,position:a}=ki[e],c=i.current,d=r.time;i.current=t[`scroll${a}`],i.scrollLength=t[`scroll${o}`]-t[`client${o}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=ae(0,i.scrollLength,i.current);let f=n-d;i.velocity=f>Mi?0:Mt(i.current-c,f)}function qr(t,e,r){Ur(t,"x",e,r),Ur(t,"y",e,r),e.time=r}function Zr(t,e){let r={x:0,y:0},n=t;for(;n&&n!==e;)if(n instanceof HTMLElement)r.x+=n.offsetLeft,r.y+=n.offsetTop,n=n.offsetParent;else if(n instanceof SVGGraphicsElement&&"getBBox"in n){let{top:i,left:o}=n.getBBox();for(r.x+=o,r.y+=i;n&&n.tagName!=="svg";)n=n.parentNode}return r}var xt={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]};var St={start:0,center:.5,end:1};function Ht(t,e,r=0){let n=0;if(St[t]!==void 0&&(t=St[t]),ue(t)){let i=parseFloat(t);t.endsWith("px")?n=i:t.endsWith("%")?t=i/100:t.endsWith("vw")?n=i/100*document.documentElement.clientWidth:t.endsWith("vh")?n=i/100*document.documentElement.clientHeight:t=i}return J(t)&&(n=e*t),r+n}var ji=[0,0];function Xr(t,e,r,n){let i=Array.isArray(t)?t:ji,o=0,a=0;return J(t)?i=[t,t]:ue(t)&&(t=t.trim(),t.includes(" ")?i=t.split(" "):i=[t,St[t]?t:"0"]),o=Ht(i[0],r,n),a=Ht(i[1],e),o-a}var zi={x:0,y:0};function Yr(t,e,r){let{offset:n=xt.All}=r,{target:i=t,axis:o="y"}=r,a=o==="y"?"height":"width",c=i!==t?Zr(i,t):zi,d=i===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:i.clientWidth,height:i.clientHeight},f={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let y=!e[o].interpolate,g=n.length;for(let v=0;v$i(t,n.target,r),update:o=>{qr(t,r,o),(n.offset||n.target)&&Yr(t,r,n)},notify:Z(e)?()=>e(r):Wi(e,r[i])}}function Wi(t,e){return t.pause(),t.forEachNative((r,{easing:n})=>{var i,o;if(r.updateDuration)n||(r.easing=X),r.updateDuration(1);else{let a={duration:1e3};n||(a.easing="linear"),(o=(i=r.effect)===null||i===void 0?void 0:i.updateTiming)===null||o===void 0||o.call(i,a)}}),()=>{t.currentTime=e.progress}}var Ze=new WeakMap,Jr=new WeakMap,Kt=new WeakMap,en=t=>t===document.documentElement?window:t;function tn(t,e={}){var{container:r=document.documentElement}=e,n=bt(e,["container"]);let i=Kt.get(r);i||(i=new Set,Kt.set(r,i));let o=Gr(),a=Qr(r,t,o,n);if(i.add(a),!Ze.has(r)){let f=()=>{let g=performance.now();for(let v of i)v.measure();for(let v of i)v.update(g);for(let v of i)v.notify()};Ze.set(r,f);let y=en(r);window.addEventListener("resize",f,{passive:!0}),r!==document.documentElement&&Jr.set(r,Hr(r,f)),y.addEventListener("scroll",f,{passive:!0})}let c=Ze.get(r),d=requestAnimationFrame(c);return()=>{var f;typeof t!="function"&&t.stop(),cancelAnimationFrame(d);let y=Kt.get(r);if(!y||(y.delete(a),y.size))return;let g=Ze.get(r);Ze.delete(r),g&&(en(r).removeEventListener("scroll",g),(f=Jr.get(r))===null||f===void 0||f(),window.removeEventListener("resize",g))}}function Bi(t,e={}){return Pe([()=>{let r=new fe(t,[0,1],e);return r.finished.catch(()=>{}),r}],e,e.duration)}function rn(t,e,r){return(Z(t)?Bi:Bt)(t,e,r)}function de(t){this.listenerMap=[{},{}],t&&this.root(t),this.handle=de.prototype.handle.bind(this),this._removedListeners=[]}de.prototype.root=function(t){let e=this.listenerMap,r;if(this.rootElement){for(r in e[1])e[1].hasOwnProperty(r)&&this.rootElement.removeEventListener(r,this.handle,!0);for(r in e[0])e[0].hasOwnProperty(r)&&this.rootElement.removeEventListener(r,this.handle,!1)}if(!t||!t.addEventListener)return this.rootElement&&delete this.rootElement,this;this.rootElement=t;for(r in e[1])e[1].hasOwnProperty(r)&&this.rootElement.addEventListener(r,this.handle,!0);for(r in e[0])e[0].hasOwnProperty(r)&&this.rootElement.addEventListener(r,this.handle,!1);return this};de.prototype.captureForType=function(t){return["blur","error","focus","load","resize","scroll"].indexOf(t)!==-1};de.prototype.on=function(t,e,r,n){let i,o,a,c;if(!t)throw new TypeError("Invalid event type: "+t);if(typeof e=="function"&&(n=r,r=e,e=null),n===void 0&&(n=this.captureForType(t)),typeof r!="function")throw new TypeError("Handler must be a type of Function");return i=this.rootElement,o=this.listenerMap[n?1:0],o[t]||(i&&i.addEventListener(t,this.handle,n),o[t]=[]),e?/^[a-z]+$/i.test(e)?(c=e,a=Vi):/^#[a-z0-9\-_]+$/i.test(e)?(c=e.slice(1),a=Ki):(c=e,a=Element.prototype.matches):(c=null,a=Hi.bind(this)),o[t].push({selector:e,handler:r,matcher:a,matcherParam:c}),this};de.prototype.off=function(t,e,r,n){let i,o,a,c,d;if(typeof e=="function"&&(n=r,r=e,e=null),n===void 0)return this.off(t,e,r,!0),this.off(t,e,r,!1),this;if(a=this.listenerMap[n?1:0],!t){for(d in a)a.hasOwnProperty(d)&&this.off(d,e,r);return this}if(c=a[t],!c||!c.length)return this;for(i=c.length-1;i>=0;i--)o=c[i],(!e||e===o.selector)&&(!r||r===o.handler)&&(this._removedListeners.push(o),c.splice(i,1));return c.length||(delete a[t],this.rootElement&&this.rootElement.removeEventListener(t,this.handle,n)),this};de.prototype.handle=function(t){let e,r,n=t.type,i,o,a,c,d=[],f,y="ftLabsDelegateIgnore";if(t[y]===!0)return;switch(f=t.target,f.nodeType===3&&(f=f.parentNode),f.correspondingUseElement&&(f=f.correspondingUseElement),i=this.rootElement,o=t.eventPhase||(t.target!==t.currentTarget?3:2),o){case 1:d=this.listenerMap[1][n];break;case 2:this.listenerMap[0]&&this.listenerMap[0][n]&&(d=d.concat(this.listenerMap[0][n])),this.listenerMap[1]&&this.listenerMap[1][n]&&(d=d.concat(this.listenerMap[1][n]));break;case 3:d=this.listenerMap[0][n];break}let g=[];for(r=d.length;f&&r;){for(e=0;e-1&&f.hasAttribute("disabled")?g=[]:a.matcher.call(f,a.matcherParam,f)&&g.push([t,f,a]);if(f===i||(r=d.length,f=f.parentElement||f.parentNode,f instanceof HTMLDocument))break}let v;for(e=0;e-1)&&(c=this.fire.apply(this,g[e]),c===!1)){g[e][0][y]=!0,g[e][0].preventDefault(),v=!1;break}return v};de.prototype.fire=function(t,e,r){return r.handler.call(e,t,e)};function Vi(t,e){return t.toLowerCase()===e.tagName.toLowerCase()}function Hi(t,e){return this.rootElement===window?e===document||e===document.documentElement||e===window:this.rootElement===e}function Ki(t,e){return t===e.id}de.prototype.destroy=function(){this.off(),this.root()};var Ui=de;function Xe(t,e,r){let n=document.createElement(e);return t&&(n.className=t),r&&r.appendChild(n),n}function Gi(t,e,r){let n=`translate3d(${t}px,${e||0}px,0)`;return r!==void 0&&(n+=` scale3d(${r},${r},1)`),n}function Ut(t,e,r){t.style.width=typeof e=="number"?`${e}px`:e,t.style.height=typeof r=="number"?`${r}px`:r}var ie={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function qi(t){return"button"in t&&t.button===1||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function Ye(t,e,r=document){let n=[];if(t instanceof Element)n=[t];else if(t instanceof NodeList||Array.isArray(t))n=Array.from(t);else{let i=typeof t=="string"?t:e;i&&(n=Array.from(r.querySelectorAll(i)))}return n}function Zi(t){return typeof t=="function"&&t.prototype&&t.prototype.goTo}function nn(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}var Gt=class{constructor(e,r){this.type=e,this.defaultPrevented=!1,r&&Object.assign(this,r)}preventDefault(){this.defaultPrevented=!0}},qt=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,r,n=100){var i,o,a;this._filters[e]||(this._filters[e]=[]),(i=this._filters[e])===null||i===void 0||i.push({fn:r,priority:n}),(o=this._filters[e])===null||o===void 0||o.sort((c,d)=>c.priority-d.priority),(a=this.pswp)===null||a===void 0||a.addFilter(e,r,n)}removeFilter(e,r){this._filters[e]&&(this._filters[e]=this._filters[e].filter(n=>n.fn!==r)),this.pswp&&this.pswp.removeFilter(e,r)}applyFilters(e,...r){var n;return(n=this._filters[e])===null||n===void 0||n.forEach(i=>{r[0]=i.fn.apply(this,r)}),r[0]}on(e,r){var n,i;this._listeners[e]||(this._listeners[e]=[]),(n=this._listeners[e])===null||n===void 0||n.push(r),(i=this.pswp)===null||i===void 0||i.on(e,r)}off(e,r){var n;this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(i=>r!==i)),(n=this.pswp)===null||n===void 0||n.off(e,r)}dispatch(e,r){var n;if(this.pswp)return this.pswp.dispatch(e,r);let i=new Gt(e,r);return(n=this._listeners[e])===null||n===void 0||n.forEach(o=>{o.call(this,i)}),i}},Zt=class{constructor(e,r){if(this.element=Xe("pswp__img pswp__img--placeholder",e?"img":"div",r),e){let n=this.element;n.decoding="async",n.alt="",n.src=e,n.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,r){this.element&&(this.element.tagName==="IMG"?(Ut(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=Gi(0,0,e/250)):Ut(this.element,e,r))}destroy(){var e;(e=this.element)!==null&&e!==void 0&&e.parentNode&&this.element.remove(),this.element=null}},Xt=class{constructor(e,r,n){this.instance=r,this.data=e,this.index=n,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=ie.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,r){if(this.slide&&this.usePlaceholder())if(this.placeholder){let n=this.placeholder.element;n&&!n.parentElement&&this.slide.container.prepend(n)}else{let n=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new Zt(n,this.slide.container)}this.element&&!r||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=Xe("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=Xe("pswp__content","div"),this.element.innerHTML=this.data.html||""),r&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){var r,n;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;let i=this.element;this.updateSrcsetSizes(),this.data.srcset&&(i.srcset=this.data.srcset),i.src=(r=this.data.src)!==null&&r!==void 0?r:"",i.alt=(n=this.data.alt)!==null&&n!==void 0?n:"",this.state=ie.LOADING,i.complete?this.onLoaded():(i.onload=()=>{this.onLoaded()},i.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=ie.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===ie.LOADED||this.state===ie.ERROR)&&this.removePlaceholder())}onError(){this.state=ie.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===ie.LOADING,this)}isError(){return this.state===ie.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(e,r){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,r),!this.instance.dispatch("contentResize",{content:this,width:e,height:r}).defaultPrevented&&(Ut(this.element,e,r),this.isImageContent()&&!this.isError()))){let n=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=r,n?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:r,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==ie.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;let e=this.element,r=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||r>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=r+"px",e.dataset.largestUsedSize=String(r))}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,r;let n=Xe("pswp__error-msg","div");n.innerText=(e=(r=this.instance.options)===null||r===void 0?void 0:r.errorMsg)!==null&&e!==void 0?e:"",n=this.instance.applyFilters("contentErrorElement",n,this),this.element=Xe("pswp__content pswp__error-msg-container","div"),this.element.appendChild(n),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===ie.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||nn())?(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&&!nn()?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===ie.LOADED||this.state===ie.ERROR)&&this.removePlaceholder()))}};function Xi(t,e){if(t.getViewportSizeFn){let r=t.getViewportSizeFn(t,e);if(r)return r}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function Ot(t,e,r,n,i){let o=0;if(e.paddingFn)o=e.paddingFn(r,n,i)[t];else if(e.padding)o=e.padding[t];else{let a="padding"+t[0].toUpperCase()+t.slice(1);e[a]&&(o=e[a])}return Number(o)||0}function Yi(t,e,r,n){return{x:e.x-Ot("left",t,e,r,n)-Ot("right",t,e,r,n),y:e.y-Ot("top",t,e,r,n)-Ot("bottom",t,e,r,n)}}var an=4e3,Yt=class{constructor(e,r,n,i){this.pswp=i,this.options=e,this.itemData=r,this.index=n,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,r,n){let i={x:e,y:r};this.elementSize=i,this.panAreaSize=n;let o=n.x/i.x,a=n.y/i.y;this.fit=Math.min(1,oa?o:a),this.vFill=Math.min(1,a),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 r=e+"ZoomLevel",n=this.options[r];if(n)return typeof n=="function"?n(this):n==="fill"?this.fill:n==="fit"?this.fit:Number(n)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,this.fit*3),this.elementSize&&e*this.elementSize.x>an&&(e=an/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}};function on(t,e,r){let n=e.createContentFromData(t,r),i,{options:o}=e;if(o){i=new Yt(o,t,-1);let a;e.pswp?a=e.pswp.viewportSize:a=Xi(o,e);let c=Yi(o,a,t,r);i.update(n.width,n.height,c)}return n.lazyLoad(),i&&n.setDisplayedSize(Math.ceil(n.width*i.initial),Math.ceil(n.height*i.initial)),n}function Qi(t,e){let r=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:r}).defaultPrevented)return on(r,e,t)}var Qt=class extends qt{getNumItems(){var e;let r=0,n=(e=this.options)===null||e===void 0?void 0:e.dataSource;n&&"length"in n?r=n.length:n&&"gallery"in n&&(n.items||(n.items=this._getGalleryDOMElements(n.gallery)),n.items&&(r=n.items.length));let i=this.dispatch("numItems",{dataSource:n,numItems:r});return this.applyFilters("numItems",i.numItems,n)}createContentFromData(e,r){return new Xt(e,this,r)}getItemData(e){var r;let n=(r=this.options)===null||r===void 0?void 0:r.dataSource,i={};Array.isArray(n)?i=n[e]:n&&"gallery"in n&&(n.items||(n.items=this._getGalleryDOMElements(n.gallery)),i=n.items[e]);let o=i;o instanceof Element&&(o=this._domElementToItemData(o));let a=this.dispatch("itemData",{itemData:o||{},index:e});return this.applyFilters("itemData",a.itemData,e)}_getGalleryDOMElements(e){var r,n;return(r=this.options)!==null&&r!==void 0&&r.children||(n=this.options)!==null&&n!==void 0&&n.childSelector?Ye(this.options.children,this.options.childSelector,e)||[]:[e]}_domElementToItemData(e){let r={element:e},n=e.tagName==="A"?e:e.querySelector("a");if(n){r.src=n.dataset.pswpSrc||n.href,n.dataset.pswpSrcset&&(r.srcset=n.dataset.pswpSrcset),r.width=n.dataset.pswpWidth?parseInt(n.dataset.pswpWidth,10):0,r.height=n.dataset.pswpHeight?parseInt(n.dataset.pswpHeight,10):0,r.w=r.width,r.h=r.height,n.dataset.pswpType&&(r.type=n.dataset.pswpType);let o=e.querySelector("img");if(o){var i;r.msrc=o.currentSrc||o.src,r.alt=(i=o.getAttribute("alt"))!==null&&i!==void 0?i:""}(n.dataset.pswpCropped||n.dataset.cropped)&&(r.thumbCropped=!0)}return this.applyFilters("domItemData",r,e,n)}lazyLoadData(e,r){return on(e,this,r)}},Jt=class extends Qt{constructor(e){super(),this.options=e||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){Ye(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(e){if(qi(e)||window.pswp)return;let r={x:e.clientX,y:e.clientY};!r.x&&!r.y&&(r=null);let n=this.getClickedIndex(e);n=this.applyFilters("clickedIndex",n,e,this);let i={gallery:e.currentTarget};n>=0&&(e.preventDefault(),this.loadAndOpen(n,i,r))}getClickedIndex(e){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,e);let r=e.target,i=Ye(this.options.children,this.options.childSelector,e.currentTarget).findIndex(o=>o===r||o.contains(r));return i!==-1?i:this.options.children||this.options.childSelector?-1:0}loadAndOpen(e,r,n){if(window.pswp||!this.options)return!1;if(!r&&this.options.gallery&&this.options.children){let i=Ye(this.options.gallery);i[0]&&(r={gallery:i[0]})}return this.options.index=e,this.options.initialPointerPos=n,this.shouldOpen=!0,this.preload(e,r),!0}preload(e,r){let{options:n}=this;r&&(n.dataSource=r);let i=[],o=typeof n.pswpModule;if(Zi(n.pswpModule))i.push(Promise.resolve(n.pswpModule));else{if(o==="string")throw new Error("pswpModule as string is no longer supported");if(o==="function")i.push(n.pswpModule());else throw new Error("pswpModule is not valid")}typeof n.openPromise=="function"&&i.push(n.openPromise()),n.preloadFirstSlide!==!1&&e>=0&&(this._preloadedContent=Qi(e,this));let a=++this._uid;Promise.all(i).then(c=>{if(this.shouldOpen){let d=c[0];this._openPhotoswipe(d,a)}})}_openPhotoswipe(e,r){if(r!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;let n=typeof e=="object"?new e.default(this.options):new e(this.options);this.pswp=n,window.pswp=n,Object.keys(this._listeners).forEach(i=>{var o;(o=this._listeners[i])===null||o===void 0||o.forEach(a=>{n.on(i,a)})}),Object.keys(this._filters).forEach(i=>{var o;(o=this._filters[i])===null||o===void 0||o.forEach(a=>{n.addFilter(i,a.fn,a.priority)})}),this._preloadedContent&&(n.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),n.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),n.init()}destroy(){var e;(e=this.pswp)===null||e===void 0||e.destroy(),this.shouldOpen=!1,this._listeners={},Ye(this.options.gallery,this.options.gallerySelector).forEach(r=>{r.removeEventListener("click",this.onThumbnailsClick,!1)})}};(function(){Node.prototype.replaceChildren===void 0&&(Node.prototype.replaceChildren=t=>{for(;this.lastChild;)this.removeChild(this.lastChild);t!==void 0&&this.append(t)})})();(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(r,n,i){if(i&&i.signal){if(i.signal.aborted)return;i.signal.addEventListener("abort",()=>this.removeEventListener(r,n,{...i}))}return e.call(this,r,n,i)}})();export{Cl as CustomElementsPolyfill,Ui as Delegate,Or as FocusTrap,Jt as PhotoSwipeLightbox,xt as ScrollOffset,rn as animate,Wr as inView,tn as scroll,Mr as stagger,$r as timeline}; /*! Bundled license information: @ungap/custom-elements/index.js: (*! (c) Andrea Giammarchi @webreflection ISC *) (*! (c) Andrea Giammarchi - ISC *) 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 *) */