@wix/interact 2.0.1 → 2.0.3

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,15 +1,15 @@
1
- function Ge(e) {
1
+ function Be(e) {
2
2
  return [...e.matchAll(/\[([-\w]+)]/g)].map(([t, n]) => n);
3
3
  }
4
4
  function R(e, t) {
5
- const n = Ge(t);
5
+ const n = Be(t);
6
6
  let s = 0;
7
7
  return n.length ? e.replace(/\[]/g, () => {
8
8
  const r = n[s++];
9
9
  return r !== void 0 ? `[${r}]` : "[]";
10
10
  }) : e;
11
11
  }
12
- class le {
12
+ class ue {
13
13
  animations;
14
14
  options;
15
15
  ready;
@@ -73,33 +73,33 @@ class le {
73
73
  return this.animations[0]?.playState;
74
74
  }
75
75
  }
76
- const Qe = (e) => e, Be = (e) => 1 - Math.cos(e * Math.PI / 2), Xe = (e) => Math.sin(e * Math.PI / 2), Ue = (e) => -(Math.cos(Math.PI * e) - 1) / 2, Je = (e) => e ** 2, Ze = (e) => 1 - (1 - e) ** 2, et = (e) => e < 0.5 ? 2 * e ** 2 : 1 - (-2 * e + 2) ** 2 / 2, tt = (e) => e ** 3, nt = (e) => 1 - (1 - e) ** 3, st = (e) => e < 0.5 ? 4 * e ** 3 : 1 - (-2 * e + 2) ** 3 / 2, it = (e) => e ** 4, rt = (e) => 1 - (1 - e) ** 4, ot = (e) => e < 0.5 ? 8 * e ** 4 : 1 - (-2 * e + 2) ** 4 / 2, at = (e) => e ** 5, ct = (e) => 1 - (1 - e) ** 5, ft = (e) => e < 0.5 ? 16 * e ** 5 : 1 - (-2 * e + 2) ** 5 / 2, lt = (e) => e === 0 ? 0 : 2 ** (10 * e - 10), ut = (e) => e === 1 ? 1 : 1 - 2 ** (-10 * e), dt = (e) => e === 0 ? 0 : e === 1 ? 1 : e < 0.5 ? 2 ** (20 * e - 10) / 2 : (2 - 2 ** (-20 * e + 10)) / 2, ht = (e) => 1 - Math.sqrt(1 - e ** 2), mt = (e) => Math.sqrt(1 - (e - 1) ** 2), pt = (e) => e < 0.5 ? (1 - Math.sqrt(1 - 4 * e ** 2)) / 2 : (Math.sqrt(-(2 * e - 3) * (2 * e - 1)) + 1) / 2, gt = (e) => 2.70158 * e ** 3 - 1.70158 * e ** 2, vt = (e) => 1 + 2.70158 * (e - 1) ** 3 + 1.70158 * (e - 1) ** 2, yt = (e, t = 1.70158 * 1.525) => e < 0.5 ? (2 * e) ** 2 * ((t + 1) * 2 * e - t) / 2 : ((2 * e - 2) ** 2 * ((t + 1) * (e * 2 - 2) + t) + 2) / 2, wt = {
76
+ const Qe = (e) => e, Xe = (e) => 1 - Math.cos(e * Math.PI / 2), Ue = (e) => Math.sin(e * Math.PI / 2), Je = (e) => -(Math.cos(Math.PI * e) - 1) / 2, Ze = (e) => e ** 2, et = (e) => 1 - (1 - e) ** 2, tt = (e) => e < 0.5 ? 2 * e ** 2 : 1 - (-2 * e + 2) ** 2 / 2, nt = (e) => e ** 3, st = (e) => 1 - (1 - e) ** 3, it = (e) => e < 0.5 ? 4 * e ** 3 : 1 - (-2 * e + 2) ** 3 / 2, rt = (e) => e ** 4, ot = (e) => 1 - (1 - e) ** 4, ct = (e) => e < 0.5 ? 8 * e ** 4 : 1 - (-2 * e + 2) ** 4 / 2, at = (e) => e ** 5, ft = (e) => 1 - (1 - e) ** 5, lt = (e) => e < 0.5 ? 16 * e ** 5 : 1 - (-2 * e + 2) ** 5 / 2, ut = (e) => e === 0 ? 0 : 2 ** (10 * e - 10), dt = (e) => e === 1 ? 1 : 1 - 2 ** (-10 * e), ht = (e) => e === 0 ? 0 : e === 1 ? 1 : e < 0.5 ? 2 ** (20 * e - 10) / 2 : (2 - 2 ** (-20 * e + 10)) / 2, mt = (e) => 1 - Math.sqrt(1 - e ** 2), gt = (e) => Math.sqrt(1 - (e - 1) ** 2), vt = (e) => e < 0.5 ? (1 - Math.sqrt(1 - 4 * e ** 2)) / 2 : (Math.sqrt(-(2 * e - 3) * (2 * e - 1)) + 1) / 2, pt = (e) => 2.70158 * e ** 3 - 1.70158 * e ** 2, yt = (e) => 1 + 2.70158 * (e - 1) ** 3 + 1.70158 * (e - 1) ** 2, Et = (e, t = 1.70158 * 1.525) => e < 0.5 ? (2 * e) ** 2 * ((t + 1) * 2 * e - t) / 2 : ((2 * e - 2) ** 2 * ((t + 1) * (e * 2 - 2) + t) + 2) / 2, wt = {
77
77
  linear: Qe,
78
- sineIn: Be,
79
- sineOut: Xe,
80
- sineInOut: Ue,
81
- quadIn: Je,
82
- quadOut: Ze,
83
- quadInOut: et,
84
- cubicIn: tt,
85
- cubicOut: nt,
86
- cubicInOut: st,
87
- quartIn: it,
88
- quartOut: rt,
89
- quartInOut: ot,
78
+ sineIn: Xe,
79
+ sineOut: Ue,
80
+ sineInOut: Je,
81
+ quadIn: Ze,
82
+ quadOut: et,
83
+ quadInOut: tt,
84
+ cubicIn: nt,
85
+ cubicOut: st,
86
+ cubicInOut: it,
87
+ quartIn: rt,
88
+ quartOut: ot,
89
+ quartInOut: ct,
90
90
  quintIn: at,
91
- quintOut: ct,
92
- quintInOut: ft,
93
- expoIn: lt,
94
- expoOut: ut,
95
- expoInOut: dt,
96
- circIn: ht,
97
- circOut: mt,
98
- circInOut: pt,
99
- backIn: gt,
100
- backOut: vt,
101
- backInOut: yt
102
- }, me = {
91
+ quintOut: ft,
92
+ quintInOut: lt,
93
+ expoIn: ut,
94
+ expoOut: dt,
95
+ expoInOut: ht,
96
+ circIn: mt,
97
+ circOut: gt,
98
+ circInOut: vt,
99
+ backIn: pt,
100
+ backOut: yt,
101
+ backInOut: Et
102
+ }, ve = {
103
103
  linear: "linear",
104
104
  ease: "ease",
105
105
  easeIn: "ease-in",
@@ -130,16 +130,16 @@ const Qe = (e) => e, Be = (e) => 1 - Math.cos(e * Math.PI / 2), Xe = (e) => Math
130
130
  backOut: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
131
131
  backInOut: "cubic-bezier(0.68, -0.55, 0.265, 1.55)"
132
132
  };
133
- function Et(e) {
133
+ function bt(e) {
134
134
  return e === "percentage" ? "%" : e || "px";
135
135
  }
136
136
  function D(e) {
137
- return e ? me[e] || e : me.linear;
137
+ return e ? ve[e] || e : ve.linear;
138
138
  }
139
- function bt(e) {
139
+ function St(e) {
140
140
  return e ? wt[e] : void 0;
141
141
  }
142
- class St {
142
+ class Tt {
143
143
  _animation;
144
144
  customEffect;
145
145
  progress;
@@ -150,8 +150,8 @@ class St {
150
150
  ...s,
151
151
  composite: "add"
152
152
  }), { timeline: o } = r;
153
- this._animation = new Animation(i, o), this._tickCbId = null, this.progress = null, this.customEffect = (a) => t(i.target, a), this._finishHandler = (a) => {
154
- this.effect.target?.getAnimations().find((f) => f === this._animation) || this.cancel();
153
+ this._animation = new Animation(i, o), this._tickCbId = null, this.progress = null, this.customEffect = (c) => t(i.target, c), this._finishHandler = (c) => {
154
+ this.effect.target?.getAnimations().find((u) => u === this._animation) || this.cancel();
155
155
  }, this.addEventListener("finish", this._finishHandler), this.addEventListener("remove", this._finishHandler);
156
156
  }
157
157
  // private tick method for customEffect loop implementation
@@ -282,17 +282,17 @@ class St {
282
282
  function It(e) {
283
283
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
284
284
  }
285
- var N = { exports: {} }, pe = N.exports, ge;
285
+ var W = { exports: {} }, pe = W.exports, ye;
286
286
  function Ot() {
287
- return ge || (ge = 1, (function(e) {
287
+ return ye || (ye = 1, (function(e) {
288
288
  (function(t) {
289
289
  var n = function() {
290
- }, s = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.msRequestAnimationFrame || function(c) {
291
- return setTimeout(c, 16);
290
+ }, s = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.msRequestAnimationFrame || function(a) {
291
+ return setTimeout(a, 16);
292
292
  };
293
293
  function r() {
294
- var c = this;
295
- c.reads = [], c.writes = [], c.raf = s.bind(t);
294
+ var a = this;
295
+ a.reads = [], a.writes = [], a.raf = s.bind(t);
296
296
  }
297
297
  r.prototype = {
298
298
  constructor: r,
@@ -304,8 +304,8 @@ function Ot() {
304
304
  *
305
305
  * @param {Array} tasks
306
306
  */
307
- runTasks: function(c) {
308
- for (var u; u = c.shift(); ) u();
307
+ runTasks: function(a) {
308
+ for (var f; f = a.shift(); ) f();
309
309
  },
310
310
  /**
311
311
  * Adds a job to the read batch and
@@ -315,8 +315,8 @@ function Ot() {
315
315
  * @param {Object} ctx the context to be bound to `fn` (optional).
316
316
  * @public
317
317
  */
318
- measure: function(c, u) {
319
- var d = u ? c.bind(u) : c;
318
+ measure: function(a, f) {
319
+ var d = f ? a.bind(f) : a;
320
320
  return this.reads.push(d), i(this), d;
321
321
  },
322
322
  /**
@@ -328,8 +328,8 @@ function Ot() {
328
328
  * @param {Object} ctx the context to be bound to `fn` (optional).
329
329
  * @public
330
330
  */
331
- mutate: function(c, u) {
332
- var d = u ? c.bind(u) : c;
331
+ mutate: function(a, f) {
332
+ var d = f ? a.bind(f) : a;
333
333
  return this.writes.push(d), i(this), d;
334
334
  },
335
335
  /**
@@ -339,8 +339,8 @@ function Ot() {
339
339
  * @return {Boolean} success
340
340
  * @public
341
341
  */
342
- clear: function(c) {
343
- return a(this.reads, c) || a(this.writes, c);
342
+ clear: function(a) {
343
+ return c(this.reads, a) || c(this.writes, a);
344
344
  },
345
345
  /**
346
346
  * Extend this FastDom with some
@@ -376,85 +376,85 @@ function Ot() {
376
376
  * @param {Object} props properties to mixin
377
377
  * @return {FastDom}
378
378
  */
379
- extend: function(c) {
380
- if (typeof c != "object") throw new Error("expected object");
381
- var u = Object.create(this);
382
- return f(u, c), u.fastdom = this, u.initialize && u.initialize(), u;
379
+ extend: function(a) {
380
+ if (typeof a != "object") throw new Error("expected object");
381
+ var f = Object.create(this);
382
+ return u(f, a), f.fastdom = this, f.initialize && f.initialize(), f;
383
383
  },
384
384
  // override this with a function
385
385
  // to prevent Errors in console
386
386
  // when tasks throw
387
387
  catch: null
388
388
  };
389
- function i(c) {
390
- c.scheduled || (c.scheduled = !0, c.raf(o.bind(null, c)));
389
+ function i(a) {
390
+ a.scheduled || (a.scheduled = !0, a.raf(o.bind(null, a)));
391
391
  }
392
- function o(c) {
393
- var u = c.writes, d = c.reads, g;
392
+ function o(a) {
393
+ var f = a.writes, d = a.reads, v;
394
394
  try {
395
- n("flushing reads", d.length), c.runTasks(d), n("flushing writes", u.length), c.runTasks(u);
396
- } catch (h) {
397
- g = h;
395
+ n("flushing reads", d.length), a.runTasks(d), n("flushing writes", f.length), a.runTasks(f);
396
+ } catch (m) {
397
+ v = m;
398
398
  }
399
- if (c.scheduled = !1, (d.length || u.length) && i(c), g)
400
- if (n("task errored", g.message), c.catch) c.catch(g);
401
- else throw g;
399
+ if (a.scheduled = !1, (d.length || f.length) && i(a), v)
400
+ if (n("task errored", v.message), a.catch) a.catch(v);
401
+ else throw v;
402
402
  }
403
- function a(c, u) {
404
- var d = c.indexOf(u);
405
- return !!~d && !!c.splice(d, 1);
403
+ function c(a, f) {
404
+ var d = a.indexOf(f);
405
+ return !!~d && !!a.splice(d, 1);
406
406
  }
407
- function f(c, u) {
408
- for (var d in u)
409
- u.hasOwnProperty(d) && (c[d] = u[d]);
407
+ function u(a, f) {
408
+ for (var d in f)
409
+ f.hasOwnProperty(d) && (a[d] = f[d]);
410
410
  }
411
411
  var l = t.fastdom = t.fastdom || new r();
412
412
  e.exports = l;
413
413
  })(typeof window < "u" ? window : typeof pe < "u" ? pe : globalThis);
414
- })(N)), N.exports;
414
+ })(W)), W.exports;
415
415
  }
416
416
  var _t = Ot();
417
- const S = /* @__PURE__ */ It(_t), ie = {};
417
+ const S = /* @__PURE__ */ It(_t), re = {};
418
418
  function kt(e) {
419
- Object.assign(ie, e);
419
+ Object.assign(re, e);
420
420
  }
421
- function Tt(e) {
422
- return e in ie ? ie[e] : (console.warn(
421
+ function Ct(e) {
422
+ return e in re ? re[e] : (console.warn(
423
423
  `${e} not found in registry. Please make sure to import and register the preset.`
424
424
  ), null);
425
425
  }
426
- function T(e, t) {
426
+ function k(e, t) {
427
427
  return e ? document.getElementById(e) : null;
428
428
  }
429
429
  function xt(e, t) {
430
430
  return e?.matches(`[data-motion-part~="${t}"]`) ? e : e?.querySelector(`[data-motion-part~="${t}"]`);
431
431
  }
432
- function Ct(e) {
432
+ function At(e) {
433
433
  const t = e.alternate ? "alternate" : "";
434
434
  return e.reversed ? `${t ? `${t}-` : ""}reverse` : t || "normal";
435
435
  }
436
- function te(e) {
437
- return `${e.value}${Et(e.unit)}`;
436
+ function ne(e) {
437
+ return `${e.value}${bt(e.unit)}`;
438
438
  }
439
- function ve(e, t, n) {
440
- return `${e.name || "cover"} ${n && e.offset.unit !== "percentage" ? `calc(100% + ${te(e.offset)}${t ? ` + ${t}` : ""})` : t ? `calc(${te(e.offset)} + ${t})` : te(e.offset)}`;
439
+ function Ee(e, t, n) {
440
+ return `${e.name || "cover"} ${n && e.offset.unit !== "percentage" ? `calc(100% + ${ne(e.offset)}${t ? ` + ${t}` : ""})` : t ? `calc(${ne(e.offset)} + ${t})` : ne(e.offset)}`;
441
441
  }
442
442
  function Lt(e) {
443
443
  return {
444
- start: ve(e.startOffset, e.startOffsetAdd),
445
- end: ve(e.endOffset, e.endOffsetAdd, !0)
444
+ start: Ee(e.startOffset, e.startOffsetAdd),
445
+ end: Ee(e.endOffset, e.endOffsetAdd, !0)
446
446
  };
447
447
  }
448
- function Pe(e) {
448
+ function Re(e) {
449
449
  return (t) => S.measure(() => t(e));
450
450
  }
451
451
  function $e(e) {
452
452
  return (t) => S.mutate(() => t(e));
453
453
  }
454
- function K(e) {
454
+ function B(e) {
455
455
  if (e.namedEffect) {
456
456
  const t = e.namedEffect.type;
457
- return typeof t == "string" ? Tt(t) : null;
457
+ return typeof t == "string" ? Ct(t) : null;
458
458
  } else if (e.keyframeEffect) {
459
459
  const t = (s) => {
460
460
  const { name: r, keyframes: i } = s.keyframeEffect;
@@ -468,16 +468,16 @@ function K(e) {
468
468
  return (t) => [{ ...t, keyframes: [] }];
469
469
  return null;
470
470
  }
471
- function At(e, t, n) {
471
+ function Pt(e, t, n) {
472
472
  return e.map((s, r) => {
473
473
  const i = {
474
474
  fill: s.fill,
475
475
  easing: D(s.easing),
476
476
  iterations: s.iterations === 0 ? 1 / 0 : s.iterations || 1,
477
477
  composite: s.composite,
478
- direction: Ct(s)
478
+ direction: At(s)
479
479
  };
480
- return Re(t) ? (i.duration = s.duration, i.delay = s.delay || 0) : window.ViewTimeline && t?.trigger === "view-progress" ? i.duration = "auto" : (i.duration = 99.99, i.delay = 0.01), {
480
+ return Fe(t) ? (i.duration = s.duration, i.delay = s.delay || 0) : window.ViewTimeline && t?.trigger === "view-progress" ? i.duration = "auto" : (i.duration = 99.99, i.delay = 0.01), {
481
481
  effect: s,
482
482
  options: i,
483
483
  id: n && `${n}-${r + 1}`,
@@ -485,212 +485,212 @@ function At(e, t, n) {
485
485
  };
486
486
  });
487
487
  }
488
- function Re(e) {
488
+ function Fe(e) {
489
489
  return !e || e.trigger !== "pointer-move" && e.trigger !== "view-progress";
490
490
  }
491
- function ye(e, t, n, s, r) {
491
+ function we(e, t, n, s, r) {
492
492
  if (e) {
493
- if (Re(s) && (t.duration = t.duration || 1, r?.reducedMotion))
493
+ if (Fe(s) && (t.duration = t.duration || 1, r?.reducedMotion))
494
494
  if (t.iterations === 1 || t.iterations == null)
495
495
  t = { ...t, duration: 1 };
496
496
  else
497
497
  return [];
498
498
  let i;
499
- return n instanceof HTMLElement && (i = { measure: Pe(n), mutate: $e(n) }), e.web ? e.web(t, i, r) : e(t, i, r);
499
+ return n instanceof HTMLElement && (i = { measure: Re(n), mutate: $e(n) }), e.web ? e.web(t, i, r) : e(t, i, r);
500
500
  }
501
501
  return [];
502
502
  }
503
- function ue(e, t, n, s, r) {
504
- const i = e instanceof HTMLElement ? e : T(e);
503
+ function de(e, t, n, s, r) {
504
+ const i = e instanceof HTMLElement ? e : k(e);
505
505
  if (n?.trigger === "pointer-move" && !t.keyframeEffect) {
506
506
  let d = t;
507
507
  t.customEffect && (d = {
508
508
  ...t,
509
509
  namedEffect: { id: "", type: "CustomMouse" }
510
510
  });
511
- const g = K(
511
+ const v = B(
512
512
  d
513
- ), h = ye(
514
- g,
513
+ ), m = we(
514
+ v,
515
515
  t,
516
516
  i,
517
517
  n,
518
518
  s
519
519
  );
520
- return typeof h != "function" ? null : h(i);
520
+ return typeof m != "function" ? null : m(i);
521
521
  }
522
- const o = K(t), a = ye(
522
+ const o = B(t), c = we(
523
523
  o,
524
524
  t,
525
525
  i,
526
526
  n,
527
527
  s
528
528
  );
529
- if (!a || a.length === 0)
529
+ if (!c || c.length === 0)
530
530
  return null;
531
- const f = At(a, n, t.effectId);
531
+ const u = Pt(c, n, t.effectId);
532
532
  let l;
533
- const c = n?.trigger === "view-progress";
534
- c && window.ViewTimeline && (l = new ViewTimeline({
535
- subject: n.element || T(n.componentId)
533
+ const a = n?.trigger === "view-progress";
534
+ a && window.ViewTimeline && (l = new ViewTimeline({
535
+ subject: n.element || k(n.componentId)
536
536
  }));
537
- const u = f.map(({ effect: d, options: g, id: h, part: m }) => {
538
- const p = m ? xt(i, m) : i, v = new KeyframeEffect(p || null, [], g);
537
+ const f = u.map(({ effect: d, options: v, id: m, part: h }) => {
538
+ const g = h ? xt(i, h) : i, y = new KeyframeEffect(g || null, [], v);
539
539
  S.mutate(() => {
540
- "timing" in d && v.updateTiming(d.timing), v.setKeyframes(d.keyframes);
540
+ "timing" in d && y.updateTiming(d.timing), y.setKeyframes(d.keyframes);
541
541
  });
542
- const y = c && l ? { timeline: l } : {}, E = typeof d.customEffect == "function" ? new St(
542
+ const p = a && l ? { timeline: l } : {}, w = typeof d.customEffect == "function" ? new Tt(
543
543
  d.customEffect,
544
- p || null,
545
- g,
546
- y
547
- ) : new Animation(v, y.timeline);
548
- if (c)
544
+ g || null,
545
+ v,
546
+ p
547
+ ) : new Animation(y, p.timeline);
548
+ if (a)
549
549
  if (l)
550
550
  S.mutate(() => {
551
- const { start: b, end: I } = Lt(d);
552
- E.rangeStart = b, E.rangeEnd = I, E.play();
551
+ const { start: b, end: T } = Lt(d);
552
+ w.rangeStart = b, w.rangeEnd = T, w.play();
553
553
  });
554
554
  else {
555
- const { startOffset: b, endOffset: I } = t;
555
+ const { startOffset: b, endOffset: T } = t;
556
556
  S.mutate(() => {
557
- const L = d.startOffset || b, J = d.endOffset || I;
558
- Object.assign(E, {
557
+ const C = d.startOffset || b, Z = d.endOffset || T;
558
+ Object.assign(w, {
559
559
  start: {
560
- name: L.name,
561
- offset: L.offset?.value,
560
+ name: C.name,
561
+ offset: C.offset?.value,
562
562
  add: d.startOffsetAdd
563
563
  },
564
564
  end: {
565
- name: J.name,
566
- offset: J.offset?.value,
565
+ name: Z.name,
566
+ offset: Z.offset?.value,
567
567
  add: d.endOffsetAdd
568
568
  }
569
569
  });
570
570
  });
571
571
  }
572
- return h && (E.id = h), E;
572
+ return m && (w.id = m), w;
573
573
  });
574
- return new le(u, {
574
+ return new ue(f, {
575
575
  ...t,
576
576
  trigger: { ...n || {} },
577
577
  // make sure the group is ready after all animation targets are measured and mutated
578
578
  measured: new Promise((d) => S.mutate(d))
579
579
  });
580
580
  }
581
- function Pt(e, t, n) {
582
- const s = K(t), r = e instanceof HTMLElement ? e : T(e);
581
+ function Rt(e, t, n) {
582
+ const s = B(t), r = e instanceof HTMLElement ? e : k(e);
583
583
  if (s && s.prepare && r) {
584
- const i = { measure: Pe(r), mutate: $e(r) };
584
+ const i = { measure: Re(r), mutate: $e(r) };
585
585
  s.prepare(t, i);
586
586
  }
587
587
  n && S.mutate(n);
588
588
  }
589
589
  function $t(e, t) {
590
- const n = K(t);
590
+ const n = B(t);
591
591
  if (!n)
592
592
  return null;
593
593
  if (!n.style)
594
- return t.effectId && e ? Rt(e, t.effectId) : null;
595
- const s = n.getNames(t), i = (typeof e == "string" ? T(e) : e)?.getAnimations(), o = i?.map((f) => f.animationName) || [], a = [];
596
- return s.forEach((f) => {
597
- o.includes(f) && a.push(
598
- i?.find((l) => l.animationName === f)
594
+ return t.effectId && e ? Ft(e, t.effectId) : null;
595
+ const s = n.getNames(t), i = (typeof e == "string" ? k(e) : e)?.getAnimations(), o = i?.map((u) => u.animationName) || [], c = [];
596
+ return s.forEach((u) => {
597
+ o.includes(u) && c.push(
598
+ i?.find((l) => l.animationName === u)
599
599
  );
600
- }), a?.length ? new le(a) : null;
600
+ }), c?.length ? new ue(c) : null;
601
601
  }
602
- function Rt(e, t) {
603
- const s = (typeof e == "string" ? T(e) : e)?.getAnimations().filter((r) => {
602
+ function Ft(e, t) {
603
+ const s = (typeof e == "string" ? k(e) : e)?.getAnimations().filter((r) => {
604
604
  const i = r.id || r.animationName;
605
605
  return i ? i.startsWith(t) : !0;
606
606
  });
607
- return s?.length ? new le(s) : null;
607
+ return s?.length ? new ue(s) : null;
608
608
  }
609
609
  function Me(e, t, n, s = {}) {
610
- const { disabled: r, allowActiveEvent: i, ...o } = s, a = ue(e, t, n, o);
611
- if (!a)
610
+ const { disabled: r, allowActiveEvent: i, ...o } = s, c = de(e, t, n, o);
611
+ if (!c)
612
612
  return null;
613
- let f = {};
613
+ let u = {};
614
614
  if (n.trigger === "view-progress" && !window.ViewTimeline) {
615
- const l = n.element || T(n.componentId), { ready: c } = a;
616
- return a.animations.map((u) => ({
615
+ const l = n.element || k(n.componentId), { ready: a } = c;
616
+ return c.animations.map((f) => ({
617
617
  /* we use getters for start and end in order to access the animation's start and end
618
618
  only when initializing the scrub scene rather than immediately */
619
619
  get start() {
620
- return u.start;
620
+ return f.start;
621
621
  },
622
622
  get end() {
623
- return u.end;
623
+ return f.end;
624
624
  },
625
625
  viewSource: l,
626
- ready: c,
626
+ ready: a,
627
627
  getProgress() {
628
- return a.getProgress();
628
+ return c.getProgress();
629
629
  },
630
- effect(d, g) {
631
- const { activeDuration: h } = u.effect.getComputedTiming(), { delay: m } = u.effect.getTiming();
632
- u.currentTime = ((m || 0) + (h || 0)) * g;
630
+ effect(d, v) {
631
+ const { activeDuration: m } = f.effect.getComputedTiming(), { delay: h } = f.effect.getTiming();
632
+ f.currentTime = ((h || 0) + (m || 0)) * v;
633
633
  },
634
634
  disabled: r,
635
635
  destroy() {
636
- u.cancel();
636
+ f.cancel();
637
637
  }
638
638
  }));
639
639
  } else if (n.trigger === "pointer-move") {
640
- const l = t, { centeredToTarget: c, transitionDuration: u, transitionEasing: d } = l, g = n.axis;
640
+ const l = t, { centeredToTarget: a, transitionDuration: f, transitionEasing: d } = l, v = n.axis;
641
641
  if (l.keyframeEffect) {
642
- const h = a;
643
- return h.animations?.length === 0 ? null : {
642
+ const m = c;
643
+ return m.animations?.length === 0 ? null : {
644
644
  target: void 0,
645
- centeredToTarget: c,
646
- ready: h.ready,
645
+ centeredToTarget: a,
646
+ ready: m.ready,
647
647
  _currentProgress: 0,
648
648
  getProgress() {
649
649
  return this._currentProgress;
650
650
  },
651
- effect(p, v) {
652
- const y = g === "x" ? v.x : v.y;
653
- this._currentProgress = y, h.progress(y);
651
+ effect(g, y) {
652
+ const p = v === "x" ? y.x : y.y;
653
+ this._currentProgress = p, m.progress(p);
654
654
  },
655
655
  disabled: r ?? !1,
656
656
  destroy() {
657
- h.cancel();
657
+ m.cancel();
658
658
  }
659
659
  };
660
660
  }
661
- f = {
662
- centeredToTarget: c,
661
+ u = {
662
+ centeredToTarget: a,
663
663
  allowActiveEvent: i
664
- }, t.customEffect && u && (f.transitionDuration = u, f.transitionEasing = bt(d)), f.target = a.target;
664
+ }, t.customEffect && f && (u.transitionDuration = f, u.transitionEasing = St(d)), u.target = c.target;
665
665
  }
666
666
  return {
667
- ...f,
667
+ ...u,
668
668
  getProgress() {
669
- return a.getProgress();
669
+ return c.getProgress();
670
670
  },
671
- effect(l, c, u, d) {
672
- a.progress(
673
- u ? {
671
+ effect(l, a, f, d) {
672
+ c.progress(
673
+ f ? {
674
674
  // @ts-expect-error spread error on p
675
- ...c,
676
- v: u,
675
+ ...a,
676
+ v: f,
677
677
  active: d
678
- } : c
678
+ } : a
679
679
  );
680
680
  },
681
681
  disabled: r,
682
682
  destroy() {
683
- a.cancel();
683
+ c.cancel();
684
684
  }
685
685
  };
686
686
  }
687
- function U(e, t, n, s = !1) {
687
+ function he(e, t, n, s = !1) {
688
688
  const r = $t(e, t);
689
689
  return r ? (r.ready = new Promise((i) => {
690
- Pt(e, t, i);
691
- }), r) : ue(e, t, n, { reducedMotion: s });
690
+ Rt(e, t, i);
691
+ }), r) : de(e, t, n, { reducedMotion: s });
692
692
  }
693
- function V(e, t) {
693
+ function j(e, t) {
694
694
  return t.includes("&") ? t.replace(/&/g, e) : `${e}${t}`;
695
695
  }
696
696
  function Mt() {
@@ -702,7 +702,7 @@ function Mt() {
702
702
  // 97 for "a"
703
703
  );
704
704
  }
705
- function Ft({
705
+ function qt({
706
706
  key: e,
707
707
  effectId: t,
708
708
  transition: n,
@@ -712,62 +712,62 @@ function Ft({
712
712
  }) {
713
713
  let o = [];
714
714
  if (n?.styleProperties) {
715
- const { duration: h, easing: m, delay: p } = n;
716
- h && (n.styleProperties.some(
717
- (y) => y.name.startsWith("--")
715
+ const { duration: m, easing: h, delay: g } = n;
716
+ m && (n.styleProperties.some(
717
+ (p) => p.name.startsWith("--")
718
718
  ) ? o = [
719
- `all ${h}ms ${D(m || "ease")}${p ? ` ${p}ms` : ""}`,
719
+ `all ${m}ms ${D(h || "ease")}${g ? ` ${g}ms` : ""}`,
720
720
  "visibility 0s"
721
721
  ] : o = n.styleProperties.map(
722
- (y) => `${y.name} ${h}ms ${D(
723
- m || "ease"
724
- )}${p ? ` ${p}ms` : ""}`
722
+ (p) => `${p.name} ${m}ms ${D(
723
+ h || "ease"
724
+ )}${g ? ` ${g}ms` : ""}`
725
725
  )), s = n.styleProperties;
726
726
  } else
727
- o = s?.filter((h) => h.duration).map(
728
- (h) => `${h.name} ${h.duration}ms ${D(h.easing) || "ease"}${h.delay ? ` ${h.delay}ms` : ""}`
727
+ o = s?.filter((m) => m.duration).map(
728
+ (m) => `${m.name} ${m.duration}ms ${D(m.easing) || "ease"}${m.delay ? ` ${m.delay}ms` : ""}`
729
729
  ) || [];
730
- const a = s?.map((h) => `${h.name}: ${h.value};`) || [], f = e.replace(/"/g, "'"), l = `:is(:state(${t}), :--${t}) ${r}`, c = `[data-interact-effect~="${t}"] ${r}`, u = i ? V(l, i) : l, d = i ? V(c, i) : c, g = [
731
- `${u},
730
+ const c = s?.map((m) => `${m.name}: ${m.value};`) || [], u = e.replace(/"/g, "'"), l = `:is(:state(${t}), :--${t}) ${r}`, a = `[data-interact-effect~="${t}"] ${r}`, f = i ? j(l, i) : l, d = i ? j(a, i) : a, v = [
731
+ `${f},
732
732
  ${d} {
733
- ${a.join(`
733
+ ${c.join(`
734
734
  `)}
735
735
  }`
736
736
  ];
737
737
  if (o.length) {
738
- const h = `[data-interact-key="${f}"] ${r}`, m = i ? V(h, i) : h;
739
- g.push(`@media (prefers-reduced-motion: no-preference) { ${m} {
738
+ const m = `[data-interact-key="${u}"] ${r}`, h = i ? j(m, i) : m;
739
+ v.push(`@media (prefers-reduced-motion: no-preference) { ${h} {
740
740
  transition: ${o.join(", ")};
741
741
  } }`);
742
742
  }
743
- return g;
743
+ return v;
744
744
  }
745
- function M(e, t) {
745
+ function $(e, t) {
746
746
  const n = (e || []).filter((i) => t[i]?.type === "media" && t[i].predicate).map((i) => t[i].predicate).join(") and ("), s = n && `(${n})`;
747
747
  return s && window.matchMedia(s);
748
748
  }
749
- function G(e, t) {
749
+ function Q(e, t) {
750
750
  for (const n of e || []) {
751
751
  const s = t[n];
752
752
  if (s?.type === "selector" && s.predicate)
753
753
  return s.predicate;
754
754
  }
755
755
  }
756
- const F = {
756
+ const q = {
757
757
  rangeStart: { name: "cover", offset: { value: 0, unit: "percentage" } },
758
758
  rangeEnd: { name: "cover", offset: { value: 100, unit: "percentage" } }
759
759
  };
760
760
  function Ht(e, t) {
761
- const n = e?.name ?? F.rangeStart.name, s = t?.name ?? e?.name ?? F.rangeEnd.name, r = {
761
+ const n = e?.name ?? q.rangeStart.name, s = t?.name ?? e?.name ?? q.rangeEnd.name, r = {
762
762
  name: n,
763
- offset: e?.offset || F.rangeStart.offset
763
+ offset: e?.offset || q.rangeStart.offset
764
764
  }, i = {
765
765
  name: s,
766
- offset: t?.offset || F.rangeEnd.offset
766
+ offset: t?.offset || q.rangeEnd.offset
767
767
  };
768
768
  return { startOffset: r, endOffset: i };
769
769
  }
770
- function x(e) {
770
+ function F(e) {
771
771
  if ("keyframeEffect" in e && !e.keyframeEffect.name && "effectId" in e && (e.keyframeEffect.name = e.effectId), "duration" in e)
772
772
  return {
773
773
  id: "",
@@ -781,121 +781,121 @@ function x(e) {
781
781
  ...s
782
782
  };
783
783
  }
784
- function O(e, t, n) {
784
+ function I(e, t, n) {
785
785
  let s = e.get(t);
786
786
  s || (s = /* @__PURE__ */ new Set(), e.set(t, s)), s.add(n);
787
787
  }
788
- function C(e, t) {
788
+ function M(e, t) {
789
789
  e.get(t)?.forEach((s) => {
790
790
  const { source: r, target: i, cleanup: o } = s;
791
791
  o();
792
- const a = r === t ? i : r;
793
- e.get(a)?.delete(s);
792
+ const c = r === t ? i : r;
793
+ e.get(c)?.delete(s);
794
794
  }), e.delete(t);
795
795
  }
796
- const qt = {
796
+ const zt = {
797
797
  root: null,
798
798
  rootMargin: "0px 0px -10% 0px",
799
799
  threshold: [0]
800
- }, zt = {
800
+ }, Nt = {
801
801
  root: null,
802
802
  rootMargin: "0px",
803
803
  threshold: [0]
804
- }, P = {}, Q = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakSet(), j = /* @__PURE__ */ new WeakMap();
805
- let Fe = {}, A = null;
806
- function Dt(e) {
807
- Fe = e;
804
+ }, L = {}, X = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakSet(), G = /* @__PURE__ */ new WeakMap();
805
+ let qe = {}, x = null;
806
+ function Vt(e) {
807
+ qe = e;
808
808
  }
809
809
  function He(e, t) {
810
- Q.get(e)?.forEach(({ source: s, handler: r }) => {
810
+ X.get(e)?.forEach(({ source: s, handler: r }) => {
811
811
  s === e && r(t);
812
812
  });
813
813
  }
814
- function we() {
815
- return A || (A = new IntersectionObserver((e) => {
814
+ function be() {
815
+ return x || (x = new IntersectionObserver((e) => {
816
816
  e.forEach((t) => {
817
817
  const n = t.target;
818
818
  t.isIntersecting || He(n, !1);
819
819
  });
820
- }, zt), A);
820
+ }, Nt), x);
821
821
  }
822
- function qe(e, t = !1) {
822
+ function ze(e, t = !1) {
823
823
  const n = JSON.stringify({ ...e, isSafeMode: t });
824
- if (P[n])
825
- return P[n];
826
- const s = t ? qt : {
824
+ if (L[n])
825
+ return L[n];
826
+ const s = t ? zt : {
827
827
  root: null,
828
828
  rootMargin: e.inset ? `${e.inset} 0px ${e.inset}` : "0px",
829
829
  threshold: e.threshold
830
830
  }, r = new IntersectionObserver((i) => {
831
831
  i.forEach((o) => {
832
- const a = o.target, f = !W.has(a);
833
- if (f && (W.add(a), e.useSafeViewEnter && !o.isIntersecting)) {
832
+ const c = o.target, u = !Y.has(c);
833
+ if (u && (Y.add(c), e.useSafeViewEnter && !o.isIntersecting)) {
834
834
  S.measure(() => {
835
- const c = o.boundingClientRect.height, u = o.rootBounds?.height;
836
- if (!u)
835
+ const a = o.boundingClientRect.height, f = o.rootBounds?.height;
836
+ if (!f)
837
837
  return;
838
838
  const d = Array.isArray(e.threshold) ? Math.min(...e.threshold) : e.threshold;
839
- d && c * d > u && S.mutate(() => {
840
- r.unobserve(a);
841
- const h = qe(e, !0);
842
- j.set(a, h), h.observe(a);
839
+ d && a * d > f && S.mutate(() => {
840
+ r.unobserve(c);
841
+ const m = ze(e, !0);
842
+ G.set(c, m), m.observe(c);
843
843
  });
844
844
  });
845
845
  return;
846
846
  }
847
847
  const l = e.type || "once";
848
- (o.isIntersecting || l === "alternate" && !f) && (He(a, o.isIntersecting), l === "once" && (r.unobserve(o.target), W.delete(a)));
848
+ (o.isIntersecting || l === "alternate" && !u) && (He(c, o.isIntersecting), l === "once" && (r.unobserve(o.target), Y.delete(c)));
849
849
  });
850
850
  }, s);
851
- return P[n] = r, r;
851
+ return L[n] = r, r;
852
852
  }
853
- function Nt(e, t, n, s = {}, { reducedMotion: r, selectorCondition: i } = {}) {
854
- const o = { ...Fe, ...s }, a = o.type || "once", f = U(
853
+ function Dt(e, t, n, s = {}, { reducedMotion: r, selectorCondition: i } = {}) {
854
+ const o = { ...qe, ...s }, c = o.type || "once", u = he(
855
855
  t,
856
- x(n),
856
+ F(n),
857
857
  void 0,
858
858
  r
859
859
  );
860
- if (!f)
860
+ if (!u)
861
861
  return;
862
- const l = qe(o);
863
- a !== "once" && f.persist?.();
864
- let c = !0;
865
- const g = { source: e, target: t, handler: (h) => {
866
- i && !t.matches(i) || (a === "once" ? h && f.play(() => {
867
- const m = () => {
862
+ const l = ze(o);
863
+ c !== "once" && u.persist?.();
864
+ let a = !0;
865
+ const v = { source: e, target: t, handler: (m) => {
866
+ i && !t.matches(i) || (c === "once" ? m && u.play(() => {
867
+ const h = () => {
868
868
  t.dataset.interactEnter = "start";
869
869
  };
870
- f.isCSS ? (S.mutate(() => {
871
- requestAnimationFrame(m);
872
- }), f.onFinish(() => {
870
+ u.isCSS ? (S.mutate(() => {
871
+ requestAnimationFrame(h);
872
+ }), u.onFinish(() => {
873
873
  S.mutate(() => {
874
874
  t.dataset.interactEnter = "done";
875
875
  });
876
- })) : S.mutate(m);
877
- }) : a === "alternate" ? c && h ? (c = !1, f.play()) : c || f.reverse() : a === "repeat" ? h ? (f.progress(0), f.play()) : (f.pause(), f.progress(0)) : a === "state" && (h ? f.play() : f.pause()));
876
+ })) : S.mutate(h);
877
+ }) : c === "alternate" ? a && m ? (a = !1, u.play()) : a || u.reverse() : c === "repeat" ? m ? (u.progress(0), u.play()) : (u.pause(), u.progress(0)) : c === "state" && (m ? u.play() : u.pause()));
878
878
  }, cleanup: () => {
879
- (j.get(e) || l).unobserve(e), (a === "repeat" || a === "state") && we().unobserve(e), f.cancel(), W.delete(e), j.delete(e);
879
+ (G.get(e) || l).unobserve(e), (c === "repeat" || c === "state") && be().unobserve(e), u.cancel(), Y.delete(e), G.delete(e);
880
880
  } };
881
- O(Q, e, g), O(Q, t, g), j.set(e, l), l.observe(e), (a === "repeat" || a === "state") && we().observe(e);
881
+ I(X, e, v), I(X, t, v), G.set(e, l), l.observe(e), (c === "repeat" || c === "state") && be().observe(e);
882
882
  }
883
- function Vt(e) {
884
- C(Q, e);
883
+ function Wt(e) {
884
+ M(X, e);
885
885
  }
886
- function Wt() {
887
- A = null, Object.keys(P).forEach((e) => delete P[e]);
886
+ function jt() {
887
+ x = null, Object.keys(L).forEach((e) => delete L[e]);
888
888
  }
889
- const Ee = {
890
- add: Nt,
891
- remove: Vt,
892
- setOptions: Dt,
893
- reset: Wt
889
+ const Se = {
890
+ add: Dt,
891
+ remove: Wt,
892
+ setOptions: Vt,
893
+ reset: jt
894
894
  };
895
- function ze(e, t) {
895
+ function Ne(e, t) {
896
896
  return Object.assign(Object.create(t), e);
897
897
  }
898
- function jt(e, t, n, s) {
898
+ function Yt(e, t, n, s) {
899
899
  let r = e * (1 - n) + t * n;
900
900
  if (s) {
901
901
  const i = r - e;
@@ -906,7 +906,7 @@ function jt(e, t, n, s) {
906
906
  }
907
907
  return r;
908
908
  }
909
- function Yt(e) {
909
+ function Gt(e) {
910
910
  let t = !1;
911
911
  return function() {
912
912
  t || (t = !0, window.requestAnimationFrame(() => {
@@ -914,7 +914,7 @@ function Yt(e) {
914
914
  }));
915
915
  };
916
916
  }
917
- function be(e, t) {
917
+ function Te(e, t) {
918
918
  let n = 0;
919
919
  return function() {
920
920
  n && window.clearTimeout(n), n = window.setTimeout(() => {
@@ -924,102 +924,102 @@ function be(e, t) {
924
924
  }
925
925
  function Kt(e, t) {
926
926
  const n = e.match(/^calc\s*\(\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\+\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\)\s*$/);
927
- return B(n[1], t) + B(n[6], t);
927
+ return U(n[1], t) + U(n[6], t);
928
928
  }
929
- function B(e, t) {
929
+ function U(e, t) {
930
930
  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) ? Kt(e, t) : parseInt(e) || 0 : 0;
931
931
  }
932
- function _(e, t, n) {
933
- const { name: s, offset: r = 0 } = e, { start: i, end: o } = n, a = o - i, f = r / 100;
934
- let l, c;
935
- return s === "entry" ? (l = i - t, c = Math.min(t, a)) : s === "entry-crossing" ? (l = i - t, c = a) : s === "contain" ? (l = Math.min(o - t, i), c = Math.abs(t - a)) : s === "exit" ? (l = Math.max(i, o - t), c = Math.min(t, a)) : s === "exit-crossing" ? (l = i, c = a) : s === "cover" && (l = i - t, c = a + t), l + f * c | 0;
932
+ function O(e, t, n) {
933
+ const { name: s, offset: r = 0 } = e, { start: i, end: o } = n, c = o - i, u = r / 100;
934
+ let l, a;
935
+ return s === "entry" ? (l = i - t, a = Math.min(t, c)) : s === "entry-crossing" ? (l = i - t, a = c) : s === "contain" ? (l = Math.min(o - t, i), a = Math.abs(t - c)) : s === "exit" ? (l = Math.max(i, o - t), a = Math.min(t, c)) : s === "exit-crossing" ? (l = i, a = c) : s === "cover" && (l = i - t, a = c + t), l + u * a | 0;
936
936
  }
937
- function ne(e, t, n, s, r) {
937
+ function se(e, t, n, s, r) {
938
938
  let i = 0;
939
939
  const o = { start: t, end: n };
940
- return e.forEach((a, f) => {
941
- i += a.offset;
942
- const l = a.sticky;
940
+ return e.forEach((c, u) => {
941
+ i += c.offset;
942
+ const l = c.sticky;
943
943
  if (l) {
944
- if ("end" in l && e[f - 1]?.element) {
945
- const d = ((r ? a.element.offsetWidth : a.element.offsetHeight) || 0) + l.end - s, g = i + d - a.offset, h = g < o.start, m = !h && g <= n;
946
- let p = 0;
947
- (h || m) && (p = a.offset, o.end += p), h && (o.start += p);
944
+ if ("end" in l && e[u - 1]?.element) {
945
+ const d = ((r ? c.element.offsetWidth : c.element.offsetHeight) || 0) + l.end - s, v = i + d - c.offset, m = v < o.start, h = !m && v <= n;
946
+ let g = 0;
947
+ (m || h) && (g = c.offset, o.end += g), m && (o.start += g);
948
948
  }
949
949
  if ("start" in l) {
950
- const c = i - l.start, u = c < o.start, d = !u && c <= o.end;
951
- let g = 0;
952
- const h = e[f - 1]?.element;
953
- if (h) {
954
- if (u || d) {
955
- const m = (r ? h.offsetWidth : h.offsetHeight) || 0, p = a.offset, v = (r ? a.element.offsetWidth : a.element.offsetHeight) || 0;
956
- g = m - (p + v), i += g, o.end += g;
950
+ const a = i - l.start, f = a < o.start, d = !f && a <= o.end;
951
+ let v = 0;
952
+ const m = e[u - 1]?.element;
953
+ if (m) {
954
+ if (f || d) {
955
+ const h = (r ? m.offsetWidth : m.offsetHeight) || 0, g = c.offset, y = (r ? c.element.offsetWidth : c.element.offsetHeight) || 0;
956
+ v = h - (g + y), i += v, o.end += v;
957
957
  }
958
- u && (o.start += g);
958
+ f && (o.start += v);
959
959
  }
960
960
  }
961
961
  }
962
962
  }), o;
963
963
  }
964
- function Gt(e, t, n, s, r, i) {
965
- const { start: o, end: a, duration: f } = e;
966
- let l = o, c = a, u = e.startRange, d = e.endRange, g;
967
- if (typeof f == "string") {
968
- u = { name: f, offset: 0 }, d = { name: f, offset: 100 }, l = _(u, n, t), c = _(d, n, t), g = c - l;
969
- const h = ne(i, l, c, n, s);
970
- l = h.start, c = h.end;
964
+ function Bt(e, t, n, s, r, i) {
965
+ const { start: o, end: c, duration: u } = e;
966
+ let l = o, a = c, f = e.startRange, d = e.endRange, v;
967
+ if (typeof u == "string") {
968
+ f = { name: u, offset: 0 }, d = { name: u, offset: 100 }, l = O(f, n, t), a = O(d, n, t), v = a - l;
969
+ const m = se(i, l, a, n, s);
970
+ l = m.start, a = m.end;
971
971
  } else {
972
- if (u || o?.name) {
973
- u = u || o;
974
- const h = B(u.add, r), m = _({ ...u, offset: 0 }, n, t), p = _({ ...u, offset: 100 }, n, t), v = ne(i, m, p, n, s);
975
- l = v.start + u.offset / 100 * (v.end - v.start) + h;
972
+ if (f || o?.name) {
973
+ f = f || o;
974
+ const m = U(f.add, r), h = O({ ...f, offset: 0 }, n, t), g = O({ ...f, offset: 100 }, n, t), y = se(i, h, g, n, s);
975
+ l = y.start + f.offset / 100 * (y.end - y.start) + m;
976
976
  }
977
- if (d || a?.name) {
978
- d = d || a;
979
- const h = B(d.add, r), m = _({ ...d, offset: 0 }, n, t), p = _({ ...d, offset: 100 }, n, t), v = ne(i, m, p, n, s);
980
- c = v.start + d.offset / 100 * (v.end - v.start) + h;
981
- } else typeof f == "number" && (c = l + f);
977
+ if (d || c?.name) {
978
+ d = d || c;
979
+ const m = U(d.add, r), h = O({ ...d, offset: 0 }, n, t), g = O({ ...d, offset: 100 }, n, t), y = se(i, h, g, n, s);
980
+ a = y.start + d.offset / 100 * (y.end - y.start) + m;
981
+ } else typeof u == "number" && (a = l + u);
982
982
  }
983
- return !g && !f && (g = c - l), { ...e, start: l, end: c, startRange: u, endRange: d, duration: g || f };
983
+ return !v && !u && (v = a - l), { ...e, start: l, end: a, startRange: f, endRange: d, duration: v || u };
984
984
  }
985
985
  function Qt(e) {
986
986
  return e.position === "sticky";
987
987
  }
988
- function Bt(e, t, n) {
988
+ function Xt(e, t, n) {
989
989
  return e.position === "fixed" && (!t || t === window.document.body || t === n);
990
990
  }
991
- function Xt(e, t) {
991
+ function Ut(e, t) {
992
992
  return parseInt(t ? e.left : e.top);
993
993
  }
994
- function Ut(e, t) {
994
+ function Jt(e, t) {
995
995
  return parseInt(t ? e.right : e.bottom);
996
996
  }
997
- function Jt(e, t, n) {
997
+ function Zt(e, t, n) {
998
998
  n && (e.style.position = "static");
999
999
  const s = (t ? e.offsetLeft : e.offsetTop) || 0;
1000
1000
  return n && (e.style.position = null), s;
1001
1001
  }
1002
- function Zt(e, t) {
1002
+ function en(e, t) {
1003
1003
  let n;
1004
- const s = Xt(e, t), r = Ut(e, t), i = !isNaN(s), o = !isNaN(r);
1004
+ const s = Ut(e, t), r = Jt(e, t), i = !isNaN(s), o = !isNaN(r);
1005
1005
  return (i || o) && (n = {}, i && (n.start = s), o && (n.end = r)), n;
1006
1006
  }
1007
1007
  function H(e, t, n, s, r) {
1008
1008
  const i = e[0].viewSource, o = [];
1009
- let a = (s ? i.offsetWidth : i.offsetHeight) || 0, f = 0, l = i;
1009
+ let c = (s ? i.offsetWidth : i.offsetHeight) || 0, u = 0, l = i;
1010
1010
  for (; l; ) {
1011
- const u = window.getComputedStyle(l), d = Qt(u), g = d ? Zt(u, s) : void 0, h = Jt(l, s, d);
1012
- if ((!g || !("end" in g)) && (f += h), o.push({ element: l, offset: h, sticky: g }), l = l.offsetParent, Bt(u, l, t))
1011
+ const f = window.getComputedStyle(l), d = Qt(f), v = d ? en(f, s) : void 0, m = Zt(l, s, d);
1012
+ if ((!v || !("end" in v)) && (u += m), o.push({ element: l, offset: m, sticky: v }), l = l.offsetParent, Xt(f, l, t))
1013
1013
  break;
1014
1014
  if (l === t) {
1015
1015
  o.push({ element: l, offset: 0 });
1016
1016
  break;
1017
1017
  }
1018
1018
  }
1019
- return o.reverse(), e.map((u) => ({
1020
- ...Gt(
1021
- u,
1022
- { start: f, end: f + a },
1019
+ return o.reverse(), e.map((f) => ({
1020
+ ...Bt(
1021
+ f,
1022
+ { start: u, end: u + c },
1023
1023
  n,
1024
1024
  s,
1025
1025
  r,
@@ -1027,7 +1027,7 @@ function H(e, t, n, s, r) {
1027
1027
  )
1028
1028
  }));
1029
1029
  }
1030
- const Se = 100, en = {
1030
+ const Ie = 100, tn = {
1031
1031
  horizontal: !1,
1032
1032
  observeViewportEntry: !0,
1033
1033
  viewportRootMargin: "7% 7%",
@@ -1035,116 +1035,116 @@ const Se = 100, en = {
1035
1035
  observeSourcesResize: !1,
1036
1036
  observeContentResize: !1
1037
1037
  };
1038
- function tn(e, t, n, s) {
1038
+ function nn(e, t, n, s) {
1039
1039
  let r = 0;
1040
1040
  return e >= t && e <= n ? r = s ? (e - t) / s : 1 : e > n && (r = 1), r;
1041
1041
  }
1042
- function Ie(e, t) {
1042
+ function Oe(e, t) {
1043
1043
  return e === window ? t ? window.document.documentElement.clientWidth : window.document.documentElement.clientHeight : t ? e.clientWidth : e.clientHeight;
1044
1044
  }
1045
- function nn() {
1045
+ function sn() {
1046
1046
  return {
1047
1047
  viewportWidth: window.document.documentElement.clientWidth,
1048
1048
  viewportHeight: window.document.documentElement.clientHeight
1049
1049
  };
1050
1050
  }
1051
- function sn(e) {
1052
- const t = ze(e, en), n = t.root, s = t.horizontal, r = /* @__PURE__ */ new WeakMap();
1053
- let i = Ie(n, s), o, a, f, l, c;
1054
- const u = [], d = nn();
1051
+ function rn(e) {
1052
+ const t = Ne(e, tn), n = t.root, s = t.horizontal, r = /* @__PURE__ */ new WeakMap();
1053
+ let i = Oe(n, s), o, c, u, l, a;
1054
+ const f = [], d = sn();
1055
1055
  if (t.scenes = Object.values(
1056
1056
  // TODO(ameerf): find a polyfill and use groupBy instead of following reduce
1057
1057
  e.scenes.reduce(
1058
- (m, p, v) => {
1059
- const y = p.groupId ? `group-${p.groupId}` : String(v);
1060
- return m[y] ? m[y].push(p) : m[y] = [p], m;
1058
+ (h, g, y) => {
1059
+ const p = g.groupId ? `group-${g.groupId}` : String(y);
1060
+ return h[p] ? h[p].push(g) : h[p] = [g], h;
1061
1061
  },
1062
1062
  {}
1063
1063
  )
1064
- ).flatMap((m) => (m.every((p) => p.viewSource && (typeof p.duration == "string" || p.start?.name)) ? (m = H(m, n, i, s, d), (t.observeSourcesResize || t.observeContentResize) && u.push(m)) : m.forEach((p) => {
1065
- p.end == null && (p.end = p.start + p.duration), p.duration == null && (p.duration = p.end - p.start);
1066
- }), m)), t.scenes.forEach((m, p) => {
1067
- m.index = p;
1068
- }), u.length) {
1069
- const m = /* @__PURE__ */ new Map();
1070
- window.ResizeObserver && (f = new window.ResizeObserver(function(p) {
1071
- p.forEach((v) => {
1072
- const y = m.get(v.target), E = H(y, n, i, s, d);
1073
- E.forEach((b, I) => {
1074
- t.scenes[b.index] = E[I];
1075
- }), u.splice(u.indexOf(y), 1, E);
1064
+ ).flatMap((h) => (h.every((g) => g.viewSource && (typeof g.duration == "string" || g.start?.name)) ? (h = H(h, n, i, s, d), (t.observeSourcesResize || t.observeContentResize) && f.push(h)) : h.forEach((g) => {
1065
+ g.end == null && (g.end = g.start + g.duration), g.duration == null && (g.duration = g.end - g.start);
1066
+ }), h)), t.scenes.forEach((h, g) => {
1067
+ h.index = g;
1068
+ }), f.length) {
1069
+ const h = /* @__PURE__ */ new Map();
1070
+ window.ResizeObserver && (u = new window.ResizeObserver(function(g) {
1071
+ g.forEach((y) => {
1072
+ const p = h.get(y.target), w = H(p, n, i, s, d);
1073
+ w.forEach((b, T) => {
1074
+ t.scenes[b.index] = w[T];
1075
+ }), f.splice(f.indexOf(p), 1, w);
1076
1076
  });
1077
- }), u.forEach((p) => {
1078
- f.observe(p[0].viewSource, { box: "border-box" }), m.set(p[0].viewSource, p);
1079
- }), t.observeContentResize && t.contentRoot && new window.ResizeObserver(be(() => {
1080
- const v = u.map((y) => {
1081
- const E = H(y, n, i, s, d);
1082
- return E.forEach((b, I) => {
1083
- t.scenes[b.index] = E[I];
1084
- }), E;
1077
+ }), f.forEach((g) => {
1078
+ u.observe(g[0].viewSource, { box: "border-box" }), h.set(g[0].viewSource, g);
1079
+ }), t.observeContentResize && t.contentRoot && new window.ResizeObserver(Te(() => {
1080
+ const y = f.map((p) => {
1081
+ const w = H(p, n, i, s, d);
1082
+ return w.forEach((b, T) => {
1083
+ t.scenes[b.index] = w[T];
1084
+ }), w;
1085
1085
  });
1086
- u.length = 0, u.push(...v), u.forEach((y) => {
1087
- m.set(y[0].viewSource, y);
1086
+ f.length = 0, f.push(...y), f.forEach((p) => {
1087
+ h.set(p[0].viewSource, p);
1088
1088
  });
1089
- }, Se)).observe(t.contentRoot, { box: "border-box" })), t.observeViewportResize && (l = be(function() {
1090
- i = Ie(n, s);
1091
- const p = u.map((v) => {
1092
- const y = H(v, n, i, s, d);
1093
- return y.forEach((E, b) => {
1094
- t.scenes[E.index] = y[b];
1095
- }), y;
1089
+ }, Ie)).observe(t.contentRoot, { box: "border-box" })), t.observeViewportResize && (l = Te(function() {
1090
+ i = Oe(n, s);
1091
+ const g = f.map((y) => {
1092
+ const p = H(y, n, i, s, d);
1093
+ return p.forEach((w, b) => {
1094
+ t.scenes[w.index] = p[b];
1095
+ }), p;
1096
1096
  });
1097
- u.length = 0, u.push(...p), u.forEach((v) => {
1098
- m.set(v[0].viewSource, v);
1097
+ f.length = 0, f.push(...g), f.forEach((y) => {
1098
+ h.set(y[0].viewSource, y);
1099
1099
  });
1100
- }, Se), n === window ? window.addEventListener("resize", l) : window.ResizeObserver && (c = new window.ResizeObserver(l), c.observe(n, { box: "border-box" })));
1100
+ }, Ie), n === window ? window.addEventListener("resize", l) : window.ResizeObserver && (a = new window.ResizeObserver(l), a.observe(n, { box: "border-box" })));
1101
1101
  }
1102
- t.observeViewportEntry && window.IntersectionObserver && (a = new window.IntersectionObserver(function(m) {
1103
- m.forEach((p) => {
1104
- (r.get(p.target) || []).forEach((v) => {
1105
- v.disabled = !p.isIntersecting;
1102
+ t.observeViewportEntry && window.IntersectionObserver && (c = new window.IntersectionObserver(function(h) {
1103
+ h.forEach((g) => {
1104
+ (r.get(g.target) || []).forEach((y) => {
1105
+ y.disabled = !g.isIntersecting;
1106
1106
  });
1107
1107
  });
1108
1108
  }, {
1109
1109
  root: n === window ? window.document : n,
1110
1110
  rootMargin: t.viewportRootMargin,
1111
1111
  threshold: 0
1112
- }), t.scenes.forEach((m) => {
1113
- if (m.viewSource) {
1114
- let p = r.get(m.viewSource);
1115
- p || (p = [], r.set(m.viewSource, p), a.observe(m.viewSource)), p.push(m);
1112
+ }), t.scenes.forEach((h) => {
1113
+ if (h.viewSource) {
1114
+ let g = r.get(h.viewSource);
1115
+ g || (g = [], r.set(h.viewSource, g), c.observe(h.viewSource)), g.push(h);
1116
1116
  }
1117
1117
  }));
1118
- function g({ p: m, vp: p }) {
1119
- m = +m.toFixed(1);
1120
- const v = +p.toFixed(4);
1121
- if (m !== o) {
1122
- for (let y of t.scenes)
1123
- if (!y.disabled) {
1124
- const { start: E, end: b, duration: I } = y, L = tn(m, E, b, I);
1125
- y.effect(y, L, v);
1118
+ function v({ p: h, vp: g }) {
1119
+ h = +h.toFixed(1);
1120
+ const y = +g.toFixed(4);
1121
+ if (h !== o) {
1122
+ for (let p of t.scenes)
1123
+ if (!p.disabled) {
1124
+ const { start: w, end: b, duration: T } = p, C = nn(h, w, b, T);
1125
+ p.effect(p, C, y);
1126
1126
  }
1127
- o = m;
1127
+ o = h;
1128
1128
  }
1129
1129
  }
1130
- function h() {
1131
- t.scenes.forEach((m) => m.destroy?.()), a && (a.disconnect(), a = null), f && (f.disconnect(), f = null), l && (c ? (c.disconnect(), c = null) : window.removeEventListener("resize", l));
1130
+ function m() {
1131
+ t.scenes.forEach((h) => h.destroy?.()), c && (c.disconnect(), c = null), u && (u.disconnect(), u = null), l && (a ? (a.disconnect(), a = null) : window.removeEventListener("resize", l));
1132
1132
  }
1133
1133
  return {
1134
- tick: g,
1135
- destroy: h
1134
+ tick: v,
1135
+ destroy: m
1136
1136
  };
1137
1137
  }
1138
- const rn = {
1138
+ const on = {
1139
1139
  transitionActive: !1,
1140
1140
  transitionFriction: 0.9,
1141
1141
  transitionEpsilon: 1,
1142
1142
  velocityActive: !1,
1143
1143
  velocityMax: 1
1144
1144
  };
1145
- class on {
1145
+ class cn {
1146
1146
  constructor(t = {}) {
1147
- this.config = ze(t, rn), this.progress = {
1147
+ this.config = Ne(t, on), this.progress = {
1148
1148
  p: 0,
1149
1149
  prevP: 0,
1150
1150
  vp: 0
@@ -1157,7 +1157,7 @@ class on {
1157
1157
  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 || (() => {
1158
1158
  const s = this.config.root;
1159
1159
  this.progress.p = this.config.horizontal ? s.scrollX || s.scrollLeft || 0 : s.scrollY || s.scrollTop || 0;
1160
- }), this._trigger = Yt(() => {
1160
+ }), this._trigger = Gt(() => {
1161
1161
  this._measure?.(), this.tick(!0);
1162
1162
  });
1163
1163
  }
@@ -1203,7 +1203,7 @@ class on {
1203
1203
  * Calculate current progress.
1204
1204
  */
1205
1205
  lerp() {
1206
- this.currentProgress.p = jt(this.currentProgress.p, this.progress.p, +(1 - this.config.transitionFriction).toFixed(3), this.config.transitionEpsilon);
1206
+ this.currentProgress.p = Yt(this.currentProgress.p, this.progress.p, +(1 - this.config.transitionFriction).toFixed(3), this.config.transitionEpsilon);
1207
1207
  }
1208
1208
  /**
1209
1209
  * Stop the event and effect, and remove all DOM side-effects.
@@ -1227,7 +1227,7 @@ class on {
1227
1227
  * Reset registered effect.
1228
1228
  */
1229
1229
  setupEffect() {
1230
- this.removeEffect(), this.effect = sn(this.config);
1230
+ this.removeEffect(), this.effect = rn(this.config);
1231
1231
  }
1232
1232
  /**
1233
1233
  * Remove registered effect.
@@ -1236,22 +1236,22 @@ class on {
1236
1236
  this.effect && this.effect.destroy(), this.effect = null;
1237
1237
  }
1238
1238
  }
1239
- const re = /* @__PURE__ */ new WeakMap();
1240
- let De = () => ({});
1239
+ const oe = /* @__PURE__ */ new WeakMap();
1240
+ let Ve = () => ({});
1241
1241
  function an(e) {
1242
- De = e;
1242
+ Ve = e;
1243
1243
  }
1244
- function cn(e, t, n, s, { reducedMotion: r }) {
1244
+ function fn(e, t, n, s, { reducedMotion: r }) {
1245
1245
  if (r)
1246
1246
  return;
1247
1247
  const i = {
1248
1248
  trigger: "view-progress",
1249
1249
  element: e
1250
- }, o = x(n);
1251
- let a;
1250
+ }, o = F(n);
1251
+ let c;
1252
1252
  if ("ViewTimeline" in window) {
1253
- const l = ue(t, o, i);
1254
- l && (l.play(), a = () => {
1253
+ const l = de(t, o, i);
1254
+ l && (l.play(), c = () => {
1255
1255
  l.ready.then(() => {
1256
1256
  l.cancel();
1257
1257
  });
@@ -1259,175 +1259,40 @@ function cn(e, t, n, s, { reducedMotion: r }) {
1259
1259
  } else {
1260
1260
  const l = Me(t, o, i);
1261
1261
  if (l) {
1262
- const c = Array.isArray(l) ? l : [l], u = new on({
1262
+ const a = Array.isArray(l) ? l : [l], f = new cn({
1263
1263
  viewSource: e,
1264
- scenes: c,
1264
+ scenes: a,
1265
1265
  observeViewportEntry: !1,
1266
1266
  observeViewportResize: !1,
1267
1267
  observeSourcesResize: !0,
1268
1268
  root: document.body,
1269
- ...De()
1269
+ ...Ve()
1270
1270
  });
1271
- a = () => {
1272
- u.destroy();
1273
- }, Promise.all(c.map((d) => d.ready || Promise.resolve())).then(
1271
+ c = () => {
1272
+ f.destroy();
1273
+ }, Promise.all(a.map((d) => d.ready || Promise.resolve())).then(
1274
1274
  () => {
1275
- u.start();
1275
+ f.start();
1276
1276
  }
1277
1277
  );
1278
1278
  }
1279
1279
  }
1280
- if (!a) return;
1281
- const f = { source: e, target: t, cleanup: a };
1282
- O(re, e, f), O(re, t, f);
1280
+ if (!c) return;
1281
+ const u = { source: e, target: t, cleanup: c };
1282
+ I(oe, e, u), I(oe, t, u);
1283
1283
  }
1284
- function fn(e) {
1285
- C(re, e);
1284
+ function ln(e) {
1285
+ M(oe, e);
1286
1286
  }
1287
- const ln = {
1288
- add: cn,
1289
- remove: fn,
1287
+ const un = {
1288
+ add: fn,
1289
+ remove: ln,
1290
1290
  registerOptionsGetter: an
1291
- }, oe = /* @__PURE__ */ new WeakMap();
1292
- function un(e, t, n, s = !1, r) {
1293
- const i = U(
1294
- e,
1295
- x(t),
1296
- void 0,
1297
- s
1298
- );
1299
- if (!i)
1300
- return null;
1301
- const o = n.type || "alternate";
1302
- let a = !0;
1303
- return (f) => {
1304
- r && !e.matches(r) || (f.type === "mouseenter" || f.type === "focusin" ? o === "alternate" ? a ? (a = !1, i.play()) : i.reverse() : o === "state" ? i.playState !== "finished" && i.play() : (i.progress(0), i.isCSS && i.onFinish(() => {
1305
- S.mutate(() => {
1306
- e.dataset.motionEnter = "done";
1307
- });
1308
- }), i.play()) : (f.type === "mouseleave" || f.type === "focusout") && (o === "alternate" ? i.reverse() : o === "repeat" ? (i.cancel(), S.mutate(() => {
1309
- delete e.dataset.interactEnter;
1310
- })) : o === "state" && i.playState === "running" && i.pause()));
1311
- };
1312
- }
1313
- function dn(e, t, {
1314
- effectId: n,
1315
- listContainer: s,
1316
- listItemSelector: r
1317
- }, i, o) {
1318
- const a = i.method || "toggle", f = a === "toggle", l = !!s;
1319
- return (c) => {
1320
- if (o && !e.matches(o)) return;
1321
- let u;
1322
- if (l && (u = e.closest(
1323
- `${s} > ${r || ""}:has(:scope)`
1324
- )), c.type === "mouseenter" || c.type === "focusin") {
1325
- const d = f ? "add" : a;
1326
- t.toggleEffect(n, d, u);
1327
- } else (c.type === "mouseleave" || c.type === "focusout") && f && t.toggleEffect(n, "remove", u);
1328
- };
1329
- }
1330
- function hn(e, t, n, s = {}, { reducedMotion: r, targetController: i, selectorCondition: o, allowA11yTriggers: a }) {
1331
- let f, l = !1, c = !1;
1332
- if (n.transition || n.transitionProperties ? (f = dn(
1333
- t,
1334
- i,
1335
- n,
1336
- s,
1337
- o
1338
- ), l = !0) : (f = un(
1339
- t,
1340
- n,
1341
- s,
1342
- r,
1343
- o
1344
- ), c = s.type === "once"), !f)
1345
- return;
1346
- const u = (p) => {
1347
- e.contains(p.relatedTarget) || f(p);
1348
- }, d = (p) => {
1349
- e.contains(p.relatedTarget) || f(p);
1350
- }, h = { source: e, target: t, cleanup: () => {
1351
- e.removeEventListener("mouseenter", f), e.removeEventListener("mouseleave", f), a && (e.removeEventListener("focusin", u), e.removeEventListener("focusout", d));
1352
- } };
1353
- O(oe, e, h), O(oe, t, h), a && (e.tabIndex = 0, e.addEventListener("focusin", u, { once: c })), e.addEventListener("mouseenter", f, { passive: !0, once: c }), (l ? (s.method || "toggle") === "toggle" : s.type !== "once") && (e.addEventListener("mouseleave", f, { passive: !0 }), a && e.addEventListener("focusout", d, { once: c }));
1354
- }
1355
- function mn(e) {
1356
- C(oe, e);
1357
- }
1358
- const Oe = {
1359
- add: hn,
1360
- remove: mn
1361
- }, ae = /* @__PURE__ */ new WeakMap();
1362
- function pn(e, t, n, s = !1, r) {
1363
- const i = U(
1364
- e,
1365
- x(t),
1366
- void 0,
1367
- s
1368
- );
1369
- if (!i)
1370
- return null;
1371
- let o = !0;
1372
- const a = n.type || "alternate";
1373
- return (f) => {
1374
- r && !e.matches(r) || (a === "alternate" ? o ? (o = !1, i.play()) : i.reverse() : a === "state" ? o ? (o = !1, i.play()) : i.playState === "running" ? i.pause() : i.playState !== "finished" && i.play() : (i.progress(0), i.isCSS && i.onFinish(() => {
1375
- S.mutate(() => {
1376
- e.dataset.interactEnter = "done";
1377
- });
1378
- }), i.play()));
1379
- };
1380
- }
1381
- function gn(e, t, {
1382
- effectId: n,
1383
- listContainer: s,
1384
- listItemSelector: r
1385
- }, i, o) {
1386
- const a = !!s;
1387
- return (f) => {
1388
- if (o && !e.matches(o)) return;
1389
- let l;
1390
- a && (l = e.closest(
1391
- `${s} > ${r || ""}:has(:scope)`
1392
- )), t.toggleEffect(n, i.method || "toggle", l);
1393
- };
1394
- }
1395
- function vn(e, t, n, s = {}, { reducedMotion: r, targetController: i, selectorCondition: o, allowA11yTriggers: a }) {
1396
- let f, l = !1;
1397
- if (n.transition || n.transitionProperties ? f = gn(
1398
- t,
1399
- i,
1400
- n,
1401
- s,
1402
- o
1403
- ) : (f = pn(
1404
- t,
1405
- n,
1406
- s,
1407
- r,
1408
- o
1409
- ), l = s.type === "once"), !f)
1410
- return;
1411
- const c = (h) => {
1412
- h.pointerType && f(h);
1413
- }, u = (h) => {
1414
- h.code === "Space" ? (h.preventDefault(), f(h)) : h.code === "Enter" && f(h);
1415
- }, g = { source: e, target: t, cleanup: () => {
1416
- e.removeEventListener("click", c), a && e.removeEventListener("keydown", u);
1417
- } };
1418
- O(ae, e, g), O(ae, t, g), e.addEventListener("click", c, { passive: !0, once: l }), a && (e.tabIndex = 0, e.addEventListener("keydown", u, { once: l }));
1419
- }
1420
- function yn(e) {
1421
- C(ae, e);
1422
- }
1423
- const _e = {
1424
- add: vn,
1425
- remove: yn
1426
1291
  };
1427
- function ke(e, t, n) {
1292
+ function _e(e, t, n) {
1428
1293
  return Math.min(Math.max(e, n), t);
1429
1294
  }
1430
- function Te(e) {
1295
+ function ke(e) {
1431
1296
  let t = !1;
1432
1297
  return function() {
1433
1298
  if (!t)
@@ -1436,7 +1301,7 @@ function Te(e) {
1436
1301
  });
1437
1302
  };
1438
1303
  }
1439
- function wn(e) {
1304
+ function dn(e) {
1440
1305
  let t = e, n = 0, s = 0;
1441
1306
  if (t.offsetParent)
1442
1307
  do
@@ -1449,7 +1314,7 @@ function wn(e) {
1449
1314
  height: e.offsetHeight
1450
1315
  };
1451
1316
  }
1452
- function En() {
1317
+ function hn() {
1453
1318
  const e = window.devicePixelRatio;
1454
1319
  let t = !1;
1455
1320
  if (e === 1)
@@ -1462,13 +1327,13 @@ function En() {
1462
1327
  });
1463
1328
  return document.body.dispatchEvent(n), t;
1464
1329
  }
1465
- function bn() {
1330
+ function mn() {
1466
1331
  return new Promise((e) => {
1467
1332
  const t = window.scrollY;
1468
1333
  let n = !1, s;
1469
1334
  function r() {
1470
- document.body.addEventListener("pointerdown", (a) => {
1471
- s === void 0 ? s = a.offsetY : n = a.offsetY === s;
1335
+ document.body.addEventListener("pointerdown", (c) => {
1336
+ s === void 0 ? s = c.offsetY : n = c.offsetY === s;
1472
1337
  }, { once: !0 });
1473
1338
  const o = new PointerEvent("pointerdown", {
1474
1339
  clientY: 500
@@ -1481,60 +1346,60 @@ function bn() {
1481
1346
  r(), window.addEventListener("scroll", i), window.scrollY > 0 && window.scrollBy(0, -1);
1482
1347
  });
1483
1348
  }
1484
- function Sn(e) {
1485
- bn().then((t) => {
1349
+ function gn(e) {
1350
+ mn().then((t) => {
1486
1351
  e.fixRequired = t, t && (window.addEventListener("scroll", e.scrollHandler), e.scrollHandler());
1487
1352
  });
1488
1353
  }
1489
- let q = 0;
1490
- const Y = /* @__PURE__ */ new Set();
1491
- function In() {
1354
+ let z = 0;
1355
+ const K = /* @__PURE__ */ new Set();
1356
+ function vn() {
1492
1357
  const e = (n) => {
1493
1358
  for (let s of n.changedTouches)
1494
- Y.add(s.identifier);
1359
+ K.add(s.identifier);
1495
1360
  }, t = (n) => {
1496
1361
  for (let s of n.changedTouches)
1497
- Y.delete(s.identifier);
1362
+ K.delete(s.identifier);
1498
1363
  };
1499
1364
  return document.addEventListener("touchstart", e, { passive: !0 }), document.addEventListener("touchend", t, { passive: !0 }), function() {
1500
- Y.clear(), document.removeEventListener("touchstart", e), document.removeEventListener("touchend", t);
1365
+ K.clear(), document.removeEventListener("touchstart", e), document.removeEventListener("touchend", t);
1501
1366
  };
1502
1367
  }
1503
- function On(e, t) {
1368
+ function pn(e, t) {
1504
1369
  if ("onscrollend" in window)
1505
1370
  return e.addEventListener("scrollend", t), function() {
1506
1371
  e.removeEventListener("scrollend", t);
1507
1372
  };
1508
1373
  let n = 0, s;
1509
- q || (s = In()), q += 1;
1374
+ z || (s = vn()), z += 1;
1510
1375
  function r(i) {
1511
1376
  clearTimeout(n), n = setTimeout(() => {
1512
- Y.size ? setTimeout(r, 100) : (t(i), n = 0);
1377
+ K.size ? setTimeout(r, 100) : (t(i), n = 0);
1513
1378
  }, 100);
1514
1379
  }
1515
1380
  return e.addEventListener("scroll", r), function() {
1516
- e.removeEventListener("scroll", r), q -= 1, q || s();
1381
+ e.removeEventListener("scroll", r), z -= 1, z || s();
1517
1382
  };
1518
1383
  }
1519
- function _n(e, t, n) {
1384
+ function yn(e, t, n) {
1520
1385
  return {
1521
1386
  x(s) {
1522
- const r = e.left - n.x + e.width / 2, i = r >= t.width / 2, o = (i ? r : t.width - r) * 2, a = i ? 0 : r - o / 2;
1523
- return (s - a) / o;
1387
+ const r = e.left - n.x + e.width / 2, i = r >= t.width / 2, o = (i ? r : t.width - r) * 2, c = i ? 0 : r - o / 2;
1388
+ return (s - c) / o;
1524
1389
  },
1525
1390
  y(s) {
1526
- const r = e.top - n.y + e.height / 2, i = r >= t.height / 2, o = (i ? r : t.height - r) * 2, a = i ? 0 : r - o / 2;
1527
- return (s - a) / o;
1391
+ const r = e.top - n.y + e.height / 2, i = r >= t.height / 2, o = (i ? r : t.height - r) * 2, c = i ? 0 : r - o / 2;
1392
+ return (s - c) / o;
1528
1393
  }
1529
1394
  };
1530
1395
  }
1531
- function kn(e, t) {
1396
+ function En(e, t) {
1532
1397
  this.x = window.scrollX, this.y = window.scrollY, requestAnimationFrame(() => e && e(t));
1533
1398
  }
1534
- function Tn(e) {
1399
+ function wn(e) {
1535
1400
  e.rect.width = window.document.documentElement.clientWidth, e.rect.height = window.document.documentElement.clientHeight;
1536
1401
  }
1537
- function xn(e) {
1402
+ function bn(e) {
1538
1403
  const t = new ResizeObserver((n) => {
1539
1404
  n.forEach((s) => {
1540
1405
  e.rect.width = s.borderBoxSize[0].inlineSize, e.rect.height = s.borderBoxSize[0].blockSize;
@@ -1542,38 +1407,38 @@ function xn(e) {
1542
1407
  });
1543
1408
  return t.observe(e.root, { box: "border-box" }), t;
1544
1409
  }
1545
- function Cn(e) {
1546
- let t = !1, n = { x: e.rect.width / 2, y: e.rect.height / 2, vx: 0, vy: 0 }, s, r, i, o, a;
1547
- const f = { x: 0, y: 0 };
1548
- e.scenes.forEach((c) => {
1549
- c.target && c.centeredToTarget && (c.transform = _n(wn(c.target), e.rect, f), t = !0), e.root ? r = xn(e) : (i = Tn.bind(null, e), window.addEventListener("resize", i));
1550
- }), s = function(c) {
1551
- for (let u of e.scenes)
1552
- if (!u.disabled) {
1553
- const d = u.transform?.x(c.x) || c.x / e.rect.width, g = u.transform?.y(c.y) || c.y / e.rect.height, h = +ke(0, 1, d).toPrecision(4), m = +ke(0, 1, g).toPrecision(4), p = { x: c.vx, y: c.vy };
1554
- e.allowActiveEvent && (c.active = d <= 1 && g <= 1 && d >= 0 && g >= 0), u.effect(u, { x: h, y: m }, p, c.active);
1410
+ function Sn(e) {
1411
+ let t = !1, n = { x: e.rect.width / 2, y: e.rect.height / 2, vx: 0, vy: 0 }, s, r, i, o, c;
1412
+ const u = { x: 0, y: 0 };
1413
+ e.scenes.forEach((a) => {
1414
+ a.target && a.centeredToTarget && (a.transform = yn(dn(a.target), e.rect, u), t = !0), e.root ? r = bn(e) : (i = wn.bind(null, e), window.addEventListener("resize", i));
1415
+ }), s = function(a) {
1416
+ for (let f of e.scenes)
1417
+ if (!f.disabled) {
1418
+ const d = f.transform?.x(a.x) || a.x / e.rect.width, v = f.transform?.y(a.y) || a.y / e.rect.height, m = +_e(0, 1, d).toPrecision(4), h = +_e(0, 1, v).toPrecision(4), g = { x: a.vx, y: a.vy };
1419
+ e.allowActiveEvent && (a.active = d <= 1 && v <= 1 && d >= 0 && v >= 0), f.effect(f, { x: m, y: h }, g, a.active);
1555
1420
  }
1556
- Object.assign(n, c);
1557
- }, t && (o = kn.bind(f, s, n), a = On(document, o));
1421
+ Object.assign(n, a);
1422
+ }, t && (o = En.bind(u, s, n), c = pn(document, o));
1558
1423
  function l() {
1559
- e.scenes.forEach((c) => c.destroy?.()), a?.(), r ? (r.disconnect(), r = null) : (window.removeEventListener("resize", i), i = null), s = null, n = null;
1424
+ e.scenes.forEach((a) => a.destroy?.()), c?.(), r ? (r.disconnect(), r = null) : (window.removeEventListener("resize", i), i = null), s = null, n = null;
1560
1425
  }
1561
1426
  return {
1562
1427
  tick: s,
1563
1428
  destroy: l
1564
1429
  };
1565
1430
  }
1566
- const Ln = 1e3 / 60 * 3;
1567
- let z;
1568
- function An() {
1569
- k.x = window.scrollX, k.y = window.scrollY;
1431
+ const Tn = 1e3 / 60 * 3;
1432
+ let N;
1433
+ function In() {
1434
+ _.x = window.scrollX, _.y = window.scrollY;
1570
1435
  }
1571
- const k = { x: 0, y: 0, scrollHandler: An, fixRequired: void 0 };
1572
- class Pn {
1436
+ const _ = { x: 0, y: 0, scrollHandler: In, fixRequired: void 0 };
1437
+ class On {
1573
1438
  constructor(t = {}) {
1574
1439
  this.config = { ...t }, this.effect = null, this._nextTick = null, this._nextTransitionTick = null, this._startTime = 0;
1575
1440
  let n;
1576
- this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() : Te(() => this.transition()) : n = this.config.noThrottle ? () => (this.tick(), null) : Te(() => {
1441
+ this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() : ke(() => this.transition()) : n = this.config.noThrottle ? () => (this.tick(), null) : ke(() => {
1577
1442
  this.tick();
1578
1443
  }), this.config.rect = this.config.root ? {
1579
1444
  width: this.config.root.offsetWidth,
@@ -1596,15 +1461,15 @@ class Pn {
1596
1461
  }, this._pointerEnter = () => {
1597
1462
  this.progress.active = !0, this._nextTick = n();
1598
1463
  }, this.config.root) {
1599
- z = typeof z == "boolean" ? z : En();
1600
- const r = z ? window.devicePixelRatio : 1;
1601
- typeof k.fixRequired > "u" && Sn(k), this._measure = (i) => {
1464
+ N = typeof N == "boolean" ? N : hn();
1465
+ const r = N ? window.devicePixelRatio : 1;
1466
+ typeof _.fixRequired > "u" && gn(_), this._measure = (i) => {
1602
1467
  if (i.target !== this.config.root) {
1603
1468
  const o = new PointerEvent("pointermove", {
1604
1469
  bubbles: !0,
1605
1470
  cancelable: !0,
1606
- clientX: i.x * r + k.x,
1607
- clientY: i.y * r + k.y
1471
+ clientX: i.x * r + _.x,
1472
+ clientY: i.y * r + _.y
1608
1473
  });
1609
1474
  i.stopPropagation(), this.config.root.dispatchEvent(o);
1610
1475
  } else
@@ -1640,8 +1505,8 @@ class Pn {
1640
1505
  const t = this.config.transitionDuration, n = this.config.transitionEasing || ((o) => o), s = performance.now();
1641
1506
  let r = !1;
1642
1507
  const i = (o) => {
1643
- const a = (o - this._startTime) / t, f = n(Math.min(1, a));
1644
- r && (this.progress.vx = 0, this.progress.vy = 0, r = !1), this.currentProgress = Object.entries(this.progress).reduce((l, [c, u]) => (c === "active" ? l[c] = u : l[c] = this.previousProgress[c] + (u - this.previousProgress[c]) * f, l), this.currentProgress || {}), a < 1 && (this._nextTransitionTick = requestAnimationFrame(i), r = o - this._startTime > Ln), this.effect.tick(this.currentProgress);
1508
+ const c = (o - this._startTime) / t, u = n(Math.min(1, c));
1509
+ r && (this.progress.vx = 0, this.progress.vy = 0, r = !1), this.currentProgress = Object.entries(this.progress).reduce((l, [a, f]) => (a === "active" ? l[a] = f : l[a] = this.previousProgress[a] + (f - this.previousProgress[a]) * u, l), this.currentProgress || {}), c < 1 && (this._nextTransitionTick = requestAnimationFrame(i), r = o - this._startTime > Tn), this.effect.tick(this.currentProgress);
1645
1510
  };
1646
1511
  return this._startTime ? (this._nextTransitionTick && cancelAnimationFrame(this._nextTransitionTick), Object.assign(this.previousProgress, this.currentProgress), this._startTime = s, i(s)) : this._startTime = s, this._nextTransitionTick;
1647
1512
  }
@@ -1670,7 +1535,7 @@ class Pn {
1670
1535
  * Reset registered effect.
1671
1536
  */
1672
1537
  setupEffect() {
1673
- this.removeEffect(), this.effect = Cn(this.config);
1538
+ this.removeEffect(), this.effect = Sn(this.config);
1674
1539
  }
1675
1540
  /**
1676
1541
  * Remove registered effect.
@@ -1680,88 +1545,249 @@ class Pn {
1680
1545
  }
1681
1546
  }
1682
1547
  const ce = /* @__PURE__ */ new WeakMap();
1683
- let Ne = () => ({});
1684
- function $n(e) {
1685
- Ne = e;
1548
+ let De = () => ({});
1549
+ function _n(e) {
1550
+ De = e;
1686
1551
  }
1687
- function Rn(e, t, n, s = {}, { reducedMotion: r }) {
1552
+ function kn(e, t, n, s = {}, { reducedMotion: r }) {
1688
1553
  if (r)
1689
1554
  return;
1690
1555
  const i = {
1691
1556
  trigger: "pointer-move",
1692
1557
  element: e,
1693
1558
  axis: s.axis ?? "y"
1694
- }, o = Me(t, x(n), i);
1559
+ }, o = Me(t, F(n), i);
1695
1560
  if (o) {
1696
- const a = Array.isArray(o) ? o : [o], f = new Pn({
1561
+ const c = Array.isArray(o) ? o : [o], u = new On({
1697
1562
  root: s.hitArea === "self" ? e : void 0,
1698
- scenes: a,
1699
- ...Ne()
1700
- }), c = { source: e, target: t, cleanup: () => {
1701
- f.destroy();
1563
+ scenes: c,
1564
+ ...De()
1565
+ }), a = { source: e, target: t, cleanup: () => {
1566
+ u.destroy();
1702
1567
  } };
1703
- O(ce, e, c), O(ce, t, c), Promise.all(
1704
- a.map((u) => u.ready || Promise.resolve())
1568
+ I(ce, e, a), I(ce, t, a), Promise.all(
1569
+ c.map((f) => f.ready || Promise.resolve())
1705
1570
  ).then(() => {
1706
- f.start();
1571
+ u.start();
1707
1572
  });
1708
1573
  }
1709
1574
  }
1710
- function Mn(e) {
1711
- C(ce, e);
1712
- }
1713
- const Fn = {
1714
- add: Rn,
1715
- remove: Mn,
1716
- registerOptionsGetter: $n
1717
- }, fe = /* @__PURE__ */ new WeakMap();
1718
- function Hn(e, t, n, s, { reducedMotion: r, selectorCondition: i }) {
1719
- const o = U(
1575
+ function Cn(e) {
1576
+ M(ce, e);
1577
+ }
1578
+ const xn = {
1579
+ add: kn,
1580
+ remove: Cn,
1581
+ registerOptionsGetter: _n
1582
+ }, ae = /* @__PURE__ */ new WeakMap();
1583
+ function An(e, t, n, s, { reducedMotion: r, selectorCondition: i }) {
1584
+ const o = he(
1720
1585
  t,
1721
- x(n),
1586
+ F(n),
1722
1587
  void 0,
1723
1588
  r
1724
1589
  );
1725
1590
  if (!o)
1726
1591
  return;
1727
- const a = () => {
1592
+ const c = () => {
1728
1593
  i && !t.matches(i) || o.play();
1729
1594
  }, l = { source: e, target: t, cleanup: () => {
1730
- o.cancel(), e.removeEventListener("animationend", a);
1595
+ o.cancel(), e.removeEventListener("animationend", c);
1731
1596
  } };
1732
- O(fe, e, l), O(fe, t, l), e.addEventListener("animationend", a);
1597
+ I(ae, e, l), I(ae, t, l), e.addEventListener("animationend", c);
1733
1598
  }
1734
- function qn(e) {
1735
- C(fe, e);
1599
+ function Ln(e) {
1600
+ M(ae, e);
1736
1601
  }
1737
- const zn = {
1738
- add: Hn,
1739
- remove: qn
1602
+ const Pn = {
1603
+ add: An,
1604
+ remove: Ln
1740
1605
  };
1741
- function xe(e) {
1742
- return {
1743
- add: (t, n, s, r, i) => e.add(t, n, s, r, {
1744
- ...i,
1745
- allowA11yTriggers: !0
1746
- }),
1747
- remove: e.remove
1606
+ function Rn(e, t, n, s = !1, r, i) {
1607
+ const o = he(
1608
+ e,
1609
+ F(t),
1610
+ void 0,
1611
+ s
1612
+ );
1613
+ if (!o)
1614
+ return null;
1615
+ let c = !0;
1616
+ const u = n.type || "alternate";
1617
+ return (l) => {
1618
+ if (r && !e.matches(r)) return;
1619
+ const a = !i, f = i?.enter?.includes(l.type), d = i?.leave?.includes(l.type);
1620
+ if (f || a) {
1621
+ u === "alternate" || u === "state" ? c ? (c = !1, o.play()) : u === "alternate" ? o.reverse() : u === "state" && (o.playState === "running" ? o.pause() : o.playState !== "finished" && o.play()) : (o.progress(0), delete e.dataset.interactEnter, o.isCSS && o.onFinish(() => {
1622
+ S.mutate(() => {
1623
+ e.dataset.interactEnter = "done";
1624
+ });
1625
+ }), o.play());
1626
+ return;
1627
+ }
1628
+ d && (u === "alternate" ? o.reverse() : u === "repeat" ? (o.cancel(), S.mutate(() => {
1629
+ delete e.dataset.interactEnter;
1630
+ })) : u === "state" && o.playState === "running" && o.pause());
1631
+ };
1632
+ }
1633
+ function $n(e, t, {
1634
+ effectId: n,
1635
+ listContainer: s,
1636
+ listItemSelector: r
1637
+ }, i, o, c) {
1638
+ const u = !!s, l = i.method || "toggle", a = l === "toggle";
1639
+ return (f) => {
1640
+ if (o && !e.matches(o)) return;
1641
+ const d = u ? e.closest(
1642
+ `${s} > ${r || ""}:has(:scope)`
1643
+ ) : void 0, v = !c, m = c?.enter?.includes(f.type), h = c?.leave?.includes(f.type);
1644
+ v ? t.toggleEffect(n, l, d) : (m && t.toggleEffect(n, a ? "add" : l, d), h && a && t.toggleEffect(n, "remove", d));
1645
+ };
1646
+ }
1647
+ const fe = /* @__PURE__ */ new WeakMap();
1648
+ function Ce(e, t) {
1649
+ return (n) => {
1650
+ const s = n;
1651
+ e.contains(s.relatedTarget) || t(s);
1748
1652
  };
1749
1653
  }
1750
- const $ = {
1751
- viewEnter: Ee,
1752
- hover: Oe,
1753
- click: _e,
1754
- pageVisible: Ee,
1755
- animationEnd: zn,
1756
- viewProgress: ln,
1757
- pointerMove: Fn,
1758
- activate: xe(_e),
1759
- interest: xe(Oe)
1654
+ function Fn(e) {
1655
+ return (t) => {
1656
+ const n = t;
1657
+ n.pointerType && e(n);
1658
+ };
1659
+ }
1660
+ function Mn(e) {
1661
+ return (t) => {
1662
+ const n = t;
1663
+ n.code === "Space" ? (n.preventDefault(), e(n)) : n.code === "Enter" && e(n);
1664
+ };
1665
+ }
1666
+ const qn = {
1667
+ focusin: (e, t) => Ce(e, t),
1668
+ focusout: (e, t) => Ce(e, t),
1669
+ click: (e, t) => Fn(t),
1670
+ keydown: (e, t) => Mn(t)
1760
1671
  };
1672
+ function Hn(e, t, n) {
1673
+ const s = qn[e];
1674
+ return s ? s(t, n) : (r) => n(r);
1675
+ }
1676
+ function zn(e) {
1677
+ return typeof e == "object" && !Array.isArray(e) && ("enter" in e || "leave" in e);
1678
+ }
1679
+ function Nn(e) {
1680
+ if (typeof e == "string")
1681
+ return { toggle: [e] };
1682
+ if (Array.isArray(e))
1683
+ return { toggle: [...e] };
1684
+ if (zn(e)) {
1685
+ const t = e.enter ? [...e.enter] : [], n = e.leave ? [...e.leave] : [];
1686
+ return { enter: t, leave: n };
1687
+ }
1688
+ return {};
1689
+ }
1690
+ function Vn(e) {
1691
+ return !!(e.enter?.length || e.leave?.length);
1692
+ }
1761
1693
  function Dn(e) {
1694
+ return Vn(e) ? { enter: e.enter ?? [], leave: e.leave ?? [] } : void 0;
1695
+ }
1696
+ function Wn(e, t, n, s, { reducedMotion: r, targetController: i, selectorCondition: o }) {
1697
+ const c = Nn(s.eventConfig), u = n.transition || n.transitionProperties, l = Dn(c);
1698
+ let a, f = !1;
1699
+ if (u ? a = $n(
1700
+ t,
1701
+ i,
1702
+ n,
1703
+ s,
1704
+ o,
1705
+ l
1706
+ ) : (a = Rn(
1707
+ t,
1708
+ n,
1709
+ s,
1710
+ r,
1711
+ o,
1712
+ l
1713
+ ), f = s.type === "once"), !a)
1714
+ return;
1715
+ const d = a, v = new AbortController();
1716
+ function m(y, p, w) {
1717
+ const b = Hn(p, e, d);
1718
+ y.addEventListener(p, b, { ...w, signal: v.signal });
1719
+ }
1720
+ const g = { source: e, target: t, cleanup: () => {
1721
+ v.abort();
1722
+ } };
1723
+ if (I(fe, e, g), I(fe, t, g), l) {
1724
+ const y = c.enter, p = c.leave;
1725
+ y.forEach((b) => {
1726
+ b === "focusin" && (e.tabIndex = 0), m(e, b, { passive: !0, once: f });
1727
+ }), (u ? s.method === "toggle" : s.type !== "once") && p.forEach((b) => {
1728
+ if (b === "focusout") {
1729
+ m(e, b, { once: f });
1730
+ return;
1731
+ }
1732
+ m(e, b, { passive: !0 });
1733
+ });
1734
+ } else
1735
+ (c.toggle ?? []).forEach((p) => {
1736
+ m(e, p, { once: f, passive: p !== "keydown" });
1737
+ });
1738
+ }
1739
+ function jn(e) {
1740
+ M(fe, e);
1741
+ }
1742
+ const A = {
1743
+ add: Wn,
1744
+ remove: jn
1745
+ }, le = {
1746
+ click: ["click"],
1747
+ activate: ["click", "keydown"],
1748
+ hover: { enter: ["mouseenter"], leave: ["mouseleave"] },
1749
+ interest: {
1750
+ enter: ["mouseenter", "focusin"],
1751
+ leave: ["mouseleave", "focusout"]
1752
+ }
1753
+ }, xe = {
1754
+ click: le.activate,
1755
+ hover: le.interest
1756
+ };
1757
+ function V(e) {
1758
+ const t = le[e];
1759
+ return (n, s, r, i, o) => {
1760
+ const c = o?.allowA11yTriggers && e in xe ? xe[e] : t;
1761
+ A.add(n, s, r, { ...i, eventConfig: c }, o ?? {});
1762
+ };
1763
+ }
1764
+ const P = {
1765
+ viewEnter: Se,
1766
+ hover: {
1767
+ add: V("hover"),
1768
+ remove: A.remove
1769
+ },
1770
+ click: {
1771
+ add: V("click"),
1772
+ remove: A.remove
1773
+ },
1774
+ pageVisible: Se,
1775
+ animationEnd: Pn,
1776
+ viewProgress: un,
1777
+ pointerMove: xn,
1778
+ activate: {
1779
+ add: V("activate"),
1780
+ remove: A.remove
1781
+ },
1782
+ interest: {
1783
+ add: V("interest"),
1784
+ remove: A.remove
1785
+ }
1786
+ };
1787
+ function Yn(e) {
1762
1788
  return e.replace(/\[([-\w]+)]/g, "[]");
1763
1789
  }
1764
- class w {
1790
+ class E {
1765
1791
  static defineInteractElement;
1766
1792
  dataCache;
1767
1793
  addedInteractions;
@@ -1778,12 +1804,12 @@ class w {
1778
1804
  init(t, n) {
1779
1805
  if (typeof window > "u" || !window.customElements)
1780
1806
  return;
1781
- const s = n?.useCutsomElement ?? !!w.defineInteractElement;
1782
- this.dataCache = Vn(t, s);
1783
- const r = w.defineInteractElement?.();
1807
+ const s = n?.useCutsomElement ?? !!E.defineInteractElement;
1808
+ this.dataCache = Kn(t, s);
1809
+ const r = E.defineInteractElement?.();
1784
1810
  s && r === !1 ? document.querySelectorAll("interact-element").forEach((i) => {
1785
1811
  i.connect();
1786
- }) : w.controllerCache.forEach(
1812
+ }) : E.controllerCache.forEach(
1787
1813
  (i, o) => i.connect(o)
1788
1814
  );
1789
1815
  }
@@ -1792,20 +1818,20 @@ class w {
1792
1818
  t.disconnect();
1793
1819
  for (const [, t] of this.mediaQueryListeners.entries())
1794
1820
  t.mql.removeEventListener("change", t.handler);
1795
- this.mediaQueryListeners.clear(), this.addedInteractions = {}, this.listInteractionsCache = {}, this.controllers.clear(), this.dataCache = { effects: {}, conditions: {}, interactions: {} }, w.instances.splice(w.instances.indexOf(this), 1);
1821
+ this.mediaQueryListeners.clear(), this.addedInteractions = {}, this.listInteractionsCache = {}, this.controllers.clear(), this.dataCache = { effects: {}, conditions: {}, interactions: {} }, E.instances.splice(E.instances.indexOf(this), 1);
1796
1822
  }
1797
1823
  setController(t, n) {
1798
- this.controllers.add(n), w.setController(t, n);
1824
+ this.controllers.add(n), E.setController(t, n);
1799
1825
  }
1800
1826
  deleteController(t, n = !1) {
1801
- const s = w.controllerCache.get(t);
1802
- this.clearInteractionStateForKey(t), this.clearMediaQueryListenersForKey(t), s && n && (this.controllers.delete(s), w.deleteController(t));
1827
+ const s = E.controllerCache.get(t);
1828
+ this.clearInteractionStateForKey(t), this.clearMediaQueryListenersForKey(t), s && n && (this.controllers.delete(s), E.deleteController(t));
1803
1829
  }
1804
1830
  has(t) {
1805
1831
  return !!this.get(t);
1806
1832
  }
1807
1833
  get(t) {
1808
- const n = Dn(t);
1834
+ const n = Yn(t);
1809
1835
  return this.dataCache.interactions[n];
1810
1836
  }
1811
1837
  clearMediaQueryListenersForKey(t) {
@@ -1826,39 +1852,39 @@ class w {
1826
1852
  }));
1827
1853
  }
1828
1854
  static create(t, n) {
1829
- const s = new w();
1830
- return w.instances.push(s), s.init(t, n), s;
1855
+ const s = new E();
1856
+ return E.instances.push(s), s.init(t, n), s;
1831
1857
  }
1832
1858
  static destroy() {
1833
- w.controllerCache.forEach((t) => {
1859
+ E.controllerCache.forEach((t) => {
1834
1860
  t.disconnect();
1835
- }), w.instances.length = 0, w.controllerCache.clear();
1861
+ }), E.instances.length = 0, E.controllerCache.clear();
1836
1862
  }
1837
1863
  static setup(t) {
1838
- t.scrollOptionsGetter && $.viewProgress.registerOptionsGetter?.(
1864
+ t.scrollOptionsGetter && P.viewProgress.registerOptionsGetter?.(
1839
1865
  t.scrollOptionsGetter
1840
- ), t.pointerOptionsGetter && $.pointerMove.registerOptionsGetter?.(
1866
+ ), t.pointerOptionsGetter && P.pointerMove.registerOptionsGetter?.(
1841
1867
  t.pointerOptionsGetter
1842
- ), t.viewEnter && $.viewEnter.setOptions(
1868
+ ), t.viewEnter && P.viewEnter.setOptions(
1843
1869
  t.viewEnter
1844
- ), t.allowA11yTriggers !== void 0 && (w.allowA11yTriggers = t.allowA11yTriggers);
1870
+ ), t.allowA11yTriggers !== void 0 && (E.allowA11yTriggers = t.allowA11yTriggers);
1845
1871
  }
1846
1872
  static getInstance(t) {
1847
- return w.instances.find((n) => n.has(t));
1873
+ return E.instances.find((n) => n.has(t));
1848
1874
  }
1849
1875
  static getController(t) {
1850
- return t ? w.controllerCache.get(t) : void 0;
1876
+ return t ? E.controllerCache.get(t) : void 0;
1851
1877
  }
1852
1878
  static setController(t, n) {
1853
- w.controllerCache.set(t, n);
1879
+ E.controllerCache.set(t, n);
1854
1880
  }
1855
1881
  static deleteController(t) {
1856
- w.controllerCache.delete(t);
1882
+ E.controllerCache.delete(t);
1857
1883
  }
1858
1884
  static registerEffects = kt;
1859
1885
  }
1860
- let Nn = 0;
1861
- function X(e, {
1886
+ let Gn = 0;
1887
+ function J(e, {
1862
1888
  asCombinator: t = !1,
1863
1889
  addItemFilter: n = !1,
1864
1890
  useFirstChild: s = !1
@@ -1870,10 +1896,10 @@ function X(e, {
1870
1896
  return e.selector;
1871
1897
  return s ? t ? "> :first-child" : ":scope > :first-child" : "";
1872
1898
  }
1873
- function Vn(e, t = !1) {
1899
+ function Kn(e, t = !1) {
1874
1900
  const n = e.conditions || {}, s = {};
1875
1901
  return e.interactions?.forEach((r) => {
1876
- const i = r.key, o = ++Nn, { effects: a, ...f } = r;
1902
+ const i = r.key, o = ++Gn, { effects: c, ...u } = r;
1877
1903
  if (!i) {
1878
1904
  console.error(`Interaction ${o} is missing a key for source element.`);
1879
1905
  return;
@@ -1884,32 +1910,32 @@ function Vn(e, t = !1) {
1884
1910
  interactionIds: /* @__PURE__ */ new Set(),
1885
1911
  selectors: /* @__PURE__ */ new Set()
1886
1912
  });
1887
- const l = Array.from(a);
1913
+ const l = Array.from(c);
1888
1914
  l.reverse();
1889
- const c = { ...f, effects: l };
1890
- s[i].triggers.push(c), s[i].selectors.add(
1891
- X(c, { useFirstChild: t })
1915
+ const a = { ...u, effects: l };
1916
+ s[i].triggers.push(a), s[i].selectors.add(
1917
+ J(a, { useFirstChild: t })
1892
1918
  );
1893
- const u = c.listContainer;
1919
+ const f = a.listContainer;
1894
1920
  l.forEach((d) => {
1895
- let g = d.key;
1896
- if (!g && d.effectId) {
1897
- const p = e.effects[d.effectId];
1898
- p && (g = p.key);
1921
+ let v = d.key;
1922
+ if (!v && d.effectId) {
1923
+ const g = e.effects[d.effectId];
1924
+ g && (v = g.key);
1899
1925
  }
1900
- d.effectId || (d.effectId = Mt()), g = g || i, d.key = g;
1901
- const h = d.effectId;
1902
- if (u && d.listContainer && (g !== i || d.listContainer !== u))
1926
+ d.effectId || (d.effectId = Mt()), v = v || i, d.key = v;
1927
+ const m = d.effectId;
1928
+ if (f && d.listContainer && (v !== i || d.listContainer !== f))
1903
1929
  return;
1904
- const m = `${g}::${h}::${o}`;
1905
- d.interactionId = m, s[i].interactionIds.add(m), g !== i && (s[g] ? s[g].effects[m] || (s[g].effects[m] = [], s[g].interactionIds.add(m)) : s[g] = {
1930
+ const h = `${i}::${v}::${m}::${o}`;
1931
+ d.interactionId = h, s[i].interactionIds.add(h), v !== i && (s[v] ? s[v].effects[h] || (s[v].effects[h] = [], s[v].interactionIds.add(h)) : s[v] = {
1906
1932
  triggers: [],
1907
1933
  effects: {
1908
- [m]: []
1934
+ [h]: []
1909
1935
  },
1910
1936
  interactionIds: /* @__PURE__ */ new Set(),
1911
1937
  selectors: /* @__PURE__ */ new Set()
1912
- }, s[g].effects[m].push({ ...f, effect: d }), s[g].selectors.add(X(d, { useFirstChild: t })));
1938
+ }, s[v].effects[h].push({ ...u, effect: d }), s[v].selectors.add(J(d, { useFirstChild: t })));
1913
1939
  });
1914
1940
  }), {
1915
1941
  effects: e.effects || {},
@@ -1917,7 +1943,7 @@ function Vn(e, t = !1) {
1917
1943
  interactions: s
1918
1944
  };
1919
1945
  }
1920
- function Ce(e, t, n) {
1946
+ function Ae(e, t, n) {
1921
1947
  if (e.listContainer) {
1922
1948
  const s = t.querySelector(e.listContainer);
1923
1949
  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}"`), []);
@@ -1933,32 +1959,32 @@ function Ce(e, t, n) {
1933
1959
  function Le(e, t) {
1934
1960
  return t.map((n) => e.selector ? n.querySelector(e.selector) : n).filter(Boolean);
1935
1961
  }
1936
- function Ve(e, t, n, s, r, i, o, a) {
1962
+ function We(e, t, n, s, r, i, o, c) {
1937
1963
  return [
1938
- o ? Le(e, o) : Ce(e, n, s),
1939
- a ? Le(t, a) : Ce(t, r, i)
1964
+ o ? Le(e, o) : Ae(e, n, s),
1965
+ c ? Le(t, c) : Ae(t, r, i)
1940
1966
  ];
1941
1967
  }
1942
- function We(e, t, n, s, r, i, o) {
1943
- const a = Array.isArray(s), f = Array.isArray(r);
1944
- a ? s.forEach((l, c) => {
1945
- const u = f ? r[c] : r;
1946
- u && Ae(
1968
+ function je(e, t, n, s, r, i, o) {
1969
+ const c = Array.isArray(s), u = Array.isArray(r);
1970
+ c ? s.forEach((l, a) => {
1971
+ const f = u ? r[a] : r;
1972
+ f && Pe(
1947
1973
  e,
1948
1974
  l,
1949
1975
  t.trigger,
1950
- u,
1976
+ f,
1951
1977
  n,
1952
1978
  t.params,
1953
1979
  i,
1954
1980
  o
1955
1981
  );
1956
- }) : (f ? r : [r]).forEach((c) => {
1957
- Ae(
1982
+ }) : (u ? r : [r]).forEach((a) => {
1983
+ Pe(
1958
1984
  e,
1959
1985
  s,
1960
1986
  t.trigger,
1961
- c,
1987
+ a,
1962
1988
  n,
1963
1989
  t.params,
1964
1990
  i,
@@ -1966,184 +1992,184 @@ function We(e, t, n, s, r, i, o) {
1966
1992
  );
1967
1993
  });
1968
1994
  }
1969
- function je(e, t, n, s, r) {
1995
+ function Ye(e, t, n, s, r) {
1970
1996
  const i = {}, o = [];
1971
- s.effects.forEach((a) => {
1972
- const f = a.effectId, l = {
1973
- ...n.dataCache.effects[f] || {},
1974
- ...a,
1975
- effectId: f
1976
- }, c = l.key, u = R(a.interactionId, e);
1977
- if (i[u] || n.addedInteractions[u] && !r)
1997
+ s.effects.forEach((c) => {
1998
+ const u = c.effectId, l = {
1999
+ ...n.dataCache.effects[u] || {},
2000
+ ...c,
2001
+ effectId: u
2002
+ }, a = l.key, f = R(c.interactionId, e);
2003
+ if (i[f] || n.addedInteractions[f] && !r)
1978
2004
  return;
1979
- const d = M(l.conditions || [], n.dataCache.conditions);
1980
- if (d && n.setupMediaQueryListener(u, d, e, () => {
2005
+ const d = $(l.conditions || [], n.dataCache.conditions);
2006
+ if (d && n.setupMediaQueryListener(f, d, e, () => {
1981
2007
  t.update();
1982
2008
  }), !d || d.matches) {
1983
- i[u] = !0;
1984
- const g = c && R(c, e);
1985
- let h;
1986
- if (g) {
1987
- if (h = w.getController(g), !h)
2009
+ i[f] = !0;
2010
+ const v = a && R(a, e);
2011
+ let m;
2012
+ if (v) {
2013
+ if (m = E.getController(v), !m)
1988
2014
  return;
1989
- l.listContainer && h.watchChildList(l.listContainer);
2015
+ l.listContainer && m.watchChildList(l.listContainer);
1990
2016
  } else
1991
- h = t;
1992
- const [m, p] = Ve(
2017
+ m = t;
2018
+ const [h, g] = We(
1993
2019
  s,
1994
2020
  l,
1995
2021
  t.element,
1996
2022
  t.useFirstChild,
1997
- h.element,
1998
- h.useFirstChild,
2023
+ m.element,
2024
+ m.useFirstChild,
1999
2025
  r
2000
2026
  );
2001
- if (!m || !p)
2027
+ if (!h || !g)
2002
2028
  return;
2003
- n.addedInteractions[u] = !0;
2004
- const v = g || s.key, y = G(
2029
+ n.addedInteractions[f] = !0;
2030
+ const y = v || s.key, p = Q(
2005
2031
  l.conditions || [],
2006
2032
  n.dataCache.conditions
2007
2033
  );
2008
2034
  o.push([
2009
- v,
2035
+ y,
2010
2036
  s,
2011
2037
  l,
2012
- m,
2038
+ h,
2039
+ g,
2013
2040
  p,
2014
- y,
2015
- h.useFirstChild
2041
+ m.useFirstChild
2016
2042
  ]);
2017
2043
  }
2018
- }), o.reverse().forEach((a) => {
2019
- We(...a);
2044
+ }), o.reverse().forEach((c) => {
2045
+ je(...c);
2020
2046
  });
2021
2047
  }
2022
- function Ye(e, t, n, s, r) {
2023
- const i = n.get(e)?.effects || {}, o = Object.keys(i), a = [];
2024
- return o.forEach((f) => {
2025
- const l = R(f, e);
2048
+ function Ge(e, t, n, s, r) {
2049
+ const i = n.get(e)?.effects || {}, o = Object.keys(i), c = [];
2050
+ return o.forEach((u) => {
2051
+ const l = R(u, e);
2026
2052
  if (n.addedInteractions[l] && !r)
2027
2053
  return;
2028
- i[f].some(({ effect: u, ...d }) => {
2029
- const g = M(
2054
+ i[u].some(({ effect: f, ...d }) => {
2055
+ const v = $(
2030
2056
  d.conditions || [],
2031
2057
  n.dataCache.conditions
2032
2058
  );
2033
- if (g && !g.matches)
2059
+ if (v && !v.matches)
2034
2060
  return !1;
2035
- const h = u.effectId, m = {
2036
- ...n.dataCache.effects[h] || {},
2037
- ...u,
2038
- effectId: h
2061
+ const m = f.effectId, h = {
2062
+ ...n.dataCache.effects[m] || {},
2063
+ ...f,
2064
+ effectId: m
2039
2065
  };
2040
- if (s && m.listContainer !== s)
2066
+ if (s && h.listContainer !== s)
2041
2067
  return !1;
2042
- const p = M(m.conditions || [], n.dataCache.conditions);
2043
- if (p && n.setupMediaQueryListener(l, p, e, () => {
2068
+ const g = $(h.conditions || [], n.dataCache.conditions);
2069
+ if (g && n.setupMediaQueryListener(l, g, e, () => {
2044
2070
  t.update();
2045
- }), !p || p.matches) {
2046
- const v = d.key && R(d.key, e), y = w.getController(v);
2047
- if (!y)
2071
+ }), !g || g.matches) {
2072
+ const y = d.key && R(d.key, e), p = E.getController(y);
2073
+ if (!p)
2048
2074
  return !0;
2049
- m.listContainer && t.watchChildList(m.listContainer);
2050
- const [E, b] = Ve(
2075
+ h.listContainer && t.watchChildList(h.listContainer);
2076
+ const [w, b] = We(
2051
2077
  d,
2052
- m,
2053
- y.element,
2054
- y.useFirstChild,
2078
+ h,
2079
+ p.element,
2080
+ p.useFirstChild,
2055
2081
  t.element,
2056
2082
  t.useFirstChild,
2057
2083
  void 0,
2058
2084
  r
2059
2085
  );
2060
- if (!E || !b)
2086
+ if (!w || !b)
2061
2087
  return !0;
2062
2088
  n.addedInteractions[l] = !0;
2063
- const I = G(
2064
- m.conditions || [],
2089
+ const T = Q(
2090
+ h.conditions || [],
2065
2091
  n.dataCache.conditions
2066
2092
  );
2067
- return a.push([
2093
+ return c.push([
2068
2094
  e,
2069
2095
  d,
2070
- m,
2071
- E,
2096
+ h,
2097
+ w,
2072
2098
  b,
2073
- I,
2099
+ T,
2074
2100
  t.useFirstChild
2075
2101
  ]), !0;
2076
2102
  }
2077
2103
  return !1;
2078
2104
  });
2079
- }), a.reverse().forEach((f) => {
2080
- We(...f);
2105
+ }), c.reverse().forEach((u) => {
2106
+ je(...u);
2081
2107
  }), o.length > 0;
2082
2108
  }
2083
- function Ae(e, t, n, s, r, i, o, a) {
2084
- let f;
2109
+ function Pe(e, t, n, s, r, i, o, c) {
2110
+ let u;
2085
2111
  if (r.transition || r.transitionProperties) {
2086
2112
  const l = {
2087
2113
  key: e,
2088
2114
  effectId: r.effectId,
2089
2115
  transition: r.transition,
2090
2116
  properties: r.transitionProperties,
2091
- childSelector: X(r, {
2117
+ childSelector: J(r, {
2092
2118
  asCombinator: !0,
2093
2119
  addItemFilter: !0,
2094
- useFirstChild: a
2120
+ useFirstChild: c
2095
2121
  }),
2096
2122
  selectorCondition: o
2097
2123
  };
2098
- if (f = w.getController(e), !f)
2124
+ if (u = E.getController(e), !u)
2099
2125
  return;
2100
- f.renderStyle(Ft(l));
2126
+ u.renderStyle(qt(l));
2101
2127
  }
2102
- $[n]?.add(t, s, r, i, {
2103
- reducedMotion: w.forceReducedMotion,
2104
- targetController: f,
2128
+ P[n]?.add(t, s, r, i, {
2129
+ reducedMotion: E.forceReducedMotion,
2130
+ targetController: u,
2105
2131
  selectorCondition: o,
2106
- allowA11yTriggers: w.allowA11yTriggers
2132
+ allowA11yTriggers: E.allowA11yTriggers
2107
2133
  });
2108
2134
  }
2109
- function Wn(e) {
2110
- const t = e.key, n = w.getInstance(t);
2135
+ function Bn(e) {
2136
+ const t = e.key, n = E.getInstance(t);
2111
2137
  if (!n)
2112
- return console.warn(`No instance found for key: ${t}`), w.setController(t, e), !1;
2138
+ return console.warn(`No instance found for key: ${t}`), E.setController(t, e), !1;
2113
2139
  const { triggers: s = [] } = n?.get(t) || {}, r = s.length > 0;
2114
- n.setController(t, e), s.forEach((o, a) => {
2115
- const f = M(o.conditions, n.dataCache.conditions);
2116
- if (f) {
2117
- const l = `${t}::trigger::${a}`;
2118
- n.setupMediaQueryListener(l, f, t, () => {
2140
+ n.setController(t, e), s.forEach((o, c) => {
2141
+ const u = $(o.conditions, n.dataCache.conditions);
2142
+ if (u) {
2143
+ const l = `${t}::trigger::${c}`;
2144
+ n.setupMediaQueryListener(l, u, t, () => {
2119
2145
  e.update();
2120
2146
  });
2121
2147
  }
2122
- (!f || f.matches) && (o.listContainer && e.watchChildList(o.listContainer), je(t, e, n, o));
2148
+ (!u || u.matches) && (o.listContainer && e.watchChildList(o.listContainer), Ye(t, e, n, o));
2123
2149
  });
2124
2150
  let i = !1;
2125
- return n && (i = Ye(t, e, n)), r || i;
2151
+ return n && (i = Ge(t, e, n)), r || i;
2126
2152
  }
2127
- function jn(e, t, n) {
2128
- const s = e.key, r = w.getInstance(s);
2153
+ function Qn(e, t, n) {
2154
+ const s = e.key, r = E.getInstance(s);
2129
2155
  if (r) {
2130
2156
  const { triggers: i = [] } = r?.get(s) || {};
2131
- i.forEach((o, a) => {
2157
+ i.forEach((o, c) => {
2132
2158
  if (o.listContainer !== t)
2133
2159
  return;
2134
- const f = M(o.conditions, r.dataCache.conditions);
2135
- if (f) {
2136
- const l = `${s}::listTrigger::${t}::${a}`;
2137
- r.setupMediaQueryListener(l, f, s, () => {
2160
+ const u = $(o.conditions, r.dataCache.conditions);
2161
+ if (u) {
2162
+ const l = `${s}::listTrigger::${t}::${c}`;
2163
+ r.setupMediaQueryListener(l, u, s, () => {
2138
2164
  e.update();
2139
2165
  });
2140
2166
  }
2141
- (!f || f.matches) && je(s, e, r, o, n);
2142
- }), Ye(s, e, r, t, n);
2167
+ (!u || u.matches) && Ye(s, e, r, o, n);
2168
+ }), Ge(s, e, r, t, n);
2143
2169
  }
2144
2170
  }
2145
- function Yn(e, t = !1) {
2146
- const n = e.key, s = w.getInstance(n);
2171
+ function Xn(e, t = !1) {
2172
+ const n = e.key, s = E.getInstance(n);
2147
2173
  if (!s)
2148
2174
  return;
2149
2175
  const r = [...s.get(n)?.selectors.values() || []].filter(Boolean).join(",");
@@ -2151,13 +2177,13 @@ function Yn(e, t = !1) {
2151
2177
  r ? (i = [...e.element.querySelectorAll(r)], e.useFirstChild || i.push(e.element)) : i = [e.element], Ke(i), s.deleteController(n, t);
2152
2178
  }
2153
2179
  function Ke(e) {
2154
- const t = Object.values($);
2180
+ const t = Object.values(P);
2155
2181
  for (const n of e)
2156
2182
  for (const s of t)
2157
2183
  s.remove(n);
2158
2184
  }
2159
- const se = "interactEffect";
2160
- class Kn {
2185
+ const ie = "interactEffect";
2186
+ class Un {
2161
2187
  element;
2162
2188
  key;
2163
2189
  connected;
@@ -2177,10 +2203,10 @@ class Kn {
2177
2203
  }
2178
2204
  n !== t && (n && console.warn(
2179
2205
  `Interact: Key mismatch between element ${n} and parameter ${t}, updating element key`
2180
- ), this.element.dataset.interactKey = t), this.key = t, this.connected = Wn(this);
2206
+ ), this.element.dataset.interactKey = t), this.key = t, this.connected = Bn(this);
2181
2207
  }
2182
2208
  disconnect({ removeFromCache: t = !1 } = {}) {
2183
- if ((this.key || this.element.dataset.interactKey) && Yn(this, t), this.sheet) {
2209
+ if ((this.key || this.element.dataset.interactKey) && Xn(this, t), this.sheet) {
2184
2210
  const s = document.adoptedStyleSheets.indexOf(this.sheet);
2185
2211
  document.adoptedStyleSheets.splice(s, 1);
2186
2212
  }
@@ -2211,12 +2237,12 @@ class Kn {
2211
2237
  return;
2212
2238
  }
2213
2239
  const i = new Set(
2214
- this.element.dataset[se]?.split(" ") || []
2240
+ this.element.dataset[ie]?.split(" ") || []
2215
2241
  );
2216
- n === "toggle" ? i.has(t) ? i.delete(t) : i.add(t) : n === "add" ? i.add(t) : n === "remove" ? i.delete(t) : n === "clear" && i.clear(), (s || this.element).dataset[se] = Array.from(i).join(" ");
2242
+ n === "toggle" ? i.has(t) ? i.delete(t) : i.add(t) : n === "add" ? i.add(t) : n === "remove" ? i.delete(t) : n === "clear" && i.clear(), (s || this.element).dataset[ie] = Array.from(i).join(" ");
2217
2243
  }
2218
2244
  getActiveEffects() {
2219
- const n = (this.element.dataset[se] || "").trim();
2245
+ const n = (this.element.dataset[ie] || "").trim();
2220
2246
  return n ? n.split(/\s+/) : [];
2221
2247
  }
2222
2248
  watchChildList(t) {
@@ -2229,66 +2255,66 @@ class Kn {
2229
2255
  _childListChangeHandler(t, n) {
2230
2256
  const s = this.key || this.element.dataset.interactKey, r = [], i = [];
2231
2257
  n.forEach((o) => {
2232
- o.removedNodes.forEach((a) => {
2233
- a instanceof HTMLElement && r.push(a);
2234
- }), o.addedNodes.forEach((a) => {
2235
- a instanceof HTMLElement && i.push(a);
2258
+ o.removedNodes.forEach((c) => {
2259
+ c instanceof HTMLElement && r.push(c);
2260
+ }), o.addedNodes.forEach((c) => {
2261
+ c instanceof HTMLElement && i.push(c);
2236
2262
  });
2237
- }), Ke(r), s && jn(this, t, i);
2263
+ }), Ke(r), s && Qn(this, t, i);
2238
2264
  }
2239
2265
  }
2240
- function Un(e, t) {
2241
- new Kn(e, t).connect();
2266
+ function ns(e, t) {
2267
+ new Un(e, t).connect();
2242
2268
  }
2243
- function Jn(e) {
2244
- const t = w.getController(e);
2269
+ function ss(e) {
2270
+ const t = E.getController(e);
2245
2271
  t && t.disconnect({ removeFromCache: !0 });
2246
2272
  }
2247
- const Gn = (e, t, n, s) => {
2273
+ const Jn = (e, t, n, s) => {
2248
2274
  let i = `[data-interact-key="${e.replace(/"/g, "'")}"]`;
2249
- const o = X(t, { asCombinator: !0, useFirstChild: s });
2250
- return o && (i = `${i} ${o}`), n && (i = V(i, n)), i;
2275
+ const o = J(t, { asCombinator: !0, useFirstChild: s });
2276
+ return o && (i = `${i} ${o}`), n && (i = j(i, n)), i;
2251
2277
  };
2252
- function Zn(e, t = !1) {
2278
+ function is(e, t = !1) {
2253
2279
  const n = [], s = /* @__PURE__ */ new Set();
2254
2280
  return e.interactions.forEach(
2255
2281
  ({
2256
2282
  key: r,
2257
2283
  selector: i,
2258
2284
  listContainer: o,
2259
- listItemSelector: a,
2260
- trigger: f,
2285
+ listItemSelector: c,
2286
+ trigger: u,
2261
2287
  params: l,
2262
- effects: c,
2263
- conditions: u
2288
+ effects: a,
2289
+ conditions: f
2264
2290
  }) => {
2265
- if (f === "viewEnter") {
2266
- const g = l;
2267
- (!g?.type || g.type === "once") && c.forEach((m) => {
2268
- const p = m?.effectId && e.effects[m.effectId] || m, {
2269
- key: v,
2270
- selector: y,
2271
- listContainer: E,
2291
+ if (u === "viewEnter") {
2292
+ const v = l;
2293
+ (!v?.type || v.type === "once") && a.forEach((h) => {
2294
+ const g = h?.effectId && e.effects[h.effectId] || h, {
2295
+ key: y,
2296
+ selector: p,
2297
+ listContainer: w,
2272
2298
  listItemSelector: b,
2273
- conditions: I
2274
- } = p;
2275
- if (!(!v || v === r) || !(!y && !i || y === i) || !(!E && !o || E === o) || !(!b && !a || b === a)) return;
2276
- const de = e.conditions || {}, he = G(
2277
- I,
2278
- de
2279
- ), Z = G(
2280
- u,
2281
- de
2299
+ conditions: T
2300
+ } = g;
2301
+ if (!(!y || y === r) || !(!p && !i || p === i) || !(!w && !o || w === o) || !(!b && !c || b === c)) return;
2302
+ const me = e.conditions || {}, ge = Q(
2303
+ T,
2304
+ me
2305
+ ), ee = Q(
2306
+ f,
2307
+ me
2282
2308
  );
2283
- if (!(!he && !Z || he === Z)) return;
2284
- const ee = Gn(
2309
+ if (!(!ge && !ee || ge === ee)) return;
2310
+ const te = Jn(
2285
2311
  r,
2286
- p,
2287
- Z,
2312
+ g,
2313
+ ee,
2288
2314
  t
2289
2315
  );
2290
- s.has(ee) || (s.add(ee), n.push(`@media (prefers-reduced-motion: no-preference) {
2291
- ${ee}:not([data-interact-enter]) {
2316
+ s.has(te) || (s.add(te), n.push(`@media (prefers-reduced-motion: no-preference) {
2317
+ ${te}:not([data-interact-enter]) {
2292
2318
  visibility: hidden;
2293
2319
  transform: none;
2294
2320
  translate: none;
@@ -2303,10 +2329,10 @@ function Zn(e, t = !1) {
2303
2329
  `);
2304
2330
  }
2305
2331
  export {
2306
- Kn as I,
2307
- w as a,
2308
- Un as b,
2309
- Zn as g,
2310
- Jn as r
2332
+ Un as I,
2333
+ E as a,
2334
+ ns as b,
2335
+ is as g,
2336
+ ss as r
2311
2337
  };
2312
- //# sourceMappingURL=index-BnI6W-7u.mjs.map
2338
+ //# sourceMappingURL=index-BfcN_rkn.mjs.map