@ptlm-azulejo/segmented-control 0.1.3-alpha.151 → 0.1.3-alpha.152
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 +240 -447
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -60,8 +60,7 @@ function Kr(t, e) {
|
|
|
60
60
|
return A[M] = (y, V = !1, p = !1) => (i || b(), P.schedule(y, V, p)), A;
|
|
61
61
|
}, {}),
|
|
62
62
|
cancel: (A) => {
|
|
63
|
-
for (let M = 0; M < xe.length; M++)
|
|
64
|
-
s[xe[M]].cancel(A);
|
|
63
|
+
for (let M = 0; M < xe.length; M++) s[xe[M]].cancel(A);
|
|
65
64
|
},
|
|
66
65
|
state: r,
|
|
67
66
|
steps: s
|
|
@@ -93,13 +92,11 @@ function se(t) {
|
|
|
93
92
|
}, se(t);
|
|
94
93
|
}
|
|
95
94
|
function pa(t, e) {
|
|
96
|
-
if (se(t) != "object" || !t)
|
|
97
|
-
return t;
|
|
95
|
+
if (se(t) != "object" || !t) return t;
|
|
98
96
|
var i = t[Symbol.toPrimitive];
|
|
99
97
|
if (i !== void 0) {
|
|
100
98
|
var n = i.call(t, e || "default");
|
|
101
|
-
if (se(n) != "object")
|
|
102
|
-
return n;
|
|
99
|
+
if (se(n) != "object") return n;
|
|
103
100
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
104
101
|
}
|
|
105
102
|
return (e === "string" ? String : Number)(t);
|
|
@@ -141,21 +138,18 @@ var ce = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
|
|
|
141
138
|
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
142
139
|
parse: parseFloat,
|
|
143
140
|
transform: (e) => `${e}${t}`
|
|
144
|
-
}), bt = /* @__PURE__ */ ce("deg"), ut = /* @__PURE__ */ ce("%"), x = /* @__PURE__ */ ce("px"), ga = /* @__PURE__ */ ce("vh"), ya = /* @__PURE__ */ ce("vw"), tn =
|
|
141
|
+
}), bt = /* @__PURE__ */ ce("deg"), ut = /* @__PURE__ */ ce("%"), x = /* @__PURE__ */ ce("px"), ga = /* @__PURE__ */ ce("vh"), ya = /* @__PURE__ */ ce("vw"), tn = m(m({}, ut), {}, {
|
|
145
142
|
parse: (t) => ut.parse(t) / 100,
|
|
146
143
|
transform: (t) => ut.transform(t * 100)
|
|
147
|
-
})
|
|
144
|
+
});
|
|
148
145
|
function en(t, e) {
|
|
149
146
|
return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
|
|
150
147
|
}
|
|
151
148
|
var lt = { correct: (t, e) => {
|
|
152
|
-
if (!e.target)
|
|
153
|
-
return t;
|
|
149
|
+
if (!e.target) return t;
|
|
154
150
|
if (typeof t == "string")
|
|
155
|
-
if (x.test(t))
|
|
156
|
-
|
|
157
|
-
else
|
|
158
|
-
return t;
|
|
151
|
+
if (x.test(t)) t = parseFloat(t);
|
|
152
|
+
else return t;
|
|
159
153
|
return `${en(t, e.target.x)}% ${en(t, e.target.y)}%`;
|
|
160
154
|
} }, ct = (t, e, i) => i > e ? e : i < t ? t : i, Gt = {
|
|
161
155
|
test: (t) => typeof t == "number",
|
|
@@ -166,8 +160,7 @@ function ba(t) {
|
|
|
166
160
|
return t == null;
|
|
167
161
|
}
|
|
168
162
|
var xa = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Ci = (t, e) => (i) => !!(typeof i == "string" && xa.test(i) && i.startsWith(t) || e && !ba(i) && Object.prototype.hasOwnProperty.call(i, e)), Yr = (t, e, i) => (n) => {
|
|
169
|
-
if (typeof n != "string")
|
|
170
|
-
return n;
|
|
163
|
+
if (typeof n != "string") return n;
|
|
171
164
|
const [r, o, s, a] = n.match(Ei);
|
|
172
165
|
return {
|
|
173
166
|
[t]: parseFloat(r),
|
|
@@ -252,8 +245,7 @@ var wt = {
|
|
|
252
245
|
getAnimatableNone: ka
|
|
253
246
|
}, B = (t, e, i) => t + (e - t) * i, Jr = { correct: (t, { treeScale: e, projectionDelta: i }) => {
|
|
254
247
|
const n = t, r = wt.parse(t);
|
|
255
|
-
if (r.length > 5)
|
|
256
|
-
return n;
|
|
248
|
+
if (r.length > 5) return n;
|
|
257
249
|
const o = wt.createTransformer(t), s = typeof r[0] != "number" ? 1 : 0, a = i.x.scale * e.x, l = i.y.scale * e.y;
|
|
258
250
|
r[0 + s] /= a, r[1 + s] /= l;
|
|
259
251
|
const u = B(a, l, 0.5);
|
|
@@ -283,8 +275,7 @@ function he(t, e) {
|
|
|
283
275
|
const i = typeof t == "string" && !e ? `${t}Context` : e, n = Symbol(i);
|
|
284
276
|
return [(s) => {
|
|
285
277
|
const a = qo(n, s);
|
|
286
|
-
if (a === void 0)
|
|
287
|
-
throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(t) ? `one of the following components: ${t.join(", ")}` : `\`${t}\``}`);
|
|
278
|
+
if (a === void 0) throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(t) ? `one of the following components: ${t.join(", ")}` : `\`${t}\``}`);
|
|
288
279
|
return a;
|
|
289
280
|
}, (s) => (ra(n, s), s)];
|
|
290
281
|
}
|
|
@@ -314,17 +305,14 @@ var mt = class {
|
|
|
314
305
|
process.env.NODE_ENV !== "production" && (It = function(t, e) {
|
|
315
306
|
!t && typeof console != "undefined" && console.warn(e);
|
|
316
307
|
}, ze = function(t, e) {
|
|
317
|
-
if (!t)
|
|
318
|
-
throw new Error(e);
|
|
308
|
+
if (!t) throw new Error(e);
|
|
319
309
|
});
|
|
320
310
|
function ie(t, e, i) {
|
|
321
|
-
if (Array.isArray(t))
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
if (typeof t == "object")
|
|
327
|
-
return t;
|
|
311
|
+
if (Array.isArray(t)) return t.reduce((n, r) => {
|
|
312
|
+
const o = ie(r, e, i);
|
|
313
|
+
return o ? m(m({}, n), o) : n;
|
|
314
|
+
}, {});
|
|
315
|
+
if (typeof t == "object") return t;
|
|
328
316
|
if (t && e) {
|
|
329
317
|
const n = e[t];
|
|
330
318
|
return typeof n == "function" ? n(i) : n;
|
|
@@ -335,11 +323,8 @@ function ja(t, e) {
|
|
|
335
323
|
}
|
|
336
324
|
function Oa(t, e) {
|
|
337
325
|
const i = e.length;
|
|
338
|
-
if (i !== t.length)
|
|
339
|
-
|
|
340
|
-
for (let n = 0; n < i; n++)
|
|
341
|
-
if (e[n] !== t[n])
|
|
342
|
-
return !1;
|
|
326
|
+
if (i !== t.length) return !1;
|
|
327
|
+
for (let n = 0; n < i; n++) if (e[n] !== t[n]) return !1;
|
|
343
328
|
return !0;
|
|
344
329
|
}
|
|
345
330
|
function on(t) {
|
|
@@ -691,8 +676,7 @@ function rl(t) {
|
|
|
691
676
|
if (r in el) {
|
|
692
677
|
const o = t[n];
|
|
693
678
|
e[r] = F(o) ? o.get() : o;
|
|
694
|
-
} else
|
|
695
|
-
i[n] = t[n];
|
|
679
|
+
} else i[n] = t[n];
|
|
696
680
|
}
|
|
697
681
|
return e["path-length"] !== void 0 && nl(e, e["path-length"], e["path-spacing"], e["path-offset"]), {
|
|
698
682
|
attrs: e,
|
|
@@ -700,25 +684,20 @@ function rl(t) {
|
|
|
700
684
|
};
|
|
701
685
|
}
|
|
702
686
|
function sl(t, e) {
|
|
703
|
-
if (t == null)
|
|
704
|
-
return {};
|
|
687
|
+
if (t == null) return {};
|
|
705
688
|
var i = {};
|
|
706
|
-
for (var n in t)
|
|
707
|
-
if (
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
i[n] = t[n];
|
|
711
|
-
}
|
|
689
|
+
for (var n in t) if ({}.hasOwnProperty.call(t, n)) {
|
|
690
|
+
if (e.includes(n)) continue;
|
|
691
|
+
i[n] = t[n];
|
|
692
|
+
}
|
|
712
693
|
return i;
|
|
713
694
|
}
|
|
714
695
|
function tt(t, e) {
|
|
715
|
-
if (t == null)
|
|
716
|
-
return {};
|
|
696
|
+
if (t == null) return {};
|
|
717
697
|
var i, n, r = sl(t, e);
|
|
718
698
|
if (Object.getOwnPropertySymbols) {
|
|
719
699
|
var o = Object.getOwnPropertySymbols(t);
|
|
720
|
-
for (n = 0; n < o.length; n++)
|
|
721
|
-
i = o[n], e.includes(i) || {}.propertyIsEnumerable.call(t, i) && (r[i] = t[i]);
|
|
700
|
+
for (n = 0; n < o.length; n++) i = o[n], e.includes(i) || {}.propertyIsEnumerable.call(t, i) && (r[i] = t[i]);
|
|
722
701
|
}
|
|
723
702
|
return r;
|
|
724
703
|
}
|
|
@@ -741,8 +720,7 @@ function ll({ top: t, left: e, right: i, bottom: n }) {
|
|
|
741
720
|
};
|
|
742
721
|
}
|
|
743
722
|
function ul(t, e) {
|
|
744
|
-
if (!e)
|
|
745
|
-
return t;
|
|
723
|
+
if (!e) return t;
|
|
746
724
|
const i = e({
|
|
747
725
|
x: t.left,
|
|
748
726
|
y: t.top
|
|
@@ -798,8 +776,7 @@ var hn = {
|
|
|
798
776
|
],
|
|
799
777
|
layout: ["layout", "layoutId"]
|
|
800
778
|
}, oi = {};
|
|
801
|
-
for (const t in hn)
|
|
802
|
-
oi[t] = { isEnabled: (e) => hn[t].some((i) => !!e[i]) };
|
|
779
|
+
for (const t in hn) oi[t] = { isEnabled: (e) => hn[t].some((i) => !!e[i]) };
|
|
803
780
|
var dn = () => ({
|
|
804
781
|
translate: 0,
|
|
805
782
|
scale: 1,
|
|
@@ -820,8 +797,7 @@ function dl() {
|
|
|
820
797
|
if (window.matchMedia) {
|
|
821
798
|
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Be.current = t.matches;
|
|
822
799
|
t.addEventListener("change", e), e();
|
|
823
|
-
} else
|
|
824
|
-
Be.current = !1;
|
|
800
|
+
} else Be.current = !1;
|
|
825
801
|
}
|
|
826
802
|
function fl(t) {
|
|
827
803
|
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
@@ -868,13 +844,11 @@ var Ri = class {
|
|
|
868
844
|
notify(t, e, i) {
|
|
869
845
|
const n = this.subscriptions.length;
|
|
870
846
|
if (n)
|
|
871
|
-
if (n === 1)
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
o && o(t, e, i);
|
|
877
|
-
}
|
|
847
|
+
if (n === 1) this.subscriptions[0](t, e, i);
|
|
848
|
+
else for (let r = 0; r < n; r++) {
|
|
849
|
+
const o = this.subscriptions[r];
|
|
850
|
+
o && o(t, e, i);
|
|
851
|
+
}
|
|
878
852
|
}
|
|
879
853
|
getSize() {
|
|
880
854
|
return this.subscriptions.length;
|
|
@@ -892,8 +866,7 @@ var mn = 30, yl = (t) => !isNaN(parseFloat(t)), vn = { current: void 0 }, bl = c
|
|
|
892
866
|
var n;
|
|
893
867
|
const r = K.now();
|
|
894
868
|
if (this.updatedAt !== r && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(i), this.current !== this.prev && ((n = this.events.change) == null || n.notify(this.current), this.dependents))
|
|
895
|
-
for (const o of this.dependents)
|
|
896
|
-
o.dirty();
|
|
869
|
+
for (const o of this.dependents) o.dirty();
|
|
897
870
|
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = e.owner;
|
|
898
871
|
}
|
|
899
872
|
setCurrent(t) {
|
|
@@ -915,8 +888,7 @@ var mn = 30, yl = (t) => !isNaN(parseFloat(t)), vn = { current: void 0 }, bl = c
|
|
|
915
888
|
} : i;
|
|
916
889
|
}
|
|
917
890
|
clearListeners() {
|
|
918
|
-
for (const t in this.events)
|
|
919
|
-
this.events[t].clear();
|
|
891
|
+
for (const t in this.events) this.events[t].clear();
|
|
920
892
|
}
|
|
921
893
|
attach(t, e) {
|
|
922
894
|
this.passiveEffect = t, this.stopPassiveEffect = e;
|
|
@@ -948,8 +920,7 @@ var mn = 30, yl = (t) => !isNaN(parseFloat(t)), vn = { current: void 0 }, bl = c
|
|
|
948
920
|
}
|
|
949
921
|
getVelocity() {
|
|
950
922
|
const t = K.now();
|
|
951
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > mn)
|
|
952
|
-
return 0;
|
|
923
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > mn) return 0;
|
|
953
924
|
const e = Math.min(this.updatedAt - this.prevUpdatedAt, mn);
|
|
954
925
|
return as(parseFloat(this.current) - parseFloat(this.prevFrameValue), e);
|
|
955
926
|
}
|
|
@@ -980,10 +951,8 @@ function zt(t, e) {
|
|
|
980
951
|
function xl(t, e, i) {
|
|
981
952
|
for (const n in e) {
|
|
982
953
|
const r = e[n], o = i[n];
|
|
983
|
-
if (F(r))
|
|
984
|
-
|
|
985
|
-
else if (F(o))
|
|
986
|
-
t.addValue(n, zt(r, { owner: t }));
|
|
954
|
+
if (F(r)) t.addValue(n, r);
|
|
955
|
+
else if (F(o)) t.addValue(n, zt(r, { owner: t }));
|
|
987
956
|
else if (o !== r)
|
|
988
957
|
if (t.hasValue(n)) {
|
|
989
958
|
const s = t.getValue(n);
|
|
@@ -993,8 +962,7 @@ function xl(t, e, i) {
|
|
|
993
962
|
t.addValue(n, zt(s !== void 0 ? s : r, { owner: t }));
|
|
994
963
|
}
|
|
995
964
|
}
|
|
996
|
-
for (const n in i)
|
|
997
|
-
e[n] === void 0 && t.removeValue(n);
|
|
965
|
+
for (const n in i) e[n] === void 0 && t.removeValue(n);
|
|
998
966
|
return e;
|
|
999
967
|
}
|
|
1000
968
|
function gn(t) {
|
|
@@ -1058,8 +1026,7 @@ function ci(t) {
|
|
|
1058
1026
|
return t.includes("scale") ? 1 : 0;
|
|
1059
1027
|
}
|
|
1060
1028
|
function hi(t, e) {
|
|
1061
|
-
if (!t || t === "none")
|
|
1062
|
-
return ci(e);
|
|
1029
|
+
if (!t || t === "none") return ci(e);
|
|
1063
1030
|
const i = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
1064
1031
|
let n, r;
|
|
1065
1032
|
if (i)
|
|
@@ -1068,8 +1035,7 @@ function hi(t, e) {
|
|
|
1068
1035
|
const a = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
1069
1036
|
n = Tl, r = a;
|
|
1070
1037
|
}
|
|
1071
|
-
if (!r)
|
|
1072
|
-
return ci(e);
|
|
1038
|
+
if (!r) return ci(e);
|
|
1073
1039
|
const o = n[e], s = r[1].split(",").map(Pl);
|
|
1074
1040
|
return typeof o == "function" ? o(s) : s[o];
|
|
1075
1041
|
}
|
|
@@ -1098,7 +1064,7 @@ var $t = [
|
|
|
1098
1064
|
"skew",
|
|
1099
1065
|
"skewX",
|
|
1100
1066
|
"skewY"
|
|
1101
|
-
], Wt =
|
|
1067
|
+
], Wt = new Set($t), wn = (t) => t === Gt || t === x, El = /* @__PURE__ */ new Set([
|
|
1102
1068
|
"x",
|
|
1103
1069
|
"y",
|
|
1104
1070
|
"z"
|
|
@@ -1161,8 +1127,7 @@ var Li = class {
|
|
|
1161
1127
|
const { unresolvedKeyframes: t, name: e, element: i, motionValue: n } = this;
|
|
1162
1128
|
if (t[0] === null) {
|
|
1163
1129
|
const r = n == null ? void 0 : n.get(), o = t[t.length - 1];
|
|
1164
|
-
if (r !== void 0)
|
|
1165
|
-
t[0] = r;
|
|
1130
|
+
if (r !== void 0) t[0] = r;
|
|
1166
1131
|
else if (i && e) {
|
|
1167
1132
|
const s = i.readValue(e, o);
|
|
1168
1133
|
s != null && (t[0] = s);
|
|
@@ -1211,11 +1176,9 @@ var Li = class {
|
|
|
1211
1176
|
]);
|
|
1212
1177
|
function Bl(t) {
|
|
1213
1178
|
const [e, i] = t.slice(0, -1).split("(");
|
|
1214
|
-
if (e === "drop-shadow")
|
|
1215
|
-
return t;
|
|
1179
|
+
if (e === "drop-shadow") return t;
|
|
1216
1180
|
const [n] = i.match(Ei) || [];
|
|
1217
|
-
if (!n)
|
|
1218
|
-
return t;
|
|
1181
|
+
if (!n) return t;
|
|
1219
1182
|
const r = i.replace(n, "");
|
|
1220
1183
|
let o = Ll.has(e) ? 1 : 0;
|
|
1221
1184
|
return n !== i && (o *= 100), e + "(" + o + r + ")";
|
|
@@ -1356,8 +1319,7 @@ var { schedule: gs, cancel: $f } = /* @__PURE__ */ Kr(queueMicrotask, !0), Fl =
|
|
|
1356
1319
|
unmount() {
|
|
1357
1320
|
var t;
|
|
1358
1321
|
this.projection && this.projection.unmount(), pt(this.notifyUpdate), pt(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), (t = this.parent) == null || t.removeChild(this);
|
|
1359
|
-
for (const e in this.events)
|
|
1360
|
-
this.events[e].clear();
|
|
1322
|
+
for (const e in this.events) this.events[e].clear();
|
|
1361
1323
|
for (const e in this.features) {
|
|
1362
1324
|
const i = this.features[e];
|
|
1363
1325
|
i && (i.unmount(), i.isMounted = !1);
|
|
@@ -1390,8 +1352,7 @@ var { schedule: gs, cancel: $f } = /* @__PURE__ */ Kr(queueMicrotask, !0), Fl =
|
|
|
1390
1352
|
let t = "animation";
|
|
1391
1353
|
for (t in oi) {
|
|
1392
1354
|
const e = oi[t];
|
|
1393
|
-
if (!e)
|
|
1394
|
-
continue;
|
|
1355
|
+
if (!e) continue;
|
|
1395
1356
|
const { isEnabled: i, Feature: n } = e;
|
|
1396
1357
|
if (!this.features[t] && n && i(this.props) && (this.features[t] = new n(this)), this.features[t]) {
|
|
1397
1358
|
const r = this.features[t];
|
|
@@ -1454,8 +1415,7 @@ var { schedule: gs, cancel: $f } = /* @__PURE__ */ Kr(queueMicrotask, !0), Fl =
|
|
|
1454
1415
|
return this.values.has(t);
|
|
1455
1416
|
}
|
|
1456
1417
|
getValue(t, e) {
|
|
1457
|
-
if (this.props.values && this.props.values[t])
|
|
1458
|
-
return this.props.values[t];
|
|
1418
|
+
if (this.props.values && this.props.values[t]) return this.props.values[t];
|
|
1459
1419
|
let i = this.values.get(t);
|
|
1460
1420
|
return i === void 0 && e !== void 0 && (i = zt(e === null ? void 0 : e, { owner: this }), this.addValue(t, i)), i;
|
|
1461
1421
|
}
|
|
@@ -1475,8 +1435,7 @@ var { schedule: gs, cancel: $f } = /* @__PURE__ */ Kr(queueMicrotask, !0), Fl =
|
|
|
1475
1435
|
const o = ls(this.props, i, (e = this.presenceContext) == null ? void 0 : e.custom);
|
|
1476
1436
|
o && (n = o[t]);
|
|
1477
1437
|
}
|
|
1478
|
-
if (i && n !== void 0)
|
|
1479
|
-
return n;
|
|
1438
|
+
if (i && n !== void 0) return n;
|
|
1480
1439
|
const r = this.getBaseTargetFromProps(this.props, t);
|
|
1481
1440
|
return r !== void 0 && !F(r) ? r : this.initialValues[t] !== void 0 && n === void 0 ? void 0 : this.baseTarget[t];
|
|
1482
1441
|
}
|
|
@@ -1503,14 +1462,12 @@ var { schedule: gs, cancel: $f } = /* @__PURE__ */ Kr(queueMicrotask, !0), Fl =
|
|
|
1503
1462
|
typeof process != "undefined" && ((Pn = process.env) == null ? void 0 : Pn.NODE_ENV) !== "production" && (fe = (t, e, i) => {
|
|
1504
1463
|
!t && typeof console != "undefined" && console.warn(ai(e, i));
|
|
1505
1464
|
}, ht = (t, e, i) => {
|
|
1506
|
-
if (!t)
|
|
1507
|
-
throw new Error(ai(e, i));
|
|
1465
|
+
if (!t) throw new Error(ai(e, i));
|
|
1508
1466
|
});
|
|
1509
1467
|
var _l = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
|
|
1510
1468
|
function Nl(t) {
|
|
1511
1469
|
const e = _l.exec(t);
|
|
1512
|
-
if (!e)
|
|
1513
|
-
return [,];
|
|
1470
|
+
if (!e) return [,];
|
|
1514
1471
|
const [, i, n, r] = e;
|
|
1515
1472
|
return [`--${i != null ? i : n}`, r];
|
|
1516
1473
|
}
|
|
@@ -1518,8 +1475,7 @@ var zl = 4;
|
|
|
1518
1475
|
function xs(t, e, i = 1) {
|
|
1519
1476
|
ht(i <= zl, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1520
1477
|
const [n, r] = Nl(t);
|
|
1521
|
-
if (!n)
|
|
1522
|
-
return;
|
|
1478
|
+
if (!n) return;
|
|
1523
1479
|
const o = window.getComputedStyle(e).getPropertyValue(n);
|
|
1524
1480
|
if (o) {
|
|
1525
1481
|
const s = o.trim();
|
|
@@ -1541,9 +1497,7 @@ function $l(t, e, i) {
|
|
|
1541
1497
|
const o = t[n];
|
|
1542
1498
|
typeof o == "string" && !Gl.has(o) && ae(o).values.length && (r = t[n]), n++;
|
|
1543
1499
|
}
|
|
1544
|
-
if (r && i)
|
|
1545
|
-
for (const o of e)
|
|
1546
|
-
t[o] = vs(i, r);
|
|
1500
|
+
if (r && i) for (const o of e) t[o] = vs(i, r);
|
|
1547
1501
|
}
|
|
1548
1502
|
var Wl = class extends Li {
|
|
1549
1503
|
constructor(t, e, i, n, r) {
|
|
@@ -1551,8 +1505,7 @@ var Wl = class extends Li {
|
|
|
1551
1505
|
}
|
|
1552
1506
|
readKeyframes() {
|
|
1553
1507
|
const { unresolvedKeyframes: t, element: e, name: i } = this;
|
|
1554
|
-
if (!e || !e.current)
|
|
1555
|
-
return;
|
|
1508
|
+
if (!e || !e.current) return;
|
|
1556
1509
|
super.readKeyframes();
|
|
1557
1510
|
for (let a = 0; a < t.length; a++) {
|
|
1558
1511
|
let l = t[a];
|
|
@@ -1561,32 +1514,27 @@ var Wl = class extends Li {
|
|
|
1561
1514
|
u !== void 0 && (t[a] = u), a === t.length - 1 && (this.finalKeyframe = l);
|
|
1562
1515
|
}
|
|
1563
1516
|
}
|
|
1564
|
-
if (this.resolveNoneKeyframes(), !bs.has(i) || t.length !== 2)
|
|
1565
|
-
return;
|
|
1517
|
+
if (this.resolveNoneKeyframes(), !bs.has(i) || t.length !== 2) return;
|
|
1566
1518
|
const [n, r] = t, o = Tn(n), s = Tn(r);
|
|
1567
1519
|
if (rn(n) !== rn(r) && xt[i]) {
|
|
1568
1520
|
this.needsMeasurement = !0;
|
|
1569
1521
|
return;
|
|
1570
1522
|
}
|
|
1571
1523
|
if (o !== s)
|
|
1572
|
-
if (wn(o) && wn(s))
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
else
|
|
1578
|
-
xt[i] && (this.needsMeasurement = !0);
|
|
1524
|
+
if (wn(o) && wn(s)) for (let a = 0; a < t.length; a++) {
|
|
1525
|
+
const l = t[a];
|
|
1526
|
+
typeof l == "string" && (t[a] = parseFloat(l));
|
|
1527
|
+
}
|
|
1528
|
+
else xt[i] && (this.needsMeasurement = !0);
|
|
1579
1529
|
}
|
|
1580
1530
|
resolveNoneKeyframes() {
|
|
1581
1531
|
const { unresolvedKeyframes: t, name: e } = this, i = [];
|
|
1582
|
-
for (let n = 0; n < t.length; n++)
|
|
1583
|
-
(t[n] === null || Ul(t[n])) && i.push(n);
|
|
1532
|
+
for (let n = 0; n < t.length; n++) (t[n] === null || Ul(t[n])) && i.push(n);
|
|
1584
1533
|
i.length && $l(t, i, e);
|
|
1585
1534
|
}
|
|
1586
1535
|
measureInitialState() {
|
|
1587
1536
|
const { element: t, unresolvedKeyframes: e, name: i } = this;
|
|
1588
|
-
if (!t || !t.current)
|
|
1589
|
-
return;
|
|
1537
|
+
if (!t || !t.current) return;
|
|
1590
1538
|
i === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = xt[i](t.measureViewportBox(), window.getComputedStyle(t.current)), e[0] = this.measuredOrigin;
|
|
1591
1539
|
const n = e[e.length - 1];
|
|
1592
1540
|
n !== void 0 && t.getValue(i, n).jump(n, !1);
|
|
@@ -1594,8 +1542,7 @@ var Wl = class extends Li {
|
|
|
1594
1542
|
measureEndState() {
|
|
1595
1543
|
var t;
|
|
1596
1544
|
const { element: e, name: i, unresolvedKeyframes: n } = this;
|
|
1597
|
-
if (!e || !e.current)
|
|
1598
|
-
return;
|
|
1545
|
+
if (!e || !e.current) return;
|
|
1599
1546
|
const r = e.getValue(i);
|
|
1600
1547
|
r && r.jump(this.measuredOrigin, !1);
|
|
1601
1548
|
const o = n.length - 1, s = n[o];
|
|
@@ -1633,8 +1580,7 @@ function Xl(t, e, i) {
|
|
|
1633
1580
|
let n = "", r = !0;
|
|
1634
1581
|
for (let o = 0; o < Yl; o++) {
|
|
1635
1582
|
const s = $t[o], a = t[s];
|
|
1636
|
-
if (a === void 0)
|
|
1637
|
-
continue;
|
|
1583
|
+
if (a === void 0) continue;
|
|
1638
1584
|
let l = !0;
|
|
1639
1585
|
if (typeof a == "number" ? l = a === (s.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || i) {
|
|
1640
1586
|
const u = Ts(a, Bi[s]);
|
|
@@ -1672,11 +1618,9 @@ function Ss(t, e, i) {
|
|
|
1672
1618
|
function As(t, { style: e, vars: i }, n, r) {
|
|
1673
1619
|
const o = t.style;
|
|
1674
1620
|
let s;
|
|
1675
|
-
for (s in e)
|
|
1676
|
-
o[s] = e[s];
|
|
1621
|
+
for (s in e) o[s] = e[s];
|
|
1677
1622
|
r == null || r.applyProjectionStyles(o, n);
|
|
1678
|
-
for (s in i)
|
|
1679
|
-
o.setProperty(s, i[s]);
|
|
1623
|
+
for (s in i) o.setProperty(s, i[s]);
|
|
1680
1624
|
}
|
|
1681
1625
|
function Hl(t, { layout: e, layoutId: i }) {
|
|
1682
1626
|
return Wt.has(t) || t.startsWith("origin") || (e || i !== void 0) && (!!le[t] || t === "opacity");
|
|
@@ -1684,8 +1628,7 @@ function Hl(t, { layout: e, layoutId: i }) {
|
|
|
1684
1628
|
function Ps(t, e, i) {
|
|
1685
1629
|
var n;
|
|
1686
1630
|
const { style: r } = t, o = {};
|
|
1687
|
-
for (const s in r)
|
|
1688
|
-
(F(r[s]) || e.style && F(e.style[s]) || Hl(s, t) || ((n = i == null ? void 0 : i.getValue(s)) == null ? void 0 : n.liveStyle) !== void 0) && (o[s] = r[s]);
|
|
1631
|
+
for (const s in r) (F(r[s]) || e.style && F(e.style[s]) || Hl(s, t) || ((n = i == null ? void 0 : i.getValue(s)) == null ? void 0 : n.liveStyle) !== void 0) && (o[s] = r[s]);
|
|
1689
1632
|
return o;
|
|
1690
1633
|
}
|
|
1691
1634
|
function ql(t) {
|
|
@@ -1697,8 +1640,7 @@ var Es = class extends ws {
|
|
|
1697
1640
|
}
|
|
1698
1641
|
readValueFromInstance(t, e) {
|
|
1699
1642
|
var i;
|
|
1700
|
-
if (Wt.has(e))
|
|
1701
|
-
return (i = this.projection) != null && i.isProjecting ? ci(e) : Al(t, e);
|
|
1643
|
+
if (Wt.has(e)) return (i = this.projection) != null && i.isProjecting ? ci(e) : Al(t, e);
|
|
1702
1644
|
{
|
|
1703
1645
|
const n = ql(t), r = (Vi(e) ? n.getPropertyValue(e) : n[e]) || 0;
|
|
1704
1646
|
return typeof r == "string" ? r.trim() : r;
|
|
@@ -1756,8 +1698,7 @@ function iu(t, e, i, n, r) {
|
|
|
1756
1698
|
var g;
|
|
1757
1699
|
f.transformBox = (g = r == null ? void 0 : r.transformBox) !== null && g !== void 0 ? g : "fill-box", delete d.transformBox;
|
|
1758
1700
|
}
|
|
1759
|
-
for (const b of eu)
|
|
1760
|
-
d[b] !== void 0 && (f[b] = d[b], delete d[b]);
|
|
1701
|
+
for (const b of eu) d[b] !== void 0 && (f[b] = d[b], delete d[b]);
|
|
1761
1702
|
o !== void 0 && (d.x = o), s !== void 0 && (d.y = s), a !== void 0 && (d.scale = a), l !== void 0 && Ql(d, l, u, c, !1);
|
|
1762
1703
|
}
|
|
1763
1704
|
var Cs = /* @__PURE__ */ new Set([
|
|
@@ -1787,16 +1728,14 @@ var Cs = /* @__PURE__ */ new Set([
|
|
|
1787
1728
|
]), nu = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
1788
1729
|
function ru(t, e, i, n) {
|
|
1789
1730
|
As(t, e, void 0, n);
|
|
1790
|
-
for (const r in e.attrs)
|
|
1791
|
-
t.setAttribute(Cs.has(r) ? r : ji(r), e.attrs[r]);
|
|
1731
|
+
for (const r in e.attrs) t.setAttribute(Cs.has(r) ? r : ji(r), e.attrs[r]);
|
|
1792
1732
|
}
|
|
1793
1733
|
function su(t, e, i) {
|
|
1794
1734
|
const n = Ps(t, e, i);
|
|
1795
|
-
for (const r in t)
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
}
|
|
1735
|
+
for (const r in t) if (F(t[r]) || F(e[r])) {
|
|
1736
|
+
const o = $t.indexOf(r) !== -1 ? "attr" + r.charAt(0).toUpperCase() + r.substring(1) : r;
|
|
1737
|
+
n[o] = t[r];
|
|
1738
|
+
}
|
|
1800
1739
|
return n;
|
|
1801
1740
|
}
|
|
1802
1741
|
var Vs = class extends ws {
|
|
@@ -1837,8 +1776,7 @@ function Oi(t) {
|
|
|
1837
1776
|
return typeof t == "object" && !Array.isArray(t);
|
|
1838
1777
|
}
|
|
1839
1778
|
function Ii(t, e, i) {
|
|
1840
|
-
if (t instanceof EventTarget)
|
|
1841
|
-
return [t];
|
|
1779
|
+
if (t instanceof EventTarget) return [t];
|
|
1842
1780
|
if (typeof t == "string") {
|
|
1843
1781
|
var n;
|
|
1844
1782
|
let r = document;
|
|
@@ -1855,14 +1793,10 @@ function lu(t, e, i) {
|
|
|
1855
1793
|
return t * (e + 1);
|
|
1856
1794
|
}
|
|
1857
1795
|
function En(t, e, i, n) {
|
|
1858
|
-
if (typeof e == "number")
|
|
1859
|
-
|
|
1860
|
-
if (e
|
|
1861
|
-
|
|
1862
|
-
if (e === "<")
|
|
1863
|
-
return i;
|
|
1864
|
-
if (e.startsWith("<"))
|
|
1865
|
-
return Math.max(0, i + parseFloat(e.slice(1)));
|
|
1796
|
+
if (typeof e == "number") return e;
|
|
1797
|
+
if (e.startsWith("-") || e.startsWith("+")) return Math.max(0, t + parseFloat(e));
|
|
1798
|
+
if (e === "<") return i;
|
|
1799
|
+
if (e.startsWith("<")) return Math.max(0, i + parseFloat(e.slice(1)));
|
|
1866
1800
|
var r;
|
|
1867
1801
|
return (r = n.get(e)) !== null && r !== void 0 ? r : t;
|
|
1868
1802
|
}
|
|
@@ -1881,16 +1815,14 @@ function cu(t, e, i) {
|
|
|
1881
1815
|
}
|
|
1882
1816
|
function hu(t, e, i, n, r, o) {
|
|
1883
1817
|
cu(t, r, o);
|
|
1884
|
-
for (let s = 0; s < e.length; s++)
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
});
|
|
1818
|
+
for (let s = 0; s < e.length; s++) t.push({
|
|
1819
|
+
value: e[s],
|
|
1820
|
+
at: B(r, o, n[s]),
|
|
1821
|
+
easing: Ds(i, s)
|
|
1822
|
+
});
|
|
1890
1823
|
}
|
|
1891
1824
|
function du(t, e) {
|
|
1892
|
-
for (let i = 0; i < t.length; i++)
|
|
1893
|
-
t[i] = t[i] / (e + 1);
|
|
1825
|
+
for (let i = 0; i < t.length; i++) t[i] = t[i] / (e + 1);
|
|
1894
1826
|
}
|
|
1895
1827
|
function fu(t, e) {
|
|
1896
1828
|
return t.at === e.at ? t.value === null ? 1 : e.value === null ? -1 : 0 : t.at - e.at;
|
|
@@ -1997,8 +1929,7 @@ function yu(t, e = {}, i, n) {
|
|
|
1997
1929
|
for (let V = 0; V < y; V++) {
|
|
1998
1930
|
S = S, C = C;
|
|
1999
1931
|
const p = P[V], k = Cn(p, l);
|
|
2000
|
-
for (const R in S)
|
|
2001
|
-
M(S[R], xu(C, R), Vn(R, k), V, y);
|
|
1932
|
+
for (const R in S) M(S[R], xu(C, R), Vn(R, k), V, y);
|
|
2002
1933
|
}
|
|
2003
1934
|
}
|
|
2004
1935
|
h = d, d += A;
|
|
@@ -2052,16 +1983,14 @@ function Cu(t) {
|
|
|
2052
1983
|
function Vu(t, e) {
|
|
2053
1984
|
let i = Au(t, e) || {}, { transitionEnd: n = {}, transition: r = {} } = i, o = tt(i, Pu);
|
|
2054
1985
|
o = m(m({}, o), n);
|
|
2055
|
-
for (const s in o)
|
|
2056
|
-
Eu(t, s, Cu(o[s]));
|
|
1986
|
+
for (const s in o) Eu(t, s, Cu(o[s]));
|
|
2057
1987
|
}
|
|
2058
1988
|
function ku(t) {
|
|
2059
1989
|
return !!(F(t) && t.add);
|
|
2060
1990
|
}
|
|
2061
1991
|
function Mu(t, e) {
|
|
2062
1992
|
const i = t.getValue("willChange");
|
|
2063
|
-
if (ku(i))
|
|
2064
|
-
return i.add(e);
|
|
1993
|
+
if (ku(i)) return i.add(e);
|
|
2065
1994
|
if (!i && ft.WillChange) {
|
|
2066
1995
|
const n = new ft.WillChange("auto");
|
|
2067
1996
|
t.addValue("willChange", n), n.add(e);
|
|
@@ -2132,8 +2061,7 @@ function Ye(t, e, i) {
|
|
|
2132
2061
|
function Uu({ hue: t, saturation: e, lightness: i, alpha: n }) {
|
|
2133
2062
|
t /= 360, e /= 100, i /= 100;
|
|
2134
2063
|
let r = 0, o = 0, s = 0;
|
|
2135
|
-
if (!e)
|
|
2136
|
-
r = o = s = i;
|
|
2064
|
+
if (!e) r = o = s = i;
|
|
2137
2065
|
else {
|
|
2138
2066
|
const a = i < 0.5 ? i * (1 + e) : i + e - i * e, l = 2 * i - a;
|
|
2139
2067
|
r = Ye(l, a, t + 1 / 3), o = Ye(l, a, t), s = Ye(l, a, t - 1 / 3);
|
|
@@ -2158,15 +2086,13 @@ var Xe = (t, e, i) => {
|
|
|
2158
2086
|
], $u = (t) => Gu.find((e) => e.test(t));
|
|
2159
2087
|
function kn(t) {
|
|
2160
2088
|
const e = $u(t);
|
|
2161
|
-
if (fe(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e)
|
|
2162
|
-
return !1;
|
|
2089
|
+
if (fe(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e) return !1;
|
|
2163
2090
|
let i = e.parse(t);
|
|
2164
2091
|
return e === Ot && (i = Uu(i)), i;
|
|
2165
2092
|
}
|
|
2166
2093
|
var Mn = (t, e) => {
|
|
2167
2094
|
const i = kn(t), n = kn(e);
|
|
2168
|
-
if (!i || !n)
|
|
2169
|
-
return je(t, e);
|
|
2095
|
+
if (!i || !n) return je(t, e);
|
|
2170
2096
|
const r = m({}, i);
|
|
2171
2097
|
return (o) => (r.red = Xe(i.red, n.red, o), r.green = Xe(i.green, n.green, o), r.blue = Xe(i.blue, n.blue, o), r.alpha = B(i.alpha, n.alpha, o), Vt.transform(r));
|
|
2172
2098
|
}, gi = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
@@ -2183,18 +2109,15 @@ function zi(t) {
|
|
|
2183
2109
|
function Is(t, e) {
|
|
2184
2110
|
const i = [...t], n = i.length, r = t.map((o, s) => zi(o)(o, e[s]));
|
|
2185
2111
|
return (o) => {
|
|
2186
|
-
for (let s = 0; s < n; s++)
|
|
2187
|
-
i[s] = r[s](o);
|
|
2112
|
+
for (let s = 0; s < n; s++) i[s] = r[s](o);
|
|
2188
2113
|
return i;
|
|
2189
2114
|
};
|
|
2190
2115
|
}
|
|
2191
2116
|
function Xu(t, e) {
|
|
2192
2117
|
const i = m(m({}, t), e), n = {};
|
|
2193
|
-
for (const r in i)
|
|
2194
|
-
t[r] !== void 0 && e[r] !== void 0 && (n[r] = zi(t[r])(t[r], e[r]));
|
|
2118
|
+
for (const r in i) t[r] !== void 0 && e[r] !== void 0 && (n[r] = zi(t[r])(t[r], e[r]));
|
|
2195
2119
|
return (r) => {
|
|
2196
|
-
for (const o in n)
|
|
2197
|
-
i[o] = n[o](r);
|
|
2120
|
+
for (const o in n) i[o] = n[o](r);
|
|
2198
2121
|
return i;
|
|
2199
2122
|
};
|
|
2200
2123
|
}
|
|
@@ -2228,8 +2151,7 @@ var Zu = (t) => {
|
|
|
2228
2151
|
}, _s = (t, e, i = 10) => {
|
|
2229
2152
|
let n = "";
|
|
2230
2153
|
const r = Math.max(Math.round(e / i), 2);
|
|
2231
|
-
for (let o = 0; o < r; o++)
|
|
2232
|
-
n += Math.round(t(o / (r - 1)) * 1e4) / 1e4 + ", ";
|
|
2154
|
+
for (let o = 0; o < r; o++) n += Math.round(t(o / (r - 1)) * 1e4) / 1e4 + ", ";
|
|
2233
2155
|
return `linear(${n.substring(0, n.length - 2)})`;
|
|
2234
2156
|
}, Ju = 5;
|
|
2235
2157
|
function Ns(t, e, i) {
|
|
@@ -2269,12 +2191,11 @@ function Qu({ duration: t = O.duration, bounce: e = O.bounce, velocity: i = O.ve
|
|
|
2269
2191
|
return (-r(u) + Dn > 0 ? -1 : 1) * ((h - d) * f) / v;
|
|
2270
2192
|
}) : (r = (u) => -1e-3 + Math.exp(-u * t) * ((u - i) * t + 1), o = (u) => Math.exp(-u * t) * ((i - u) * (t * t)));
|
|
2271
2193
|
const a = 5 / t, l = ec(r, o, a);
|
|
2272
|
-
if (t = it(t), isNaN(l))
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
};
|
|
2194
|
+
if (t = it(t), isNaN(l)) return {
|
|
2195
|
+
stiffness: O.stiffness,
|
|
2196
|
+
damping: O.damping,
|
|
2197
|
+
duration: t
|
|
2198
|
+
};
|
|
2278
2199
|
{
|
|
2279
2200
|
const u = Math.pow(l, 2) * n;
|
|
2280
2201
|
return {
|
|
@@ -2287,8 +2208,7 @@ function Qu({ duration: t = O.duration, bounce: e = O.bounce, velocity: i = O.ve
|
|
|
2287
2208
|
var tc = 12;
|
|
2288
2209
|
function ec(t, e, i) {
|
|
2289
2210
|
let n = i;
|
|
2290
|
-
for (let r = 1; r < tc; r++)
|
|
2291
|
-
n = n - t(n) / e(n);
|
|
2211
|
+
for (let r = 1; r < tc; r++) n = n - t(n) / e(n);
|
|
2292
2212
|
return n;
|
|
2293
2213
|
}
|
|
2294
2214
|
function yi(t, e) {
|
|
@@ -2343,8 +2263,7 @@ function ue(t = O.visualDuration, e = O.bounce) {
|
|
|
2343
2263
|
const V = Math.exp(-g * S * y);
|
|
2344
2264
|
return s - V * ((v + g * S * b) / P * Math.sin(P * y) + b * Math.cos(P * y));
|
|
2345
2265
|
};
|
|
2346
|
-
} else if (g === 1)
|
|
2347
|
-
A = (P) => s - Math.exp(-S * P) * (b + (v + S * b) * P);
|
|
2266
|
+
} else if (g === 1) A = (P) => s - Math.exp(-S * P) * (b + (v + S * b) * P);
|
|
2348
2267
|
else {
|
|
2349
2268
|
const P = S * Math.sqrt(g * g - 1);
|
|
2350
2269
|
A = (y) => {
|
|
@@ -2424,19 +2343,15 @@ function sc(t, e, i) {
|
|
|
2424
2343
|
}
|
|
2425
2344
|
function oc(t, e, { clamp: i = !0, ease: n, mixer: r } = {}) {
|
|
2426
2345
|
const o = t.length;
|
|
2427
|
-
if (ht(o === e.length, "Both input and output ranges must be the same length", "range-length"), o === 1)
|
|
2428
|
-
|
|
2429
|
-
if (o === 2 && e[0] === e[1])
|
|
2430
|
-
return () => e[1];
|
|
2346
|
+
if (ht(o === e.length, "Both input and output ranges must be the same length", "range-length"), o === 1) return () => e[0];
|
|
2347
|
+
if (o === 2 && e[0] === e[1]) return () => e[1];
|
|
2431
2348
|
const s = t[0] === t[1];
|
|
2432
2349
|
t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
2433
2350
|
const a = sc(e, n, r), l = a.length, u = (c) => {
|
|
2434
|
-
if (s && c < t[0])
|
|
2435
|
-
return e[0];
|
|
2351
|
+
if (s && c < t[0]) return e[0];
|
|
2436
2352
|
let h = 0;
|
|
2437
2353
|
if (l > 1)
|
|
2438
|
-
for (; h < t.length - 2 && !(c < t[h + 1]); h++)
|
|
2439
|
-
;
|
|
2354
|
+
for (; h < t.length - 2 && !(c < t[h + 1]); h++) ;
|
|
2440
2355
|
const d = Ut(t[h], t[h + 1], c);
|
|
2441
2356
|
return a[h](d);
|
|
2442
2357
|
};
|
|
@@ -2454,8 +2369,7 @@ function cc(t, e, i, n, r) {
|
|
|
2454
2369
|
return s;
|
|
2455
2370
|
}
|
|
2456
2371
|
function me(t, e, i, n) {
|
|
2457
|
-
if (t === e && i === n)
|
|
2458
|
-
return Y;
|
|
2372
|
+
if (t === e && i === n) return Y;
|
|
2459
2373
|
const r = (o) => cc(o, 0, 1, t, i);
|
|
2460
2374
|
return (o) => o === 0 || o === 1 ? o : zs(r(o), e, n);
|
|
2461
2375
|
}
|
|
@@ -2555,8 +2469,7 @@ var Wi = class {
|
|
|
2555
2469
|
}
|
|
2556
2470
|
tick(t, e = !1) {
|
|
2557
2471
|
const { generator: i, totalDuration: n, mixKeyframes: r, mirroredGenerator: o, resolvedDuration: s, calculatedDuration: a } = this;
|
|
2558
|
-
if (this.startTime === null)
|
|
2559
|
-
return i.next(0);
|
|
2472
|
+
if (this.startTime === null) return i.next(0);
|
|
2560
2473
|
const { delay: l = 0, keyframes: u, repeat: c, repeatType: h, repeatDelay: d, type: f, onUpdate: v, finalKeyframe: g } = this.options;
|
|
2561
2474
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - n / this.speed, this.startTime)), e ? this.currentTime = t : this.updateTime(t);
|
|
2562
2475
|
const b = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1), S = this.playbackSpeed >= 0 ? b < 0 : b > n;
|
|
@@ -2604,8 +2517,7 @@ var Wi = class {
|
|
|
2604
2517
|
}
|
|
2605
2518
|
play() {
|
|
2606
2519
|
var t, e;
|
|
2607
|
-
if (this.isStopped)
|
|
2608
|
-
return;
|
|
2520
|
+
if (this.isStopped) return;
|
|
2609
2521
|
const { driver: i = Zu, startTime: n } = this.options;
|
|
2610
2522
|
this.driver || (this.driver = i((o) => this.tick(o))), (e = (t = this.options).onPlay) == null || e.call(t);
|
|
2611
2523
|
const r = this.driver.now();
|
|
@@ -2694,8 +2606,7 @@ var Js = /* @__PURE__ */ Tc(() => {
|
|
|
2694
2606
|
])
|
|
2695
2607
|
};
|
|
2696
2608
|
function Qs(t, e) {
|
|
2697
|
-
if (t)
|
|
2698
|
-
return typeof t == "function" ? Js() ? _s(t, e) : "ease-out" : qs(t) ? Qt(t) : Array.isArray(t) ? t.map((i) => Qs(i, e) || jn.easeOut) : jn[t];
|
|
2609
|
+
if (t) return typeof t == "function" ? Js() ? _s(t, e) : "ease-out" : qs(t) ? Qt(t) : Array.isArray(t) ? t.map((i) => Qs(i, e) || jn.easeOut) : jn[t];
|
|
2699
2610
|
}
|
|
2700
2611
|
function Sc(t, e, i, { delay: n = 0, duration: r = 300, repeat: o = 0, repeatType: s = "loop", ease: a = "easeOut", times: l } = {}, u = void 0) {
|
|
2701
2612
|
const c = { [e]: i };
|
|
@@ -2719,15 +2630,13 @@ function Sc(t, e, i, { delay: n = 0, duration: r = 300, repeat: o = 0, repeatTyp
|
|
|
2719
2630
|
var Ac = ["type"];
|
|
2720
2631
|
function Pc(t) {
|
|
2721
2632
|
let { type: e } = t, i = tt(t, Ac);
|
|
2722
|
-
if (_i(e) && Js())
|
|
2723
|
-
return e.applyToOptions(i);
|
|
2633
|
+
if (_i(e) && Js()) return e.applyToOptions(i);
|
|
2724
2634
|
var n, r;
|
|
2725
2635
|
return (n = i.duration) !== null && n !== void 0 || (i.duration = 300), (r = i.ease) !== null && r !== void 0 || (i.ease = "easeOut"), i;
|
|
2726
2636
|
}
|
|
2727
2637
|
var Ec = class extends Wi {
|
|
2728
2638
|
constructor(t) {
|
|
2729
|
-
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !t)
|
|
2730
|
-
return;
|
|
2639
|
+
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !t) return;
|
|
2731
2640
|
const { element: e, name: i, keyframes: n, pseudoElement: r, allowFlatten: o = !1, finalKeyframe: s, onComplete: a } = t;
|
|
2732
2641
|
this.isPseudoElement = !!r, this.allowFlatten = o, this.options = t, ht(typeof t.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
2733
2642
|
const l = Pc(t);
|
|
@@ -2756,8 +2665,7 @@ var Ec = class extends Wi {
|
|
|
2756
2665
|
}
|
|
2757
2666
|
}
|
|
2758
2667
|
stop() {
|
|
2759
|
-
if (this.isStopped)
|
|
2760
|
-
return;
|
|
2668
|
+
if (this.isStopped) return;
|
|
2761
2669
|
this.isStopped = !0;
|
|
2762
2670
|
const { state: t } = this;
|
|
2763
2671
|
t === "idle" || t === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
|
|
@@ -2823,8 +2731,7 @@ var kc = [
|
|
|
2823
2731
|
}
|
|
2824
2732
|
updateMotionValue(t) {
|
|
2825
2733
|
const e = this.options, { motionValue: i, onUpdate: n, onComplete: r, element: o } = e, s = tt(e, kc);
|
|
2826
|
-
if (!i)
|
|
2827
|
-
return;
|
|
2734
|
+
if (!i) return;
|
|
2828
2735
|
if (t !== void 0) {
|
|
2829
2736
|
i.set(t);
|
|
2830
2737
|
return;
|
|
@@ -2835,18 +2742,13 @@ var kc = [
|
|
|
2835
2742
|
}, On = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && (wt.test(t) || t === "0") && !t.startsWith("url("));
|
|
2836
2743
|
function Dc(t) {
|
|
2837
2744
|
const e = t[0];
|
|
2838
|
-
if (t.length === 1)
|
|
2839
|
-
|
|
2840
|
-
for (let i = 0; i < t.length; i++)
|
|
2841
|
-
if (t[i] !== e)
|
|
2842
|
-
return !0;
|
|
2745
|
+
if (t.length === 1) return !0;
|
|
2746
|
+
for (let i = 0; i < t.length; i++) if (t[i] !== e) return !0;
|
|
2843
2747
|
}
|
|
2844
2748
|
function Rc(t, e, i, n) {
|
|
2845
2749
|
const r = t[0];
|
|
2846
|
-
if (r === null)
|
|
2847
|
-
|
|
2848
|
-
if (e === "display" || e === "visibility")
|
|
2849
|
-
return !0;
|
|
2750
|
+
if (r === null) return !1;
|
|
2751
|
+
if (e === "display" || e === "visibility") return !0;
|
|
2850
2752
|
const o = t[t.length - 1], s = On(r, e), a = On(o, e);
|
|
2851
2753
|
return fe(s === a, `You are trying to animate ${e} from "${r}" to "${o}". "${s ? o : r}" is not an animatable value.`, "value-not-animatable"), !s || !a ? !1 : Dc(t) || (i === "spring" || _i(i)) && n;
|
|
2852
2754
|
}
|
|
@@ -2859,8 +2761,7 @@ var Lc = /* @__PURE__ */ new Set([
|
|
|
2859
2761
|
function jc(t) {
|
|
2860
2762
|
var e;
|
|
2861
2763
|
const { motionValue: i, name: n, repeatDelay: r, repeatType: o, damping: s, type: a } = t;
|
|
2862
|
-
if (!(((e = i == null ? void 0 : i.owner) == null ? void 0 : e.current) instanceof HTMLElement))
|
|
2863
|
-
return !1;
|
|
2764
|
+
if (!(((e = i == null ? void 0 : i.owner) == null ? void 0 : e.current) instanceof HTMLElement)) return !1;
|
|
2864
2765
|
const { onUpdate: l, transformTemplate: u } = i.owner.getProps();
|
|
2865
2766
|
return Bc() && n && Lc.has(n) && (n !== "transform" || !u) && !l && !r && o !== "mirror" && s !== 0 && a !== "inertia";
|
|
2866
2767
|
}
|
|
@@ -3001,11 +2902,9 @@ function zc(t, e, { delay: i = 0, transitionOverride: n, type: r } = {}) {
|
|
|
3001
2902
|
for (const h in a) {
|
|
3002
2903
|
var c;
|
|
3003
2904
|
const d = t.getValue(h, (c = t.latestValues[h]) !== null && c !== void 0 ? c : null), f = a[h];
|
|
3004
|
-
if (f === void 0 || u && Nc(u, h))
|
|
3005
|
-
continue;
|
|
2905
|
+
if (f === void 0 || u && Nc(u, h)) continue;
|
|
3006
2906
|
const v = m({ delay: i }, Ni(o || {}, h)), g = d.get();
|
|
3007
|
-
if (g !== void 0 && !d.isAnimating && !Array.isArray(f) && f === g && !v.velocity)
|
|
3008
|
-
continue;
|
|
2907
|
+
if (g !== void 0 && !d.isAnimating && !Array.isArray(f) && f === g && !v.velocity) continue;
|
|
3009
2908
|
let b = !1;
|
|
3010
2909
|
if (window.MotionHandoffAnimation) {
|
|
3011
2910
|
const C = Os(t);
|
|
@@ -3034,8 +2933,7 @@ var Gc = class extends ys {
|
|
|
3034
2933
|
readValueFromInstance(t, e) {
|
|
3035
2934
|
if (Uc(e, t)) {
|
|
3036
2935
|
const i = t[e];
|
|
3037
|
-
if (typeof i == "string" || typeof i == "number")
|
|
3038
|
-
return i;
|
|
2936
|
+
if (typeof i == "string" || typeof i == "number") return i;
|
|
3039
2937
|
}
|
|
3040
2938
|
}
|
|
3041
2939
|
getBaseTargetFromProps() {
|
|
@@ -3102,8 +3000,7 @@ function Kc(t, e) {
|
|
|
3102
3000
|
}
|
|
3103
3001
|
function ro(t, e, i, n) {
|
|
3104
3002
|
const r = [];
|
|
3105
|
-
if (Kc(t, e))
|
|
3106
|
-
r.push(no(t, Oi(e) && e.default || e, i && (i.default || i)));
|
|
3003
|
+
if (Kc(t, e)) r.push(no(t, Oi(e) && e.default || e, i && (i.default || i)));
|
|
3107
3004
|
else {
|
|
3108
3005
|
const o = ks(t, e, n), s = o.length;
|
|
3109
3006
|
ht(!!s, "No valid elements provided.", "no-valid-elements");
|
|
@@ -3135,8 +3032,7 @@ var Xc = class {
|
|
|
3135
3032
|
return this.animations[0][t];
|
|
3136
3033
|
}
|
|
3137
3034
|
setAll(t, e) {
|
|
3138
|
-
for (let i = 0; i < this.animations.length; i++)
|
|
3139
|
-
this.animations[i][t] = e;
|
|
3035
|
+
for (let i = 0; i < this.animations.length; i++) this.animations[i][t] = e;
|
|
3140
3036
|
}
|
|
3141
3037
|
attachTimeline(t) {
|
|
3142
3038
|
const e = this.animations.map((i) => i.attachTimeline(t));
|
|
@@ -3206,8 +3102,7 @@ function Zc(t) {
|
|
|
3206
3102
|
function Jc(t) {
|
|
3207
3103
|
function e(i, n, r) {
|
|
3208
3104
|
let o = [], s;
|
|
3209
|
-
if (Zc(i))
|
|
3210
|
-
o = Yc(i, n, t);
|
|
3105
|
+
if (Zc(i)) o = Yc(i, n, t);
|
|
3211
3106
|
else {
|
|
3212
3107
|
const l = r || {}, { onComplete: u } = l, c = tt(l, qc);
|
|
3213
3108
|
typeof u == "function" && (s = u), o = ro(i, n, c, t);
|
|
@@ -3295,8 +3190,7 @@ var Qc = Jc(), th = [
|
|
|
3295
3190
|
setupChildAnimations(t, e) {
|
|
3296
3191
|
var i;
|
|
3297
3192
|
const n = this.state.visualElement;
|
|
3298
|
-
if (!((i = n.variantChildren) != null && i.size) || !e)
|
|
3299
|
-
return { getChildAnimations: () => Promise.resolve() };
|
|
3193
|
+
if (!((i = n.variantChildren) != null && i.size) || !e) return { getChildAnimations: () => Promise.resolve() };
|
|
3300
3194
|
const { staggerChildren: r = 0, staggerDirection: o = 1, delayChildren: s = 0 } = t || {}, a = n.variantChildren.size, l = (a - 1) * r, u = typeof s == "function", c = u ? (d) => s(d, a) : o === 1 ? (d = 0) => d * r : (d = 0) => l - d * r, h = Array.from(n.variantChildren).map((d, f) => d.state.animateUpdates({
|
|
3301
3195
|
controlActiveState: e,
|
|
3302
3196
|
controlDelay: (u ? 0 : s) + c(f)
|
|
@@ -3307,8 +3201,7 @@ var Qc = Jc(), th = [
|
|
|
3307
3201
|
const n = [];
|
|
3308
3202
|
return Object.keys(this.state.target).forEach((r) => {
|
|
3309
3203
|
var o, s;
|
|
3310
|
-
if (!ja(t[r], this.state.target[r]))
|
|
3311
|
-
return;
|
|
3204
|
+
if (!ja(t[r], this.state.target[r])) return;
|
|
3312
3205
|
(o = (s = this.state.baseTarget)[r]) !== null && o !== void 0 || (s[r] = Qa.get(this.state.element, r));
|
|
3313
3206
|
const a = this.state.target[r] === "none" && Le(cn[r]) ? cn[r] : this.state.target[r];
|
|
3314
3207
|
n.push(() => {
|
|
@@ -3321,8 +3214,7 @@ var Qc = Jc(), th = [
|
|
|
3321
3214
|
let n = this.state.options.transition, r = {};
|
|
3322
3215
|
const { variants: o, custom: s, transition: a, animatePresenceContext: l } = this.state.options, u = s != null ? s : l == null ? void 0 : l.custom;
|
|
3323
3216
|
return this.state.activeStates = m(m({}, this.state.activeStates), t), th.forEach((c) => {
|
|
3324
|
-
if (!this.state.activeStates[c] || sn(this.state.options[c]))
|
|
3325
|
-
return;
|
|
3217
|
+
if (!this.state.activeStates[c] || sn(this.state.options[c])) return;
|
|
3326
3218
|
const h = this.state.options[c];
|
|
3327
3219
|
let d = Le(h) ? ie(h, o, u) : void 0;
|
|
3328
3220
|
if (this.state.visualElement.isVariantNode) {
|
|
@@ -3399,11 +3291,9 @@ function qe(t, e) {
|
|
|
3399
3291
|
}
|
|
3400
3292
|
var oh = (t, e) => {
|
|
3401
3293
|
const i = t.currentTarget;
|
|
3402
|
-
if (!i)
|
|
3403
|
-
return;
|
|
3294
|
+
if (!i) return;
|
|
3404
3295
|
const n = _n(() => {
|
|
3405
|
-
if (Me.has(i))
|
|
3406
|
-
return;
|
|
3296
|
+
if (Me.has(i)) return;
|
|
3407
3297
|
qe(i, "down");
|
|
3408
3298
|
const r = _n(() => {
|
|
3409
3299
|
qe(i, "up");
|
|
@@ -3418,8 +3308,7 @@ function Nn(t) {
|
|
|
3418
3308
|
function ah(t, e, i = {}) {
|
|
3419
3309
|
const [n, r, o] = ao(t, i), s = (a) => {
|
|
3420
3310
|
const l = a.currentTarget;
|
|
3421
|
-
if (!Nn(a))
|
|
3422
|
-
return;
|
|
3311
|
+
if (!Nn(a)) return;
|
|
3423
3312
|
Me.add(l);
|
|
3424
3313
|
const u = e(l, a), c = (f, v) => {
|
|
3425
3314
|
window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", d), Me.has(l) && Me.delete(l), Nn(f) && typeof u == "function" && u(f, { success: v });
|
|
@@ -3471,11 +3360,9 @@ function Un(t) {
|
|
|
3471
3360
|
}
|
|
3472
3361
|
function uh(t, e, i = {}) {
|
|
3473
3362
|
const [n, r, o] = ao(t, i), s = (a) => {
|
|
3474
|
-
if (!Un(a))
|
|
3475
|
-
return;
|
|
3363
|
+
if (!Un(a)) return;
|
|
3476
3364
|
const { target: l } = a, u = e(l, a);
|
|
3477
|
-
if (typeof u != "function" || !l)
|
|
3478
|
-
return;
|
|
3365
|
+
if (typeof u != "function" || !l) return;
|
|
3479
3366
|
const c = (h) => {
|
|
3480
3367
|
Un(h) && (u(h), l.removeEventListener("pointerleave", c));
|
|
3481
3368
|
};
|
|
@@ -3524,8 +3411,7 @@ function dh(t, e, { root: i, margin: n, amount: r = "some" } = {}) {
|
|
|
3524
3411
|
if (c.isIntersecting) {
|
|
3525
3412
|
const d = e(c.target, c);
|
|
3526
3413
|
typeof d == "function" ? s.set(c.target, d) : l.unobserve(c.target);
|
|
3527
|
-
} else
|
|
3528
|
-
typeof h == "function" && (h(c), s.delete(c.target));
|
|
3414
|
+
} else typeof h == "function" && (h(c), s.delete(c.target));
|
|
3529
3415
|
});
|
|
3530
3416
|
}, l = new IntersectionObserver(a, {
|
|
3531
3417
|
root: i,
|
|
@@ -3551,15 +3437,13 @@ var ph = class extends mt {
|
|
|
3551
3437
|
}
|
|
3552
3438
|
startObserver() {
|
|
3553
3439
|
const t = this.state.element;
|
|
3554
|
-
if (!t || !this.isActive())
|
|
3555
|
-
return;
|
|
3440
|
+
if (!t || !this.isActive()) return;
|
|
3556
3441
|
this.unmount();
|
|
3557
3442
|
const e = this.state.options.inViewOptions || {}, { once: i } = e, n = tt(e, fh);
|
|
3558
3443
|
this.unmount = dh(t, (r, o) => {
|
|
3559
|
-
if ($n(this.state, o, "Enter"), !i)
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
};
|
|
3444
|
+
if ($n(this.state, o, "Enter"), !i) return (s) => {
|
|
3445
|
+
$n(this.state, o, "Leave");
|
|
3446
|
+
};
|
|
3563
3447
|
}, n);
|
|
3564
3448
|
}
|
|
3565
3449
|
mount() {
|
|
@@ -3683,8 +3567,7 @@ function fo(t, { x: e, y: i }) {
|
|
|
3683
3567
|
var Jn = 0.999999999999, Qn = 1.0000000000001;
|
|
3684
3568
|
function Sh(t, e, i, n = !1) {
|
|
3685
3569
|
const r = i.length;
|
|
3686
|
-
if (!r)
|
|
3687
|
-
return;
|
|
3570
|
+
if (!r) return;
|
|
3688
3571
|
e.x = e.y = 1;
|
|
3689
3572
|
let o, s;
|
|
3690
3573
|
for (let a = 0; a < r; a++) {
|
|
@@ -3735,8 +3618,7 @@ function rr(t, e, i, n, r) {
|
|
|
3735
3618
|
return t -= e, t = Ie(t, 1 / i, n), r !== void 0 && (t = Ie(t, 1 / r, n)), t;
|
|
3736
3619
|
}
|
|
3737
3620
|
function Mh(t, e = 0, i = 1, n = 0.5, r, o = t, s = t) {
|
|
3738
|
-
if (ut.test(e) && (e = parseFloat(e), e = B(s.min, s.max, e / 100) - s.min), typeof e != "number")
|
|
3739
|
-
return;
|
|
3621
|
+
if (ut.test(e) && (e = parseFloat(e), e = B(s.min, s.max, e / 100) - s.min), typeof e != "number") return;
|
|
3740
3622
|
let a = B(o.min, o.max, n);
|
|
3741
3623
|
t === o && (a -= e), t.min = rr(t.min, e, i, a, r), t.max = rr(t.max, e, i, a, r);
|
|
3742
3624
|
}
|
|
@@ -3794,8 +3676,7 @@ var Bh = class {
|
|
|
3794
3676
|
}
|
|
3795
3677
|
relegate(t) {
|
|
3796
3678
|
const e = this.members.findIndex((n) => t === n);
|
|
3797
|
-
if (e === 0)
|
|
3798
|
-
return !1;
|
|
3679
|
+
if (e === 0) return !1;
|
|
3799
3680
|
let i;
|
|
3800
3681
|
for (let n = e; n >= 0; n--) {
|
|
3801
3682
|
const r = this.members[n];
|
|
@@ -3860,11 +3741,9 @@ function ti(t, e, i, n) {
|
|
|
3860
3741
|
r[t] && (i[t] = r[t], e.setStaticValue(t, 0), n && (n[t] = 0));
|
|
3861
3742
|
}
|
|
3862
3743
|
function vo(t) {
|
|
3863
|
-
if (t.hasCheckedOptimisedAppear = !0, t.root === t)
|
|
3864
|
-
return;
|
|
3744
|
+
if (t.hasCheckedOptimisedAppear = !0, t.root === t) return;
|
|
3865
3745
|
const { visualElement: e } = t.options;
|
|
3866
|
-
if (!e)
|
|
3867
|
-
return;
|
|
3746
|
+
if (!e) return;
|
|
3868
3747
|
const i = Os(e);
|
|
3869
3748
|
if (window.MotionHasOptimisedAnimation(i, "transform")) {
|
|
3870
3749
|
const { layout: r, layoutId: o } = t.options;
|
|
@@ -3884,8 +3763,7 @@ function go({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3884
3763
|
}, this.updateProjection = () => {
|
|
3885
3764
|
this.projectionUpdateScheduled = !1, at.value && (Ct.nodes = Ct.calculatedTargetDeltas = Ct.calculatedProjections = 0), this.nodes.forEach(Nh), this.nodes.forEach($h), this.nodes.forEach(Wh), this.nodes.forEach(zh), at.addProjectionMetrics && at.addProjectionMetrics(Ct);
|
|
3886
3765
|
}, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = s, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
3887
|
-
for (let l = 0; l < this.path.length; l++)
|
|
3888
|
-
this.path[l].shouldResetTransform = !0;
|
|
3766
|
+
for (let l = 0; l < this.path.length; l++) this.path[l].shouldResetTransform = !0;
|
|
3889
3767
|
this.root === this && (this.nodes = new yh());
|
|
3890
3768
|
}
|
|
3891
3769
|
addEventListener(s, a) {
|
|
@@ -3899,8 +3777,7 @@ function go({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3899
3777
|
return this.eventHandlers.has(s);
|
|
3900
3778
|
}
|
|
3901
3779
|
mount(s) {
|
|
3902
|
-
if (this.instance)
|
|
3903
|
-
return;
|
|
3780
|
+
if (this.instance) return;
|
|
3904
3781
|
this.isSVG = Hi(s) && !io(s), this.instance = s;
|
|
3905
3782
|
const { layoutId: a, layout: l, visualElement: u } = this.options;
|
|
3906
3783
|
if (u && !u.current && u.mount(s), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), t) {
|
|
@@ -3960,16 +3837,14 @@ function go({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3960
3837
|
this.options.onExitComplete && this.options.onExitComplete();
|
|
3961
3838
|
return;
|
|
3962
3839
|
}
|
|
3963
|
-
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && vo(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
|
|
3964
|
-
return;
|
|
3840
|
+
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && vo(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty) return;
|
|
3965
3841
|
this.isLayoutDirty = !0;
|
|
3966
3842
|
for (let c = 0; c < this.path.length; c++) {
|
|
3967
3843
|
const h = this.path[c];
|
|
3968
3844
|
h.shouldResetTransform = !0, h.updateScroll("snapshot"), h.options.layoutRoot && h.willUpdate(!1);
|
|
3969
3845
|
}
|
|
3970
3846
|
const { layoutId: a, layout: l } = this.options;
|
|
3971
|
-
if (a === void 0 && !l)
|
|
3972
|
-
return;
|
|
3847
|
+
if (a === void 0 && !l) return;
|
|
3973
3848
|
const u = this.getTransformTemplate();
|
|
3974
3849
|
this.prevTransformTemplateValue = u ? u(this.latestValues, "") : void 0, this.updateSnapshot(), s && this.notifyListeners("willUpdate");
|
|
3975
3850
|
}
|
|
@@ -4004,11 +3879,8 @@ function go({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
4004
3879
|
this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !Q(this.snapshot.measuredBox.x) && !Q(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
|
|
4005
3880
|
}
|
|
4006
3881
|
updateLayout() {
|
|
4007
|
-
if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty))
|
|
4008
|
-
|
|
4009
|
-
if (this.resumeFrom && !this.resumeFrom.instance)
|
|
4010
|
-
for (let l = 0; l < this.path.length; l++)
|
|
4011
|
-
this.path[l].updateScroll();
|
|
3882
|
+
if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty)) return;
|
|
3883
|
+
if (this.resumeFrom && !this.resumeFrom.instance) for (let l = 0; l < this.path.length; l++) this.path[l].updateScroll();
|
|
4012
3884
|
const s = this.layout;
|
|
4013
3885
|
this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected = N(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
|
|
4014
3886
|
const { visualElement: a } = this.options;
|
|
@@ -4028,8 +3900,7 @@ function go({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
4028
3900
|
}
|
|
4029
3901
|
}
|
|
4030
3902
|
resetTransform() {
|
|
4031
|
-
if (!r)
|
|
4032
|
-
return;
|
|
3903
|
+
if (!r) return;
|
|
4033
3904
|
const s = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !po(this.projectionDelta), l = this.getTransformTemplate(), u = l ? l(this.latestValues, "") : void 0, c = u !== this.prevTransformTemplateValue;
|
|
4034
3905
|
s && this.instance && (a || Et(this.latestValues) || c) && (r(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
|
|
4035
3906
|
}
|
|
@@ -4047,8 +3918,7 @@ function go({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
4047
3918
|
measurePageBox() {
|
|
4048
3919
|
var s;
|
|
4049
3920
|
const { visualElement: a } = this.options;
|
|
4050
|
-
if (!a)
|
|
4051
|
-
return N();
|
|
3921
|
+
if (!a) return N();
|
|
4052
3922
|
const l = a.measureViewportBox();
|
|
4053
3923
|
if (!((s = this.scroll) != null && s.wasRoot || this.path.some(Jh))) {
|
|
4054
3924
|
const { scroll: u } = this.root;
|
|
@@ -4059,8 +3929,7 @@ function go({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
4059
3929
|
removeElementScroll(s) {
|
|
4060
3930
|
var a;
|
|
4061
3931
|
const l = N();
|
|
4062
|
-
if (et(l, s), (a = this.scroll) != null && a.wasRoot)
|
|
4063
|
-
return l;
|
|
3932
|
+
if (et(l, s), (a = this.scroll) != null && a.wasRoot) return l;
|
|
4064
3933
|
for (let u = 0; u < this.path.length; u++) {
|
|
4065
3934
|
const c = this.path[u], { scroll: h, options: d } = c;
|
|
4066
3935
|
c !== this.root && h && d.layoutScroll && (h.wasRoot && et(l, s), Te(l.x, h.offset.x), Te(l.y, h.offset.y));
|
|
@@ -4084,8 +3953,7 @@ function go({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
4084
3953
|
et(a, s);
|
|
4085
3954
|
for (let l = 0; l < this.path.length; l++) {
|
|
4086
3955
|
const u = this.path[l];
|
|
4087
|
-
if (!u.instance || !Et(u.latestValues))
|
|
4088
|
-
continue;
|
|
3956
|
+
if (!u.instance || !Et(u.latestValues)) continue;
|
|
4089
3957
|
xi(u.latestValues) && u.updateSnapshot();
|
|
4090
3958
|
const c = N(), h = u.measurePageBox();
|
|
4091
3959
|
et(c, h), or(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
|
|
@@ -4109,11 +3977,9 @@ function go({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
4109
3977
|
const l = this.getLead();
|
|
4110
3978
|
this.isProjectionDirty || (this.isProjectionDirty = l.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = l.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = l.isSharedProjectionDirty);
|
|
4111
3979
|
const u = !!this.resumingFrom || this !== l;
|
|
4112
|
-
if (!(s || u && this.isSharedProjectionDirty || this.isProjectionDirty || (a = this.parent) != null && a.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
|
|
4113
|
-
return;
|
|
3980
|
+
if (!(s || u && this.isSharedProjectionDirty || this.isProjectionDirty || (a = this.parent) != null && a.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize)) return;
|
|
4114
3981
|
const { layout: c, layoutId: h } = this.options;
|
|
4115
|
-
if (!this.layout || !(c || h))
|
|
4116
|
-
return;
|
|
3982
|
+
if (!this.layout || !(c || h)) return;
|
|
4117
3983
|
this.resolvedRelativeTargetAt = $.timestamp;
|
|
4118
3984
|
const d = this.getClosestProjectingParent();
|
|
4119
3985
|
d && this.linkedParentVersion !== d.layoutVersion && !d.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (d && d.layout ? this.createRelativeTarget(d, this.layout.layoutBox, d.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = N(), this.targetWithTransforms = N()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), kh(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : et(this.target, this.layout.layoutBox), fo(this.target, this.targetDelta)) : et(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, d && !!d.resumingFrom == !!this.resumingFrom && !d.options.layoutScroll && d.target && this.animationProgress !== 1 ? this.createRelativeTarget(d, this.target, d.target) : this.relativeParent = this.relativeTarget = void 0), at.value && Ct.calculatedTargetDeltas++);
|
|
@@ -4135,11 +4001,9 @@ function go({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
4135
4001
|
var s;
|
|
4136
4002
|
const a = this.getLead(), l = !!this.resumingFrom || this !== a;
|
|
4137
4003
|
let u = !0;
|
|
4138
|
-
if ((this.isProjectionDirty || (s = this.parent) != null && s.isProjectionDirty) && (u = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (u = !1), this.resolvedRelativeTargetAt === $.timestamp && (u = !1), u)
|
|
4139
|
-
return;
|
|
4004
|
+
if ((this.isProjectionDirty || (s = this.parent) != null && s.isProjectionDirty) && (u = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (u = !1), this.resolvedRelativeTargetAt === $.timestamp && (u = !1), u) return;
|
|
4140
4005
|
const { layout: c, layoutId: h } = this.options;
|
|
4141
|
-
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(c || h))
|
|
4142
|
-
return;
|
|
4006
|
+
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(c || h)) return;
|
|
4143
4007
|
et(this.layoutCorrected, this.layout.layoutBox);
|
|
4144
4008
|
const d = this.treeScale.x, f = this.treeScale.y;
|
|
4145
4009
|
Sh(this.layoutCorrected, this.treeScale, this.path, l), a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox, a.targetWithTransforms = N());
|
|
@@ -4242,8 +4106,7 @@ function go({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
4242
4106
|
}
|
|
4243
4107
|
getStack() {
|
|
4244
4108
|
const { layoutId: s } = this.options;
|
|
4245
|
-
if (s)
|
|
4246
|
-
return this.root.sharedNodes.get(s);
|
|
4109
|
+
if (s) return this.root.sharedNodes.get(s);
|
|
4247
4110
|
}
|
|
4248
4111
|
promote({ needsReset: s, transition: a, preserveFollowOpacity: l } = {}) {
|
|
4249
4112
|
const u = this.getStack();
|
|
@@ -4255,12 +4118,10 @@ function go({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
4255
4118
|
}
|
|
4256
4119
|
resetSkewAndRotation() {
|
|
4257
4120
|
const { visualElement: s } = this.options;
|
|
4258
|
-
if (!s)
|
|
4259
|
-
return;
|
|
4121
|
+
if (!s) return;
|
|
4260
4122
|
let a = !1;
|
|
4261
4123
|
const { latestValues: l } = s;
|
|
4262
|
-
if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a)
|
|
4263
|
-
return;
|
|
4124
|
+
if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a) return;
|
|
4264
4125
|
const u = {};
|
|
4265
4126
|
l.z && ti("z", s, u, this.animationValues);
|
|
4266
4127
|
for (let c = 0; c < Qe.length; c++)
|
|
@@ -4271,8 +4132,7 @@ function go({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
4271
4132
|
s.scheduleRender();
|
|
4272
4133
|
}
|
|
4273
4134
|
applyProjectionStyles(s, a) {
|
|
4274
|
-
if (!this.instance || this.isSVG)
|
|
4275
|
-
return;
|
|
4135
|
+
if (!this.instance || this.isSVG) return;
|
|
4276
4136
|
if (!this.isVisible) {
|
|
4277
4137
|
s.visibility = "hidden";
|
|
4278
4138
|
return;
|
|
@@ -4296,18 +4156,14 @@ function go({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
4296
4156
|
if (s.transformOrigin = `${d.origin * 100}% ${f.origin * 100}% 0`, u.animationValues) {
|
|
4297
4157
|
var v, g;
|
|
4298
4158
|
s.opacity = u === this ? (v = (g = c.opacity) !== null && g !== void 0 ? g : this.latestValues.opacity) !== null && v !== void 0 ? v : 1 : this.preserveOpacity ? this.latestValues.opacity : c.opacityExit;
|
|
4299
|
-
} else
|
|
4300
|
-
s.opacity = u === this ? c.opacity !== void 0 ? c.opacity : "" : c.opacityExit !== void 0 ? c.opacityExit : 0;
|
|
4159
|
+
} else s.opacity = u === this ? c.opacity !== void 0 ? c.opacity : "" : c.opacityExit !== void 0 ? c.opacityExit : 0;
|
|
4301
4160
|
for (const b in le) {
|
|
4302
|
-
if (c[b] === void 0)
|
|
4303
|
-
continue;
|
|
4161
|
+
if (c[b] === void 0) continue;
|
|
4304
4162
|
const { correct: S, applyTo: C, isCSSVariable: A } = le[b], M = h === "none" ? c[b] : S(c[b], u);
|
|
4305
4163
|
if (C) {
|
|
4306
4164
|
const P = C.length;
|
|
4307
|
-
for (let y = 0; y < P; y++)
|
|
4308
|
-
|
|
4309
|
-
} else
|
|
4310
|
-
A ? this.options.visualElement.renderState.vars[b] = M : s[b] = M;
|
|
4165
|
+
for (let y = 0; y < P; y++) s[C[y]] = M;
|
|
4166
|
+
} else A ? this.options.visualElement.renderState.vars[b] = M : s[b] = M;
|
|
4311
4167
|
}
|
|
4312
4168
|
this.options.layoutId && (s.pointerEvents = u === this ? Ze(a == null ? void 0 : a.pointerEvents) || "" : "none");
|
|
4313
4169
|
}
|
|
@@ -4547,10 +4403,8 @@ function To(t) {
|
|
|
4547
4403
|
var wr = To("dragHorizontal"), Tr = To("dragVertical");
|
|
4548
4404
|
function rd(t) {
|
|
4549
4405
|
let e = !1;
|
|
4550
|
-
if (t === "y")
|
|
4551
|
-
|
|
4552
|
-
else if (t === "x")
|
|
4553
|
-
e = wr();
|
|
4406
|
+
if (t === "y") e = Tr();
|
|
4407
|
+
else if (t === "x") e = wr();
|
|
4554
4408
|
else {
|
|
4555
4409
|
const i = wr(), n = Tr();
|
|
4556
4410
|
i && n ? e = () => {
|
|
@@ -4627,14 +4481,12 @@ var Vr = /* @__PURE__ */ new Set(["auto", "scroll"]), So = class {
|
|
|
4627
4481
|
}, this.onWindowScroll = () => {
|
|
4628
4482
|
this.handleScroll(window);
|
|
4629
4483
|
}, this.updatePoint = () => {
|
|
4630
|
-
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
4631
|
-
return;
|
|
4484
|
+
if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return;
|
|
4632
4485
|
const c = ni(this.lastMoveEventInfo, this.history), h = this.startEvent !== null, d = hd(c.offset, {
|
|
4633
4486
|
x: 0,
|
|
4634
4487
|
y: 0
|
|
4635
4488
|
}) >= 3;
|
|
4636
|
-
if (!h && !d)
|
|
4637
|
-
return;
|
|
4489
|
+
if (!h && !d) return;
|
|
4638
4490
|
const { point: f } = c, { timestamp: v } = $;
|
|
4639
4491
|
this.history.push(m(m({}, f), {}, { timestamp: v }));
|
|
4640
4492
|
const { onStart: g, onMove: b } = this.handlers;
|
|
@@ -4644,12 +4496,10 @@ var Vr = /* @__PURE__ */ new Set(["auto", "scroll"]), So = class {
|
|
|
4644
4496
|
}, this.handlePointerUp = (c, h) => {
|
|
4645
4497
|
this.end();
|
|
4646
4498
|
const { onEnd: d, onSessionEnd: f, resumeAnimation: v } = this.handlers;
|
|
4647
|
-
if ((this.dragSnapToOrigin || !this.startEvent) && v && v(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
4648
|
-
return;
|
|
4499
|
+
if ((this.dragSnapToOrigin || !this.startEvent) && v && v(), !(this.lastMoveEvent && this.lastMoveEventInfo)) return;
|
|
4649
4500
|
const g = ni(c.type === "pointercancel" ? this.lastMoveEventInfo : ii(h, this.transformPagePoint), this.history);
|
|
4650
4501
|
this.startEvent && d && d(c, g), f && f(c, g);
|
|
4651
|
-
}, !wo(t))
|
|
4652
|
-
return;
|
|
4502
|
+
}, !wo(t)) return;
|
|
4653
4503
|
this.dragSnapToOrigin = r, this.handlers = e, this.transformPagePoint = i, this.contextWindow = n || window;
|
|
4654
4504
|
const s = ii(qi(t), this.transformPagePoint), { point: a } = s, { timestamp: l } = $;
|
|
4655
4505
|
this.history = [m(m({}, a), {}, { timestamp: l })];
|
|
@@ -4681,8 +4531,7 @@ var Vr = /* @__PURE__ */ new Set(["auto", "scroll"]), So = class {
|
|
|
4681
4531
|
}
|
|
4682
4532
|
handleScroll(t) {
|
|
4683
4533
|
const e = this.scrollPositions.get(t);
|
|
4684
|
-
if (!e)
|
|
4685
|
-
return;
|
|
4534
|
+
if (!e) return;
|
|
4686
4535
|
const i = t === window, n = i ? {
|
|
4687
4536
|
x: window.scrollX,
|
|
4688
4537
|
y: window.scrollY
|
|
@@ -4727,26 +4576,23 @@ function Ao(t) {
|
|
|
4727
4576
|
return t[t.length - 1];
|
|
4728
4577
|
}
|
|
4729
4578
|
function fd(t, e) {
|
|
4730
|
-
if (t.length < 2)
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
};
|
|
4579
|
+
if (t.length < 2) return {
|
|
4580
|
+
x: 0,
|
|
4581
|
+
y: 0
|
|
4582
|
+
};
|
|
4735
4583
|
let i = t.length - 1, n = null;
|
|
4736
4584
|
const r = Ao(t);
|
|
4737
4585
|
for (; i >= 0 && (n = t[i], !(r.timestamp - n.timestamp > it(e))); )
|
|
4738
4586
|
i--;
|
|
4739
|
-
if (!n)
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
};
|
|
4587
|
+
if (!n) return {
|
|
4588
|
+
x: 0,
|
|
4589
|
+
y: 0
|
|
4590
|
+
};
|
|
4744
4591
|
const o = J(r.timestamp - n.timestamp);
|
|
4745
|
-
if (o === 0)
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
};
|
|
4592
|
+
if (o === 0) return {
|
|
4593
|
+
x: 0,
|
|
4594
|
+
y: 0
|
|
4595
|
+
};
|
|
4750
4596
|
const s = {
|
|
4751
4597
|
x: (r.x - n.x) / o,
|
|
4752
4598
|
y: (r.y - n.y) / o
|
|
@@ -4771,8 +4617,7 @@ function md(t) {
|
|
|
4771
4617
|
}
|
|
4772
4618
|
function Dr(t, e) {
|
|
4773
4619
|
const i = t.getValue("willChange");
|
|
4774
|
-
if (md(i))
|
|
4775
|
-
return i.add(e);
|
|
4620
|
+
if (md(i)) return i.add(e);
|
|
4776
4621
|
}
|
|
4777
4622
|
function Po({ top: t, left: e, right: i, bottom: n }) {
|
|
4778
4623
|
return {
|
|
@@ -4787,8 +4632,7 @@ function Po({ top: t, left: e, right: i, bottom: n }) {
|
|
|
4787
4632
|
};
|
|
4788
4633
|
}
|
|
4789
4634
|
function vd(t, e) {
|
|
4790
|
-
if (!e)
|
|
4791
|
-
return t;
|
|
4635
|
+
if (!e) return t;
|
|
4792
4636
|
const i = e({
|
|
4793
4637
|
x: t.left,
|
|
4794
4638
|
y: t.top
|
|
@@ -4854,8 +4698,7 @@ var wd = /* @__PURE__ */ new WeakMap(), Td = class {
|
|
|
4854
4698
|
}), d && L.postRender(() => d(l, u)), Dr(this.visualElement, "transform"), this.visualElement.state.setActive("whileDrag", !0));
|
|
4855
4699
|
}, r = (l, u) => {
|
|
4856
4700
|
const { dragPropagation: c, dragDirectionLock: h, onDirectionLock: d, onDrag: f } = this.getProps();
|
|
4857
|
-
if (!c && !this.openGlobalLock)
|
|
4858
|
-
return;
|
|
4701
|
+
if (!c && !this.openGlobalLock) return;
|
|
4859
4702
|
const { offset: v } = u;
|
|
4860
4703
|
if (h && this.currentDirection === null) {
|
|
4861
4704
|
this.currentDirection = Sd(v), this.currentDirection !== null && d && d(this.currentDirection);
|
|
@@ -4881,8 +4724,7 @@ var wd = /* @__PURE__ */ new WeakMap(), Td = class {
|
|
|
4881
4724
|
}
|
|
4882
4725
|
stop(t, e) {
|
|
4883
4726
|
const i = this.isDragging;
|
|
4884
|
-
if (this.cancel(), !i)
|
|
4885
|
-
return;
|
|
4727
|
+
if (this.cancel(), !i) return;
|
|
4886
4728
|
const { velocity: n } = e;
|
|
4887
4729
|
this.startAnimation(n);
|
|
4888
4730
|
const { onDragEnd: r } = this.getProps();
|
|
@@ -4897,8 +4739,7 @@ var wd = /* @__PURE__ */ new WeakMap(), Td = class {
|
|
|
4897
4739
|
}
|
|
4898
4740
|
updateAxis(t, e, i) {
|
|
4899
4741
|
const { drag: n } = this.getProps();
|
|
4900
|
-
if (!i || !Se(t, n, this.currentDirection))
|
|
4901
|
-
return;
|
|
4742
|
+
if (!i || !Se(t, n, this.currentDirection)) return;
|
|
4902
4743
|
const r = this.getAxisMotionValue(t);
|
|
4903
4744
|
let o = this.originPoint[t] + i[t];
|
|
4904
4745
|
this.constraints && this.constraints[t] && (o = sd(o, this.constraints[t], this.elastic[t])), r.set(o);
|
|
@@ -4912,13 +4753,11 @@ var wd = /* @__PURE__ */ new WeakMap(), Td = class {
|
|
|
4912
4753
|
}
|
|
4913
4754
|
resolveRefConstraints() {
|
|
4914
4755
|
const { dragConstraints: t, onMeasureDragConstraints: e } = this.getProps();
|
|
4915
|
-
if (!t || !te(t))
|
|
4916
|
-
return !1;
|
|
4756
|
+
if (!t || !te(t)) return !1;
|
|
4917
4757
|
const i = t;
|
|
4918
4758
|
ze(i !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
|
|
4919
4759
|
const { projection: n } = this.visualElement;
|
|
4920
|
-
if (!n || !n.layout)
|
|
4921
|
-
return !1;
|
|
4760
|
+
if (!n || !n.layout) return !1;
|
|
4922
4761
|
const r = bd(i, n.root, this.visualElement.getTransformPagePoint());
|
|
4923
4762
|
let o = ud(n.layout.layoutBox, r);
|
|
4924
4763
|
if (e) {
|
|
@@ -4929,8 +4768,7 @@ var wd = /* @__PURE__ */ new WeakMap(), Td = class {
|
|
|
4929
4768
|
}
|
|
4930
4769
|
startAnimation(t) {
|
|
4931
4770
|
const { drag: e, dragMomentum: i, dragElastic: n, dragTransition: r, dragSnapToOrigin: o, onDragTransitionEnd: s } = this.getProps(), a = this.constraints || {}, l = st((u) => {
|
|
4932
|
-
if (!Se(u, e, this.currentDirection))
|
|
4933
|
-
return;
|
|
4771
|
+
if (!Se(u, e, this.currentDirection)) return;
|
|
4934
4772
|
let c = a && a[u] || {};
|
|
4935
4773
|
o && (c = {
|
|
4936
4774
|
min: 0,
|
|
@@ -4973,8 +4811,7 @@ var wd = /* @__PURE__ */ new WeakMap(), Td = class {
|
|
|
4973
4811
|
snapToCursor(t) {
|
|
4974
4812
|
st((e) => {
|
|
4975
4813
|
const { drag: i } = this.getProps();
|
|
4976
|
-
if (!Se(e, i, this.currentDirection))
|
|
4977
|
-
return;
|
|
4814
|
+
if (!Se(e, i, this.currentDirection)) return;
|
|
4978
4815
|
const { projection: n } = this.visualElement, r = this.getAxisMotionValue(e);
|
|
4979
4816
|
if (n && n.layout) {
|
|
4980
4817
|
const { min: o, max: s } = n.layout.layoutBox[e];
|
|
@@ -4983,11 +4820,9 @@ var wd = /* @__PURE__ */ new WeakMap(), Td = class {
|
|
|
4983
4820
|
});
|
|
4984
4821
|
}
|
|
4985
4822
|
scalePositionWithinConstraints() {
|
|
4986
|
-
if (!this.visualElement.current)
|
|
4987
|
-
return;
|
|
4823
|
+
if (!this.visualElement.current) return;
|
|
4988
4824
|
const { drag: t, dragConstraints: e } = this.getProps(), { projection: i } = this.visualElement;
|
|
4989
|
-
if (!te(e) || !i || !this.constraints)
|
|
4990
|
-
return;
|
|
4825
|
+
if (!te(e) || !i || !this.constraints) return;
|
|
4991
4826
|
this.stopAnimation();
|
|
4992
4827
|
const n = {
|
|
4993
4828
|
x: 0,
|
|
@@ -5005,15 +4840,13 @@ var wd = /* @__PURE__ */ new WeakMap(), Td = class {
|
|
|
5005
4840
|
});
|
|
5006
4841
|
const { transformTemplate: r } = this.visualElement.getProps();
|
|
5007
4842
|
this.visualElement.current.style.transform = r ? r({}, "") : "none", i.root && i.root.updateScroll(), i.updateLayout(), this.resolveConstraints(), st((o) => {
|
|
5008
|
-
if (!Se(o, t, null))
|
|
5009
|
-
return;
|
|
4843
|
+
if (!Se(o, t, null)) return;
|
|
5010
4844
|
const s = this.getAxisMotionValue(o), { min: a, max: l } = this.constraints[o];
|
|
5011
4845
|
s.set(B(a, l, n[o]));
|
|
5012
4846
|
});
|
|
5013
4847
|
}
|
|
5014
4848
|
addListeners() {
|
|
5015
|
-
if (!this.visualElement.current)
|
|
5016
|
-
return;
|
|
4849
|
+
if (!this.visualElement.current) return;
|
|
5017
4850
|
wd.set(this.visualElement, this);
|
|
5018
4851
|
const t = this.visualElement.current, e = re(t, "pointerdown", (a) => {
|
|
5019
4852
|
const { drag: l, dragListener: u = !0 } = this.getProps();
|
|
@@ -5100,8 +4933,7 @@ var Ad = class extends mt {
|
|
|
5100
4933
|
}
|
|
5101
4934
|
getSnapshot(t, e) {
|
|
5102
4935
|
const i = this.state.visualElement.projection, { drag: n, layoutDependency: r, layout: o, layoutId: s } = t;
|
|
5103
|
-
if (!i || !o && !s && !n)
|
|
5104
|
-
return;
|
|
4936
|
+
if (!i || !o && !s && !n) return;
|
|
5105
4937
|
qt = !0;
|
|
5106
4938
|
const a = this.state.options;
|
|
5107
4939
|
(n || a.layoutDependency !== r || r === void 0 || Le(e) && i.isPresent !== e) && i.willUpdate(), Le(e) && e !== i.isPresent && (i.isPresent = e, e ? i.promote() : i.relegate());
|
|
@@ -5440,11 +5272,9 @@ function Od(t) {
|
|
|
5440
5272
|
}
|
|
5441
5273
|
var Id = /* @__PURE__ */ new Map(), Fd = /* @__PURE__ */ new Map();
|
|
5442
5274
|
function _d(t) {
|
|
5443
|
-
if (!Array.isArray(t))
|
|
5444
|
-
return [t];
|
|
5275
|
+
if (!Array.isArray(t)) return [t];
|
|
5445
5276
|
const e = [];
|
|
5446
|
-
for (const i of t)
|
|
5447
|
-
Array.isArray(i) ? e.push(...i) : e.push(i);
|
|
5277
|
+
for (const i of t) Array.isArray(i) ? e.push(...i) : e.push(i);
|
|
5448
5278
|
return e;
|
|
5449
5279
|
}
|
|
5450
5280
|
var Nd = [
|
|
@@ -5454,21 +5284,17 @@ var Nd = [
|
|
|
5454
5284
|
];
|
|
5455
5285
|
function zd(t, e, i) {
|
|
5456
5286
|
var n, r;
|
|
5457
|
-
if (typeof t == "string" && Nd.includes(t))
|
|
5458
|
-
return $r(t, e);
|
|
5287
|
+
if (typeof t == "string" && Nd.includes(t)) return $r(t, e);
|
|
5459
5288
|
if (t === "template") {
|
|
5460
|
-
if (!i.default)
|
|
5461
|
-
return null;
|
|
5289
|
+
if (!i.default) return null;
|
|
5462
5290
|
const o = _d(i.default()), s = o.findIndex((c) => c.type !== Go);
|
|
5463
|
-
if (s === -1)
|
|
5464
|
-
return o;
|
|
5291
|
+
if (s === -1) return o;
|
|
5465
5292
|
const a = o[s];
|
|
5466
5293
|
(n = a.props) == null || delete n.ref;
|
|
5467
5294
|
const l = a.props ? Zo(e, a.props) : e;
|
|
5468
5295
|
e.class && ((r = a.props) != null && r.class) && delete a.props.class;
|
|
5469
5296
|
const u = Wo(a, l);
|
|
5470
|
-
for (const c in l)
|
|
5471
|
-
c.startsWith("on") && (u.props || (u.props = {}), u.props[c] = l[c]);
|
|
5297
|
+
for (const c in l) c.startsWith("on") && (u.props || (u.props = {}), u.props[c] = l[c]);
|
|
5472
5298
|
return o.length === 1 ? u : (o[s] = u, o);
|
|
5473
5299
|
}
|
|
5474
5300
|
return null;
|
|
@@ -5476,8 +5302,7 @@ function zd(t, e, i) {
|
|
|
5476
5302
|
function Br(t, e = {}) {
|
|
5477
5303
|
var i;
|
|
5478
5304
|
const n = typeof t == "string", r = n ? t : t.name || "", o = ((i = e.features) == null ? void 0 : i.length) > 0 ? Id : Fd;
|
|
5479
|
-
if (n && (o != null && o.has(t)))
|
|
5480
|
-
return o.get(t);
|
|
5305
|
+
if (n && (o != null && o.has(t))) return o.get(t);
|
|
5481
5306
|
const s = Gr({
|
|
5482
5307
|
inheritAttrs: !1,
|
|
5483
5308
|
props: m(m({}, jd), {}, {
|
|
@@ -5497,9 +5322,7 @@ function Br(t, e = {}) {
|
|
|
5497
5322
|
const f = h.element;
|
|
5498
5323
|
if ((typeof a.as != "object" || a.asChild) && f) {
|
|
5499
5324
|
const { style: v } = c();
|
|
5500
|
-
if (v)
|
|
5501
|
-
for (const [g, b] of Object.entries(v))
|
|
5502
|
-
f.style[g] = b;
|
|
5325
|
+
if (v) for (const [g, b] of Object.entries(v)) f.style[g] = b;
|
|
5503
5326
|
}
|
|
5504
5327
|
}
|
|
5505
5328
|
return () => {
|
|
@@ -5518,29 +5341,21 @@ function Ud(t = []) {
|
|
|
5518
5341
|
var Co = Ud(Cd), Hf = Co.create("div");
|
|
5519
5342
|
function Vo(t) {
|
|
5520
5343
|
var e, i, n = "";
|
|
5521
|
-
if (typeof t == "string" || typeof t == "number")
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
for (e = 0; e < r; e++)
|
|
5527
|
-
t[e] && (i = Vo(t[e])) && (n && (n += " "), n += i);
|
|
5528
|
-
} else
|
|
5529
|
-
for (i in t)
|
|
5530
|
-
t[i] && (n && (n += " "), n += i);
|
|
5344
|
+
if (typeof t == "string" || typeof t == "number") n += t;
|
|
5345
|
+
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
5346
|
+
var r = t.length;
|
|
5347
|
+
for (e = 0; e < r; e++) t[e] && (i = Vo(t[e])) && (n && (n += " "), n += i);
|
|
5348
|
+
} else for (i in t) t[i] && (n && (n += " "), n += i);
|
|
5531
5349
|
return n;
|
|
5532
5350
|
}
|
|
5533
5351
|
function Gd() {
|
|
5534
|
-
for (var t, e, i = 0, n = "", r = arguments.length; i < r; i++)
|
|
5535
|
-
(t = arguments[i]) && (e = Vo(t)) && (n && (n += " "), n += e);
|
|
5352
|
+
for (var t, e, i = 0, n = "", r = arguments.length; i < r; i++) (t = arguments[i]) && (e = Vo(t)) && (n && (n += " "), n += e);
|
|
5536
5353
|
return n;
|
|
5537
5354
|
}
|
|
5538
5355
|
var $d = (t, e) => {
|
|
5539
5356
|
const i = new Array(t.length + e.length);
|
|
5540
|
-
for (let n = 0; n < t.length; n++)
|
|
5541
|
-
|
|
5542
|
-
for (let n = 0; n < e.length; n++)
|
|
5543
|
-
i[t.length + n] = e[n];
|
|
5357
|
+
for (let n = 0; n < t.length; n++) i[n] = t[n];
|
|
5358
|
+
for (let n = 0; n < e.length; n++) i[t.length + n] = e[n];
|
|
5544
5359
|
return i;
|
|
5545
5360
|
}, Wd = (t, e) => ({
|
|
5546
5361
|
classGroupId: t,
|
|
@@ -5553,8 +5368,7 @@ var $d = (t, e) => {
|
|
|
5553
5368
|
const e = Hd(t), { conflictingClassGroups: i, conflictingClassGroupModifiers: n } = t;
|
|
5554
5369
|
return {
|
|
5555
5370
|
getClassGroupId: (s) => {
|
|
5556
|
-
if (s.startsWith("[") && s.endsWith("]"))
|
|
5557
|
-
return Xd(s);
|
|
5371
|
+
if (s.startsWith("[") && s.endsWith("]")) return Xd(s);
|
|
5558
5372
|
const a = s.split(Ne), l = a[0] === "" && a.length > 1 ? 1 : 0;
|
|
5559
5373
|
return Mo(a, l, e);
|
|
5560
5374
|
},
|
|
@@ -5567,22 +5381,18 @@ var $d = (t, e) => {
|
|
|
5567
5381
|
}
|
|
5568
5382
|
};
|
|
5569
5383
|
}, Mo = (t, e, i) => {
|
|
5570
|
-
if (t.length - e === 0)
|
|
5571
|
-
return i.classGroupId;
|
|
5384
|
+
if (t.length - e === 0) return i.classGroupId;
|
|
5572
5385
|
const n = t[e], r = i.nextPart.get(n);
|
|
5573
5386
|
if (r) {
|
|
5574
5387
|
const l = Mo(t, e + 1, r);
|
|
5575
|
-
if (l)
|
|
5576
|
-
return l;
|
|
5388
|
+
if (l) return l;
|
|
5577
5389
|
}
|
|
5578
5390
|
const o = i.validators;
|
|
5579
|
-
if (o === null)
|
|
5580
|
-
return;
|
|
5391
|
+
if (o === null) return;
|
|
5581
5392
|
const s = e === 0 ? t.join(Ne) : t.slice(e).join(Ne), a = o.length;
|
|
5582
5393
|
for (let l = 0; l < a; l++) {
|
|
5583
5394
|
const u = o[l];
|
|
5584
|
-
if (u.validator(s))
|
|
5585
|
-
return u.classGroupId;
|
|
5395
|
+
if (u.validator(s)) return u.classGroupId;
|
|
5586
5396
|
}
|
|
5587
5397
|
}, Xd = (t) => t.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
5588
5398
|
const e = t.slice(1, -1), i = e.indexOf(":"), n = e.slice(0, i);
|
|
@@ -5638,13 +5448,12 @@ var $d = (t, e) => {
|
|
|
5638
5448
|
}
|
|
5639
5449
|
return i;
|
|
5640
5450
|
}, ef = (t) => "isThemeGetter" in t && t.isThemeGetter === !0, nf = (t) => {
|
|
5641
|
-
if (t < 1)
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
};
|
|
5451
|
+
if (t < 1) return {
|
|
5452
|
+
get: () => {
|
|
5453
|
+
},
|
|
5454
|
+
set: () => {
|
|
5455
|
+
}
|
|
5456
|
+
};
|
|
5648
5457
|
let e = 0, i = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
|
|
5649
5458
|
const r = (o, s) => {
|
|
5650
5459
|
i[o] = s, e++, e > t && (e = 0, n = i, i = /* @__PURE__ */ Object.create(null));
|
|
@@ -5652,8 +5461,7 @@ var $d = (t, e) => {
|
|
|
5652
5461
|
return {
|
|
5653
5462
|
get(o) {
|
|
5654
5463
|
let s = i[o];
|
|
5655
|
-
if (s !== void 0)
|
|
5656
|
-
return s;
|
|
5464
|
+
if (s !== void 0) return s;
|
|
5657
5465
|
if ((s = n[o]) !== void 0)
|
|
5658
5466
|
return r(o, s), s;
|
|
5659
5467
|
},
|
|
@@ -5725,9 +5533,7 @@ var $d = (t, e) => {
|
|
|
5725
5533
|
postfixLookupClassGroupIds: lf(t)
|
|
5726
5534
|
}, Yd(t)), lf = (t) => {
|
|
5727
5535
|
const e = /* @__PURE__ */ Object.create(null), i = t.postfixLookupClassGroups;
|
|
5728
|
-
if (i)
|
|
5729
|
-
for (let n = 0; n < i.length; n++)
|
|
5730
|
-
e[i[n]] = !0;
|
|
5536
|
+
if (i) for (let n = 0; n < i.length; n++) e[i[n]] = !0;
|
|
5731
5537
|
return e;
|
|
5732
5538
|
}, uf = /\s+/, cf = (t, e) => {
|
|
5733
5539
|
const { parseClassName: i, getClassGroupId: n, getConflictingClassGroupIds: r, sortModifiers: o, postfixLookupClassGroupIds: s } = e, a = [], l = t.trim().split(uf);
|
|
@@ -5743,8 +5549,7 @@ var $d = (t, e) => {
|
|
|
5743
5549
|
C = n(g.substring(0, b));
|
|
5744
5550
|
const V = C && s[C] ? n(g) : void 0;
|
|
5745
5551
|
V && V !== C && (C = V, S = !1);
|
|
5746
|
-
} else
|
|
5747
|
-
C = n(g);
|
|
5552
|
+
} else C = n(g);
|
|
5748
5553
|
if (!C) {
|
|
5749
5554
|
if (!S) {
|
|
5750
5555
|
u = h + (u.length > 0 ? " " + u : u);
|
|
@@ -5757,8 +5562,7 @@ var $d = (t, e) => {
|
|
|
5757
5562
|
S = !1;
|
|
5758
5563
|
}
|
|
5759
5564
|
const A = f.length === 0 ? "" : f.length === 1 ? f[0] : o(f).join(":"), M = v ? A + Ai : A, P = M + C;
|
|
5760
|
-
if (a.indexOf(P) > -1)
|
|
5761
|
-
continue;
|
|
5565
|
+
if (a.indexOf(P) > -1) continue;
|
|
5762
5566
|
a.push(P);
|
|
5763
5567
|
const y = r(C, S);
|
|
5764
5568
|
for (let V = 0; V < y.length; ++V) {
|
|
@@ -5770,15 +5574,12 @@ var $d = (t, e) => {
|
|
|
5770
5574
|
return u;
|
|
5771
5575
|
}, hf = (...t) => {
|
|
5772
5576
|
let e = 0, i, n, r = "";
|
|
5773
|
-
for (; e < t.length; )
|
|
5774
|
-
(i = t[e++]) && (n = Ro(i)) && (r && (r += " "), r += n);
|
|
5577
|
+
for (; e < t.length; ) (i = t[e++]) && (n = Ro(i)) && (r && (r += " "), r += n);
|
|
5775
5578
|
return r;
|
|
5776
5579
|
}, Ro = (t) => {
|
|
5777
|
-
if (typeof t == "string")
|
|
5778
|
-
return t;
|
|
5580
|
+
if (typeof t == "string") return t;
|
|
5779
5581
|
let e, i = "";
|
|
5780
|
-
for (let n = 0; n < t.length; n++)
|
|
5781
|
-
t[n] && (e = Ro(t[n])) && (i && (i += " "), i += e);
|
|
5582
|
+
for (let n = 0; n < t.length; n++) t[n] && (e = Ro(t[n])) && (i && (i += " "), i += e);
|
|
5782
5583
|
return i;
|
|
5783
5584
|
}, Fr = (t, ...e) => {
|
|
5784
5585
|
let i, n, r, o;
|
|
@@ -5787,8 +5588,7 @@ var $d = (t, e) => {
|
|
|
5787
5588
|
return i = af(u), n = i.cache.get, r = i.cache.set, o = a, a(l);
|
|
5788
5589
|
}, a = (l) => {
|
|
5789
5590
|
const u = n(l);
|
|
5790
|
-
if (u)
|
|
5791
|
-
return u;
|
|
5591
|
+
if (u) return u;
|
|
5792
5592
|
const c = cf(l, i);
|
|
5793
5593
|
return r(l, c), c;
|
|
5794
5594
|
};
|
|
@@ -7280,13 +7080,9 @@ var $d = (t, e) => {
|
|
|
7280
7080
|
}, Lf = (t, { cacheSize: e, prefix: i, experimentalParseClassName: n, extend: r = {}, override: o = {} }) => (jt(t, "cacheSize", e), jt(t, "prefix", i), jt(t, "experimentalParseClassName", n), Ee(t.theme, o.theme), Ee(t.classGroups, o.classGroups), Ee(t.conflictingClassGroups, o.conflictingClassGroups), Ee(t.conflictingClassGroupModifiers, o.conflictingClassGroupModifiers), jt(t, "postfixLookupClassGroups", o.postfixLookupClassGroups), jt(t, "orderSensitiveModifiers", o.orderSensitiveModifiers), Ce(t.theme, r.theme), Ce(t.classGroups, r.classGroups), Ce(t.conflictingClassGroups, r.conflictingClassGroups), Ce(t.conflictingClassGroupModifiers, r.conflictingClassGroupModifiers), Pi(t, r, "postfixLookupClassGroups"), Pi(t, r, "orderSensitiveModifiers"), t), jt = (t, e, i) => {
|
|
7281
7081
|
i !== void 0 && (t[e] = i);
|
|
7282
7082
|
}, Ee = (t, e) => {
|
|
7283
|
-
if (e)
|
|
7284
|
-
for (const i in e)
|
|
7285
|
-
jt(t, i, e[i]);
|
|
7083
|
+
if (e) for (const i in e) jt(t, i, e[i]);
|
|
7286
7084
|
}, Ce = (t, e) => {
|
|
7287
|
-
if (e)
|
|
7288
|
-
for (const i in e)
|
|
7289
|
-
Pi(t, e, i);
|
|
7085
|
+
if (e) for (const i in e) Pi(t, e, i);
|
|
7290
7086
|
}, Pi = (t, e, i) => {
|
|
7291
7087
|
const n = e[i];
|
|
7292
7088
|
n !== void 0 && (t[i] = t[i] ? t[i].concat(n) : n);
|
|
@@ -7378,13 +7174,11 @@ var Of = ["aria-label", "aria-disabled"], If = [
|
|
|
7378
7174
|
const p = r.items;
|
|
7379
7175
|
let k = y;
|
|
7380
7176
|
for (let R = 0; R < p.length; R++)
|
|
7381
|
-
if (k = (k + V + p.length) % p.length, !u(p[k]))
|
|
7382
|
-
return k;
|
|
7177
|
+
if (k = (k + V + p.length) % p.length, !u(p[k])) return k;
|
|
7383
7178
|
return y;
|
|
7384
7179
|
}, v = (y, V) => {
|
|
7385
7180
|
const p = r.items, k = p[V];
|
|
7386
|
-
if (!k || u(k))
|
|
7387
|
-
return;
|
|
7181
|
+
if (!k || u(k)) return;
|
|
7388
7182
|
let R;
|
|
7389
7183
|
switch (y.key) {
|
|
7390
7184
|
case "ArrowRight":
|
|
@@ -7404,8 +7198,7 @@ var Of = ["aria-label", "aria-disabled"], If = [
|
|
|
7404
7198
|
default:
|
|
7405
7199
|
return;
|
|
7406
7200
|
}
|
|
7407
|
-
if (R < 0 || R === V)
|
|
7408
|
-
return;
|
|
7201
|
+
if (R < 0 || R === V) return;
|
|
7409
7202
|
y.preventDefault();
|
|
7410
7203
|
const G = p[R];
|
|
7411
7204
|
if (G) {
|