@argusoft/medplat-core 1.0.19 → 1.0.21
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/{AccessRights-Bvd5Bm5K.js → AccessRights-CupmTG3T.js} +2 -2
- package/dist/{AccessRights-Bvd5Bm5K.js.map → AccessRights-CupmTG3T.js.map} +1 -1
- package/dist/{AddEditQueryBuilder-Bcjl5mXE.js → AddEditQueryBuilder-C8ZSkOF0.js} +60 -60
- package/dist/AddEditQueryBuilder-C8ZSkOF0.js.map +1 -0
- package/dist/{AddFeatures-CE5rBxEG.js → AddFeatures-CTVs_Gr9.js} +2 -2
- package/dist/{AddFeatures-CE5rBxEG.js.map → AddFeatures-CTVs_Gr9.js.map} +1 -1
- package/dist/{AddRoleDrawer-Bc655LQU.js → AddRoleDrawer-CQdzQZLb.js} +36 -36
- package/dist/AddRoleDrawer-CQdzQZLb.js.map +1 -0
- package/dist/{ChangePasswordModalCore-50EzprTk.js → ChangePasswordModalCore-DotONnMz.js} +459 -458
- package/dist/{ChangePasswordModalCore-50EzprTk.js.map → ChangePasswordModalCore-DotONnMz.js.map} +1 -1
- package/dist/{ConditionConfig-D2hOAa4n.js → ConditionConfig-C3rF2wXU.js} +2 -2
- package/dist/{ConditionConfig-D2hOAa4n.js.map → ConditionConfig-C3rF2wXU.js.map} +1 -1
- package/dist/{EventConfigurations-D8juDb29.js → EventConfigurations-BGffjVC7.js} +3 -3
- package/dist/{EventConfigurations-D8juDb29.js.map → EventConfigurations-BGffjVC7.js.map} +1 -1
- package/dist/{EventsExceptionModal-DsvngLi8.js → EventsExceptionModal-D4Bf1ilS.js} +2 -2
- package/dist/{EventsExceptionModal-DsvngLi8.js.map → EventsExceptionModal-D4Bf1ilS.js.map} +1 -1
- package/dist/EventsSkeleton-8iiETGcf.js +76 -0
- package/dist/EventsSkeleton-8iiETGcf.js.map +1 -0
- package/dist/{FeatureMenu-CLX8VNZ-.js → FeatureMenu-DUZL32RI.js} +3 -3
- package/dist/{FeatureMenu-CLX8VNZ-.js.map → FeatureMenu-DUZL32RI.js.map} +1 -1
- package/dist/Features-CObdzJp_.js +13 -0
- package/dist/Features-CObdzJp_.js.map +1 -0
- package/dist/{ImmunizationConfigurationBase-C5wnjI_-.js → ImmunizationConfigurationBase-CUQGVlhB.js} +741 -731
- package/dist/ImmunizationConfigurationBase-CUQGVlhB.js.map +1 -0
- package/dist/ImmunizationConfigurationBase.css +1 -1
- package/dist/{ManageDynamicFeature-i6ARKe36.js → ManageDynamicFeature-BhONvfC_.js} +2 -2
- package/dist/{ManageDynamicFeature-i6ARKe36.js.map → ManageDynamicFeature-BhONvfC_.js.map} +1 -1
- package/dist/{ManageEventConfiguration-CHugu2vQ.js → ManageEventConfiguration-BntUc_YI.js} +5 -5
- package/dist/{ManageEventConfiguration-CHugu2vQ.js.map → ManageEventConfiguration-BntUc_YI.js.map} +1 -1
- package/dist/{ManageNotification-BUAvg5Ge.js → ManageNotification-CSl02Wq7.js} +2 -2
- package/dist/{ManageNotification-BUAvg5Ge.js.map → ManageNotification-CSl02Wq7.js.map} +1 -1
- package/dist/{ManageRole-Cbs9dUhc.js → ManageRole-CZAk-IlM.js} +222 -229
- package/dist/ManageRole-CZAk-IlM.js.map +1 -0
- package/dist/{ManageUser-C6dlK-Mr.js → ManageUser-Ca1BsI1u.js} +2 -2
- package/dist/{ManageUser-C6dlK-Mr.js.map → ManageUser-Ca1BsI1u.js.map} +1 -1
- package/dist/{MobileTypeEventConfigModal-2w0WQ3WY.js → MobileTypeEventConfigModal-BNjZ8pnq.js} +2 -2
- package/dist/{MobileTypeEventConfigModal-2w0WQ3WY.js.map → MobileTypeEventConfigModal-BNjZ8pnq.js.map} +1 -1
- package/dist/{NotificationList-CUZSWp2J.js → NotificationList-D1U1LYnz.js} +140 -139
- package/dist/NotificationList-D1U1LYnz.js.map +1 -0
- package/dist/{OtherTypeEventConfigModal-D1p8M39y.js → OtherTypeEventConfigModal-DiVhWDpG.js} +2 -2
- package/dist/{OtherTypeEventConfigModal-D1p8M39y.js.map → OtherTypeEventConfigModal-DiVhWDpG.js.map} +1 -1
- package/dist/{QueryBuilder-DXexUIe8.js → QueryBuilder-DI0wCJbz.js} +85 -84
- package/dist/QueryBuilder-DI0wCJbz.js.map +1 -0
- package/dist/{RoleManagement-BThAL5LO.js → RoleManagement-B9WgZGEj.js} +182 -168
- package/dist/RoleManagement-B9WgZGEj.js.map +1 -0
- package/dist/{ShowFlywayQuery-BkyA6QaA.js → ShowFlywayQuery-tj42YQAS.js} +33 -33
- package/dist/ShowFlywayQuery-tj42YQAS.js.map +1 -0
- package/dist/{SubMenu-BGznOP2a.js → SubMenu-CM_4wNCR.js} +2 -2
- package/dist/{SubMenu-BGznOP2a.js.map → SubMenu-CM_4wNCR.js.map} +1 -1
- package/dist/{TypeConfiguration-D-3xNcyd.js → TypeConfiguration-CupQxH9Y.js} +28 -28
- package/dist/TypeConfiguration-CupQxH9Y.js.map +1 -0
- package/dist/{UserList-D7GL7jvO.js → UserList-BzHsbYel.js} +186 -185
- package/dist/UserList-BzHsbYel.js.map +1 -0
- package/dist/{WidgetList-B3Sm9weK.js → WidgetList-B7X8Awkg.js} +2 -2
- package/dist/{WidgetList-B3Sm9weK.js.map → WidgetList-B7X8Awkg.js.map} +1 -1
- package/dist/index.js +10 -10
- package/package.json +1 -1
- package/dist/AddEditQueryBuilder-Bcjl5mXE.js.map +0 -1
- package/dist/AddRoleDrawer-Bc655LQU.js.map +0 -1
- package/dist/EventsSkeleton-DCXwwPbb.js +0 -76
- package/dist/EventsSkeleton-DCXwwPbb.js.map +0 -1
- package/dist/Features-Cpf1PDx0.js +0 -13
- package/dist/Features-Cpf1PDx0.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-C5wnjI_-.js.map +0 -1
- package/dist/ManageRole-Cbs9dUhc.js.map +0 -1
- package/dist/NotificationList-CUZSWp2J.js.map +0 -1
- package/dist/QueryBuilder-DXexUIe8.js.map +0 -1
- package/dist/RoleManagement-BThAL5LO.js.map +0 -1
- package/dist/ShowFlywayQuery-BkyA6QaA.js.map +0 -1
- package/dist/TypeConfiguration-D-3xNcyd.js.map +0 -1
- package/dist/UserList-D7GL7jvO.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as E, Fragment as ir, jsxs as et } from "react/jsx-runtime";
|
|
2
2
|
import { yupResolver as or } from "@hookform/resolvers/yup";
|
|
3
3
|
import qt from "prop-types";
|
|
4
4
|
import { Modal as rr, Typography as Zt, Button as _n, CircularProgress as ar } from "@mui/material";
|
|
@@ -6,7 +6,7 @@ import lr from "@mui/icons-material/LockResetRounded";
|
|
|
6
6
|
import Yn from "@mui/icons-material/CheckRounded";
|
|
7
7
|
import * as Jt from "yup";
|
|
8
8
|
import * as Pe from "react";
|
|
9
|
-
import { createContext as Dt, useRef as
|
|
9
|
+
import { createContext as Dt, useRef as G, useLayoutEffect as cr, useEffect as Wt, useId as yn, useContext as W, useInsertionEffect as vn, useMemo as at, useCallback as mi, Children as ur, isValidElement as hr, useState as Ot, Fragment as gi, createElement as fr, forwardRef as dr, Component as pr } from "react";
|
|
10
10
|
import { useForm as mr } from "react-hook-form";
|
|
11
11
|
import gr from "@/hooks/useAESEncryption.js";
|
|
12
12
|
import { o as yr } from "./UserListSkeleton-DhIJ5X3y.js";
|
|
@@ -14,11 +14,11 @@ import { showToast as vr } from "@/common/toaster/toaster.jsx";
|
|
|
14
14
|
import xr from "@/common/services/util/GeneralUtil";
|
|
15
15
|
import wr from "@/hooks/useTrackEvent";
|
|
16
16
|
import { useTranslateProvider as Tr } from "@/common/languageTranslator/TranslationContext";
|
|
17
|
-
import { P as Xn } from "./ManageUser-
|
|
17
|
+
import { P as Xn } from "./ManageUser-Ca1BsI1u.js";
|
|
18
18
|
import { PasswordStrength as Pr } from "@/views/feature-components/users/PasswordStrength";
|
|
19
19
|
const xn = Dt({});
|
|
20
20
|
function wn(t) {
|
|
21
|
-
const e =
|
|
21
|
+
const e = G(null);
|
|
22
22
|
return e.current === null && (e.current = t()), e.current;
|
|
23
23
|
}
|
|
24
24
|
const br = typeof window < "u", yi = br ? cr : Wt, be = /* @__PURE__ */ Dt(null);
|
|
@@ -29,21 +29,21 @@ function fe(t, e) {
|
|
|
29
29
|
const n = t.indexOf(e);
|
|
30
30
|
n > -1 && t.splice(n, 1);
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const ot = (t, e, n) => n > e ? e : n < t ? t : n;
|
|
33
33
|
function ze(t, e) {
|
|
34
34
|
return e ? `${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}` : t;
|
|
35
35
|
}
|
|
36
36
|
let Et = () => {
|
|
37
|
-
},
|
|
37
|
+
}, lt = () => {
|
|
38
38
|
};
|
|
39
39
|
var pi;
|
|
40
40
|
typeof process < "u" && ((pi = process.env) == null ? void 0 : pi.NODE_ENV) !== "production" && (Et = (t, e, n) => {
|
|
41
41
|
!t && typeof console < "u" && console.warn(ze(e, n));
|
|
42
|
-
},
|
|
42
|
+
}, lt = (t, e, n) => {
|
|
43
43
|
if (!t)
|
|
44
44
|
throw new Error(ze(e, n));
|
|
45
45
|
});
|
|
46
|
-
const
|
|
46
|
+
const ht = {}, vi = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), xi = (t) => typeof t == "object" && t !== null, wi = (t) => /^0[^.\s]+$/u.test(t);
|
|
47
47
|
// @__NO_SIDE_EFFECTS__
|
|
48
48
|
function Ti(t) {
|
|
49
49
|
let e;
|
|
@@ -78,7 +78,7 @@ class Pn {
|
|
|
78
78
|
this.subscriptions.length = 0;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
const
|
|
81
|
+
const H = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, X = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3, Pi = /* @__NO_SIDE_EFFECTS__ */ (t, e) => e ? t * (1e3 / e) : 0, qn = /* @__PURE__ */ new Set();
|
|
82
82
|
function bn(t, e, n) {
|
|
83
83
|
t || qn.has(e) || (console.warn(ze(e, n)), qn.add(e));
|
|
84
84
|
}
|
|
@@ -111,11 +111,11 @@ const Si = /* @__NO_SIDE_EFFECTS__ */ (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2
|
|
|
111
111
|
anticipate: Mi
|
|
112
112
|
}, Er = (t) => typeof t == "string", Jn = (t) => {
|
|
113
113
|
if (/* @__PURE__ */ Li(t)) {
|
|
114
|
-
|
|
114
|
+
lt(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
115
115
|
const [e, n, s, i] = t;
|
|
116
116
|
return /* @__PURE__ */ _t(e, n, s, i);
|
|
117
117
|
} else if (Er(t))
|
|
118
|
-
return
|
|
118
|
+
return lt(Zn[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), Zn[t];
|
|
119
119
|
return t;
|
|
120
120
|
}, Qt = [
|
|
121
121
|
"setup",
|
|
@@ -182,27 +182,27 @@ function ki(t, e) {
|
|
|
182
182
|
delta: 0,
|
|
183
183
|
timestamp: 0,
|
|
184
184
|
isProcessing: !1
|
|
185
|
-
}, r = () => n = !0, o = Qt.reduce((
|
|
186
|
-
const
|
|
187
|
-
n = !1,
|
|
185
|
+
}, r = () => n = !0, o = Qt.reduce((v, w) => (v[w] = Rr(r), v), {}), { setup: a, read: c, resolveKeyframes: u, preUpdate: l, update: h, preRender: f, render: d, postRender: p } = o, g = () => {
|
|
186
|
+
const v = ht.useManualTiming, w = v ? i.timestamp : performance.now();
|
|
187
|
+
n = !1, v || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(w - i.timestamp, Lr), 1)), i.timestamp = w, i.isProcessing = !0, a.process(i), c.process(i), u.process(i), l.process(i), h.process(i), f.process(i), d.process(i), p.process(i), i.isProcessing = !1, n && e && (s = !1, t(g));
|
|
188
188
|
}, m = () => {
|
|
189
189
|
n = !0, s = !0, i.isProcessing || t(g);
|
|
190
190
|
};
|
|
191
|
-
return { schedule: Qt.reduce((
|
|
192
|
-
const
|
|
193
|
-
return w
|
|
194
|
-
}, {}), cancel: (
|
|
195
|
-
for (let
|
|
196
|
-
o[Qt[
|
|
191
|
+
return { schedule: Qt.reduce((v, w) => {
|
|
192
|
+
const b = o[w];
|
|
193
|
+
return v[w] = (C, A = !1, P = !1) => (n || m(), b.schedule(C, A, P)), v;
|
|
194
|
+
}, {}), cancel: (v) => {
|
|
195
|
+
for (let w = 0; w < Qt.length; w++)
|
|
196
|
+
o[Qt[w]].cancel(v);
|
|
197
197
|
}, state: i, steps: o };
|
|
198
198
|
}
|
|
199
|
-
const { schedule:
|
|
199
|
+
const { schedule: L, cancel: ft, state: N, steps: Me } = /* @__PURE__ */ ki(typeof requestAnimationFrame < "u" ? requestAnimationFrame : q, !0);
|
|
200
200
|
let ie;
|
|
201
201
|
function kr() {
|
|
202
202
|
ie = void 0;
|
|
203
203
|
}
|
|
204
204
|
const $ = {
|
|
205
|
-
now: () => (ie === void 0 && $.set(N.isProcessing ||
|
|
205
|
+
now: () => (ie === void 0 && $.set(N.isProcessing || ht.useManualTiming ? N.timestamp : performance.now()), ie),
|
|
206
206
|
set: (t) => {
|
|
207
207
|
ie = t, queueMicrotask(kr);
|
|
208
208
|
}
|
|
@@ -216,7 +216,7 @@ const Rt = {
|
|
|
216
216
|
transform: (t) => t
|
|
217
217
|
}, Kt = {
|
|
218
218
|
...Rt,
|
|
219
|
-
transform: (t) =>
|
|
219
|
+
transform: (t) => ot(0, 1, t)
|
|
220
220
|
}, te = {
|
|
221
221
|
...Rt,
|
|
222
222
|
default: 1
|
|
@@ -234,10 +234,10 @@ const Or = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
234
234
|
[n]: parseFloat(o),
|
|
235
235
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
236
236
|
};
|
|
237
|
-
}, jr = (t) =>
|
|
237
|
+
}, jr = (t) => ot(0, 255, t), De = {
|
|
238
238
|
...Rt,
|
|
239
239
|
transform: (t) => Math.round(jr(t))
|
|
240
|
-
},
|
|
240
|
+
}, yt = {
|
|
241
241
|
test: /* @__PURE__ */ Mn("rgb", "red"),
|
|
242
242
|
parse: /* @__PURE__ */ Fi("red", "green", "blue"),
|
|
243
243
|
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + De.transform(t) + ", " + De.transform(e) + ", " + De.transform(n) + ", " + jt(Kt.transform(s)) + ")"
|
|
@@ -254,26 +254,26 @@ function Nr(t) {
|
|
|
254
254
|
const Ge = {
|
|
255
255
|
test: /* @__PURE__ */ Mn("#"),
|
|
256
256
|
parse: Nr,
|
|
257
|
-
transform:
|
|
257
|
+
transform: yt.transform
|
|
258
258
|
}, Yt = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
|
|
259
259
|
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
260
260
|
parse: parseFloat,
|
|
261
261
|
transform: (e) => `${e}${t}`
|
|
262
|
-
}),
|
|
263
|
-
...
|
|
264
|
-
parse: (t) =>
|
|
265
|
-
transform: (t) =>
|
|
262
|
+
}), rt = /* @__PURE__ */ Yt("deg"), it = /* @__PURE__ */ Yt("%"), T = /* @__PURE__ */ Yt("px"), Ur = /* @__PURE__ */ Yt("vh"), Wr = /* @__PURE__ */ Yt("vw"), ts = {
|
|
263
|
+
...it,
|
|
264
|
+
parse: (t) => it.parse(t) / 100,
|
|
265
|
+
transform: (t) => it.transform(t * 100)
|
|
266
266
|
}, bt = {
|
|
267
267
|
test: /* @__PURE__ */ Mn("hsl", "hue"),
|
|
268
268
|
parse: /* @__PURE__ */ Fi("hue", "saturation", "lightness"),
|
|
269
|
-
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " +
|
|
270
|
-
},
|
|
271
|
-
test: (t) =>
|
|
272
|
-
parse: (t) =>
|
|
273
|
-
transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ?
|
|
269
|
+
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + it.transform(jt(e)) + ", " + it.transform(jt(n)) + ", " + jt(Kt.transform(s)) + ")"
|
|
270
|
+
}, B = {
|
|
271
|
+
test: (t) => yt.test(t) || Ge.test(t) || bt.test(t),
|
|
272
|
+
parse: (t) => yt.test(t) ? yt.parse(t) : bt.test(t) ? bt.parse(t) : Ge.parse(t),
|
|
273
|
+
transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? yt.transform(t) : bt.transform(t),
|
|
274
274
|
getAnimatableNone: (t) => {
|
|
275
|
-
const e =
|
|
276
|
-
return e.alpha = 0,
|
|
275
|
+
const e = B.parse(t);
|
|
276
|
+
return e.alpha = 0, B.transform(e);
|
|
277
277
|
}
|
|
278
278
|
}, $r = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
279
279
|
function Kr(t) {
|
|
@@ -288,7 +288,7 @@ function Ct(t) {
|
|
|
288
288
|
var: []
|
|
289
289
|
}, i = [];
|
|
290
290
|
let r = 0;
|
|
291
|
-
const a = e.replace(Hr, (c) => (
|
|
291
|
+
const a = e.replace(Hr, (c) => (B.test(c) ? (s.color.push(r), i.push(ji), n.push(B.parse(c))) : c.startsWith(Gr) ? (s.var.push(r), i.push(zr), n.push(c)) : (s.number.push(r), i.push(Oi), n.push(parseFloat(c))), ++r, es)).split(es);
|
|
292
292
|
return { values: n, split: a, indexes: s, types: i };
|
|
293
293
|
}
|
|
294
294
|
function _r(t) {
|
|
@@ -301,7 +301,7 @@ function Ni({ split: t, types: e }) {
|
|
|
301
301
|
for (let r = 0; r < n; r++)
|
|
302
302
|
if (i += t[r], s[r] !== void 0) {
|
|
303
303
|
const o = e[r];
|
|
304
|
-
o === Oi ? i += jt(s[r]) : o === ji ? i +=
|
|
304
|
+
o === Oi ? i += jt(s[r]) : o === ji ? i += B.transform(s[r]) : i += s[r];
|
|
305
305
|
}
|
|
306
306
|
return i;
|
|
307
307
|
};
|
|
@@ -309,12 +309,12 @@ function Ni({ split: t, types: e }) {
|
|
|
309
309
|
function Yr(t) {
|
|
310
310
|
return Ni(Ct(t));
|
|
311
311
|
}
|
|
312
|
-
const Xr = (t) => typeof t == "number" ? 0 :
|
|
312
|
+
const Xr = (t) => typeof t == "number" ? 0 : B.test(t) ? B.getAnimatableNone(t) : t, qr = (t, e) => typeof t == "number" ? e != null && e.trim().endsWith("/") ? t : 0 : Xr(t);
|
|
313
313
|
function Zr(t) {
|
|
314
314
|
const e = Ct(t);
|
|
315
315
|
return Ni(e)(e.values.map((s, i) => qr(s, e.split[i])));
|
|
316
316
|
}
|
|
317
|
-
const
|
|
317
|
+
const tt = {
|
|
318
318
|
test: Kr,
|
|
319
319
|
parse: _r,
|
|
320
320
|
createTransformer: Yr,
|
|
@@ -342,10 +342,10 @@ function Jr({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
|
342
342
|
function de(t, e) {
|
|
343
343
|
return (n) => n > 0 ? e : t;
|
|
344
344
|
}
|
|
345
|
-
const
|
|
345
|
+
const R = (t, e, n) => t + (e - t) * n, Re = (t, e, n) => {
|
|
346
346
|
const s = t * t, i = n * (e * e - s) + s;
|
|
347
347
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
348
|
-
}, Qr = [Ge,
|
|
348
|
+
}, Qr = [Ge, yt, bt], ta = (t) => Qr.find((e) => e.test(t));
|
|
349
349
|
function ns(t) {
|
|
350
350
|
const e = ta(t);
|
|
351
351
|
if (Et(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e)
|
|
@@ -358,16 +358,16 @@ const ss = (t, e) => {
|
|
|
358
358
|
if (!n || !s)
|
|
359
359
|
return de(t, e);
|
|
360
360
|
const i = { ...n };
|
|
361
|
-
return (r) => (i.red = Re(n.red, s.red, r), i.green = Re(n.green, s.green, r), i.blue = Re(n.blue, s.blue, r), i.alpha =
|
|
361
|
+
return (r) => (i.red = Re(n.red, s.red, r), i.green = Re(n.green, s.green, r), i.blue = Re(n.blue, s.blue, r), i.alpha = R(n.alpha, s.alpha, r), yt.transform(i));
|
|
362
362
|
}, He = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
363
363
|
function ea(t, e) {
|
|
364
364
|
return He.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
365
365
|
}
|
|
366
366
|
function na(t, e) {
|
|
367
|
-
return (n) =>
|
|
367
|
+
return (n) => R(t, e, n);
|
|
368
368
|
}
|
|
369
369
|
function Dn(t) {
|
|
370
|
-
return typeof t == "number" ? na : typeof t == "string" ? Vn(t) ? de :
|
|
370
|
+
return typeof t == "number" ? na : typeof t == "string" ? Vn(t) ? de : B.test(t) ? ss : oa : Array.isArray(t) ? Ui : typeof t == "object" ? B.test(t) ? ss : sa : de;
|
|
371
371
|
}
|
|
372
372
|
function Ui(t, e) {
|
|
373
373
|
const n = [...t], s = n.length, i = t.map((r, o) => Dn(r)(r, e[o]));
|
|
@@ -396,17 +396,17 @@ function ia(t, e) {
|
|
|
396
396
|
return n;
|
|
397
397
|
}
|
|
398
398
|
const oa = (t, e) => {
|
|
399
|
-
const n =
|
|
399
|
+
const n = tt.createTransformer(e), s = Ct(t), i = Ct(e);
|
|
400
400
|
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? He.has(t) && !i.values.length || He.has(e) && !s.values.length ? ea(t, e) : Ht(Ui(ia(s, i), i.values), n) : (Et(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), de(t, e));
|
|
401
401
|
};
|
|
402
402
|
function Wi(t, e, n) {
|
|
403
|
-
return typeof t == "number" && typeof e == "number" && typeof n == "number" ?
|
|
403
|
+
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? R(t, e, n) : Dn(t)(t, e);
|
|
404
404
|
}
|
|
405
405
|
const ra = (t) => {
|
|
406
406
|
const e = ({ timestamp: n }) => t(n);
|
|
407
407
|
return {
|
|
408
|
-
start: (n = !0) =>
|
|
409
|
-
stop: () =>
|
|
408
|
+
start: (n = !0) => L.update(e, n),
|
|
409
|
+
stop: () => ft(e),
|
|
410
410
|
/**
|
|
411
411
|
* If we're processing this frame we can use the
|
|
412
412
|
* framelocked timestamp to keep things in sync.
|
|
@@ -436,7 +436,7 @@ function aa(t, e = 100, n) {
|
|
|
436
436
|
duration: /* @__PURE__ */ X(i)
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
|
-
const
|
|
439
|
+
const I = {
|
|
440
440
|
// Default spring physics
|
|
441
441
|
stiffness: 100,
|
|
442
442
|
damping: 10,
|
|
@@ -476,11 +476,11 @@ function ca(t, e, n) {
|
|
|
476
476
|
return s;
|
|
477
477
|
}
|
|
478
478
|
const Le = 1e-3;
|
|
479
|
-
function ua({ duration: t =
|
|
479
|
+
function ua({ duration: t = I.duration, bounce: e = I.bounce, velocity: n = I.velocity, mass: s = I.mass }) {
|
|
480
480
|
let i, r;
|
|
481
|
-
Et(t <= /* @__PURE__ */
|
|
481
|
+
Et(t <= /* @__PURE__ */ H(I.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
482
482
|
let o = 1 - e;
|
|
483
|
-
o =
|
|
483
|
+
o = ot(I.minDamping, I.maxDamping, o), t = ot(I.minDuration, I.maxDuration, /* @__PURE__ */ X(t)), o < 1 ? (i = (u) => {
|
|
484
484
|
const l = u * o, h = l * t, f = l - n, d = _e(u, o), p = Math.exp(-h);
|
|
485
485
|
return Le - f / d * p;
|
|
486
486
|
}, r = (u) => {
|
|
@@ -494,10 +494,10 @@ function ua({ duration: t = B.duration, bounce: e = B.bounce, velocity: n = B.ve
|
|
|
494
494
|
return l * h;
|
|
495
495
|
});
|
|
496
496
|
const a = 5 / t, c = ca(i, r, a);
|
|
497
|
-
if (t = /* @__PURE__ */
|
|
497
|
+
if (t = /* @__PURE__ */ H(t), isNaN(c))
|
|
498
498
|
return {
|
|
499
|
-
stiffness:
|
|
500
|
-
damping:
|
|
499
|
+
stiffness: I.stiffness,
|
|
500
|
+
damping: I.damping,
|
|
501
501
|
duration: t
|
|
502
502
|
};
|
|
503
503
|
{
|
|
@@ -515,19 +515,19 @@ function is(t, e) {
|
|
|
515
515
|
}
|
|
516
516
|
function da(t) {
|
|
517
517
|
let e = {
|
|
518
|
-
velocity:
|
|
519
|
-
stiffness:
|
|
520
|
-
damping:
|
|
521
|
-
mass:
|
|
518
|
+
velocity: I.velocity,
|
|
519
|
+
stiffness: I.stiffness,
|
|
520
|
+
damping: I.damping,
|
|
521
|
+
mass: I.mass,
|
|
522
522
|
isResolvedFromDuration: !1,
|
|
523
523
|
...t
|
|
524
524
|
};
|
|
525
525
|
if (!is(t, fa) && is(t, ha))
|
|
526
526
|
if (e.velocity = 0, t.visualDuration) {
|
|
527
|
-
const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 *
|
|
527
|
+
const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * ot(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
|
|
528
528
|
e = {
|
|
529
529
|
...e,
|
|
530
|
-
mass:
|
|
530
|
+
mass: I.mass,
|
|
531
531
|
stiffness: i,
|
|
532
532
|
damping: r
|
|
533
533
|
};
|
|
@@ -536,12 +536,12 @@ function da(t) {
|
|
|
536
536
|
e = {
|
|
537
537
|
...e,
|
|
538
538
|
...n,
|
|
539
|
-
mass:
|
|
539
|
+
mass: I.mass
|
|
540
540
|
}, e.isResolvedFromDuration = !0;
|
|
541
541
|
}
|
|
542
542
|
return e;
|
|
543
543
|
}
|
|
544
|
-
function me(t =
|
|
544
|
+
function me(t = I.visualDuration, e = I.bounce) {
|
|
545
545
|
const n = typeof t != "object" ? {
|
|
546
546
|
visualDuration: t,
|
|
547
547
|
keyframes: [0, 1],
|
|
@@ -552,49 +552,49 @@ function me(t = B.visualDuration, e = B.bounce) {
|
|
|
552
552
|
...n,
|
|
553
553
|
velocity: -/* @__PURE__ */ X(n.velocity || 0)
|
|
554
554
|
}), p = f || 0, g = u / (2 * Math.sqrt(c * l)), m = o - r, y = /* @__PURE__ */ X(Math.sqrt(c / l)), x = Math.abs(m) < 5;
|
|
555
|
-
s || (s = x ?
|
|
556
|
-
let
|
|
555
|
+
s || (s = x ? I.restSpeed.granular : I.restSpeed.default), i || (i = x ? I.restDelta.granular : I.restDelta.default);
|
|
556
|
+
let v, w, b, C, A, P;
|
|
557
557
|
if (g < 1)
|
|
558
|
-
|
|
559
|
-
const
|
|
560
|
-
return o -
|
|
561
|
-
}, A = g * y * C + m *
|
|
558
|
+
b = _e(y, g), C = (p + g * y * m) / b, v = (S) => {
|
|
559
|
+
const D = Math.exp(-g * y * S);
|
|
560
|
+
return o - D * (C * Math.sin(b * S) + m * Math.cos(b * S));
|
|
561
|
+
}, A = g * y * C + m * b, P = g * y * m - C * b, w = (S) => Math.exp(-g * y * S) * (A * Math.sin(b * S) + P * Math.cos(b * S));
|
|
562
562
|
else if (g === 1) {
|
|
563
|
-
|
|
564
|
-
const
|
|
565
|
-
|
|
563
|
+
v = (D) => o - Math.exp(-y * D) * (m + (p + y * m) * D);
|
|
564
|
+
const S = p + y * m;
|
|
565
|
+
w = (D) => Math.exp(-y * D) * (y * S * D - p);
|
|
566
566
|
} else {
|
|
567
|
-
const
|
|
568
|
-
|
|
569
|
-
const
|
|
570
|
-
return o -
|
|
567
|
+
const S = y * Math.sqrt(g * g - 1);
|
|
568
|
+
v = (_) => {
|
|
569
|
+
const Y = Math.exp(-g * y * _), M = Math.min(S * _, 300);
|
|
570
|
+
return o - Y * ((p + g * y * m) * Math.sinh(M) + S * m * Math.cosh(M)) / S;
|
|
571
571
|
};
|
|
572
|
-
const
|
|
573
|
-
|
|
574
|
-
const
|
|
575
|
-
return
|
|
572
|
+
const D = (p + g * y * m) / S, F = g * y * D - m * S, Z = g * y * m - D * S;
|
|
573
|
+
w = (_) => {
|
|
574
|
+
const Y = Math.exp(-g * y * _), M = Math.min(S * _, 300);
|
|
575
|
+
return Y * (F * Math.sinh(M) + Z * Math.cosh(M));
|
|
576
576
|
};
|
|
577
577
|
}
|
|
578
578
|
const V = {
|
|
579
579
|
calculatedDuration: d && h || null,
|
|
580
|
-
velocity: (
|
|
581
|
-
next: (
|
|
580
|
+
velocity: (S) => /* @__PURE__ */ H(w(S)),
|
|
581
|
+
next: (S) => {
|
|
582
582
|
if (!d && g < 1) {
|
|
583
|
-
const
|
|
584
|
-
return a.done = Math.abs(
|
|
583
|
+
const F = Math.exp(-g * y * S), Z = Math.sin(b * S), _ = Math.cos(b * S), Y = o - F * (C * Z + m * _), M = /* @__PURE__ */ H(F * (A * Z + P * _));
|
|
584
|
+
return a.done = Math.abs(M) <= s && Math.abs(o - Y) <= i, a.value = a.done ? o : Y, a;
|
|
585
585
|
}
|
|
586
|
-
const
|
|
586
|
+
const D = v(S);
|
|
587
587
|
if (d)
|
|
588
|
-
a.done =
|
|
588
|
+
a.done = S >= h;
|
|
589
589
|
else {
|
|
590
|
-
const
|
|
591
|
-
a.done = Math.abs(
|
|
590
|
+
const F = /* @__PURE__ */ H(w(S));
|
|
591
|
+
a.done = Math.abs(F) <= s && Math.abs(o - D) <= i;
|
|
592
592
|
}
|
|
593
|
-
return a.value = a.done ? o :
|
|
593
|
+
return a.value = a.done ? o : D, a;
|
|
594
594
|
},
|
|
595
595
|
toString: () => {
|
|
596
|
-
const
|
|
597
|
-
return
|
|
596
|
+
const S = Math.min(En(V), pe), D = $i((F) => V.next(S * F).value, S, 30);
|
|
597
|
+
return S + "ms " + D;
|
|
598
598
|
},
|
|
599
599
|
toTransition: () => {
|
|
600
600
|
}
|
|
@@ -603,7 +603,7 @@ function me(t = B.visualDuration, e = B.bounce) {
|
|
|
603
603
|
}
|
|
604
604
|
me.applyToOptions = (t) => {
|
|
605
605
|
const e = aa(t, 100, me);
|
|
606
|
-
return t.ease = e.ease, t.duration = /* @__PURE__ */
|
|
606
|
+
return t.ease = e.ease, t.duration = /* @__PURE__ */ H(e.duration), t.type = "keyframes", t;
|
|
607
607
|
};
|
|
608
608
|
const pa = 5;
|
|
609
609
|
function Ki(t, e, n) {
|
|
@@ -618,15 +618,15 @@ function Ye({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
618
618
|
let g = n * e;
|
|
619
619
|
const m = h + g, y = o === void 0 ? m : o(m);
|
|
620
620
|
y !== m && (g = y - h);
|
|
621
|
-
const x = (P) => -g * Math.exp(-P / s),
|
|
622
|
-
const V = x(P),
|
|
623
|
-
f.done = Math.abs(V) <= u, f.value = f.done ? y :
|
|
621
|
+
const x = (P) => -g * Math.exp(-P / s), v = (P) => y + x(P), w = (P) => {
|
|
622
|
+
const V = x(P), S = v(P);
|
|
623
|
+
f.done = Math.abs(V) <= u, f.value = f.done ? y : S;
|
|
624
624
|
};
|
|
625
|
-
let
|
|
625
|
+
let b, C;
|
|
626
626
|
const A = (P) => {
|
|
627
|
-
d(f.value) && (
|
|
627
|
+
d(f.value) && (b = P, C = me({
|
|
628
628
|
keyframes: [f.value, p(f.value)],
|
|
629
|
-
velocity: Ki(
|
|
629
|
+
velocity: Ki(v, P, f.value),
|
|
630
630
|
// TODO: This should be passing * 1000
|
|
631
631
|
damping: i,
|
|
632
632
|
stiffness: r,
|
|
@@ -638,12 +638,12 @@ function Ye({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
638
638
|
calculatedDuration: null,
|
|
639
639
|
next: (P) => {
|
|
640
640
|
let V = !1;
|
|
641
|
-
return !C &&
|
|
641
|
+
return !C && b === void 0 && (V = !0, w(P), A(P)), b !== void 0 && P >= b ? C.next(P - b) : (!V && w(P), f);
|
|
642
642
|
}
|
|
643
643
|
};
|
|
644
644
|
}
|
|
645
645
|
function ma(t, e, n) {
|
|
646
|
-
const s = [], i = n ||
|
|
646
|
+
const s = [], i = n || ht.mix || Wi, r = t.length - 1;
|
|
647
647
|
for (let o = 0; o < r; o++) {
|
|
648
648
|
let a = i(t[o], t[o + 1]);
|
|
649
649
|
if (e) {
|
|
@@ -656,7 +656,7 @@ function ma(t, e, n) {
|
|
|
656
656
|
}
|
|
657
657
|
function ga(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
658
658
|
const r = t.length;
|
|
659
|
-
if (
|
|
659
|
+
if (lt(r === e.length, "Both input and output ranges must be the same length", "range-length"), r === 1)
|
|
660
660
|
return () => e[0];
|
|
661
661
|
if (r === 2 && e[0] === e[1])
|
|
662
662
|
return () => e[1];
|
|
@@ -672,13 +672,13 @@ function ga(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
|
672
672
|
const f = /* @__PURE__ */ $t(t[h], t[h + 1], l);
|
|
673
673
|
return a[h](f);
|
|
674
674
|
};
|
|
675
|
-
return n ? (l) => u(
|
|
675
|
+
return n ? (l) => u(ot(t[0], t[r - 1], l)) : u;
|
|
676
676
|
}
|
|
677
677
|
function ya(t, e) {
|
|
678
678
|
const n = t[t.length - 1];
|
|
679
679
|
for (let s = 1; s <= e; s++) {
|
|
680
680
|
const i = /* @__PURE__ */ $t(0, e, s);
|
|
681
|
-
t.push(
|
|
681
|
+
t.push(R(n, 1, i));
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
function va(t) {
|
|
@@ -765,7 +765,7 @@ class ge extends Rn {
|
|
|
765
765
|
const { type: n = St, repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = e;
|
|
766
766
|
let { keyframes: a } = e;
|
|
767
767
|
const c = n || St;
|
|
768
|
-
process.env.NODE_ENV !== "production" && c !== St &&
|
|
768
|
+
process.env.NODE_ENV !== "production" && c !== St && lt(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), c !== St && typeof a[0] != "number" && (this.mixKeyframes = Ht(ba, Wi(a[0], a[1])), a = [0, 100]);
|
|
769
769
|
const u = c({ ...e, keyframes: a });
|
|
770
770
|
r === "mirror" && (this.mirroredGenerator = c({
|
|
771
771
|
...e,
|
|
@@ -787,18 +787,18 @@ class ge extends Rn {
|
|
|
787
787
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - i / this.speed, this.startTime)), n ? this.currentTime = e : this.updateTime(e);
|
|
788
788
|
const y = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), x = this.playbackSpeed >= 0 ? y < 0 : y > i;
|
|
789
789
|
this.currentTime = Math.max(y, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
|
|
790
|
-
let
|
|
790
|
+
let v = this.currentTime, w = s;
|
|
791
791
|
if (h) {
|
|
792
792
|
const P = Math.min(this.currentTime, i) / a;
|
|
793
|
-
let V = Math.floor(P),
|
|
794
|
-
!
|
|
793
|
+
let V = Math.floor(P), S = P % 1;
|
|
794
|
+
!S && P >= 1 && (S = 1), S === 1 && V--, V = Math.min(V, h + 1), !!(V % 2) && (f === "reverse" ? (S = 1 - S, d && (S -= d / a)) : f === "mirror" && (w = o)), v = ot(0, 1, S) * a;
|
|
795
795
|
}
|
|
796
|
-
let
|
|
797
|
-
x ? (this.delayState.value = l[0],
|
|
798
|
-
let { done: C } =
|
|
796
|
+
let b;
|
|
797
|
+
x ? (this.delayState.value = l[0], b = this.delayState) : b = w.next(v), r && !x && (b.value = r(b.value));
|
|
798
|
+
let { done: C } = b;
|
|
799
799
|
!x && c !== null && (C = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
800
800
|
const A = this.holdTime === null && (this.state === "finished" || this.state === "running" && C);
|
|
801
|
-
return A && p !== Ye && (
|
|
801
|
+
return A && p !== Ye && (b.value = Se(l, this.options, m, this.speed)), g && g(b.value), A && this.finish(), b;
|
|
802
802
|
}
|
|
803
803
|
/**
|
|
804
804
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -819,7 +819,7 @@ class ge extends Rn {
|
|
|
819
819
|
return /* @__PURE__ */ X(this.currentTime);
|
|
820
820
|
}
|
|
821
821
|
set time(e) {
|
|
822
|
-
e = /* @__PURE__ */
|
|
822
|
+
e = /* @__PURE__ */ H(e), this.currentTime = e, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.playbackSpeed), this.driver ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = e, this.tick(e));
|
|
823
823
|
}
|
|
824
824
|
/**
|
|
825
825
|
* Returns the generator's velocity at the current time in units/second.
|
|
@@ -883,8 +883,8 @@ function Sa(t) {
|
|
|
883
883
|
for (let e = 1; e < t.length; e++)
|
|
884
884
|
t[e] ?? (t[e] = t[e - 1]);
|
|
885
885
|
}
|
|
886
|
-
const
|
|
887
|
-
const e =
|
|
886
|
+
const vt = (t) => t * 180 / Math.PI, Xe = (t) => {
|
|
887
|
+
const e = vt(Math.atan2(t[1], t[0]));
|
|
888
888
|
return qe(e);
|
|
889
889
|
}, Aa = {
|
|
890
890
|
x: 4,
|
|
@@ -896,8 +896,8 @@ const yt = (t) => t * 180 / Math.PI, Xe = (t) => {
|
|
|
896
896
|
scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
|
|
897
897
|
rotate: Xe,
|
|
898
898
|
rotateZ: Xe,
|
|
899
|
-
skewX: (t) =>
|
|
900
|
-
skewY: (t) =>
|
|
899
|
+
skewX: (t) => vt(Math.atan(t[1])),
|
|
900
|
+
skewY: (t) => vt(Math.atan(t[2])),
|
|
901
901
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
|
|
902
902
|
}, qe = (t) => (t = t % 360, t < 0 && (t += 360), t), os = Xe, rs = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), as = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), Va = {
|
|
903
903
|
x: 12,
|
|
@@ -909,12 +909,12 @@ const yt = (t) => t * 180 / Math.PI, Xe = (t) => {
|
|
|
909
909
|
scaleX: rs,
|
|
910
910
|
scaleY: as,
|
|
911
911
|
scale: (t) => (rs(t) + as(t)) / 2,
|
|
912
|
-
rotateX: (t) => qe(
|
|
913
|
-
rotateY: (t) => qe(
|
|
912
|
+
rotateX: (t) => qe(vt(Math.atan2(t[6], t[5]))),
|
|
913
|
+
rotateY: (t) => qe(vt(Math.atan2(-t[2], t[0]))),
|
|
914
914
|
rotateZ: os,
|
|
915
915
|
rotate: os,
|
|
916
|
-
skewX: (t) =>
|
|
917
|
-
skewY: (t) =>
|
|
916
|
+
skewX: (t) => vt(Math.atan(t[4])),
|
|
917
|
+
skewY: (t) => vt(Math.atan(t[1])),
|
|
918
918
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
|
|
919
919
|
};
|
|
920
920
|
function Ze(t) {
|
|
@@ -969,7 +969,7 @@ function Ra(t) {
|
|
|
969
969
|
s !== void 0 && (e.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
970
970
|
}), e;
|
|
971
971
|
}
|
|
972
|
-
const
|
|
972
|
+
const ut = {
|
|
973
973
|
// Dimensions
|
|
974
974
|
width: ({ x: t }, { paddingLeft: e = "0", paddingRight: n = "0", boxSizing: s }) => {
|
|
975
975
|
const i = t.max - t.min;
|
|
@@ -987,13 +987,13 @@ const ct = {
|
|
|
987
987
|
x: (t, { transform: e }) => Je(e, "x"),
|
|
988
988
|
y: (t, { transform: e }) => Je(e, "y")
|
|
989
989
|
};
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
const
|
|
990
|
+
ut.translateX = ut.x;
|
|
991
|
+
ut.translateY = ut.y;
|
|
992
|
+
const xt = /* @__PURE__ */ new Set();
|
|
993
993
|
let Qe = !1, tn = !1, en = !1;
|
|
994
994
|
function Gi() {
|
|
995
995
|
if (tn) {
|
|
996
|
-
const t = Array.from(
|
|
996
|
+
const t = Array.from(xt).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
997
997
|
e.forEach((s) => {
|
|
998
998
|
const i = Ra(s);
|
|
999
999
|
i.length && (n.set(s, i), s.render());
|
|
@@ -1008,10 +1008,10 @@ function Gi() {
|
|
|
1008
1008
|
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
1009
1009
|
});
|
|
1010
1010
|
}
|
|
1011
|
-
tn = !1, Qe = !1,
|
|
1011
|
+
tn = !1, Qe = !1, xt.forEach((t) => t.complete(en)), xt.clear();
|
|
1012
1012
|
}
|
|
1013
1013
|
function Hi() {
|
|
1014
|
-
|
|
1014
|
+
xt.forEach((t) => {
|
|
1015
1015
|
t.readKeyframes(), t.needsMeasurement && (tn = !0);
|
|
1016
1016
|
});
|
|
1017
1017
|
}
|
|
@@ -1023,7 +1023,7 @@ class Ln {
|
|
|
1023
1023
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
|
|
1024
1024
|
}
|
|
1025
1025
|
scheduleResolve() {
|
|
1026
|
-
this.state = "scheduled", this.isAsync ? (
|
|
1026
|
+
this.state = "scheduled", this.isAsync ? (xt.add(this), Qe || (Qe = !0, L.read(Hi), L.resolveKeyframes(Gi))) : (this.readKeyframes(), this.complete());
|
|
1027
1027
|
}
|
|
1028
1028
|
readKeyframes() {
|
|
1029
1029
|
const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
|
|
@@ -1048,10 +1048,10 @@ class Ln {
|
|
|
1048
1048
|
measureEndState() {
|
|
1049
1049
|
}
|
|
1050
1050
|
complete(e = !1) {
|
|
1051
|
-
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e),
|
|
1051
|
+
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), xt.delete(this);
|
|
1052
1052
|
}
|
|
1053
1053
|
cancel() {
|
|
1054
|
-
this.state === "scheduled" && (
|
|
1054
|
+
this.state === "scheduled" && (xt.delete(this), this.state = "pending");
|
|
1055
1055
|
}
|
|
1056
1056
|
resume() {
|
|
1057
1057
|
this.state === "pending" && this.scheduleResolve();
|
|
@@ -1116,7 +1116,7 @@ class Ji extends Rn {
|
|
|
1116
1116
|
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !e)
|
|
1117
1117
|
return;
|
|
1118
1118
|
const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: o = !1, finalKeyframe: a, onComplete: c } = e;
|
|
1119
|
-
this.isPseudoElement = !!r, this.allowFlatten = o, this.options = e,
|
|
1119
|
+
this.isPseudoElement = !!r, this.allowFlatten = o, this.options = e, lt(typeof e.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
1120
1120
|
const u = Oa(e);
|
|
1121
1121
|
this.animation = Fa(n, s, i, u, r), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1122
1122
|
if (this.finishedTime = this.time, !r) {
|
|
@@ -1180,7 +1180,7 @@ class Ji extends Rn {
|
|
|
1180
1180
|
}
|
|
1181
1181
|
set time(e) {
|
|
1182
1182
|
const n = this.finishedTime !== null;
|
|
1183
|
-
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */
|
|
1183
|
+
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ H(e), n && this.animation.pause();
|
|
1184
1184
|
}
|
|
1185
1185
|
/**
|
|
1186
1186
|
* The playback speed of the animation.
|
|
@@ -1244,12 +1244,12 @@ class Ua extends Ji {
|
|
|
1244
1244
|
const a = new ge({
|
|
1245
1245
|
...o,
|
|
1246
1246
|
autoplay: !1
|
|
1247
|
-
}), c = Math.max(ke, $.now() - this.startTime), u =
|
|
1247
|
+
}), c = Math.max(ke, $.now() - this.startTime), u = ot(0, ke, c - ke), l = a.sample(c).value, { name: h } = this.options;
|
|
1248
1248
|
r && h && _i(r, h, l), n.setWithVelocity(a.sample(Math.max(0, c - u)).value, l, u), a.stop();
|
|
1249
1249
|
}
|
|
1250
1250
|
}
|
|
1251
1251
|
const us = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
1252
|
-
(
|
|
1252
|
+
(tt.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
1253
1253
|
!t.startsWith("url("));
|
|
1254
1254
|
function Wa(t) {
|
|
1255
1255
|
const e = t[0];
|
|
@@ -1342,7 +1342,7 @@ class Xa extends Rn {
|
|
|
1342
1342
|
const { name: r, type: o, velocity: a, delay: c, isHandoff: u, onUpdate: l } = s;
|
|
1343
1343
|
this.resolvedAt = $.now();
|
|
1344
1344
|
let h = !0;
|
|
1345
|
-
$a(e, r, o, a) || (h = !1, (
|
|
1345
|
+
$a(e, r, o, a) || (h = !1, (ht.instantAnimations || !c) && (l == null || l(Se(e, s, n))), e[0] = e[e.length - 1], nn(s), s.repeat = 0);
|
|
1346
1346
|
const d = {
|
|
1347
1347
|
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Ya ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1348
1348
|
finalKeyframe: n,
|
|
@@ -1491,7 +1491,7 @@ class Za {
|
|
|
1491
1491
|
this.events[e] || (this.events[e] = new Pn());
|
|
1492
1492
|
const s = this.events[e].add(n);
|
|
1493
1493
|
return e === "change" ? () => {
|
|
1494
|
-
s(),
|
|
1494
|
+
s(), L.read(() => {
|
|
1495
1495
|
this.events.change.getSize() || this.stop();
|
|
1496
1496
|
});
|
|
1497
1497
|
} : s;
|
|
@@ -1676,7 +1676,7 @@ function il(t) {
|
|
|
1676
1676
|
const In = (t, e, n, s = {}, i, r) => (o) => {
|
|
1677
1677
|
const a = kn(s, t) || {}, c = a.delay || s.delay || 0;
|
|
1678
1678
|
let { elapsed: u = 0 } = s;
|
|
1679
|
-
u = u - /* @__PURE__ */
|
|
1679
|
+
u = u - /* @__PURE__ */ H(c);
|
|
1680
1680
|
const l = {
|
|
1681
1681
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
1682
1682
|
ease: "easeOut",
|
|
@@ -1693,12 +1693,12 @@ const In = (t, e, n, s = {}, i, r) => (o) => {
|
|
|
1693
1693
|
motionValue: e,
|
|
1694
1694
|
element: r ? void 0 : i
|
|
1695
1695
|
};
|
|
1696
|
-
il(a) || Object.assign(l, nl(t, l)), l.duration && (l.duration = /* @__PURE__ */
|
|
1696
|
+
il(a) || Object.assign(l, nl(t, l)), l.duration && (l.duration = /* @__PURE__ */ H(l.duration)), l.repeatDelay && (l.repeatDelay = /* @__PURE__ */ H(l.repeatDelay)), l.from !== void 0 && (l.keyframes[0] = l.from);
|
|
1697
1697
|
let h = !1;
|
|
1698
|
-
if ((l.type === !1 || l.duration === 0 && !l.repeatDelay) && (nn(l), l.delay === 0 && (h = !0)), (
|
|
1698
|
+
if ((l.type === !1 || l.duration === 0 && !l.repeatDelay) && (nn(l), l.delay === 0 && (h = !0)), (ht.instantAnimations || ht.skipAnimations || i != null && i.shouldSkipAnimations || a.skipAnimations) && (h = !0, nn(l), l.delay = 0), l.allowFlatten = !a.type && !a.ease, h && !r && e.get() !== void 0) {
|
|
1699
1699
|
const f = Se(l.keyframes, a);
|
|
1700
1700
|
if (f !== void 0) {
|
|
1701
|
-
|
|
1701
|
+
L.update(() => {
|
|
1702
1702
|
l.onUpdate(f), l.onComplete();
|
|
1703
1703
|
});
|
|
1704
1704
|
return;
|
|
@@ -1718,7 +1718,7 @@ function rl(t) {
|
|
|
1718
1718
|
}
|
|
1719
1719
|
const al = 4;
|
|
1720
1720
|
function so(t, e, n = 1) {
|
|
1721
|
-
|
|
1721
|
+
lt(n <= al, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1722
1722
|
const [s, i] = rl(t);
|
|
1723
1723
|
if (!s)
|
|
1724
1724
|
return;
|
|
@@ -1746,7 +1746,7 @@ function Bn(t, e, n, s) {
|
|
|
1746
1746
|
}
|
|
1747
1747
|
return e;
|
|
1748
1748
|
}
|
|
1749
|
-
function
|
|
1749
|
+
function wt(t, e, n) {
|
|
1750
1750
|
const s = t.getProps();
|
|
1751
1751
|
return Bn(s, e, n !== void 0 ? n : s.custom, t);
|
|
1752
1752
|
}
|
|
@@ -1766,7 +1766,7 @@ function cl(t) {
|
|
|
1766
1766
|
return sn(t) ? t[t.length - 1] || 0 : t;
|
|
1767
1767
|
}
|
|
1768
1768
|
function ul(t, e) {
|
|
1769
|
-
const n =
|
|
1769
|
+
const n = wt(t, e);
|
|
1770
1770
|
let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
|
|
1771
1771
|
r = { ...r, ...s };
|
|
1772
1772
|
for (const o in r) {
|
|
@@ -1782,8 +1782,8 @@ function on(t, e) {
|
|
|
1782
1782
|
const n = t.getValue("willChange");
|
|
1783
1783
|
if (hl(n))
|
|
1784
1784
|
return n.add(e);
|
|
1785
|
-
if (!n &&
|
|
1786
|
-
const s = new
|
|
1785
|
+
if (!n && ht.WillChange) {
|
|
1786
|
+
const s = new ht.WillChange("auto");
|
|
1787
1787
|
t.addValue("willChange", s), s.add(e);
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
@@ -1817,25 +1817,25 @@ function ao(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
1817
1817
|
l && (y.skipAnimations = !0);
|
|
1818
1818
|
const x = g.get();
|
|
1819
1819
|
if (x !== void 0 && !g.isAnimating() && !Array.isArray(m) && m === x && !y.velocity) {
|
|
1820
|
-
|
|
1820
|
+
L.update(() => g.set(m));
|
|
1821
1821
|
continue;
|
|
1822
1822
|
}
|
|
1823
|
-
let
|
|
1823
|
+
let v = !1;
|
|
1824
1824
|
if (window.MotionHandoffAnimation) {
|
|
1825
1825
|
const C = ro(t);
|
|
1826
1826
|
if (C) {
|
|
1827
|
-
const A = window.MotionHandoffAnimation(C, p,
|
|
1828
|
-
A !== null && (y.startTime = A,
|
|
1827
|
+
const A = window.MotionHandoffAnimation(C, p, L);
|
|
1828
|
+
A !== null && (y.startTime = A, v = !0);
|
|
1829
1829
|
}
|
|
1830
1830
|
}
|
|
1831
1831
|
on(t, p);
|
|
1832
|
-
const
|
|
1833
|
-
g.start(In(p, g, m,
|
|
1834
|
-
const
|
|
1835
|
-
|
|
1832
|
+
const w = u ?? t.shouldReduceMotion;
|
|
1833
|
+
g.start(In(p, g, m, w && io.has(p) ? { type: !1 } : y, t, v));
|
|
1834
|
+
const b = g.animation;
|
|
1835
|
+
b && h.push(b);
|
|
1836
1836
|
}
|
|
1837
1837
|
if (o) {
|
|
1838
|
-
const p = () =>
|
|
1838
|
+
const p = () => L.update(() => {
|
|
1839
1839
|
o && ul(t, o);
|
|
1840
1840
|
});
|
|
1841
1841
|
h.length ? Promise.all(h).then(p) : p();
|
|
@@ -1844,7 +1844,7 @@ function ao(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
1844
1844
|
}
|
|
1845
1845
|
function rn(t, e, n = {}) {
|
|
1846
1846
|
var c;
|
|
1847
|
-
const s =
|
|
1847
|
+
const s = wt(t, e, n.type === "exit" ? (c = t.presenceContext) == null ? void 0 : c.custom : void 0);
|
|
1848
1848
|
let { transition: i = t.getDefaultTransition() || {} } = s || {};
|
|
1849
1849
|
n.transitionOverride && (i = n.transitionOverride);
|
|
1850
1850
|
const r = s ? () => Promise.all(ao(t, s, n)) : () => Promise.resolve(), o = t.variantChildren && t.variantChildren.size ? (u = 0) => {
|
|
@@ -1875,7 +1875,7 @@ function ml(t, e, n = {}) {
|
|
|
1875
1875
|
} else if (typeof e == "string")
|
|
1876
1876
|
s = rn(t, e, n);
|
|
1877
1877
|
else {
|
|
1878
|
-
const i = typeof e == "function" ?
|
|
1878
|
+
const i = typeof e == "function" ? wt(t, e, n.custom) : e;
|
|
1879
1879
|
s = Promise.all(ao(t, i, n));
|
|
1880
1880
|
}
|
|
1881
1881
|
return s.then(() => {
|
|
@@ -1885,7 +1885,7 @@ function ml(t, e, n = {}) {
|
|
|
1885
1885
|
const gl = {
|
|
1886
1886
|
test: (t) => t === "auto",
|
|
1887
1887
|
parse: (t) => t
|
|
1888
|
-
}, lo = (t) => (e) => e.test(t), co = [Rt, T,
|
|
1888
|
+
}, lo = (t) => (e) => e.test(t), co = [Rt, T, it, rt, Wr, Ur, gl], ds = (t) => co.find(lo(t));
|
|
1889
1889
|
function yl(t) {
|
|
1890
1890
|
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || wi(t) : !0;
|
|
1891
1891
|
}
|
|
@@ -1902,38 +1902,38 @@ function xl(t) {
|
|
|
1902
1902
|
return s !== n && (r *= 100), e + "(" + r + i + ")";
|
|
1903
1903
|
}
|
|
1904
1904
|
const wl = /\b([a-z-]*)\(.*?\)/gu, an = {
|
|
1905
|
-
...
|
|
1905
|
+
...tt,
|
|
1906
1906
|
getAnimatableNone: (t) => {
|
|
1907
1907
|
const e = t.match(wl);
|
|
1908
1908
|
return e ? e.map(xl).join(" ") : t;
|
|
1909
1909
|
}
|
|
1910
1910
|
}, ln = {
|
|
1911
|
-
...
|
|
1911
|
+
...tt,
|
|
1912
1912
|
getAnimatableNone: (t) => {
|
|
1913
|
-
const e =
|
|
1914
|
-
return
|
|
1913
|
+
const e = tt.parse(t);
|
|
1914
|
+
return tt.createTransformer(t)(e.map((s) => typeof s == "number" ? 0 : typeof s == "object" ? { ...s, alpha: 1 } : s));
|
|
1915
1915
|
}
|
|
1916
1916
|
}, ps = {
|
|
1917
1917
|
...Rt,
|
|
1918
1918
|
transform: Math.round
|
|
1919
1919
|
}, Tl = {
|
|
1920
|
-
rotate:
|
|
1920
|
+
rotate: rt,
|
|
1921
1921
|
/**
|
|
1922
1922
|
* Internal channel for `transition.path` orientToPath. Composed onto
|
|
1923
1923
|
* `rotate` at the transform-build sites so the user's `rotate` is
|
|
1924
1924
|
* never read or overwritten. Not part of `transformPropOrder`.
|
|
1925
1925
|
*/
|
|
1926
|
-
pathRotation:
|
|
1927
|
-
rotateX:
|
|
1928
|
-
rotateY:
|
|
1929
|
-
rotateZ:
|
|
1926
|
+
pathRotation: rt,
|
|
1927
|
+
rotateX: rt,
|
|
1928
|
+
rotateY: rt,
|
|
1929
|
+
rotateZ: rt,
|
|
1930
1930
|
scale: te,
|
|
1931
1931
|
scaleX: te,
|
|
1932
1932
|
scaleY: te,
|
|
1933
1933
|
scaleZ: te,
|
|
1934
|
-
skew:
|
|
1935
|
-
skewX:
|
|
1936
|
-
skewY:
|
|
1934
|
+
skew: rt,
|
|
1935
|
+
skewX: rt,
|
|
1936
|
+
skewY: rt,
|
|
1937
1937
|
distance: T,
|
|
1938
1938
|
translateX: T,
|
|
1939
1939
|
translateY: T,
|
|
@@ -2012,17 +2012,17 @@ const wl = /\b([a-z-]*)\(.*?\)/gu, an = {
|
|
|
2012
2012
|
}, Pl = {
|
|
2013
2013
|
...ye,
|
|
2014
2014
|
// Color props
|
|
2015
|
-
color:
|
|
2016
|
-
backgroundColor:
|
|
2017
|
-
outlineColor:
|
|
2018
|
-
fill:
|
|
2019
|
-
stroke:
|
|
2015
|
+
color: B,
|
|
2016
|
+
backgroundColor: B,
|
|
2017
|
+
outlineColor: B,
|
|
2018
|
+
fill: B,
|
|
2019
|
+
stroke: B,
|
|
2020
2020
|
// Border props
|
|
2021
|
-
borderColor:
|
|
2022
|
-
borderTopColor:
|
|
2023
|
-
borderRightColor:
|
|
2024
|
-
borderBottomColor:
|
|
2025
|
-
borderLeftColor:
|
|
2021
|
+
borderColor: B,
|
|
2022
|
+
borderTopColor: B,
|
|
2023
|
+
borderRightColor: B,
|
|
2024
|
+
borderBottomColor: B,
|
|
2025
|
+
borderLeftColor: B,
|
|
2026
2026
|
filter: an,
|
|
2027
2027
|
WebkitFilter: an,
|
|
2028
2028
|
mask: ln,
|
|
@@ -2030,7 +2030,7 @@ const wl = /\b([a-z-]*)\(.*?\)/gu, an = {
|
|
|
2030
2030
|
}, uo = (t) => Pl[t], bl = /* @__PURE__ */ new Set([an, ln]);
|
|
2031
2031
|
function ho(t, e) {
|
|
2032
2032
|
let n = uo(t);
|
|
2033
|
-
return bl.has(n) || (n =
|
|
2033
|
+
return bl.has(n) || (n = tt), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
2034
2034
|
}
|
|
2035
2035
|
const Sl = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
2036
2036
|
function Al(t, e, n) {
|
|
@@ -2062,7 +2062,7 @@ class Vl extends Ln {
|
|
|
2062
2062
|
if (this.resolveNoneKeyframes(), !io.has(s) || e.length !== 2)
|
|
2063
2063
|
return;
|
|
2064
2064
|
const [i, r] = e, o = ds(i), a = ds(r), c = Qn(i), u = Qn(r);
|
|
2065
|
-
if (c !== u &&
|
|
2065
|
+
if (c !== u && ut[s]) {
|
|
2066
2066
|
this.needsMeasurement = !0;
|
|
2067
2067
|
return;
|
|
2068
2068
|
}
|
|
@@ -2072,7 +2072,7 @@ class Vl extends Ln {
|
|
|
2072
2072
|
const h = e[l];
|
|
2073
2073
|
typeof h == "string" && (e[l] = parseFloat(h));
|
|
2074
2074
|
}
|
|
2075
|
-
else
|
|
2075
|
+
else ut[s] && (this.needsMeasurement = !0);
|
|
2076
2076
|
}
|
|
2077
2077
|
resolveNoneKeyframes() {
|
|
2078
2078
|
const { unresolvedKeyframes: e, name: n } = this, s = [];
|
|
@@ -2084,7 +2084,7 @@ class Vl extends Ln {
|
|
|
2084
2084
|
const { element: e, unresolvedKeyframes: n, name: s } = this;
|
|
2085
2085
|
if (!e || !e.current)
|
|
2086
2086
|
return;
|
|
2087
|
-
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin =
|
|
2087
|
+
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = ut[s](e.measureViewportBox(), window.getComputedStyle(e.current)), n[0] = this.measuredOrigin;
|
|
2088
2088
|
const i = n[n.length - 1];
|
|
2089
2089
|
i !== void 0 && e.getValue(s, i).jump(i, !1);
|
|
2090
2090
|
}
|
|
@@ -2096,7 +2096,7 @@ class Vl extends Ln {
|
|
|
2096
2096
|
const i = e.getValue(n);
|
|
2097
2097
|
i && i.jump(this.measuredOrigin, !1);
|
|
2098
2098
|
const r = s.length - 1, o = s[r];
|
|
2099
|
-
s[r] =
|
|
2099
|
+
s[r] = ut[n](e.measureViewportBox(), window.getComputedStyle(e.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), (a = this.removedTransforms) != null && a.length && this.removedTransforms.forEach(([c, u]) => {
|
|
2100
2100
|
e.getValue(c).set(u);
|
|
2101
2101
|
}), this.resolveNoneKeyframes();
|
|
2102
2102
|
}
|
|
@@ -2117,18 +2117,18 @@ const cn = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
|
|
|
2117
2117
|
function oe(t) {
|
|
2118
2118
|
return xi(t) && "offsetHeight" in t && !("ownerSVGElement" in t);
|
|
2119
2119
|
}
|
|
2120
|
-
const { schedule: On } = /* @__PURE__ */ ki(queueMicrotask, !1),
|
|
2120
|
+
const { schedule: On } = /* @__PURE__ */ ki(queueMicrotask, !1), Q = {
|
|
2121
2121
|
x: !1,
|
|
2122
2122
|
y: !1
|
|
2123
2123
|
};
|
|
2124
2124
|
function po() {
|
|
2125
|
-
return
|
|
2125
|
+
return Q.x || Q.y;
|
|
2126
2126
|
}
|
|
2127
2127
|
function Cl(t) {
|
|
2128
|
-
return t === "x" || t === "y" ?
|
|
2129
|
-
|
|
2130
|
-
}) :
|
|
2131
|
-
|
|
2128
|
+
return t === "x" || t === "y" ? Q[t] ? null : (Q[t] = !0, () => {
|
|
2129
|
+
Q[t] = !1;
|
|
2130
|
+
}) : Q.x || Q.y ? null : (Q.x = Q.y = !0, () => {
|
|
2131
|
+
Q.x = Q.y = !1;
|
|
2132
2132
|
});
|
|
2133
2133
|
}
|
|
2134
2134
|
function mo(t, e) {
|
|
@@ -2237,7 +2237,7 @@ function Nn(t) {
|
|
|
2237
2237
|
return xi(t) && "ownerSVGElement" in t;
|
|
2238
2238
|
}
|
|
2239
2239
|
const ae = /* @__PURE__ */ new WeakMap();
|
|
2240
|
-
let
|
|
2240
|
+
let ct;
|
|
2241
2241
|
const yo = (t, e, n) => (s, i) => i && i[0] ? i[0][t + "Size"] : Nn(s) && "getBBox" in s ? s.getBBox()[e] : s[n], Fl = /* @__PURE__ */ yo("inline", "width", "offsetWidth"), Ol = /* @__PURE__ */ yo("block", "height", "offsetHeight");
|
|
2242
2242
|
function jl({ target: t, borderBoxSize: e }) {
|
|
2243
2243
|
var n;
|
|
@@ -2256,18 +2256,18 @@ function Nl(t) {
|
|
|
2256
2256
|
t.forEach(jl);
|
|
2257
2257
|
}
|
|
2258
2258
|
function Ul() {
|
|
2259
|
-
typeof ResizeObserver > "u" || (
|
|
2259
|
+
typeof ResizeObserver > "u" || (ct = new ResizeObserver(Nl));
|
|
2260
2260
|
}
|
|
2261
2261
|
function Wl(t, e) {
|
|
2262
|
-
|
|
2262
|
+
ct || Ul();
|
|
2263
2263
|
const n = fo(t);
|
|
2264
2264
|
return n.forEach((s) => {
|
|
2265
2265
|
let i = ae.get(s);
|
|
2266
|
-
i || (i = /* @__PURE__ */ new Set(), ae.set(s, i)), i.add(e),
|
|
2266
|
+
i || (i = /* @__PURE__ */ new Set(), ae.set(s, i)), i.add(e), ct == null || ct.observe(s);
|
|
2267
2267
|
}), () => {
|
|
2268
2268
|
n.forEach((s) => {
|
|
2269
2269
|
const i = ae.get(s);
|
|
2270
|
-
i == null || i.delete(e), i != null && i.size ||
|
|
2270
|
+
i == null || i.delete(e), i != null && i.size || ct == null || ct.unobserve(s);
|
|
2271
2271
|
});
|
|
2272
2272
|
};
|
|
2273
2273
|
}
|
|
@@ -2297,7 +2297,7 @@ function vs(t, e) {
|
|
|
2297
2297
|
function zl(t) {
|
|
2298
2298
|
return Nn(t) && t.tagName === "svg";
|
|
2299
2299
|
}
|
|
2300
|
-
const Gl = [...co,
|
|
2300
|
+
const Gl = [...co, B, tt], Hl = (t) => Gl.find(lo(t)), xs = () => ({
|
|
2301
2301
|
translate: 0,
|
|
2302
2302
|
scale: 1,
|
|
2303
2303
|
origin: 0,
|
|
@@ -2391,7 +2391,7 @@ class Jl {
|
|
|
2391
2391
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
2392
2392
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
2393
2393
|
const d = $.now();
|
|
2394
|
-
this.renderScheduledAt < d && (this.renderScheduledAt = d,
|
|
2394
|
+
this.renderScheduledAt < d && (this.renderScheduledAt = d, L.render(this.render, !1, !0));
|
|
2395
2395
|
};
|
|
2396
2396
|
const { latestValues: u, renderState: l } = a;
|
|
2397
2397
|
this.latestValues = u, this.baseTarget = { ...u }, this.initialValues = n.initial ? { ...u } : {}, this.renderState = l, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.skipAnimationsConfig = r, this.options = c, this.blockInitialAnimation = !!o, this.isControllingVariants = Ve(n), this.isVariantNode = vo(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
@@ -2410,7 +2410,7 @@ class Jl {
|
|
|
2410
2410
|
}
|
|
2411
2411
|
unmount() {
|
|
2412
2412
|
var e;
|
|
2413
|
-
this.projection && this.projection.unmount(),
|
|
2413
|
+
this.projection && this.projection.unmount(), ft(this.notifyUpdate), ft(this.render), this.valueSubscriptions.forEach((n) => n()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), (e = this.parent) == null || e.removeChild(this);
|
|
2414
2414
|
for (const n in this.events)
|
|
2415
2415
|
this.events[n].clear();
|
|
2416
2416
|
for (const n in this.features) {
|
|
@@ -2433,7 +2433,7 @@ class Jl {
|
|
|
2433
2433
|
keyframes: a,
|
|
2434
2434
|
times: c,
|
|
2435
2435
|
ease: u,
|
|
2436
|
-
duration: /* @__PURE__ */
|
|
2436
|
+
duration: /* @__PURE__ */ H(l)
|
|
2437
2437
|
}), f = o(h);
|
|
2438
2438
|
this.valueSubscriptions.set(e, () => {
|
|
2439
2439
|
f(), h.cancel();
|
|
@@ -2443,7 +2443,7 @@ class Jl {
|
|
|
2443
2443
|
const s = kt.has(e);
|
|
2444
2444
|
s && this.onBindTransform && this.onBindTransform();
|
|
2445
2445
|
const i = n.on("change", (o) => {
|
|
2446
|
-
this.latestValues[e] = o, this.props.onUpdate &&
|
|
2446
|
+
this.latestValues[e] = o, this.props.onUpdate && L.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
|
|
2447
2447
|
});
|
|
2448
2448
|
let r;
|
|
2449
2449
|
typeof window < "u" && window.MotionCheckAppearSync && (r = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
|
|
@@ -2560,7 +2560,7 @@ class Jl {
|
|
|
2560
2560
|
*/
|
|
2561
2561
|
readValue(e, n) {
|
|
2562
2562
|
let s = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
|
|
2563
|
-
return s != null && (typeof s == "string" && (vi(s) || wi(s)) ? s = parseFloat(s) : !Hl(s) &&
|
|
2563
|
+
return s != null && (typeof s == "string" && (vi(s) || wi(s)) ? s = parseFloat(s) : !Hl(s) && tt.test(n) && (s = ho(e, n)), this.setBaseTarget(e, U(s) ? s.get() : s)), U(s) ? s.get() : s;
|
|
2564
2564
|
}
|
|
2565
2565
|
/**
|
|
2566
2566
|
* Set the base target to later animate back to. This is currently
|
|
@@ -2618,7 +2618,7 @@ class To extends Jl {
|
|
|
2618
2618
|
}));
|
|
2619
2619
|
}
|
|
2620
2620
|
}
|
|
2621
|
-
class
|
|
2621
|
+
class dt {
|
|
2622
2622
|
constructor(e) {
|
|
2623
2623
|
this.isMounted = !1, this.node = e;
|
|
2624
2624
|
}
|
|
@@ -2651,7 +2651,7 @@ function Be(t) {
|
|
|
2651
2651
|
function hn({ scale: t, scaleX: e, scaleY: n }) {
|
|
2652
2652
|
return !Be(t) || !Be(e) || !Be(n);
|
|
2653
2653
|
}
|
|
2654
|
-
function
|
|
2654
|
+
function gt(t) {
|
|
2655
2655
|
return hn(t) || bo(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
2656
2656
|
}
|
|
2657
2657
|
function bo(t) {
|
|
@@ -2684,15 +2684,15 @@ function ec(t, e, n, s = !1) {
|
|
|
2684
2684
|
for (let c = 0; c < i; c++) {
|
|
2685
2685
|
r = n[c], o = r.projectionDelta;
|
|
2686
2686
|
const { visualElement: u } = r.options;
|
|
2687
|
-
u && u.props.style && u.props.style.display === "contents" || (s && r.options.layoutScroll && r.scroll && r !== r.root && (
|
|
2687
|
+
u && u.props.style && u.props.style.display === "contents" || (s && r.options.layoutScroll && r.scroll && r !== r.root && (st(t.x, -r.scroll.offset.x), st(t.y, -r.scroll.offset.y)), o && (e.x *= o.x.scale, e.y *= o.y.scale, So(t, o)), s && gt(r.latestValues) && ce(t, r.latestValues, (a = r.layout) == null ? void 0 : a.layoutBox));
|
|
2688
2688
|
}
|
|
2689
2689
|
e.x < As && e.x > Ss && (e.x = 1), e.y < As && e.y > Ss && (e.y = 1);
|
|
2690
2690
|
}
|
|
2691
|
-
function
|
|
2691
|
+
function st(t, e) {
|
|
2692
2692
|
t.min += e, t.max += e;
|
|
2693
2693
|
}
|
|
2694
2694
|
function Vs(t, e, n, s, i = 0.5) {
|
|
2695
|
-
const r =
|
|
2695
|
+
const r = R(t.min, t.max, i);
|
|
2696
2696
|
fn(t, e, n, r, s);
|
|
2697
2697
|
}
|
|
2698
2698
|
function Cs(t, e) {
|
|
@@ -2707,7 +2707,7 @@ function Ao(t, e) {
|
|
|
2707
2707
|
}
|
|
2708
2708
|
function nc(t, e, n) {
|
|
2709
2709
|
const s = Ao(t, n), { scroll: i } = e;
|
|
2710
|
-
return i && (
|
|
2710
|
+
return i && (st(s.x, i.offset.x), st(s.y, i.offset.y)), s;
|
|
2711
2711
|
}
|
|
2712
2712
|
const sc = {
|
|
2713
2713
|
x: "translateX",
|
|
@@ -2788,12 +2788,12 @@ const It = {
|
|
|
2788
2788
|
}
|
|
2789
2789
|
}, rc = {
|
|
2790
2790
|
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
2791
|
-
const s = t, i =
|
|
2791
|
+
const s = t, i = tt.parse(t);
|
|
2792
2792
|
if (i.length > 5)
|
|
2793
2793
|
return s;
|
|
2794
|
-
const r =
|
|
2794
|
+
const r = tt.createTransformer(t), o = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x, c = n.y.scale * e.y;
|
|
2795
2795
|
i[0 + o] /= a, i[1 + o] /= c;
|
|
2796
|
-
const u =
|
|
2796
|
+
const u = R(a, c, 0.5);
|
|
2797
2797
|
return typeof i[2 + o] == "number" && (i[2 + o] /= u), typeof i[3 + o] == "number" && (i[3 + o] /= u), r(i);
|
|
2798
2798
|
}
|
|
2799
2799
|
}, dn = {
|
|
@@ -2989,7 +2989,7 @@ function xc(t) {
|
|
|
2989
2989
|
let e = vc(t), n = Ds(), s = !0, i = !1;
|
|
2990
2990
|
const r = (u) => (l, h) => {
|
|
2991
2991
|
var d;
|
|
2992
|
-
const f =
|
|
2992
|
+
const f = wt(t, h, u === "exit" ? (d = t.presenceContext) == null ? void 0 : d.custom : void 0);
|
|
2993
2993
|
if (f) {
|
|
2994
2994
|
const { transition: p, transitionEnd: g, ...m } = f;
|
|
2995
2995
|
l = { ...l, ...m, ...g };
|
|
@@ -3003,69 +3003,69 @@ function xc(t) {
|
|
|
3003
3003
|
const { props: l } = t, h = Lo(t.parent) || {}, f = [], d = /* @__PURE__ */ new Set();
|
|
3004
3004
|
let p = {}, g = 1 / 0;
|
|
3005
3005
|
for (let y = 0; y < yc; y++) {
|
|
3006
|
-
const x = gc[y],
|
|
3006
|
+
const x = gc[y], v = n[x], w = l[x] !== void 0 ? l[x] : h[x], b = zt(w), C = x === u ? v.isActive : null;
|
|
3007
3007
|
C === !1 && (g = y);
|
|
3008
|
-
let A =
|
|
3009
|
-
if (A && (s || i) && t.manuallyAnimateOnMount && (A = !1),
|
|
3010
|
-
!
|
|
3011
|
-
!
|
|
3012
|
-
Ae(
|
|
3008
|
+
let A = w === h[x] && w !== l[x] && b;
|
|
3009
|
+
if (A && (s || i) && t.manuallyAnimateOnMount && (A = !1), v.protectedKeys = { ...p }, // If it isn't active and hasn't *just* been set as inactive
|
|
3010
|
+
!v.isActive && C === null || // If we didn't and don't have any defined prop for this animation type
|
|
3011
|
+
!w && !v.prevProp || // Or if the prop doesn't define an animation
|
|
3012
|
+
Ae(w) || typeof w == "boolean")
|
|
3013
3013
|
continue;
|
|
3014
|
-
if (x === "exit" &&
|
|
3015
|
-
|
|
3014
|
+
if (x === "exit" && v.isActive && C !== !0) {
|
|
3015
|
+
v.prevResolvedValues && (p = {
|
|
3016
3016
|
...p,
|
|
3017
|
-
...
|
|
3017
|
+
...v.prevResolvedValues
|
|
3018
3018
|
});
|
|
3019
3019
|
continue;
|
|
3020
3020
|
}
|
|
3021
|
-
const P = wc(
|
|
3021
|
+
const P = wc(v.prevProp, w);
|
|
3022
3022
|
let V = P || // If we're making this variant active, we want to always make it active
|
|
3023
|
-
x === u &&
|
|
3024
|
-
y > g &&
|
|
3025
|
-
const
|
|
3026
|
-
let
|
|
3027
|
-
C === !1 && (
|
|
3028
|
-
const { prevResolvedValues:
|
|
3029
|
-
...
|
|
3030
|
-
...
|
|
3031
|
-
},
|
|
3032
|
-
V = !0, d.has(
|
|
3033
|
-
const
|
|
3034
|
-
|
|
3023
|
+
x === u && v.isActive && !A && b || // If we removed a higher-priority variant (i is in reverse order)
|
|
3024
|
+
y > g && b, S = !1;
|
|
3025
|
+
const D = Array.isArray(w) ? w : [w];
|
|
3026
|
+
let F = D.reduce(r(x), {});
|
|
3027
|
+
C === !1 && (F = {});
|
|
3028
|
+
const { prevResolvedValues: Z = {} } = v, _ = {
|
|
3029
|
+
...Z,
|
|
3030
|
+
...F
|
|
3031
|
+
}, Y = (k) => {
|
|
3032
|
+
V = !0, d.has(k) && (S = !0, d.delete(k)), v.needsAnimating[k] = !0;
|
|
3033
|
+
const O = t.getValue(k);
|
|
3034
|
+
O && (O.liveStyle = !1);
|
|
3035
3035
|
};
|
|
3036
|
-
for (const
|
|
3037
|
-
const
|
|
3038
|
-
if (p.hasOwnProperty(
|
|
3036
|
+
for (const k in _) {
|
|
3037
|
+
const O = F[k], pt = Z[k];
|
|
3038
|
+
if (p.hasOwnProperty(k))
|
|
3039
3039
|
continue;
|
|
3040
3040
|
let Tt = !1;
|
|
3041
|
-
sn(
|
|
3041
|
+
sn(O) && sn(pt) ? Tt = !ko(O, pt) || P : Tt = O !== pt, Tt ? O != null ? Y(k) : d.add(k) : O !== void 0 && d.has(k) ? Y(k) : v.protectedKeys[k] = !0;
|
|
3042
3042
|
}
|
|
3043
|
-
|
|
3044
|
-
const
|
|
3045
|
-
V && (!
|
|
3046
|
-
const
|
|
3047
|
-
if (typeof
|
|
3048
|
-
const { parent:
|
|
3049
|
-
if (
|
|
3043
|
+
v.prevProp = w, v.prevResolvedValues = F, v.isActive && (p = { ...p, ...F }), (s || i) && t.blockInitialAnimation && (V = !1);
|
|
3044
|
+
const M = A && P;
|
|
3045
|
+
V && (!M || S) && f.push(...D.map((k) => {
|
|
3046
|
+
const O = { type: x };
|
|
3047
|
+
if (typeof k == "string" && (s || i) && !M && t.manuallyAnimateOnMount && t.parent) {
|
|
3048
|
+
const { parent: pt } = t, Tt = wt(pt, k);
|
|
3049
|
+
if (pt.enteringChildren && Tt) {
|
|
3050
3050
|
const { delayChildren: sr } = Tt.transition || {};
|
|
3051
|
-
|
|
3051
|
+
O.delay = eo(pt.enteringChildren, t, sr);
|
|
3052
3052
|
}
|
|
3053
3053
|
}
|
|
3054
3054
|
return {
|
|
3055
|
-
animation:
|
|
3056
|
-
options:
|
|
3055
|
+
animation: k,
|
|
3056
|
+
options: O
|
|
3057
3057
|
};
|
|
3058
3058
|
}));
|
|
3059
3059
|
}
|
|
3060
3060
|
if (d.size) {
|
|
3061
3061
|
const y = {};
|
|
3062
3062
|
if (typeof l.initial != "boolean") {
|
|
3063
|
-
const x =
|
|
3063
|
+
const x = wt(t, Array.isArray(l.initial) ? l.initial[0] : l.initial);
|
|
3064
3064
|
x && x.transition && (y.transition = x.transition);
|
|
3065
3065
|
}
|
|
3066
3066
|
d.forEach((x) => {
|
|
3067
|
-
const
|
|
3068
|
-
|
|
3067
|
+
const v = t.getBaseTarget(x), w = t.getValue(x);
|
|
3068
|
+
w && (w.liveStyle = !0), y[x] = v ?? null;
|
|
3069
3069
|
}), f.push({ animation: y });
|
|
3070
3070
|
}
|
|
3071
3071
|
let m = !!f.length;
|
|
@@ -3097,7 +3097,7 @@ function xc(t) {
|
|
|
3097
3097
|
function wc(t, e) {
|
|
3098
3098
|
return typeof e == "string" ? e !== t : Array.isArray(e) ? !ko(e, t) : !1;
|
|
3099
3099
|
}
|
|
3100
|
-
function
|
|
3100
|
+
function mt(t = !1) {
|
|
3101
3101
|
return {
|
|
3102
3102
|
isActive: t,
|
|
3103
3103
|
protectedKeys: {},
|
|
@@ -3107,19 +3107,19 @@ function pt(t = !1) {
|
|
|
3107
3107
|
}
|
|
3108
3108
|
function Ds() {
|
|
3109
3109
|
return {
|
|
3110
|
-
animate:
|
|
3111
|
-
whileInView:
|
|
3112
|
-
whileHover:
|
|
3113
|
-
whileTap:
|
|
3114
|
-
whileDrag:
|
|
3115
|
-
whileFocus:
|
|
3116
|
-
exit:
|
|
3110
|
+
animate: mt(!0),
|
|
3111
|
+
whileInView: mt(),
|
|
3112
|
+
whileHover: mt(),
|
|
3113
|
+
whileTap: mt(),
|
|
3114
|
+
whileDrag: mt(),
|
|
3115
|
+
whileFocus: mt(),
|
|
3116
|
+
exit: mt()
|
|
3117
3117
|
};
|
|
3118
3118
|
}
|
|
3119
3119
|
function pn(t, e) {
|
|
3120
3120
|
t.min = e.min, t.max = e.max;
|
|
3121
3121
|
}
|
|
3122
|
-
function
|
|
3122
|
+
function J(t, e) {
|
|
3123
3123
|
pn(t.x, e.x), pn(t.y, e.y);
|
|
3124
3124
|
}
|
|
3125
3125
|
function Es(t, e) {
|
|
@@ -3133,20 +3133,20 @@ function Ac(t, e, n) {
|
|
|
3133
3133
|
return Math.abs(t - e) <= n;
|
|
3134
3134
|
}
|
|
3135
3135
|
function Rs(t, e, n, s = 0.5) {
|
|
3136
|
-
t.origin = s, t.originPoint =
|
|
3136
|
+
t.origin = s, t.originPoint = R(e.min, e.max, t.origin), t.scale = K(n) / K(e), t.translate = R(n.min, n.max, t.origin) - t.originPoint, (t.scale >= Tc && t.scale <= Pc || isNaN(t.scale)) && (t.scale = 1), (t.translate >= bc && t.translate <= Sc || isNaN(t.translate)) && (t.translate = 0);
|
|
3137
3137
|
}
|
|
3138
3138
|
function Nt(t, e, n, s) {
|
|
3139
3139
|
Rs(t.x, e.x, n.x, s ? s.originX : void 0), Rs(t.y, e.y, n.y, s ? s.originY : void 0);
|
|
3140
3140
|
}
|
|
3141
3141
|
function Ls(t, e, n, s = 0) {
|
|
3142
|
-
const i = s ?
|
|
3142
|
+
const i = s ? R(n.min, n.max, s) : n.min;
|
|
3143
3143
|
t.min = i + e.min, t.max = t.min + K(e);
|
|
3144
3144
|
}
|
|
3145
3145
|
function Vc(t, e, n, s) {
|
|
3146
3146
|
Ls(t.x, e.x, n.x, s == null ? void 0 : s.x), Ls(t.y, e.y, n.y, s == null ? void 0 : s.y);
|
|
3147
3147
|
}
|
|
3148
3148
|
function ks(t, e, n, s = 0) {
|
|
3149
|
-
const i = s ?
|
|
3149
|
+
const i = s ? R(n.min, n.max, s) : n.min;
|
|
3150
3150
|
t.min = e.min - i, t.max = t.min + K(e);
|
|
3151
3151
|
}
|
|
3152
3152
|
function we(t, e, n, s) {
|
|
@@ -3156,9 +3156,9 @@ function Is(t, e, n, s, i) {
|
|
|
3156
3156
|
return t -= e, t = xe(t, 1 / n, s), i !== void 0 && (t = xe(t, 1 / i, s)), t;
|
|
3157
3157
|
}
|
|
3158
3158
|
function Cc(t, e = 0, n = 1, s = 0.5, i, r = t, o = t) {
|
|
3159
|
-
if (
|
|
3159
|
+
if (it.test(e) && (e = parseFloat(e), e = R(o.min, o.max, e / 100) - o.min), typeof e != "number")
|
|
3160
3160
|
return;
|
|
3161
|
-
let a =
|
|
3161
|
+
let a = R(r.min, r.max, s);
|
|
3162
3162
|
t === r && (a -= e), t.min = Is(t.min, e, n, a, i), t.max = Is(t.max, e, n, a, i);
|
|
3163
3163
|
}
|
|
3164
3164
|
function Bs(t, e, [n, s, i], r, o) {
|
|
@@ -3192,7 +3192,7 @@ function Us(t) {
|
|
|
3192
3192
|
function Ws(t, e) {
|
|
3193
3193
|
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
3194
3194
|
}
|
|
3195
|
-
function
|
|
3195
|
+
function nt(t) {
|
|
3196
3196
|
return [t("x"), t("y")];
|
|
3197
3197
|
}
|
|
3198
3198
|
function Rc(t, e, n) {
|
|
@@ -3212,15 +3212,15 @@ const jo = [
|
|
|
3212
3212
|
"borderBottomRightRadius"
|
|
3213
3213
|
], Lc = jo.length, $s = (t) => typeof t == "string" ? parseFloat(t) : t, Ks = (t) => typeof t == "number" || T.test(t);
|
|
3214
3214
|
function kc(t, e, n, s, i, r) {
|
|
3215
|
-
i ? (t.opacity =
|
|
3215
|
+
i ? (t.opacity = R(0, n.opacity ?? 1, Ic(s)), t.opacityExit = R(e.opacity ?? 1, 0, Bc(s))) : r && (t.opacity = R(e.opacity ?? 1, n.opacity ?? 1, s));
|
|
3216
3216
|
for (let o = 0; o < Lc; o++) {
|
|
3217
3217
|
const a = jo[o];
|
|
3218
3218
|
let c = zs(e, a), u = zs(n, a);
|
|
3219
3219
|
if (c === void 0 && u === void 0)
|
|
3220
3220
|
continue;
|
|
3221
|
-
c || (c = 0), u || (u = 0), c === 0 || u === 0 || Ks(c) === Ks(u) ? (t[a] = Math.max(
|
|
3221
|
+
c || (c = 0), u || (u = 0), c === 0 || u === 0 || Ks(c) === Ks(u) ? (t[a] = Math.max(R($s(c), $s(u), s), 0), (it.test(u) || it.test(c)) && (t[a] += "%")) : t[a] = u;
|
|
3222
3222
|
}
|
|
3223
|
-
(e.rotate || n.rotate) && (t.rotate =
|
|
3223
|
+
(e.rotate || n.rotate) && (t.rotate = R(e.rotate || 0, n.rotate || 0, s));
|
|
3224
3224
|
}
|
|
3225
3225
|
function zs(t, e) {
|
|
3226
3226
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
@@ -3254,9 +3254,9 @@ class jc {
|
|
|
3254
3254
|
function Nc(t, e) {
|
|
3255
3255
|
const n = $.now(), s = ({ timestamp: i }) => {
|
|
3256
3256
|
const r = i - n;
|
|
3257
|
-
r >= e && (
|
|
3257
|
+
r >= e && (ft(s), t(r - e));
|
|
3258
3258
|
};
|
|
3259
|
-
return
|
|
3259
|
+
return L.setup(s, !0), () => ft(s);
|
|
3260
3260
|
}
|
|
3261
3261
|
function ue(t) {
|
|
3262
3262
|
return U(t) ? t.get() : t;
|
|
@@ -3340,7 +3340,7 @@ function Uo(t) {
|
|
|
3340
3340
|
const n = ro(e);
|
|
3341
3341
|
if (window.MotionHasOptimisedAnimation(n, "transform")) {
|
|
3342
3342
|
const { layout: i, layoutId: r } = t.options;
|
|
3343
|
-
window.MotionCancelOptimisedAnimation(n, "transform",
|
|
3343
|
+
window.MotionCancelOptimisedAnimation(n, "transform", L, !(i || r));
|
|
3344
3344
|
}
|
|
3345
3345
|
const { parent: s } = t;
|
|
3346
3346
|
s && !s.hasCheckedOptimisedAppear && Uo(s);
|
|
@@ -3378,7 +3378,7 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3378
3378
|
if (u && !u.current && u.mount(o), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (c || a) && (this.isLayoutDirty = !0), t) {
|
|
3379
3379
|
let l, h = 0;
|
|
3380
3380
|
const f = () => this.root.updateBlockedByResize = !1;
|
|
3381
|
-
|
|
3381
|
+
L.read(() => {
|
|
3382
3382
|
h = window.innerWidth;
|
|
3383
3383
|
}), t(o, () => {
|
|
3384
3384
|
const d = window.innerWidth;
|
|
@@ -3393,12 +3393,12 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3393
3393
|
const p = this.options.transition || u.getDefaultTransition() || su, { onLayoutAnimationStart: g, onLayoutAnimationComplete: m } = u.getProps(), y = !this.targetLayout || !Oo(this.targetLayout, d), x = !h && f;
|
|
3394
3394
|
if (this.options.layoutRoot || this.resumeFrom || x || h && (y || !this.currentAnimation)) {
|
|
3395
3395
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
3396
|
-
const
|
|
3396
|
+
const v = {
|
|
3397
3397
|
...kn(p, "layout"),
|
|
3398
3398
|
onPlay: g,
|
|
3399
3399
|
onComplete: m
|
|
3400
3400
|
};
|
|
3401
|
-
(u.shouldReduceMotion || this.options.layoutRoot) && (
|
|
3401
|
+
(u.shouldReduceMotion || this.options.layoutRoot) && (v.delay = 0, v.type = !1), this.startAnimation(v), this.setAnimationOrigin(l, x, v.path);
|
|
3402
3402
|
} else
|
|
3403
3403
|
h || _s(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
3404
3404
|
this.targetLayout = d;
|
|
@@ -3407,7 +3407,7 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3407
3407
|
unmount() {
|
|
3408
3408
|
this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
|
|
3409
3409
|
const o = this.getStack();
|
|
3410
|
-
o && o.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(),
|
|
3410
|
+
o && o.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), ft(this.updateProjection);
|
|
3411
3411
|
}
|
|
3412
3412
|
// only on the root
|
|
3413
3413
|
blockUpdate() {
|
|
@@ -3460,7 +3460,7 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3460
3460
|
}
|
|
3461
3461
|
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(Xc), this.nodes.forEach(qc), this.nodes.forEach(Kc), this.nodes.forEach(zc)) : this.nodes.forEach(Hs), this.clearAllSnapshots();
|
|
3462
3462
|
const a = $.now();
|
|
3463
|
-
N.delta =
|
|
3463
|
+
N.delta = ot(0, 1e3 / 60, a - N.timestamp), N.timestamp = a, N.isProcessing = !0, Me.update.process(N), Me.preRender.process(N), Me.render.process(N), N.isProcessing = !1;
|
|
3464
3464
|
}
|
|
3465
3465
|
didUpdate() {
|
|
3466
3466
|
this.updateScheduled || (this.updateScheduled = !0, On.read(this.scheduleUpdate));
|
|
@@ -3469,10 +3469,10 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3469
3469
|
this.nodes.forEach(_c), this.sharedNodes.forEach(tu);
|
|
3470
3470
|
}
|
|
3471
3471
|
scheduleUpdateProjection() {
|
|
3472
|
-
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0,
|
|
3472
|
+
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, L.preRender(this.updateProjection, !1, !0));
|
|
3473
3473
|
}
|
|
3474
3474
|
scheduleCheckAfterUnmount() {
|
|
3475
|
-
|
|
3475
|
+
L.postRender(() => {
|
|
3476
3476
|
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
|
|
3477
3477
|
});
|
|
3478
3478
|
}
|
|
@@ -3510,7 +3510,7 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3510
3510
|
if (!i)
|
|
3511
3511
|
return;
|
|
3512
3512
|
const o = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !Fo(this.projectionDelta), c = this.getTransformTemplate(), u = c ? c(this.latestValues, "") : void 0, l = u !== this.prevTransformTemplateValue;
|
|
3513
|
-
o && this.instance && (a ||
|
|
3513
|
+
o && this.instance && (a || gt(this.latestValues) || l) && (i(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
|
|
3514
3514
|
}
|
|
3515
3515
|
measure(o = !0) {
|
|
3516
3516
|
const a = this.measurePageBox();
|
|
@@ -3531,43 +3531,43 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3531
3531
|
const a = o.measureViewportBox();
|
|
3532
3532
|
if (!(((u = this.scroll) == null ? void 0 : u.wasRoot) || this.path.some(ou))) {
|
|
3533
3533
|
const { scroll: l } = this.root;
|
|
3534
|
-
l && (
|
|
3534
|
+
l && (st(a.x, l.offset.x), st(a.y, l.offset.y));
|
|
3535
3535
|
}
|
|
3536
3536
|
return a;
|
|
3537
3537
|
}
|
|
3538
3538
|
removeElementScroll(o) {
|
|
3539
3539
|
var c;
|
|
3540
3540
|
const a = j();
|
|
3541
|
-
if (
|
|
3541
|
+
if (J(a, o), (c = this.scroll) != null && c.wasRoot)
|
|
3542
3542
|
return a;
|
|
3543
3543
|
for (let u = 0; u < this.path.length; u++) {
|
|
3544
3544
|
const l = this.path[u], { scroll: h, options: f } = l;
|
|
3545
|
-
l !== this.root && h && f.layoutScroll && (h.wasRoot &&
|
|
3545
|
+
l !== this.root && h && f.layoutScroll && (h.wasRoot && J(a, o), st(a.x, h.offset.x), st(a.y, h.offset.y));
|
|
3546
3546
|
}
|
|
3547
3547
|
return a;
|
|
3548
3548
|
}
|
|
3549
3549
|
applyTransform(o, a = !1, c) {
|
|
3550
3550
|
var l, h;
|
|
3551
3551
|
const u = c || j();
|
|
3552
|
-
|
|
3552
|
+
J(u, o);
|
|
3553
3553
|
for (let f = 0; f < this.path.length; f++) {
|
|
3554
3554
|
const d = this.path[f];
|
|
3555
|
-
!a && d.options.layoutScroll && d.scroll && d !== d.root && (
|
|
3555
|
+
!a && d.options.layoutScroll && d.scroll && d !== d.root && (st(u.x, -d.scroll.offset.x), st(u.y, -d.scroll.offset.y)), gt(d.latestValues) && ce(u, d.latestValues, (l = d.layout) == null ? void 0 : l.layoutBox);
|
|
3556
3556
|
}
|
|
3557
|
-
return
|
|
3557
|
+
return gt(this.latestValues) && ce(u, this.latestValues, (h = this.layout) == null ? void 0 : h.layoutBox), u;
|
|
3558
3558
|
}
|
|
3559
3559
|
removeTransform(o) {
|
|
3560
3560
|
var c;
|
|
3561
3561
|
const a = j();
|
|
3562
|
-
|
|
3562
|
+
J(a, o);
|
|
3563
3563
|
for (let u = 0; u < this.path.length; u++) {
|
|
3564
3564
|
const l = this.path[u];
|
|
3565
|
-
if (!
|
|
3565
|
+
if (!gt(l.latestValues))
|
|
3566
3566
|
continue;
|
|
3567
3567
|
let h;
|
|
3568
|
-
l.instance && (hn(l.latestValues) && l.updateSnapshot(), h = j(),
|
|
3568
|
+
l.instance && (hn(l.latestValues) && l.updateSnapshot(), h = j(), J(h, l.measurePageBox())), Fs(a, l.latestValues, (c = l.snapshot) == null ? void 0 : c.layoutBox, h);
|
|
3569
3569
|
}
|
|
3570
|
-
return
|
|
3570
|
+
return gt(this.latestValues) && Fs(a, this.latestValues), a;
|
|
3571
3571
|
}
|
|
3572
3572
|
setTargetDelta(o) {
|
|
3573
3573
|
this.targetDelta = o, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
@@ -3597,7 +3597,7 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3597
3597
|
return;
|
|
3598
3598
|
this.resolvedRelativeTargetAt = N.timestamp;
|
|
3599
3599
|
const f = this.getClosestProjectingParent();
|
|
3600
|
-
f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = j(), this.targetWithTransforms = j()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Vc(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) :
|
|
3600
|
+
f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = j(), this.targetWithTransforms = j()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Vc(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : J(this.target, this.layout.layoutBox), So(this.target, this.targetDelta)) : J(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.options.layoutAnchor !== !1 && f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? this.createRelativeTarget(f, this.target, f.target) : this.relativeParent = this.relativeTarget = void 0));
|
|
3601
3601
|
}
|
|
3602
3602
|
getClosestProjectingParent() {
|
|
3603
3603
|
if (!(!this.parent || hn(this.parent.latestValues) || bo(this.parent.latestValues)))
|
|
@@ -3607,7 +3607,7 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3607
3607
|
return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
|
|
3608
3608
|
}
|
|
3609
3609
|
createRelativeTarget(o, a, c) {
|
|
3610
|
-
this.relativeParent = o, this.linkedParentVersion = o.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = j(), this.relativeTargetOrigin = j(), we(this.relativeTargetOrigin, a, c, this.options.layoutAnchor || void 0),
|
|
3610
|
+
this.relativeParent = o, this.linkedParentVersion = o.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = j(), this.relativeTargetOrigin = j(), we(this.relativeTargetOrigin, a, c, this.options.layoutAnchor || void 0), J(this.relativeTarget, this.relativeTargetOrigin);
|
|
3611
3611
|
}
|
|
3612
3612
|
removeRelativeTarget() {
|
|
3613
3613
|
this.relativeParent = this.relativeTarget = void 0;
|
|
@@ -3621,7 +3621,7 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3621
3621
|
const { layout: u, layoutId: l } = this.options;
|
|
3622
3622
|
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || l))
|
|
3623
3623
|
return;
|
|
3624
|
-
|
|
3624
|
+
J(this.layoutCorrected, this.layout.layoutBox);
|
|
3625
3625
|
const h = this.treeScale.x, f = this.treeScale.y;
|
|
3626
3626
|
ec(this.layoutCorrected, this.treeScale, this.path, a), o.layout && !o.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (o.target = o.layout.layoutBox, o.targetWithTransforms = j());
|
|
3627
3627
|
const { target: d } = o;
|
|
@@ -3651,18 +3651,18 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3651
3651
|
setAnimationOrigin(o, a = !1, c) {
|
|
3652
3652
|
const u = this.snapshot, l = u ? u.latestValues : {}, h = { ...this.latestValues }, f = Vt();
|
|
3653
3653
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
3654
|
-
const d = j(), p = u ? u.source : void 0, g = this.layout ? this.layout.source : void 0, m = p !== g, y = this.getStack(), x = !y || y.members.length <= 1,
|
|
3654
|
+
const d = j(), p = u ? u.source : void 0, g = this.layout ? this.layout.source : void 0, m = p !== g, y = this.getStack(), x = !y || y.members.length <= 1, v = !!(m && !x && this.options.crossfade === !0 && !this.path.some(nu));
|
|
3655
3655
|
this.animationProgress = 0;
|
|
3656
|
-
let
|
|
3657
|
-
const
|
|
3656
|
+
let w;
|
|
3657
|
+
const b = c == null ? void 0 : c.interpolateProjection(o);
|
|
3658
3658
|
this.mixTargetDelta = (C) => {
|
|
3659
|
-
const A = C / 1e3, P =
|
|
3660
|
-
P ? (f.x.translate = P.x, f.x.scale =
|
|
3659
|
+
const A = C / 1e3, P = b == null ? void 0 : b(A);
|
|
3660
|
+
P ? (f.x.translate = P.x, f.x.scale = R(o.x.scale, 1, A), f.x.origin = o.x.origin, f.x.originPoint = o.x.originPoint, f.y.translate = P.y, f.y.scale = R(o.y.scale, 1, A), f.y.origin = o.y.origin, f.y.originPoint = o.y.originPoint) : (Ys(f.x, o.x, A), Ys(f.y, o.y, A)), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (we(d, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), eu(this.relativeTarget, this.relativeTargetOrigin, d, A), w && Ec(this.relativeTarget, w) && (this.isProjectionDirty = !1), w || (w = j()), J(w, this.relativeTarget)), m && (this.animationValues = h, kc(h, l, this.latestValues, A, v, x)), P && P.rotate !== void 0 && (this.animationValues || (this.animationValues = h), this.animationValues.pathRotation = P.rotate), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = A;
|
|
3661
3661
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
3662
3662
|
}
|
|
3663
3663
|
startAnimation(o) {
|
|
3664
3664
|
var a, c, u;
|
|
3665
|
-
this.notifyListeners("animationStart"), (a = this.currentAnimation) == null || a.stop(), (u = (c = this.resumingFrom) == null ? void 0 : c.currentAnimation) == null || u.stop(), this.pendingAnimation && (
|
|
3665
|
+
this.notifyListeners("animationStart"), (a = this.currentAnimation) == null || a.stop(), (u = (c = this.resumingFrom) == null ? void 0 : c.currentAnimation) == null || u.stop(), this.pendingAnimation && (ft(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = L.update(() => {
|
|
3666
3666
|
he.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = Mt(0)), this.motionValue.jump(0, !1), this.currentAnimation = Fc(this.motionValue, [0, 1e3], {
|
|
3667
3667
|
...o,
|
|
3668
3668
|
velocity: 0,
|
|
@@ -3697,7 +3697,7 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3697
3697
|
const f = K(this.layout.layoutBox.y);
|
|
3698
3698
|
c.y.min = o.target.y.min, c.y.max = c.y.min + f;
|
|
3699
3699
|
}
|
|
3700
|
-
|
|
3700
|
+
J(a, c), ce(a, l), Nt(this.projectionDeltaWithTransform, this.layoutCorrected, a, l);
|
|
3701
3701
|
}
|
|
3702
3702
|
}
|
|
3703
3703
|
registerSharedNode(o, a) {
|
|
@@ -3766,7 +3766,7 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3766
3766
|
}
|
|
3767
3767
|
const u = this.getLead();
|
|
3768
3768
|
if (!this.projectionDelta || !this.layout || !u.target) {
|
|
3769
|
-
this.options.layoutId && (o.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, o.pointerEvents = ue(a == null ? void 0 : a.pointerEvents) || ""), this.hasProjected && !
|
|
3769
|
+
this.options.layoutId && (o.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, o.pointerEvents = ue(a == null ? void 0 : a.pointerEvents) || ""), this.hasProjected && !gt(this.latestValues) && (o.transform = c ? c({}, "") : "none", this.hasProjected = !1);
|
|
3770
3770
|
return;
|
|
3771
3771
|
}
|
|
3772
3772
|
o.visibility = "";
|
|
@@ -3781,9 +3781,9 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3781
3781
|
continue;
|
|
3782
3782
|
const { correct: g, applyTo: m, isCSSVariable: y } = dn[p], x = h === "none" ? l[p] : g(l[p], u);
|
|
3783
3783
|
if (m) {
|
|
3784
|
-
const
|
|
3785
|
-
for (let
|
|
3786
|
-
o[m[
|
|
3784
|
+
const v = m.length;
|
|
3785
|
+
for (let w = 0; w < v; w++)
|
|
3786
|
+
o[m[w]] = x;
|
|
3787
3787
|
} else
|
|
3788
3788
|
y ? this.options.visualElement.renderState.vars[p] = x : o[p] = x;
|
|
3789
3789
|
}
|
|
@@ -3810,14 +3810,14 @@ function zc(t) {
|
|
|
3810
3810
|
if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
|
|
3811
3811
|
const { layoutBox: s, measuredBox: i } = t.layout, { animationType: r } = t.options, o = e.source !== t.layout.source;
|
|
3812
3812
|
if (r === "size")
|
|
3813
|
-
|
|
3813
|
+
nt((h) => {
|
|
3814
3814
|
const f = o ? e.measuredBox[h] : e.layoutBox[h], d = K(f);
|
|
3815
3815
|
f.min = s[h].min, f.max = f.min + d;
|
|
3816
3816
|
});
|
|
3817
3817
|
else if (r === "x" || r === "y") {
|
|
3818
3818
|
const h = r === "x" ? "y" : "x";
|
|
3819
3819
|
pn(o ? e.measuredBox[h] : e.layoutBox[h], s[h]);
|
|
3820
|
-
} else $o(r, e.layoutBox, s) &&
|
|
3820
|
+
} else $o(r, e.layoutBox, s) && nt((h) => {
|
|
3821
3821
|
const f = o ? e.measuredBox[h] : e.layoutBox[h], d = K(s[h]);
|
|
3822
3822
|
f.max = f.min + d, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[h].max = t.relativeTarget[h].min + d);
|
|
3823
3823
|
});
|
|
@@ -3894,10 +3894,10 @@ function tu(t) {
|
|
|
3894
3894
|
t.removeLeadSnapshot();
|
|
3895
3895
|
}
|
|
3896
3896
|
function Ys(t, e, n) {
|
|
3897
|
-
t.translate =
|
|
3897
|
+
t.translate = R(e.translate, 0, n), t.scale = R(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
|
|
3898
3898
|
}
|
|
3899
3899
|
function Xs(t, e, n, s) {
|
|
3900
|
-
t.min =
|
|
3900
|
+
t.min = R(e.min, n.min, s), t.max = R(e.max, n.max, s);
|
|
3901
3901
|
}
|
|
3902
3902
|
function eu(t, e, n, s) {
|
|
3903
3903
|
Xs(t.x, e.x, n.x, s), Xs(t.y, e.y, n.y, s);
|
|
@@ -3999,7 +3999,7 @@ class cu extends Pe.Component {
|
|
|
3999
3999
|
}
|
|
4000
4000
|
function uu({ children: t, isPresent: e, anchorX: n, anchorY: s, root: i, pop: r }) {
|
|
4001
4001
|
var f;
|
|
4002
|
-
const o = yn(), a =
|
|
4002
|
+
const o = yn(), a = G(null), c = G({
|
|
4003
4003
|
width: 0,
|
|
4004
4004
|
height: 0,
|
|
4005
4005
|
top: 0,
|
|
@@ -4009,10 +4009,10 @@ function uu({ children: t, isPresent: e, anchorX: n, anchorY: s, root: i, pop: r
|
|
|
4009
4009
|
direction: "ltr"
|
|
4010
4010
|
}), { nonce: u } = W(zn), l = ((f = t.props) == null ? void 0 : f.ref) ?? (t == null ? void 0 : t.ref), h = lu(a, l);
|
|
4011
4011
|
return vn(() => {
|
|
4012
|
-
const { width: d, height: p, top: g, left: m, right: y, bottom: x, direction:
|
|
4012
|
+
const { width: d, height: p, top: g, left: m, right: y, bottom: x, direction: v } = c.current;
|
|
4013
4013
|
if (e || r === !1 || !a.current || !d || !p)
|
|
4014
4014
|
return;
|
|
4015
|
-
const
|
|
4015
|
+
const w = v === "rtl", b = n === "left" ? w ? `right: ${y}` : `left: ${m}` : w ? `left: ${m}` : `right: ${y}`, C = s === "bottom" ? `bottom: ${x}` : `top: ${g}`;
|
|
4016
4016
|
a.current.dataset.motionPopId = o;
|
|
4017
4017
|
const A = document.createElement("style");
|
|
4018
4018
|
u && (A.nonce = u);
|
|
@@ -4022,18 +4022,18 @@ function uu({ children: t, isPresent: e, anchorX: n, anchorY: s, root: i, pop: r
|
|
|
4022
4022
|
position: absolute !important;
|
|
4023
4023
|
width: ${d}px !important;
|
|
4024
4024
|
height: ${p}px !important;
|
|
4025
|
-
${
|
|
4025
|
+
${b}px !important;
|
|
4026
4026
|
${C}px !important;
|
|
4027
4027
|
}
|
|
4028
4028
|
`), () => {
|
|
4029
4029
|
var V;
|
|
4030
4030
|
(V = a.current) == null || V.removeAttribute("data-motion-pop-id"), P.contains(A) && P.removeChild(A);
|
|
4031
4031
|
};
|
|
4032
|
-
}, [e]),
|
|
4032
|
+
}, [e]), E(cu, { isPresent: e, childRef: a, sizeRef: c, pop: r, children: r === !1 ? t : Pe.cloneElement(t, { ref: h }) });
|
|
4033
4033
|
}
|
|
4034
4034
|
const hu = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom: i, presenceAffectsLayout: r, mode: o, anchorX: a, anchorY: c, root: u }) => {
|
|
4035
4035
|
const l = wn(fu), h = yn();
|
|
4036
|
-
let f = !0, d =
|
|
4036
|
+
let f = !0, d = at(() => (f = !1, {
|
|
4037
4037
|
id: h,
|
|
4038
4038
|
initial: e,
|
|
4039
4039
|
isPresent: n,
|
|
@@ -4047,11 +4047,11 @@ const hu = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom:
|
|
|
4047
4047
|
},
|
|
4048
4048
|
register: (p) => (l.set(p, !1), () => l.delete(p))
|
|
4049
4049
|
}), [n, l, s]);
|
|
4050
|
-
return r && f && (d = { ...d }),
|
|
4050
|
+
return r && f && (d = { ...d }), at(() => {
|
|
4051
4051
|
l.forEach((p, g) => l.set(g, !1));
|
|
4052
4052
|
}, [n]), Pe.useEffect(() => {
|
|
4053
4053
|
!n && !l.size && s && s();
|
|
4054
|
-
}, [n]), t =
|
|
4054
|
+
}, [n]), t = E(uu, { pop: o === "popLayout", isPresent: n, anchorX: a, anchorY: c, root: u, children: t }), E(be.Provider, { value: d, children: t });
|
|
4055
4055
|
};
|
|
4056
4056
|
function fu() {
|
|
4057
4057
|
return /* @__PURE__ */ new Map();
|
|
@@ -4076,39 +4076,39 @@ function ti(t) {
|
|
|
4076
4076
|
}), e;
|
|
4077
4077
|
}
|
|
4078
4078
|
const du = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presenceAffectsLayout: i = !0, mode: r = "sync", propagate: o = !1, anchorX: a = "left", anchorY: c = "top", root: u }) => {
|
|
4079
|
-
const [l, h] = zo(o), f =
|
|
4079
|
+
const [l, h] = zo(o), f = at(() => ti(t), [t]), d = o && !l ? [] : f.map(ee), p = G(!0), g = G(f), m = wn(() => /* @__PURE__ */ new Map()), y = G(/* @__PURE__ */ new Set()), [x, v] = Ot(f), [w, b] = Ot(f);
|
|
4080
4080
|
yi(() => {
|
|
4081
4081
|
p.current = !1, g.current = f;
|
|
4082
|
-
for (let P = 0; P <
|
|
4083
|
-
const V = ee(
|
|
4082
|
+
for (let P = 0; P < w.length; P++) {
|
|
4083
|
+
const V = ee(w[P]);
|
|
4084
4084
|
d.includes(V) ? (m.delete(V), y.current.delete(V)) : m.get(V) !== !0 && m.set(V, !1);
|
|
4085
4085
|
}
|
|
4086
|
-
}, [
|
|
4086
|
+
}, [w, d.length, d.join("-")]);
|
|
4087
4087
|
const C = [];
|
|
4088
4088
|
if (f !== x) {
|
|
4089
4089
|
let P = [...f];
|
|
4090
|
-
for (let V = 0; V <
|
|
4091
|
-
const
|
|
4092
|
-
d.includes(
|
|
4090
|
+
for (let V = 0; V < w.length; V++) {
|
|
4091
|
+
const S = w[V], D = ee(S);
|
|
4092
|
+
d.includes(D) || (P.splice(V, 0, S), C.push(S));
|
|
4093
4093
|
}
|
|
4094
|
-
return r === "wait" && C.length && (P = C),
|
|
4094
|
+
return r === "wait" && C.length && (P = C), b(ti(P)), v(f), null;
|
|
4095
4095
|
}
|
|
4096
|
-
process.env.NODE_ENV !== "production" && r === "wait" &&
|
|
4096
|
+
process.env.NODE_ENV !== "production" && r === "wait" && w.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
4097
4097
|
const { forceRender: A } = W(xn);
|
|
4098
|
-
return
|
|
4099
|
-
const V = ee(P),
|
|
4098
|
+
return E(ir, { children: w.map((P) => {
|
|
4099
|
+
const V = ee(P), S = o && !l ? !1 : f === w || d.includes(V), D = () => {
|
|
4100
4100
|
if (y.current.has(V))
|
|
4101
4101
|
return;
|
|
4102
4102
|
if (m.has(V))
|
|
4103
4103
|
y.current.add(V), m.set(V, !0);
|
|
4104
4104
|
else
|
|
4105
4105
|
return;
|
|
4106
|
-
let
|
|
4107
|
-
m.forEach((
|
|
4108
|
-
|
|
4109
|
-
}),
|
|
4106
|
+
let F = !0;
|
|
4107
|
+
m.forEach((Z) => {
|
|
4108
|
+
Z || (F = !1);
|
|
4109
|
+
}), F && (A == null || A(), b(g.current), o && (h == null || h()), s && s());
|
|
4110
4110
|
};
|
|
4111
|
-
return
|
|
4111
|
+
return E(hu, { isPresent: S, initial: !p.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: i, mode: r, root: u, onExitComplete: S ? void 0 : D, anchorX: a, anchorY: c, children: P }, V);
|
|
4112
4112
|
}) });
|
|
4113
4113
|
}, Go = Dt({ strict: !1 }), ei = {
|
|
4114
4114
|
animation: [
|
|
@@ -4217,7 +4217,7 @@ function xu(t, e) {
|
|
|
4217
4217
|
}
|
|
4218
4218
|
function wu(t) {
|
|
4219
4219
|
const { initial: e, animate: n } = xu(t, W(Ce));
|
|
4220
|
-
return
|
|
4220
|
+
return at(() => ({ initial: e, animate: n }), [si(e), si(n)]);
|
|
4221
4221
|
}
|
|
4222
4222
|
function si(t) {
|
|
4223
4223
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
@@ -4233,7 +4233,7 @@ function Yo(t, e, n) {
|
|
|
4233
4233
|
!U(e[s]) && !Co(s, n) && (t[s] = e[s]);
|
|
4234
4234
|
}
|
|
4235
4235
|
function Tu({ transformTemplate: t }, e) {
|
|
4236
|
-
return
|
|
4236
|
+
return at(() => {
|
|
4237
4237
|
const n = Gn();
|
|
4238
4238
|
return $n(n, e, t), Object.assign({}, n.vars, n.style);
|
|
4239
4239
|
}, [e]);
|
|
@@ -4251,7 +4251,7 @@ const Xo = () => ({
|
|
|
4251
4251
|
attrs: {}
|
|
4252
4252
|
});
|
|
4253
4253
|
function Su(t, e, n, s) {
|
|
4254
|
-
const i =
|
|
4254
|
+
const i = at(() => {
|
|
4255
4255
|
const r = Xo();
|
|
4256
4256
|
return Mo(r, e, Eo(s), t.transformTemplate, t.style), {
|
|
4257
4257
|
...r.attrs,
|
|
@@ -4312,7 +4312,7 @@ function Hn(t) {
|
|
|
4312
4312
|
);
|
|
4313
4313
|
}
|
|
4314
4314
|
function Vu(t, e, n, { latestValues: s }, i, r = !1, o) {
|
|
4315
|
-
const c = (o ?? Hn(t) ? Su : bu)(e, s, i, t), u = vu(e, typeof t == "string", r), l = t !== gi ? { ...u, ...c, ref: n } : {}, { children: h } = e, f =
|
|
4315
|
+
const c = (o ?? Hn(t) ? Su : bu)(e, s, i, t), u = vu(e, typeof t == "string", r), l = t !== gi ? { ...u, ...c, ref: n } : {}, { children: h } = e, f = at(() => U(h) ? h.get() : h, [h]);
|
|
4316
4316
|
return fr(t, {
|
|
4317
4317
|
...l,
|
|
4318
4318
|
children: f
|
|
@@ -4341,12 +4341,12 @@ function Mu(t, e, n, s) {
|
|
|
4341
4341
|
if (p) {
|
|
4342
4342
|
const { transitionEnd: g, transition: m, ...y } = p;
|
|
4343
4343
|
for (const x in y) {
|
|
4344
|
-
let
|
|
4345
|
-
if (Array.isArray(
|
|
4346
|
-
const
|
|
4347
|
-
|
|
4344
|
+
let v = y[x];
|
|
4345
|
+
if (Array.isArray(v)) {
|
|
4346
|
+
const w = l ? v.length - 1 : 0;
|
|
4347
|
+
v = v[w];
|
|
4348
4348
|
}
|
|
4349
|
-
|
|
4349
|
+
v !== null && (i[x] = v);
|
|
4350
4350
|
}
|
|
4351
4351
|
for (const x in g)
|
|
4352
4352
|
i[x] = g[x];
|
|
@@ -4366,11 +4366,11 @@ const qo = (t) => (e, n) => {
|
|
|
4366
4366
|
createRenderState: Xo
|
|
4367
4367
|
}), Ru = Symbol.for("motionComponentSymbol");
|
|
4368
4368
|
function Lu(t, e, n) {
|
|
4369
|
-
const s =
|
|
4369
|
+
const s = G(n);
|
|
4370
4370
|
vn(() => {
|
|
4371
4371
|
s.current = n;
|
|
4372
4372
|
});
|
|
4373
|
-
const i =
|
|
4373
|
+
const i = G(null);
|
|
4374
4374
|
return mi((r) => {
|
|
4375
4375
|
var a;
|
|
4376
4376
|
r && ((a = t.onMount) == null || a.call(t, r)), e && (r ? e.mount(r) : e.unmount());
|
|
@@ -4388,8 +4388,8 @@ function Pt(t) {
|
|
|
4388
4388
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
4389
4389
|
}
|
|
4390
4390
|
function ku(t, e, n, s, i, r) {
|
|
4391
|
-
var
|
|
4392
|
-
const { visualElement: o } = W(Ce), a = W(Go), c = W(be), u = W(zn), l = u.reducedMotion, h = u.skipAnimations, f =
|
|
4391
|
+
var v, w;
|
|
4392
|
+
const { visualElement: o } = W(Ce), a = W(Go), c = W(be), u = W(zn), l = u.reducedMotion, h = u.skipAnimations, f = G(null), d = G(!1);
|
|
4393
4393
|
s = s || a.renderer, !f.current && s && (f.current = s(t, {
|
|
4394
4394
|
visualState: e,
|
|
4395
4395
|
parent: o,
|
|
@@ -4402,17 +4402,17 @@ function ku(t, e, n, s, i, r) {
|
|
|
4402
4402
|
}), d.current && f.current && (f.current.manuallyAnimateOnMount = !0));
|
|
4403
4403
|
const p = f.current, g = W(Zo);
|
|
4404
4404
|
p && !p.projection && i && (p.type === "html" || p.type === "svg") && Iu(f.current, n, i, g);
|
|
4405
|
-
const m =
|
|
4405
|
+
const m = G(!1);
|
|
4406
4406
|
vn(() => {
|
|
4407
4407
|
p && m.current && p.update(n, c);
|
|
4408
4408
|
});
|
|
4409
|
-
const y = n[oo], x =
|
|
4409
|
+
const y = n[oo], x = G(!!y && typeof window < "u" && !((v = window.MotionHandoffIsComplete) != null && v.call(window, y)) && ((w = window.MotionHasOptimisedAnimation) == null ? void 0 : w.call(window, y)));
|
|
4410
4410
|
return yi(() => {
|
|
4411
4411
|
d.current = !0, p && (m.current = !0, window.MotionIsMounted = !0, p.updateFeatures(), p.scheduleRenderMicrotask(), x.current && p.animationState && p.animationState.animateChanges());
|
|
4412
4412
|
}), Wt(() => {
|
|
4413
4413
|
p && (!x.current && p.animationState && p.animationState.animateChanges(), x.current && (queueMicrotask(() => {
|
|
4414
|
-
var
|
|
4415
|
-
(
|
|
4414
|
+
var b;
|
|
4415
|
+
(b = window.MotionHandoffMarkAsComplete) == null || b.call(window, y);
|
|
4416
4416
|
}), x.current = !1), p.enteringChildren = void 0);
|
|
4417
4417
|
}), p;
|
|
4418
4418
|
}
|
|
@@ -4457,7 +4457,7 @@ function Ne(t, { forwardMotionProps: e = !1, type: n } = {}, s, i) {
|
|
|
4457
4457
|
const m = Ou(f);
|
|
4458
4458
|
h = m.MeasureLayout, p.visualElement = ku(t, g, f, i, m.ProjectionNode, r);
|
|
4459
4459
|
}
|
|
4460
|
-
return
|
|
4460
|
+
return et(Ce.Provider, { value: p, children: [h && p.visualElement ? E(h, { visualElement: p.visualElement, ...f }) : null, Vu(t, u, Lu(g, p.visualElement, l), g, d, e, r)] });
|
|
4461
4461
|
}
|
|
4462
4462
|
a.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
|
|
4463
4463
|
const c = dr(a);
|
|
@@ -4471,7 +4471,7 @@ function Fu(t, e) {
|
|
|
4471
4471
|
const n = W(Go).strict;
|
|
4472
4472
|
if (process.env.NODE_ENV !== "production" && e && n) {
|
|
4473
4473
|
const s = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
4474
|
-
t.ignoreStrict ? Et(!1, s, "lazy-strict-mode") :
|
|
4474
|
+
t.ignoreStrict ? Et(!1, s, "lazy-strict-mode") : lt(!1, s, "lazy-strict-mode");
|
|
4475
4475
|
}
|
|
4476
4476
|
}
|
|
4477
4477
|
function Ou(t) {
|
|
@@ -4500,7 +4500,7 @@ function ju(t, e) {
|
|
|
4500
4500
|
const Nu = (t, e) => e.isSVG ?? Hn(t) ? new pc(e) : new lc(e, {
|
|
4501
4501
|
allowProjection: t !== gi
|
|
4502
4502
|
});
|
|
4503
|
-
class Uu extends
|
|
4503
|
+
class Uu extends dt {
|
|
4504
4504
|
/**
|
|
4505
4505
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
4506
4506
|
* to the underlying animation library. We only want to load that if we load this,
|
|
@@ -4529,7 +4529,7 @@ class Uu extends ft {
|
|
|
4529
4529
|
}
|
|
4530
4530
|
}
|
|
4531
4531
|
let Wu = 0;
|
|
4532
|
-
class $u extends
|
|
4532
|
+
class $u extends dt {
|
|
4533
4533
|
constructor() {
|
|
4534
4534
|
super(...arguments), this.id = Wu++, this.isExitComplete = !1;
|
|
4535
4535
|
}
|
|
@@ -4544,7 +4544,7 @@ class $u extends ft {
|
|
|
4544
4544
|
if (this.isExitComplete) {
|
|
4545
4545
|
const { initial: o, custom: a } = this.node.getProps();
|
|
4546
4546
|
if (typeof o == "string" || typeof o == "object" && o !== null && !Array.isArray(o)) {
|
|
4547
|
-
const c =
|
|
4547
|
+
const c = wt(this.node, o, a);
|
|
4548
4548
|
if (c) {
|
|
4549
4549
|
const { transition: u, transitionEnd: l, ...h } = c;
|
|
4550
4550
|
for (const f in h)
|
|
@@ -4610,10 +4610,10 @@ class tr {
|
|
|
4610
4610
|
return;
|
|
4611
4611
|
const { point: m } = d, { timestamp: y } = N;
|
|
4612
4612
|
this.history.push({ ...m, timestamp: y });
|
|
4613
|
-
const { onStart: x, onMove:
|
|
4614
|
-
p || (x && x(this.lastMoveEvent, d), this.startEvent = this.lastMoveEvent),
|
|
4613
|
+
const { onStart: x, onMove: v } = this.handlers;
|
|
4614
|
+
p || (x && x(this.lastMoveEvent, d), this.startEvent = this.lastMoveEvent), v && v(this.lastMoveEvent, d);
|
|
4615
4615
|
}, this.handlePointerMove = (d, p) => {
|
|
4616
|
-
this.lastMoveEvent = d, this.lastRawMoveEventInfo = p, this.lastMoveEventInfo = ne(p, this.transformPagePoint),
|
|
4616
|
+
this.lastMoveEvent = d, this.lastRawMoveEventInfo = p, this.lastMoveEventInfo = ne(p, this.transformPagePoint), L.update(this.updatePoint, !0);
|
|
4617
4617
|
}, this.handlePointerUp = (d, p) => {
|
|
4618
4618
|
this.end();
|
|
4619
4619
|
const { onEnd: g, onSessionEnd: m, resumeAnimation: y } = this.handlers;
|
|
@@ -4666,13 +4666,13 @@ class tr {
|
|
|
4666
4666
|
x: e.scrollLeft,
|
|
4667
4667
|
y: e.scrollTop
|
|
4668
4668
|
}, r = { x: i.x - n.x, y: i.y - n.y };
|
|
4669
|
-
r.x === 0 && r.y === 0 || (s ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += r.x, this.lastMoveEventInfo.point.y += r.y) : this.history.length > 0 && (this.history[0].x -= r.x, this.history[0].y -= r.y), this.scrollPositions.set(e, i),
|
|
4669
|
+
r.x === 0 && r.y === 0 || (s ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += r.x, this.lastMoveEventInfo.point.y += r.y) : this.history.length > 0 && (this.history[0].x -= r.x, this.history[0].y -= r.y), this.scrollPositions.set(e, i), L.update(this.updatePoint, !0));
|
|
4670
4670
|
}
|
|
4671
4671
|
updateHandlers(e) {
|
|
4672
4672
|
this.handlers = e;
|
|
4673
4673
|
}
|
|
4674
4674
|
end() {
|
|
4675
|
-
this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(),
|
|
4675
|
+
this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), ft(this.updatePoint);
|
|
4676
4676
|
}
|
|
4677
4677
|
}
|
|
4678
4678
|
function ne(t, e) {
|
|
@@ -4700,11 +4700,11 @@ function _u(t, e) {
|
|
|
4700
4700
|
return { x: 0, y: 0 };
|
|
4701
4701
|
let n = t.length - 1, s = null;
|
|
4702
4702
|
const i = er(t);
|
|
4703
|
-
for (; n >= 0 && (s = t[n], !(i.timestamp - s.timestamp > /* @__PURE__ */
|
|
4703
|
+
for (; n >= 0 && (s = t[n], !(i.timestamp - s.timestamp > /* @__PURE__ */ H(e))); )
|
|
4704
4704
|
n--;
|
|
4705
4705
|
if (!s)
|
|
4706
4706
|
return { x: 0, y: 0 };
|
|
4707
|
-
s === t[0] && t.length > 2 && i.timestamp - s.timestamp > /* @__PURE__ */
|
|
4707
|
+
s === t[0] && t.length > 2 && i.timestamp - s.timestamp > /* @__PURE__ */ H(e) * 2 && (s = t[1]);
|
|
4708
4708
|
const r = /* @__PURE__ */ X(i.timestamp - s.timestamp);
|
|
4709
4709
|
if (r === 0)
|
|
4710
4710
|
return { x: 0, y: 0 };
|
|
@@ -4715,7 +4715,7 @@ function _u(t, e) {
|
|
|
4715
4715
|
return o.x === 1 / 0 && (o.x = 0), o.y === 1 / 0 && (o.y = 0), o;
|
|
4716
4716
|
}
|
|
4717
4717
|
function Yu(t, { min: e, max: n }, s) {
|
|
4718
|
-
return e !== void 0 && t < e ? t = s ?
|
|
4718
|
+
return e !== void 0 && t < e ? t = s ? R(e, t, s.min) : Math.max(t, e) : n !== void 0 && t > n && (t = s ? R(n, t, s.max) : Math.min(t, n)), t;
|
|
4719
4719
|
}
|
|
4720
4720
|
function ai(t, e, n) {
|
|
4721
4721
|
return {
|
|
@@ -4742,7 +4742,7 @@ function qu(t, e) {
|
|
|
4742
4742
|
function Zu(t, e) {
|
|
4743
4743
|
let n = 0.5;
|
|
4744
4744
|
const s = K(t), i = K(e);
|
|
4745
|
-
return i > s ? n = /* @__PURE__ */ $t(e.min, e.max - s, t.min) : s > i && (n = /* @__PURE__ */ $t(t.min, t.max - i, e.min)),
|
|
4745
|
+
return i > s ? n = /* @__PURE__ */ $t(e.min, e.max - s, t.min) : s > i && (n = /* @__PURE__ */ $t(t.min, t.max - i, e.min)), ot(0, 1, n);
|
|
4746
4746
|
}
|
|
4747
4747
|
function Ju(t, e) {
|
|
4748
4748
|
const n = {};
|
|
@@ -4779,17 +4779,17 @@ class eh {
|
|
|
4779
4779
|
const { drag: d, dragPropagation: p, onDragStart: g } = this.getProps();
|
|
4780
4780
|
if (d && !p && (this.openDragLock && this.openDragLock(), this.openDragLock = Cl(d), !this.openDragLock))
|
|
4781
4781
|
return;
|
|
4782
|
-
this.latestPointerEvent = h, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0),
|
|
4782
|
+
this.latestPointerEvent = h, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), nt((y) => {
|
|
4783
4783
|
let x = this.getAxisMotionValue(y).get() || 0;
|
|
4784
|
-
if (
|
|
4785
|
-
const { projection:
|
|
4786
|
-
if (
|
|
4787
|
-
const
|
|
4788
|
-
|
|
4784
|
+
if (it.test(x)) {
|
|
4785
|
+
const { projection: v } = this.visualElement;
|
|
4786
|
+
if (v && v.layout) {
|
|
4787
|
+
const w = v.layout.layoutBox[y];
|
|
4788
|
+
w && (x = K(w) * (parseFloat(x) / 100));
|
|
4789
4789
|
}
|
|
4790
4790
|
}
|
|
4791
4791
|
this.originPoint[y] = x;
|
|
4792
|
-
}), g &&
|
|
4792
|
+
}), g && L.update(() => g(h, f), !1, !0), on(this.visualElement, "transform");
|
|
4793
4793
|
const { animationState: m } = this.visualElement;
|
|
4794
4794
|
m && m.setActive("whileDrag", !0);
|
|
4795
4795
|
}, a = (h, f) => {
|
|
@@ -4802,7 +4802,7 @@ class eh {
|
|
|
4802
4802
|
this.currentDirection = sh(y), this.currentDirection !== null && g && g(this.currentDirection);
|
|
4803
4803
|
return;
|
|
4804
4804
|
}
|
|
4805
|
-
this.updateAxis("x", f.point, y), this.updateAxis("y", f.point, y), this.visualElement.render(), m &&
|
|
4805
|
+
this.updateAxis("x", f.point, y), this.updateAxis("y", f.point, y), this.visualElement.render(), m && L.update(() => m(h, f), !1, !0);
|
|
4806
4806
|
}, c = (h, f) => {
|
|
4807
4807
|
this.latestPointerEvent = h, this.latestPanInfo = f, this.stop(h, f), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
4808
4808
|
}, u = () => {
|
|
@@ -4833,7 +4833,7 @@ class eh {
|
|
|
4833
4833
|
const { velocity: o } = i;
|
|
4834
4834
|
this.startAnimation(o);
|
|
4835
4835
|
const { onDragEnd: a } = this.getProps();
|
|
4836
|
-
a &&
|
|
4836
|
+
a && L.postRender(() => a(s, i));
|
|
4837
4837
|
}
|
|
4838
4838
|
/**
|
|
4839
4839
|
* @internal
|
|
@@ -4865,7 +4865,7 @@ class eh {
|
|
|
4865
4865
|
resolveConstraints() {
|
|
4866
4866
|
var r;
|
|
4867
4867
|
const { dragConstraints: e, dragElastic: n } = this.getProps(), s = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (r = this.visualElement.projection) == null ? void 0 : r.layout, i = this.constraints;
|
|
4868
|
-
e && Pt(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && s ? this.constraints = Xu(s.layoutBox, e) : this.constraints = !1, this.elastic = Qu(n), i !== this.constraints && !Pt(e) && s && this.constraints && !this.hasMutatedConstraints &&
|
|
4868
|
+
e && Pt(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && s ? this.constraints = Xu(s.layoutBox, e) : this.constraints = !1, this.elastic = Qu(n), i !== this.constraints && !Pt(e) && s && this.constraints && !this.hasMutatedConstraints && nt((o) => {
|
|
4869
4869
|
this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] = Ju(s.layoutBox[o], this.constraints[o]));
|
|
4870
4870
|
});
|
|
4871
4871
|
}
|
|
@@ -4874,7 +4874,7 @@ class eh {
|
|
|
4874
4874
|
if (!e || !Pt(e))
|
|
4875
4875
|
return !1;
|
|
4876
4876
|
const s = e.current;
|
|
4877
|
-
|
|
4877
|
+
lt(s !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
|
|
4878
4878
|
const { projection: i } = this.visualElement;
|
|
4879
4879
|
if (!i || !i.layout)
|
|
4880
4880
|
return !1;
|
|
@@ -4888,7 +4888,7 @@ class eh {
|
|
|
4888
4888
|
return o;
|
|
4889
4889
|
}
|
|
4890
4890
|
startAnimation(e) {
|
|
4891
|
-
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: r, dragSnapToOrigin: o, onDragTransitionEnd: a } = this.getProps(), c = this.constraints || {}, u =
|
|
4891
|
+
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: r, dragSnapToOrigin: o, onDragTransitionEnd: a } = this.getProps(), c = this.constraints || {}, u = nt((l) => {
|
|
4892
4892
|
if (!se(l, n, this.currentDirection))
|
|
4893
4893
|
return;
|
|
4894
4894
|
let h = c && c[l] || {};
|
|
@@ -4913,7 +4913,7 @@ class eh {
|
|
|
4913
4913
|
return on(this.visualElement, e), s.start(In(e, s, 0, n, this.visualElement, !1));
|
|
4914
4914
|
}
|
|
4915
4915
|
stopAnimation() {
|
|
4916
|
-
|
|
4916
|
+
nt((e) => this.getAxisMotionValue(e).stop());
|
|
4917
4917
|
}
|
|
4918
4918
|
/**
|
|
4919
4919
|
* Drag works differently depending on which props are provided.
|
|
@@ -4926,14 +4926,14 @@ class eh {
|
|
|
4926
4926
|
return i || this.visualElement.getValue(e, this.visualElement.latestValues[e] ?? 0);
|
|
4927
4927
|
}
|
|
4928
4928
|
snapToCursor(e) {
|
|
4929
|
-
|
|
4929
|
+
nt((n) => {
|
|
4930
4930
|
const { drag: s } = this.getProps();
|
|
4931
4931
|
if (!se(n, s, this.currentDirection))
|
|
4932
4932
|
return;
|
|
4933
4933
|
const { projection: i } = this.visualElement, r = this.getAxisMotionValue(n);
|
|
4934
4934
|
if (i && i.layout) {
|
|
4935
4935
|
const { min: o, max: a } = i.layout.layoutBox[n], c = r.get() || 0;
|
|
4936
|
-
r.set(e[n] -
|
|
4936
|
+
r.set(e[n] - R(o, a, 0.5) + c);
|
|
4937
4937
|
}
|
|
4938
4938
|
});
|
|
4939
4939
|
}
|
|
@@ -4950,7 +4950,7 @@ class eh {
|
|
|
4950
4950
|
return;
|
|
4951
4951
|
this.stopAnimation();
|
|
4952
4952
|
const i = { x: 0, y: 0 };
|
|
4953
|
-
|
|
4953
|
+
nt((o) => {
|
|
4954
4954
|
const a = this.getAxisMotionValue(o);
|
|
4955
4955
|
if (a && this.constraints !== !1) {
|
|
4956
4956
|
const c = a.get();
|
|
@@ -4958,11 +4958,11 @@ class eh {
|
|
|
4958
4958
|
}
|
|
4959
4959
|
});
|
|
4960
4960
|
const { transformTemplate: r } = this.visualElement.getProps();
|
|
4961
|
-
this.visualElement.current.style.transform = r ? r({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.constraints = !1, this.resolveConstraints(),
|
|
4961
|
+
this.visualElement.current.style.transform = r ? r({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.constraints = !1, this.resolveConstraints(), nt((o) => {
|
|
4962
4962
|
if (!se(o, e, null))
|
|
4963
4963
|
return;
|
|
4964
4964
|
const a = this.getAxisMotionValue(o), { min: c, max: u } = this.constraints[o];
|
|
4965
|
-
a.set(
|
|
4965
|
+
a.set(R(c, u, i[o]));
|
|
4966
4966
|
}), this.visualElement.render();
|
|
4967
4967
|
}
|
|
4968
4968
|
addListeners() {
|
|
@@ -4978,9 +4978,9 @@ class eh {
|
|
|
4978
4978
|
const { dragConstraints: u } = this.getProps();
|
|
4979
4979
|
Pt(u) && u.current && (this.constraints = this.resolveRefConstraints(), s || (s = nh(e, u.current, () => this.scalePositionWithinConstraints())));
|
|
4980
4980
|
}, { projection: r } = this.visualElement, o = r.addEventListener("measure", i);
|
|
4981
|
-
r && !r.layout && (r.root && r.root.updateScroll(), r.updateLayout()),
|
|
4981
|
+
r && !r.layout && (r.root && r.root.updateScroll(), r.updateLayout()), L.read(i);
|
|
4982
4982
|
const a = Gt(window, "resize", () => this.scalePositionWithinConstraints()), c = r.addEventListener("didUpdate", (({ delta: u, hasLayoutChanged: l }) => {
|
|
4983
|
-
this.isDragging && l && (
|
|
4983
|
+
this.isDragging && l && (nt((h) => {
|
|
4984
4984
|
const f = this.getAxisMotionValue(h);
|
|
4985
4985
|
f && (this.originPoint[h] += u[h].translate, f.set(f.get() + u[h].translate));
|
|
4986
4986
|
}), this.visualElement.render());
|
|
@@ -5025,7 +5025,7 @@ function sh(t, e = 10) {
|
|
|
5025
5025
|
let n = null;
|
|
5026
5026
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
5027
5027
|
}
|
|
5028
|
-
class ih extends
|
|
5028
|
+
class ih extends dt {
|
|
5029
5029
|
constructor(e) {
|
|
5030
5030
|
super(e), this.removeGroupControls = q, this.removeListeners = q, this.controls = new eh(e);
|
|
5031
5031
|
}
|
|
@@ -5042,9 +5042,9 @@ class ih extends ft {
|
|
|
5042
5042
|
}
|
|
5043
5043
|
}
|
|
5044
5044
|
const We = (t) => (e, n) => {
|
|
5045
|
-
t &&
|
|
5045
|
+
t && L.update(() => t(e, n), !1, !0);
|
|
5046
5046
|
};
|
|
5047
|
-
class oh extends
|
|
5047
|
+
class oh extends dt {
|
|
5048
5048
|
constructor() {
|
|
5049
5049
|
super(...arguments), this.removePointerDownListener = q;
|
|
5050
5050
|
}
|
|
@@ -5061,7 +5061,7 @@ class oh extends ft {
|
|
|
5061
5061
|
onStart: We(n),
|
|
5062
5062
|
onMove: We(s),
|
|
5063
5063
|
onEnd: (r, o) => {
|
|
5064
|
-
delete this.session, i &&
|
|
5064
|
+
delete this.session, i && L.postRender(() => i(r, o));
|
|
5065
5065
|
}
|
|
5066
5066
|
};
|
|
5067
5067
|
}
|
|
@@ -5097,7 +5097,7 @@ class rh extends pr {
|
|
|
5097
5097
|
return o && (o.isPresent = r, e.layoutDependency !== n && o.setOptions({
|
|
5098
5098
|
...o.options,
|
|
5099
5099
|
layoutDependency: n
|
|
5100
|
-
}), $e = !0, i || e.layoutDependency !== n || n === void 0 || e.isPresent !== r ? o.willUpdate() : this.safeToRemove(), e.isPresent !== r && (r ? o.promote() : o.relegate() ||
|
|
5100
|
+
}), $e = !0, i || e.layoutDependency !== n || n === void 0 || e.isPresent !== r ? o.willUpdate() : this.safeToRemove(), e.isPresent !== r && (r ? o.promote() : o.relegate() || L.postRender(() => {
|
|
5101
5101
|
const a = o.getStack();
|
|
5102
5102
|
(!a || !a.members.length) && this.safeToRemove();
|
|
5103
5103
|
}))), null;
|
|
@@ -5122,7 +5122,7 @@ class rh extends pr {
|
|
|
5122
5122
|
}
|
|
5123
5123
|
function nr(t) {
|
|
5124
5124
|
const [e, n] = zo(), s = W(xn);
|
|
5125
|
-
return
|
|
5125
|
+
return E(rh, { ...t, layoutGroup: s, switchLayoutGroup: W(Zo), isPresent: e, safeToRemove: n });
|
|
5126
5126
|
}
|
|
5127
5127
|
const ah = {
|
|
5128
5128
|
pan: {
|
|
@@ -5138,9 +5138,9 @@ function fi(t, e, n) {
|
|
|
5138
5138
|
const { props: s } = t;
|
|
5139
5139
|
t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
|
|
5140
5140
|
const i = "onHover" + n, r = s[i];
|
|
5141
|
-
r &&
|
|
5141
|
+
r && L.postRender(() => r(e, Xt(e)));
|
|
5142
5142
|
}
|
|
5143
|
-
class lh extends
|
|
5143
|
+
class lh extends dt {
|
|
5144
5144
|
mount() {
|
|
5145
5145
|
const { current: e } = this.node;
|
|
5146
5146
|
e && (this.unmount = Dl(e, (n, s) => (fi(this.node, s, "Start"), (i) => fi(this.node, i, "End"))));
|
|
@@ -5148,7 +5148,7 @@ class lh extends ft {
|
|
|
5148
5148
|
unmount() {
|
|
5149
5149
|
}
|
|
5150
5150
|
}
|
|
5151
|
-
class ch extends
|
|
5151
|
+
class ch extends dt {
|
|
5152
5152
|
constructor() {
|
|
5153
5153
|
super(...arguments), this.isActive = !1;
|
|
5154
5154
|
}
|
|
@@ -5176,9 +5176,9 @@ function di(t, e, n) {
|
|
|
5176
5176
|
return;
|
|
5177
5177
|
t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
|
|
5178
5178
|
const i = "onTap" + (n === "End" ? "" : n), r = s[i];
|
|
5179
|
-
r &&
|
|
5179
|
+
r && L.postRender(() => r(e, Xt(e)));
|
|
5180
5180
|
}
|
|
5181
|
-
class uh extends
|
|
5181
|
+
class uh extends dt {
|
|
5182
5182
|
mount() {
|
|
5183
5183
|
const { current: e } = this.node;
|
|
5184
5184
|
if (!e)
|
|
@@ -5214,7 +5214,7 @@ const mh = {
|
|
|
5214
5214
|
some: 0,
|
|
5215
5215
|
all: 1
|
|
5216
5216
|
};
|
|
5217
|
-
class gh extends
|
|
5217
|
+
class gh extends dt {
|
|
5218
5218
|
constructor() {
|
|
5219
5219
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
5220
5220
|
}
|
|
@@ -5276,7 +5276,7 @@ const vh = {
|
|
|
5276
5276
|
...ah,
|
|
5277
5277
|
...xh
|
|
5278
5278
|
}, Bt = /* @__PURE__ */ ju(wh, Nu), Th = ({ open: t, onClose: e, userId: n, roleCode: s, ...i }) => {
|
|
5279
|
-
const r = xr.isOasis && (s === "RHP" || s === "PARAVET"), { translate: o } = Tr(), a =
|
|
5279
|
+
const r = xr.isOasis && (s === "RHP" || s === "PARAVET"), { translate: o } = Tr(), a = at(
|
|
5280
5280
|
() => r ? [{ id: "pin", label: o("Exactly 6 digits"), test: (M) => /^\d{6}$/.test(M) }] : [
|
|
5281
5281
|
{ id: "length", label: o("At least 8 characters"), test: (M) => M.length >= 8 },
|
|
5282
5282
|
{ id: "lowercase", label: o("One lowercase letter"), test: (M) => /[a-z]/.test(M) },
|
|
@@ -5288,10 +5288,10 @@ const vh = {
|
|
|
5288
5288
|
}
|
|
5289
5289
|
],
|
|
5290
5290
|
[r, o]
|
|
5291
|
-
), c =
|
|
5291
|
+
), c = at(
|
|
5292
5292
|
() => Jt.object().shape({
|
|
5293
5293
|
password: a.reduce(
|
|
5294
|
-
(M,
|
|
5294
|
+
(M, z) => M.test(z.id, z.label, (k) => !!k && z.test(k)),
|
|
5295
5295
|
Jt.string().required("Password is required")
|
|
5296
5296
|
),
|
|
5297
5297
|
confirmPassword: Jt.string().required("Confirm Password is required").oneOf([Jt.ref("password"), null], "Passwords do not match")
|
|
@@ -5301,60 +5301,61 @@ const vh = {
|
|
|
5301
5301
|
control: u,
|
|
5302
5302
|
formState: { errors: l, isValid: h },
|
|
5303
5303
|
handleSubmit: f,
|
|
5304
|
-
watch: d
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5304
|
+
watch: d,
|
|
5305
|
+
reset: p
|
|
5306
|
+
} = mr({ resolver: or(c), mode: "onChange" }), g = G(null), m = G(!1), y = wr(), x = gr(), [v, w] = Ot("form"), [b, C] = Ot(!1), [A, P] = Ot({ password: !1, confirmPassword: !1 }), V = (M) => P((z) => ({ ...z, [M]: !z[M] })), S = d("password") || "", D = d("confirmPassword") || "", F = D.length > 0 && D === S, Z = async ({ password: M }) => {
|
|
5307
|
+
var z, k;
|
|
5308
|
+
if (!b) {
|
|
5309
|
+
C(!0);
|
|
5309
5310
|
try {
|
|
5310
|
-
const
|
|
5311
|
+
const O = await x.encrypt(M);
|
|
5311
5312
|
await yr({
|
|
5312
|
-
oldPassword:
|
|
5313
|
+
oldPassword: O,
|
|
5313
5314
|
userId: n
|
|
5314
|
-
}),
|
|
5315
|
-
} catch (
|
|
5316
|
-
console.error(
|
|
5317
|
-
message: ((
|
|
5315
|
+
}), m.current = !0, w("success"), setTimeout(() => e == null ? void 0 : e(), 1600);
|
|
5316
|
+
} catch (O) {
|
|
5317
|
+
console.error(O), vr({
|
|
5318
|
+
message: ((k = (z = O == null ? void 0 : O.response) == null ? void 0 : z.data) == null ? void 0 : k.message) || "Something Went Wrong",
|
|
5318
5319
|
type: "error"
|
|
5319
5320
|
});
|
|
5320
5321
|
} finally {
|
|
5321
|
-
|
|
5322
|
+
C(!1);
|
|
5322
5323
|
}
|
|
5323
5324
|
}
|
|
5324
5325
|
};
|
|
5325
5326
|
Wt(() => {
|
|
5326
|
-
t && (
|
|
5327
|
-
}, [t,
|
|
5328
|
-
let M =
|
|
5327
|
+
t && (p(), w("form"), C(!1), P({ password: !1, confirmPassword: !1 }));
|
|
5328
|
+
}, [t, p]), Wt(() => {
|
|
5329
|
+
let M = g.current;
|
|
5329
5330
|
return () => {
|
|
5330
|
-
M &&
|
|
5331
|
+
M && y("conversion_event", {
|
|
5331
5332
|
form: M,
|
|
5332
5333
|
form_name: "Change Password",
|
|
5333
|
-
submit:
|
|
5334
|
+
submit: m.current
|
|
5334
5335
|
});
|
|
5335
5336
|
};
|
|
5336
|
-
}, [
|
|
5337
|
-
const _ = o(r ? "New PIN" : "New Password"),
|
|
5338
|
-
return /* @__PURE__ */
|
|
5337
|
+
}, [g]);
|
|
5338
|
+
const _ = o(r ? "New PIN" : "New Password"), Y = o(r ? "Confirm PIN" : "Confirm Password");
|
|
5339
|
+
return /* @__PURE__ */ E(
|
|
5339
5340
|
rr,
|
|
5340
5341
|
{
|
|
5341
5342
|
open: t,
|
|
5342
|
-
onClose: (M,
|
|
5343
|
-
(
|
|
5343
|
+
onClose: (M, z) => {
|
|
5344
|
+
(b || v === "success") && (z === "backdropClick" || z === "escapeKeyDown") || e == null || e(M, z);
|
|
5344
5345
|
},
|
|
5345
5346
|
...i,
|
|
5346
|
-
children: /* @__PURE__ */
|
|
5347
|
+
children: /* @__PURE__ */ E("div", { className: "fixed inset-0 z-[200] flex items-center justify-center p-4", children: /* @__PURE__ */ E(
|
|
5347
5348
|
Bt.div,
|
|
5348
5349
|
{
|
|
5349
5350
|
initial: { opacity: 0, y: 24, scale: 0.96 },
|
|
5350
5351
|
animate: { opacity: 1, y: 0, scale: 1 },
|
|
5351
5352
|
transition: { type: "spring", stiffness: 220, damping: 22 },
|
|
5352
5353
|
className: "w-full max-w-md",
|
|
5353
|
-
children: /* @__PURE__ */
|
|
5354
|
+
children: /* @__PURE__ */ E("div", { className: "w-full rounded-2xl bg-white shadow-2xl overflow-hidden", children: /* @__PURE__ */ E(du, { mode: "wait", children: v === "form" ? /* @__PURE__ */ et(
|
|
5354
5355
|
Bt.form,
|
|
5355
5356
|
{
|
|
5356
|
-
ref:
|
|
5357
|
-
onSubmit: f(
|
|
5357
|
+
ref: g,
|
|
5358
|
+
onSubmit: f(Z),
|
|
5358
5359
|
noValidate: !0,
|
|
5359
5360
|
initial: { opacity: 0, scale: 0.98 },
|
|
5360
5361
|
animate: { opacity: 1, scale: 1 },
|
|
@@ -5362,23 +5363,23 @@ const vh = {
|
|
|
5362
5363
|
transition: { duration: 0.2 },
|
|
5363
5364
|
className: "flex flex-col px-8 py-7",
|
|
5364
5365
|
children: [
|
|
5365
|
-
/* @__PURE__ */
|
|
5366
|
-
/* @__PURE__ */
|
|
5366
|
+
/* @__PURE__ */ et("div", { className: "flex flex-col items-center text-center", children: [
|
|
5367
|
+
/* @__PURE__ */ E(
|
|
5367
5368
|
Bt.div,
|
|
5368
5369
|
{
|
|
5369
5370
|
initial: { scale: 0.6, opacity: 0 },
|
|
5370
5371
|
animate: { scale: 1, opacity: 1 },
|
|
5371
5372
|
transition: { type: "spring", stiffness: 260, damping: 16 },
|
|
5372
5373
|
className: "flex items-center justify-center w-14 h-14 rounded-full bg-blue-50 text-[#007ACC] mb-4",
|
|
5373
|
-
children: /* @__PURE__ */
|
|
5374
|
+
children: /* @__PURE__ */ E(lr, { sx: { fontSize: 30 } })
|
|
5374
5375
|
}
|
|
5375
5376
|
),
|
|
5376
|
-
/* @__PURE__ */
|
|
5377
|
-
/* @__PURE__ */
|
|
5377
|
+
/* @__PURE__ */ E(Zt, { className: "text-lg font-bold text-gray-800", children: o(r ? "Set a new PIN" : "Set a new password") }),
|
|
5378
|
+
/* @__PURE__ */ E(Zt, { className: "text-sm text-gray-500 mt-1 max-w-xs", children: o(r ? "Choose a 6-digit PIN for this user." : "Choose a strong password for this user.") })
|
|
5378
5379
|
] }),
|
|
5379
|
-
/* @__PURE__ */
|
|
5380
|
-
/* @__PURE__ */
|
|
5381
|
-
/* @__PURE__ */
|
|
5380
|
+
/* @__PURE__ */ et("div", { className: "mt-6 space-y-4", children: [
|
|
5381
|
+
/* @__PURE__ */ et("div", { children: [
|
|
5382
|
+
/* @__PURE__ */ E(
|
|
5382
5383
|
Xn,
|
|
5383
5384
|
{
|
|
5384
5385
|
control: u,
|
|
@@ -5386,66 +5387,66 @@ const vh = {
|
|
|
5386
5387
|
placeholder: _,
|
|
5387
5388
|
inputProps: { "aria-label": _ },
|
|
5388
5389
|
errors: l,
|
|
5389
|
-
showPassword:
|
|
5390
|
-
togglePasswordVisibility: () =>
|
|
5390
|
+
showPassword: A.password,
|
|
5391
|
+
togglePasswordVisibility: () => V("password"),
|
|
5391
5392
|
autoComplete: "new-password",
|
|
5392
5393
|
dataTestId: "changepasswordmodal-newpassword"
|
|
5393
5394
|
}
|
|
5394
5395
|
),
|
|
5395
|
-
/* @__PURE__ */
|
|
5396
|
+
/* @__PURE__ */ E(
|
|
5396
5397
|
Pr,
|
|
5397
5398
|
{
|
|
5398
|
-
password:
|
|
5399
|
+
password: S,
|
|
5399
5400
|
rules: a,
|
|
5400
5401
|
showMeter: !r
|
|
5401
5402
|
}
|
|
5402
5403
|
)
|
|
5403
5404
|
] }),
|
|
5404
|
-
/* @__PURE__ */
|
|
5405
|
-
/* @__PURE__ */
|
|
5405
|
+
/* @__PURE__ */ et("div", { children: [
|
|
5406
|
+
/* @__PURE__ */ E(
|
|
5406
5407
|
Xn,
|
|
5407
5408
|
{
|
|
5408
5409
|
control: u,
|
|
5409
5410
|
name: "confirmPassword",
|
|
5410
|
-
placeholder:
|
|
5411
|
-
inputProps: { "aria-label":
|
|
5411
|
+
placeholder: Y,
|
|
5412
|
+
inputProps: { "aria-label": Y },
|
|
5412
5413
|
errors: l,
|
|
5413
|
-
showPassword:
|
|
5414
|
-
togglePasswordVisibility: () =>
|
|
5414
|
+
showPassword: A.confirmPassword,
|
|
5415
|
+
togglePasswordVisibility: () => V("confirmPassword"),
|
|
5415
5416
|
autoComplete: "new-password",
|
|
5416
5417
|
dataTestId: "changepasswordmodal-confirmpassword"
|
|
5417
5418
|
}
|
|
5418
5419
|
),
|
|
5419
|
-
|
|
5420
|
-
/* @__PURE__ */
|
|
5420
|
+
F && !l.confirmPassword && /* @__PURE__ */ et("p", { className: "mt-1 flex items-center gap-1 text-xs text-green-600", children: [
|
|
5421
|
+
/* @__PURE__ */ E(Yn, { sx: { fontSize: 14 } }),
|
|
5421
5422
|
o(r ? "PINs match" : "Passwords match")
|
|
5422
5423
|
] })
|
|
5423
5424
|
] })
|
|
5424
5425
|
] }),
|
|
5425
|
-
/* @__PURE__ */
|
|
5426
|
-
/* @__PURE__ */
|
|
5426
|
+
/* @__PURE__ */ et("div", { className: "mt-7 flex flex-col-reverse sm:flex-row items-center justify-end gap-3", children: [
|
|
5427
|
+
/* @__PURE__ */ E(
|
|
5427
5428
|
_n,
|
|
5428
5429
|
{
|
|
5429
5430
|
variant: "outlined",
|
|
5430
5431
|
color: "inherit",
|
|
5431
5432
|
onClick: e,
|
|
5432
|
-
disabled:
|
|
5433
|
+
disabled: b,
|
|
5433
5434
|
className: "rounded-full px-6 normal-case font-medium text-gray-600 w-full sm:w-auto",
|
|
5434
5435
|
"data-testid": "changepasswordmodal-button-cancel",
|
|
5435
5436
|
children: o("Cancel")
|
|
5436
5437
|
}
|
|
5437
5438
|
),
|
|
5438
|
-
/* @__PURE__ */
|
|
5439
|
+
/* @__PURE__ */ E(
|
|
5439
5440
|
_n,
|
|
5440
5441
|
{
|
|
5441
5442
|
type: "submit",
|
|
5442
5443
|
variant: "contained",
|
|
5443
5444
|
color: "primary",
|
|
5444
|
-
disabled: !h ||
|
|
5445
|
+
disabled: !h || b,
|
|
5445
5446
|
className: "rounded-full px-6 normal-case font-medium w-full sm:w-auto",
|
|
5446
5447
|
"data-testid": "changepasswordmodal-button-submit",
|
|
5447
|
-
children:
|
|
5448
|
-
/* @__PURE__ */
|
|
5448
|
+
children: b ? /* @__PURE__ */ et("span", { className: "flex items-center gap-2", children: [
|
|
5449
|
+
/* @__PURE__ */ E(ar, { size: 16, color: "inherit" }),
|
|
5449
5450
|
o("Updating…")
|
|
5450
5451
|
] }) : o(r ? "Update PIN" : "Update password")
|
|
5451
5452
|
}
|
|
@@ -5454,7 +5455,7 @@ const vh = {
|
|
|
5454
5455
|
]
|
|
5455
5456
|
},
|
|
5456
5457
|
"form"
|
|
5457
|
-
) : /* @__PURE__ */
|
|
5458
|
+
) : /* @__PURE__ */ et(
|
|
5458
5459
|
Bt.div,
|
|
5459
5460
|
{
|
|
5460
5461
|
initial: { opacity: 0 },
|
|
@@ -5462,18 +5463,18 @@ const vh = {
|
|
|
5462
5463
|
className: "flex flex-col items-center text-center px-8 py-12",
|
|
5463
5464
|
"data-testid": "changepasswordmodal-success",
|
|
5464
5465
|
children: [
|
|
5465
|
-
/* @__PURE__ */
|
|
5466
|
+
/* @__PURE__ */ E(
|
|
5466
5467
|
Bt.div,
|
|
5467
5468
|
{
|
|
5468
5469
|
initial: { scale: 0, rotate: -20 },
|
|
5469
5470
|
animate: { scale: 1, rotate: 0 },
|
|
5470
5471
|
transition: { type: "spring", stiffness: 260, damping: 14 },
|
|
5471
5472
|
className: "flex items-center justify-center w-20 h-20 rounded-full bg-green-50 text-green-600 mb-5",
|
|
5472
|
-
children: /* @__PURE__ */
|
|
5473
|
+
children: /* @__PURE__ */ E(Yn, { sx: { fontSize: 46 } })
|
|
5473
5474
|
}
|
|
5474
5475
|
),
|
|
5475
|
-
/* @__PURE__ */
|
|
5476
|
-
/* @__PURE__ */
|
|
5476
|
+
/* @__PURE__ */ E(Zt, { className: "text-xl font-bold text-gray-800", children: o(r ? "PIN updated" : "Password updated") }),
|
|
5477
|
+
/* @__PURE__ */ E(Zt, { className: "text-sm text-gray-500 mt-2 max-w-xs", children: o(r ? "The user's PIN has been changed successfully." : "The user's password has been changed successfully.") })
|
|
5477
5478
|
]
|
|
5478
5479
|
},
|
|
5479
5480
|
"success"
|
|
@@ -5492,4 +5493,4 @@ Th.propTypes = {
|
|
|
5492
5493
|
export {
|
|
5493
5494
|
Th as default
|
|
5494
5495
|
};
|
|
5495
|
-
//# sourceMappingURL=ChangePasswordModalCore-
|
|
5496
|
+
//# sourceMappingURL=ChangePasswordModalCore-DotONnMz.js.map
|