@wix/interact 2.5.24 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/react.js +1 -1
  4. package/dist/cjs/web.js +1 -1
  5. package/dist/cjs/web.js.map +1 -1
  6. package/dist/es/index.js +1 -1
  7. package/dist/es/react.js +2 -2
  8. package/dist/es/web.js +5 -3
  9. package/dist/es/web.js.map +1 -1
  10. package/dist/{index-YKqGJSeK.mjs → index-BcRbaJX2.mjs} +1318 -1253
  11. package/dist/index-BcRbaJX2.mjs.map +1 -0
  12. package/dist/index-sqvrGHLA.js +29 -0
  13. package/dist/index-sqvrGHLA.js.map +1 -0
  14. package/dist/tsconfig.build.tsbuildinfo +1 -1
  15. package/dist/types/core/Interact.d.ts +2 -0
  16. package/dist/types/core/Interact.d.ts.map +1 -1
  17. package/dist/types/core/css.d.ts +4 -1
  18. package/dist/types/core/css.d.ts.map +1 -1
  19. package/dist/types/core/cssUtils.d.ts +6 -4
  20. package/dist/types/core/cssUtils.d.ts.map +1 -1
  21. package/dist/types/core/resolvers.d.ts.map +1 -1
  22. package/dist/types/handlers/eventTrigger.d.ts.map +1 -1
  23. package/dist/types/handlers/pointerMove.d.ts.map +1 -1
  24. package/dist/types/handlers/viewEnter.d.ts.map +1 -1
  25. package/dist/types/types/css.d.ts +7 -0
  26. package/dist/types/types/css.d.ts.map +1 -1
  27. package/dist/types/web/InteractElement.d.ts.map +1 -1
  28. package/docs/api/functions.md +7 -5
  29. package/docs/api/interact-class.md +10 -2
  30. package/docs/guides/effects-and-animations.md +1 -1
  31. package/package.json +2 -2
  32. package/rules/full-lean.md +5 -5
  33. package/rules/integration.md +4 -0
  34. package/rules/pointermove.md +3 -3
  35. package/dist/index-YKqGJSeK.mjs.map +0 -1
  36. package/dist/index-rRrSHuig.js +0 -26
  37. package/dist/index-rRrSHuig.js.map +0 -1
@@ -1,23 +1,23 @@
1
- function Kt(e) {
1
+ function Ut(e) {
2
2
  return [...e.matchAll(/\[([^\]]+)]/g)].map(([t, n]) => n);
3
3
  }
4
4
  function q(e, t) {
5
- const n = Kt(t);
5
+ const n = Ut(t);
6
6
  let s = 0;
7
7
  return n.length ? e.replace(/\[]/g, () => {
8
8
  const i = n[s++];
9
9
  return i !== void 0 ? `[${i}]` : "[]";
10
10
  }) : e;
11
11
  }
12
- function Yt(e, t) {
13
- return e.trigger === "viewEnter" && t.triggerType === "once" && V(e) === V(t);
12
+ function Qt(e, t) {
13
+ return e.trigger === "viewEnter" && t.triggerType === "once" && W(e) === W(t);
14
14
  }
15
- function V(e) {
15
+ function W(e) {
16
16
  const { key: t, listContainer: n, listItemSelector: s, selector: i } = e;
17
17
  return `${t}\0${n || ""}\0${s || ""}\0${i || ""}`;
18
18
  }
19
- const ot = "$";
20
- class ee {
19
+ const ct = "$";
20
+ class ne {
21
21
  animations;
22
22
  options;
23
23
  ready;
@@ -121,59 +121,59 @@ class ee {
121
121
  });
122
122
  }
123
123
  }
124
- const rt = (e) => e, Bt = (e) => 1 - Math.cos(e * Math.PI / 2), Ut = (e) => Math.sin(e * Math.PI / 2), Qt = (e) => -(Math.cos(Math.PI * e) - 1) / 2, Xt = (e) => e ** 2, Zt = (e) => 1 - (1 - e) ** 2, Jt = (e) => e < 0.5 ? 2 * e ** 2 : 1 - (-2 * e + 2) ** 2 / 2, en = (e) => e ** 3, tn = (e) => 1 - (1 - e) ** 3, nn = (e) => e < 0.5 ? 4 * e ** 3 : 1 - (-2 * e + 2) ** 3 / 2, sn = (e) => e ** 4, on = (e) => 1 - (1 - e) ** 4, rn = (e) => e < 0.5 ? 8 * e ** 4 : 1 - (-2 * e + 2) ** 4 / 2, an = (e) => e ** 5, cn = (e) => 1 - (1 - e) ** 5, ln = (e) => e < 0.5 ? 16 * e ** 5 : 1 - (-2 * e + 2) ** 5 / 2, un = (e) => e === 0 ? 0 : 2 ** (10 * e - 10), fn = (e) => e === 1 ? 1 : 1 - 2 ** (-10 * e), dn = (e) => e === 0 ? 0 : e === 1 ? 1 : e < 0.5 ? 2 ** (20 * e - 10) / 2 : (2 - 2 ** (-20 * e + 10)) / 2, hn = (e) => 1 - Math.sqrt(1 - e ** 2), mn = (e) => Math.sqrt(1 - (e - 1) ** 2), pn = (e) => e < 0.5 ? (1 - Math.sqrt(1 - 4 * e ** 2)) / 2 : (Math.sqrt(-(2 * e - 3) * (2 * e - 1)) + 1) / 2, gn = (e) => 2.70158 * e ** 3 - 1.70158 * e ** 2, vn = (e) => 1 + 2.70158 * (e - 1) ** 3 + 1.70158 * (e - 1) ** 2, yn = (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, De = {
125
- linear: rt,
126
- sineIn: Bt,
127
- sineOut: Ut,
128
- sineInOut: Qt,
129
- quadIn: Xt,
130
- quadOut: Zt,
131
- quadInOut: Jt,
132
- cubicIn: en,
133
- cubicOut: tn,
134
- cubicInOut: nn,
135
- quartIn: sn,
136
- quartOut: on,
137
- quartInOut: rn,
138
- quintIn: an,
139
- quintOut: cn,
140
- quintInOut: ln,
141
- expoIn: un,
142
- expoOut: fn,
143
- expoInOut: dn,
144
- circIn: hn,
145
- circOut: mn,
146
- circInOut: pn,
147
- backIn: gn,
148
- backOut: vn,
149
- backInOut: yn
124
+ const lt = (e) => e, Xt = (e) => 1 - Math.cos(e * Math.PI / 2), Zt = (e) => Math.sin(e * Math.PI / 2), Jt = (e) => -(Math.cos(Math.PI * e) - 1) / 2, en = (e) => e ** 2, tn = (e) => 1 - (1 - e) ** 2, nn = (e) => e < 0.5 ? 2 * e ** 2 : 1 - (-2 * e + 2) ** 2 / 2, sn = (e) => e ** 3, on = (e) => 1 - (1 - e) ** 3, rn = (e) => e < 0.5 ? 4 * e ** 3 : 1 - (-2 * e + 2) ** 3 / 2, an = (e) => e ** 4, cn = (e) => 1 - (1 - e) ** 4, ln = (e) => e < 0.5 ? 8 * e ** 4 : 1 - (-2 * e + 2) ** 4 / 2, un = (e) => e ** 5, fn = (e) => 1 - (1 - e) ** 5, dn = (e) => e < 0.5 ? 16 * e ** 5 : 1 - (-2 * e + 2) ** 5 / 2, hn = (e) => e === 0 ? 0 : 2 ** (10 * e - 10), mn = (e) => e === 1 ? 1 : 1 - 2 ** (-10 * e), pn = (e) => e === 0 ? 0 : e === 1 ? 1 : e < 0.5 ? 2 ** (20 * e - 10) / 2 : (2 - 2 ** (-20 * e + 10)) / 2, gn = (e) => 1 - Math.sqrt(1 - e ** 2), vn = (e) => Math.sqrt(1 - (e - 1) ** 2), yn = (e) => e < 0.5 ? (1 - Math.sqrt(1 - 4 * e ** 2)) / 2 : (Math.sqrt(-(2 * e - 3) * (2 * e - 1)) + 1) / 2, En = (e) => 2.70158 * e ** 3 - 1.70158 * e ** 2, wn = (e) => 1 + 2.70158 * (e - 1) ** 3 + 1.70158 * (e - 1) ** 2, $n = (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, Ve = {
125
+ linear: lt,
126
+ sineIn: Xt,
127
+ sineOut: Zt,
128
+ sineInOut: Jt,
129
+ quadIn: en,
130
+ quadOut: tn,
131
+ quadInOut: nn,
132
+ cubicIn: sn,
133
+ cubicOut: on,
134
+ cubicInOut: rn,
135
+ quartIn: an,
136
+ quartOut: cn,
137
+ quartInOut: ln,
138
+ quintIn: un,
139
+ quintOut: fn,
140
+ quintInOut: dn,
141
+ expoIn: hn,
142
+ expoOut: mn,
143
+ expoInOut: pn,
144
+ circIn: gn,
145
+ circOut: vn,
146
+ circInOut: yn,
147
+ backIn: En,
148
+ backOut: wn,
149
+ backInOut: $n
150
150
  }, K = (e, t, n, s, i) => {
151
- const o = 3 * t, r = 3 * (s - 2 * t), a = 1 - 3 * s + 3 * t, c = 3 * n, u = 3 * (i - 2 * n), l = 1 - 3 * i + 3 * n;
151
+ const o = 3 * t, r = 3 * (s - 2 * t), c = 1 - 3 * s + 3 * t, l = 3 * n, u = 3 * (i - 2 * n), a = 1 - 3 * i + 3 * n;
152
152
  let f;
153
- if (a === 0)
153
+ if (c === 0)
154
154
  f = r === 0 ? `(${e} / ${o})` : `((sqrt(max(0, ${o * o} + ${4 * r} * ${e})) - ${o}) / ${2 * r})`;
155
155
  else {
156
- const d = r / (3 * a), h = 2 * Math.pow(r, 3) - 9 * o * r * a, m = 54 * Math.pow(a, 3), p = (3 * a * o - r * r) / (9 * a * a), v = `((${h} - ${27 * a * a} * ${e}) / ${m})`;
156
+ const d = r / (3 * c), h = 2 * Math.pow(r, 3) - 9 * o * r * c, m = 54 * Math.pow(c, 3), p = (3 * c * o - r * r) / (9 * c * c), g = `((${h} - ${27 * c * c} * ${e}) / ${m})`;
157
157
  if (p < 0) {
158
- const y = 2 * Math.sqrt(-p);
159
- let g = 0;
158
+ const E = 2 * Math.sqrt(-p);
159
+ let y = 0;
160
160
  for (const w of [0, 1, 2])
161
161
  [0, 0.25, 0.5, 0.75, 1].every((S) => {
162
- const T = Math.min(
163
- Math.max(2 * (h - 27 * a * a * S) / (m * p * y), -1),
162
+ const I = Math.min(
163
+ Math.max(2 * (h - 27 * c * c * S) / (m * p * E), -1),
164
164
  1
165
- ), C = y * Math.cos((Math.acos(T) - w * 2 * Math.PI) / 3) - d;
166
- return C >= -1e-6 && C <= 1.000001;
167
- }) && (g = w);
168
- const E = `(acos(clamp(-1, ${2 / (p * y)} * ${v}, 1)) - ${360 * g}deg) / 3`;
169
- f = `(${y} * cos(${E}) - ${d})`;
165
+ ), O = E * Math.cos((Math.acos(I) - w * 2 * Math.PI) / 3) - d;
166
+ return O >= -1e-6 && O <= 1.000001;
167
+ }) && (y = w);
168
+ const v = `(acos(clamp(-1, ${2 / (p * E)} * ${g}, 1)) - ${360 * y}deg) / 3`;
169
+ f = `(${E} * cos(${v}) - ${d})`;
170
170
  } else {
171
- const y = `sqrt(pow(${v}, 2) + ${Math.pow(p, 3)})`;
172
- f = `(pow(${y} - ${v}, 1 / 3) - pow(${y} + ${v}, 1 / 3) - ${d})`;
171
+ const E = `sqrt(pow(${g}, 2) + ${Math.pow(p, 3)})`;
172
+ f = `(pow(${E} - ${g}, 1 / 3) - pow(${E} + ${g}, 1 / 3) - ${d})`;
173
173
  }
174
174
  }
175
- return `(${l} * pow(${f}, 3) + ${u} * pow(${f}, 2) + ${c} * ${f})`;
176
- }, Ge = {
175
+ return `(${a} * pow(${f}, 3) + ${u} * pow(${f}, 2) + ${l} * ${f})`;
176
+ }, Ke = {
177
177
  linear: (e) => e,
178
178
  ease: (e) => K(e, 0.25, 0.1, 0.25, 1),
179
179
  easeIn: (e) => K(e, 0.42, 0, 1, 1),
@@ -203,7 +203,7 @@ const rt = (e) => e, Bt = (e) => 1 - Math.cos(e * Math.PI / 2), Ut = (e) => Math
203
203
  backIn: (e) => `(2.70158 * pow(${e}, 3) - 1.70158 * ${e} * ${e})`,
204
204
  backOut: (e) => `(1 + 2.70158 * pow(${e} - 1, 3) + 1.70158 * (${e} - 1) * (${e} - 1))`,
205
205
  backInOut: (e) => `((round(${e}) * (2 + (2 * ${e} - 2) * (2 * ${e} - 2) * (2.5949095 + 3.5949095 * (2 * ${e} - 2))) + (1 - round(${e})) * 4 * ${e} * ${e} * (3.5949095 * 2 * ${e} - 2.5949095)) / 2)`
206
- }, We = {
206
+ }, Ye = {
207
207
  linear: "linear",
208
208
  ease: "ease",
209
209
  easeIn: "ease-in",
@@ -234,68 +234,68 @@ const rt = (e) => e, Bt = (e) => 1 - Math.cos(e * Math.PI / 2), Ut = (e) => Math
234
234
  backOut: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
235
235
  backInOut: "cubic-bezier(0.68, -0.55, 0.265, 1.55)"
236
236
  };
237
- function En(e) {
237
+ function bn(e) {
238
238
  return e === "percentage" ? "%" : e || "px";
239
239
  }
240
- const wn = /^(webkit|moz|ms|o)(?=[A-Z])/, $n = Object.assign(/* @__PURE__ */ Object.create(null), {
240
+ const Sn = /^(webkit|moz|ms|o)(?=[A-Z])/, In = Object.assign(/* @__PURE__ */ Object.create(null), {
241
241
  float: "cssFloat",
242
242
  "animation-timing-function": "easing",
243
243
  "animation-composition": "composite"
244
244
  });
245
- function me(e) {
246
- return e.startsWith("--") ? e : (wn.test(e) ? `-${e}` : e).replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`);
245
+ function ge(e) {
246
+ return e.startsWith("--") ? e : (Sn.test(e) ? `-${e}` : e).replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`);
247
247
  }
248
- function bn(e) {
248
+ function Tn(e) {
249
249
  return e.startsWith("--") || !e.includes("-") ? e : e.replace(/^-/, "").replace(/-([a-z])/g, (t, n) => n.toUpperCase());
250
250
  }
251
- function at(e) {
252
- return $n[e] || bn(e);
251
+ function ut(e) {
252
+ return In[e] || Tn(e);
253
253
  }
254
- function Sn(e) {
254
+ function Cn(e) {
255
255
  for (const t in e)
256
- if (Object.hasOwn(e, t) && at(t) !== t)
256
+ if (Object.hasOwn(e, t) && ut(t) !== t)
257
257
  return !0;
258
258
  return !1;
259
259
  }
260
- function ct(e) {
260
+ function ft(e) {
261
261
  if (!Array.isArray(e))
262
262
  return e;
263
263
  let t;
264
264
  return e.forEach((n, s) => {
265
- if (!n || typeof n != "object" || !Sn(n))
265
+ if (!n || typeof n != "object" || !Cn(n))
266
266
  return;
267
267
  t ??= e.slice();
268
268
  const i = {};
269
269
  for (const o in n)
270
- Object.hasOwn(n, o) && (i[at(o)] = n[o]);
270
+ Object.hasOwn(n, o) && (i[ut(o)] = n[o]);
271
271
  t[s] = i;
272
272
  }), t || e;
273
273
  }
274
- function ue(e) {
275
- return e ? We[e] || e : We.linear;
274
+ function de(e) {
275
+ return e ? Ye[e] || e : Ye.linear;
276
276
  }
277
- function In(e, t, n, s) {
278
- const i = 3 * e, o = 3 * (n - e) - i, r = 1 - i - o, a = 3 * t, c = 3 * (s - t) - a, u = 1 - a - c, l = (m) => ((r * m + o) * m + i) * m, f = (m) => ((u * m + c) * m + a) * m, d = (m) => (3 * r * m + 2 * o) * m + i;
277
+ function On(e, t, n, s) {
278
+ const i = 3 * e, o = 3 * (n - e) - i, r = 1 - i - o, c = 3 * t, l = 3 * (s - t) - c, u = 1 - c - l, a = (m) => ((r * m + o) * m + i) * m, f = (m) => ((u * m + l) * m + c) * m, d = (m) => (3 * r * m + 2 * o) * m + i;
279
279
  function h(m) {
280
280
  let p = m;
281
- for (let g = 0; g < 8; g++) {
282
- const E = l(p) - m;
283
- if (Math.abs(E) < 1e-7) return p;
281
+ for (let y = 0; y < 8; y++) {
282
+ const v = a(p) - m;
283
+ if (Math.abs(v) < 1e-7) return p;
284
284
  const w = d(p);
285
285
  if (Math.abs(w) < 1e-6) break;
286
- p -= E / w;
286
+ p -= v / w;
287
287
  }
288
- let v = 0, y = 1;
289
- for (p = (v + y) / 2; y - v > 1e-7; ) {
290
- const g = l(p);
291
- if (Math.abs(g - m) < 1e-7) return p;
292
- m > g ? v = p : y = p, p = (v + y) / 2;
288
+ let g = 0, E = 1;
289
+ for (p = (g + E) / 2; E - g > 1e-7; ) {
290
+ const y = a(p);
291
+ if (Math.abs(y - m) < 1e-7) return p;
292
+ m > y ? g = p : E = p, p = (g + E) / 2;
293
293
  }
294
294
  return p;
295
295
  }
296
296
  return (m) => m <= 0 ? 0 : m >= 1 ? 1 : f(h(m));
297
297
  }
298
- function lt(e) {
298
+ function dt(e) {
299
299
  const t = e.match(
300
300
  /^cubic-bezier\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*\)$/
301
301
  );
@@ -304,33 +304,33 @@ function lt(e) {
304
304
  if (![n, s, i, o].some(isNaN))
305
305
  return [n, s, i, o];
306
306
  }
307
- function Tn(e) {
308
- const t = lt(e);
307
+ function _n(e) {
308
+ const t = dt(e);
309
309
  if (!(!t || t.some(isNaN)))
310
- return In(...t);
310
+ return On(...t);
311
311
  }
312
- function Cn(e) {
313
- const t = lt(e);
312
+ function An(e) {
313
+ const t = dt(e);
314
314
  if (!(!t || t.some(isNaN)))
315
315
  return (n) => K(n, ...t);
316
316
  }
317
- function ut(e) {
317
+ function ht(e) {
318
318
  const t = e.match(/^linear\((.+)\)$/);
319
319
  if (!t) return;
320
320
  const n = t[1].split(",").map((o) => o.trim()).filter(Boolean);
321
321
  if (n.length === 0) return;
322
322
  const s = [];
323
323
  for (const o of n) {
324
- const r = o.split(/\s+/), a = parseFloat(r[0]);
325
- if (isNaN(a)) return;
326
- const c = [];
324
+ const r = o.split(/\s+/), c = parseFloat(r[0]);
325
+ if (isNaN(c)) return;
326
+ const l = [];
327
327
  for (let u = 1; u < r.length; u++)
328
328
  if (r[u].endsWith("%")) {
329
- const l = parseFloat(r[u]) / 100;
330
- if (isNaN(l)) return;
331
- c.push(l);
329
+ const a = parseFloat(r[u]) / 100;
330
+ if (isNaN(a)) return;
331
+ l.push(a);
332
332
  }
333
- c.length === 0 ? s.push({ output: a, pos: null }) : c.length === 1 ? s.push({ output: a, pos: c[0] }) : (s.push({ output: a, pos: c[0] }), s.push({ output: a, pos: c[1] }));
333
+ l.length === 0 ? s.push({ output: c, pos: null }) : l.length === 1 ? s.push({ output: c, pos: l[0] }) : (s.push({ output: c, pos: l[0] }), s.push({ output: c, pos: l[1] }));
334
334
  }
335
335
  if (s.length === 0) return;
336
336
  s[0].pos === null && (s[0].pos = 0), s[s.length - 1].pos === null && (s[s.length - 1].pos = 1);
@@ -340,9 +340,9 @@ function ut(e) {
340
340
  const o = i - 1;
341
341
  let r = i;
342
342
  for (; r < s.length && s[r].pos === null; ) r++;
343
- const a = s[o].pos, c = s[r].pos, u = r - o;
344
- for (let l = o + 1; l < r; l++)
345
- s[l].pos = a + (c - a) * (l - o) / u;
343
+ const c = s[o].pos, l = s[r].pos, u = r - o;
344
+ for (let a = o + 1; a < r; a++)
345
+ s[a].pos = c + (l - c) * (a - o) / u;
346
346
  i = r + 1;
347
347
  } else
348
348
  i++;
@@ -350,8 +350,8 @@ function ut(e) {
350
350
  s[o].pos < s[o - 1].pos && (s[o].pos = s[o - 1].pos);
351
351
  return s;
352
352
  }
353
- function On(e) {
354
- const t = ut(e);
353
+ function Mn(e) {
354
+ const t = ht(e);
355
355
  if (t)
356
356
  return (n) => {
357
357
  if (n <= t[0].pos) return t[0].output;
@@ -359,15 +359,15 @@ function On(e) {
359
359
  if (n >= s.pos) return s.output;
360
360
  let i = 0, o = t.length - 1;
361
361
  for (; i < o - 1; ) {
362
- const c = i + o >>> 1;
363
- t[c].pos <= n ? i = c : o = c;
362
+ const l = i + o >>> 1;
363
+ t[l].pos <= n ? i = l : o = l;
364
364
  }
365
- const r = t[i], a = t[o];
366
- return a.pos === r.pos ? a.output : r.output + (a.output - r.output) * (n - r.pos) / (a.pos - r.pos);
365
+ const r = t[i], c = t[o];
366
+ return c.pos === r.pos ? c.output : r.output + (c.output - r.output) * (n - r.pos) / (c.pos - r.pos);
367
367
  };
368
368
  }
369
- function _n(e) {
370
- const t = ut(e);
369
+ function kn(e) {
370
+ const t = ht(e);
371
371
  if (t)
372
372
  return (n) => {
373
373
  const s = [`${t[0].output}`];
@@ -376,24 +376,24 @@ function _n(e) {
376
376
  if (o === 0 && t[i - 1].pos === 0)
377
377
  s.push(`${r}`);
378
378
  else {
379
- const a = o === 0 ? `round(${n} / ${2 * t[i - 1].pos})` : `(${n} - ${t[i - 1].pos}) / ${o}`;
380
- s.push(`clamp(0, ${a}, 1) * ${r}`);
379
+ const c = o === 0 ? `round(${n} / ${2 * t[i - 1].pos})` : `(${n} - ${t[i - 1].pos}) / ${o}`;
380
+ s.push(`clamp(0, ${c}, 1) * ${r}`);
381
381
  }
382
382
  }
383
383
  return `(${s.join(" + ")})`;
384
384
  };
385
385
  }
386
- function ft(e) {
386
+ function De(e) {
387
387
  if (!e) return;
388
- const t = De[e];
389
- return t || (Tn(e) ?? On(e) ?? De.linear);
388
+ const t = Ve[e];
389
+ return t || (_n(e) ?? Mn(e) ?? Ve.linear);
390
390
  }
391
- function An(e) {
391
+ function qn(e) {
392
392
  if (!e) return;
393
- const t = Ge[e];
394
- return t || (Cn(e) ?? _n(e) ?? Ge.linear);
393
+ const t = Ke[e];
394
+ return t || (An(e) ?? kn(e) ?? Ke.linear);
395
395
  }
396
- class Mn extends ee {
396
+ class Pn extends ne {
397
397
  animationGroups;
398
398
  delay;
399
399
  offset;
@@ -402,10 +402,10 @@ class Mn extends ee {
402
402
  timingOptions;
403
403
  constructor(t, n = {}) {
404
404
  const s = t.flatMap((i) => [...i.animations]);
405
- super(s), this.animationGroups = t, this.delay = n.delay ?? 0, this.offset = n.offset ?? 0, this.sequenceId = n.sequenceId, this.offsetEasing = typeof n.offsetEasing == "function" ? n.offsetEasing : ft(n.offsetEasing) ?? rt, this.timingOptions = this.animationGroups.map((i) => i.getTimingOptions().map(({ delay: o, duration: r, iterations: a }) => ({
405
+ super(s), this.animationGroups = t, this.delay = n.delay ?? 0, this.offset = n.offset ?? 0, this.sequenceId = n.sequenceId, this.offsetEasing = typeof n.offsetEasing == "function" ? n.offsetEasing : De(n.offsetEasing) ?? lt, this.timingOptions = this.animationGroups.map((i) => i.getTimingOptions().map(({ delay: o, duration: r, iterations: c }) => ({
406
406
  delay: o,
407
407
  duration: Number.isFinite(r) ? r : 0,
408
- iterations: Number.isFinite(a) ? a : 1
408
+ iterations: Number.isFinite(c) ? c : 1
409
409
  }))), this.applyOffsets(), this.ready = Promise.all(t.map((i) => i.ready)).then(() => {
410
410
  });
411
411
  }
@@ -427,15 +427,15 @@ class Mn extends ee {
427
427
  if (this.animationGroups.length === 0 || this.animations.length === 0) return;
428
428
  const t = this.calculateOffsets(), n = this.getSequenceActiveDuration(t), s = this.animationGroups.length - 1;
429
429
  this.animationGroups.forEach((i, o) => {
430
- i.animations.forEach((r, a) => {
431
- const c = r.effect;
432
- if (!c) return;
433
- const { delay: u, duration: l, iterations: f } = this.timingOptions[o][a], d = u + t[o], h = n - (d + l * f);
430
+ i.animations.forEach((r, c) => {
431
+ const l = r.effect;
432
+ if (!l) return;
433
+ const { delay: u, duration: a, iterations: f } = this.timingOptions[o][c], d = u + t[o], h = n - (d + a * f);
434
434
  if (i.isCSS && this.sequenceId) {
435
- const { target: m } = c;
436
- m instanceof HTMLElement && (m.style.setProperty(`--motion-${this.sequenceId}-index`, `${o}`), m.style.setProperty(`--motion-${this.sequenceId}-last`, `${s}`)), c.updateTiming({ endDelay: h });
435
+ const { target: m } = l;
436
+ m instanceof HTMLElement && (m.style.setProperty(`--motion-${this.sequenceId}-index`, `${o}`), m.style.setProperty(`--motion-${this.sequenceId}-last`, `${s}`)), l.updateTiming({ endDelay: h });
437
437
  } else
438
- c.updateTiming({ delay: d + this.delay, endDelay: h });
438
+ l.updateTiming({ delay: d + this.delay, endDelay: h });
439
439
  });
440
440
  });
441
441
  }
@@ -444,8 +444,8 @@ class Mn extends ee {
444
444
  for (let s = 0; s < this.timingOptions.length; s++) {
445
445
  const i = this.timingOptions[s].reduce((o, r) => {
446
446
  if (!r) return o;
447
- const { delay: a, duration: c, iterations: u } = r;
448
- return Math.max(o, a + c * u);
447
+ const { delay: c, duration: l, iterations: u } = r;
448
+ return Math.max(o, c + l * u);
449
449
  }, 0);
450
450
  n.push(t[s] + i);
451
451
  }
@@ -462,8 +462,8 @@ class Mn extends ee {
462
462
  for (const { index: s, group: i } of n) {
463
463
  const o = Math.min(s, this.animationGroups.length);
464
464
  this.animationGroups.splice(o, 0, i), this.timingOptions.splice(o, 0, i.getTimingOptions());
465
- const r = [...i.animations], a = this.animationGroups.slice(0, o).reduce((c, u) => c + u.animations.length, 0);
466
- this.animations.splice(a, 0, ...r);
465
+ const r = [...i.animations], c = this.animationGroups.slice(0, o).reduce((l, u) => l + u.animations.length, 0);
466
+ this.animations.splice(c, 0, ...r);
467
467
  }
468
468
  this.applyOffsets(), this.ready = Promise.all(this.animationGroups.map((s) => s.ready)).then(() => {
469
469
  });
@@ -491,7 +491,7 @@ class Mn extends ee {
491
491
  }
492
492
  }
493
493
  }
494
- class kn {
494
+ class Ln {
495
495
  _animation;
496
496
  customEffect;
497
497
  progress;
@@ -502,8 +502,8 @@ class kn {
502
502
  ...s,
503
503
  composite: "add"
504
504
  }), { timeline: r } = i;
505
- this._animation = new Animation(o, r), this._tickCbId = null, this.progress = null, this.customEffect = (a) => t(o.target, a), this._finishHandler = (a) => {
506
- this.effect.target?.getAnimations().find((c) => c === this._animation) || this.cancel();
505
+ this._animation = new Animation(o, r), this._tickCbId = null, this.progress = null, this.customEffect = (c) => t(o.target, c), this._finishHandler = (c) => {
506
+ this.effect.target?.getAnimations().find((l) => l === this._animation) || this.cancel();
507
507
  }, this.addEventListener("finish", this._finishHandler), this.addEventListener("remove", this._finishHandler);
508
508
  }
509
509
  // private tick method for customEffect loop implementation
@@ -631,20 +631,20 @@ class kn {
631
631
  return this._animation.dispatchEvent(t);
632
632
  }
633
633
  }
634
- function qn(e) {
634
+ function Fn(e) {
635
635
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
636
636
  }
637
- var fe = { exports: {} }, Ve = fe.exports, Ke;
638
- function Pn() {
639
- return Ke || (Ke = 1, (function(e) {
637
+ var he = { exports: {} }, Be = he.exports, Ue;
638
+ function Rn() {
639
+ return Ue || (Ue = 1, (function(e) {
640
640
  (function(t) {
641
641
  var n = function() {
642
- }, s = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.msRequestAnimationFrame || function(l) {
643
- return setTimeout(l, 16);
642
+ }, s = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.msRequestAnimationFrame || function(a) {
643
+ return setTimeout(a, 16);
644
644
  };
645
645
  function i() {
646
- var l = this;
647
- l.reads = [], l.writes = [], l.raf = s.bind(t);
646
+ var a = this;
647
+ a.reads = [], a.writes = [], a.raf = s.bind(t);
648
648
  }
649
649
  i.prototype = {
650
650
  constructor: i,
@@ -656,8 +656,8 @@ function Pn() {
656
656
  *
657
657
  * @param {Array} tasks
658
658
  */
659
- runTasks: function(l) {
660
- for (var f; f = l.shift(); ) f();
659
+ runTasks: function(a) {
660
+ for (var f; f = a.shift(); ) f();
661
661
  },
662
662
  /**
663
663
  * Adds a job to the read batch and
@@ -667,8 +667,8 @@ function Pn() {
667
667
  * @param {Object} ctx the context to be bound to `fn` (optional).
668
668
  * @public
669
669
  */
670
- measure: function(l, f) {
671
- var d = f ? l.bind(f) : l;
670
+ measure: function(a, f) {
671
+ var d = f ? a.bind(f) : a;
672
672
  return this.reads.push(d), o(this), d;
673
673
  },
674
674
  /**
@@ -680,8 +680,8 @@ function Pn() {
680
680
  * @param {Object} ctx the context to be bound to `fn` (optional).
681
681
  * @public
682
682
  */
683
- mutate: function(l, f) {
684
- var d = f ? l.bind(f) : l;
683
+ mutate: function(a, f) {
684
+ var d = f ? a.bind(f) : a;
685
685
  return this.writes.push(d), o(this), d;
686
686
  },
687
687
  /**
@@ -691,8 +691,8 @@ function Pn() {
691
691
  * @return {Boolean} success
692
692
  * @public
693
693
  */
694
- clear: function(l) {
695
- return a(this.reads, l) || a(this.writes, l);
694
+ clear: function(a) {
695
+ return c(this.reads, a) || c(this.writes, a);
696
696
  },
697
697
  /**
698
698
  * Extend this FastDom with some
@@ -728,89 +728,89 @@ function Pn() {
728
728
  * @param {Object} props properties to mixin
729
729
  * @return {FastDom}
730
730
  */
731
- extend: function(l) {
732
- if (typeof l != "object") throw new Error("expected object");
731
+ extend: function(a) {
732
+ if (typeof a != "object") throw new Error("expected object");
733
733
  var f = Object.create(this);
734
- return c(f, l), f.fastdom = this, f.initialize && f.initialize(), f;
734
+ return l(f, a), f.fastdom = this, f.initialize && f.initialize(), f;
735
735
  },
736
736
  // override this with a function
737
737
  // to prevent Errors in console
738
738
  // when tasks throw
739
739
  catch: null
740
740
  };
741
- function o(l) {
742
- l.scheduled || (l.scheduled = !0, l.raf(r.bind(null, l)));
741
+ function o(a) {
742
+ a.scheduled || (a.scheduled = !0, a.raf(r.bind(null, a)));
743
743
  }
744
- function r(l) {
745
- var f = l.writes, d = l.reads, h;
744
+ function r(a) {
745
+ var f = a.writes, d = a.reads, h;
746
746
  try {
747
- n("flushing reads", d.length), l.runTasks(d), n("flushing writes", f.length), l.runTasks(f);
747
+ n("flushing reads", d.length), a.runTasks(d), n("flushing writes", f.length), a.runTasks(f);
748
748
  } catch (m) {
749
749
  h = m;
750
750
  }
751
- if (l.scheduled = !1, (d.length || f.length) && o(l), h)
752
- if (n("task errored", h.message), l.catch) l.catch(h);
751
+ if (a.scheduled = !1, (d.length || f.length) && o(a), h)
752
+ if (n("task errored", h.message), a.catch) a.catch(h);
753
753
  else throw h;
754
754
  }
755
- function a(l, f) {
756
- var d = l.indexOf(f);
757
- return !!~d && !!l.splice(d, 1);
755
+ function c(a, f) {
756
+ var d = a.indexOf(f);
757
+ return !!~d && !!a.splice(d, 1);
758
758
  }
759
- function c(l, f) {
759
+ function l(a, f) {
760
760
  for (var d in f)
761
- f.hasOwnProperty(d) && (l[d] = f[d]);
761
+ f.hasOwnProperty(d) && (a[d] = f[d]);
762
762
  }
763
763
  var u = t.fastdom = t.fastdom || new i();
764
764
  e.exports = u;
765
- })(typeof window < "u" ? window : typeof Ve < "u" ? Ve : globalThis);
766
- })(fe)), fe.exports;
765
+ })(typeof window < "u" ? window : typeof Be < "u" ? Be : globalThis);
766
+ })(he)), he.exports;
767
767
  }
768
- var Ln = Pn();
769
- const O = /* @__PURE__ */ qn(Ln), _e = {};
770
- function xn(e) {
771
- Object.assign(_e, e);
768
+ var xn = Rn();
769
+ const A = /* @__PURE__ */ Fn(xn), Me = {};
770
+ function Nn(e) {
771
+ Object.assign(Me, e);
772
772
  }
773
- function je(e, t = !0) {
774
- return e in _e ? _e[e] : (t && console.warn(
773
+ function He(e, t = !0) {
774
+ return e in Me ? Me[e] : (t && console.warn(
775
775
  `${e} not found in registry. Please make sure to import and register the preset.`
776
776
  ), null);
777
777
  }
778
- function X(e, t) {
778
+ function V(e, t) {
779
779
  return e ? (t || document).getElementById(e) : null;
780
780
  }
781
- function dt(e, t) {
781
+ function mt(e, t) {
782
782
  return e?.matches(`[data-motion-part~="${t}"]`) ? e : e?.querySelector(`[data-motion-part~="${t}"]`);
783
783
  }
784
- function ht(e, t) {
785
- const n = typeof e == "string" ? X(e) : e;
786
- return t?.length ? t.map((s) => dt(n, s)).filter(Boolean) : n ? [n] : [];
784
+ function pt(e, t) {
785
+ const n = typeof e == "string" ? V(e) : e;
786
+ return t?.length ? t.map((s) => mt(n, s)).filter(Boolean) : n ? [n] : [];
787
787
  }
788
- function Fn(e) {
788
+ function jn(e) {
789
789
  const t = e.alternate ? "alternate" : "";
790
790
  return e.reversed ? `${t ? `${t}-` : ""}reverse` : t || "normal";
791
791
  }
792
- function Ie(e) {
793
- return `${e.value}${En(e.unit)}`;
792
+ function Ce(e) {
793
+ return `${e.value}${bn(e.unit)}`;
794
794
  }
795
- function Ye(e, t, n) {
796
- return `${e.name || "cover"} ${n && e.offset.unit !== "percentage" ? `calc(100% + ${Ie(e.offset)}${t ? ` + ${t}` : ""})` : t ? `calc(${Ie(e.offset)} + ${t})` : Ie(e.offset)}`;
795
+ function Qe(e, t, n) {
796
+ return `${e.name || "cover"} ${n && e.offset.unit !== "percentage" ? `calc(100% + ${Ce(e.offset)}${t ? ` + ${t}` : ""})` : t ? `calc(${Ce(e.offset)} + ${t})` : Ce(e.offset)}`;
797
797
  }
798
- function mt(e) {
798
+ function gt(e) {
799
799
  return {
800
- start: Ye(e.startOffset, e.startOffsetAdd),
801
- end: Ye(e.endOffset, e.endOffsetAdd, !0)
800
+ start: Qe(e.startOffset, e.startOffsetAdd),
801
+ end: Qe(e.endOffset, e.endOffsetAdd, !0)
802
802
  };
803
803
  }
804
- function pt(e) {
805
- return (t) => O.measure(() => t(e));
804
+ function vt(e) {
805
+ return (t) => A.measure(() => t(e));
806
806
  }
807
- function gt(e) {
808
- return (t) => O.mutate(() => t(e));
807
+ function yt(e) {
808
+ return (t) => A.mutate(() => t(e));
809
809
  }
810
- function Z(e) {
810
+ function J(e) {
811
811
  if (e.namedEffect) {
812
812
  const t = e.namedEffect.type;
813
- return typeof t == "string" ? je(t) : null;
813
+ return typeof t == "string" ? He(t) : null;
814
814
  } else if (e.keyframeEffect) {
815
815
  const t = (s) => {
816
816
  const { name: i, keyframes: o } = s.keyframeEffect;
@@ -824,16 +824,16 @@ function Z(e) {
824
824
  return (t) => [{ ...t, keyframes: [] }];
825
825
  return null;
826
826
  }
827
- function vt(e, t, n, s) {
827
+ function Et(e, t, n, s) {
828
828
  return e.map((i, o) => {
829
829
  const r = {
830
830
  fill: i.fill,
831
- easing: ue(i.easing),
831
+ easing: de(i.easing),
832
832
  iterations: i.iterations === 0 ? 1 / 0 : i.iterations || 1,
833
833
  composite: i.composite,
834
- direction: Fn(i)
834
+ direction: jn(i)
835
835
  };
836
- return ze(t) ? (r.duration = i.duration, r.delay = i.delay || 0) : t?.trigger === "view-progress" && (s || window.ViewTimeline) ? r.duration = "auto" : (r.duration = 99.99, r.delay = 0.01), {
836
+ return Ge(t) ? (r.duration = i.duration, r.delay = i.delay || 0) : t?.trigger === "view-progress" && (s || window.ViewTimeline) ? r.duration = "auto" : (r.duration = 99.99, r.delay = 0.01), {
837
837
  // pass the preset's object as is - its keyframes and ranges may be getters
838
838
  // that must only be read after its measure() callbacks ran
839
839
  effect: i,
@@ -843,32 +843,32 @@ function vt(e, t, n, s) {
843
843
  };
844
844
  });
845
845
  }
846
- function ze(e) {
846
+ function Ge(e) {
847
847
  return !e || e.trigger !== "pointer-move" && e.trigger !== "view-progress";
848
848
  }
849
- function Be(e, t, n, s, i) {
849
+ function Xe(e, t, n, s, i) {
850
850
  if (e) {
851
- if (ze(s) && (t.duration = t.duration || 1, i?.reducedMotion))
851
+ if (Ge(s) && (t.duration = t.duration || 1, i?.reducedMotion))
852
852
  if (t.iterations === 1 || t.iterations == null)
853
853
  t = { ...t, duration: 1 };
854
854
  else
855
855
  return [];
856
856
  let o;
857
- return n instanceof HTMLElement && (o = { measure: pt(n), mutate: gt(n) }), e.web ? e.web(t, o, i) : e(t, o, i);
857
+ return n instanceof HTMLElement && (o = { measure: vt(n), mutate: yt(n) }), e.web ? e.web(t, o, i) : e(t, o, i);
858
858
  }
859
859
  return [];
860
860
  }
861
- function yt(e, t, n, s, i) {
862
- const o = typeof e == "string" ? X(e, i) : e;
861
+ function wt(e, t, n, s, i) {
862
+ const o = typeof e == "string" ? V(e, i) : e;
863
863
  if (n?.trigger === "pointer-move" && !t.keyframeEffect) {
864
864
  let d = t;
865
865
  t.customEffect && (d = {
866
866
  ...t,
867
867
  namedEffect: { id: "", type: "CustomMouse" }
868
868
  });
869
- const h = Z(
869
+ const h = J(
870
870
  d
871
- ), m = Be(
871
+ ), m = Xe(
872
872
  h,
873
873
  t,
874
874
  o,
@@ -877,139 +877,139 @@ function yt(e, t, n, s, i) {
877
877
  );
878
878
  return typeof m != "function" ? null : m(o);
879
879
  }
880
- const r = Z(t), a = Be(
880
+ const r = J(t), c = Xe(
881
881
  r,
882
882
  t,
883
883
  o,
884
884
  n,
885
885
  s
886
886
  );
887
- if (!a || a.length === 0)
887
+ if (!c || c.length === 0)
888
888
  return null;
889
- const c = vt(a, n, t.effectId);
889
+ const l = Et(c, n, t.effectId);
890
890
  let u;
891
- const l = n?.trigger === "view-progress";
892
- l && window.ViewTimeline && (u = new ViewTimeline({
893
- subject: n.element || X(n.componentId)
891
+ const a = n?.trigger === "view-progress";
892
+ a && window.ViewTimeline && (u = new ViewTimeline({
893
+ subject: n.element || V(n.componentId)
894
894
  }));
895
- const f = c.map(({ effect: d, options: h, id: m, part: p }) => {
896
- const v = p ? dt(o, p) : o, y = new KeyframeEffect(v || null, [], h);
897
- O.mutate(() => {
898
- "timing" in d && y.updateTiming(d.timing), y.setKeyframes(ct(d.keyframes));
895
+ const f = l.map(({ effect: d, options: h, id: m, part: p }) => {
896
+ const g = p ? mt(o, p) : o, E = new KeyframeEffect(g || null, [], h);
897
+ A.mutate(() => {
898
+ "timing" in d && E.updateTiming(d.timing), E.setKeyframes(ft(d.keyframes));
899
899
  });
900
- const g = l && u ? { timeline: u } : {}, E = typeof d.customEffect == "function" ? new kn(
900
+ const y = a && u ? { timeline: u } : {}, v = typeof d.customEffect == "function" ? new Ln(
901
901
  d.customEffect,
902
- v || null,
902
+ g || null,
903
903
  h,
904
- g
905
- ) : new Animation(y, g.timeline);
906
- if (l)
904
+ y
905
+ ) : new Animation(E, y.timeline);
906
+ if (a)
907
907
  if (u)
908
- O.mutate(() => {
909
- const { start: w, end: b } = mt(d);
910
- E.rangeStart = w, E.rangeEnd = b, E.play();
908
+ A.mutate(() => {
909
+ const { start: w, end: b } = gt(d);
910
+ v.rangeStart = w, v.rangeEnd = b, v.play();
911
911
  });
912
912
  else {
913
913
  const { startOffset: w, endOffset: b } = t;
914
- O.mutate(() => {
915
- const S = d.startOffset || w, T = d.endOffset || b;
916
- Object.assign(E, {
914
+ A.mutate(() => {
915
+ const S = d.startOffset || w, I = d.endOffset || b;
916
+ Object.assign(v, {
917
917
  start: {
918
918
  name: S.name,
919
919
  offset: S.offset?.value,
920
920
  add: d.startOffsetAdd
921
921
  },
922
922
  end: {
923
- name: T.name,
924
- offset: T.offset?.value,
923
+ name: I.name,
924
+ offset: I.offset?.value,
925
925
  add: d.endOffsetAdd
926
926
  }
927
927
  });
928
928
  });
929
929
  }
930
- return m && (E.id = m), E;
930
+ return m && (v.id = m), v;
931
931
  });
932
- return new ee(f, {
932
+ return f.length > 1 && f.forEach((d) => d.persist?.()), new ne(f, {
933
933
  ...t,
934
934
  trigger: { ...n || {} },
935
935
  // make sure the group is ready after all animation targets are measured and mutated
936
- measured: new Promise((d) => O.mutate(d))
936
+ measured: new Promise((d) => A.mutate(d))
937
937
  });
938
938
  }
939
- function Rn(e, t, n) {
940
- const { duration: s, delay: i, iterations: o = 1, fill: r, easing: a = "linear", direction: c } = e.options, u = e.effect.name, l = s === "auto", { sequenceId: f, delay: d, offset: h, offsetEasing: m = "linear" } = n || {};
939
+ function zn(e, t, n) {
940
+ const { duration: s, delay: i, iterations: o = 1, fill: r, easing: c = "linear", direction: l } = e.options, u = e.effect.name, a = s === "auto", { sequenceId: f, delay: d, offset: h, offsetEasing: m = "linear" } = n || {};
941
941
  let p = `${i ?? 0}ms`;
942
942
  if (f && typeof m == "string") {
943
- const v = An(m);
944
- if (v) {
945
- const y = (i ?? 0) + (d ?? 0);
943
+ const g = qn(m);
944
+ if (g) {
945
+ const E = (i ?? 0) + (d ?? 0);
946
946
  if (h) {
947
- const g = v(
947
+ const y = g(
948
948
  `(var(--motion-${f}-index, 0) / var(--motion-${f}-last, 1))`
949
949
  );
950
- p = `calc(${`(${y} + ${g} * ${h} * var(--motion-${f}-last, 1))`} * 1ms)`;
950
+ p = `calc(${`(${E} + ${y} * ${h} * var(--motion-${f}-last, 1))`} * 1ms)`;
951
951
  } else
952
- p = `${y}ms`;
952
+ p = `${E}ms`;
953
953
  }
954
954
  }
955
- return `${u} ${l ? "auto" : `${s}ms`}${l ? " " : ` ${p} `}${a}${r && r !== "none" ? ` ${r}` : ""} ${!o || o === 1 / 0 ? "infinite" : o}${c === "normal" ? "" : ` ${c}`} ${t ? "" : "paused"}`;
955
+ return `${u} ${a ? "auto" : `${s}ms`}${a ? " " : ` ${p} `}${c}${r && r !== "none" ? ` ${r}` : ""} ${!o || o === 1 / 0 ? "infinite" : o}${l === "normal" ? "" : ` ${l}`} ${t ? "" : "paused"}`;
956
956
  }
957
- function Nn(e, t, n) {
958
- return e?.style ? (ze(n) && (t.duration = t.duration || 1), e.style(t)) : [];
957
+ function Dn(e, t, n) {
958
+ return e?.style ? (Ge(n) && (t.duration = t.duration || 1), e.style(t)) : [];
959
959
  }
960
- function jn(e, t, n, s) {
961
- const i = Z(t), o = Nn(i, t), r = vt(o, n, t.effectId, !0), a = n?.trigger === "view-progress";
962
- return r.map((c, u) => {
963
- const { start: l, end: f } = a ? mt(c.effect) : {};
960
+ function Hn(e, t, n, s) {
961
+ const i = J(t), o = Dn(i, t), r = Et(o, n, t.effectId, !0), c = n?.trigger === "view-progress";
962
+ return r.map((l, u) => {
963
+ const { start: a, end: f } = c ? gt(l.effect) : {};
964
964
  return {
965
- part: c.part,
966
- animation: Rn(c, a, s),
967
- composition: c.options.composite,
968
- custom: c.effect.custom,
969
- name: c.effect.name,
970
- keyframes: ct(c.effect.keyframes),
971
- id: c.id && `${c.id}-${u + 1}`,
972
- animationTimeline: a ? `--${n?.id}` : "",
973
- animationRange: l || f ? `${l} ${f}` : ""
965
+ part: l.part,
966
+ animation: zn(l, c, s),
967
+ composition: l.options.composite,
968
+ custom: l.effect.custom,
969
+ name: l.effect.name,
970
+ keyframes: ft(l.effect.keyframes),
971
+ id: l.id && `${l.id}-${u + 1}`,
972
+ animationTimeline: c ? `--${n?.id}` : "",
973
+ animationRange: a || f ? `${a} ${f}` : ""
974
974
  };
975
975
  });
976
976
  }
977
- function zn(e, t, n) {
978
- const s = Z(t), i = e instanceof HTMLElement ? e : X(e);
977
+ function Gn(e, t, n) {
978
+ const s = J(t), i = e instanceof HTMLElement ? e : V(e);
979
979
  if (s && s.prepare && i) {
980
- const o = { measure: pt(i), mutate: gt(i) };
980
+ const o = { measure: vt(i), mutate: yt(i) };
981
981
  s.prepare(t, o);
982
982
  }
983
- n && O.mutate(n);
983
+ n && A.mutate(n);
984
984
  }
985
- function Et(e, t) {
986
- const n = Z(t);
985
+ function $t(e, t) {
986
+ const n = J(t);
987
987
  if (!n)
988
988
  return null;
989
989
  if (!n.style)
990
- return t.effectId && e ? Hn(e, t.effectId, n.parts) : null;
991
- const s = n.getNames(t), o = ht(e, n.parts)?.flatMap((c) => c.getAnimations()), r = o?.map((c) => c.animationName) || [], a = [];
992
- return s.forEach((c) => {
993
- r.includes(c) && a.push(
994
- o?.find((u) => u.animationName === c)
990
+ return t.effectId && e ? Wn(e, t.effectId, n.parts) : null;
991
+ const s = n.getNames(t), o = pt(e, n.parts)?.flatMap((l) => l.getAnimations()), r = o?.map((l) => l.animationName) || [], c = [];
992
+ return s.forEach((l) => {
993
+ r.includes(l) && c.push(
994
+ o?.find((u) => u.animationName === l)
995
995
  );
996
- }), a?.length ? new ee(a) : null;
996
+ }), c?.length ? new ne(c) : null;
997
997
  }
998
- function Hn(e, t, n) {
999
- const i = ht(e, n)?.flatMap((o) => o.getAnimations()).filter((o) => {
998
+ function Wn(e, t, n) {
999
+ const i = pt(e, n)?.flatMap((o) => o.getAnimations()).filter((o) => {
1000
1000
  const r = o.id || o.animationName;
1001
1001
  return r ? r.startsWith(t) : !0;
1002
1002
  });
1003
- return i?.length ? new ee(i) : null;
1003
+ return i?.length ? new ne(i) : null;
1004
1004
  }
1005
- function wt(e, t, n, s = {}) {
1006
- const { disabled: i, allowActiveEvent: o, ...r } = s, a = yt(e, t, n, r);
1007
- if (!a)
1005
+ function bt(e, t, n, s = {}) {
1006
+ const { disabled: i, allowActiveEvent: o, ...r } = s, c = wt(e, t, n, r);
1007
+ if (!c)
1008
1008
  return null;
1009
- let c = {};
1009
+ let l = {};
1010
1010
  if (n.trigger === "view-progress" && !window.ViewTimeline) {
1011
- const u = n.element || X(n.componentId), { ready: l } = a;
1012
- return a.animations.map((f) => ({
1011
+ const u = n.element || V(n.componentId), { ready: a } = c;
1012
+ return c.animations.map((f) => ({
1013
1013
  /* we use getters for start and end in order to access the animation's start and end
1014
1014
  only when initializing the scrub scene rather than immediately */
1015
1015
  get start() {
@@ -1019,9 +1019,9 @@ function wt(e, t, n, s = {}) {
1019
1019
  return f.end;
1020
1020
  },
1021
1021
  viewSource: u,
1022
- ready: l,
1022
+ ready: a,
1023
1023
  getProgress() {
1024
- return a.getProgress();
1024
+ return c.getProgress();
1025
1025
  },
1026
1026
  effect(d, h) {
1027
1027
  const { activeDuration: m } = f.effect.getComputedTiming(), { delay: p } = f.effect.getTiming();
@@ -1033,20 +1033,20 @@ function wt(e, t, n, s = {}) {
1033
1033
  }
1034
1034
  }));
1035
1035
  } else if (n.trigger === "pointer-move") {
1036
- const u = t, { centeredToTarget: l, transitionDuration: f, transitionEasing: d } = u, h = n.axis;
1036
+ const u = t, { centeredToTarget: a, transitionDuration: f, transitionEasing: d } = u, h = n.axis;
1037
1037
  if (u.keyframeEffect) {
1038
- const m = a;
1038
+ const m = c;
1039
1039
  return m.animations?.length === 0 ? null : {
1040
- target: void 0,
1041
- centeredToTarget: l,
1040
+ target: (typeof e == "string" ? V(e) : e) ?? void 0,
1041
+ centeredToTarget: a,
1042
1042
  ready: m.ready,
1043
1043
  _currentProgress: 0,
1044
1044
  getProgress() {
1045
1045
  return this._currentProgress;
1046
1046
  },
1047
- effect(v, y) {
1048
- const g = h === "x" ? y.x : y.y;
1049
- this._currentProgress = g, m.progress(g);
1047
+ effect(g, E) {
1048
+ const y = h === "x" ? E.x : E.y;
1049
+ this._currentProgress = y, m.progress(y);
1050
1050
  },
1051
1051
  disabled: i ?? !1,
1052
1052
  destroy() {
@@ -1054,74 +1054,74 @@ function wt(e, t, n, s = {}) {
1054
1054
  }
1055
1055
  };
1056
1056
  }
1057
- c = {
1058
- centeredToTarget: l,
1057
+ l = {
1058
+ centeredToTarget: a,
1059
1059
  allowActiveEvent: o
1060
- }, t.customEffect && f && (c.transitionDuration = f, c.transitionEasing = ft(d)), c.target = a.target;
1060
+ }, t.customEffect && f && (l.transitionDuration = f, l.transitionEasing = De(d)), l.target = c.target;
1061
1061
  }
1062
1062
  return {
1063
- ...c,
1063
+ ...l,
1064
1064
  getProgress() {
1065
- return a.getProgress();
1065
+ return c.getProgress();
1066
1066
  },
1067
- effect(u, l, f, d) {
1068
- a.progress(
1067
+ effect(u, a, f, d) {
1068
+ c.progress(
1069
1069
  f ? {
1070
1070
  // @ts-expect-error spread error on p
1071
- ...l,
1071
+ ...a,
1072
1072
  v: f,
1073
1073
  active: d
1074
- } : l
1074
+ } : a
1075
1075
  );
1076
1076
  },
1077
1077
  disabled: i,
1078
1078
  destroy() {
1079
- a.cancel();
1079
+ c.cancel();
1080
1080
  }
1081
1081
  };
1082
1082
  }
1083
- function te(e, t, n, s = !1) {
1084
- const i = Et(e, t);
1083
+ function se(e, t, n, s = !1) {
1084
+ const i = $t(e, t);
1085
1085
  return i ? (i.ready = new Promise((o) => {
1086
- zn(e, t, o);
1087
- }), i) : yt(e, t, n, { reducedMotion: s });
1086
+ Gn(e, t, o);
1087
+ }), i) : wt(e, t, n, { reducedMotion: s });
1088
1088
  }
1089
- function Dn(e) {
1089
+ function Vn(e) {
1090
1090
  return e === null ? [null] : typeof e == "string" ? Array.from(document.querySelectorAll(e)) : Array.isArray(e) ? e : [e];
1091
1091
  }
1092
- function $t(e, t) {
1092
+ function St(e, t) {
1093
1093
  const n = [];
1094
1094
  for (const { target: s, options: i } of e) {
1095
- const o = Dn(s);
1095
+ const o = Vn(s);
1096
1096
  for (const r of o) {
1097
- const a = te(
1097
+ const c = se(
1098
1098
  r,
1099
1099
  i,
1100
1100
  void 0,
1101
1101
  t?.reducedMotion
1102
1102
  );
1103
- a instanceof ee && n.push(a);
1103
+ c instanceof ne && n.push(c);
1104
1104
  }
1105
1105
  }
1106
1106
  return n;
1107
1107
  }
1108
- function Gn(e, t, n) {
1109
- const s = $t(t, n);
1110
- return new Mn(s, e);
1108
+ function Kn(e, t, n) {
1109
+ const s = St(t, n);
1110
+ return new Pn(s, e);
1111
1111
  }
1112
- function Wn(e, t = 2) {
1112
+ function Yn(e, t = 2) {
1113
1113
  return parseFloat(e.toFixed(t));
1114
1114
  }
1115
- function Vn(e) {
1115
+ function Bn(e) {
1116
1116
  return /\[]/g.test(e);
1117
1117
  }
1118
- function Kn(e) {
1118
+ function Un(e) {
1119
1119
  return e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
1120
1120
  }
1121
- function de(e, t) {
1121
+ function me(e, t) {
1122
1122
  return t.includes("&") ? t.replace(/&/g, e) : `${e}${t}`;
1123
1123
  }
1124
- function J() {
1124
+ function ee() {
1125
1125
  return "wi-12343210".replace(
1126
1126
  /\d/g,
1127
1127
  (e) => String.fromCharCode(
@@ -1130,34 +1130,34 @@ function J() {
1130
1130
  // 97 for "a"
1131
1131
  );
1132
1132
  }
1133
- function bt(e) {
1133
+ function It(e) {
1134
1134
  const { transition: t, transitionProperties: n } = e;
1135
1135
  return (t?.styleProperties || n || []).map((i) => ({
1136
1136
  ...i,
1137
- name: me(i.name)
1137
+ name: ge(i.name)
1138
1138
  }));
1139
1139
  }
1140
- function St(e) {
1140
+ function Tt(e) {
1141
1141
  let { transition: t, transitionProperties: n } = e, s = [];
1142
1142
  if (t?.styleProperties) {
1143
1143
  const { duration: i, easing: o, delay: r } = t;
1144
1144
  i && (t.styleProperties.some(
1145
- (c) => c.name.startsWith("--")
1145
+ (l) => l.name.startsWith("--")
1146
1146
  ) ? s = [
1147
- `all ${i}ms ${ue(o || "ease")}${r ? ` ${r}ms` : ""}`,
1147
+ `all ${i}ms ${de(o || "ease")}${r ? ` ${r}ms` : ""}`,
1148
1148
  "visibility 0s"
1149
1149
  ] : s = t.styleProperties.map(
1150
- (c) => `${me(c.name)} ${i}ms ${ue(
1150
+ (l) => `${ge(l.name)} ${i}ms ${de(
1151
1151
  o || "ease"
1152
1152
  )}${r ? ` ${r}ms` : ""}`
1153
1153
  ));
1154
1154
  } else
1155
1155
  s = n?.filter((i) => i.duration).map(
1156
- (i) => `${me(i.name)} ${i.duration}ms ${ue(i.easing) || "ease"}${i.delay ? ` ${i.delay}ms` : ""}`
1156
+ (i) => `${ge(i.name)} ${i.duration}ms ${de(i.easing) || "ease"}${i.delay ? ` ${i.delay}ms` : ""}`
1157
1157
  ) || [];
1158
1158
  return s;
1159
1159
  }
1160
- function Yn({
1160
+ function Qn({
1161
1161
  key: e,
1162
1162
  effectId: t,
1163
1163
  transition: n,
@@ -1165,38 +1165,38 @@ function Yn({
1165
1165
  childSelector: i = "> :first-child",
1166
1166
  selectorCondition: o
1167
1167
  }) {
1168
- const r = St({
1168
+ const r = Tt({
1169
1169
  transition: n,
1170
1170
  transitionProperties: s
1171
- }), a = bt({ transition: n, transitionProperties: s }).map(
1171
+ }), c = It({ transition: n, transitionProperties: s }).map(
1172
1172
  (m) => `${m.name}: ${m.value};`
1173
- ), c = e.replace(/"/g, "'"), u = `:is(:state(${t}), :--${t}) ${i}`, l = `[data-interact-effect~="${t}"] ${i}`, f = o ? de(u, o) : u, d = o ? de(l, o) : l, h = [
1173
+ ), l = e.replace(/"/g, "'"), u = `:is(:state(${t}), :--${t}) ${i}`, a = `[data-interact-effect~="${t}"] ${i}`, f = o ? me(u, o) : u, d = o ? me(a, o) : a, h = [
1174
1174
  `${f},
1175
1175
  ${d} {
1176
- ${a.join(`
1176
+ ${c.join(`
1177
1177
  `)}
1178
1178
  }`
1179
1179
  ];
1180
1180
  if (r.length) {
1181
- const m = `[data-interact-key="${c}"] ${i}`, p = o ? de(m, o) : m;
1181
+ const m = `[data-interact-key="${l}"] ${i}`, p = o ? me(m, o) : m;
1182
1182
  h.push(`@media (prefers-reduced-motion: no-preference) { ${p} {
1183
1183
  transition: ${r.join(", ")};
1184
1184
  } }`);
1185
1185
  }
1186
1186
  return h;
1187
1187
  }
1188
- function ne(e, t, n) {
1188
+ function ie(e, t, n) {
1189
1189
  const s = (e || []).filter((i) => t[i]?.type === n && t[i].predicate).map((i) => t[i].predicate).join(") and (");
1190
1190
  return s && `(${s})`;
1191
1191
  }
1192
- function L(e, t) {
1193
- const n = ne(e, t, "media");
1192
+ function F(e, t) {
1193
+ const n = ie(e, t, "media");
1194
1194
  return n && window.matchMedia(n);
1195
1195
  }
1196
- function x(e, t) {
1196
+ function R(e, t) {
1197
1197
  return (e || []).filter((n) => t[n]?.type === "selector" && t[n].predicate).map((n) => `:is(${t[n].predicate})`).join("");
1198
1198
  }
1199
- const It = /* @__PURE__ */ new Map([
1199
+ const Ct = /* @__PURE__ */ new Map([
1200
1200
  ["viewEnter", "once"],
1201
1201
  ["animationEnd", "once"],
1202
1202
  ["hover", "alternate"],
@@ -1204,78 +1204,93 @@ const It = /* @__PURE__ */ new Map([
1204
1204
  ["activate", "alternate"],
1205
1205
  ["interest", "alternate"]
1206
1206
  ]);
1207
- function Tt(e, t, n, s) {
1208
- const { effects: i = {}, conditions: o = {} } = n, { key: r, trigger: a } = t, c = a === "pointerMove";
1209
- e.effectId || (e.effectId = s || J());
1210
- const { effectId: u } = e, l = { ...i[u] || {}, ...e };
1211
- let { key: f, conditions: d, triggerType: h } = l;
1212
- if (!f) {
1207
+ function Ot(e, t, n, s) {
1208
+ const { effects: i = {}, conditions: o = {} } = n, { key: r, trigger: c, conditions: l = [] } = t, u = c === "pointerMove";
1209
+ e.effectId || (e.effectId = s || ee());
1210
+ const { effectId: a } = e, f = { ...i[a] || {}, ...e };
1211
+ let { key: d, conditions: h, triggerType: m } = f;
1212
+ if (!d) {
1213
1213
  if (!r)
1214
1214
  return null;
1215
- f = r;
1215
+ d = r;
1216
1216
  }
1217
- if (Vn(f))
1217
+ if (Bn(d))
1218
1218
  return null;
1219
- d = [
1220
- ...new Set((d || []).filter((b) => o[b]))
1221
- ], h || (h = It.get(a));
1222
- const { namedEffect: m, customEffect: p, keyframeEffect: v, transition: y, transitionProperties: g, ...E } = {
1223
- ...l,
1224
- key: f,
1225
- conditions: d,
1226
- effectId: u,
1227
- triggerType: h
1228
- }, w = Yt(t, E);
1229
- if (m)
1230
- return c || !m.type ? null : { namedEffect: m, initial: w, ...E };
1231
- if (v) {
1232
- if (!v.name) {
1233
- const b = u && !(i[u] && "keyframeEffect" in e);
1234
- v.name = b ? u : J();
1219
+ const p = l.filter(
1220
+ (I) => o[I].type === "media"
1221
+ );
1222
+ h = [
1223
+ ...new Set(
1224
+ [...h || [], ...p].filter(
1225
+ (I) => o[I]
1226
+ )
1227
+ )
1228
+ ], m || (m = Ct.get(c));
1229
+ const { namedEffect: g, customEffect: E, keyframeEffect: y, transition: v, transitionProperties: w, ...b } = {
1230
+ ...f,
1231
+ key: d,
1232
+ conditions: h,
1233
+ effectId: a,
1234
+ triggerType: m
1235
+ }, S = Qt(t, b);
1236
+ if (g)
1237
+ return u || !g.type ? null : { namedEffect: g, initial: S, ...b };
1238
+ if (y) {
1239
+ if (!y.name) {
1240
+ const I = a && !(i[a] && "keyframeEffect" in e);
1241
+ y.name = I ? a : ee();
1235
1242
  }
1236
- return { keyframeEffect: v, initial: w, ...E };
1237
- } else return p ? c ? null : { initial: w, ...E } : y ? { transition: y, initial: w, ...E } : g ? { transitionProperties: g, initial: w, ...E } : { initial: w, ...E };
1243
+ return { keyframeEffect: y, initial: S, ...b };
1244
+ } else return E ? u ? null : { initial: S, ...b } : v ? { transition: v, initial: S, ...b } : w ? { transitionProperties: w, initial: S, ...b } : { initial: S, ...b };
1238
1245
  }
1239
- function Bn(e, t, n, s, i) {
1240
- const { sequences: o = {}, conditions: r = {} } = n;
1241
- e.sequenceId || (e.sequenceId = s || J());
1242
- const { sequenceId: a } = e, c = { ...o[a] || {}, ...e };
1246
+ function Xn(e, t, n, s, i) {
1247
+ const { sequences: o = {}, conditions: r = {} } = n, { trigger: c, conditions: l = [] } = t;
1248
+ e.sequenceId || (e.sequenceId = s || ee());
1249
+ const { sequenceId: u } = e, a = { ...o[u] || {}, ...e };
1243
1250
  let {
1244
- effects: u,
1245
- conditions: l,
1246
- triggerType: f,
1247
- delay: d = 0,
1248
- offset: h = 0,
1249
- offsetEasing: m = "linear"
1250
- } = c;
1251
- if (typeof m == "function" || !u)
1251
+ effects: f,
1252
+ conditions: d,
1253
+ triggerType: h,
1254
+ delay: m = 0,
1255
+ offset: p = 0,
1256
+ offsetEasing: g = "linear"
1257
+ } = a;
1258
+ if (typeof g == "function" || !f)
1252
1259
  return null;
1253
- f || (f = It.get(t.trigger)), l = [
1254
- ...new Set((l || []).filter((y) => r[y]))
1260
+ h || (h = Ct.get(c));
1261
+ const E = l.filter(
1262
+ (w) => r[w].type === "media"
1263
+ );
1264
+ d = [
1265
+ ...new Set(
1266
+ [...d || [], ...E].filter(
1267
+ (w) => r[w]
1268
+ )
1269
+ )
1255
1270
  ];
1256
- const v = u.map((y, g) => {
1257
- const E = Tt(
1258
- { ...y, triggerType: f, conditions: [...y.conditions || [], ...l] },
1271
+ const v = f.map((w, b) => {
1272
+ const S = Ot(
1273
+ { ...w, triggerType: h, conditions: [...w.conditions || [], ...d] },
1259
1274
  t,
1260
1275
  n,
1261
- `${a}-eff-${g}`
1276
+ `${u}-eff-${b}`
1262
1277
  );
1263
- return E && Object.assign(E, { slotKey: i?.(g) });
1264
- }).filter((y) => y !== null);
1278
+ return S && Object.assign(S, { slotKey: i?.(b) });
1279
+ }).filter((w) => w !== null);
1265
1280
  return v.length ? {
1266
- sequenceId: a,
1267
- triggerType: f,
1268
- conditions: l,
1269
- delay: d,
1270
- offset: h,
1271
- offsetEasing: m,
1281
+ sequenceId: u,
1282
+ triggerType: h,
1283
+ conditions: d,
1284
+ delay: m,
1285
+ offset: p,
1286
+ offsetEasing: g,
1272
1287
  effects: v
1273
1288
  } : null;
1274
1289
  }
1275
- function Un(e) {
1276
- return e === "cssFloat" ? "float" : e === "easing" ? "animation-timing-function" : e === "cssOffset" ? "offset" : e === "composite" ? "animation-composition" : me(e);
1290
+ function Zn(e) {
1291
+ return e === "cssFloat" ? "float" : e === "easing" ? "animation-timing-function" : e === "cssOffset" ? "offset" : e === "composite" ? "animation-composition" : ge(e);
1277
1292
  }
1278
- function Qn(e) {
1293
+ function Jn(e) {
1279
1294
  if (!e.length)
1280
1295
  return [];
1281
1296
  const t = e.map((i) => ({ ...i }));
@@ -1289,66 +1304,66 @@ function Qn(e) {
1289
1304
  if (o > 1)
1290
1305
  return console.error("Offsets must be in the range [0,1]"), [];
1291
1306
  const r = i - n;
1292
- for (let a = n + 1; a < i; a++) {
1293
- const c = (a - n) / r;
1294
- t[a].offset = s + (o - s) * c;
1307
+ for (let c = n + 1; c < i; c++) {
1308
+ const l = (c - n) / r;
1309
+ t[c].offset = s + (o - s) * l;
1295
1310
  }
1296
1311
  n = i, s = o;
1297
1312
  }
1298
1313
  return t;
1299
1314
  }
1300
- function Xn(e, t) {
1301
- const n = Object.entries(e).filter(([s, i]) => s !== "offset" && i !== void 0 && i !== null).map(([s, i]) => `${Un(s)}: ${i};`).join(`
1315
+ function es(e, t) {
1316
+ const n = Object.entries(e).filter(([s, i]) => s !== "offset" && i !== void 0 && i !== null).map(([s, i]) => `${Zn(s)}: ${i};`).join(`
1302
1317
  `);
1303
1318
  return `${t}% {
1304
1319
  ${n}
1305
1320
  }`;
1306
1321
  }
1307
- function Zn(e, t) {
1308
- const n = Qn(t);
1322
+ function ts(e, t) {
1323
+ const n = Jn(t);
1309
1324
  if (!n.length)
1310
1325
  return "";
1311
1326
  let s = n.map((i) => {
1312
- const o = i.offset, r = Wn(o * 100);
1313
- return Xn(i, r);
1327
+ const o = i.offset, r = Yn(o * 100);
1328
+ return es(i, r);
1314
1329
  }).join(`
1315
1330
  `);
1316
1331
  return `@keyframes ${e} {
1317
1332
  ${s}
1318
1333
  }`;
1319
1334
  }
1320
- function Jn(e) {
1321
- const { key: t, childSelector: n, declarations: s, media: i, states: o, selectorCondition: r, selectorSuffix: a } = e;
1335
+ function ns(e) {
1336
+ const { key: t, childSelector: n, declarations: s, media: i, states: o, selectorCondition: r, selectorSuffix: c } = e;
1322
1337
  if (!s.length)
1323
1338
  return "";
1324
- let c = `[data-interact-key="${t}"]`;
1339
+ let l = `[data-interact-key="${t}"]`;
1325
1340
  if (o && o.length) {
1326
1341
  const f = o.map((d) => `:state(${d}), :--${d}, [data-interact-effect~="${d}"]`).join(", ");
1327
- c = `${c}:is(${f})`;
1342
+ l = `${l}:is(${f})`;
1328
1343
  }
1329
- n && (c = `${c} ${n}`), a && (c = `${c}${a}`), r && (c = de(c, r));
1344
+ n && (l = `${l} ${n}`), c && (l = `${l}${c}`), r && (l = me(l, r));
1330
1345
  const u = s.map(({ name: f, value: d, important: h }) => `${f}: ${d}${h ? " !important" : ""};`).join(`
1331
- `), l = `${c} {
1346
+ `), a = `${l} {
1332
1347
  ${u}
1333
1348
  }`;
1334
1349
  return i ? `@media ${i} {
1335
- ${l}
1336
- }` : l;
1350
+ ${a}
1351
+ }` : a;
1337
1352
  }
1338
- const Ae = [
1353
+ const ke = [
1339
1354
  "animation",
1340
1355
  "animation-composition",
1341
1356
  "animation-timeline",
1342
1357
  "animation-range"
1343
- ], we = [
1344
- ...Ae,
1358
+ ], be = [
1359
+ ...ke,
1345
1360
  "transition",
1346
1361
  "view-timeline"
1347
- ], He = ["animation", "transition", "timeline"];
1348
- function N(e) {
1362
+ ], We = ["animation", "transition", "timeline"];
1363
+ function L(e) {
1349
1364
  return e === "transition" ? "transition" : e === "view-timeline" ? "timeline" : "animation";
1350
1365
  }
1351
- const H = {
1366
+ const Y = {
1352
1367
  transition: "_",
1353
1368
  animation: "none",
1354
1369
  "animation-composition": "replace",
@@ -1356,94 +1371,131 @@ const H = {
1356
1371
  "animation-range": "normal",
1357
1372
  "view-timeline": "none"
1358
1373
  };
1359
- function j(e, t, n = !1) {
1360
- return `--${e.replace(new RegExp("(?<!(^|-))([aeiou]|tion)", "g"), "")}${n ? "-slot" : ""}-${t}`;
1374
+ function _t(e) {
1375
+ return e.replace(new RegExp("(?<!(^|-))([aeiou]|tion)", "g"), "");
1361
1376
  }
1362
- function es(e, t, n, s, i = 0) {
1363
- const o = {
1377
+ function j(e, t, n = !1, s) {
1378
+ const i = s === void 0 ? "" : `-c${s}`;
1379
+ return `--${_t(e)}${i}${n ? "-slot" : ""}-${t}`;
1380
+ }
1381
+ function te(e, t) {
1382
+ return `--${_t(e)}-c${t}`;
1383
+ }
1384
+ function ss(e, t) {
1385
+ return Array.from(
1386
+ { length: t + 1 },
1387
+ (n, s) => `var(${te(e, s)})`
1388
+ ).join(", ");
1389
+ }
1390
+ function is(e, t, n, s, i = 0, o) {
1391
+ const r = {
1364
1392
  animation: e,
1365
1393
  transition: t,
1366
1394
  timeline: i
1367
- }, r = {
1395
+ }, c = {
1368
1396
  animation: n,
1369
1397
  transition: s,
1370
1398
  timeline: 0
1371
- };
1372
- return we.flatMap((a) => [
1399
+ }, l = (u, a) => `@property ${a} { syntax: "*"; inherits: false; initial-value: ${Y[u]}; }`;
1400
+ return be.flatMap((u) => [
1401
+ ...Array.from(
1402
+ { length: r[L(u)] },
1403
+ (a, f) => l(u, j(u, f, !1, o))
1404
+ ),
1373
1405
  ...Array.from(
1374
- { length: o[N(a)] },
1375
- (c, u) => `@property ${j(a, u)} { syntax: "*"; inherits: false; initial-value: ${H[a]}; }`
1406
+ { length: c[L(u)] },
1407
+ (a, f) => l(u, j(u, f, !0, o))
1376
1408
  ),
1409
+ // registers the lists of the configs before it too, for elements they don't target
1377
1410
  ...Array.from(
1378
- { length: r[N(a)] },
1379
- (c, u) => `@property ${j(a, u, !0)} { syntax: "*"; inherits: false; initial-value: ${H[a]}; }`
1411
+ { length: o !== void 0 && r[L(u)] ? o + 1 : 0 },
1412
+ (a, f) => l(u, te(u, f))
1380
1413
  )
1381
1414
  ]);
1382
1415
  }
1383
- function ts(e, t, n) {
1384
- const s = we.filter(
1385
- (r) => e[N(r)].slotsInSequence > 0
1416
+ function os(e, t, n, s) {
1417
+ const i = be.filter(
1418
+ (c) => e[L(c)].slotsInSequence > 0
1386
1419
  );
1387
- if (s.length === 0)
1420
+ if (i.length === 0)
1388
1421
  return null;
1389
- const i = s.map((r) => {
1390
- const { listIndex: a, slotCursor: c, slotsInSequence: u } = e[N(r)];
1422
+ const o = i.map((c) => {
1423
+ const { listIndex: l, slotCursor: u, slotsInSequence: a } = e[L(c)];
1391
1424
  return {
1392
- name: j(r, a),
1425
+ name: j(c, l, !1, s),
1393
1426
  value: Array.from(
1394
- { length: u },
1395
- (l, f) => `var(${j(r, c + f, !0)})`
1427
+ { length: a },
1428
+ (f, d) => `var(${j(c, u + d, !0, s)})`
1396
1429
  ).join(", ")
1397
1430
  };
1398
- }), o = { key: e.key, childSelector: e.childSelector, declarations: i };
1399
- return t && (o.media = ne(t, n || {}, "media"), o.selectorCondition = x(t, n || {})), o;
1431
+ }), r = { key: e.key, childSelector: e.childSelector, declarations: o };
1432
+ return t && (r.media = ie(t, n || {}, "media"), r.selectorCondition = R(t, n || {})), r;
1400
1433
  }
1401
- function ns(e, t, n, s = 0) {
1434
+ function rs(e, t, n, s = 0, i) {
1402
1435
  if (e.length === 0)
1403
1436
  return "";
1404
- const i = {
1437
+ const o = {
1405
1438
  animation: t,
1406
1439
  transition: n,
1407
1440
  timeline: s
1408
- }, o = we.filter((c) => i[N(c)] > 0);
1409
- if (o.length === 0)
1441
+ }, r = be.filter((u) => o[L(u)] > 0);
1442
+ if (r.length === 0)
1410
1443
  return "";
1411
- const r = o.map((c) => ({
1412
- name: c,
1413
- value: Array.from(
1414
- { length: i[N(c)] },
1444
+ const c = r.flatMap((u) => {
1445
+ const a = Array.from(
1446
+ { length: o[L(u)] },
1415
1447
  // TODO: maybe add `-intrct` to names? --anm-0 or --trns-0 could collide with user-defined names
1416
- (u, l) => `var(${j(c, l)})`
1417
- ).join(", ")
1418
- }));
1448
+ (f, d) => `var(${j(u, d, !1, i)})`
1449
+ ).join(", ");
1450
+ return i === void 0 ? [{ name: u, value: a }] : [
1451
+ { name: te(u, i), value: a },
1452
+ { name: u, value: ss(u, i) }
1453
+ ];
1454
+ });
1419
1455
  return `${e.map(
1420
- ({ key: c, childSelector: u }) => `[data-interact-key="${c}"]${u ? ` ${u}` : ""}`
1456
+ ({ key: u, childSelector: a }) => `[data-interact-key="${u}"]${a ? ` ${a}` : ""}`
1421
1457
  ).join(", ")} {
1422
- ${r.map(({ name: c, value: u }) => ` ${c}: ${u};`).join(`
1458
+ ${c.map(({ name: u, value: a }) => ` ${u}: ${a};`).join(`
1423
1459
  `)}
1424
1460
  }`;
1425
1461
  }
1426
- const oe = {
1462
+ function as(e, t) {
1463
+ if (e.length === 0)
1464
+ return "";
1465
+ if (t === void 0)
1466
+ return `:root {
1467
+ timeline-scope: ${e.join(", ")};
1468
+ }`;
1469
+ const n = Array.from(
1470
+ { length: t + 1 },
1471
+ (s, i) => `var(${te("timeline-scope", i)}, --_)`
1472
+ ).join(", ");
1473
+ return `:root {
1474
+ ${te("timeline-scope", t)}: ${e.join(", ")};
1475
+ timeline-scope: ${n};
1476
+ }`;
1477
+ }
1478
+ const ae = {
1427
1479
  rangeStart: { name: "cover", offset: { value: 0, unit: "percentage" } },
1428
1480
  rangeEnd: { name: "cover", offset: { value: 100, unit: "percentage" } }
1429
1481
  };
1430
- function ss(e, t) {
1431
- const n = e?.name ?? oe.rangeStart.name, s = t?.name ?? e?.name ?? oe.rangeEnd.name, i = {
1482
+ function cs(e, t) {
1483
+ const n = e?.name ?? ae.rangeStart.name, s = t?.name ?? e?.name ?? ae.rangeEnd.name, i = {
1432
1484
  name: n,
1433
- offset: e?.offset || oe.rangeStart.offset
1485
+ offset: e?.offset || ae.rangeStart.offset
1434
1486
  }, o = {
1435
1487
  name: s,
1436
- offset: t?.offset || oe.rangeEnd.offset
1488
+ offset: t?.offset || ae.rangeEnd.offset
1437
1489
  };
1438
1490
  return { startOffset: i, endOffset: o };
1439
1491
  }
1440
- function F(e) {
1492
+ function x(e) {
1441
1493
  if ("keyframeEffect" in e && !e.keyframeEffect.name && "effectId" in e && (e.keyframeEffect.name = e.effectId), "duration" in e)
1442
1494
  return {
1443
1495
  id: "",
1444
1496
  ...e
1445
1497
  };
1446
- const { rangeStart: t, rangeEnd: n, ...s } = e, { startOffset: i, endOffset: o } = ss(t, n);
1498
+ const { rangeStart: t, rangeEnd: n, ...s } = e, { startOffset: i, endOffset: o } = cs(t, n);
1447
1499
  return {
1448
1500
  id: "",
1449
1501
  startOffset: i,
@@ -1455,23 +1507,23 @@ function k(e, t, n) {
1455
1507
  let s = e.get(t);
1456
1508
  s || (s = /* @__PURE__ */ new Set(), e.set(t, s)), s.add(n);
1457
1509
  }
1458
- function se(e, t) {
1510
+ function oe(e, t) {
1459
1511
  e.get(t)?.forEach((s) => {
1460
1512
  const { source: i, target: o, cleanup: r } = s;
1461
1513
  r();
1462
- const a = i === t ? o : i;
1463
- e.get(a)?.delete(s);
1514
+ const c = i === t ? o : i;
1515
+ e.get(c)?.delete(s);
1464
1516
  }), e.delete(t);
1465
1517
  }
1466
- const is = [
1518
+ const ls = [
1467
1519
  { name: "visibility", value: "hidden" },
1468
1520
  { name: "clip-path", value: "none", important: !0 },
1469
1521
  { name: "transform", value: "none", important: !0 },
1470
1522
  { name: "translate", value: "none", important: !0 },
1471
1523
  { name: "scale", value: "none", important: !0 },
1472
1524
  { name: "rotate", value: "none", important: !0 }
1473
- ], Me = { animation: !1, transition: !1, timeline: !1 };
1474
- function Ct(e, t) {
1525
+ ], qe = { animation: !1, transition: !1, timeline: !1 };
1526
+ function At(e, t) {
1475
1527
  const n = () => ({
1476
1528
  listIndex: 0,
1477
1529
  slotCursor: 0,
@@ -1490,33 +1542,33 @@ function Ct(e, t) {
1490
1542
  keyframeEntries: /* @__PURE__ */ new Map()
1491
1543
  };
1492
1544
  }
1493
- function Ot(e, t) {
1545
+ function Mt(e, t, n) {
1494
1546
  return Object.fromEntries(
1495
- we.map((n) => {
1496
- const s = N(n), { listIndex: i, slotCursor: o, slotsInSequence: r } = e[s];
1547
+ be.map((s) => {
1548
+ const i = L(s), { listIndex: o, slotCursor: r, slotsInSequence: c } = e[i];
1497
1549
  return [
1498
- n,
1499
- t[s] ? j(n, o + r, !0) : j(n, i)
1550
+ s,
1551
+ t[i] ? j(s, r + c, !0, n) : j(s, o, !1, n)
1500
1552
  ];
1501
1553
  })
1502
1554
  );
1503
1555
  }
1504
- function ke(e, t, n) {
1505
- He.forEach((s) => {
1556
+ function Pe(e, t, n) {
1557
+ We.forEach((s) => {
1506
1558
  t[s] && (e[s].touched = !0, n[s] && (e[s].slotsInSequence += 1));
1507
1559
  });
1508
1560
  }
1509
- function _t(e) {
1561
+ function kt(e) {
1510
1562
  const { namedEffect: t, keyframeEffect: n, transition: s, transitionProperties: i } = e;
1511
1563
  return t || n ? "animation" : s || i ? "transition" : null;
1512
1564
  }
1513
- function os(e) {
1565
+ function us(e) {
1514
1566
  const t = /* @__PURE__ */ new Map();
1515
1567
  return e.effects.forEach((n) => {
1516
- const s = _t(n);
1568
+ const s = kt(n);
1517
1569
  if (!s)
1518
1570
  return;
1519
- const i = V(n), o = t.get(i) || { animation: 0, transition: 0, timeline: 0 };
1571
+ const i = W(n), o = t.get(i) || { animation: 0, transition: 0, timeline: 0 };
1520
1572
  o[s] += 1, t.set(i, o);
1521
1573
  }), new Map(
1522
1574
  [...t].map(([n, { animation: s, transition: i }]) => [
@@ -1525,35 +1577,35 @@ function os(e) {
1525
1577
  ])
1526
1578
  );
1527
1579
  }
1528
- function rs(e) {
1529
- He.forEach((t) => {
1580
+ function fs(e) {
1581
+ We.forEach((t) => {
1530
1582
  const n = e[t];
1531
1583
  n.slotsInInteraction = Math.max(n.slotsInInteraction, n.slotsInSequence), n.slotsInSequence = 0;
1532
1584
  });
1533
1585
  }
1534
- function as(e) {
1535
- He.forEach((t) => {
1586
+ function ds(e) {
1587
+ We.forEach((t) => {
1536
1588
  const n = e[t];
1537
1589
  n.listIndex += n.touched ? 1 : 0, n.slotCursor += n.slotsInInteraction, n.slotsInInteraction = 0, n.touched = !1;
1538
1590
  });
1539
1591
  }
1540
- const cs = {
1592
+ const hs = {
1541
1593
  animation: "animation",
1542
1594
  "animation-composition": "composition",
1543
1595
  "animation-timeline": "animationTimeline",
1544
1596
  "animation-range": "animationRange"
1545
1597
  };
1546
- function ls(e, t, n, s) {
1547
- const { key: i, conditions: o } = t, r = ne(o, e.configConditions, "media"), a = x(o, e.configConditions), c = W(t, {
1598
+ function ms(e, t, n, s) {
1599
+ const { key: i, conditions: o } = t, r = ie(o, e.configConditions, "media"), c = R(o, e.configConditions), l = G(t, {
1548
1600
  asCombinator: !0,
1549
1601
  useFirstChild: e.useFirstChild,
1550
1602
  addItemFilter: !0
1551
- }), u = V(t), l = e.targetsMap.get(u) || Ct(i, c), f = Ot(l, Me)["view-timeline"];
1552
- return ke(l, { animation: !1, transition: !1, timeline: !0 }, Me), e.targetsMap.set(u, l), s.add(u), {
1603
+ }), u = W(t), a = e.targetsMap.get(u) || At(i, l), f = Mt(a, qe, e.configIndex)["view-timeline"];
1604
+ return Pe(a, { animation: !1, transition: !1, timeline: !0 }, qe), e.targetsMap.set(u, a), s.add(u), {
1553
1605
  key: i,
1554
1606
  media: r,
1555
- selectorCondition: a,
1556
- childSelector: c,
1607
+ selectorCondition: c,
1608
+ childSelector: l,
1557
1609
  declarations: [
1558
1610
  {
1559
1611
  name: f,
@@ -1562,116 +1614,116 @@ function ls(e, t, n, s) {
1562
1614
  ]
1563
1615
  };
1564
1616
  }
1565
- function At(e, t, n, s, i) {
1617
+ function qt(e, t, n, s, i) {
1566
1618
  const o = [];
1567
1619
  for (const r of Object.keys(i)) {
1568
- const a = `${ot}${r}`;
1569
- a in t && o.push(
1570
- ...i[r](t[a], {
1620
+ const c = `${ct}${r}`;
1621
+ c in t && o.push(
1622
+ ...i[r](t[c], {
1571
1623
  key: n,
1572
1624
  scope: e,
1573
1625
  config: t
1574
- }).map((c) => ({ ...c, key: n, media: s }))
1626
+ }).map((l) => ({ ...l, key: n, media: s }))
1575
1627
  );
1576
1628
  }
1577
1629
  return o;
1578
1630
  }
1579
- function us(e, t, n, s, i, o) {
1580
- const { assigned: r, childSelector: a, partSelectors: c } = n, u = { animation: !1, transition: !1, timeline: !1 }, {
1581
- key: l,
1631
+ function ps(e, t, n, s, i, o) {
1632
+ const { assigned: r, childSelector: c, partSelectors: l } = n, u = { animation: !1, transition: !1, timeline: !1 }, {
1633
+ key: a,
1582
1634
  effectId: f,
1583
1635
  conditions: d,
1584
1636
  namedEffect: h,
1585
1637
  keyframeEffect: m,
1586
1638
  transition: p,
1587
- transitionProperties: v,
1588
- initial: y
1589
- } = t, g = ne(d, e.configConditions, "media"), E = x(d, e.configConditions), w = [
1639
+ transitionProperties: g,
1640
+ initial: E
1641
+ } = t, y = ie(d, e.configConditions, "media"), v = R(d, e.configConditions), w = [
1590
1642
  {
1591
- key: l,
1592
- media: g,
1593
- selectorCondition: E,
1594
- childSelector: a,
1643
+ key: a,
1644
+ media: y,
1645
+ selectorCondition: v,
1646
+ childSelector: c,
1595
1647
  declarations: []
1596
1648
  }
1597
1649
  ];
1598
1650
  let b = [];
1599
1651
  const { declarations: S } = w[0];
1600
- if (e.plugins && w.push(...At("effect", t, l, g, e.plugins)), h || m) {
1601
- const T = F(t), C = jn(null, T, s, o).filter(
1602
- (I) => I.name
1603
- ), _ = C.length ? {} : { "": [] };
1604
- C.forEach((I) => {
1605
- const A = I.part || "";
1606
- (_[A] ||= []).push(I);
1607
- }), b = C.map((I) => ({
1608
- name: I.name,
1609
- keyframes: I.keyframes
1652
+ if (e.plugins && w.push(...qt("effect", t, a, y, e.plugins)), h || m) {
1653
+ const I = x(t), O = Hn(null, I, s, o).filter(
1654
+ (T) => T.name
1655
+ ), M = O.length ? {} : { "": [] };
1656
+ O.forEach((T) => {
1657
+ const C = T.part || "";
1658
+ (M[C] ||= []).push(T);
1659
+ }), b = O.map((T) => ({
1660
+ name: T.name,
1661
+ keyframes: T.keyframes
1610
1662
  })), S.push(
1611
- ...C.flatMap(
1612
- ({ custom: I }) => Object.entries(I || {}).filter(([A, M]) => M !== void 0).map(([A, M]) => ({ name: A, value: M }))
1663
+ ...O.flatMap(
1664
+ ({ custom: T }) => Object.entries(T || {}).filter(([C, _]) => _ !== void 0).map(([C, _]) => ({ name: C, value: _ }))
1613
1665
  )
1614
- ), Object.entries(_).forEach(([I, A]) => {
1615
- const M = Ae.map((P) => ({
1666
+ ), Object.entries(M).forEach(([T, C]) => {
1667
+ const _ = ke.map((P) => ({
1616
1668
  _listPropertyName: P,
1617
1669
  name: i[P],
1618
- value: A.map((be) => {
1619
- const Se = cs[P];
1620
- return be[Se] || H[P];
1670
+ value: C.map((Ie) => {
1671
+ const Te = hs[P];
1672
+ return Ie[Te] || Y[P];
1621
1673
  }).join(", ")
1622
1674
  })).filter(
1623
- ({ _listPropertyName: P, name: be, value: Se }) => Se !== H[P] || r.has(be)
1675
+ ({ _listPropertyName: P, name: Ie, value: Te }) => Te !== Y[P] || r.has(Ie)
1624
1676
  );
1625
- M.forEach(({ name: P }) => r.add(P)), u.animation = u.animation || M.length > 0;
1626
- const ie = I ? `[data-motion-part~="${I}"]` : a;
1627
- I && M.length && c.add(ie), y ? (w.push({
1628
- key: l,
1629
- media: g,
1630
- selectorCondition: E,
1631
- childSelector: ie,
1632
- declarations: is,
1677
+ _.forEach(({ name: P }) => r.add(P)), u.animation = u.animation || _.length > 0;
1678
+ const re = T ? `[data-motion-part~="${T}"]` : c;
1679
+ T && _.length && l.add(re), E ? (w.push({
1680
+ key: a,
1681
+ media: y,
1682
+ selectorCondition: v,
1683
+ childSelector: re,
1684
+ declarations: ls,
1633
1685
  selectorSuffix: ":not([data-interact-enter])"
1634
1686
  }), w.push({
1635
- key: l,
1636
- media: g,
1637
- selectorCondition: E,
1638
- childSelector: ie,
1639
- declarations: M,
1687
+ key: a,
1688
+ media: y,
1689
+ selectorCondition: v,
1690
+ childSelector: re,
1691
+ declarations: _,
1640
1692
  selectorSuffix: ':not([data-interact-enter="done"])'
1641
- })) : I ? w.push({
1642
- key: l,
1643
- media: g,
1644
- selectorCondition: E,
1645
- childSelector: ie,
1646
- declarations: M
1647
- }) : S.push(...M);
1693
+ })) : T ? w.push({
1694
+ key: a,
1695
+ media: y,
1696
+ selectorCondition: v,
1697
+ childSelector: re,
1698
+ declarations: _
1699
+ }) : S.push(..._);
1648
1700
  });
1649
- } else if (p || v) {
1650
- const T = bt(t), C = St(t);
1651
- (C.length || r.has(i.transition)) && (S.push({
1701
+ } else if (p || g) {
1702
+ const I = It(t), O = Tt(t);
1703
+ (O.length || r.has(i.transition)) && (S.push({
1652
1704
  name: i.transition,
1653
- value: C.join(", ") || H.transition
1705
+ value: O.join(", ") || Y.transition
1654
1706
  }), r.add(i.transition), u.transition = !0), w.push({
1655
- key: l,
1656
- media: g,
1657
- selectorCondition: E,
1658
- childSelector: a,
1707
+ key: a,
1708
+ media: y,
1709
+ selectorCondition: v,
1710
+ childSelector: c,
1659
1711
  states: [f],
1660
- declarations: T
1712
+ declarations: I
1661
1713
  });
1662
1714
  } else
1663
1715
  S.push(
1664
- ...Ae.filter(
1665
- (T) => r.has(i[T])
1666
- ).map((T) => ({
1667
- name: i[T],
1668
- value: H[T]
1716
+ ...ke.filter(
1717
+ (I) => r.has(i[I])
1718
+ ).map((I) => ({
1719
+ name: i[I],
1720
+ value: Y[I]
1669
1721
  }))
1670
1722
  );
1671
- return { rules: w.filter((T) => T.declarations.length), keyframes: b, wrote: u };
1723
+ return { rules: w.filter((I) => I.declarations.length), keyframes: b, wrote: u };
1672
1724
  }
1673
- function fs(e, t, n) {
1674
- const s = t.namedEffect && je(t.namedEffect.type, !1);
1725
+ function gs(e, t, n) {
1726
+ const s = t.namedEffect && He(t.namedEffect.type, !1);
1675
1727
  if (!s?.getNames)
1676
1728
  return;
1677
1729
  const i = (r) => s.getNames({ ...t, suffix: r });
@@ -1680,283 +1732,281 @@ function fs(e, t, n) {
1680
1732
  const o = e.keyframeEntries.get(n) || [];
1681
1733
  e.keyframeEntries.set(n, [...o, { slotKey: t.slotKey, getNames: i }]);
1682
1734
  }
1683
- function Mt(e, t, n, s, i, o) {
1684
- const r = V(t), a = e.targetsMap.get(r) || Ct(
1735
+ function Pt(e, t, n, s, i, o) {
1736
+ const r = W(t), c = e.targetsMap.get(r) || At(
1685
1737
  t.key,
1686
- W(t, {
1738
+ G(t, {
1687
1739
  asCombinator: !0,
1688
1740
  useFirstChild: e.useFirstChild,
1689
1741
  addItemFilter: !0
1690
1742
  })
1691
1743
  );
1692
1744
  s.add(r);
1693
- const c = o?.get(r) || Me, u = Ot(a, c);
1745
+ const l = o?.get(r) || qe, u = Mt(c, l, e.configIndex);
1694
1746
  if (e.collectSlots) {
1695
- fs(a, t, u.animation);
1696
- const h = _t(t);
1697
- return ke(
1698
- a,
1747
+ gs(c, t, u.animation);
1748
+ const h = kt(t);
1749
+ return Pe(
1750
+ c,
1699
1751
  { animation: h === "animation", transition: h === "transition", timeline: !1 },
1700
- c
1701
- ), e.targetsMap.set(r, a), [];
1752
+ l
1753
+ ), e.targetsMap.set(r, c), [];
1702
1754
  }
1703
1755
  t.namedEffect && (t.suffix = e.keyframeSlots.get(t.slotKey));
1704
- const { rules: l, keyframes: f, wrote: d } = us(
1756
+ const { rules: a, keyframes: f, wrote: d } = ps(
1705
1757
  e,
1706
1758
  t,
1707
- a,
1759
+ c,
1708
1760
  n,
1709
1761
  u,
1710
1762
  i
1711
1763
  );
1712
- return f.forEach(({ name: h, keyframes: m }) => e.keyframesMap.set(h, m)), ke(a, d, c), e.targetsMap.set(r, a), l;
1764
+ return f.forEach(({ name: h, keyframes: m }) => e.keyframesMap.set(h, m)), Pe(c, d, l), e.targetsMap.set(r, c), a;
1713
1765
  }
1714
- function ds(e, t, n, s) {
1715
- const i = [], o = /* @__PURE__ */ new Set(), r = os(t);
1766
+ function vs(e, t, n, s) {
1767
+ const i = [], o = /* @__PURE__ */ new Set(), r = us(t);
1716
1768
  i.push(
1717
1769
  ...t.effects.flatMap(
1718
- (c) => Mt(e, c, n, o, t, r)
1770
+ (l) => Pt(e, l, n, o, t, r)
1719
1771
  )
1720
1772
  );
1721
- const { conditions: a } = t;
1722
- return o.forEach((c) => {
1723
- s.add(c);
1724
- const u = e.targetsMap.get(c), l = ts(u, a, e.configConditions);
1725
- l && (l.declarations.forEach(({ name: f }) => u.assigned.add(f)), i.push(l)), rs(u);
1773
+ const { conditions: c } = t;
1774
+ return o.forEach((l) => {
1775
+ s.add(l);
1776
+ const u = e.targetsMap.get(l), a = os(u, c, e.configConditions, e.configIndex);
1777
+ a && (a.declarations.forEach(({ name: f }) => u.assigned.add(f)), i.push(a)), fs(u);
1726
1778
  }), i;
1727
1779
  }
1728
- function hs(e, t, n) {
1729
- const { key: s, conditions: i, effects: o = [], sequences: r = [] } = t, a = e.plugins ? At(
1780
+ function ys(e, t, n) {
1781
+ const { key: s, conditions: i, effects: o = [], sequences: r = [] } = t, c = e.plugins ? qt(
1730
1782
  "interaction",
1731
1783
  t,
1732
1784
  s,
1733
- ne(i, e.configConditions, "media"),
1785
+ ie(i, e.configConditions, "media"),
1734
1786
  e.plugins
1735
- ) : [], { trigger: c } = t, u = {
1736
- trigger: Kn(c),
1737
- id: ["trigger", n].join("-")
1738
- }, l = /* @__PURE__ */ new Set();
1739
- c === "viewProgress" && a.push(ls(e, t, u.id, l));
1787
+ ) : [], { trigger: l } = t, u = {
1788
+ trigger: Un(l),
1789
+ id: X("trigger", [n], e.configIndex)
1790
+ }, a = /* @__PURE__ */ new Set();
1791
+ l === "viewProgress" && c.push(ms(e, t, u.id, a));
1740
1792
  const f = o.map((h, m) => {
1741
- const p = Tt(
1793
+ const p = Ot(
1742
1794
  h,
1743
1795
  t,
1744
1796
  e.config,
1745
- `eff-${n}-${m}`
1797
+ X("eff", [n, m], e.configIndex)
1746
1798
  );
1747
- return p && Object.assign(p, { slotKey: pe(n, m) });
1799
+ return p && Object.assign(p, { slotKey: ve(n, m) });
1748
1800
  }).filter((h) => h !== null);
1749
- a.push(
1750
- ...f.flatMap((h) => Mt(e, h, u, l))
1801
+ c.push(
1802
+ ...f.flatMap((h) => Pt(e, h, u, a))
1751
1803
  );
1752
1804
  const d = r.map(
1753
- (h, m) => Bn(
1805
+ (h, m) => Xn(
1754
1806
  h,
1755
1807
  t,
1756
1808
  e.config,
1757
- `seq-${n}-${m}`,
1758
- (p) => pe(n, p, m)
1809
+ X("seq", [n, m], e.configIndex),
1810
+ (p) => ve(n, p, m)
1759
1811
  )
1760
1812
  ).filter((h) => h !== null);
1761
- return a.push(
1813
+ return c.push(
1762
1814
  ...d.flatMap(
1763
- (h) => ds(e, h, u, l)
1815
+ (h) => vs(e, h, u, a)
1764
1816
  )
1765
- ), c === "viewProgress" && l.size > 1 && e.scopedTimelines.push(`--${u.id}`), l.forEach((h) => as(e.targetsMap.get(h))), a;
1817
+ ), l === "viewProgress" && a.size > 1 && e.scopedTimelines.push(`--${u.id}`), a.forEach((h) => ds(e.targetsMap.get(h))), c;
1766
1818
  }
1767
- function ms(e = {}) {
1768
- const { useFirstChild: t = !0, plugins: n } = typeof e == "boolean" ? { useFirstChild: e, plugins: void 0 } : e;
1769
- return { useFirstChild: t, plugins: n };
1819
+ function Es(e = {}) {
1820
+ return typeof e == "boolean" ? { useFirstChild: e } : e;
1770
1821
  }
1771
- function kt(e, t) {
1772
- const { useFirstChild: n = !0, plugins: s, collectSlots: i = !1 } = t, o = {
1822
+ function Lt(e, t) {
1823
+ const { useFirstChild: n = !0, plugins: s, configIndex: i, collectSlots: o = !1 } = t, r = {
1773
1824
  config: e,
1774
1825
  configConditions: e.conditions || {},
1775
1826
  targetsMap: /* @__PURE__ */ new Map(),
1776
1827
  keyframesMap: /* @__PURE__ */ new Map(),
1777
- keyframeSlots: i ? /* @__PURE__ */ new Map() : qt(e),
1828
+ keyframeSlots: o ? /* @__PURE__ */ new Map() : Ft(e, i),
1778
1829
  scopedTimelines: [],
1779
- collectSlots: i,
1830
+ collectSlots: o,
1780
1831
  useFirstChild: n,
1781
- plugins: s
1782
- }, r = e.interactions.flatMap(
1783
- (a, c) => hs(o, a, c)
1832
+ plugins: s,
1833
+ configIndex: i
1834
+ }, c = e.interactions.flatMap(
1835
+ (l, u) => ys(r, l, u)
1784
1836
  );
1785
- return { ctx: o, cssRules: r };
1837
+ return { ctx: r, cssRules: c };
1786
1838
  }
1787
- function pe(e, t, n) {
1839
+ function X(e, t, n) {
1840
+ return [e, ...n === void 0 ? [] : [`c${n}`], ...t].join("-");
1841
+ }
1842
+ function ve(e, t, n) {
1788
1843
  return [e, n, t].filter((s) => s !== void 0).join(":");
1789
1844
  }
1790
- function qt(e) {
1791
- const { ctx: t } = kt(e, { collectSlots: !0 }), n = /* @__PURE__ */ new Map(), s = (i) => i ? `-${i}` : void 0;
1792
- return t.targetsMap.forEach(({ keyframeEntries: i }) => {
1793
- const o = /* @__PURE__ */ new Set();
1794
- i.forEach((r) => {
1795
- const a = (l) => r.flatMap(({ getNames: f }) => f(s(l)));
1796
- let c = 0, u = a(c);
1797
- for (; u.some((l) => o.has(l)); )
1798
- u = a(++c);
1799
- u.forEach((l) => o.add(l)), c && r.forEach(({ slotKey: l }) => n.set(l, s(c)));
1845
+ function Ft(e, t) {
1846
+ const { ctx: n } = Lt(e, { configIndex: t, collectSlots: !0 }), s = /* @__PURE__ */ new Map(), i = (o) => o ? `-${o}` : void 0;
1847
+ return n.targetsMap.forEach(({ keyframeEntries: o }) => {
1848
+ const r = /* @__PURE__ */ new Set();
1849
+ o.forEach((c) => {
1850
+ const l = (f) => c.flatMap(({ getNames: d }) => d(i(f)));
1851
+ let u = 0, a = l(u);
1852
+ for (; a.some((f) => r.has(f)); )
1853
+ a = l(++u);
1854
+ a.forEach((f) => r.add(f)), u && c.forEach(({ slotKey: f }) => s.set(f, i(u)));
1800
1855
  });
1801
- }), n;
1856
+ }), s;
1802
1857
  }
1803
- function ps(e, t) {
1804
- const { ctx: n, cssRules: s } = kt(e, ms(t)), i = [...n.targetsMap.values()], o = Math.max(0, ...i.map(({ animation: h }) => h.listIndex)), r = Math.max(0, ...i.map(({ transition: h }) => h.listIndex)), a = Math.max(0, ...i.map(({ timeline: h }) => h.listIndex)), c = ns(
1858
+ function ws(e, t) {
1859
+ const { ctx: n, cssRules: s } = Lt(e, Es(t)), i = [...n.targetsMap.values()], o = Math.max(0, ...i.map(({ animation: h }) => h.listIndex)), r = Math.max(0, ...i.map(({ transition: h }) => h.listIndex)), c = Math.max(0, ...i.map(({ timeline: h }) => h.listIndex)), l = rs(
1805
1860
  i.flatMap((h) => [
1806
1861
  h,
1807
1862
  ...[...h.partSelectors].map((m) => ({ key: h.key, childSelector: m }))
1808
1863
  ]),
1809
1864
  o,
1810
1865
  r,
1811
- a
1812
- ), u = Math.max(0, ...i.map(({ animation: h }) => h.slotCursor)), l = Math.max(
1866
+ c,
1867
+ n.configIndex
1868
+ ), u = Math.max(0, ...i.map(({ animation: h }) => h.slotCursor)), a = Math.max(
1813
1869
  0,
1814
1870
  ...i.map(({ transition: h }) => h.slotCursor)
1815
- ), f = es(
1871
+ ), f = is(
1816
1872
  o,
1817
1873
  r,
1818
1874
  u,
1819
- l,
1820
- a
1821
- ), d = n.scopedTimelines.length ? `:root {
1822
- timeline-scope: ${n.scopedTimelines.join(", ")};
1823
- }` : "";
1824
- return { keyframes: n.keyframesMap, atProperty: f, cssRules: s, listsRule: c, timelineScopeRule: d };
1875
+ a,
1876
+ c,
1877
+ n.configIndex
1878
+ ), d = as(n.scopedTimelines, n.configIndex);
1879
+ return { keyframes: n.keyframesMap, atProperty: f, cssRules: s, listsRule: l, timelineScopeRule: d };
1825
1880
  }
1826
- function xi(e, t) {
1827
- const { cssRules: n, keyframes: s, atProperty: i, listsRule: o, timelineScopeRule: r } = ps(
1881
+ function Di(e, t) {
1882
+ const { cssRules: n, keyframes: s, atProperty: i, listsRule: o, timelineScopeRule: r } = ws(
1828
1883
  e,
1829
1884
  t
1830
1885
  );
1831
1886
  return [
1832
1887
  ...i,
1833
- ...[...s.entries()].map(([c, u]) => Zn(c, u)),
1834
- ...n.map(Jn),
1888
+ ...[...s.entries()].map(([l, u]) => ts(l, u)),
1889
+ ...n.map(ns),
1835
1890
  o,
1836
1891
  r
1837
- ].filter((c) => c).join(`
1892
+ ].filter((l) => l).join(`
1838
1893
  `);
1839
1894
  }
1840
- const gs = {
1895
+ const $s = {
1841
1896
  root: null,
1842
1897
  rootMargin: "0px 0px -10% 0px",
1843
1898
  threshold: [0]
1844
- }, vs = {
1899
+ }, bs = {
1845
1900
  root: null,
1846
1901
  rootMargin: "0px",
1847
1902
  threshold: [0]
1848
- }, ys = 0.2;
1849
- function Es(e) {
1903
+ }, Ss = 0.2;
1904
+ function Is(e) {
1850
1905
  const t = e.trim().split(/\s+/), n = t[0], s = t.length > 1 ? t[1] : t[0], i = (o) => o.startsWith("-") ? o.slice(1) : parseFloat(o) ? `-${o}` : o;
1851
1906
  return `${i(n)} 0px ${i(s)}`;
1852
1907
  }
1853
- const Q = {}, R = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakSet(), Y = /* @__PURE__ */ new WeakMap();
1854
- let Pt = {}, B = null;
1855
- function ws(e) {
1856
- Pt = e;
1908
+ const Z = {}, N = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakSet(), B = /* @__PURE__ */ new WeakMap();
1909
+ let Rt = {}, U = null;
1910
+ function Ts(e) {
1911
+ Rt = e;
1857
1912
  }
1858
- function Lt(e, t, n) {
1859
- R.get(e)?.forEach(({ source: i, handler: o }) => {
1913
+ function xt(e, t, n) {
1914
+ N.get(e)?.forEach(({ source: i, handler: o }) => {
1860
1915
  i === e && o(t, n);
1861
1916
  });
1862
1917
  }
1863
- function Ue() {
1864
- return B || (B = new IntersectionObserver((e) => {
1918
+ function Ze() {
1919
+ return U || (U = new IntersectionObserver((e) => {
1865
1920
  e.forEach((t) => {
1866
1921
  const n = t.target;
1867
- t.isIntersecting || Lt(n, !1, !0);
1922
+ t.isIntersecting || xt(n, !1, !0);
1868
1923
  });
1869
- }, vs), B);
1924
+ }, bs), U);
1870
1925
  }
1871
- function xt(e, t = !1) {
1926
+ function Nt(e, t = !1) {
1872
1927
  const n = JSON.stringify({ ...e, isSafeMode: t });
1873
- if (Q[n])
1874
- return Q[n];
1875
- const s = e.threshold ?? ys, i = t ? gs : {
1928
+ if (Z[n])
1929
+ return Z[n];
1930
+ const s = e.threshold ?? Ss, i = t ? $s : {
1876
1931
  root: null,
1877
- rootMargin: e.inset ? Es(e.inset) : "0px",
1932
+ rootMargin: e.inset ? Is(e.inset) : "0px",
1878
1933
  threshold: s
1879
1934
  }, o = new IntersectionObserver((r) => {
1880
- r.forEach((a) => {
1881
- const c = a.target, u = !ge.has(c);
1882
- if (u && (ge.add(c), e.useSafeViewEnter && !a.isIntersecting)) {
1883
- O.measure(() => {
1884
- const l = a.boundingClientRect.height, f = a.rootBounds?.height;
1935
+ r.forEach((c) => {
1936
+ const l = c.target, u = !ye.has(l);
1937
+ if (u && (ye.add(l), e.useSafeViewEnter && !c.isIntersecting)) {
1938
+ A.measure(() => {
1939
+ const a = c.boundingClientRect.height, f = c.rootBounds?.height;
1885
1940
  if (!f)
1886
1941
  return;
1887
1942
  const d = Array.isArray(e.threshold) ? Math.min(...e.threshold) : e.threshold;
1888
- d && l * d > f && O.mutate(() => {
1889
- o.unobserve(c);
1890
- const m = xt(e, !0);
1891
- Y.set(c, m), m.observe(c);
1943
+ d && a * d > f && A.mutate(() => {
1944
+ o.unobserve(l);
1945
+ const m = Nt(e, !0);
1946
+ B.set(l, m), m.observe(l);
1892
1947
  });
1893
1948
  });
1894
1949
  return;
1895
1950
  }
1896
- (a.isIntersecting || !u) && Lt(c, a.isIntersecting);
1951
+ (c.isIntersecting || !u) && xt(l, c.isIntersecting);
1897
1952
  });
1898
1953
  }, i);
1899
- return Q[n] = o, o;
1954
+ return Z[n] = o, o;
1900
1955
  }
1901
- function $s(e, t, n, s = {}, { reducedMotion: i, selectorCondition: o, animation: r } = {}) {
1902
- const a = { ...Pt, ...s }, c = n.triggerType || "once", u = r || te(
1956
+ function Cs(e, t, n, s = {}, { reducedMotion: i, selectorCondition: o, animation: r } = {}) {
1957
+ const c = { ...Rt, ...s }, l = n.triggerType || "once", u = r || se(
1903
1958
  t,
1904
- F(n),
1959
+ x(n),
1905
1960
  void 0,
1906
1961
  i
1907
1962
  );
1908
1963
  if (!u)
1909
1964
  return;
1910
- const l = xt(a);
1911
- c !== "once" && u.persist?.();
1965
+ const a = Nt(c);
1966
+ l !== "once" && u.persist?.();
1912
1967
  let f = !0, d = !1, h;
1913
- h = { source: e, target: t, handler: (v, y) => {
1968
+ h = { source: e, target: t, handler: (g, E) => {
1914
1969
  if (!(o && !t.matches(o)))
1915
- if (c === "once") {
1916
- if (v && !d) {
1970
+ if (l === "once") {
1971
+ if (g && !d) {
1917
1972
  d = !0;
1918
- const g = R.get(e);
1919
- (!g || g.size === 0 || g.size === 1 && g.has(h)) && ((Y.get(e) || l).unobserve(e), ge.delete(e)), u.onFinish(() => {
1920
- R.get(e)?.delete(h), R.get(t)?.delete(h);
1973
+ const y = N.get(e);
1974
+ (!y || y.size === 0 || y.size === 1 && y.has(h)) && ((B.get(e) || a).unobserve(e), ye.delete(e)), u.onFinish(() => {
1975
+ N.get(e)?.delete(h), N.get(t)?.delete(h);
1921
1976
  }), u.play(() => {
1922
- const E = () => {
1977
+ const v = () => {
1923
1978
  t.dataset.interactEnter = "start";
1924
- };
1925
- if (u.isCSS) {
1926
- O.mutate(() => {
1927
- requestAnimationFrame(E);
1979
+ }, w = () => {
1980
+ A.mutate(() => {
1981
+ t.dataset.interactEnter = "done";
1928
1982
  });
1929
- const w = () => {
1930
- O.mutate(() => {
1931
- t.dataset.interactEnter = "done";
1932
- });
1933
- };
1934
- u.onFinish(w), u.onAbort(w);
1935
- } else
1936
- O.mutate(E);
1983
+ };
1984
+ u.isCSS ? (A.mutate(() => {
1985
+ requestAnimationFrame(v);
1986
+ }), u.onFinish(w), u.onAbort(w)) : (A.mutate(v), u.onFinish(w));
1937
1987
  });
1938
1988
  }
1939
- } else c === "alternate" ? f && v ? (f = !1, u.play()) : f || u.reverse() : c === "repeat" ? v ? (u.progress(0), u.play()) : y && (u.pause(), u.progress(0)) : c === "state" && (v ? u.play() : y && u.pause());
1989
+ } else l === "alternate" ? f && g ? (f = !1, u.play()) : f || u.reverse() : l === "repeat" ? g ? (u.progress(0), u.play()) : E && (u.pause(), u.progress(0)) : l === "state" && (g ? u.play() : E && u.pause());
1940
1990
  }, cleanup: () => {
1941
- (Y.get(e) || l).unobserve(e), (c === "repeat" || c === "state") && Ue().unobserve(e), u.cancel(), ge.delete(e), Y.delete(e);
1942
- } }, k(R, e, h), k(R, t, h), Y.set(e, l), l.observe(e), (c === "repeat" || c === "state") && Ue().observe(e);
1991
+ (B.get(e) || a).unobserve(e), (l === "repeat" || l === "state") && Ze().unobserve(e), u.cancel(), ye.delete(e), B.delete(e);
1992
+ } }, k(N, e, h), k(N, t, h), B.set(e, a), a.observe(e), (l === "repeat" || l === "state") && Ze().observe(e);
1943
1993
  }
1944
- function bs(e) {
1945
- se(R, e);
1994
+ function Os(e) {
1995
+ oe(N, e);
1946
1996
  }
1947
- function Ss() {
1948
- B = null, Object.keys(Q).forEach((e) => delete Q[e]);
1997
+ function _s() {
1998
+ U = null, Object.keys(Z).forEach((e) => delete Z[e]);
1949
1999
  }
1950
- const Is = {
1951
- add: $s,
1952
- remove: bs,
1953
- setOptions: ws,
1954
- reset: Ss
2000
+ const As = {
2001
+ add: Cs,
2002
+ remove: Os,
2003
+ setOptions: Ts,
2004
+ reset: _s
1955
2005
  };
1956
- function Ft(e, t) {
2006
+ function jt(e, t) {
1957
2007
  return Object.assign(Object.create(t), e);
1958
2008
  }
1959
- function Ts(e, t, n, s) {
2009
+ function Ms(e, t, n, s) {
1960
2010
  let i = e * (1 - n) + t * n;
1961
2011
  if (s) {
1962
2012
  const o = i - e;
@@ -1967,7 +2017,7 @@ function Ts(e, t, n, s) {
1967
2017
  }
1968
2018
  return i;
1969
2019
  }
1970
- function Cs(e) {
2020
+ function ks(e) {
1971
2021
  let t = !1;
1972
2022
  return function() {
1973
2023
  t || (t = !0, window.requestAnimationFrame(() => {
@@ -1975,7 +2025,7 @@ function Cs(e) {
1975
2025
  }));
1976
2026
  };
1977
2027
  }
1978
- function Qe(e, t) {
2028
+ function Je(e, t) {
1979
2029
  let n = 0;
1980
2030
  return function() {
1981
2031
  n && window.clearTimeout(n), n = window.setTimeout(() => {
@@ -1983,38 +2033,38 @@ function Qe(e, t) {
1983
2033
  }, t);
1984
2034
  };
1985
2035
  }
1986
- function Os(e, t) {
2036
+ function qs(e, t) {
1987
2037
  const n = e.match(/^calc\s*\(\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\+\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\)\s*$/);
1988
- return ve(n[1], t) + ve(n[6], t);
2038
+ return Ee(n[1], t) + Ee(n[6], t);
1989
2039
  }
1990
- function ve(e, t) {
1991
- 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) ? Os(e, t) : parseInt(e) || 0 : 0;
2040
+ function Ee(e, t) {
2041
+ 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) ? qs(e, t) : parseInt(e) || 0 : 0;
1992
2042
  }
1993
2043
  function z(e, t, n) {
1994
- const { name: s, offset: i = 0 } = e, { start: o, end: r } = n, a = r - o, c = i / 100;
1995
- let u, l;
1996
- return s === "entry" ? (u = o - t, l = Math.min(t, a)) : s === "entry-crossing" ? (u = o - t, l = a) : s === "contain" ? (u = Math.min(r - t, o), l = Math.abs(t - a)) : s === "exit" ? (u = Math.max(o, r - t), l = Math.min(t, a)) : s === "exit-crossing" ? (u = o, l = a) : s === "cover" && (u = o - t, l = a + t), u + c * l | 0;
2044
+ const { name: s, offset: i = 0 } = e, { start: o, end: r } = n, c = r - o, l = i / 100;
2045
+ let u, a;
2046
+ return s === "entry" ? (u = o - t, a = Math.min(t, c)) : s === "entry-crossing" ? (u = o - t, a = c) : s === "contain" ? (u = Math.min(r - t, o), a = Math.abs(t - c)) : s === "exit" ? (u = Math.max(o, r - t), a = Math.min(t, c)) : s === "exit-crossing" ? (u = o, a = c) : s === "cover" && (u = o - t, a = c + t), u + l * a | 0;
1997
2047
  }
1998
- function Te(e, t, n, s, i) {
2048
+ function Oe(e, t, n, s, i) {
1999
2049
  let o = 0;
2000
2050
  const r = { start: t, end: n };
2001
- return e.forEach((a, c) => {
2002
- o += a.offset;
2003
- const u = a.sticky;
2051
+ return e.forEach((c, l) => {
2052
+ o += c.offset;
2053
+ const u = c.sticky;
2004
2054
  if (u) {
2005
- if ("end" in u && e[c - 1]?.element) {
2006
- const d = ((i ? a.element.offsetWidth : a.element.offsetHeight) || 0) + u.end - s, h = o + d - a.offset, m = h < r.start, p = !m && h <= n;
2007
- let v = 0;
2008
- (m || p) && (v = a.offset, r.end += v), m && (r.start += v);
2055
+ if ("end" in u && e[l - 1]?.element) {
2056
+ const d = ((i ? c.element.offsetWidth : c.element.offsetHeight) || 0) + u.end - s, h = o + d - c.offset, m = h < r.start, p = !m && h <= n;
2057
+ let g = 0;
2058
+ (m || p) && (g = c.offset, r.end += g), m && (r.start += g);
2009
2059
  }
2010
2060
  if ("start" in u) {
2011
- const l = o - u.start, f = l < r.start, d = !f && l <= r.end;
2061
+ const a = o - u.start, f = a < r.start, d = !f && a <= r.end;
2012
2062
  let h = 0;
2013
- const m = e[c - 1]?.element;
2063
+ const m = e[l - 1]?.element;
2014
2064
  if (m) {
2015
2065
  if (f || d) {
2016
- const p = (i ? m.offsetWidth : m.offsetHeight) || 0, v = a.offset, y = (i ? a.element.offsetWidth : a.element.offsetHeight) || 0;
2017
- h = p - (v + y), o += h, r.end += h;
2066
+ const p = (i ? m.offsetWidth : m.offsetHeight) || 0, g = c.offset, E = (i ? c.element.offsetWidth : c.element.offsetHeight) || 0;
2067
+ h = p - (g + E), o += h, r.end += h;
2018
2068
  }
2019
2069
  f && (r.start += h);
2020
2070
  }
@@ -2022,55 +2072,55 @@ function Te(e, t, n, s, i) {
2022
2072
  }
2023
2073
  }), r;
2024
2074
  }
2025
- function _s(e, t, n, s, i, o) {
2026
- const { start: r, end: a, duration: c } = e;
2027
- let u = r, l = a, f = e.startRange, d = e.endRange, h;
2028
- if (typeof c == "string") {
2029
- f = { name: c, offset: 0 }, d = { name: c, offset: 100 }, u = z(f, n, t), l = z(d, n, t), h = l - u;
2030
- const m = Te(o, u, l, n, s);
2031
- u = m.start, l = m.end;
2075
+ function Ps(e, t, n, s, i, o) {
2076
+ const { start: r, end: c, duration: l } = e;
2077
+ let u = r, a = c, f = e.startRange, d = e.endRange, h;
2078
+ if (typeof l == "string") {
2079
+ f = { name: l, offset: 0 }, d = { name: l, offset: 100 }, u = z(f, n, t), a = z(d, n, t), h = a - u;
2080
+ const m = Oe(o, u, a, n, s);
2081
+ u = m.start, a = m.end;
2032
2082
  } else {
2033
2083
  if (f || r?.name) {
2034
2084
  f = f || r;
2035
- const m = ve(f.add, i), p = z({ ...f, offset: 0 }, n, t), v = z({ ...f, offset: 100 }, n, t), y = Te(o, p, v, n, s);
2036
- u = y.start + f.offset / 100 * (y.end - y.start) + m;
2085
+ const m = Ee(f.add, i), p = z({ ...f, offset: 0 }, n, t), g = z({ ...f, offset: 100 }, n, t), E = Oe(o, p, g, n, s);
2086
+ u = E.start + f.offset / 100 * (E.end - E.start) + m;
2037
2087
  }
2038
- if (d || a?.name) {
2039
- d = d || a;
2040
- const m = ve(d.add, i), p = z({ ...d, offset: 0 }, n, t), v = z({ ...d, offset: 100 }, n, t), y = Te(o, p, v, n, s);
2041
- l = y.start + d.offset / 100 * (y.end - y.start) + m;
2042
- } else typeof c == "number" && (l = u + c);
2088
+ if (d || c?.name) {
2089
+ d = d || c;
2090
+ const m = Ee(d.add, i), p = z({ ...d, offset: 0 }, n, t), g = z({ ...d, offset: 100 }, n, t), E = Oe(o, p, g, n, s);
2091
+ a = E.start + d.offset / 100 * (E.end - E.start) + m;
2092
+ } else typeof l == "number" && (a = u + l);
2043
2093
  }
2044
- return !h && !c && (h = l - u), { ...e, start: u, end: l, startRange: f, endRange: d, duration: h || c };
2094
+ return !h && !l && (h = a - u), { ...e, start: u, end: a, startRange: f, endRange: d, duration: h || l };
2045
2095
  }
2046
- function As(e) {
2096
+ function Ls(e) {
2047
2097
  return e.position === "sticky";
2048
2098
  }
2049
- function Ms(e, t, n) {
2099
+ function Fs(e, t, n) {
2050
2100
  return e.position === "fixed" && (!t || t === window.document.body || t === n);
2051
2101
  }
2052
- function ks(e, t) {
2102
+ function Rs(e, t) {
2053
2103
  return parseInt(t ? e.left : e.top);
2054
2104
  }
2055
- function qs(e, t) {
2105
+ function xs(e, t) {
2056
2106
  return parseInt(t ? e.right : e.bottom);
2057
2107
  }
2058
- function Ps(e, t, n) {
2108
+ function Ns(e, t, n) {
2059
2109
  n && (e.style.position = "static");
2060
2110
  const s = (t ? e.offsetLeft : e.offsetTop) || 0;
2061
2111
  return n && (e.style.position = null), s;
2062
2112
  }
2063
- function Ls(e, t) {
2113
+ function js(e, t) {
2064
2114
  let n;
2065
- const s = ks(e, t), i = qs(e, t), o = !isNaN(s), r = !isNaN(i);
2115
+ const s = Rs(e, t), i = xs(e, t), o = !isNaN(s), r = !isNaN(i);
2066
2116
  return (o || r) && (n = {}, o && (n.start = s), r && (n.end = i)), n;
2067
2117
  }
2068
- function re(e, t, n, s, i) {
2118
+ function ce(e, t, n, s, i) {
2069
2119
  const o = e[0].viewSource, r = [];
2070
- let a = (s ? o.offsetWidth : o.offsetHeight) || 0, c = 0, u = o;
2120
+ let c = (s ? o.offsetWidth : o.offsetHeight) || 0, l = 0, u = o;
2071
2121
  for (; u; ) {
2072
- const f = window.getComputedStyle(u), d = As(f), h = d ? Ls(f, s) : void 0, m = Ps(u, s, d);
2073
- if ((!h || !("end" in h)) && (c += m), r.push({ element: u, offset: m, sticky: h }), u = u.offsetParent, Ms(f, u, t))
2122
+ const f = window.getComputedStyle(u), d = Ls(f), h = d ? js(f, s) : void 0, m = Ns(u, s, d);
2123
+ if ((!h || !("end" in h)) && (l += m), r.push({ element: u, offset: m, sticky: h }), u = u.offsetParent, Fs(f, u, t))
2074
2124
  break;
2075
2125
  if (u === t) {
2076
2126
  r.push({ element: u, offset: 0 });
@@ -2078,9 +2128,9 @@ function re(e, t, n, s, i) {
2078
2128
  }
2079
2129
  }
2080
2130
  return r.reverse(), e.map((f) => ({
2081
- ..._s(
2131
+ ...Ps(
2082
2132
  f,
2083
- { start: c, end: c + a },
2133
+ { start: l, end: l + c },
2084
2134
  n,
2085
2135
  s,
2086
2136
  i,
@@ -2088,7 +2138,7 @@ function re(e, t, n, s, i) {
2088
2138
  )
2089
2139
  }));
2090
2140
  }
2091
- const Xe = 100, xs = {
2141
+ const et = 100, zs = {
2092
2142
  horizontal: !1,
2093
2143
  observeViewportEntry: !0,
2094
2144
  viewportRootMargin: "7% 7%",
@@ -2096,74 +2146,74 @@ const Xe = 100, xs = {
2096
2146
  observeSourcesResize: !1,
2097
2147
  observeContentResize: !1
2098
2148
  };
2099
- function Fs(e, t, n, s) {
2149
+ function Ds(e, t, n, s) {
2100
2150
  let i = 0;
2101
2151
  return e >= t && e <= n ? i = s ? (e - t) / s : 1 : e > n && (i = 1), i;
2102
2152
  }
2103
- function Ze(e, t) {
2153
+ function tt(e, t) {
2104
2154
  return e === window ? t ? window.document.documentElement.clientWidth : window.document.documentElement.clientHeight : t ? e.clientWidth : e.clientHeight;
2105
2155
  }
2106
- function Rs() {
2156
+ function Hs() {
2107
2157
  return {
2108
2158
  viewportWidth: window.document.documentElement.clientWidth,
2109
2159
  viewportHeight: window.document.documentElement.clientHeight
2110
2160
  };
2111
2161
  }
2112
- function Ns(e) {
2113
- const t = Ft(e, xs), n = t.root, s = t.horizontal, i = /* @__PURE__ */ new WeakMap();
2114
- let o = Ze(n, s), r, a, c, u, l;
2115
- const f = [], d = Rs();
2162
+ function Gs(e) {
2163
+ const t = jt(e, zs), n = t.root, s = t.horizontal, i = /* @__PURE__ */ new WeakMap();
2164
+ let o = tt(n, s), r, c, l, u, a;
2165
+ const f = [], d = Hs();
2116
2166
  if (t.scenes = Object.values(
2117
2167
  // TODO(ameerf): find a polyfill and use groupBy instead of following reduce
2118
2168
  e.scenes.reduce(
2119
- (p, v, y) => {
2120
- const g = v.groupId ? `group-${v.groupId}` : String(y);
2121
- return p[g] ? p[g].push(v) : p[g] = [v], p;
2169
+ (p, g, E) => {
2170
+ const y = g.groupId ? `group-${g.groupId}` : String(E);
2171
+ return p[y] ? p[y].push(g) : p[y] = [g], p;
2122
2172
  },
2123
2173
  {}
2124
2174
  )
2125
- ).flatMap((p) => (p.every((v) => v.viewSource && (typeof v.duration == "string" || v.start?.name)) ? (p = re(p, n, o, s, d), (t.observeSourcesResize || t.observeContentResize) && f.push(p)) : p.forEach((v) => {
2126
- v.end == null && (v.end = v.start + v.duration), v.duration == null && (v.duration = v.end - v.start);
2127
- }), p)), t.scenes.forEach((p, v) => {
2128
- p.index = v;
2175
+ ).flatMap((p) => (p.every((g) => g.viewSource && (typeof g.duration == "string" || g.start?.name)) ? (p = ce(p, n, o, s, d), (t.observeSourcesResize || t.observeContentResize) && f.push(p)) : p.forEach((g) => {
2176
+ g.end == null && (g.end = g.start + g.duration), g.duration == null && (g.duration = g.end - g.start);
2177
+ }), p)), t.scenes.forEach((p, g) => {
2178
+ p.index = g;
2129
2179
  }), f.length) {
2130
2180
  const p = /* @__PURE__ */ new Map();
2131
- window.ResizeObserver && (c = new window.ResizeObserver(function(v) {
2132
- v.forEach((y) => {
2133
- const g = p.get(y.target), E = re(g, n, o, s, d);
2134
- E.forEach((w, b) => {
2135
- t.scenes[w.index] = E[b];
2136
- }), f.splice(f.indexOf(g), 1, E);
2181
+ window.ResizeObserver && (l = new window.ResizeObserver(function(g) {
2182
+ g.forEach((E) => {
2183
+ const y = p.get(E.target), v = ce(y, n, o, s, d);
2184
+ v.forEach((w, b) => {
2185
+ t.scenes[w.index] = v[b];
2186
+ }), f.splice(f.indexOf(y), 1, v);
2137
2187
  });
2138
- }), f.forEach((v) => {
2139
- c.observe(v[0].viewSource, { box: "border-box" }), p.set(v[0].viewSource, v);
2140
- }), t.observeContentResize && t.contentRoot && new window.ResizeObserver(Qe(() => {
2141
- const y = f.map((g) => {
2142
- const E = re(g, n, o, s, d);
2143
- return E.forEach((w, b) => {
2144
- t.scenes[w.index] = E[b];
2145
- }), E;
2188
+ }), f.forEach((g) => {
2189
+ l.observe(g[0].viewSource, { box: "border-box" }), p.set(g[0].viewSource, g);
2190
+ }), t.observeContentResize && t.contentRoot && new window.ResizeObserver(Je(() => {
2191
+ const E = f.map((y) => {
2192
+ const v = ce(y, n, o, s, d);
2193
+ return v.forEach((w, b) => {
2194
+ t.scenes[w.index] = v[b];
2195
+ }), v;
2146
2196
  });
2147
- f.length = 0, f.push(...y), f.forEach((g) => {
2148
- p.set(g[0].viewSource, g);
2197
+ f.length = 0, f.push(...E), f.forEach((y) => {
2198
+ p.set(y[0].viewSource, y);
2149
2199
  });
2150
- }, Xe)).observe(t.contentRoot, { box: "border-box" })), t.observeViewportResize && (u = Qe(function() {
2151
- o = Ze(n, s);
2152
- const v = f.map((y) => {
2153
- const g = re(y, n, o, s, d);
2154
- return g.forEach((E, w) => {
2155
- t.scenes[E.index] = g[w];
2156
- }), g;
2200
+ }, et)).observe(t.contentRoot, { box: "border-box" })), t.observeViewportResize && (u = Je(function() {
2201
+ o = tt(n, s);
2202
+ const g = f.map((E) => {
2203
+ const y = ce(E, n, o, s, d);
2204
+ return y.forEach((v, w) => {
2205
+ t.scenes[v.index] = y[w];
2206
+ }), y;
2157
2207
  });
2158
- f.length = 0, f.push(...v), f.forEach((y) => {
2159
- p.set(y[0].viewSource, y);
2208
+ f.length = 0, f.push(...g), f.forEach((E) => {
2209
+ p.set(E[0].viewSource, E);
2160
2210
  });
2161
- }, Xe), n === window ? window.addEventListener("resize", u) : window.ResizeObserver && (l = new window.ResizeObserver(u), l.observe(n, { box: "border-box" })));
2211
+ }, et), n === window ? window.addEventListener("resize", u) : window.ResizeObserver && (a = new window.ResizeObserver(u), a.observe(n, { box: "border-box" })));
2162
2212
  }
2163
- t.observeViewportEntry && window.IntersectionObserver && (a = new window.IntersectionObserver(function(p) {
2164
- p.forEach((v) => {
2165
- (i.get(v.target) || []).forEach((y) => {
2166
- y.disabled = !v.isIntersecting;
2213
+ t.observeViewportEntry && window.IntersectionObserver && (c = new window.IntersectionObserver(function(p) {
2214
+ p.forEach((g) => {
2215
+ (i.get(g.target) || []).forEach((E) => {
2216
+ E.disabled = !g.isIntersecting;
2167
2217
  });
2168
2218
  });
2169
2219
  }, {
@@ -2172,40 +2222,40 @@ function Ns(e) {
2172
2222
  threshold: 0
2173
2223
  }), t.scenes.forEach((p) => {
2174
2224
  if (p.viewSource) {
2175
- let v = i.get(p.viewSource);
2176
- v || (v = [], i.set(p.viewSource, v), a.observe(p.viewSource)), v.push(p);
2225
+ let g = i.get(p.viewSource);
2226
+ g || (g = [], i.set(p.viewSource, g), c.observe(p.viewSource)), g.push(p);
2177
2227
  }
2178
2228
  }));
2179
- function h({ p, vp: v }) {
2229
+ function h({ p, vp: g }) {
2180
2230
  p = +p.toFixed(1);
2181
- const y = +v.toFixed(4);
2231
+ const E = +g.toFixed(4);
2182
2232
  if (p !== r) {
2183
- for (let g of t.scenes)
2184
- if (!g.disabled) {
2185
- const { start: E, end: w, duration: b } = g, S = Fs(p, E, w, b);
2186
- g.effect(g, S, y);
2233
+ for (let y of t.scenes)
2234
+ if (!y.disabled) {
2235
+ const { start: v, end: w, duration: b } = y, S = Ds(p, v, w, b);
2236
+ y.effect(y, S, E);
2187
2237
  }
2188
2238
  r = p;
2189
2239
  }
2190
2240
  }
2191
2241
  function m() {
2192
- t.scenes.forEach((p) => p.destroy?.()), a && (a.disconnect(), a = null), c && (c.disconnect(), c = null), u && (l ? (l.disconnect(), l = null) : window.removeEventListener("resize", u));
2242
+ t.scenes.forEach((p) => p.destroy?.()), c && (c.disconnect(), c = null), l && (l.disconnect(), l = null), u && (a ? (a.disconnect(), a = null) : window.removeEventListener("resize", u));
2193
2243
  }
2194
2244
  return {
2195
2245
  tick: h,
2196
2246
  destroy: m
2197
2247
  };
2198
2248
  }
2199
- const js = {
2249
+ const Ws = {
2200
2250
  transitionActive: !1,
2201
2251
  transitionFriction: 0.9,
2202
2252
  transitionEpsilon: 1,
2203
2253
  velocityActive: !1,
2204
2254
  velocityMax: 1
2205
2255
  };
2206
- class zs {
2256
+ class Vs {
2207
2257
  constructor(t = {}) {
2208
- this.config = Ft(t, js), this.progress = {
2258
+ this.config = jt(t, Ws), this.progress = {
2209
2259
  p: 0,
2210
2260
  prevP: 0,
2211
2261
  vp: 0
@@ -2218,7 +2268,7 @@ class zs {
2218
2268
  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 || (() => {
2219
2269
  const s = this.config.root;
2220
2270
  this.progress.p = this.config.horizontal ? s.scrollX || s.scrollLeft || 0 : s.scrollY || s.scrollTop || 0;
2221
- }), this._trigger = Cs(() => {
2271
+ }), this._trigger = ks(() => {
2222
2272
  this._measure?.(), this.tick(!0);
2223
2273
  });
2224
2274
  }
@@ -2264,7 +2314,7 @@ class zs {
2264
2314
  * Calculate current progress.
2265
2315
  */
2266
2316
  lerp() {
2267
- this.currentProgress.p = Ts(this.currentProgress.p, this.progress.p, +(1 - this.config.transitionFriction).toFixed(3), this.config.transitionEpsilon);
2317
+ this.currentProgress.p = Ms(this.currentProgress.p, this.progress.p, +(1 - this.config.transitionFriction).toFixed(3), this.config.transitionEpsilon);
2268
2318
  }
2269
2319
  /**
2270
2320
  * Stop the event and effect, and remove all DOM side-effects.
@@ -2288,7 +2338,7 @@ class zs {
2288
2338
  * Reset registered effect.
2289
2339
  */
2290
2340
  setupEffect() {
2291
- this.removeEffect(), this.effect = Ns(this.config);
2341
+ this.removeEffect(), this.effect = Gs(this.config);
2292
2342
  }
2293
2343
  /**
2294
2344
  * Remove registered effect.
@@ -2297,42 +2347,42 @@ class zs {
2297
2347
  this.effect && this.effect.destroy(), this.effect = null;
2298
2348
  }
2299
2349
  }
2300
- const qe = /* @__PURE__ */ new WeakMap();
2301
- let Rt = () => ({});
2302
- function Hs(e) {
2303
- Rt = e;
2350
+ const Le = /* @__PURE__ */ new WeakMap();
2351
+ let zt = () => ({});
2352
+ function Ks(e) {
2353
+ zt = e;
2304
2354
  }
2305
- function Ds(e, t, n, s, { reducedMotion: i, selectorCondition: o }) {
2355
+ function Ys(e, t, n, s, { reducedMotion: i, selectorCondition: o }) {
2306
2356
  if (i || o && !t.matches(o)) return;
2307
2357
  const r = {
2308
2358
  trigger: "view-progress",
2309
2359
  element: e
2310
- }, a = F(n);
2311
- let c;
2360
+ }, c = x(n);
2361
+ let l;
2312
2362
  if ("ViewTimeline" in window) {
2313
- const l = te(
2363
+ const a = se(
2314
2364
  t,
2315
- a,
2365
+ c,
2316
2366
  r
2317
2367
  );
2318
- l && !l.isCSS && (l.play(), c = () => {
2319
- l.ready.then(() => {
2320
- l.cancel();
2368
+ a && !a.isCSS && (a.play(), l = () => {
2369
+ a.ready.then(() => {
2370
+ a.cancel();
2321
2371
  });
2322
2372
  });
2323
2373
  } else {
2324
- const l = wt(t, a, r);
2325
- if (l) {
2326
- const f = Array.isArray(l) ? l : [l], d = new zs({
2374
+ const a = bt(t, c, r);
2375
+ if (a) {
2376
+ const f = Array.isArray(a) ? a : [a], d = new Vs({
2327
2377
  viewSource: e,
2328
2378
  scenes: f,
2329
2379
  observeViewportEntry: !1,
2330
2380
  observeViewportResize: !1,
2331
2381
  observeSourcesResize: !0,
2332
2382
  root: document.body,
2333
- ...Rt()
2383
+ ...zt()
2334
2384
  });
2335
- c = () => {
2385
+ l = () => {
2336
2386
  d.destroy();
2337
2387
  }, Promise.all(f.map((h) => h.ready || Promise.resolve())).then(
2338
2388
  () => {
@@ -2341,22 +2391,22 @@ function Ds(e, t, n, s, { reducedMotion: i, selectorCondition: o }) {
2341
2391
  );
2342
2392
  }
2343
2393
  }
2344
- if (!c) return;
2345
- const u = { source: e, target: t, cleanup: c };
2346
- k(qe, e, u), k(qe, t, u);
2394
+ if (!l) return;
2395
+ const u = { source: e, target: t, cleanup: l };
2396
+ k(Le, e, u), k(Le, t, u);
2347
2397
  }
2348
- function Gs(e) {
2349
- se(qe, e);
2398
+ function Bs(e) {
2399
+ oe(Le, e);
2350
2400
  }
2351
- const Ws = {
2352
- add: Ds,
2353
- remove: Gs,
2354
- registerOptionsGetter: Hs
2401
+ const Us = {
2402
+ add: Ys,
2403
+ remove: Bs,
2404
+ registerOptionsGetter: Ks
2355
2405
  };
2356
- function Je(e, t, n) {
2406
+ function nt(e, t, n) {
2357
2407
  return Math.min(Math.max(e, n), t);
2358
2408
  }
2359
- function et(e) {
2409
+ function st(e) {
2360
2410
  let t = !1;
2361
2411
  return function() {
2362
2412
  if (!t)
@@ -2365,7 +2415,7 @@ function et(e) {
2365
2415
  });
2366
2416
  };
2367
2417
  }
2368
- function Vs(e) {
2418
+ function Qs(e) {
2369
2419
  let t = e, n = 0, s = 0;
2370
2420
  if (t.offsetParent)
2371
2421
  do
@@ -2378,7 +2428,7 @@ function Vs(e) {
2378
2428
  height: e.offsetHeight
2379
2429
  };
2380
2430
  }
2381
- function Ks() {
2431
+ function Xs() {
2382
2432
  const e = window.devicePixelRatio;
2383
2433
  let t = !1;
2384
2434
  if (e === 1)
@@ -2391,13 +2441,13 @@ function Ks() {
2391
2441
  });
2392
2442
  return document.body.dispatchEvent(n), t;
2393
2443
  }
2394
- function Ys() {
2444
+ function Zs() {
2395
2445
  return new Promise((e) => {
2396
2446
  const t = window.scrollY;
2397
2447
  let n = !1, s;
2398
2448
  function i() {
2399
- document.body.addEventListener("pointerdown", (a) => {
2400
- s === void 0 ? s = a.offsetY : n = a.offsetY === s;
2449
+ document.body.addEventListener("pointerdown", (c) => {
2450
+ s === void 0 ? s = c.offsetY : n = c.offsetY === s;
2401
2451
  }, { once: !0 });
2402
2452
  const r = new PointerEvent("pointerdown", {
2403
2453
  clientY: 500
@@ -2410,60 +2460,60 @@ function Ys() {
2410
2460
  i(), window.addEventListener("scroll", o), window.scrollY > 0 && window.scrollBy(0, -1);
2411
2461
  });
2412
2462
  }
2413
- function Bs(e) {
2414
- Ys().then((t) => {
2463
+ function Js(e) {
2464
+ Zs().then((t) => {
2415
2465
  e.fixRequired = t, t && (window.addEventListener("scroll", e.scrollHandler), e.scrollHandler());
2416
2466
  });
2417
2467
  }
2418
- let ae = 0;
2419
- const he = /* @__PURE__ */ new Set();
2420
- function Us() {
2468
+ let le = 0;
2469
+ const pe = /* @__PURE__ */ new Set();
2470
+ function ei() {
2421
2471
  const e = (n) => {
2422
2472
  for (let s of n.changedTouches)
2423
- he.add(s.identifier);
2473
+ pe.add(s.identifier);
2424
2474
  }, t = (n) => {
2425
2475
  for (let s of n.changedTouches)
2426
- he.delete(s.identifier);
2476
+ pe.delete(s.identifier);
2427
2477
  };
2428
2478
  return document.addEventListener("touchstart", e, { passive: !0 }), document.addEventListener("touchend", t, { passive: !0 }), function() {
2429
- he.clear(), document.removeEventListener("touchstart", e), document.removeEventListener("touchend", t);
2479
+ pe.clear(), document.removeEventListener("touchstart", e), document.removeEventListener("touchend", t);
2430
2480
  };
2431
2481
  }
2432
- function Qs(e, t) {
2482
+ function ti(e, t) {
2433
2483
  if ("onscrollend" in window)
2434
2484
  return e.addEventListener("scrollend", t), function() {
2435
2485
  e.removeEventListener("scrollend", t);
2436
2486
  };
2437
2487
  let n = 0, s;
2438
- ae || (s = Us()), ae += 1;
2488
+ le || (s = ei()), le += 1;
2439
2489
  function i(o) {
2440
2490
  clearTimeout(n), n = setTimeout(() => {
2441
- he.size ? setTimeout(i, 100) : (t(o), n = 0);
2491
+ pe.size ? setTimeout(i, 100) : (t(o), n = 0);
2442
2492
  }, 100);
2443
2493
  }
2444
2494
  return e.addEventListener("scroll", i), function() {
2445
- e.removeEventListener("scroll", i), ae -= 1, ae || s();
2495
+ e.removeEventListener("scroll", i), le -= 1, le || s();
2446
2496
  };
2447
2497
  }
2448
- function Xs(e, t, n) {
2498
+ function ni(e, t, n) {
2449
2499
  return {
2450
2500
  x(s) {
2451
- const i = e.left - n.x + e.width / 2, o = i >= t.width / 2, r = (o ? i : t.width - i) * 2, a = o ? 0 : i - r / 2;
2452
- return (s - a) / r;
2501
+ const i = e.left - n.x + e.width / 2, o = i >= t.width / 2, r = (o ? i : t.width - i) * 2, c = o ? 0 : i - r / 2;
2502
+ return (s - c) / r;
2453
2503
  },
2454
2504
  y(s) {
2455
- const i = e.top - n.y + e.height / 2, o = i >= t.height / 2, r = (o ? i : t.height - i) * 2, a = o ? 0 : i - r / 2;
2456
- return (s - a) / r;
2505
+ const i = e.top - n.y + e.height / 2, o = i >= t.height / 2, r = (o ? i : t.height - i) * 2, c = o ? 0 : i - r / 2;
2506
+ return (s - c) / r;
2457
2507
  }
2458
2508
  };
2459
2509
  }
2460
- function Zs(e, t) {
2510
+ function si(e, t) {
2461
2511
  this.x = window.scrollX, this.y = window.scrollY, requestAnimationFrame(() => e && e(t));
2462
2512
  }
2463
- function Js(e) {
2513
+ function ii(e) {
2464
2514
  e.rect.width = window.document.documentElement.clientWidth, e.rect.height = window.document.documentElement.clientHeight;
2465
2515
  }
2466
- function ei(e) {
2516
+ function oi(e) {
2467
2517
  const t = new ResizeObserver((n) => {
2468
2518
  n.forEach((s) => {
2469
2519
  e.rect.width = s.borderBoxSize[0].inlineSize, e.rect.height = s.borderBoxSize[0].blockSize;
@@ -2471,38 +2521,38 @@ function ei(e) {
2471
2521
  });
2472
2522
  return t.observe(e.root, { box: "border-box" }), t;
2473
2523
  }
2474
- function ti(e) {
2475
- let t = !1, n = { x: e.rect.width / 2, y: e.rect.height / 2, vx: 0, vy: 0 }, s, i, o, r, a;
2476
- const c = { x: 0, y: 0 };
2477
- e.scenes.forEach((l) => {
2478
- l.target && l.centeredToTarget && (l.transform = Xs(Vs(l.target), e.rect, c), t = !0), e.root ? i = ei(e) : (o = Js.bind(null, e), window.addEventListener("resize", o));
2479
- }), s = function(l) {
2524
+ function ri(e) {
2525
+ let t = !1, n = { x: e.rect.width / 2, y: e.rect.height / 2, vx: 0, vy: 0 }, s, i, o, r, c;
2526
+ const l = { x: 0, y: 0 };
2527
+ e.scenes.forEach((a) => {
2528
+ a.target && a.centeredToTarget && (a.transform = ni(Qs(a.target), e.rect, l), t = !0), e.root ? i = oi(e) : (o = ii.bind(null, e), window.addEventListener("resize", o));
2529
+ }), s = function(a) {
2480
2530
  for (let f of e.scenes)
2481
2531
  if (!f.disabled) {
2482
- const d = f.transform?.x(l.x) || l.x / e.rect.width, h = f.transform?.y(l.y) || l.y / e.rect.height, m = +Je(0, 1, d).toPrecision(4), p = +Je(0, 1, h).toPrecision(4), v = { x: l.vx, y: l.vy };
2483
- e.allowActiveEvent && (l.active = d <= 1 && h <= 1 && d >= 0 && h >= 0), f.effect(f, { x: m, y: p }, v, l.active);
2532
+ const d = f.transform?.x(a.x) || a.x / e.rect.width, h = f.transform?.y(a.y) || a.y / e.rect.height, m = +nt(0, 1, d).toPrecision(4), p = +nt(0, 1, h).toPrecision(4), g = { x: a.vx, y: a.vy };
2533
+ e.allowActiveEvent && (a.active = d <= 1 && h <= 1 && d >= 0 && h >= 0), f.effect(f, { x: m, y: p }, g, a.active);
2484
2534
  }
2485
- Object.assign(n, l);
2486
- }, t && (r = Zs.bind(c, s, n), a = Qs(document, r));
2535
+ Object.assign(n, a);
2536
+ }, t && (r = si.bind(l, s, n), c = ti(document, r));
2487
2537
  function u() {
2488
- e.scenes.forEach((l) => l.destroy?.()), a?.(), i ? (i.disconnect(), i = null) : (window.removeEventListener("resize", o), o = null), s = null, n = null;
2538
+ e.scenes.forEach((a) => a.destroy?.()), c?.(), i ? (i.disconnect(), i = null) : (window.removeEventListener("resize", o), o = null), s = null, n = null;
2489
2539
  }
2490
2540
  return {
2491
2541
  tick: s,
2492
2542
  destroy: u
2493
2543
  };
2494
2544
  }
2495
- const ni = 1e3 / 60 * 3;
2496
- let ce;
2497
- function si() {
2545
+ const ai = 1e3 / 60 * 3;
2546
+ let ue;
2547
+ function ci() {
2498
2548
  D.x = window.scrollX, D.y = window.scrollY;
2499
2549
  }
2500
- const D = { x: 0, y: 0, scrollHandler: si, fixRequired: void 0 };
2501
- class ii {
2550
+ const D = { x: 0, y: 0, scrollHandler: ci, fixRequired: void 0 };
2551
+ class li {
2502
2552
  constructor(t = {}) {
2503
2553
  this.config = { ...t }, this.effect = null, this._nextTick = null, this._nextTransitionTick = null, this._startTime = 0;
2504
2554
  let n;
2505
- this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() : et(() => this.transition()) : n = this.config.noThrottle ? () => (this.tick(), null) : et(() => {
2555
+ this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() : st(() => this.transition()) : n = this.config.noThrottle ? () => (this.tick(), null) : st(() => {
2506
2556
  this.tick();
2507
2557
  }), this.config.rect = this.config.root ? {
2508
2558
  width: this.config.root.offsetWidth,
@@ -2525,9 +2575,9 @@ class ii {
2525
2575
  }, this._pointerEnter = () => {
2526
2576
  this.progress.active = !0, this._nextTick = n();
2527
2577
  }, this.config.root) {
2528
- ce = typeof ce == "boolean" ? ce : Ks();
2529
- const i = ce ? window.devicePixelRatio : 1;
2530
- typeof D.fixRequired > "u" && Bs(D), this._measure = (o) => {
2578
+ ue = typeof ue == "boolean" ? ue : Xs();
2579
+ const i = ue ? window.devicePixelRatio : 1;
2580
+ typeof D.fixRequired > "u" && Js(D), this._measure = (o) => {
2531
2581
  if (o.target !== this.config.root) {
2532
2582
  const r = new PointerEvent("pointermove", {
2533
2583
  bubbles: !0,
@@ -2569,8 +2619,8 @@ class ii {
2569
2619
  const t = this.config.transitionDuration, n = this.config.transitionEasing || ((r) => r), s = performance.now();
2570
2620
  let i = !1;
2571
2621
  const o = (r) => {
2572
- const a = (r - this._startTime) / t, c = n(Math.min(1, a));
2573
- i && (this.progress.vx = 0, this.progress.vy = 0, i = !1), this.currentProgress = Object.entries(this.progress).reduce((u, [l, f]) => (l === "active" ? u[l] = f : u[l] = this.previousProgress[l] + (f - this.previousProgress[l]) * c, u), this.currentProgress || {}), a < 1 && (this._nextTransitionTick = requestAnimationFrame(o), i = r - this._startTime > ni), this.effect.tick(this.currentProgress);
2622
+ const c = (r - this._startTime) / t, l = n(Math.min(1, c));
2623
+ i && (this.progress.vx = 0, this.progress.vy = 0, i = !1), this.currentProgress = Object.entries(this.progress).reduce((u, [a, f]) => (a === "active" ? u[a] = f : u[a] = this.previousProgress[a] + (f - this.previousProgress[a]) * l, u), this.currentProgress || {}), c < 1 && (this._nextTransitionTick = requestAnimationFrame(o), i = r - this._startTime > ai), this.effect.tick(this.currentProgress);
2574
2624
  };
2575
2625
  return this._startTime ? (this._nextTransitionTick && cancelAnimationFrame(this._nextTransitionTick), Object.assign(this.previousProgress, this.currentProgress), this._startTime = s, o(s)) : this._startTime = s, this._nextTransitionTick;
2576
2626
  }
@@ -2599,7 +2649,7 @@ class ii {
2599
2649
  * Reset registered effect.
2600
2650
  */
2601
2651
  setupEffect() {
2602
- this.removeEffect(), this.effect = ti(this.config);
2652
+ this.removeEffect(), this.effect = ri(this.config);
2603
2653
  }
2604
2654
  /**
2605
2655
  * Remove registered effect.
@@ -2608,98 +2658,105 @@ class ii {
2608
2658
  this.effect && this.effect.destroy(), this.effect = null;
2609
2659
  }
2610
2660
  }
2611
- const Pe = /* @__PURE__ */ new WeakMap();
2612
- let Nt = () => ({});
2613
- function oi(e) {
2614
- Nt = e;
2661
+ const Fe = /* @__PURE__ */ new WeakMap();
2662
+ let Dt = () => ({});
2663
+ function ui(e) {
2664
+ Dt = e;
2615
2665
  }
2616
- function ri(e, t, n, s = {}, { reducedMotion: i, selectorCondition: o }) {
2666
+ function fi(e) {
2667
+ return !("keyframeEffect" in e || "customEffect" in e) || !e.transitionDuration ? {} : {
2668
+ transitionDuration: e.transitionDuration,
2669
+ transitionEasing: De(e.transitionEasing)
2670
+ };
2671
+ }
2672
+ function di(e, t, n, s = {}, { reducedMotion: i, selectorCondition: o }) {
2617
2673
  if (i || o && !t.matches(o)) return;
2618
2674
  const r = {
2619
2675
  trigger: "pointer-move",
2620
2676
  element: e,
2621
2677
  axis: s.axis ?? "y"
2622
- }, a = wt(t, F(n), r);
2623
- if (a) {
2624
- const c = Array.isArray(a) ? a : [a], u = new ii({
2678
+ }, c = bt(t, x(n), r);
2679
+ if (c) {
2680
+ const l = Array.isArray(c) ? c : [c], u = new li({
2625
2681
  root: s.hitArea === "self" ? e : void 0,
2626
- scenes: c,
2627
- ...Nt()
2682
+ scenes: l,
2683
+ ...Dt(),
2684
+ ...fi(n)
2628
2685
  }), f = { source: e, target: t, cleanup: () => {
2629
2686
  u.destroy();
2630
2687
  } };
2631
- k(Pe, e, f), k(Pe, t, f), Promise.all(
2632
- c.map((d) => d.ready || Promise.resolve())
2688
+ k(Fe, e, f), k(Fe, t, f), Promise.all(
2689
+ l.map((d) => d.ready || Promise.resolve())
2633
2690
  ).then(() => {
2634
2691
  u.start();
2635
2692
  });
2636
2693
  }
2637
2694
  }
2638
- function ai(e) {
2639
- se(Pe, e);
2695
+ function hi(e) {
2696
+ oe(Fe, e);
2640
2697
  }
2641
- const ci = {
2642
- add: ri,
2643
- remove: ai,
2644
- registerOptionsGetter: oi
2645
- }, Le = /* @__PURE__ */ new WeakMap();
2646
- function li(e, t, n, s, {
2698
+ const mi = {
2699
+ add: di,
2700
+ remove: hi,
2701
+ registerOptionsGetter: ui
2702
+ }, Re = /* @__PURE__ */ new WeakMap();
2703
+ function pi(e, t, n, s, {
2647
2704
  reducedMotion: i,
2648
2705
  selectorCondition: o,
2649
2706
  animation: r,
2650
- sourceAnimationOptions: a
2707
+ sourceAnimationOptions: c
2651
2708
  }) {
2652
- const c = r || te(
2709
+ const l = r || se(
2653
2710
  t,
2654
- F(n),
2711
+ x(n),
2655
2712
  void 0,
2656
2713
  i
2657
2714
  );
2658
- if (!c)
2715
+ if (!l)
2659
2716
  return;
2660
- const { effectId: u } = s, l = (h) => {
2717
+ const { effectId: u } = s, a = (h) => {
2661
2718
  if (o && !t.matches(o)) return;
2662
- const m = h.animationName, p = h.detail?.effectId, v = a ? Et(e, a) : null;
2663
- if (v) {
2664
- if (v.playState === "running" || m && !v.hasAnimationName(m))
2719
+ const m = h.animationName, p = h.detail?.effectId, g = c ? $t(e, c) : null;
2720
+ if (g) {
2721
+ if (g.playState === "running" || m && !g.hasAnimationName(m))
2665
2722
  return;
2666
- if (p && p !== u && !v.hasAnimationId(p))
2723
+ if (p && p !== u && !g.hasAnimationId(p))
2667
2724
  return;
2668
2725
  }
2669
- c.play();
2726
+ l.play();
2670
2727
  }, d = { source: e, target: t, cleanup: () => {
2671
- c.cancel(), e.removeEventListener("animationend", l);
2728
+ l.cancel(), e.removeEventListener("animationend", a);
2672
2729
  } };
2673
- k(Le, e, d), k(Le, t, d), e.addEventListener("animationend", l);
2730
+ k(Re, e, d), k(Re, t, d), e.addEventListener("animationend", a);
2674
2731
  }
2675
- function ui(e) {
2676
- se(Le, e);
2732
+ function gi(e) {
2733
+ oe(Re, e);
2677
2734
  }
2678
- const fi = {
2679
- add: li,
2680
- remove: ui
2735
+ const vi = {
2736
+ add: pi,
2737
+ remove: gi
2681
2738
  };
2682
- function di(e, t, n = !1, s, i, o) {
2683
- const r = o || te(
2739
+ function yi(e, t, n = !1, s, i, o) {
2740
+ const r = o || se(
2684
2741
  e,
2685
- F(t),
2742
+ x(t),
2686
2743
  void 0,
2687
2744
  n
2688
2745
  );
2689
2746
  if (!r)
2690
2747
  return null;
2691
- let a = !0;
2692
- const c = t.triggerType || "alternate";
2748
+ let c = !0;
2749
+ const l = t.triggerType || "alternate";
2693
2750
  return (u) => {
2694
2751
  if (s && !e.matches(s)) return;
2695
- const l = !i, f = i?.enter?.includes(u.type), d = i?.leave?.includes(u.type);
2696
- if (f || l) {
2697
- if (c === "alternate" || c === "state")
2698
- a ? (a = !1, r.play()) : c === "alternate" ? r.reverse() : c === "state" && (r.playState === "running" ? r.pause() : r.playState !== "finished" && r.play());
2752
+ const a = !i, f = i?.enter?.includes(u.type), d = i?.leave?.includes(u.type);
2753
+ if (f || a) {
2754
+ if (l === "alternate" || l === "state")
2755
+ c ? (c = !1, r.play()) : l === "alternate" ? r.reverse() : l === "state" && (r.playState === "running" ? r.pause() : r.playState !== "finished" && r.play());
2699
2756
  else {
2700
2757
  if (r.progress(0), delete e.dataset.interactEnter, r.isCSS) {
2701
2758
  const h = () => {
2702
- O.mutate(() => {
2759
+ A.mutate(() => {
2703
2760
  e.dataset.interactEnter = "done";
2704
2761
  });
2705
2762
  };
@@ -2709,113 +2766,113 @@ function di(e, t, n = !1, s, i, o) {
2709
2766
  }
2710
2767
  return;
2711
2768
  }
2712
- d && (c === "alternate" ? r.reverse() : c === "repeat" ? (r.cancel(), O.mutate(() => {
2769
+ d && (l === "alternate" ? r.reverse() : l === "repeat" ? (r.cancel(), A.mutate(() => {
2713
2770
  delete e.dataset.interactEnter;
2714
- })) : c === "state" && r.playState === "running" && r.pause());
2771
+ })) : l === "state" && r.playState === "running" && r.pause());
2715
2772
  };
2716
2773
  }
2717
- function hi(e, t, {
2774
+ function Ei(e, t, {
2718
2775
  effectId: n,
2719
2776
  listContainer: s,
2720
2777
  listItemSelector: i,
2721
2778
  stateAction: o
2722
- }, r, a) {
2723
- const c = !!s, u = o ?? "toggle", l = u === "toggle";
2779
+ }, r, c) {
2780
+ const l = !!s, u = o ?? "toggle", a = u === "toggle";
2724
2781
  return (f) => {
2725
2782
  if (r && !e.matches(r)) return;
2726
- const d = c ? e.closest(
2783
+ const d = l ? e.closest(
2727
2784
  `${s} > ${i || ""}:has(:scope)`
2728
- ) : void 0, h = !a, m = a?.enter?.includes(f.type), p = a?.leave?.includes(f.type);
2729
- h ? t.toggleEffect(n, u, d) : (m && t.toggleEffect(n, l ? "add" : u, d), p && l && t.toggleEffect(n, "remove", d));
2785
+ ) : void 0, h = !c, m = c?.enter?.includes(f.type), p = c?.leave?.includes(f.type);
2786
+ h ? t.toggleEffect(n, u, d) : (m && t.toggleEffect(n, a ? "add" : u, d), p && a && t.toggleEffect(n, "remove", d));
2730
2787
  };
2731
2788
  }
2732
2789
  const xe = /* @__PURE__ */ new WeakMap();
2733
- function tt(e, t) {
2790
+ function it(e, t) {
2734
2791
  return (n) => {
2735
2792
  const s = n;
2736
2793
  e.contains(s.relatedTarget) || t(s);
2737
2794
  };
2738
2795
  }
2739
- function mi(e) {
2796
+ function wi(e) {
2740
2797
  return (t) => {
2741
2798
  const n = t;
2742
- n.pointerType && e(n);
2799
+ (n.pointerType || n.detail > 0) && e(n);
2743
2800
  };
2744
2801
  }
2745
- function pi(e) {
2802
+ function $i(e) {
2746
2803
  return (t) => {
2747
2804
  const n = t;
2748
2805
  n.code === "Space" ? (n.preventDefault(), e(n)) : n.code === "Enter" && e(n);
2749
2806
  };
2750
2807
  }
2751
- const gi = {
2752
- focusin: (e, t) => tt(e, t),
2753
- focusout: (e, t) => tt(e, t),
2754
- click: (e, t) => mi(t),
2755
- keydown: (e, t) => pi(t)
2808
+ const bi = {
2809
+ focusin: (e, t) => it(e, t),
2810
+ focusout: (e, t) => it(e, t),
2811
+ click: (e, t) => wi(t),
2812
+ keydown: (e, t) => $i(t)
2756
2813
  };
2757
- function vi(e, t, n) {
2758
- const s = gi[e];
2814
+ function Si(e, t, n) {
2815
+ const s = bi[e];
2759
2816
  return s ? s(t, n) : (i) => n(i);
2760
2817
  }
2761
- function yi(e) {
2818
+ function Ii(e) {
2762
2819
  return typeof e == "object" && !Array.isArray(e) && ("enter" in e || "leave" in e);
2763
2820
  }
2764
- function Ei(e) {
2821
+ function Ti(e) {
2765
2822
  if (typeof e == "string")
2766
2823
  return { toggle: [e] };
2767
2824
  if (Array.isArray(e))
2768
2825
  return { toggle: [...e] };
2769
- if (yi(e)) {
2826
+ if (Ii(e)) {
2770
2827
  const t = e.enter ? [...e.enter] : [], n = e.leave ? [...e.leave] : [];
2771
2828
  return { enter: t, leave: n };
2772
2829
  }
2773
2830
  return {};
2774
2831
  }
2775
- function wi(e) {
2832
+ function Ci(e) {
2776
2833
  return !!(e.enter?.length || e.leave?.length);
2777
2834
  }
2778
- function $i(e) {
2779
- return wi(e) ? { enter: e.enter ?? [], leave: e.leave ?? [] } : void 0;
2835
+ function Oi(e) {
2836
+ return Ci(e) ? { enter: e.enter ?? [], leave: e.leave ?? [] } : void 0;
2780
2837
  }
2781
- function bi(e, t, n, s, {
2838
+ function _i(e, t, n, s, {
2782
2839
  reducedMotion: i,
2783
2840
  targetController: o,
2784
2841
  selectorCondition: r,
2785
- animation: a
2842
+ animation: c
2786
2843
  }) {
2787
- const c = Ei(s.eventConfig), u = n.transition || n.transitionProperties, l = $i(c);
2844
+ const l = Ti(s.eventConfig), u = n.transition || n.transitionProperties, a = Oi(l);
2788
2845
  let f, d = !1;
2789
- if (u ? f = hi(
2846
+ if (u ? f = Ei(
2790
2847
  t,
2791
2848
  o,
2792
2849
  n,
2793
2850
  r,
2794
- l
2795
- ) : (f = di(
2851
+ a
2852
+ ) : (f = yi(
2796
2853
  t,
2797
2854
  n,
2798
2855
  i,
2799
2856
  r,
2800
- l,
2801
- a
2857
+ a,
2858
+ c
2802
2859
  ), d = n.triggerType === "once"), !f)
2803
2860
  return;
2804
2861
  const h = f, m = new AbortController();
2805
- function p(g, E, w) {
2806
- const b = vi(E, e, h);
2807
- g.addEventListener(E, b, { ...w, signal: m.signal });
2862
+ function p(y, v, w) {
2863
+ const b = Si(v, e, h);
2864
+ y.addEventListener(v, b, { ...w, signal: m.signal });
2808
2865
  }
2809
- const y = { source: e, target: t, cleanup: () => {
2866
+ const E = { source: e, target: t, cleanup: () => {
2810
2867
  m.abort();
2811
2868
  } };
2812
- if (k(xe, e, y), k(xe, t, y), l) {
2813
- const g = c.enter, E = c.leave;
2814
- g.forEach((S) => {
2869
+ if (k(xe, e, E), k(xe, t, E), a) {
2870
+ const y = l.enter, v = l.leave;
2871
+ y.forEach((S) => {
2815
2872
  S === "focusin" && (e.tabIndex = 0), p(e, S, { passive: !0, once: d });
2816
2873
  });
2817
2874
  const w = !n.stateAction || n.stateAction === "toggle";
2818
- (u ? w : n.triggerType !== "once") && E.forEach((S) => {
2875
+ (u ? w : n.triggerType !== "once") && v.forEach((S) => {
2819
2876
  if (S === "focusout") {
2820
2877
  p(e, S, { once: d });
2821
2878
  return;
@@ -2823,17 +2880,17 @@ function bi(e, t, n, s, {
2823
2880
  p(e, S, { passive: !0 });
2824
2881
  });
2825
2882
  } else
2826
- (c.toggle ?? []).forEach((E) => {
2827
- p(e, E, { once: d, passive: E !== "keydown" });
2883
+ (l.toggle ?? []).forEach((v) => {
2884
+ p(e, v, { once: d, passive: v !== "keydown" });
2828
2885
  });
2829
2886
  }
2830
- function Si(e) {
2831
- se(xe, e);
2887
+ function Ai(e) {
2888
+ oe(xe, e);
2832
2889
  }
2833
- const U = {
2834
- add: bi,
2835
- remove: Si
2836
- }, Fe = {
2890
+ const Q = {
2891
+ add: _i,
2892
+ remove: Ai
2893
+ }, Ne = {
2837
2894
  click: ["click"],
2838
2895
  activate: ["click", "keydown"],
2839
2896
  hover: { enter: ["mouseenter"], leave: ["mouseleave"] },
@@ -2841,40 +2898,40 @@ const U = {
2841
2898
  enter: ["mouseenter", "focusin"],
2842
2899
  leave: ["mouseleave", "focusout"]
2843
2900
  }
2844
- }, nt = {
2845
- click: Fe.activate,
2846
- hover: Fe.interest
2901
+ }, ot = {
2902
+ click: Ne.activate,
2903
+ hover: Ne.interest
2847
2904
  };
2848
- function le(e) {
2849
- const t = Fe[e];
2905
+ function fe(e) {
2906
+ const t = Ne[e];
2850
2907
  return (n, s, i, o, r) => {
2851
- const a = r?.allowA11yTriggers && e in nt ? nt[e] : t;
2852
- U.add(n, s, i, { eventConfig: a }, r ?? {});
2908
+ const c = r?.allowA11yTriggers && e in ot ? ot[e] : t;
2909
+ Q.add(n, s, i, { eventConfig: c }, r ?? {});
2853
2910
  };
2854
2911
  }
2855
- const G = {
2856
- viewEnter: Is,
2912
+ const H = {
2913
+ viewEnter: As,
2857
2914
  hover: {
2858
- add: le("hover"),
2859
- remove: U.remove
2915
+ add: fe("hover"),
2916
+ remove: Q.remove
2860
2917
  },
2861
2918
  click: {
2862
- add: le("click"),
2863
- remove: U.remove
2919
+ add: fe("click"),
2920
+ remove: Q.remove
2864
2921
  },
2865
- animationEnd: fi,
2866
- viewProgress: Ws,
2867
- pointerMove: ci,
2922
+ animationEnd: vi,
2923
+ viewProgress: Us,
2924
+ pointerMove: mi,
2868
2925
  activate: {
2869
- add: le("activate"),
2870
- remove: U.remove
2926
+ add: fe("activate"),
2927
+ remove: Q.remove
2871
2928
  },
2872
2929
  interest: {
2873
- add: le("interest"),
2874
- remove: U.remove
2930
+ add: fe("interest"),
2931
+ remove: Q.remove
2875
2932
  }
2876
2933
  };
2877
- function Ii(e) {
2934
+ function Mi(e) {
2878
2935
  return e.replace(/\[[^\]]+]/g, "[]");
2879
2936
  }
2880
2937
  class $ {
@@ -2898,7 +2955,7 @@ class $ {
2898
2955
  if (typeof window > "u" || !window.customElements)
2899
2956
  return;
2900
2957
  const s = n?.useCustomElement ?? !!$.defineInteractElement;
2901
- this.dataCache = Oi(t, s);
2958
+ this.dataCache = Pi(t, s, n?.configIndex);
2902
2959
  const i = $.defineInteractElement?.();
2903
2960
  s && i === !1 ? document.querySelectorAll("interact-element").forEach((o) => {
2904
2961
  o.connect();
@@ -2924,7 +2981,7 @@ class $ {
2924
2981
  return !!this.get(t);
2925
2982
  }
2926
2983
  get(t) {
2927
- const n = Ii(t);
2984
+ const n = Mi(t);
2928
2985
  return this.dataCache.interactions[n];
2929
2986
  }
2930
2987
  clearMediaQueryListenersForKey(t) {
@@ -2957,11 +3014,11 @@ class $ {
2957
3014
  }), $.instances.length = 0, $.controllerCache.clear(), $.sequenceCache.clear(), $.elementSequenceMap = /* @__PURE__ */ new WeakMap();
2958
3015
  }
2959
3016
  static setup(t) {
2960
- t.scrollOptionsGetter && G.viewProgress.registerOptionsGetter?.(
3017
+ t.scrollOptionsGetter && H.viewProgress.registerOptionsGetter?.(
2961
3018
  t.scrollOptionsGetter
2962
- ), t.pointerOptionsGetter && G.pointerMove.registerOptionsGetter?.(
3019
+ ), t.pointerOptionsGetter && H.pointerMove.registerOptionsGetter?.(
2963
3020
  t.pointerOptionsGetter
2964
- ), t.viewEnter && G.viewEnter.setOptions(
3021
+ ), t.viewEnter && H.viewEnter.setOptions(
2965
3022
  t.viewEnter
2966
3023
  ), t.allowA11yTriggers !== void 0 && ($.allowA11yTriggers = t.allowA11yTriggers);
2967
3024
  }
@@ -2979,8 +3036,8 @@ class $ {
2979
3036
  static deleteController(t) {
2980
3037
  $.controllerCache.delete(t);
2981
3038
  }
2982
- static registerEffects = xn;
2983
- static getRegisteredEffect = je;
3039
+ static registerEffects = Nn;
3040
+ static getRegisteredEffect = He;
2984
3041
  /**
2985
3042
  * Registers a plugin under a name. When the config carries a plugin field (e.g. `$splitText`) with a matching key
2986
3043
  * (on an interaction or effect), Interact invokes the plugin with the field's value and a
@@ -2998,17 +3055,17 @@ class $ {
2998
3055
  static getSequence(t, n, s, i) {
2999
3056
  const o = $.sequenceCache.get(t);
3000
3057
  if (o) return o;
3001
- const r = Gn(n, s, i);
3058
+ const r = Kn(n, s, i);
3002
3059
  return $.sequenceCache.set(t, r), $._registerSequenceElements(s, r), r;
3003
3060
  }
3004
3061
  static addToSequence(t, n, s, i) {
3005
3062
  const o = $.sequenceCache.get(t);
3006
3063
  if (!o) return !1;
3007
- const a = $t(n, i).map((c, u) => ({
3064
+ const c = St(n, i).map((l, u) => ({
3008
3065
  index: s[u] ?? o.animationGroups.length,
3009
- group: c
3066
+ group: l
3010
3067
  }));
3011
- return o.addGroups(a), $._registerSequenceElements(n, o), !0;
3068
+ return o.addGroups(c), $._registerSequenceElements(n, o), !0;
3012
3069
  }
3013
3070
  static _registerSequenceElements(t, n) {
3014
3071
  for (const { target: s } of t) {
@@ -3032,8 +3089,8 @@ class $ {
3032
3089
  }
3033
3090
  }
3034
3091
  }
3035
- let Ti = 0;
3036
- function W(e, {
3092
+ let ki = 0;
3093
+ function G(e, {
3037
3094
  asCombinator: t = !1,
3038
3095
  addItemFilter: n = !1,
3039
3096
  useFirstChild: s = !1
@@ -3045,10 +3102,10 @@ function W(e, {
3045
3102
  return e.selector;
3046
3103
  return s ? t ? "> :first-child" : ":scope > :first-child" : "";
3047
3104
  }
3048
- function st(e) {
3105
+ function rt(e) {
3049
3106
  return "sequenceId" in e && !("effects" in e);
3050
3107
  }
3051
- function Ce(e, t) {
3108
+ function _e(e, t) {
3052
3109
  return e[t] || (e[t] = {
3053
3110
  triggers: [],
3054
3111
  effects: {},
@@ -3057,7 +3114,7 @@ function Ce(e, t) {
3057
3114
  selectors: /* @__PURE__ */ new Set()
3058
3115
  }), e[t];
3059
3116
  }
3060
- function Ci(e, t, n) {
3117
+ function qi(e, t, n) {
3061
3118
  const { effects: s = [] } = e;
3062
3119
  return s.some((i, o) => n.has(t(o))) ? {
3063
3120
  ...e,
@@ -3067,93 +3124,101 @@ function Ci(e, t, n) {
3067
3124
  })
3068
3125
  } : e;
3069
3126
  }
3070
- function Oi(e, t = !1) {
3071
- const { effects: n = {}, sequences: s = {}, conditions: i = {} } = e, o = {}, r = e.interactions ? qt(e) : /* @__PURE__ */ new Map();
3072
- return e.interactions?.forEach((a, c) => {
3073
- const u = a.key, l = ++Ti, { effects: f, sequences: d, ...h } = a;
3074
- if (!u) {
3075
- console.error(`Interaction ${l} is missing a key for source element.`);
3127
+ function Pi(e, t = !1, n) {
3128
+ const { effects: s = {}, sequences: i = {}, conditions: o = {} } = e, r = {}, c = e.interactions ? Ft(e, n) : /* @__PURE__ */ new Map();
3129
+ return e.interactions?.forEach((l, u) => {
3130
+ const a = l.key, f = ++ki, { effects: d, sequences: h, ...m } = l;
3131
+ if (!a) {
3132
+ console.error(`Interaction ${f} is missing a key for source element.`);
3076
3133
  return;
3077
3134
  }
3078
- Ce(o, u);
3079
- const m = f ? Array.from(f) : [];
3080
- m.reverse();
3081
- const p = d?.map((g, E) => {
3082
- if (st(g)) {
3083
- const b = s[g.sequenceId];
3084
- return b ? { ...b, ...g } : (console.warn(`Interact: Sequence "${g.sequenceId}" not found in config`), g);
3135
+ _e(r, a);
3136
+ const p = d ? Array.from(d) : [];
3137
+ p.reverse();
3138
+ const g = h?.map((v, w) => {
3139
+ if (rt(v)) {
3140
+ const S = i[v.sequenceId];
3141
+ return S ? { ...S, ...v } : (console.warn(`Interact: Sequence "${v.sequenceId}" not found in config`), v);
3085
3142
  }
3086
- const w = g;
3087
- return w.sequenceId || (w.sequenceId = `seq-${c}-${E}`), w;
3088
- }), v = {
3089
- ...h,
3090
- effects: m.length > 0 ? m : void 0,
3091
- sequences: p?.map(
3092
- (g, E) => Ci(g, (w) => pe(c, w, E), r)
3143
+ const b = v;
3144
+ return b.sequenceId || (b.sequenceId = X("seq", [u, w], n)), b;
3145
+ }), E = {
3146
+ ...m,
3147
+ effects: p.length > 0 ? p : void 0,
3148
+ sequences: g?.map(
3149
+ (v, w) => qi(
3150
+ v,
3151
+ (b) => ve(u, b, w),
3152
+ c
3153
+ )
3093
3154
  )
3094
3155
  };
3095
- o[u].triggers.push(v), o[u].selectors.add(
3096
- W(v, { useFirstChild: t })
3156
+ r[a].triggers.push(E), r[a].selectors.add(
3157
+ G(E, { useFirstChild: t })
3097
3158
  );
3098
- const y = v.listContainer;
3099
- m.forEach((g, E) => {
3100
- const w = g.effectId ? n[g.effectId] : void 0;
3101
- let b = g.key || w?.key;
3102
- const S = m.length - 1 - E;
3103
- g.effectId || (g.effectId = `eff-${c}-${S}`);
3104
- const T = r.get(pe(c, S));
3105
- if (T && (g.suffix = T), b = b || u, g.key = b, y && g.listContainer && (b !== u || g.listContainer !== y))
3159
+ const y = E.listContainer;
3160
+ p.forEach((v, w) => {
3161
+ const b = v.effectId ? s[v.effectId] : void 0;
3162
+ let S = v.key || b?.key;
3163
+ const I = p.length - 1 - w;
3164
+ v.effectId || (v.effectId = X(
3165
+ "eff",
3166
+ [u, I],
3167
+ n
3168
+ ));
3169
+ const O = c.get(ve(u, I));
3170
+ if (O && (v.suffix = O), S = S || a, v.key = S, y && v.listContainer && (S !== a || v.listContainer !== y))
3106
3171
  return;
3107
- const C = V({ ...w, ...g, key: b }), _ = `${u}::${C}::${l}`;
3108
- if (g.interactionId = _, o[u].interactionIds.add(_), b === u)
3172
+ const M = W({ ...b, ...v, key: S }), T = `${a}::${M}::${f}`;
3173
+ if (v.interactionId = T, r[a].interactionIds.add(T), S === a)
3109
3174
  return;
3110
- const I = Ce(o, b);
3111
- I.effects[_] || (I.effects[_] = [], I.interactionIds.add(_)), I.effects[_].push({ ...h, effect: g }), I.selectors.add(W(g, { useFirstChild: t }));
3112
- }), p?.forEach((g) => {
3113
- if (!g || st(g)) return;
3114
- const E = g, w = E.sequenceId;
3115
- E.effects.forEach((S, T) => {
3116
- S.effectId || (S.effectId = `eff-${w}-${T}`);
3117
- let C = S.key;
3118
- if (!C && S.effectId) {
3119
- const I = n[S.effectId];
3120
- I && (C = I.key);
3175
+ const C = _e(r, S);
3176
+ C.effects[T] || (C.effects[T] = [], C.interactionIds.add(T)), C.effects[T].push({ ...m, effect: v }), C.selectors.add(G(v, { useFirstChild: t }));
3177
+ }), g?.forEach((v) => {
3178
+ if (!v || rt(v)) return;
3179
+ const w = v, b = w.sequenceId;
3180
+ w.effects.forEach((I, O) => {
3181
+ I.effectId || (I.effectId = `eff-${b}-${O}`);
3182
+ let M = I.key;
3183
+ if (!M && I.effectId) {
3184
+ const C = s[I.effectId];
3185
+ C && (M = C.key);
3121
3186
  }
3122
- C = C || u;
3123
- const _ = W(S, { useFirstChild: t });
3124
- if (_ && o[u].selectors.add(_), C !== u) {
3125
- const I = Ce(o, C), A = `${C}::seq::${w}::${l}`;
3126
- I.sequences[A] || (I.sequences[A] = [], I.interactionIds.add(A)), I.sequences[A].push({
3127
- ...h,
3128
- sequence: E
3129
- }), I.selectors.add(_);
3187
+ M = M || a;
3188
+ const T = G(I, { useFirstChild: t });
3189
+ if (T && r[a].selectors.add(T), M !== a) {
3190
+ const C = _e(r, M), _ = `${M}::seq::${b}::${f}`;
3191
+ C.sequences[_] || (C.sequences[_] = [], C.interactionIds.add(_)), C.sequences[_].push({
3192
+ ...m,
3193
+ sequence: w
3194
+ }), C.selectors.add(T);
3130
3195
  }
3131
3196
  });
3132
3197
  });
3133
3198
  }), {
3134
- effects: n,
3135
- sequences: s,
3136
- conditions: i,
3137
- interactions: o
3199
+ effects: s,
3200
+ sequences: i,
3201
+ conditions: o,
3202
+ interactions: r
3138
3203
  };
3139
3204
  }
3140
- function $e(e, t, n, s, i) {
3205
+ function Se(e, t, n, s, i) {
3141
3206
  const o = $.getPluginsNames();
3142
3207
  for (const r of o) {
3143
- const a = `${ot}${r}`;
3144
- if (!(a in n))
3208
+ const c = `${ct}${r}`;
3209
+ if (!(c in n))
3145
3210
  continue;
3146
- const c = n[a];
3147
- if (c !== null && typeof c == "object") {
3148
- if (e._appliedPlugins.has(c))
3211
+ const l = n[c];
3212
+ if (l !== null && typeof l == "object") {
3213
+ if (e._appliedPlugins.has(l))
3149
3214
  continue;
3150
- e._appliedPlugins.add(c);
3215
+ e._appliedPlugins.add(l);
3151
3216
  }
3152
- const l = $.getPlugin(r)(c, { root: t, key: s, scope: i, config: n });
3153
- typeof l == "function" && e._pluginCleanups.push(l);
3217
+ const a = $.getPlugin(r)(l, { root: t, key: s, scope: i, config: n });
3218
+ typeof a == "function" && e._pluginCleanups.push(a);
3154
3219
  }
3155
3220
  }
3156
- function ye(e, t, n) {
3221
+ function we(e, t, n) {
3157
3222
  if (e.listContainer) {
3158
3223
  const s = t.querySelector(e.listContainer);
3159
3224
  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}"`), []);
@@ -3166,32 +3231,32 @@ function ye(e, t, n) {
3166
3231
  }
3167
3232
  return n ? t.firstElementChild : t;
3168
3233
  }
3169
- function Ee(e, t) {
3234
+ function $e(e, t) {
3170
3235
  return t.map((n) => e.selector ? n.querySelector(e.selector) : n).filter(Boolean);
3171
3236
  }
3172
- function jt(e, t, n, s, i, o, r, a) {
3237
+ function Ht(e, t, n, s, i, o, r, c) {
3173
3238
  return [
3174
- r ? Ee(e, r) : ye(e, n, s),
3175
- a ? Ee(t, a) : ye(t, i, o)
3239
+ r ? $e(e, r) : we(e, n, s),
3240
+ c ? $e(t, c) : we(t, i, o)
3176
3241
  ];
3177
3242
  }
3178
- function zt(e, t, n, s, i, o, r, a) {
3179
- const c = Array.isArray(s), u = Array.isArray(i);
3180
- c ? s.forEach((l, f) => {
3243
+ function Gt(e, t, n, s, i, o, r, c) {
3244
+ const l = Array.isArray(s), u = Array.isArray(i);
3245
+ l ? s.forEach((a, f) => {
3181
3246
  const d = u ? i[f] : i;
3182
- d && it(
3247
+ d && at(
3183
3248
  e,
3184
- l,
3249
+ a,
3185
3250
  t.trigger,
3186
3251
  d,
3187
3252
  n,
3188
3253
  t.params,
3189
3254
  o,
3190
3255
  r,
3191
- a
3256
+ c
3192
3257
  );
3193
3258
  }) : (u ? i : [i]).forEach((f) => {
3194
- it(
3259
+ at(
3195
3260
  e,
3196
3261
  s,
3197
3262
  t.trigger,
@@ -3200,22 +3265,22 @@ function zt(e, t, n, s, i, o, r, a) {
3200
3265
  t.params,
3201
3266
  o,
3202
3267
  r,
3203
- a
3268
+ c
3204
3269
  );
3205
3270
  });
3206
3271
  }
3207
- function Ht(e, t, n, s, i) {
3272
+ function Wt(e, t, n, s, i) {
3208
3273
  const o = {}, r = [];
3209
- (s.effects || []).forEach((a, c) => {
3210
- const u = a.effectId, l = {
3274
+ (s.effects || []).forEach((c, l) => {
3275
+ const u = c.effectId, a = {
3211
3276
  ...n.dataCache.effects[u] || {},
3212
- ...a,
3277
+ ...c,
3213
3278
  effectId: u
3214
- }, f = l.key, d = q(a.interactionId, e);
3279
+ }, f = a.key, d = q(c.interactionId, e);
3215
3280
  if (o[d] || n.addedInteractions[d] && !i)
3216
3281
  return;
3217
- const h = L(l.conditions || [], n.dataCache.conditions);
3218
- if (h && n.setupMediaQueryListener(`${d}::${c}`, h, e, () => {
3282
+ const h = F(a.conditions || [], n.dataCache.conditions);
3283
+ if (h && n.setupMediaQueryListener(`${d}::${l}`, h, e, () => {
3219
3284
  t.update();
3220
3285
  }), !h || h.matches) {
3221
3286
  o[d] = !0;
@@ -3224,60 +3289,60 @@ function Ht(e, t, n, s, i) {
3224
3289
  if (m) {
3225
3290
  if (p = $.getController(m), !p)
3226
3291
  return;
3227
- l.listContainer && p.watchChildList(l.listContainer);
3292
+ a.listContainer && p.watchChildList(a.listContainer);
3228
3293
  } else
3229
3294
  p = t;
3230
- $e(
3295
+ Se(
3231
3296
  p,
3232
3297
  p.element,
3233
- l,
3298
+ a,
3234
3299
  m || s.key,
3235
3300
  "effect"
3236
3301
  );
3237
- const [v, y] = jt(
3302
+ const [g, E] = Ht(
3238
3303
  s,
3239
- l,
3304
+ a,
3240
3305
  t.element,
3241
3306
  t.useFirstChild,
3242
3307
  p.element,
3243
3308
  p.useFirstChild,
3244
3309
  i
3245
3310
  );
3246
- if (!v || !y)
3311
+ if (!g || !E)
3247
3312
  return;
3248
3313
  n.addedInteractions[d] = !0;
3249
- const g = m || s.key, E = x(
3250
- l.conditions || [],
3314
+ const y = m || s.key, v = R(
3315
+ a.conditions || [],
3251
3316
  n.dataCache.conditions
3252
3317
  );
3253
3318
  r.push([
3254
- g,
3255
- s,
3256
- l,
3257
- v,
3258
3319
  y,
3320
+ s,
3321
+ a,
3322
+ g,
3259
3323
  E,
3324
+ v,
3260
3325
  p.useFirstChild,
3261
3326
  e
3262
3327
  ]);
3263
3328
  }
3264
- }), r.reverse().forEach((a) => {
3265
- zt(...a);
3266
- }), Ai(e, t, n, s, i);
3329
+ }), r.reverse().forEach((c) => {
3330
+ Gt(...c);
3331
+ }), Fi(e, t, n, s, i);
3267
3332
  }
3268
- function _i(e) {
3333
+ function Li(e) {
3269
3334
  return "sequenceId" in e && !("effects" in e);
3270
3335
  }
3271
- function Dt(e, t, n, s, i, o, r) {
3272
- const a = L(e.conditions || [], i.dataCache.conditions);
3273
- if (a && i.setupMediaQueryListener(t, a, o.updateKey, o.onUpdate), a && !a.matches) return null;
3274
- const c = e.effects || [], u = [];
3275
- let l = !1;
3276
- for (const f of c) {
3336
+ function Vt(e, t, n, s, i, o, r) {
3337
+ const c = F(e.conditions || [], i.dataCache.conditions);
3338
+ if (c && i.setupMediaQueryListener(t, c, o.updateKey, o.onUpdate), c && !c.matches) return null;
3339
+ const l = e.effects || [], u = [];
3340
+ let a = !1;
3341
+ for (const f of l) {
3277
3342
  const d = f.effectId, m = {
3278
3343
  ...d ? i.dataCache.effects[d] || {} : {},
3279
3344
  ...f
3280
- }, p = L(m.conditions || [], i.dataCache.conditions);
3345
+ }, p = F(m.conditions || [], i.dataCache.conditions);
3281
3346
  if (p) {
3282
3347
  const S = `${t}::${d || "eff"}`;
3283
3348
  i.setupMediaQueryListener(
@@ -3288,38 +3353,38 @@ function Dt(e, t, n, s, i, o, r) {
3288
3353
  );
3289
3354
  }
3290
3355
  if (p && !p.matches) continue;
3291
- const v = m.key, y = v && q(v, n);
3292
- let g;
3293
- if (y) {
3294
- if (g = $.getController(y), !g) return null;
3356
+ const g = m.key, E = g && q(g, n);
3357
+ let y;
3358
+ if (E) {
3359
+ if (y = $.getController(E), !y) return null;
3295
3360
  } else
3296
- g = s;
3297
- const E = y || n;
3298
- $e(
3299
- g,
3300
- g.element,
3361
+ y = s;
3362
+ const v = E || n;
3363
+ Se(
3364
+ y,
3365
+ y.element,
3301
3366
  m,
3302
- E,
3367
+ v,
3303
3368
  "effect"
3304
3369
  );
3305
3370
  let w;
3306
- if (r && E === r.controllerKey && m.listContainer === r.listContainer ? (w = Ee(m, r.elements), w.length > 0 && (l = !0)) : w = ye(
3371
+ if (r && v === r.controllerKey && m.listContainer === r.listContainer ? (w = $e(m, r.elements), w.length > 0 && (a = !0)) : w = we(
3307
3372
  m,
3308
- g.element,
3309
- g.useFirstChild
3373
+ y.element,
3374
+ y.useFirstChild
3310
3375
  ), !w || Array.isArray(w) && w.length === 0) return null;
3311
- const b = F(m);
3376
+ const b = x(m);
3312
3377
  u.push({ target: w, options: b });
3313
3378
  }
3314
- return r && !l ? null : u.length > 0 ? u : null;
3379
+ return r && !a ? null : u.length > 0 ? u : null;
3315
3380
  }
3316
- function Re(e, t, n) {
3317
- const s = n ? Ee(e, n) : ye(e, t.element, t.useFirstChild);
3381
+ function je(e, t, n) {
3382
+ const s = n ? $e(e, n) : we(e, t.element, t.useFirstChild);
3318
3383
  return Array.isArray(s) && s.length === 0 ? null : s;
3319
3384
  }
3320
- function Ne(e, t, n, s, i) {
3385
+ function ze(e, t, n, s, i) {
3321
3386
  (Array.isArray(n) ? n : [n]).forEach((r) => {
3322
- G[e.trigger]?.add(
3387
+ H[e.trigger]?.add(
3323
3388
  r,
3324
3389
  r,
3325
3390
  { triggerType: t.triggerType },
@@ -3333,19 +3398,19 @@ function Ne(e, t, n, s, i) {
3333
3398
  );
3334
3399
  });
3335
3400
  }
3336
- function Gt(e, t, n) {
3401
+ function Kt(e, t, n) {
3337
3402
  const o = (e.useFirstChild ? e.element.firstElementChild : e.element)?.querySelector(t);
3338
- if (!o) return n.map((a, c) => c);
3403
+ if (!o) return n.map((c, l) => l);
3339
3404
  const r = Array.from(o.children);
3340
- return n.map((a) => {
3341
- const c = r.indexOf(a);
3342
- return c >= 0 ? c : r.length;
3405
+ return n.map((c) => {
3406
+ const l = r.indexOf(c);
3407
+ return l >= 0 ? l : r.length;
3343
3408
  });
3344
3409
  }
3345
- function Ai(e, t, n, s, i) {
3410
+ function Fi(e, t, n, s, i) {
3346
3411
  s.sequences?.forEach((o) => {
3347
3412
  let r;
3348
- if (_i(o)) {
3413
+ if (Li(o)) {
3349
3414
  const m = n.dataCache.sequences[o.sequenceId];
3350
3415
  if (!m) {
3351
3416
  console.warn(`Interact: Sequence "${o.sequenceId}" not found in cache`);
@@ -3354,49 +3419,49 @@ function Ai(e, t, n, s, i) {
3354
3419
  r = { ...m, ...o };
3355
3420
  } else
3356
3421
  r = o;
3357
- const a = r.sequenceId || J(), c = q(`${e}::seq::${a}`, e);
3358
- if (n.addedInteractions[c] && !i) return;
3359
- const u = i && s.listContainer ? { controllerKey: e, listContainer: s.listContainer, elements: i } : void 0, l = Dt(
3422
+ const c = r.sequenceId || ee(), l = q(`${e}::seq::${c}`, e);
3423
+ if (n.addedInteractions[l] && !i) return;
3424
+ const u = i && s.listContainer ? { controllerKey: e, listContainer: s.listContainer, elements: i } : void 0, a = Vt(
3360
3425
  r,
3361
- c,
3426
+ l,
3362
3427
  e,
3363
3428
  t,
3364
3429
  n,
3365
3430
  { updateKey: e, onUpdate: () => t.update() },
3366
3431
  u
3367
3432
  );
3368
- if (!l) return;
3369
- if (i && n.addedInteractions[c]) {
3370
- const m = Gt(
3433
+ if (!a) return;
3434
+ if (i && n.addedInteractions[l]) {
3435
+ const m = Kt(
3371
3436
  t,
3372
3437
  s.listContainer,
3373
3438
  i
3374
3439
  );
3375
- $.addToSequence(c, l, m, {
3440
+ $.addToSequence(l, a, m, {
3376
3441
  reducedMotion: $.forceReducedMotion
3377
3442
  });
3378
- const p = $.getSequence(c, r, l, {
3443
+ const p = $.getSequence(l, r, a, {
3379
3444
  reducedMotion: $.forceReducedMotion
3380
- }), v = x(
3445
+ }), g = R(
3381
3446
  s.conditions || [],
3382
3447
  n.dataCache.conditions
3383
- ), y = Re(s, t, i);
3384
- y && Ne(
3448
+ ), E = je(s, t, i);
3449
+ E && ze(
3385
3450
  s,
3386
3451
  r,
3387
- y,
3452
+ E,
3388
3453
  p,
3389
- v
3454
+ g
3390
3455
  );
3391
3456
  return;
3392
3457
  }
3393
- const f = $.getSequence(c, r, l, {
3458
+ const f = $.getSequence(l, r, a, {
3394
3459
  reducedMotion: $.forceReducedMotion
3395
- }), d = x(
3460
+ }), d = R(
3396
3461
  s.conditions || [],
3397
3462
  n.dataCache.conditions
3398
- ), h = Re(s, t, i);
3399
- h && (n.addedInteractions[c] = !0, Ne(
3463
+ ), h = je(s, t, i);
3464
+ h && (n.addedInteractions[l] = !0, ze(
3400
3465
  s,
3401
3466
  r,
3402
3467
  h,
@@ -3405,23 +3470,23 @@ function Ai(e, t, n, s, i) {
3405
3470
  ));
3406
3471
  });
3407
3472
  }
3408
- function Mi(e, t, n, s, i) {
3473
+ function Ri(e, t, n, s, i) {
3409
3474
  const o = n.get(e)?.sequences || {};
3410
- Object.keys(o).forEach((a) => {
3411
- o[a].some(({ sequence: u, ...l }) => {
3412
- const f = L(
3413
- l.conditions || [],
3475
+ Object.keys(o).forEach((c) => {
3476
+ o[c].some(({ sequence: u, ...a }) => {
3477
+ const f = F(
3478
+ a.conditions || [],
3414
3479
  n.dataCache.conditions
3415
3480
  );
3416
3481
  if (f && !f.matches)
3417
3482
  return !1;
3418
- const d = l.key && q(l.key, e), h = $.getController(d);
3483
+ const d = a.key && q(a.key, e), h = $.getController(d);
3419
3484
  if (!h)
3420
3485
  return !0;
3421
- const m = u.sequenceId || J(), p = q(`${d}::seq::${m}`, d);
3486
+ const m = u.sequenceId || ee(), p = q(`${d}::seq::${m}`, d);
3422
3487
  if (n.addedInteractions[p] && !i)
3423
3488
  return !0;
3424
- const y = Dt(
3489
+ const E = Vt(
3425
3490
  u,
3426
3491
  p,
3427
3492
  d,
@@ -3430,71 +3495,71 @@ function Mi(e, t, n, s, i) {
3430
3495
  { updateKey: e, onUpdate: () => t.update() },
3431
3496
  i && s ? { controllerKey: e, listContainer: s, elements: i } : void 0
3432
3497
  );
3433
- if (!y) return !0;
3498
+ if (!E) return !0;
3434
3499
  if (i && n.addedInteractions[p]) {
3435
- const b = Gt(t, s, i);
3436
- return $.addToSequence(p, y, b, {
3500
+ const b = Kt(t, s, i);
3501
+ return $.addToSequence(p, E, b, {
3437
3502
  reducedMotion: $.forceReducedMotion
3438
3503
  }), !0;
3439
3504
  }
3440
- const g = $.getSequence(p, u, y, {
3505
+ const y = $.getSequence(p, u, E, {
3441
3506
  reducedMotion: $.forceReducedMotion
3442
- }), E = x(
3443
- l.conditions || [],
3507
+ }), v = R(
3508
+ a.conditions || [],
3444
3509
  n.dataCache.conditions
3445
- ), w = Re(l, h);
3446
- return w && (n.addedInteractions[p] = !0, Ne(
3447
- l,
3510
+ ), w = je(a, h);
3511
+ return w && (n.addedInteractions[p] = !0, ze(
3512
+ a,
3448
3513
  u,
3449
3514
  w,
3450
- g,
3451
- E
3515
+ y,
3516
+ v
3452
3517
  )), !0;
3453
3518
  });
3454
3519
  });
3455
3520
  }
3456
- function Wt(e, t, n, s, i) {
3457
- const o = n.get(e), r = o?.effects || {}, a = Object.keys(r), c = [];
3458
- a.forEach((l) => {
3459
- const f = q(l, e);
3521
+ function Yt(e, t, n, s, i) {
3522
+ const o = n.get(e), r = o?.effects || {}, c = Object.keys(r), l = [];
3523
+ c.forEach((a) => {
3524
+ const f = q(a, e);
3460
3525
  if (n.addedInteractions[f] && !i)
3461
3526
  return;
3462
- r[l].some(({ effect: h, ...m }, p) => {
3463
- const v = L(
3527
+ r[a].some(({ effect: h, ...m }, p) => {
3528
+ const g = F(
3464
3529
  m.conditions || [],
3465
3530
  n.dataCache.conditions
3466
3531
  );
3467
- if (v && !v.matches)
3532
+ if (g && !g.matches)
3468
3533
  return !1;
3469
- const y = h.effectId, g = {
3470
- ...n.dataCache.effects[y] || {},
3534
+ const E = h.effectId, y = {
3535
+ ...n.dataCache.effects[E] || {},
3471
3536
  ...h,
3472
- effectId: y
3537
+ effectId: E
3473
3538
  };
3474
- if (s && g.listContainer !== s)
3539
+ if (s && y.listContainer !== s)
3475
3540
  return !1;
3476
- const E = L(g.conditions || [], n.dataCache.conditions);
3477
- if (E && n.setupMediaQueryListener(
3541
+ const v = F(y.conditions || [], n.dataCache.conditions);
3542
+ if (v && n.setupMediaQueryListener(
3478
3543
  `${f}::${p}`,
3479
- E,
3544
+ v,
3480
3545
  e,
3481
3546
  () => {
3482
3547
  t.update();
3483
3548
  }
3484
- ), !E || E.matches) {
3549
+ ), !v || v.matches) {
3485
3550
  const w = m.key && q(m.key, e), b = $.getController(w);
3486
3551
  if (!b)
3487
3552
  return !0;
3488
- $e(
3553
+ Se(
3489
3554
  t,
3490
3555
  t.element,
3491
- g,
3556
+ y,
3492
3557
  e,
3493
3558
  "effect"
3494
- ), g.listContainer && t.watchChildList(g.listContainer);
3495
- const [S, T] = jt(
3559
+ ), y.listContainer && t.watchChildList(y.listContainer);
3560
+ const [S, I] = Ht(
3496
3561
  m,
3497
- g,
3562
+ y,
3498
3563
  b.element,
3499
3564
  b.useFirstChild,
3500
3565
  t.element,
@@ -3502,33 +3567,33 @@ function Wt(e, t, n, s, i) {
3502
3567
  void 0,
3503
3568
  i
3504
3569
  );
3505
- if (!S || !T)
3570
+ if (!S || !I)
3506
3571
  return !0;
3507
3572
  n.addedInteractions[f] = !0;
3508
- const C = x(
3509
- g.conditions || [],
3573
+ const O = R(
3574
+ y.conditions || [],
3510
3575
  n.dataCache.conditions
3511
3576
  );
3512
- return c.push([
3577
+ return l.push([
3513
3578
  e,
3514
3579
  m,
3515
- g,
3580
+ y,
3516
3581
  S,
3517
- T,
3518
- C,
3582
+ I,
3583
+ O,
3519
3584
  t.useFirstChild,
3520
3585
  w || void 0
3521
3586
  ]), !0;
3522
3587
  }
3523
3588
  return !1;
3524
3589
  });
3525
- }), c.reverse().forEach((l) => {
3526
- zt(...l);
3527
- }), Mi(e, t, n, s, i);
3590
+ }), l.reverse().forEach((a) => {
3591
+ Gt(...a);
3592
+ }), Ri(e, t, n, s, i);
3528
3593
  const u = Object.keys(o?.sequences || {}).length > 0;
3529
- return a.length > 0 || u;
3594
+ return c.length > 0 || u;
3530
3595
  }
3531
- function it(e, t, n, s, i, o, r, a, c) {
3596
+ function at(e, t, n, s, i, o, r, c, l) {
3532
3597
  let u;
3533
3598
  if (i.transition || i.transitionProperties) {
3534
3599
  const f = {
@@ -3536,83 +3601,83 @@ function it(e, t, n, s, i, o, r, a, c) {
3536
3601
  effectId: i.effectId,
3537
3602
  transition: i.transition,
3538
3603
  transitionProperties: i.transitionProperties,
3539
- childSelector: W(i, {
3604
+ childSelector: G(i, {
3540
3605
  asCombinator: !0,
3541
3606
  addItemFilter: !0,
3542
- useFirstChild: a
3607
+ useFirstChild: c
3543
3608
  }),
3544
3609
  selectorCondition: r
3545
3610
  };
3546
3611
  if (u = $.getController(e), !u)
3547
3612
  return;
3548
- u.renderStyle(Yn(f));
3613
+ u.renderStyle(Qn(f));
3549
3614
  }
3550
- let l;
3615
+ let a;
3551
3616
  if (n === "animationEnd") {
3552
- const f = o.effectId, h = (c ? $.getInstance(c) : void 0)?.dataCache.effects[f];
3553
- h && (l = F(h));
3617
+ const f = o.effectId, h = (l ? $.getInstance(l) : void 0)?.dataCache.effects[f];
3618
+ h && (a = x(h));
3554
3619
  }
3555
- G[n]?.add(t, s, i, o, {
3620
+ H[n]?.add(t, s, i, o, {
3556
3621
  reducedMotion: $.forceReducedMotion,
3557
3622
  targetController: u,
3558
3623
  selectorCondition: r,
3559
3624
  allowA11yTriggers: $.allowA11yTriggers,
3560
- sourceAnimationOptions: l
3625
+ sourceAnimationOptions: a
3561
3626
  });
3562
3627
  }
3563
- function ki(e) {
3628
+ function xi(e) {
3564
3629
  const t = e.key, n = $.getInstance(t);
3565
3630
  if (!n)
3566
3631
  return console.warn(`No instance found for key: ${t}`), $.setController(t, e), !1;
3567
3632
  const { triggers: s = [] } = n?.get(t) || {}, i = s.length > 0;
3568
- n.setController(t, e), s.forEach((r, a) => {
3569
- const c = L(r.conditions, n.dataCache.conditions);
3570
- if (c) {
3571
- const u = `${t}::trigger::${a}`;
3572
- n.setupMediaQueryListener(u, c, t, () => {
3633
+ n.setController(t, e), s.forEach((r, c) => {
3634
+ const l = F(r.conditions, n.dataCache.conditions);
3635
+ if (l) {
3636
+ const u = `${t}::trigger::${c}`;
3637
+ n.setupMediaQueryListener(u, l, t, () => {
3573
3638
  e.update();
3574
3639
  });
3575
3640
  }
3576
- (!c || c.matches) && ($e(e, e.element, r, t, "interaction"), r.listContainer && e.watchChildList(r.listContainer), Ht(t, e, n, r));
3641
+ (!l || l.matches) && (Se(e, e.element, r, t, "interaction"), r.listContainer && e.watchChildList(r.listContainer), Wt(t, e, n, r));
3577
3642
  });
3578
3643
  let o = !1;
3579
- return n && (o = Wt(t, e, n)), i || o;
3644
+ return n && (o = Yt(t, e, n)), i || o;
3580
3645
  }
3581
- function qi(e, t, n) {
3646
+ function Ni(e, t, n) {
3582
3647
  const s = e.key, i = $.getInstance(s);
3583
3648
  if (i) {
3584
3649
  const { triggers: o = [] } = i?.get(s) || {};
3585
- o.forEach((r, a) => {
3650
+ o.forEach((r, c) => {
3586
3651
  if (r.listContainer !== t)
3587
3652
  return;
3588
- const c = L(r.conditions, i.dataCache.conditions);
3589
- if (c) {
3590
- const u = `${s}::listTrigger::${t}::${a}`;
3591
- i.setupMediaQueryListener(u, c, s, () => {
3653
+ const l = F(r.conditions, i.dataCache.conditions);
3654
+ if (l) {
3655
+ const u = `${s}::listTrigger::${t}::${c}`;
3656
+ i.setupMediaQueryListener(u, l, s, () => {
3592
3657
  e.update();
3593
3658
  });
3594
3659
  }
3595
- (!c || c.matches) && Ht(s, e, i, r, n);
3596
- }), Wt(s, e, i, t, n);
3660
+ (!l || l.matches) && Wt(s, e, i, r, n);
3661
+ }), Yt(s, e, i, t, n);
3597
3662
  }
3598
3663
  }
3599
- function Pi(e, t = !1) {
3664
+ function ji(e, t = !1) {
3600
3665
  const n = e.key, s = $.getInstance(n);
3601
3666
  if (!s)
3602
3667
  return;
3603
3668
  const i = [...s.get(n)?.selectors.values() || []].filter(Boolean).join(",");
3604
3669
  let o;
3605
- i ? (o = [...e.element.querySelectorAll(i)], e.useFirstChild || o.push(e.element)) : o = [e.element], Vt(o), s.deleteController(n, t);
3670
+ i ? (o = [...e.element.querySelectorAll(i)], e.useFirstChild || o.push(e.element)) : o = [e.element], Bt(o), s.deleteController(n, t);
3606
3671
  }
3607
- function Vt(e) {
3608
- const t = Object.values(G);
3672
+ function Bt(e) {
3673
+ const t = Object.values(H);
3609
3674
  for (const n of e)
3610
3675
  for (const s of t)
3611
3676
  s.remove(n);
3612
3677
  $.removeFromSequences(e);
3613
3678
  }
3614
- const Oe = "interactEffect";
3615
- class Li {
3679
+ const Ae = "interactEffect";
3680
+ class zi {
3616
3681
  element;
3617
3682
  key;
3618
3683
  connected;
@@ -3634,10 +3699,10 @@ class Li {
3634
3699
  }
3635
3700
  n !== t && (n && console.warn(
3636
3701
  `Interact: Key mismatch between element ${n} and parameter ${t}, updating element key`
3637
- ), this.element.dataset.interactKey = t), this.key = t, this.connected = ki(this);
3702
+ ), this.element.dataset.interactKey = t), this.key = t, this.connected = xi(this);
3638
3703
  }
3639
3704
  disconnect({ removeFromCache: t = !1 } = {}) {
3640
- if ((this.key || this.element.dataset.interactKey) && Pi(this, t), this._pluginCleanups.length) {
3705
+ if ((this.key || this.element.dataset.interactKey) && ji(this, t), this._pluginCleanups.length) {
3641
3706
  for (const s of this._pluginCleanups)
3642
3707
  try {
3643
3708
  s();
@@ -3680,12 +3745,12 @@ class Li {
3680
3745
  return;
3681
3746
  }
3682
3747
  const o = new Set(
3683
- this.element.dataset[Oe]?.split(" ") || []
3748
+ this.element.dataset[Ae]?.split(" ") || []
3684
3749
  );
3685
- n === "toggle" ? o.has(t) ? o.delete(t) : o.add(t) : n === "add" ? o.add(t) : n === "remove" ? o.delete(t) : n === "clear" && o.clear(), (s || this.element).dataset[Oe] = Array.from(o).join(" ");
3750
+ n === "toggle" ? o.has(t) ? o.delete(t) : o.add(t) : n === "add" ? o.add(t) : n === "remove" ? o.delete(t) : n === "clear" && o.clear(), (s || this.element).dataset[Ae] = Array.from(o).join(" ");
3686
3751
  }
3687
3752
  getActiveEffects() {
3688
- const n = (this.element.dataset[Oe] || "").trim();
3753
+ const n = (this.element.dataset[Ae] || "").trim();
3689
3754
  return n ? n.split(/\s+/) : [];
3690
3755
  }
3691
3756
  watchChildList(t) {
@@ -3698,26 +3763,26 @@ class Li {
3698
3763
  _childListChangeHandler(t, n) {
3699
3764
  const s = this.key || this.element.dataset.interactKey, i = [], o = [];
3700
3765
  n.forEach((r) => {
3701
- r.removedNodes.forEach((a) => {
3702
- a instanceof HTMLElement && i.push(a);
3703
- }), r.addedNodes.forEach((a) => {
3704
- a instanceof HTMLElement && o.push(a);
3766
+ r.removedNodes.forEach((c) => {
3767
+ c instanceof HTMLElement && i.push(c);
3768
+ }), r.addedNodes.forEach((c) => {
3769
+ c instanceof HTMLElement && o.push(c);
3705
3770
  });
3706
- }), Vt(i), s && qi(this, t, o);
3771
+ }), Bt(i), s && Ni(this, t, o);
3707
3772
  }
3708
3773
  }
3709
- function Fi(e, t) {
3710
- new Li(e, t).connect();
3774
+ function Hi(e, t) {
3775
+ new zi(e, t).connect();
3711
3776
  }
3712
- function Ri(e) {
3777
+ function Gi(e) {
3713
3778
  const t = $.getController(e);
3714
3779
  t && t.disconnect({ removeFromCache: !0 });
3715
3780
  }
3716
3781
  export {
3717
- Li as I,
3782
+ zi as I,
3718
3783
  $ as a,
3719
- Fi as b,
3720
- xi as g,
3721
- Ri as r
3784
+ Hi as b,
3785
+ Di as g,
3786
+ Gi as r
3722
3787
  };
3723
- //# sourceMappingURL=index-YKqGJSeK.mjs.map
3788
+ //# sourceMappingURL=index-BcRbaJX2.mjs.map