@wix/interact 2.4.0 → 2.5.1

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 (47) hide show
  1. package/README.md +3 -0
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/react.js +6 -6
  4. package/dist/cjs/react.js.map +1 -1
  5. package/dist/cjs/web.js +1 -1
  6. package/dist/es/index.js +1 -1
  7. package/dist/es/react.js +117 -126
  8. package/dist/es/react.js.map +1 -1
  9. package/dist/es/web.js +2 -2
  10. package/dist/{index-C6u4q815.mjs → index-C2yYG3we.mjs} +232 -219
  11. package/dist/index-C2yYG3we.mjs.map +1 -0
  12. package/dist/{index-Qg46rn0Y.js → index-D84f3ylM.js} +8 -8
  13. package/dist/index-D84f3ylM.js.map +1 -0
  14. package/dist/tsconfig.build.tsbuildinfo +1 -1
  15. package/dist/types/core/css.d.ts.map +1 -1
  16. package/dist/types/core/cssUtils.d.ts.map +1 -1
  17. package/dist/types/core/resolvers.d.ts.map +1 -1
  18. package/dist/types/handlers/index.d.ts.map +1 -1
  19. package/dist/types/react/Interaction.d.ts +0 -1
  20. package/dist/types/react/Interaction.d.ts.map +1 -1
  21. package/dist/types/types/config.d.ts +1 -1
  22. package/dist/types/types/config.d.ts.map +1 -1
  23. package/dist/types/types/css.d.ts +1 -1
  24. package/dist/types/types/css.d.ts.map +1 -1
  25. package/dist/types/types/external.d.ts +1 -1
  26. package/dist/types/types/external.d.ts.map +1 -1
  27. package/dist/types/types/handlers.d.ts +0 -1
  28. package/dist/types/types/handlers.d.ts.map +1 -1
  29. package/dist/types/types/triggers.d.ts +1 -1
  30. package/dist/types/types/triggers.d.ts.map +1 -1
  31. package/docs/README.md +1 -0
  32. package/docs/api/README.md +7 -0
  33. package/docs/api/functions.md +3 -8
  34. package/docs/api/types.md +2 -3
  35. package/docs/examples/entrance-animations.md +3 -3
  36. package/docs/guides/README.md +1 -1
  37. package/docs/guides/configuration-structure.md +1 -1
  38. package/docs/guides/state-management.md +0 -41
  39. package/docs/integration/react.md +7 -8
  40. package/package.json +1 -1
  41. package/rules/full-lean.md +7 -36
  42. package/rules/integration.md +4 -31
  43. package/rules/validate.md +271 -0
  44. package/rules/viewenter.md +6 -35
  45. package/rules/viewprogress.md +1 -1
  46. package/dist/index-C6u4q815.mjs.map +0 -1
  47. package/dist/index-Qg46rn0Y.js.map +0 -1
@@ -1,22 +1,22 @@
1
- function vt(t) {
1
+ function gt(t) {
2
2
  return [...t.matchAll(/\[([-\w]+)]/g)].map(([e, n]) => n);
3
3
  }
4
4
  function $(t, e) {
5
- const n = vt(e);
5
+ const n = gt(e);
6
6
  let s = 0;
7
7
  return n.length ? t.replace(/\[]/g, () => {
8
8
  const i = n[s++];
9
9
  return i !== void 0 ? `[${i}]` : "[]";
10
10
  }) : t;
11
11
  }
12
- function yt(t, e) {
12
+ function vt(t, e) {
13
13
  return t.trigger === "viewEnter" && e.triggerType === "once" && G(t) === G(e);
14
14
  }
15
15
  function G(t) {
16
16
  const { key: e, listContainer: n, listItemSelector: s, selector: i } = t;
17
17
  return `${e}\0${n || ""}\0${s || ""}\0${i || ""}`;
18
18
  }
19
- function He(t) {
19
+ function ze(t) {
20
20
  let e = 0, n = 0;
21
21
  for (let s = 0; s < t.length; s++) {
22
22
  const i = t.charCodeAt(s);
@@ -128,32 +128,32 @@ class V {
128
128
  });
129
129
  }
130
130
  }
131
- const je = (t) => t, Et = (t) => 1 - Math.cos(t * Math.PI / 2), wt = (t) => Math.sin(t * Math.PI / 2), bt = (t) => -(Math.cos(Math.PI * t) - 1) / 2, St = (t) => t ** 2, Tt = (t) => 1 - (1 - t) ** 2, It = (t) => t < 0.5 ? 2 * t ** 2 : 1 - (-2 * t + 2) ** 2 / 2, Ot = (t) => t ** 3, At = (t) => 1 - (1 - t) ** 3, Ct = (t) => t < 0.5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2, kt = (t) => t ** 4, $t = (t) => 1 - (1 - t) ** 4, _t = (t) => t < 0.5 ? 8 * t ** 4 : 1 - (-2 * t + 2) ** 4 / 2, qt = (t) => t ** 5, Mt = (t) => 1 - (1 - t) ** 5, xt = (t) => t < 0.5 ? 16 * t ** 5 : 1 - (-2 * t + 2) ** 5 / 2, Pt = (t) => t === 0 ? 0 : 2 ** (10 * t - 10), Lt = (t) => t === 1 ? 1 : 1 - 2 ** (-10 * t), Rt = (t) => t === 0 ? 0 : t === 1 ? 1 : t < 0.5 ? 2 ** (20 * t - 10) / 2 : (2 - 2 ** (-20 * t + 10)) / 2, Ft = (t) => 1 - Math.sqrt(1 - t ** 2), Nt = (t) => Math.sqrt(1 - (t - 1) ** 2), zt = (t) => t < 0.5 ? (1 - Math.sqrt(1 - 4 * t ** 2)) / 2 : (Math.sqrt(-(2 * t - 3) * (2 * t - 1)) + 1) / 2, Ht = (t) => 2.70158 * t ** 3 - 1.70158 * t ** 2, jt = (t) => 1 + 2.70158 * (t - 1) ** 3 + 1.70158 * (t - 1) ** 2, Dt = (t, e = 1.70158 * 1.525) => t < 0.5 ? (2 * t) ** 2 * ((e + 1) * 2 * t - e) / 2 : ((2 * t - 2) ** 2 * ((e + 1) * (t * 2 - 2) + e) + 2) / 2, Te = {
132
- linear: je,
133
- sineIn: Et,
134
- sineOut: wt,
135
- sineInOut: bt,
136
- quadIn: St,
137
- quadOut: Tt,
138
- quadInOut: It,
139
- cubicIn: Ot,
140
- cubicOut: At,
141
- cubicInOut: Ct,
142
- quartIn: kt,
143
- quartOut: $t,
144
- quartInOut: _t,
145
- quintIn: qt,
146
- quintOut: Mt,
147
- quintInOut: xt,
148
- expoIn: Pt,
149
- expoOut: Lt,
150
- expoInOut: Rt,
151
- circIn: Ft,
152
- circOut: Nt,
153
- circInOut: zt,
154
- backIn: Ht,
155
- backOut: jt,
156
- backInOut: Dt
131
+ const He = (t) => t, yt = (t) => 1 - Math.cos(t * Math.PI / 2), Et = (t) => Math.sin(t * Math.PI / 2), wt = (t) => -(Math.cos(Math.PI * t) - 1) / 2, bt = (t) => t ** 2, St = (t) => 1 - (1 - t) ** 2, Tt = (t) => t < 0.5 ? 2 * t ** 2 : 1 - (-2 * t + 2) ** 2 / 2, It = (t) => t ** 3, Ot = (t) => 1 - (1 - t) ** 3, At = (t) => t < 0.5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2, Ct = (t) => t ** 4, kt = (t) => 1 - (1 - t) ** 4, $t = (t) => t < 0.5 ? 8 * t ** 4 : 1 - (-2 * t + 2) ** 4 / 2, _t = (t) => t ** 5, qt = (t) => 1 - (1 - t) ** 5, Mt = (t) => t < 0.5 ? 16 * t ** 5 : 1 - (-2 * t + 2) ** 5 / 2, xt = (t) => t === 0 ? 0 : 2 ** (10 * t - 10), Pt = (t) => t === 1 ? 1 : 1 - 2 ** (-10 * t), Lt = (t) => t === 0 ? 0 : t === 1 ? 1 : t < 0.5 ? 2 ** (20 * t - 10) / 2 : (2 - 2 ** (-20 * t + 10)) / 2, Rt = (t) => 1 - Math.sqrt(1 - t ** 2), Ft = (t) => Math.sqrt(1 - (t - 1) ** 2), Nt = (t) => t < 0.5 ? (1 - Math.sqrt(1 - 4 * t ** 2)) / 2 : (Math.sqrt(-(2 * t - 3) * (2 * t - 1)) + 1) / 2, zt = (t) => 2.70158 * t ** 3 - 1.70158 * t ** 2, Ht = (t) => 1 + 2.70158 * (t - 1) ** 3 + 1.70158 * (t - 1) ** 2, jt = (t, e = 1.70158 * 1.525) => t < 0.5 ? (2 * t) ** 2 * ((e + 1) * 2 * t - e) / 2 : ((2 * t - 2) ** 2 * ((e + 1) * (t * 2 - 2) + e) + 2) / 2, Te = {
132
+ linear: He,
133
+ sineIn: yt,
134
+ sineOut: Et,
135
+ sineInOut: wt,
136
+ quadIn: bt,
137
+ quadOut: St,
138
+ quadInOut: Tt,
139
+ cubicIn: It,
140
+ cubicOut: Ot,
141
+ cubicInOut: At,
142
+ quartIn: Ct,
143
+ quartOut: kt,
144
+ quartInOut: $t,
145
+ quintIn: _t,
146
+ quintOut: qt,
147
+ quintInOut: Mt,
148
+ expoIn: xt,
149
+ expoOut: Pt,
150
+ expoInOut: Lt,
151
+ circIn: Rt,
152
+ circOut: Ft,
153
+ circInOut: Nt,
154
+ backIn: zt,
155
+ backOut: Ht,
156
+ backInOut: jt
157
157
  }, Ie = {
158
158
  linear: "linear",
159
159
  ease: "ease",
@@ -185,13 +185,13 @@ const je = (t) => t, Et = (t) => 1 - Math.cos(t * Math.PI / 2), wt = (t) => Math
185
185
  backOut: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
186
186
  backInOut: "cubic-bezier(0.68, -0.55, 0.265, 1.55)"
187
187
  };
188
- function Gt(t) {
188
+ function Dt(t) {
189
189
  return t === "percentage" ? "%" : t || "px";
190
190
  }
191
191
  function J(t) {
192
192
  return t ? Ie[t] || t : Ie.linear;
193
193
  }
194
- function Wt(t, e, n, s) {
194
+ function Gt(t, e, n, s) {
195
195
  const i = 3 * t, r = 3 * (n - t) - i, o = 1 - i - r, a = 3 * e, c = 3 * (s - e) - a, l = 1 - a - c, f = (p) => ((o * p + r) * p + i) * p, u = (p) => ((l * p + c) * p + a) * p, d = (p) => (3 * o * p + 2 * r) * p + i;
196
196
  function g(p) {
197
197
  let m = p;
@@ -212,16 +212,16 @@ function Wt(t, e, n, s) {
212
212
  }
213
213
  return (p) => p <= 0 ? 0 : p >= 1 ? 1 : u(g(p));
214
214
  }
215
- function Vt(t) {
215
+ function Wt(t) {
216
216
  const e = t.match(
217
217
  /^cubic-bezier\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*\)$/
218
218
  );
219
219
  if (!e) return;
220
220
  const n = parseFloat(e[1]), s = parseFloat(e[2]), i = parseFloat(e[3]), r = parseFloat(e[4]);
221
221
  if (![n, s, i, r].some(isNaN))
222
- return Wt(n, s, i, r);
222
+ return Gt(n, s, i, r);
223
223
  }
224
- function Yt(t) {
224
+ function Vt(t) {
225
225
  const e = t.match(/^linear\((.+)\)$/);
226
226
  if (!e) return;
227
227
  const n = e[1].split(",").map((o) => o.trim()).filter(Boolean);
@@ -272,9 +272,9 @@ function Yt(t) {
272
272
  function be(t) {
273
273
  if (!t) return;
274
274
  const e = Te[t];
275
- return e || (Vt(t) ?? Yt(t) ?? Te.linear);
275
+ return e || (Wt(t) ?? Vt(t) ?? Te.linear);
276
276
  }
277
- class Bt extends V {
277
+ class Yt extends V {
278
278
  animationGroups;
279
279
  delay;
280
280
  offset;
@@ -282,7 +282,7 @@ class Bt extends V {
282
282
  timingOptions;
283
283
  constructor(e, n = {}) {
284
284
  const s = e.flatMap((i) => [...i.animations]);
285
- super(s), this.animationGroups = e, this.delay = n.delay ?? 0, this.offset = n.offset ?? 0, this.offsetEasing = typeof n.offsetEasing == "function" ? n.offsetEasing : be(n.offsetEasing) ?? je, this.timingOptions = this.animationGroups.map((i) => i.getTimingOptions().map(({ delay: r, duration: o, iterations: a }) => ({
285
+ super(s), this.animationGroups = e, this.delay = n.delay ?? 0, this.offset = n.offset ?? 0, this.offsetEasing = typeof n.offsetEasing == "function" ? n.offsetEasing : be(n.offsetEasing) ?? He, this.timingOptions = this.animationGroups.map((i) => i.getTimingOptions().map(({ delay: r, duration: o, iterations: a }) => ({
286
286
  delay: r,
287
287
  duration: Number.isFinite(o) ? o : 0,
288
288
  iterations: Number.isFinite(a) ? a : 1
@@ -367,7 +367,7 @@ class Bt extends V {
367
367
  }
368
368
  }
369
369
  }
370
- class Kt {
370
+ class Bt {
371
371
  _animation;
372
372
  customEffect;
373
373
  progress;
@@ -507,11 +507,11 @@ class Kt {
507
507
  return this._animation.dispatchEvent(e);
508
508
  }
509
509
  }
510
- function Qt(t) {
510
+ function Kt(t) {
511
511
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
512
512
  }
513
513
  var ee = { exports: {} }, Oe = ee.exports, Ae;
514
- function Ut() {
514
+ function Qt() {
515
515
  return Ae || (Ae = 1, (function(t) {
516
516
  (function(e) {
517
517
  var n = function() {
@@ -641,12 +641,12 @@ function Ut() {
641
641
  })(typeof window < "u" ? window : typeof Oe < "u" ? Oe : globalThis);
642
642
  })(ee)), ee.exports;
643
643
  }
644
- var Xt = Ut();
645
- const O = /* @__PURE__ */ Qt(Xt), de = {};
646
- function Zt(t) {
644
+ var Ut = Qt();
645
+ const O = /* @__PURE__ */ Kt(Ut), de = {};
646
+ function Xt(t) {
647
647
  Object.assign(de, t);
648
648
  }
649
- function Jt(t) {
649
+ function Zt(t) {
650
650
  return t in de ? de[t] : (console.warn(
651
651
  `${t} not found in registry. Please make sure to import and register the preset.`
652
652
  ), null);
@@ -654,35 +654,35 @@ function Jt(t) {
654
654
  function N(t, e) {
655
655
  return t ? (e || document).getElementById(t) : null;
656
656
  }
657
- function en(t, e) {
657
+ function Jt(t, e) {
658
658
  return t?.matches(`[data-motion-part~="${e}"]`) ? t : t?.querySelector(`[data-motion-part~="${e}"]`);
659
659
  }
660
- function tn(t) {
660
+ function en(t) {
661
661
  const e = t.alternate ? "alternate" : "";
662
662
  return t.reversed ? `${e ? `${e}-` : ""}reverse` : e || "normal";
663
663
  }
664
664
  function ce(t) {
665
- return `${t.value}${Gt(t.unit)}`;
665
+ return `${t.value}${Dt(t.unit)}`;
666
666
  }
667
667
  function Ce(t, e, n) {
668
668
  return `${t.name || "cover"} ${n && t.offset.unit !== "percentage" ? `calc(100% + ${ce(t.offset)}${e ? ` + ${e}` : ""})` : e ? `calc(${ce(t.offset)} + ${e})` : ce(t.offset)}`;
669
669
  }
670
- function De(t) {
670
+ function je(t) {
671
671
  return {
672
672
  start: Ce(t.startOffset, t.startOffsetAdd),
673
673
  end: Ce(t.endOffset, t.endOffsetAdd, !0)
674
674
  };
675
675
  }
676
- function Ge(t) {
676
+ function De(t) {
677
677
  return (e) => O.measure(() => e(t));
678
678
  }
679
- function We(t) {
679
+ function Ge(t) {
680
680
  return (e) => O.mutate(() => e(t));
681
681
  }
682
682
  function W(t) {
683
683
  if (t.namedEffect) {
684
684
  const e = t.namedEffect.type;
685
- return typeof e == "string" ? Jt(e) : null;
685
+ return typeof e == "string" ? Zt(e) : null;
686
686
  } else if (t.keyframeEffect) {
687
687
  const e = (s) => {
688
688
  const { name: i, keyframes: r } = s.keyframeEffect;
@@ -696,14 +696,14 @@ function W(t) {
696
696
  return (e) => [{ ...e, keyframes: [] }];
697
697
  return null;
698
698
  }
699
- function Ve(t, e, n, s) {
699
+ function We(t, e, n, s) {
700
700
  return t.map((i, r) => {
701
701
  const o = {
702
702
  fill: i.fill,
703
703
  easing: J(i.easing),
704
704
  iterations: i.iterations === 0 ? 1 / 0 : i.iterations || 1,
705
705
  composite: i.composite,
706
- direction: tn(i)
706
+ direction: en(i)
707
707
  };
708
708
  return Se(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 = 0.01), {
709
709
  effect: i,
@@ -724,11 +724,11 @@ function ke(t, e, n, s, i) {
724
724
  else
725
725
  return [];
726
726
  let r;
727
- return n instanceof HTMLElement && (r = { measure: Ge(n), mutate: We(n) }), t.web ? t.web(e, r, i) : t(e, r, i);
727
+ return n instanceof HTMLElement && (r = { measure: De(n), mutate: Ge(n) }), t.web ? t.web(e, r, i) : t(e, r, i);
728
728
  }
729
729
  return [];
730
730
  }
731
- function Ye(t, e, n, s, i) {
731
+ function Ve(t, e, n, s, i) {
732
732
  const r = t instanceof HTMLElement ? t : N(t, i);
733
733
  if (n?.trigger === "pointer-move" && !e.keyframeEffect) {
734
734
  let d = e;
@@ -756,18 +756,18 @@ function Ye(t, e, n, s, i) {
756
756
  );
757
757
  if (!a || a.length === 0)
758
758
  return null;
759
- const c = Ve(a, n, e.effectId);
759
+ const c = We(a, n, e.effectId);
760
760
  let l;
761
761
  const f = n?.trigger === "view-progress";
762
762
  f && window.ViewTimeline && (l = new ViewTimeline({
763
763
  subject: n.element || N(n.componentId)
764
764
  }));
765
765
  const u = c.map(({ effect: d, options: g, id: p, part: m }) => {
766
- const h = m ? en(r, m) : r, v = new KeyframeEffect(h || null, [], g);
766
+ const h = m ? Jt(r, m) : r, v = new KeyframeEffect(h || null, [], g);
767
767
  O.mutate(() => {
768
768
  "timing" in d && v.updateTiming(d.timing), v.setKeyframes(d.keyframes);
769
769
  });
770
- const y = f && l ? { timeline: l } : {}, E = typeof d.customEffect == "function" ? new Kt(
770
+ const y = f && l ? { timeline: l } : {}, E = typeof d.customEffect == "function" ? new Bt(
771
771
  d.customEffect,
772
772
  h || null,
773
773
  g,
@@ -776,7 +776,7 @@ function Ye(t, e, n, s, i) {
776
776
  if (f)
777
777
  if (l)
778
778
  O.mutate(() => {
779
- const { start: w, end: S } = De(d);
779
+ const { start: w, end: S } = je(d);
780
780
  E.rangeStart = w, E.rangeEnd = S, E.play();
781
781
  });
782
782
  else {
@@ -806,23 +806,23 @@ function Ye(t, e, n, s, i) {
806
806
  measured: new Promise((d) => O.mutate(d))
807
807
  });
808
808
  }
809
- function nn(t, e) {
809
+ function tn(t, e) {
810
810
  return t ? `#${t}${e ? `[data-motion-part~="${e}"]` : ""}` : "";
811
811
  }
812
- function sn(t, e) {
812
+ function nn(t, e) {
813
813
  const { duration: n, delay: s, iterations: i = 1, fill: r, easing: o = "linear", direction: a } = t.options, c = t.effect.name, l = n === "auto";
814
814
  return `${c} ${l ? "auto" : `${n}ms`}${l ? " " : ` ${s || 1}ms `}${o}${r && r !== "none" ? ` ${r}` : ""} ${!i || i === 1 / 0 ? "infinite" : i}${a === "normal" ? "" : ` ${a}`} ${e ? "" : "paused"}`;
815
815
  }
816
- function rn(t, e, n) {
816
+ function sn(t, e, n) {
817
817
  return t?.style ? (Se(n) && (e.duration = e.duration || 1), t.style(e)) : [];
818
818
  }
819
- function on(t, e, n) {
820
- const s = W(e), i = rn(s, e), r = Ve(i, n, e.effectId, !0), o = n?.trigger === "view-progress";
819
+ function rn(t, e, n) {
820
+ const s = W(e), i = sn(s, e), r = We(i, n, e.effectId, !0), o = n?.trigger === "view-progress";
821
821
  return r.map((a, c) => {
822
- const { start: l, end: f } = o ? De(a.effect) : {};
822
+ const { start: l, end: f } = o ? je(a.effect) : {};
823
823
  return {
824
- target: nn(t, a.part),
825
- animation: sn(a, o),
824
+ target: tn(t, a.part),
825
+ animation: nn(a, o),
826
826
  composition: a.options.composite,
827
827
  custom: a.effect.custom,
828
828
  name: a.effect.name,
@@ -833,20 +833,20 @@ function on(t, e, n) {
833
833
  };
834
834
  });
835
835
  }
836
- function an(t, e, n) {
836
+ function on(t, e, n) {
837
837
  const s = W(e), i = t instanceof HTMLElement ? t : N(t);
838
838
  if (s && s.prepare && i) {
839
- const r = { measure: Ge(i), mutate: We(i) };
839
+ const r = { measure: De(i), mutate: Ge(i) };
840
840
  s.prepare(e, r);
841
841
  }
842
842
  n && O.mutate(n);
843
843
  }
844
- function Be(t, e) {
844
+ function Ye(t, e) {
845
845
  const n = W(e);
846
846
  if (!n)
847
847
  return null;
848
848
  if (!n.style)
849
- return e.effectId && t ? cn(t, e.effectId) : null;
849
+ return e.effectId && t ? an(t, e.effectId) : null;
850
850
  const s = n.getNames(e), r = (typeof t == "string" ? N(t) : t)?.getAnimations(), o = r?.map((c) => c.animationName) || [], a = [];
851
851
  return s.forEach((c) => {
852
852
  o.includes(c) && a.push(
@@ -854,15 +854,15 @@ function Be(t, e) {
854
854
  );
855
855
  }), a?.length ? new V(a) : null;
856
856
  }
857
- function cn(t, e) {
857
+ function an(t, e) {
858
858
  const s = (typeof t == "string" ? N(t) : t)?.getAnimations().filter((i) => {
859
859
  const r = i.id || i.animationName;
860
860
  return r ? r.startsWith(e) : !0;
861
861
  });
862
862
  return s?.length ? new V(s) : null;
863
863
  }
864
- function Ke(t, e, n, s = {}) {
865
- const { disabled: i, allowActiveEvent: r, ...o } = s, a = Ye(t, e, n, o);
864
+ function Be(t, e, n, s = {}) {
865
+ const { disabled: i, allowActiveEvent: r, ...o } = s, a = Ve(t, e, n, o);
866
866
  if (!a)
867
867
  return null;
868
868
  let c = {};
@@ -940,18 +940,18 @@ function Ke(t, e, n, s = {}) {
940
940
  };
941
941
  }
942
942
  function Y(t, e, n, s = !1) {
943
- const i = Be(t, e);
943
+ const i = Ye(t, e);
944
944
  return i ? (i.ready = new Promise((r) => {
945
- an(t, e, r);
946
- }), i) : Ye(t, e, n, { reducedMotion: s });
945
+ on(t, e, r);
946
+ }), i) : Ve(t, e, n, { reducedMotion: s });
947
947
  }
948
- function fn(t) {
948
+ function cn(t) {
949
949
  return t === null ? [null] : typeof t == "string" ? Array.from(document.querySelectorAll(t)) : Array.isArray(t) ? t : [t];
950
950
  }
951
- function Qe(t, e) {
951
+ function Ke(t, e) {
952
952
  const n = [];
953
953
  for (const { target: s, options: i } of t) {
954
- const r = fn(s);
954
+ const r = cn(s);
955
955
  for (const o of r) {
956
956
  const a = Y(
957
957
  o,
@@ -964,23 +964,23 @@ function Qe(t, e) {
964
964
  }
965
965
  return n;
966
966
  }
967
- function ln(t, e, n) {
968
- const s = Qe(e, n);
969
- return new Bt(s, t);
967
+ function fn(t, e, n) {
968
+ const s = Ke(e, n);
969
+ return new Yt(s, t);
970
970
  }
971
- function un(t, e = 2) {
971
+ function ln(t, e = 2) {
972
972
  return parseFloat(t.toFixed(e));
973
973
  }
974
- function dn(t) {
974
+ function un(t) {
975
975
  return /\[]/g.test(t);
976
976
  }
977
- function hn(t) {
977
+ function dn(t) {
978
978
  return `--${t.join("-")}`;
979
979
  }
980
- function mn(t) {
980
+ function hn(t) {
981
981
  return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
982
982
  }
983
- function pn(t, e, n, s) {
983
+ function mn(t, e, n, s) {
984
984
  const i = t.length - 1;
985
985
  t.forEach((r, o) => {
986
986
  if (r) {
@@ -1001,7 +1001,7 @@ function k() {
1001
1001
  // 97 for "a"
1002
1002
  );
1003
1003
  }
1004
- function Ue(t) {
1004
+ function Qe(t) {
1005
1005
  let { transition: e, transitionProperties: n } = t, s = [];
1006
1006
  if (e?.styleProperties) {
1007
1007
  const { duration: i, easing: r, delay: o } = e;
@@ -1021,7 +1021,7 @@ function Ue(t) {
1021
1021
  ) || [];
1022
1022
  return s;
1023
1023
  }
1024
- function gn({
1024
+ function pn({
1025
1025
  key: t,
1026
1026
  effectId: e,
1027
1027
  transition: n,
@@ -1029,7 +1029,7 @@ function gn({
1029
1029
  childSelector: i = "> :first-child",
1030
1030
  selectorCondition: r
1031
1031
  }) {
1032
- const o = Ue({
1032
+ const o = Qe({
1033
1033
  transition: n,
1034
1034
  transitionProperties: s
1035
1035
  }), a = (n?.styleProperties || s)?.map(
@@ -1064,7 +1064,7 @@ const K = {
1064
1064
  rangeStart: { name: "cover", offset: { value: 0, unit: "percentage" } },
1065
1065
  rangeEnd: { name: "cover", offset: { value: 100, unit: "percentage" } }
1066
1066
  };
1067
- function vn(t, e) {
1067
+ function gn(t, e) {
1068
1068
  const n = t?.name ?? K.rangeStart.name, s = e?.name ?? t?.name ?? K.rangeEnd.name, i = {
1069
1069
  name: n,
1070
1070
  offset: t?.offset || K.rangeStart.offset
@@ -1080,7 +1080,7 @@ function q(t) {
1080
1080
  id: "",
1081
1081
  ...t
1082
1082
  };
1083
- const { rangeStart: e, rangeEnd: n, ...s } = t, { startOffset: i, endOffset: r } = vn(e, n);
1083
+ const { rangeStart: e, rangeEnd: n, ...s } = t, { startOffset: i, endOffset: r } = gn(e, n);
1084
1084
  return {
1085
1085
  id: "",
1086
1086
  startOffset: i,
@@ -1100,25 +1100,25 @@ function B(t, e) {
1100
1100
  t.get(a)?.delete(s);
1101
1101
  }), t.delete(e);
1102
1102
  }
1103
- const yn = {
1103
+ const vn = {
1104
1104
  root: null,
1105
1105
  rootMargin: "0px 0px -10% 0px",
1106
1106
  threshold: [0]
1107
- }, En = {
1107
+ }, yn = {
1108
1108
  root: null,
1109
1109
  rootMargin: "0px",
1110
1110
  threshold: [0]
1111
- }, wn = 0.2;
1112
- function bn(t) {
1111
+ }, En = 0.2;
1112
+ function wn(t) {
1113
1113
  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;
1114
1114
  return `${i(n)} 0px ${i(s)}`;
1115
1115
  }
1116
1116
  const D = {}, M = /* @__PURE__ */ new WeakMap(), re = /* @__PURE__ */ new WeakSet(), z = /* @__PURE__ */ new WeakMap();
1117
- let Xe = {}, H = null;
1118
- function Sn(t) {
1119
- Xe = t;
1117
+ let Ue = {}, H = null;
1118
+ function bn(t) {
1119
+ Ue = t;
1120
1120
  }
1121
- function Ze(t, e, n) {
1121
+ function Xe(t, e, n) {
1122
1122
  M.get(t)?.forEach(({ source: i, handler: r }) => {
1123
1123
  i === t && r(e, n);
1124
1124
  });
@@ -1127,17 +1127,17 @@ function $e() {
1127
1127
  return H || (H = new IntersectionObserver((t) => {
1128
1128
  t.forEach((e) => {
1129
1129
  const n = e.target;
1130
- e.isIntersecting || Ze(n, !1, !0);
1130
+ e.isIntersecting || Xe(n, !1, !0);
1131
1131
  });
1132
- }, En), H);
1132
+ }, yn), H);
1133
1133
  }
1134
- function Je(t, e = !1) {
1134
+ function Ze(t, e = !1) {
1135
1135
  const n = JSON.stringify({ ...t, isSafeMode: e });
1136
1136
  if (D[n])
1137
1137
  return D[n];
1138
- const s = t.threshold ?? wn, i = e ? yn : {
1138
+ const s = t.threshold ?? En, i = e ? vn : {
1139
1139
  root: null,
1140
- rootMargin: t.inset ? bn(t.inset) : "0px",
1140
+ rootMargin: t.inset ? wn(t.inset) : "0px",
1141
1141
  threshold: s
1142
1142
  }, r = new IntersectionObserver((o) => {
1143
1143
  o.forEach((a) => {
@@ -1150,19 +1150,19 @@ function Je(t, e = !1) {
1150
1150
  const d = Array.isArray(t.threshold) ? Math.min(...t.threshold) : t.threshold;
1151
1151
  d && f * d > u && O.mutate(() => {
1152
1152
  r.unobserve(c);
1153
- const p = Je(t, !0);
1153
+ const p = Ze(t, !0);
1154
1154
  z.set(c, p), p.observe(c);
1155
1155
  });
1156
1156
  });
1157
1157
  return;
1158
1158
  }
1159
- (a.isIntersecting || !l) && Ze(c, a.isIntersecting);
1159
+ (a.isIntersecting || !l) && Xe(c, a.isIntersecting);
1160
1160
  });
1161
1161
  }, i);
1162
1162
  return D[n] = r, r;
1163
1163
  }
1164
- function Tn(t, e, n, s = {}, { reducedMotion: i, selectorCondition: r, animation: o } = {}) {
1165
- const a = { ...Xe, ...s }, c = n.triggerType || "once", l = o || Y(
1164
+ function Sn(t, e, n, s = {}, { reducedMotion: i, selectorCondition: r, animation: o } = {}) {
1165
+ const a = { ...Ue, ...s }, c = n.triggerType || "once", l = o || Y(
1166
1166
  e,
1167
1167
  q(n),
1168
1168
  void 0,
@@ -1170,7 +1170,7 @@ function Tn(t, e, n, s = {}, { reducedMotion: i, selectorCondition: r, animation
1170
1170
  );
1171
1171
  if (!l)
1172
1172
  return;
1173
- const f = Je(a);
1173
+ const f = Ze(a);
1174
1174
  c !== "once" && l.persist?.();
1175
1175
  let u = !0, d = !1, g;
1176
1176
  g = { source: t, target: e, handler: (h, v) => {
@@ -1202,19 +1202,19 @@ function Tn(t, e, n, s = {}, { reducedMotion: i, selectorCondition: r, animation
1202
1202
  (z.get(t) || f).unobserve(t), (c === "repeat" || c === "state") && $e().unobserve(t), l.cancel(), re.delete(t), z.delete(t);
1203
1203
  } }, C(M, t, g), C(M, e, g), z.set(t, f), f.observe(t), (c === "repeat" || c === "state") && $e().observe(t);
1204
1204
  }
1205
- function In(t) {
1205
+ function Tn(t) {
1206
1206
  B(M, t);
1207
1207
  }
1208
- function On() {
1208
+ function In() {
1209
1209
  H = null, Object.keys(D).forEach((t) => delete D[t]);
1210
1210
  }
1211
- const _e = {
1212
- add: Tn,
1213
- remove: In,
1214
- setOptions: Sn,
1215
- reset: On
1211
+ const On = {
1212
+ add: Sn,
1213
+ remove: Tn,
1214
+ setOptions: bn,
1215
+ reset: In
1216
1216
  };
1217
- function et(t, e) {
1217
+ function Je(t, e) {
1218
1218
  return Object.assign(Object.create(e), t);
1219
1219
  }
1220
1220
  function An(t, e, n, s) {
@@ -1236,7 +1236,7 @@ function Cn(t) {
1236
1236
  }));
1237
1237
  };
1238
1238
  }
1239
- function qe(t, e) {
1239
+ function _e(t, e) {
1240
1240
  let n = 0;
1241
1241
  return function() {
1242
1242
  n && window.clearTimeout(n), n = window.setTimeout(() => {
@@ -1349,7 +1349,7 @@ function Q(t, e, n, s, i) {
1349
1349
  )
1350
1350
  }));
1351
1351
  }
1352
- const Me = 100, Rn = {
1352
+ const qe = 100, Rn = {
1353
1353
  horizontal: !1,
1354
1354
  observeViewportEntry: !0,
1355
1355
  viewportRootMargin: "7% 7%",
@@ -1361,7 +1361,7 @@ function Fn(t, e, n, s) {
1361
1361
  let i = 0;
1362
1362
  return t >= e && t <= n ? i = s ? (t - e) / s : 1 : t > n && (i = 1), i;
1363
1363
  }
1364
- function xe(t, e) {
1364
+ function Me(t, e) {
1365
1365
  return t === window ? e ? window.document.documentElement.clientWidth : window.document.documentElement.clientHeight : e ? t.clientWidth : t.clientHeight;
1366
1366
  }
1367
1367
  function Nn() {
@@ -1371,8 +1371,8 @@ function Nn() {
1371
1371
  };
1372
1372
  }
1373
1373
  function zn(t) {
1374
- const e = et(t, Rn), n = e.root, s = e.horizontal, i = /* @__PURE__ */ new WeakMap();
1375
- let r = xe(n, s), o, a, c, l, f;
1374
+ const e = Je(t, Rn), n = e.root, s = e.horizontal, i = /* @__PURE__ */ new WeakMap();
1375
+ let r = Me(n, s), o, a, c, l, f;
1376
1376
  const u = [], d = Nn();
1377
1377
  if (e.scenes = Object.values(
1378
1378
  // TODO(ameerf): find a polyfill and use groupBy instead of following reduce
@@ -1398,7 +1398,7 @@ function zn(t) {
1398
1398
  });
1399
1399
  }), u.forEach((h) => {
1400
1400
  c.observe(h[0].viewSource, { box: "border-box" }), m.set(h[0].viewSource, h);
1401
- }), e.observeContentResize && e.contentRoot && new window.ResizeObserver(qe(() => {
1401
+ }), e.observeContentResize && e.contentRoot && new window.ResizeObserver(_e(() => {
1402
1402
  const v = u.map((y) => {
1403
1403
  const E = Q(y, n, r, s, d);
1404
1404
  return E.forEach((w, S) => {
@@ -1408,8 +1408,8 @@ function zn(t) {
1408
1408
  u.length = 0, u.push(...v), u.forEach((y) => {
1409
1409
  m.set(y[0].viewSource, y);
1410
1410
  });
1411
- }, Me)).observe(e.contentRoot, { box: "border-box" })), e.observeViewportResize && (l = qe(function() {
1412
- r = xe(n, s);
1411
+ }, qe)).observe(e.contentRoot, { box: "border-box" })), e.observeViewportResize && (l = _e(function() {
1412
+ r = Me(n, s);
1413
1413
  const h = u.map((v) => {
1414
1414
  const y = Q(v, n, r, s, d);
1415
1415
  return y.forEach((E, w) => {
@@ -1419,7 +1419,7 @@ function zn(t) {
1419
1419
  u.length = 0, u.push(...h), u.forEach((v) => {
1420
1420
  m.set(v[0].viewSource, v);
1421
1421
  });
1422
- }, Me), n === window ? window.addEventListener("resize", l) : window.ResizeObserver && (f = new window.ResizeObserver(l), f.observe(n, { box: "border-box" })));
1422
+ }, qe), n === window ? window.addEventListener("resize", l) : window.ResizeObserver && (f = new window.ResizeObserver(l), f.observe(n, { box: "border-box" })));
1423
1423
  }
1424
1424
  e.observeViewportEntry && window.IntersectionObserver && (a = new window.IntersectionObserver(function(m) {
1425
1425
  m.forEach((h) => {
@@ -1466,7 +1466,7 @@ const Hn = {
1466
1466
  };
1467
1467
  class jn {
1468
1468
  constructor(e = {}) {
1469
- this.config = et(e, Hn), this.progress = {
1469
+ this.config = Je(e, Hn), this.progress = {
1470
1470
  p: 0,
1471
1471
  prevP: 0,
1472
1472
  vp: 0
@@ -1559,9 +1559,9 @@ class jn {
1559
1559
  }
1560
1560
  }
1561
1561
  const he = /* @__PURE__ */ new WeakMap();
1562
- let tt = () => ({});
1562
+ let et = () => ({});
1563
1563
  function Dn(t) {
1564
- tt = t;
1564
+ et = t;
1565
1565
  }
1566
1566
  function Gn(t, e, n, s, { reducedMotion: i }) {
1567
1567
  if (i)
@@ -1583,7 +1583,7 @@ function Gn(t, e, n, s, { reducedMotion: i }) {
1583
1583
  });
1584
1584
  });
1585
1585
  } else {
1586
- const l = Ke(e, o, r);
1586
+ const l = Be(e, o, r);
1587
1587
  if (l) {
1588
1588
  const f = Array.isArray(l) ? l : [l], u = new jn({
1589
1589
  viewSource: t,
@@ -1592,7 +1592,7 @@ function Gn(t, e, n, s, { reducedMotion: i }) {
1592
1592
  observeViewportResize: !1,
1593
1593
  observeSourcesResize: !0,
1594
1594
  root: document.body,
1595
- ...tt()
1595
+ ...et()
1596
1596
  });
1597
1597
  a = () => {
1598
1598
  u.destroy();
@@ -1615,10 +1615,10 @@ const Vn = {
1615
1615
  remove: Wn,
1616
1616
  registerOptionsGetter: Dn
1617
1617
  };
1618
- function Pe(t, e, n) {
1618
+ function xe(t, e, n) {
1619
1619
  return Math.min(Math.max(t, n), e);
1620
1620
  }
1621
- function Le(t) {
1621
+ function Pe(t) {
1622
1622
  let e = !1;
1623
1623
  return function() {
1624
1624
  if (!e)
@@ -1741,7 +1741,7 @@ function ns(t) {
1741
1741
  }), s = function(f) {
1742
1742
  for (let u of t.scenes)
1743
1743
  if (!u.disabled) {
1744
- const d = u.transform?.x(f.x) || f.x / t.rect.width, g = u.transform?.y(f.y) || f.y / t.rect.height, p = +Pe(0, 1, d).toPrecision(4), m = +Pe(0, 1, g).toPrecision(4), h = { x: f.vx, y: f.vy };
1744
+ const d = u.transform?.x(f.x) || f.x / t.rect.width, g = u.transform?.y(f.y) || f.y / t.rect.height, p = +xe(0, 1, d).toPrecision(4), m = +xe(0, 1, g).toPrecision(4), h = { x: f.vx, y: f.vy };
1745
1745
  t.allowActiveEvent && (f.active = d <= 1 && g <= 1 && d >= 0 && g >= 0), u.effect(u, { x: p, y: m }, h, f.active);
1746
1746
  }
1747
1747
  Object.assign(n, f);
@@ -1764,7 +1764,7 @@ class rs {
1764
1764
  constructor(e = {}) {
1765
1765
  this.config = { ...e }, this.effect = null, this._nextTick = null, this._nextTransitionTick = null, this._startTime = 0;
1766
1766
  let n;
1767
- this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() : Le(() => this.transition()) : n = this.config.noThrottle ? () => (this.tick(), null) : Le(() => {
1767
+ this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() : Pe(() => this.transition()) : n = this.config.noThrottle ? () => (this.tick(), null) : Pe(() => {
1768
1768
  this.tick();
1769
1769
  }), this.config.rect = this.config.root ? {
1770
1770
  width: this.config.root.offsetWidth,
@@ -1871,9 +1871,9 @@ class rs {
1871
1871
  }
1872
1872
  }
1873
1873
  const me = /* @__PURE__ */ new WeakMap();
1874
- let nt = () => ({});
1874
+ let tt = () => ({});
1875
1875
  function os(t) {
1876
- nt = t;
1876
+ tt = t;
1877
1877
  }
1878
1878
  function as(t, e, n, s = {}, { reducedMotion: i }) {
1879
1879
  if (i)
@@ -1882,12 +1882,12 @@ function as(t, e, n, s = {}, { reducedMotion: i }) {
1882
1882
  trigger: "pointer-move",
1883
1883
  element: t,
1884
1884
  axis: s.axis ?? "y"
1885
- }, o = Ke(e, q(n), r);
1885
+ }, o = Be(e, q(n), r);
1886
1886
  if (o) {
1887
1887
  const a = Array.isArray(o) ? o : [o], c = new rs({
1888
1888
  root: s.hitArea === "self" ? t : void 0,
1889
1889
  scenes: a,
1890
- ...nt()
1890
+ ...tt()
1891
1891
  }), f = { source: t, target: e, cleanup: () => {
1892
1892
  c.destroy();
1893
1893
  } };
@@ -1922,7 +1922,7 @@ function ls(t, e, n, s, {
1922
1922
  return;
1923
1923
  const { effectId: l } = s, f = (g) => {
1924
1924
  if (r && !e.matches(r)) return;
1925
- const p = g.animationName, m = g.detail?.effectId, h = a ? Be(t, a) : null;
1925
+ const p = g.animationName, m = g.detail?.effectId, h = a ? Ye(t, a) : null;
1926
1926
  if (h) {
1927
1927
  if (h.playState === "running" || p && !h.hasAnimationName(p))
1928
1928
  return;
@@ -1993,7 +1993,7 @@ function ms(t, e, {
1993
1993
  };
1994
1994
  }
1995
1995
  const ge = /* @__PURE__ */ new WeakMap();
1996
- function Re(t, e) {
1996
+ function Le(t, e) {
1997
1997
  return (n) => {
1998
1998
  const s = n;
1999
1999
  t.contains(s.relatedTarget) || e(s);
@@ -2012,8 +2012,8 @@ function gs(t) {
2012
2012
  };
2013
2013
  }
2014
2014
  const vs = {
2015
- focusin: (t, e) => Re(t, e),
2016
- focusout: (t, e) => Re(t, e),
2015
+ focusin: (t, e) => Le(t, e),
2016
+ focusout: (t, e) => Le(t, e),
2017
2017
  click: (t, e) => ps(e),
2018
2018
  keydown: (t, e) => gs(e)
2019
2019
  };
@@ -2104,19 +2104,19 @@ const j = {
2104
2104
  enter: ["mouseenter", "focusin"],
2105
2105
  leave: ["mouseleave", "focusout"]
2106
2106
  }
2107
- }, Fe = {
2107
+ }, Re = {
2108
2108
  click: ve.activate,
2109
2109
  hover: ve.interest
2110
2110
  };
2111
2111
  function Z(t) {
2112
2112
  const e = ve[t];
2113
2113
  return (n, s, i, r, o) => {
2114
- const a = o?.allowA11yTriggers && t in Fe ? Fe[t] : e;
2114
+ const a = o?.allowA11yTriggers && t in Re ? Re[t] : e;
2115
2115
  j.add(n, s, i, { eventConfig: a }, o ?? {});
2116
2116
  };
2117
2117
  }
2118
2118
  const x = {
2119
- viewEnter: _e,
2119
+ viewEnter: On,
2120
2120
  hover: {
2121
2121
  add: Z("hover"),
2122
2122
  remove: j.remove
@@ -2125,7 +2125,6 @@ const x = {
2125
2125
  add: Z("click"),
2126
2126
  remove: j.remove
2127
2127
  },
2128
- pageVisible: _e,
2129
2128
  animationEnd: ds,
2130
2129
  viewProgress: Vn,
2131
2130
  pointerMove: fs,
@@ -2242,17 +2241,17 @@ class b {
2242
2241
  static deleteController(e) {
2243
2242
  b.controllerCache.delete(e);
2244
2243
  }
2245
- static registerEffects = Zt;
2244
+ static registerEffects = Xt;
2246
2245
  static getSequence(e, n, s, i) {
2247
2246
  const r = b.sequenceCache.get(e);
2248
2247
  if (r) return r;
2249
- const o = ln(n, s, i);
2248
+ const o = fn(n, s, i);
2250
2249
  return b.sequenceCache.set(e, o), b._registerSequenceElements(s, o), o;
2251
2250
  }
2252
2251
  static addToSequence(e, n, s, i) {
2253
2252
  const r = b.sequenceCache.get(e);
2254
2253
  if (!r) return !1;
2255
- const a = Qe(n, i).map((c, l) => ({
2254
+ const a = Ke(n, i).map((c, l) => ({
2256
2255
  index: s[l] ?? r.animationGroups.length,
2257
2256
  group: c
2258
2257
  }));
@@ -2293,7 +2292,7 @@ function P(t, {
2293
2292
  return t.selector;
2294
2293
  return s ? e ? "> :first-child" : ":scope > :first-child" : "";
2295
2294
  }
2296
- function Ne(t) {
2295
+ function Fe(t) {
2297
2296
  return "sequenceId" in t && !("effects" in t);
2298
2297
  }
2299
2298
  function le(t, e) {
@@ -2317,7 +2316,7 @@ function Cs(t, e = !1) {
2317
2316
  const d = l ? Array.from(l) : [];
2318
2317
  d.reverse();
2319
2318
  const g = f?.map((h) => {
2320
- if (Ne(h)) {
2319
+ if (Fe(h)) {
2321
2320
  const y = s[h.sequenceId];
2322
2321
  return y ? { ...y, ...h } : (console.warn(`Interact: Sequence "${h.sequenceId}" not found in config`), h);
2323
2322
  }
@@ -2348,7 +2347,7 @@ function Cs(t, e = !1) {
2348
2347
  const w = le(r, v);
2349
2348
  w.effects[E] || (w.effects[E] = [], w.interactionIds.add(E)), w.effects[E].push({ ...u, effect: h }), w.selectors.add(P(h, { useFirstChild: e }));
2350
2349
  }), g?.forEach((h) => {
2351
- if (!h || Ne(h)) return;
2350
+ if (!h || Fe(h)) return;
2352
2351
  const v = h, y = v.sequenceId || k(), E = v.effects;
2353
2352
  for (const w of E) {
2354
2353
  w.effectId || (w.effectId = k());
@@ -2391,17 +2390,17 @@ function ye(t, e, n) {
2391
2390
  function Ee(t, e) {
2392
2391
  return e.map((n) => t.selector ? n.querySelector(t.selector) : n).filter(Boolean);
2393
2392
  }
2394
- function st(t, e, n, s, i, r, o, a) {
2393
+ function nt(t, e, n, s, i, r, o, a) {
2395
2394
  return [
2396
2395
  o ? Ee(t, o) : ye(t, n, s),
2397
2396
  a ? Ee(e, a) : ye(e, i, r)
2398
2397
  ];
2399
2398
  }
2400
- function it(t, e, n, s, i, r, o, a) {
2399
+ function st(t, e, n, s, i, r, o, a) {
2401
2400
  const c = Array.isArray(s), l = Array.isArray(i);
2402
2401
  c ? s.forEach((f, u) => {
2403
2402
  const d = l ? i[u] : i;
2404
- d && ze(
2403
+ d && Ne(
2405
2404
  t,
2406
2405
  f,
2407
2406
  e.trigger,
@@ -2413,7 +2412,7 @@ function it(t, e, n, s, i, r, o, a) {
2413
2412
  a
2414
2413
  );
2415
2414
  }) : (l ? i : [i]).forEach((u) => {
2416
- ze(
2415
+ Ne(
2417
2416
  t,
2418
2417
  s,
2419
2418
  e.trigger,
@@ -2426,7 +2425,7 @@ function it(t, e, n, s, i, r, o, a) {
2426
2425
  );
2427
2426
  });
2428
2427
  }
2429
- function rt(t, e, n, s, i) {
2428
+ function it(t, e, n, s, i) {
2430
2429
  const r = {}, o = [];
2431
2430
  (s.effects || []).forEach((a) => {
2432
2431
  const c = a.effectId, l = {
@@ -2449,7 +2448,7 @@ function rt(t, e, n, s, i) {
2449
2448
  l.listContainer && p.watchChildList(l.listContainer);
2450
2449
  } else
2451
2450
  p = e;
2452
- const [m, h] = st(
2451
+ const [m, h] = nt(
2453
2452
  s,
2454
2453
  l,
2455
2454
  e.element,
@@ -2477,13 +2476,13 @@ function rt(t, e, n, s, i) {
2477
2476
  ]);
2478
2477
  }
2479
2478
  }), o.reverse().forEach((a) => {
2480
- it(...a);
2479
+ st(...a);
2481
2480
  }), $s(t, e, n, s, i);
2482
2481
  }
2483
2482
  function ks(t) {
2484
2483
  return "sequenceId" in t && !("effects" in t);
2485
2484
  }
2486
- function ot(t, e, n, s, i, r, o) {
2485
+ function rt(t, e, n, s, i, r, o) {
2487
2486
  const a = _(t.conditions || [], i.dataCache.conditions);
2488
2487
  if (a && i.setupMediaQueryListener(e, a, r.updateKey, r.onUpdate), a && !a.matches) return null;
2489
2488
  const c = t.effects || [], l = [];
@@ -2521,7 +2520,7 @@ function ot(t, e, n, s, i, r, o) {
2521
2520
  }
2522
2521
  return o && !f ? null : l.length > 0 ? l : null;
2523
2522
  }
2524
- function at(t, e, n) {
2523
+ function ot(t, e, n) {
2525
2524
  const r = (t.useFirstChild ? t.element.firstElementChild : t.element)?.querySelector(e);
2526
2525
  if (!r) return n.map((a, c) => c);
2527
2526
  const o = Array.from(r.children);
@@ -2544,7 +2543,7 @@ function $s(t, e, n, s, i) {
2544
2543
  o = r;
2545
2544
  const a = o.sequenceId || k(), c = $(`${t}::seq::${a}`, t);
2546
2545
  if (n.addedInteractions[c] && !i) return;
2547
- const l = i && s.listContainer ? { controllerKey: t, listContainer: s.listContainer, elements: i } : void 0, f = ot(
2546
+ const l = i && s.listContainer ? { controllerKey: t, listContainer: s.listContainer, elements: i } : void 0, f = rt(
2548
2547
  o,
2549
2548
  c,
2550
2549
  t,
@@ -2555,7 +2554,7 @@ function $s(t, e, n, s, i) {
2555
2554
  );
2556
2555
  if (!f) return;
2557
2556
  if (i && n.addedInteractions[c]) {
2558
- const g = at(
2557
+ const g = ot(
2559
2558
  e,
2560
2559
  s.listContainer,
2561
2560
  i
@@ -2603,7 +2602,7 @@ function _s(t, e, n, s, i) {
2603
2602
  const p = l.sequenceId || k(), m = $(`${d}::seq::${p}`, d);
2604
2603
  if (n.addedInteractions[m] && !i)
2605
2604
  return !0;
2606
- const v = ot(
2605
+ const v = rt(
2607
2606
  l,
2608
2607
  m,
2609
2608
  d,
@@ -2614,7 +2613,7 @@ function _s(t, e, n, s, i) {
2614
2613
  );
2615
2614
  if (!v) return !0;
2616
2615
  if (i && n.addedInteractions[m]) {
2617
- const w = at(e, s, i);
2616
+ const w = ot(e, s, i);
2618
2617
  return b.addToSequence(m, v, w, {
2619
2618
  reducedMotion: b.forceReducedMotion
2620
2619
  }), !0;
@@ -2642,7 +2641,7 @@ function _s(t, e, n, s, i) {
2642
2641
  });
2643
2642
  });
2644
2643
  }
2645
- function ct(t, e, n, s, i) {
2644
+ function at(t, e, n, s, i) {
2646
2645
  const r = n.get(t), o = r?.effects || {}, a = Object.keys(o), c = [];
2647
2646
  a.forEach((f) => {
2648
2647
  const u = $(f, t);
@@ -2670,7 +2669,7 @@ function ct(t, e, n, s, i) {
2670
2669
  if (!w)
2671
2670
  return !0;
2672
2671
  v.listContainer && e.watchChildList(v.listContainer);
2673
- const [S, T] = st(
2672
+ const [S, T] = nt(
2674
2673
  p,
2675
2674
  v,
2676
2675
  w.element,
@@ -2701,12 +2700,12 @@ function ct(t, e, n, s, i) {
2701
2700
  return !1;
2702
2701
  });
2703
2702
  }), c.reverse().forEach((f) => {
2704
- it(...f);
2703
+ st(...f);
2705
2704
  }), _s(t, e, n, s, i);
2706
2705
  const l = Object.keys(r?.sequences || {}).length > 0;
2707
2706
  return a.length > 0 || l;
2708
2707
  }
2709
- function ze(t, e, n, s, i, r, o, a, c) {
2708
+ function Ne(t, e, n, s, i, r, o, a, c) {
2710
2709
  let l;
2711
2710
  if (i.transition || i.transitionProperties) {
2712
2711
  const u = {
@@ -2723,7 +2722,7 @@ function ze(t, e, n, s, i, r, o, a, c) {
2723
2722
  };
2724
2723
  if (l = b.getController(t), !l)
2725
2724
  return;
2726
- l.renderStyle(gn(u));
2725
+ l.renderStyle(pn(u));
2727
2726
  }
2728
2727
  let f;
2729
2728
  if (n === "animationEnd") {
@@ -2751,10 +2750,10 @@ function qs(t) {
2751
2750
  t.update();
2752
2751
  });
2753
2752
  }
2754
- (!c || c.matches) && (o.listContainer && t.watchChildList(o.listContainer), rt(e, t, n, o));
2753
+ (!c || c.matches) && (o.listContainer && t.watchChildList(o.listContainer), it(e, t, n, o));
2755
2754
  });
2756
2755
  let r = !1;
2757
- return n && (r = ct(e, t, n)), i || r;
2756
+ return n && (r = at(e, t, n)), i || r;
2758
2757
  }
2759
2758
  function Ms(t, e, n) {
2760
2759
  const s = t.key, i = b.getInstance(s);
@@ -2770,8 +2769,8 @@ function Ms(t, e, n) {
2770
2769
  t.update();
2771
2770
  });
2772
2771
  }
2773
- (!c || c.matches) && rt(s, t, i, o, n);
2774
- }), ct(s, t, i, e, n);
2772
+ (!c || c.matches) && it(s, t, i, o, n);
2773
+ }), at(s, t, i, e, n);
2775
2774
  }
2776
2775
  }
2777
2776
  function xs(t, e = !1) {
@@ -2780,9 +2779,9 @@ function xs(t, e = !1) {
2780
2779
  return;
2781
2780
  const i = [...s.get(n)?.selectors.values() || []].filter(Boolean).join(",");
2782
2781
  let r;
2783
- i ? (r = [...t.element.querySelectorAll(i)], t.useFirstChild || r.push(t.element)) : r = [t.element], ft(r), s.deleteController(n, e);
2782
+ i ? (r = [...t.element.querySelectorAll(i)], t.useFirstChild || r.push(t.element)) : r = [t.element], ct(r), s.deleteController(n, e);
2784
2783
  }
2785
- function ft(t) {
2784
+ function ct(t) {
2786
2785
  const e = Object.values(x);
2787
2786
  for (const n of t)
2788
2787
  for (const s of e)
@@ -2870,7 +2869,7 @@ class Ps {
2870
2869
  }), o.addedNodes.forEach((a) => {
2871
2870
  a instanceof HTMLElement && r.push(a);
2872
2871
  });
2873
- }), ft(i), s && Ms(this, e, r);
2872
+ }), ct(i), s && Ms(this, e, r);
2874
2873
  }
2875
2874
  }
2876
2875
  function Us(t, e) {
@@ -2880,16 +2879,15 @@ function Xs(t) {
2880
2879
  const e = b.getController(t);
2881
2880
  e && e.disconnect({ removeFromCache: !0 });
2882
2881
  }
2883
- const lt = /* @__PURE__ */ new Map([
2882
+ const ft = /* @__PURE__ */ new Map([
2884
2883
  ["viewEnter", "once"],
2885
- ["pageVisible", "once"],
2886
2884
  ["animationEnd", "once"],
2887
2885
  ["hover", "alternate"],
2888
2886
  ["click", "alternate"],
2889
2887
  ["activate", "alternate"],
2890
2888
  ["interest", "alternate"]
2891
2889
  ]);
2892
- function ut(t, e, n) {
2890
+ function lt(t, e, n) {
2893
2891
  const { effects: s = {}, conditions: i = {} } = n, { key: r, trigger: o } = e, a = o === "pointerMove";
2894
2892
  t.effectId || (t.effectId = k());
2895
2893
  const { effectId: c } = t, l = { ...s[c] || {}, ...t };
@@ -2899,18 +2897,18 @@ function ut(t, e, n) {
2899
2897
  return null;
2900
2898
  f = r;
2901
2899
  }
2902
- if (dn(f))
2900
+ if (un(f))
2903
2901
  return null;
2904
2902
  u = [
2905
2903
  ...new Set((u || []).filter((w) => i[w]))
2906
- ], d || (d = lt.get(o));
2904
+ ], d || (d = ft.get(o));
2907
2905
  const { namedEffect: g, customEffect: p, keyframeEffect: m, transition: h, transitionProperties: v, ...y } = {
2908
2906
  ...l,
2909
2907
  key: f,
2910
2908
  conditions: u,
2911
2909
  effectId: c,
2912
2910
  triggerType: d
2913
- }, E = yt(e, y);
2911
+ }, E = vt(e, y);
2914
2912
  if (g)
2915
2913
  return a || !g.type ? null : { namedEffect: g, initial: E, ...y };
2916
2914
  if (m) {
@@ -2933,11 +2931,11 @@ function Ls(t, e, n) {
2933
2931
  offset: u = 0,
2934
2932
  offsetEasing: d = "linear"
2935
2933
  } = o;
2936
- l || (l = lt.get(e.trigger)), c = [
2934
+ l || (l = ft.get(e.trigger)), c = [
2937
2935
  ...new Set((c || []).filter((m) => i[m]))
2938
2936
  ];
2939
- const g = a.map((m) => (m.conditions ? m.conditions.push(...c) : m.conditions = [...c], ut({ ...m, triggerType: l }, e, n)));
2940
- typeof d != "function" && (d = be(d) || ((m) => m)), pn(g, f, u, d);
2937
+ const g = a.map((m) => (m.conditions ? m.conditions.push(...c) : m.conditions = [...c], lt({ ...m, triggerType: l }, e, n)));
2938
+ typeof d != "function" && (d = be(d) || ((m) => m)), mn(g, f, u, d);
2941
2939
  const p = g.filter((m) => m !== null);
2942
2940
  return p.length ? {
2943
2941
  sequenceId: r,
@@ -2956,7 +2954,7 @@ function Fs(t) {
2956
2954
  if (!t.length)
2957
2955
  return [];
2958
2956
  const e = t.map((i) => ({ ...i }));
2959
- e[0].offset === void 0 && (e[0].offset = 0), (e[e.length - 1].offset === void 0 || e.length === 1) && (e[e.length - 1].offset = 1);
2957
+ 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);
2960
2958
  let n = 0, s = e[0].offset;
2961
2959
  for (let i = 1; i < e.length; i++)
2962
2960
  if (e[i].offset !== void 0) {
@@ -2986,7 +2984,7 @@ function zs(t, e) {
2986
2984
  if (!n.length)
2987
2985
  return "";
2988
2986
  let s = n.map((i) => {
2989
- const r = i.offset, o = un(r * 100);
2987
+ const r = i.offset, o = ln(r * 100);
2990
2988
  return Ns(i, o);
2991
2989
  }).join(`
2992
2990
  `);
@@ -2995,7 +2993,15 @@ ${s}
2995
2993
  }`;
2996
2994
  }
2997
2995
  function Hs(t) {
2998
- const { key: e, childSelector: n, declarations: s, media: i, states: r, selectorCondition: o, addInitialSelector: a } = t;
2996
+ const {
2997
+ key: e,
2998
+ childSelector: n,
2999
+ declarations: s,
3000
+ media: i,
3001
+ states: r,
3002
+ selectorCondition: o,
3003
+ dataInteractEnterSelector: a
3004
+ } = t;
2999
3005
  if (!s.length)
3000
3006
  return "";
3001
3007
  let c = `[data-interact-key="${e}"]`;
@@ -3003,7 +3009,7 @@ function Hs(t) {
3003
3009
  const u = r.map((d) => `:state(${d}), :--${d}, [data-interact-effect~="${d}"]`).join(", ");
3004
3010
  c = `${c}:is(${u})`;
3005
3011
  }
3006
- n && (c = `${c} ${n}`), a && (c = `${c}:not([data-interact-enter])`), o && (c = te(c, o));
3012
+ n && (c = `${c} ${n}`), a && (c = `${c}${a}`), o && (c = te(c, o));
3007
3013
  const l = s.map(({ name: u, value: d }) => `${u}: ${d};`).join(`
3008
3014
  `), f = `${c} {
3009
3015
  ${l}
@@ -3012,7 +3018,7 @@ ${l}
3012
3018
  ${f}
3013
3019
  }` : f;
3014
3020
  }
3015
- function dt(t, e, n, s) {
3021
+ function ut(t, e, n, s) {
3016
3022
  const { key: i, childSelector: r, properties: o } = t, a = Object.entries(o).filter(
3017
3023
  (l) => l[1] && l[1].varNames.length
3018
3024
  ).map(([l, { fallback: f, varNames: u }]) => ({
@@ -3046,20 +3052,20 @@ const js = [
3046
3052
  "animation-timeline": "auto",
3047
3053
  "animation-range": "normal"
3048
3054
  };
3049
- function ht(t, e, n) {
3055
+ function dt(t, e, n) {
3050
3056
  const s = t.get(e);
3051
3057
  s ? n.forEach((i) => s.add(i)) : t.set(e, new Set(n));
3052
3058
  }
3053
- function mt(t, e, n, s) {
3059
+ function ht(t, e, n, s) {
3054
3060
  const { key: i, childSelector: r } = n, o = s ? we.filter((c) => s.has(c)) : we;
3055
3061
  t.has(e) || t.set(e, { key: i, childSelector: r, properties: {} });
3056
3062
  const { properties: a } = t.get(e);
3057
3063
  for (const c of o)
3058
3064
  a[c] || (a[c] = { fallback: ie[c], varNames: [] }), a[c].varNames.push(n[c]);
3059
3065
  }
3060
- function pt(t, e) {
3066
+ function mt(t, e) {
3061
3067
  return we.reduce(
3062
- (n, s) => (n[s] = hn([s, ...t, e]), n),
3068
+ (n, s) => (n[s] = dn([s, ...t, e]), n),
3063
3069
  {}
3064
3070
  );
3065
3071
  }
@@ -3067,11 +3073,11 @@ function Gs(t, e, n, s, i) {
3067
3073
  return s.has(t) || s.set(t, {
3068
3074
  key: e,
3069
3075
  childSelector: i,
3070
- ...pt([n], He(t))
3076
+ ...mt([n], ze(t))
3071
3077
  }), s.get(t);
3072
3078
  }
3073
3079
  function Ws(t, e, n) {
3074
- return pt([e, n], He(t));
3080
+ return mt([e, n], ze(t));
3075
3081
  }
3076
3082
  function Vs(t, e, n, s = !0) {
3077
3083
  const { key: i, conditions: r } = t, o = ae(r, e, "media"), a = L(r, e), c = P(t, {
@@ -3118,7 +3124,7 @@ function Ys(t, e, n, s, i) {
3118
3124
  let y = [];
3119
3125
  if (c || l) {
3120
3126
  y = [...se];
3121
- const E = q(t), w = on(null, E, s).filter(
3127
+ const E = q(t), w = rn(null, E, s).filter(
3122
3128
  (T) => T.name
3123
3129
  );
3124
3130
  h = w.map((T) => ({
@@ -3136,17 +3142,24 @@ function Ys(t, e, n, s, i) {
3136
3142
  return I[A];
3137
3143
  }).join(", ") || ie[T]
3138
3144
  }));
3139
- d ? m.push({
3145
+ d ? (m.push({
3146
+ key: r,
3147
+ media: g,
3148
+ selectorCondition: p,
3149
+ childSelector: i,
3150
+ declarations: js,
3151
+ dataInteractEnterSelector: ":not([data-interact-enter])"
3152
+ }), m.push({
3140
3153
  key: r,
3141
3154
  media: g,
3142
3155
  selectorCondition: p,
3143
3156
  childSelector: i,
3144
- declarations: S.concat(js),
3145
- addInitialSelector: !0
3146
- }) : v.push(...S);
3157
+ declarations: S,
3158
+ dataInteractEnterSelector: ':not([data-interact-enter="done"])'
3159
+ })) : v.push(...S);
3147
3160
  } else if (f || u) {
3148
3161
  y = ["transition"];
3149
- const E = f?.styleProperties || u || [], w = Ue(t);
3162
+ const E = f?.styleProperties || u || [], w = Qe(t);
3150
3163
  v.push({
3151
3164
  name: n.transition,
3152
3165
  value: w.join(", ") || ie.transition
@@ -3167,7 +3180,7 @@ function Ys(t, e, n, s, i) {
3167
3180
  );
3168
3181
  return { rules: m.filter((E) => E.declarations.length), keyframes: h, usedProperties: y };
3169
3182
  }
3170
- function gt(t, e, n, s, i, r, o = !0, a, c) {
3183
+ function pt(t, e, n, s, i, r, o = !0, a, c) {
3171
3184
  const { key: l } = n, f = c ?? G(n), u = P(n, {
3172
3185
  asCombinator: !0,
3173
3186
  useFirstChild: o,
@@ -3198,7 +3211,7 @@ function Bs(t, e, n, s, i, r, o = !0, a) {
3198
3211
  addItemFilter: !0
3199
3212
  }), h = l.get(g) || 0;
3200
3213
  l.set(g, h + 1);
3201
- const v = Ws(g, e, h), { rules: y, usedProperties: E } = gt(
3214
+ const v = Ws(g, e, h), { rules: y, usedProperties: E } = pt(
3202
3215
  t,
3203
3216
  e,
3204
3217
  d,
@@ -3211,27 +3224,27 @@ function Bs(t, e, n, s, i, r, o = !0, a) {
3211
3224
  );
3212
3225
  f.push(...y);
3213
3226
  const w = new Set(E);
3214
- mt(
3227
+ ht(
3215
3228
  c,
3216
3229
  g,
3217
3230
  { key: p, childSelector: m, ...v },
3218
3231
  w
3219
- ), a && ht(a, g, E);
3232
+ ), a && dt(a, g, E);
3220
3233
  }
3221
3234
  const { conditions: u } = n;
3222
3235
  return c.forEach((d, g) => {
3223
3236
  const p = s.get(g);
3224
- f.push(dt(d, p, u, t));
3237
+ f.push(ut(d, p, u, t));
3225
3238
  }), f;
3226
3239
  }
3227
3240
  function Ks(t, e, n, s, i, r = !0) {
3228
- const { effects: o = [], sequences: a = [] } = e, c = t.conditions || {}, l = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), u = o.map((h) => ut(h, e, t)).filter((h) => h !== null), d = [], { trigger: g } = e, p = {
3229
- trigger: mn(g),
3241
+ const { effects: o = [], sequences: a = [] } = e, c = t.conditions || {}, l = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), u = o.map((h) => lt(h, e, t)).filter((h) => h !== null), d = [], { trigger: g } = e, p = {
3242
+ trigger: hn(g),
3230
3243
  id: ["trigger", n].join("-")
3231
3244
  };
3232
3245
  g === "viewProgress" && d.push(Vs(e, c, p.id, r));
3233
3246
  for (const h of u) {
3234
- const v = G(h), { rules: y, usedProperties: E } = gt(
3247
+ const v = G(h), { rules: y, usedProperties: E } = pt(
3235
3248
  c,
3236
3249
  n,
3237
3250
  h,
@@ -3240,7 +3253,7 @@ function Ks(t, e, n, s, i, r = !0) {
3240
3253
  p,
3241
3254
  r
3242
3255
  );
3243
- d.push(...y), ht(f, v, E);
3256
+ d.push(...y), dt(f, v, E);
3244
3257
  }
3245
3258
  const m = a.map((h) => Ls(h, e, t)).filter((h) => h !== null);
3246
3259
  return d.push(
@@ -3257,7 +3270,7 @@ function Ks(t, e, n, s, i, r = !0) {
3257
3270
  )
3258
3271
  )
3259
3272
  ), l.forEach((h, v) => {
3260
- mt(
3273
+ ht(
3261
3274
  s,
3262
3275
  v,
3263
3276
  h,
@@ -3270,7 +3283,7 @@ function Qs(t, e = !0) {
3270
3283
  (r, o) => Ks(t, r, o, n, s, e)
3271
3284
  );
3272
3285
  return n.forEach((r) => {
3273
- i.push(dt(r));
3286
+ i.push(ut(r));
3274
3287
  }), { keyframes: s, cssRules: i };
3275
3288
  }
3276
3289
  function Zs(t, e = !0) {
@@ -3288,4 +3301,4 @@ export {
3288
3301
  Zs as g,
3289
3302
  Xs as r
3290
3303
  };
3291
- //# sourceMappingURL=index-C6u4q815.mjs.map
3304
+ //# sourceMappingURL=index-C2yYG3we.mjs.map