@ssgoi/core 3.2.0 → 3.2.2

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/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- var et = Object.defineProperty;
2
- var nt = (i, e, t) => e in i ? et(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var m = (i, e, t) => nt(i, typeof e != "symbol" ? e + "" : e, t);
4
- import { normalizeToMultiSpring as I, normalizeMultiSpringSchedule as H } from "./types.js";
5
- import { isCssAnimation as Nt, isMultiSpring as Ht, isSingleSpring as qt, isTickAnimation as Yt, validateAnimationMode as Ut, validateSpringItem as Wt } from "./types.js";
6
- import { j as $t } from "./jaemin-BWkrXq0V.js";
7
- class it {
1
+ var nt = Object.defineProperty;
2
+ var it = (i, e, t) => e in i ? nt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var m = (i, e, t) => it(i, typeof e != "symbol" ? e + "" : e, t);
4
+ import { normalizeToMultiSpring as I, normalizeMultiSpringSchedule as q } from "./types.js";
5
+ import { isCssAnimation as Ht, isMultiSpring as qt, isSingleSpring as Yt, isTickAnimation as Ut, validateAnimationMode as Wt, validateSpringItem as Xt } from "./types.js";
6
+ import { j as jt } from "./jaemin-BWkrXq0V.js";
7
+ class ot {
8
8
  constructor() {
9
9
  m(this, "listeners", /* @__PURE__ */ new Set());
10
10
  m(this, "rafId", null);
@@ -30,9 +30,9 @@ class it {
30
30
  n > this.lagThreshold || n < 0 ? (this.startTime += n - this.adjustedLag, n = this.adjustedLag) : n > this.maxDeltaTime && (n = this.maxDeltaTime), this.lastUpdate = e;
31
31
  const r = e - this.startTime, s = r - this.nextTime;
32
32
  if (s > 0) {
33
- const a = n / 1e3;
33
+ const c = n / 1e3;
34
34
  this.elapsed = r / 1e3, this.nextTime += s + (s >= this.gap ? 4 : this.gap - s), this.listeners.forEach((o) => {
35
- o(a, this.elapsed);
35
+ o(c, this.elapsed);
36
36
  });
37
37
  }
38
38
  this.listeners.size > 0 ? this.rafId = requestAnimationFrame(this.tick) : (this.isRunning = !1, this.rafId = null);
@@ -68,69 +68,69 @@ class it {
68
68
  return this.elapsed;
69
69
  }
70
70
  }
71
- const z = new it();
72
- function W(i) {
71
+ const z = new ot();
72
+ function X(i) {
73
73
  const e = i.stiffness, t = i.damping, n = 1, r = Math.sqrt(e / n), s = t / (2 * Math.sqrt(e * n));
74
74
  return { omega: r, zeta: s };
75
75
  }
76
- function X(i, e, t, n) {
77
- const { omega: r, zeta: s } = t, { position: a, velocity: o } = i, c = Math.min(n, 0.033), u = -2 * c * s * r * o, f = c * r * r * (e - a), h = o + u + f;
76
+ function $(i, e, t, n) {
77
+ const { omega: r, zeta: s } = t, { position: c, velocity: o } = i, a = Math.min(n, 0.033), u = -2 * a * s * r * o, f = a * r * r * (e - c), h = o + u + f;
78
78
  return {
79
- position: a + c * h,
79
+ position: c + a * h,
80
80
  velocity: h
81
81
  };
82
82
  }
83
- const ot = 0.01, rt = 0.01, $ = 0.05;
84
- function j(i, e) {
83
+ const rt = 0.01, st = 0.01, j = 0.05;
84
+ function K(i, e) {
85
85
  const t = Math.abs(e - i.position), n = Math.abs(i.velocity);
86
- return t < ot && n < rt;
86
+ return t < rt && n < st;
87
87
  }
88
- function st(i) {
88
+ function ct(i) {
89
89
  const {
90
90
  from: e,
91
91
  to: t,
92
92
  spring: n,
93
93
  velocity: r = 0,
94
94
  onUpdate: s,
95
- onComplete: a,
95
+ onComplete: c,
96
96
  onStart: o
97
97
  } = i;
98
- let c = { position: e, velocity: r }, u = !0, f = 0, h = !1;
99
- const y = W(n), v = (l) => {
98
+ let a = { position: e, velocity: r }, u = !0, f = 0, h = !1;
99
+ const y = X(n), v = (l) => {
100
100
  if (u) {
101
- if (h || (h = !0, o == null || o()), c = X(c, t, y, l), j(c, t)) {
102
- if (f += Math.min(l, 0.033), f >= $) {
103
- c = { position: t, velocity: 0 }, u = !1, s(c.position), z.unsubscribe(v), a();
101
+ if (h || (h = !0, o == null || o()), a = $(a, t, y, l), K(a, t)) {
102
+ if (f += Math.min(l, 0.033), f >= j) {
103
+ a = { position: t, velocity: 0 }, u = !1, s(a.position), z.unsubscribe(v), c();
104
104
  return;
105
105
  }
106
106
  } else
107
107
  f = 0;
108
- s(c.position);
108
+ s(a.position);
109
109
  }
110
110
  };
111
111
  return z.subscribe(v), {
112
112
  stop: () => {
113
113
  u && (u = !1, z.unsubscribe(v));
114
114
  },
115
- getPosition: () => c.position,
116
- getVelocity: () => c.velocity,
115
+ getPosition: () => a.position,
116
+ getVelocity: () => a.velocity,
117
117
  isRunning: () => u
118
118
  };
119
119
  }
120
120
  const M = 1e3 / 60;
121
- function ct(i, e, t, n = 0) {
122
- const r = W(t), s = 600;
123
- let a = { position: i, velocity: n }, o = 0;
124
- const c = [];
121
+ function at(i, e, t, n = 0) {
122
+ const r = X(t), s = 600;
123
+ let c = { position: i, velocity: n }, o = 0;
124
+ const a = [];
125
125
  for (let u = 0; u < s; u++) {
126
126
  const f = u * M;
127
- if (c.push({
127
+ if (a.push({
128
128
  time: f,
129
- position: a.position,
130
- velocity: a.velocity
131
- }), a = X(a, e, r, M / 1e3), j(a, e)) {
132
- if (o += M / 1e3, o >= $) {
133
- c.push({
129
+ position: c.position,
130
+ velocity: c.velocity
131
+ }), c = $(c, e, r, M / 1e3), K(c, e)) {
132
+ if (o += M / 1e3, o >= j) {
133
+ a.push({
134
134
  time: (u + 1) * M,
135
135
  position: e,
136
136
  velocity: 0
@@ -140,9 +140,9 @@ function ct(i, e, t, n = 0) {
140
140
  } else
141
141
  o = 0;
142
142
  }
143
- return c;
143
+ return a;
144
144
  }
145
- function q(i, e) {
145
+ function Y(i, e) {
146
146
  if (i.length === 0)
147
147
  return { position: 0, velocity: 0 };
148
148
  const t = i[0], n = i[i.length - 1];
@@ -155,35 +155,35 @@ function q(i, e) {
155
155
  const u = Math.floor((r + s) / 2);
156
156
  i[u].time <= e ? r = u : s = u;
157
157
  }
158
- const a = i[r], o = i[s], c = (e - a.time) / (o.time - a.time);
158
+ const c = i[r], o = i[s], a = (e - c.time) / (o.time - c.time);
159
159
  return {
160
- position: a.position + (o.position - a.position) * c,
161
- velocity: a.velocity + (o.velocity - a.velocity) * c
160
+ position: c.position + (o.position - c.position) * a,
161
+ velocity: c.velocity + (o.velocity - c.velocity) * a
162
162
  };
163
163
  }
164
- function at(i, e) {
164
+ function lt(i, e) {
165
165
  return i.map((t) => e(t.position));
166
166
  }
167
- function lt(i) {
167
+ function ut(i) {
168
168
  const {
169
169
  element: e,
170
170
  from: t,
171
171
  to: n,
172
172
  spring: r,
173
173
  velocity: s = 0,
174
- style: a,
174
+ style: c,
175
175
  onComplete: o,
176
- onStart: c
177
- } = i, u = ct(t, n, r, s);
176
+ onStart: a
177
+ } = i, u = at(t, n, r, s);
178
178
  if (u.length === 0)
179
- return c == null || c(), o(), {
179
+ return a == null || a(), o(), {
180
180
  stop: () => {
181
181
  },
182
182
  getPosition: () => n,
183
183
  getVelocity: () => 0,
184
184
  isRunning: () => !1
185
185
  };
186
- const f = at(u, a), h = u[u.length - 1], y = h.time, v = e.animate(f, {
186
+ const f = lt(u, c), h = u[u.length - 1], y = h.time, v = e.animate(f, {
187
187
  duration: y,
188
188
  fill: "forwards",
189
189
  easing: "linear"
@@ -191,7 +191,7 @@ function lt(i) {
191
191
  });
192
192
  let l = !0;
193
193
  const d = performance.now();
194
- return c == null || c(), v.onfinish = () => {
194
+ return a == null || a(), v.onfinish = () => {
195
195
  l && (l = !1, o());
196
196
  }, {
197
197
  stop: () => {
@@ -201,49 +201,49 @@ function lt(i) {
201
201
  if (!l)
202
202
  return h.position;
203
203
  const A = performance.now() - d;
204
- return q(u, A).position;
204
+ return Y(u, A).position;
205
205
  },
206
206
  getVelocity: () => {
207
207
  if (!l)
208
208
  return 0;
209
209
  const A = performance.now() - d;
210
- return q(u, A).velocity;
210
+ return Y(u, A).velocity;
211
211
  },
212
212
  isRunning: () => l
213
213
  };
214
214
  }
215
- function ut(i) {
216
- const { from: e, to: t, spring: n, velocity: r, onComplete: s, onStart: a, tick: o, css: c } = i;
217
- if (o && c)
215
+ function ft(i) {
216
+ const { from: e, to: t, spring: n, velocity: r, onComplete: s, onStart: c, tick: o, css: a } = i;
217
+ if (o && a)
218
218
  throw new Error("Cannot use both 'tick' and 'css' options together");
219
- return !o && !c ? (a == null || a(), s(), {
219
+ return !o && !a ? (c == null || c(), s(), {
220
220
  stop: () => {
221
221
  },
222
222
  getPosition: () => t,
223
223
  getVelocity: () => 0,
224
224
  isRunning: () => !1
225
- }) : c ? lt({
226
- element: c.element,
225
+ }) : a ? ut({
226
+ element: a.element,
227
227
  from: e,
228
228
  to: t,
229
229
  spring: n,
230
230
  velocity: r,
231
- style: c.style,
231
+ style: a.style,
232
232
  onComplete: s,
233
- onStart: a
234
- }) : st({
233
+ onStart: c
234
+ }) : ct({
235
235
  from: e,
236
236
  to: t,
237
237
  spring: n,
238
238
  velocity: r,
239
239
  onUpdate: o,
240
240
  onComplete: s,
241
- onStart: a
241
+ onStart: c
242
242
  });
243
243
  }
244
- class K {
244
+ class G {
245
245
  }
246
- class F extends K {
246
+ class F extends G {
247
247
  constructor(t) {
248
248
  super();
249
249
  m(this, "options");
@@ -265,7 +265,7 @@ class F extends K {
265
265
  }, this.currentValue = this.options.from;
266
266
  }
267
267
  runAnimation(t) {
268
- this.isAnimating = !0, this.controls = ut({
268
+ this.isAnimating = !0, this.controls = ft({
269
269
  from: this.currentValue,
270
270
  to: t,
271
271
  spring: this.options.spring,
@@ -324,7 +324,7 @@ class F extends K {
324
324
  return r.setValue(t.position), r.setVelocity(t.velocity), r;
325
325
  }
326
326
  }
327
- class L extends K {
327
+ class L extends G {
328
328
  constructor(t) {
329
329
  super();
330
330
  m(this, "config");
@@ -378,9 +378,9 @@ class L extends K {
378
378
  return this.direction === "forward" ? this.springOrder : [...this.springOrder].reverse();
379
379
  }
380
380
  onAnimatorComplete(t) {
381
- var r, s, a, o, c, u;
381
+ var r, s, c, o, a, u;
382
382
  const n = this.animators.get(t);
383
- !n || this.completedAnimators.has(t) || (this.completedAnimators.add(t), this.completedCount++, (s = (r = n.item).onComplete) == null || s.call(r), (o = (a = this.config).onProgress) == null || o.call(a, this.completedCount, this.config.springs.length), this.completedCount === this.config.springs.length && (this.stopScheduler(), (u = (c = this.config).onEnd) == null || u.call(c)));
383
+ !n || this.completedAnimators.has(t) || (this.completedAnimators.add(t), this.completedCount++, (s = (r = n.item).onComplete) == null || s.call(r), (o = (c = this.config).onProgress) == null || o.call(c, this.completedCount, this.config.springs.length), this.completedCount === this.config.springs.length && (this.stopScheduler(), (u = (a = this.config).onEnd) == null || u.call(a)));
384
384
  }
385
385
  /**
386
386
  * Check and start springs based on previous spring's progress
@@ -395,10 +395,10 @@ class L extends K {
395
395
  this.startAnimator(r);
396
396
  continue;
397
397
  }
398
- const a = t[n - 1], o = this.animators.get(a);
398
+ const c = t[n - 1], o = this.animators.get(c);
399
399
  if (!o || !o.started) continue;
400
- const c = this.getAnimatorProgress(o), u = s.item.normalizedOffset;
401
- c >= u && this.startAnimator(r);
400
+ const a = this.getAnimatorProgress(o), u = s.item.normalizedOffset;
401
+ a >= u && this.startAnimator(r);
402
402
  }
403
403
  }
404
404
  startAnimator(t) {
@@ -520,7 +520,7 @@ class L extends K {
520
520
  return r.setValue(t.position), r.setVelocity(t.velocity), r;
521
521
  }
522
522
  }
523
- const G = Symbol.for("TRANSITION_STRATEGY"), ft = (i) => ({
523
+ const B = Symbol.for("TRANSITION_STRATEGY"), dt = (i) => ({
524
524
  runIn: async (e) => {
525
525
  const { currentAnimation: t } = i;
526
526
  if (t && t.direction === "out") {
@@ -587,7 +587,7 @@ const G = Symbol.for("TRANSITION_STRATEGY"), ft = (i) => ({
587
587
  direction: "forward"
588
588
  };
589
589
  }
590
- }), dt = () => ({
590
+ }), mt = () => ({
591
591
  runIn: async (i) => i.in ? {
592
592
  config: await i.in,
593
593
  state: {
@@ -624,32 +624,32 @@ const G = Symbol.for("TRANSITION_STRATEGY"), ft = (i) => ({
624
624
  to: 0,
625
625
  direction: "forward"
626
626
  }
627
- }), B = "data-ssgoi-scope", J = "data-ssgoi-scope-ready";
628
- function Pt() {
627
+ }), J = "data-ssgoi-scope", Q = "data-ssgoi-scope-ready";
628
+ function Mt() {
629
629
  return (i) => {
630
630
  if (i)
631
- return i.setAttribute(B, ""), queueMicrotask(() => {
631
+ return i.setAttribute(J, ""), queueMicrotask(() => {
632
632
  queueMicrotask(() => {
633
- i.setAttribute(J, "true");
633
+ i.setAttribute(Q, "true");
634
634
  });
635
635
  }), () => {
636
636
  };
637
637
  };
638
638
  }
639
- function mt(i) {
640
- return i.hasAttribute(J);
641
- }
642
639
  function ht(i) {
643
- return i.closest(`[${B}]`);
640
+ return i.hasAttribute(Q);
644
641
  }
645
- function gt(i, e) {
642
+ function gt(i) {
643
+ return i.closest(`[${J}]`);
644
+ }
645
+ function pt(i, e) {
646
646
  var v;
647
647
  let t = null, n = null, r = null, s = null;
648
- const a = {
648
+ const c = {
649
649
  get currentAnimation() {
650
650
  return t;
651
651
  }
652
- }, o = ((v = e == null ? void 0 : e.strategy) == null ? void 0 : v.call(e, a)) || ft(a), c = async (l) => {
652
+ }, o = ((v = e == null ? void 0 : e.strategy) == null ? void 0 : v.call(e, c)) || dt(c), a = async (l) => {
653
653
  var E;
654
654
  n && (n.remove(), n = null);
655
655
  const d = i(), A = d.in && d.in(l), k = !(e != null && e.strategy) && d.out ? d.out(l) : void 0;
@@ -665,7 +665,7 @@ function gt(i, e) {
665
665
  }
666
666
  const p = S.config;
667
667
  (E = p.prepare) == null || E.call(p, l), p.wait && await p.wait();
668
- const w = H(
668
+ const w = q(
669
669
  {
670
670
  ...p,
671
671
  onEnd: () => {
@@ -696,7 +696,7 @@ function gt(i, e) {
696
696
  }
697
697
  const p = S.config;
698
698
  (C = p.prepare) == null || C.call(p, l), E(), p.wait && await p.wait();
699
- const w = H(
699
+ const w = q(
700
700
  {
701
701
  ...p,
702
702
  onEnd: () => {
@@ -727,80 +727,24 @@ function gt(i, e) {
727
727
  return (l) => {
728
728
  if (l)
729
729
  return r = l.parentElement, s = l.nextElementSibling, h = !1, (e == null ? void 0 : e.scope) === "local" ? queueMicrotask(() => {
730
- f = ht(l), !(f && !mt(f)) && c(l);
731
- }) : c(l), y(l);
730
+ f = gt(l), !(f && !ht(f)) && a(l);
731
+ }) : a(l), y(l);
732
732
  };
733
733
  }
734
- const pt = 3, wt = (i) => {
734
+ const wt = 3, yt = (i) => {
735
735
  if (!i) return null;
736
736
  const e = i.split(`
737
737
  `).map((t) => t.trim());
738
- for (let t = pt; t < Math.min(e.length, 6); t++) {
738
+ for (let t = wt; t < Math.min(e.length, 6); t++) {
739
739
  const n = e[t], r = n == null ? void 0 : n.match(/\(?([^):]+):(\d+):(\d+)\)?$/);
740
740
  if (!r)
741
741
  continue;
742
- const s = r[1] ?? "", a = r[2] ?? "0", o = r[3] ?? "0";
743
- return { file: s.split(/[\\/]/).pop() || s, line: a, column: o };
742
+ const s = r[1] ?? "", c = r[2] ?? "0", o = r[3] ?? "0";
743
+ return { file: s.split(/[\\/]/).pop() || s, line: c, column: o };
744
744
  }
745
745
  return null;
746
- }, O = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
747
- function yt(i, e, t) {
748
- O.set(i, e);
749
- let n = _.get(i);
750
- if (n)
751
- return n;
752
- const r = e;
753
- return n = gt(
754
- () => {
755
- const s = O.get(i);
756
- return s || (console.warn(`Transition "${String(i)}" not found`), {});
757
- },
758
- {
759
- strategy: t == null ? void 0 : t.strategy,
760
- scope: t == null ? void 0 : t.scope,
761
- onCleanupEnd: () => {
762
- O.get(i) === r && Q(i);
763
- }
764
- }
765
- ), _.set(i, n), n;
766
- }
767
- function Q(i) {
768
- O.delete(i), _.delete(i);
769
- }
770
- function vt() {
771
- const i = wt(new Error().stack);
772
- return i ? `auto_${i.file}_${i.line}_${i.column}` : Symbol(`ssgoi_auto_${Date.now()}`);
773
- }
774
- const Y = globalThis.FinalizationRegistry, U = Y ? (
775
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
776
- new Y((i) => {
777
- try {
778
- Q(i);
779
- } catch {
780
- }
781
- })
782
- ) : void 0;
783
- function It(i) {
784
- const e = i.key ?? vt();
785
- if (i.ref && U)
786
- try {
787
- U.register(i.ref, e);
788
- } catch {
789
- }
790
- return yt(
791
- e,
792
- {
793
- in: i.in,
794
- out: i.out
795
- },
796
- {
797
- strategy: i[G],
798
- scope: i.scope
799
- }
800
- );
801
- }
802
- const b = /* @__PURE__ */ new Map();
803
- let T = null, N = !1;
746
+ }, b = /* @__PURE__ */ new Map();
747
+ let T = null, _ = !1;
804
748
  function Z(i) {
805
749
  if (i instanceof HTMLElement && b.has(i)) {
806
750
  const t = b.get(i);
@@ -814,8 +758,8 @@ function Z(i) {
814
758
  n && Z(n);
815
759
  }
816
760
  }
817
- function St() {
818
- N || typeof document > "u" || (N = !0, T = new MutationObserver((i) => {
761
+ function vt() {
762
+ _ || typeof document > "u" || (_ = !0, T = new MutationObserver((i) => {
819
763
  for (const e of i) {
820
764
  const t = e.removedNodes;
821
765
  for (let n = 0; n < t.length; n++) {
@@ -837,8 +781,8 @@ function St() {
837
781
  { once: !0 }
838
782
  ));
839
783
  }
840
- function Mt(i, e) {
841
- St(), b.set(i, e);
784
+ function St(i, e) {
785
+ vt(), b.set(i, e);
842
786
  }
843
787
  function xt(i) {
844
788
  return b.has(i);
@@ -851,9 +795,74 @@ function Ft(i) {
851
795
  return e ? (b.delete(i), e(), !0) : !1;
852
796
  }
853
797
  function Lt() {
854
- b.clear(), T == null || T.disconnect(), T = null, N = !1;
798
+ b.clear(), T == null || T.disconnect(), T = null, _ = !1;
799
+ }
800
+ const O = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map();
801
+ function Ct(i, e, t) {
802
+ O.set(i, e);
803
+ let n = N.get(i);
804
+ if (n)
805
+ return n;
806
+ const r = e;
807
+ return n = pt(
808
+ () => {
809
+ const s = O.get(i);
810
+ return s || (console.warn(`Transition "${String(i)}" not found`), {});
811
+ },
812
+ {
813
+ strategy: t == null ? void 0 : t.strategy,
814
+ scope: t == null ? void 0 : t.scope,
815
+ onCleanupEnd: () => {
816
+ O.get(i) === r && tt(i);
817
+ }
818
+ }
819
+ ), N.set(i, n), n;
820
+ }
821
+ function tt(i) {
822
+ O.delete(i), N.delete(i), H.delete(i);
823
+ }
824
+ function At() {
825
+ const i = yt(new Error().stack);
826
+ return i ? `auto_${i.file}_${i.line}_${i.column}` : Symbol(`ssgoi_auto_${Date.now()}`);
827
+ }
828
+ const U = globalThis.FinalizationRegistry, W = U ? (
829
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
830
+ new U((i) => {
831
+ try {
832
+ tt(i);
833
+ } catch {
834
+ }
835
+ })
836
+ ) : void 0;
837
+ function Dt(i, e = "manual") {
838
+ const t = i.key ?? At();
839
+ if (i.ref && W)
840
+ try {
841
+ W.register(i.ref, t);
842
+ } catch {
843
+ }
844
+ const n = Ct(
845
+ t,
846
+ {
847
+ in: i.in,
848
+ out: i.out
849
+ },
850
+ {
851
+ strategy: i[B],
852
+ scope: i.scope
853
+ }
854
+ );
855
+ if (e === "manual")
856
+ return n;
857
+ let r = H.get(t);
858
+ return r || (r = (s) => {
859
+ if (s) {
860
+ const c = n(s);
861
+ c && St(s, c);
862
+ }
863
+ }, H.set(t, r), r);
855
864
  }
856
- function Ct(i) {
865
+ function Et(i) {
857
866
  const e = i.filter((t) => t.symmetric).map((t) => ({
858
867
  from: t.to,
859
868
  to: t.from,
@@ -861,9 +870,9 @@ function Ct(i) {
861
870
  }));
862
871
  return [...i, ...e];
863
872
  }
864
- function At(i) {
873
+ function Tt(i) {
865
874
  let e = !1, t = 0, n = 0, r = !1;
866
- const s = 50, a = (l) => {
875
+ const s = 50, c = (l) => {
867
876
  if (!i) return;
868
877
  const d = l.touches[0];
869
878
  d && (r = d.clientX < s, r && (t = d.clientX, n = d.clientY));
@@ -873,12 +882,12 @@ function At(i) {
873
882
  if (!d) return;
874
883
  const A = d.clientX - t, k = d.clientY - n;
875
884
  A > window.outerWidth / 2 - 5 && Math.abs(A) > Math.abs(k) ? e = !0 : e = !1;
876
- }, c = () => {
885
+ }, a = () => {
877
886
  i && (r = !1, t = 0, n = 0);
878
887
  }, u = () => e, f = () => {
879
- typeof window > "u" || i && (window.addEventListener("touchstart", a, { passive: !0 }), window.addEventListener("touchmove", o, { passive: !0 }), window.addEventListener("touchend", c, { passive: !0 }));
888
+ typeof window > "u" || i && (window.addEventListener("touchstart", c, { passive: !0 }), window.addEventListener("touchmove", o, { passive: !0 }), window.addEventListener("touchend", a, { passive: !0 }));
880
889
  }, h = () => {
881
- typeof window > "u" || (window.removeEventListener("touchstart", a), window.removeEventListener("touchmove", o), window.removeEventListener("touchend", c));
890
+ typeof window > "u" || (window.removeEventListener("touchstart", c), window.removeEventListener("touchmove", o), window.removeEventListener("touchend", a));
882
891
  };
883
892
  let y = 0;
884
893
  return {
@@ -890,7 +899,7 @@ function At(i) {
890
899
  }
891
900
  };
892
901
  }
893
- const Et = (i) => {
902
+ const bt = (i) => {
894
903
  let e = i.parentElement;
895
904
  for (; e && e !== document.body; ) {
896
905
  const t = window.getComputedStyle(e), n = t.overflow + t.overflowY + t.overflowX;
@@ -899,7 +908,7 @@ const Et = (i) => {
899
908
  e = e.parentElement;
900
909
  }
901
910
  return document.documentElement;
902
- }, Tt = (i) => {
911
+ }, kt = (i) => {
903
912
  let e = i.parentElement;
904
913
  for (; e && e !== document.body; ) {
905
914
  const t = window.getComputedStyle(e).position;
@@ -909,7 +918,7 @@ const Et = (i) => {
909
918
  }
910
919
  return document.body;
911
920
  };
912
- function bt() {
921
+ function Rt() {
913
922
  let i = null, e = null;
914
923
  const t = /* @__PURE__ */ new Map();
915
924
  let n = null;
@@ -921,7 +930,7 @@ function bt() {
921
930
  };
922
931
  return {
923
932
  initializeContext: (f, h) => {
924
- e = f, i || (i = Et(f), (i === document.documentElement ? window : i).addEventListener("scroll", r, {
933
+ e = f, i || (i = bt(f), (i === document.documentElement ? window : i).addEventListener("scroll", r, {
925
934
  passive: !0
926
935
  })), n = h;
927
936
  },
@@ -933,7 +942,7 @@ function bt() {
933
942
  };
934
943
  },
935
944
  getScrollContainer: () => i,
936
- getPositionedParentElement: () => e ? Tt(e) : document.body,
945
+ getPositionedParentElement: () => e ? kt(e) : document.body,
937
946
  getScrollPosition: (f) => f && t.has(f) ? t.get(f) : { x: 0, y: 0 }
938
947
  };
939
948
  }
@@ -946,7 +955,7 @@ function x(i, e) {
946
955
  }
947
956
  return i === e;
948
957
  }
949
- function kt(i, e, t) {
958
+ function Vt(i, e, t) {
950
959
  for (const n of t)
951
960
  if (x(i, n.from) && x(e, n.to))
952
961
  return n.transition;
@@ -955,7 +964,7 @@ function kt(i, e, t) {
955
964
  return n.transition;
956
965
  return null;
957
966
  }
958
- function Dt(i, e) {
967
+ function zt(i, e) {
959
968
  const {
960
969
  transitions: t = [],
961
970
  defaultTransition: n,
@@ -963,25 +972,25 @@ function Dt(i, e) {
963
972
  // Identity function as default
964
973
  skipOnIosSwipe: s = !0
965
974
  // Default to true - skip animations on iOS swipe
966
- } = i, { outFirst: a = !0 } = e || {};
975
+ } = i, { outFirst: c = !0 } = e || {};
967
976
  let o = null;
968
- const c = Ct(t), {
977
+ const a = Et(t), {
969
978
  initializeContext: u,
970
979
  calculateScrollOffset: f,
971
980
  getScrollContainer: h,
972
981
  getPositionedParentElement: y,
973
982
  getScrollPosition: v
974
- } = bt(), l = At(s);
983
+ } = Rt(), l = Tt(s);
975
984
  l.initialize();
976
985
  function d() {
977
986
  if (o != null && o.from && (o != null && o.to)) {
978
987
  const { from: w, to: g } = r(
979
988
  o.from,
980
989
  o.to
981
- ), C = kt(
990
+ ), C = Vt(
982
991
  w,
983
992
  g,
984
- c
993
+ a
985
994
  ) || n, R = f(
986
995
  o.from,
987
996
  o.to
@@ -994,7 +1003,7 @@ function Dt(i, e) {
994
1003
  get positionedParent() {
995
1004
  return y();
996
1005
  }
997
- }, tt = {
1006
+ }, et = {
998
1007
  scrollOffset: R,
999
1008
  get scroll() {
1000
1009
  return o ? v(o.to) : { x: 0, y: 0 };
@@ -1009,14 +1018,14 @@ function Dt(i, e) {
1009
1018
  C && (C.out && o.outResolve && o.outResolve(
1010
1019
  (D) => C.out(D, P)
1011
1020
  ), C.in && o.inResolve && o.inResolve(
1012
- (D) => C.in(D, tt)
1021
+ (D) => C.in(D, et)
1013
1022
  )), o = null;
1014
1023
  }
1015
1024
  }
1016
1025
  function A() {
1017
1026
  o && (o.inResolve && o.inResolve(() => ({})), o.outResolve && o.outResolve(() => ({})), o = null);
1018
1027
  }
1019
- const S = a ? async (w, g) => l.isSwipePending() ? (l.resetSwipeDetection(), () => ({})) : g === "in" && (!o || !o.from) ? () => ({}) : (o || (o = {}), g === "out" ? (o.from = w, new Promise((E) => {
1028
+ const S = c ? async (w, g) => l.isSwipePending() ? (l.resetSwipeDetection(), () => ({})) : g === "in" && (!o || !o.from) ? () => ({}) : (o || (o = {}), g === "out" ? (o.from = w, new Promise((E) => {
1020
1029
  o.outResolve = E, d();
1021
1030
  })) : (o.to = w, new Promise((E) => {
1022
1031
  o.inResolve = E, d();
@@ -1030,33 +1039,33 @@ function Dt(i, e) {
1030
1039
  in: async (g) => (u(g, w), (await S(w, "in"))(g)),
1031
1040
  out: async (g) => (await S(w, "out"))(g),
1032
1041
  // Add page transition strategy for page-level transitions
1033
- [G]: dt
1042
+ [B]: mt
1034
1043
  });
1035
1044
  }
1036
1045
  export {
1037
- B as SCOPE_ATTR,
1038
- J as SCOPE_READY_ATTR,
1039
- G as TRANSITION_STRATEGY,
1040
- ft as createDefaultStrategy,
1041
- dt as createPageTransitionStrategy,
1042
- Dt as createSggoiTransitionContext,
1043
- Pt as createTransitionScope,
1044
- ht as findScope,
1045
- vt as generateAutoKey,
1046
+ J as SCOPE_ATTR,
1047
+ Q as SCOPE_READY_ATTR,
1048
+ B as TRANSITION_STRATEGY,
1049
+ dt as createDefaultStrategy,
1050
+ mt as createPageTransitionStrategy,
1051
+ zt as createSggoiTransitionContext,
1052
+ Mt as createTransitionScope,
1053
+ gt as findScope,
1054
+ At as generateAutoKey,
1046
1055
  Ot as getWatchedCount,
1047
- Nt as isCssAnimation,
1048
- Ht as isMultiSpring,
1049
- mt as isScopeReady,
1050
- qt as isSingleSpring,
1051
- Yt as isTickAnimation,
1056
+ Ht as isCssAnimation,
1057
+ qt as isMultiSpring,
1058
+ ht as isScopeReady,
1059
+ Yt as isSingleSpring,
1060
+ Ut as isTickAnimation,
1052
1061
  xt as isWatched,
1053
- $t as jaeminInternal,
1054
- H as normalizeMultiSpringSchedule,
1062
+ jt as jaeminInternal,
1063
+ q as normalizeMultiSpringSchedule,
1055
1064
  I as normalizeToMultiSpring,
1056
1065
  Lt as resetObserver,
1057
- It as transition,
1066
+ Dt as transition,
1058
1067
  Ft as triggerUnmount,
1059
- Ut as validateAnimationMode,
1060
- Wt as validateSpringItem,
1061
- Mt as watchUnmount
1068
+ Wt as validateAnimationMode,
1069
+ Xt as validateSpringItem,
1070
+ St as watchUnmount
1062
1071
  };