@wix/interact 2.5.24 → 2.5.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,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 at = "$";
20
+ class ne {
21
21
  animations;
22
22
  options;
23
23
  ready;
@@ -121,64 +121,64 @@ 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
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;
124
+ const ct = (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, We = {
125
+ linear: ct,
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
+ }, V = (e, t, n, s, i) => {
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
158
  const y = 2 * Math.sqrt(-p);
159
- let g = 0;
159
+ let E = 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 * y), -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 = y * Math.cos((Math.acos(I) - w * 2 * Math.PI) / 3) - d;
166
+ return O >= -1e-6 && O <= 1.000001;
167
+ }) && (E = w);
168
+ const v = `(acos(clamp(-1, ${2 / (p * y)} * ${g}, 1)) - ${360 * E}deg) / 3`;
169
+ f = `(${y} * 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 y = `sqrt(pow(${g}, 2) + ${Math.pow(p, 3)})`;
172
+ f = `(pow(${y} - ${g}, 1 / 3) - pow(${y} + ${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
+ }, Ve = {
177
177
  linear: (e) => e,
178
- ease: (e) => K(e, 0.25, 0.1, 0.25, 1),
179
- easeIn: (e) => K(e, 0.42, 0, 1, 1),
180
- easeOut: (e) => K(e, 0, 0, 0.58, 1),
181
- easeInOut: (e) => K(e, 0.42, 0, 0.58, 1),
178
+ ease: (e) => V(e, 0.25, 0.1, 0.25, 1),
179
+ easeIn: (e) => V(e, 0.42, 0, 1, 1),
180
+ easeOut: (e) => V(e, 0, 0, 0.58, 1),
181
+ easeInOut: (e) => V(e, 0.42, 0, 0.58, 1),
182
182
  sineIn: (e) => `(1 - cos(${e} * 90deg))`,
183
183
  sineOut: (e) => `(sin(${e} * 90deg))`,
184
184
  sineInOut: (e) => `((1 - cos(${e} * 180deg)) / 2)`,
@@ -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
+ }, Ke = {
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 lt(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) && lt(t) !== t)
257
257
  return !0;
258
258
  return !1;
259
259
  }
260
- function ct(e) {
260
+ function ut(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[lt(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 ? Ke[e] || e : Ke.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 E = 0; E < 8; E++) {
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, y = 1;
289
+ for (p = (g + y) / 2; y - g > 1e-7; ) {
290
+ const E = a(p);
291
+ if (Math.abs(E - m) < 1e-7) return p;
292
+ m > E ? g = p : y = p, p = (g + y) / 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 ft(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 = ft(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 = ft(e);
314
314
  if (!(!t || t.some(isNaN)))
315
- return (n) => K(n, ...t);
315
+ return (n) => V(n, ...t);
316
316
  }
317
- function ut(e) {
317
+ function dt(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 = dt(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 = dt(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 ht(e) {
387
387
  if (!e) return;
388
- const t = De[e];
389
- return t || (Tn(e) ?? On(e) ?? De.linear);
388
+ const t = We[e];
389
+ return t || (_n(e) ?? Mn(e) ?? We.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 = Ve[e];
394
+ return t || (An(e) ?? kn(e) ?? Ve.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 : ht(n.offsetEasing) ?? ct, 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: {} }, Ye = he.exports, Be;
638
+ function Rn() {
639
+ return Be || (Be = 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 Ye < "u" ? Ye : 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 Z(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" ? Z(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 Ue(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: Ue(e.startOffset, e.startOffsetAdd),
801
+ end: Ue(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 De(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 De(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 Qe(e, t, n, s, i) {
850
850
  if (e) {
851
- if (ze(s) && (t.duration = t.duration || 1, i?.reducedMotion))
851
+ if (De(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" ? Z(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 = Qe(
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 = Qe(
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 || Z(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, y = new KeyframeEffect(g || null, [], h);
897
+ A.mutate(() => {
898
+ "timing" in d && y.updateTiming(d.timing), y.setKeyframes(ut(d.keyframes));
899
899
  });
900
- const g = l && u ? { timeline: u } : {}, E = typeof d.customEffect == "function" ? new kn(
900
+ const E = 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
+ E
905
+ ) : new Animation(y, E.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 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) {
943
+ const g = qn(m);
944
+ if (g) {
945
945
  const y = (i ?? 0) + (d ?? 0);
946
946
  if (h) {
947
- const g = v(
947
+ const E = 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(${`(${y} + ${E} * ${h} * var(--motion-${f}-last, 1))`} * 1ms)`;
951
951
  } else
952
952
  p = `${y}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 Hn(e, t, n) {
958
+ return e?.style ? (De(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 Dn(e, t, n, s) {
961
+ const i = J(t), o = Hn(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: ut(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 : Z(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 || Z(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
1040
  target: void 0,
1041
- centeredToTarget: l,
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, y) {
1048
+ const E = h === "x" ? y.x : y.y;
1049
+ this._currentProgress = E, m.progress(E);
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 = ht(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,78 @@ 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;
1207
+ function Ot(e, t, n, s) {
1208
+ const { effects: i = {}, conditions: o = {} } = n, { key: r, trigger: c } = t, l = c === "pointerMove";
1209
+ e.effectId || (e.effectId = s || ee());
1210
+ const { effectId: u } = e, a = { ...i[u] || {}, ...e };
1211
+ let { key: f, conditions: d, triggerType: h } = a;
1212
1212
  if (!f) {
1213
1213
  if (!r)
1214
1214
  return null;
1215
1215
  f = r;
1216
1216
  }
1217
- if (Vn(f))
1217
+ if (Bn(f))
1218
1218
  return null;
1219
1219
  d = [
1220
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,
1221
+ ], h || (h = Ct.get(c));
1222
+ const { namedEffect: m, customEffect: p, keyframeEffect: g, transition: y, transitionProperties: E, ...v } = {
1223
+ ...a,
1224
1224
  key: f,
1225
1225
  conditions: d,
1226
1226
  effectId: u,
1227
1227
  triggerType: h
1228
- }, w = Yt(t, E);
1228
+ }, w = Qt(t, v);
1229
1229
  if (m)
1230
- return c || !m.type ? null : { namedEffect: m, initial: w, ...E };
1231
- if (v) {
1232
- if (!v.name) {
1230
+ return l || !m.type ? null : { namedEffect: m, initial: w, ...v };
1231
+ if (g) {
1232
+ if (!g.name) {
1233
1233
  const b = u && !(i[u] && "keyframeEffect" in e);
1234
- v.name = b ? u : J();
1234
+ g.name = b ? u : ee();
1235
1235
  }
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 };
1236
+ return { keyframeEffect: g, initial: w, ...v };
1237
+ } else return p ? l ? null : { initial: w, ...v } : y ? { transition: y, initial: w, ...v } : E ? { transitionProperties: E, initial: w, ...v } : { initial: w, ...v };
1238
1238
  }
1239
- function Bn(e, t, n, s, i) {
1239
+ function Xn(e, t, n, s, i) {
1240
1240
  const { sequences: o = {}, conditions: r = {} } = n;
1241
- e.sequenceId || (e.sequenceId = s || J());
1242
- const { sequenceId: a } = e, c = { ...o[a] || {}, ...e };
1241
+ e.sequenceId || (e.sequenceId = s || ee());
1242
+ const { sequenceId: c } = e, l = { ...o[c] || {}, ...e };
1243
1243
  let {
1244
1244
  effects: u,
1245
- conditions: l,
1245
+ conditions: a,
1246
1246
  triggerType: f,
1247
1247
  delay: d = 0,
1248
1248
  offset: h = 0,
1249
1249
  offsetEasing: m = "linear"
1250
- } = c;
1250
+ } = l;
1251
1251
  if (typeof m == "function" || !u)
1252
1252
  return null;
1253
- f || (f = It.get(t.trigger)), l = [
1254
- ...new Set((l || []).filter((y) => r[y]))
1253
+ f || (f = Ct.get(t.trigger)), a = [
1254
+ ...new Set((a || []).filter((y) => r[y]))
1255
1255
  ];
1256
- const v = u.map((y, g) => {
1257
- const E = Tt(
1258
- { ...y, triggerType: f, conditions: [...y.conditions || [], ...l] },
1256
+ const g = u.map((y, E) => {
1257
+ const v = Ot(
1258
+ { ...y, triggerType: f, conditions: [...y.conditions || [], ...a] },
1259
1259
  t,
1260
1260
  n,
1261
- `${a}-eff-${g}`
1261
+ `${c}-eff-${E}`
1262
1262
  );
1263
- return E && Object.assign(E, { slotKey: i?.(g) });
1263
+ return v && Object.assign(v, { slotKey: i?.(E) });
1264
1264
  }).filter((y) => y !== null);
1265
- return v.length ? {
1266
- sequenceId: a,
1265
+ return g.length ? {
1266
+ sequenceId: c,
1267
1267
  triggerType: f,
1268
- conditions: l,
1268
+ conditions: a,
1269
1269
  delay: d,
1270
1270
  offset: h,
1271
1271
  offsetEasing: m,
1272
- effects: v
1272
+ effects: g
1273
1273
  } : null;
1274
1274
  }
1275
- function Un(e) {
1276
- return e === "cssFloat" ? "float" : e === "easing" ? "animation-timing-function" : e === "cssOffset" ? "offset" : e === "composite" ? "animation-composition" : me(e);
1275
+ function Zn(e) {
1276
+ return e === "cssFloat" ? "float" : e === "easing" ? "animation-timing-function" : e === "cssOffset" ? "offset" : e === "composite" ? "animation-composition" : ge(e);
1277
1277
  }
1278
- function Qn(e) {
1278
+ function Jn(e) {
1279
1279
  if (!e.length)
1280
1280
  return [];
1281
1281
  const t = e.map((i) => ({ ...i }));
@@ -1289,66 +1289,66 @@ function Qn(e) {
1289
1289
  if (o > 1)
1290
1290
  return console.error("Offsets must be in the range [0,1]"), [];
1291
1291
  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;
1292
+ for (let c = n + 1; c < i; c++) {
1293
+ const l = (c - n) / r;
1294
+ t[c].offset = s + (o - s) * l;
1295
1295
  }
1296
1296
  n = i, s = o;
1297
1297
  }
1298
1298
  return t;
1299
1299
  }
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(`
1300
+ function es(e, t) {
1301
+ const n = Object.entries(e).filter(([s, i]) => s !== "offset" && i !== void 0 && i !== null).map(([s, i]) => `${Zn(s)}: ${i};`).join(`
1302
1302
  `);
1303
1303
  return `${t}% {
1304
1304
  ${n}
1305
1305
  }`;
1306
1306
  }
1307
- function Zn(e, t) {
1308
- const n = Qn(t);
1307
+ function ts(e, t) {
1308
+ const n = Jn(t);
1309
1309
  if (!n.length)
1310
1310
  return "";
1311
1311
  let s = n.map((i) => {
1312
- const o = i.offset, r = Wn(o * 100);
1313
- return Xn(i, r);
1312
+ const o = i.offset, r = Yn(o * 100);
1313
+ return es(i, r);
1314
1314
  }).join(`
1315
1315
  `);
1316
1316
  return `@keyframes ${e} {
1317
1317
  ${s}
1318
1318
  }`;
1319
1319
  }
1320
- function Jn(e) {
1321
- const { key: t, childSelector: n, declarations: s, media: i, states: o, selectorCondition: r, selectorSuffix: a } = e;
1320
+ function ns(e) {
1321
+ const { key: t, childSelector: n, declarations: s, media: i, states: o, selectorCondition: r, selectorSuffix: c } = e;
1322
1322
  if (!s.length)
1323
1323
  return "";
1324
- let c = `[data-interact-key="${t}"]`;
1324
+ let l = `[data-interact-key="${t}"]`;
1325
1325
  if (o && o.length) {
1326
1326
  const f = o.map((d) => `:state(${d}), :--${d}, [data-interact-effect~="${d}"]`).join(", ");
1327
- c = `${c}:is(${f})`;
1327
+ l = `${l}:is(${f})`;
1328
1328
  }
1329
- n && (c = `${c} ${n}`), a && (c = `${c}${a}`), r && (c = de(c, r));
1329
+ n && (l = `${l} ${n}`), c && (l = `${l}${c}`), r && (l = me(l, r));
1330
1330
  const u = s.map(({ name: f, value: d, important: h }) => `${f}: ${d}${h ? " !important" : ""};`).join(`
1331
- `), l = `${c} {
1331
+ `), a = `${l} {
1332
1332
  ${u}
1333
1333
  }`;
1334
1334
  return i ? `@media ${i} {
1335
- ${l}
1336
- }` : l;
1335
+ ${a}
1336
+ }` : a;
1337
1337
  }
1338
- const Ae = [
1338
+ const ke = [
1339
1339
  "animation",
1340
1340
  "animation-composition",
1341
1341
  "animation-timeline",
1342
1342
  "animation-range"
1343
- ], we = [
1344
- ...Ae,
1343
+ ], be = [
1344
+ ...ke,
1345
1345
  "transition",
1346
1346
  "view-timeline"
1347
- ], He = ["animation", "transition", "timeline"];
1348
- function N(e) {
1347
+ ], Ge = ["animation", "transition", "timeline"];
1348
+ function L(e) {
1349
1349
  return e === "transition" ? "transition" : e === "view-timeline" ? "timeline" : "animation";
1350
1350
  }
1351
- const H = {
1351
+ const K = {
1352
1352
  transition: "_",
1353
1353
  animation: "none",
1354
1354
  "animation-composition": "replace",
@@ -1356,94 +1356,131 @@ const H = {
1356
1356
  "animation-range": "normal",
1357
1357
  "view-timeline": "none"
1358
1358
  };
1359
- function j(e, t, n = !1) {
1360
- return `--${e.replace(new RegExp("(?<!(^|-))([aeiou]|tion)", "g"), "")}${n ? "-slot" : ""}-${t}`;
1359
+ function _t(e) {
1360
+ return e.replace(new RegExp("(?<!(^|-))([aeiou]|tion)", "g"), "");
1361
1361
  }
1362
- function es(e, t, n, s, i = 0) {
1363
- const o = {
1362
+ function j(e, t, n = !1, s) {
1363
+ const i = s === void 0 ? "" : `-c${s}`;
1364
+ return `--${_t(e)}${i}${n ? "-slot" : ""}-${t}`;
1365
+ }
1366
+ function te(e, t) {
1367
+ return `--${_t(e)}-c${t}`;
1368
+ }
1369
+ function ss(e, t) {
1370
+ return Array.from(
1371
+ { length: t + 1 },
1372
+ (n, s) => `var(${te(e, s)})`
1373
+ ).join(", ");
1374
+ }
1375
+ function is(e, t, n, s, i = 0, o) {
1376
+ const r = {
1364
1377
  animation: e,
1365
1378
  transition: t,
1366
1379
  timeline: i
1367
- }, r = {
1380
+ }, c = {
1368
1381
  animation: n,
1369
1382
  transition: s,
1370
1383
  timeline: 0
1371
- };
1372
- return we.flatMap((a) => [
1384
+ }, l = (u, a) => `@property ${a} { syntax: "*"; inherits: false; initial-value: ${K[u]}; }`;
1385
+ return be.flatMap((u) => [
1373
1386
  ...Array.from(
1374
- { length: o[N(a)] },
1375
- (c, u) => `@property ${j(a, u)} { syntax: "*"; inherits: false; initial-value: ${H[a]}; }`
1387
+ { length: r[L(u)] },
1388
+ (a, f) => l(u, j(u, f, !1, o))
1376
1389
  ),
1377
1390
  ...Array.from(
1378
- { length: r[N(a)] },
1379
- (c, u) => `@property ${j(a, u, !0)} { syntax: "*"; inherits: false; initial-value: ${H[a]}; }`
1391
+ { length: c[L(u)] },
1392
+ (a, f) => l(u, j(u, f, !0, o))
1393
+ ),
1394
+ // registers the lists of the configs before it too, for elements they don't target
1395
+ ...Array.from(
1396
+ { length: o !== void 0 && r[L(u)] ? o + 1 : 0 },
1397
+ (a, f) => l(u, te(u, f))
1380
1398
  )
1381
1399
  ]);
1382
1400
  }
1383
- function ts(e, t, n) {
1384
- const s = we.filter(
1385
- (r) => e[N(r)].slotsInSequence > 0
1401
+ function os(e, t, n, s) {
1402
+ const i = be.filter(
1403
+ (c) => e[L(c)].slotsInSequence > 0
1386
1404
  );
1387
- if (s.length === 0)
1405
+ if (i.length === 0)
1388
1406
  return null;
1389
- const i = s.map((r) => {
1390
- const { listIndex: a, slotCursor: c, slotsInSequence: u } = e[N(r)];
1407
+ const o = i.map((c) => {
1408
+ const { listIndex: l, slotCursor: u, slotsInSequence: a } = e[L(c)];
1391
1409
  return {
1392
- name: j(r, a),
1410
+ name: j(c, l, !1, s),
1393
1411
  value: Array.from(
1394
- { length: u },
1395
- (l, f) => `var(${j(r, c + f, !0)})`
1412
+ { length: a },
1413
+ (f, d) => `var(${j(c, u + d, !0, s)})`
1396
1414
  ).join(", ")
1397
1415
  };
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;
1416
+ }), r = { key: e.key, childSelector: e.childSelector, declarations: o };
1417
+ return t && (r.media = ie(t, n || {}, "media"), r.selectorCondition = R(t, n || {})), r;
1400
1418
  }
1401
- function ns(e, t, n, s = 0) {
1419
+ function rs(e, t, n, s = 0, i) {
1402
1420
  if (e.length === 0)
1403
1421
  return "";
1404
- const i = {
1422
+ const o = {
1405
1423
  animation: t,
1406
1424
  transition: n,
1407
1425
  timeline: s
1408
- }, o = we.filter((c) => i[N(c)] > 0);
1409
- if (o.length === 0)
1426
+ }, r = be.filter((u) => o[L(u)] > 0);
1427
+ if (r.length === 0)
1410
1428
  return "";
1411
- const r = o.map((c) => ({
1412
- name: c,
1413
- value: Array.from(
1414
- { length: i[N(c)] },
1429
+ const c = r.flatMap((u) => {
1430
+ const a = Array.from(
1431
+ { length: o[L(u)] },
1415
1432
  // 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
- }));
1433
+ (f, d) => `var(${j(u, d, !1, i)})`
1434
+ ).join(", ");
1435
+ return i === void 0 ? [{ name: u, value: a }] : [
1436
+ { name: te(u, i), value: a },
1437
+ { name: u, value: ss(u, i) }
1438
+ ];
1439
+ });
1419
1440
  return `${e.map(
1420
- ({ key: c, childSelector: u }) => `[data-interact-key="${c}"]${u ? ` ${u}` : ""}`
1441
+ ({ key: u, childSelector: a }) => `[data-interact-key="${u}"]${a ? ` ${a}` : ""}`
1421
1442
  ).join(", ")} {
1422
- ${r.map(({ name: c, value: u }) => ` ${c}: ${u};`).join(`
1443
+ ${c.map(({ name: u, value: a }) => ` ${u}: ${a};`).join(`
1423
1444
  `)}
1424
1445
  }`;
1425
1446
  }
1426
- const oe = {
1447
+ function as(e, t) {
1448
+ if (e.length === 0)
1449
+ return "";
1450
+ if (t === void 0)
1451
+ return `:root {
1452
+ timeline-scope: ${e.join(", ")};
1453
+ }`;
1454
+ const n = Array.from(
1455
+ { length: t + 1 },
1456
+ (s, i) => `var(${te("timeline-scope", i)}, --_)`
1457
+ ).join(", ");
1458
+ return `:root {
1459
+ ${te("timeline-scope", t)}: ${e.join(", ")};
1460
+ timeline-scope: ${n};
1461
+ }`;
1462
+ }
1463
+ const ae = {
1427
1464
  rangeStart: { name: "cover", offset: { value: 0, unit: "percentage" } },
1428
1465
  rangeEnd: { name: "cover", offset: { value: 100, unit: "percentage" } }
1429
1466
  };
1430
- function ss(e, t) {
1431
- const n = e?.name ?? oe.rangeStart.name, s = t?.name ?? e?.name ?? oe.rangeEnd.name, i = {
1467
+ function cs(e, t) {
1468
+ const n = e?.name ?? ae.rangeStart.name, s = t?.name ?? e?.name ?? ae.rangeEnd.name, i = {
1432
1469
  name: n,
1433
- offset: e?.offset || oe.rangeStart.offset
1470
+ offset: e?.offset || ae.rangeStart.offset
1434
1471
  }, o = {
1435
1472
  name: s,
1436
- offset: t?.offset || oe.rangeEnd.offset
1473
+ offset: t?.offset || ae.rangeEnd.offset
1437
1474
  };
1438
1475
  return { startOffset: i, endOffset: o };
1439
1476
  }
1440
- function F(e) {
1477
+ function x(e) {
1441
1478
  if ("keyframeEffect" in e && !e.keyframeEffect.name && "effectId" in e && (e.keyframeEffect.name = e.effectId), "duration" in e)
1442
1479
  return {
1443
1480
  id: "",
1444
1481
  ...e
1445
1482
  };
1446
- const { rangeStart: t, rangeEnd: n, ...s } = e, { startOffset: i, endOffset: o } = ss(t, n);
1483
+ const { rangeStart: t, rangeEnd: n, ...s } = e, { startOffset: i, endOffset: o } = cs(t, n);
1447
1484
  return {
1448
1485
  id: "",
1449
1486
  startOffset: i,
@@ -1455,23 +1492,23 @@ function k(e, t, n) {
1455
1492
  let s = e.get(t);
1456
1493
  s || (s = /* @__PURE__ */ new Set(), e.set(t, s)), s.add(n);
1457
1494
  }
1458
- function se(e, t) {
1495
+ function oe(e, t) {
1459
1496
  e.get(t)?.forEach((s) => {
1460
1497
  const { source: i, target: o, cleanup: r } = s;
1461
1498
  r();
1462
- const a = i === t ? o : i;
1463
- e.get(a)?.delete(s);
1499
+ const c = i === t ? o : i;
1500
+ e.get(c)?.delete(s);
1464
1501
  }), e.delete(t);
1465
1502
  }
1466
- const is = [
1503
+ const ls = [
1467
1504
  { name: "visibility", value: "hidden" },
1468
1505
  { name: "clip-path", value: "none", important: !0 },
1469
1506
  { name: "transform", value: "none", important: !0 },
1470
1507
  { name: "translate", value: "none", important: !0 },
1471
1508
  { name: "scale", value: "none", important: !0 },
1472
1509
  { name: "rotate", value: "none", important: !0 }
1473
- ], Me = { animation: !1, transition: !1, timeline: !1 };
1474
- function Ct(e, t) {
1510
+ ], qe = { animation: !1, transition: !1, timeline: !1 };
1511
+ function At(e, t) {
1475
1512
  const n = () => ({
1476
1513
  listIndex: 0,
1477
1514
  slotCursor: 0,
@@ -1490,33 +1527,33 @@ function Ct(e, t) {
1490
1527
  keyframeEntries: /* @__PURE__ */ new Map()
1491
1528
  };
1492
1529
  }
1493
- function Ot(e, t) {
1530
+ function Mt(e, t, n) {
1494
1531
  return Object.fromEntries(
1495
- we.map((n) => {
1496
- const s = N(n), { listIndex: i, slotCursor: o, slotsInSequence: r } = e[s];
1532
+ be.map((s) => {
1533
+ const i = L(s), { listIndex: o, slotCursor: r, slotsInSequence: c } = e[i];
1497
1534
  return [
1498
- n,
1499
- t[s] ? j(n, o + r, !0) : j(n, i)
1535
+ s,
1536
+ t[i] ? j(s, r + c, !0, n) : j(s, o, !1, n)
1500
1537
  ];
1501
1538
  })
1502
1539
  );
1503
1540
  }
1504
- function ke(e, t, n) {
1505
- He.forEach((s) => {
1541
+ function Pe(e, t, n) {
1542
+ Ge.forEach((s) => {
1506
1543
  t[s] && (e[s].touched = !0, n[s] && (e[s].slotsInSequence += 1));
1507
1544
  });
1508
1545
  }
1509
- function _t(e) {
1546
+ function kt(e) {
1510
1547
  const { namedEffect: t, keyframeEffect: n, transition: s, transitionProperties: i } = e;
1511
1548
  return t || n ? "animation" : s || i ? "transition" : null;
1512
1549
  }
1513
- function os(e) {
1550
+ function us(e) {
1514
1551
  const t = /* @__PURE__ */ new Map();
1515
1552
  return e.effects.forEach((n) => {
1516
- const s = _t(n);
1553
+ const s = kt(n);
1517
1554
  if (!s)
1518
1555
  return;
1519
- const i = V(n), o = t.get(i) || { animation: 0, transition: 0, timeline: 0 };
1556
+ const i = W(n), o = t.get(i) || { animation: 0, transition: 0, timeline: 0 };
1520
1557
  o[s] += 1, t.set(i, o);
1521
1558
  }), new Map(
1522
1559
  [...t].map(([n, { animation: s, transition: i }]) => [
@@ -1525,35 +1562,35 @@ function os(e) {
1525
1562
  ])
1526
1563
  );
1527
1564
  }
1528
- function rs(e) {
1529
- He.forEach((t) => {
1565
+ function fs(e) {
1566
+ Ge.forEach((t) => {
1530
1567
  const n = e[t];
1531
1568
  n.slotsInInteraction = Math.max(n.slotsInInteraction, n.slotsInSequence), n.slotsInSequence = 0;
1532
1569
  });
1533
1570
  }
1534
- function as(e) {
1535
- He.forEach((t) => {
1571
+ function ds(e) {
1572
+ Ge.forEach((t) => {
1536
1573
  const n = e[t];
1537
1574
  n.listIndex += n.touched ? 1 : 0, n.slotCursor += n.slotsInInteraction, n.slotsInInteraction = 0, n.touched = !1;
1538
1575
  });
1539
1576
  }
1540
- const cs = {
1577
+ const hs = {
1541
1578
  animation: "animation",
1542
1579
  "animation-composition": "composition",
1543
1580
  "animation-timeline": "animationTimeline",
1544
1581
  "animation-range": "animationRange"
1545
1582
  };
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, {
1583
+ function ms(e, t, n, s) {
1584
+ const { key: i, conditions: o } = t, r = ie(o, e.configConditions, "media"), c = R(o, e.configConditions), l = G(t, {
1548
1585
  asCombinator: !0,
1549
1586
  useFirstChild: e.useFirstChild,
1550
1587
  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), {
1588
+ }), u = W(t), a = e.targetsMap.get(u) || At(i, l), f = Mt(a, qe, e.configIndex)["view-timeline"];
1589
+ return Pe(a, { animation: !1, transition: !1, timeline: !0 }, qe), e.targetsMap.set(u, a), s.add(u), {
1553
1590
  key: i,
1554
1591
  media: r,
1555
- selectorCondition: a,
1556
- childSelector: c,
1592
+ selectorCondition: c,
1593
+ childSelector: l,
1557
1594
  declarations: [
1558
1595
  {
1559
1596
  name: f,
@@ -1562,116 +1599,116 @@ function ls(e, t, n, s) {
1562
1599
  ]
1563
1600
  };
1564
1601
  }
1565
- function At(e, t, n, s, i) {
1602
+ function qt(e, t, n, s, i) {
1566
1603
  const o = [];
1567
1604
  for (const r of Object.keys(i)) {
1568
- const a = `${ot}${r}`;
1569
- a in t && o.push(
1570
- ...i[r](t[a], {
1605
+ const c = `${at}${r}`;
1606
+ c in t && o.push(
1607
+ ...i[r](t[c], {
1571
1608
  key: n,
1572
1609
  scope: e,
1573
1610
  config: t
1574
- }).map((c) => ({ ...c, key: n, media: s }))
1611
+ }).map((l) => ({ ...l, key: n, media: s }))
1575
1612
  );
1576
1613
  }
1577
1614
  return o;
1578
1615
  }
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,
1616
+ function ps(e, t, n, s, i, o) {
1617
+ const { assigned: r, childSelector: c, partSelectors: l } = n, u = { animation: !1, transition: !1, timeline: !1 }, {
1618
+ key: a,
1582
1619
  effectId: f,
1583
1620
  conditions: d,
1584
1621
  namedEffect: h,
1585
1622
  keyframeEffect: m,
1586
1623
  transition: p,
1587
- transitionProperties: v,
1624
+ transitionProperties: g,
1588
1625
  initial: y
1589
- } = t, g = ne(d, e.configConditions, "media"), E = x(d, e.configConditions), w = [
1626
+ } = t, E = ie(d, e.configConditions, "media"), v = R(d, e.configConditions), w = [
1590
1627
  {
1591
- key: l,
1592
- media: g,
1593
- selectorCondition: E,
1594
- childSelector: a,
1628
+ key: a,
1629
+ media: E,
1630
+ selectorCondition: v,
1631
+ childSelector: c,
1595
1632
  declarations: []
1596
1633
  }
1597
1634
  ];
1598
1635
  let b = [];
1599
1636
  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
1637
+ if (e.plugins && w.push(...qt("effect", t, a, E, e.plugins)), h || m) {
1638
+ const I = x(t), O = Dn(null, I, s, o).filter(
1639
+ (T) => T.name
1640
+ ), M = O.length ? {} : { "": [] };
1641
+ O.forEach((T) => {
1642
+ const C = T.part || "";
1643
+ (M[C] ||= []).push(T);
1644
+ }), b = O.map((T) => ({
1645
+ name: T.name,
1646
+ keyframes: T.keyframes
1610
1647
  })), S.push(
1611
- ...C.flatMap(
1612
- ({ custom: I }) => Object.entries(I || {}).filter(([A, M]) => M !== void 0).map(([A, M]) => ({ name: A, value: M }))
1648
+ ...O.flatMap(
1649
+ ({ custom: T }) => Object.entries(T || {}).filter(([C, _]) => _ !== void 0).map(([C, _]) => ({ name: C, value: _ }))
1613
1650
  )
1614
- ), Object.entries(_).forEach(([I, A]) => {
1615
- const M = Ae.map((P) => ({
1651
+ ), Object.entries(M).forEach(([T, C]) => {
1652
+ const _ = ke.map((P) => ({
1616
1653
  _listPropertyName: P,
1617
1654
  name: i[P],
1618
- value: A.map((be) => {
1619
- const Se = cs[P];
1620
- return be[Se] || H[P];
1655
+ value: C.map((Ie) => {
1656
+ const Te = hs[P];
1657
+ return Ie[Te] || K[P];
1621
1658
  }).join(", ")
1622
1659
  })).filter(
1623
- ({ _listPropertyName: P, name: be, value: Se }) => Se !== H[P] || r.has(be)
1660
+ ({ _listPropertyName: P, name: Ie, value: Te }) => Te !== K[P] || r.has(Ie)
1624
1661
  );
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,
1662
+ _.forEach(({ name: P }) => r.add(P)), u.animation = u.animation || _.length > 0;
1663
+ const re = T ? `[data-motion-part~="${T}"]` : c;
1664
+ T && _.length && l.add(re), y ? (w.push({
1665
+ key: a,
1666
+ media: E,
1667
+ selectorCondition: v,
1668
+ childSelector: re,
1669
+ declarations: ls,
1633
1670
  selectorSuffix: ":not([data-interact-enter])"
1634
1671
  }), w.push({
1635
- key: l,
1636
- media: g,
1637
- selectorCondition: E,
1638
- childSelector: ie,
1639
- declarations: M,
1672
+ key: a,
1673
+ media: E,
1674
+ selectorCondition: v,
1675
+ childSelector: re,
1676
+ declarations: _,
1640
1677
  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);
1678
+ })) : T ? w.push({
1679
+ key: a,
1680
+ media: E,
1681
+ selectorCondition: v,
1682
+ childSelector: re,
1683
+ declarations: _
1684
+ }) : S.push(..._);
1648
1685
  });
1649
- } else if (p || v) {
1650
- const T = bt(t), C = St(t);
1651
- (C.length || r.has(i.transition)) && (S.push({
1686
+ } else if (p || g) {
1687
+ const I = It(t), O = Tt(t);
1688
+ (O.length || r.has(i.transition)) && (S.push({
1652
1689
  name: i.transition,
1653
- value: C.join(", ") || H.transition
1690
+ value: O.join(", ") || K.transition
1654
1691
  }), r.add(i.transition), u.transition = !0), w.push({
1655
- key: l,
1656
- media: g,
1657
- selectorCondition: E,
1658
- childSelector: a,
1692
+ key: a,
1693
+ media: E,
1694
+ selectorCondition: v,
1695
+ childSelector: c,
1659
1696
  states: [f],
1660
- declarations: T
1697
+ declarations: I
1661
1698
  });
1662
1699
  } else
1663
1700
  S.push(
1664
- ...Ae.filter(
1665
- (T) => r.has(i[T])
1666
- ).map((T) => ({
1667
- name: i[T],
1668
- value: H[T]
1701
+ ...ke.filter(
1702
+ (I) => r.has(i[I])
1703
+ ).map((I) => ({
1704
+ name: i[I],
1705
+ value: K[I]
1669
1706
  }))
1670
1707
  );
1671
- return { rules: w.filter((T) => T.declarations.length), keyframes: b, wrote: u };
1708
+ return { rules: w.filter((I) => I.declarations.length), keyframes: b, wrote: u };
1672
1709
  }
1673
- function fs(e, t, n) {
1674
- const s = t.namedEffect && je(t.namedEffect.type, !1);
1710
+ function gs(e, t, n) {
1711
+ const s = t.namedEffect && He(t.namedEffect.type, !1);
1675
1712
  if (!s?.getNames)
1676
1713
  return;
1677
1714
  const i = (r) => s.getNames({ ...t, suffix: r });
@@ -1680,283 +1717,281 @@ function fs(e, t, n) {
1680
1717
  const o = e.keyframeEntries.get(n) || [];
1681
1718
  e.keyframeEntries.set(n, [...o, { slotKey: t.slotKey, getNames: i }]);
1682
1719
  }
1683
- function Mt(e, t, n, s, i, o) {
1684
- const r = V(t), a = e.targetsMap.get(r) || Ct(
1720
+ function Pt(e, t, n, s, i, o) {
1721
+ const r = W(t), c = e.targetsMap.get(r) || At(
1685
1722
  t.key,
1686
- W(t, {
1723
+ G(t, {
1687
1724
  asCombinator: !0,
1688
1725
  useFirstChild: e.useFirstChild,
1689
1726
  addItemFilter: !0
1690
1727
  })
1691
1728
  );
1692
1729
  s.add(r);
1693
- const c = o?.get(r) || Me, u = Ot(a, c);
1730
+ const l = o?.get(r) || qe, u = Mt(c, l, e.configIndex);
1694
1731
  if (e.collectSlots) {
1695
- fs(a, t, u.animation);
1696
- const h = _t(t);
1697
- return ke(
1698
- a,
1732
+ gs(c, t, u.animation);
1733
+ const h = kt(t);
1734
+ return Pe(
1735
+ c,
1699
1736
  { animation: h === "animation", transition: h === "transition", timeline: !1 },
1700
- c
1701
- ), e.targetsMap.set(r, a), [];
1737
+ l
1738
+ ), e.targetsMap.set(r, c), [];
1702
1739
  }
1703
1740
  t.namedEffect && (t.suffix = e.keyframeSlots.get(t.slotKey));
1704
- const { rules: l, keyframes: f, wrote: d } = us(
1741
+ const { rules: a, keyframes: f, wrote: d } = ps(
1705
1742
  e,
1706
1743
  t,
1707
- a,
1744
+ c,
1708
1745
  n,
1709
1746
  u,
1710
1747
  i
1711
1748
  );
1712
- return f.forEach(({ name: h, keyframes: m }) => e.keyframesMap.set(h, m)), ke(a, d, c), e.targetsMap.set(r, a), l;
1749
+ return f.forEach(({ name: h, keyframes: m }) => e.keyframesMap.set(h, m)), Pe(c, d, l), e.targetsMap.set(r, c), a;
1713
1750
  }
1714
- function ds(e, t, n, s) {
1715
- const i = [], o = /* @__PURE__ */ new Set(), r = os(t);
1751
+ function vs(e, t, n, s) {
1752
+ const i = [], o = /* @__PURE__ */ new Set(), r = us(t);
1716
1753
  i.push(
1717
1754
  ...t.effects.flatMap(
1718
- (c) => Mt(e, c, n, o, t, r)
1755
+ (l) => Pt(e, l, n, o, t, r)
1719
1756
  )
1720
1757
  );
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);
1758
+ const { conditions: c } = t;
1759
+ return o.forEach((l) => {
1760
+ s.add(l);
1761
+ const u = e.targetsMap.get(l), a = os(u, c, e.configConditions, e.configIndex);
1762
+ a && (a.declarations.forEach(({ name: f }) => u.assigned.add(f)), i.push(a)), fs(u);
1726
1763
  }), i;
1727
1764
  }
1728
- function hs(e, t, n) {
1729
- const { key: s, conditions: i, effects: o = [], sequences: r = [] } = t, a = e.plugins ? At(
1765
+ function ys(e, t, n) {
1766
+ const { key: s, conditions: i, effects: o = [], sequences: r = [] } = t, c = e.plugins ? qt(
1730
1767
  "interaction",
1731
1768
  t,
1732
1769
  s,
1733
- ne(i, e.configConditions, "media"),
1770
+ ie(i, e.configConditions, "media"),
1734
1771
  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));
1772
+ ) : [], { trigger: l } = t, u = {
1773
+ trigger: Un(l),
1774
+ id: Q("trigger", [n], e.configIndex)
1775
+ }, a = /* @__PURE__ */ new Set();
1776
+ l === "viewProgress" && c.push(ms(e, t, u.id, a));
1740
1777
  const f = o.map((h, m) => {
1741
- const p = Tt(
1778
+ const p = Ot(
1742
1779
  h,
1743
1780
  t,
1744
1781
  e.config,
1745
- `eff-${n}-${m}`
1782
+ Q("eff", [n, m], e.configIndex)
1746
1783
  );
1747
- return p && Object.assign(p, { slotKey: pe(n, m) });
1784
+ return p && Object.assign(p, { slotKey: ve(n, m) });
1748
1785
  }).filter((h) => h !== null);
1749
- a.push(
1750
- ...f.flatMap((h) => Mt(e, h, u, l))
1786
+ c.push(
1787
+ ...f.flatMap((h) => Pt(e, h, u, a))
1751
1788
  );
1752
1789
  const d = r.map(
1753
- (h, m) => Bn(
1790
+ (h, m) => Xn(
1754
1791
  h,
1755
1792
  t,
1756
1793
  e.config,
1757
- `seq-${n}-${m}`,
1758
- (p) => pe(n, p, m)
1794
+ Q("seq", [n, m], e.configIndex),
1795
+ (p) => ve(n, p, m)
1759
1796
  )
1760
1797
  ).filter((h) => h !== null);
1761
- return a.push(
1798
+ return c.push(
1762
1799
  ...d.flatMap(
1763
- (h) => ds(e, h, u, l)
1800
+ (h) => vs(e, h, u, a)
1764
1801
  )
1765
- ), c === "viewProgress" && l.size > 1 && e.scopedTimelines.push(`--${u.id}`), l.forEach((h) => as(e.targetsMap.get(h))), a;
1802
+ ), l === "viewProgress" && a.size > 1 && e.scopedTimelines.push(`--${u.id}`), a.forEach((h) => ds(e.targetsMap.get(h))), c;
1766
1803
  }
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 };
1804
+ function Es(e = {}) {
1805
+ return typeof e == "boolean" ? { useFirstChild: e } : e;
1770
1806
  }
1771
- function kt(e, t) {
1772
- const { useFirstChild: n = !0, plugins: s, collectSlots: i = !1 } = t, o = {
1807
+ function Lt(e, t) {
1808
+ const { useFirstChild: n = !0, plugins: s, configIndex: i, collectSlots: o = !1 } = t, r = {
1773
1809
  config: e,
1774
1810
  configConditions: e.conditions || {},
1775
1811
  targetsMap: /* @__PURE__ */ new Map(),
1776
1812
  keyframesMap: /* @__PURE__ */ new Map(),
1777
- keyframeSlots: i ? /* @__PURE__ */ new Map() : qt(e),
1813
+ keyframeSlots: o ? /* @__PURE__ */ new Map() : Ft(e, i),
1778
1814
  scopedTimelines: [],
1779
- collectSlots: i,
1815
+ collectSlots: o,
1780
1816
  useFirstChild: n,
1781
- plugins: s
1782
- }, r = e.interactions.flatMap(
1783
- (a, c) => hs(o, a, c)
1817
+ plugins: s,
1818
+ configIndex: i
1819
+ }, c = e.interactions.flatMap(
1820
+ (l, u) => ys(r, l, u)
1784
1821
  );
1785
- return { ctx: o, cssRules: r };
1822
+ return { ctx: r, cssRules: c };
1823
+ }
1824
+ function Q(e, t, n) {
1825
+ return [e, ...n === void 0 ? [] : [`c${n}`], ...t].join("-");
1786
1826
  }
1787
- function pe(e, t, n) {
1827
+ function ve(e, t, n) {
1788
1828
  return [e, n, t].filter((s) => s !== void 0).join(":");
1789
1829
  }
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)));
1830
+ function Ft(e, t) {
1831
+ const { ctx: n } = Lt(e, { configIndex: t, collectSlots: !0 }), s = /* @__PURE__ */ new Map(), i = (o) => o ? `-${o}` : void 0;
1832
+ return n.targetsMap.forEach(({ keyframeEntries: o }) => {
1833
+ const r = /* @__PURE__ */ new Set();
1834
+ o.forEach((c) => {
1835
+ const l = (f) => c.flatMap(({ getNames: d }) => d(i(f)));
1836
+ let u = 0, a = l(u);
1837
+ for (; a.some((f) => r.has(f)); )
1838
+ a = l(++u);
1839
+ a.forEach((f) => r.add(f)), u && c.forEach(({ slotKey: f }) => s.set(f, i(u)));
1800
1840
  });
1801
- }), n;
1841
+ }), s;
1802
1842
  }
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(
1843
+ function ws(e, t) {
1844
+ 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
1845
  i.flatMap((h) => [
1806
1846
  h,
1807
1847
  ...[...h.partSelectors].map((m) => ({ key: h.key, childSelector: m }))
1808
1848
  ]),
1809
1849
  o,
1810
1850
  r,
1811
- a
1812
- ), u = Math.max(0, ...i.map(({ animation: h }) => h.slotCursor)), l = Math.max(
1851
+ c,
1852
+ n.configIndex
1853
+ ), u = Math.max(0, ...i.map(({ animation: h }) => h.slotCursor)), a = Math.max(
1813
1854
  0,
1814
1855
  ...i.map(({ transition: h }) => h.slotCursor)
1815
- ), f = es(
1856
+ ), f = is(
1816
1857
  o,
1817
1858
  r,
1818
1859
  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 };
1860
+ a,
1861
+ c,
1862
+ n.configIndex
1863
+ ), d = as(n.scopedTimelines, n.configIndex);
1864
+ return { keyframes: n.keyframesMap, atProperty: f, cssRules: s, listsRule: l, timelineScopeRule: d };
1825
1865
  }
1826
- function xi(e, t) {
1827
- const { cssRules: n, keyframes: s, atProperty: i, listsRule: o, timelineScopeRule: r } = ps(
1866
+ function zi(e, t) {
1867
+ const { cssRules: n, keyframes: s, atProperty: i, listsRule: o, timelineScopeRule: r } = ws(
1828
1868
  e,
1829
1869
  t
1830
1870
  );
1831
1871
  return [
1832
1872
  ...i,
1833
- ...[...s.entries()].map(([c, u]) => Zn(c, u)),
1834
- ...n.map(Jn),
1873
+ ...[...s.entries()].map(([l, u]) => ts(l, u)),
1874
+ ...n.map(ns),
1835
1875
  o,
1836
1876
  r
1837
- ].filter((c) => c).join(`
1877
+ ].filter((l) => l).join(`
1838
1878
  `);
1839
1879
  }
1840
- const gs = {
1880
+ const $s = {
1841
1881
  root: null,
1842
1882
  rootMargin: "0px 0px -10% 0px",
1843
1883
  threshold: [0]
1844
- }, vs = {
1884
+ }, bs = {
1845
1885
  root: null,
1846
1886
  rootMargin: "0px",
1847
1887
  threshold: [0]
1848
- }, ys = 0.2;
1849
- function Es(e) {
1888
+ }, Ss = 0.2;
1889
+ function Is(e) {
1850
1890
  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
1891
  return `${i(n)} 0px ${i(s)}`;
1852
1892
  }
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;
1893
+ const X = {}, N = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakSet(), Y = /* @__PURE__ */ new WeakMap();
1894
+ let Rt = {}, B = null;
1895
+ function Ts(e) {
1896
+ Rt = e;
1857
1897
  }
1858
- function Lt(e, t, n) {
1859
- R.get(e)?.forEach(({ source: i, handler: o }) => {
1898
+ function xt(e, t, n) {
1899
+ N.get(e)?.forEach(({ source: i, handler: o }) => {
1860
1900
  i === e && o(t, n);
1861
1901
  });
1862
1902
  }
1863
- function Ue() {
1903
+ function Xe() {
1864
1904
  return B || (B = new IntersectionObserver((e) => {
1865
1905
  e.forEach((t) => {
1866
1906
  const n = t.target;
1867
- t.isIntersecting || Lt(n, !1, !0);
1907
+ t.isIntersecting || xt(n, !1, !0);
1868
1908
  });
1869
- }, vs), B);
1909
+ }, bs), B);
1870
1910
  }
1871
- function xt(e, t = !1) {
1911
+ function Nt(e, t = !1) {
1872
1912
  const n = JSON.stringify({ ...e, isSafeMode: t });
1873
- if (Q[n])
1874
- return Q[n];
1875
- const s = e.threshold ?? ys, i = t ? gs : {
1913
+ if (X[n])
1914
+ return X[n];
1915
+ const s = e.threshold ?? Ss, i = t ? $s : {
1876
1916
  root: null,
1877
- rootMargin: e.inset ? Es(e.inset) : "0px",
1917
+ rootMargin: e.inset ? Is(e.inset) : "0px",
1878
1918
  threshold: s
1879
1919
  }, 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;
1920
+ r.forEach((c) => {
1921
+ const l = c.target, u = !ye.has(l);
1922
+ if (u && (ye.add(l), e.useSafeViewEnter && !c.isIntersecting)) {
1923
+ A.measure(() => {
1924
+ const a = c.boundingClientRect.height, f = c.rootBounds?.height;
1885
1925
  if (!f)
1886
1926
  return;
1887
1927
  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);
1928
+ d && a * d > f && A.mutate(() => {
1929
+ o.unobserve(l);
1930
+ const m = Nt(e, !0);
1931
+ Y.set(l, m), m.observe(l);
1892
1932
  });
1893
1933
  });
1894
1934
  return;
1895
1935
  }
1896
- (a.isIntersecting || !u) && Lt(c, a.isIntersecting);
1936
+ (c.isIntersecting || !u) && xt(l, c.isIntersecting);
1897
1937
  });
1898
1938
  }, i);
1899
- return Q[n] = o, o;
1939
+ return X[n] = o, o;
1900
1940
  }
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(
1941
+ function Cs(e, t, n, s = {}, { reducedMotion: i, selectorCondition: o, animation: r } = {}) {
1942
+ const c = { ...Rt, ...s }, l = n.triggerType || "once", u = r || se(
1903
1943
  t,
1904
- F(n),
1944
+ x(n),
1905
1945
  void 0,
1906
1946
  i
1907
1947
  );
1908
1948
  if (!u)
1909
1949
  return;
1910
- const l = xt(a);
1911
- c !== "once" && u.persist?.();
1950
+ const a = Nt(c);
1951
+ l !== "once" && u.persist?.();
1912
1952
  let f = !0, d = !1, h;
1913
- h = { source: e, target: t, handler: (v, y) => {
1953
+ h = { source: e, target: t, handler: (g, y) => {
1914
1954
  if (!(o && !t.matches(o)))
1915
- if (c === "once") {
1916
- if (v && !d) {
1955
+ if (l === "once") {
1956
+ if (g && !d) {
1917
1957
  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);
1958
+ const E = N.get(e);
1959
+ (!E || E.size === 0 || E.size === 1 && E.has(h)) && ((Y.get(e) || a).unobserve(e), ye.delete(e)), u.onFinish(() => {
1960
+ N.get(e)?.delete(h), N.get(t)?.delete(h);
1921
1961
  }), u.play(() => {
1922
- const E = () => {
1962
+ const v = () => {
1923
1963
  t.dataset.interactEnter = "start";
1924
- };
1925
- if (u.isCSS) {
1926
- O.mutate(() => {
1927
- requestAnimationFrame(E);
1964
+ }, w = () => {
1965
+ A.mutate(() => {
1966
+ t.dataset.interactEnter = "done";
1928
1967
  });
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);
1968
+ };
1969
+ u.isCSS ? (A.mutate(() => {
1970
+ requestAnimationFrame(v);
1971
+ }), u.onFinish(w), u.onAbort(w)) : (A.mutate(v), u.onFinish(w));
1937
1972
  });
1938
1973
  }
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());
1974
+ } else l === "alternate" ? f && g ? (f = !1, u.play()) : f || u.reverse() : l === "repeat" ? g ? (u.progress(0), u.play()) : y && (u.pause(), u.progress(0)) : l === "state" && (g ? u.play() : y && u.pause());
1940
1975
  }, 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);
1976
+ (Y.get(e) || a).unobserve(e), (l === "repeat" || l === "state") && Xe().unobserve(e), u.cancel(), ye.delete(e), Y.delete(e);
1977
+ } }, k(N, e, h), k(N, t, h), Y.set(e, a), a.observe(e), (l === "repeat" || l === "state") && Xe().observe(e);
1943
1978
  }
1944
- function bs(e) {
1945
- se(R, e);
1979
+ function Os(e) {
1980
+ oe(N, e);
1946
1981
  }
1947
- function Ss() {
1948
- B = null, Object.keys(Q).forEach((e) => delete Q[e]);
1982
+ function _s() {
1983
+ B = null, Object.keys(X).forEach((e) => delete X[e]);
1949
1984
  }
1950
- const Is = {
1951
- add: $s,
1952
- remove: bs,
1953
- setOptions: ws,
1954
- reset: Ss
1985
+ const As = {
1986
+ add: Cs,
1987
+ remove: Os,
1988
+ setOptions: Ts,
1989
+ reset: _s
1955
1990
  };
1956
- function Ft(e, t) {
1991
+ function jt(e, t) {
1957
1992
  return Object.assign(Object.create(t), e);
1958
1993
  }
1959
- function Ts(e, t, n, s) {
1994
+ function Ms(e, t, n, s) {
1960
1995
  let i = e * (1 - n) + t * n;
1961
1996
  if (s) {
1962
1997
  const o = i - e;
@@ -1967,7 +2002,7 @@ function Ts(e, t, n, s) {
1967
2002
  }
1968
2003
  return i;
1969
2004
  }
1970
- function Cs(e) {
2005
+ function ks(e) {
1971
2006
  let t = !1;
1972
2007
  return function() {
1973
2008
  t || (t = !0, window.requestAnimationFrame(() => {
@@ -1975,7 +2010,7 @@ function Cs(e) {
1975
2010
  }));
1976
2011
  };
1977
2012
  }
1978
- function Qe(e, t) {
2013
+ function Ze(e, t) {
1979
2014
  let n = 0;
1980
2015
  return function() {
1981
2016
  n && window.clearTimeout(n), n = window.setTimeout(() => {
@@ -1983,38 +2018,38 @@ function Qe(e, t) {
1983
2018
  }, t);
1984
2019
  };
1985
2020
  }
1986
- function Os(e, t) {
2021
+ function qs(e, t) {
1987
2022
  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);
2023
+ return Ee(n[1], t) + Ee(n[6], t);
1989
2024
  }
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;
2025
+ function Ee(e, t) {
2026
+ 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
2027
  }
1993
2028
  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;
2029
+ const { name: s, offset: i = 0 } = e, { start: o, end: r } = n, c = r - o, l = i / 100;
2030
+ let u, a;
2031
+ 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
2032
  }
1998
- function Te(e, t, n, s, i) {
2033
+ function Oe(e, t, n, s, i) {
1999
2034
  let o = 0;
2000
2035
  const r = { start: t, end: n };
2001
- return e.forEach((a, c) => {
2002
- o += a.offset;
2003
- const u = a.sticky;
2036
+ return e.forEach((c, l) => {
2037
+ o += c.offset;
2038
+ const u = c.sticky;
2004
2039
  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);
2040
+ if ("end" in u && e[l - 1]?.element) {
2041
+ 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;
2042
+ let g = 0;
2043
+ (m || p) && (g = c.offset, r.end += g), m && (r.start += g);
2009
2044
  }
2010
2045
  if ("start" in u) {
2011
- const l = o - u.start, f = l < r.start, d = !f && l <= r.end;
2046
+ const a = o - u.start, f = a < r.start, d = !f && a <= r.end;
2012
2047
  let h = 0;
2013
- const m = e[c - 1]?.element;
2048
+ const m = e[l - 1]?.element;
2014
2049
  if (m) {
2015
2050
  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;
2051
+ const p = (i ? m.offsetWidth : m.offsetHeight) || 0, g = c.offset, y = (i ? c.element.offsetWidth : c.element.offsetHeight) || 0;
2052
+ h = p - (g + y), o += h, r.end += h;
2018
2053
  }
2019
2054
  f && (r.start += h);
2020
2055
  }
@@ -2022,55 +2057,55 @@ function Te(e, t, n, s, i) {
2022
2057
  }
2023
2058
  }), r;
2024
2059
  }
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;
2060
+ function Ps(e, t, n, s, i, o) {
2061
+ const { start: r, end: c, duration: l } = e;
2062
+ let u = r, a = c, f = e.startRange, d = e.endRange, h;
2063
+ if (typeof l == "string") {
2064
+ f = { name: l, offset: 0 }, d = { name: l, offset: 100 }, u = z(f, n, t), a = z(d, n, t), h = a - u;
2065
+ const m = Oe(o, u, a, n, s);
2066
+ u = m.start, a = m.end;
2032
2067
  } else {
2033
2068
  if (f || r?.name) {
2034
2069
  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);
2070
+ const m = Ee(f.add, i), p = z({ ...f, offset: 0 }, n, t), g = z({ ...f, offset: 100 }, n, t), y = Oe(o, p, g, n, s);
2036
2071
  u = y.start + f.offset / 100 * (y.end - y.start) + m;
2037
2072
  }
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);
2073
+ if (d || c?.name) {
2074
+ d = d || c;
2075
+ const m = Ee(d.add, i), p = z({ ...d, offset: 0 }, n, t), g = z({ ...d, offset: 100 }, n, t), y = Oe(o, p, g, n, s);
2076
+ a = y.start + d.offset / 100 * (y.end - y.start) + m;
2077
+ } else typeof l == "number" && (a = u + l);
2043
2078
  }
2044
- return !h && !c && (h = l - u), { ...e, start: u, end: l, startRange: f, endRange: d, duration: h || c };
2079
+ return !h && !l && (h = a - u), { ...e, start: u, end: a, startRange: f, endRange: d, duration: h || l };
2045
2080
  }
2046
- function As(e) {
2081
+ function Ls(e) {
2047
2082
  return e.position === "sticky";
2048
2083
  }
2049
- function Ms(e, t, n) {
2084
+ function Fs(e, t, n) {
2050
2085
  return e.position === "fixed" && (!t || t === window.document.body || t === n);
2051
2086
  }
2052
- function ks(e, t) {
2087
+ function Rs(e, t) {
2053
2088
  return parseInt(t ? e.left : e.top);
2054
2089
  }
2055
- function qs(e, t) {
2090
+ function xs(e, t) {
2056
2091
  return parseInt(t ? e.right : e.bottom);
2057
2092
  }
2058
- function Ps(e, t, n) {
2093
+ function Ns(e, t, n) {
2059
2094
  n && (e.style.position = "static");
2060
2095
  const s = (t ? e.offsetLeft : e.offsetTop) || 0;
2061
2096
  return n && (e.style.position = null), s;
2062
2097
  }
2063
- function Ls(e, t) {
2098
+ function js(e, t) {
2064
2099
  let n;
2065
- const s = ks(e, t), i = qs(e, t), o = !isNaN(s), r = !isNaN(i);
2100
+ const s = Rs(e, t), i = xs(e, t), o = !isNaN(s), r = !isNaN(i);
2066
2101
  return (o || r) && (n = {}, o && (n.start = s), r && (n.end = i)), n;
2067
2102
  }
2068
- function re(e, t, n, s, i) {
2103
+ function ce(e, t, n, s, i) {
2069
2104
  const o = e[0].viewSource, r = [];
2070
- let a = (s ? o.offsetWidth : o.offsetHeight) || 0, c = 0, u = o;
2105
+ let c = (s ? o.offsetWidth : o.offsetHeight) || 0, l = 0, u = o;
2071
2106
  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))
2107
+ const f = window.getComputedStyle(u), d = Ls(f), h = d ? js(f, s) : void 0, m = Ns(u, s, d);
2108
+ if ((!h || !("end" in h)) && (l += m), r.push({ element: u, offset: m, sticky: h }), u = u.offsetParent, Fs(f, u, t))
2074
2109
  break;
2075
2110
  if (u === t) {
2076
2111
  r.push({ element: u, offset: 0 });
@@ -2078,9 +2113,9 @@ function re(e, t, n, s, i) {
2078
2113
  }
2079
2114
  }
2080
2115
  return r.reverse(), e.map((f) => ({
2081
- ..._s(
2116
+ ...Ps(
2082
2117
  f,
2083
- { start: c, end: c + a },
2118
+ { start: l, end: l + c },
2084
2119
  n,
2085
2120
  s,
2086
2121
  i,
@@ -2088,7 +2123,7 @@ function re(e, t, n, s, i) {
2088
2123
  )
2089
2124
  }));
2090
2125
  }
2091
- const Xe = 100, xs = {
2126
+ const Je = 100, zs = {
2092
2127
  horizontal: !1,
2093
2128
  observeViewportEntry: !0,
2094
2129
  viewportRootMargin: "7% 7%",
@@ -2096,74 +2131,74 @@ const Xe = 100, xs = {
2096
2131
  observeSourcesResize: !1,
2097
2132
  observeContentResize: !1
2098
2133
  };
2099
- function Fs(e, t, n, s) {
2134
+ function Hs(e, t, n, s) {
2100
2135
  let i = 0;
2101
2136
  return e >= t && e <= n ? i = s ? (e - t) / s : 1 : e > n && (i = 1), i;
2102
2137
  }
2103
- function Ze(e, t) {
2138
+ function et(e, t) {
2104
2139
  return e === window ? t ? window.document.documentElement.clientWidth : window.document.documentElement.clientHeight : t ? e.clientWidth : e.clientHeight;
2105
2140
  }
2106
- function Rs() {
2141
+ function Ds() {
2107
2142
  return {
2108
2143
  viewportWidth: window.document.documentElement.clientWidth,
2109
2144
  viewportHeight: window.document.documentElement.clientHeight
2110
2145
  };
2111
2146
  }
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();
2147
+ function Gs(e) {
2148
+ const t = jt(e, zs), n = t.root, s = t.horizontal, i = /* @__PURE__ */ new WeakMap();
2149
+ let o = et(n, s), r, c, l, u, a;
2150
+ const f = [], d = Ds();
2116
2151
  if (t.scenes = Object.values(
2117
2152
  // TODO(ameerf): find a polyfill and use groupBy instead of following reduce
2118
2153
  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;
2154
+ (p, g, y) => {
2155
+ const E = g.groupId ? `group-${g.groupId}` : String(y);
2156
+ return p[E] ? p[E].push(g) : p[E] = [g], p;
2122
2157
  },
2123
2158
  {}
2124
2159
  )
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;
2160
+ ).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) => {
2161
+ g.end == null && (g.end = g.start + g.duration), g.duration == null && (g.duration = g.end - g.start);
2162
+ }), p)), t.scenes.forEach((p, g) => {
2163
+ p.index = g;
2129
2164
  }), f.length) {
2130
2165
  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);
2166
+ window.ResizeObserver && (l = new window.ResizeObserver(function(g) {
2167
+ g.forEach((y) => {
2168
+ const E = p.get(y.target), v = ce(E, n, o, s, d);
2169
+ v.forEach((w, b) => {
2170
+ t.scenes[w.index] = v[b];
2171
+ }), f.splice(f.indexOf(E), 1, v);
2137
2172
  });
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;
2173
+ }), f.forEach((g) => {
2174
+ l.observe(g[0].viewSource, { box: "border-box" }), p.set(g[0].viewSource, g);
2175
+ }), t.observeContentResize && t.contentRoot && new window.ResizeObserver(Ze(() => {
2176
+ const y = f.map((E) => {
2177
+ const v = ce(E, n, o, s, d);
2178
+ return v.forEach((w, b) => {
2179
+ t.scenes[w.index] = v[b];
2180
+ }), v;
2146
2181
  });
2147
- f.length = 0, f.push(...y), f.forEach((g) => {
2148
- p.set(g[0].viewSource, g);
2182
+ f.length = 0, f.push(...y), f.forEach((E) => {
2183
+ p.set(E[0].viewSource, E);
2149
2184
  });
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;
2185
+ }, Je)).observe(t.contentRoot, { box: "border-box" })), t.observeViewportResize && (u = Ze(function() {
2186
+ o = et(n, s);
2187
+ const g = f.map((y) => {
2188
+ const E = ce(y, n, o, s, d);
2189
+ return E.forEach((v, w) => {
2190
+ t.scenes[v.index] = E[w];
2191
+ }), E;
2157
2192
  });
2158
- f.length = 0, f.push(...v), f.forEach((y) => {
2193
+ f.length = 0, f.push(...g), f.forEach((y) => {
2159
2194
  p.set(y[0].viewSource, y);
2160
2195
  });
2161
- }, Xe), n === window ? window.addEventListener("resize", u) : window.ResizeObserver && (l = new window.ResizeObserver(u), l.observe(n, { box: "border-box" })));
2196
+ }, Je), n === window ? window.addEventListener("resize", u) : window.ResizeObserver && (a = new window.ResizeObserver(u), a.observe(n, { box: "border-box" })));
2162
2197
  }
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;
2198
+ t.observeViewportEntry && window.IntersectionObserver && (c = new window.IntersectionObserver(function(p) {
2199
+ p.forEach((g) => {
2200
+ (i.get(g.target) || []).forEach((y) => {
2201
+ y.disabled = !g.isIntersecting;
2167
2202
  });
2168
2203
  });
2169
2204
  }, {
@@ -2172,40 +2207,40 @@ function Ns(e) {
2172
2207
  threshold: 0
2173
2208
  }), t.scenes.forEach((p) => {
2174
2209
  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);
2210
+ let g = i.get(p.viewSource);
2211
+ g || (g = [], i.set(p.viewSource, g), c.observe(p.viewSource)), g.push(p);
2177
2212
  }
2178
2213
  }));
2179
- function h({ p, vp: v }) {
2214
+ function h({ p, vp: g }) {
2180
2215
  p = +p.toFixed(1);
2181
- const y = +v.toFixed(4);
2216
+ const y = +g.toFixed(4);
2182
2217
  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);
2218
+ for (let E of t.scenes)
2219
+ if (!E.disabled) {
2220
+ const { start: v, end: w, duration: b } = E, S = Hs(p, v, w, b);
2221
+ E.effect(E, S, y);
2187
2222
  }
2188
2223
  r = p;
2189
2224
  }
2190
2225
  }
2191
2226
  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));
2227
+ 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
2228
  }
2194
2229
  return {
2195
2230
  tick: h,
2196
2231
  destroy: m
2197
2232
  };
2198
2233
  }
2199
- const js = {
2234
+ const Ws = {
2200
2235
  transitionActive: !1,
2201
2236
  transitionFriction: 0.9,
2202
2237
  transitionEpsilon: 1,
2203
2238
  velocityActive: !1,
2204
2239
  velocityMax: 1
2205
2240
  };
2206
- class zs {
2241
+ class Vs {
2207
2242
  constructor(t = {}) {
2208
- this.config = Ft(t, js), this.progress = {
2243
+ this.config = jt(t, Ws), this.progress = {
2209
2244
  p: 0,
2210
2245
  prevP: 0,
2211
2246
  vp: 0
@@ -2218,7 +2253,7 @@ class zs {
2218
2253
  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
2254
  const s = this.config.root;
2220
2255
  this.progress.p = this.config.horizontal ? s.scrollX || s.scrollLeft || 0 : s.scrollY || s.scrollTop || 0;
2221
- }), this._trigger = Cs(() => {
2256
+ }), this._trigger = ks(() => {
2222
2257
  this._measure?.(), this.tick(!0);
2223
2258
  });
2224
2259
  }
@@ -2264,7 +2299,7 @@ class zs {
2264
2299
  * Calculate current progress.
2265
2300
  */
2266
2301
  lerp() {
2267
- this.currentProgress.p = Ts(this.currentProgress.p, this.progress.p, +(1 - this.config.transitionFriction).toFixed(3), this.config.transitionEpsilon);
2302
+ this.currentProgress.p = Ms(this.currentProgress.p, this.progress.p, +(1 - this.config.transitionFriction).toFixed(3), this.config.transitionEpsilon);
2268
2303
  }
2269
2304
  /**
2270
2305
  * Stop the event and effect, and remove all DOM side-effects.
@@ -2288,7 +2323,7 @@ class zs {
2288
2323
  * Reset registered effect.
2289
2324
  */
2290
2325
  setupEffect() {
2291
- this.removeEffect(), this.effect = Ns(this.config);
2326
+ this.removeEffect(), this.effect = Gs(this.config);
2292
2327
  }
2293
2328
  /**
2294
2329
  * Remove registered effect.
@@ -2297,42 +2332,42 @@ class zs {
2297
2332
  this.effect && this.effect.destroy(), this.effect = null;
2298
2333
  }
2299
2334
  }
2300
- const qe = /* @__PURE__ */ new WeakMap();
2301
- let Rt = () => ({});
2302
- function Hs(e) {
2303
- Rt = e;
2335
+ const Le = /* @__PURE__ */ new WeakMap();
2336
+ let zt = () => ({});
2337
+ function Ks(e) {
2338
+ zt = e;
2304
2339
  }
2305
- function Ds(e, t, n, s, { reducedMotion: i, selectorCondition: o }) {
2340
+ function Ys(e, t, n, s, { reducedMotion: i, selectorCondition: o }) {
2306
2341
  if (i || o && !t.matches(o)) return;
2307
2342
  const r = {
2308
2343
  trigger: "view-progress",
2309
2344
  element: e
2310
- }, a = F(n);
2311
- let c;
2345
+ }, c = x(n);
2346
+ let l;
2312
2347
  if ("ViewTimeline" in window) {
2313
- const l = te(
2348
+ const a = se(
2314
2349
  t,
2315
- a,
2350
+ c,
2316
2351
  r
2317
2352
  );
2318
- l && !l.isCSS && (l.play(), c = () => {
2319
- l.ready.then(() => {
2320
- l.cancel();
2353
+ a && !a.isCSS && (a.play(), l = () => {
2354
+ a.ready.then(() => {
2355
+ a.cancel();
2321
2356
  });
2322
2357
  });
2323
2358
  } else {
2324
- const l = wt(t, a, r);
2325
- if (l) {
2326
- const f = Array.isArray(l) ? l : [l], d = new zs({
2359
+ const a = bt(t, c, r);
2360
+ if (a) {
2361
+ const f = Array.isArray(a) ? a : [a], d = new Vs({
2327
2362
  viewSource: e,
2328
2363
  scenes: f,
2329
2364
  observeViewportEntry: !1,
2330
2365
  observeViewportResize: !1,
2331
2366
  observeSourcesResize: !0,
2332
2367
  root: document.body,
2333
- ...Rt()
2368
+ ...zt()
2334
2369
  });
2335
- c = () => {
2370
+ l = () => {
2336
2371
  d.destroy();
2337
2372
  }, Promise.all(f.map((h) => h.ready || Promise.resolve())).then(
2338
2373
  () => {
@@ -2341,22 +2376,22 @@ function Ds(e, t, n, s, { reducedMotion: i, selectorCondition: o }) {
2341
2376
  );
2342
2377
  }
2343
2378
  }
2344
- if (!c) return;
2345
- const u = { source: e, target: t, cleanup: c };
2346
- k(qe, e, u), k(qe, t, u);
2379
+ if (!l) return;
2380
+ const u = { source: e, target: t, cleanup: l };
2381
+ k(Le, e, u), k(Le, t, u);
2347
2382
  }
2348
- function Gs(e) {
2349
- se(qe, e);
2383
+ function Bs(e) {
2384
+ oe(Le, e);
2350
2385
  }
2351
- const Ws = {
2352
- add: Ds,
2353
- remove: Gs,
2354
- registerOptionsGetter: Hs
2386
+ const Us = {
2387
+ add: Ys,
2388
+ remove: Bs,
2389
+ registerOptionsGetter: Ks
2355
2390
  };
2356
- function Je(e, t, n) {
2391
+ function tt(e, t, n) {
2357
2392
  return Math.min(Math.max(e, n), t);
2358
2393
  }
2359
- function et(e) {
2394
+ function nt(e) {
2360
2395
  let t = !1;
2361
2396
  return function() {
2362
2397
  if (!t)
@@ -2365,7 +2400,7 @@ function et(e) {
2365
2400
  });
2366
2401
  };
2367
2402
  }
2368
- function Vs(e) {
2403
+ function Qs(e) {
2369
2404
  let t = e, n = 0, s = 0;
2370
2405
  if (t.offsetParent)
2371
2406
  do
@@ -2378,7 +2413,7 @@ function Vs(e) {
2378
2413
  height: e.offsetHeight
2379
2414
  };
2380
2415
  }
2381
- function Ks() {
2416
+ function Xs() {
2382
2417
  const e = window.devicePixelRatio;
2383
2418
  let t = !1;
2384
2419
  if (e === 1)
@@ -2391,13 +2426,13 @@ function Ks() {
2391
2426
  });
2392
2427
  return document.body.dispatchEvent(n), t;
2393
2428
  }
2394
- function Ys() {
2429
+ function Zs() {
2395
2430
  return new Promise((e) => {
2396
2431
  const t = window.scrollY;
2397
2432
  let n = !1, s;
2398
2433
  function i() {
2399
- document.body.addEventListener("pointerdown", (a) => {
2400
- s === void 0 ? s = a.offsetY : n = a.offsetY === s;
2434
+ document.body.addEventListener("pointerdown", (c) => {
2435
+ s === void 0 ? s = c.offsetY : n = c.offsetY === s;
2401
2436
  }, { once: !0 });
2402
2437
  const r = new PointerEvent("pointerdown", {
2403
2438
  clientY: 500
@@ -2410,60 +2445,60 @@ function Ys() {
2410
2445
  i(), window.addEventListener("scroll", o), window.scrollY > 0 && window.scrollBy(0, -1);
2411
2446
  });
2412
2447
  }
2413
- function Bs(e) {
2414
- Ys().then((t) => {
2448
+ function Js(e) {
2449
+ Zs().then((t) => {
2415
2450
  e.fixRequired = t, t && (window.addEventListener("scroll", e.scrollHandler), e.scrollHandler());
2416
2451
  });
2417
2452
  }
2418
- let ae = 0;
2419
- const he = /* @__PURE__ */ new Set();
2420
- function Us() {
2453
+ let le = 0;
2454
+ const pe = /* @__PURE__ */ new Set();
2455
+ function ei() {
2421
2456
  const e = (n) => {
2422
2457
  for (let s of n.changedTouches)
2423
- he.add(s.identifier);
2458
+ pe.add(s.identifier);
2424
2459
  }, t = (n) => {
2425
2460
  for (let s of n.changedTouches)
2426
- he.delete(s.identifier);
2461
+ pe.delete(s.identifier);
2427
2462
  };
2428
2463
  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);
2464
+ pe.clear(), document.removeEventListener("touchstart", e), document.removeEventListener("touchend", t);
2430
2465
  };
2431
2466
  }
2432
- function Qs(e, t) {
2467
+ function ti(e, t) {
2433
2468
  if ("onscrollend" in window)
2434
2469
  return e.addEventListener("scrollend", t), function() {
2435
2470
  e.removeEventListener("scrollend", t);
2436
2471
  };
2437
2472
  let n = 0, s;
2438
- ae || (s = Us()), ae += 1;
2473
+ le || (s = ei()), le += 1;
2439
2474
  function i(o) {
2440
2475
  clearTimeout(n), n = setTimeout(() => {
2441
- he.size ? setTimeout(i, 100) : (t(o), n = 0);
2476
+ pe.size ? setTimeout(i, 100) : (t(o), n = 0);
2442
2477
  }, 100);
2443
2478
  }
2444
2479
  return e.addEventListener("scroll", i), function() {
2445
- e.removeEventListener("scroll", i), ae -= 1, ae || s();
2480
+ e.removeEventListener("scroll", i), le -= 1, le || s();
2446
2481
  };
2447
2482
  }
2448
- function Xs(e, t, n) {
2483
+ function ni(e, t, n) {
2449
2484
  return {
2450
2485
  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;
2486
+ 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;
2487
+ return (s - c) / r;
2453
2488
  },
2454
2489
  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;
2490
+ 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;
2491
+ return (s - c) / r;
2457
2492
  }
2458
2493
  };
2459
2494
  }
2460
- function Zs(e, t) {
2495
+ function si(e, t) {
2461
2496
  this.x = window.scrollX, this.y = window.scrollY, requestAnimationFrame(() => e && e(t));
2462
2497
  }
2463
- function Js(e) {
2498
+ function ii(e) {
2464
2499
  e.rect.width = window.document.documentElement.clientWidth, e.rect.height = window.document.documentElement.clientHeight;
2465
2500
  }
2466
- function ei(e) {
2501
+ function oi(e) {
2467
2502
  const t = new ResizeObserver((n) => {
2468
2503
  n.forEach((s) => {
2469
2504
  e.rect.width = s.borderBoxSize[0].inlineSize, e.rect.height = s.borderBoxSize[0].blockSize;
@@ -2471,38 +2506,38 @@ function ei(e) {
2471
2506
  });
2472
2507
  return t.observe(e.root, { box: "border-box" }), t;
2473
2508
  }
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) {
2509
+ function ri(e) {
2510
+ let t = !1, n = { x: e.rect.width / 2, y: e.rect.height / 2, vx: 0, vy: 0 }, s, i, o, r, c;
2511
+ const l = { x: 0, y: 0 };
2512
+ e.scenes.forEach((a) => {
2513
+ 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));
2514
+ }), s = function(a) {
2480
2515
  for (let f of e.scenes)
2481
2516
  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);
2517
+ const d = f.transform?.x(a.x) || a.x / e.rect.width, h = f.transform?.y(a.y) || a.y / e.rect.height, m = +tt(0, 1, d).toPrecision(4), p = +tt(0, 1, h).toPrecision(4), g = { x: a.vx, y: a.vy };
2518
+ e.allowActiveEvent && (a.active = d <= 1 && h <= 1 && d >= 0 && h >= 0), f.effect(f, { x: m, y: p }, g, a.active);
2484
2519
  }
2485
- Object.assign(n, l);
2486
- }, t && (r = Zs.bind(c, s, n), a = Qs(document, r));
2520
+ Object.assign(n, a);
2521
+ }, t && (r = si.bind(l, s, n), c = ti(document, r));
2487
2522
  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;
2523
+ e.scenes.forEach((a) => a.destroy?.()), c?.(), i ? (i.disconnect(), i = null) : (window.removeEventListener("resize", o), o = null), s = null, n = null;
2489
2524
  }
2490
2525
  return {
2491
2526
  tick: s,
2492
2527
  destroy: u
2493
2528
  };
2494
2529
  }
2495
- const ni = 1e3 / 60 * 3;
2496
- let ce;
2497
- function si() {
2498
- D.x = window.scrollX, D.y = window.scrollY;
2530
+ const ai = 1e3 / 60 * 3;
2531
+ let ue;
2532
+ function ci() {
2533
+ H.x = window.scrollX, H.y = window.scrollY;
2499
2534
  }
2500
- const D = { x: 0, y: 0, scrollHandler: si, fixRequired: void 0 };
2501
- class ii {
2535
+ const H = { x: 0, y: 0, scrollHandler: ci, fixRequired: void 0 };
2536
+ class li {
2502
2537
  constructor(t = {}) {
2503
2538
  this.config = { ...t }, this.effect = null, this._nextTick = null, this._nextTransitionTick = null, this._startTime = 0;
2504
2539
  let n;
2505
- this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() : et(() => this.transition()) : n = this.config.noThrottle ? () => (this.tick(), null) : et(() => {
2540
+ this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() : nt(() => this.transition()) : n = this.config.noThrottle ? () => (this.tick(), null) : nt(() => {
2506
2541
  this.tick();
2507
2542
  }), this.config.rect = this.config.root ? {
2508
2543
  width: this.config.root.offsetWidth,
@@ -2525,15 +2560,15 @@ class ii {
2525
2560
  }, this._pointerEnter = () => {
2526
2561
  this.progress.active = !0, this._nextTick = n();
2527
2562
  }, 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) => {
2563
+ ue = typeof ue == "boolean" ? ue : Xs();
2564
+ const i = ue ? window.devicePixelRatio : 1;
2565
+ typeof H.fixRequired > "u" && Js(H), this._measure = (o) => {
2531
2566
  if (o.target !== this.config.root) {
2532
2567
  const r = new PointerEvent("pointermove", {
2533
2568
  bubbles: !0,
2534
2569
  cancelable: !0,
2535
- clientX: o.x * i + D.x,
2536
- clientY: o.y * i + D.y
2570
+ clientX: o.x * i + H.x,
2571
+ clientY: o.y * i + H.y
2537
2572
  });
2538
2573
  o.stopPropagation(), this.config.root.dispatchEvent(r);
2539
2574
  } else
@@ -2569,8 +2604,8 @@ class ii {
2569
2604
  const t = this.config.transitionDuration, n = this.config.transitionEasing || ((r) => r), s = performance.now();
2570
2605
  let i = !1;
2571
2606
  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);
2607
+ const c = (r - this._startTime) / t, l = n(Math.min(1, c));
2608
+ 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
2609
  };
2575
2610
  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
2611
  }
@@ -2599,7 +2634,7 @@ class ii {
2599
2634
  * Reset registered effect.
2600
2635
  */
2601
2636
  setupEffect() {
2602
- this.removeEffect(), this.effect = ti(this.config);
2637
+ this.removeEffect(), this.effect = ri(this.config);
2603
2638
  }
2604
2639
  /**
2605
2640
  * Remove registered effect.
@@ -2608,98 +2643,98 @@ class ii {
2608
2643
  this.effect && this.effect.destroy(), this.effect = null;
2609
2644
  }
2610
2645
  }
2611
- const Pe = /* @__PURE__ */ new WeakMap();
2612
- let Nt = () => ({});
2613
- function oi(e) {
2614
- Nt = e;
2646
+ const Fe = /* @__PURE__ */ new WeakMap();
2647
+ let Ht = () => ({});
2648
+ function ui(e) {
2649
+ Ht = e;
2615
2650
  }
2616
- function ri(e, t, n, s = {}, { reducedMotion: i, selectorCondition: o }) {
2651
+ function fi(e, t, n, s = {}, { reducedMotion: i, selectorCondition: o }) {
2617
2652
  if (i || o && !t.matches(o)) return;
2618
2653
  const r = {
2619
2654
  trigger: "pointer-move",
2620
2655
  element: e,
2621
2656
  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({
2657
+ }, c = bt(t, x(n), r);
2658
+ if (c) {
2659
+ const l = Array.isArray(c) ? c : [c], u = new li({
2625
2660
  root: s.hitArea === "self" ? e : void 0,
2626
- scenes: c,
2627
- ...Nt()
2661
+ scenes: l,
2662
+ ...Ht()
2628
2663
  }), f = { source: e, target: t, cleanup: () => {
2629
2664
  u.destroy();
2630
2665
  } };
2631
- k(Pe, e, f), k(Pe, t, f), Promise.all(
2632
- c.map((d) => d.ready || Promise.resolve())
2666
+ k(Fe, e, f), k(Fe, t, f), Promise.all(
2667
+ l.map((d) => d.ready || Promise.resolve())
2633
2668
  ).then(() => {
2634
2669
  u.start();
2635
2670
  });
2636
2671
  }
2637
2672
  }
2638
- function ai(e) {
2639
- se(Pe, e);
2673
+ function di(e) {
2674
+ oe(Fe, e);
2640
2675
  }
2641
- const ci = {
2642
- add: ri,
2643
- remove: ai,
2644
- registerOptionsGetter: oi
2645
- }, Le = /* @__PURE__ */ new WeakMap();
2646
- function li(e, t, n, s, {
2676
+ const hi = {
2677
+ add: fi,
2678
+ remove: di,
2679
+ registerOptionsGetter: ui
2680
+ }, Re = /* @__PURE__ */ new WeakMap();
2681
+ function mi(e, t, n, s, {
2647
2682
  reducedMotion: i,
2648
2683
  selectorCondition: o,
2649
2684
  animation: r,
2650
- sourceAnimationOptions: a
2685
+ sourceAnimationOptions: c
2651
2686
  }) {
2652
- const c = r || te(
2687
+ const l = r || se(
2653
2688
  t,
2654
- F(n),
2689
+ x(n),
2655
2690
  void 0,
2656
2691
  i
2657
2692
  );
2658
- if (!c)
2693
+ if (!l)
2659
2694
  return;
2660
- const { effectId: u } = s, l = (h) => {
2695
+ const { effectId: u } = s, a = (h) => {
2661
2696
  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))
2697
+ const m = h.animationName, p = h.detail?.effectId, g = c ? $t(e, c) : null;
2698
+ if (g) {
2699
+ if (g.playState === "running" || m && !g.hasAnimationName(m))
2665
2700
  return;
2666
- if (p && p !== u && !v.hasAnimationId(p))
2701
+ if (p && p !== u && !g.hasAnimationId(p))
2667
2702
  return;
2668
2703
  }
2669
- c.play();
2704
+ l.play();
2670
2705
  }, d = { source: e, target: t, cleanup: () => {
2671
- c.cancel(), e.removeEventListener("animationend", l);
2706
+ l.cancel(), e.removeEventListener("animationend", a);
2672
2707
  } };
2673
- k(Le, e, d), k(Le, t, d), e.addEventListener("animationend", l);
2708
+ k(Re, e, d), k(Re, t, d), e.addEventListener("animationend", a);
2674
2709
  }
2675
- function ui(e) {
2676
- se(Le, e);
2710
+ function pi(e) {
2711
+ oe(Re, e);
2677
2712
  }
2678
- const fi = {
2679
- add: li,
2680
- remove: ui
2713
+ const gi = {
2714
+ add: mi,
2715
+ remove: pi
2681
2716
  };
2682
- function di(e, t, n = !1, s, i, o) {
2683
- const r = o || te(
2717
+ function vi(e, t, n = !1, s, i, o) {
2718
+ const r = o || se(
2684
2719
  e,
2685
- F(t),
2720
+ x(t),
2686
2721
  void 0,
2687
2722
  n
2688
2723
  );
2689
2724
  if (!r)
2690
2725
  return null;
2691
- let a = !0;
2692
- const c = t.triggerType || "alternate";
2726
+ let c = !0;
2727
+ const l = t.triggerType || "alternate";
2693
2728
  return (u) => {
2694
2729
  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());
2730
+ const a = !i, f = i?.enter?.includes(u.type), d = i?.leave?.includes(u.type);
2731
+ if (f || a) {
2732
+ if (l === "alternate" || l === "state")
2733
+ c ? (c = !1, r.play()) : l === "alternate" ? r.reverse() : l === "state" && (r.playState === "running" ? r.pause() : r.playState !== "finished" && r.play());
2699
2734
  else {
2700
2735
  if (r.progress(0), delete e.dataset.interactEnter, r.isCSS) {
2701
2736
  const h = () => {
2702
- O.mutate(() => {
2737
+ A.mutate(() => {
2703
2738
  e.dataset.interactEnter = "done";
2704
2739
  });
2705
2740
  };
@@ -2709,113 +2744,113 @@ function di(e, t, n = !1, s, i, o) {
2709
2744
  }
2710
2745
  return;
2711
2746
  }
2712
- d && (c === "alternate" ? r.reverse() : c === "repeat" ? (r.cancel(), O.mutate(() => {
2747
+ d && (l === "alternate" ? r.reverse() : l === "repeat" ? (r.cancel(), A.mutate(() => {
2713
2748
  delete e.dataset.interactEnter;
2714
- })) : c === "state" && r.playState === "running" && r.pause());
2749
+ })) : l === "state" && r.playState === "running" && r.pause());
2715
2750
  };
2716
2751
  }
2717
- function hi(e, t, {
2752
+ function yi(e, t, {
2718
2753
  effectId: n,
2719
2754
  listContainer: s,
2720
2755
  listItemSelector: i,
2721
2756
  stateAction: o
2722
- }, r, a) {
2723
- const c = !!s, u = o ?? "toggle", l = u === "toggle";
2757
+ }, r, c) {
2758
+ const l = !!s, u = o ?? "toggle", a = u === "toggle";
2724
2759
  return (f) => {
2725
2760
  if (r && !e.matches(r)) return;
2726
- const d = c ? e.closest(
2761
+ const d = l ? e.closest(
2727
2762
  `${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));
2763
+ ) : void 0, h = !c, m = c?.enter?.includes(f.type), p = c?.leave?.includes(f.type);
2764
+ h ? t.toggleEffect(n, u, d) : (m && t.toggleEffect(n, a ? "add" : u, d), p && a && t.toggleEffect(n, "remove", d));
2730
2765
  };
2731
2766
  }
2732
2767
  const xe = /* @__PURE__ */ new WeakMap();
2733
- function tt(e, t) {
2768
+ function st(e, t) {
2734
2769
  return (n) => {
2735
2770
  const s = n;
2736
2771
  e.contains(s.relatedTarget) || t(s);
2737
2772
  };
2738
2773
  }
2739
- function mi(e) {
2774
+ function Ei(e) {
2740
2775
  return (t) => {
2741
2776
  const n = t;
2742
- n.pointerType && e(n);
2777
+ (n.pointerType || n.detail > 0) && e(n);
2743
2778
  };
2744
2779
  }
2745
- function pi(e) {
2780
+ function wi(e) {
2746
2781
  return (t) => {
2747
2782
  const n = t;
2748
2783
  n.code === "Space" ? (n.preventDefault(), e(n)) : n.code === "Enter" && e(n);
2749
2784
  };
2750
2785
  }
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)
2786
+ const $i = {
2787
+ focusin: (e, t) => st(e, t),
2788
+ focusout: (e, t) => st(e, t),
2789
+ click: (e, t) => Ei(t),
2790
+ keydown: (e, t) => wi(t)
2756
2791
  };
2757
- function vi(e, t, n) {
2758
- const s = gi[e];
2792
+ function bi(e, t, n) {
2793
+ const s = $i[e];
2759
2794
  return s ? s(t, n) : (i) => n(i);
2760
2795
  }
2761
- function yi(e) {
2796
+ function Si(e) {
2762
2797
  return typeof e == "object" && !Array.isArray(e) && ("enter" in e || "leave" in e);
2763
2798
  }
2764
- function Ei(e) {
2799
+ function Ii(e) {
2765
2800
  if (typeof e == "string")
2766
2801
  return { toggle: [e] };
2767
2802
  if (Array.isArray(e))
2768
2803
  return { toggle: [...e] };
2769
- if (yi(e)) {
2804
+ if (Si(e)) {
2770
2805
  const t = e.enter ? [...e.enter] : [], n = e.leave ? [...e.leave] : [];
2771
2806
  return { enter: t, leave: n };
2772
2807
  }
2773
2808
  return {};
2774
2809
  }
2775
- function wi(e) {
2810
+ function Ti(e) {
2776
2811
  return !!(e.enter?.length || e.leave?.length);
2777
2812
  }
2778
- function $i(e) {
2779
- return wi(e) ? { enter: e.enter ?? [], leave: e.leave ?? [] } : void 0;
2813
+ function Ci(e) {
2814
+ return Ti(e) ? { enter: e.enter ?? [], leave: e.leave ?? [] } : void 0;
2780
2815
  }
2781
- function bi(e, t, n, s, {
2816
+ function Oi(e, t, n, s, {
2782
2817
  reducedMotion: i,
2783
2818
  targetController: o,
2784
2819
  selectorCondition: r,
2785
- animation: a
2820
+ animation: c
2786
2821
  }) {
2787
- const c = Ei(s.eventConfig), u = n.transition || n.transitionProperties, l = $i(c);
2822
+ const l = Ii(s.eventConfig), u = n.transition || n.transitionProperties, a = Ci(l);
2788
2823
  let f, d = !1;
2789
- if (u ? f = hi(
2824
+ if (u ? f = yi(
2790
2825
  t,
2791
2826
  o,
2792
2827
  n,
2793
2828
  r,
2794
- l
2795
- ) : (f = di(
2829
+ a
2830
+ ) : (f = vi(
2796
2831
  t,
2797
2832
  n,
2798
2833
  i,
2799
2834
  r,
2800
- l,
2801
- a
2835
+ a,
2836
+ c
2802
2837
  ), d = n.triggerType === "once"), !f)
2803
2838
  return;
2804
2839
  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 });
2840
+ function p(E, v, w) {
2841
+ const b = bi(v, e, h);
2842
+ E.addEventListener(v, b, { ...w, signal: m.signal });
2808
2843
  }
2809
2844
  const y = { source: e, target: t, cleanup: () => {
2810
2845
  m.abort();
2811
2846
  } };
2812
- if (k(xe, e, y), k(xe, t, y), l) {
2813
- const g = c.enter, E = c.leave;
2814
- g.forEach((S) => {
2847
+ if (k(xe, e, y), k(xe, t, y), a) {
2848
+ const E = l.enter, v = l.leave;
2849
+ E.forEach((S) => {
2815
2850
  S === "focusin" && (e.tabIndex = 0), p(e, S, { passive: !0, once: d });
2816
2851
  });
2817
2852
  const w = !n.stateAction || n.stateAction === "toggle";
2818
- (u ? w : n.triggerType !== "once") && E.forEach((S) => {
2853
+ (u ? w : n.triggerType !== "once") && v.forEach((S) => {
2819
2854
  if (S === "focusout") {
2820
2855
  p(e, S, { once: d });
2821
2856
  return;
@@ -2823,17 +2858,17 @@ function bi(e, t, n, s, {
2823
2858
  p(e, S, { passive: !0 });
2824
2859
  });
2825
2860
  } else
2826
- (c.toggle ?? []).forEach((E) => {
2827
- p(e, E, { once: d, passive: E !== "keydown" });
2861
+ (l.toggle ?? []).forEach((v) => {
2862
+ p(e, v, { once: d, passive: v !== "keydown" });
2828
2863
  });
2829
2864
  }
2830
- function Si(e) {
2831
- se(xe, e);
2865
+ function _i(e) {
2866
+ oe(xe, e);
2832
2867
  }
2833
2868
  const U = {
2834
- add: bi,
2835
- remove: Si
2836
- }, Fe = {
2869
+ add: Oi,
2870
+ remove: _i
2871
+ }, Ne = {
2837
2872
  click: ["click"],
2838
2873
  activate: ["click", "keydown"],
2839
2874
  hover: { enter: ["mouseenter"], leave: ["mouseleave"] },
@@ -2841,40 +2876,40 @@ const U = {
2841
2876
  enter: ["mouseenter", "focusin"],
2842
2877
  leave: ["mouseleave", "focusout"]
2843
2878
  }
2844
- }, nt = {
2845
- click: Fe.activate,
2846
- hover: Fe.interest
2879
+ }, it = {
2880
+ click: Ne.activate,
2881
+ hover: Ne.interest
2847
2882
  };
2848
- function le(e) {
2849
- const t = Fe[e];
2883
+ function fe(e) {
2884
+ const t = Ne[e];
2850
2885
  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 ?? {});
2886
+ const c = r?.allowA11yTriggers && e in it ? it[e] : t;
2887
+ U.add(n, s, i, { eventConfig: c }, r ?? {});
2853
2888
  };
2854
2889
  }
2855
- const G = {
2856
- viewEnter: Is,
2890
+ const D = {
2891
+ viewEnter: As,
2857
2892
  hover: {
2858
- add: le("hover"),
2893
+ add: fe("hover"),
2859
2894
  remove: U.remove
2860
2895
  },
2861
2896
  click: {
2862
- add: le("click"),
2897
+ add: fe("click"),
2863
2898
  remove: U.remove
2864
2899
  },
2865
- animationEnd: fi,
2866
- viewProgress: Ws,
2867
- pointerMove: ci,
2900
+ animationEnd: gi,
2901
+ viewProgress: Us,
2902
+ pointerMove: hi,
2868
2903
  activate: {
2869
- add: le("activate"),
2904
+ add: fe("activate"),
2870
2905
  remove: U.remove
2871
2906
  },
2872
2907
  interest: {
2873
- add: le("interest"),
2908
+ add: fe("interest"),
2874
2909
  remove: U.remove
2875
2910
  }
2876
2911
  };
2877
- function Ii(e) {
2912
+ function Ai(e) {
2878
2913
  return e.replace(/\[[^\]]+]/g, "[]");
2879
2914
  }
2880
2915
  class $ {
@@ -2898,7 +2933,7 @@ class $ {
2898
2933
  if (typeof window > "u" || !window.customElements)
2899
2934
  return;
2900
2935
  const s = n?.useCustomElement ?? !!$.defineInteractElement;
2901
- this.dataCache = Oi(t, s);
2936
+ this.dataCache = qi(t, s, n?.configIndex);
2902
2937
  const i = $.defineInteractElement?.();
2903
2938
  s && i === !1 ? document.querySelectorAll("interact-element").forEach((o) => {
2904
2939
  o.connect();
@@ -2924,7 +2959,7 @@ class $ {
2924
2959
  return !!this.get(t);
2925
2960
  }
2926
2961
  get(t) {
2927
- const n = Ii(t);
2962
+ const n = Ai(t);
2928
2963
  return this.dataCache.interactions[n];
2929
2964
  }
2930
2965
  clearMediaQueryListenersForKey(t) {
@@ -2957,11 +2992,11 @@ class $ {
2957
2992
  }), $.instances.length = 0, $.controllerCache.clear(), $.sequenceCache.clear(), $.elementSequenceMap = /* @__PURE__ */ new WeakMap();
2958
2993
  }
2959
2994
  static setup(t) {
2960
- t.scrollOptionsGetter && G.viewProgress.registerOptionsGetter?.(
2995
+ t.scrollOptionsGetter && D.viewProgress.registerOptionsGetter?.(
2961
2996
  t.scrollOptionsGetter
2962
- ), t.pointerOptionsGetter && G.pointerMove.registerOptionsGetter?.(
2997
+ ), t.pointerOptionsGetter && D.pointerMove.registerOptionsGetter?.(
2963
2998
  t.pointerOptionsGetter
2964
- ), t.viewEnter && G.viewEnter.setOptions(
2999
+ ), t.viewEnter && D.viewEnter.setOptions(
2965
3000
  t.viewEnter
2966
3001
  ), t.allowA11yTriggers !== void 0 && ($.allowA11yTriggers = t.allowA11yTriggers);
2967
3002
  }
@@ -2979,8 +3014,8 @@ class $ {
2979
3014
  static deleteController(t) {
2980
3015
  $.controllerCache.delete(t);
2981
3016
  }
2982
- static registerEffects = xn;
2983
- static getRegisteredEffect = je;
3017
+ static registerEffects = Nn;
3018
+ static getRegisteredEffect = He;
2984
3019
  /**
2985
3020
  * Registers a plugin under a name. When the config carries a plugin field (e.g. `$splitText`) with a matching key
2986
3021
  * (on an interaction or effect), Interact invokes the plugin with the field's value and a
@@ -2998,17 +3033,17 @@ class $ {
2998
3033
  static getSequence(t, n, s, i) {
2999
3034
  const o = $.sequenceCache.get(t);
3000
3035
  if (o) return o;
3001
- const r = Gn(n, s, i);
3036
+ const r = Kn(n, s, i);
3002
3037
  return $.sequenceCache.set(t, r), $._registerSequenceElements(s, r), r;
3003
3038
  }
3004
3039
  static addToSequence(t, n, s, i) {
3005
3040
  const o = $.sequenceCache.get(t);
3006
3041
  if (!o) return !1;
3007
- const a = $t(n, i).map((c, u) => ({
3042
+ const c = St(n, i).map((l, u) => ({
3008
3043
  index: s[u] ?? o.animationGroups.length,
3009
- group: c
3044
+ group: l
3010
3045
  }));
3011
- return o.addGroups(a), $._registerSequenceElements(n, o), !0;
3046
+ return o.addGroups(c), $._registerSequenceElements(n, o), !0;
3012
3047
  }
3013
3048
  static _registerSequenceElements(t, n) {
3014
3049
  for (const { target: s } of t) {
@@ -3032,8 +3067,8 @@ class $ {
3032
3067
  }
3033
3068
  }
3034
3069
  }
3035
- let Ti = 0;
3036
- function W(e, {
3070
+ let Mi = 0;
3071
+ function G(e, {
3037
3072
  asCombinator: t = !1,
3038
3073
  addItemFilter: n = !1,
3039
3074
  useFirstChild: s = !1
@@ -3045,10 +3080,10 @@ function W(e, {
3045
3080
  return e.selector;
3046
3081
  return s ? t ? "> :first-child" : ":scope > :first-child" : "";
3047
3082
  }
3048
- function st(e) {
3083
+ function ot(e) {
3049
3084
  return "sequenceId" in e && !("effects" in e);
3050
3085
  }
3051
- function Ce(e, t) {
3086
+ function _e(e, t) {
3052
3087
  return e[t] || (e[t] = {
3053
3088
  triggers: [],
3054
3089
  effects: {},
@@ -3057,7 +3092,7 @@ function Ce(e, t) {
3057
3092
  selectors: /* @__PURE__ */ new Set()
3058
3093
  }), e[t];
3059
3094
  }
3060
- function Ci(e, t, n) {
3095
+ function ki(e, t, n) {
3061
3096
  const { effects: s = [] } = e;
3062
3097
  return s.some((i, o) => n.has(t(o))) ? {
3063
3098
  ...e,
@@ -3067,93 +3102,101 @@ function Ci(e, t, n) {
3067
3102
  })
3068
3103
  } : e;
3069
3104
  }
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.`);
3105
+ function qi(e, t = !1, n) {
3106
+ const { effects: s = {}, sequences: i = {}, conditions: o = {} } = e, r = {}, c = e.interactions ? Ft(e, n) : /* @__PURE__ */ new Map();
3107
+ return e.interactions?.forEach((l, u) => {
3108
+ const a = l.key, f = ++Mi, { effects: d, sequences: h, ...m } = l;
3109
+ if (!a) {
3110
+ console.error(`Interaction ${f} is missing a key for source element.`);
3076
3111
  return;
3077
3112
  }
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);
3113
+ _e(r, a);
3114
+ const p = d ? Array.from(d) : [];
3115
+ p.reverse();
3116
+ const g = h?.map((v, w) => {
3117
+ if (ot(v)) {
3118
+ const S = i[v.sequenceId];
3119
+ return S ? { ...S, ...v } : (console.warn(`Interact: Sequence "${v.sequenceId}" not found in config`), v);
3085
3120
  }
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)
3121
+ const b = v;
3122
+ return b.sequenceId || (b.sequenceId = Q("seq", [u, w], n)), b;
3123
+ }), y = {
3124
+ ...m,
3125
+ effects: p.length > 0 ? p : void 0,
3126
+ sequences: g?.map(
3127
+ (v, w) => ki(
3128
+ v,
3129
+ (b) => ve(u, b, w),
3130
+ c
3131
+ )
3093
3132
  )
3094
3133
  };
3095
- o[u].triggers.push(v), o[u].selectors.add(
3096
- W(v, { useFirstChild: t })
3134
+ r[a].triggers.push(y), r[a].selectors.add(
3135
+ G(y, { useFirstChild: t })
3097
3136
  );
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))
3137
+ const E = y.listContainer;
3138
+ p.forEach((v, w) => {
3139
+ const b = v.effectId ? s[v.effectId] : void 0;
3140
+ let S = v.key || b?.key;
3141
+ const I = p.length - 1 - w;
3142
+ v.effectId || (v.effectId = Q(
3143
+ "eff",
3144
+ [u, I],
3145
+ n
3146
+ ));
3147
+ const O = c.get(ve(u, I));
3148
+ if (O && (v.suffix = O), S = S || a, v.key = S, E && v.listContainer && (S !== a || v.listContainer !== E))
3106
3149
  return;
3107
- const C = V({ ...w, ...g, key: b }), _ = `${u}::${C}::${l}`;
3108
- if (g.interactionId = _, o[u].interactionIds.add(_), b === u)
3150
+ const M = W({ ...b, ...v, key: S }), T = `${a}::${M}::${f}`;
3151
+ if (v.interactionId = T, r[a].interactionIds.add(T), S === a)
3109
3152
  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);
3153
+ const C = _e(r, S);
3154
+ C.effects[T] || (C.effects[T] = [], C.interactionIds.add(T)), C.effects[T].push({ ...m, effect: v }), C.selectors.add(G(v, { useFirstChild: t }));
3155
+ }), g?.forEach((v) => {
3156
+ if (!v || ot(v)) return;
3157
+ const w = v, b = w.sequenceId;
3158
+ w.effects.forEach((I, O) => {
3159
+ I.effectId || (I.effectId = `eff-${b}-${O}`);
3160
+ let M = I.key;
3161
+ if (!M && I.effectId) {
3162
+ const C = s[I.effectId];
3163
+ C && (M = C.key);
3121
3164
  }
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(_);
3165
+ M = M || a;
3166
+ const T = G(I, { useFirstChild: t });
3167
+ if (T && r[a].selectors.add(T), M !== a) {
3168
+ const C = _e(r, M), _ = `${M}::seq::${b}::${f}`;
3169
+ C.sequences[_] || (C.sequences[_] = [], C.interactionIds.add(_)), C.sequences[_].push({
3170
+ ...m,
3171
+ sequence: w
3172
+ }), C.selectors.add(T);
3130
3173
  }
3131
3174
  });
3132
3175
  });
3133
3176
  }), {
3134
- effects: n,
3135
- sequences: s,
3136
- conditions: i,
3137
- interactions: o
3177
+ effects: s,
3178
+ sequences: i,
3179
+ conditions: o,
3180
+ interactions: r
3138
3181
  };
3139
3182
  }
3140
- function $e(e, t, n, s, i) {
3183
+ function Se(e, t, n, s, i) {
3141
3184
  const o = $.getPluginsNames();
3142
3185
  for (const r of o) {
3143
- const a = `${ot}${r}`;
3144
- if (!(a in n))
3186
+ const c = `${at}${r}`;
3187
+ if (!(c in n))
3145
3188
  continue;
3146
- const c = n[a];
3147
- if (c !== null && typeof c == "object") {
3148
- if (e._appliedPlugins.has(c))
3189
+ const l = n[c];
3190
+ if (l !== null && typeof l == "object") {
3191
+ if (e._appliedPlugins.has(l))
3149
3192
  continue;
3150
- e._appliedPlugins.add(c);
3193
+ e._appliedPlugins.add(l);
3151
3194
  }
3152
- const l = $.getPlugin(r)(c, { root: t, key: s, scope: i, config: n });
3153
- typeof l == "function" && e._pluginCleanups.push(l);
3195
+ const a = $.getPlugin(r)(l, { root: t, key: s, scope: i, config: n });
3196
+ typeof a == "function" && e._pluginCleanups.push(a);
3154
3197
  }
3155
3198
  }
3156
- function ye(e, t, n) {
3199
+ function we(e, t, n) {
3157
3200
  if (e.listContainer) {
3158
3201
  const s = t.querySelector(e.listContainer);
3159
3202
  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 +3209,32 @@ function ye(e, t, n) {
3166
3209
  }
3167
3210
  return n ? t.firstElementChild : t;
3168
3211
  }
3169
- function Ee(e, t) {
3212
+ function $e(e, t) {
3170
3213
  return t.map((n) => e.selector ? n.querySelector(e.selector) : n).filter(Boolean);
3171
3214
  }
3172
- function jt(e, t, n, s, i, o, r, a) {
3215
+ function Dt(e, t, n, s, i, o, r, c) {
3173
3216
  return [
3174
- r ? Ee(e, r) : ye(e, n, s),
3175
- a ? Ee(t, a) : ye(t, i, o)
3217
+ r ? $e(e, r) : we(e, n, s),
3218
+ c ? $e(t, c) : we(t, i, o)
3176
3219
  ];
3177
3220
  }
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) => {
3221
+ function Gt(e, t, n, s, i, o, r, c) {
3222
+ const l = Array.isArray(s), u = Array.isArray(i);
3223
+ l ? s.forEach((a, f) => {
3181
3224
  const d = u ? i[f] : i;
3182
- d && it(
3225
+ d && rt(
3183
3226
  e,
3184
- l,
3227
+ a,
3185
3228
  t.trigger,
3186
3229
  d,
3187
3230
  n,
3188
3231
  t.params,
3189
3232
  o,
3190
3233
  r,
3191
- a
3234
+ c
3192
3235
  );
3193
3236
  }) : (u ? i : [i]).forEach((f) => {
3194
- it(
3237
+ rt(
3195
3238
  e,
3196
3239
  s,
3197
3240
  t.trigger,
@@ -3200,22 +3243,22 @@ function zt(e, t, n, s, i, o, r, a) {
3200
3243
  t.params,
3201
3244
  o,
3202
3245
  r,
3203
- a
3246
+ c
3204
3247
  );
3205
3248
  });
3206
3249
  }
3207
- function Ht(e, t, n, s, i) {
3250
+ function Wt(e, t, n, s, i) {
3208
3251
  const o = {}, r = [];
3209
- (s.effects || []).forEach((a, c) => {
3210
- const u = a.effectId, l = {
3252
+ (s.effects || []).forEach((c, l) => {
3253
+ const u = c.effectId, a = {
3211
3254
  ...n.dataCache.effects[u] || {},
3212
- ...a,
3255
+ ...c,
3213
3256
  effectId: u
3214
- }, f = l.key, d = q(a.interactionId, e);
3257
+ }, f = a.key, d = q(c.interactionId, e);
3215
3258
  if (o[d] || n.addedInteractions[d] && !i)
3216
3259
  return;
3217
- const h = L(l.conditions || [], n.dataCache.conditions);
3218
- if (h && n.setupMediaQueryListener(`${d}::${c}`, h, e, () => {
3260
+ const h = F(a.conditions || [], n.dataCache.conditions);
3261
+ if (h && n.setupMediaQueryListener(`${d}::${l}`, h, e, () => {
3219
3262
  t.update();
3220
3263
  }), !h || h.matches) {
3221
3264
  o[d] = !0;
@@ -3224,60 +3267,60 @@ function Ht(e, t, n, s, i) {
3224
3267
  if (m) {
3225
3268
  if (p = $.getController(m), !p)
3226
3269
  return;
3227
- l.listContainer && p.watchChildList(l.listContainer);
3270
+ a.listContainer && p.watchChildList(a.listContainer);
3228
3271
  } else
3229
3272
  p = t;
3230
- $e(
3273
+ Se(
3231
3274
  p,
3232
3275
  p.element,
3233
- l,
3276
+ a,
3234
3277
  m || s.key,
3235
3278
  "effect"
3236
3279
  );
3237
- const [v, y] = jt(
3280
+ const [g, y] = Dt(
3238
3281
  s,
3239
- l,
3282
+ a,
3240
3283
  t.element,
3241
3284
  t.useFirstChild,
3242
3285
  p.element,
3243
3286
  p.useFirstChild,
3244
3287
  i
3245
3288
  );
3246
- if (!v || !y)
3289
+ if (!g || !y)
3247
3290
  return;
3248
3291
  n.addedInteractions[d] = !0;
3249
- const g = m || s.key, E = x(
3250
- l.conditions || [],
3292
+ const E = m || s.key, v = R(
3293
+ a.conditions || [],
3251
3294
  n.dataCache.conditions
3252
3295
  );
3253
3296
  r.push([
3254
- g,
3297
+ E,
3255
3298
  s,
3256
- l,
3257
- v,
3299
+ a,
3300
+ g,
3258
3301
  y,
3259
- E,
3302
+ v,
3260
3303
  p.useFirstChild,
3261
3304
  e
3262
3305
  ]);
3263
3306
  }
3264
- }), r.reverse().forEach((a) => {
3265
- zt(...a);
3266
- }), Ai(e, t, n, s, i);
3307
+ }), r.reverse().forEach((c) => {
3308
+ Gt(...c);
3309
+ }), Li(e, t, n, s, i);
3267
3310
  }
3268
- function _i(e) {
3311
+ function Pi(e) {
3269
3312
  return "sequenceId" in e && !("effects" in e);
3270
3313
  }
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) {
3314
+ function Vt(e, t, n, s, i, o, r) {
3315
+ const c = F(e.conditions || [], i.dataCache.conditions);
3316
+ if (c && i.setupMediaQueryListener(t, c, o.updateKey, o.onUpdate), c && !c.matches) return null;
3317
+ const l = e.effects || [], u = [];
3318
+ let a = !1;
3319
+ for (const f of l) {
3277
3320
  const d = f.effectId, m = {
3278
3321
  ...d ? i.dataCache.effects[d] || {} : {},
3279
3322
  ...f
3280
- }, p = L(m.conditions || [], i.dataCache.conditions);
3323
+ }, p = F(m.conditions || [], i.dataCache.conditions);
3281
3324
  if (p) {
3282
3325
  const S = `${t}::${d || "eff"}`;
3283
3326
  i.setupMediaQueryListener(
@@ -3288,38 +3331,38 @@ function Dt(e, t, n, s, i, o, r) {
3288
3331
  );
3289
3332
  }
3290
3333
  if (p && !p.matches) continue;
3291
- const v = m.key, y = v && q(v, n);
3292
- let g;
3334
+ const g = m.key, y = g && q(g, n);
3335
+ let E;
3293
3336
  if (y) {
3294
- if (g = $.getController(y), !g) return null;
3337
+ if (E = $.getController(y), !E) return null;
3295
3338
  } else
3296
- g = s;
3297
- const E = y || n;
3298
- $e(
3299
- g,
3300
- g.element,
3301
- m,
3339
+ E = s;
3340
+ const v = y || n;
3341
+ Se(
3302
3342
  E,
3343
+ E.element,
3344
+ m,
3345
+ v,
3303
3346
  "effect"
3304
3347
  );
3305
3348
  let w;
3306
- if (r && E === r.controllerKey && m.listContainer === r.listContainer ? (w = Ee(m, r.elements), w.length > 0 && (l = !0)) : w = ye(
3349
+ if (r && v === r.controllerKey && m.listContainer === r.listContainer ? (w = $e(m, r.elements), w.length > 0 && (a = !0)) : w = we(
3307
3350
  m,
3308
- g.element,
3309
- g.useFirstChild
3351
+ E.element,
3352
+ E.useFirstChild
3310
3353
  ), !w || Array.isArray(w) && w.length === 0) return null;
3311
- const b = F(m);
3354
+ const b = x(m);
3312
3355
  u.push({ target: w, options: b });
3313
3356
  }
3314
- return r && !l ? null : u.length > 0 ? u : null;
3357
+ return r && !a ? null : u.length > 0 ? u : null;
3315
3358
  }
3316
- function Re(e, t, n) {
3317
- const s = n ? Ee(e, n) : ye(e, t.element, t.useFirstChild);
3359
+ function je(e, t, n) {
3360
+ const s = n ? $e(e, n) : we(e, t.element, t.useFirstChild);
3318
3361
  return Array.isArray(s) && s.length === 0 ? null : s;
3319
3362
  }
3320
- function Ne(e, t, n, s, i) {
3363
+ function ze(e, t, n, s, i) {
3321
3364
  (Array.isArray(n) ? n : [n]).forEach((r) => {
3322
- G[e.trigger]?.add(
3365
+ D[e.trigger]?.add(
3323
3366
  r,
3324
3367
  r,
3325
3368
  { triggerType: t.triggerType },
@@ -3333,19 +3376,19 @@ function Ne(e, t, n, s, i) {
3333
3376
  );
3334
3377
  });
3335
3378
  }
3336
- function Gt(e, t, n) {
3379
+ function Kt(e, t, n) {
3337
3380
  const o = (e.useFirstChild ? e.element.firstElementChild : e.element)?.querySelector(t);
3338
- if (!o) return n.map((a, c) => c);
3381
+ if (!o) return n.map((c, l) => l);
3339
3382
  const r = Array.from(o.children);
3340
- return n.map((a) => {
3341
- const c = r.indexOf(a);
3342
- return c >= 0 ? c : r.length;
3383
+ return n.map((c) => {
3384
+ const l = r.indexOf(c);
3385
+ return l >= 0 ? l : r.length;
3343
3386
  });
3344
3387
  }
3345
- function Ai(e, t, n, s, i) {
3388
+ function Li(e, t, n, s, i) {
3346
3389
  s.sequences?.forEach((o) => {
3347
3390
  let r;
3348
- if (_i(o)) {
3391
+ if (Pi(o)) {
3349
3392
  const m = n.dataCache.sequences[o.sequenceId];
3350
3393
  if (!m) {
3351
3394
  console.warn(`Interact: Sequence "${o.sequenceId}" not found in cache`);
@@ -3354,49 +3397,49 @@ function Ai(e, t, n, s, i) {
3354
3397
  r = { ...m, ...o };
3355
3398
  } else
3356
3399
  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(
3400
+ const c = r.sequenceId || ee(), l = q(`${e}::seq::${c}`, e);
3401
+ if (n.addedInteractions[l] && !i) return;
3402
+ const u = i && s.listContainer ? { controllerKey: e, listContainer: s.listContainer, elements: i } : void 0, a = Vt(
3360
3403
  r,
3361
- c,
3404
+ l,
3362
3405
  e,
3363
3406
  t,
3364
3407
  n,
3365
3408
  { updateKey: e, onUpdate: () => t.update() },
3366
3409
  u
3367
3410
  );
3368
- if (!l) return;
3369
- if (i && n.addedInteractions[c]) {
3370
- const m = Gt(
3411
+ if (!a) return;
3412
+ if (i && n.addedInteractions[l]) {
3413
+ const m = Kt(
3371
3414
  t,
3372
3415
  s.listContainer,
3373
3416
  i
3374
3417
  );
3375
- $.addToSequence(c, l, m, {
3418
+ $.addToSequence(l, a, m, {
3376
3419
  reducedMotion: $.forceReducedMotion
3377
3420
  });
3378
- const p = $.getSequence(c, r, l, {
3421
+ const p = $.getSequence(l, r, a, {
3379
3422
  reducedMotion: $.forceReducedMotion
3380
- }), v = x(
3423
+ }), g = R(
3381
3424
  s.conditions || [],
3382
3425
  n.dataCache.conditions
3383
- ), y = Re(s, t, i);
3384
- y && Ne(
3426
+ ), y = je(s, t, i);
3427
+ y && ze(
3385
3428
  s,
3386
3429
  r,
3387
3430
  y,
3388
3431
  p,
3389
- v
3432
+ g
3390
3433
  );
3391
3434
  return;
3392
3435
  }
3393
- const f = $.getSequence(c, r, l, {
3436
+ const f = $.getSequence(l, r, a, {
3394
3437
  reducedMotion: $.forceReducedMotion
3395
- }), d = x(
3438
+ }), d = R(
3396
3439
  s.conditions || [],
3397
3440
  n.dataCache.conditions
3398
- ), h = Re(s, t, i);
3399
- h && (n.addedInteractions[c] = !0, Ne(
3441
+ ), h = je(s, t, i);
3442
+ h && (n.addedInteractions[l] = !0, ze(
3400
3443
  s,
3401
3444
  r,
3402
3445
  h,
@@ -3405,23 +3448,23 @@ function Ai(e, t, n, s, i) {
3405
3448
  ));
3406
3449
  });
3407
3450
  }
3408
- function Mi(e, t, n, s, i) {
3451
+ function Fi(e, t, n, s, i) {
3409
3452
  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 || [],
3453
+ Object.keys(o).forEach((c) => {
3454
+ o[c].some(({ sequence: u, ...a }) => {
3455
+ const f = F(
3456
+ a.conditions || [],
3414
3457
  n.dataCache.conditions
3415
3458
  );
3416
3459
  if (f && !f.matches)
3417
3460
  return !1;
3418
- const d = l.key && q(l.key, e), h = $.getController(d);
3461
+ const d = a.key && q(a.key, e), h = $.getController(d);
3419
3462
  if (!h)
3420
3463
  return !0;
3421
- const m = u.sequenceId || J(), p = q(`${d}::seq::${m}`, d);
3464
+ const m = u.sequenceId || ee(), p = q(`${d}::seq::${m}`, d);
3422
3465
  if (n.addedInteractions[p] && !i)
3423
3466
  return !0;
3424
- const y = Dt(
3467
+ const y = Vt(
3425
3468
  u,
3426
3469
  p,
3427
3470
  d,
@@ -3432,69 +3475,69 @@ function Mi(e, t, n, s, i) {
3432
3475
  );
3433
3476
  if (!y) return !0;
3434
3477
  if (i && n.addedInteractions[p]) {
3435
- const b = Gt(t, s, i);
3478
+ const b = Kt(t, s, i);
3436
3479
  return $.addToSequence(p, y, b, {
3437
3480
  reducedMotion: $.forceReducedMotion
3438
3481
  }), !0;
3439
3482
  }
3440
- const g = $.getSequence(p, u, y, {
3483
+ const E = $.getSequence(p, u, y, {
3441
3484
  reducedMotion: $.forceReducedMotion
3442
- }), E = x(
3443
- l.conditions || [],
3485
+ }), v = R(
3486
+ a.conditions || [],
3444
3487
  n.dataCache.conditions
3445
- ), w = Re(l, h);
3446
- return w && (n.addedInteractions[p] = !0, Ne(
3447
- l,
3488
+ ), w = je(a, h);
3489
+ return w && (n.addedInteractions[p] = !0, ze(
3490
+ a,
3448
3491
  u,
3449
3492
  w,
3450
- g,
3451
- E
3493
+ E,
3494
+ v
3452
3495
  )), !0;
3453
3496
  });
3454
3497
  });
3455
3498
  }
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);
3499
+ function Yt(e, t, n, s, i) {
3500
+ const o = n.get(e), r = o?.effects || {}, c = Object.keys(r), l = [];
3501
+ c.forEach((a) => {
3502
+ const f = q(a, e);
3460
3503
  if (n.addedInteractions[f] && !i)
3461
3504
  return;
3462
- r[l].some(({ effect: h, ...m }, p) => {
3463
- const v = L(
3505
+ r[a].some(({ effect: h, ...m }, p) => {
3506
+ const g = F(
3464
3507
  m.conditions || [],
3465
3508
  n.dataCache.conditions
3466
3509
  );
3467
- if (v && !v.matches)
3510
+ if (g && !g.matches)
3468
3511
  return !1;
3469
- const y = h.effectId, g = {
3512
+ const y = h.effectId, E = {
3470
3513
  ...n.dataCache.effects[y] || {},
3471
3514
  ...h,
3472
3515
  effectId: y
3473
3516
  };
3474
- if (s && g.listContainer !== s)
3517
+ if (s && E.listContainer !== s)
3475
3518
  return !1;
3476
- const E = L(g.conditions || [], n.dataCache.conditions);
3477
- if (E && n.setupMediaQueryListener(
3519
+ const v = F(E.conditions || [], n.dataCache.conditions);
3520
+ if (v && n.setupMediaQueryListener(
3478
3521
  `${f}::${p}`,
3479
- E,
3522
+ v,
3480
3523
  e,
3481
3524
  () => {
3482
3525
  t.update();
3483
3526
  }
3484
- ), !E || E.matches) {
3527
+ ), !v || v.matches) {
3485
3528
  const w = m.key && q(m.key, e), b = $.getController(w);
3486
3529
  if (!b)
3487
3530
  return !0;
3488
- $e(
3531
+ Se(
3489
3532
  t,
3490
3533
  t.element,
3491
- g,
3534
+ E,
3492
3535
  e,
3493
3536
  "effect"
3494
- ), g.listContainer && t.watchChildList(g.listContainer);
3495
- const [S, T] = jt(
3537
+ ), E.listContainer && t.watchChildList(E.listContainer);
3538
+ const [S, I] = Dt(
3496
3539
  m,
3497
- g,
3540
+ E,
3498
3541
  b.element,
3499
3542
  b.useFirstChild,
3500
3543
  t.element,
@@ -3502,33 +3545,33 @@ function Wt(e, t, n, s, i) {
3502
3545
  void 0,
3503
3546
  i
3504
3547
  );
3505
- if (!S || !T)
3548
+ if (!S || !I)
3506
3549
  return !0;
3507
3550
  n.addedInteractions[f] = !0;
3508
- const C = x(
3509
- g.conditions || [],
3551
+ const O = R(
3552
+ E.conditions || [],
3510
3553
  n.dataCache.conditions
3511
3554
  );
3512
- return c.push([
3555
+ return l.push([
3513
3556
  e,
3514
3557
  m,
3515
- g,
3558
+ E,
3516
3559
  S,
3517
- T,
3518
- C,
3560
+ I,
3561
+ O,
3519
3562
  t.useFirstChild,
3520
3563
  w || void 0
3521
3564
  ]), !0;
3522
3565
  }
3523
3566
  return !1;
3524
3567
  });
3525
- }), c.reverse().forEach((l) => {
3526
- zt(...l);
3527
- }), Mi(e, t, n, s, i);
3568
+ }), l.reverse().forEach((a) => {
3569
+ Gt(...a);
3570
+ }), Fi(e, t, n, s, i);
3528
3571
  const u = Object.keys(o?.sequences || {}).length > 0;
3529
- return a.length > 0 || u;
3572
+ return c.length > 0 || u;
3530
3573
  }
3531
- function it(e, t, n, s, i, o, r, a, c) {
3574
+ function rt(e, t, n, s, i, o, r, c, l) {
3532
3575
  let u;
3533
3576
  if (i.transition || i.transitionProperties) {
3534
3577
  const f = {
@@ -3536,83 +3579,83 @@ function it(e, t, n, s, i, o, r, a, c) {
3536
3579
  effectId: i.effectId,
3537
3580
  transition: i.transition,
3538
3581
  transitionProperties: i.transitionProperties,
3539
- childSelector: W(i, {
3582
+ childSelector: G(i, {
3540
3583
  asCombinator: !0,
3541
3584
  addItemFilter: !0,
3542
- useFirstChild: a
3585
+ useFirstChild: c
3543
3586
  }),
3544
3587
  selectorCondition: r
3545
3588
  };
3546
3589
  if (u = $.getController(e), !u)
3547
3590
  return;
3548
- u.renderStyle(Yn(f));
3591
+ u.renderStyle(Qn(f));
3549
3592
  }
3550
- let l;
3593
+ let a;
3551
3594
  if (n === "animationEnd") {
3552
- const f = o.effectId, h = (c ? $.getInstance(c) : void 0)?.dataCache.effects[f];
3553
- h && (l = F(h));
3595
+ const f = o.effectId, h = (l ? $.getInstance(l) : void 0)?.dataCache.effects[f];
3596
+ h && (a = x(h));
3554
3597
  }
3555
- G[n]?.add(t, s, i, o, {
3598
+ D[n]?.add(t, s, i, o, {
3556
3599
  reducedMotion: $.forceReducedMotion,
3557
3600
  targetController: u,
3558
3601
  selectorCondition: r,
3559
3602
  allowA11yTriggers: $.allowA11yTriggers,
3560
- sourceAnimationOptions: l
3603
+ sourceAnimationOptions: a
3561
3604
  });
3562
3605
  }
3563
- function ki(e) {
3606
+ function Ri(e) {
3564
3607
  const t = e.key, n = $.getInstance(t);
3565
3608
  if (!n)
3566
3609
  return console.warn(`No instance found for key: ${t}`), $.setController(t, e), !1;
3567
3610
  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, () => {
3611
+ n.setController(t, e), s.forEach((r, c) => {
3612
+ const l = F(r.conditions, n.dataCache.conditions);
3613
+ if (l) {
3614
+ const u = `${t}::trigger::${c}`;
3615
+ n.setupMediaQueryListener(u, l, t, () => {
3573
3616
  e.update();
3574
3617
  });
3575
3618
  }
3576
- (!c || c.matches) && ($e(e, e.element, r, t, "interaction"), r.listContainer && e.watchChildList(r.listContainer), Ht(t, e, n, r));
3619
+ (!l || l.matches) && (Se(e, e.element, r, t, "interaction"), r.listContainer && e.watchChildList(r.listContainer), Wt(t, e, n, r));
3577
3620
  });
3578
3621
  let o = !1;
3579
- return n && (o = Wt(t, e, n)), i || o;
3622
+ return n && (o = Yt(t, e, n)), i || o;
3580
3623
  }
3581
- function qi(e, t, n) {
3624
+ function xi(e, t, n) {
3582
3625
  const s = e.key, i = $.getInstance(s);
3583
3626
  if (i) {
3584
3627
  const { triggers: o = [] } = i?.get(s) || {};
3585
- o.forEach((r, a) => {
3628
+ o.forEach((r, c) => {
3586
3629
  if (r.listContainer !== t)
3587
3630
  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, () => {
3631
+ const l = F(r.conditions, i.dataCache.conditions);
3632
+ if (l) {
3633
+ const u = `${s}::listTrigger::${t}::${c}`;
3634
+ i.setupMediaQueryListener(u, l, s, () => {
3592
3635
  e.update();
3593
3636
  });
3594
3637
  }
3595
- (!c || c.matches) && Ht(s, e, i, r, n);
3596
- }), Wt(s, e, i, t, n);
3638
+ (!l || l.matches) && Wt(s, e, i, r, n);
3639
+ }), Yt(s, e, i, t, n);
3597
3640
  }
3598
3641
  }
3599
- function Pi(e, t = !1) {
3642
+ function Ni(e, t = !1) {
3600
3643
  const n = e.key, s = $.getInstance(n);
3601
3644
  if (!s)
3602
3645
  return;
3603
3646
  const i = [...s.get(n)?.selectors.values() || []].filter(Boolean).join(",");
3604
3647
  let o;
3605
- i ? (o = [...e.element.querySelectorAll(i)], e.useFirstChild || o.push(e.element)) : o = [e.element], Vt(o), s.deleteController(n, t);
3648
+ i ? (o = [...e.element.querySelectorAll(i)], e.useFirstChild || o.push(e.element)) : o = [e.element], Bt(o), s.deleteController(n, t);
3606
3649
  }
3607
- function Vt(e) {
3608
- const t = Object.values(G);
3650
+ function Bt(e) {
3651
+ const t = Object.values(D);
3609
3652
  for (const n of e)
3610
3653
  for (const s of t)
3611
3654
  s.remove(n);
3612
3655
  $.removeFromSequences(e);
3613
3656
  }
3614
- const Oe = "interactEffect";
3615
- class Li {
3657
+ const Ae = "interactEffect";
3658
+ class ji {
3616
3659
  element;
3617
3660
  key;
3618
3661
  connected;
@@ -3634,10 +3677,10 @@ class Li {
3634
3677
  }
3635
3678
  n !== t && (n && console.warn(
3636
3679
  `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);
3680
+ ), this.element.dataset.interactKey = t), this.key = t, this.connected = Ri(this);
3638
3681
  }
3639
3682
  disconnect({ removeFromCache: t = !1 } = {}) {
3640
- if ((this.key || this.element.dataset.interactKey) && Pi(this, t), this._pluginCleanups.length) {
3683
+ if ((this.key || this.element.dataset.interactKey) && Ni(this, t), this._pluginCleanups.length) {
3641
3684
  for (const s of this._pluginCleanups)
3642
3685
  try {
3643
3686
  s();
@@ -3680,12 +3723,12 @@ class Li {
3680
3723
  return;
3681
3724
  }
3682
3725
  const o = new Set(
3683
- this.element.dataset[Oe]?.split(" ") || []
3726
+ this.element.dataset[Ae]?.split(" ") || []
3684
3727
  );
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(" ");
3728
+ 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
3729
  }
3687
3730
  getActiveEffects() {
3688
- const n = (this.element.dataset[Oe] || "").trim();
3731
+ const n = (this.element.dataset[Ae] || "").trim();
3689
3732
  return n ? n.split(/\s+/) : [];
3690
3733
  }
3691
3734
  watchChildList(t) {
@@ -3698,26 +3741,26 @@ class Li {
3698
3741
  _childListChangeHandler(t, n) {
3699
3742
  const s = this.key || this.element.dataset.interactKey, i = [], o = [];
3700
3743
  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);
3744
+ r.removedNodes.forEach((c) => {
3745
+ c instanceof HTMLElement && i.push(c);
3746
+ }), r.addedNodes.forEach((c) => {
3747
+ c instanceof HTMLElement && o.push(c);
3705
3748
  });
3706
- }), Vt(i), s && qi(this, t, o);
3749
+ }), Bt(i), s && xi(this, t, o);
3707
3750
  }
3708
3751
  }
3709
- function Fi(e, t) {
3710
- new Li(e, t).connect();
3752
+ function Hi(e, t) {
3753
+ new ji(e, t).connect();
3711
3754
  }
3712
- function Ri(e) {
3755
+ function Di(e) {
3713
3756
  const t = $.getController(e);
3714
3757
  t && t.disconnect({ removeFromCache: !0 });
3715
3758
  }
3716
3759
  export {
3717
- Li as I,
3760
+ ji as I,
3718
3761
  $ as a,
3719
- Fi as b,
3720
- xi as g,
3721
- Ri as r
3762
+ Hi as b,
3763
+ zi as g,
3764
+ Di as r
3722
3765
  };
3723
- //# sourceMappingURL=index-YKqGJSeK.mjs.map
3766
+ //# sourceMappingURL=index-1AmVTHDV.mjs.map