@wix/interact 2.5.17 → 2.5.18

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