@wix/interact 2.5.5 → 2.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/react.js +1 -1
  4. package/dist/cjs/web.js +1 -1
  5. package/dist/es/index.js +1 -1
  6. package/dist/es/react.js +2 -2
  7. package/dist/es/web.js +2 -2
  8. package/dist/{index-7fvAL10J.mjs → index-CEt49C5d.mjs} +1241 -1107
  9. package/dist/index-CEt49C5d.mjs.map +1 -0
  10. package/dist/index-CxaQDD-U.js +21 -0
  11. package/dist/index-CxaQDD-U.js.map +1 -0
  12. package/dist/tsconfig.build.tsbuildinfo +1 -1
  13. package/dist/types/core/Interact.d.ts +10 -1
  14. package/dist/types/core/Interact.d.ts.map +1 -1
  15. package/dist/types/core/InteractionController.d.ts +3 -1
  16. package/dist/types/core/InteractionController.d.ts.map +1 -1
  17. package/dist/types/core/add.d.ts.map +1 -1
  18. package/dist/types/core/css.d.ts +12 -4
  19. package/dist/types/core/css.d.ts.map +1 -1
  20. package/dist/types/core/cssUtils.d.ts.map +1 -1
  21. package/dist/types/types/config.d.ts +2 -1
  22. package/dist/types/types/config.d.ts.map +1 -1
  23. package/dist/types/types/controller.d.ts +5 -0
  24. package/dist/types/types/controller.d.ts.map +1 -1
  25. package/dist/types/types/css.d.ts +15 -1
  26. package/dist/types/types/css.d.ts.map +1 -1
  27. package/dist/types/types/effects.d.ts +2 -1
  28. package/dist/types/types/effects.d.ts.map +1 -1
  29. package/dist/types/types/external.d.ts +2 -0
  30. package/dist/types/types/external.d.ts.map +1 -1
  31. package/dist/types/types/index.d.ts +1 -0
  32. package/dist/types/types/index.d.ts.map +1 -1
  33. package/dist/types/types/plugins.d.ts +81 -0
  34. package/dist/types/types/plugins.d.ts.map +1 -0
  35. package/dist/types/utils.d.ts +7 -1
  36. package/dist/types/utils.d.ts.map +1 -1
  37. package/docs/api/README.md +1 -1
  38. package/docs/api/functions.md +16 -8
  39. package/docs/api/interact-class.md +35 -0
  40. package/docs/api/types.md +93 -1
  41. package/docs/guides/README.md +4 -0
  42. package/docs/guides/configuration-structure.md +2 -0
  43. package/docs/guides/plugins.md +192 -0
  44. package/package.json +2 -2
  45. package/rules/click.md +2 -2
  46. package/rules/full-lean.md +57 -11
  47. package/rules/hover.md +2 -2
  48. package/rules/integration.md +11 -11
  49. package/rules/plugins.md +122 -0
  50. package/rules/validate.md +4 -3
  51. package/rules/viewenter.md +1 -1
  52. package/rules/viewprogress.md +1 -1
  53. package/dist/index-7fvAL10J.mjs.map +0 -1
  54. package/dist/index-C4A3nFix.js +0 -21
  55. package/dist/index-C4A3nFix.js.map +0 -1
@@ -0,0 +1,21 @@
1
+ "use strict";function At(t){return[...t.matchAll(/\[([-\w]+)]/g)].map(([e,n])=>n)}function k(t,e){const n=At(e);let s=0;return n.length?t.replace(/\[]/g,()=>{const i=n[s++];return i!==void 0?`[${i}]`:"[]"}):t}function Ct(t,e){return t.trigger==="viewEnter"&&e.triggerType==="once"&&W(t)===W(e)}function W(t){const{key:e,listContainer:n,listItemSelector:s,selector:i}=t;return`${e}\0${n||""}\0${s||""}\0${i||""}`}function We(t){let e=0,n=0;for(let s=0;s<t.length;s++){const i=t.charCodeAt(s);e=(e<<5)-e+i|0,n=n<<3^n>>>2^i|0}return((e>>>0)*1048576+(n>>>0)%1048576).toString(36)}class Y{animations;options;ready;isCSS;longestAnimation;constructor(e,n){this.animations=e,this.options=n,this.ready=n?.measured||Promise.resolve(),this.isCSS=e[0]instanceof CSSAnimation,this.longestAnimation=this._getAnimationWithLongestEndTime()}_getAnimationWithLongestEndTime(){return this.animations.reduce((e,n)=>{const s=e.effect?.getComputedTiming().endTime??0,i=n.effect?.getComputedTiming().endTime??0;return s>i?e:n},this.animations[0])}getProgress(){return this.longestAnimation?.effect?.getComputedTiming().progress||0}async play(e){await this.ready;for(const n of this.animations)n.play();await Promise.all(this.animations.map(n=>n.ready)),e&&e()}pause(){for(const e of this.animations)e.pause()}async reverse(e){await this.ready;for(const n of this.animations)n.reverse();await Promise.all(this.animations.map(n=>n.ready)),e&&e()}progress(e){for(const n of this.animations){const{delay:s,duration:i,iterations:r}=n.effect.getTiming(),o=(Number.isFinite(i)?i:0)*(Number.isFinite(r)?r:1);n.currentTime=((s||0)+o)*e}}cancel(){for(const e of this.animations)e.cancel()}setPlaybackRate(e){for(const n of this.animations)n.playbackRate=e}async onFinish(e){try{await Promise.all(this.animations.map(s=>s.finished));const n=this.animations[0];if(n&&!this.isCSS){const s=n.effect?.target;if(s){const i=this.options?.effectId||n.id,r=new CustomEvent("animationend",{detail:{effectId:i}});s.dispatchEvent(r)}}e()}catch(n){console.warn("animation was interrupted - aborting onFinish callback - ",n)}}async onAbort(e){try{await Promise.all(this.animations.map(n=>n.finished))}catch(n){if(n.name==="AbortError"){const s=this.animations[0];if(s&&!this.isCSS){const i=s.effect?.target;if(i){const r=new Event("animationcancel");i.dispatchEvent(r)}}e()}}}get finished(){return Promise.all(this.animations.map(e=>e.finished))}get playState(){return this.animations.some(e=>e.playState==="running")?"running":this.animations[0]?.playState}hasAnimationName(e){return this.animations.some(n=>n.animationName===e)}hasAnimationId(e){return this.animations.some(n=>n.id===e)}getTimingOptions(){return this.animations.map(e=>{const n=e.effect?.getTiming(),s=n?.delay??0,i=Number(n?.duration)||0,r=n?.iterations??1;return{delay:s,duration:i,iterations:r}})}}const Ve=t=>t,_t=t=>1-Math.cos(t*Math.PI/2),kt=t=>Math.sin(t*Math.PI/2),$t=t=>-(Math.cos(Math.PI*t)-1)/2,Pt=t=>t**2,qt=t=>1-(1-t)**2,Mt=t=>t<.5?2*t**2:1-(-2*t+2)**2/2,xt=t=>t**3,Lt=t=>1-(1-t)**3,Ft=t=>t<.5?4*t**3:1-(-2*t+2)**3/2,Rt=t=>t**4,Nt=t=>1-(1-t)**4,zt=t=>t<.5?8*t**4:1-(-2*t+2)**4/2,jt=t=>t**5,Dt=t=>1-(1-t)**5,Gt=t=>t<.5?16*t**5:1-(-2*t+2)**5/2,Ht=t=>t===0?0:2**(10*t-10),Wt=t=>t===1?1:1-2**(-10*t),Vt=t=>t===0?0:t===1?1:t<.5?2**(20*t-10)/2:(2-2**(-20*t+10))/2,Yt=t=>1-Math.sqrt(1-t**2),Kt=t=>Math.sqrt(1-(t-1)**2),Bt=t=>t<.5?(1-Math.sqrt(1-4*t**2))/2:(Math.sqrt(-(2*t-3)*(2*t-1))+1)/2,Ut=t=>2.70158*t**3-1.70158*t**2,Qt=t=>1+2.70158*(t-1)**3+1.70158*(t-1)**2,Xt=(t,e=1.70158*1.525)=>t<.5?(2*t)**2*((e+1)*2*t-e)/2:((2*t-2)**2*((e+1)*(t*2-2)+e)+2)/2,_e={linear:Ve,sineIn:_t,sineOut:kt,sineInOut:$t,quadIn:Pt,quadOut:qt,quadInOut:Mt,cubicIn:xt,cubicOut:Lt,cubicInOut:Ft,quartIn:Rt,quartOut:Nt,quartInOut:zt,quintIn:jt,quintOut:Dt,quintInOut:Gt,expoIn:Ht,expoOut:Wt,expoInOut:Vt,circIn:Yt,circOut:Kt,circInOut:Bt,backIn:Ut,backOut:Qt,backInOut:Xt},ke={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",sineIn:"cubic-bezier(0.47, 0, 0.745, 0.715)",sineOut:"cubic-bezier(0.39, 0.575, 0.565, 1)",sineInOut:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",quadIn:"cubic-bezier(0.55, 0.085, 0.68, 0.53)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",quadInOut:"cubic-bezier(0.455, 0.03, 0.515, 0.955)",cubicIn:"cubic-bezier(0.55, 0.055, 0.675, 0.19)",cubicOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",cubicInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",quartIn:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quartInOut:"cubic-bezier(0.77, 0, 0.175, 1)",quintIn:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",quintOut:"cubic-bezier(0.23, 1, 0.32, 1)",quintInOut:"cubic-bezier(0.86, 0, 0.07, 1)",expoIn:"cubic-bezier(0.95, 0.05, 0.795, 0.035)",expoOut:"cubic-bezier(0.19, 1, 0.22, 1)",expoInOut:"cubic-bezier(1, 0, 0, 1)",circIn:"cubic-bezier(0.6, 0.04, 0.98, 0.335)",circOut:"cubic-bezier(0.075, 0.82, 0.165, 1)",circInOut:"cubic-bezier(0.785, 0.135, 0.15, 0.86)",backIn:"cubic-bezier(0.6, -0.28, 0.735, 0.045)",backOut:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",backInOut:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"};function Zt(t){return t==="percentage"?"%":t||"px"}const Jt=/^(webkit|moz|ms|o)(?=[A-Z])/,en=Object.assign(Object.create(null),{float:"cssFloat","animation-timing-function":"easing","animation-composition":"composite"});function ce(t){return t.startsWith("--")?t:(Jt.test(t)?`-${t}`:t).replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function tn(t){return t.startsWith("--")||!t.includes("-")?t:t.replace(/^-/,"").replace(/-([a-z])/g,(e,n)=>n.toUpperCase())}function Ye(t){return en[t]||tn(t)}function nn(t){for(const e in t)if(Object.hasOwn(t,e)&&Ye(e)!==e)return!0;return!1}function sn(t){if(!Array.isArray(t))return t;let e;return t.forEach((n,s)=>{if(!n||typeof n!="object"||!nn(n))return;e??=t.slice();const i={};for(const r in n)Object.hasOwn(n,r)&&(i[Ye(r)]=n[r]);e[s]=i}),e||t}function te(t){return t?ke[t]||t:ke.linear}function rn(t,e,n,s){const i=3*t,r=3*(n-t)-i,o=1-i-r,c=3*e,a=3*(s-e)-c,u=1-c-a,f=h=>((o*h+r)*h+i)*h,l=h=>((u*h+a)*h+c)*h,d=h=>(3*o*h+2*r)*h+i;function g(h){let m=h;for(let y=0;y<8;y++){const E=f(m)-h;if(Math.abs(E)<1e-7)return m;const w=d(m);if(Math.abs(w)<1e-6)break;m-=E/w}let p=0,v=1;for(m=(p+v)/2;v-p>1e-7;){const y=f(m);if(Math.abs(y-h)<1e-7)return m;h>y?p=m:v=m,m=(p+v)/2}return m}return h=>h<=0?0:h>=1?1:l(g(h))}function on(t){const e=t.match(/^cubic-bezier\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*\)$/);if(!e)return;const n=parseFloat(e[1]),s=parseFloat(e[2]),i=parseFloat(e[3]),r=parseFloat(e[4]);if(![n,s,i,r].some(isNaN))return rn(n,s,i,r)}function cn(t){const e=t.match(/^linear\((.+)\)$/);if(!e)return;const n=e[1].split(",").map(o=>o.trim()).filter(Boolean);if(n.length===0)return;const s=[];for(const o of n){const c=o.split(/\s+/),a=parseFloat(c[0]);if(isNaN(a))return;const u=[];for(let f=1;f<c.length;f++)if(c[f].endsWith("%")){const l=parseFloat(c[f])/100;if(isNaN(l))return;u.push(l)}u.length===0?s.push({output:a,pos:null}):u.length===1?s.push({output:a,pos:u[0]}):(s.push({output:a,pos:u[0]}),s.push({output:a,pos:u[1]}))}if(s.length===0)return;s[0].pos===null&&(s[0].pos=0),s[s.length-1].pos===null&&(s[s.length-1].pos=1);let i=0;for(;i<s.length;)if(s[i].pos===null){const o=i-1;let c=i;for(;c<s.length&&s[c].pos===null;)c++;const a=s[o].pos,u=s[c].pos,f=c-o;for(let l=o+1;l<c;l++)s[l].pos=a+(u-a)*(l-o)/f;i=c+1}else i++;for(let o=1;o<s.length;o++)s[o].pos<s[o-1].pos&&(s[o].pos=s[o-1].pos);const r=s;return o=>{if(o<=r[0].pos)return r[0].output;const c=r[r.length-1];if(o>=c.pos)return c.output;let a=0,u=r.length-1;for(;a<u-1;){const d=a+u>>>1;r[d].pos<=o?a=d:u=d}const f=r[a],l=r[u];return l.pos===f.pos?l.output:f.output+(l.output-f.output)*(o-f.pos)/(l.pos-f.pos)}}function Ae(t){if(!t)return;const e=_e[t];return e||(on(t)??cn(t)??_e.linear)}class an extends Y{animationGroups;delay;offset;offsetEasing;timingOptions;constructor(e,n={}){const s=e.flatMap(i=>[...i.animations]);super(s),this.animationGroups=e,this.delay=n.delay??0,this.offset=n.offset??0,this.offsetEasing=typeof n.offsetEasing=="function"?n.offsetEasing:Ae(n.offsetEasing)??Ve,this.timingOptions=this.animationGroups.map(i=>i.getTimingOptions().map(({delay:r,duration:o,iterations:c})=>({delay:r,duration:Number.isFinite(o)?o:0,iterations:Number.isFinite(c)?c:1}))),this.applyOffsets(),this.ready=Promise.all(e.map(i=>i.ready)).then(()=>{})}calculateOffsets(){const e=this.animationGroups.length;if(e<=1)return[0];const n=e-1;return Array.from({length:e},(s,i)=>this.offsetEasing(i/n)*n*this.offset|0)}applyOffsets(){if(this.animationGroups.length===0||this.animations.length===0)return;const e=this.calculateOffsets(),n=this.getSequenceActiveDuration(e);this.animationGroups.forEach((s,i)=>{s.animations.forEach((r,o)=>{const c=r.effect;if(!c)return;const{delay:a,duration:u,iterations:f}=this.timingOptions[i][o],l=a+e[i],d=n-(l+u*f);c.updateTiming({delay:l+this.delay,endDelay:d})})})}getSequenceActiveDuration(e){const n=[];for(let s=0;s<this.timingOptions.length;s++){const i=this.timingOptions[s].reduce((r,o)=>{if(!o)return r;const{delay:c,duration:a,iterations:u}=o;return Math.max(r,c+a*u)},0);n.push(e[s]+i)}return Math.max(...n)}addGroups(e){if(e.length===0)return;const n=[...e].sort((s,i)=>i.index-s.index);for(const{index:s,group:i}of n){const r=Math.min(s,this.animationGroups.length);this.animationGroups.splice(r,0,i),this.timingOptions.splice(r,0,i.getTimingOptions());const o=[...i.animations],c=this.animationGroups.slice(0,r).reduce((a,u)=>a+u.animations.length,0);this.animations.splice(c,0,...o)}this.applyOffsets(),this.ready=Promise.all(this.animationGroups.map(s=>s.ready)).then(()=>{})}removeGroups(e){const n=[],s=[],i=[];for(let r=0;r<this.animationGroups.length;r++)e(this.animationGroups[r])?n.push(this.animationGroups[r]):(s.push(this.animationGroups[r]),i.push(this.timingOptions[r]));if(n.length===0)return n;for(const r of n)r.cancel();return this.animationGroups=s,this.timingOptions=i,this.animations=s.flatMap(r=>[...r.animations]),this.applyOffsets(),this.ready=Promise.all(this.animationGroups.map(r=>r.ready)).then(()=>{}),n}async onFinish(e){try{await Promise.all(this.animationGroups.map(n=>n.finished)),e()}catch(n){console.warn("animation was interrupted - aborting onFinish callback - ",n)}}}class fn{_animation;customEffect;progress;_tickCbId;_finishHandler;constructor(e,n,s,i){const r=new KeyframeEffect(n,[],{...s,composite:"add"}),{timeline:o}=i;this._animation=new Animation(r,o),this._tickCbId=null,this.progress=null,this.customEffect=c=>e(r.target,c),this._finishHandler=c=>{this.effect.target?.getAnimations().find(a=>a===this._animation)||this.cancel()},this.addEventListener("finish",this._finishHandler),this.addEventListener("remove",this._finishHandler)}_tick(){try{const e=this.effect?.getComputedTiming().progress??null;e!==this.progress&&(this.customEffect?.(e),this.progress=e),this._tickCbId=requestAnimationFrame(()=>{this._tick()})}catch(e){this._tickCbId=null,console.error(`failed to run customEffect! effectId: ${this.id}, error: ${e instanceof Error?e.message:e}`)}}get currentTime(){return this._animation.currentTime}set currentTime(e){this._animation.currentTime=e}get startTime(){return this._animation.startTime}set startTime(e){this._animation.startTime=e}get playbackRate(){return this._animation.playbackRate}set playbackRate(e){this._animation.playbackRate=e}get id(){return this._animation.id}set id(e){this._animation.id=e}get effect(){return this._animation.effect}set effect(e){this._animation.effect=e}get timeline(){return this._animation.timeline}set timeline(e){this._animation.timeline=e}get finished(){return this._animation.finished}get pending(){return this._animation.pending}get playState(){return this._animation.playState}get ready(){return this._animation.ready}get replaceState(){return this._animation.replaceState}get oncancel(){return this._animation.oncancel}set oncancel(e){this._animation.oncancel=e}get onfinish(){return this._animation.onfinish}set onfinish(e){this._animation.onfinish=e}get onremove(){return this._animation.onremove}set onremove(e){this._animation.onremove=e}play(){this._animation.play(),cancelAnimationFrame(this._tickCbId),this._tickCbId=requestAnimationFrame(()=>this._tick())}pause(){this._animation.pause(),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}cancel(){this.removeEventListener("finish",this._finishHandler),this.removeEventListener("remove",this._finishHandler),this._animation.cancel(),this.customEffect(null),cancelAnimationFrame(this._tickCbId),this._tickCbId=null}commitStyles(){console.warn("CustomEffect animations do not support commitStyles method as they have no style to commit")}finish(){this._animation.finish()}persist(){this._animation.persist()}reverse(){this._animation.reverse()}updatePlaybackRate(e){this._animation.updatePlaybackRate(e)}addEventListener(e,n,s){this._animation.addEventListener(e,n,s)}removeEventListener(e,n,s){this._animation.removeEventListener(e,n,s)}dispatchEvent(e){return this._animation.dispatchEvent(e)}}function un(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ne={exports:{}},$e=ne.exports,Pe;function ln(){return Pe||(Pe=1,(function(t){(function(e){var n=function(){},s=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(f){return setTimeout(f,16)};function i(){var f=this;f.reads=[],f.writes=[],f.raf=s.bind(e)}i.prototype={constructor:i,runTasks:function(f){for(var l;l=f.shift();)l()},measure:function(f,l){var d=l?f.bind(l):f;return this.reads.push(d),r(this),d},mutate:function(f,l){var d=l?f.bind(l):f;return this.writes.push(d),r(this),d},clear:function(f){return c(this.reads,f)||c(this.writes,f)},extend:function(f){if(typeof f!="object")throw new Error("expected object");var l=Object.create(this);return a(l,f),l.fastdom=this,l.initialize&&l.initialize(),l},catch:null};function r(f){f.scheduled||(f.scheduled=!0,f.raf(o.bind(null,f)))}function o(f){var l=f.writes,d=f.reads,g;try{n("flushing reads",d.length),f.runTasks(d),n("flushing writes",l.length),f.runTasks(l)}catch(h){g=h}if(f.scheduled=!1,(d.length||l.length)&&r(f),g)if(n("task errored",g.message),f.catch)f.catch(g);else throw g}function c(f,l){var d=f.indexOf(l);return!!~d&&!!f.splice(d,1)}function a(f,l){for(var d in l)l.hasOwnProperty(d)&&(f[d]=l[d])}var u=e.fastdom=e.fastdom||new i;t.exports=u})(typeof window<"u"?window:typeof $e<"u"?$e:globalThis)})(ne)),ne.exports}var dn=ln();const O=un(dn),ve={};function hn(t){Object.assign(ve,t)}function mn(t){return t in ve?ve[t]:(console.warn(`${t} not found in registry. Please make sure to import and register the preset.`),null)}function N(t,e){return t?(e||document).getElementById(t):null}function pn(t,e){return t?.matches(`[data-motion-part~="${e}"]`)?t:t?.querySelector(`[data-motion-part~="${e}"]`)}function gn(t){const e=t.alternate?"alternate":"";return t.reversed?`${e?`${e}-`:""}reverse`:e||"normal"}function he(t){return`${t.value}${Zt(t.unit)}`}function qe(t,e,n){return`${t.name||"cover"} ${n&&t.offset.unit!=="percentage"?`calc(100% + ${he(t.offset)}${e?` + ${e}`:""})`:e?`calc(${he(t.offset)} + ${e})`:he(t.offset)}`}function Ke(t){return{start:qe(t.startOffset,t.startOffsetAdd),end:qe(t.endOffset,t.endOffsetAdd,!0)}}function Be(t){return e=>O.measure(()=>e(t))}function Ue(t){return e=>O.mutate(()=>e(t))}function V(t){if(t.namedEffect){const e=t.namedEffect.type;return typeof e=="string"?mn(e):null}else if(t.keyframeEffect){const e=s=>{const{name:i,keyframes:r}=s.keyframeEffect;return[{...s,name:i,keyframes:r}]};return{web:e,style:e,getNames:s=>{const{effectId:i}=s,{name:r}=s.keyframeEffect,o=r||i;return o?[o]:[]}}}else if(t.customEffect)return e=>[{...e,keyframes:[]}];return null}function Qe(t,e,n,s){return t.map((i,r)=>{const o={fill:i.fill,easing:te(i.easing),iterations:i.iterations===0?1/0:i.iterations||1,composite:i.composite,direction:gn(i)};Ce(e)?(o.duration=i.duration,o.delay=i.delay||0):e?.trigger==="view-progress"&&(s||window.ViewTimeline)?o.duration="auto":(o.duration=99.99,o.delay=.01);const c=sn(i.keyframes);return{effect:c===i.keyframes?i:{...i,keyframes:c},options:o,id:n&&`${n}-${r+1}`,part:i.part}})}function Ce(t){return!t||t.trigger!=="pointer-move"&&t.trigger!=="view-progress"}function Me(t,e,n,s,i){if(t){if(Ce(s)&&(e.duration=e.duration||1,i?.reducedMotion))if(e.iterations===1||e.iterations==null)e={...e,duration:1};else return[];let r;return n instanceof HTMLElement&&(r={measure:Be(n),mutate:Ue(n)}),t.web?t.web(e,r,i):t(e,r,i)}return[]}function Xe(t,e,n,s,i){const r=typeof t=="string"?N(t,i):t;if(n?.trigger==="pointer-move"&&!e.keyframeEffect){let d=e;e.customEffect&&(d={...e,namedEffect:{id:"",type:"CustomMouse"}});const g=V(d),h=Me(g,e,r,n,s);return typeof h!="function"?null:h(r)}const o=V(e),c=Me(o,e,r,n,s);if(!c||c.length===0)return null;const a=Qe(c,n,e.effectId);let u;const f=n?.trigger==="view-progress";f&&window.ViewTimeline&&(u=new ViewTimeline({subject:n.element||N(n.componentId)}));const l=a.map(({effect:d,options:g,id:h,part:m})=>{const p=m?pn(r,m):r,v=new KeyframeEffect(p||null,[],g);O.mutate(()=>{"timing"in d&&v.updateTiming(d.timing),v.setKeyframes(d.keyframes)});const y=f&&u?{timeline:u}:{},E=typeof d.customEffect=="function"?new fn(d.customEffect,p||null,g,y):new Animation(v,y.timeline);if(f)if(u)O.mutate(()=>{const{start:w,end:S}=Ke(d);E.rangeStart=w,E.rangeEnd=S,E.play()});else{const{startOffset:w,endOffset:S}=e;O.mutate(()=>{const T=d.startOffset||w,I=d.endOffset||S;Object.assign(E,{start:{name:T.name,offset:T.offset?.value,add:d.startOffsetAdd},end:{name:I.name,offset:I.offset?.value,add:d.endOffsetAdd}})})}return h&&(E.id=h),E});return new Y(l,{...e,trigger:{...n||{}},measured:new Promise(d=>O.mutate(d))})}function vn(t,e){return t?`#${t}${e?`[data-motion-part~="${e}"]`:""}`:""}function yn(t,e){const{duration:n,delay:s,iterations:i=1,fill:r,easing:o="linear",direction:c}=t.options,a=t.effect.name,u=n==="auto";return`${a} ${u?"auto":`${n}ms`}${u?" ":` ${s??0}ms `}${o}${r&&r!=="none"?` ${r}`:""} ${!i||i===1/0?"infinite":i}${c==="normal"?"":` ${c}`} ${e?"":"paused"}`}function En(t,e,n){return t?.style?(Ce(n)&&(e.duration=e.duration||1),t.style(e)):[]}function wn(t,e,n){const s=V(e),i=En(s,e),r=Qe(i,n,e.effectId,!0),o=n?.trigger==="view-progress";return r.map((c,a)=>{const{start:u,end:f}=o?Ke(c.effect):{};return{target:vn(t,c.part),animation:yn(c,o),composition:c.options.composite,custom:c.effect.custom,name:c.effect.name,keyframes:c.effect.keyframes,id:c.id&&`${c.id}-${a+1}`,animationTimeline:o?`--${n?.id}`:"",animationRange:u||f?`${u} ${f}`:""}})}function bn(t,e,n){const s=V(e),i=t instanceof HTMLElement?t:N(t);if(s&&s.prepare&&i){const r={measure:Be(i),mutate:Ue(i)};s.prepare(e,r)}n&&O.mutate(n)}function Ze(t,e){const n=V(e);if(!n)return null;if(!n.style)return e.effectId&&t?Sn(t,e.effectId):null;const s=n.getNames(e),r=(typeof t=="string"?N(t):t)?.getAnimations(),o=r?.map(a=>a.animationName)||[],c=[];return s.forEach(a=>{o.includes(a)&&c.push(r?.find(u=>u.animationName===a))}),c?.length?new Y(c):null}function Sn(t,e){const s=(typeof t=="string"?N(t):t)?.getAnimations().filter(i=>{const r=i.id||i.animationName;return r?r.startsWith(e):!0});return s?.length?new Y(s):null}function Je(t,e,n,s={}){const{disabled:i,allowActiveEvent:r,...o}=s,c=Xe(t,e,n,o);if(!c)return null;let a={};if(n.trigger==="view-progress"&&!window.ViewTimeline){const u=n.element||N(n.componentId),{ready:f}=c;return c.animations.map(l=>({get start(){return l.start},get end(){return l.end},viewSource:u,ready:f,getProgress(){return c.getProgress()},effect(d,g){const{activeDuration:h}=l.effect.getComputedTiming(),{delay:m}=l.effect.getTiming();l.currentTime=((m||0)+(h||0))*g},disabled:i,destroy(){l.cancel()}}))}else if(n.trigger==="pointer-move"){const u=e,{centeredToTarget:f,transitionDuration:l,transitionEasing:d}=u,g=n.axis;if(u.keyframeEffect){const h=c;return h.animations?.length===0?null:{target:void 0,centeredToTarget:f,ready:h.ready,_currentProgress:0,getProgress(){return this._currentProgress},effect(p,v){const y=g==="x"?v.x:v.y;this._currentProgress=y,h.progress(y)},disabled:i??!1,destroy(){h.cancel()}}}a={centeredToTarget:f,allowActiveEvent:r},e.customEffect&&l&&(a.transitionDuration=l,a.transitionEasing=Ae(d)),a.target=c.target}return{...a,getProgress(){return c.getProgress()},effect(u,f,l,d){c.progress(l?{...f,v:l,active:d}:f)},disabled:i,destroy(){c.cancel()}}}function K(t,e,n,s=!1){const i=Ze(t,e);return i?(i.ready=new Promise(r=>{bn(t,e,r)}),i):Xe(t,e,n,{reducedMotion:s})}function Tn(t){return t===null?[null]:typeof t=="string"?Array.from(document.querySelectorAll(t)):Array.isArray(t)?t:[t]}function et(t,e){const n=[];for(const{target:s,options:i}of t){const r=Tn(s);for(const o of r){const c=K(o,i,void 0,e?.reducedMotion);c instanceof Y&&n.push(c)}}return n}function In(t,e,n){const s=et(e,n);return new an(s,t)}function On(t,e=2){return parseFloat(t.toFixed(e))}function An(t){return/\[]/g.test(t)}function Cn(t){return`--${t.join("-")}`}function _n(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function kn(t,e,n,s){const i=t.length-1;t.forEach((r,o)=>{if(r){const c=o?s(o/i)*i*n|0:0;r.delay=e+c+(r.delay||0)}})}function se(t,e){return e.includes("&")?e.replace(/&/g,t):`${t}${e}`}function _(){return"wi-12343210".replace(/\d/g,t=>String.fromCharCode((+t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+t/4)+97))}function tt(t){const{transition:e,transitionProperties:n}=t;return(e?.styleProperties||n||[]).map(i=>({...i,name:ce(i.name)}))}function nt(t){let{transition:e,transitionProperties:n}=t,s=[];if(e?.styleProperties){const{duration:i,easing:r,delay:o}=e;i&&(e.styleProperties.some(a=>a.name.startsWith("--"))?s=[`all ${i}ms ${te(r||"ease")}${o?` ${o}ms`:""}`,"visibility 0s"]:s=e.styleProperties.map(a=>`${ce(a.name)} ${i}ms ${te(r||"ease")}${o?` ${o}ms`:""}`))}else s=n?.filter(i=>i.duration).map(i=>`${ce(i.name)} ${i.duration}ms ${te(i.easing)||"ease"}${i.delay?` ${i.delay}ms`:""}`)||[];return s}function $n({key:t,effectId:e,transition:n,transitionProperties:s,childSelector:i="> :first-child",selectorCondition:r}){const o=nt({transition:n,transitionProperties:s}),c=tt({transition:n,transitionProperties:s}).map(h=>`${h.name}: ${h.value};`),a=t.replace(/"/g,"'"),u=`:is(:state(${e}), :--${e}) ${i}`,f=`[data-interact-effect~="${e}"] ${i}`,l=r?se(u,r):u,d=r?se(f,r):f,g=[`${l},
2
+ ${d} {
3
+ ${c.join(`
4
+ `)}
5
+ }`];if(o.length){const h=`[data-interact-key="${a}"] ${i}`,m=r?se(h,r):h;g.push(`@media (prefers-reduced-motion: no-preference) { ${m} {
6
+ transition: ${o.join(", ")};
7
+ } }`)}return g}function B(t,e,n){const s=(t||[]).filter(i=>e[i]?.type===n&&e[i].predicate).map(i=>e[i].predicate).join(") and (");return s&&`(${s})`}function $(t,e){const n=B(t,e,"media");return n&&window.matchMedia(n)}function P(t,e){return(t||[]).filter(n=>e[n]?.type==="selector"&&e[n].predicate).map(n=>`:is(${e[n].predicate})`).join("")}const Q={rangeStart:{name:"cover",offset:{value:0,unit:"percentage"}},rangeEnd:{name:"cover",offset:{value:100,unit:"percentage"}}};function Pn(t,e){const n=t?.name??Q.rangeStart.name,s=e?.name??t?.name??Q.rangeEnd.name,i={name:n,offset:t?.offset||Q.rangeStart.offset},r={name:s,offset:e?.offset||Q.rangeEnd.offset};return{startOffset:i,endOffset:r}}function q(t){if("keyframeEffect"in t&&!t.keyframeEffect.name&&"effectId"in t&&(t.keyframeEffect.name=t.effectId),"duration"in t)return{id:"",...t};const{rangeStart:e,rangeEnd:n,...s}=t,{startOffset:i,endOffset:r}=Pn(e,n);return{id:"",startOffset:i,endOffset:r,...s}}function A(t,e,n){let s=t.get(e);s||(s=new Set,t.set(e,s)),s.add(n)}function U(t,e){t.get(e)?.forEach(s=>{const{source:i,target:r,cleanup:o}=s;o();const c=i===e?r:i;t.get(c)?.delete(s)}),t.delete(e)}const qn={root:null,rootMargin:"0px 0px -10% 0px",threshold:[0]},Mn={root:null,rootMargin:"0px",threshold:[0]},xn=.2;function Ln(t){const e=t.trim().split(/\s+/),n=e[0],s=e.length>1?e[1]:e[0],i=r=>r.startsWith("-")?r.slice(1):parseFloat(r)?`-${r}`:r;return`${i(n)} 0px ${i(s)}`}const H={},M=new WeakMap,ae=new WeakSet,j=new WeakMap;let st={},D=null;function Fn(t){st=t}function it(t,e,n){M.get(t)?.forEach(({source:i,handler:r})=>{i===t&&r(e,n)})}function xe(){return D||(D=new IntersectionObserver(t=>{t.forEach(e=>{const n=e.target;e.isIntersecting||it(n,!1,!0)})},Mn),D)}function rt(t,e=!1){const n=JSON.stringify({...t,isSafeMode:e});if(H[n])return H[n];const s=t.threshold??xn,i=e?qn:{root:null,rootMargin:t.inset?Ln(t.inset):"0px",threshold:s},r=new IntersectionObserver(o=>{o.forEach(c=>{const a=c.target,u=!ae.has(a);if(u&&(ae.add(a),t.useSafeViewEnter&&!c.isIntersecting)){O.measure(()=>{const f=c.boundingClientRect.height,l=c.rootBounds?.height;if(!l)return;const d=Array.isArray(t.threshold)?Math.min(...t.threshold):t.threshold;d&&f*d>l&&O.mutate(()=>{r.unobserve(a);const h=rt(t,!0);j.set(a,h),h.observe(a)})});return}(c.isIntersecting||!u)&&it(a,c.isIntersecting)})},i);return H[n]=r,r}function Rn(t,e,n,s={},{reducedMotion:i,selectorCondition:r,animation:o}={}){const c={...st,...s},a=n.triggerType||"once",u=o||K(e,q(n),void 0,i);if(!u)return;const f=rt(c);a!=="once"&&u.persist?.();let l=!0,d=!1,g;g={source:t,target:e,handler:(p,v)=>{if(!(r&&!e.matches(r)))if(a==="once"){if(p&&!d){d=!0,M.get(t)?.delete(g),M.get(e)?.delete(g);const y=M.get(t);(!y||y.size===0)&&((j.get(t)||f).unobserve(t),ae.delete(t)),u.play(()=>{const E=()=>{e.dataset.interactEnter="start"};if(u.isCSS){O.mutate(()=>{requestAnimationFrame(E)});const w=()=>{O.mutate(()=>{e.dataset.interactEnter="done"})};u.onFinish(w),u.onAbort(w)}else O.mutate(E)})}}else a==="alternate"?l&&p?(l=!1,u.play()):l||u.reverse():a==="repeat"?p?(u.progress(0),u.play()):v&&(u.pause(),u.progress(0)):a==="state"&&(p?u.play():v&&u.pause())},cleanup:()=>{(j.get(t)||f).unobserve(t),(a==="repeat"||a==="state")&&xe().unobserve(t),u.cancel(),ae.delete(t),j.delete(t)}},A(M,t,g),A(M,e,g),j.set(t,f),f.observe(t),(a==="repeat"||a==="state")&&xe().observe(t)}function Nn(t){U(M,t)}function zn(){D=null,Object.keys(H).forEach(t=>delete H[t])}const jn={add:Rn,remove:Nn,setOptions:Fn,reset:zn};function ot(t,e){return Object.assign(Object.create(e),t)}function Dn(t,e,n,s){let i=t*(1-n)+e*n;if(s){const r=i-t;Math.abs(r)<s&&(i=t+s*Math.sign(r));const o=e-i;if(Math.abs(o)<s)return e}return i}function Gn(t){let e=!1;return function(){e||(e=!0,window.requestAnimationFrame(()=>{e=!1,t()}))}}function Le(t,e){let n=0;return function(){n&&window.clearTimeout(n),n=window.setTimeout(()=>{n=0,t()},e)}}function Hn(t,e){const n=t.match(/^calc\s*\(\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\+\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\)\s*$/);return fe(n[1],e)+fe(n[6],e)}function fe(t,e){return t?/^-?\d+px$/.test(t)?parseInt(t):/^-?\d+[lsd]?vh$/.test(t)?parseInt(t)*e.viewportHeight/100:/^-?\d+[lsd]?vw$/.test(t)?parseInt(t)*e.viewportWidth/100:/^calc\s*\(\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\+\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\)\s*$/.test(t)?Hn(t,e):parseInt(t)||0:0}function L(t,e,n){const{name:s,offset:i=0}=t,{start:r,end:o}=n,c=o-r,a=i/100;let u,f;return s==="entry"?(u=r-e,f=Math.min(e,c)):s==="entry-crossing"?(u=r-e,f=c):s==="contain"?(u=Math.min(o-e,r),f=Math.abs(e-c)):s==="exit"?(u=Math.max(r,o-e),f=Math.min(e,c)):s==="exit-crossing"?(u=r,f=c):s==="cover"&&(u=r-e,f=c+e),u+a*f|0}function me(t,e,n,s,i){let r=0;const o={start:e,end:n};return t.forEach((c,a)=>{r+=c.offset;const u=c.sticky;if(u){if("end"in u&&t[a-1]?.element){const d=((i?c.element.offsetWidth:c.element.offsetHeight)||0)+u.end-s,g=r+d-c.offset,h=g<o.start,m=!h&&g<=n;let p=0;(h||m)&&(p=c.offset,o.end+=p),h&&(o.start+=p)}if("start"in u){const f=r-u.start,l=f<o.start,d=!l&&f<=o.end;let g=0;const h=t[a-1]?.element;if(h){if(l||d){const m=(i?h.offsetWidth:h.offsetHeight)||0,p=c.offset,v=(i?c.element.offsetWidth:c.element.offsetHeight)||0;g=m-(p+v),r+=g,o.end+=g}l&&(o.start+=g)}}}}),o}function Wn(t,e,n,s,i,r){const{start:o,end:c,duration:a}=t;let u=o,f=c,l=t.startRange,d=t.endRange,g;if(typeof a=="string"){l={name:a,offset:0},d={name:a,offset:100},u=L(l,n,e),f=L(d,n,e),g=f-u;const h=me(r,u,f,n,s);u=h.start,f=h.end}else{if(l||o?.name){l=l||o;const h=fe(l.add,i),m=L({...l,offset:0},n,e),p=L({...l,offset:100},n,e),v=me(r,m,p,n,s);u=v.start+l.offset/100*(v.end-v.start)+h}if(d||c?.name){d=d||c;const h=fe(d.add,i),m=L({...d,offset:0},n,e),p=L({...d,offset:100},n,e),v=me(r,m,p,n,s);f=v.start+d.offset/100*(v.end-v.start)+h}else typeof a=="number"&&(f=u+a)}return!g&&!a&&(g=f-u),{...t,start:u,end:f,startRange:l,endRange:d,duration:g||a}}function Vn(t){return t.position==="sticky"}function Yn(t,e,n){return t.position==="fixed"&&(!e||e===window.document.body||e===n)}function Kn(t,e){return parseInt(e?t.left:t.top)}function Bn(t,e){return parseInt(e?t.right:t.bottom)}function Un(t,e,n){n&&(t.style.position="static");const s=(e?t.offsetLeft:t.offsetTop)||0;return n&&(t.style.position=null),s}function Qn(t,e){let n;const s=Kn(t,e),i=Bn(t,e),r=!isNaN(s),o=!isNaN(i);return(r||o)&&(n={},r&&(n.start=s),o&&(n.end=i)),n}function X(t,e,n,s,i){const r=t[0].viewSource,o=[];let c=(s?r.offsetWidth:r.offsetHeight)||0,a=0,u=r;for(;u;){const l=window.getComputedStyle(u),d=Vn(l),g=d?Qn(l,s):void 0,h=Un(u,s,d);if((!g||!("end"in g))&&(a+=h),o.push({element:u,offset:h,sticky:g}),u=u.offsetParent,Yn(l,u,e))break;if(u===e){o.push({element:u,offset:0});break}}return o.reverse(),t.map(l=>({...Wn(l,{start:a,end:a+c},n,s,i,o)}))}const Fe=100,Xn={horizontal:!1,observeViewportEntry:!0,viewportRootMargin:"7% 7%",observeViewportResize:!1,observeSourcesResize:!1,observeContentResize:!1};function Zn(t,e,n,s){let i=0;return t>=e&&t<=n?i=s?(t-e)/s:1:t>n&&(i=1),i}function Re(t,e){return t===window?e?window.document.documentElement.clientWidth:window.document.documentElement.clientHeight:e?t.clientWidth:t.clientHeight}function Jn(){return{viewportWidth:window.document.documentElement.clientWidth,viewportHeight:window.document.documentElement.clientHeight}}function es(t){const e=ot(t,Xn),n=e.root,s=e.horizontal,i=new WeakMap;let r=Re(n,s),o,c,a,u,f;const l=[],d=Jn();if(e.scenes=Object.values(t.scenes.reduce((m,p,v)=>{const y=p.groupId?`group-${p.groupId}`:String(v);return m[y]?m[y].push(p):m[y]=[p],m},{})).flatMap(m=>(m.every(p=>p.viewSource&&(typeof p.duration=="string"||p.start?.name))?(m=X(m,n,r,s,d),(e.observeSourcesResize||e.observeContentResize)&&l.push(m)):m.forEach(p=>{p.end==null&&(p.end=p.start+p.duration),p.duration==null&&(p.duration=p.end-p.start)}),m)),e.scenes.forEach((m,p)=>{m.index=p}),l.length){const m=new Map;window.ResizeObserver&&(a=new window.ResizeObserver(function(p){p.forEach(v=>{const y=m.get(v.target),E=X(y,n,r,s,d);E.forEach((w,S)=>{e.scenes[w.index]=E[S]}),l.splice(l.indexOf(y),1,E)})}),l.forEach(p=>{a.observe(p[0].viewSource,{box:"border-box"}),m.set(p[0].viewSource,p)}),e.observeContentResize&&e.contentRoot&&new window.ResizeObserver(Le(()=>{const v=l.map(y=>{const E=X(y,n,r,s,d);return E.forEach((w,S)=>{e.scenes[w.index]=E[S]}),E});l.length=0,l.push(...v),l.forEach(y=>{m.set(y[0].viewSource,y)})},Fe)).observe(e.contentRoot,{box:"border-box"})),e.observeViewportResize&&(u=Le(function(){r=Re(n,s);const p=l.map(v=>{const y=X(v,n,r,s,d);return y.forEach((E,w)=>{e.scenes[E.index]=y[w]}),y});l.length=0,l.push(...p),l.forEach(v=>{m.set(v[0].viewSource,v)})},Fe),n===window?window.addEventListener("resize",u):window.ResizeObserver&&(f=new window.ResizeObserver(u),f.observe(n,{box:"border-box"})))}e.observeViewportEntry&&window.IntersectionObserver&&(c=new window.IntersectionObserver(function(m){m.forEach(p=>{(i.get(p.target)||[]).forEach(v=>{v.disabled=!p.isIntersecting})})},{root:n===window?window.document:n,rootMargin:e.viewportRootMargin,threshold:0}),e.scenes.forEach(m=>{if(m.viewSource){let p=i.get(m.viewSource);p||(p=[],i.set(m.viewSource,p),c.observe(m.viewSource)),p.push(m)}}));function g({p:m,vp:p}){m=+m.toFixed(1);const v=+p.toFixed(4);if(m!==o){for(let y of e.scenes)if(!y.disabled){const{start:E,end:w,duration:S}=y,T=Zn(m,E,w,S);y.effect(y,T,v)}o=m}}function h(){e.scenes.forEach(m=>m.destroy?.()),c&&(c.disconnect(),c=null),a&&(a.disconnect(),a=null),u&&(f?(f.disconnect(),f=null):window.removeEventListener("resize",u))}return{tick:g,destroy:h}}const ts={transitionActive:!1,transitionFriction:.9,transitionEpsilon:1,velocityActive:!1,velocityMax:1};class ns{constructor(e={}){this.config=ot(e,ts),this.progress={p:0,prevP:0,vp:0},this.currentProgress={p:0,prevP:0,vp:0},this._lerpFrameId=0,this.effect=null;const n=!this.config.root||this.config.root===window.document.body;this.config.root=n?window:this.config.root,this.config.contentRoot=this.config.contentRoot||(n?window.document.body:this.config.root.firstElementChild),this.config.resetProgress=this.config.resetProgress||this.resetProgress.bind(this),this._measure=this.config.measure||(()=>{const s=this.config.root;this.progress.p=this.config.horizontal?s.scrollX||s.scrollLeft||0:s.scrollY||s.scrollTop||0}),this._trigger=Gn(()=>{this._measure?.(),this.tick(!0)})}start(){this.setupEffect(),this.setupEvent(),this.resetProgress(),this.tick()}pause(){this.removeEvent()}resetProgress(e={}){const n=this.config.root,s=e.x||e.x===0?e.x:n.scrollX||n.scrollLeft||0,i=e.y||e.y===0?e.y:n.scrollY||n.scrollTop||0,r=this.config.horizontal?s:i;this.progress.p=r,this.progress.prevP=r,this.progress.vp=0,this.config.transitionActive&&(this.currentProgress.p=r,this.currentProgress.prevP=r,this.currentProgress.vp=0),e&&this.config.root.scrollTo(s,i)}tick(e){const n=this.config.transitionActive;n&&this.lerp();const s=n?this.currentProgress:this.progress;if(this.config.velocityActive){const i=s.p-s.prevP,r=i<0?-1:1;s.vp=Math.min(this.config.velocityMax,Math.abs(i))/this.config.velocityMax*r}this.effect.tick(s),n&&s.p!==this.progress.p&&(e&&this._lerpFrameId&&window.cancelAnimationFrame(this._lerpFrameId),this._lerpFrameId=window.requestAnimationFrame(()=>this.tick())),s.prevP=s.p}lerp(){this.currentProgress.p=Dn(this.currentProgress.p,this.progress.p,+(1-this.config.transitionFriction).toFixed(3),this.config.transitionEpsilon)}destroy(){this.pause(),this.removeEffect()}setupEvent(){this.removeEvent(),this.config.root.addEventListener("scroll",this._trigger)}removeEvent(){this.config.root.removeEventListener("scroll",this._trigger)}setupEffect(){this.removeEffect(),this.effect=es(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const ye=new WeakMap;let ct=()=>({});function ss(t){ct=t}function is(t,e,n,s,{reducedMotion:i}){if(i)return;const r={trigger:"view-progress",element:t},o=q(n);let c;if("ViewTimeline"in window){const u=K(e,o,r);u&&!u.isCSS&&(u.play(),c=()=>{u.ready.then(()=>{u.cancel()})})}else{const u=Je(e,o,r);if(u){const f=Array.isArray(u)?u:[u],l=new ns({viewSource:t,scenes:f,observeViewportEntry:!1,observeViewportResize:!1,observeSourcesResize:!0,root:document.body,...ct()});c=()=>{l.destroy()},Promise.all(f.map(d=>d.ready||Promise.resolve())).then(()=>{l.start()})}}if(!c)return;const a={source:t,target:e,cleanup:c};A(ye,t,a),A(ye,e,a)}function rs(t){U(ye,t)}const os={add:is,remove:rs,registerOptionsGetter:ss};function Ne(t,e,n){return Math.min(Math.max(t,n),e)}function ze(t){let e=!1;return function(){if(!e)return e=!0,window.requestAnimationFrame(()=>{e=!1,t()})}}function cs(t){let e=t,n=0,s=0;if(e.offsetParent)do n+=e.offsetLeft,s+=e.offsetTop,e=e.offsetParent;while(e);return{left:n,top:s,width:t.offsetWidth,height:t.offsetHeight}}function as(){const t=window.devicePixelRatio;let e=!1;if(t===1)return!1;document.body.addEventListener("pointerdown",s=>{e=s.offsetX!==10},{once:!0});const n=new PointerEvent("pointerdown",{clientX:10});return document.body.dispatchEvent(n),e}function fs(){return new Promise(t=>{const e=window.scrollY;let n=!1,s;function i(){document.body.addEventListener("pointerdown",c=>{s===void 0?s=c.offsetY:n=c.offsetY===s},{once:!0});const o=new PointerEvent("pointerdown",{clientY:500});document.body.dispatchEvent(o)}function r(){window.scrollY!==e&&(window.removeEventListener("scroll",r),i(),t(n))}i(),window.addEventListener("scroll",r),window.scrollY>0&&window.scrollBy(0,-1)})}function us(t){fs().then(e=>{t.fixRequired=e,e&&(window.addEventListener("scroll",t.scrollHandler),t.scrollHandler())})}let Z=0;const ie=new Set;function ls(){const t=n=>{for(let s of n.changedTouches)ie.add(s.identifier)},e=n=>{for(let s of n.changedTouches)ie.delete(s.identifier)};return document.addEventListener("touchstart",t,{passive:!0}),document.addEventListener("touchend",e,{passive:!0}),function(){ie.clear(),document.removeEventListener("touchstart",t),document.removeEventListener("touchend",e)}}function ds(t,e){if("onscrollend"in window)return t.addEventListener("scrollend",e),function(){t.removeEventListener("scrollend",e)};let n=0,s;Z||(s=ls()),Z+=1;function i(r){clearTimeout(n),n=setTimeout(()=>{ie.size?setTimeout(i,100):(e(r),n=0)},100)}return t.addEventListener("scroll",i),function(){t.removeEventListener("scroll",i),Z-=1,Z||s()}}function hs(t,e,n){return{x(s){const i=t.left-n.x+t.width/2,r=i>=e.width/2,o=(r?i:e.width-i)*2,c=r?0:i-o/2;return(s-c)/o},y(s){const i=t.top-n.y+t.height/2,r=i>=e.height/2,o=(r?i:e.height-i)*2,c=r?0:i-o/2;return(s-c)/o}}}function ms(t,e){this.x=window.scrollX,this.y=window.scrollY,requestAnimationFrame(()=>t&&t(e))}function ps(t){t.rect.width=window.document.documentElement.clientWidth,t.rect.height=window.document.documentElement.clientHeight}function gs(t){const e=new ResizeObserver(n=>{n.forEach(s=>{t.rect.width=s.borderBoxSize[0].inlineSize,t.rect.height=s.borderBoxSize[0].blockSize})});return e.observe(t.root,{box:"border-box"}),e}function vs(t){let e=!1,n={x:t.rect.width/2,y:t.rect.height/2,vx:0,vy:0},s,i,r,o,c;const a={x:0,y:0};t.scenes.forEach(f=>{f.target&&f.centeredToTarget&&(f.transform=hs(cs(f.target),t.rect,a),e=!0),t.root?i=gs(t):(r=ps.bind(null,t),window.addEventListener("resize",r))}),s=function(f){for(let l of t.scenes)if(!l.disabled){const d=l.transform?.x(f.x)||f.x/t.rect.width,g=l.transform?.y(f.y)||f.y/t.rect.height,h=+Ne(0,1,d).toPrecision(4),m=+Ne(0,1,g).toPrecision(4),p={x:f.vx,y:f.vy};t.allowActiveEvent&&(f.active=d<=1&&g<=1&&d>=0&&g>=0),l.effect(l,{x:h,y:m},p,f.active)}Object.assign(n,f)},e&&(o=ms.bind(a,s,n),c=ds(document,o));function u(){t.scenes.forEach(f=>f.destroy?.()),c?.(),i?(i.disconnect(),i=null):(window.removeEventListener("resize",r),r=null),s=null,n=null}return{tick:s,destroy:u}}const ys=1e3/60*3;let J;function Es(){F.x=window.scrollX,F.y=window.scrollY}const F={x:0,y:0,scrollHandler:Es,fixRequired:void 0};class ws{constructor(e={}){this.config={...e},this.effect=null,this._nextTick=null,this._nextTransitionTick=null,this._startTime=0;let n;this.config.transitionDuration?n=this.config.noThrottle?()=>this.transition():ze(()=>this.transition()):n=this.config.noThrottle?()=>(this.tick(),null):ze(()=>{this.tick()}),this.config.rect=this.config.root?{width:this.config.root.offsetWidth,height:this.config.root.offsetHeight}:{width:window.document.documentElement.clientWidth,height:window.document.documentElement.clientHeight},this.progress={x:this.config.rect.width/2,y:this.config.rect.height/2,vx:0,vy:0},this.previousProgress={...this.progress},this.currentProgress=null;const s=i=>{const r=this.config.root?i.offsetX:i.x,o=this.config.root?i.offsetY:i.y;this.progress.vx=r-this.progress.x,this.progress.vy=o-this.progress.y,this.progress.x=r,this.progress.y=o,this._nextTick=n()};if(this._pointerLeave=()=>{this.progress.active=!1,this.progress.vx=0,this.progress.vy=0,this._nextTick=n()},this._pointerEnter=()=>{this.progress.active=!0,this._nextTick=n()},this.config.root){J=typeof J=="boolean"?J:as();const i=J?window.devicePixelRatio:1;typeof F.fixRequired>"u"&&us(F),this._measure=r=>{if(r.target!==this.config.root){const o=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:r.x*i+F.x,clientY:r.y*i+F.y});r.stopPropagation(),this.config.root.dispatchEvent(o)}else s(r)}}else this._measure=s}start(){this.setupEffect(),this.setupEvent()}pause(){this.removeEvent()}tick(){this.effect.tick(this.progress)}transition(){const e=this.config.transitionDuration,n=this.config.transitionEasing||(o=>o),s=performance.now();let i=!1;const r=o=>{const c=(o-this._startTime)/e,a=n(Math.min(1,c));i&&(this.progress.vx=0,this.progress.vy=0,i=!1),this.currentProgress=Object.entries(this.progress).reduce((u,[f,l])=>(f==="active"?u[f]=l:u[f]=this.previousProgress[f]+(l-this.previousProgress[f])*a,u),this.currentProgress||{}),c<1&&(this._nextTransitionTick=requestAnimationFrame(r),i=o-this._startTime>ys),this.effect.tick(this.currentProgress)};return this._startTime?(this._nextTransitionTick&&cancelAnimationFrame(this._nextTransitionTick),Object.assign(this.previousProgress,this.currentProgress),this._startTime=s,r(s)):this._startTime=s,this._nextTransitionTick}destroy(){this.pause(),this.removeEffect(),this._nextTick&&cancelAnimationFrame(this._nextTick),this._nextTransitionTick&&cancelAnimationFrame(this._nextTransitionTick)}setupEvent(){this.removeEvent();const e=this.config.root||window;e.addEventListener("pointermove",this._measure,{passive:!0}),this.config.eventSource&&this.config.eventSource.addEventListener("pointermove",this._measure,{passive:!0}),this.config.allowActiveEvent&&(e.addEventListener("pointerleave",this._pointerLeave,{passive:!0}),e.addEventListener("pointerenter",this._pointerEnter,{passive:!0}),this.config.eventSource&&(this.config.eventSource.addEventListener("pointerleave",this._pointerLeave,{passive:!0}),this.config.eventSource.addEventListener("pointerenter",this._pointerEnter,{passive:!0})))}removeEvent(){const e=this.config.root||window;e.removeEventListener("pointermove",this._measure),this.config.eventSource&&this.config.eventSource.removeEventListener("pointermove",this._measure),this.config.allowActiveEvent&&(e.removeEventListener("pointerleave",this._pointerLeave),e.removeEventListener("pointerenter",this._pointerEnter),this.config.eventSource&&(this.config.eventSource.removeEventListener("pointerleave",this._pointerLeave),this.config.eventSource.removeEventListener("pointerenter",this._pointerEnter)))}setupEffect(){this.removeEffect(),this.effect=vs(this.config)}removeEffect(){this.effect&&this.effect.destroy(),this.effect=null}}const Ee=new WeakMap;let at=()=>({});function bs(t){at=t}function Ss(t,e,n,s={},{reducedMotion:i}){if(i)return;const r={trigger:"pointer-move",element:t,axis:s.axis??"y"},o=Je(e,q(n),r);if(o){const c=Array.isArray(o)?o:[o],a=new ws({root:s.hitArea==="self"?t:void 0,scenes:c,...at()}),f={source:t,target:e,cleanup:()=>{a.destroy()}};A(Ee,t,f),A(Ee,e,f),Promise.all(c.map(l=>l.ready||Promise.resolve())).then(()=>{a.start()})}}function Ts(t){U(Ee,t)}const Is={add:Ss,remove:Ts,registerOptionsGetter:bs},we=new WeakMap;function Os(t,e,n,s,{reducedMotion:i,selectorCondition:r,animation:o,sourceAnimationOptions:c}){const a=o||K(e,q(n),void 0,i);if(!a)return;const{effectId:u}=s,f=g=>{if(r&&!e.matches(r))return;const h=g.animationName,m=g.detail?.effectId,p=c?Ze(t,c):null;if(p){if(p.playState==="running"||h&&!p.hasAnimationName(h))return;if(m&&m!==u&&!p.hasAnimationId(m))return}a.play()},d={source:t,target:e,cleanup:()=>{a.cancel(),t.removeEventListener("animationend",f)}};A(we,t,d),A(we,e,d),t.addEventListener("animationend",f)}function As(t){U(we,t)}const Cs={add:Os,remove:As};function _s(t,e,n=!1,s,i,r){const o=r||K(t,q(e),void 0,n);if(!o)return null;let c=!0;const a=e.triggerType||"alternate";return u=>{if(s&&!t.matches(s))return;const f=!i,l=i?.enter?.includes(u.type),d=i?.leave?.includes(u.type);if(l||f){if(a==="alternate"||a==="state")c?(c=!1,o.play()):a==="alternate"?o.reverse():a==="state"&&(o.playState==="running"?o.pause():o.playState!=="finished"&&o.play());else{if(o.progress(0),delete t.dataset.interactEnter,o.isCSS){const g=()=>{O.mutate(()=>{t.dataset.interactEnter="done"})};o.onFinish(g),o.onAbort(g)}o.play()}return}d&&(a==="alternate"?o.reverse():a==="repeat"?(o.cancel(),O.mutate(()=>{delete t.dataset.interactEnter})):a==="state"&&o.playState==="running"&&o.pause())}}function ks(t,e,{effectId:n,listContainer:s,listItemSelector:i,stateAction:r},o,c){const a=!!s,u=r??"toggle",f=u==="toggle";return l=>{if(o&&!t.matches(o))return;const d=a?t.closest(`${s} > ${i||""}:has(:scope)`):void 0,g=!c,h=c?.enter?.includes(l.type),m=c?.leave?.includes(l.type);g?e.toggleEffect(n,u,d):(h&&e.toggleEffect(n,f?"add":u,d),m&&f&&e.toggleEffect(n,"remove",d))}}const be=new WeakMap;function je(t,e){return n=>{const s=n;t.contains(s.relatedTarget)||e(s)}}function $s(t){return e=>{const n=e;n.pointerType&&t(n)}}function Ps(t){return e=>{const n=e;n.code==="Space"?(n.preventDefault(),t(n)):n.code==="Enter"&&t(n)}}const qs={focusin:(t,e)=>je(t,e),focusout:(t,e)=>je(t,e),click:(t,e)=>$s(e),keydown:(t,e)=>Ps(e)};function Ms(t,e,n){const s=qs[t];return s?s(e,n):i=>n(i)}function xs(t){return typeof t=="object"&&!Array.isArray(t)&&("enter"in t||"leave"in t)}function Ls(t){if(typeof t=="string")return{toggle:[t]};if(Array.isArray(t))return{toggle:[...t]};if(xs(t)){const e=t.enter?[...t.enter]:[],n=t.leave?[...t.leave]:[];return{enter:e,leave:n}}return{}}function Fs(t){return!!(t.enter?.length||t.leave?.length)}function Rs(t){return Fs(t)?{enter:t.enter??[],leave:t.leave??[]}:void 0}function Ns(t,e,n,s,{reducedMotion:i,targetController:r,selectorCondition:o,animation:c}){const a=Ls(s.eventConfig),u=n.transition||n.transitionProperties,f=Rs(a);let l,d=!1;if(u?l=ks(e,r,n,o,f):(l=_s(e,n,i,o,f,c),d=n.triggerType==="once"),!l)return;const g=l,h=new AbortController;function m(y,E,w){const S=Ms(E,t,g);y.addEventListener(E,S,{...w,signal:h.signal})}const v={source:t,target:e,cleanup:()=>{h.abort()}};if(A(be,t,v),A(be,e,v),f){const y=a.enter,E=a.leave;y.forEach(T=>{T==="focusin"&&(t.tabIndex=0),m(t,T,{passive:!0,once:d})});const w=!n.stateAction||n.stateAction==="toggle";(u?w:n.triggerType!=="once")&&E.forEach(T=>{if(T==="focusout"){m(t,T,{once:d});return}m(t,T,{passive:!0})})}else(a.toggle??[]).forEach(E=>{m(t,E,{once:d,passive:E!=="keydown"})})}function zs(t){U(be,t)}const G={add:Ns,remove:zs},Se={click:["click"],activate:["click","keydown"],hover:{enter:["mouseenter"],leave:["mouseleave"]},interest:{enter:["mouseenter","focusin"],leave:["mouseleave","focusout"]}},De={click:Se.activate,hover:Se.interest};function ee(t){const e=Se[t];return(n,s,i,r,o)=>{const c=o?.allowA11yTriggers&&t in De?De[t]:e;G.add(n,s,i,{eventConfig:c},o??{})}}const R={viewEnter:jn,hover:{add:ee("hover"),remove:G.remove},click:{add:ee("click"),remove:G.remove},animationEnd:Cs,viewProgress:os,pointerMove:Is,activate:{add:ee("activate"),remove:G.remove},interest:{add:ee("interest"),remove:G.remove}};function js(t){return t.replace(/\[([-\w]+)]/g,"[]")}class b{static defineInteractElement;dataCache;addedInteractions;mediaQueryListeners;listInteractionsCache;controllers;static forceReducedMotion=!1;static allowA11yTriggers=!0;static instances=[];static controllerCache=new Map;static sequenceCache=new Map;static elementSequenceMap=new WeakMap;static plugins=new Map;constructor(){this.dataCache={effects:{},sequences:{},conditions:{},interactions:{}},this.addedInteractions={},this.mediaQueryListeners=new Map,this.listInteractionsCache={},this.controllers=new Set}init(e,n){if(typeof window>"u"||!window.customElements)return;const s=n?.useCustomElement??!!b.defineInteractElement;this.dataCache=Gs(e,s);const i=b.defineInteractElement?.();s&&i===!1?document.querySelectorAll("interact-element").forEach(r=>{r.connect()}):b.controllerCache.forEach((r,o)=>r.connect(o))}destroy(){for(const e of this.controllers)e.disconnect();for(const[,e]of this.mediaQueryListeners.entries())e.mql.removeEventListener("change",e.handler);this.mediaQueryListeners.clear(),this.addedInteractions={},this.listInteractionsCache={},this.controllers.clear(),this.dataCache={effects:{},sequences:{},conditions:{},interactions:{}},b.instances.splice(b.instances.indexOf(this),1)}setController(e,n){this.controllers.add(n),b.setController(e,n)}deleteController(e,n=!1){const s=b.controllerCache.get(e);this.clearInteractionStateForKey(e),this.clearMediaQueryListenersForKey(e),s&&n&&(this.controllers.delete(s),b.deleteController(e))}has(e){return!!this.get(e)}get(e){const n=js(e);return this.dataCache.interactions[n]}clearMediaQueryListenersForKey(e){for(const[n,s]of this.mediaQueryListeners.entries())s.key===e&&(s.mql.removeEventListener("change",s.handler),this.mediaQueryListeners.delete(n))}clearInteractionStateForKey(e){(this.get(e)?.interactionIds||[]).forEach(i=>{const r=k(i,e);delete this.addedInteractions[r]});const s=`${e}::seq::`;for(const i of b.sequenceCache.keys())i.startsWith(s)&&(b.sequenceCache.delete(i),delete this.addedInteractions[i])}setupMediaQueryListener(e,n,s,i){this.mediaQueryListeners.has(e)||(n.addEventListener("change",i),this.mediaQueryListeners.set(e,{mql:n,handler:i,key:s}))}static create(e,n){const s=new b;return b.instances.push(s),s.init(e,n),s}static destroy(){b.controllerCache.forEach(e=>{e.disconnect()}),b.instances.length=0,b.controllerCache.clear(),b.sequenceCache.clear(),b.elementSequenceMap=new WeakMap}static setup(e){e.scrollOptionsGetter&&R.viewProgress.registerOptionsGetter?.(e.scrollOptionsGetter),e.pointerOptionsGetter&&R.pointerMove.registerOptionsGetter?.(e.pointerOptionsGetter),e.viewEnter&&R.viewEnter.setOptions(e.viewEnter),e.allowA11yTriggers!==void 0&&(b.allowA11yTriggers=e.allowA11yTriggers)}static getInstance(e){const n=b.instances.find(s=>s.has(e));return n||console.warn(`Interact: Instance for key "${e}" not found`),n}static getController(e){const n=e?b.controllerCache.get(e):void 0;return n||console.warn(`Interact: Controller for key "${e}" not found`),n}static setController(e,n){b.controllerCache.set(e,n)}static deleteController(e){b.controllerCache.delete(e)}static registerEffects=hn;static use(e,n){b.plugins.set(e,n)}static getPlugin(e){return b.plugins.get(e)}static getPluginsNames(){return new Set(b.plugins.keys())}static getSequence(e,n,s,i){const r=b.sequenceCache.get(e);if(r)return r;const o=In(n,s,i);return b.sequenceCache.set(e,o),b._registerSequenceElements(s,o),o}static addToSequence(e,n,s,i){const r=b.sequenceCache.get(e);if(!r)return!1;const c=et(n,i).map((a,u)=>({index:s[u]??r.animationGroups.length,group:a}));return r.addGroups(c),b._registerSequenceElements(n,r),!0}static _registerSequenceElements(e,n){for(const{target:s}of e){const i=Array.isArray(s)?s:s instanceof HTMLElement?[s]:[];for(const r of i){let o=b.elementSequenceMap.get(r);o||(o=new Set,b.elementSequenceMap.set(r,o)),o.add(n)}}}static removeFromSequences(e){for(const n of e){const s=b.elementSequenceMap.get(n);if(s){for(const i of s)i.removeGroups(r=>r.animations.some(o=>o.effect?.target===n));b.elementSequenceMap.delete(n)}}}}let Ds=0;function x(t,{asCombinator:e=!1,addItemFilter:n=!1,useFirstChild:s=!1}={}){if(t.listContainer){const i=`${n&&t.listItemSelector?` > ${t.listItemSelector}`:""}`;return t.selector?`${t.listContainer}${i} ${t.selector}`:`${t.listContainer}${i||" > *"}`}else if(t.selector)return t.selector;return s?e?"> :first-child":":scope > :first-child":""}function Ge(t){return"sequenceId"in t&&!("effects"in t)}function pe(t,e){return t[e]||(t[e]={triggers:[],effects:{},sequences:{},interactionIds:new Set,selectors:new Set}),t[e]}function Gs(t,e=!1){const{effects:n={},sequences:s={},conditions:i={}}=t,r={};return t.interactions?.forEach(o=>{const c=o.key,a=++Ds,{effects:u,sequences:f,...l}=o;if(!c){console.error(`Interaction ${a} is missing a key for source element.`);return}pe(r,c);const d=u?Array.from(u):[];d.reverse();const g=f?.map(p=>{if(Ge(p)){const y=s[p.sequenceId];return y?{...y,...p}:(console.warn(`Interact: Sequence "${p.sequenceId}" not found in config`),p)}const v=p;return v.sequenceId||(v.sequenceId=_()),v}),h={...l,effects:d.length>0?d:void 0,sequences:g};r[c].triggers.push(h),r[c].selectors.add(x(h,{useFirstChild:e}));const m=h.listContainer;d.forEach(p=>{let v=p.key;if(!v&&p.effectId){const S=n[p.effectId];S&&(v=S.key)}p.effectId||(p.effectId=_()),v=v||c,p.key=v;const y=p.effectId;if(m&&p.listContainer&&(v!==c||p.listContainer!==m))return;const E=`${c}::${v}::${y}::${a}`;if(p.interactionId=E,r[c].interactionIds.add(E),v===c)return;const w=pe(r,v);w.effects[E]||(w.effects[E]=[],w.interactionIds.add(E)),w.effects[E].push({...l,effect:p}),w.selectors.add(x(p,{useFirstChild:e}))}),g?.forEach(p=>{if(!p||Ge(p))return;const v=p,y=v.sequenceId||_(),E=v.effects;for(const w of E){w.effectId||(w.effectId=_());let S=w.key;if(!S&&w.effectId){const I=n[w.effectId];I&&(S=I.key)}S=S||c;const T=x(w,{useFirstChild:e});if(T&&r[c].selectors.add(T),S!==c){const I=pe(r,S),C=`${S}::seq::${y}::${a}`;I.sequences[C]||(I.sequences[C]=[],I.interactionIds.add(C)),I.sequences[C].push({...l,sequence:v}),I.selectors.add(T)}}})}),{effects:n,sequences:s,conditions:i,interactions:r}}const ft="$";function de(t,e,n,s,i){const r=b.getPluginsNames();for(const o of r){const c=`${ft}${o}`;if(!(c in n))continue;const a=n[c];if(a!==null&&typeof a=="object"){if(t._appliedPlugins.has(a))continue;t._appliedPlugins.add(a)}const f=b.getPlugin(o)(a,{root:e,key:s,scope:i,config:n});typeof f=="function"&&t._pluginCleanups.push(f)}}function ue(t,e,n){if(t.listContainer){const s=e.querySelector(t.listContainer);return s?t.selector?Array.from(s.querySelectorAll(t.selector)):Array.from(s.children):(console.warn(`Interact: No container found for list container "${t.listContainer}"`),[])}if(t.selector){const s=e.querySelectorAll(t.selector);if(s.length>0)return Array.from(s);console.warn(`Interact: No elements found for selector "${t.selector}"`)}return n?e.firstElementChild:e}function le(t,e){return e.map(n=>t.selector?n.querySelector(t.selector):n).filter(Boolean)}function ut(t,e,n,s,i,r,o,c){return[o?le(t,o):ue(t,n,s),c?le(e,c):ue(e,i,r)]}function lt(t,e,n,s,i,r,o,c){const a=Array.isArray(s),u=Array.isArray(i);a?s.forEach((f,l)=>{const d=u?i[l]:i;d&&He(t,f,e.trigger,d,n,e.params,r,o,c)}):(u?i:[i]).forEach(l=>{He(t,s,e.trigger,l,n,e.params,r,o,c)})}function dt(t,e,n,s,i){const r={},o=[];(s.effects||[]).forEach(c=>{const a=c.effectId,u={...n.dataCache.effects[a]||{},...c,effectId:a},f=u.key,l=k(c.interactionId,t);if(r[l]||n.addedInteractions[l]&&!i)return;const d=$(u.conditions||[],n.dataCache.conditions);if(d&&n.setupMediaQueryListener(l,d,t,()=>{e.update()}),!d||d.matches){r[l]=!0;const g=f&&k(f,t);let h;if(g){if(h=b.getController(g),!h)return;u.listContainer&&h.watchChildList(u.listContainer)}else h=e;de(h,h.element,u,g||s.key,"effect");const[m,p]=ut(s,u,e.element,e.useFirstChild,h.element,h.useFirstChild,i);if(!m||!p)return;n.addedInteractions[l]=!0;const v=g||s.key,y=P(u.conditions||[],n.dataCache.conditions);o.push([v,s,u,m,p,y,h.useFirstChild,t])}}),o.reverse().forEach(c=>{lt(...c)}),Ws(t,e,n,s,i)}function Hs(t){return"sequenceId"in t&&!("effects"in t)}function ht(t,e,n,s,i,r,o){const c=$(t.conditions||[],i.dataCache.conditions);if(c&&i.setupMediaQueryListener(e,c,r.updateKey,r.onUpdate),c&&!c.matches)return null;const a=t.effects||[],u=[];let f=!1;for(const l of a){const d=l.effectId,h={...d?i.dataCache.effects[d]||{}:{},...l},m=$(h.conditions||[],i.dataCache.conditions);if(m){const T=`${e}::${d||"eff"}`;i.setupMediaQueryListener(T,m,r.updateKey,r.onUpdate)}if(m&&!m.matches)continue;const p=h.key,v=p&&k(p,n);let y;if(v){if(y=b.getController(v),!y)return null}else y=s;const E=v||n;de(y,y.element,h,E,"effect");let w;if(o&&E===o.controllerKey&&h.listContainer===o.listContainer?(w=le(h,o.elements),w.length>0&&(f=!0)):w=ue(h,y.element,y.useFirstChild),!w||Array.isArray(w)&&w.length===0)return null;const S=q(h);u.push({target:w,options:S})}return o&&!f?null:u.length>0?u:null}function Te(t,e,n){const s=n?le(t,n):ue(t,e.element,e.useFirstChild);return Array.isArray(s)&&s.length===0?null:s}function Ie(t,e,n,s,i){(Array.isArray(n)?n:[n]).forEach(o=>{R[t.trigger]?.add(o,o,{triggerType:e.triggerType},t.params||{},{reducedMotion:b.forceReducedMotion,selectorCondition:i,animation:s,allowA11yTriggers:b.allowA11yTriggers})})}function mt(t,e,n){const r=(t.useFirstChild?t.element.firstElementChild:t.element)?.querySelector(e);if(!r)return n.map((c,a)=>a);const o=Array.from(r.children);return n.map(c=>{const a=o.indexOf(c);return a>=0?a:o.length})}function Ws(t,e,n,s,i){s.sequences?.forEach(r=>{let o;if(Hs(r)){const h=n.dataCache.sequences[r.sequenceId];if(!h){console.warn(`Interact: Sequence "${r.sequenceId}" not found in cache`);return}o={...h,...r}}else o=r;const c=o.sequenceId||_(),a=k(`${t}::seq::${c}`,t);if(n.addedInteractions[a]&&!i)return;const u=i&&s.listContainer?{controllerKey:t,listContainer:s.listContainer,elements:i}:void 0,f=ht(o,a,t,e,n,{updateKey:t,onUpdate:()=>e.update()},u);if(!f)return;if(i&&n.addedInteractions[a]){const h=mt(e,s.listContainer,i);b.addToSequence(a,f,h,{reducedMotion:b.forceReducedMotion});const m=b.getSequence(a,o,f,{reducedMotion:b.forceReducedMotion}),p=P(s.conditions||[],n.dataCache.conditions),v=Te(s,e,i);v&&Ie(s,o,v,m,p);return}const l=b.getSequence(a,o,f,{reducedMotion:b.forceReducedMotion}),d=P(s.conditions||[],n.dataCache.conditions),g=Te(s,e,i);g&&(n.addedInteractions[a]=!0,Ie(s,o,g,l,d))})}function Vs(t,e,n,s,i){const r=n.get(t)?.sequences||{};Object.keys(r).forEach(c=>{r[c].some(({sequence:u,...f})=>{const l=$(f.conditions||[],n.dataCache.conditions);if(l&&!l.matches)return!1;const d=f.key&&k(f.key,t),g=b.getController(d);if(!g)return!0;const h=u.sequenceId||_(),m=k(`${d}::seq::${h}`,d);if(n.addedInteractions[m]&&!i)return!0;const v=ht(u,m,d,g,n,{updateKey:t,onUpdate:()=>e.update()},i&&s?{controllerKey:t,listContainer:s,elements:i}:void 0);if(!v)return!0;if(i&&n.addedInteractions[m]){const S=mt(e,s,i);return b.addToSequence(m,v,S,{reducedMotion:b.forceReducedMotion}),!0}const y=b.getSequence(m,u,v,{reducedMotion:b.forceReducedMotion}),E=P(f.conditions||[],n.dataCache.conditions),w=Te(f,g);return w&&(n.addedInteractions[m]=!0,Ie(f,u,w,y,E)),!0})})}function pt(t,e,n,s,i){const r=n.get(t),o=r?.effects||{},c=Object.keys(o),a=[];c.forEach(f=>{const l=k(f,t);if(n.addedInteractions[l]&&!i)return;o[f].some(({effect:g,...h})=>{const m=$(h.conditions||[],n.dataCache.conditions);if(m&&!m.matches)return!1;const p=g.effectId,v={...n.dataCache.effects[p]||{},...g,effectId:p};if(s&&v.listContainer!==s)return!1;const y=$(v.conditions||[],n.dataCache.conditions);if(y&&n.setupMediaQueryListener(l,y,t,()=>{e.update()}),!y||y.matches){const E=h.key&&k(h.key,t),w=b.getController(E);if(!w)return!0;de(e,e.element,v,t,"effect"),v.listContainer&&e.watchChildList(v.listContainer);const[S,T]=ut(h,v,w.element,w.useFirstChild,e.element,e.useFirstChild,void 0,i);if(!S||!T)return!0;n.addedInteractions[l]=!0;const I=P(v.conditions||[],n.dataCache.conditions);return a.push([t,h,v,S,T,I,e.useFirstChild,E||void 0]),!0}return!1})}),a.reverse().forEach(f=>{lt(...f)}),Vs(t,e,n,s,i);const u=Object.keys(r?.sequences||{}).length>0;return c.length>0||u}function He(t,e,n,s,i,r,o,c,a){let u;if(i.transition||i.transitionProperties){const l={key:t,effectId:i.effectId,transition:i.transition,transitionProperties:i.transitionProperties,childSelector:x(i,{asCombinator:!0,addItemFilter:!0,useFirstChild:c}),selectorCondition:o};if(u=b.getController(t),!u)return;u.renderStyle($n(l))}let f;if(n==="animationEnd"){const l=r.effectId,g=(a?b.getInstance(a):void 0)?.dataCache.effects[l];g&&(f=q(g))}R[n]?.add(e,s,i,r,{reducedMotion:b.forceReducedMotion,targetController:u,selectorCondition:o,allowA11yTriggers:b.allowA11yTriggers,sourceAnimationOptions:f})}function Ys(t){const e=t.key,n=b.getInstance(e);if(!n)return console.warn(`No instance found for key: ${e}`),b.setController(e,t),!1;const{triggers:s=[]}=n?.get(e)||{},i=s.length>0;n.setController(e,t),s.forEach((o,c)=>{const a=$(o.conditions,n.dataCache.conditions);if(a){const u=`${e}::trigger::${c}`;n.setupMediaQueryListener(u,a,e,()=>{t.update()})}(!a||a.matches)&&(de(t,t.element,o,e,"interaction"),o.listContainer&&t.watchChildList(o.listContainer),dt(e,t,n,o))});let r=!1;return n&&(r=pt(e,t,n)),i||r}function Ks(t,e,n){const s=t.key,i=b.getInstance(s);if(i){const{triggers:r=[]}=i?.get(s)||{};r.forEach((o,c)=>{if(o.listContainer!==e)return;const a=$(o.conditions,i.dataCache.conditions);if(a){const u=`${s}::listTrigger::${e}::${c}`;i.setupMediaQueryListener(u,a,s,()=>{t.update()})}(!a||a.matches)&&dt(s,t,i,o,n)}),pt(s,t,i,e,n)}}function Bs(t,e=!1){const n=t.key,s=b.getInstance(n);if(!s)return;const i=[...s.get(n)?.selectors.values()||[]].filter(Boolean).join(",");let r;i?(r=[...t.element.querySelectorAll(i)],t.useFirstChild||r.push(t.element)):r=[t.element],gt(r),s.deleteController(n,e)}function gt(t){const e=Object.values(R);for(const n of t)for(const s of e)s.remove(n);b.removeFromSequences(t)}const ge="interactEffect";class vt{element;key;connected;sheet;useFirstChild;_observers;_pluginCleanups;_appliedPlugins;constructor(e,n,s){this.element=e,this.key=n,this.connected=!1,this.sheet=null,this._observers=new WeakMap,this._pluginCleanups=[],this._appliedPlugins=new WeakSet,this.useFirstChild=s?.useFirstChild??!1}connect(e){if(this.connected)return;const n=this.element.dataset.interactKey;if(e=e||this.key||n,!e){console.warn("Interact: No key provided");return}n!==e&&(n&&console.warn(`Interact: Key mismatch between element ${n} and parameter ${e}, updating element key`),this.element.dataset.interactKey=e),this.key=e,this.connected=Ys(this)}disconnect({removeFromCache:e=!1}={}){if((this.key||this.element.dataset.interactKey)&&Bs(this,e),this._pluginCleanups.length){for(const s of this._pluginCleanups)try{s()}catch(i){console.error(i)}this._pluginCleanups.length=0}if(this._appliedPlugins=new WeakSet,this.sheet){const s=this.element?.getRootNode(),i=s.host?s:document;i.adoptedStyleSheets.indexOf(this.sheet)!==-1&&(i.adoptedStyleSheets=i.adoptedStyleSheets.filter(o=>o!==this.sheet))}this._observers=new WeakMap,this.sheet=null,this.connected=!1}update(){this.disconnect(),this.connect()}renderStyle(e){const n=this.element?.getRootNode(),s=n.host?n:document;if(!this.sheet)this.sheet=new CSSStyleSheet,this.sheet.replaceSync(e.join(`
8
+ `)),s.adoptedStyleSheets=[...s.adoptedStyleSheets||[],this.sheet];else{let i=this.sheet.cssRules.length;for(const r of e)try{this.sheet.insertRule(r,i),i++}catch(o){console.error(o)}}}toggleEffect(e,n,s,i){if(s===null)return;if(!i&&this.element.toggleEffect){this.element.toggleEffect(e,n,s);return}const r=new Set(this.element.dataset[ge]?.split(" ")||[]);n==="toggle"?r.has(e)?r.delete(e):r.add(e):n==="add"?r.add(e):n==="remove"?r.delete(e):n==="clear"&&r.clear(),(s||this.element).dataset[ge]=Array.from(r).join(" ")}getActiveEffects(){const n=(this.element.dataset[ge]||"").trim();return n?n.split(/\s+/):[]}watchChildList(e){const n=this.element.querySelector(e);if(n){let s=this._observers.get(n);s||(s=new MutationObserver(this._childListChangeHandler.bind(this,e)),this._observers.set(n,s),s.observe(n,{childList:!0}))}}_childListChangeHandler(e,n){const s=this.key||this.element.dataset.interactKey,i=[],r=[];n.forEach(o=>{o.removedNodes.forEach(c=>{c instanceof HTMLElement&&i.push(c)}),o.addedNodes.forEach(c=>{c instanceof HTMLElement&&r.push(c)})}),gt(i),s&&Ks(this,e,r)}}function Us(t,e){new vt(t,e).connect()}function Qs(t){const e=b.getController(t);e&&e.disconnect({removeFromCache:!0})}const yt=new Map([["viewEnter","once"],["animationEnd","once"],["hover","alternate"],["click","alternate"],["activate","alternate"],["interest","alternate"]]);function Et(t,e,n){const{effects:s={},conditions:i={}}=n,{key:r,trigger:o}=e,c=o==="pointerMove";t.effectId||(t.effectId=_());const{effectId:a}=t,u={...s[a]||{},...t};let{key:f,conditions:l,triggerType:d}=u;if(!f){if(!r)return null;f=r}if(An(f))return null;l=[...new Set((l||[]).filter(w=>i[w]))],d||(d=yt.get(o));const{namedEffect:g,customEffect:h,keyframeEffect:m,transition:p,transitionProperties:v,...y}={...u,key:f,conditions:l,effectId:a,triggerType:d},E=Ct(e,y);if(g)return c||!g.type?null:{namedEffect:g,initial:E,...y};if(m){if(!m.name){const w=a&&!(s[a]&&"keyframeEffect"in t);m.name=w?a:_()}return{keyframeEffect:m,initial:E,...y}}else return h?c?null:{initial:E,...y}:p?{transition:p,initial:E,...y}:v?{transitionProperties:v,initial:E,...y}:{initial:E,...y}}function Xs(t,e,n){const{sequences:s={},conditions:i={}}=n;t.sequenceId||(t.sequenceId=_());const{sequenceId:r}=t,o={...s[r]||{},...t};let{effects:c,conditions:a,triggerType:u,delay:f=0,offset:l=0,offsetEasing:d="linear"}=o;u||(u=yt.get(e.trigger)),a=[...new Set((a||[]).filter(m=>i[m]))];const g=c.map(m=>(m.conditions?m.conditions.push(...a):m.conditions=[...a],Et({...m,triggerType:u},e,n)));typeof d!="function"&&(d=Ae(d)||(m=>m)),kn(g,f,l,d);const h=g.filter(m=>m!==null);return h.length?{sequenceId:r,triggerType:u,conditions:a,delay:f,offset:l,offsetEasing:d,effects:h}:null}function Zs(t){return t==="cssFloat"?"float":t==="easing"?"animation-timing-function":t==="cssOffset"?"offset":t==="composite"?"animation-composition":ce(t)}function Js(t){if(!t.length)return[];const e=t.map(i=>({...i}));e[0].offset===void 0&&(e[0].offset=0),e.length===1?t[0].offset===void 0&&(e[0].offset=1):e[e.length-1].offset===void 0&&(e[e.length-1].offset=1);let n=0,s=e[0].offset;for(let i=1;i<e.length;i++)if(e[i].offset!==void 0){const r=e[i].offset;if(r<s)return console.error("Offsets must be monotonically non-decreasing"),[];if(r>1)return console.error("Offsets must be in the range [0,1]"),[];const o=i-n;for(let c=n+1;c<i;c++){const a=(c-n)/o;e[c].offset=s+(r-s)*a}n=i,s=r}return e}function ei(t,e){const n=Object.entries(t).filter(([s,i])=>s!=="offset"&&i!==void 0&&i!==null).map(([s,i])=>`${Zs(s)}: ${i};`).join(`
9
+ `);return`${e}% {
10
+ ${n}
11
+ }`}function ti(t,e){const n=Js(e);if(!n.length)return"";let s=n.map(i=>{const r=i.offset,o=On(r*100);return ei(i,o)}).join(`
12
+ `);return`@keyframes ${t} {
13
+ ${s}
14
+ }`}function ni(t){const{key:e,childSelector:n,declarations:s,media:i,states:r,selectorCondition:o,selectorSuffix:c}=t;if(!s.length)return"";let a=`[data-interact-key="${e}"]`;if(r&&r.length){const l=r.map(d=>`:state(${d}), :--${d}, [data-interact-effect~="${d}"]`).join(", ");a=`${a}:is(${l})`}n&&(a=`${a} ${n}`),c&&(a=`${a}${c}`),o&&(a=se(a,o));const u=s.map(({name:l,value:d,important:g})=>`${l}: ${d}${g?" !important":""};`).join(`
15
+ `),f=`${a} {
16
+ ${u}
17
+ }`;return i?`@media ${i} {
18
+ ${f}
19
+ }`:f}function wt(t,e,n,s){const{key:i,childSelector:r,properties:o}=t,c=Object.entries(o).filter(u=>u[1]&&u[1].varNames.length).map(([u,{fallback:f,varNames:l}])=>({name:u,value:l.map(d=>`var(${d}, ${f})`).join(", ")})),a={key:i,childSelector:r,declarations:c};return e&&a.declarations.forEach(u=>{u.name=e[u.name]}),n&&(a.media=B(n,s||{},"media"),a.selectorCondition=P(n,s||{})),a}const si=[{name:"visibility",value:"hidden"},{name:"transform",value:"none",important:!0},{name:"translate",value:"none",important:!0},{name:"scale",value:"none",important:!0},{name:"rotate",value:"none",important:!0}],re=["animation","animation-composition","animation-timeline","animation-range"],Oe=["transition",...re],ii={animation:"animation","animation-composition":"composition","animation-timeline":"animationTimeline","animation-range":"animationRange"},oe={animation:"none","animation-composition":"replace",transition:"_","animation-timeline":"auto","animation-range":"normal"};function bt(t,e,n){const s=t.get(e);s?n.forEach(i=>s.add(i)):t.set(e,new Set(n))}function St(t,e,n,s){const{key:i,childSelector:r}=n,o=s?Oe.filter(a=>s.has(a)):Oe;t.has(e)||t.set(e,{key:i,childSelector:r,properties:{}});const{properties:c}=t.get(e);for(const a of o)c[a]||(c[a]={fallback:oe[a],varNames:[]}),c[a].varNames.push(n[a])}function Tt(t,e){return Oe.reduce((n,s)=>(n[s]=Cn([s,...t,e]),n),{})}function ri(t,e,n,s,i){return s.has(t)||s.set(t,{key:e,childSelector:i,...Tt([n],We(t))}),s.get(t)}function oi(t,e,n){return Tt([e,n],We(t))}function ci(t,e,n,s=!0){const{key:i,conditions:r}=t,o=B(r,e,"media"),c=P(r,e),a=x(t,{asCombinator:!0,useFirstChild:s,addItemFilter:!0});return{key:i,media:o,selectorCondition:c,childSelector:a,declarations:[{name:"view-timeline",value:`--${n}`}]}}function It(t,e,n,s,i){const r=[];for(const o of Object.keys(i)){const c=`${ft}${o}`;c in e&&r.push(...i[o](e[c],{key:n,scope:t,config:e}).map(a=>({...a,key:n,media:s})))}return r}function ai(t,e,n,s,i,r){const{key:o,effectId:c,conditions:a,namedEffect:u,keyframeEffect:f,transition:l,transitionProperties:d,initial:g}=t,h=B(a,e,"media"),m=P(a,e),p=[{key:o,media:h,selectorCondition:m,childSelector:i,declarations:[]}];let v=[];const{declarations:y}=p[0];let E=[];if(r&&p.push(...It("effect",t,o,h,r)),u||f){E=[...re];const w=q(t),S=wn(null,w,s).filter(I=>I.name);v=S.map(I=>({name:I.name,keyframes:I.keyframes})),y.push(...S.flatMap(({custom:I})=>Object.entries(I||{}).filter(([C,z])=>z!==void 0).map(([C,z])=>({name:C,value:z}))));const T=re.map(I=>({name:n[I],value:S.map(C=>{const z=ii[I];return C[z]}).join(", ")||oe[I]}));g?(p.push({key:o,media:h,selectorCondition:m,childSelector:i,declarations:si,selectorSuffix:":not([data-interact-enter])"}),p.push({key:o,media:h,selectorCondition:m,childSelector:i,declarations:T,selectorSuffix:':not([data-interact-enter="done"])'})):y.push(...T)}else if(l||d){E=["transition"];const w=tt(t),S=nt(t);y.push({name:n.transition,value:S.join(", ")||oe.transition}),p.push({key:o,media:h,selectorCondition:m,childSelector:i,states:[c],declarations:w})}else y.push(...re.map(w=>({name:n[w],value:oe[w]})));return{rules:p.filter(w=>w.declarations.length),keyframes:v,usedProperties:E}}function Ot(t,e,n,s,i,r,o=!0,c,a,u){const{key:f}=n,l=u??W(n),d=x(n,{asCombinator:!0,useFirstChild:o,addItemFilter:!0}),h={...ri(l,f,e,s,d)};a&&Object.assign(h,a);const{rules:m,keyframes:p,usedProperties:v}=ai(n,t,h,r,d,c);return p.forEach(({name:y,keyframes:E})=>i.set(y,E)),{rules:m,usedProperties:v}}function fi(t,e,n,s,i,r,o=!0,c,a){const u=new Map,f=new Map,l=[];for(const g of n.effects){const h=W(g),{key:m}=g,p=x(g,{asCombinator:!0,useFirstChild:o,addItemFilter:!0}),v=f.get(h)||0;f.set(h,v+1);const y=oi(h,e,v),{rules:E,usedProperties:w}=Ot(t,e,g,s,i,r,o,a,y,h);l.push(...E);const S=new Set(w);St(u,h,{key:m,childSelector:p,...y},S),c&&bt(c,h,w)}const{conditions:d}=n;return u.forEach((g,h)=>{const m=s.get(h);l.push(wt(g,m,d,t))}),l}function ui(t,e,n,s,i,r=!0,o){const{key:c,conditions:a,effects:u=[],sequences:f=[]}=e,l=t.conditions||{},d=new Map,g=new Map,h=u.map(E=>Et(E,e,t)).filter(E=>E!==null),m=o?It("interaction",e,c,B(a,l,"media"),o):[],{trigger:p}=e,v={trigger:_n(p),id:["trigger",n].join("-")};p==="viewProgress"&&m.push(ci(e,l,v.id,r));for(const E of h){const w=W(E),{rules:S,usedProperties:T}=Ot(l,n,E,d,i,v,r,o);m.push(...S),bt(g,w,T)}const y=f.map(E=>Xs(E,e,t)).filter(E=>E!==null);return m.push(...y.flatMap(E=>fi(l,n,E,d,i,v,r,g,o))),d.forEach((E,w)=>{St(s,w,E,g.get(w))}),m}function li(t={}){const{useFirstChild:e=!0,plugins:n}=typeof t=="boolean"?{useFirstChild:t,plugins:void 0}:t;return{useFirstChild:e,plugins:n}}function di(t,e){const{useFirstChild:n,plugins:s}=li(e),i=new Map,r=new Map,o=t.interactions.flatMap((c,a)=>ui(t,c,a,i,r,n,s));return i.forEach(c=>{o.push(wt(c))}),{keyframes:r,cssRules:o}}function hi(t,e){const{cssRules:n,keyframes:s}=di(t,e);return[...[...s.entries()].map(([r,o])=>ti(r,o)),...n.map(ni)].join(`
20
+ `)}exports.I=vt;exports.a=b;exports.b=Us;exports.g=hi;exports.r=Qs;
21
+ //# sourceMappingURL=index-CxaQDD-U.js.map