quantum-component-library 1.4.45-qa.3 → 1.4.45-qa.5
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/{babel-vendor-Brd7V25k.js → babel-vendor-BOM86iTb.js} +71 -76
- package/dist/babel-vendor-cKvSpnBp.cjs +3 -0
- package/dist/components.cjs +1 -1
- package/dist/components.js +49 -49
- package/dist/{dnd-core-vendor-B9bDJoIO.js → dnd-core-vendor-LFMXiCD5.js} +2 -2
- package/dist/{dnd-core-vendor-B8SfRHAC.cjs → dnd-core-vendor-rqY4Q0Vq.cjs} +1 -1
- package/dist/{graphql-vendor-2jHffeBc.cjs → graphql-vendor-DRps04BT.cjs} +10 -10
- package/dist/{graphql-vendor-DZM4vSNi.js → graphql-vendor-DUv16c0G.js} +42 -42
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.js +1 -1
- package/dist/lodash-vendor-D5A6v3mw.cjs +1 -0
- package/dist/lodash-vendor-Dz4vW7Gd.js +1120 -0
- package/dist/providers.cjs +1 -1
- package/dist/providers.js +6 -6
- package/dist/quantum-component-library.css +1 -1
- package/dist/{react-dnd-vendor-CrTWIfyP.js → react-dnd-vendor-Cuc51Scz.js} +15 -15
- package/dist/{react-dnd-vendor-CMnbNCdx.cjs → react-dnd-vendor-FieaWO8Z.cjs} +1 -1
- package/dist/{react-select-vendor-Dt2A4G_u.js → react-select-vendor-BrXjJVof.js} +35 -35
- package/dist/{react-select-vendor-DwRVrD2f.cjs → react-select-vendor-CVxjkFXv.cjs} +1 -1
- package/dist/services.cjs +1 -1
- package/dist/services.js +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.js +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +18 -18
- package/dist/vendor-CPJGEWOn.cjs +45 -0
- package/dist/vendor-CoDHTSgb.js +7981 -0
- package/package.json +6 -6
- package/dist/babel-vendor-pl7onWh-.cjs +0 -3
- package/dist/framer-motion-vendor-BgJ2HqtS.cjs +0 -1
- package/dist/framer-motion-vendor-Cn84b4iY.js +0 -3285
- package/dist/lodash-vendor-Dkc3o8vE.cjs +0 -1
- package/dist/lodash-vendor-KQku4vKh.js +0 -1602
- package/dist/ui-vendor-BAkBLewK.cjs +0 -294
- package/dist/ui-vendor-DLN2xOTj.js +0 -10756
- package/dist/vendor-Br-qBXqd.cjs +0 -90
- package/dist/vendor-BvxNWBst.js +0 -11937
|
@@ -1,3285 +0,0 @@
|
|
|
1
|
-
import { _ as y, i as gt, n as Ie, a as de, p as V, b as er, d as at, s as Yt, e as Z, f as Be, g as M, h as fa, k as la, l as ca, m as va, o as da, q as ma, r as pa, t as ga, v as ha, w as ya, x as Pa, y as ba, z as Ta, A as xa, B as Aa, C as At, D as Pe, E as G, F as Zr, G as Va, H as Sa, I as K, J as Ca, K as Ea, L as La, M as wa, N as qr, O as J, P as be, Q as Ra, R as $r } from "./vendor-BvxNWBst.js";
|
|
2
|
-
import * as U from "react";
|
|
3
|
-
import Jr, { createContext as ht, useContext as O, useRef as $, useEffect as Q, useLayoutEffect as Da, useCallback as Qr, useMemo as wt, forwardRef as Ma, createElement as Fa, useState as Ia, cloneElement as Ba, Children as Oa, isValidElement as ja } from "react";
|
|
4
|
-
var et = function(t) {
|
|
5
|
-
return {
|
|
6
|
-
isEnabled: function(e) {
|
|
7
|
-
return t.some(function(r) {
|
|
8
|
-
return !!e[r];
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
}, Oe = {
|
|
13
|
-
measureLayout: et([
|
|
14
|
-
"layout",
|
|
15
|
-
"layoutId",
|
|
16
|
-
"drag",
|
|
17
|
-
"_layoutResetTransform"
|
|
18
|
-
]),
|
|
19
|
-
animation: et([
|
|
20
|
-
"animate",
|
|
21
|
-
"exit",
|
|
22
|
-
"variants",
|
|
23
|
-
"whileHover",
|
|
24
|
-
"whileTap",
|
|
25
|
-
"whileFocus",
|
|
26
|
-
"whileDrag"
|
|
27
|
-
]),
|
|
28
|
-
exit: et(["exit"]),
|
|
29
|
-
drag: et(["drag", "dragControls"]),
|
|
30
|
-
focus: et(["whileFocus"]),
|
|
31
|
-
hover: et(["whileHover", "onHoverStart", "onHoverEnd"]),
|
|
32
|
-
tap: et(["whileTap", "onTap", "onTapStart", "onTapCancel"]),
|
|
33
|
-
pan: et([
|
|
34
|
-
"onPan",
|
|
35
|
-
"onPanStart",
|
|
36
|
-
"onPanSessionStart",
|
|
37
|
-
"onPanEnd"
|
|
38
|
-
]),
|
|
39
|
-
layoutAnimation: et(["layout", "layoutId"])
|
|
40
|
-
};
|
|
41
|
-
function Ha(t) {
|
|
42
|
-
for (var e in t) {
|
|
43
|
-
var r = t[e];
|
|
44
|
-
r !== null && (Oe[e].Component = r);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
var kr = ht({ strict: !1 }), tn = Object.keys(Oe), _a = tn.length;
|
|
48
|
-
function Ua(t, e, r) {
|
|
49
|
-
var n = [], a = O(kr);
|
|
50
|
-
if (!e)
|
|
51
|
-
return null;
|
|
52
|
-
process.env.NODE_ENV !== "production" && r && a.strict && gt(!1, "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");
|
|
53
|
-
for (var i = 0; i < _a; i++) {
|
|
54
|
-
var o = tn[i], u = Oe[o], f = u.isEnabled, s = u.Component;
|
|
55
|
-
f(t) && s && n.push(U.createElement(s, y({ key: o }, t, { visualElement: e })));
|
|
56
|
-
}
|
|
57
|
-
return n;
|
|
58
|
-
}
|
|
59
|
-
var ae = ht({
|
|
60
|
-
transformPagePoint: function(t) {
|
|
61
|
-
return t;
|
|
62
|
-
},
|
|
63
|
-
isStatic: !1
|
|
64
|
-
}), ie = ht({});
|
|
65
|
-
function Na() {
|
|
66
|
-
return O(ie).visualElement;
|
|
67
|
-
}
|
|
68
|
-
var St = ht(null);
|
|
69
|
-
function Rt(t) {
|
|
70
|
-
var e = $(null);
|
|
71
|
-
return e.current === null && (e.current = t()), e.current;
|
|
72
|
-
}
|
|
73
|
-
function en() {
|
|
74
|
-
var t = O(St);
|
|
75
|
-
if (t === null)
|
|
76
|
-
return [!0, null];
|
|
77
|
-
var e = t.isPresent, r = t.onExitComplete, n = t.register, a = Xa();
|
|
78
|
-
Q(function() {
|
|
79
|
-
return n(a);
|
|
80
|
-
}, []);
|
|
81
|
-
var i = function() {
|
|
82
|
-
return r?.(a);
|
|
83
|
-
};
|
|
84
|
-
return !e && r ? [!1, i] : [!0];
|
|
85
|
-
}
|
|
86
|
-
function es() {
|
|
87
|
-
return rn(O(St));
|
|
88
|
-
}
|
|
89
|
-
function rn(t) {
|
|
90
|
-
return t === null ? !0 : t.isPresent;
|
|
91
|
-
}
|
|
92
|
-
var Ka = 0, Ya = function() {
|
|
93
|
-
return Ka++;
|
|
94
|
-
}, Xa = function() {
|
|
95
|
-
return Rt(Ya);
|
|
96
|
-
}, za = ht(null), jt = typeof window < "u", rr = jt ? Da : Q;
|
|
97
|
-
function Ga(t) {
|
|
98
|
-
var e = t.layoutId, r = O(za);
|
|
99
|
-
return r && e !== void 0 ? r + "-" + e : e;
|
|
100
|
-
}
|
|
101
|
-
function Wa(t, e, r, n) {
|
|
102
|
-
var a = O(ae), i = O(kr), o = Na(), u = O(St), f = Ga(r), s = $(void 0);
|
|
103
|
-
n || (n = i.renderer), !s.current && n && (s.current = n(t, {
|
|
104
|
-
visualState: e,
|
|
105
|
-
parent: o,
|
|
106
|
-
props: y(y({}, r), { layoutId: f }),
|
|
107
|
-
presenceId: u?.id,
|
|
108
|
-
blockInitialAnimation: u?.initial === !1
|
|
109
|
-
}));
|
|
110
|
-
var l = s.current;
|
|
111
|
-
return rr(function() {
|
|
112
|
-
l && (l.setProps(y(y(y({}, a), r), { layoutId: f })), l.isPresent = rn(u), l.isPresenceRoot = !o || o.presenceId !== u?.id, l.syncRender());
|
|
113
|
-
}), Q(function() {
|
|
114
|
-
var p;
|
|
115
|
-
l && ((p = l.animationState) === null || p === void 0 || p.animateChanges());
|
|
116
|
-
}), rr(function() {
|
|
117
|
-
return function() {
|
|
118
|
-
return l?.notifyUnmount();
|
|
119
|
-
};
|
|
120
|
-
}, []), l;
|
|
121
|
-
}
|
|
122
|
-
function Te(t) {
|
|
123
|
-
return typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
124
|
-
}
|
|
125
|
-
function Za(t, e, r) {
|
|
126
|
-
return Qr(
|
|
127
|
-
function(n) {
|
|
128
|
-
var a;
|
|
129
|
-
n && ((a = t.mount) === null || a === void 0 || a.call(t, n)), e && (n ? e.mount(n) : e.unmount()), r && (typeof r == "function" ? r(n) : Te(r) && (r.current = n));
|
|
130
|
-
},
|
|
131
|
-
/**
|
|
132
|
-
* Only pass a new ref callback to React if we've received a visual element
|
|
133
|
-
* factory. Otherwise we'll be mounting/remounting every time externalRef
|
|
134
|
-
* or other dependencies change.
|
|
135
|
-
*/
|
|
136
|
-
[e]
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
function nn(t) {
|
|
140
|
-
return Array.isArray(t);
|
|
141
|
-
}
|
|
142
|
-
function W(t) {
|
|
143
|
-
return typeof t == "string" || nn(t);
|
|
144
|
-
}
|
|
145
|
-
function qa(t) {
|
|
146
|
-
var e = {};
|
|
147
|
-
return t.forEachValue(function(r, n) {
|
|
148
|
-
return e[n] = r.get();
|
|
149
|
-
}), e;
|
|
150
|
-
}
|
|
151
|
-
function $a(t) {
|
|
152
|
-
var e = {};
|
|
153
|
-
return t.forEachValue(function(r, n) {
|
|
154
|
-
return e[n] = r.getVelocity();
|
|
155
|
-
}), e;
|
|
156
|
-
}
|
|
157
|
-
function an(t, e, r, n, a) {
|
|
158
|
-
var i;
|
|
159
|
-
return n === void 0 && (n = {}), a === void 0 && (a = {}), typeof e == "string" && (e = (i = t.variants) === null || i === void 0 ? void 0 : i[e]), typeof e == "function" ? e(r ?? t.custom, n, a) : e;
|
|
160
|
-
}
|
|
161
|
-
function oe(t, e, r) {
|
|
162
|
-
var n = t.getProps();
|
|
163
|
-
return an(n, e, r ?? n.custom, qa(t), $a(t));
|
|
164
|
-
}
|
|
165
|
-
function ue(t) {
|
|
166
|
-
var e;
|
|
167
|
-
return typeof ((e = t.animate) === null || e === void 0 ? void 0 : e.start) == "function" || W(t.initial) || W(t.animate) || W(t.whileHover) || W(t.whileDrag) || W(t.whileTap) || W(t.whileFocus) || W(t.exit);
|
|
168
|
-
}
|
|
169
|
-
function on(t) {
|
|
170
|
-
return !!(ue(t) || t.variants);
|
|
171
|
-
}
|
|
172
|
-
function Ja(t, e) {
|
|
173
|
-
if (ue(t)) {
|
|
174
|
-
var r = t.initial, n = t.animate;
|
|
175
|
-
return {
|
|
176
|
-
initial: r === !1 || W(r) ? r : void 0,
|
|
177
|
-
animate: W(n) ? n : void 0
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
return t.inherit !== !1 ? e : {};
|
|
181
|
-
}
|
|
182
|
-
function Qa(t, e) {
|
|
183
|
-
var r = Ja(t, O(ie)), n = r.initial, a = r.animate;
|
|
184
|
-
return wt(
|
|
185
|
-
function() {
|
|
186
|
-
return { initial: n, animate: a };
|
|
187
|
-
},
|
|
188
|
-
/**
|
|
189
|
-
* Only break memoisation in static mode
|
|
190
|
-
*/
|
|
191
|
-
e ? [
|
|
192
|
-
nr(n),
|
|
193
|
-
nr(a)
|
|
194
|
-
] : []
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
function nr(t) {
|
|
198
|
-
return Array.isArray(t) ? t.join(" ") : t;
|
|
199
|
-
}
|
|
200
|
-
function ka(t) {
|
|
201
|
-
var e = t.preloadedFeatures, r = t.createVisualElement, n = t.useRender, a = t.useVisualState, i = t.Component;
|
|
202
|
-
e && Ha(e);
|
|
203
|
-
function o(u, f) {
|
|
204
|
-
var s = O(ae).isStatic, l = null, p = Qa(u, s), c = a(u, s);
|
|
205
|
-
return !s && jt && (p.visualElement = Wa(i, c, u, r), l = Ua(u, p.visualElement, e)), U.createElement(
|
|
206
|
-
U.Fragment,
|
|
207
|
-
null,
|
|
208
|
-
U.createElement(ie.Provider, { value: p }, n(i, u, Za(c, p.visualElement, f), c, s)),
|
|
209
|
-
l
|
|
210
|
-
);
|
|
211
|
-
}
|
|
212
|
-
return Ma(o);
|
|
213
|
-
}
|
|
214
|
-
function ti(t) {
|
|
215
|
-
function e(n, a) {
|
|
216
|
-
return a === void 0 && (a = {}), ka(t(n, a));
|
|
217
|
-
}
|
|
218
|
-
var r = /* @__PURE__ */ new Map();
|
|
219
|
-
return new Proxy(e, {
|
|
220
|
-
/**
|
|
221
|
-
* Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
|
|
222
|
-
* The prop name is passed through as `key` and we can use that to generate a `motion`
|
|
223
|
-
* DOM component with that name.
|
|
224
|
-
*/
|
|
225
|
-
get: function(n, a) {
|
|
226
|
-
return r.has(a) || r.set(a, e(a)), r.get(a);
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
var ei = [
|
|
231
|
-
"animate",
|
|
232
|
-
"circle",
|
|
233
|
-
"defs",
|
|
234
|
-
"desc",
|
|
235
|
-
"ellipse",
|
|
236
|
-
"g",
|
|
237
|
-
"image",
|
|
238
|
-
"line",
|
|
239
|
-
"filter",
|
|
240
|
-
"marker",
|
|
241
|
-
"mask",
|
|
242
|
-
"metadata",
|
|
243
|
-
"path",
|
|
244
|
-
"pattern",
|
|
245
|
-
"polygon",
|
|
246
|
-
"polyline",
|
|
247
|
-
"rect",
|
|
248
|
-
"stop",
|
|
249
|
-
"svg",
|
|
250
|
-
"switch",
|
|
251
|
-
"symbol",
|
|
252
|
-
"text",
|
|
253
|
-
"tspan",
|
|
254
|
-
"use",
|
|
255
|
-
"view"
|
|
256
|
-
];
|
|
257
|
-
function je(t) {
|
|
258
|
-
return (
|
|
259
|
-
/**
|
|
260
|
-
* If it's not a string, it's a custom React component. Currently we only support
|
|
261
|
-
* HTML custom React components.
|
|
262
|
-
*/
|
|
263
|
-
typeof t != "string" || /**
|
|
264
|
-
* If it contains a dash, the element is a custom HTML webcomponent.
|
|
265
|
-
*/
|
|
266
|
-
t.includes("-") ? !1 : (
|
|
267
|
-
/**
|
|
268
|
-
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
269
|
-
*/
|
|
270
|
-
!!(ei.indexOf(t) > -1 || /**
|
|
271
|
-
* If it contains a capital letter, it's an SVG component
|
|
272
|
-
*/
|
|
273
|
-
/[A-Z]/.test(t))
|
|
274
|
-
)
|
|
275
|
-
);
|
|
276
|
-
}
|
|
277
|
-
var Et = {};
|
|
278
|
-
function ri(t) {
|
|
279
|
-
for (var e in t)
|
|
280
|
-
Et[e] = t[e];
|
|
281
|
-
}
|
|
282
|
-
var ni = ["", "X", "Y", "Z"], ai = ["translate", "scale", "rotate", "skew"], Dt = ["transformPerspective", "x", "y", "z"];
|
|
283
|
-
ai.forEach(function(t) {
|
|
284
|
-
return ni.forEach(function(e) {
|
|
285
|
-
return Dt.push(t + e);
|
|
286
|
-
});
|
|
287
|
-
});
|
|
288
|
-
function ii(t, e) {
|
|
289
|
-
return Dt.indexOf(t) - Dt.indexOf(e);
|
|
290
|
-
}
|
|
291
|
-
var oi = new Set(Dt);
|
|
292
|
-
function se(t) {
|
|
293
|
-
return oi.has(t);
|
|
294
|
-
}
|
|
295
|
-
var ui = /* @__PURE__ */ new Set(["originX", "originY", "originZ"]);
|
|
296
|
-
function un(t) {
|
|
297
|
-
return ui.has(t);
|
|
298
|
-
}
|
|
299
|
-
function sn(t, e) {
|
|
300
|
-
var r = e.layout, n = e.layoutId;
|
|
301
|
-
return se(t) || un(t) || (r || n !== void 0) && (!!Et[t] || t === "opacity");
|
|
302
|
-
}
|
|
303
|
-
var it = function(t) {
|
|
304
|
-
return t !== null && typeof t == "object" && t.getVelocity;
|
|
305
|
-
}, si = {
|
|
306
|
-
x: "translateX",
|
|
307
|
-
y: "translateY",
|
|
308
|
-
z: "translateZ",
|
|
309
|
-
transformPerspective: "perspective"
|
|
310
|
-
};
|
|
311
|
-
function fi(t, e, r, n) {
|
|
312
|
-
var a = t.transform, i = t.transformKeys, o = e.enableHardwareAcceleration, u = o === void 0 ? !0 : o, f = e.allowTransformNone, s = f === void 0 ? !0 : f, l = "";
|
|
313
|
-
i.sort(ii);
|
|
314
|
-
for (var p = !1, c = i.length, d = 0; d < c; d++) {
|
|
315
|
-
var v = i[d];
|
|
316
|
-
l += (si[v] || v) + "(" + a[v] + ") ", v === "z" && (p = !0);
|
|
317
|
-
}
|
|
318
|
-
return !p && u ? l += "translateZ(0)" : l = l.trim(), n ? l = n(a, r ? "" : l) : s && r && (l = "none"), l;
|
|
319
|
-
}
|
|
320
|
-
function li(t) {
|
|
321
|
-
var e = t.originX, r = e === void 0 ? "50%" : e, n = t.originY, a = n === void 0 ? "50%" : n, i = t.originZ, o = i === void 0 ? 0 : i;
|
|
322
|
-
return r + " " + a + " " + o;
|
|
323
|
-
}
|
|
324
|
-
function fn(t) {
|
|
325
|
-
return t.startsWith("--");
|
|
326
|
-
}
|
|
327
|
-
var ci = function(t, e) {
|
|
328
|
-
return e && typeof t == "number" ? e.transform(t) : t;
|
|
329
|
-
}, ar = y(y({}, Ie), { transform: Math.round }), ln = {
|
|
330
|
-
// Border props
|
|
331
|
-
borderWidth: V,
|
|
332
|
-
borderTopWidth: V,
|
|
333
|
-
borderRightWidth: V,
|
|
334
|
-
borderBottomWidth: V,
|
|
335
|
-
borderLeftWidth: V,
|
|
336
|
-
borderRadius: V,
|
|
337
|
-
radius: V,
|
|
338
|
-
borderTopLeftRadius: V,
|
|
339
|
-
borderTopRightRadius: V,
|
|
340
|
-
borderBottomRightRadius: V,
|
|
341
|
-
borderBottomLeftRadius: V,
|
|
342
|
-
// Positioning props
|
|
343
|
-
width: V,
|
|
344
|
-
maxWidth: V,
|
|
345
|
-
height: V,
|
|
346
|
-
maxHeight: V,
|
|
347
|
-
size: V,
|
|
348
|
-
top: V,
|
|
349
|
-
right: V,
|
|
350
|
-
bottom: V,
|
|
351
|
-
left: V,
|
|
352
|
-
// Spacing props
|
|
353
|
-
padding: V,
|
|
354
|
-
paddingTop: V,
|
|
355
|
-
paddingRight: V,
|
|
356
|
-
paddingBottom: V,
|
|
357
|
-
paddingLeft: V,
|
|
358
|
-
margin: V,
|
|
359
|
-
marginTop: V,
|
|
360
|
-
marginRight: V,
|
|
361
|
-
marginBottom: V,
|
|
362
|
-
marginLeft: V,
|
|
363
|
-
// Transform props
|
|
364
|
-
rotate: at,
|
|
365
|
-
rotateX: at,
|
|
366
|
-
rotateY: at,
|
|
367
|
-
rotateZ: at,
|
|
368
|
-
scale: Yt,
|
|
369
|
-
scaleX: Yt,
|
|
370
|
-
scaleY: Yt,
|
|
371
|
-
scaleZ: Yt,
|
|
372
|
-
skew: at,
|
|
373
|
-
skewX: at,
|
|
374
|
-
skewY: at,
|
|
375
|
-
distance: V,
|
|
376
|
-
translateX: V,
|
|
377
|
-
translateY: V,
|
|
378
|
-
translateZ: V,
|
|
379
|
-
x: V,
|
|
380
|
-
y: V,
|
|
381
|
-
z: V,
|
|
382
|
-
perspective: V,
|
|
383
|
-
transformPerspective: V,
|
|
384
|
-
opacity: de,
|
|
385
|
-
originX: er,
|
|
386
|
-
originY: er,
|
|
387
|
-
originZ: V,
|
|
388
|
-
// Misc
|
|
389
|
-
zIndex: ar,
|
|
390
|
-
// SVG
|
|
391
|
-
fillOpacity: de,
|
|
392
|
-
strokeOpacity: de,
|
|
393
|
-
numOctaves: ar
|
|
394
|
-
};
|
|
395
|
-
function He(t, e, r, n, a, i, o, u) {
|
|
396
|
-
var f, s = t.style, l = t.vars, p = t.transform, c = t.transformKeys, d = t.transformOrigin;
|
|
397
|
-
c.length = 0;
|
|
398
|
-
var v = !1, P = !1, m = !0;
|
|
399
|
-
for (var h in e) {
|
|
400
|
-
var A = e[h];
|
|
401
|
-
if (fn(h)) {
|
|
402
|
-
l[h] = A;
|
|
403
|
-
continue;
|
|
404
|
-
}
|
|
405
|
-
var L = ln[h], D = ci(A, L);
|
|
406
|
-
if (se(h)) {
|
|
407
|
-
if (v = !0, p[h] = D, c.push(h), !m)
|
|
408
|
-
continue;
|
|
409
|
-
A !== ((f = L.default) !== null && f !== void 0 ? f : 0) && (m = !1);
|
|
410
|
-
} else if (un(h))
|
|
411
|
-
d[h] = D, P = !0;
|
|
412
|
-
else if (r?.isHydrated && n?.isHydrated && Et[h]) {
|
|
413
|
-
var C = Et[h].process(A, n, r), x = Et[h].applyTo;
|
|
414
|
-
if (x)
|
|
415
|
-
for (var w = x.length, E = 0; E < w; E++)
|
|
416
|
-
s[x[E]] = C;
|
|
417
|
-
else
|
|
418
|
-
s[h] = C;
|
|
419
|
-
} else
|
|
420
|
-
s[h] = D;
|
|
421
|
-
}
|
|
422
|
-
n && r && o && u ? (s.transform = o(n.deltaFinal, n.treeScale, v ? p : void 0), i && (s.transform = i(p, s.transform)), s.transformOrigin = u(n)) : (v && (s.transform = fi(t, a, m, i)), P && (s.transformOrigin = li(d)));
|
|
423
|
-
}
|
|
424
|
-
var _e = function() {
|
|
425
|
-
return {
|
|
426
|
-
style: {},
|
|
427
|
-
transform: {},
|
|
428
|
-
transformKeys: [],
|
|
429
|
-
transformOrigin: {},
|
|
430
|
-
vars: {}
|
|
431
|
-
};
|
|
432
|
-
};
|
|
433
|
-
function cn(t, e, r) {
|
|
434
|
-
for (var n in e)
|
|
435
|
-
!it(e[n]) && !sn(n, r) && (t[n] = e[n]);
|
|
436
|
-
}
|
|
437
|
-
function vi(t, e, r) {
|
|
438
|
-
var n = t.transformTemplate;
|
|
439
|
-
return wt(function() {
|
|
440
|
-
var a = _e();
|
|
441
|
-
He(a, e, void 0, void 0, { enableHardwareAcceleration: !r }, n);
|
|
442
|
-
var i = a.vars, o = a.style;
|
|
443
|
-
return y(y({}, i), o);
|
|
444
|
-
}, [e]);
|
|
445
|
-
}
|
|
446
|
-
function di(t, e, r) {
|
|
447
|
-
var n = t.style || {}, a = {};
|
|
448
|
-
return cn(a, n, t), Object.assign(a, vi(t, e, r)), t.transformValues && (a = t.transformValues(a)), a;
|
|
449
|
-
}
|
|
450
|
-
function mi(t, e, r) {
|
|
451
|
-
var n = {}, a = di(t, e, r);
|
|
452
|
-
return t.drag && (n.draggable = !1, a.userSelect = a.WebkitUserSelect = a.WebkitTouchCallout = "none", a.touchAction = t.drag === !0 ? "none" : "pan-" + (t.drag === "x" ? "y" : "x")), n.style = a, n;
|
|
453
|
-
}
|
|
454
|
-
var pi = /* @__PURE__ */ new Set([
|
|
455
|
-
"initial",
|
|
456
|
-
"animate",
|
|
457
|
-
"exit",
|
|
458
|
-
"style",
|
|
459
|
-
"variants",
|
|
460
|
-
"transition",
|
|
461
|
-
"transformTemplate",
|
|
462
|
-
"transformValues",
|
|
463
|
-
"custom",
|
|
464
|
-
"inherit",
|
|
465
|
-
"layout",
|
|
466
|
-
"layoutId",
|
|
467
|
-
"_layoutResetTransform",
|
|
468
|
-
"onLayoutAnimationComplete",
|
|
469
|
-
"onViewportBoxUpdate",
|
|
470
|
-
"onLayoutMeasure",
|
|
471
|
-
"onBeforeLayoutMeasure",
|
|
472
|
-
"onAnimationStart",
|
|
473
|
-
"onAnimationComplete",
|
|
474
|
-
"onUpdate",
|
|
475
|
-
"onDragStart",
|
|
476
|
-
"onDrag",
|
|
477
|
-
"onDragEnd",
|
|
478
|
-
"onMeasureDragConstraints",
|
|
479
|
-
"onDirectionLock",
|
|
480
|
-
"onDragTransitionEnd",
|
|
481
|
-
"drag",
|
|
482
|
-
"dragControls",
|
|
483
|
-
"dragListener",
|
|
484
|
-
"dragConstraints",
|
|
485
|
-
"dragDirectionLock",
|
|
486
|
-
"_dragX",
|
|
487
|
-
"_dragY",
|
|
488
|
-
"dragElastic",
|
|
489
|
-
"dragMomentum",
|
|
490
|
-
"dragPropagation",
|
|
491
|
-
"dragTransition",
|
|
492
|
-
"whileDrag",
|
|
493
|
-
"onPan",
|
|
494
|
-
"onPanStart",
|
|
495
|
-
"onPanEnd",
|
|
496
|
-
"onPanSessionStart",
|
|
497
|
-
"onTap",
|
|
498
|
-
"onTapStart",
|
|
499
|
-
"onTapCancel",
|
|
500
|
-
"onHoverStart",
|
|
501
|
-
"onHoverEnd",
|
|
502
|
-
"whileFocus",
|
|
503
|
-
"whileTap",
|
|
504
|
-
"whileHover"
|
|
505
|
-
]);
|
|
506
|
-
function Qt(t) {
|
|
507
|
-
return pi.has(t);
|
|
508
|
-
}
|
|
509
|
-
var vn = function(t) {
|
|
510
|
-
return !Qt(t);
|
|
511
|
-
};
|
|
512
|
-
try {
|
|
513
|
-
var gi = require("@emotion/is-prop-valid").default;
|
|
514
|
-
vn = function(t) {
|
|
515
|
-
return t.startsWith("on") ? !Qt(t) : gi(t);
|
|
516
|
-
};
|
|
517
|
-
} catch {
|
|
518
|
-
}
|
|
519
|
-
function hi(t, e, r) {
|
|
520
|
-
var n = {};
|
|
521
|
-
for (var a in t)
|
|
522
|
-
(vn(a) || r === !0 && Qt(a) || !e && !Qt(a)) && (n[a] = t[a]);
|
|
523
|
-
return n;
|
|
524
|
-
}
|
|
525
|
-
function ir(t, e, r) {
|
|
526
|
-
return typeof t == "string" ? t : V.transform(e + r * t);
|
|
527
|
-
}
|
|
528
|
-
function yi(t, e, r) {
|
|
529
|
-
var n = ir(e, t.x, t.width), a = ir(r, t.y, t.height);
|
|
530
|
-
return n + " " + a;
|
|
531
|
-
}
|
|
532
|
-
var me = function(t, e) {
|
|
533
|
-
return V.transform(t * e);
|
|
534
|
-
}, Pi = {
|
|
535
|
-
offset: "strokeDashoffset",
|
|
536
|
-
array: "strokeDasharray"
|
|
537
|
-
};
|
|
538
|
-
function bi(t, e, r, n, a, i) {
|
|
539
|
-
n === void 0 && (n = 1), a === void 0 && (a = 0);
|
|
540
|
-
var o = Pi;
|
|
541
|
-
t[o.offset] = me(-a, e);
|
|
542
|
-
var u = me(r, e), f = me(n, e);
|
|
543
|
-
t[o.array] = u + " " + f;
|
|
544
|
-
}
|
|
545
|
-
function Ue(t, e, r, n, a, i, o, u) {
|
|
546
|
-
var f = e.attrX, s = e.attrY, l = e.originX, p = e.originY, c = e.pathLength, d = e.pathSpacing, v = d === void 0 ? 1 : d, P = e.pathOffset, m = P === void 0 ? 0 : P, h = Z(e, ["attrX", "attrY", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]);
|
|
547
|
-
He(t, h, r, n, a, i, o, u), t.attrs = t.style, t.style = {};
|
|
548
|
-
var A = t.attrs, L = t.style, D = t.dimensions, C = t.totalPathLength;
|
|
549
|
-
A.transform && (D && (L.transform = A.transform), delete A.transform), D && (l !== void 0 || p !== void 0 || L.transform) && (L.transformOrigin = yi(D, l !== void 0 ? l : 0.5, p !== void 0 ? p : 0.5)), f !== void 0 && (A.x = f), s !== void 0 && (A.y = s), C !== void 0 && c !== void 0 && bi(A, C, c, v, m);
|
|
550
|
-
}
|
|
551
|
-
var dn = function() {
|
|
552
|
-
return y(y({}, _e()), { attrs: {} });
|
|
553
|
-
};
|
|
554
|
-
function Ti(t, e) {
|
|
555
|
-
var r = wt(function() {
|
|
556
|
-
var a = dn();
|
|
557
|
-
return Ue(a, e, void 0, void 0, { enableHardwareAcceleration: !1 }, t.transformTemplate), y(y({}, a.attrs), { style: y({}, a.style) });
|
|
558
|
-
}, [e]);
|
|
559
|
-
if (t.style) {
|
|
560
|
-
var n = {};
|
|
561
|
-
cn(n, t.style, t), r.style = y(y({}, n), r.style);
|
|
562
|
-
}
|
|
563
|
-
return r;
|
|
564
|
-
}
|
|
565
|
-
function xi(t) {
|
|
566
|
-
t === void 0 && (t = !1);
|
|
567
|
-
var e = function(r, n, a, i, o) {
|
|
568
|
-
var u = i.latestValues, f = je(r) ? Ti : mi, s = f(n, u, o), l = hi(n, typeof r == "string", t), p = y(y(y({}, l), s), { ref: a });
|
|
569
|
-
return Fa(r, p);
|
|
570
|
-
};
|
|
571
|
-
return e;
|
|
572
|
-
}
|
|
573
|
-
var Ai = /([a-z])([A-Z])/g, Vi = "$1-$2", mn = function(t) {
|
|
574
|
-
return t.replace(Ai, Vi).toLowerCase();
|
|
575
|
-
};
|
|
576
|
-
function pn(t, e) {
|
|
577
|
-
var r = e.style, n = e.vars;
|
|
578
|
-
Object.assign(t.style, r);
|
|
579
|
-
for (var a in n)
|
|
580
|
-
t.style.setProperty(a, n[a]);
|
|
581
|
-
}
|
|
582
|
-
var gn = /* @__PURE__ */ new Set([
|
|
583
|
-
"baseFrequency",
|
|
584
|
-
"diffuseConstant",
|
|
585
|
-
"kernelMatrix",
|
|
586
|
-
"kernelUnitLength",
|
|
587
|
-
"keySplines",
|
|
588
|
-
"keyTimes",
|
|
589
|
-
"limitingConeAngle",
|
|
590
|
-
"markerHeight",
|
|
591
|
-
"markerWidth",
|
|
592
|
-
"numOctaves",
|
|
593
|
-
"targetX",
|
|
594
|
-
"targetY",
|
|
595
|
-
"surfaceScale",
|
|
596
|
-
"specularConstant",
|
|
597
|
-
"specularExponent",
|
|
598
|
-
"stdDeviation",
|
|
599
|
-
"tableValues",
|
|
600
|
-
"viewBox",
|
|
601
|
-
"gradientTransform"
|
|
602
|
-
]);
|
|
603
|
-
function hn(t, e) {
|
|
604
|
-
pn(t, e);
|
|
605
|
-
for (var r in e.attrs)
|
|
606
|
-
t.setAttribute(gn.has(r) ? r : mn(r), e.attrs[r]);
|
|
607
|
-
}
|
|
608
|
-
function Ne(t) {
|
|
609
|
-
var e = t.style, r = {};
|
|
610
|
-
for (var n in e)
|
|
611
|
-
(it(e[n]) || sn(n, t)) && (r[n] = e[n]);
|
|
612
|
-
return r;
|
|
613
|
-
}
|
|
614
|
-
function yn(t) {
|
|
615
|
-
var e = Ne(t);
|
|
616
|
-
for (var r in t)
|
|
617
|
-
if (it(t[r])) {
|
|
618
|
-
var n = r === "x" || r === "y" ? "attr" + r.toUpperCase() : r;
|
|
619
|
-
e[n] = t[r];
|
|
620
|
-
}
|
|
621
|
-
return e;
|
|
622
|
-
}
|
|
623
|
-
function Ke(t) {
|
|
624
|
-
return typeof t == "object" && typeof t.start == "function";
|
|
625
|
-
}
|
|
626
|
-
var Mt = function(t) {
|
|
627
|
-
return Array.isArray(t);
|
|
628
|
-
}, Si = function(t) {
|
|
629
|
-
return !!(t && typeof t == "object" && t.mix && t.toValue);
|
|
630
|
-
}, Ci = function(t) {
|
|
631
|
-
return Mt(t) ? t[t.length - 1] || 0 : t;
|
|
632
|
-
};
|
|
633
|
-
function Ei(t) {
|
|
634
|
-
var e = it(t) ? t.get() : t;
|
|
635
|
-
return Si(e) ? e.toValue() : e;
|
|
636
|
-
}
|
|
637
|
-
function or(t, e, r, n) {
|
|
638
|
-
var a = t.scrapeMotionValuesFromProps, i = t.createRenderState, o = t.onMount, u = {
|
|
639
|
-
latestValues: Li(e, r, n, a),
|
|
640
|
-
renderState: i()
|
|
641
|
-
};
|
|
642
|
-
return o && (u.mount = function(f) {
|
|
643
|
-
return o(e, f, u);
|
|
644
|
-
}), u;
|
|
645
|
-
}
|
|
646
|
-
var Pn = function(t) {
|
|
647
|
-
return function(e, r) {
|
|
648
|
-
var n = O(ie), a = O(St);
|
|
649
|
-
return r ? or(t, e, n, a) : Rt(function() {
|
|
650
|
-
return or(t, e, n, a);
|
|
651
|
-
});
|
|
652
|
-
};
|
|
653
|
-
};
|
|
654
|
-
function Li(t, e, r, n) {
|
|
655
|
-
var a = {}, i = r?.initial === !1, o = n(t);
|
|
656
|
-
for (var u in o)
|
|
657
|
-
a[u] = Ei(o[u]);
|
|
658
|
-
var f = t.initial, s = t.animate, l = ue(t), p = on(t);
|
|
659
|
-
e && p && !l && t.inherit !== !1 && (f ?? (f = e.initial), s ?? (s = e.animate));
|
|
660
|
-
var c = i || f === !1 ? s : f;
|
|
661
|
-
if (c && typeof c != "boolean" && !Ke(c)) {
|
|
662
|
-
var d = Array.isArray(c) ? c : [c];
|
|
663
|
-
d.forEach(function(v) {
|
|
664
|
-
var P = an(t, v);
|
|
665
|
-
if (P) {
|
|
666
|
-
var m = P.transitionEnd;
|
|
667
|
-
P.transition;
|
|
668
|
-
var h = Z(P, ["transitionEnd", "transition"]);
|
|
669
|
-
for (var A in h)
|
|
670
|
-
a[A] = h[A];
|
|
671
|
-
for (var A in m)
|
|
672
|
-
a[A] = m[A];
|
|
673
|
-
}
|
|
674
|
-
});
|
|
675
|
-
}
|
|
676
|
-
return a;
|
|
677
|
-
}
|
|
678
|
-
var wi = {
|
|
679
|
-
useVisualState: Pn({
|
|
680
|
-
scrapeMotionValuesFromProps: yn,
|
|
681
|
-
createRenderState: dn,
|
|
682
|
-
onMount: function(t, e, r) {
|
|
683
|
-
var n = r.renderState, a = r.latestValues;
|
|
684
|
-
try {
|
|
685
|
-
n.dimensions = typeof e.getBBox == "function" ? e.getBBox() : e.getBoundingClientRect();
|
|
686
|
-
} catch {
|
|
687
|
-
n.dimensions = {
|
|
688
|
-
x: 0,
|
|
689
|
-
y: 0,
|
|
690
|
-
width: 0,
|
|
691
|
-
height: 0
|
|
692
|
-
};
|
|
693
|
-
}
|
|
694
|
-
Ri(e) && (n.totalPathLength = e.getTotalLength()), Ue(n, a, void 0, void 0, { enableHardwareAcceleration: !1 }, t.transformTemplate), hn(e, n);
|
|
695
|
-
}
|
|
696
|
-
})
|
|
697
|
-
};
|
|
698
|
-
function Ri(t) {
|
|
699
|
-
return t.tagName === "path";
|
|
700
|
-
}
|
|
701
|
-
var Di = {
|
|
702
|
-
useVisualState: Pn({
|
|
703
|
-
scrapeMotionValuesFromProps: Ne,
|
|
704
|
-
createRenderState: _e
|
|
705
|
-
})
|
|
706
|
-
};
|
|
707
|
-
function Mi(t, e, r, n) {
|
|
708
|
-
var a = e.forwardMotionProps, i = a === void 0 ? !1 : a, o = je(t) ? wi : Di;
|
|
709
|
-
return y(y({}, o), {
|
|
710
|
-
preloadedFeatures: r,
|
|
711
|
-
useRender: xi(i),
|
|
712
|
-
createVisualElement: n,
|
|
713
|
-
Component: t
|
|
714
|
-
});
|
|
715
|
-
}
|
|
716
|
-
var F;
|
|
717
|
-
(function(t) {
|
|
718
|
-
t.Animate = "animate", t.Hover = "whileHover", t.Tap = "whileTap", t.Drag = "whileDrag", t.Focus = "whileFocus", t.Exit = "exit";
|
|
719
|
-
})(F || (F = {}));
|
|
720
|
-
function Ye(t, e, r, n) {
|
|
721
|
-
return t.addEventListener(e, r, n), function() {
|
|
722
|
-
return t.removeEventListener(e, r, n);
|
|
723
|
-
};
|
|
724
|
-
}
|
|
725
|
-
function xe(t, e, r, n) {
|
|
726
|
-
Q(function() {
|
|
727
|
-
var a = t.current;
|
|
728
|
-
if (r && a)
|
|
729
|
-
return Ye(a, e, r, n);
|
|
730
|
-
}, [t, e, r, n]);
|
|
731
|
-
}
|
|
732
|
-
function Fi(t) {
|
|
733
|
-
var e = t.whileFocus, r = t.visualElement, n = function() {
|
|
734
|
-
var i;
|
|
735
|
-
(i = r.animationState) === null || i === void 0 || i.setActive(F.Focus, !0);
|
|
736
|
-
}, a = function() {
|
|
737
|
-
var i;
|
|
738
|
-
(i = r.animationState) === null || i === void 0 || i.setActive(F.Focus, !1);
|
|
739
|
-
};
|
|
740
|
-
xe(r, "focus", e ? n : void 0), xe(r, "blur", e ? a : void 0);
|
|
741
|
-
}
|
|
742
|
-
function bn(t) {
|
|
743
|
-
return typeof PointerEvent < "u" && t instanceof PointerEvent ? t.pointerType === "mouse" : t instanceof MouseEvent;
|
|
744
|
-
}
|
|
745
|
-
function Tn(t) {
|
|
746
|
-
var e = !!t.touches;
|
|
747
|
-
return e;
|
|
748
|
-
}
|
|
749
|
-
function Ii(t) {
|
|
750
|
-
return function(e) {
|
|
751
|
-
var r = e instanceof MouseEvent, n = !r || r && e.button === 0;
|
|
752
|
-
n && t(e);
|
|
753
|
-
};
|
|
754
|
-
}
|
|
755
|
-
var Bi = { pageX: 0, pageY: 0 };
|
|
756
|
-
function Oi(t, e) {
|
|
757
|
-
e === void 0 && (e = "page");
|
|
758
|
-
var r = t.touches[0] || t.changedTouches[0], n = r || Bi;
|
|
759
|
-
return {
|
|
760
|
-
x: n[e + "X"],
|
|
761
|
-
y: n[e + "Y"]
|
|
762
|
-
};
|
|
763
|
-
}
|
|
764
|
-
function ji(t, e) {
|
|
765
|
-
return e === void 0 && (e = "page"), {
|
|
766
|
-
x: t[e + "X"],
|
|
767
|
-
y: t[e + "Y"]
|
|
768
|
-
};
|
|
769
|
-
}
|
|
770
|
-
function Xe(t, e) {
|
|
771
|
-
return e === void 0 && (e = "page"), {
|
|
772
|
-
point: Tn(t) ? Oi(t, e) : ji(t, e)
|
|
773
|
-
};
|
|
774
|
-
}
|
|
775
|
-
function Hi(t) {
|
|
776
|
-
return Xe(t, "client");
|
|
777
|
-
}
|
|
778
|
-
var xn = function(t, e) {
|
|
779
|
-
e === void 0 && (e = !1);
|
|
780
|
-
var r = function(n) {
|
|
781
|
-
return t(n, Xe(n));
|
|
782
|
-
};
|
|
783
|
-
return e ? Ii(r) : r;
|
|
784
|
-
}, _i = function() {
|
|
785
|
-
return jt && window.onpointerdown === null;
|
|
786
|
-
}, Ui = function() {
|
|
787
|
-
return jt && window.ontouchstart === null;
|
|
788
|
-
}, Ni = function() {
|
|
789
|
-
return jt && window.onmousedown === null;
|
|
790
|
-
}, Ki = {
|
|
791
|
-
pointerdown: "mousedown",
|
|
792
|
-
pointermove: "mousemove",
|
|
793
|
-
pointerup: "mouseup",
|
|
794
|
-
pointercancel: "mousecancel",
|
|
795
|
-
pointerover: "mouseover",
|
|
796
|
-
pointerout: "mouseout",
|
|
797
|
-
pointerenter: "mouseenter",
|
|
798
|
-
pointerleave: "mouseleave"
|
|
799
|
-
}, Yi = {
|
|
800
|
-
pointerdown: "touchstart",
|
|
801
|
-
pointermove: "touchmove",
|
|
802
|
-
pointerup: "touchend",
|
|
803
|
-
pointercancel: "touchcancel"
|
|
804
|
-
};
|
|
805
|
-
function An(t) {
|
|
806
|
-
return _i() ? t : Ui() ? Yi[t] : Ni() ? Ki[t] : t;
|
|
807
|
-
}
|
|
808
|
-
function Tt(t, e, r, n) {
|
|
809
|
-
return Ye(t, An(e), xn(r, e === "pointerdown"), n);
|
|
810
|
-
}
|
|
811
|
-
function kt(t, e, r, n) {
|
|
812
|
-
return xe(t, An(e), r && xn(r, e === "pointerdown"), n);
|
|
813
|
-
}
|
|
814
|
-
function Vn(t) {
|
|
815
|
-
var e = null;
|
|
816
|
-
return function() {
|
|
817
|
-
var r = function() {
|
|
818
|
-
e = null;
|
|
819
|
-
};
|
|
820
|
-
return e === null ? (e = t, r) : !1;
|
|
821
|
-
};
|
|
822
|
-
}
|
|
823
|
-
var ur = Vn("dragHorizontal"), sr = Vn("dragVertical");
|
|
824
|
-
function Sn(t) {
|
|
825
|
-
var e = !1;
|
|
826
|
-
if (t === "y")
|
|
827
|
-
e = sr();
|
|
828
|
-
else if (t === "x")
|
|
829
|
-
e = ur();
|
|
830
|
-
else {
|
|
831
|
-
var r = ur(), n = sr();
|
|
832
|
-
r && n ? e = function() {
|
|
833
|
-
r(), n();
|
|
834
|
-
} : (r && r(), n && n());
|
|
835
|
-
}
|
|
836
|
-
return e;
|
|
837
|
-
}
|
|
838
|
-
function Cn() {
|
|
839
|
-
var t = Sn(!0);
|
|
840
|
-
return t ? (t(), !1) : !0;
|
|
841
|
-
}
|
|
842
|
-
function fr(t, e, r) {
|
|
843
|
-
return function(n, a) {
|
|
844
|
-
var i;
|
|
845
|
-
!bn(n) || Cn() || (r?.(n, a), (i = t.animationState) === null || i === void 0 || i.setActive(F.Hover, e));
|
|
846
|
-
};
|
|
847
|
-
}
|
|
848
|
-
function Xi(t) {
|
|
849
|
-
var e = t.onHoverStart, r = t.onHoverEnd, n = t.whileHover, a = t.visualElement;
|
|
850
|
-
kt(a, "pointerenter", e || n ? fr(a, !0, e) : void 0), kt(a, "pointerleave", r || n ? fr(a, !1, r) : void 0);
|
|
851
|
-
}
|
|
852
|
-
var En = function(t, e) {
|
|
853
|
-
return e ? t === e ? !0 : En(t, e.parentElement) : !1;
|
|
854
|
-
};
|
|
855
|
-
function ze(t) {
|
|
856
|
-
return Q(function() {
|
|
857
|
-
return function() {
|
|
858
|
-
return t();
|
|
859
|
-
};
|
|
860
|
-
}, []);
|
|
861
|
-
}
|
|
862
|
-
function zi(t) {
|
|
863
|
-
var e = t.onTap, r = t.onTapStart, n = t.onTapCancel, a = t.whileTap, i = t.visualElement, o = e || r || n || a, u = $(!1), f = $(null);
|
|
864
|
-
function s() {
|
|
865
|
-
var v;
|
|
866
|
-
(v = f.current) === null || v === void 0 || v.call(f), f.current = null;
|
|
867
|
-
}
|
|
868
|
-
function l() {
|
|
869
|
-
var v;
|
|
870
|
-
return s(), u.current = !1, (v = i.animationState) === null || v === void 0 || v.setActive(F.Tap, !1), !Cn();
|
|
871
|
-
}
|
|
872
|
-
function p(v, P) {
|
|
873
|
-
l() && (En(i.getInstance(), v.target) ? e?.(v, P) : n?.(v, P));
|
|
874
|
-
}
|
|
875
|
-
function c(v, P) {
|
|
876
|
-
l() && n?.(v, P);
|
|
877
|
-
}
|
|
878
|
-
function d(v, P) {
|
|
879
|
-
var m;
|
|
880
|
-
s(), !u.current && (u.current = !0, f.current = Be(Tt(window, "pointerup", p), Tt(window, "pointercancel", c)), r?.(v, P), (m = i.animationState) === null || m === void 0 || m.setActive(F.Tap, !0));
|
|
881
|
-
}
|
|
882
|
-
kt(i, "pointerdown", o ? d : void 0), ze(s);
|
|
883
|
-
}
|
|
884
|
-
var mt = function(t) {
|
|
885
|
-
return function(e) {
|
|
886
|
-
return t(e), null;
|
|
887
|
-
};
|
|
888
|
-
}, Gi = {
|
|
889
|
-
tap: mt(zi),
|
|
890
|
-
focus: mt(Fi),
|
|
891
|
-
hover: mt(Xi)
|
|
892
|
-
};
|
|
893
|
-
function Ln(t, e) {
|
|
894
|
-
if (!Array.isArray(e))
|
|
895
|
-
return !1;
|
|
896
|
-
var r = e.length;
|
|
897
|
-
if (r !== t.length)
|
|
898
|
-
return !1;
|
|
899
|
-
for (var n = 0; n < r; n++)
|
|
900
|
-
if (e[n] !== t[n])
|
|
901
|
-
return !1;
|
|
902
|
-
return !0;
|
|
903
|
-
}
|
|
904
|
-
var te = function(t) {
|
|
905
|
-
return t * 1e3;
|
|
906
|
-
}, lr = {
|
|
907
|
-
linear: Aa,
|
|
908
|
-
easeIn: xa,
|
|
909
|
-
easeInOut: Ta,
|
|
910
|
-
easeOut: ba,
|
|
911
|
-
circIn: Pa,
|
|
912
|
-
circInOut: ya,
|
|
913
|
-
circOut: ha,
|
|
914
|
-
backIn: ga,
|
|
915
|
-
backInOut: pa,
|
|
916
|
-
backOut: ma,
|
|
917
|
-
anticipate: da,
|
|
918
|
-
bounceIn: va,
|
|
919
|
-
bounceInOut: ca,
|
|
920
|
-
bounceOut: la
|
|
921
|
-
}, cr = function(t) {
|
|
922
|
-
if (Array.isArray(t)) {
|
|
923
|
-
gt(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
924
|
-
var e = M(t, 4), r = e[0], n = e[1], a = e[2], i = e[3];
|
|
925
|
-
return fa(r, n, a, i);
|
|
926
|
-
} else if (typeof t == "string")
|
|
927
|
-
return gt(lr[t] !== void 0, "Invalid easing type '" + t + "'"), lr[t];
|
|
928
|
-
return t;
|
|
929
|
-
}, Wi = function(t) {
|
|
930
|
-
return Array.isArray(t) && typeof t[0] != "number";
|
|
931
|
-
}, vr = function(t, e) {
|
|
932
|
-
return t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
933
|
-
At.test(e) && // And it contains numbers and/or colors
|
|
934
|
-
!e.startsWith("url("));
|
|
935
|
-
}, vt = function() {
|
|
936
|
-
return {
|
|
937
|
-
type: "spring",
|
|
938
|
-
stiffness: 500,
|
|
939
|
-
damping: 25,
|
|
940
|
-
restDelta: 0.5,
|
|
941
|
-
restSpeed: 10
|
|
942
|
-
};
|
|
943
|
-
}, Xt = function(t) {
|
|
944
|
-
return {
|
|
945
|
-
type: "spring",
|
|
946
|
-
stiffness: 550,
|
|
947
|
-
damping: t === 0 ? 2 * Math.sqrt(550) : 30,
|
|
948
|
-
restDelta: 0.01,
|
|
949
|
-
restSpeed: 10
|
|
950
|
-
};
|
|
951
|
-
}, pe = function() {
|
|
952
|
-
return {
|
|
953
|
-
type: "keyframes",
|
|
954
|
-
ease: "linear",
|
|
955
|
-
duration: 0.3
|
|
956
|
-
};
|
|
957
|
-
}, Zi = function(t) {
|
|
958
|
-
return {
|
|
959
|
-
type: "keyframes",
|
|
960
|
-
duration: 0.8,
|
|
961
|
-
values: t
|
|
962
|
-
};
|
|
963
|
-
}, dr = {
|
|
964
|
-
x: vt,
|
|
965
|
-
y: vt,
|
|
966
|
-
z: vt,
|
|
967
|
-
rotate: vt,
|
|
968
|
-
rotateX: vt,
|
|
969
|
-
rotateY: vt,
|
|
970
|
-
rotateZ: vt,
|
|
971
|
-
scaleX: Xt,
|
|
972
|
-
scaleY: Xt,
|
|
973
|
-
scale: Xt,
|
|
974
|
-
opacity: pe,
|
|
975
|
-
backgroundColor: pe,
|
|
976
|
-
color: pe,
|
|
977
|
-
default: Xt
|
|
978
|
-
}, qi = function(t, e) {
|
|
979
|
-
var r;
|
|
980
|
-
return Mt(e) ? r = Zi : r = dr[t] || dr.default, y({ to: e }, r(e));
|
|
981
|
-
}, $i = y(y({}, ln), {
|
|
982
|
-
// Color props
|
|
983
|
-
color: G,
|
|
984
|
-
backgroundColor: G,
|
|
985
|
-
outlineColor: G,
|
|
986
|
-
fill: G,
|
|
987
|
-
stroke: G,
|
|
988
|
-
// Border props
|
|
989
|
-
borderColor: G,
|
|
990
|
-
borderTopColor: G,
|
|
991
|
-
borderRightColor: G,
|
|
992
|
-
borderBottomColor: G,
|
|
993
|
-
borderLeftColor: G,
|
|
994
|
-
filter: Pe,
|
|
995
|
-
WebkitFilter: Pe
|
|
996
|
-
}), Ge = function(t) {
|
|
997
|
-
return $i[t];
|
|
998
|
-
};
|
|
999
|
-
function We(t, e) {
|
|
1000
|
-
var r, n = Ge(t);
|
|
1001
|
-
return n !== Pe && (n = At), (r = n.getAnimatableNone) === null || r === void 0 ? void 0 : r.call(n, e);
|
|
1002
|
-
}
|
|
1003
|
-
function Ji(t) {
|
|
1004
|
-
t.when, t.delay, t.delayChildren, t.staggerChildren, t.staggerDirection, t.repeat, t.repeatType, t.repeatDelay, t.from;
|
|
1005
|
-
var e = Z(t, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from"]);
|
|
1006
|
-
return !!Object.keys(e).length;
|
|
1007
|
-
}
|
|
1008
|
-
var mr = !1;
|
|
1009
|
-
function Qi(t) {
|
|
1010
|
-
var e = t.ease, r = t.times, n = t.yoyo, a = t.flip, i = t.loop, o = Z(t, ["ease", "times", "yoyo", "flip", "loop"]), u = y({}, o);
|
|
1011
|
-
return r && (u.offset = r), o.duration && (u.duration = te(o.duration)), o.repeatDelay && (u.repeatDelay = te(o.repeatDelay)), e && (u.ease = Wi(e) ? e.map(cr) : cr(e)), o.type === "tween" && (u.type = "keyframes"), (n || i || a) && (Zr(!mr, "yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."), mr = !0, n ? u.repeatType = "reverse" : i ? u.repeatType = "loop" : a && (u.repeatType = "mirror"), u.repeat = i || n || a || o.repeat), o.type !== "spring" && (u.type = "keyframes"), u;
|
|
1012
|
-
}
|
|
1013
|
-
function ki(t, e) {
|
|
1014
|
-
var r, n = Ze(t, e) || {};
|
|
1015
|
-
return (r = n.delay) !== null && r !== void 0 ? r : 0;
|
|
1016
|
-
}
|
|
1017
|
-
function to(t) {
|
|
1018
|
-
return Array.isArray(t.to) && t.to[0] === null && (t.to = K([], M(t.to)), t.to[0] = t.from), t;
|
|
1019
|
-
}
|
|
1020
|
-
function eo(t, e, r) {
|
|
1021
|
-
var n;
|
|
1022
|
-
return Array.isArray(e.to) && ((n = t.duration) !== null && n !== void 0 || (t.duration = 0.8)), to(e), Ji(t) || (t = y(y({}, t), qi(r, e.to))), y(y({}, e), Qi(t));
|
|
1023
|
-
}
|
|
1024
|
-
function ro(t, e, r, n, a) {
|
|
1025
|
-
var i, o = Ze(n, t), u = (i = o.from) !== null && i !== void 0 ? i : e.get(), f = vr(t, r);
|
|
1026
|
-
u === "none" && f && typeof r == "string" ? u = We(t, r) : pr(u) && typeof r == "string" ? u = gr(r) : !Array.isArray(r) && pr(r) && typeof u == "string" && (r = gr(u));
|
|
1027
|
-
var s = vr(t, u);
|
|
1028
|
-
Zr(s === f, "You are trying to animate " + t + ' from "' + u + '" to "' + r + '". ' + u + " is not an animatable value - to enable this animation set " + u + " to a value animatable to " + r + " via the `style` property.");
|
|
1029
|
-
function l() {
|
|
1030
|
-
var c = {
|
|
1031
|
-
from: u,
|
|
1032
|
-
to: r,
|
|
1033
|
-
velocity: e.getVelocity(),
|
|
1034
|
-
onComplete: a,
|
|
1035
|
-
onUpdate: function(d) {
|
|
1036
|
-
return e.set(d);
|
|
1037
|
-
}
|
|
1038
|
-
};
|
|
1039
|
-
return o.type === "inertia" || o.type === "decay" ? Va(y(y({}, c), o)) : Sa(y(y({}, eo(o, c, t)), { onUpdate: function(d) {
|
|
1040
|
-
var v;
|
|
1041
|
-
c.onUpdate(d), (v = o.onUpdate) === null || v === void 0 || v.call(o, d);
|
|
1042
|
-
}, onComplete: function() {
|
|
1043
|
-
var d;
|
|
1044
|
-
c.onComplete(), (d = o.onComplete) === null || d === void 0 || d.call(o);
|
|
1045
|
-
} }));
|
|
1046
|
-
}
|
|
1047
|
-
function p() {
|
|
1048
|
-
var c;
|
|
1049
|
-
return e.set(r), a(), (c = o?.onComplete) === null || c === void 0 || c.call(o), { stop: function() {
|
|
1050
|
-
} };
|
|
1051
|
-
}
|
|
1052
|
-
return !s || !f || o.type === !1 ? p : l;
|
|
1053
|
-
}
|
|
1054
|
-
function pr(t) {
|
|
1055
|
-
return t === 0 || typeof t == "string" && parseFloat(t) === 0 && t.indexOf(" ") === -1;
|
|
1056
|
-
}
|
|
1057
|
-
function gr(t) {
|
|
1058
|
-
return typeof t == "number" ? 0 : We("", t);
|
|
1059
|
-
}
|
|
1060
|
-
function Ze(t, e) {
|
|
1061
|
-
return t[e] || t.default || t;
|
|
1062
|
-
}
|
|
1063
|
-
function ee(t, e, r, n) {
|
|
1064
|
-
return n === void 0 && (n = {}), e.start(function(a) {
|
|
1065
|
-
var i, o, u = ro(t, e, r, n, a), f = ki(n, t), s = function() {
|
|
1066
|
-
return o = u();
|
|
1067
|
-
};
|
|
1068
|
-
return f ? i = setTimeout(s, te(f)) : s(), function() {
|
|
1069
|
-
clearTimeout(i), o?.stop();
|
|
1070
|
-
};
|
|
1071
|
-
});
|
|
1072
|
-
}
|
|
1073
|
-
var no = function(t) {
|
|
1074
|
-
return /^\-?\d*\.?\d+$/.test(t);
|
|
1075
|
-
}, wn = 1 / 60 * 1e3, ao = typeof performance < "u" ? function() {
|
|
1076
|
-
return performance.now();
|
|
1077
|
-
} : function() {
|
|
1078
|
-
return Date.now();
|
|
1079
|
-
}, Rn = typeof window < "u" ? function(t) {
|
|
1080
|
-
return window.requestAnimationFrame(t);
|
|
1081
|
-
} : function(t) {
|
|
1082
|
-
return setTimeout(function() {
|
|
1083
|
-
return t(ao());
|
|
1084
|
-
}, wn);
|
|
1085
|
-
};
|
|
1086
|
-
function io(t) {
|
|
1087
|
-
var e = [], r = [], n = 0, a = !1, i = /* @__PURE__ */ new WeakSet(), o = {
|
|
1088
|
-
schedule: function(u, f, s) {
|
|
1089
|
-
f === void 0 && (f = !1), s === void 0 && (s = !1);
|
|
1090
|
-
var l = s && a, p = l ? e : r;
|
|
1091
|
-
return f && i.add(u), p.indexOf(u) === -1 && (p.push(u), l && a && (n = e.length)), u;
|
|
1092
|
-
},
|
|
1093
|
-
cancel: function(u) {
|
|
1094
|
-
var f = r.indexOf(u);
|
|
1095
|
-
f !== -1 && r.splice(f, 1), i.delete(u);
|
|
1096
|
-
},
|
|
1097
|
-
process: function(u) {
|
|
1098
|
-
var f;
|
|
1099
|
-
if (a = !0, f = [r, e], e = f[0], r = f[1], r.length = 0, n = e.length, n)
|
|
1100
|
-
for (var s = 0; s < n; s++) {
|
|
1101
|
-
var l = e[s];
|
|
1102
|
-
l(u), i.has(l) && (o.schedule(l), t());
|
|
1103
|
-
}
|
|
1104
|
-
a = !1;
|
|
1105
|
-
}
|
|
1106
|
-
};
|
|
1107
|
-
return o;
|
|
1108
|
-
}
|
|
1109
|
-
var oo = 40, Ae = !0, Ft = !1, Ve = !1, xt = {
|
|
1110
|
-
delta: 0,
|
|
1111
|
-
timestamp: 0
|
|
1112
|
-
}, Ht = ["read", "update", "preRender", "render", "postRender"], fe = /* @__PURE__ */ Ht.reduce(function(t, e) {
|
|
1113
|
-
return t[e] = io(function() {
|
|
1114
|
-
return Ft = !0;
|
|
1115
|
-
}), t;
|
|
1116
|
-
}, {}), rt = /* @__PURE__ */ Ht.reduce(function(t, e) {
|
|
1117
|
-
var r = fe[e];
|
|
1118
|
-
return t[e] = function(n, a, i) {
|
|
1119
|
-
return a === void 0 && (a = !1), i === void 0 && (i = !1), Ft || so(), r.schedule(n, a, i);
|
|
1120
|
-
}, t;
|
|
1121
|
-
}, {}), qt = /* @__PURE__ */ Ht.reduce(function(t, e) {
|
|
1122
|
-
return t[e] = fe[e].cancel, t;
|
|
1123
|
-
}, {}), bt = /* @__PURE__ */ Ht.reduce(function(t, e) {
|
|
1124
|
-
return t[e] = function() {
|
|
1125
|
-
return fe[e].process(xt);
|
|
1126
|
-
}, t;
|
|
1127
|
-
}, {}), uo = function(t) {
|
|
1128
|
-
return fe[t].process(xt);
|
|
1129
|
-
}, Dn = function(t) {
|
|
1130
|
-
Ft = !1, xt.delta = Ae ? wn : Math.max(Math.min(t - xt.timestamp, oo), 1), xt.timestamp = t, Ve = !0, Ht.forEach(uo), Ve = !1, Ft && (Ae = !1, Rn(Dn));
|
|
1131
|
-
}, so = function() {
|
|
1132
|
-
Ft = !0, Ae = !0, Ve || Rn(Dn);
|
|
1133
|
-
}, Se = function() {
|
|
1134
|
-
return xt;
|
|
1135
|
-
};
|
|
1136
|
-
function Mn(t, e) {
|
|
1137
|
-
t.indexOf(e) === -1 && t.push(e);
|
|
1138
|
-
}
|
|
1139
|
-
function Fn(t, e) {
|
|
1140
|
-
var r = t.indexOf(e);
|
|
1141
|
-
r > -1 && t.splice(r, 1);
|
|
1142
|
-
}
|
|
1143
|
-
var $t = (
|
|
1144
|
-
/** @class */
|
|
1145
|
-
(function() {
|
|
1146
|
-
function t() {
|
|
1147
|
-
this.subscriptions = [];
|
|
1148
|
-
}
|
|
1149
|
-
return t.prototype.add = function(e) {
|
|
1150
|
-
var r = this;
|
|
1151
|
-
return Mn(this.subscriptions, e), function() {
|
|
1152
|
-
return Fn(r.subscriptions, e);
|
|
1153
|
-
};
|
|
1154
|
-
}, t.prototype.notify = function(e, r, n) {
|
|
1155
|
-
var a = this.subscriptions.length;
|
|
1156
|
-
if (a)
|
|
1157
|
-
if (a === 1)
|
|
1158
|
-
this.subscriptions[0](e, r, n);
|
|
1159
|
-
else
|
|
1160
|
-
for (var i = 0; i < a; i++) {
|
|
1161
|
-
var o = this.subscriptions[i];
|
|
1162
|
-
o && o(e, r, n);
|
|
1163
|
-
}
|
|
1164
|
-
}, t.prototype.getSize = function() {
|
|
1165
|
-
return this.subscriptions.length;
|
|
1166
|
-
}, t.prototype.clear = function() {
|
|
1167
|
-
this.subscriptions.length = 0;
|
|
1168
|
-
}, t;
|
|
1169
|
-
})()
|
|
1170
|
-
), fo = function(t) {
|
|
1171
|
-
return !isNaN(parseFloat(t));
|
|
1172
|
-
}, lo = (
|
|
1173
|
-
/** @class */
|
|
1174
|
-
(function() {
|
|
1175
|
-
function t(e) {
|
|
1176
|
-
var r = this;
|
|
1177
|
-
this.timeDelta = 0, this.lastUpdated = 0, this.updateSubscribers = new $t(), this.velocityUpdateSubscribers = new $t(), this.renderSubscribers = new $t(), this.canTrackVelocity = !1, this.updateAndNotify = function(n, a) {
|
|
1178
|
-
a === void 0 && (a = !0), r.prev = r.current, r.current = n;
|
|
1179
|
-
var i = Se(), o = i.delta, u = i.timestamp;
|
|
1180
|
-
r.lastUpdated !== u && (r.timeDelta = o, r.lastUpdated = u, rt.postRender(r.scheduleVelocityCheck)), r.prev !== r.current && r.updateSubscribers.notify(r.current), r.velocityUpdateSubscribers.getSize() && r.velocityUpdateSubscribers.notify(r.getVelocity()), a && r.renderSubscribers.notify(r.current);
|
|
1181
|
-
}, this.scheduleVelocityCheck = function() {
|
|
1182
|
-
return rt.postRender(r.velocityCheck);
|
|
1183
|
-
}, this.velocityCheck = function(n) {
|
|
1184
|
-
var a = n.timestamp;
|
|
1185
|
-
a !== r.lastUpdated && (r.prev = r.current, r.velocityUpdateSubscribers.notify(r.getVelocity()));
|
|
1186
|
-
}, this.hasAnimated = !1, this.prev = this.current = e, this.canTrackVelocity = fo(this.current);
|
|
1187
|
-
}
|
|
1188
|
-
return t.prototype.onChange = function(e) {
|
|
1189
|
-
return this.updateSubscribers.add(e);
|
|
1190
|
-
}, t.prototype.clearListeners = function() {
|
|
1191
|
-
this.updateSubscribers.clear();
|
|
1192
|
-
}, t.prototype.onRenderRequest = function(e) {
|
|
1193
|
-
return e(this.get()), this.renderSubscribers.add(e);
|
|
1194
|
-
}, t.prototype.attach = function(e) {
|
|
1195
|
-
this.passiveEffect = e;
|
|
1196
|
-
}, t.prototype.set = function(e, r) {
|
|
1197
|
-
r === void 0 && (r = !0), !r || !this.passiveEffect ? this.updateAndNotify(e, r) : this.passiveEffect(e, this.updateAndNotify);
|
|
1198
|
-
}, t.prototype.get = function() {
|
|
1199
|
-
return this.current;
|
|
1200
|
-
}, t.prototype.getPrevious = function() {
|
|
1201
|
-
return this.prev;
|
|
1202
|
-
}, t.prototype.getVelocity = function() {
|
|
1203
|
-
return this.canTrackVelocity ? (
|
|
1204
|
-
// These casts could be avoided if parseFloat would be typed better
|
|
1205
|
-
Ca(parseFloat(this.current) - parseFloat(this.prev), this.timeDelta)
|
|
1206
|
-
) : 0;
|
|
1207
|
-
}, t.prototype.start = function(e) {
|
|
1208
|
-
var r = this;
|
|
1209
|
-
return this.stop(), new Promise(function(n) {
|
|
1210
|
-
r.hasAnimated = !0, r.stopAnimation = e(n);
|
|
1211
|
-
}).then(function() {
|
|
1212
|
-
return r.clearAnimation();
|
|
1213
|
-
});
|
|
1214
|
-
}, t.prototype.stop = function() {
|
|
1215
|
-
this.stopAnimation && this.stopAnimation(), this.clearAnimation();
|
|
1216
|
-
}, t.prototype.isAnimating = function() {
|
|
1217
|
-
return !!this.stopAnimation;
|
|
1218
|
-
}, t.prototype.clearAnimation = function() {
|
|
1219
|
-
this.stopAnimation = null;
|
|
1220
|
-
}, t.prototype.destroy = function() {
|
|
1221
|
-
this.updateSubscribers.clear(), this.renderSubscribers.clear(), this.stop();
|
|
1222
|
-
}, t;
|
|
1223
|
-
})()
|
|
1224
|
-
);
|
|
1225
|
-
function pt(t) {
|
|
1226
|
-
return new lo(t);
|
|
1227
|
-
}
|
|
1228
|
-
var In = function(t) {
|
|
1229
|
-
return function(e) {
|
|
1230
|
-
return e.test(t);
|
|
1231
|
-
};
|
|
1232
|
-
}, co = {
|
|
1233
|
-
test: function(t) {
|
|
1234
|
-
return t === "auto";
|
|
1235
|
-
},
|
|
1236
|
-
parse: function(t) {
|
|
1237
|
-
return t;
|
|
1238
|
-
}
|
|
1239
|
-
}, Bn = [Ie, V, Ea, at, La, wa, co], zt = function(t) {
|
|
1240
|
-
return Bn.find(In(t));
|
|
1241
|
-
}, vo = K(K([], M(Bn)), [G, At]), mo = function(t) {
|
|
1242
|
-
return vo.find(In(t));
|
|
1243
|
-
};
|
|
1244
|
-
function po(t, e, r) {
|
|
1245
|
-
t.hasValue(e) ? t.getValue(e).set(r) : t.addValue(e, pt(r));
|
|
1246
|
-
}
|
|
1247
|
-
function go(t, e) {
|
|
1248
|
-
var r = oe(t, e), n = r ? t.makeTargetAnimatable(r, !1) : {}, a = n.transitionEnd, i = a === void 0 ? {} : a;
|
|
1249
|
-
n.transition;
|
|
1250
|
-
var o = Z(n, ["transitionEnd", "transition"]);
|
|
1251
|
-
o = y(y({}, o), i);
|
|
1252
|
-
for (var u in o) {
|
|
1253
|
-
var f = Ci(o[u]);
|
|
1254
|
-
po(t, u, f);
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
function ho(t, e, r) {
|
|
1258
|
-
var n, a, i, o, u = Object.keys(e).filter(function(d) {
|
|
1259
|
-
return !t.hasValue(d);
|
|
1260
|
-
}), f = u.length;
|
|
1261
|
-
if (f)
|
|
1262
|
-
for (var s = 0; s < f; s++) {
|
|
1263
|
-
var l = u[s], p = e[l], c = null;
|
|
1264
|
-
Array.isArray(p) && (c = p[0]), c === null && (c = (a = (n = r[l]) !== null && n !== void 0 ? n : t.readValue(l)) !== null && a !== void 0 ? a : e[l]), c != null && (typeof c == "string" && no(c) ? c = parseFloat(c) : !mo(c) && At.test(p) && (c = We(l, p)), t.addValue(l, pt(c)), (i = (o = r)[l]) !== null && i !== void 0 || (o[l] = c), t.setBaseTarget(l, c));
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
function yo(t, e) {
|
|
1268
|
-
if (e) {
|
|
1269
|
-
var r = e[t] || e.default || e;
|
|
1270
|
-
return r.from;
|
|
1271
|
-
}
|
|
1272
|
-
}
|
|
1273
|
-
function Po(t, e, r) {
|
|
1274
|
-
var n, a, i = {};
|
|
1275
|
-
for (var o in t)
|
|
1276
|
-
i[o] = (n = yo(o, e)) !== null && n !== void 0 ? n : (a = r.getValue(o)) === null || a === void 0 ? void 0 : a.get();
|
|
1277
|
-
return i;
|
|
1278
|
-
}
|
|
1279
|
-
function bo(t, e, r) {
|
|
1280
|
-
r === void 0 && (r = {}), t.notifyAnimationStart();
|
|
1281
|
-
var n;
|
|
1282
|
-
if (Array.isArray(e)) {
|
|
1283
|
-
var a = e.map(function(o) {
|
|
1284
|
-
return Ce(t, o, r);
|
|
1285
|
-
});
|
|
1286
|
-
n = Promise.all(a);
|
|
1287
|
-
} else if (typeof e == "string")
|
|
1288
|
-
n = Ce(t, e, r);
|
|
1289
|
-
else {
|
|
1290
|
-
var i = typeof e == "function" ? oe(t, e, r.custom) : e;
|
|
1291
|
-
n = On(t, i, r);
|
|
1292
|
-
}
|
|
1293
|
-
return n.then(function() {
|
|
1294
|
-
return t.notifyAnimationComplete(e);
|
|
1295
|
-
});
|
|
1296
|
-
}
|
|
1297
|
-
function Ce(t, e, r) {
|
|
1298
|
-
var n;
|
|
1299
|
-
r === void 0 && (r = {});
|
|
1300
|
-
var a = oe(t, e, r.custom), i = (a || {}).transition, o = i === void 0 ? t.getDefaultTransition() || {} : i;
|
|
1301
|
-
r.transitionOverride && (o = r.transitionOverride);
|
|
1302
|
-
var u = a ? function() {
|
|
1303
|
-
return On(t, a, r);
|
|
1304
|
-
} : function() {
|
|
1305
|
-
return Promise.resolve();
|
|
1306
|
-
}, f = !((n = t.variantChildren) === null || n === void 0) && n.size ? function(d) {
|
|
1307
|
-
d === void 0 && (d = 0);
|
|
1308
|
-
var v = o.delayChildren, P = v === void 0 ? 0 : v, m = o.staggerChildren, h = o.staggerDirection;
|
|
1309
|
-
return To(t, e, P + d, m, h, r);
|
|
1310
|
-
} : function() {
|
|
1311
|
-
return Promise.resolve();
|
|
1312
|
-
}, s = o.when;
|
|
1313
|
-
if (s) {
|
|
1314
|
-
var l = M(s === "beforeChildren" ? [u, f] : [f, u], 2), p = l[0], c = l[1];
|
|
1315
|
-
return p().then(c);
|
|
1316
|
-
} else
|
|
1317
|
-
return Promise.all([u(), f(r.delay)]);
|
|
1318
|
-
}
|
|
1319
|
-
function On(t, e, r) {
|
|
1320
|
-
var n, a = r === void 0 ? {} : r, i = a.delay, o = i === void 0 ? 0 : i, u = a.transitionOverride, f = a.type, s = t.makeTargetAnimatable(e), l = s.transition, p = l === void 0 ? t.getDefaultTransition() : l, c = s.transitionEnd, d = Z(s, ["transition", "transitionEnd"]);
|
|
1321
|
-
u && (p = u);
|
|
1322
|
-
var v = [], P = f && ((n = t.animationState) === null || n === void 0 ? void 0 : n.getState()[f]);
|
|
1323
|
-
for (var m in d) {
|
|
1324
|
-
var h = t.getValue(m), A = d[m];
|
|
1325
|
-
if (!(!h || A === void 0 || P && Ao(P, m))) {
|
|
1326
|
-
var L = ee(m, h, A, y({ delay: o }, p));
|
|
1327
|
-
v.push(L);
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
return Promise.all(v).then(function() {
|
|
1331
|
-
c && go(t, c);
|
|
1332
|
-
});
|
|
1333
|
-
}
|
|
1334
|
-
function To(t, e, r, n, a, i) {
|
|
1335
|
-
r === void 0 && (r = 0), n === void 0 && (n = 0), a === void 0 && (a = 1);
|
|
1336
|
-
var o = [], u = (t.variantChildren.size - 1) * n, f = a === 1 ? function(s) {
|
|
1337
|
-
return s === void 0 && (s = 0), s * n;
|
|
1338
|
-
} : function(s) {
|
|
1339
|
-
return s === void 0 && (s = 0), u - s * n;
|
|
1340
|
-
};
|
|
1341
|
-
return Array.from(t.variantChildren).sort(xo).forEach(function(s, l) {
|
|
1342
|
-
o.push(Ce(s, e, y(y({}, i), { delay: r + f(l) })).then(function() {
|
|
1343
|
-
return s.notifyAnimationComplete(e);
|
|
1344
|
-
}));
|
|
1345
|
-
}), Promise.all(o);
|
|
1346
|
-
}
|
|
1347
|
-
function xo(t, e) {
|
|
1348
|
-
return t.sortNodePosition(e);
|
|
1349
|
-
}
|
|
1350
|
-
function Ao(t, e) {
|
|
1351
|
-
var r = t.protectedKeys, n = t.needsAnimating, a = r.hasOwnProperty(e) && n[e] !== !0;
|
|
1352
|
-
return n[e] = !1, a;
|
|
1353
|
-
}
|
|
1354
|
-
var qe = [
|
|
1355
|
-
F.Animate,
|
|
1356
|
-
F.Hover,
|
|
1357
|
-
F.Tap,
|
|
1358
|
-
F.Drag,
|
|
1359
|
-
F.Focus,
|
|
1360
|
-
F.Exit
|
|
1361
|
-
], Vo = K([], M(qe)).reverse(), So = qe.length;
|
|
1362
|
-
function Co(t) {
|
|
1363
|
-
return function(e) {
|
|
1364
|
-
return Promise.all(e.map(function(r) {
|
|
1365
|
-
var n = r.animation, a = r.options;
|
|
1366
|
-
return bo(t, n, a);
|
|
1367
|
-
}));
|
|
1368
|
-
};
|
|
1369
|
-
}
|
|
1370
|
-
function Eo(t) {
|
|
1371
|
-
var e = Co(t), r = wo(), n = {}, a = !0, i = function(l, p) {
|
|
1372
|
-
var c = oe(t, p);
|
|
1373
|
-
if (c) {
|
|
1374
|
-
c.transition;
|
|
1375
|
-
var d = c.transitionEnd, v = Z(c, ["transition", "transitionEnd"]);
|
|
1376
|
-
l = y(y(y({}, l), v), d);
|
|
1377
|
-
}
|
|
1378
|
-
return l;
|
|
1379
|
-
};
|
|
1380
|
-
function o(l) {
|
|
1381
|
-
return n[l] !== void 0;
|
|
1382
|
-
}
|
|
1383
|
-
function u(l) {
|
|
1384
|
-
e = l(t);
|
|
1385
|
-
}
|
|
1386
|
-
function f(l, p) {
|
|
1387
|
-
for (var c, d = t.getProps(), v = t.getVariantContext(!0) || {}, P = [], m = /* @__PURE__ */ new Set(), h = {}, A = 1 / 0, L = function(w) {
|
|
1388
|
-
var E = Vo[w], S = r[E], I = (c = d[E]) !== null && c !== void 0 ? c : v[E], _ = W(I), k = E === p ? S.isActive : null;
|
|
1389
|
-
k === !1 && (A = w);
|
|
1390
|
-
var X = I === v[E] && I !== d[E] && _;
|
|
1391
|
-
if (X && a && t.manuallyAnimateOnMount && (X = !1), S.protectedKeys = y({}, h), // If it isn't active and hasn't *just* been set as inactive
|
|
1392
|
-
!S.isActive && k === null || // If we didn't and don't have any defined prop for this animation type
|
|
1393
|
-
!I && !S.prevProp || // Or if the prop doesn't define an animation
|
|
1394
|
-
Ke(I) || typeof I == "boolean")
|
|
1395
|
-
return "continue";
|
|
1396
|
-
var j = Lo(S.prevProp, I) || // If we're making this variant active, we want to always make it active
|
|
1397
|
-
E === p && S.isActive && !X && _ || // If we removed a higher-priority variant (i is in reverse order)
|
|
1398
|
-
w > A && _, ut = Array.isArray(I) ? I : [I], tt = ut.reduce(i, {});
|
|
1399
|
-
k === !1 && (tt = {});
|
|
1400
|
-
var nt = S.prevResolvedValues, st = nt === void 0 ? {} : nt, _t = y(y({}, st), tt), ft = function(ct) {
|
|
1401
|
-
j = !0, m.delete(ct), S.needsAnimating[ct] = !0;
|
|
1402
|
-
};
|
|
1403
|
-
for (var Y in _t) {
|
|
1404
|
-
var q = tt[Y], lt = st[Y];
|
|
1405
|
-
h.hasOwnProperty(Y) || (q !== lt ? Mt(q) && Mt(lt) ? Ln(q, lt) ? S.protectedKeys[Y] = !0 : ft(Y) : q !== void 0 ? ft(Y) : m.add(Y) : q !== void 0 && m.has(Y) ? ft(Y) : S.protectedKeys[Y] = !0);
|
|
1406
|
-
}
|
|
1407
|
-
S.prevProp = I, S.prevResolvedValues = tt, S.isActive && (h = y(y({}, h), tt)), a && t.blockInitialAnimation && (j = !1), j && !X && P.push.apply(P, K([], M(ut.map(function(ct) {
|
|
1408
|
-
return {
|
|
1409
|
-
animation: ct,
|
|
1410
|
-
options: y({ type: E }, l)
|
|
1411
|
-
};
|
|
1412
|
-
}))));
|
|
1413
|
-
}, D = 0; D < So; D++)
|
|
1414
|
-
L(D);
|
|
1415
|
-
if (n = y({}, h), m.size) {
|
|
1416
|
-
var C = {};
|
|
1417
|
-
m.forEach(function(w) {
|
|
1418
|
-
var E = t.getBaseTarget(w);
|
|
1419
|
-
E !== void 0 && (C[w] = E);
|
|
1420
|
-
}), P.push({ animation: C });
|
|
1421
|
-
}
|
|
1422
|
-
var x = !!P.length;
|
|
1423
|
-
return a && d.initial === !1 && !t.manuallyAnimateOnMount && (x = !1), a = !1, x ? e(P) : Promise.resolve();
|
|
1424
|
-
}
|
|
1425
|
-
function s(l, p, c) {
|
|
1426
|
-
var d;
|
|
1427
|
-
return r[l].isActive === p ? Promise.resolve() : ((d = t.variantChildren) === null || d === void 0 || d.forEach(function(v) {
|
|
1428
|
-
var P;
|
|
1429
|
-
return (P = v.animationState) === null || P === void 0 ? void 0 : P.setActive(l, p);
|
|
1430
|
-
}), r[l].isActive = p, f(c, l));
|
|
1431
|
-
}
|
|
1432
|
-
return {
|
|
1433
|
-
isAnimated: o,
|
|
1434
|
-
animateChanges: f,
|
|
1435
|
-
setActive: s,
|
|
1436
|
-
setAnimateFunction: u,
|
|
1437
|
-
getState: function() {
|
|
1438
|
-
return r;
|
|
1439
|
-
}
|
|
1440
|
-
};
|
|
1441
|
-
}
|
|
1442
|
-
function Lo(t, e) {
|
|
1443
|
-
return typeof e == "string" ? e !== t : nn(e) ? !Ln(e, t) : !1;
|
|
1444
|
-
}
|
|
1445
|
-
function yt(t) {
|
|
1446
|
-
return t === void 0 && (t = !1), {
|
|
1447
|
-
isActive: t,
|
|
1448
|
-
protectedKeys: {},
|
|
1449
|
-
needsAnimating: {},
|
|
1450
|
-
prevResolvedValues: {}
|
|
1451
|
-
};
|
|
1452
|
-
}
|
|
1453
|
-
function wo() {
|
|
1454
|
-
var t;
|
|
1455
|
-
return t = {}, t[F.Animate] = yt(!0), t[F.Hover] = yt(), t[F.Tap] = yt(), t[F.Drag] = yt(), t[F.Focus] = yt(), t[F.Exit] = yt(), t;
|
|
1456
|
-
}
|
|
1457
|
-
var Ro = {
|
|
1458
|
-
animation: mt(function(t) {
|
|
1459
|
-
var e = t.visualElement, r = t.animate;
|
|
1460
|
-
e.animationState || (e.animationState = Eo(e)), Ke(r) && Q(function() {
|
|
1461
|
-
return r.subscribe(e);
|
|
1462
|
-
}, [r]);
|
|
1463
|
-
}),
|
|
1464
|
-
exit: mt(function(t) {
|
|
1465
|
-
var e = t.custom, r = t.visualElement, n = M(en(), 2), a = n[0], i = n[1], o = O(St);
|
|
1466
|
-
Q(function() {
|
|
1467
|
-
var u, f, s = (u = r.animationState) === null || u === void 0 ? void 0 : u.setActive(F.Exit, !a, { custom: (f = o?.custom) !== null && f !== void 0 ? f : e });
|
|
1468
|
-
!a && s?.then(i);
|
|
1469
|
-
}, [a]);
|
|
1470
|
-
})
|
|
1471
|
-
}, jn = (
|
|
1472
|
-
/** @class */
|
|
1473
|
-
(function() {
|
|
1474
|
-
function t(e, r, n) {
|
|
1475
|
-
var a = this, i = n === void 0 ? {} : n, o = i.transformPagePoint;
|
|
1476
|
-
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.updatePoint = function() {
|
|
1477
|
-
if (a.lastMoveEvent && a.lastMoveEventInfo) {
|
|
1478
|
-
var c = he(a.lastMoveEventInfo, a.history), d = a.startEvent !== null, v = qr(c.offset, { x: 0, y: 0 }) >= 3;
|
|
1479
|
-
if (!(!d && !v)) {
|
|
1480
|
-
var P = c.point, m = Se().timestamp;
|
|
1481
|
-
a.history.push(y(y({}, P), { timestamp: m }));
|
|
1482
|
-
var h = a.handlers, A = h.onStart, L = h.onMove;
|
|
1483
|
-
d || (A && A(a.lastMoveEvent, c), a.startEvent = a.lastMoveEvent), L && L(a.lastMoveEvent, c);
|
|
1484
|
-
}
|
|
1485
|
-
}
|
|
1486
|
-
}, this.handlePointerMove = function(c, d) {
|
|
1487
|
-
if (a.lastMoveEvent = c, a.lastMoveEventInfo = ge(d, a.transformPagePoint), bn(c) && c.buttons === 0) {
|
|
1488
|
-
a.handlePointerUp(c, d);
|
|
1489
|
-
return;
|
|
1490
|
-
}
|
|
1491
|
-
rt.update(a.updatePoint, !0);
|
|
1492
|
-
}, this.handlePointerUp = function(c, d) {
|
|
1493
|
-
a.end();
|
|
1494
|
-
var v = a.handlers, P = v.onEnd, m = v.onSessionEnd, h = he(ge(d, a.transformPagePoint), a.history);
|
|
1495
|
-
a.startEvent && P && P(c, h), m && m(c, h);
|
|
1496
|
-
}, !(Tn(e) && e.touches.length > 1)) {
|
|
1497
|
-
this.handlers = r, this.transformPagePoint = o;
|
|
1498
|
-
var u = Xe(e), f = ge(u, this.transformPagePoint), s = f.point, l = Se().timestamp;
|
|
1499
|
-
this.history = [y(y({}, s), { timestamp: l })];
|
|
1500
|
-
var p = r.onSessionStart;
|
|
1501
|
-
p && p(e, he(f, this.history)), this.removeListeners = Be(Tt(window, "pointermove", this.handlePointerMove), Tt(window, "pointerup", this.handlePointerUp), Tt(window, "pointercancel", this.handlePointerUp));
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
return t.prototype.updateHandlers = function(e) {
|
|
1505
|
-
this.handlers = e;
|
|
1506
|
-
}, t.prototype.end = function() {
|
|
1507
|
-
this.removeListeners && this.removeListeners(), qt.update(this.updatePoint);
|
|
1508
|
-
}, t;
|
|
1509
|
-
})()
|
|
1510
|
-
);
|
|
1511
|
-
function ge(t, e) {
|
|
1512
|
-
return e ? { point: e(t.point) } : t;
|
|
1513
|
-
}
|
|
1514
|
-
function hr(t, e) {
|
|
1515
|
-
return { x: t.x - e.x, y: t.y - e.y };
|
|
1516
|
-
}
|
|
1517
|
-
function he(t, e) {
|
|
1518
|
-
var r = t.point;
|
|
1519
|
-
return {
|
|
1520
|
-
point: r,
|
|
1521
|
-
delta: hr(r, Hn(e)),
|
|
1522
|
-
offset: hr(r, Do(e)),
|
|
1523
|
-
velocity: Mo(e, 0.1)
|
|
1524
|
-
};
|
|
1525
|
-
}
|
|
1526
|
-
function Do(t) {
|
|
1527
|
-
return t[0];
|
|
1528
|
-
}
|
|
1529
|
-
function Hn(t) {
|
|
1530
|
-
return t[t.length - 1];
|
|
1531
|
-
}
|
|
1532
|
-
function Mo(t, e) {
|
|
1533
|
-
if (t.length < 2)
|
|
1534
|
-
return { x: 0, y: 0 };
|
|
1535
|
-
for (var r = t.length - 1, n = null, a = Hn(t); r >= 0 && (n = t[r], !(a.timestamp - n.timestamp > te(e))); )
|
|
1536
|
-
r--;
|
|
1537
|
-
if (!n)
|
|
1538
|
-
return { x: 0, y: 0 };
|
|
1539
|
-
var i = (a.timestamp - n.timestamp) / 1e3;
|
|
1540
|
-
if (i === 0)
|
|
1541
|
-
return { x: 0, y: 0 };
|
|
1542
|
-
var o = {
|
|
1543
|
-
x: (a.x - n.x) / i,
|
|
1544
|
-
y: (a.y - n.y) / i
|
|
1545
|
-
};
|
|
1546
|
-
return o.x === 1 / 0 && (o.x = 0), o.y === 1 / 0 && (o.y = 0), o;
|
|
1547
|
-
}
|
|
1548
|
-
function Fo(t) {
|
|
1549
|
-
return t;
|
|
1550
|
-
}
|
|
1551
|
-
function _n(t) {
|
|
1552
|
-
var e = t.top, r = t.left, n = t.right, a = t.bottom;
|
|
1553
|
-
return {
|
|
1554
|
-
x: { min: r, max: n },
|
|
1555
|
-
y: { min: e, max: a }
|
|
1556
|
-
};
|
|
1557
|
-
}
|
|
1558
|
-
function Io(t) {
|
|
1559
|
-
var e = t.x, r = t.y;
|
|
1560
|
-
return {
|
|
1561
|
-
top: r.min,
|
|
1562
|
-
bottom: r.max,
|
|
1563
|
-
left: e.min,
|
|
1564
|
-
right: e.max
|
|
1565
|
-
};
|
|
1566
|
-
}
|
|
1567
|
-
function Bo(t, e) {
|
|
1568
|
-
var r = t.top, n = t.left, a = t.bottom, i = t.right;
|
|
1569
|
-
e === void 0 && (e = Fo);
|
|
1570
|
-
var o = e({ x: n, y: r }), u = e({ x: i, y: a });
|
|
1571
|
-
return {
|
|
1572
|
-
top: o.y,
|
|
1573
|
-
left: o.x,
|
|
1574
|
-
bottom: u.y,
|
|
1575
|
-
right: u.x
|
|
1576
|
-
};
|
|
1577
|
-
}
|
|
1578
|
-
function ot() {
|
|
1579
|
-
return { x: { min: 0, max: 1 }, y: { min: 0, max: 1 } };
|
|
1580
|
-
}
|
|
1581
|
-
function Oo(t) {
|
|
1582
|
-
return {
|
|
1583
|
-
x: y({}, t.x),
|
|
1584
|
-
y: y({}, t.y)
|
|
1585
|
-
};
|
|
1586
|
-
}
|
|
1587
|
-
var yr = {
|
|
1588
|
-
translate: 0,
|
|
1589
|
-
scale: 1,
|
|
1590
|
-
origin: 0,
|
|
1591
|
-
originPoint: 0
|
|
1592
|
-
};
|
|
1593
|
-
function Pr() {
|
|
1594
|
-
return {
|
|
1595
|
-
x: y({}, yr),
|
|
1596
|
-
y: y({}, yr)
|
|
1597
|
-
};
|
|
1598
|
-
}
|
|
1599
|
-
function N(t) {
|
|
1600
|
-
return [t("x"), t("y")];
|
|
1601
|
-
}
|
|
1602
|
-
function Un(t, e, r) {
|
|
1603
|
-
var n = e.min, a = e.max;
|
|
1604
|
-
return n !== void 0 && t < n ? t = r ? J(n, t, r.min) : Math.max(t, n) : a !== void 0 && t > a && (t = r ? J(a, t, r.max) : Math.min(t, a)), t;
|
|
1605
|
-
}
|
|
1606
|
-
function jo(t, e, r, n, a) {
|
|
1607
|
-
var i = t - e * r;
|
|
1608
|
-
return n ? Un(i, n, a) : i;
|
|
1609
|
-
}
|
|
1610
|
-
function br(t, e, r) {
|
|
1611
|
-
return {
|
|
1612
|
-
min: e !== void 0 ? t.min + e : void 0,
|
|
1613
|
-
max: r !== void 0 ? t.max + r - (t.max - t.min) : void 0
|
|
1614
|
-
};
|
|
1615
|
-
}
|
|
1616
|
-
function Ho(t, e) {
|
|
1617
|
-
var r = e.top, n = e.left, a = e.bottom, i = e.right;
|
|
1618
|
-
return {
|
|
1619
|
-
x: br(t.x, n, i),
|
|
1620
|
-
y: br(t.y, r, a)
|
|
1621
|
-
};
|
|
1622
|
-
}
|
|
1623
|
-
function Tr(t, e) {
|
|
1624
|
-
var r, n = e.min - t.min, a = e.max - t.max;
|
|
1625
|
-
return e.max - e.min < t.max - t.min && (r = M([a, n], 2), n = r[0], a = r[1]), {
|
|
1626
|
-
min: t.min + n,
|
|
1627
|
-
max: t.min + a
|
|
1628
|
-
};
|
|
1629
|
-
}
|
|
1630
|
-
function _o(t, e) {
|
|
1631
|
-
return {
|
|
1632
|
-
x: Tr(t.x, e.x),
|
|
1633
|
-
y: Tr(t.y, e.y)
|
|
1634
|
-
};
|
|
1635
|
-
}
|
|
1636
|
-
function Uo(t, e, r) {
|
|
1637
|
-
var n = t.max - t.min, a = J(e.min, e.max - n, r);
|
|
1638
|
-
return { min: a, max: a + n };
|
|
1639
|
-
}
|
|
1640
|
-
function No(t, e) {
|
|
1641
|
-
var r = {};
|
|
1642
|
-
return e.min !== void 0 && (r.min = e.min - t.min), e.max !== void 0 && (r.max = e.max - t.min), r;
|
|
1643
|
-
}
|
|
1644
|
-
var Nn = 0.35;
|
|
1645
|
-
function Ko(t) {
|
|
1646
|
-
return t === !1 ? t = 0 : t === !0 && (t = Nn), {
|
|
1647
|
-
x: xr(t, "left", "right"),
|
|
1648
|
-
y: xr(t, "top", "bottom")
|
|
1649
|
-
};
|
|
1650
|
-
}
|
|
1651
|
-
function xr(t, e, r) {
|
|
1652
|
-
return {
|
|
1653
|
-
min: Ar(t, e),
|
|
1654
|
-
max: Ar(t, r)
|
|
1655
|
-
};
|
|
1656
|
-
}
|
|
1657
|
-
function Ar(t, e) {
|
|
1658
|
-
var r;
|
|
1659
|
-
return typeof t == "number" ? t : (r = t[e]) !== null && r !== void 0 ? r : 0;
|
|
1660
|
-
}
|
|
1661
|
-
function Kn(t, e) {
|
|
1662
|
-
var r = t.getBoundingClientRect();
|
|
1663
|
-
return _n(Bo(r, e));
|
|
1664
|
-
}
|
|
1665
|
-
var Yo = function(t) {
|
|
1666
|
-
return Ra(0, 1, t);
|
|
1667
|
-
};
|
|
1668
|
-
function Vr(t, e, r) {
|
|
1669
|
-
return e === void 0 && (e = 0), r === void 0 && (r = 0.01), qr(t, e) < r;
|
|
1670
|
-
}
|
|
1671
|
-
function It(t) {
|
|
1672
|
-
return t.max - t.min;
|
|
1673
|
-
}
|
|
1674
|
-
function Xo(t, e) {
|
|
1675
|
-
var r = 0.5, n = It(t), a = It(e);
|
|
1676
|
-
return a > n ? r = be(e.min, e.max - n, t.min) : n > a && (r = be(t.min, t.max - a, e.min)), Yo(r);
|
|
1677
|
-
}
|
|
1678
|
-
function Sr(t, e, r, n) {
|
|
1679
|
-
n === void 0 && (n = 0.5), t.origin = n, t.originPoint = J(e.min, e.max, t.origin), t.scale = It(r) / It(e), Vr(t.scale, 1, 1e-4) && (t.scale = 1), t.translate = J(r.min, r.max, t.origin) - t.originPoint, Vr(t.translate) && (t.translate = 0);
|
|
1680
|
-
}
|
|
1681
|
-
function Yn(t, e, r, n) {
|
|
1682
|
-
Sr(t.x, e.x, r.x, Cr(n.originX)), Sr(t.y, e.y, r.y, Cr(n.originY));
|
|
1683
|
-
}
|
|
1684
|
-
function Cr(t) {
|
|
1685
|
-
return typeof t == "number" ? t : 0.5;
|
|
1686
|
-
}
|
|
1687
|
-
function Er(t, e, r) {
|
|
1688
|
-
t.min = r.min + e.min, t.max = t.min + It(e);
|
|
1689
|
-
}
|
|
1690
|
-
function zo(t, e) {
|
|
1691
|
-
Er(t.target.x, t.relativeTarget.x, e.target.x), Er(t.target.y, t.relativeTarget.y, e.target.y);
|
|
1692
|
-
}
|
|
1693
|
-
var $e = function(t, e) {
|
|
1694
|
-
return t.depth - e.depth;
|
|
1695
|
-
};
|
|
1696
|
-
function Xn(t) {
|
|
1697
|
-
var e = t.projection.isEnabled;
|
|
1698
|
-
return e || t.shouldResetTransform();
|
|
1699
|
-
}
|
|
1700
|
-
function re(t, e) {
|
|
1701
|
-
e === void 0 && (e = []);
|
|
1702
|
-
var r = t.parent;
|
|
1703
|
-
return r && re(r, e), Xn(t) && e.push(t), e;
|
|
1704
|
-
}
|
|
1705
|
-
function Go(t) {
|
|
1706
|
-
var e = [], r = function(n) {
|
|
1707
|
-
Xn(n) && e.push(n), n.children.forEach(r);
|
|
1708
|
-
};
|
|
1709
|
-
return t.children.forEach(r), e.sort($e);
|
|
1710
|
-
}
|
|
1711
|
-
function Jt(t) {
|
|
1712
|
-
if (!t.shouldResetTransform()) {
|
|
1713
|
-
var e = t.getLayoutState();
|
|
1714
|
-
t.notifyBeforeLayoutMeasure(e.layout), e.isHydrated = !0, e.layout = t.measureViewportBox(), e.layoutCorrected = Oo(e.layout), t.notifyLayoutMeasure(e.layout, t.prevViewportBox || e.layout), rt.update(function() {
|
|
1715
|
-
return t.rebaseProjectionTarget();
|
|
1716
|
-
});
|
|
1717
|
-
}
|
|
1718
|
-
}
|
|
1719
|
-
function Wo(t) {
|
|
1720
|
-
t.shouldResetTransform() || (t.prevViewportBox = t.measureViewportBox(!1), t.rebaseProjectionTarget(!1, t.prevViewportBox));
|
|
1721
|
-
}
|
|
1722
|
-
function Zo(t, e, r, n) {
|
|
1723
|
-
t.min = J(e.min, r.min, n), t.max = J(e.max, r.max, n);
|
|
1724
|
-
}
|
|
1725
|
-
function Lr(t, e) {
|
|
1726
|
-
return {
|
|
1727
|
-
min: e.min - t.min,
|
|
1728
|
-
max: e.max - t.min
|
|
1729
|
-
};
|
|
1730
|
-
}
|
|
1731
|
-
function Vt(t, e) {
|
|
1732
|
-
return {
|
|
1733
|
-
x: Lr(t.x, e.x),
|
|
1734
|
-
y: Lr(t.y, e.y)
|
|
1735
|
-
};
|
|
1736
|
-
}
|
|
1737
|
-
function qo(t, e) {
|
|
1738
|
-
var r = t.getLayoutId(), n = e.getLayoutId();
|
|
1739
|
-
return r !== n || n === void 0 && t !== e;
|
|
1740
|
-
}
|
|
1741
|
-
function zn(t) {
|
|
1742
|
-
var e = t.getProps(), r = e.drag, n = e._dragX;
|
|
1743
|
-
return r && !n;
|
|
1744
|
-
}
|
|
1745
|
-
function wr(t, e) {
|
|
1746
|
-
t.min = e.min, t.max = e.max;
|
|
1747
|
-
}
|
|
1748
|
-
function $o(t, e) {
|
|
1749
|
-
wr(t.x, e.x), wr(t.y, e.y);
|
|
1750
|
-
}
|
|
1751
|
-
function ne(t, e, r) {
|
|
1752
|
-
var n = t - r, a = e * n;
|
|
1753
|
-
return r + a;
|
|
1754
|
-
}
|
|
1755
|
-
function Rr(t, e, r, n, a) {
|
|
1756
|
-
return a !== void 0 && (t = ne(t, a, n)), ne(t, r, n) + e;
|
|
1757
|
-
}
|
|
1758
|
-
function Ee(t, e, r, n, a) {
|
|
1759
|
-
e === void 0 && (e = 0), r === void 0 && (r = 1), t.min = Rr(t.min, e, r, n, a), t.max = Rr(t.max, e, r, n, a);
|
|
1760
|
-
}
|
|
1761
|
-
function Jo(t, e) {
|
|
1762
|
-
var r = e.x, n = e.y;
|
|
1763
|
-
Ee(t.x, r.translate, r.scale, r.originPoint), Ee(t.y, n.translate, n.scale, n.originPoint);
|
|
1764
|
-
}
|
|
1765
|
-
function Dr(t, e, r, n) {
|
|
1766
|
-
var a = M(n, 3), i = a[0], o = a[1], u = a[2];
|
|
1767
|
-
t.min = e.min, t.max = e.max;
|
|
1768
|
-
var f = r[u] !== void 0 ? r[u] : 0.5, s = J(e.min, e.max, f);
|
|
1769
|
-
Ee(t, r[i], r[o], s, r.scale);
|
|
1770
|
-
}
|
|
1771
|
-
var Gn = ["x", "scaleX", "originX"], Wn = ["y", "scaleY", "originY"];
|
|
1772
|
-
function Le(t, e, r) {
|
|
1773
|
-
Dr(t.x, e.x, r, Gn), Dr(t.y, e.y, r, Wn);
|
|
1774
|
-
}
|
|
1775
|
-
function Mr(t, e, r, n, a) {
|
|
1776
|
-
return t -= e, t = ne(t, 1 / r, n), a !== void 0 && (t = ne(t, 1 / a, n)), t;
|
|
1777
|
-
}
|
|
1778
|
-
function Qo(t, e, r, n, a) {
|
|
1779
|
-
e === void 0 && (e = 0), r === void 0 && (r = 1), n === void 0 && (n = 0.5);
|
|
1780
|
-
var i = J(t.min, t.max, n) - e;
|
|
1781
|
-
t.min = Mr(t.min, e, r, i, a), t.max = Mr(t.max, e, r, i, a);
|
|
1782
|
-
}
|
|
1783
|
-
function Fr(t, e, r) {
|
|
1784
|
-
var n = M(r, 3), a = n[0], i = n[1], o = n[2];
|
|
1785
|
-
Qo(t, e[a], e[i], e[o], e.scale);
|
|
1786
|
-
}
|
|
1787
|
-
function Zn(t, e) {
|
|
1788
|
-
Fr(t.x, e, Gn), Fr(t.y, e, Wn);
|
|
1789
|
-
}
|
|
1790
|
-
function ko(t, e, r) {
|
|
1791
|
-
var n = r.length;
|
|
1792
|
-
if (n) {
|
|
1793
|
-
e.x = e.y = 1;
|
|
1794
|
-
for (var a, i, o = 0; o < n; o++)
|
|
1795
|
-
a = r[o], i = a.getLayoutState().delta, e.x *= i.x.scale, e.y *= i.y.scale, Jo(t, i), zn(a) && Le(t, t, a.getLatestValues());
|
|
1796
|
-
}
|
|
1797
|
-
}
|
|
1798
|
-
function tu(t, e) {
|
|
1799
|
-
e === void 0 && (e = !0);
|
|
1800
|
-
var r = t.getProjectionParent();
|
|
1801
|
-
if (!r)
|
|
1802
|
-
return !1;
|
|
1803
|
-
var n;
|
|
1804
|
-
return e ? (n = Vt(r.projection.target, t.projection.target), Zn(n, r.getLatestValues())) : n = Vt(r.getLayoutState().layout, t.getLayoutState().layout), N(function(a) {
|
|
1805
|
-
return t.setProjectionTargetAxis(a, n[a].min, n[a].max, !0);
|
|
1806
|
-
}), !0;
|
|
1807
|
-
}
|
|
1808
|
-
var Lt = /* @__PURE__ */ new Set();
|
|
1809
|
-
function Ir(t, e, r) {
|
|
1810
|
-
t[r] || (t[r] = []), t[r].push(e);
|
|
1811
|
-
}
|
|
1812
|
-
function we(t) {
|
|
1813
|
-
return Lt.add(t), function() {
|
|
1814
|
-
return Lt.delete(t);
|
|
1815
|
-
};
|
|
1816
|
-
}
|
|
1817
|
-
function Re() {
|
|
1818
|
-
if (Lt.size) {
|
|
1819
|
-
var t = 0, e = [[]], r = [], n = function(u) {
|
|
1820
|
-
return Ir(e, u, t);
|
|
1821
|
-
}, a = function(u) {
|
|
1822
|
-
Ir(r, u, t), t++;
|
|
1823
|
-
};
|
|
1824
|
-
Lt.forEach(function(u) {
|
|
1825
|
-
u(n, a), t = 0;
|
|
1826
|
-
}), Lt.clear();
|
|
1827
|
-
for (var i = r.length, o = 0; o <= i; o++)
|
|
1828
|
-
e[o] && e[o].forEach(Br), r[o] && r[o].forEach(Br);
|
|
1829
|
-
}
|
|
1830
|
-
}
|
|
1831
|
-
var Br = function(t) {
|
|
1832
|
-
return t();
|
|
1833
|
-
}, eu = /* @__PURE__ */ new WeakMap(), Or, ru = (
|
|
1834
|
-
/** @class */
|
|
1835
|
-
(function() {
|
|
1836
|
-
function t(e) {
|
|
1837
|
-
var r = e.visualElement;
|
|
1838
|
-
this.isDragging = !1, this.currentDirection = null, this.constraints = !1, this.elastic = ot(), this.props = {}, this.hasMutatedConstraints = !1, this.cursorProgress = {
|
|
1839
|
-
x: 0.5,
|
|
1840
|
-
y: 0.5
|
|
1841
|
-
}, this.originPoint = {}, this.openGlobalLock = null, this.panSession = null, this.visualElement = r, this.visualElement.enableLayoutProjection(), eu.set(r, this);
|
|
1842
|
-
}
|
|
1843
|
-
return t.prototype.start = function(e, r) {
|
|
1844
|
-
var n = this, a = r === void 0 ? {} : r, i = a.snapToCursor, o = i === void 0 ? !1 : i, u = a.cursorProgress, f = function(d) {
|
|
1845
|
-
var v;
|
|
1846
|
-
n.stopMotion();
|
|
1847
|
-
var P = Hi(d).point;
|
|
1848
|
-
(v = n.cancelLayout) === null || v === void 0 || v.call(n), n.cancelLayout = we(function(m, h) {
|
|
1849
|
-
var A = re(n.visualElement), L = Go(n.visualElement), D = K(K([], M(A)), M(L)), C = !1;
|
|
1850
|
-
n.isLayoutDrag() && n.visualElement.lockProjectionTarget(), h(function() {
|
|
1851
|
-
D.forEach(function(x) {
|
|
1852
|
-
return x.resetTransform();
|
|
1853
|
-
});
|
|
1854
|
-
}), m(function() {
|
|
1855
|
-
Jt(n.visualElement), L.forEach(Jt);
|
|
1856
|
-
}), h(function() {
|
|
1857
|
-
D.forEach(function(x) {
|
|
1858
|
-
return x.restoreTransform();
|
|
1859
|
-
}), o && (C = n.snapToCursor(P));
|
|
1860
|
-
}), m(function() {
|
|
1861
|
-
var x = !!(n.getAxisMotionValue("x") && !n.isExternalDrag());
|
|
1862
|
-
x || n.visualElement.rebaseProjectionTarget(!0, n.visualElement.measureViewportBox(!1)), n.visualElement.scheduleUpdateLayoutProjection();
|
|
1863
|
-
var w = n.visualElement.projection;
|
|
1864
|
-
N(function(E) {
|
|
1865
|
-
if (!C) {
|
|
1866
|
-
var S = w.target[E], I = S.min, _ = S.max;
|
|
1867
|
-
n.cursorProgress[E] = u ? u[E] : be(I, _, P[E]);
|
|
1868
|
-
}
|
|
1869
|
-
var k = n.getAxisMotionValue(E);
|
|
1870
|
-
k && (n.originPoint[E] = k.get());
|
|
1871
|
-
});
|
|
1872
|
-
}), h(function() {
|
|
1873
|
-
bt.update(), bt.preRender(), bt.render(), bt.postRender();
|
|
1874
|
-
}), m(function() {
|
|
1875
|
-
return n.resolveDragConstraints();
|
|
1876
|
-
});
|
|
1877
|
-
});
|
|
1878
|
-
}, s = function(d, v) {
|
|
1879
|
-
var P, m, h, A = n.props, L = A.drag, D = A.dragPropagation;
|
|
1880
|
-
L && !D && (n.openGlobalLock && n.openGlobalLock(), n.openGlobalLock = Sn(L), !n.openGlobalLock) || (Re(), n.isDragging = !0, n.currentDirection = null, (m = (P = n.props).onDragStart) === null || m === void 0 || m.call(P, d, v), (h = n.visualElement.animationState) === null || h === void 0 || h.setActive(F.Drag, !0));
|
|
1881
|
-
}, l = function(d, v) {
|
|
1882
|
-
var P, m, h, A, L = n.props, D = L.dragPropagation, C = L.dragDirectionLock;
|
|
1883
|
-
if (!(!D && !n.openGlobalLock)) {
|
|
1884
|
-
var x = v.offset;
|
|
1885
|
-
if (C && n.currentDirection === null) {
|
|
1886
|
-
n.currentDirection = nu(x), n.currentDirection !== null && ((m = (P = n.props).onDirectionLock) === null || m === void 0 || m.call(P, n.currentDirection));
|
|
1887
|
-
return;
|
|
1888
|
-
}
|
|
1889
|
-
n.updateAxis("x", v.point, x), n.updateAxis("y", v.point, x), (A = (h = n.props).onDrag) === null || A === void 0 || A.call(h, d, v), Or = d;
|
|
1890
|
-
}
|
|
1891
|
-
}, p = function(d, v) {
|
|
1892
|
-
return n.stop(d, v);
|
|
1893
|
-
}, c = this.props.transformPagePoint;
|
|
1894
|
-
this.panSession = new jn(e, {
|
|
1895
|
-
onSessionStart: f,
|
|
1896
|
-
onStart: s,
|
|
1897
|
-
onMove: l,
|
|
1898
|
-
onSessionEnd: p
|
|
1899
|
-
}, { transformPagePoint: c });
|
|
1900
|
-
}, t.prototype.resolveDragConstraints = function() {
|
|
1901
|
-
var e = this, r = this.props, n = r.dragConstraints, a = r.dragElastic, i = this.visualElement.getLayoutState().layoutCorrected;
|
|
1902
|
-
n ? this.constraints = Te(n) ? this.resolveRefConstraints(i, n) : Ho(i, n) : this.constraints = !1, this.elastic = Ko(a), this.constraints && !this.hasMutatedConstraints && N(function(o) {
|
|
1903
|
-
e.getAxisMotionValue(o) && (e.constraints[o] = No(i[o], e.constraints[o]));
|
|
1904
|
-
});
|
|
1905
|
-
}, t.prototype.resolveRefConstraints = function(e, r) {
|
|
1906
|
-
var n = this.props, a = n.onMeasureDragConstraints, i = n.transformPagePoint, o = r.current;
|
|
1907
|
-
gt(o !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop."), this.constraintsBox = Kn(o, i);
|
|
1908
|
-
var u = _o(e, this.constraintsBox);
|
|
1909
|
-
if (a) {
|
|
1910
|
-
var f = a(Io(u));
|
|
1911
|
-
this.hasMutatedConstraints = !!f, f && (u = _n(f));
|
|
1912
|
-
}
|
|
1913
|
-
return u;
|
|
1914
|
-
}, t.prototype.cancelDrag = function() {
|
|
1915
|
-
var e, r;
|
|
1916
|
-
this.visualElement.unlockProjectionTarget(), (e = this.cancelLayout) === null || e === void 0 || e.call(this), this.isDragging = !1, this.panSession && this.panSession.end(), this.panSession = null, !this.props.dragPropagation && this.openGlobalLock && (this.openGlobalLock(), this.openGlobalLock = null), (r = this.visualElement.animationState) === null || r === void 0 || r.setActive(F.Drag, !1);
|
|
1917
|
-
}, t.prototype.stop = function(e, r) {
|
|
1918
|
-
var n, a, i;
|
|
1919
|
-
(n = this.panSession) === null || n === void 0 || n.end(), this.panSession = null;
|
|
1920
|
-
var o = this.isDragging;
|
|
1921
|
-
if (this.cancelDrag(), !!o) {
|
|
1922
|
-
var u = r.velocity;
|
|
1923
|
-
this.animateDragEnd(u), (i = (a = this.props).onDragEnd) === null || i === void 0 || i.call(a, e, r);
|
|
1924
|
-
}
|
|
1925
|
-
}, t.prototype.snapToCursor = function(e) {
|
|
1926
|
-
var r = this;
|
|
1927
|
-
return N(function(n) {
|
|
1928
|
-
var a = r.props.drag;
|
|
1929
|
-
if (Gt(n, a, r.currentDirection)) {
|
|
1930
|
-
var i = r.getAxisMotionValue(n);
|
|
1931
|
-
if (i) {
|
|
1932
|
-
var o = r.visualElement.getLayoutState().layout, u = o[n].max - o[n].min, f = o[n].min + u / 2, s = e[n] - f;
|
|
1933
|
-
r.originPoint[n] = e[n], i.set(s);
|
|
1934
|
-
} else
|
|
1935
|
-
return r.cursorProgress[n] = 0.5, !0;
|
|
1936
|
-
}
|
|
1937
|
-
}).includes(!0);
|
|
1938
|
-
}, t.prototype.updateAxis = function(e, r, n) {
|
|
1939
|
-
var a = this.props.drag;
|
|
1940
|
-
if (Gt(e, a, this.currentDirection))
|
|
1941
|
-
return this.getAxisMotionValue(e) ? this.updateAxisMotionValue(e, n) : this.updateVisualElementAxis(e, r);
|
|
1942
|
-
}, t.prototype.updateAxisMotionValue = function(e, r) {
|
|
1943
|
-
var n = this.getAxisMotionValue(e);
|
|
1944
|
-
if (!(!r || !n)) {
|
|
1945
|
-
var a = this.originPoint[e] + r[e], i = this.constraints ? Un(a, this.constraints[e], this.elastic[e]) : a;
|
|
1946
|
-
n.set(i);
|
|
1947
|
-
}
|
|
1948
|
-
}, t.prototype.updateVisualElementAxis = function(e, r) {
|
|
1949
|
-
var n, a = this.visualElement.getLayoutState().layout[e], i = a.max - a.min, o = this.cursorProgress[e], u = jo(r[e], i, o, (n = this.constraints) === null || n === void 0 ? void 0 : n[e], this.elastic[e]);
|
|
1950
|
-
this.visualElement.setProjectionTargetAxis(e, u, u + i);
|
|
1951
|
-
}, t.prototype.setProps = function(e) {
|
|
1952
|
-
var r = e.drag, n = r === void 0 ? !1 : r, a = e.dragDirectionLock, i = a === void 0 ? !1 : a, o = e.dragPropagation, u = o === void 0 ? !1 : o, f = e.dragConstraints, s = f === void 0 ? !1 : f, l = e.dragElastic, p = l === void 0 ? Nn : l, c = e.dragMomentum, d = c === void 0 ? !0 : c, v = Z(e, ["drag", "dragDirectionLock", "dragPropagation", "dragConstraints", "dragElastic", "dragMomentum"]);
|
|
1953
|
-
this.props = y({
|
|
1954
|
-
drag: n,
|
|
1955
|
-
dragDirectionLock: i,
|
|
1956
|
-
dragPropagation: u,
|
|
1957
|
-
dragConstraints: s,
|
|
1958
|
-
dragElastic: p,
|
|
1959
|
-
dragMomentum: d
|
|
1960
|
-
}, v);
|
|
1961
|
-
}, t.prototype.getAxisMotionValue = function(e) {
|
|
1962
|
-
var r = this.props, n = r.layout, a = r.layoutId, i = "_drag" + e.toUpperCase();
|
|
1963
|
-
if (this.props[i])
|
|
1964
|
-
return this.props[i];
|
|
1965
|
-
if (!n && a === void 0)
|
|
1966
|
-
return this.visualElement.getValue(e, 0);
|
|
1967
|
-
}, t.prototype.isLayoutDrag = function() {
|
|
1968
|
-
return !this.getAxisMotionValue("x");
|
|
1969
|
-
}, t.prototype.isExternalDrag = function() {
|
|
1970
|
-
var e = this.props, r = e._dragX, n = e._dragY;
|
|
1971
|
-
return r || n;
|
|
1972
|
-
}, t.prototype.animateDragEnd = function(e) {
|
|
1973
|
-
var r = this, n = this.props, a = n.drag, i = n.dragMomentum, o = n.dragElastic, u = n.dragTransition, f = tu(this.visualElement, this.isLayoutDrag() && !this.isExternalDrag()), s = this.constraints || {};
|
|
1974
|
-
if (f && Object.keys(s).length && this.isLayoutDrag()) {
|
|
1975
|
-
var l = this.visualElement.getProjectionParent();
|
|
1976
|
-
if (l) {
|
|
1977
|
-
var p = Vt(l.projection.targetFinal, s);
|
|
1978
|
-
N(function(d) {
|
|
1979
|
-
var v = p[d], P = v.min, m = v.max;
|
|
1980
|
-
s[d] = {
|
|
1981
|
-
min: isNaN(P) ? void 0 : P,
|
|
1982
|
-
max: isNaN(m) ? void 0 : m
|
|
1983
|
-
};
|
|
1984
|
-
});
|
|
1985
|
-
}
|
|
1986
|
-
}
|
|
1987
|
-
var c = N(function(d) {
|
|
1988
|
-
var v;
|
|
1989
|
-
if (Gt(d, a, r.currentDirection)) {
|
|
1990
|
-
var P = (v = s?.[d]) !== null && v !== void 0 ? v : {}, m = o ? 200 : 1e6, h = o ? 40 : 1e7, A = y(y({
|
|
1991
|
-
type: "inertia",
|
|
1992
|
-
velocity: i ? e[d] : 0,
|
|
1993
|
-
bounceStiffness: m,
|
|
1994
|
-
bounceDamping: h,
|
|
1995
|
-
timeConstant: 750,
|
|
1996
|
-
restDelta: 1,
|
|
1997
|
-
restSpeed: 10
|
|
1998
|
-
}, u), P);
|
|
1999
|
-
return r.getAxisMotionValue(d) ? r.startAxisValueAnimation(d, A) : r.visualElement.startLayoutAnimation(d, A, f);
|
|
2000
|
-
}
|
|
2001
|
-
});
|
|
2002
|
-
return Promise.all(c).then(function() {
|
|
2003
|
-
var d, v;
|
|
2004
|
-
(v = (d = r.props).onDragTransitionEnd) === null || v === void 0 || v.call(d);
|
|
2005
|
-
});
|
|
2006
|
-
}, t.prototype.stopMotion = function() {
|
|
2007
|
-
var e = this;
|
|
2008
|
-
N(function(r) {
|
|
2009
|
-
var n = e.getAxisMotionValue(r);
|
|
2010
|
-
n ? n.stop() : e.visualElement.stopLayoutAnimation();
|
|
2011
|
-
});
|
|
2012
|
-
}, t.prototype.startAxisValueAnimation = function(e, r) {
|
|
2013
|
-
var n = this.getAxisMotionValue(e);
|
|
2014
|
-
if (n) {
|
|
2015
|
-
var a = n.get();
|
|
2016
|
-
return n.set(a), n.set(a), ee(e, n, 0, r);
|
|
2017
|
-
}
|
|
2018
|
-
}, t.prototype.scalePoint = function() {
|
|
2019
|
-
var e = this, r = this.props, n = r.drag, a = r.dragConstraints;
|
|
2020
|
-
if (!(!Te(a) || !this.constraintsBox)) {
|
|
2021
|
-
this.stopMotion();
|
|
2022
|
-
var i = { x: 0, y: 0 };
|
|
2023
|
-
N(function(o) {
|
|
2024
|
-
i[o] = Xo(e.visualElement.projection.target[o], e.constraintsBox[o]);
|
|
2025
|
-
}), this.updateConstraints(function() {
|
|
2026
|
-
N(function(o) {
|
|
2027
|
-
if (Gt(o, n, null)) {
|
|
2028
|
-
var u = Uo(e.visualElement.projection.target[o], e.constraintsBox[o], i[o]), f = u.min, s = u.max;
|
|
2029
|
-
e.visualElement.setProjectionTargetAxis(o, f, s);
|
|
2030
|
-
}
|
|
2031
|
-
});
|
|
2032
|
-
}), setTimeout(Re, 1);
|
|
2033
|
-
}
|
|
2034
|
-
}, t.prototype.updateConstraints = function(e) {
|
|
2035
|
-
var r = this;
|
|
2036
|
-
this.cancelLayout = we(function(n, a) {
|
|
2037
|
-
var i = re(r.visualElement);
|
|
2038
|
-
a(function() {
|
|
2039
|
-
return i.forEach(function(o) {
|
|
2040
|
-
return o.resetTransform();
|
|
2041
|
-
});
|
|
2042
|
-
}), n(function() {
|
|
2043
|
-
return Jt(r.visualElement);
|
|
2044
|
-
}), a(function() {
|
|
2045
|
-
return i.forEach(function(o) {
|
|
2046
|
-
return o.restoreTransform();
|
|
2047
|
-
});
|
|
2048
|
-
}), n(function() {
|
|
2049
|
-
r.resolveDragConstraints();
|
|
2050
|
-
}), e && a(e);
|
|
2051
|
-
});
|
|
2052
|
-
}, t.prototype.mount = function(e) {
|
|
2053
|
-
var r = this, n = e.getInstance(), a = Tt(n, "pointerdown", function(f) {
|
|
2054
|
-
var s = r.props, l = s.drag, p = s.dragListener, c = p === void 0 ? !0 : p;
|
|
2055
|
-
l && c && r.start(f);
|
|
2056
|
-
}), i = Ye(window, "resize", function() {
|
|
2057
|
-
r.scalePoint();
|
|
2058
|
-
}), o = e.onLayoutUpdate(function() {
|
|
2059
|
-
r.isDragging && r.resolveDragConstraints();
|
|
2060
|
-
}), u = e.prevDragCursor;
|
|
2061
|
-
return u && this.start(Or, { cursorProgress: u }), function() {
|
|
2062
|
-
a?.(), i?.(), o?.(), r.cancelDrag();
|
|
2063
|
-
};
|
|
2064
|
-
}, t;
|
|
2065
|
-
})()
|
|
2066
|
-
);
|
|
2067
|
-
function Gt(t, e, r) {
|
|
2068
|
-
return (e === !0 || e === t) && (r === null || r === t);
|
|
2069
|
-
}
|
|
2070
|
-
function nu(t, e) {
|
|
2071
|
-
e === void 0 && (e = 10);
|
|
2072
|
-
var r = null;
|
|
2073
|
-
return Math.abs(t.y) > e ? r = "y" : Math.abs(t.x) > e && (r = "x"), r;
|
|
2074
|
-
}
|
|
2075
|
-
function au(t) {
|
|
2076
|
-
var e = t.dragControls, r = t.visualElement, n = O(ae).transformPagePoint, a = Rt(function() {
|
|
2077
|
-
return new ru({
|
|
2078
|
-
visualElement: r
|
|
2079
|
-
});
|
|
2080
|
-
});
|
|
2081
|
-
a.setProps(y(y({}, t), { transformPagePoint: n })), Q(function() {
|
|
2082
|
-
return e && e.subscribe(a);
|
|
2083
|
-
}, [a]), Q(function() {
|
|
2084
|
-
return a.mount(r);
|
|
2085
|
-
}, []);
|
|
2086
|
-
}
|
|
2087
|
-
function iu(t) {
|
|
2088
|
-
var e = t.onPan, r = t.onPanStart, n = t.onPanEnd, a = t.onPanSessionStart, i = t.visualElement, o = e || r || n || a, u = $(null), f = O(ae).transformPagePoint, s = {
|
|
2089
|
-
onSessionStart: a,
|
|
2090
|
-
onStart: r,
|
|
2091
|
-
onMove: e,
|
|
2092
|
-
onEnd: function(p, c) {
|
|
2093
|
-
u.current = null, n && n(p, c);
|
|
2094
|
-
}
|
|
2095
|
-
};
|
|
2096
|
-
Q(function() {
|
|
2097
|
-
u.current !== null && u.current.updateHandlers(s);
|
|
2098
|
-
});
|
|
2099
|
-
function l(p) {
|
|
2100
|
-
u.current = new jn(p, s, {
|
|
2101
|
-
transformPagePoint: f
|
|
2102
|
-
});
|
|
2103
|
-
}
|
|
2104
|
-
kt(i, "pointerdown", o && l), ze(function() {
|
|
2105
|
-
return u.current && u.current.end();
|
|
2106
|
-
});
|
|
2107
|
-
}
|
|
2108
|
-
var ou = {
|
|
2109
|
-
pan: mt(iu),
|
|
2110
|
-
drag: mt(au)
|
|
2111
|
-
}, Bt;
|
|
2112
|
-
(function(t) {
|
|
2113
|
-
t[t.Entering = 0] = "Entering", t[t.Present = 1] = "Present", t[t.Exiting = 2] = "Exiting";
|
|
2114
|
-
})(Bt || (Bt = {}));
|
|
2115
|
-
var De;
|
|
2116
|
-
(function(t) {
|
|
2117
|
-
t[t.Hide = 0] = "Hide", t[t.Show = 1] = "Show";
|
|
2118
|
-
})(De || (De = {}));
|
|
2119
|
-
function Me(t) {
|
|
2120
|
-
return typeof t == "string" && t.startsWith("var(--");
|
|
2121
|
-
}
|
|
2122
|
-
var qn = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
|
|
2123
|
-
function uu(t) {
|
|
2124
|
-
var e = qn.exec(t);
|
|
2125
|
-
if (!e)
|
|
2126
|
-
return [,];
|
|
2127
|
-
var r = M(e, 3), n = r[1], a = r[2];
|
|
2128
|
-
return [n, a];
|
|
2129
|
-
}
|
|
2130
|
-
var su = 4;
|
|
2131
|
-
function Fe(t, e, r) {
|
|
2132
|
-
r === void 0 && (r = 1), gt(r <= su, 'Max CSS variable fallback depth detected in property "' + t + '". This may indicate a circular fallback dependency.');
|
|
2133
|
-
var n = M(uu(t), 2), a = n[0], i = n[1];
|
|
2134
|
-
if (a) {
|
|
2135
|
-
var o = window.getComputedStyle(e).getPropertyValue(a);
|
|
2136
|
-
return o ? o.trim() : Me(i) ? Fe(i, e, r + 1) : i;
|
|
2137
|
-
}
|
|
2138
|
-
}
|
|
2139
|
-
function fu(t, e, r) {
|
|
2140
|
-
var n, a = Z(e, []), i = t.getInstance();
|
|
2141
|
-
if (!(i instanceof HTMLElement))
|
|
2142
|
-
return { target: a, transitionEnd: r };
|
|
2143
|
-
r && (r = y({}, r)), t.forEachValue(function(s) {
|
|
2144
|
-
var l = s.get();
|
|
2145
|
-
if (Me(l)) {
|
|
2146
|
-
var p = Fe(l, i);
|
|
2147
|
-
p && s.set(p);
|
|
2148
|
-
}
|
|
2149
|
-
});
|
|
2150
|
-
for (var o in a) {
|
|
2151
|
-
var u = a[o];
|
|
2152
|
-
if (Me(u)) {
|
|
2153
|
-
var f = Fe(u, i);
|
|
2154
|
-
f && (a[o] = f, r && ((n = r[o]) !== null && n !== void 0 || (r[o] = u)));
|
|
2155
|
-
}
|
|
2156
|
-
}
|
|
2157
|
-
return { target: a, transitionEnd: r };
|
|
2158
|
-
}
|
|
2159
|
-
function jr(t, e) {
|
|
2160
|
-
return t / (e.max - e.min) * 100;
|
|
2161
|
-
}
|
|
2162
|
-
function lu(t, e, r) {
|
|
2163
|
-
var n = r.target;
|
|
2164
|
-
if (typeof t == "string")
|
|
2165
|
-
if (V.test(t))
|
|
2166
|
-
t = parseFloat(t);
|
|
2167
|
-
else
|
|
2168
|
-
return t;
|
|
2169
|
-
var a = jr(t, n.x), i = jr(t, n.y);
|
|
2170
|
-
return a + "% " + i + "%";
|
|
2171
|
-
}
|
|
2172
|
-
var Hr = "_$css";
|
|
2173
|
-
function cu(t, e) {
|
|
2174
|
-
var r = e.delta, n = e.treeScale, a = t, i = t.includes("var("), o = [];
|
|
2175
|
-
i && (t = t.replace(qn, function(P) {
|
|
2176
|
-
return o.push(P), Hr;
|
|
2177
|
-
}));
|
|
2178
|
-
var u = At.parse(t);
|
|
2179
|
-
if (u.length > 5)
|
|
2180
|
-
return a;
|
|
2181
|
-
var f = At.createTransformer(t), s = typeof u[0] != "number" ? 1 : 0, l = r.x.scale * n.x, p = r.y.scale * n.y;
|
|
2182
|
-
u[0 + s] /= l, u[1 + s] /= p;
|
|
2183
|
-
var c = J(l, p, 0.5);
|
|
2184
|
-
typeof u[2 + s] == "number" && (u[2 + s] /= c), typeof u[3 + s] == "number" && (u[3 + s] /= c);
|
|
2185
|
-
var d = f(u);
|
|
2186
|
-
if (i) {
|
|
2187
|
-
var v = 0;
|
|
2188
|
-
d = d.replace(Hr, function() {
|
|
2189
|
-
var P = o[v];
|
|
2190
|
-
return v++, P;
|
|
2191
|
-
});
|
|
2192
|
-
}
|
|
2193
|
-
return d;
|
|
2194
|
-
}
|
|
2195
|
-
var Ct = {
|
|
2196
|
-
process: lu
|
|
2197
|
-
}, vu = {
|
|
2198
|
-
borderRadius: y(y({}, Ct), { applyTo: [
|
|
2199
|
-
"borderTopLeftRadius",
|
|
2200
|
-
"borderTopRightRadius",
|
|
2201
|
-
"borderBottomLeftRadius",
|
|
2202
|
-
"borderBottomRightRadius"
|
|
2203
|
-
] }),
|
|
2204
|
-
borderTopLeftRadius: Ct,
|
|
2205
|
-
borderTopRightRadius: Ct,
|
|
2206
|
-
borderBottomLeftRadius: Ct,
|
|
2207
|
-
borderBottomRightRadius: Ct,
|
|
2208
|
-
boxShadow: {
|
|
2209
|
-
process: cu
|
|
2210
|
-
}
|
|
2211
|
-
}, _r = 1e3, du = (
|
|
2212
|
-
/** @class */
|
|
2213
|
-
(function(t) {
|
|
2214
|
-
$r(e, t);
|
|
2215
|
-
function e() {
|
|
2216
|
-
var r = t !== null && t.apply(this, arguments) || this;
|
|
2217
|
-
return r.frameTarget = ot(), r.currentAnimationTarget = ot(), r.isAnimating = {
|
|
2218
|
-
x: !1,
|
|
2219
|
-
y: !1
|
|
2220
|
-
}, r.stopAxisAnimation = {
|
|
2221
|
-
x: void 0,
|
|
2222
|
-
y: void 0
|
|
2223
|
-
}, r.isAnimatingTree = !1, r.animate = function(n, a, i) {
|
|
2224
|
-
i === void 0 && (i = {});
|
|
2225
|
-
var o = i.originBox, u = i.targetBox, f = i.visibilityAction, s = i.shouldStackAnimate, l = i.onComplete, p = i.prevParent, c = Z(i, ["originBox", "targetBox", "visibilityAction", "shouldStackAnimate", "onComplete", "prevParent"]), d = r.props, v = d.visualElement, P = d.layout;
|
|
2226
|
-
if (s === !1)
|
|
2227
|
-
return r.isAnimatingTree = !1, r.safeToRemove();
|
|
2228
|
-
if (!(r.isAnimatingTree && s !== !0)) {
|
|
2229
|
-
s && (r.isAnimatingTree = !0), a = o || a, n = u || n;
|
|
2230
|
-
var m = !1, h = v.getProjectionParent();
|
|
2231
|
-
if (h) {
|
|
2232
|
-
var A = h.prevViewportBox, L = h.getLayoutState().layout;
|
|
2233
|
-
p && (u && (L = p.getLayoutState().layout), o && !qo(p, h) && p.prevViewportBox && (A = p.prevViewportBox)), A && hu(p, o, u) && (m = !0, a = Vt(A, a), n = Vt(L, n));
|
|
2234
|
-
}
|
|
2235
|
-
var D = pu(a, n), C = N(function(x) {
|
|
2236
|
-
var w, E;
|
|
2237
|
-
if (P === "position") {
|
|
2238
|
-
var S = n[x].max - n[x].min;
|
|
2239
|
-
a[x].max = a[x].min + S;
|
|
2240
|
-
}
|
|
2241
|
-
if (!v.projection.isTargetLocked)
|
|
2242
|
-
if (f !== void 0)
|
|
2243
|
-
v.setVisibility(f === De.Show);
|
|
2244
|
-
else return D ? r.animateAxis(x, n[x], a[x], y(y({}, c), { isRelative: m })) : ((E = (w = r.stopAxisAnimation)[x]) === null || E === void 0 || E.call(w), v.setProjectionTargetAxis(x, n[x].min, n[x].max, m));
|
|
2245
|
-
});
|
|
2246
|
-
return v.syncRender(), Promise.all(C).then(function() {
|
|
2247
|
-
r.isAnimatingTree = !1, l && l(), v.notifyLayoutAnimationComplete();
|
|
2248
|
-
});
|
|
2249
|
-
}
|
|
2250
|
-
}, r;
|
|
2251
|
-
}
|
|
2252
|
-
return e.prototype.componentDidMount = function() {
|
|
2253
|
-
var r = this, n = this.props.visualElement;
|
|
2254
|
-
n.animateMotionValue = ee, n.enableLayoutProjection(), this.unsubLayoutReady = n.onLayoutUpdate(this.animate), n.layoutSafeToRemove = function() {
|
|
2255
|
-
return r.safeToRemove();
|
|
2256
|
-
}, ri(vu);
|
|
2257
|
-
}, e.prototype.componentWillUnmount = function() {
|
|
2258
|
-
var r = this;
|
|
2259
|
-
this.unsubLayoutReady(), N(function(n) {
|
|
2260
|
-
var a, i;
|
|
2261
|
-
return (i = (a = r.stopAxisAnimation)[n]) === null || i === void 0 ? void 0 : i.call(a);
|
|
2262
|
-
});
|
|
2263
|
-
}, e.prototype.animateAxis = function(r, n, a, i) {
|
|
2264
|
-
var o = this, u, f, s = i === void 0 ? {} : i, l = s.transition, p = s.isRelative;
|
|
2265
|
-
if (!(this.isAnimating[r] && Ot(n, this.currentAnimationTarget[r]))) {
|
|
2266
|
-
(f = (u = this.stopAxisAnimation)[r]) === null || f === void 0 || f.call(u), this.isAnimating[r] = !0;
|
|
2267
|
-
var c = this.props.visualElement, d = this.frameTarget[r], v = c.getProjectionAnimationProgress()[r];
|
|
2268
|
-
v.clearListeners(), v.set(0), v.set(0);
|
|
2269
|
-
var P = function() {
|
|
2270
|
-
var L = v.get() / _r;
|
|
2271
|
-
Zo(d, a, n, L), c.setProjectionTargetAxis(r, d.min, d.max, p);
|
|
2272
|
-
};
|
|
2273
|
-
P();
|
|
2274
|
-
var m = v.onChange(P);
|
|
2275
|
-
this.stopAxisAnimation[r] = function() {
|
|
2276
|
-
o.isAnimating[r] = !1, v.stop(), m();
|
|
2277
|
-
}, this.currentAnimationTarget[r] = n;
|
|
2278
|
-
var h = l || c.getDefaultTransition() || gu, A = ee(r === "x" ? "layoutX" : "layoutY", v, _r, h && Ze(h, "layout")).then(this.stopAxisAnimation[r]);
|
|
2279
|
-
return A;
|
|
2280
|
-
}
|
|
2281
|
-
}, e.prototype.safeToRemove = function() {
|
|
2282
|
-
var r, n;
|
|
2283
|
-
(n = (r = this.props).safeToRemove) === null || n === void 0 || n.call(r);
|
|
2284
|
-
}, e.prototype.render = function() {
|
|
2285
|
-
return null;
|
|
2286
|
-
}, e;
|
|
2287
|
-
})(U.Component)
|
|
2288
|
-
);
|
|
2289
|
-
function mu(t) {
|
|
2290
|
-
var e = M(en(), 2), r = e[1];
|
|
2291
|
-
return U.createElement(du, y({}, t, { safeToRemove: r }));
|
|
2292
|
-
}
|
|
2293
|
-
function pu(t, e) {
|
|
2294
|
-
return !Nr(t) && !Nr(e) && (!Ot(t.x, e.x) || !Ot(t.y, e.y));
|
|
2295
|
-
}
|
|
2296
|
-
var Ur = { min: 0, max: 0 };
|
|
2297
|
-
function Nr(t) {
|
|
2298
|
-
return Ot(t.x, Ur) && Ot(t.y, Ur);
|
|
2299
|
-
}
|
|
2300
|
-
function Ot(t, e) {
|
|
2301
|
-
return t.min === e.min && t.max === e.max;
|
|
2302
|
-
}
|
|
2303
|
-
var gu = {
|
|
2304
|
-
duration: 0.45,
|
|
2305
|
-
ease: [0.4, 0, 0.1, 1]
|
|
2306
|
-
};
|
|
2307
|
-
function hu(t, e, r) {
|
|
2308
|
-
return t || !t && !(e || r);
|
|
2309
|
-
}
|
|
2310
|
-
var yu = {
|
|
2311
|
-
layoutReady: function(t) {
|
|
2312
|
-
return t.notifyLayoutReady();
|
|
2313
|
-
}
|
|
2314
|
-
};
|
|
2315
|
-
function $n() {
|
|
2316
|
-
var t = /* @__PURE__ */ new Set();
|
|
2317
|
-
return {
|
|
2318
|
-
add: function(e) {
|
|
2319
|
-
return t.add(e);
|
|
2320
|
-
},
|
|
2321
|
-
flush: function(e) {
|
|
2322
|
-
var r = e === void 0 ? yu : e, n = r.layoutReady, a = r.parent;
|
|
2323
|
-
we(function(i, o) {
|
|
2324
|
-
var u = Array.from(t).sort($e), f = a ? re(a) : [];
|
|
2325
|
-
o(function() {
|
|
2326
|
-
var s = K(K([], M(f)), M(u));
|
|
2327
|
-
s.forEach(function(l) {
|
|
2328
|
-
return l.resetTransform();
|
|
2329
|
-
});
|
|
2330
|
-
}), i(function() {
|
|
2331
|
-
u.forEach(Jt);
|
|
2332
|
-
}), o(function() {
|
|
2333
|
-
f.forEach(function(s) {
|
|
2334
|
-
return s.restoreTransform();
|
|
2335
|
-
}), u.forEach(n);
|
|
2336
|
-
}), i(function() {
|
|
2337
|
-
u.forEach(function(s) {
|
|
2338
|
-
s.isPresent && (s.presence = Bt.Present);
|
|
2339
|
-
});
|
|
2340
|
-
}), o(function() {
|
|
2341
|
-
bt.preRender(), bt.render();
|
|
2342
|
-
}), i(function() {
|
|
2343
|
-
rt.postRender(function() {
|
|
2344
|
-
return u.forEach(Pu);
|
|
2345
|
-
}), t.clear();
|
|
2346
|
-
});
|
|
2347
|
-
}), Re();
|
|
2348
|
-
}
|
|
2349
|
-
};
|
|
2350
|
-
}
|
|
2351
|
-
function Pu(t) {
|
|
2352
|
-
t.prevViewportBox = t.projection.target;
|
|
2353
|
-
}
|
|
2354
|
-
var Jn = ht($n()), bu = ht($n());
|
|
2355
|
-
function dt(t) {
|
|
2356
|
-
return !!t.forceUpdate;
|
|
2357
|
-
}
|
|
2358
|
-
var Tu = (
|
|
2359
|
-
/** @class */
|
|
2360
|
-
(function(t) {
|
|
2361
|
-
$r(e, t);
|
|
2362
|
-
function e() {
|
|
2363
|
-
return t !== null && t.apply(this, arguments) || this;
|
|
2364
|
-
}
|
|
2365
|
-
return e.prototype.componentDidMount = function() {
|
|
2366
|
-
var r = this.props, n = r.syncLayout, a = r.framerSyncLayout, i = r.visualElement;
|
|
2367
|
-
dt(n) && n.register(i), dt(a) && a.register(i), i.onUnmount(function() {
|
|
2368
|
-
dt(n) && n.remove(i), dt(a) && a.remove(i);
|
|
2369
|
-
});
|
|
2370
|
-
}, e.prototype.getSnapshotBeforeUpdate = function() {
|
|
2371
|
-
var r = this.props, n = r.syncLayout, a = r.visualElement;
|
|
2372
|
-
return dt(n) ? n.syncUpdate() : (Wo(a), n.add(a)), null;
|
|
2373
|
-
}, e.prototype.componentDidUpdate = function() {
|
|
2374
|
-
var r = this.props.syncLayout;
|
|
2375
|
-
dt(r) || r.flush();
|
|
2376
|
-
}, e.prototype.render = function() {
|
|
2377
|
-
return null;
|
|
2378
|
-
}, e;
|
|
2379
|
-
})(Jr.Component)
|
|
2380
|
-
);
|
|
2381
|
-
function xu(t) {
|
|
2382
|
-
var e = O(Jn), r = O(bu);
|
|
2383
|
-
return Jr.createElement(Tu, y({}, t, { syncLayout: e, framerSyncLayout: r }));
|
|
2384
|
-
}
|
|
2385
|
-
var Au = {
|
|
2386
|
-
measureLayout: xu,
|
|
2387
|
-
layoutAnimation: mu
|
|
2388
|
-
}, Vu = function() {
|
|
2389
|
-
return {
|
|
2390
|
-
isEnabled: !1,
|
|
2391
|
-
isHydrated: !1,
|
|
2392
|
-
isTargetLocked: !1,
|
|
2393
|
-
target: ot(),
|
|
2394
|
-
targetFinal: ot()
|
|
2395
|
-
};
|
|
2396
|
-
};
|
|
2397
|
-
function Qn() {
|
|
2398
|
-
return {
|
|
2399
|
-
isHydrated: !1,
|
|
2400
|
-
layout: ot(),
|
|
2401
|
-
layoutCorrected: ot(),
|
|
2402
|
-
treeScale: { x: 1, y: 1 },
|
|
2403
|
-
delta: Pr(),
|
|
2404
|
-
deltaFinal: Pr(),
|
|
2405
|
-
deltaTransform: ""
|
|
2406
|
-
};
|
|
2407
|
-
}
|
|
2408
|
-
var Kr = Qn();
|
|
2409
|
-
function le(t, e, r) {
|
|
2410
|
-
var n = t.x, a = t.y, i = n.translate / e.x, o = a.translate / e.y, u = "translate3d(" + i + "px, " + o + "px, 0) ";
|
|
2411
|
-
if (r) {
|
|
2412
|
-
var f = r.rotate, s = r.rotateX, l = r.rotateY;
|
|
2413
|
-
f && (u += "rotate(" + f + ") "), s && (u += "rotateX(" + s + ") "), l && (u += "rotateY(" + l + ") ");
|
|
2414
|
-
}
|
|
2415
|
-
return u += "scale(" + n.scale + ", " + a.scale + ")", !r && u === Su ? "" : u;
|
|
2416
|
-
}
|
|
2417
|
-
function kn(t) {
|
|
2418
|
-
var e = t.deltaFinal;
|
|
2419
|
-
return e.x.origin * 100 + "% " + e.y.origin * 100 + "% 0";
|
|
2420
|
-
}
|
|
2421
|
-
var Su = le(Kr.delta, Kr.treeScale, {}), Wt = [
|
|
2422
|
-
"LayoutMeasure",
|
|
2423
|
-
"BeforeLayoutMeasure",
|
|
2424
|
-
"LayoutUpdate",
|
|
2425
|
-
"ViewportBoxUpdate",
|
|
2426
|
-
"Update",
|
|
2427
|
-
"Render",
|
|
2428
|
-
"AnimationComplete",
|
|
2429
|
-
"LayoutAnimationComplete",
|
|
2430
|
-
"AnimationStart",
|
|
2431
|
-
"SetAxisTarget",
|
|
2432
|
-
"Unmount"
|
|
2433
|
-
];
|
|
2434
|
-
function Cu() {
|
|
2435
|
-
var t = Wt.map(function() {
|
|
2436
|
-
return new $t();
|
|
2437
|
-
}), e = {}, r = {
|
|
2438
|
-
clearAllListeners: function() {
|
|
2439
|
-
return t.forEach(function(n) {
|
|
2440
|
-
return n.clear();
|
|
2441
|
-
});
|
|
2442
|
-
},
|
|
2443
|
-
updatePropListeners: function(n) {
|
|
2444
|
-
return Wt.forEach(function(a) {
|
|
2445
|
-
var i;
|
|
2446
|
-
(i = e[a]) === null || i === void 0 || i.call(e);
|
|
2447
|
-
var o = "on" + a, u = n[o];
|
|
2448
|
-
u && (e[a] = r[o](u));
|
|
2449
|
-
});
|
|
2450
|
-
}
|
|
2451
|
-
};
|
|
2452
|
-
return t.forEach(function(n, a) {
|
|
2453
|
-
r["on" + Wt[a]] = function(i) {
|
|
2454
|
-
return n.add(i);
|
|
2455
|
-
}, r["notify" + Wt[a]] = function() {
|
|
2456
|
-
for (var i = [], o = 0; o < arguments.length; o++)
|
|
2457
|
-
i[o] = arguments[o];
|
|
2458
|
-
return n.notify.apply(n, K([], M(i)));
|
|
2459
|
-
};
|
|
2460
|
-
}), r;
|
|
2461
|
-
}
|
|
2462
|
-
function Eu(t, e, r) {
|
|
2463
|
-
var n;
|
|
2464
|
-
for (var a in e) {
|
|
2465
|
-
var i = e[a], o = r[a];
|
|
2466
|
-
if (it(i))
|
|
2467
|
-
t.addValue(a, i);
|
|
2468
|
-
else if (it(o))
|
|
2469
|
-
t.addValue(a, pt(i));
|
|
2470
|
-
else if (o !== i)
|
|
2471
|
-
if (t.hasValue(a)) {
|
|
2472
|
-
var u = t.getValue(a);
|
|
2473
|
-
!u.hasAnimated && u.set(i);
|
|
2474
|
-
} else
|
|
2475
|
-
t.addValue(a, pt((n = t.getStaticValue(a)) !== null && n !== void 0 ? n : i));
|
|
2476
|
-
}
|
|
2477
|
-
for (var a in r)
|
|
2478
|
-
e[a] === void 0 && t.removeValue(a);
|
|
2479
|
-
return e;
|
|
2480
|
-
}
|
|
2481
|
-
function Lu(t, e, r, n) {
|
|
2482
|
-
var a = t.delta, i = t.layout, o = t.layoutCorrected, u = t.treeScale, f = e.target;
|
|
2483
|
-
$o(o, i), ko(o, u, r), Yn(a, o, f, n);
|
|
2484
|
-
}
|
|
2485
|
-
var wu = (
|
|
2486
|
-
/** @class */
|
|
2487
|
-
(function() {
|
|
2488
|
-
function t() {
|
|
2489
|
-
this.children = [], this.isDirty = !1;
|
|
2490
|
-
}
|
|
2491
|
-
return t.prototype.add = function(e) {
|
|
2492
|
-
Mn(this.children, e), this.isDirty = !0;
|
|
2493
|
-
}, t.prototype.remove = function(e) {
|
|
2494
|
-
Fn(this.children, e), this.isDirty = !0;
|
|
2495
|
-
}, t.prototype.forEach = function(e) {
|
|
2496
|
-
this.isDirty && this.children.sort($e), this.isDirty = !1, this.children.forEach(e);
|
|
2497
|
-
}, t;
|
|
2498
|
-
})()
|
|
2499
|
-
);
|
|
2500
|
-
function Ru(t) {
|
|
2501
|
-
var e = t.getProjectionParent();
|
|
2502
|
-
if (!e) {
|
|
2503
|
-
t.rebaseProjectionTarget();
|
|
2504
|
-
return;
|
|
2505
|
-
}
|
|
2506
|
-
var r = Vt(e.getLayoutState().layout, t.getLayoutState().layout);
|
|
2507
|
-
N(function(n) {
|
|
2508
|
-
t.setProjectionTargetAxis(n, r[n].min, r[n].max, !0);
|
|
2509
|
-
});
|
|
2510
|
-
}
|
|
2511
|
-
var ta = function(t) {
|
|
2512
|
-
var e = t.treeType, r = e === void 0 ? "" : e, n = t.build, a = t.getBaseTarget, i = t.makeTargetAnimatable, o = t.measureViewportBox, u = t.render, f = t.readValueFromInstance, s = t.resetTransform, l = t.restoreTransform, p = t.removeValueFromRenderState, c = t.sortNodePosition, d = t.scrapeMotionValuesFromProps;
|
|
2513
|
-
return function(v, P) {
|
|
2514
|
-
var m = v.parent, h = v.props, A = v.presenceId, L = v.blockInitialAnimation, D = v.visualState;
|
|
2515
|
-
P === void 0 && (P = {});
|
|
2516
|
-
var C = D.latestValues, x = D.renderState, w, E = Cu(), S = Vu(), I, _ = S, k = C, X, j = Qn(), ut, tt = !1, nt = /* @__PURE__ */ new Map(), st = /* @__PURE__ */ new Map(), _t = {}, ft, Y = y({}, C), q;
|
|
2517
|
-
function lt() {
|
|
2518
|
-
w && (T.isProjectionReady() && (Le(_.targetFinal, _.target, k), Yn(j.deltaFinal, j.layoutCorrected, _.targetFinal, C)), ct(), u(w, x));
|
|
2519
|
-
}
|
|
2520
|
-
function ct() {
|
|
2521
|
-
var g = C;
|
|
2522
|
-
if (ut && ut.isActive()) {
|
|
2523
|
-
var b = ut.getCrossfadeState(T);
|
|
2524
|
-
b && (g = b);
|
|
2525
|
-
}
|
|
2526
|
-
n(T, x, g, _, j, P, h);
|
|
2527
|
-
}
|
|
2528
|
-
function Je() {
|
|
2529
|
-
E.notifyUpdate(C);
|
|
2530
|
-
}
|
|
2531
|
-
function ia() {
|
|
2532
|
-
if (T.isProjectionReady()) {
|
|
2533
|
-
var g = j.delta, b = j.treeScale, R = b.x, B = b.y, H = j.deltaTransform;
|
|
2534
|
-
Lu(j, _, T.path, C), tt && T.notifyViewportBoxUpdate(_.target, g), tt = !1;
|
|
2535
|
-
var z = le(g, b);
|
|
2536
|
-
(z !== H || // Also compare calculated treeScale, for values that rely on this only for scale correction
|
|
2537
|
-
R !== b.x || B !== b.y) && T.scheduleRender(), j.deltaTransform = z;
|
|
2538
|
-
}
|
|
2539
|
-
}
|
|
2540
|
-
function oa() {
|
|
2541
|
-
T.layoutTree.forEach(Mu);
|
|
2542
|
-
}
|
|
2543
|
-
function ua(g, b) {
|
|
2544
|
-
var R = b.onChange(function(H) {
|
|
2545
|
-
C[g] = H, h.onUpdate && rt.update(Je, !1, !0);
|
|
2546
|
-
}), B = b.onRenderRequest(T.scheduleRender);
|
|
2547
|
-
st.set(g, function() {
|
|
2548
|
-
R(), B();
|
|
2549
|
-
});
|
|
2550
|
-
}
|
|
2551
|
-
var Qe = d(h);
|
|
2552
|
-
for (var ce in Qe) {
|
|
2553
|
-
var ke = Qe[ce];
|
|
2554
|
-
C[ce] !== void 0 && it(ke) && ke.set(C[ce], !1);
|
|
2555
|
-
}
|
|
2556
|
-
var tr = ue(h), ve = on(h), T = y(y({
|
|
2557
|
-
treeType: r,
|
|
2558
|
-
/**
|
|
2559
|
-
* This is a mirror of the internal instance prop, which keeps
|
|
2560
|
-
* VisualElement type-compatible with React's RefObject.
|
|
2561
|
-
*/
|
|
2562
|
-
current: null,
|
|
2563
|
-
/**
|
|
2564
|
-
* The depth of this visual element within the visual element tree.
|
|
2565
|
-
*/
|
|
2566
|
-
depth: m ? m.depth + 1 : 0,
|
|
2567
|
-
parent: m,
|
|
2568
|
-
children: /* @__PURE__ */ new Set(),
|
|
2569
|
-
/**
|
|
2570
|
-
* An ancestor path back to the root visual element. This is used
|
|
2571
|
-
* by layout projection to quickly recurse back up the tree.
|
|
2572
|
-
*/
|
|
2573
|
-
path: m ? K(K([], M(m.path)), [m]) : [],
|
|
2574
|
-
layoutTree: m ? m.layoutTree : new wu(),
|
|
2575
|
-
/**
|
|
2576
|
-
*
|
|
2577
|
-
*/
|
|
2578
|
-
presenceId: A,
|
|
2579
|
-
projection: S,
|
|
2580
|
-
/**
|
|
2581
|
-
* If this component is part of the variant tree, it should track
|
|
2582
|
-
* any children that are also part of the tree. This is essentially
|
|
2583
|
-
* a shadow tree to simplify logic around how to stagger over children.
|
|
2584
|
-
*/
|
|
2585
|
-
variantChildren: ve ? /* @__PURE__ */ new Set() : void 0,
|
|
2586
|
-
/**
|
|
2587
|
-
* Whether this instance is visible. This can be changed imperatively
|
|
2588
|
-
* by AnimateSharedLayout, is analogous to CSS's visibility in that
|
|
2589
|
-
* hidden elements should take up layout, and needs enacting by the configured
|
|
2590
|
-
* render function.
|
|
2591
|
-
*/
|
|
2592
|
-
isVisible: void 0,
|
|
2593
|
-
/**
|
|
2594
|
-
* Normally, if a component is controlled by a parent's variants, it can
|
|
2595
|
-
* rely on that ancestor to trigger animations further down the tree.
|
|
2596
|
-
* However, if a component is created after its parent is mounted, the parent
|
|
2597
|
-
* won't trigger that mount animation so the child needs to.
|
|
2598
|
-
*
|
|
2599
|
-
* TODO: This might be better replaced with a method isParentMounted
|
|
2600
|
-
*/
|
|
2601
|
-
manuallyAnimateOnMount: !!m?.isMounted(),
|
|
2602
|
-
/**
|
|
2603
|
-
* This can be set by AnimatePresence to force components that mount
|
|
2604
|
-
* at the same time as it to mount as if they have initial={false} set.
|
|
2605
|
-
*/
|
|
2606
|
-
blockInitialAnimation: L,
|
|
2607
|
-
/**
|
|
2608
|
-
* Determine whether this component has mounted yet. This is mostly used
|
|
2609
|
-
* by variant children to determine whether they need to trigger their
|
|
2610
|
-
* own animations on mount.
|
|
2611
|
-
*/
|
|
2612
|
-
isMounted: function() {
|
|
2613
|
-
return !!w;
|
|
2614
|
-
},
|
|
2615
|
-
mount: function(g) {
|
|
2616
|
-
w = T.current = g, T.pointTo(T), ve && m && !tr && (q = m?.addVariantChild(T)), m?.children.add(T);
|
|
2617
|
-
},
|
|
2618
|
-
/**
|
|
2619
|
-
*
|
|
2620
|
-
*/
|
|
2621
|
-
unmount: function() {
|
|
2622
|
-
qt.update(Je), qt.render(lt), qt.preRender(T.updateLayoutProjection), st.forEach(function(g) {
|
|
2623
|
-
return g();
|
|
2624
|
-
}), T.stopLayoutAnimation(), T.layoutTree.remove(T), q?.(), m?.children.delete(T), X?.(), E.clearAllListeners();
|
|
2625
|
-
},
|
|
2626
|
-
/**
|
|
2627
|
-
* Add a child visual element to our set of children.
|
|
2628
|
-
*/
|
|
2629
|
-
addVariantChild: function(g) {
|
|
2630
|
-
var b, R = T.getClosestVariantNode();
|
|
2631
|
-
if (R)
|
|
2632
|
-
return (b = R.variantChildren) === null || b === void 0 || b.add(g), function() {
|
|
2633
|
-
return R.variantChildren.delete(g);
|
|
2634
|
-
};
|
|
2635
|
-
},
|
|
2636
|
-
sortNodePosition: function(g) {
|
|
2637
|
-
return !c || r !== g.treeType ? 0 : c(T.getInstance(), g.getInstance());
|
|
2638
|
-
},
|
|
2639
|
-
/**
|
|
2640
|
-
* Returns the closest variant node in the tree starting from
|
|
2641
|
-
* this visual element.
|
|
2642
|
-
*/
|
|
2643
|
-
getClosestVariantNode: function() {
|
|
2644
|
-
return ve ? T : m?.getClosestVariantNode();
|
|
2645
|
-
},
|
|
2646
|
-
/**
|
|
2647
|
-
* A method that schedules an update to layout projections throughout
|
|
2648
|
-
* the tree. We inherit from the parent so there's only ever one
|
|
2649
|
-
* job scheduled on the next frame - that of the root visual element.
|
|
2650
|
-
*/
|
|
2651
|
-
scheduleUpdateLayoutProjection: m ? m.scheduleUpdateLayoutProjection : function() {
|
|
2652
|
-
return rt.preRender(T.updateTreeLayoutProjection, !1, !0);
|
|
2653
|
-
},
|
|
2654
|
-
/**
|
|
2655
|
-
* Expose the latest layoutId prop.
|
|
2656
|
-
*/
|
|
2657
|
-
getLayoutId: function() {
|
|
2658
|
-
return h.layoutId;
|
|
2659
|
-
},
|
|
2660
|
-
/**
|
|
2661
|
-
* Returns the current instance.
|
|
2662
|
-
*/
|
|
2663
|
-
getInstance: function() {
|
|
2664
|
-
return w;
|
|
2665
|
-
},
|
|
2666
|
-
/**
|
|
2667
|
-
* Get/set the latest static values.
|
|
2668
|
-
*/
|
|
2669
|
-
getStaticValue: function(g) {
|
|
2670
|
-
return C[g];
|
|
2671
|
-
},
|
|
2672
|
-
setStaticValue: function(g, b) {
|
|
2673
|
-
return C[g] = b;
|
|
2674
|
-
},
|
|
2675
|
-
/**
|
|
2676
|
-
* Returns the latest motion value state. Currently only used to take
|
|
2677
|
-
* a snapshot of the visual element - perhaps this can return the whole
|
|
2678
|
-
* visual state
|
|
2679
|
-
*/
|
|
2680
|
-
getLatestValues: function() {
|
|
2681
|
-
return C;
|
|
2682
|
-
},
|
|
2683
|
-
/**
|
|
2684
|
-
* Set the visiblity of the visual element. If it's changed, schedule
|
|
2685
|
-
* a render to reflect these changes.
|
|
2686
|
-
*/
|
|
2687
|
-
setVisibility: function(g) {
|
|
2688
|
-
T.isVisible !== g && (T.isVisible = g, T.scheduleRender());
|
|
2689
|
-
},
|
|
2690
|
-
/**
|
|
2691
|
-
* Make a target animatable by Popmotion. For instance, if we're
|
|
2692
|
-
* trying to animate width from 100px to 100vw we need to measure 100vw
|
|
2693
|
-
* in pixels to determine what we really need to animate to. This is also
|
|
2694
|
-
* pluggable to support Framer's custom value types like Color,
|
|
2695
|
-
* and CSS variables.
|
|
2696
|
-
*/
|
|
2697
|
-
makeTargetAnimatable: function(g, b) {
|
|
2698
|
-
return b === void 0 && (b = !0), i(T, g, h, b);
|
|
2699
|
-
},
|
|
2700
|
-
// Motion values ========================
|
|
2701
|
-
/**
|
|
2702
|
-
* Add a motion value and bind it to this visual element.
|
|
2703
|
-
*/
|
|
2704
|
-
addValue: function(g, b) {
|
|
2705
|
-
T.hasValue(g) && T.removeValue(g), nt.set(g, b), C[g] = b.get(), ua(g, b);
|
|
2706
|
-
},
|
|
2707
|
-
/**
|
|
2708
|
-
* Remove a motion value and unbind any active subscriptions.
|
|
2709
|
-
*/
|
|
2710
|
-
removeValue: function(g) {
|
|
2711
|
-
var b;
|
|
2712
|
-
nt.delete(g), (b = st.get(g)) === null || b === void 0 || b(), st.delete(g), delete C[g], p(g, x);
|
|
2713
|
-
},
|
|
2714
|
-
/**
|
|
2715
|
-
* Check whether we have a motion value for this key
|
|
2716
|
-
*/
|
|
2717
|
-
hasValue: function(g) {
|
|
2718
|
-
return nt.has(g);
|
|
2719
|
-
},
|
|
2720
|
-
/**
|
|
2721
|
-
* Get a motion value for this key. If called with a default
|
|
2722
|
-
* value, we'll create one if none exists.
|
|
2723
|
-
*/
|
|
2724
|
-
getValue: function(g, b) {
|
|
2725
|
-
var R = nt.get(g);
|
|
2726
|
-
return R === void 0 && b !== void 0 && (R = pt(b), T.addValue(g, R)), R;
|
|
2727
|
-
},
|
|
2728
|
-
/**
|
|
2729
|
-
* Iterate over our motion values.
|
|
2730
|
-
*/
|
|
2731
|
-
forEachValue: function(g) {
|
|
2732
|
-
return nt.forEach(g);
|
|
2733
|
-
},
|
|
2734
|
-
/**
|
|
2735
|
-
* If we're trying to animate to a previously unencountered value,
|
|
2736
|
-
* we need to check for it in our state and as a last resort read it
|
|
2737
|
-
* directly from the instance (which might have performance implications).
|
|
2738
|
-
*/
|
|
2739
|
-
readValue: function(g) {
|
|
2740
|
-
var b;
|
|
2741
|
-
return (b = C[g]) !== null && b !== void 0 ? b : f(w, g, P);
|
|
2742
|
-
},
|
|
2743
|
-
/**
|
|
2744
|
-
* Set the base target to later animate back to. This is currently
|
|
2745
|
-
* only hydrated on creation and when we first read a value.
|
|
2746
|
-
*/
|
|
2747
|
-
setBaseTarget: function(g, b) {
|
|
2748
|
-
Y[g] = b;
|
|
2749
|
-
},
|
|
2750
|
-
/**
|
|
2751
|
-
* Find the base target for a value thats been removed from all animation
|
|
2752
|
-
* props.
|
|
2753
|
-
*/
|
|
2754
|
-
getBaseTarget: function(g) {
|
|
2755
|
-
if (a) {
|
|
2756
|
-
var b = a(h, g);
|
|
2757
|
-
if (b !== void 0 && !it(b))
|
|
2758
|
-
return b;
|
|
2759
|
-
}
|
|
2760
|
-
return Y[g];
|
|
2761
|
-
}
|
|
2762
|
-
}, E), {
|
|
2763
|
-
/**
|
|
2764
|
-
* Build the renderer state based on the latest visual state.
|
|
2765
|
-
*/
|
|
2766
|
-
build: function() {
|
|
2767
|
-
return ct(), x;
|
|
2768
|
-
},
|
|
2769
|
-
/**
|
|
2770
|
-
* Schedule a render on the next animation frame.
|
|
2771
|
-
*/
|
|
2772
|
-
scheduleRender: function() {
|
|
2773
|
-
rt.render(lt, !1, !0);
|
|
2774
|
-
},
|
|
2775
|
-
/**
|
|
2776
|
-
* Synchronously fire render. It's prefered that we batch renders but
|
|
2777
|
-
* in many circumstances, like layout measurement, we need to run this
|
|
2778
|
-
* synchronously. However in those instances other measures should be taken
|
|
2779
|
-
* to batch reads/writes.
|
|
2780
|
-
*/
|
|
2781
|
-
syncRender: lt,
|
|
2782
|
-
/**
|
|
2783
|
-
* Update the provided props. Ensure any newly-added motion values are
|
|
2784
|
-
* added to our map, old ones removed, and listeners updated.
|
|
2785
|
-
*/
|
|
2786
|
-
setProps: function(g) {
|
|
2787
|
-
h = g, E.updatePropListeners(g), _t = Eu(T, d(h), _t);
|
|
2788
|
-
},
|
|
2789
|
-
getProps: function() {
|
|
2790
|
-
return h;
|
|
2791
|
-
},
|
|
2792
|
-
// Variants ==============================
|
|
2793
|
-
/**
|
|
2794
|
-
* Returns the variant definition with a given name.
|
|
2795
|
-
*/
|
|
2796
|
-
getVariant: function(g) {
|
|
2797
|
-
var b;
|
|
2798
|
-
return (b = h.variants) === null || b === void 0 ? void 0 : b[g];
|
|
2799
|
-
},
|
|
2800
|
-
/**
|
|
2801
|
-
* Returns the defined default transition on this component.
|
|
2802
|
-
*/
|
|
2803
|
-
getDefaultTransition: function() {
|
|
2804
|
-
return h.transition;
|
|
2805
|
-
},
|
|
2806
|
-
/**
|
|
2807
|
-
* Used by child variant nodes to get the closest ancestor variant props.
|
|
2808
|
-
*/
|
|
2809
|
-
getVariantContext: function(g) {
|
|
2810
|
-
if (g === void 0 && (g = !1), g)
|
|
2811
|
-
return m?.getVariantContext();
|
|
2812
|
-
if (!tr) {
|
|
2813
|
-
var b = m?.getVariantContext() || {};
|
|
2814
|
-
return h.initial !== void 0 && (b.initial = h.initial), b;
|
|
2815
|
-
}
|
|
2816
|
-
for (var R = {}, B = 0; B < Fu; B++) {
|
|
2817
|
-
var H = ea[B], z = h[H];
|
|
2818
|
-
(W(z) || z === !1) && (R[H] = z);
|
|
2819
|
-
}
|
|
2820
|
-
return R;
|
|
2821
|
-
},
|
|
2822
|
-
// Layout projection ==============================
|
|
2823
|
-
/**
|
|
2824
|
-
* Enable layout projection for this visual element. Won't actually
|
|
2825
|
-
* occur until we also have hydrated layout measurements.
|
|
2826
|
-
*/
|
|
2827
|
-
enableLayoutProjection: function() {
|
|
2828
|
-
S.isEnabled = !0, T.layoutTree.add(T);
|
|
2829
|
-
},
|
|
2830
|
-
/**
|
|
2831
|
-
* Lock the projection target, for instance when dragging, so
|
|
2832
|
-
* nothing else can try and animate it.
|
|
2833
|
-
*/
|
|
2834
|
-
lockProjectionTarget: function() {
|
|
2835
|
-
S.isTargetLocked = !0;
|
|
2836
|
-
},
|
|
2837
|
-
unlockProjectionTarget: function() {
|
|
2838
|
-
T.stopLayoutAnimation(), S.isTargetLocked = !1;
|
|
2839
|
-
},
|
|
2840
|
-
getLayoutState: function() {
|
|
2841
|
-
return j;
|
|
2842
|
-
},
|
|
2843
|
-
setCrossfader: function(g) {
|
|
2844
|
-
ut = g;
|
|
2845
|
-
},
|
|
2846
|
-
isProjectionReady: function() {
|
|
2847
|
-
return S.isEnabled && S.isHydrated && j.isHydrated;
|
|
2848
|
-
},
|
|
2849
|
-
/**
|
|
2850
|
-
* Start a layout animation on a given axis.
|
|
2851
|
-
*/
|
|
2852
|
-
startLayoutAnimation: function(g, b, R) {
|
|
2853
|
-
R === void 0 && (R = !1);
|
|
2854
|
-
var B = T.getProjectionAnimationProgress()[g], H = R ? S.relativeTarget[g] : S.target[g], z = H.min, Ut = H.max, Nt = Ut - z;
|
|
2855
|
-
return B.clearListeners(), B.set(z), B.set(z), B.onChange(function(Kt) {
|
|
2856
|
-
T.setProjectionTargetAxis(g, Kt, Kt + Nt, R);
|
|
2857
|
-
}), T.animateMotionValue(g, B, 0, b);
|
|
2858
|
-
},
|
|
2859
|
-
/**
|
|
2860
|
-
* Stop layout animations.
|
|
2861
|
-
*/
|
|
2862
|
-
stopLayoutAnimation: function() {
|
|
2863
|
-
N(function(g) {
|
|
2864
|
-
return T.getProjectionAnimationProgress()[g].stop();
|
|
2865
|
-
});
|
|
2866
|
-
},
|
|
2867
|
-
/**
|
|
2868
|
-
* Measure the current viewport box with or without transforms.
|
|
2869
|
-
* Only measures axis-aligned boxes, rotate and skew must be manually
|
|
2870
|
-
* removed with a re-render to work.
|
|
2871
|
-
*/
|
|
2872
|
-
measureViewportBox: function(g) {
|
|
2873
|
-
g === void 0 && (g = !0);
|
|
2874
|
-
var b = o(w, P);
|
|
2875
|
-
return g || Zn(b, C), b;
|
|
2876
|
-
},
|
|
2877
|
-
/**
|
|
2878
|
-
* Get the motion values tracking the layout animations on each
|
|
2879
|
-
* axis. Lazy init if not already created.
|
|
2880
|
-
*/
|
|
2881
|
-
getProjectionAnimationProgress: function() {
|
|
2882
|
-
return ft || (ft = {
|
|
2883
|
-
x: pt(0),
|
|
2884
|
-
y: pt(0)
|
|
2885
|
-
}), ft;
|
|
2886
|
-
},
|
|
2887
|
-
/**
|
|
2888
|
-
* Update the projection of a single axis. Schedule an update to
|
|
2889
|
-
* the tree layout projection.
|
|
2890
|
-
*/
|
|
2891
|
-
setProjectionTargetAxis: function(g, b, R, B) {
|
|
2892
|
-
B === void 0 && (B = !1);
|
|
2893
|
-
var H;
|
|
2894
|
-
B ? (S.relativeTarget || (S.relativeTarget = ot()), H = S.relativeTarget[g]) : (S.relativeTarget = void 0, H = S.target[g]), S.isHydrated = !0, H.min = b, H.max = R, tt = !0, E.notifySetAxisTarget();
|
|
2895
|
-
},
|
|
2896
|
-
/**
|
|
2897
|
-
* Rebase the projection target on top of the provided viewport box
|
|
2898
|
-
* or the measured layout. This ensures that non-animating elements
|
|
2899
|
-
* don't fall out of sync differences in measurements vs projections
|
|
2900
|
-
* after a page scroll or other relayout.
|
|
2901
|
-
*/
|
|
2902
|
-
rebaseProjectionTarget: function(g, b) {
|
|
2903
|
-
b === void 0 && (b = j.layout);
|
|
2904
|
-
var R = T.getProjectionAnimationProgress(), B = R.x, H = R.y, z = !S.relativeTarget && !S.isTargetLocked && !B.isAnimating() && !H.isAnimating();
|
|
2905
|
-
(g || z) && N(function(Ut) {
|
|
2906
|
-
var Nt = b[Ut], Kt = Nt.min, sa = Nt.max;
|
|
2907
|
-
T.setProjectionTargetAxis(Ut, Kt, sa);
|
|
2908
|
-
});
|
|
2909
|
-
},
|
|
2910
|
-
/**
|
|
2911
|
-
* Notify the visual element that its layout is up-to-date.
|
|
2912
|
-
* Currently Animate.tsx uses this to check whether a layout animation
|
|
2913
|
-
* needs to be performed.
|
|
2914
|
-
*/
|
|
2915
|
-
notifyLayoutReady: function(g) {
|
|
2916
|
-
Ru(T), T.notifyLayoutUpdate(j.layout, T.prevViewportBox || j.layout, g);
|
|
2917
|
-
},
|
|
2918
|
-
/**
|
|
2919
|
-
* Temporarily reset the transform of the instance.
|
|
2920
|
-
*/
|
|
2921
|
-
resetTransform: function() {
|
|
2922
|
-
return s(T, w, h);
|
|
2923
|
-
},
|
|
2924
|
-
restoreTransform: function() {
|
|
2925
|
-
return l(w, x);
|
|
2926
|
-
},
|
|
2927
|
-
updateLayoutProjection: ia,
|
|
2928
|
-
updateTreeLayoutProjection: function() {
|
|
2929
|
-
T.layoutTree.forEach(Du), rt.preRender(oa, !1, !0);
|
|
2930
|
-
},
|
|
2931
|
-
getProjectionParent: function() {
|
|
2932
|
-
if (I === void 0) {
|
|
2933
|
-
for (var g = !1, b = T.path.length - 1; b >= 0; b--) {
|
|
2934
|
-
var R = T.path[b];
|
|
2935
|
-
if (R.projection.isEnabled) {
|
|
2936
|
-
g = R;
|
|
2937
|
-
break;
|
|
2938
|
-
}
|
|
2939
|
-
}
|
|
2940
|
-
I = g;
|
|
2941
|
-
}
|
|
2942
|
-
return I;
|
|
2943
|
-
},
|
|
2944
|
-
resolveRelativeTargetBox: function() {
|
|
2945
|
-
var g = T.getProjectionParent();
|
|
2946
|
-
if (!(!S.relativeTarget || !g) && (zo(S, g.projection), zn(g))) {
|
|
2947
|
-
var b = S.target;
|
|
2948
|
-
Le(b, b, g.getLatestValues());
|
|
2949
|
-
}
|
|
2950
|
-
},
|
|
2951
|
-
shouldResetTransform: function() {
|
|
2952
|
-
return !!h._layoutResetTransform;
|
|
2953
|
-
},
|
|
2954
|
-
/**
|
|
2955
|
-
*
|
|
2956
|
-
*/
|
|
2957
|
-
pointTo: function(g) {
|
|
2958
|
-
_ = g.projection, k = g.getLatestValues(), X?.(), X = Be(g.onSetAxisTarget(T.scheduleUpdateLayoutProjection), g.onLayoutAnimationComplete(function() {
|
|
2959
|
-
var b;
|
|
2960
|
-
T.isPresent ? T.presence = Bt.Present : (b = T.layoutSafeToRemove) === null || b === void 0 || b.call(T);
|
|
2961
|
-
}));
|
|
2962
|
-
},
|
|
2963
|
-
// TODO: Clean this up
|
|
2964
|
-
isPresent: !0,
|
|
2965
|
-
presence: Bt.Entering
|
|
2966
|
-
});
|
|
2967
|
-
return T;
|
|
2968
|
-
};
|
|
2969
|
-
};
|
|
2970
|
-
function Du(t) {
|
|
2971
|
-
t.resolveRelativeTargetBox();
|
|
2972
|
-
}
|
|
2973
|
-
function Mu(t) {
|
|
2974
|
-
t.updateLayoutProjection();
|
|
2975
|
-
}
|
|
2976
|
-
var ea = K(["initial"], M(qe)), Fu = ea.length, Iu = /* @__PURE__ */ new Set([
|
|
2977
|
-
"width",
|
|
2978
|
-
"height",
|
|
2979
|
-
"top",
|
|
2980
|
-
"left",
|
|
2981
|
-
"right",
|
|
2982
|
-
"bottom",
|
|
2983
|
-
"x",
|
|
2984
|
-
"y"
|
|
2985
|
-
]), ra = function(t) {
|
|
2986
|
-
return Iu.has(t);
|
|
2987
|
-
}, Bu = function(t) {
|
|
2988
|
-
return Object.keys(t).some(ra);
|
|
2989
|
-
}, na = function(t, e) {
|
|
2990
|
-
t.set(e, !1), t.set(e);
|
|
2991
|
-
}, Zt = function(t) {
|
|
2992
|
-
return t === Ie || t === V;
|
|
2993
|
-
}, Yr;
|
|
2994
|
-
(function(t) {
|
|
2995
|
-
t.width = "width", t.height = "height", t.left = "left", t.right = "right", t.top = "top", t.bottom = "bottom";
|
|
2996
|
-
})(Yr || (Yr = {}));
|
|
2997
|
-
var Xr = function(t, e) {
|
|
2998
|
-
return parseFloat(t.split(", ")[e]);
|
|
2999
|
-
}, zr = function(t, e) {
|
|
3000
|
-
return function(r, n) {
|
|
3001
|
-
var a = n.transform;
|
|
3002
|
-
if (a === "none" || !a)
|
|
3003
|
-
return 0;
|
|
3004
|
-
var i = a.match(/^matrix3d\((.+)\)$/);
|
|
3005
|
-
if (i)
|
|
3006
|
-
return Xr(i[1], e);
|
|
3007
|
-
var o = a.match(/^matrix\((.+)\)$/);
|
|
3008
|
-
return o ? Xr(o[1], t) : 0;
|
|
3009
|
-
};
|
|
3010
|
-
}, Ou = /* @__PURE__ */ new Set(["x", "y", "z"]), ju = Dt.filter(function(t) {
|
|
3011
|
-
return !Ou.has(t);
|
|
3012
|
-
});
|
|
3013
|
-
function Hu(t) {
|
|
3014
|
-
var e = [];
|
|
3015
|
-
return ju.forEach(function(r) {
|
|
3016
|
-
var n = t.getValue(r);
|
|
3017
|
-
n !== void 0 && (e.push([r, n.get()]), n.set(r.startsWith("scale") ? 1 : 0));
|
|
3018
|
-
}), e.length && t.syncRender(), e;
|
|
3019
|
-
}
|
|
3020
|
-
var Gr = {
|
|
3021
|
-
// Dimensions
|
|
3022
|
-
width: function(t) {
|
|
3023
|
-
var e = t.x;
|
|
3024
|
-
return e.max - e.min;
|
|
3025
|
-
},
|
|
3026
|
-
height: function(t) {
|
|
3027
|
-
var e = t.y;
|
|
3028
|
-
return e.max - e.min;
|
|
3029
|
-
},
|
|
3030
|
-
top: function(t, e) {
|
|
3031
|
-
var r = e.top;
|
|
3032
|
-
return parseFloat(r);
|
|
3033
|
-
},
|
|
3034
|
-
left: function(t, e) {
|
|
3035
|
-
var r = e.left;
|
|
3036
|
-
return parseFloat(r);
|
|
3037
|
-
},
|
|
3038
|
-
bottom: function(t, e) {
|
|
3039
|
-
var r = t.y, n = e.top;
|
|
3040
|
-
return parseFloat(n) + (r.max - r.min);
|
|
3041
|
-
},
|
|
3042
|
-
right: function(t, e) {
|
|
3043
|
-
var r = t.x, n = e.left;
|
|
3044
|
-
return parseFloat(n) + (r.max - r.min);
|
|
3045
|
-
},
|
|
3046
|
-
// Transform
|
|
3047
|
-
x: zr(4, 13),
|
|
3048
|
-
y: zr(5, 14)
|
|
3049
|
-
}, _u = function(t, e, r) {
|
|
3050
|
-
var n = e.measureViewportBox(), a = e.getInstance(), i = getComputedStyle(a), o = i.display, u = i.top, f = i.left, s = i.bottom, l = i.right, p = i.transform, c = { top: u, left: f, bottom: s, right: l, transform: p };
|
|
3051
|
-
o === "none" && e.setStaticValue("display", t.display || "block"), e.syncRender();
|
|
3052
|
-
var d = e.measureViewportBox();
|
|
3053
|
-
return r.forEach(function(v) {
|
|
3054
|
-
var P = e.getValue(v);
|
|
3055
|
-
na(P, Gr[v](n, c)), t[v] = Gr[v](d, i);
|
|
3056
|
-
}), t;
|
|
3057
|
-
}, Uu = function(t, e, r, n) {
|
|
3058
|
-
r === void 0 && (r = {}), n === void 0 && (n = {}), e = y({}, e), n = y({}, n);
|
|
3059
|
-
var a = Object.keys(e).filter(ra), i = [], o = !1, u = [];
|
|
3060
|
-
if (a.forEach(function(s) {
|
|
3061
|
-
var l = t.getValue(s);
|
|
3062
|
-
if (t.hasValue(s)) {
|
|
3063
|
-
var p = r[s], c = e[s], d = zt(p), v;
|
|
3064
|
-
if (Mt(c))
|
|
3065
|
-
for (var P = c.length, m = c[0] === null ? 1 : 0; m < P; m++)
|
|
3066
|
-
v ? gt(zt(c[m]) === v, "All keyframes must be of the same type") : (v = zt(c[m]), gt(v === d || Zt(d) && Zt(v), "Keyframes must be of the same dimension as the current value"));
|
|
3067
|
-
else
|
|
3068
|
-
v = zt(c);
|
|
3069
|
-
if (d !== v)
|
|
3070
|
-
if (Zt(d) && Zt(v)) {
|
|
3071
|
-
var h = l.get();
|
|
3072
|
-
typeof h == "string" && l.set(parseFloat(h)), typeof c == "string" ? e[s] = parseFloat(c) : Array.isArray(c) && v === V && (e[s] = c.map(parseFloat));
|
|
3073
|
-
} else d?.transform && v?.transform && (p === 0 || c === 0) ? p === 0 ? l.set(v.transform(p)) : e[s] = d.transform(c) : (o || (i = Hu(t), o = !0), u.push(s), n[s] = n[s] !== void 0 ? n[s] : e[s], na(l, c));
|
|
3074
|
-
}
|
|
3075
|
-
}), u.length) {
|
|
3076
|
-
var f = _u(e, t, u);
|
|
3077
|
-
return i.length && i.forEach(function(s) {
|
|
3078
|
-
var l = M(s, 2), p = l[0], c = l[1];
|
|
3079
|
-
t.getValue(p).set(c);
|
|
3080
|
-
}), t.syncRender(), { target: f, transitionEnd: n };
|
|
3081
|
-
} else
|
|
3082
|
-
return { target: e, transitionEnd: n };
|
|
3083
|
-
};
|
|
3084
|
-
function Nu(t, e, r, n) {
|
|
3085
|
-
return Bu(e) ? Uu(t, e, r, n) : { target: e, transitionEnd: n };
|
|
3086
|
-
}
|
|
3087
|
-
var Ku = function(t, e, r, n) {
|
|
3088
|
-
var a = fu(t, e, n);
|
|
3089
|
-
return e = a.target, n = a.transitionEnd, Nu(t, e, r, n);
|
|
3090
|
-
};
|
|
3091
|
-
function Yu(t) {
|
|
3092
|
-
return window.getComputedStyle(t);
|
|
3093
|
-
}
|
|
3094
|
-
var aa = {
|
|
3095
|
-
treeType: "dom",
|
|
3096
|
-
readValueFromInstance: function(t, e) {
|
|
3097
|
-
if (se(e)) {
|
|
3098
|
-
var r = Ge(e);
|
|
3099
|
-
return r && r.default || 0;
|
|
3100
|
-
} else {
|
|
3101
|
-
var n = Yu(t);
|
|
3102
|
-
return (fn(e) ? n.getPropertyValue(e) : n[e]) || 0;
|
|
3103
|
-
}
|
|
3104
|
-
},
|
|
3105
|
-
sortNodePosition: function(t, e) {
|
|
3106
|
-
return t.compareDocumentPosition(e) & 2 ? 1 : -1;
|
|
3107
|
-
},
|
|
3108
|
-
getBaseTarget: function(t, e) {
|
|
3109
|
-
var r;
|
|
3110
|
-
return (r = t.style) === null || r === void 0 ? void 0 : r[e];
|
|
3111
|
-
},
|
|
3112
|
-
measureViewportBox: function(t, e) {
|
|
3113
|
-
var r = e.transformPagePoint;
|
|
3114
|
-
return Kn(t, r);
|
|
3115
|
-
},
|
|
3116
|
-
/**
|
|
3117
|
-
* Reset the transform on the current Element. This is called as part
|
|
3118
|
-
* of a batched process across the entire layout tree. To remove this write
|
|
3119
|
-
* cycle it'd be interesting to see if it's possible to "undo" all the current
|
|
3120
|
-
* layout transforms up the tree in the same way this.getBoundingBoxWithoutTransforms
|
|
3121
|
-
* works
|
|
3122
|
-
*/
|
|
3123
|
-
resetTransform: function(t, e, r) {
|
|
3124
|
-
var n = r.transformTemplate;
|
|
3125
|
-
e.style.transform = n ? n({}, "") : "none", t.scheduleRender();
|
|
3126
|
-
},
|
|
3127
|
-
restoreTransform: function(t, e) {
|
|
3128
|
-
t.style.transform = e.style.transform;
|
|
3129
|
-
},
|
|
3130
|
-
removeValueFromRenderState: function(t, e) {
|
|
3131
|
-
var r = e.vars, n = e.style;
|
|
3132
|
-
delete r[t], delete n[t];
|
|
3133
|
-
},
|
|
3134
|
-
/**
|
|
3135
|
-
* Ensure that HTML and Framer-specific value types like `px`->`%` and `Color`
|
|
3136
|
-
* can be animated by Motion.
|
|
3137
|
-
*/
|
|
3138
|
-
makeTargetAnimatable: function(t, e, r, n) {
|
|
3139
|
-
var a = r.transformValues;
|
|
3140
|
-
n === void 0 && (n = !0);
|
|
3141
|
-
var i = e.transition, o = e.transitionEnd, u = Z(e, ["transition", "transitionEnd"]), f = Po(u, i || {}, t);
|
|
3142
|
-
if (a && (o && (o = a(o)), u && (u = a(u)), f && (f = a(f))), n) {
|
|
3143
|
-
ho(t, u, f);
|
|
3144
|
-
var s = Ku(t, u, f, o);
|
|
3145
|
-
o = s.transitionEnd, u = s.target;
|
|
3146
|
-
}
|
|
3147
|
-
return y({
|
|
3148
|
-
transition: i,
|
|
3149
|
-
transitionEnd: o
|
|
3150
|
-
}, u);
|
|
3151
|
-
},
|
|
3152
|
-
scrapeMotionValuesFromProps: Ne,
|
|
3153
|
-
build: function(t, e, r, n, a, i, o) {
|
|
3154
|
-
t.isVisible !== void 0 && (e.style.visibility = t.isVisible ? "visible" : "hidden");
|
|
3155
|
-
var u = n.isEnabled && a.isHydrated;
|
|
3156
|
-
He(e, r, n, a, i, o.transformTemplate, u ? le : void 0, u ? kn : void 0);
|
|
3157
|
-
},
|
|
3158
|
-
render: pn
|
|
3159
|
-
}, Xu = ta(aa), zu = ta(y(y({}, aa), {
|
|
3160
|
-
getBaseTarget: function(t, e) {
|
|
3161
|
-
return t[e];
|
|
3162
|
-
},
|
|
3163
|
-
readValueFromInstance: function(t, e) {
|
|
3164
|
-
var r;
|
|
3165
|
-
return se(e) ? ((r = Ge(e)) === null || r === void 0 ? void 0 : r.default) || 0 : (e = gn.has(e) ? e : mn(e), t.getAttribute(e));
|
|
3166
|
-
},
|
|
3167
|
-
scrapeMotionValuesFromProps: yn,
|
|
3168
|
-
build: function(t, e, r, n, a, i, o) {
|
|
3169
|
-
var u = n.isEnabled && a.isHydrated;
|
|
3170
|
-
Ue(e, r, n, a, i, o.transformTemplate, u ? le : void 0, u ? kn : void 0);
|
|
3171
|
-
},
|
|
3172
|
-
render: hn
|
|
3173
|
-
})), Gu = function(t, e) {
|
|
3174
|
-
return je(t) ? zu(e, { enableHardwareAcceleration: !1 }) : Xu(e, { enableHardwareAcceleration: !0 });
|
|
3175
|
-
}, Wu = y(y(y(y({}, Ro), Gi), ou), Au), rs = /* @__PURE__ */ ti(function(t, e) {
|
|
3176
|
-
return Mi(t, e, Wu, Gu);
|
|
3177
|
-
});
|
|
3178
|
-
function Zu() {
|
|
3179
|
-
var t = $(!1), e = M(Ia(0), 2), r = e[0], n = e[1];
|
|
3180
|
-
return ze(function() {
|
|
3181
|
-
return t.current = !0;
|
|
3182
|
-
}), Qr(function() {
|
|
3183
|
-
!t.current && n(r + 1);
|
|
3184
|
-
}, [r]);
|
|
3185
|
-
}
|
|
3186
|
-
var Wr = 0;
|
|
3187
|
-
function qu() {
|
|
3188
|
-
var t = Wr;
|
|
3189
|
-
return Wr++, t;
|
|
3190
|
-
}
|
|
3191
|
-
var ye = function(t) {
|
|
3192
|
-
var e = t.children, r = t.initial, n = t.isPresent, a = t.onExitComplete, i = t.custom, o = t.presenceAffectsLayout, u = Rt($u), f = Rt(qu), s = wt(
|
|
3193
|
-
function() {
|
|
3194
|
-
return {
|
|
3195
|
-
id: f,
|
|
3196
|
-
initial: r,
|
|
3197
|
-
isPresent: n,
|
|
3198
|
-
custom: i,
|
|
3199
|
-
onExitComplete: function(l) {
|
|
3200
|
-
u.set(l, !0);
|
|
3201
|
-
var p = !0;
|
|
3202
|
-
u.forEach(function(c) {
|
|
3203
|
-
c || (p = !1);
|
|
3204
|
-
}), p && a?.();
|
|
3205
|
-
},
|
|
3206
|
-
register: function(l) {
|
|
3207
|
-
return u.set(l, !1), function() {
|
|
3208
|
-
return u.delete(l);
|
|
3209
|
-
};
|
|
3210
|
-
}
|
|
3211
|
-
};
|
|
3212
|
-
},
|
|
3213
|
-
/**
|
|
3214
|
-
* If the presence of a child affects the layout of the components around it,
|
|
3215
|
-
* we want to make a new context value to ensure they get re-rendered
|
|
3216
|
-
* so they can detect that layout change.
|
|
3217
|
-
*/
|
|
3218
|
-
o ? void 0 : [n]
|
|
3219
|
-
);
|
|
3220
|
-
return wt(function() {
|
|
3221
|
-
u.forEach(function(l, p) {
|
|
3222
|
-
return u.set(p, !1);
|
|
3223
|
-
});
|
|
3224
|
-
}, [n]), U.useEffect(function() {
|
|
3225
|
-
!n && !u.size && a?.();
|
|
3226
|
-
}, [n]), U.createElement(St.Provider, { value: s }, e);
|
|
3227
|
-
};
|
|
3228
|
-
function $u() {
|
|
3229
|
-
return /* @__PURE__ */ new Map();
|
|
3230
|
-
}
|
|
3231
|
-
function Pt(t) {
|
|
3232
|
-
return t.key || "";
|
|
3233
|
-
}
|
|
3234
|
-
function Ju(t, e) {
|
|
3235
|
-
var r = process.env.NODE_ENV !== "production" ? /* @__PURE__ */ new Set() : null;
|
|
3236
|
-
t.forEach(function(n) {
|
|
3237
|
-
var a = Pt(n);
|
|
3238
|
-
process.env.NODE_ENV !== "production" && r && (r.has(a) && console.warn('Children of AnimatePresence require unique keys. "' + a + '" is a duplicate.'), r.add(a)), e.set(a, n);
|
|
3239
|
-
});
|
|
3240
|
-
}
|
|
3241
|
-
function Qu(t) {
|
|
3242
|
-
var e = [];
|
|
3243
|
-
return Oa.forEach(t, function(r) {
|
|
3244
|
-
ja(r) && e.push(r);
|
|
3245
|
-
}), e;
|
|
3246
|
-
}
|
|
3247
|
-
var ns = function(t) {
|
|
3248
|
-
var e = t.children, r = t.custom, n = t.initial, a = n === void 0 ? !0 : n, i = t.onExitComplete, o = t.exitBeforeEnter, u = t.presenceAffectsLayout, f = u === void 0 ? !0 : u, s = Zu(), l = O(Jn);
|
|
3249
|
-
dt(l) && (s = l.forceUpdate);
|
|
3250
|
-
var p = $(!0), c = Qu(e), d = $(c), v = $(/* @__PURE__ */ new Map()).current, P = $(/* @__PURE__ */ new Set()).current;
|
|
3251
|
-
if (Ju(c, v), p.current)
|
|
3252
|
-
return p.current = !1, U.createElement(U.Fragment, null, c.map(function(x) {
|
|
3253
|
-
return U.createElement(ye, { key: Pt(x), isPresent: !0, initial: a ? void 0 : !1, presenceAffectsLayout: f }, x);
|
|
3254
|
-
}));
|
|
3255
|
-
for (var m = K([], M(c)), h = d.current.map(Pt), A = c.map(Pt), L = h.length, D = 0; D < L; D++) {
|
|
3256
|
-
var C = h[D];
|
|
3257
|
-
A.indexOf(C) === -1 ? P.add(C) : P.delete(C);
|
|
3258
|
-
}
|
|
3259
|
-
return o && P.size && (m = []), P.forEach(function(x) {
|
|
3260
|
-
if (A.indexOf(x) === -1) {
|
|
3261
|
-
var w = v.get(x);
|
|
3262
|
-
if (w) {
|
|
3263
|
-
var E = h.indexOf(x), S = function() {
|
|
3264
|
-
v.delete(x), P.delete(x);
|
|
3265
|
-
var I = d.current.findIndex(function(_) {
|
|
3266
|
-
return _.key === x;
|
|
3267
|
-
});
|
|
3268
|
-
d.current.splice(I, 1), P.size || (d.current = c, s(), i && i());
|
|
3269
|
-
};
|
|
3270
|
-
m.splice(E, 0, U.createElement(ye, { key: Pt(w), isPresent: !1, onExitComplete: S, custom: r, presenceAffectsLayout: f }, w));
|
|
3271
|
-
}
|
|
3272
|
-
}
|
|
3273
|
-
}), m = m.map(function(x) {
|
|
3274
|
-
var w = x.key;
|
|
3275
|
-
return P.has(w) ? x : U.createElement(ye, { key: Pt(x), isPresent: !0, presenceAffectsLayout: f }, x);
|
|
3276
|
-
}), d.current = m, process.env.NODE_ENV !== "production" && o && m.length > 1 && console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."), U.createElement(U.Fragment, null, P.size ? m : m.map(function(x) {
|
|
3277
|
-
return Ba(x);
|
|
3278
|
-
}));
|
|
3279
|
-
};
|
|
3280
|
-
export {
|
|
3281
|
-
ns as A,
|
|
3282
|
-
en as a,
|
|
3283
|
-
rs as m,
|
|
3284
|
-
es as u
|
|
3285
|
-
};
|