@react-motion-router/core 2.0.0-beta.sha-352239f → 2.0.0-beta.sha-bcb6b06

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.
package/build/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { jsx as T, jsxs as Gt, Fragment as oe } from "react/jsx-runtime";
2
- import { createContext as it, Component as st, createRef as K, lazy as le, cloneElement as Ht, Suspense as Tt, isValidElement as Xt, Children as jt, useContext as vt, useDebugValue as ce } from "react";
1
+ import { jsx as b, jsxs as Gt, Fragment as oe } from "react/jsx-runtime";
2
+ import { createContext as it, Component as st, createRef as K, lazy as le, cloneElement as Ht, Suspense as bt, isValidElement as Xt, Children as jt, useContext as vt, useDebugValue as ce, useRef as he, useEffect as ue, useCallback as de } from "react";
3
3
  const Zt = it(null);
4
- class Be extends st {
4
+ class ze extends st {
5
5
  ref = K();
6
6
  static contextType = Zt;
7
7
  componentDidMount() {
@@ -44,7 +44,7 @@ class Be extends st {
44
44
  this.ref.current && (this.ref.current.style.visibility = "visible");
45
45
  }
46
46
  render() {
47
- return /* @__PURE__ */ T(
47
+ return /* @__PURE__ */ b(
48
48
  "div",
49
49
  {
50
50
  ref: this.ref,
@@ -55,8 +55,8 @@ class Be extends st {
55
55
  );
56
56
  }
57
57
  }
58
- function bt(s, t) {
59
- s.endsWith("**") || (s += "**");
58
+ function Tt(s, t) {
59
+ s.endsWith("*") || (s += "**");
60
60
  const e = window.location.origin, n = new URLPattern(s, e).exec(t, e);
61
61
  if (!n)
62
62
  return null;
@@ -65,7 +65,7 @@ function bt(s, t) {
65
65
  }
66
66
  function Yt(s, t, e = `${window.location.origin}/`, n = !0) {
67
67
  n || (s = s.toLowerCase(), t = t.toLowerCase());
68
- const r = bt(e, t)?.href;
68
+ const r = Tt(e, t)?.href;
69
69
  if (!r)
70
70
  return null;
71
71
  const a = new URLPattern({ baseURL: r, pathname: s }).exec({ pathname: t, baseURL: r }), o = a?.pathname.groups ?? {};
@@ -74,34 +74,34 @@ function Yt(s, t, e = `${window.location.origin}/`, n = !0) {
74
74
  caseSensitive: n
75
75
  } : null;
76
76
  }
77
- function Ke(s, t, e = window.location.origin) {
77
+ function Ge(s, t, e = window.location.origin) {
78
78
  return s.some(({ pattern: n, caseSensitive: r }) => Yt(n, t, e, r));
79
79
  }
80
- function he(s, t = window) {
80
+ function pe(s, t = window) {
81
81
  return new Promise((e) => {
82
82
  queueMicrotask(() => e(
83
83
  t.dispatchEvent(s)
84
84
  ));
85
85
  });
86
86
  }
87
- function qe(s) {
87
+ function He(s) {
88
88
  const t = le(s);
89
89
  return t.load = async () => (t.module ??= await s(), t.module), t;
90
90
  }
91
- function ze() {
91
+ function Xe() {
92
92
  return !!window.navigation;
93
93
  }
94
- function Ge() {
94
+ function Ze() {
95
95
  return !!globalThis.URLPattern;
96
96
  }
97
- async function He() {
97
+ async function Ye() {
98
98
  const { URLPattern: s } = await import(
99
99
  /*webpackIgnore: true*/
100
100
  "urlpattern-polyfill"
101
101
  );
102
102
  globalThis.URLPattern = s;
103
103
  }
104
- async function Xe() {
104
+ async function _e() {
105
105
  const { applyPolyfill: s } = await import(
106
106
  /*webpackIgnore: true*/
107
107
  "@virtualstate/navigation"
@@ -114,50 +114,50 @@ async function Xe() {
114
114
  persistState: !0
115
115
  });
116
116
  }
117
- async function ue(s) {
117
+ async function fe(s) {
118
118
  const t = [];
119
119
  for (const e of s)
120
120
  t.push(await e);
121
121
  return t;
122
122
  }
123
- function de(s) {
123
+ function me(s) {
124
124
  return s.replace(/-([a-z])/g, (t) => t[1].toUpperCase());
125
125
  }
126
- function Ze(s, t) {
126
+ function Je(s, t) {
127
127
  return Ht(s, t);
128
128
  }
129
- class pe extends Event {
129
+ class ge extends Event {
130
130
  constructor() {
131
131
  super("transition-start");
132
132
  }
133
133
  }
134
- class fe extends Event {
134
+ class ye extends Event {
135
135
  constructor() {
136
136
  super("transition-cancel");
137
137
  }
138
138
  }
139
- class me extends Event {
139
+ class ve extends Event {
140
140
  constructor() {
141
141
  super("transition-end");
142
142
  }
143
143
  }
144
- class Ye extends Event {
144
+ class Qe extends Event {
145
145
  constructor() {
146
146
  super("motion-progress-start");
147
147
  }
148
148
  }
149
- class ge extends Event {
149
+ class we extends Event {
150
150
  progress;
151
151
  constructor(t) {
152
152
  super("motion-progress"), this.progress = t;
153
153
  }
154
154
  }
155
- class _e extends Event {
155
+ class tn extends Event {
156
156
  constructor() {
157
157
  super("motion-progress-end");
158
158
  }
159
159
  }
160
- class ye extends Event {
160
+ class Ee extends Event {
161
161
  #t = "load";
162
162
  #e = !1;
163
163
  #c = !0;
@@ -200,7 +200,7 @@ class ye extends Event {
200
200
  navigationType: "load"
201
201
  });
202
202
  const n = t?.handler?.();
203
- n && this.#n.push(n), this.#n.length === 1 && ue(this.#n).then(() => {
203
+ n && this.#n.push(n), this.#n.length === 1 && fe(this.#n).then(() => {
204
204
  this.#l = !0, window.removeEventListener("navigate", this.#r), e?.();
205
205
  });
206
206
  }
@@ -236,7 +236,7 @@ class ye extends Event {
236
236
  }
237
237
  }
238
238
  const _t = it(null);
239
- class ve extends st {
239
+ class be extends st {
240
240
  ref = K();
241
241
  static contextType = _t;
242
242
  index = 0;
@@ -257,11 +257,11 @@ class ve extends st {
257
257
  this.props.navigation.removeEventListener("transition-start", this.onAnimationStart), this.props.navigation.removeEventListener("transition-end", this.onAnimationEnd), this.props.navigation.removeEventListener("transition-cancel", this.onAnimationEnd);
258
258
  }
259
259
  get animationEffect() {
260
- const t = this.props.animation, { animation: e, direction: n, hasUAVisualTransition: r } = this.context, { timeline: a, playbackRate: o } = e, { index: c, exiting: g, ref: f } = this;
260
+ const t = this.props.animation, { animation: e, direction: n, hasUAVisualTransition: r } = this.context, { timeline: a, playbackRate: o } = e, { index: l, exiting: m, ref: p } = this;
261
261
  return t?.({
262
- ref: f.current,
263
- index: c,
264
- exiting: g,
262
+ ref: p.current,
263
+ index: l,
264
+ exiting: m,
265
265
  timeline: a,
266
266
  direction: n,
267
267
  playbackRate: o,
@@ -273,7 +273,7 @@ class ve extends st {
273
273
  }
274
274
  render() {
275
275
  const t = this.props.renderAs, e = this.props.focused ? void 0 : "";
276
- return /* @__PURE__ */ T(
276
+ return /* @__PURE__ */ b(
277
277
  t,
278
278
  {
279
279
  id: this.props.id,
@@ -293,7 +293,7 @@ class ve extends st {
293
293
  }
294
294
  }
295
295
  const Jt = it(null), wt = it(null), Qt = it(null);
296
- class we {
296
+ class Te {
297
297
  id;
298
298
  nodes = /* @__PURE__ */ new Map();
299
299
  getScreenRect = () => new DOMRect();
@@ -328,7 +328,7 @@ class we {
328
328
  return !this.nodes.size;
329
329
  }
330
330
  }
331
- class Ee extends st {
331
+ class Se extends st {
332
332
  sharedElementScene;
333
333
  #t = K();
334
334
  ref = K();
@@ -341,7 +341,7 @@ class Ee extends st {
341
341
  elementType: "div"
342
342
  };
343
343
  constructor(t, e) {
344
- super(t), this.sharedElementScene = new we(`${this.name}-shared-element-scene`), this.sharedElementScene.getScreenRect = () => this.ref.current?.getBoundingClientRect() || new DOMRect(), this.nestedRouterData = { parentScreen: this, parentRouter: e };
344
+ super(t), this.sharedElementScene = new Te(`${this.name}-shared-element-scene`), this.sharedElementScene.getScreenRect = () => this.ref.current?.getBoundingClientRect() || new DOMRect(), this.nestedRouterData = { parentScreen: this, parentRouter: e };
345
345
  }
346
346
  setParams(t) {
347
347
  this.setState(({ params: e }) => ({ params: { ...e, ...t } }));
@@ -362,10 +362,11 @@ class Ee extends st {
362
362
  return new Promise((t) => this.setState({ focused: !0 }, t));
363
363
  }
364
364
  async load(t) {
365
- let e = this.props.component, n = this.props.config?.header?.component, r = this.props.config?.footer?.component, a;
365
+ const e = this.props.component, n = this.props.config?.header?.component, r = this.props.config?.footer?.component;
366
+ let a;
366
367
  F(e) ? a = await e.load() : a = { default: e }, F(n) && await n.load(), F(r) && await r.load();
367
- const o = this.context.navigation, c = this.routeProp, g = !1;
368
- return await this.props.config?.onLoad?.({ navigation: o, route: c, signal: t, preloading: g }), a;
368
+ const o = this.context.navigation, l = this.routeProp, m = !1;
369
+ return await this.props.config?.onLoad?.({ navigation: o, route: l, signal: t, preloading: m }), a;
369
370
  }
370
371
  async onExited(t) {
371
372
  await this.routeProp.config.onExited?.({
@@ -407,8 +408,8 @@ class Ee extends st {
407
408
  }
408
409
  render() {
409
410
  const t = this.context.navigation, e = this.routeProp, n = this.props.component, r = e.config.header?.component, a = e.config.footer?.component;
410
- return /* @__PURE__ */ T(
411
- ve,
411
+ return /* @__PURE__ */ b(
412
+ be,
412
413
  {
413
414
  ref: this.#t,
414
415
  renderAs: this.state.elementType,
@@ -416,7 +417,7 @@ class Ee extends st {
416
417
  animation: e.config.animation,
417
418
  navigation: t,
418
419
  focused: this.state.focused,
419
- children: /* @__PURE__ */ T(
420
+ children: /* @__PURE__ */ b(
420
421
  "div",
421
422
  {
422
423
  id: `${this.context.id}-${this.name}`,
@@ -429,10 +430,10 @@ class Ee extends st {
429
430
  flexDirection: "column",
430
431
  pointerEvents: "inherit"
431
432
  },
432
- children: /* @__PURE__ */ T(Zt.Provider, { value: this.sharedElementScene, children: /* @__PURE__ */ T(Qt.Provider, { value: e, children: /* @__PURE__ */ Gt(Jt.Provider, { value: this.nestedRouterData, children: [
433
- /* @__PURE__ */ T(Tt, { fallback: /* @__PURE__ */ T(Z, { component: e.config.header?.fallback, route: e, navigation: t }), children: /* @__PURE__ */ T(Z, { component: r, route: e, navigation: t }) }),
434
- /* @__PURE__ */ T(Tt, { fallback: /* @__PURE__ */ T(Z, { component: this.props.fallback, route: e, navigation: t }), children: /* @__PURE__ */ T(Z, { component: n, route: e, navigation: t }) }),
435
- /* @__PURE__ */ T(Tt, { fallback: /* @__PURE__ */ T(Z, { component: e.config.footer?.fallback, route: e, navigation: t }), children: /* @__PURE__ */ T(Z, { component: a, route: e, navigation: t }) })
433
+ children: /* @__PURE__ */ b(Zt.Provider, { value: this.sharedElementScene, children: /* @__PURE__ */ b(Qt.Provider, { value: e, children: /* @__PURE__ */ Gt(Jt.Provider, { value: this.nestedRouterData, children: [
434
+ /* @__PURE__ */ b(bt, { fallback: /* @__PURE__ */ b(Z, { component: e.config.header?.fallback, route: e, navigation: t }), children: /* @__PURE__ */ b(Z, { component: r, route: e, navigation: t }) }),
435
+ /* @__PURE__ */ b(bt, { fallback: /* @__PURE__ */ b(Z, { component: this.props.fallback, route: e, navigation: t }), children: /* @__PURE__ */ b(Z, { component: n, route: e, navigation: t }) }),
436
+ /* @__PURE__ */ b(bt, { fallback: /* @__PURE__ */ b(Z, { component: e.config.footer?.fallback, route: e, navigation: t }), children: /* @__PURE__ */ b(Z, { component: a, route: e, navigation: t }) })
436
437
  ] }) }) })
437
438
  }
438
439
  )
@@ -443,7 +444,7 @@ class Ee extends st {
443
444
  function Z({ component: s, route: t, navigation: e }) {
444
445
  F(s) && s.module?.default && (s = s.module.default);
445
446
  const n = s ?? null;
446
- return typeof n == "function" || te(n) ? /* @__PURE__ */ T(
447
+ return typeof n == "function" || te(n) ? /* @__PURE__ */ b(
447
448
  n,
448
449
  {
449
450
  navigation: e,
@@ -452,10 +453,10 @@ function Z({ component: s, route: t, navigation: e }) {
452
453
  ) : Xt(n) ? Ht(n, {
453
454
  navigation: e,
454
455
  route: t
455
- }) : /* @__PURE__ */ T(oe, { children: n });
456
+ }) : /* @__PURE__ */ b(oe, { children: n });
456
457
  }
457
- function Te(s) {
458
- return Xt(s) ? Object.getPrototypeOf(s.type) === Ee : !1;
458
+ function Re(s) {
459
+ return Xt(s) ? Object.getPrototypeOf(s.type) === Se : !1;
459
460
  }
460
461
  function te(s) {
461
462
  return typeof s == "object" && s !== null && s.$$typeof === Symbol.for("react.lazy");
@@ -463,17 +464,17 @@ function te(s) {
463
464
  function F(s) {
464
465
  return te(s) && "load" in s;
465
466
  }
466
- function be(s) {
467
+ function ke(s) {
467
468
  return "style" in s && s.style instanceof CSSStyleDeclaration;
468
469
  }
469
- var Se = Object.defineProperty, Re = (s, t, e) => t in s ? Se(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, j = (s, t, e) => (Re(s, typeof t != "symbol" ? t + "" : t, e), e), Wt = (s, t, e) => {
470
+ var xe = Object.defineProperty, Ce = (s, t, e) => t in s ? xe(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, j = (s, t, e) => (Ce(s, typeof t != "symbol" ? t + "" : t, e), e), Wt = (s, t, e) => {
470
471
  if (!t.has(s))
471
472
  throw TypeError("Cannot " + e);
472
- }, i = (s, t, e) => (Wt(s, t, "read from private field"), e ? e.call(s) : t.get(s)), m = (s, t, e) => {
473
+ }, i = (s, t, e) => (Wt(s, t, "read from private field"), e ? e.call(s) : t.get(s)), g = (s, t, e) => {
473
474
  if (t.has(s))
474
475
  throw TypeError("Cannot add the same private member more than once");
475
476
  t instanceof WeakSet ? t.add(s) : t.set(s, e);
476
- }, l = (s, t, e, n) => (Wt(s, t, "write to private field"), n ? n.call(s, e) : t.set(s, e), e), p = (s, t, e) => (Wt(s, t, "access private method"), e);
477
+ }, c = (s, t, e, n) => (Wt(s, t, "write to private field"), n ? n.call(s, e) : t.set(s, e), e), f = (s, t, e) => (Wt(s, t, "access private method"), e);
477
478
  const ut = {
478
479
  delay: 0,
479
480
  direction: "normal",
@@ -483,7 +484,7 @@ const ut = {
483
484
  fill: "auto",
484
485
  iterationStart: 0,
485
486
  iterations: 1
486
- }, It = 1e3, ke = window.Animation, dt = window.KeyframeEffect;
487
+ }, It = 1e3, Me = window.Animation, dt = window.KeyframeEffect;
487
488
  function Ft(s) {
488
489
  return Array.isArray(s);
489
490
  }
@@ -493,7 +494,7 @@ function H(s) {
493
494
  function h(s, t) {
494
495
  return H(s) || typeof s == "number" ? s : (t || ([t] = Object.keys(s.type())), s.to(t).value);
495
496
  }
496
- function xe(s, t = ut) {
497
+ function Le(s, t = ut) {
497
498
  let { duration: e = "auto", iterations: n = 1, playbackRate: r = 1 } = t;
498
499
  if (H(s))
499
500
  return s;
@@ -508,11 +509,11 @@ function xe(s, t = ut) {
508
509
  e = e.to("ms").value;
509
510
  else if (typeof e == "string")
510
511
  throw new TypeError("Unknown effect duration keyword.");
511
- const { delay: a = 0, endDelay: o = 0 } = t, c = e / n * n / Math.abs(r), g = a + c + o;
512
+ const { delay: a = 0, endDelay: o = 0 } = t, l = e / n * n / Math.abs(r), m = a + l + o;
512
513
  return rt(
513
514
  s.to("percent").value,
514
515
  [0, 100],
515
- [0, g]
516
+ [0, m]
516
517
  );
517
518
  }
518
519
  function Et(s) {
@@ -529,31 +530,31 @@ function Bt(s, t) {
529
530
  const e = t.length - 1, n = Math.floor(s * e), r = t[n], a = t[Math.min(n + 1, e)], o = s * e - n;
530
531
  return r + o * (a - r);
531
532
  }
532
- function Ce(s, t, e) {
533
+ function Pe(s, t, e) {
533
534
  let n = 0, r = 0;
534
535
  for (const [a, o] of Object.entries(s)) {
535
- const { min: c, max: g } = t, f = e[a] ?? 1, w = (o - c[a]) / (g[a] - c[a]) * f;
536
- n += w, r += f;
536
+ const { min: l, max: m } = t, p = e[a] ?? 1, w = (o - l[a]) / (m[a] - l[a]) * p;
537
+ n += w, r += p;
537
538
  }
538
539
  return n / r;
539
540
  }
540
541
  function rt(s, t, e, n = {}) {
541
542
  let r;
542
543
  if (typeof s == "number" && Ft(t)) {
543
- const o = { x: t[0] }, c = { x: t[1] };
544
- t = { min: o, max: c }, s = { x: s };
544
+ const o = { x: t[0] }, l = { x: t[1] };
545
+ t = { min: o, max: l }, s = { x: s };
545
546
  } else
546
547
  throw new TypeError("Input and input range must have the same dimensions.");
547
- if (r = Ce(s, t, n), r = Me(r, 0, 1), Ft(e))
548
+ if (r = Pe(s, t, n), r = De(r, 0, 1), Ft(e))
548
549
  return Bt(r, e);
549
550
  const a = {};
550
551
  for (const o of Object.keys(e.min)) {
551
- const c = e.min[o], g = e.max[o], f = [c, g];
552
- a[o] = Bt(r, f);
552
+ const l = e.min[o], m = e.max[o], p = [l, m];
553
+ a[o] = Bt(r, p);
553
554
  }
554
555
  return a;
555
556
  }
556
- function Me(s, t, e) {
557
+ function De(s, t, e) {
557
558
  return s < t ? t : e && s > e ? e : s;
558
559
  }
559
560
  function $t(s) {
@@ -564,37 +565,37 @@ function $t(s) {
564
565
  delay: r = 0,
565
566
  endDelay: a = 0,
566
567
  localTime: o = null,
567
- progress: c = null
568
+ progress: l = null
568
569
  } = s;
569
- const g = new CSSUnitValue(100, "percent");
570
+ const m = new CSSUnitValue(100, "percent");
570
571
  if (t === "auto")
571
572
  t = It, r = 0, a = 0;
572
573
  else if (t instanceof CSSNumericValue)
573
574
  t = t.to("ms").value;
574
575
  else if (typeof t == "string")
575
576
  throw TypeError("Unknown effect duration keyword.");
576
- const f = t / e, w = f * e / Math.abs(n), k = r + w + a;
577
- t = new CSSUnitValue(f / k * 100, "percent");
578
- const b = CSS.percent(t.to("percent").value * e / Math.abs(n));
579
- return o !== null && (c = h(o, "percent") / g.value), {
577
+ const p = t / e, w = p * e / Math.abs(n), k = r + w + a;
578
+ t = new CSSUnitValue(p / k * 100, "percent");
579
+ const T = CSS.percent(t.to("percent").value * e / Math.abs(n));
580
+ return o !== null && (l = h(o, "percent") / m.value), {
580
581
  ...s,
581
- progress: c,
582
- activeDuration: b,
582
+ progress: l,
583
+ activeDuration: T,
583
584
  duration: t,
584
585
  iterations: e,
585
586
  delay: r,
586
587
  endDelay: a,
587
- endTime: g
588
+ endTime: m
588
589
  };
589
590
  }
590
591
  function ee(s, t) {
591
592
  let { activeDuration: e = 0, localTime: n = null, endTime: r = 1 / 0, delay: a = 0 } = s;
592
593
  if (r = h(r), e = h(e), n = h(n), n == null || n === void 0)
593
594
  return "idle";
594
- const o = Math.max(Math.min(a, r), 0), c = Math.max(Math.min(a + e, r), 0);
595
- return n < o || t === "backwards" && n === o ? "before" : n > c || t === "forwards" && n === c ? "after" : "active";
595
+ const o = Math.max(Math.min(a, r), 0), l = Math.max(Math.min(a + e, r), 0);
596
+ return n < o || t === "backwards" && n === o ? "before" : n > l || t === "forwards" && n === l ? "after" : "active";
596
597
  }
597
- function Le(s, t) {
598
+ function Ae(s, t) {
598
599
  let { localTime: e = null, delay: n = 0, activeDuration: r = 0, fill: a } = s;
599
600
  if (r = h(r), e = h(e), e == null || e === void 0)
600
601
  return null;
@@ -609,30 +610,30 @@ function Le(s, t) {
609
610
  return null;
610
611
  }
611
612
  }
612
- function Pe(s, t, e) {
613
+ function Ne(s, t, e) {
613
614
  const { duration: n = 0, iterations: r = 1, iterationStart: a = 0 } = s;
614
615
  if (typeof n != "number")
615
616
  throw new TypeError("Duration cannot be unresolved");
616
617
  let o = 0;
617
618
  return n === 0 ? t === "before" ? o = 0 : o = r : o = e / Et(n), o + a;
618
619
  }
619
- function De(s, t, e, n) {
620
+ function Ue(s, t, e, n) {
620
621
  const { iterations: r = 1, iterationStart: a = 0, activeDuration: o = 0 } = s;
621
622
  if (H(e))
622
623
  return null;
623
- let c = 0;
624
- return e === 1 / 0 && (c = a % 1), c === 0 && (t === "active" || t === "after") && o === n && r !== 0 && (c = 1), c;
624
+ let l = 0;
625
+ return e === 1 / 0 && (l = a % 1), l === 0 && (t === "active" || t === "after") && o === n && r !== 0 && (l = 1), l;
625
626
  }
626
627
  function ne(s, t) {
627
- const { iterations: e = 1 } = s, n = Le(s, t);
628
+ const { iterations: e = 1 } = s, n = Ae(s, t);
628
629
  if (H(n))
629
630
  return null;
630
631
  if (t === "after" && e === 1 / 0)
631
632
  return 1 / 0;
632
- const r = Pe(s, t, n);
633
- return De(s, t, r, n) === 1 ? Math.floor(r) - 1 : Math.floor(r);
633
+ const r = Ne(s, t, n);
634
+ return Ue(s, t, r, n) === 1 ? Math.floor(r) - 1 : Math.floor(r);
634
635
  }
635
- class Ae extends Event {
636
+ class We extends Event {
636
637
  constructor(t) {
637
638
  super("update", { bubbles: !1, cancelable: !1, composed: !1 }), j(this, "currentTime"), this.currentTime = t;
638
639
  }
@@ -640,7 +641,7 @@ class Ae extends Event {
640
641
  var N, Y;
641
642
  class E extends EventTarget {
642
643
  constructor(t = { type: "swipe", axis: "x", rangeStart: 0, rangeEnd: window.screen.availWidth, source: document.body }) {
643
- super(), m(this, N, void 0), m(this, Y, void 0), t.source.addEventListener(t.type, this.onGesture.bind(this)), l(this, Y, CSS.percent(0)), l(this, N, t);
644
+ super(), g(this, N, void 0), g(this, Y, void 0), t.source.addEventListener(t.type, this.onGesture.bind(this)), c(this, Y, CSS.percent(0)), c(this, N, t);
644
645
  }
645
646
  onGesture(t) {
646
647
  const e = i(this, N).source.getBoundingClientRect();
@@ -651,18 +652,18 @@ class E extends EventTarget {
651
652
  };
652
653
  switch (i(this, N).type) {
653
654
  case "swipe": {
654
- const { rangeStart: a, rangeEnd: o } = i(this, N), c = i(this, N).axis;
655
+ const { rangeStart: a, rangeEnd: o } = i(this, N), l = i(this, N).axis;
655
656
  n = rt(
656
- r[c],
657
+ r[l],
657
658
  [h(a, "px"), h(o, "px")],
658
659
  [0, 100]
659
660
  );
660
661
  break;
661
662
  }
662
663
  case "pan": {
663
- const { rangeStart: a, rangeEnd: o } = i(this, N), { x: c, y: g } = r;
664
+ const { rangeStart: a, rangeEnd: o } = i(this, N), { x: l, y: m } = r;
664
665
  n = rt(
665
- { x: c, y: g },
666
+ { x: l, y: m },
666
667
  {
667
668
  min: { x: h(a.x, "px"), y: h(a.y, "px") },
668
669
  max: { x: h(o.x, "px"), y: h(o.y, "px") }
@@ -673,9 +674,9 @@ class E extends EventTarget {
673
674
  break;
674
675
  }
675
676
  case "pinch": {
676
- const { rangeStart: a, rangeEnd: o } = i(this, N), { scale: c } = t;
677
+ const { rangeStart: a, rangeEnd: o } = i(this, N), { scale: l } = t;
677
678
  n = rt(
678
- c,
679
+ l,
679
680
  [h(a, ""), h(o, "")],
680
681
  // figure out which unit
681
682
  [0, 100]
@@ -683,15 +684,15 @@ class E extends EventTarget {
683
684
  break;
684
685
  }
685
686
  case "rotate": {
686
- const { rangeStart: a, rangeEnd: o } = i(this, N), { rotation: c } = t;
687
+ const { rangeStart: a, rangeEnd: o } = i(this, N), { rotation: l } = t;
687
688
  n = rt(
688
- c,
689
+ l,
689
690
  [h(a, "deg"), h(o, "deg")],
690
691
  [0, 100]
691
692
  );
692
693
  }
693
694
  }
694
- l(this, Y, CSS.percent(n)), this.dispatchEvent(new Ae(i(this, Y)));
695
+ c(this, Y, CSS.percent(n)), this.dispatchEvent(new We(i(this, Y)));
695
696
  }
696
697
  addEventListener(t, e, n) {
697
698
  super.addEventListener(t, e, n);
@@ -711,7 +712,7 @@ const A = /* @__PURE__ */ new WeakMap();
711
712
  var at;
712
713
  class pt extends dt {
713
714
  constructor(t, e = null) {
714
- super(t), m(this, at, null), l(this, at, e);
715
+ super(t), g(this, at, null), c(this, at, e);
715
716
  }
716
717
  get parent() {
717
718
  return i(this, at);
@@ -763,9 +764,9 @@ class pt extends dt {
763
764
  }
764
765
  at = /* @__PURE__ */ new WeakMap();
765
766
  var U, _;
766
- const Ne = class ft {
767
+ const Ie = class ft {
767
768
  constructor(t) {
768
- m(this, U, []), m(this, _, null), l(this, U, t.map((e) => (e instanceof ft ? l(e, _, this) : e instanceof dt && (e = new pt(e, this)), e)));
769
+ g(this, U, []), g(this, _, null), c(this, U, t.map((e) => (e instanceof ft ? c(e, _, this) : e instanceof dt && (e = new pt(e, this)), e)));
769
770
  }
770
771
  get parent() {
771
772
  return i(this, _);
@@ -790,17 +791,17 @@ const Ne = class ft {
790
791
  }
791
792
  append(...t) {
792
793
  t.forEach((e) => {
793
- i(this, U).includes(e) || (e instanceof ft ? l(e, _, this) : e instanceof dt && (e = new pt(e, this)), i(this, U).push(e));
794
+ i(this, U).includes(e) || (e instanceof ft ? c(e, _, this) : e instanceof dt && (e = new pt(e, this)), i(this, U).push(e));
794
795
  });
795
796
  }
796
797
  prepend(...t) {
797
798
  t.forEach((e) => {
798
- i(this, U).includes(e) || (e instanceof ft ? l(e, _, this) : e instanceof dt && (e = new pt(e, this)), i(this, U).unshift(e));
799
+ i(this, U).includes(e) || (e instanceof ft ? c(e, _, this) : e instanceof dt && (e = new pt(e, this)), i(this, U).unshift(e));
799
800
  });
800
801
  }
801
802
  };
802
803
  U = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap();
803
- let Ot = Ne;
804
+ let Ot = Ie;
804
805
  class nt {
805
806
  constructor() {
806
807
  j(this, "promise"), j(this, "state"), j(this, "nativeResolve"), j(this, "nativeReject"), this.state = "pending", this.nativeResolve = this.nativeReject = null, this.promise = new Promise((t, e) => {
@@ -818,9 +819,9 @@ class nt {
818
819
  }
819
820
  }
820
821
  var J, St, ie;
821
- class Ue extends Ot {
822
+ class $e extends Ot {
822
823
  constructor(t, e = ut) {
823
- super(t), m(this, St), m(this, J, void 0), l(this, J, {
824
+ super(t), g(this, St), g(this, J, void 0), c(this, J, {
824
825
  ...ut,
825
826
  ...e
826
827
  });
@@ -836,8 +837,8 @@ class Ue extends Ot {
836
837
  }
837
838
  getComputedTiming() {
838
839
  var t, e;
839
- const n = this.getTiming(), r = { ...n }, { delay: a = 0 } = ((t = this.children.item(0)) == null ? void 0 : t.getComputedTiming()) ?? {}, { endDelay: o = 0, endTime: c = 0 } = ((e = this.children.item(this.children.length - 1)) == null ? void 0 : e.getComputedTiming()) ?? {};
840
- n.delay = n.delay ? n.delay + a : a, n.endDelay = n.endDelay ? n.endDelay + o : o, r.endTime = c;
840
+ const n = this.getTiming(), r = { ...n }, { delay: a = 0 } = ((t = this.children.item(0)) == null ? void 0 : t.getComputedTiming()) ?? {}, { endDelay: o = 0, endTime: l = 0 } = ((e = this.children.item(this.children.length - 1)) == null ? void 0 : e.getComputedTiming()) ?? {};
841
+ n.delay = n.delay ? n.delay + a : a, n.endDelay = n.endDelay ? n.endDelay + o : o, r.endTime = l;
841
842
  for (let C = 0; C < this.children.length; C++) {
842
843
  const M = this.children.item(C);
843
844
  if (!M)
@@ -848,14 +849,14 @@ class Ue extends Ot {
848
849
  } = M.getComputedTiming();
849
850
  r.activeDuration = r.activeDuration ? h(r.activeDuration, "ms") + h(Vt, "ms") : Vt, n.duration = n.duration instanceof CSSNumericValue ? n.duration.to("ms").value : n.duration, L = L instanceof CSSNumericValue ? L.to("ms").value : L, typeof L != "string" && (n.duration === "auto" ? n.duration = h(L, "ms") : typeof n.duration != "string" && (n.duration = n.duration ? n.duration + L : L));
850
851
  }
851
- const { timeline: g, startTime: f, currentTime: w } = A.get(this) ?? {}, k = g instanceof E ? "percent" : "ms";
852
- let { duration: b = 0, iterations: X = 1 } = r;
853
- if (b === "auto" && (b = 0), typeof b == "string")
852
+ const { timeline: m, startTime: p, currentTime: w } = A.get(this) ?? {}, k = m instanceof E ? "percent" : "ms";
853
+ let { duration: T = 0, iterations: X = 1 } = r;
854
+ if (T === "auto" && (T = 0), typeof T == "string")
854
855
  throw new TypeError("Unknown effect duration keyword.");
855
- return r.duration = b, r.activeDuration = Et(b) * X, r.startTime = f ?? void 0, r.localTime = w, r.currentIteration = ne(r, ee(r, i(this, St, ie))), g instanceof E ? $t(r) : (g instanceof DocumentTimeline && (r.progress = w && h(w, k) / h(c, k)), r);
856
+ return r.duration = T, r.activeDuration = Et(T) * X, r.startTime = p ?? void 0, r.localTime = w, r.currentIteration = ne(r, ee(r, i(this, St, ie))), m instanceof E ? $t(r) : (m instanceof DocumentTimeline && (r.progress = w && h(w, k) / h(l, k)), r);
856
857
  }
857
858
  updateTiming(t) {
858
- l(this, J, {
859
+ c(this, J, {
859
860
  ...i(this, J),
860
861
  ...t
861
862
  });
@@ -872,12 +873,12 @@ J = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakSet(), ie = func
872
873
  var d, x, ht, v, S, P, u, y, R, z, O, ot, W, mt, Rt, Q, lt, q, tt, kt, Kt, xt, qt, Ct, zt, B, G, ct, gt, Mt, I, V, D, $, yt, Lt, Pt;
873
874
  const se = class extends EventTarget {
874
875
  constructor(t, e) {
875
- super(), m(this, mt), m(this, Q), m(this, q), m(this, kt), m(this, xt), m(this, Ct), m(this, B), m(this, gt), m(this, I), m(this, D), j(this, "id", ""), j(this, "oncancel", null), j(this, "onfinish", null), j(this, "onremove", null), m(this, d, void 0), m(this, x, void 0), m(this, ht, "active"), m(this, v, {
876
+ super(), g(this, mt), g(this, Q), g(this, q), g(this, kt), g(this, xt), g(this, Ct), g(this, B), g(this, gt), g(this, I), g(this, D), j(this, "id", ""), j(this, "oncancel", null), j(this, "onfinish", null), j(this, "onremove", null), g(this, d, void 0), g(this, x, void 0), g(this, ht, "active"), g(this, v, {
876
877
  task: null,
877
878
  playbackRate: null
878
- }), m(this, S, new nt()), m(this, P, new nt()), m(this, u, null), m(this, y, null), m(this, R, []), m(this, z, null), m(this, O, !1), m(this, ot, 0), m(this, W, 1), m(this, ct, () => {
879
- p(this, B, G).call(this);
880
- }), m(this, yt, () => {
879
+ }), g(this, S, new nt()), g(this, P, new nt()), g(this, u, null), g(this, y, null), g(this, R, []), g(this, z, null), g(this, O, !1), g(this, ot, 0), g(this, W, 1), g(this, ct, () => {
880
+ f(this, B, G).call(this);
881
+ }), g(this, yt, () => {
881
882
  var n;
882
883
  if (i(this, P).state !== "pending" || this.playState !== "finished")
883
884
  return;
@@ -894,12 +895,12 @@ const se = class extends EventTarget {
894
895
  }
895
896
  );
896
897
  requestAnimationFrame(() => {
897
- var c;
898
- this.dispatchEvent(o), (c = this.onfinish) == null || c.call(this, o);
898
+ var l;
899
+ this.dispatchEvent(o), (l = this.onfinish) == null || l.call(this, o);
899
900
  });
900
- }), m(this, Lt, () => {
901
+ }), g(this, Lt, () => {
901
902
  var n, r;
902
- const a = this.currentTime, o = (n = this.timeline) == null ? void 0 : n.currentTime, c = new AnimationPlaybackEvent(
903
+ const a = this.currentTime, o = (n = this.timeline) == null ? void 0 : n.currentTime, l = new AnimationPlaybackEvent(
903
904
  "cancel",
904
905
  {
905
906
  get currentTime() {
@@ -910,12 +911,12 @@ const se = class extends EventTarget {
910
911
  }
911
912
  }
912
913
  );
913
- this.dispatchEvent(c), (r = this.oncancel) == null || r.call(this, c);
914
- }), m(this, Pt, () => {
914
+ this.dispatchEvent(l), (r = this.oncancel) == null || r.call(this, l);
915
+ }), g(this, Pt, () => {
915
916
  var n;
916
917
  const r = new Event("remove");
917
918
  this.dispatchEvent(r), (n = this.onremove) == null || n.call(this, r);
918
- }), i(this, S).resolve(this), l(this, x, t ?? null), l(this, d, e ?? document.timeline), i(this, x) && A.set(i(this, x), this), p(this, gt, Mt).call(this), e instanceof E && e.addEventListener("update", i(this, ct));
919
+ }), i(this, S).resolve(this), c(this, x, t ?? null), c(this, d, e ?? document.timeline), i(this, x) && A.set(i(this, x), this), f(this, gt, Mt).call(this), e instanceof E && e.addEventListener("update", i(this, ct));
919
920
  }
920
921
  reverse() {
921
922
  var t;
@@ -934,28 +935,28 @@ const se = class extends EventTarget {
934
935
  play() {
935
936
  const t = this.playState === "paused" && this.pending;
936
937
  let e = this.currentTime;
937
- (i(this, v).playbackRate ?? this.playbackRate) === 0 && e === null && l(this, y, 0), e === null && l(this, O, !0), (this.playState === "finished" || t) && (l(this, u, null), l(this, y, null), l(this, O, !0)), i(this, y) && l(this, u, null), i(this, v).task && (i(this, v).task = null), !(i(this, u) !== null && i(this, y) === null && !t && i(this, v).playbackRate === null) && (p(this, B, G).call(this), p(this, Q, lt).call(this), i(this, v).task = "play", p(this, I, V).call(this, !1));
938
+ (i(this, v).playbackRate ?? this.playbackRate) === 0 && e === null && c(this, y, 0), e === null && c(this, O, !0), (this.playState === "finished" || t) && (c(this, u, null), c(this, y, null), c(this, O, !0)), i(this, y) && c(this, u, null), i(this, v).task && (i(this, v).task = null), !(i(this, u) !== null && i(this, y) === null && !t && i(this, v).playbackRate === null) && (f(this, B, G).call(this), f(this, Q, lt).call(this), i(this, v).task = "play", f(this, I, V).call(this, !1));
938
939
  }
939
940
  pause() {
940
- this.playState !== "paused" && (this.currentTime === null && l(this, O, !0), i(this, v).task && (i(this, v).task = null), p(this, Q, lt).call(this), i(this, v).task = "pause");
941
+ this.playState !== "paused" && (this.currentTime === null && c(this, O, !0), i(this, v).task && (i(this, v).task = null), f(this, Q, lt).call(this), i(this, v).task = "pause");
941
942
  }
942
943
  persist() {
943
- i(this, R).forEach((t) => t.persist()), l(this, ht, "persisted");
944
+ i(this, R).forEach((t) => t.persist()), c(this, ht, "persisted");
944
945
  }
945
946
  finish() {
946
947
  var t;
947
948
  const { endTime: e = 0 } = ((t = this.effect) == null ? void 0 : t.getComputedTiming()) ?? {}, n = i(this, v).playbackRate ?? i(this, W);
948
949
  if (n === 0 || n > 0 && e === 1 / 0)
949
950
  throw new DOMException("InvalidStateError");
950
- p(this, D, $).call(this);
951
+ f(this, D, $).call(this);
951
952
  let r;
952
- if (n > 0 ? r = e : r = 0, p(this, mt, Rt).call(this, r), this.startTime === null && i(this, d) !== null && i(this, d).currentTime !== null && r !== null) {
953
+ if (n > 0 ? r = e : r = 0, f(this, mt, Rt).call(this, r), this.startTime === null && i(this, d) !== null && i(this, d).currentTime !== null && r !== null) {
953
954
  const a = i(this, d) instanceof E ? "percent" : "ms";
954
955
  r = h(r, a);
955
956
  const o = h(i(this, d).currentTime, a);
956
- l(this, u, o - r / n);
957
+ c(this, u, o - r / n);
957
958
  }
958
- i(this, v).task === "pause" && i(this, u) !== null && (l(this, y, null), p(this, q, tt).call(this), i(this, S).resolve(this)), i(this, v).task === "play" && i(this, u) !== null && (p(this, q, tt).call(this), i(this, S).resolve(this)), p(this, I, V).call(this, !0), i(this, R).forEach((a) => a.finish());
959
+ i(this, v).task === "pause" && i(this, u) !== null && (c(this, y, null), f(this, q, tt).call(this), i(this, S).resolve(this)), i(this, v).task === "play" && i(this, u) !== null && (f(this, q, tt).call(this), i(this, S).resolve(this)), f(this, I, V).call(this, !0), i(this, R).forEach((a) => a.finish());
959
960
  }
960
961
  commitStyles() {
961
962
  i(this, R).forEach((t) => {
@@ -963,7 +964,7 @@ const se = class extends EventTarget {
963
964
  });
964
965
  }
965
966
  cancel() {
966
- this.playState !== "idle" && (p(this, D, $).call(this), i(this, S).reject(new DOMException("The user aborted a request", "AbortError")), p(this, q, tt).call(this), l(this, S, new nt()), i(this, P).state === "pending" && i(this, P).reject(new DOMException("The user aborted a request", "AbortError")), l(this, P, new nt()), i(this, R).forEach((t) => t.cancel())), l(this, u, null), l(this, y, null);
967
+ this.playState !== "idle" && (f(this, D, $).call(this), i(this, S).reject(new DOMException("The user aborted a request", "AbortError")), f(this, q, tt).call(this), c(this, S, new nt()), i(this, P).state === "pending" && i(this, P).reject(new DOMException("The user aborted a request", "AbortError")), c(this, P, new nt()), i(this, R).forEach((t) => t.cancel())), c(this, u, null), c(this, y, null);
967
968
  }
968
969
  updatePlaybackRate(t) {
969
970
  var e;
@@ -973,17 +974,17 @@ const se = class extends EventTarget {
973
974
  switch (n) {
974
975
  case "idle":
975
976
  case "paused":
976
- p(this, D, $).call(this);
977
+ f(this, D, $).call(this);
977
978
  break;
978
979
  case "finished": {
979
980
  const r = i(this, d) instanceof E ? "percent" : "ms", a = ((e = i(this, d)) == null ? void 0 : e.currentTime) ?? null;
980
981
  if (t === 0)
981
- l(this, u, h(a, r));
982
+ c(this, u, h(a, r));
982
983
  else if (a !== null) {
983
984
  let o = null;
984
- o = (h(a, r) - (i(this, u) ?? 0)) * this.playbackRate, i(this, u) !== null && o !== null && l(this, u, (h(a, r) - o) / t);
985
+ o = (h(a, r) - (i(this, u) ?? 0)) * this.playbackRate, i(this, u) !== null && o !== null && c(this, u, (h(a, r) - o) / t);
985
986
  }
986
- p(this, D, $).call(this), p(this, I, V).call(this, !1), p(this, B, G).call(this);
987
+ f(this, D, $).call(this), f(this, I, V).call(this, !1), f(this, B, G).call(this);
987
988
  break;
988
989
  }
989
990
  default:
@@ -997,19 +998,19 @@ const se = class extends EventTarget {
997
998
  super.removeEventListener(t, e, n);
998
999
  }
999
1000
  set playbackRate(t) {
1000
- l(this, W, t), i(this, R).forEach((e) => {
1001
+ c(this, W, t), i(this, R).forEach((e) => {
1001
1002
  e.playbackRate *= t;
1002
1003
  });
1003
1004
  }
1004
1005
  set startTime(t) {
1005
- l(this, u, h(t)), i(this, R).forEach((e) => e.startTime = t);
1006
+ c(this, u, h(t)), i(this, R).forEach((e) => e.startTime = t);
1006
1007
  }
1007
1008
  set currentTime(t) {
1008
1009
  var e;
1009
1010
  const n = i(this, d) instanceof E ? "percent" : "ms", r = h(((e = i(this, d)) == null ? void 0 : e.currentTime) ?? null, n);
1010
1011
  if (H(t) && !H(r))
1011
1012
  throw new TypeError("currentTime may not be changed from resolved to unresolved.");
1012
- l(this, O, !1), i(this, y) !== null || i(this, u) === null || r === null || this.playbackRate === 0 ? l(this, y, h(t, n)) : l(this, u, r - h(t, n) / this.playbackRate), (i(this, d) === null || r === null) && l(this, u, null), l(this, z, null), p(this, mt, Rt).call(this, t), i(this, v).task === "pause" && (l(this, y, h(t, n)), p(this, D, $).call(this), l(this, u, null), p(this, q, tt).call(this), i(this, S).resolve(this)), p(this, I, V).call(this, !0);
1013
+ c(this, O, !1), i(this, y) !== null || i(this, u) === null || r === null || this.playbackRate === 0 ? c(this, y, h(t, n)) : c(this, u, r - h(t, n) / this.playbackRate), (i(this, d) === null || r === null) && c(this, u, null), c(this, z, null), f(this, mt, Rt).call(this, t), i(this, v).task === "pause" && (c(this, y, h(t, n)), f(this, D, $).call(this), c(this, u, null), f(this, q, tt).call(this), i(this, S).resolve(this)), f(this, I, V).call(this, !0);
1013
1014
  }
1014
1015
  set timeline(t) {
1015
1016
  var e, n;
@@ -1017,14 +1018,14 @@ const se = class extends EventTarget {
1017
1018
  if (r === t)
1018
1019
  return;
1019
1020
  i(this, d) instanceof E && i(this, d).removeEventListener("update", i(this, ct));
1020
- const a = this.playState, o = r instanceof E ? "percent" : "ms", c = h(this.currentTime, o), { progress: g = null, endTime: f = 0 } = ((e = i(this, x)) == null ? void 0 : e.getComputedTiming()) ?? {}, w = h(f, o), k = r instanceof E, b = t instanceof E, X = t instanceof DocumentTimeline, C = this.pending;
1021
- if (b)
1022
- l(this, d, t), t.addEventListener("update", i(this, ct)), p(this, D, $).call(this), l(this, O, !0), l(this, u, null), l(this, y, null), (a === "running" || a === "finished") && ((!i(this, S) || i(this, S).state === "resolved") && p(this, Q, lt).call(this), i(this, v).task = "play", i(this, R).forEach((M) => M.pause())), a === "paused" && g !== null && l(this, y, g * w), C && ((!i(this, S) || i(this, S).state === "resolved") && p(this, Q, lt).call(this), a === "paused" ? i(this, v).task = "pause" : i(this, v).task = "play"), i(this, u) !== null && l(this, y, null), p(this, I, V).call(this, !1);
1021
+ const a = this.playState, o = r instanceof E ? "percent" : "ms", l = h(this.currentTime, o), { progress: m = null, endTime: p = 0 } = ((e = i(this, x)) == null ? void 0 : e.getComputedTiming()) ?? {}, w = h(p, o), k = r instanceof E, T = t instanceof E, X = t instanceof DocumentTimeline, C = this.pending;
1022
+ if (T)
1023
+ c(this, d, t), t.addEventListener("update", i(this, ct)), f(this, D, $).call(this), c(this, O, !0), c(this, u, null), c(this, y, null), (a === "running" || a === "finished") && ((!i(this, S) || i(this, S).state === "resolved") && f(this, Q, lt).call(this), i(this, v).task = "play", i(this, R).forEach((M) => M.pause())), a === "paused" && m !== null && c(this, y, m * w), C && ((!i(this, S) || i(this, S).state === "resolved") && f(this, Q, lt).call(this), a === "paused" ? i(this, v).task = "pause" : i(this, v).task = "play"), i(this, u) !== null && c(this, y, null), f(this, I, V).call(this, !1);
1023
1024
  else if (X) {
1024
- if (l(this, d, t), k) {
1025
- if (c !== null && g !== null) {
1025
+ if (c(this, d, t), k) {
1026
+ if (l !== null && m !== null) {
1026
1027
  const { endTime: M = 0 } = ((n = i(this, x)) == null ? void 0 : n.getComputedTiming()) ?? {}, L = h(M, "ms");
1027
- this.currentTime = g * L;
1028
+ this.currentTime = m * L;
1028
1029
  }
1029
1030
  switch (a) {
1030
1031
  case "paused":
@@ -1040,11 +1041,11 @@ const se = class extends EventTarget {
1040
1041
  }
1041
1042
  set effect(t) {
1042
1043
  if (t !== i(this, x)) {
1043
- if (this.pending && p(this, q, tt).call(this), i(this, x) && A.delete(i(this, x)), t) {
1044
+ if (this.pending && f(this, q, tt).call(this), i(this, x) && A.delete(i(this, x)), t) {
1044
1045
  const e = A.get(t);
1045
1046
  e && (e.effect = null), A.set(t, this);
1046
1047
  }
1047
- l(this, x, t), p(this, gt, Mt).call(this), p(this, I, V).call(this, !1);
1048
+ c(this, x, t), f(this, gt, Mt).call(this), f(this, I, V).call(this, !1);
1048
1049
  }
1049
1050
  }
1050
1051
  get ready() {
@@ -1104,11 +1105,11 @@ d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), ht = /* @_
1104
1105
  const e = h(((t = i(this, d)) == null ? void 0 : t.currentTime) ?? null);
1105
1106
  if (s === null && e !== null)
1106
1107
  throw new TypeError();
1107
- s === null || e === null || (s = h(s), l(this, O, !1), i(this, y) !== null || i(this, u) === null || i(this, d) instanceof E && i(this, d).phase === "inactive" || i(this, W) === 0 ? l(this, y, s) : l(this, u, e - s / i(this, W)), i(this, d) instanceof E && i(this, d).phase === "inactive" && l(this, u, null), l(this, z, null));
1108
+ s === null || e === null || (s = h(s), c(this, O, !1), i(this, y) !== null || i(this, u) === null || i(this, d) instanceof E && i(this, d).phase === "inactive" || i(this, W) === 0 ? c(this, y, s) : c(this, u, e - s / i(this, W)), i(this, d) instanceof E && i(this, d).phase === "inactive" && c(this, u, null), c(this, z, null));
1108
1109
  }, Q = /* @__PURE__ */ new WeakSet(), lt = function() {
1109
- i(this, S).state !== "pending" && l(this, S, new nt()), cancelAnimationFrame(i(this, ot)), l(this, ot, requestAnimationFrame(() => {
1110
+ i(this, S).state !== "pending" && c(this, S, new nt()), cancelAnimationFrame(i(this, ot)), c(this, ot, requestAnimationFrame(() => {
1110
1111
  var s;
1111
- (((s = i(this, d)) == null ? void 0 : s.currentTime) ?? null) !== null && (p(this, Ct, zt).call(this), i(this, v).task === "play" && (i(this, u) !== null || i(this, y) !== null) ? p(this, kt, Kt).call(this) : i(this, v).task === "pause" && p(this, xt, qt).call(this), Promise.all(i(this, R).map((t) => t.finished)).then(i(this, yt)), Promise.all(i(this, R).map((t) => new Promise((e) => t.onremove = e))).then(i(this, Pt)), Promise.all(i(this, R).map((t) => new Promise((e) => t.oncancel = e))).then(i(this, Lt)).then(() => l(this, ht, "removed")));
1112
+ (((s = i(this, d)) == null ? void 0 : s.currentTime) ?? null) !== null && (f(this, Ct, zt).call(this), i(this, v).task === "play" && (i(this, u) !== null || i(this, y) !== null) ? f(this, kt, Kt).call(this) : i(this, v).task === "pause" && f(this, xt, qt).call(this), Promise.all(i(this, R).map((t) => t.finished)).then(i(this, yt)), Promise.all(i(this, R).map((t) => new Promise((e) => t.onremove = e))).then(i(this, Pt)), Promise.all(i(this, R).map((t) => new Promise((e) => t.oncancel = e))).then(i(this, Lt)).then(() => c(this, ht, "removed")));
1112
1113
  }));
1113
1114
  }, q = /* @__PURE__ */ new WeakSet(), tt = function() {
1114
1115
  cancelAnimationFrame(i(this, ot)), i(this, v).task = null;
@@ -1119,36 +1120,36 @@ d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), ht = /* @_
1119
1120
  return;
1120
1121
  const e = i(this, d) instanceof E ? "percent" : "ms";
1121
1122
  if (i(this, y) !== null)
1122
- p(this, D, $).call(this), this.playbackRate === 0 ? l(this, u, h(t, e)) : (l(this, u, h(t, e) - i(this, y) / this.playbackRate), l(this, y, null));
1123
+ f(this, D, $).call(this), this.playbackRate === 0 ? c(this, u, h(t, e)) : (c(this, u, h(t, e) - i(this, y) / this.playbackRate), c(this, y, null));
1123
1124
  else if (i(this, u) !== null && i(this, v).playbackRate !== null) {
1124
1125
  const n = (h(t, e) - i(this, u)) * this.playbackRate;
1125
- p(this, D, $).call(this);
1126
+ f(this, D, $).call(this);
1126
1127
  const r = this.playbackRate;
1127
- r === 0 ? (l(this, y, null), l(this, u, h(t, e))) : l(this, u, h(t, e) - n / r);
1128
+ r === 0 ? (c(this, y, null), c(this, u, h(t, e))) : c(this, u, h(t, e) - n / r);
1128
1129
  }
1129
- i(this, S).state === "pending" && i(this, S).resolve(this), p(this, I, V).call(this, !1), p(this, B, G).call(this), i(this, v).task = null, this.timeline instanceof DocumentTimeline && i(this, R).forEach((n) => n.play());
1130
+ i(this, S).state === "pending" && i(this, S).resolve(this), f(this, I, V).call(this, !1), f(this, B, G).call(this), i(this, v).task = null, this.timeline instanceof DocumentTimeline && i(this, R).forEach((n) => n.play());
1130
1131
  }, xt = /* @__PURE__ */ new WeakSet(), qt = function() {
1131
1132
  var s;
1132
1133
  const t = ((s = this.timeline) == null ? void 0 : s.currentTime) ?? null;
1133
1134
  if (t === null)
1134
1135
  return;
1135
1136
  const e = i(this, d) instanceof E ? "percent" : "ms", n = t;
1136
- i(this, u) !== null && i(this, y) === null && l(this, y, (h(n, e) - i(this, u)) * this.playbackRate), p(this, D, $).call(this), l(this, u, null), i(this, S).resolve(this), p(this, I, V).call(this, !1), p(this, B, G).call(this), i(this, v).task = null, i(this, R).forEach((r) => r.pause());
1137
+ i(this, u) !== null && i(this, y) === null && c(this, y, (h(n, e) - i(this, u)) * this.playbackRate), f(this, D, $).call(this), c(this, u, null), i(this, S).resolve(this), f(this, I, V).call(this, !1), f(this, B, G).call(this), i(this, v).task = null, i(this, R).forEach((r) => r.pause());
1137
1138
  }, Ct = /* @__PURE__ */ new WeakSet(), zt = function() {
1138
1139
  if (i(this, O) && !(!i(this, d) || !i(this, d).currentTime) && !(this.playState === "idle" || this.playState === "paused" && i(this, y) !== null)) {
1139
1140
  if (i(this, d) instanceof E) {
1140
1141
  const s = i(this, v).playbackRate ?? this.playbackRate;
1141
- l(this, u, s >= 0 ? 0 : 100);
1142
+ c(this, u, s >= 0 ? 0 : 100);
1142
1143
  } else
1143
- l(this, u, h(i(this, d).currentTime, "ms"));
1144
- l(this, y, null);
1144
+ c(this, u, h(i(this, d).currentTime, "ms"));
1145
+ c(this, y, null);
1145
1146
  }
1146
1147
  }, B = /* @__PURE__ */ new WeakSet(), G = function() {
1147
1148
  var s;
1148
1149
  const t = ((s = i(this, d)) == null ? void 0 : s.currentTime) ?? null;
1149
1150
  if (t === null)
1150
1151
  return;
1151
- const e = i(this, x), n = i(this, d) instanceof E ? xe(t, e?.getTiming()) : Et(t);
1152
+ const e = i(this, x), n = i(this, d) instanceof E ? Le(t, e?.getTiming()) : Et(t);
1152
1153
  let r = null;
1153
1154
  if (i(this, u) !== null) {
1154
1155
  const a = h(t, "percent") === (this.playbackRate < 0 ? 0 : 100) ? this.playbackRate < 0 ? 1e-3 : -1e-3 : 0;
@@ -1165,7 +1166,7 @@ d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), ht = /* @_
1165
1166
  if (t instanceof Ot)
1166
1167
  for (let n = 0; n < t.children.length; n++) {
1167
1168
  const r = new se(t.children.item(n));
1168
- if (t instanceof Ue && n > 0) {
1169
+ if (t instanceof $e && n > 0) {
1169
1170
  const { endTime: a = null } = ((s = e[n - 1].effect) == null ? void 0 : s.getComputedTiming()) ?? {};
1170
1171
  r.startTime = h(a, "ms");
1171
1172
  }
@@ -1173,35 +1174,35 @@ d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), ht = /* @_
1173
1174
  }
1174
1175
  else {
1175
1176
  const n = i(this, d) instanceof E ? document.timeline : i(this, d);
1176
- e.push(new ke(t, n));
1177
+ e.push(new Me(t, n));
1177
1178
  }
1178
- l(this, R, e);
1179
+ c(this, R, e);
1179
1180
  }, I = /* @__PURE__ */ new WeakSet(), V = function(s) {
1180
1181
  var t, e;
1181
1182
  const n = ((t = i(this, d)) == null ? void 0 : t.currentTime) ?? null, r = i(this, d) instanceof E ? "percent" : "ms";
1182
1183
  let a = h(this.currentTime, r);
1183
1184
  if (a && i(this, u) !== null && !this.pending) {
1184
- let { delay: o = 0, endDelay: c = 0, iterations: g = 1, duration: f = "auto" } = ((e = i(this, x)) == null ? void 0 : e.getTiming()) ?? {};
1185
+ let { delay: o = 0, endDelay: l = 0, iterations: m = 1, duration: p = "auto" } = ((e = i(this, x)) == null ? void 0 : e.getTiming()) ?? {};
1185
1186
  const w = i(this, v).playbackRate ?? this.playbackRate;
1186
- if (f === "auto")
1187
- f = i(this, d) instanceof E ? It : 0;
1188
- else if (f instanceof CSSNumericValue)
1189
- f = f.to("ms").value;
1190
- else if (typeof f == "string")
1187
+ if (p === "auto")
1188
+ p = i(this, d) instanceof E ? It : 0;
1189
+ else if (p instanceof CSSNumericValue)
1190
+ p = p.to("ms").value;
1191
+ else if (typeof p == "string")
1191
1192
  throw new TypeError("Unknown effect duration keyword.");
1192
- const k = o + f * g + c;
1193
- let b = h(i(this, z), r);
1194
- w > 0 && a >= k && i(this, z) !== null ? ((b === null || b < k) && (b = k), l(this, y, s ? a : b)) : w < 0 && a <= 0 ? ((b === null || b > 0) && (b = 0), l(this, y, s ? a : b)) : w !== 0 && (s && i(this, y) !== null && (n !== null ? l(this, u, h(n, r) - i(this, y) / w) : l(this, u, null)), l(this, y, null));
1193
+ const k = o + p * m + l;
1194
+ let T = h(i(this, z), r);
1195
+ w > 0 && a >= k && i(this, z) !== null ? ((T === null || T < k) && (T = k), c(this, y, s ? a : T)) : w < 0 && a <= 0 ? ((T === null || T > 0) && (T = 0), c(this, y, s ? a : T)) : w !== 0 && (s && i(this, y) !== null && (n !== null ? c(this, u, h(n, r) - i(this, y) / w) : c(this, u, null)), c(this, y, null));
1195
1196
  }
1196
- p(this, B, G).call(this), l(this, z, this.currentTime), this.playState === "finished" ? i(this, P).state === "pending" && i(this, yt).call(this) : i(this, P).state === "resolved" && l(this, P, new nt());
1197
+ f(this, B, G).call(this), c(this, z, this.currentTime), this.playState === "finished" ? i(this, P).state === "pending" && i(this, yt).call(this) : i(this, P).state === "resolved" && c(this, P, new nt());
1197
1198
  }, D = /* @__PURE__ */ new WeakSet(), $ = function() {
1198
1199
  i(this, v).playbackRate && (this.playbackRate = i(this, v).playbackRate), i(this, v).playbackRate = null;
1199
1200
  }, yt = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Pt = /* @__PURE__ */ new WeakMap();
1200
- let We = se;
1201
+ let Oe = se;
1201
1202
  var et, Dt, re;
1202
1203
  class At extends Ot {
1203
1204
  constructor(t, e = ut) {
1204
- super(t), m(this, Dt), m(this, et, void 0), l(this, et, {
1205
+ super(t), g(this, Dt), g(this, et, void 0), c(this, et, {
1205
1206
  ...ut,
1206
1207
  ...e
1207
1208
  }), t.forEach((n) => n.updateTiming());
@@ -1222,22 +1223,22 @@ class At extends Ot {
1222
1223
  if (!k)
1223
1224
  continue;
1224
1225
  let {
1225
- delay: b = 0,
1226
+ delay: T = 0,
1226
1227
  endDelay: X = 0,
1227
1228
  duration: C = "auto",
1228
1229
  activeDuration: M = 0,
1229
1230
  endTime: L = 0
1230
1231
  } = k.getComputedTiming();
1231
- t.delay = t.delay ? Math.min(t.delay, b) : b, t.endDelay = t.endDelay ? Math.max(t.endDelay, X) : X, e.endTime = e.endTime ? Math.max(h(e.endTime, "ms"), h(L, "ms")) : L, e.activeDuration = e.activeDuration ? Math.max(h(e.activeDuration, "ms"), h(M, "ms")) : M, t.duration = t.duration instanceof CSSNumericValue ? t.duration.to("ms").value : t.duration, C = C instanceof CSSNumericValue ? C.to("ms").value : C, typeof C != "string" && (t.duration === "auto" ? t.duration = h(C, "ms") : typeof t.duration != "string" && (t.duration = t.duration ? Math.max(t.duration, C) : C));
1232
+ t.delay = t.delay ? Math.min(t.delay, T) : T, t.endDelay = t.endDelay ? Math.max(t.endDelay, X) : X, e.endTime = e.endTime ? Math.max(h(e.endTime, "ms"), h(L, "ms")) : L, e.activeDuration = e.activeDuration ? Math.max(h(e.activeDuration, "ms"), h(M, "ms")) : M, t.duration = t.duration instanceof CSSNumericValue ? t.duration.to("ms").value : t.duration, C = C instanceof CSSNumericValue ? C.to("ms").value : C, typeof C != "string" && (t.duration === "auto" ? t.duration = h(C, "ms") : typeof t.duration != "string" && (t.duration = t.duration ? Math.max(t.duration, C) : C));
1232
1233
  }
1233
1234
  const { timeline: n, startTime: r, currentTime: a } = A.get(this) ?? {}, o = n instanceof E ? "percent" : "ms";
1234
- let { duration: c = 0, iterations: g = 1, endTime: f = 0 } = e;
1235
- if (c === "auto" && (c = 0), typeof c == "string")
1235
+ let { duration: l = 0, iterations: m = 1, endTime: p = 0 } = e;
1236
+ if (l === "auto" && (l = 0), typeof l == "string")
1236
1237
  throw new TypeError("Unknown effect duration keyword.");
1237
- return e.duration = c, e.activeDuration = Et(c) * g, e.startTime = r ?? void 0, e.localTime = a, e.currentIteration = ne(e, ee(e, i(this, Dt, re))), n instanceof E ? $t(e) : (n instanceof DocumentTimeline && (e.progress = a && h(a, o) / h(f, o)), e);
1238
+ return e.duration = l, e.activeDuration = Et(l) * m, e.startTime = r ?? void 0, e.localTime = a, e.currentIteration = ne(e, ee(e, i(this, Dt, re))), n instanceof E ? $t(e) : (n instanceof DocumentTimeline && (e.progress = a && h(a, o) / h(p, o)), e);
1238
1239
  }
1239
1240
  updateTiming(t) {
1240
- l(this, et, {
1241
+ c(this, et, {
1241
1242
  ...i(this, et),
1242
1243
  ...t
1243
1244
  });
@@ -1251,7 +1252,7 @@ et = /* @__PURE__ */ new WeakMap(), Dt = /* @__PURE__ */ new WeakSet(), re = fun
1251
1252
  const { playbackRate: s = 1 } = A.get(this) ?? {};
1252
1253
  return s < 0 ? "backwards" : "forwards";
1253
1254
  };
1254
- class Ie extends st {
1255
+ class Ve extends st {
1255
1256
  ref = K();
1256
1257
  #t = null;
1257
1258
  #e = null;
@@ -1274,17 +1275,17 @@ class Ie extends st {
1274
1275
  const n = {}, r = window.getComputedStyle(t);
1275
1276
  for (const a of e) {
1276
1277
  let o;
1277
- a === "offset" ? o = "cssOffset" : a === "float" ? o = "cssFloat" : o = de(a), n[o] = r.getPropertyValue(a);
1278
+ a === "offset" ? o = "cssOffset" : a === "float" ? o = "cssFloat" : o = me(a), n[o] = r.getPropertyValue(a);
1278
1279
  }
1279
1280
  return n;
1280
1281
  }
1281
1282
  copyStyles(t, e, n) {
1282
- if (!be(t))
1283
+ if (!ke(t))
1283
1284
  return;
1284
1285
  const r = window.getComputedStyle(t);
1285
1286
  for (const a of n) {
1286
- const o = r.getPropertyValue(a), c = r.getPropertyPriority(a);
1287
- e.style.setProperty(a, o, c);
1287
+ const o = r.getPropertyValue(a), l = r.getPropertyPriority(a);
1288
+ e.style.setProperty(a, o, l);
1288
1289
  }
1289
1290
  }
1290
1291
  getAnimationEffect(t, e) {
@@ -1292,7 +1293,7 @@ class Ie extends st {
1292
1293
  fill: "both",
1293
1294
  duration: "auto",
1294
1295
  easing: "ease"
1295
- }, a = e.instance.transitionType, o = `translate(${t.rect.x}px, ${t.rect.y}px)`, c = `translate(${e.rect.x}px, ${e.rect.y}px)`;
1296
+ }, a = e.instance.transitionType, o = `translate(${t.rect.x}px, ${t.rect.y}px)`, l = `translate(${e.rect.x}px, ${e.rect.y}px)`;
1296
1297
  switch (a) {
1297
1298
  case "fade":
1298
1299
  n.push(
@@ -1300,7 +1301,7 @@ class Ie extends st {
1300
1301
  t.clone,
1301
1302
  [
1302
1303
  { transform: o, opacity: 1 },
1303
- { transform: c, opacity: 0 }
1304
+ { transform: l, opacity: 0 }
1304
1305
  ],
1305
1306
  r
1306
1307
  )
@@ -1309,7 +1310,7 @@ class Ie extends st {
1309
1310
  e.clone,
1310
1311
  [
1311
1312
  { transform: o },
1312
- { transform: c }
1313
+ { transform: l }
1313
1314
  ],
1314
1315
  r
1315
1316
  )
@@ -1322,7 +1323,7 @@ class Ie extends st {
1322
1323
  [
1323
1324
  { transform: o, opacity: 1 },
1324
1325
  { opacity: 0, offset: 0.5 },
1325
- { transform: c, opacity: 0 }
1326
+ { transform: l, opacity: 0 }
1326
1327
  ],
1327
1328
  r
1328
1329
  )
@@ -1332,7 +1333,7 @@ class Ie extends st {
1332
1333
  [
1333
1334
  { transform: o, opacity: 0 },
1334
1335
  { opacity: 0, offset: 0.5 },
1335
- { transform: c, opacity: 1 }
1336
+ { transform: l, opacity: 1 }
1336
1337
  ],
1337
1338
  r
1338
1339
  )
@@ -1344,7 +1345,7 @@ class Ie extends st {
1344
1345
  t.clone,
1345
1346
  [
1346
1347
  { transform: o, opacity: 1 },
1347
- { transform: c, opacity: 0 }
1348
+ { transform: l, opacity: 0 }
1348
1349
  ],
1349
1350
  r
1350
1351
  )
@@ -1353,14 +1354,14 @@ class Ie extends st {
1353
1354
  e.clone,
1354
1355
  [
1355
1356
  { transform: o },
1356
- { transform: c }
1357
+ { transform: l }
1357
1358
  ],
1358
1359
  r
1359
1360
  )
1360
1361
  );
1361
1362
  break;
1362
1363
  case "morph": {
1363
- const g = Array.from(/* @__PURE__ */ new Set([...t.instance.styles, ...e.instance.styles]));
1364
+ const m = Array.from(/* @__PURE__ */ new Set([...t.instance.styles, ...e.instance.styles]));
1364
1365
  n.push(
1365
1366
  new KeyframeEffect(
1366
1367
  e.clone,
@@ -1373,8 +1374,8 @@ class Ie extends st {
1373
1374
  },
1374
1375
  {
1375
1376
  ...Object.fromEntries((e.instance.ref.current?.firstElementChild).attributeStyleMap),
1376
- ...this.getKeyframeProperties(e.instance.ref.current?.firstElementChild, g),
1377
- transform: c,
1377
+ ...this.getKeyframeProperties(e.instance.ref.current?.firstElementChild, m),
1378
+ transform: l,
1378
1379
  width: `${e.rect.width}px`,
1379
1380
  height: `${e.rect.height}px`
1380
1381
  }
@@ -1394,26 +1395,26 @@ class Ie extends st {
1394
1395
  t.previousScene = null, e.previousScene = t;
1395
1396
  const n = new Array();
1396
1397
  for (const [r, a] of Array.from(e.nodes.entries())) {
1397
- const o = a.getBoundingClientRect(), c = t.nodes.get(r);
1398
- if (!c?.canTransition || !a.canTransition)
1398
+ const o = a.getBoundingClientRect(), l = t.nodes.get(r);
1399
+ if (!l?.canTransition || !a.canTransition)
1399
1400
  continue;
1400
- const g = c.getBoundingClientRect(), f = a.clone(), w = c.clone();
1401
- if (!w || !f)
1401
+ const m = l.getBoundingClientRect(), p = a.clone(), w = l.clone();
1402
+ if (!w || !p)
1402
1403
  continue;
1403
- const k = Array.from(/* @__PURE__ */ new Set([...c.styles, ...a.styles]));
1404
- a.transitionType !== "morph" ? (w.id = `${r}-start`, w.style.position = "absolute", w.style.gridArea = "1 / 1", w.style.margin = "0", this.copyStyles(c.ref.current?.firstElementChild, w, k), this.copyStyles(a.ref.current?.firstElementChild, f, k), w.style.width = `${g.width}px`, w.style.height = `${g.height}px`, f.style.width = `${o.width}px`, f.style.height = `${o.height}px`, this.ref.current?.prepend(w)) : (this.copyStyles(c.ref.current?.firstElementChild, f, k), f.style.width = `${g.width}px`, f.style.height = `${g.height}px`), f.id = `${r}${a.transitionType === "morph" ? "" : "-end"}`, f.style.position = "absolute", f.style.gridArea = "1 / 1", f.style.margin = "0", this.ref.current?.prepend(f), c.hide(), a.hide();
1405
- const b = async () => {
1406
- this.props.direction === "forwards" ? a.unhide() : c.unhide(), f.remove(), w.remove();
1404
+ const k = Array.from(/* @__PURE__ */ new Set([...l.styles, ...a.styles]));
1405
+ a.transitionType !== "morph" ? (w.id = `${r}-start`, w.style.position = "absolute", w.style.gridArea = "1 / 1", w.style.margin = "0", this.copyStyles(l.ref.current?.firstElementChild, w, k), this.copyStyles(a.ref.current?.firstElementChild, p, k), w.style.width = `${m.width}px`, w.style.height = `${m.height}px`, p.style.width = `${o.width}px`, p.style.height = `${o.height}px`, this.ref.current?.prepend(w)) : (this.copyStyles(l.ref.current?.firstElementChild, p, k), p.style.width = `${m.width}px`, p.style.height = `${m.height}px`), p.id = `${r}${a.transitionType === "morph" ? "" : "-end"}`, p.style.position = "absolute", p.style.gridArea = "1 / 1", p.style.margin = "0", this.ref.current?.prepend(p), l.hide(), a.hide();
1406
+ const T = async () => {
1407
+ this.props.direction === "forwards" ? a.unhide() : l.unhide(), p.remove(), w.remove();
1407
1408
  };
1408
- this.props.navigation.addEventListener("transition-end", b, { once: !0 }), this.props.navigation.addEventListener("transition-cancel", b, { once: !0 }), n.push(this.getAnimationEffect(
1409
- { instance: c, clone: w, rect: g },
1410
- { instance: a, clone: f, rect: o }
1409
+ this.props.navigation.addEventListener("transition-end", T, { once: !0 }), this.props.navigation.addEventListener("transition-cancel", T, { once: !0 }), n.push(this.getAnimationEffect(
1410
+ { instance: l, clone: w, rect: m },
1411
+ { instance: a, clone: p, rect: o }
1411
1412
  ));
1412
1413
  }
1413
1414
  return new At(n);
1414
1415
  }
1415
1416
  render() {
1416
- return /* @__PURE__ */ T("dialog", { className: "shared-element-layer", ref: this.ref, style: {
1417
+ return /* @__PURE__ */ b("dialog", { className: "shared-element-layer", ref: this.ref, style: {
1417
1418
  maxWidth: "unset",
1418
1419
  maxHeight: "unset",
1419
1420
  width: "100vw",
@@ -1423,16 +1424,16 @@ class Ie extends st {
1423
1424
  border: "none",
1424
1425
  backgroundColor: "transparent",
1425
1426
  isolation: "isolate"
1426
- }, children: /* @__PURE__ */ T("style", { children: `
1427
+ }, children: /* @__PURE__ */ b("style", { children: `
1427
1428
  .shared-element-layer::backdrop {display: none}
1428
1429
  .shared-element-layer[open] {display:grid}
1429
1430
  ` }) });
1430
1431
  }
1431
1432
  }
1432
1433
  const ae = it(0);
1433
- class $e extends st {
1434
+ class je extends st {
1434
1435
  sharedElementTransitionLayer = K();
1435
- animation = new We();
1436
+ animation = new Oe();
1436
1437
  #t = "normal";
1437
1438
  #e = new Array();
1438
1439
  state = {
@@ -1444,16 +1445,16 @@ class $e extends st {
1444
1445
  t && this.onProgress(t), this.animation.playState === "running" && requestAnimationFrame(this.onAnimationFrame.bind(this));
1445
1446
  }
1446
1447
  onTransitionCancel() {
1447
- this.props.navigation.dispatchEvent(new fe());
1448
+ this.props.navigation.dispatchEvent(new ye());
1448
1449
  }
1449
1450
  onTransitionStart() {
1450
- this.props.navigation.dispatchEvent(new pe()), this.onAnimationFrame();
1451
+ this.props.navigation.dispatchEvent(new ge()), this.onAnimationFrame();
1451
1452
  }
1452
1453
  onTransitionEnd() {
1453
- this.props.navigation.dispatchEvent(new me());
1454
+ this.props.navigation.dispatchEvent(new ve());
1454
1455
  }
1455
1456
  onProgress(t) {
1456
- this.setState({ progress: t }), this.props.navigation.dispatchEvent(new ge(t));
1457
+ this.setState({ progress: t }), this.props.navigation.dispatchEvent(new we(t));
1457
1458
  }
1458
1459
  get screens() {
1459
1460
  return this.#e;
@@ -1484,15 +1485,15 @@ class $e extends st {
1484
1485
  }
1485
1486
  render() {
1486
1487
  return /* @__PURE__ */ Gt(_t.Provider, { value: this, children: [
1487
- /* @__PURE__ */ T(
1488
- Ie,
1488
+ /* @__PURE__ */ b(
1489
+ Ve,
1489
1490
  {
1490
1491
  ref: this.sharedElementTransitionLayer,
1491
1492
  navigation: this.props.navigation,
1492
1493
  direction: this.animation.playbackRate > 0 ? "forwards" : "backwards"
1493
1494
  }
1494
1495
  ),
1495
- /* @__PURE__ */ T(
1496
+ /* @__PURE__ */ b(
1496
1497
  "div",
1497
1498
  {
1498
1499
  className: "screen-transition-layer",
@@ -1504,7 +1505,7 @@ class $e extends st {
1504
1505
  isolation: "isolate",
1505
1506
  "--motion-progress": this.state.progress
1506
1507
  },
1507
- children: /* @__PURE__ */ T(ae.Provider, { value: this.state.progress, children: this.props.children })
1508
+ children: /* @__PURE__ */ b(ae.Provider, { value: this.state.progress, children: this.props.children })
1508
1509
  }
1509
1510
  )
1510
1511
  ] });
@@ -1524,7 +1525,7 @@ class Nt extends st {
1524
1525
  super(t), this.parentScreen = e?.parentScreen ?? null, this.parent = e?.parentRouter ?? null, this.parent && (this.parent.child = this), this.isRoot && (Nt.rootRouterRef = new WeakRef(this));
1525
1526
  }
1526
1527
  componentDidMount() {
1527
- this.isRoot && window.navigation.addEventListener("navigate", this.handleNavigationDispatch), this.loadDispatched || (window.navigation.dispatchEvent(new ye()), this.loadDispatched = !0);
1528
+ this.isRoot && window.navigation.addEventListener("navigate", this.handleNavigationDispatch), this.loadDispatched || (window.navigation.dispatchEvent(new Ee()), this.loadDispatched = !0);
1528
1529
  }
1529
1530
  componentWillUnmount() {
1530
1531
  this.isRoot && window.navigation.removeEventListener("navigate", this.handleNavigationDispatch);
@@ -1544,7 +1545,7 @@ class Nt extends st {
1544
1545
  }
1545
1546
  dispatchEvent(t) {
1546
1547
  const e = this.ref.current ?? void 0;
1547
- return he(t, e);
1548
+ return pe(t, e);
1548
1549
  }
1549
1550
  addEventListener(t, e, n) {
1550
1551
  return this.ref.current?.addEventListener(t, e, n);
@@ -1554,7 +1555,7 @@ class Nt extends st {
1554
1555
  }
1555
1556
  screenChildFromPathname(t) {
1556
1557
  for (const e of jt.toArray(this.props.children)) {
1557
- if (!Te(e))
1558
+ if (!Re(e))
1558
1559
  continue;
1559
1560
  const n = Yt(
1560
1561
  e.props.path,
@@ -1586,13 +1587,13 @@ class Nt extends st {
1586
1587
  }
1587
1588
  get baseURL() {
1588
1589
  const t = this.isRoot ? window.location.pathname : this.parentScreen?.resolvedPathname, e = this.baseURLPattern.pathname;
1589
- return bt(e, t);
1590
+ return Tt(e, t);
1590
1591
  }
1591
1592
  get baseURLPattern() {
1592
1593
  let t = window.location.origin + "/", e = this.props.config?.basePath;
1593
1594
  if (e || (this.isRoot ? e = "/" : e = "."), this.parent && this.parentScreen) {
1594
1595
  const { resolvedPathname: n = window.location.pathname, path: r } = this.parentScreen, a = this.parent.baseURL?.href, o = new URLPattern({ baseURL: a, pathname: r });
1595
- t = bt(
1596
+ t = Tt(
1596
1597
  o.pathname,
1597
1598
  n
1598
1599
  ).href;
@@ -1616,15 +1617,15 @@ class Nt extends st {
1616
1617
  }
1617
1618
  render() {
1618
1619
  if (this.navigation)
1619
- return /* @__PURE__ */ T(
1620
+ return /* @__PURE__ */ b(
1620
1621
  "div",
1621
1622
  {
1622
1623
  id: this.id,
1623
1624
  className: "react-motion-router",
1624
1625
  style: { width: "100%", height: "100%" },
1625
1626
  ref: this.ref,
1626
- children: /* @__PURE__ */ T(wt.Provider, { value: this, children: /* @__PURE__ */ T(
1627
- $e,
1627
+ children: /* @__PURE__ */ b(wt.Provider, { value: this, children: /* @__PURE__ */ b(
1628
+ je,
1628
1629
  {
1629
1630
  ref: this.screenTransitionLayer,
1630
1631
  navigation: this.navigation,
@@ -1636,7 +1637,7 @@ class Nt extends st {
1636
1637
  );
1637
1638
  }
1638
1639
  }
1639
- class Oe {
1640
+ class Fe {
1640
1641
  #t = /* @__PURE__ */ new Map();
1641
1642
  mutationObserver;
1642
1643
  constructor() {
@@ -1691,7 +1692,7 @@ class Oe {
1691
1692
  return;
1692
1693
  e.removedNodes.forEach((n) => {
1693
1694
  if (n.nodeName === "META") {
1694
- const [r] = Array.from(n.attributes).filter((c) => c.nodeName !== "content"), o = [r.nodeName, r.value].join("=");
1695
+ const [r] = Array.from(n.attributes).filter((l) => l.nodeName !== "content"), o = [r.nodeName, r.value].join("=");
1695
1696
  this.#t.has(o) && this.#t.delete(o);
1696
1697
  }
1697
1698
  }), e.addedNodes.forEach((n) => {
@@ -1720,7 +1721,7 @@ class Oe {
1720
1721
  }
1721
1722
  class Ut {
1722
1723
  static rootNavigatorRef = null;
1723
- metaData = new Oe();
1724
+ metaData = new Fe();
1724
1725
  constructor() {
1725
1726
  const t = Ut.rootNavigatorRef?.deref();
1726
1727
  (!t || !t.isInDocument) && (Ut.rootNavigatorRef = new WeakRef(this));
@@ -1753,73 +1754,76 @@ class Ut {
1753
1754
  return !!document.getElementById(`${this.routerId}`);
1754
1755
  }
1755
1756
  }
1756
- function Qe() {
1757
+ function nn() {
1757
1758
  const s = vt(wt);
1758
1759
  if (s)
1759
1760
  return s.navigation;
1760
1761
  throw new Error("Router is null. You may be trying to call useNavigation outside a Router.");
1761
1762
  }
1762
- function tn() {
1763
+ function sn() {
1763
1764
  return vt(wt);
1764
1765
  }
1765
- function en() {
1766
+ function rn() {
1766
1767
  return ce("Motion"), vt(ae);
1767
1768
  }
1768
- function Ve() {
1769
+ function Be() {
1769
1770
  const s = vt(Qt);
1770
1771
  if (s)
1771
1772
  return s;
1772
1773
  throw new Error("Router is null. You may be trying to call useRoute outside a Router.");
1773
1774
  }
1774
- function nn(s, t) {
1775
- const e = Ve();
1776
- t = t instanceof Function ? t() : t;
1777
- const n = (r) => {
1778
- r instanceof Function && (r = r(e.params[s] ?? t)), e.setParams({ [s]: r });
1779
- };
1780
- return [e.params[s] ?? t, n];
1775
+ function an(s, t) {
1776
+ const e = Be(), n = t instanceof Function ? t() : t, r = he(e);
1777
+ ue(() => {
1778
+ r.current = e;
1779
+ }, [e]);
1780
+ const a = de((l) => {
1781
+ const { params: m, setParams: p } = r.current;
1782
+ l instanceof Function && (l = l(m[s] ?? n)), p({ [s]: l });
1783
+ }, [n, s]);
1784
+ return [e.params[s] ?? n, a];
1781
1785
  }
1782
- const sn = 2147483647, rn = 100, an = 0, on = 0, ln = 1;
1786
+ const on = 2147483647, ln = 100, cn = 0, hn = 0, un = 1;
1783
1787
  export {
1784
- ye as LoadEvent,
1785
- ln as MAX_NORM_PROGRESS,
1786
- rn as MAX_PROGRESS,
1787
- sn as MAX_Z_INDEX,
1788
- on as MIN_NORM_PROGRESS,
1789
- an as MIN_PROGRESS,
1788
+ Ee as LoadEvent,
1789
+ un as MAX_NORM_PROGRESS,
1790
+ ln as MAX_PROGRESS,
1791
+ on as MAX_Z_INDEX,
1792
+ hn as MIN_NORM_PROGRESS,
1793
+ cn as MIN_PROGRESS,
1790
1794
  ae as MotionContext,
1791
- _e as MotionProgressEndEvent,
1792
- ge as MotionProgressEvent,
1793
- Ye as MotionProgressStartEvent,
1795
+ tn as MotionProgressEndEvent,
1796
+ we as MotionProgressEvent,
1797
+ Qe as MotionProgressStartEvent,
1794
1798
  Ut as NavigationBase,
1795
1799
  Jt as NestedRouterContext,
1796
- ue as PromiseAllDynamic,
1800
+ fe as PromiseAllDynamic,
1797
1801
  Nt as RouterBase,
1798
1802
  wt as RouterContext,
1799
- Ee as ScreenBase,
1800
- Be as SharedElement,
1801
- fe as TransitionCancelEvent,
1802
- me as TransitionEndEvent,
1803
- pe as TransitionStartEvent,
1804
- Ze as cloneAndInject,
1805
- he as dispatchEvent,
1806
- Ke as includesRoute,
1803
+ Se as ScreenBase,
1804
+ ze as SharedElement,
1805
+ ye as TransitionCancelEvent,
1806
+ ve as TransitionEndEvent,
1807
+ ge as TransitionStartEvent,
1808
+ Je as cloneAndInject,
1809
+ pe as dispatchEvent,
1810
+ Ge as includesRoute,
1807
1811
  F as isLazyExoticComponent,
1808
1812
  te as isNativeLazyExoticComponent,
1809
- ze as isNavigationSupported,
1810
- be as isStylableElement,
1811
- Ge as isURLPatternSupported,
1812
- Te as isValidScreenChild,
1813
- qe as lazy,
1813
+ Xe as isNavigationSupported,
1814
+ ke as isStylableElement,
1815
+ Ze as isURLPatternSupported,
1816
+ Re as isValidScreenChild,
1817
+ He as lazy,
1814
1818
  Yt as matchRoute,
1815
- Xe as polyfillNavigation,
1816
- He as polyfillURLPattern,
1817
- bt as resolveBaseURLFromPattern,
1818
- de as toCamelCase,
1819
- en as useMotion,
1820
- Qe as useNavigationBase,
1821
- nn as useParamsBase,
1822
- Ve as useRouteBase,
1823
- tn as useRouterBase
1819
+ _e as polyfillNavigation,
1820
+ Ye as polyfillURLPattern,
1821
+ Tt as resolveBaseURLFromPattern,
1822
+ me as toCamelCase,
1823
+ rn as useMotion,
1824
+ nn as useNavigationBase,
1825
+ an as useParamsBase,
1826
+ Be as useRouteBase,
1827
+ sn as useRouterBase
1824
1828
  };
1825
1829
  //# sourceMappingURL=index.js.map