@vezham/react 0.2.2 → 0.3.1
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/index-7B4t6veU.mjs +5 -0
- package/{index-D1NSj03G.mjs → index-BAWdDJfN.mjs} +426 -429
- package/{index-DMLUAfMZ.mjs → index-D2G6wdWd.mjs} +12360 -12526
- package/index.mjs +178 -177
- package/package.json +2 -2
- package/src-UW24ZMRV-oILT09MT.mjs +5 -0
- package/index-DrfIpzdt.mjs +0 -5
- package/src-UW24ZMRV-mfHlK29w.mjs +0 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as Pt, m as Dt, a as ye, s as $, b as Rt, n as
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import { jsx as
|
|
1
|
+
import { c as Pt, m as Dt, a as ye, s as $, b as Rt, n as ie, e as Ft, f as qe, g as et, l as zt, h as Wt, i as Bt, j as Ht, k as A, o as ae, r as ce, p as tt, v as _t, q as nt, t as st, u as ot, w as ue, x as Gt, y as kt, z as v, A as le, B as rt, C as Y, M as fe, D, E as Nt, F as pe, G as jt, H as Ut, I as Yt, J as it, K as at, L as b, N as Xt, O as ct, P as $t, Q as Kt, R as ut, V as lt, S as ft, T as Jt, U as Qt, W as Zt, X as oe, Y as qt, Z as en, _ as tn, $ as dt, a0 as nn, a1 as sn, a2 as on, a3 as ve, a4 as rn, a5 as Re, a6 as an, a7 as cn, a8 as un, a9 as mt, aa as q, ab as ln, ac as we, ad as fn, ae as dn, af as mn, ag as pn, ah as hn, ai as gn, aj as yn, ak as vn } from "./index-D2G6wdWd.mjs";
|
|
2
|
+
import { ay as zo, al as Wo, aN as Bo, aM as Ho, aK as _o, am as Go, an as ko, ax as No, aP as jo, aL as Uo, ap as Yo, aq as Xo, aD as $o, aY as Ko, aZ as Jo, a_ as Qo, a$ as Zo, aE as qo, ar as er, b0 as tr, b1 as nr, b2 as sr, aF as or, aG as rr, aB as ir, b3 as ar, aO as cr, b9 as ur, ba as lr, d as fr, au as dr, b4 as mr, b5 as pr, b6 as hr, as as gr, aI as yr, aQ as vr, aU as wr, at as Sr, aR as Ar, aC as Er, aV as br, ao as Mr, b7 as xr, aW as Vr, aJ as Cr, aX as Ir, aS as Tr, aH as Or, aw as Lr, b8 as Pr, aT as Dr, az as Rr, aA as Fr, av as zr } from "./index-D2G6wdWd.mjs";
|
|
3
|
+
import * as wn from "react";
|
|
4
|
+
import { useEffect as O, useInsertionEffect as pt, useContext as F, useState as K, useRef as P, useCallback as ht, useLayoutEffect as Sn, createContext as An, forwardRef as gt } from "react";
|
|
5
|
+
import { jsx as re } from "react/jsx-runtime";
|
|
6
6
|
function yt(e, t = 100, n) {
|
|
7
7
|
const s = n({ ...e, keyframes: [0, t] }), o = Math.min(Pt(s), Dt);
|
|
8
8
|
return {
|
|
@@ -52,11 +52,11 @@ class En {
|
|
|
52
52
|
!this.animation || this.state === "idle" || this.state === "finished" || (this.animation.commitStyles && this.animation.commitStyles(), this.cancel());
|
|
53
53
|
}
|
|
54
54
|
flatten() {
|
|
55
|
-
var t;
|
|
56
|
-
this.animation
|
|
55
|
+
var t, n;
|
|
56
|
+
!this.animation || !(!((t = this.options) === null || t === void 0) && t.allowFlatten) || (n = this.animation.effect) === null || n === void 0 || n.updateTiming({ easing: "linear" });
|
|
57
57
|
}
|
|
58
58
|
attachTimeline(t) {
|
|
59
|
-
return this.animation && Rt(this.animation, t),
|
|
59
|
+
return this.animation && Rt(this.animation, t), ie;
|
|
60
60
|
}
|
|
61
61
|
complete() {
|
|
62
62
|
this.animation && this.animation.finish();
|
|
@@ -68,29 +68,33 @@ class En {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
const
|
|
71
|
+
const bn = /* @__PURE__ */ Ft({
|
|
72
72
|
...qe,
|
|
73
73
|
...Bt,
|
|
74
74
|
...Wt,
|
|
75
|
-
...
|
|
76
|
-
}, et), vt = /* @__PURE__ */ Ht(
|
|
75
|
+
...zt
|
|
76
|
+
}, et), vt = /* @__PURE__ */ Ht(bn);
|
|
77
|
+
function wt(e) {
|
|
78
|
+
return O(() => () => e(), []);
|
|
79
|
+
}
|
|
80
|
+
const oo = {
|
|
77
81
|
renderer: et,
|
|
78
82
|
...qe
|
|
79
83
|
};
|
|
80
|
-
function
|
|
84
|
+
function Mn(e, t, n) {
|
|
81
85
|
pt(() => e.on(t, n), [e, t, n]);
|
|
82
86
|
}
|
|
83
|
-
function
|
|
87
|
+
function St(e, t) {
|
|
84
88
|
let n;
|
|
85
89
|
const s = () => {
|
|
86
90
|
const { currentTime: o } = t, i = (o === null ? 0 : o.value) / 100;
|
|
87
91
|
n !== i && e(i), n = i;
|
|
88
92
|
};
|
|
89
|
-
return A.update(s, !0), () =>
|
|
93
|
+
return A.update(s, !0), () => ae(s);
|
|
90
94
|
}
|
|
91
|
-
const
|
|
95
|
+
const ee = /* @__PURE__ */ new WeakMap();
|
|
92
96
|
let T;
|
|
93
|
-
function
|
|
97
|
+
function xn(e, t) {
|
|
94
98
|
if (t) {
|
|
95
99
|
const { inlineSize: n, blockSize: s } = t[0];
|
|
96
100
|
return { width: n, height: s };
|
|
@@ -99,40 +103,40 @@ function Vn(e, t) {
|
|
|
99
103
|
height: e.offsetHeight
|
|
100
104
|
};
|
|
101
105
|
}
|
|
102
|
-
function
|
|
106
|
+
function Vn({ target: e, contentRect: t, borderBoxSize: n }) {
|
|
103
107
|
var s;
|
|
104
|
-
(s =
|
|
108
|
+
(s = ee.get(e)) === null || s === void 0 || s.forEach((o) => {
|
|
105
109
|
o({
|
|
106
110
|
target: e,
|
|
107
111
|
contentSize: t,
|
|
108
112
|
get size() {
|
|
109
|
-
return
|
|
113
|
+
return xn(e, n);
|
|
110
114
|
}
|
|
111
115
|
});
|
|
112
116
|
});
|
|
113
117
|
}
|
|
114
|
-
function
|
|
115
|
-
e.forEach(
|
|
118
|
+
function Cn(e) {
|
|
119
|
+
e.forEach(Vn);
|
|
116
120
|
}
|
|
117
|
-
function
|
|
118
|
-
typeof ResizeObserver > "u" || (T = new ResizeObserver(
|
|
121
|
+
function In() {
|
|
122
|
+
typeof ResizeObserver > "u" || (T = new ResizeObserver(Cn));
|
|
119
123
|
}
|
|
120
|
-
function
|
|
121
|
-
T ||
|
|
124
|
+
function Tn(e, t) {
|
|
125
|
+
T || In();
|
|
122
126
|
const n = ce(e);
|
|
123
127
|
return n.forEach((s) => {
|
|
124
|
-
let o =
|
|
125
|
-
o || (o = /* @__PURE__ */ new Set(),
|
|
128
|
+
let o = ee.get(s);
|
|
129
|
+
o || (o = /* @__PURE__ */ new Set(), ee.set(s, o)), o.add(t), T == null || T.observe(s);
|
|
126
130
|
}), () => {
|
|
127
131
|
n.forEach((s) => {
|
|
128
|
-
const o =
|
|
132
|
+
const o = ee.get(s);
|
|
129
133
|
o == null || o.delete(t), o != null && o.size || T == null || T.unobserve(s);
|
|
130
134
|
});
|
|
131
135
|
};
|
|
132
136
|
}
|
|
133
|
-
const
|
|
137
|
+
const te = /* @__PURE__ */ new Set();
|
|
134
138
|
let X;
|
|
135
|
-
function
|
|
139
|
+
function On() {
|
|
136
140
|
X = () => {
|
|
137
141
|
const e = {
|
|
138
142
|
width: window.innerWidth,
|
|
@@ -142,18 +146,18 @@ function Ln() {
|
|
|
142
146
|
size: e,
|
|
143
147
|
contentSize: e
|
|
144
148
|
};
|
|
145
|
-
|
|
149
|
+
te.forEach((n) => n(t));
|
|
146
150
|
}, window.addEventListener("resize", X);
|
|
147
151
|
}
|
|
148
|
-
function
|
|
149
|
-
return
|
|
150
|
-
|
|
152
|
+
function Ln(e) {
|
|
153
|
+
return te.add(e), X || On(), () => {
|
|
154
|
+
te.delete(e), !te.size && X && (X = void 0);
|
|
151
155
|
};
|
|
152
156
|
}
|
|
153
|
-
function
|
|
154
|
-
return typeof e == "function" ?
|
|
157
|
+
function Pn(e, t) {
|
|
158
|
+
return typeof e == "function" ? Ln(e) : Tn(e, t);
|
|
155
159
|
}
|
|
156
|
-
const
|
|
160
|
+
const Dn = 50, Fe = () => ({
|
|
157
161
|
current: 0,
|
|
158
162
|
offset: [],
|
|
159
163
|
progress: 0,
|
|
@@ -162,10 +166,10 @@ const Rn = 50, ze = () => ({
|
|
|
162
166
|
targetLength: 0,
|
|
163
167
|
containerLength: 0,
|
|
164
168
|
velocity: 0
|
|
165
|
-
}),
|
|
169
|
+
}), Rn = () => ({
|
|
166
170
|
time: 0,
|
|
167
|
-
x:
|
|
168
|
-
y:
|
|
171
|
+
x: Fe(),
|
|
172
|
+
y: Fe()
|
|
169
173
|
}), Fn = {
|
|
170
174
|
x: {
|
|
171
175
|
length: "Width",
|
|
@@ -176,16 +180,16 @@ const Rn = 50, ze = () => ({
|
|
|
176
180
|
position: "Top"
|
|
177
181
|
}
|
|
178
182
|
};
|
|
179
|
-
function
|
|
180
|
-
const o = n[t], { length: r, position: i } = Fn[t],
|
|
183
|
+
function ze(e, t, n, s) {
|
|
184
|
+
const o = n[t], { length: r, position: i } = Fn[t], u = o.current, a = n.time;
|
|
181
185
|
o.current = e[`scroll${i}`], o.scrollLength = e[`scroll${r}`] - e[`client${r}`], o.offset.length = 0, o.offset[0] = 0, o.offset[1] = o.scrollLength, o.progress = tt(0, o.scrollLength, o.current);
|
|
182
|
-
const
|
|
183
|
-
o.velocity =
|
|
186
|
+
const c = s - a;
|
|
187
|
+
o.velocity = c > Dn ? 0 : _t(o.current - u, c);
|
|
184
188
|
}
|
|
185
|
-
function
|
|
186
|
-
|
|
189
|
+
function zn(e, t, n) {
|
|
190
|
+
ze(e, "x", t, n), ze(e, "y", t, n), t.time = n;
|
|
187
191
|
}
|
|
188
|
-
function
|
|
192
|
+
function Wn(e, t) {
|
|
189
193
|
const n = { x: 0, y: 0 };
|
|
190
194
|
let s = e;
|
|
191
195
|
for (; s && s !== t; )
|
|
@@ -199,9 +203,9 @@ function Bn(e, t) {
|
|
|
199
203
|
} else if (s instanceof SVGGraphicsElement) {
|
|
200
204
|
const { x: o, y: r } = s.getBBox();
|
|
201
205
|
n.x += o, n.y += r;
|
|
202
|
-
let i = null,
|
|
206
|
+
let i = null, u = s.parentNode;
|
|
203
207
|
for (; !i; )
|
|
204
|
-
|
|
208
|
+
u.tagName === "svg" && (i = u), u = s.parentNode;
|
|
205
209
|
s = i;
|
|
206
210
|
} else
|
|
207
211
|
break;
|
|
@@ -220,22 +224,22 @@ function We(e, t, n = 0) {
|
|
|
220
224
|
}
|
|
221
225
|
return typeof e == "number" && (s = t * e), n + s;
|
|
222
226
|
}
|
|
223
|
-
const
|
|
224
|
-
function
|
|
225
|
-
let o = Array.isArray(e) ? e :
|
|
227
|
+
const Bn = [0, 0];
|
|
228
|
+
function Hn(e, t, n, s) {
|
|
229
|
+
let o = Array.isArray(e) ? e : Bn, r = 0, i = 0;
|
|
226
230
|
return typeof e == "number" ? o = [e, e] : typeof e == "string" && (e = e.trim(), e.includes(" ") ? o = e.split(" ") : o = [e, Se[e] ? e : "0"]), r = We(o[0], n, s), i = We(o[1], t), r - i;
|
|
227
231
|
}
|
|
228
|
-
const
|
|
232
|
+
const _n = {
|
|
229
233
|
All: [
|
|
230
234
|
[0, 0],
|
|
231
235
|
[1, 1]
|
|
232
236
|
]
|
|
233
|
-
},
|
|
234
|
-
function
|
|
237
|
+
}, Gn = { x: 0, y: 0 };
|
|
238
|
+
function kn(e) {
|
|
235
239
|
return "getBBox" in e && e.tagName !== "svg" ? e.getBBox() : { width: e.clientWidth, height: e.clientHeight };
|
|
236
240
|
}
|
|
237
|
-
function
|
|
238
|
-
const { offset: s =
|
|
241
|
+
function Nn(e, t, n) {
|
|
242
|
+
const { offset: s = _n.All } = n, { target: o = e, axis: r = "y" } = n, i = r === "y" ? "height" : "width", u = o !== e ? Wn(o, e) : Gn, a = o === e ? { width: e.scrollWidth, height: e.scrollHeight } : kn(o), c = {
|
|
239
243
|
width: e.clientWidth,
|
|
240
244
|
height: e.clientHeight
|
|
241
245
|
};
|
|
@@ -243,12 +247,12 @@ function jn(e, t, n) {
|
|
|
243
247
|
let l = !t[r].interpolate;
|
|
244
248
|
const d = s.length;
|
|
245
249
|
for (let f = 0; f < d; f++) {
|
|
246
|
-
const m =
|
|
250
|
+
const m = Hn(s[f], c[i], a[i], u[r]);
|
|
247
251
|
!l && m !== t[r].interpolatorOffsets[f] && (l = !0), t[r].offset[f] = m;
|
|
248
252
|
}
|
|
249
253
|
l && (t[r].interpolate = nt(t[r].offset, st(s), { clamp: !1 }), t[r].interpolatorOffsets = [...t[r].offset]), t[r].progress = ot(0, 1, t[r].interpolate(t[r].current));
|
|
250
254
|
}
|
|
251
|
-
function
|
|
255
|
+
function jn(e, t = e, n) {
|
|
252
256
|
if (n.x.targetOffset = 0, n.y.targetOffset = 0, t !== e) {
|
|
253
257
|
let s = t;
|
|
254
258
|
for (; s && s !== e; )
|
|
@@ -256,11 +260,11 @@ function Un(e, t = e, n) {
|
|
|
256
260
|
}
|
|
257
261
|
n.x.targetLength = t === e ? t.scrollWidth : t.clientWidth, n.y.targetLength = t === e ? t.scrollHeight : t.clientHeight, n.x.containerLength = e.clientWidth, n.y.containerLength = e.clientHeight, process.env.NODE_ENV !== "production" && e && t && t !== e && ue(getComputedStyle(e).position !== "static", "Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.");
|
|
258
262
|
}
|
|
259
|
-
function
|
|
263
|
+
function Un(e, t, n, s = {}) {
|
|
260
264
|
return {
|
|
261
|
-
measure: () =>
|
|
265
|
+
measure: () => jn(e, s.target, n),
|
|
262
266
|
update: (o) => {
|
|
263
|
-
|
|
267
|
+
zn(e, n, o), (s.offset || s.target) && Nn(e, n, s);
|
|
264
268
|
},
|
|
265
269
|
notify: () => t(n)
|
|
266
270
|
};
|
|
@@ -269,36 +273,36 @@ const j = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), he
|
|
|
269
273
|
function xe(e, { container: t = document.documentElement, ...n } = {}) {
|
|
270
274
|
let s = he.get(t);
|
|
271
275
|
s || (s = /* @__PURE__ */ new Set(), he.set(t, s));
|
|
272
|
-
const o =
|
|
276
|
+
const o = Rn(), r = Un(t, e, o, n);
|
|
273
277
|
if (s.add(r), !j.has(t)) {
|
|
274
|
-
const
|
|
278
|
+
const u = () => {
|
|
275
279
|
for (const f of s)
|
|
276
280
|
f.measure();
|
|
277
281
|
}, a = () => {
|
|
278
282
|
for (const f of s)
|
|
279
283
|
f.update(Gt.timestamp);
|
|
280
|
-
},
|
|
284
|
+
}, c = () => {
|
|
281
285
|
for (const f of s)
|
|
282
286
|
f.notify();
|
|
283
287
|
}, l = () => {
|
|
284
|
-
A.read(
|
|
288
|
+
A.read(u, !1, !0), A.read(a, !1, !0), A.update(c, !1, !0);
|
|
285
289
|
};
|
|
286
290
|
j.set(t, l);
|
|
287
291
|
const d = He(t);
|
|
288
|
-
window.addEventListener("resize", l, { passive: !0 }), t !== document.documentElement && Be.set(t,
|
|
292
|
+
window.addEventListener("resize", l, { passive: !0 }), t !== document.documentElement && Be.set(t, Pn(t, l)), d.addEventListener("scroll", l, { passive: !0 });
|
|
289
293
|
}
|
|
290
294
|
const i = j.get(t);
|
|
291
295
|
return A.read(i, !1, !0), () => {
|
|
292
|
-
var
|
|
293
|
-
|
|
296
|
+
var u;
|
|
297
|
+
ae(i);
|
|
294
298
|
const a = he.get(t);
|
|
295
299
|
if (!a || (a.delete(r), a.size))
|
|
296
300
|
return;
|
|
297
|
-
const
|
|
298
|
-
j.delete(t),
|
|
301
|
+
const c = j.get(t);
|
|
302
|
+
j.delete(t), c && (He(t).removeEventListener("scroll", c), (u = Be.get(t)) === null || u === void 0 || u(), window.removeEventListener("resize", c));
|
|
299
303
|
};
|
|
300
304
|
}
|
|
301
|
-
function
|
|
305
|
+
function Yn({ source: e, container: t, axis: n = "y" }) {
|
|
302
306
|
e && (t = e);
|
|
303
307
|
const s = { value: 0 }, o = xe((r) => {
|
|
304
308
|
s.value = r[n].progress * 100;
|
|
@@ -306,67 +310,67 @@ function Xn({ source: e, container: t, axis: n = "y" }) {
|
|
|
306
310
|
return { currentTime: s, cancel: o };
|
|
307
311
|
}
|
|
308
312
|
const ge = /* @__PURE__ */ new Map();
|
|
309
|
-
function
|
|
313
|
+
function At({ source: e, container: t = document.documentElement, axis: n = "y" } = {}) {
|
|
310
314
|
e && (t = e), ge.has(t) || ge.set(t, {});
|
|
311
315
|
const s = ge.get(t);
|
|
312
|
-
return s[n] || (s[n] = kt() ? new ScrollTimeline({ source: t, axis: n }) :
|
|
316
|
+
return s[n] || (s[n] = kt() ? new ScrollTimeline({ source: t, axis: n }) : Yn({ source: t, axis: n })), s[n];
|
|
313
317
|
}
|
|
314
|
-
function
|
|
318
|
+
function Xn(e) {
|
|
315
319
|
return e.length === 2;
|
|
316
320
|
}
|
|
317
|
-
function
|
|
321
|
+
function Et(e) {
|
|
318
322
|
return e && (e.target || e.offset);
|
|
319
323
|
}
|
|
320
|
-
function
|
|
321
|
-
return
|
|
324
|
+
function $n(e, t) {
|
|
325
|
+
return Xn(e) || Et(t) ? xe((n) => {
|
|
322
326
|
e(n[t.axis].progress, n);
|
|
323
|
-
}, t) :
|
|
327
|
+
}, t) : St(e, At(t));
|
|
324
328
|
}
|
|
325
|
-
function
|
|
326
|
-
if (e.flatten(),
|
|
329
|
+
function Kn(e, t) {
|
|
330
|
+
if (e.flatten(), Et(t))
|
|
327
331
|
return e.pause(), xe((n) => {
|
|
328
332
|
e.time = e.duration * n[t.axis].progress;
|
|
329
333
|
}, t);
|
|
330
334
|
{
|
|
331
|
-
const n =
|
|
332
|
-
return e.attachTimeline ? e.attachTimeline(n, (s) => (s.pause(),
|
|
335
|
+
const n = At(t);
|
|
336
|
+
return e.attachTimeline ? e.attachTimeline(n, (s) => (s.pause(), St((o) => {
|
|
333
337
|
s.time = s.duration * o;
|
|
334
|
-
}, n))) :
|
|
338
|
+
}, n))) : ie;
|
|
335
339
|
}
|
|
336
340
|
}
|
|
337
|
-
function
|
|
341
|
+
function Jn(e, { axis: t = "y", ...n } = {}) {
|
|
338
342
|
const s = { axis: t, ...n };
|
|
339
|
-
return typeof e == "function" ?
|
|
343
|
+
return typeof e == "function" ? $n(e, s) : Kn(e, s);
|
|
340
344
|
}
|
|
341
345
|
function _e(e, t) {
|
|
342
346
|
rt(!!(!t || t.current), `You have defined a ${e} options but the provided ref is not yet hydrated, probably because it's defined higher up the tree. Try calling useScroll() in the same component as the ref, or setting its \`layoutEffect: false\` option.`);
|
|
343
347
|
}
|
|
344
|
-
const
|
|
348
|
+
const Qn = () => ({
|
|
345
349
|
scrollX: Y(0),
|
|
346
350
|
scrollY: Y(0),
|
|
347
351
|
scrollXProgress: Y(0),
|
|
348
352
|
scrollYProgress: Y(0)
|
|
349
353
|
});
|
|
350
354
|
function bt({ container: e, target: t, layoutEffect: n = !0, ...s } = {}) {
|
|
351
|
-
const o = v(
|
|
352
|
-
return (n ? le : O)(() => (_e("target", t), _e("container", e),
|
|
353
|
-
o.scrollX.set(
|
|
355
|
+
const o = v(Qn);
|
|
356
|
+
return (n ? le : O)(() => (_e("target", t), _e("container", e), Jn((i, { x: u, y: a }) => {
|
|
357
|
+
o.scrollX.set(u.current), o.scrollXProgress.set(u.progress), o.scrollY.set(a.current), o.scrollYProgress.set(a.progress);
|
|
354
358
|
}, {
|
|
355
359
|
...s,
|
|
356
360
|
container: (e == null ? void 0 : e.current) || void 0,
|
|
357
361
|
target: (t == null ? void 0 : t.current) || void 0
|
|
358
362
|
})), [e, t, JSON.stringify(s.offset)]), o;
|
|
359
363
|
}
|
|
360
|
-
function
|
|
364
|
+
function ro(e) {
|
|
361
365
|
return process.env.NODE_ENV === "development" && ue(!1, "useElementScroll is deprecated. Convert to useScroll({ container: ref })."), bt({ container: e });
|
|
362
366
|
}
|
|
363
|
-
function
|
|
367
|
+
function io() {
|
|
364
368
|
return process.env.NODE_ENV !== "production" && ue(!1, "useViewportScroll is deprecated. Convert to useScroll()."), bt();
|
|
365
369
|
}
|
|
366
370
|
function R(e) {
|
|
367
|
-
const t = v(() => Y(e)), { isStatic: n } =
|
|
371
|
+
const t = v(() => Y(e)), { isStatic: n } = F(fe);
|
|
368
372
|
if (n) {
|
|
369
|
-
const [, s] =
|
|
373
|
+
const [, s] = K(e);
|
|
370
374
|
O(() => t.on("change", s), []);
|
|
371
375
|
}
|
|
372
376
|
return t;
|
|
@@ -376,11 +380,11 @@ function Ve(e, t) {
|
|
|
376
380
|
return s(), le(() => {
|
|
377
381
|
const o = () => A.preRender(s, !1, !0), r = e.map((i) => i.on("change", o));
|
|
378
382
|
return () => {
|
|
379
|
-
r.forEach((i) => i()),
|
|
383
|
+
r.forEach((i) => i()), ae(s);
|
|
380
384
|
};
|
|
381
385
|
}), n;
|
|
382
386
|
}
|
|
383
|
-
function
|
|
387
|
+
function ao(e, ...t) {
|
|
384
388
|
const n = e.length;
|
|
385
389
|
function s() {
|
|
386
390
|
let o = "";
|
|
@@ -393,10 +397,10 @@ function co(e, ...t) {
|
|
|
393
397
|
}
|
|
394
398
|
return Ve(t.filter(D), s);
|
|
395
399
|
}
|
|
396
|
-
function
|
|
397
|
-
const { isStatic: n } =
|
|
400
|
+
function co(e, t = {}) {
|
|
401
|
+
const { isStatic: n } = F(fe), s = P(null), o = v(() => D(e) ? e.get() : e), r = v(() => typeof o == "string" ? o.replace(/[\d.-]/g, "") : void 0), i = R(o), u = P(o), a = P(ie), c = () => {
|
|
398
402
|
l(), s.current = Nt({
|
|
399
|
-
keyframes: [ke(i.get()), ke(
|
|
403
|
+
keyframes: [ke(i.get()), ke(u.current)],
|
|
400
404
|
velocity: i.getVelocity(),
|
|
401
405
|
type: "spring",
|
|
402
406
|
restDelta: 1e-3,
|
|
@@ -407,7 +411,7 @@ function uo(e, t = {}) {
|
|
|
407
411
|
}, l = () => {
|
|
408
412
|
s.current && s.current.stop();
|
|
409
413
|
};
|
|
410
|
-
return pt(() => i.attach((d, f) => n ? f(d) : (
|
|
414
|
+
return pt(() => i.attach((d, f) => n ? f(d) : (u.current = d, a.current = (m) => f(Ge(m, r)), A.postRender(c), i.get()), l), [JSON.stringify(t)]), le(() => {
|
|
411
415
|
if (D(e))
|
|
412
416
|
return e.on("change", (d) => i.set(Ge(d, r)));
|
|
413
417
|
}, [i, r]), i;
|
|
@@ -418,38 +422,38 @@ function Ge(e, t) {
|
|
|
418
422
|
function ke(e) {
|
|
419
423
|
return typeof e == "number" ? e : parseFloat(e);
|
|
420
424
|
}
|
|
421
|
-
function
|
|
422
|
-
const t = P(0), { isStatic: n } =
|
|
425
|
+
function Zn(e) {
|
|
426
|
+
const t = P(0), { isStatic: n } = F(fe);
|
|
423
427
|
O(() => {
|
|
424
428
|
if (n)
|
|
425
429
|
return;
|
|
426
430
|
const s = ({ timestamp: o, delta: r }) => {
|
|
427
431
|
t.current || (t.current = o), e(o - t.current, r);
|
|
428
432
|
};
|
|
429
|
-
return A.update(s, !0), () =>
|
|
433
|
+
return A.update(s, !0), () => ae(s);
|
|
430
434
|
}, [e]);
|
|
431
435
|
}
|
|
432
|
-
function
|
|
436
|
+
function uo() {
|
|
433
437
|
const e = R(0);
|
|
434
|
-
return
|
|
438
|
+
return Zn((t) => e.set(t)), e;
|
|
435
439
|
}
|
|
436
|
-
const
|
|
437
|
-
function
|
|
438
|
-
const t = !Array.isArray(e[0]), n = t ? 0 : -1, s = e[0 + n], o = e[1 + n], r = e[2 + n], i = e[3 + n],
|
|
439
|
-
mixer:
|
|
440
|
+
const qn = (e) => e && typeof e == "object" && e.mix, es = (e) => qn(e) ? e.mix : void 0;
|
|
441
|
+
function ts(...e) {
|
|
442
|
+
const t = !Array.isArray(e[0]), n = t ? 0 : -1, s = e[0 + n], o = e[1 + n], r = e[2 + n], i = e[3 + n], u = nt(o, r, {
|
|
443
|
+
mixer: es(r[0]),
|
|
440
444
|
...i
|
|
441
445
|
});
|
|
442
|
-
return t ?
|
|
446
|
+
return t ? u(s) : u;
|
|
443
447
|
}
|
|
444
|
-
function
|
|
448
|
+
function ns(e) {
|
|
445
449
|
pe.current = [], e();
|
|
446
450
|
const t = Ve(pe.current, e);
|
|
447
451
|
return pe.current = void 0, t;
|
|
448
452
|
}
|
|
449
453
|
function Ae(e, t, n, s) {
|
|
450
454
|
if (typeof e == "function")
|
|
451
|
-
return
|
|
452
|
-
const o = typeof t == "function" ? t :
|
|
455
|
+
return ns(e);
|
|
456
|
+
const o = typeof t == "function" ? t : ts(t, n, s);
|
|
453
457
|
return Array.isArray(e) ? Ne(e, o) : Ne([e], ([r]) => o(r));
|
|
454
458
|
}
|
|
455
459
|
function Ne(e, t) {
|
|
@@ -462,50 +466,50 @@ function Ne(e, t) {
|
|
|
462
466
|
return t(n);
|
|
463
467
|
});
|
|
464
468
|
}
|
|
465
|
-
function
|
|
469
|
+
function lo(e) {
|
|
466
470
|
const t = R(e.getVelocity()), n = () => {
|
|
467
471
|
const s = e.getVelocity();
|
|
468
472
|
t.set(s), s && A.update(n);
|
|
469
473
|
};
|
|
470
|
-
return
|
|
474
|
+
return Mn(e, "change", () => {
|
|
471
475
|
A.update(n, !1, !0);
|
|
472
476
|
}), t;
|
|
473
477
|
}
|
|
474
|
-
function
|
|
478
|
+
function ss() {
|
|
475
479
|
!jt.current && Ut();
|
|
476
|
-
const [e] =
|
|
480
|
+
const [e] = K(Yt.current);
|
|
477
481
|
return process.env.NODE_ENV !== "production" && ue(e !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), e;
|
|
478
482
|
}
|
|
479
|
-
function
|
|
480
|
-
const e =
|
|
483
|
+
function fo() {
|
|
484
|
+
const e = ss(), { reducedMotion: t } = F(fe);
|
|
481
485
|
return t === "never" ? !1 : t === "always" ? !0 : e;
|
|
482
486
|
}
|
|
483
|
-
function
|
|
487
|
+
function os(e) {
|
|
484
488
|
e.values.forEach((t) => t.stop());
|
|
485
489
|
}
|
|
486
|
-
function
|
|
490
|
+
function Ee(e, t) {
|
|
487
491
|
[...t].reverse().forEach((s) => {
|
|
488
492
|
const o = e.getVariant(s);
|
|
489
493
|
o && at(e, o), e.variantChildren && e.variantChildren.forEach((r) => {
|
|
490
|
-
|
|
494
|
+
Ee(r, t);
|
|
491
495
|
});
|
|
492
496
|
});
|
|
493
497
|
}
|
|
494
|
-
function
|
|
498
|
+
function rs(e, t) {
|
|
495
499
|
if (Array.isArray(t))
|
|
496
|
-
return
|
|
500
|
+
return Ee(e, t);
|
|
497
501
|
if (typeof t == "string")
|
|
498
|
-
return
|
|
502
|
+
return Ee(e, [t]);
|
|
499
503
|
at(e, t);
|
|
500
504
|
}
|
|
501
|
-
function
|
|
505
|
+
function is() {
|
|
502
506
|
let e = !1;
|
|
503
507
|
const t = /* @__PURE__ */ new Set(), n = {
|
|
504
508
|
subscribe(s) {
|
|
505
509
|
return t.add(s), () => void t.delete(s);
|
|
506
510
|
},
|
|
507
511
|
start(s, o) {
|
|
508
|
-
|
|
512
|
+
b(e, "controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");
|
|
509
513
|
const r = [];
|
|
510
514
|
return t.forEach((i) => {
|
|
511
515
|
r.push(it(i, s, {
|
|
@@ -514,13 +518,13 @@ function as() {
|
|
|
514
518
|
}), Promise.all(r);
|
|
515
519
|
},
|
|
516
520
|
set(s) {
|
|
517
|
-
return
|
|
518
|
-
|
|
521
|
+
return b(e, "controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."), t.forEach((o) => {
|
|
522
|
+
rs(o, s);
|
|
519
523
|
});
|
|
520
524
|
},
|
|
521
525
|
stop() {
|
|
522
526
|
t.forEach((s) => {
|
|
523
|
-
|
|
527
|
+
os(s);
|
|
524
528
|
});
|
|
525
529
|
},
|
|
526
530
|
mount() {
|
|
@@ -531,9 +535,6 @@ function as() {
|
|
|
531
535
|
};
|
|
532
536
|
return n;
|
|
533
537
|
}
|
|
534
|
-
function Et(e) {
|
|
535
|
-
return O(() => () => e(), []);
|
|
536
|
-
}
|
|
537
538
|
const Mt = (e, t, n) => {
|
|
538
539
|
const s = t - e;
|
|
539
540
|
return ((n - e) % s + s) % s + e;
|
|
@@ -547,21 +548,21 @@ function Ce(e) {
|
|
|
547
548
|
function Vt(e, t, n, s) {
|
|
548
549
|
return typeof e == "string" && Ce(t) ? ce(e, n, s) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e : [e];
|
|
549
550
|
}
|
|
550
|
-
function
|
|
551
|
+
function as(e, t, n) {
|
|
551
552
|
return e * (t + 1);
|
|
552
553
|
}
|
|
553
554
|
function je(e, t, n, s) {
|
|
554
555
|
var o;
|
|
555
556
|
return typeof t == "number" ? t : t.startsWith("-") || t.startsWith("+") ? Math.max(0, e + parseFloat(t)) : t === "<" ? n : (o = s.get(t)) !== null && o !== void 0 ? o : e;
|
|
556
557
|
}
|
|
557
|
-
function
|
|
558
|
+
function cs(e, t, n) {
|
|
558
559
|
for (let s = 0; s < e.length; s++) {
|
|
559
560
|
const o = e[s];
|
|
560
561
|
o.at > t && o.at < n && ($t(e, o), s--);
|
|
561
562
|
}
|
|
562
563
|
}
|
|
563
|
-
function
|
|
564
|
-
|
|
564
|
+
function us(e, t, n, s, o, r) {
|
|
565
|
+
cs(e, o, r);
|
|
565
566
|
for (let i = 0; i < t.length; i++)
|
|
566
567
|
e.push({
|
|
567
568
|
value: t[i],
|
|
@@ -569,87 +570,87 @@ function ls(e, t, n, s, o, r) {
|
|
|
569
570
|
easing: xt(n, i)
|
|
570
571
|
});
|
|
571
572
|
}
|
|
572
|
-
function
|
|
573
|
+
function ls(e, t) {
|
|
573
574
|
for (let n = 0; n < e.length; n++)
|
|
574
575
|
e[n] = e[n] / (t + 1);
|
|
575
576
|
}
|
|
576
|
-
function
|
|
577
|
+
function fs(e, t) {
|
|
577
578
|
return e.at === t.at ? e.value === null ? 1 : t.value === null ? -1 : 0 : e.at - t.at;
|
|
578
579
|
}
|
|
579
|
-
const
|
|
580
|
-
function
|
|
581
|
-
const r = t.duration || 0.3, i = /* @__PURE__ */ new Map(),
|
|
580
|
+
const ds = "easeInOut", ms = 20;
|
|
581
|
+
function ps(e, { defaultTransition: t = {}, ...n } = {}, s, o) {
|
|
582
|
+
const r = t.duration || 0.3, i = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), a = {}, c = /* @__PURE__ */ new Map();
|
|
582
583
|
let l = 0, d = 0, f = 0;
|
|
583
584
|
for (let m = 0; m < e.length; m++) {
|
|
584
585
|
const p = e[m];
|
|
585
586
|
if (typeof p == "string") {
|
|
586
|
-
|
|
587
|
+
c.set(p, d);
|
|
587
588
|
continue;
|
|
588
589
|
} else if (!Array.isArray(p)) {
|
|
589
|
-
|
|
590
|
+
c.set(p.name, je(d, p.at, l, c));
|
|
590
591
|
continue;
|
|
591
592
|
}
|
|
592
593
|
let [h, g, y = {}] = p;
|
|
593
|
-
y.at !== void 0 && (d = je(d, y.at, l,
|
|
594
|
+
y.at !== void 0 && (d = je(d, y.at, l, c));
|
|
594
595
|
let w = 0;
|
|
595
|
-
const
|
|
596
|
-
const S =
|
|
597
|
-
let { ease: I = t.ease || "easeOut", duration:
|
|
596
|
+
const z = (M, x, C, B = 0, H = 0) => {
|
|
597
|
+
const S = hs(M), { delay: de = 0, times: V = st(S), type: me = "keyframes", repeat: _, repeatType: qs, repeatDelay: eo = 0, ...Lt } = x;
|
|
598
|
+
let { ease: I = t.ease || "easeOut", duration: E } = x;
|
|
598
599
|
const Ie = typeof de == "function" ? de(B, H) : de, Te = S.length, Oe = ut(me) ? me : o == null ? void 0 : o[me];
|
|
599
600
|
if (Te <= 2 && Oe) {
|
|
600
601
|
let G = 100;
|
|
601
|
-
if (Te === 2 &&
|
|
602
|
+
if (Te === 2 && vs(S)) {
|
|
602
603
|
const k = S[1] - S[0];
|
|
603
604
|
G = Math.abs(k);
|
|
604
605
|
}
|
|
605
|
-
const
|
|
606
|
-
|
|
607
|
-
const
|
|
608
|
-
I =
|
|
606
|
+
const J = { ...Lt };
|
|
607
|
+
E !== void 0 && (J.duration = $(E));
|
|
608
|
+
const Q = yt(J, G, Oe);
|
|
609
|
+
I = Q.ease, E = Q.duration;
|
|
609
610
|
}
|
|
610
|
-
|
|
611
|
+
E ?? (E = r);
|
|
611
612
|
const Le = d + Ie;
|
|
612
613
|
V.length === 1 && V[0] === 0 && (V[1] = 1);
|
|
613
614
|
const Pe = V.length - S.length;
|
|
614
615
|
if (Pe > 0 && Kt(V, Pe), S.length === 1 && S.unshift(null), _) {
|
|
615
|
-
|
|
616
|
-
const G = [...S],
|
|
616
|
+
b(_ < ms, "Repeat count too high, must be less than 20"), E = as(E, _);
|
|
617
|
+
const G = [...S], J = [...V];
|
|
617
618
|
I = Array.isArray(I) ? [...I] : [I];
|
|
618
|
-
const
|
|
619
|
+
const Q = [...I];
|
|
619
620
|
for (let k = 0; k < _; k++) {
|
|
620
621
|
S.push(...G);
|
|
621
622
|
for (let N = 0; N < G.length; N++)
|
|
622
|
-
V.push(
|
|
623
|
+
V.push(J[N] + (k + 1)), I.push(N === 0 ? "linear" : xt(Q, N - 1));
|
|
623
624
|
}
|
|
624
|
-
|
|
625
|
+
ls(V, _);
|
|
625
626
|
}
|
|
626
|
-
const De = Le +
|
|
627
|
-
|
|
627
|
+
const De = Le + E;
|
|
628
|
+
us(C, S, I, V, Le, De), w = Math.max(Ie + E, w), f = Math.max(De, f);
|
|
628
629
|
};
|
|
629
630
|
if (D(h)) {
|
|
630
|
-
const M = Ue(h,
|
|
631
|
-
|
|
631
|
+
const M = Ue(h, u);
|
|
632
|
+
z(g, y, Ye("default", M));
|
|
632
633
|
} else {
|
|
633
634
|
const M = Vt(h, g, s, a), x = M.length;
|
|
634
635
|
for (let C = 0; C < x; C++) {
|
|
635
636
|
g = g, y = y;
|
|
636
|
-
const B = M[C], H = Ue(B,
|
|
637
|
+
const B = M[C], H = Ue(B, u);
|
|
637
638
|
for (const S in g)
|
|
638
|
-
|
|
639
|
+
z(g[S], gs(y, S), Ye(S, H), C, x);
|
|
639
640
|
}
|
|
640
641
|
}
|
|
641
642
|
l = d, d += w;
|
|
642
643
|
}
|
|
643
|
-
return
|
|
644
|
+
return u.forEach((m, p) => {
|
|
644
645
|
for (const h in m) {
|
|
645
646
|
const g = m[h];
|
|
646
|
-
g.sort(
|
|
647
|
-
const y = [], w = [],
|
|
647
|
+
g.sort(fs);
|
|
648
|
+
const y = [], w = [], z = [];
|
|
648
649
|
for (let x = 0; x < g.length; x++) {
|
|
649
650
|
const { at: C, value: B, easing: H } = g[x];
|
|
650
|
-
y.push(B), w.push(tt(0, f, C)),
|
|
651
|
+
y.push(B), w.push(tt(0, f, C)), z.push(H || "easeOut");
|
|
651
652
|
}
|
|
652
|
-
w[0] !== 0 && (w.unshift(0), y.unshift(y[0]),
|
|
653
|
+
w[0] !== 0 && (w.unshift(0), y.unshift(y[0]), z.unshift(ds)), w[w.length - 1] !== 1 && (w.push(1), y.push(null)), i.has(p) || i.set(p, {
|
|
653
654
|
keyframes: {},
|
|
654
655
|
transition: {}
|
|
655
656
|
});
|
|
@@ -657,7 +658,7 @@ function hs(e, { defaultTransition: t = {}, ...n } = {}, s, o) {
|
|
|
657
658
|
M.keyframes[h] = y, M.transition[h] = {
|
|
658
659
|
...t,
|
|
659
660
|
duration: f,
|
|
660
|
-
ease:
|
|
661
|
+
ease: z,
|
|
661
662
|
times: w,
|
|
662
663
|
...n
|
|
663
664
|
};
|
|
@@ -670,25 +671,25 @@ function Ue(e, t) {
|
|
|
670
671
|
function Ye(e, t) {
|
|
671
672
|
return t[e] || (t[e] = []), t[e];
|
|
672
673
|
}
|
|
673
|
-
function
|
|
674
|
+
function hs(e) {
|
|
674
675
|
return Array.isArray(e) ? e : [e];
|
|
675
676
|
}
|
|
676
|
-
function
|
|
677
|
+
function gs(e, t) {
|
|
677
678
|
return e && e[t] ? {
|
|
678
679
|
...e,
|
|
679
680
|
...e[t]
|
|
680
681
|
} : { ...e };
|
|
681
682
|
}
|
|
682
|
-
const
|
|
683
|
-
function
|
|
683
|
+
const ys = (e) => typeof e == "number", vs = (e) => e.every(ys);
|
|
684
|
+
function ws(e, t) {
|
|
684
685
|
return e in t;
|
|
685
686
|
}
|
|
686
|
-
class
|
|
687
|
+
class Ss extends lt {
|
|
687
688
|
constructor() {
|
|
688
689
|
super(...arguments), this.type = "object";
|
|
689
690
|
}
|
|
690
691
|
readValueFromInstance(t, n) {
|
|
691
|
-
if (
|
|
692
|
+
if (ws(n, t)) {
|
|
692
693
|
const s = t[n];
|
|
693
694
|
if (typeof s == "string" || typeof s == "number")
|
|
694
695
|
return s;
|
|
@@ -712,7 +713,7 @@ class As extends lt {
|
|
|
712
713
|
return 0;
|
|
713
714
|
}
|
|
714
715
|
}
|
|
715
|
-
function
|
|
716
|
+
function As(e) {
|
|
716
717
|
const t = {
|
|
717
718
|
presenceContext: null,
|
|
718
719
|
props: {},
|
|
@@ -727,7 +728,7 @@ function bs(e) {
|
|
|
727
728
|
latestValues: {}
|
|
728
729
|
}
|
|
729
730
|
}, n = Jt(e) ? new Qt(t) : new Zt(t);
|
|
730
|
-
n.mount(e),
|
|
731
|
+
n.mount(e), oe.set(e, n);
|
|
731
732
|
}
|
|
732
733
|
function Es(e) {
|
|
733
734
|
const t = {
|
|
@@ -739,102 +740,102 @@ function Es(e) {
|
|
|
739
740
|
},
|
|
740
741
|
latestValues: {}
|
|
741
742
|
}
|
|
742
|
-
}, n = new
|
|
743
|
-
n.mount(e),
|
|
743
|
+
}, n = new Ss(t);
|
|
744
|
+
n.mount(e), oe.set(e, n);
|
|
744
745
|
}
|
|
745
|
-
function
|
|
746
|
+
function bs(e, t) {
|
|
746
747
|
return D(e) || typeof e == "number" || typeof e == "string" && !Ce(t);
|
|
747
748
|
}
|
|
748
749
|
function Ct(e, t, n, s) {
|
|
749
750
|
const o = [];
|
|
750
|
-
if (
|
|
751
|
+
if (bs(e, t))
|
|
751
752
|
o.push(qt(e, Ce(t) && t.default || t, n && (n.default || n)));
|
|
752
753
|
else {
|
|
753
754
|
const r = Vt(e, t, s), i = r.length;
|
|
754
|
-
|
|
755
|
-
for (let
|
|
756
|
-
const a = r[
|
|
757
|
-
|
|
758
|
-
const l =
|
|
759
|
-
"delay" in d && typeof d.delay == "function" && (d.delay = d.delay(
|
|
755
|
+
b(!!i, "No valid elements provided.");
|
|
756
|
+
for (let u = 0; u < i; u++) {
|
|
757
|
+
const a = r[u], c = a instanceof Element ? As : Es;
|
|
758
|
+
oe.has(a) || c(a);
|
|
759
|
+
const l = oe.get(a), d = { ...n };
|
|
760
|
+
"delay" in d && typeof d.delay == "function" && (d.delay = d.delay(u, i)), o.push(...en(l, { ...t, transition: d }, {}));
|
|
760
761
|
}
|
|
761
762
|
}
|
|
762
763
|
return o;
|
|
763
764
|
}
|
|
764
|
-
function
|
|
765
|
+
function Ms(e, t, n) {
|
|
765
766
|
const s = [];
|
|
766
|
-
return
|
|
767
|
-
s.push(...Ct(
|
|
767
|
+
return ps(e, t, n, { spring: tn }).forEach(({ keyframes: r, transition: i }, u) => {
|
|
768
|
+
s.push(...Ct(u, r, i));
|
|
768
769
|
}), s;
|
|
769
770
|
}
|
|
770
|
-
function
|
|
771
|
+
function xs(e) {
|
|
771
772
|
return Array.isArray(e) && e.some(Array.isArray);
|
|
772
773
|
}
|
|
773
774
|
function It(e) {
|
|
774
775
|
function t(n, s, o) {
|
|
775
776
|
let r = [];
|
|
776
|
-
|
|
777
|
+
xs(n) ? r = Ms(n, s, e) : r = Ct(n, s, o, e);
|
|
777
778
|
const i = new dt(r);
|
|
778
779
|
return e && e.animations.push(i), i;
|
|
779
780
|
}
|
|
780
781
|
return t;
|
|
781
782
|
}
|
|
782
|
-
const
|
|
783
|
-
function
|
|
783
|
+
const mo = It();
|
|
784
|
+
function po() {
|
|
784
785
|
const e = v(() => ({
|
|
785
786
|
current: null,
|
|
786
787
|
// Will be hydrated by React
|
|
787
788
|
animations: []
|
|
788
789
|
})), t = v(() => It(e));
|
|
789
|
-
return
|
|
790
|
+
return wt(() => {
|
|
790
791
|
e.animations.forEach((n) => n.stop());
|
|
791
792
|
}), [e, t];
|
|
792
793
|
}
|
|
793
|
-
function
|
|
794
|
+
function Vs(e, t, n) {
|
|
794
795
|
e.style.setProperty(t, n);
|
|
795
796
|
}
|
|
796
|
-
function
|
|
797
|
+
function Cs(e, t, n) {
|
|
797
798
|
e.style[t] = n;
|
|
798
799
|
}
|
|
799
|
-
const
|
|
800
|
+
const Is = /* @__PURE__ */ nn(() => {
|
|
800
801
|
try {
|
|
801
802
|
document.createElement("div").animate({ opacity: [1] });
|
|
802
803
|
} catch {
|
|
803
804
|
return !1;
|
|
804
805
|
}
|
|
805
806
|
return !0;
|
|
806
|
-
}),
|
|
807
|
-
function
|
|
807
|
+
}), ne = /* @__PURE__ */ new WeakMap();
|
|
808
|
+
function Ts(e, t, n) {
|
|
808
809
|
for (let s = 0; s < t.length; s++)
|
|
809
810
|
t[s] === null && (t[s] = s === 0 ? n() : t[s - 1]), typeof t[s] == "number" && Re[e] && (t[s] = Re[e].transform(t[s]));
|
|
810
|
-
!
|
|
811
|
+
!Is() && t.length < 2 && t.unshift(n());
|
|
811
812
|
}
|
|
812
813
|
const Xe = "easeOut";
|
|
813
814
|
function $e(e) {
|
|
814
|
-
const t =
|
|
815
|
-
return
|
|
815
|
+
const t = ne.get(e) || /* @__PURE__ */ new Map();
|
|
816
|
+
return ne.set(e, t), ne.get(e);
|
|
816
817
|
}
|
|
817
|
-
class
|
|
818
|
+
class Os extends En {
|
|
818
819
|
constructor(t, n, s, o) {
|
|
819
820
|
const r = n.startsWith("--");
|
|
820
|
-
|
|
821
|
+
b(typeof o.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "framer-motion"?`);
|
|
821
822
|
const i = $e(t).get(n);
|
|
822
823
|
i && i.stop();
|
|
823
|
-
const
|
|
824
|
-
if (Array.isArray(s) || (s = [s]),
|
|
824
|
+
const u = () => n.startsWith("--") ? t.style.getPropertyValue(n) : window.getComputedStyle(t)[n];
|
|
825
|
+
if (Array.isArray(s) || (s = [s]), Ts(n, s, u), ut(o.type)) {
|
|
825
826
|
const l = yt(o, 100, o.type);
|
|
826
827
|
o.ease = sn() ? l.ease : Xe, o.duration = $(l.duration), o.type = "keyframes";
|
|
827
828
|
} else
|
|
828
829
|
o.ease = o.ease || Xe;
|
|
829
830
|
const a = () => {
|
|
830
831
|
this.setValue(t, n, rn(s, o)), this.cancel(), this.resolveFinishedPromise();
|
|
831
|
-
},
|
|
832
|
-
this.setValue = r ?
|
|
833
|
-
const l =
|
|
832
|
+
}, c = () => {
|
|
833
|
+
this.setValue = r ? Vs : Cs, this.options = o, this.updateFinishedPromise(), this.removeAnimation = () => {
|
|
834
|
+
const l = ne.get(t);
|
|
834
835
|
l && l.delete(n);
|
|
835
836
|
};
|
|
836
837
|
};
|
|
837
|
-
on() ? (super(ve(t, n, s, o)),
|
|
838
|
+
on() ? (super(ve(t, n, s, o)), c(), o.autoplay === !1 && this.animation.pause(), this.animation.onfinish = a, $e(t).set(n, this)) : (super(), c(), a());
|
|
838
839
|
}
|
|
839
840
|
/**
|
|
840
841
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -856,55 +857,55 @@ class Ls extends En {
|
|
|
856
857
|
this.removeAnimation(), super.cancel();
|
|
857
858
|
}
|
|
858
859
|
}
|
|
859
|
-
function
|
|
860
|
+
function Ls(e, t, n, s) {
|
|
860
861
|
const o = ce(e, s), r = o.length;
|
|
861
|
-
|
|
862
|
+
b(!!r, "No valid element provided.");
|
|
862
863
|
const i = [];
|
|
863
|
-
for (let
|
|
864
|
-
const a = o[
|
|
865
|
-
typeof
|
|
864
|
+
for (let u = 0; u < r; u++) {
|
|
865
|
+
const a = o[u], c = { ...n };
|
|
866
|
+
typeof c.delay == "function" && (c.delay = c.delay(u, r));
|
|
866
867
|
for (const l in t) {
|
|
867
868
|
const d = t[l], f = {
|
|
868
|
-
...an(
|
|
869
|
+
...an(c, l)
|
|
869
870
|
};
|
|
870
|
-
f.duration = f.duration ? $(f.duration) : f.duration, f.delay = $(f.delay || 0), i.push(new
|
|
871
|
+
f.duration = f.duration ? $(f.duration) : f.duration, f.delay = $(f.delay || 0), f.allowFlatten = !c.type && !c.ease, i.push(new Os(a, l, d, f));
|
|
871
872
|
}
|
|
872
873
|
}
|
|
873
874
|
return i;
|
|
874
875
|
}
|
|
875
876
|
const Tt = (e) => {
|
|
876
877
|
function t(n, s, o) {
|
|
877
|
-
return new dt(
|
|
878
|
+
return new dt(Ls(n, s, o, e));
|
|
878
879
|
}
|
|
879
880
|
return t;
|
|
880
|
-
},
|
|
881
|
-
function
|
|
881
|
+
}, ho = /* @__PURE__ */ Tt();
|
|
882
|
+
function go() {
|
|
882
883
|
const e = v(() => ({
|
|
883
884
|
current: null,
|
|
884
885
|
// Will be hydrated by React
|
|
885
886
|
animations: []
|
|
886
887
|
})), t = v(() => Tt(e));
|
|
887
|
-
return
|
|
888
|
+
return wt(() => {
|
|
888
889
|
e.animations.forEach((n) => n.stop());
|
|
889
890
|
}), [e, t];
|
|
890
891
|
}
|
|
891
|
-
function
|
|
892
|
-
const e = v(
|
|
892
|
+
function Ps() {
|
|
893
|
+
const e = v(is);
|
|
893
894
|
return le(e.mount, []), e;
|
|
894
895
|
}
|
|
895
|
-
const
|
|
896
|
-
function
|
|
897
|
-
const e =
|
|
896
|
+
const yo = Ps;
|
|
897
|
+
function vo() {
|
|
898
|
+
const e = F(cn);
|
|
898
899
|
return e ? e.custom : void 0;
|
|
899
900
|
}
|
|
900
|
-
function
|
|
901
|
+
function wo(e, t, n, s) {
|
|
901
902
|
O(() => {
|
|
902
903
|
const o = e.current;
|
|
903
904
|
if (n && o)
|
|
904
905
|
return un(o, t, n, s);
|
|
905
906
|
}, [e, t, n, s]);
|
|
906
907
|
}
|
|
907
|
-
class
|
|
908
|
+
class Ds {
|
|
908
909
|
constructor() {
|
|
909
910
|
this.componentControls = /* @__PURE__ */ new Set();
|
|
910
911
|
}
|
|
@@ -937,31 +938,31 @@ class Rs {
|
|
|
937
938
|
});
|
|
938
939
|
}
|
|
939
940
|
}
|
|
940
|
-
const
|
|
941
|
-
function
|
|
942
|
-
return v(
|
|
941
|
+
const Rs = () => new Ds();
|
|
942
|
+
function So() {
|
|
943
|
+
return v(Rs);
|
|
943
944
|
}
|
|
944
945
|
function Fs(e) {
|
|
945
946
|
return e !== null && typeof e == "object" && mt in e;
|
|
946
947
|
}
|
|
947
|
-
function
|
|
948
|
+
function Ao(e) {
|
|
948
949
|
if (Fs(e))
|
|
949
950
|
return e[mt];
|
|
950
951
|
}
|
|
951
|
-
function
|
|
952
|
-
return
|
|
952
|
+
function zs() {
|
|
953
|
+
return Ws;
|
|
953
954
|
}
|
|
954
|
-
function
|
|
955
|
-
|
|
955
|
+
function Ws(e) {
|
|
956
|
+
q.current && (q.current.isUpdating = !1, q.current.blockUpdate(), e && e());
|
|
956
957
|
}
|
|
957
958
|
function Eo() {
|
|
958
959
|
return ht(() => {
|
|
959
|
-
const t =
|
|
960
|
+
const t = q.current;
|
|
960
961
|
t && t.resetTree();
|
|
961
962
|
}, []);
|
|
962
963
|
}
|
|
963
|
-
function
|
|
964
|
-
const t = P(0), [n, s] =
|
|
964
|
+
function bo(...e) {
|
|
965
|
+
const t = P(0), [n, s] = K(e[t.current]), o = ht(
|
|
965
966
|
(r) => {
|
|
966
967
|
t.current = typeof r != "number" ? Mt(0, e.length, t.current + 1) : r, s(e[t.current]);
|
|
967
968
|
},
|
|
@@ -972,13 +973,13 @@ function Mo(...e) {
|
|
|
972
973
|
);
|
|
973
974
|
return [n, o];
|
|
974
975
|
}
|
|
975
|
-
const
|
|
976
|
+
const Bs = {
|
|
976
977
|
some: 0,
|
|
977
978
|
all: 1
|
|
978
979
|
};
|
|
979
|
-
function
|
|
980
|
-
const r = ce(e), i = /* @__PURE__ */ new WeakMap(),
|
|
981
|
-
|
|
980
|
+
function Hs(e, t, { root: n, margin: s, amount: o = "some" } = {}) {
|
|
981
|
+
const r = ce(e), i = /* @__PURE__ */ new WeakMap(), u = (c) => {
|
|
982
|
+
c.forEach((l) => {
|
|
982
983
|
const d = i.get(l.target);
|
|
983
984
|
if (l.isIntersecting !== !!d)
|
|
984
985
|
if (l.isIntersecting) {
|
|
@@ -986,28 +987,28 @@ function _s(e, t, { root: n, margin: s, amount: o = "some" } = {}) {
|
|
|
986
987
|
typeof f == "function" ? i.set(l.target, f) : a.unobserve(l.target);
|
|
987
988
|
} else typeof d == "function" && (d(l), i.delete(l.target));
|
|
988
989
|
});
|
|
989
|
-
}, a = new IntersectionObserver(
|
|
990
|
+
}, a = new IntersectionObserver(u, {
|
|
990
991
|
root: n,
|
|
991
992
|
rootMargin: s,
|
|
992
|
-
threshold: typeof o == "number" ? o :
|
|
993
|
+
threshold: typeof o == "number" ? o : Bs[o]
|
|
993
994
|
});
|
|
994
|
-
return r.forEach((
|
|
995
|
+
return r.forEach((c) => a.observe(c)), () => a.disconnect();
|
|
995
996
|
}
|
|
996
|
-
function
|
|
997
|
-
const [i,
|
|
997
|
+
function Mo(e, { root: t, margin: n, amount: s, once: o = !1, initial: r = !1 } = {}) {
|
|
998
|
+
const [i, u] = K(r);
|
|
998
999
|
return O(() => {
|
|
999
1000
|
if (!e.current || o && i)
|
|
1000
1001
|
return;
|
|
1001
|
-
const a = () => (
|
|
1002
|
+
const a = () => (u(!0), o ? void 0 : () => u(!1)), c = {
|
|
1002
1003
|
root: t && t.current || void 0,
|
|
1003
1004
|
margin: n,
|
|
1004
1005
|
amount: s
|
|
1005
1006
|
};
|
|
1006
|
-
return
|
|
1007
|
+
return Hs(e.current, a, c);
|
|
1007
1008
|
}, [t, e, n, o, s]), i;
|
|
1008
1009
|
}
|
|
1009
|
-
function
|
|
1010
|
-
const [e, t] = ln(), n =
|
|
1010
|
+
function xo() {
|
|
1011
|
+
const [e, t] = ln(), n = zs(), s = P(-1);
|
|
1011
1012
|
return O(() => {
|
|
1012
1013
|
A.postRender(() => A.postRender(() => {
|
|
1013
1014
|
t === s.current && (we.current = !1);
|
|
@@ -1018,40 +1019,40 @@ function Vo() {
|
|
|
1018
1019
|
});
|
|
1019
1020
|
};
|
|
1020
1021
|
}
|
|
1021
|
-
function
|
|
1022
|
+
function Vo() {
|
|
1022
1023
|
we.current = !1;
|
|
1023
1024
|
}
|
|
1024
|
-
const
|
|
1025
|
+
const L = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Map(), se = (e, t) => {
|
|
1025
1026
|
const n = fn.has(t) ? "transform" : t;
|
|
1026
1027
|
return `${e}: ${n}`;
|
|
1027
|
-
}
|
|
1028
|
+
};
|
|
1028
1029
|
function Ke(e, t, n) {
|
|
1029
1030
|
var s;
|
|
1030
|
-
const o =
|
|
1031
|
+
const o = se(e, t), r = L.get(o);
|
|
1031
1032
|
if (!r)
|
|
1032
1033
|
return null;
|
|
1033
|
-
const { animation: i, startTime:
|
|
1034
|
+
const { animation: i, startTime: u } = r;
|
|
1034
1035
|
function a() {
|
|
1035
|
-
var
|
|
1036
|
-
(
|
|
1036
|
+
var c;
|
|
1037
|
+
(c = window.MotionCancelOptimisedAnimation) === null || c === void 0 || c.call(window, e, t, n);
|
|
1037
1038
|
}
|
|
1038
|
-
return i.onfinish = a,
|
|
1039
|
+
return i.onfinish = a, u === null || !((s = window.MotionHandoffIsComplete) === null || s === void 0) && s.call(window, e) ? (a(), null) : u;
|
|
1039
1040
|
}
|
|
1040
|
-
let
|
|
1041
|
-
const
|
|
1042
|
-
function
|
|
1043
|
-
|
|
1041
|
+
let Z, W;
|
|
1042
|
+
const be = /* @__PURE__ */ new Set();
|
|
1043
|
+
function _s() {
|
|
1044
|
+
be.forEach((e) => {
|
|
1044
1045
|
e.animation.play(), e.animation.startTime = e.startTime;
|
|
1045
|
-
}),
|
|
1046
|
+
}), be.clear();
|
|
1046
1047
|
}
|
|
1047
|
-
function
|
|
1048
|
+
function Co(e, t, n, s, o) {
|
|
1048
1049
|
if (window.MotionIsMounted)
|
|
1049
1050
|
return;
|
|
1050
1051
|
const r = e.dataset[dn];
|
|
1051
1052
|
if (!r)
|
|
1052
1053
|
return;
|
|
1053
1054
|
window.MotionHandoffAnimation = Ke;
|
|
1054
|
-
const i =
|
|
1055
|
+
const i = se(r, t);
|
|
1055
1056
|
W || (W = ve(
|
|
1056
1057
|
e,
|
|
1057
1058
|
t,
|
|
@@ -1064,48 +1065,48 @@ function Io(e, t, n, s, o) {
|
|
|
1064
1065
|
), L.set(i, {
|
|
1065
1066
|
animation: W,
|
|
1066
1067
|
startTime: null
|
|
1067
|
-
}), window.MotionHandoffAnimation = Ke, window.MotionHasOptimisedAnimation = (a,
|
|
1068
|
+
}), window.MotionHandoffAnimation = Ke, window.MotionHasOptimisedAnimation = (a, c) => {
|
|
1068
1069
|
if (!a)
|
|
1069
1070
|
return !1;
|
|
1070
|
-
if (!
|
|
1071
|
+
if (!c)
|
|
1071
1072
|
return U.has(a);
|
|
1072
|
-
const l =
|
|
1073
|
+
const l = se(a, c);
|
|
1073
1074
|
return !!L.get(l);
|
|
1074
1075
|
}, window.MotionHandoffMarkAsComplete = (a) => {
|
|
1075
1076
|
U.has(a) && U.set(a, !0);
|
|
1076
|
-
}, window.MotionHandoffIsComplete = (a) => U.get(a) === !0, window.MotionCancelOptimisedAnimation = (a,
|
|
1077
|
-
const f =
|
|
1077
|
+
}, window.MotionHandoffIsComplete = (a) => U.get(a) === !0, window.MotionCancelOptimisedAnimation = (a, c, l, d) => {
|
|
1078
|
+
const f = se(a, c), m = L.get(f);
|
|
1078
1079
|
m && (l && d === void 0 ? l.postRender(() => {
|
|
1079
1080
|
l.postRender(() => {
|
|
1080
1081
|
m.animation.cancel();
|
|
1081
1082
|
});
|
|
1082
|
-
}) : m.animation.cancel(), l && d ? (
|
|
1083
|
-
}, window.MotionCheckAppearSync = (a,
|
|
1083
|
+
}) : m.animation.cancel(), l && d ? (be.add(m), l.render(_s)) : (L.delete(f), L.size || (window.MotionCancelOptimisedAnimation = void 0)));
|
|
1084
|
+
}, window.MotionCheckAppearSync = (a, c, l) => {
|
|
1084
1085
|
var d, f;
|
|
1085
1086
|
const m = mn(a);
|
|
1086
1087
|
if (!m)
|
|
1087
1088
|
return;
|
|
1088
|
-
const p = (d = window.MotionHasOptimisedAnimation) === null || d === void 0 ? void 0 : d.call(window, m,
|
|
1089
|
+
const p = (d = window.MotionHasOptimisedAnimation) === null || d === void 0 ? void 0 : d.call(window, m, c), h = (f = a.props.values) === null || f === void 0 ? void 0 : f[c];
|
|
1089
1090
|
if (!p || !h)
|
|
1090
1091
|
return;
|
|
1091
1092
|
const g = l.on("change", (y) => {
|
|
1092
1093
|
var w;
|
|
1093
|
-
h.get() !== y && ((w = window.MotionCancelOptimisedAnimation) === null || w === void 0 || w.call(window, m,
|
|
1094
|
+
h.get() !== y && ((w = window.MotionCancelOptimisedAnimation) === null || w === void 0 || w.call(window, m, c), g());
|
|
1094
1095
|
});
|
|
1095
1096
|
return g;
|
|
1096
1097
|
});
|
|
1097
|
-
const
|
|
1098
|
+
const u = () => {
|
|
1098
1099
|
W.cancel();
|
|
1099
1100
|
const a = ve(e, t, n, s);
|
|
1100
|
-
|
|
1101
|
+
Z === void 0 && (Z = performance.now()), a.startTime = Z, L.set(i, {
|
|
1101
1102
|
animation: a,
|
|
1102
|
-
startTime:
|
|
1103
|
+
startTime: Z
|
|
1103
1104
|
}), o && o(a);
|
|
1104
1105
|
};
|
|
1105
|
-
U.set(r, !1), W.ready ? W.ready.then(
|
|
1106
|
+
U.set(r, !1), W.ready ? W.ready.then(u).catch(ie) : u();
|
|
1106
1107
|
}
|
|
1107
1108
|
const Me = () => ({});
|
|
1108
|
-
class
|
|
1109
|
+
class Gs extends lt {
|
|
1109
1110
|
constructor() {
|
|
1110
1111
|
super(...arguments), this.measureInstanceViewportBox = ft;
|
|
1111
1112
|
}
|
|
@@ -1131,12 +1132,12 @@ class ks extends lt {
|
|
|
1131
1132
|
return 0;
|
|
1132
1133
|
}
|
|
1133
1134
|
}
|
|
1134
|
-
const
|
|
1135
|
+
const ks = pn({
|
|
1135
1136
|
scrapeMotionValuesFromProps: Me,
|
|
1136
1137
|
createRenderState: Me
|
|
1137
1138
|
});
|
|
1138
|
-
function
|
|
1139
|
-
const [t, n] =
|
|
1139
|
+
function Io(e) {
|
|
1140
|
+
const [t, n] = K(e), s = ks({}, !1), o = v(() => new Gs({
|
|
1140
1141
|
props: {
|
|
1141
1142
|
onUpdate: (i) => {
|
|
1142
1143
|
n({ ...i });
|
|
@@ -1145,24 +1146,24 @@ function To(e) {
|
|
|
1145
1146
|
visualState: s,
|
|
1146
1147
|
presenceContext: null
|
|
1147
1148
|
}, { initialState: e }));
|
|
1148
|
-
|
|
1149
|
+
Sn(() => (o.mount({}), () => o.unmount()), [o]);
|
|
1149
1150
|
const r = v(() => (i) => it(o, i));
|
|
1150
1151
|
return [t, r];
|
|
1151
1152
|
}
|
|
1152
|
-
let
|
|
1153
|
-
const
|
|
1154
|
-
|
|
1155
|
-
}, []),
|
|
1153
|
+
let Ns = 0;
|
|
1154
|
+
const To = ({ children: e }) => (wn.useEffect(() => {
|
|
1155
|
+
b(!1, "AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations");
|
|
1156
|
+
}, []), re(hn, { id: v(() => `asl-${Ns++}`), children: e })), js = 1e5, Je = (e) => e > 1e-3 ? 1 / e : js;
|
|
1156
1157
|
let Qe = !1;
|
|
1157
|
-
function
|
|
1158
|
+
function Oo(e) {
|
|
1158
1159
|
let t = R(1), n = R(1);
|
|
1159
|
-
const { visualElement: s } =
|
|
1160
|
-
|
|
1160
|
+
const { visualElement: s } = F(gn);
|
|
1161
|
+
b(!!(e || s), "If no scale values are provided, useInvertedScale must be used within a child of another motion component."), rt(Qe, "useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead."), Qe = !0, e ? (t = e.scaleX || t, n = e.scaleY || n) : s && (t = s.getValue("scaleX", 1), n = s.getValue("scaleY", 1));
|
|
1161
1162
|
const o = Ae(t, Je), r = Ae(n, Je);
|
|
1162
1163
|
return { scaleX: o, scaleY: r };
|
|
1163
1164
|
}
|
|
1164
|
-
const Ot =
|
|
1165
|
-
function
|
|
1165
|
+
const Ot = An(null);
|
|
1166
|
+
function Us(e, t, n, s) {
|
|
1166
1167
|
if (!s)
|
|
1167
1168
|
return e;
|
|
1168
1169
|
const o = e.findIndex((l) => l.value === t);
|
|
@@ -1171,57 +1172,57 @@ function Ys(e, t, n, s) {
|
|
|
1171
1172
|
const r = s > 0 ? 1 : -1, i = e[o + r];
|
|
1172
1173
|
if (!i)
|
|
1173
1174
|
return e;
|
|
1174
|
-
const
|
|
1175
|
-
return r === 1 &&
|
|
1175
|
+
const u = e[o], a = i.layout, c = ct(a.min, a.max, 0.5);
|
|
1176
|
+
return r === 1 && u.layout.max + n > c || r === -1 && u.layout.min + n < c ? yn(e, o, o + r) : e;
|
|
1176
1177
|
}
|
|
1177
|
-
function
|
|
1178
|
-
const
|
|
1179
|
-
|
|
1178
|
+
function Ys({ children: e, as: t = "ul", axis: n = "y", onReorder: s, values: o, ...r }, i) {
|
|
1179
|
+
const u = v(() => vt[t]), a = [], c = P(!1);
|
|
1180
|
+
b(!!o, "Reorder.Group must be provided a values prop");
|
|
1180
1181
|
const l = {
|
|
1181
1182
|
axis: n,
|
|
1182
1183
|
registerItem: (d, f) => {
|
|
1183
1184
|
const m = a.findIndex((p) => d === p.value);
|
|
1184
|
-
m !== -1 ? a[m].layout = f[n] : a.push({ value: d, layout: f[n] }), a.sort(
|
|
1185
|
+
m !== -1 ? a[m].layout = f[n] : a.push({ value: d, layout: f[n] }), a.sort(Ks);
|
|
1185
1186
|
},
|
|
1186
1187
|
updateOrder: (d, f, m) => {
|
|
1187
|
-
if (
|
|
1188
|
+
if (c.current)
|
|
1188
1189
|
return;
|
|
1189
|
-
const p =
|
|
1190
|
-
a !== p && (
|
|
1190
|
+
const p = Us(a, d, f, m);
|
|
1191
|
+
a !== p && (c.current = !0, s(p.map($s).filter((h) => o.indexOf(h) !== -1)));
|
|
1191
1192
|
}
|
|
1192
1193
|
};
|
|
1193
1194
|
return O(() => {
|
|
1194
|
-
|
|
1195
|
-
}),
|
|
1195
|
+
c.current = !1;
|
|
1196
|
+
}), re(u, { ...r, ref: i, ignoreStrict: !0, children: re(Ot.Provider, { value: l, children: e }) });
|
|
1196
1197
|
}
|
|
1197
|
-
const
|
|
1198
|
-
function
|
|
1198
|
+
const Xs = /* @__PURE__ */ gt(Ys);
|
|
1199
|
+
function $s(e) {
|
|
1199
1200
|
return e.value;
|
|
1200
1201
|
}
|
|
1201
|
-
function
|
|
1202
|
+
function Ks(e, t) {
|
|
1202
1203
|
return e.layout.min - t.layout.min;
|
|
1203
1204
|
}
|
|
1204
1205
|
function Ze(e, t = 0) {
|
|
1205
1206
|
return D(e) ? e : R(t);
|
|
1206
1207
|
}
|
|
1207
|
-
function
|
|
1208
|
-
const a = v(() => vt[s]),
|
|
1208
|
+
function Js({ children: e, style: t = {}, value: n, as: s = "li", onDrag: o, layout: r = !0, ...i }, u) {
|
|
1209
|
+
const a = v(() => vt[s]), c = F(Ot), l = {
|
|
1209
1210
|
x: Ze(t.x),
|
|
1210
1211
|
y: Ze(t.y)
|
|
1211
1212
|
}, d = Ae([l.x, l.y], ([h, g]) => h || g ? 1 : "unset");
|
|
1212
|
-
|
|
1213
|
-
const { axis: f, registerItem: m, updateOrder: p } =
|
|
1214
|
-
return
|
|
1213
|
+
b(!!c, "Reorder.Item must be a child of Reorder.Group");
|
|
1214
|
+
const { axis: f, registerItem: m, updateOrder: p } = c;
|
|
1215
|
+
return re(a, { drag: f, ...i, dragSnapToOrigin: !0, style: { ...t, x: l.x, y: l.y, zIndex: d }, layout: r, onDrag: (h, g) => {
|
|
1215
1216
|
const { velocity: y } = g;
|
|
1216
1217
|
y[f] && p(n, l[f].get(), y[f]), o && o(h, g);
|
|
1217
|
-
}, onLayoutMeasure: (h) => m(n, h), ref:
|
|
1218
|
+
}, onLayoutMeasure: (h) => m(n, h), ref: u, ignoreStrict: !0, children: e });
|
|
1218
1219
|
}
|
|
1219
|
-
const
|
|
1220
|
+
const Qs = /* @__PURE__ */ gt(Js), Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1220
1221
|
__proto__: null,
|
|
1221
|
-
Group:
|
|
1222
|
-
Item:
|
|
1222
|
+
Group: Xs,
|
|
1223
|
+
Item: Qs
|
|
1223
1224
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1224
|
-
function
|
|
1225
|
+
function Zs(e, t) {
|
|
1225
1226
|
if (e === "first")
|
|
1226
1227
|
return 0;
|
|
1227
1228
|
{
|
|
@@ -1229,19 +1230,18 @@ function qs(e, t) {
|
|
|
1229
1230
|
return e === "last" ? n : n / 2;
|
|
1230
1231
|
}
|
|
1231
1232
|
}
|
|
1232
|
-
function
|
|
1233
|
+
function Po(e = 0.1, { startDelay: t = 0, from: n = 0, ease: s } = {}) {
|
|
1233
1234
|
return (o, r) => {
|
|
1234
|
-
const i = typeof n == "number" ? n :
|
|
1235
|
-
let a = e *
|
|
1235
|
+
const i = typeof n == "number" ? n : Zs(n, r), u = Math.abs(i - o);
|
|
1236
|
+
let a = e * u;
|
|
1236
1237
|
if (s) {
|
|
1237
|
-
const
|
|
1238
|
-
a = vn(s)(a /
|
|
1238
|
+
const c = r * e;
|
|
1239
|
+
a = vn(s)(a / c) * c;
|
|
1239
1240
|
}
|
|
1240
1241
|
return t + a;
|
|
1241
1242
|
};
|
|
1242
1243
|
}
|
|
1243
|
-
|
|
1244
|
-
function Fo(e, t = "end") {
|
|
1244
|
+
function Do(e, t = "end") {
|
|
1245
1245
|
return (n) => {
|
|
1246
1246
|
n = t === "end" ? Math.min(n, 0.999) : Math.max(n, 1e-3);
|
|
1247
1247
|
const s = n * e, o = t === "end" ? Math.floor(s) : Math.ceil(s);
|
|
@@ -1249,134 +1249,131 @@ function Fo(e, t = "end") {
|
|
|
1249
1249
|
};
|
|
1250
1250
|
}
|
|
1251
1251
|
export {
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1252
|
+
zo as AcceleratedAnimation,
|
|
1253
|
+
Wo as AnimatePresence,
|
|
1254
|
+
To as AnimateSharedLayout,
|
|
1255
|
+
Bo as DeprecatedLayoutGroupContext,
|
|
1256
|
+
Ds as DragControls,
|
|
1257
|
+
Ho as FlatTree,
|
|
1258
1258
|
hn as LayoutGroup,
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1259
|
+
_o as LayoutGroupContext,
|
|
1260
|
+
Go as LazyMotion,
|
|
1261
|
+
ko as MotionConfig,
|
|
1262
1262
|
fe as MotionConfigContext,
|
|
1263
1263
|
gn as MotionContext,
|
|
1264
|
-
|
|
1265
|
-
|
|
1264
|
+
No as MotionGlobalConfig,
|
|
1265
|
+
jo as MotionValue,
|
|
1266
1266
|
cn as PresenceContext,
|
|
1267
|
-
|
|
1268
|
-
|
|
1267
|
+
Lo as Reorder,
|
|
1268
|
+
Uo as SwitchLayoutGroupContext,
|
|
1269
1269
|
lt as VisualElement,
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1270
|
+
Yo as addPointerEvent,
|
|
1271
|
+
Xo as addPointerInfo,
|
|
1272
|
+
$o as addScaleCorrector,
|
|
1273
|
+
mo as animate,
|
|
1274
|
+
ho as animateMini,
|
|
1275
1275
|
Nt as animateValue,
|
|
1276
1276
|
it as animateVisualElement,
|
|
1277
|
-
|
|
1277
|
+
is as animationControls,
|
|
1278
1278
|
qe as animations,
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
ir as circOut,
|
|
1279
|
+
Ko as anticipate,
|
|
1280
|
+
Jo as backIn,
|
|
1281
|
+
Qo as backInOut,
|
|
1282
|
+
Zo as backOut,
|
|
1283
|
+
qo as buildTransform,
|
|
1284
|
+
er as calcLength,
|
|
1285
|
+
ae as cancelFrame,
|
|
1286
|
+
tr as circIn,
|
|
1287
|
+
nr as circInOut,
|
|
1288
|
+
sr as circOut,
|
|
1290
1289
|
ot as clamp,
|
|
1291
|
-
|
|
1292
|
-
|
|
1290
|
+
or as color,
|
|
1291
|
+
rr as complex,
|
|
1293
1292
|
ft as createBox,
|
|
1294
|
-
|
|
1293
|
+
ir as createRendererMotionComponent,
|
|
1295
1294
|
It as createScopedAnimate,
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1295
|
+
ar as cubicBezier,
|
|
1296
|
+
cr as delay,
|
|
1297
|
+
Vo as disableInstantTransitions,
|
|
1298
|
+
ur as distance,
|
|
1299
|
+
lr as distance2D,
|
|
1300
|
+
fr as domAnimation,
|
|
1301
|
+
dr as domMax,
|
|
1302
|
+
oo as domMin,
|
|
1303
|
+
mr as easeIn,
|
|
1304
|
+
pr as easeInOut,
|
|
1305
|
+
hr as easeOut,
|
|
1306
|
+
gr as filterProps,
|
|
1307
|
+
yr as findSpring,
|
|
1309
1308
|
A as frame,
|
|
1310
1309
|
Gt as frameData,
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
Er as inertia,
|
|
1310
|
+
vr as hover,
|
|
1311
|
+
Hs as inView,
|
|
1312
|
+
wr as inertia,
|
|
1315
1313
|
nt as interpolate,
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1314
|
+
b as invariant,
|
|
1315
|
+
Sr as isBrowser,
|
|
1316
|
+
Ar as isDragActive,
|
|
1319
1317
|
Fs as isMotionComponent,
|
|
1320
1318
|
D as isMotionValue,
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1319
|
+
Er as isValidMotionProp,
|
|
1320
|
+
br as keyframes,
|
|
1321
|
+
Mr as m,
|
|
1324
1322
|
pn as makeUseVisualState,
|
|
1325
|
-
|
|
1326
|
-
|
|
1323
|
+
xr as mirrorEasing,
|
|
1324
|
+
Vr as mix,
|
|
1327
1325
|
vt as motion,
|
|
1328
1326
|
Y as motionValue,
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1327
|
+
ie as noop,
|
|
1328
|
+
Cr as optimizedAppearDataAttribute,
|
|
1329
|
+
Ir as pipe,
|
|
1330
|
+
Tr as press,
|
|
1333
1331
|
tt as progress,
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1332
|
+
Or as px,
|
|
1333
|
+
Lr as resolveMotionValue,
|
|
1334
|
+
Pr as reverseEasing,
|
|
1335
|
+
Jn as scroll,
|
|
1338
1336
|
xe as scrollInfo,
|
|
1339
1337
|
tn as spring,
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
yo as
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
So as
|
|
1356
|
-
|
|
1357
|
-
io as useElementScroll,
|
|
1338
|
+
Po as stagger,
|
|
1339
|
+
Co as startOptimizedAppearAnimation,
|
|
1340
|
+
Do as steps,
|
|
1341
|
+
Dr as time,
|
|
1342
|
+
ts as transform,
|
|
1343
|
+
Ao as unwrapMotionComponent,
|
|
1344
|
+
po as useAnimate,
|
|
1345
|
+
go as useAnimateMini,
|
|
1346
|
+
yo as useAnimation,
|
|
1347
|
+
Ps as useAnimationControls,
|
|
1348
|
+
Zn as useAnimationFrame,
|
|
1349
|
+
bo as useCycle,
|
|
1350
|
+
Io as useDeprecatedAnimatedState,
|
|
1351
|
+
Oo as useDeprecatedInvertedScale,
|
|
1352
|
+
wo as useDomEvent,
|
|
1353
|
+
So as useDragControls,
|
|
1354
|
+
ro as useElementScroll,
|
|
1358
1355
|
ln as useForceUpdate,
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1356
|
+
Mo as useInView,
|
|
1357
|
+
zs as useInstantLayoutTransition,
|
|
1358
|
+
xo as useInstantTransition,
|
|
1359
|
+
Rr as useIsPresent,
|
|
1363
1360
|
le as useIsomorphicLayoutEffect,
|
|
1364
|
-
|
|
1361
|
+
ao as useMotionTemplate,
|
|
1365
1362
|
R as useMotionValue,
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1363
|
+
Mn as useMotionValueEvent,
|
|
1364
|
+
Fr as usePresence,
|
|
1365
|
+
vo as usePresenceData,
|
|
1366
|
+
ss as useReducedMotion,
|
|
1367
|
+
fo as useReducedMotionConfig,
|
|
1371
1368
|
Eo as useResetProjection,
|
|
1372
1369
|
bt as useScroll,
|
|
1373
|
-
|
|
1374
|
-
|
|
1370
|
+
co as useSpring,
|
|
1371
|
+
uo as useTime,
|
|
1375
1372
|
Ae as useTransform,
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1373
|
+
wt as useUnmountEffect,
|
|
1374
|
+
lo as useVelocity,
|
|
1375
|
+
io as useViewportScroll,
|
|
1376
|
+
zr as useWillChange,
|
|
1377
|
+
oe as visualElementStore,
|
|
1381
1378
|
Mt as wrap
|
|
1382
1379
|
};
|