@ukpc-lib/react 0.0.4 → 0.0.6
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/components/Topbar/index.d.ts +4 -1
- package/dist/components/index.cjs +4 -4
- package/dist/components/index.js +1160 -1209
- package/dist/index.css +1 -1
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +1 -1
- package/package.json +4 -4
- package/web-components-bundle/global-menu/index.cjs +9 -9
- package/web-components-bundle/global-menu/index.js +2405 -2624
- package/web-components-bundle/global-topbar/index.cjs +2 -2
- package/web-components-bundle/global-topbar/index.js +30 -26
- package/web-components-bundle/{index-8efa71fb.cjs → index-2a824d74.cjs} +9 -9
- package/web-components-bundle/{index-8f10a282.js → index-f1edf829.js} +812 -859
package/dist/components/index.js
CHANGED
|
@@ -1,49 +1,26 @@
|
|
|
1
1
|
import "../index.css";
|
|
2
|
-
import Xe, { jsxs as
|
|
2
|
+
import Xe, { jsxs as F, jsx as P, Fragment as Ao } from "react/jsx-runtime";
|
|
3
3
|
import * as R from "react";
|
|
4
|
-
import zs, { useState as ot, useRef as St, useEffect as Wt, createContext as Mt, useLayoutEffect as Ws, useContext as
|
|
5
|
-
import { g as Do, a as Ro, s as
|
|
6
|
-
import { createPortal as
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
"h-screen": "_h-screen_de8pp_1",
|
|
22
|
-
"min-h-[1000px]": "_min-h-[1000px]_de8pp_1",
|
|
23
|
-
"w-full": "_w-full_de8pp_1",
|
|
24
|
-
"flex-1": "_flex-1_de8pp_1",
|
|
25
|
-
"cursor-pointer": "_cursor-pointer_de8pp_1",
|
|
26
|
-
"flex-col": "_flex-col_de8pp_1",
|
|
27
|
-
"overflow-auto": "_overflow-auto_de8pp_1",
|
|
28
|
-
"overflow-hidden": "_overflow-hidden_de8pp_1",
|
|
29
|
-
"overflow-y-auto": "_overflow-y-auto_de8pp_1",
|
|
30
|
-
"overflow-x-hidden": "_overflow-x-hidden_de8pp_1",
|
|
31
|
-
"bg-gray-100": "_bg-gray-100_de8pp_1",
|
|
32
|
-
"text-sm": "_text-sm_de8pp_1",
|
|
33
|
-
"text-white": "_text-white_de8pp_1",
|
|
34
|
-
filter: Yo,
|
|
35
|
-
transition: Xo,
|
|
36
|
-
"avatar-dropdown-item": "_avatar-dropdown-item_de8pp_5",
|
|
37
|
-
avartarDropdownMenu: Qo,
|
|
38
|
-
navbar: Zo,
|
|
39
|
-
"navbar-container": "_navbar-container_de8pp_17",
|
|
40
|
-
"right-side-container": "_right-side-container_de8pp_21",
|
|
41
|
-
userContainer: Jo,
|
|
42
|
-
userFullName: tr,
|
|
43
|
-
userAvatar: er
|
|
4
|
+
import zs, { useState as ot, useRef as St, useEffect as Wt, createContext as Mt, useLayoutEffect as Ws, useContext as _, useInsertionEffect as So, useCallback as Vo, useMemo as he, forwardRef as Co, createElement as Gs, useId as Mo } from "react";
|
|
5
|
+
import { g as Do, a as Ro, s as ko, c as Nt, u as Lo, _ as Eo, b as Ie, d as Bo, P as D, e as Io, C as jo, r as Fo, f as Oo } from "../styled-f324a192.js";
|
|
6
|
+
import { createPortal as No } from "react-dom";
|
|
7
|
+
import { useLocation as _o, Link as Uo } from "react-router-dom";
|
|
8
|
+
import zo from "axios";
|
|
9
|
+
const Wo = "_avartarDropdownMenu_1jszk_13", Go = "_navbar_1jszk_31", $o = "_userContainer_1jszk_68", Ho = "_userFullName_1jszk_74", qo = "_userAvatar_1jszk_81", Ko = "_relative_1jszk_89", z = {
|
|
10
|
+
"avatar-dropdown-item": "_avatar-dropdown-item_1jszk_1",
|
|
11
|
+
avartarDropdownMenu: Wo,
|
|
12
|
+
navbar: Go,
|
|
13
|
+
"navbar-container": "_navbar-container_1jszk_42",
|
|
14
|
+
"logo-container": "_logo-container_1jszk_50",
|
|
15
|
+
"right-side-container": "_right-side-container_1jszk_59",
|
|
16
|
+
userContainer: $o,
|
|
17
|
+
userFullName: Ho,
|
|
18
|
+
userAvatar: qo,
|
|
19
|
+
relative: Ko,
|
|
20
|
+
"cursor-pointer": "_cursor-pointer_1jszk_93"
|
|
44
21
|
};
|
|
45
|
-
function
|
|
46
|
-
return /* @__PURE__ */
|
|
22
|
+
function Yo() {
|
|
23
|
+
return /* @__PURE__ */ F(
|
|
47
24
|
"svg",
|
|
48
25
|
{
|
|
49
26
|
width: "24",
|
|
@@ -52,7 +29,7 @@ function nr() {
|
|
|
52
29
|
fill: "none",
|
|
53
30
|
xmlns: "http://www.w3.org/2000/svg",
|
|
54
31
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ P(
|
|
56
33
|
"path",
|
|
57
34
|
{
|
|
58
35
|
"fill-rule": "evenodd",
|
|
@@ -64,7 +41,7 @@ function nr() {
|
|
|
64
41
|
"stroke-linejoin": "round"
|
|
65
42
|
}
|
|
66
43
|
),
|
|
67
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ P(
|
|
68
45
|
"path",
|
|
69
46
|
{
|
|
70
47
|
d: "M13.8274 20.0286C12.6679 21.3161 10.8591 21.3313 9.68848 20.0286",
|
|
@@ -74,13 +51,13 @@ function nr() {
|
|
|
74
51
|
"stroke-linejoin": "round"
|
|
75
52
|
}
|
|
76
53
|
),
|
|
77
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ P("circle", { cx: "16.928", cy: "7", r: "2", fill: "#E01B00", stroke: "white" })
|
|
78
55
|
]
|
|
79
56
|
}
|
|
80
57
|
);
|
|
81
58
|
}
|
|
82
|
-
function
|
|
83
|
-
return /* @__PURE__ */
|
|
59
|
+
function Xo() {
|
|
60
|
+
return /* @__PURE__ */ F(
|
|
84
61
|
"svg",
|
|
85
62
|
{
|
|
86
63
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -89,7 +66,7 @@ function sr() {
|
|
|
89
66
|
viewBox: "0 0 24 25",
|
|
90
67
|
fill: "none",
|
|
91
68
|
children: [
|
|
92
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ P(
|
|
93
70
|
"path",
|
|
94
71
|
{
|
|
95
72
|
d: "M8.5 19.5H8C4 19.5 2 18.5 2 13.5V8.5C2 4.5 4 2.5 8 2.5H16C20 2.5 22 4.5 22 8.5V13.5C22 17.5 20 19.5 16 19.5H15.5C15.19 19.5 14.89 19.65 14.7 19.9L13.2 21.9C12.54 22.78 11.46 22.78 10.8 21.9L9.3 19.9C9.14 19.68 8.77 19.5 8.5 19.5Z",
|
|
@@ -100,7 +77,7 @@ function sr() {
|
|
|
100
77
|
"stroke-linejoin": "round"
|
|
101
78
|
}
|
|
102
79
|
),
|
|
103
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ P(
|
|
104
81
|
"path",
|
|
105
82
|
{
|
|
106
83
|
d: "M15.9965 11.5H16.0054",
|
|
@@ -110,7 +87,7 @@ function sr() {
|
|
|
110
87
|
"stroke-linejoin": "round"
|
|
111
88
|
}
|
|
112
89
|
),
|
|
113
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ P(
|
|
114
91
|
"path",
|
|
115
92
|
{
|
|
116
93
|
d: "M11.9955 11.5H12.0045",
|
|
@@ -120,7 +97,7 @@ function sr() {
|
|
|
120
97
|
"stroke-linejoin": "round"
|
|
121
98
|
}
|
|
122
99
|
),
|
|
123
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ P(
|
|
124
101
|
"path",
|
|
125
102
|
{
|
|
126
103
|
d: "M7.99451 11.5H8.00349",
|
|
@@ -134,41 +111,17 @@ function sr() {
|
|
|
134
111
|
}
|
|
135
112
|
);
|
|
136
113
|
}
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
|
|
146
|
-
hidden: cr,
|
|
147
|
-
"h-[70px]": "_h-[70px]_14n48_1",
|
|
148
|
-
"h-[8px]": "_h-[8px]_14n48_1",
|
|
149
|
-
"h-screen": "_h-screen_14n48_1",
|
|
150
|
-
"min-h-[1000px]": "_min-h-[1000px]_14n48_1",
|
|
151
|
-
"w-full": "_w-full_14n48_1",
|
|
152
|
-
"flex-1": "_flex-1_14n48_1",
|
|
153
|
-
"cursor-pointer": "_cursor-pointer_14n48_1",
|
|
154
|
-
"flex-col": "_flex-col_14n48_1",
|
|
155
|
-
"overflow-auto": "_overflow-auto_14n48_1",
|
|
156
|
-
"overflow-hidden": "_overflow-hidden_14n48_1",
|
|
157
|
-
"overflow-y-auto": "_overflow-y-auto_14n48_1",
|
|
158
|
-
"overflow-x-hidden": "_overflow-x-hidden_14n48_1",
|
|
159
|
-
"bg-gray-100": "_bg-gray-100_14n48_1",
|
|
160
|
-
"text-sm": "_text-sm_14n48_1",
|
|
161
|
-
"text-white": "_text-white_14n48_1",
|
|
162
|
-
filter: ur,
|
|
163
|
-
transition: fr,
|
|
164
|
-
"modal-overlay": "_modal-overlay_14n48_5",
|
|
165
|
-
"modal-title": "_modal-title_14n48_9",
|
|
166
|
-
"modal-footer": "_modal-footer_14n48_13",
|
|
167
|
-
"modal-container": "_modal-container_14n48_17",
|
|
168
|
-
"modal-button": "_modal-button_14n48_35",
|
|
169
|
-
"confirm-btn": "_confirm-btn_14n48_43"
|
|
114
|
+
const Qo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAArCAYAAAADgWq5AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA3XSURBVHgBtVl7jFxVGf/dO3feMzuzO/tuu92y2xIoCEgCgUQogSIKhBIgaAxpFdREITxMVCrYNqB/+A8QCYQYbIuJUTChGqBQDCkaMUCgW0qtpe12t933drezs/N+XX/fuefOzK6l0KInPb2POfec3/m+3/c6a+ALNNu247xczL6Ofbm+j+suLck+pK972XcYhrEbX6AZOItGoGt4uZ99jQtu+tAnmP7kIPLz8yiwS/NHmxDr6kJTdzfaVq5qnGIb+/azAX9GgDXQTQJUQB3Y+SqOvL1bgXVB6nELv2OvcqllX74Uq2+8SV2buBE40n+QwHfgfwlYq34r+7rU+Bj2vvgH/Ou1VxXIxeAaW7Xht6ph1NGzCfAr7/meC3wb+xYCH8IXBaylurWQnu/d++IfMUCwRS1Nuz7mFN813lfVUrYh3xi1lWXIlXd/F1eww5H2rQQ9gLMFTCAP8PJEamIcO+77AebHx+u/6Y8FrItNJDqVL2Awm8WJQhFejwedfj9WhIJosjz8wKCkUdupu6koOX7n08+60haKPHnGgAlEuLp5bGAPdm78yUKO6tU4cQ3w/uQc3pqYwkypQOAGTNNU3SJoi+N6wmFclWjmBnxqvEja1rMJcF8kghseeRT9V62Rl5s595bPDZggxE29fPD11/DWLx9f/FsNqFwrvP5l6DjenZmBKN40TM5qqrEeAUzJGnz28Rpgv6atFRdGQmrXjjG6QrDV/Q0/+zlWf/1GebWB82//TMAE0svLnpnDh+N/umfDaY1KfnlrdBw7R8ZguyQxPJSsoW493JDHY7JbaiGhSNCycEt3J3oDgZp2qi5HOMgbjuCOp59B+8pV4rsvWWyIpwJ8ND0x0fvKQ/dDPIJh1yWgWVsbW6xU8au9+8jXAqUJWJRo2OdDiGqPBv1ojcUQIRVOptOYnEsjky+iUrXREw3jm91dihQ26VPRs0NvoKmrk6DJ6c6uAQK+pBGftQis8LZ3z/ZtIGjFQRJS78zQ05q1u/0nk5ghWOFoazCAloCFGIF2xKPobmtHW1sCifZWeP1e5DM5jJPjHxwaxsGpJE5WykhYlprZI1IWr0FOGASd4tpv/OIx3PHrZy4mJuHzZhejuYgKDxza9Tqkm4ah5Ck8NUzpjhG5z/L7QQIWsGGfFzGvGJeeUMZY5G0oxGgXRYBSjsSi6GpvwZoL+7GqM4GhbM5hkOEIw6SkDcN5ISIZ2fOh6mz36ziwEDCb7CK+94UXHFAKsHMVQzK1lIWfakq+T4p0+RwhWP5Tm1CcVAbFb7w+xwA9XnVvkS4RbuCS5Z18tvT8LmgO0+s5axrY5Ri8gH3gVICvPvLmG0hPTjjSNVyp6kk5Uhii7Mm01W9i1X6S1yLR7apj78ozKEPjDqoVlIsFLmIjJNKm6wpEI2iOBMhzT10wohmzDtSloGAZ2bNngZRNTYcNwt0ju3Y5vK19jIZJG7ssZiuL93kMTSmC5X3Acnq1lEM2lUQ2OYsTY2PI8BoOeOEXgVfLiPqtmmBqVGt4NrWG3932vCvlNY1GtyYzOYmpfR9pKsgWRa91ryBvXZ8pb1PFspo0YJpqxIlCCf6qiRx3eWwkidBkCj2JGfT3LsU+Gtp83sbyZcsRpTtDbhYtytWJUVfrkwqRbE0rJ4xilBIu0MtQO7fwzQ6XEldPfVQHa7vc1cZlurs26+9eOngIQ/MpeMmVeCiAXNWLXBkEVuDVwniqiH2Tafzz4Cj2T6QwkytifHYOyfQ8ZuYLeHN4FEUKxZWuY6v63k039NqDf/+bPK5TEiYdJOnunT16xLFu6TqKyVURTEvZwwlVBsaFUsqdAZlKBWYuj85QBJmq5A8mYpEw5uYraPUauHBZBxf18LuqChSlSgnnLO1AjnTxaA+huCl5BqUt63q0x6gq92lj+shhnEdaiCezND+QPHrUIbzgMZ3Q61ib7QQPdevwWh6DtPIygXpMD4p0Cx0RA+cnOlUaWShXkZsvYwkN7LLz+5AtVbF0SbcKzyGfhfTMNFYtaVXaMVzfRrCOlzE0TL0Z3owO7HEdw8UCuFfuMlOTNWnWrFWnhY5DdpnsXFfEYxjN5NSGKpw0ncsy8kVRplkcn06izQ+E6IujzQlcviqH9/49zIhmoY9AffQyYZ8fZsmjMghnaqNuIRLWbceQhculTMYFHK8Bzk1POzvUiY3zrVnLqZRJmI6UpfU3t+AfKt00tTHaODw2gQIHlctlTCaLGDqZwfzvX6Ira0IgEMTw1BRGR4awsiOOsBVg2uFXvK2vZzgobVN5oaqjYOXedOuthWZTATJr8V1RQyeCqMm1LvCepihDcRDJYlEBrkqgEP5yBQ8DhD8eRlu8CSuW96ClOYYSc2SDGjs6PonxZAqdTdRWuGlBpm+gIXuzDQfTwvSlIXBo92S7oExDewudLi7yxVEm5ndfcAF5yOSFq3jok6Ufm8sjze+C8WYsWXUuWnpXoBgM4/3jE9gzPO4EFY4zqqiF4gU+uOaLtZfQHsttIuEhuQl3dEB8sZs1aUY4FDCqTvJj63xN5wwtrCSaKc2xXAEpZmIrOoSfQILG1kOpfuXSS9Ddswz+YBA9zIGPkUIf7NuvpNfmDao5lJUYjo93c2xXy66bbersdPEOCWDJO+FjHpo1Jl1y1KkgXkIrwmiwP7Fjr6STlpcuK48CxTybztDQPEimUojxuv+99zB9bNihVjGNALUS9AfgJTWWB6M1Cdq60qsVBg0kWQxYkKiir43qVY5bAxLVeAxolaDm0G19dbO2CsdWCCBPQ5tIZZArVVQSP8nodGB4BIPDx5FlsLDI11lyt1wu4bJ4u/LpCpBZpwOABlpAGZ68be1b6QJOWpLRc1fJ2Ipz4nAduespFrkzxx8bdSMQAyMnyzpnzpdKBJpFdzSIJYkE+np70HtOL6KRIGZnZnF8cgpLQzG0+ILaMzR4h0XN1bNE1kRfn5KuVNSul/jzkssuX/9hLTXXEm2wW1tPXPOZXPBktqAqCFXq2I5WsswpjlWqSsm5cgXTLE5l+OiJWRW66d/wTr6E/oAP7bBrLs02Tln+qLW6LrpInnbLfy7gHd5weH3b6gswvf/jU+7VjXYizP0nTuCVw4MYnJsjjx2LrlYNRQ01iEAHZ1MYTqbhHRxVJdOKzg60NUUUzY4UWH14vehg4r+UX3QxexNe1845XAWyd1x4ESIdisNvNwLeLfw4785vxKc3PaIJUFUewlXcXKmM96nSd1h0jpKfZeYQMkqqZhnnkZhN0JJrlLgrcVs2k41YOICVXe0Is3SS9LNKflveELyMdCelCGDfT6Es529Ly0VE1by6Mudd//XXu3TYVgPMhyRV81Tr6gs2hds7kZUwDcegxjNZvM0INnBihiCrzBuY7DA5N0XkBGXy2SlHbFUuqQcxWOYYzQTbxoJTPLz4a8u0MG34lR8uku9hJvUVApT8Q3zJKLndzA2vLuYQ4PswtdJ/3doaHVx9u01OW5KX/vBexeNksYSXh4bxG6aRH88lafisJKhan1e6l1mZl++YC9CtSTBQZRQX9jMpipGf3bEQ2mlsQapdNpOn1McrTJhsllN8V2IlIqqrUAiSYko499LtZVjMvh+N4XgojC996y7BJW53y38BFinzIlLGSGe3A5RuyCYYARkMhuBjkJCTHK+EXk7u8zIXIPAycwKTwKFDu0+iGe+EGuliFWmTIdwMqdouwM3IKLGFErWTzeeoMQMZFqVObmyq0N659qvou/Y6gfZU49lEo4Shy+mB23+6EfGubiVBOQTxM2cQNYqqg4xuIuEgAYdo8WFGsRC7FQjBE4ygxKQmbfiQZSQrBOPwNLczKMUQZj0X4qYdz2io2k96kXm1SFlaLp9XjqEl0Yqbb7vN5e7mBRixqLknPwcPHIh/f/16ZHOyc+a8THIU6bmJEvnX6KttisuSKpjSKfG8QRLxMMF5+E42E6CGAtyccF/AWtz8PKNhS2sCkzRk0ZyYhJfjm1ta8Ojjj2FpT88pT37MxYD1gAfPPe88/GjjwwRoOZWAlPOUkgD1UbqKEuwRhvQwzx18lg9NLOETTHoSXDTKbC7EMCzGJxV2RdduUl3LfPIs3kjCdSaTJqU8yFPad939HQErQ799qvNiC6do4kJE0jevu3VTUyyOTQ9vRIVG4UpHpCxNXJiU8/KuSj6KNIsMvR66Lj8NVDyBAJPNCUjRiKWlLG7RrRWzrFyWdC/Fgw//GBddrE6mtnzaqbyB0zT3fHhsdBQP3XsfxkZGlBsSFSr1GI6f9pLT8l7O0WQTeXIxSm2UuMkcjSrRkqBXKCkteSW1FP/LoNPBpCZL6XposE8+ywNAZow42/PhBtBSpL7M3rv9+efx2+eeo0S99VTQcNSq/CoBi5pzLJcsbkKkn+W9ABa35UjYUvmBeIeeZT24+rpr8bWbbkIoHB6CQ4Pdp8PzmYA16F44R1nrJ5jT/m7rVvz19TecPJaqFsDlakXxWYCJNCt89mgDbWluVvx0D7mjTU248qqrsO7225BgksS2Q4NNfhaWzwW4AbicDTzB3jtJ4HsHBvDmzp0YPHQYhVKRbi6oKFIgOKGFBAhpQb4Pkt8r+s7B5VdcgWvWrhWJyk+SH2w2zuDPX2cEuAH4Gl42sK933w0ePowZhu9JHpWmyM8y3ZvwOMoz4r7+foLtc4cmNdAnjf/33+lOA14k7/4VdDkW/iV0Dk6RMARH9QOfR/Wf1v4D3Fe7Fu3OpbsAAAAASUVORK5CYII=", Q = {
|
|
115
|
+
"modal-overlay": "_modal-overlay_10n3k_1",
|
|
116
|
+
"modal-title": "_modal-title_10n3k_12",
|
|
117
|
+
"modal-footer": "_modal-footer_10n3k_19",
|
|
118
|
+
"modal-container": "_modal-container_10n3k_25",
|
|
119
|
+
"modal-button": "_modal-button_10n3k_43",
|
|
120
|
+
"confirm-btn": "_confirm-btn_10n3k_51",
|
|
121
|
+
"text-white": "_text-white_10n3k_55",
|
|
122
|
+
"text-sm": "_text-sm_10n3k_59"
|
|
170
123
|
};
|
|
171
|
-
function
|
|
124
|
+
function $s({
|
|
172
125
|
isOpen: t,
|
|
173
126
|
onClose: e,
|
|
174
127
|
onConfirm: n
|
|
@@ -179,18 +132,18 @@ function Gs({
|
|
|
179
132
|
var r;
|
|
180
133
|
((r = i.target) == null ? void 0 : r.id) === "modal-wrapper" && e();
|
|
181
134
|
}
|
|
182
|
-
return /* @__PURE__ */
|
|
135
|
+
return /* @__PURE__ */ P(
|
|
183
136
|
"div",
|
|
184
137
|
{
|
|
185
138
|
onClick: s,
|
|
186
139
|
className: Q["modal-overlay"],
|
|
187
140
|
id: "modal-wrapper",
|
|
188
|
-
children: /* @__PURE__ */
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
141
|
+
children: /* @__PURE__ */ F("div", { className: Q["modal-container"], children: [
|
|
142
|
+
/* @__PURE__ */ P("h3", { className: Q["modal-title"], children: "Log out" }),
|
|
143
|
+
/* @__PURE__ */ P("p", { className: Q["text-sm"], children: "Are you sure want to log out?" }),
|
|
144
|
+
/* @__PURE__ */ F("div", { className: Q["modal-footer"], children: [
|
|
145
|
+
/* @__PURE__ */ P("button", { className: Q["modal-button"], onClick: e, children: "Cancel" }),
|
|
146
|
+
/* @__PURE__ */ P(
|
|
194
147
|
"button",
|
|
195
148
|
{
|
|
196
149
|
onClick: n,
|
|
@@ -203,68 +156,70 @@ function Gs({
|
|
|
203
156
|
}
|
|
204
157
|
);
|
|
205
158
|
}
|
|
206
|
-
function
|
|
159
|
+
function nh({
|
|
207
160
|
logo: t,
|
|
208
161
|
user: e,
|
|
209
|
-
baseUrl: n
|
|
162
|
+
baseUrl: n,
|
|
163
|
+
style: s,
|
|
164
|
+
classNames: i = ""
|
|
210
165
|
}) {
|
|
211
|
-
const
|
|
212
|
-
return /* @__PURE__ */
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */
|
|
166
|
+
const r = t || "/public/assets/icons/logo-header.png";
|
|
167
|
+
return /* @__PURE__ */ P("nav", { className: `${z.navbar} ${i}`, style: s, children: /* @__PURE__ */ F("div", { className: z["navbar-container"], children: [
|
|
168
|
+
/* @__PURE__ */ P("div", { className: z["logo-container"], children: /* @__PURE__ */ P("img", { src: r, alt: "logo-header" }) }),
|
|
169
|
+
/* @__PURE__ */ F("div", { className: z["right-side-container"], children: [
|
|
170
|
+
/* @__PURE__ */ F("div", { className: z.userContainer, children: [
|
|
171
|
+
/* @__PURE__ */ P(
|
|
217
172
|
"p",
|
|
218
173
|
{
|
|
219
|
-
className:
|
|
174
|
+
className: z.userFullName,
|
|
220
175
|
children: `${e == null ? void 0 : e.firstName} ${e == null ? void 0 : e.lastName}`
|
|
221
176
|
}
|
|
222
177
|
),
|
|
223
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ P(Zo, { baseUrl: n, avatarUrl: e == null ? void 0 : e.avatarUrl })
|
|
224
179
|
] }),
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ P("span", { className: z["cursor-pointer"], children: /* @__PURE__ */ P(Yo, {}) }),
|
|
181
|
+
/* @__PURE__ */ P("span", { className: z["cursor-pointer"], children: /* @__PURE__ */ P(Xo, {}) })
|
|
227
182
|
] })
|
|
228
183
|
] }) });
|
|
229
184
|
}
|
|
230
|
-
function
|
|
185
|
+
function Zo({
|
|
231
186
|
avatarUrl: t,
|
|
232
187
|
baseUrl: e
|
|
233
188
|
}) {
|
|
234
189
|
const [n, s] = ot(!1), [i, r] = ot(!1), o = St(null), a = St(null), l = () => {
|
|
235
|
-
window.location.href = `${e}/authentication/logout?callbackUrl=${window.location.
|
|
190
|
+
window.location.href = `${e}/authentication/logout?callbackUrl=${window.location.href}`;
|
|
236
191
|
};
|
|
237
192
|
return Wt(() => {
|
|
238
193
|
function c(u) {
|
|
239
194
|
u.target !== a.current && u.target !== o.current && s(!1);
|
|
240
195
|
}
|
|
241
196
|
return window.addEventListener("click", c), () => window.removeEventListener("click", c);
|
|
242
|
-
}, []), /* @__PURE__ */
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
/* @__PURE__ */
|
|
197
|
+
}, []), /* @__PURE__ */ F(Ao, { children: [
|
|
198
|
+
/* @__PURE__ */ F("div", { className: z.relative, children: [
|
|
199
|
+
/* @__PURE__ */ P(
|
|
245
200
|
"img",
|
|
246
201
|
{
|
|
247
202
|
ref: o,
|
|
248
203
|
onClick: () => s((c) => !c),
|
|
249
204
|
alt: "user avatar",
|
|
250
|
-
className:
|
|
251
|
-
src: t ||
|
|
205
|
+
className: z.userAvatar,
|
|
206
|
+
src: t || Qo
|
|
252
207
|
}
|
|
253
208
|
),
|
|
254
|
-
n && /* @__PURE__ */
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
/* @__PURE__ */
|
|
209
|
+
n && /* @__PURE__ */ P("div", { ref: a, className: z.avartarDropdownMenu, children: /* @__PURE__ */ F("ul", { children: [
|
|
210
|
+
/* @__PURE__ */ P("li", { className: z["avatar-dropdown-item"], children: "Profile" }),
|
|
211
|
+
/* @__PURE__ */ P(
|
|
257
212
|
"li",
|
|
258
213
|
{
|
|
259
214
|
onClick: () => r(!0),
|
|
260
|
-
className:
|
|
215
|
+
className: z["avatar-dropdown-item"],
|
|
261
216
|
children: "Logout"
|
|
262
217
|
}
|
|
263
218
|
)
|
|
264
219
|
] }) })
|
|
265
220
|
] }),
|
|
266
|
-
/* @__PURE__ */
|
|
267
|
-
|
|
221
|
+
/* @__PURE__ */ P(
|
|
222
|
+
$s,
|
|
268
223
|
{
|
|
269
224
|
isOpen: i,
|
|
270
225
|
onClose: () => r(!1),
|
|
@@ -282,14 +237,14 @@ var Qe = {}, Hs = { exports: {} };
|
|
|
282
237
|
}
|
|
283
238
|
t.exports = e, t.exports.__esModule = !0, t.exports.default = t.exports;
|
|
284
239
|
})(Hs);
|
|
285
|
-
var Ze = Hs.exports,
|
|
286
|
-
function
|
|
240
|
+
var Ze = Hs.exports, Te = {};
|
|
241
|
+
function Jo(...t) {
|
|
287
242
|
return t.reduce((e, n) => n == null ? e : function(...i) {
|
|
288
243
|
e.apply(this, i), n.apply(this, i);
|
|
289
244
|
}, () => {
|
|
290
245
|
});
|
|
291
246
|
}
|
|
292
|
-
function
|
|
247
|
+
function tr(t, e = 166) {
|
|
293
248
|
let n;
|
|
294
249
|
function s(...i) {
|
|
295
250
|
const r = () => {
|
|
@@ -301,13 +256,13 @@ function pr(t, e = 166) {
|
|
|
301
256
|
clearTimeout(n);
|
|
302
257
|
}, s;
|
|
303
258
|
}
|
|
304
|
-
function
|
|
259
|
+
function er(t, e) {
|
|
305
260
|
return process.env.NODE_ENV === "production" ? () => null : (n, s, i, r, o) => {
|
|
306
261
|
const a = i || "<<anonymous>>", l = o || s;
|
|
307
262
|
return typeof n[s] < "u" ? new Error(`The ${r} \`${l}\` of \`${a}\` is deprecated. ${e}`) : null;
|
|
308
263
|
};
|
|
309
264
|
}
|
|
310
|
-
function
|
|
265
|
+
function nr(t, e) {
|
|
311
266
|
var n, s;
|
|
312
267
|
return /* @__PURE__ */ R.isValidElement(t) && e.indexOf(
|
|
313
268
|
// For server components `muiName` is avaialble in element.type._payload.value.muiName
|
|
@@ -319,35 +274,35 @@ function gr(t, e) {
|
|
|
319
274
|
function qs(t) {
|
|
320
275
|
return t && t.ownerDocument || document;
|
|
321
276
|
}
|
|
322
|
-
function
|
|
277
|
+
function sr(t) {
|
|
323
278
|
return qs(t).defaultView || window;
|
|
324
279
|
}
|
|
325
280
|
function Ks(t, e) {
|
|
326
281
|
typeof t == "function" ? t(e) : t && (t.current = e);
|
|
327
282
|
}
|
|
328
|
-
const
|
|
329
|
-
let
|
|
330
|
-
function
|
|
283
|
+
const ir = typeof window < "u" ? R.useLayoutEffect : R.useEffect, Ys = ir;
|
|
284
|
+
let kn = 0;
|
|
285
|
+
function or(t) {
|
|
331
286
|
const [e, n] = R.useState(t), s = t || e;
|
|
332
287
|
return R.useEffect(() => {
|
|
333
|
-
e == null && (
|
|
288
|
+
e == null && (kn += 1, n(`mui-${kn}`));
|
|
334
289
|
}, [e]), s;
|
|
335
290
|
}
|
|
336
291
|
const Ln = R["useId".toString()];
|
|
337
|
-
function
|
|
292
|
+
function rr(t) {
|
|
338
293
|
if (Ln !== void 0) {
|
|
339
294
|
const e = Ln();
|
|
340
295
|
return t ?? e;
|
|
341
296
|
}
|
|
342
|
-
return
|
|
297
|
+
return or(t);
|
|
343
298
|
}
|
|
344
|
-
function
|
|
299
|
+
function ar(t, e, n, s, i) {
|
|
345
300
|
if (process.env.NODE_ENV === "production")
|
|
346
301
|
return null;
|
|
347
302
|
const r = i || e;
|
|
348
303
|
return typeof t[e] < "u" ? new Error(`The prop \`${r}\` is not supported. Please remove it.`) : null;
|
|
349
304
|
}
|
|
350
|
-
function
|
|
305
|
+
function lr({
|
|
351
306
|
controlled: t,
|
|
352
307
|
default: e,
|
|
353
308
|
name: n,
|
|
@@ -374,7 +329,7 @@ function Tr({
|
|
|
374
329
|
}, []);
|
|
375
330
|
return [a, l];
|
|
376
331
|
}
|
|
377
|
-
function
|
|
332
|
+
function cr(t) {
|
|
378
333
|
const e = R.useRef(t);
|
|
379
334
|
return Ys(() => {
|
|
380
335
|
e.current = t;
|
|
@@ -383,15 +338,15 @@ function Pr(t) {
|
|
|
383
338
|
(0, e.current)(...n)
|
|
384
339
|
)).current;
|
|
385
340
|
}
|
|
386
|
-
function
|
|
341
|
+
function ur(...t) {
|
|
387
342
|
return R.useMemo(() => t.every((e) => e == null) ? null : (e) => {
|
|
388
343
|
t.forEach((n) => {
|
|
389
344
|
Ks(n, e);
|
|
390
345
|
});
|
|
391
346
|
}, t);
|
|
392
347
|
}
|
|
393
|
-
let
|
|
394
|
-
const
|
|
348
|
+
let fe = !0, je = !1, En;
|
|
349
|
+
const hr = {
|
|
395
350
|
text: !0,
|
|
396
351
|
search: !0,
|
|
397
352
|
url: !0,
|
|
@@ -406,26 +361,26 @@ const Sr = {
|
|
|
406
361
|
datetime: !0,
|
|
407
362
|
"datetime-local": !0
|
|
408
363
|
};
|
|
409
|
-
function
|
|
364
|
+
function fr(t) {
|
|
410
365
|
const {
|
|
411
366
|
type: e,
|
|
412
367
|
tagName: n
|
|
413
368
|
} = t;
|
|
414
|
-
return !!(n === "INPUT" &&
|
|
369
|
+
return !!(n === "INPUT" && hr[e] && !t.readOnly || n === "TEXTAREA" && !t.readOnly || t.isContentEditable);
|
|
415
370
|
}
|
|
416
|
-
function
|
|
417
|
-
t.metaKey || t.altKey || t.ctrlKey || (
|
|
371
|
+
function dr(t) {
|
|
372
|
+
t.metaKey || t.altKey || t.ctrlKey || (fe = !0);
|
|
418
373
|
}
|
|
419
|
-
function
|
|
420
|
-
|
|
374
|
+
function Pe() {
|
|
375
|
+
fe = !1;
|
|
421
376
|
}
|
|
422
|
-
function
|
|
423
|
-
this.visibilityState === "hidden" &&
|
|
377
|
+
function mr() {
|
|
378
|
+
this.visibilityState === "hidden" && je && (fe = !0);
|
|
424
379
|
}
|
|
425
|
-
function
|
|
426
|
-
t.addEventListener("keydown",
|
|
380
|
+
function pr(t) {
|
|
381
|
+
t.addEventListener("keydown", dr, !0), t.addEventListener("mousedown", Pe, !0), t.addEventListener("pointerdown", Pe, !0), t.addEventListener("touchstart", Pe, !0), t.addEventListener("visibilitychange", mr, !0);
|
|
427
382
|
}
|
|
428
|
-
function
|
|
383
|
+
function gr(t) {
|
|
429
384
|
const {
|
|
430
385
|
target: e
|
|
431
386
|
} = t;
|
|
@@ -433,19 +388,19 @@ function Rr(t) {
|
|
|
433
388
|
return e.matches(":focus-visible");
|
|
434
389
|
} catch {
|
|
435
390
|
}
|
|
436
|
-
return
|
|
391
|
+
return fe || fr(e);
|
|
437
392
|
}
|
|
438
|
-
function
|
|
393
|
+
function yr() {
|
|
439
394
|
const t = R.useCallback((i) => {
|
|
440
|
-
i != null &&
|
|
395
|
+
i != null && pr(i.ownerDocument);
|
|
441
396
|
}, []), e = R.useRef(!1);
|
|
442
397
|
function n() {
|
|
443
|
-
return e.current ? (
|
|
444
|
-
|
|
398
|
+
return e.current ? (je = !0, window.clearTimeout(En), En = window.setTimeout(() => {
|
|
399
|
+
je = !1;
|
|
445
400
|
}, 100), e.current = !1, !0) : !1;
|
|
446
401
|
}
|
|
447
402
|
function s(i) {
|
|
448
|
-
return
|
|
403
|
+
return gr(i) ? (e.current = !0, !0) : !1;
|
|
449
404
|
}
|
|
450
405
|
return {
|
|
451
406
|
isFocusVisibleRef: e,
|
|
@@ -454,33 +409,33 @@ function _r() {
|
|
|
454
409
|
ref: t
|
|
455
410
|
};
|
|
456
411
|
}
|
|
457
|
-
function
|
|
412
|
+
function vr(t) {
|
|
458
413
|
return Do("MuiSvgIcon", t);
|
|
459
414
|
}
|
|
460
415
|
Ro("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
461
|
-
const
|
|
416
|
+
const xr = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], br = (t) => {
|
|
462
417
|
const {
|
|
463
418
|
color: e,
|
|
464
419
|
fontSize: n,
|
|
465
420
|
classes: s
|
|
466
421
|
} = t, i = {
|
|
467
|
-
root: ["root", e !== "inherit" && `color${
|
|
422
|
+
root: ["root", e !== "inherit" && `color${Nt(e)}`, `fontSize${Nt(n)}`]
|
|
468
423
|
};
|
|
469
|
-
return
|
|
470
|
-
},
|
|
424
|
+
return Io(i, vr, s);
|
|
425
|
+
}, Tr = ko("svg", {
|
|
471
426
|
name: "MuiSvgIcon",
|
|
472
427
|
slot: "Root",
|
|
473
428
|
overridesResolver: (t, e) => {
|
|
474
429
|
const {
|
|
475
430
|
ownerState: n
|
|
476
431
|
} = t;
|
|
477
|
-
return [e.root, n.color !== "inherit" && e[`color${
|
|
432
|
+
return [e.root, n.color !== "inherit" && e[`color${Nt(n.color)}`], e[`fontSize${Nt(n.fontSize)}`]];
|
|
478
433
|
}
|
|
479
434
|
})(({
|
|
480
435
|
theme: t,
|
|
481
436
|
ownerState: e
|
|
482
437
|
}) => {
|
|
483
|
-
var n, s, i, r, o, a, l, c, u,
|
|
438
|
+
var n, s, i, r, o, a, l, c, u, h, f, d, m;
|
|
484
439
|
return {
|
|
485
440
|
userSelect: "none",
|
|
486
441
|
width: "1em",
|
|
@@ -500,9 +455,9 @@ const Er = ["children", "className", "color", "component", "fontSize", "htmlColo
|
|
|
500
455
|
large: ((c = t.typography) == null || (u = c.pxToRem) == null ? void 0 : u.call(c, 35)) || "2.1875rem"
|
|
501
456
|
}[e.fontSize],
|
|
502
457
|
// TODO v5 deprecate, v6 remove for sx
|
|
503
|
-
color: (
|
|
458
|
+
color: (h = (f = (t.vars || t).palette) == null || (f = f[e.color]) == null ? void 0 : f.main) != null ? h : {
|
|
504
459
|
action: (d = (t.vars || t).palette) == null || (d = d.action) == null ? void 0 : d.active,
|
|
505
|
-
disabled: (
|
|
460
|
+
disabled: (m = (t.vars || t).palette) == null || (m = m.action) == null ? void 0 : m.disabled,
|
|
506
461
|
inherit: void 0
|
|
507
462
|
}[e.color]
|
|
508
463
|
};
|
|
@@ -518,31 +473,31 @@ const Er = ["children", "className", "color", "component", "fontSize", "htmlColo
|
|
|
518
473
|
fontSize: l = "medium",
|
|
519
474
|
htmlColor: c,
|
|
520
475
|
inheritViewBox: u = !1,
|
|
521
|
-
titleAccess:
|
|
522
|
-
viewBox:
|
|
523
|
-
} = s, d = Eo(s,
|
|
476
|
+
titleAccess: h,
|
|
477
|
+
viewBox: f = "0 0 24 24"
|
|
478
|
+
} = s, d = Eo(s, xr), m = /* @__PURE__ */ R.isValidElement(i) && i.type === "svg", p = Ie({}, s, {
|
|
524
479
|
color: o,
|
|
525
480
|
component: a,
|
|
526
481
|
fontSize: l,
|
|
527
482
|
instanceFontSize: e.fontSize,
|
|
528
483
|
inheritViewBox: u,
|
|
529
|
-
viewBox:
|
|
530
|
-
hasSvgAsChild:
|
|
484
|
+
viewBox: f,
|
|
485
|
+
hasSvgAsChild: m
|
|
531
486
|
}), v = {};
|
|
532
|
-
u || (v.viewBox =
|
|
533
|
-
const b =
|
|
534
|
-
return /* @__PURE__ */
|
|
487
|
+
u || (v.viewBox = f);
|
|
488
|
+
const b = br(p);
|
|
489
|
+
return /* @__PURE__ */ F(Tr, Ie({
|
|
535
490
|
as: a,
|
|
536
|
-
className:
|
|
491
|
+
className: Bo(b.root, r),
|
|
537
492
|
focusable: "false",
|
|
538
493
|
color: c,
|
|
539
|
-
"aria-hidden":
|
|
540
|
-
role:
|
|
494
|
+
"aria-hidden": h ? void 0 : !0,
|
|
495
|
+
role: h ? "img" : void 0,
|
|
541
496
|
ref: n
|
|
542
|
-
}, v, d,
|
|
543
|
-
ownerState:
|
|
544
|
-
children: [
|
|
545
|
-
children:
|
|
497
|
+
}, v, d, m && i.props, {
|
|
498
|
+
ownerState: p,
|
|
499
|
+
children: [m ? i.props.children : i, h ? /* @__PURE__ */ P("title", {
|
|
500
|
+
children: h
|
|
546
501
|
}) : null]
|
|
547
502
|
}));
|
|
548
503
|
});
|
|
@@ -619,47 +574,47 @@ process.env.NODE_ENV !== "production" && (Je.propTypes = {
|
|
|
619
574
|
viewBox: D.string
|
|
620
575
|
});
|
|
621
576
|
Je.muiName = "SvgIcon";
|
|
622
|
-
const
|
|
623
|
-
function
|
|
577
|
+
const Bn = Je;
|
|
578
|
+
function Pr(t, e) {
|
|
624
579
|
function n(s, i) {
|
|
625
|
-
return /* @__PURE__ */
|
|
580
|
+
return /* @__PURE__ */ P(Bn, Ie({
|
|
626
581
|
"data-testid": `${e}Icon`,
|
|
627
582
|
ref: i
|
|
628
583
|
}, s, {
|
|
629
584
|
children: t
|
|
630
585
|
}));
|
|
631
586
|
}
|
|
632
|
-
return process.env.NODE_ENV !== "production" && (n.displayName = `${e}Icon`), n.muiName =
|
|
587
|
+
return process.env.NODE_ENV !== "production" && (n.displayName = `${e}Icon`), n.muiName = Bn.muiName, /* @__PURE__ */ R.memo(/* @__PURE__ */ R.forwardRef(n));
|
|
633
588
|
}
|
|
634
|
-
const
|
|
589
|
+
const wr = {
|
|
635
590
|
configure: (t) => {
|
|
636
591
|
process.env.NODE_ENV !== "production" && console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.", "", "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", "", "The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401", "", "The updated documentation: https://mui.com/guides/classname-generator/"].join(`
|
|
637
|
-
`)),
|
|
592
|
+
`)), jo.configure(t);
|
|
638
593
|
}
|
|
639
|
-
},
|
|
594
|
+
}, Ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
640
595
|
__proto__: null,
|
|
641
|
-
capitalize:
|
|
642
|
-
createChainedFunction:
|
|
643
|
-
createSvgIcon:
|
|
644
|
-
debounce:
|
|
645
|
-
deprecatedPropType:
|
|
646
|
-
isMuiElement:
|
|
596
|
+
capitalize: Nt,
|
|
597
|
+
createChainedFunction: Jo,
|
|
598
|
+
createSvgIcon: Pr,
|
|
599
|
+
debounce: tr,
|
|
600
|
+
deprecatedPropType: er,
|
|
601
|
+
isMuiElement: nr,
|
|
647
602
|
ownerDocument: qs,
|
|
648
|
-
ownerWindow:
|
|
603
|
+
ownerWindow: sr,
|
|
649
604
|
requirePropFactory: Fo,
|
|
650
605
|
setRef: Ks,
|
|
651
|
-
unstable_ClassNameGenerator:
|
|
606
|
+
unstable_ClassNameGenerator: wr,
|
|
652
607
|
unstable_useEnhancedEffect: Ys,
|
|
653
|
-
unstable_useId:
|
|
654
|
-
unsupportedProp:
|
|
655
|
-
useControlled:
|
|
656
|
-
useEventCallback:
|
|
657
|
-
useForkRef:
|
|
658
|
-
useIsFocusVisible:
|
|
659
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
660
|
-
var
|
|
608
|
+
unstable_useId: rr,
|
|
609
|
+
unsupportedProp: ar,
|
|
610
|
+
useControlled: lr,
|
|
611
|
+
useEventCallback: cr,
|
|
612
|
+
useForkRef: ur,
|
|
613
|
+
useIsFocusVisible: yr
|
|
614
|
+
}, Symbol.toStringTag, { value: "Module" })), Sr = /* @__PURE__ */ Oo(Ar);
|
|
615
|
+
var In;
|
|
661
616
|
function tn() {
|
|
662
|
-
return
|
|
617
|
+
return In || (In = 1, function(t) {
|
|
663
618
|
"use client";
|
|
664
619
|
Object.defineProperty(t, "__esModule", {
|
|
665
620
|
value: !0
|
|
@@ -669,40 +624,40 @@ function tn() {
|
|
|
669
624
|
return e.createSvgIcon;
|
|
670
625
|
}
|
|
671
626
|
});
|
|
672
|
-
var e =
|
|
673
|
-
}(
|
|
627
|
+
var e = Sr;
|
|
628
|
+
}(Te)), Te;
|
|
674
629
|
}
|
|
675
|
-
var
|
|
630
|
+
var Vr = Ze;
|
|
676
631
|
Object.defineProperty(Qe, "__esModule", {
|
|
677
632
|
value: !0
|
|
678
633
|
});
|
|
679
|
-
var Xs = Qe.default = void 0,
|
|
680
|
-
Xs = Qe.default = (0,
|
|
634
|
+
var Xs = Qe.default = void 0, Cr = Vr(tn()), Mr = Xe;
|
|
635
|
+
Xs = Qe.default = (0, Cr.default)(/* @__PURE__ */ (0, Mr.jsx)("path", {
|
|
681
636
|
d: "m10 17 5-5-5-5z"
|
|
682
637
|
}), "ArrowRight");
|
|
683
|
-
var en = {},
|
|
638
|
+
var en = {}, Dr = Ze;
|
|
684
639
|
Object.defineProperty(en, "__esModule", {
|
|
685
640
|
value: !0
|
|
686
641
|
});
|
|
687
|
-
var Qs = en.default = void 0,
|
|
688
|
-
Qs = en.default = (0,
|
|
642
|
+
var Qs = en.default = void 0, Rr = Dr(tn()), kr = Xe;
|
|
643
|
+
Qs = en.default = (0, Rr.default)(/* @__PURE__ */ (0, kr.jsx)("path", {
|
|
689
644
|
d: "M4 18h11c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1m0-5h8c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1M3 7c0 .55.45 1 1 1h11c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1m17.3 7.88L17.42 12l2.88-2.88c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L15.3 11.3c-.39.39-.39 1.02 0 1.41l3.59 3.59c.39.39 1.02.39 1.41 0 .38-.39.39-1.03 0-1.42"
|
|
690
645
|
}), "MenuOpenRounded");
|
|
691
|
-
var nn = {},
|
|
646
|
+
var nn = {}, Lr = Ze;
|
|
692
647
|
Object.defineProperty(nn, "__esModule", {
|
|
693
648
|
value: !0
|
|
694
649
|
});
|
|
695
|
-
var Zs = nn.default = void 0,
|
|
696
|
-
Zs = nn.default = (0,
|
|
650
|
+
var Zs = nn.default = void 0, Er = Lr(tn()), Br = Xe;
|
|
651
|
+
Zs = nn.default = (0, Er.default)(/* @__PURE__ */ (0, Br.jsx)("path", {
|
|
697
652
|
d: "M4 18h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1m0-5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1M3 7c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1"
|
|
698
653
|
}), "MenuRounded");
|
|
699
654
|
const Js = Mt({
|
|
700
655
|
transformPagePoint: (t) => t,
|
|
701
656
|
isStatic: !1,
|
|
702
657
|
reducedMotion: "never"
|
|
703
|
-
}), de = Mt({}), sn = Mt(null),
|
|
704
|
-
function
|
|
705
|
-
const { visualElement: i } =
|
|
658
|
+
}), de = Mt({}), sn = Mt(null), me = typeof document < "u", Ir = me ? Ws : Wt, ti = Mt({ strict: !1 }), on = (t) => t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), jr = "framerAppearId", ei = "data-" + on(jr);
|
|
659
|
+
function Fr(t, e, n, s) {
|
|
660
|
+
const { visualElement: i } = _(de), r = _(ti), o = _(sn), a = _(Js).reducedMotion, l = St();
|
|
706
661
|
s = s || r.renderer, !l.current && s && (l.current = s(t, {
|
|
707
662
|
visualState: e,
|
|
708
663
|
parent: i,
|
|
@@ -716,19 +671,19 @@ function Qr(t, e, n, s) {
|
|
|
716
671
|
c && c.update(n, o);
|
|
717
672
|
});
|
|
718
673
|
const u = St(!!(n[ei] && !window.HandoffComplete));
|
|
719
|
-
return
|
|
674
|
+
return Ir(() => {
|
|
720
675
|
c && (c.render(), u.current && c.animationState && c.animationState.animateChanges());
|
|
721
676
|
}), Wt(() => {
|
|
722
677
|
c && (c.updateFeatures(), !u.current && c.animationState && c.animationState.animateChanges(), u.current && (u.current = !1, window.HandoffComplete = !0));
|
|
723
678
|
}), c;
|
|
724
679
|
}
|
|
725
|
-
function
|
|
680
|
+
function Tt(t) {
|
|
726
681
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
727
682
|
}
|
|
728
|
-
function
|
|
683
|
+
function Or(t, e, n) {
|
|
729
684
|
return Vo(
|
|
730
685
|
(s) => {
|
|
731
|
-
s && t.mount && t.mount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) :
|
|
686
|
+
s && t.mount && t.mount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) : Tt(n) && (n.current = s));
|
|
732
687
|
},
|
|
733
688
|
/**
|
|
734
689
|
* Only pass a new ref callback to React if we've received a visual element
|
|
@@ -738,10 +693,10 @@ function Zr(t, e, n) {
|
|
|
738
693
|
[e]
|
|
739
694
|
);
|
|
740
695
|
}
|
|
741
|
-
function
|
|
696
|
+
function _t(t) {
|
|
742
697
|
return typeof t == "string" || Array.isArray(t);
|
|
743
698
|
}
|
|
744
|
-
function
|
|
699
|
+
function pe(t) {
|
|
745
700
|
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
746
701
|
}
|
|
747
702
|
const rn = [
|
|
@@ -754,26 +709,26 @@ const rn = [
|
|
|
754
709
|
"exit"
|
|
755
710
|
], an = ["initial", ...rn];
|
|
756
711
|
function ge(t) {
|
|
757
|
-
return
|
|
712
|
+
return pe(t.animate) || an.some((e) => _t(t[e]));
|
|
758
713
|
}
|
|
759
714
|
function ni(t) {
|
|
760
715
|
return !!(ge(t) || t.variants);
|
|
761
716
|
}
|
|
762
|
-
function
|
|
717
|
+
function Nr(t, e) {
|
|
763
718
|
if (ge(t)) {
|
|
764
719
|
const { initial: n, animate: s } = t;
|
|
765
720
|
return {
|
|
766
|
-
initial: n === !1 ||
|
|
767
|
-
animate:
|
|
721
|
+
initial: n === !1 || _t(n) ? n : void 0,
|
|
722
|
+
animate: _t(s) ? s : void 0
|
|
768
723
|
};
|
|
769
724
|
}
|
|
770
725
|
return t.inherit !== !1 ? e : {};
|
|
771
726
|
}
|
|
772
|
-
function
|
|
773
|
-
const { initial: e, animate: n } =
|
|
774
|
-
return
|
|
727
|
+
function _r(t) {
|
|
728
|
+
const { initial: e, animate: n } = Nr(t, _(de));
|
|
729
|
+
return he(() => ({ initial: e, animate: n }), [jn(e), jn(n)]);
|
|
775
730
|
}
|
|
776
|
-
function
|
|
731
|
+
function jn(t) {
|
|
777
732
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
778
733
|
}
|
|
779
734
|
const Fn = {
|
|
@@ -800,51 +755,51 @@ for (const t in Fn)
|
|
|
800
755
|
Ut[t] = {
|
|
801
756
|
isEnabled: (e) => Fn[t].some((n) => !!e[n])
|
|
802
757
|
};
|
|
803
|
-
function
|
|
758
|
+
function Ur(t) {
|
|
804
759
|
for (const e in t)
|
|
805
760
|
Ut[e] = {
|
|
806
761
|
...Ut[e],
|
|
807
762
|
...t[e]
|
|
808
763
|
};
|
|
809
764
|
}
|
|
810
|
-
const si = Mt({}), ii = Mt({}),
|
|
811
|
-
function
|
|
812
|
-
t &&
|
|
765
|
+
const si = Mt({}), ii = Mt({}), zr = Symbol.for("motionComponentSymbol");
|
|
766
|
+
function Wr({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: s, Component: i }) {
|
|
767
|
+
t && Ur(t);
|
|
813
768
|
function r(a, l) {
|
|
814
769
|
let c;
|
|
815
770
|
const u = {
|
|
816
|
-
...
|
|
771
|
+
..._(Js),
|
|
817
772
|
...a,
|
|
818
|
-
layoutId:
|
|
819
|
-
}, { isStatic:
|
|
820
|
-
if (!
|
|
821
|
-
|
|
822
|
-
const
|
|
823
|
-
|
|
773
|
+
layoutId: Gr(a)
|
|
774
|
+
}, { isStatic: h } = u, f = _r(a), d = s(a, h);
|
|
775
|
+
if (!h && me) {
|
|
776
|
+
f.visualElement = Fr(i, d, u, e);
|
|
777
|
+
const m = _(ii), p = _(ti).strict;
|
|
778
|
+
f.visualElement && (c = f.visualElement.loadFeatures(
|
|
824
779
|
// Note: Pass the full new combined props to correctly re-render dynamic feature components.
|
|
825
780
|
u,
|
|
826
|
-
|
|
781
|
+
p,
|
|
827
782
|
t,
|
|
828
|
-
|
|
783
|
+
m
|
|
829
784
|
));
|
|
830
785
|
}
|
|
831
786
|
return R.createElement(
|
|
832
787
|
de.Provider,
|
|
833
|
-
{ value:
|
|
834
|
-
c &&
|
|
835
|
-
n(i, a,
|
|
788
|
+
{ value: f },
|
|
789
|
+
c && f.visualElement ? R.createElement(c, { visualElement: f.visualElement, ...u }) : null,
|
|
790
|
+
n(i, a, Or(d, f.visualElement, l), d, h, f.visualElement)
|
|
836
791
|
);
|
|
837
792
|
}
|
|
838
793
|
const o = Co(r);
|
|
839
|
-
return o[
|
|
794
|
+
return o[zr] = i, o;
|
|
840
795
|
}
|
|
841
|
-
function
|
|
842
|
-
const e =
|
|
796
|
+
function Gr({ layoutId: t }) {
|
|
797
|
+
const e = _(si).id;
|
|
843
798
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
844
799
|
}
|
|
845
|
-
function
|
|
800
|
+
function $r(t) {
|
|
846
801
|
function e(s, i = {}) {
|
|
847
|
-
return
|
|
802
|
+
return Wr(t(s, i));
|
|
848
803
|
}
|
|
849
804
|
if (typeof Proxy > "u")
|
|
850
805
|
return e;
|
|
@@ -858,7 +813,7 @@ function oa(t) {
|
|
|
858
813
|
get: (s, i) => (n.has(i) || n.set(i, e(i)), n.get(i))
|
|
859
814
|
});
|
|
860
815
|
}
|
|
861
|
-
const
|
|
816
|
+
const Hr = [
|
|
862
817
|
"animate",
|
|
863
818
|
"circle",
|
|
864
819
|
"defs",
|
|
@@ -898,7 +853,7 @@ function ln(t) {
|
|
|
898
853
|
/**
|
|
899
854
|
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
900
855
|
*/
|
|
901
|
-
!!(
|
|
856
|
+
!!(Hr.indexOf(t) > -1 || /**
|
|
902
857
|
* If it contains a capital letter, it's an SVG component
|
|
903
858
|
*/
|
|
904
859
|
/[A-Z]/.test(t))
|
|
@@ -906,10 +861,10 @@ function ln(t) {
|
|
|
906
861
|
);
|
|
907
862
|
}
|
|
908
863
|
const se = {};
|
|
909
|
-
function
|
|
864
|
+
function qr(t) {
|
|
910
865
|
Object.assign(se, t);
|
|
911
866
|
}
|
|
912
|
-
const
|
|
867
|
+
const Gt = [
|
|
913
868
|
"transformPerspective",
|
|
914
869
|
"x",
|
|
915
870
|
"y",
|
|
@@ -927,86 +882,86 @@ const $t = [
|
|
|
927
882
|
"skew",
|
|
928
883
|
"skewX",
|
|
929
884
|
"skewY"
|
|
930
|
-
], gt = new Set(
|
|
885
|
+
], gt = new Set(Gt);
|
|
931
886
|
function oi(t, { layout: e, layoutId: n }) {
|
|
932
887
|
return gt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!se[t] || t === "opacity");
|
|
933
888
|
}
|
|
934
|
-
const U = (t) => !!(t && t.getVelocity),
|
|
889
|
+
const U = (t) => !!(t && t.getVelocity), Kr = {
|
|
935
890
|
x: "translateX",
|
|
936
891
|
y: "translateY",
|
|
937
892
|
z: "translateZ",
|
|
938
893
|
transformPerspective: "perspective"
|
|
939
|
-
},
|
|
940
|
-
function
|
|
894
|
+
}, Yr = Gt.length;
|
|
895
|
+
function Xr(t, { enableHardwareAcceleration: e = !0, allowTransformNone: n = !0 }, s, i) {
|
|
941
896
|
let r = "";
|
|
942
|
-
for (let o = 0; o <
|
|
943
|
-
const a =
|
|
897
|
+
for (let o = 0; o < Yr; o++) {
|
|
898
|
+
const a = Gt[o];
|
|
944
899
|
if (t[a] !== void 0) {
|
|
945
|
-
const l =
|
|
900
|
+
const l = Kr[a] || a;
|
|
946
901
|
r += `${l}(${t[a]}) `;
|
|
947
902
|
}
|
|
948
903
|
}
|
|
949
904
|
return e && !t.z && (r += "translateZ(0)"), r = r.trim(), i ? r = i(t, s ? "" : r) : n && s && (r = "none"), r;
|
|
950
905
|
}
|
|
951
|
-
const ri = (t) => (e) => typeof e == "string" && e.startsWith(t), ai = ri("--"), Fe = ri("var(--"),
|
|
906
|
+
const ri = (t) => (e) => typeof e == "string" && e.startsWith(t), ai = ri("--"), Fe = ri("var(--"), Qr = /var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g, Zr = (t, e) => e && typeof t == "number" ? e.transform(t) : t, lt = (t, e, n) => Math.min(Math.max(n, t), e), yt = {
|
|
952
907
|
test: (t) => typeof t == "number",
|
|
953
908
|
parse: parseFloat,
|
|
954
909
|
transform: (t) => t
|
|
955
|
-
},
|
|
910
|
+
}, It = {
|
|
956
911
|
...yt,
|
|
957
912
|
transform: (t) => lt(0, 1, t)
|
|
958
913
|
}, Xt = {
|
|
959
914
|
...yt,
|
|
960
915
|
default: 1
|
|
961
|
-
},
|
|
962
|
-
function
|
|
916
|
+
}, jt = (t) => Math.round(t * 1e5) / 1e5, ye = /(-)?([\d]*\.?[\d])+/g, li = /(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi, Jr = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
|
|
917
|
+
function $t(t) {
|
|
963
918
|
return typeof t == "string";
|
|
964
919
|
}
|
|
965
920
|
const Ht = (t) => ({
|
|
966
|
-
test: (e) =>
|
|
921
|
+
test: (e) => $t(e) && e.endsWith(t) && e.split(" ").length === 1,
|
|
967
922
|
parse: parseFloat,
|
|
968
923
|
transform: (e) => `${e}${t}`
|
|
969
|
-
}), st = Ht("deg"), K = Ht("%"),
|
|
924
|
+
}), st = Ht("deg"), K = Ht("%"), T = Ht("px"), ta = Ht("vh"), ea = Ht("vw"), On = {
|
|
970
925
|
...K,
|
|
971
926
|
parse: (t) => K.parse(t) / 100,
|
|
972
927
|
transform: (t) => K.transform(t * 100)
|
|
973
|
-
},
|
|
928
|
+
}, Nn = {
|
|
974
929
|
...yt,
|
|
975
930
|
transform: Math.round
|
|
976
931
|
}, ci = {
|
|
977
932
|
// Border props
|
|
978
|
-
borderWidth:
|
|
979
|
-
borderTopWidth:
|
|
980
|
-
borderRightWidth:
|
|
981
|
-
borderBottomWidth:
|
|
982
|
-
borderLeftWidth:
|
|
983
|
-
borderRadius:
|
|
984
|
-
radius:
|
|
985
|
-
borderTopLeftRadius:
|
|
986
|
-
borderTopRightRadius:
|
|
987
|
-
borderBottomRightRadius:
|
|
988
|
-
borderBottomLeftRadius:
|
|
933
|
+
borderWidth: T,
|
|
934
|
+
borderTopWidth: T,
|
|
935
|
+
borderRightWidth: T,
|
|
936
|
+
borderBottomWidth: T,
|
|
937
|
+
borderLeftWidth: T,
|
|
938
|
+
borderRadius: T,
|
|
939
|
+
radius: T,
|
|
940
|
+
borderTopLeftRadius: T,
|
|
941
|
+
borderTopRightRadius: T,
|
|
942
|
+
borderBottomRightRadius: T,
|
|
943
|
+
borderBottomLeftRadius: T,
|
|
989
944
|
// Positioning props
|
|
990
|
-
width:
|
|
991
|
-
maxWidth:
|
|
992
|
-
height:
|
|
993
|
-
maxHeight:
|
|
994
|
-
size:
|
|
995
|
-
top:
|
|
996
|
-
right:
|
|
997
|
-
bottom:
|
|
998
|
-
left:
|
|
945
|
+
width: T,
|
|
946
|
+
maxWidth: T,
|
|
947
|
+
height: T,
|
|
948
|
+
maxHeight: T,
|
|
949
|
+
size: T,
|
|
950
|
+
top: T,
|
|
951
|
+
right: T,
|
|
952
|
+
bottom: T,
|
|
953
|
+
left: T,
|
|
999
954
|
// Spacing props
|
|
1000
|
-
padding:
|
|
1001
|
-
paddingTop:
|
|
1002
|
-
paddingRight:
|
|
1003
|
-
paddingBottom:
|
|
1004
|
-
paddingLeft:
|
|
1005
|
-
margin:
|
|
1006
|
-
marginTop:
|
|
1007
|
-
marginRight:
|
|
1008
|
-
marginBottom:
|
|
1009
|
-
marginLeft:
|
|
955
|
+
padding: T,
|
|
956
|
+
paddingTop: T,
|
|
957
|
+
paddingRight: T,
|
|
958
|
+
paddingBottom: T,
|
|
959
|
+
paddingLeft: T,
|
|
960
|
+
margin: T,
|
|
961
|
+
marginTop: T,
|
|
962
|
+
marginRight: T,
|
|
963
|
+
marginBottom: T,
|
|
964
|
+
marginLeft: T,
|
|
1010
965
|
// Transform props
|
|
1011
966
|
rotate: st,
|
|
1012
967
|
rotateX: st,
|
|
@@ -1019,46 +974,46 @@ const Ht = (t) => ({
|
|
|
1019
974
|
skew: st,
|
|
1020
975
|
skewX: st,
|
|
1021
976
|
skewY: st,
|
|
1022
|
-
distance:
|
|
1023
|
-
translateX:
|
|
1024
|
-
translateY:
|
|
1025
|
-
translateZ:
|
|
1026
|
-
x:
|
|
1027
|
-
y:
|
|
1028
|
-
z:
|
|
1029
|
-
perspective:
|
|
1030
|
-
transformPerspective:
|
|
1031
|
-
opacity:
|
|
977
|
+
distance: T,
|
|
978
|
+
translateX: T,
|
|
979
|
+
translateY: T,
|
|
980
|
+
translateZ: T,
|
|
981
|
+
x: T,
|
|
982
|
+
y: T,
|
|
983
|
+
z: T,
|
|
984
|
+
perspective: T,
|
|
985
|
+
transformPerspective: T,
|
|
986
|
+
opacity: It,
|
|
1032
987
|
originX: On,
|
|
1033
988
|
originY: On,
|
|
1034
|
-
originZ:
|
|
989
|
+
originZ: T,
|
|
1035
990
|
// Misc
|
|
1036
|
-
zIndex:
|
|
991
|
+
zIndex: Nn,
|
|
1037
992
|
// SVG
|
|
1038
|
-
fillOpacity:
|
|
1039
|
-
strokeOpacity:
|
|
1040
|
-
numOctaves:
|
|
993
|
+
fillOpacity: It,
|
|
994
|
+
strokeOpacity: It,
|
|
995
|
+
numOctaves: Nn
|
|
1041
996
|
};
|
|
1042
997
|
function cn(t, e, n, s) {
|
|
1043
998
|
const { style: i, vars: r, transform: o, transformOrigin: a } = t;
|
|
1044
999
|
let l = !1, c = !1, u = !0;
|
|
1045
|
-
for (const
|
|
1046
|
-
const
|
|
1047
|
-
if (ai(
|
|
1048
|
-
r[
|
|
1000
|
+
for (const h in e) {
|
|
1001
|
+
const f = e[h];
|
|
1002
|
+
if (ai(h)) {
|
|
1003
|
+
r[h] = f;
|
|
1049
1004
|
continue;
|
|
1050
1005
|
}
|
|
1051
|
-
const d = ci[
|
|
1052
|
-
if (gt.has(
|
|
1053
|
-
if (l = !0, o[
|
|
1006
|
+
const d = ci[h], m = Zr(f, d);
|
|
1007
|
+
if (gt.has(h)) {
|
|
1008
|
+
if (l = !0, o[h] = m, !u)
|
|
1054
1009
|
continue;
|
|
1055
|
-
|
|
1010
|
+
f !== (d.default || 0) && (u = !1);
|
|
1056
1011
|
} else
|
|
1057
|
-
|
|
1012
|
+
h.startsWith("origin") ? (c = !0, a[h] = m) : i[h] = m;
|
|
1058
1013
|
}
|
|
1059
|
-
if (e.transform || (l || s ? i.transform =
|
|
1060
|
-
const { originX:
|
|
1061
|
-
i.transformOrigin = `${
|
|
1014
|
+
if (e.transform || (l || s ? i.transform = Xr(t.transform, n, u, s) : i.transform && (i.transform = "none")), c) {
|
|
1015
|
+
const { originX: h = "50%", originY: f = "50%", originZ: d = 0 } = a;
|
|
1016
|
+
i.transformOrigin = `${h} ${f} ${d}`;
|
|
1062
1017
|
}
|
|
1063
1018
|
}
|
|
1064
1019
|
const un = () => ({
|
|
@@ -1071,21 +1026,21 @@ function ui(t, e, n) {
|
|
|
1071
1026
|
for (const s in e)
|
|
1072
1027
|
!U(e[s]) && !oi(s, n) && (t[s] = e[s]);
|
|
1073
1028
|
}
|
|
1074
|
-
function
|
|
1075
|
-
return
|
|
1029
|
+
function na({ transformTemplate: t }, e, n) {
|
|
1030
|
+
return he(() => {
|
|
1076
1031
|
const s = un();
|
|
1077
1032
|
return cn(s, e, { enableHardwareAcceleration: !n }, t), Object.assign({}, s.vars, s.style);
|
|
1078
1033
|
}, [e]);
|
|
1079
1034
|
}
|
|
1080
|
-
function
|
|
1035
|
+
function sa(t, e, n) {
|
|
1081
1036
|
const s = t.style || {}, i = {};
|
|
1082
|
-
return ui(i, s, t), Object.assign(i,
|
|
1037
|
+
return ui(i, s, t), Object.assign(i, na(t, e, n)), t.transformValues ? t.transformValues(i) : i;
|
|
1083
1038
|
}
|
|
1084
|
-
function
|
|
1085
|
-
const s = {}, i =
|
|
1039
|
+
function ia(t, e, n) {
|
|
1040
|
+
const s = {}, i = sa(t, e, n);
|
|
1086
1041
|
return t.drag && t.dragListener !== !1 && (s.draggable = !1, i.userSelect = i.WebkitUserSelect = i.WebkitTouchCallout = "none", i.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (s.tabIndex = 0), s.style = i, s;
|
|
1087
1042
|
}
|
|
1088
|
-
const
|
|
1043
|
+
const oa = /* @__PURE__ */ new Set([
|
|
1089
1044
|
"animate",
|
|
1090
1045
|
"exit",
|
|
1091
1046
|
"variants",
|
|
@@ -1119,45 +1074,45 @@ const xa = /* @__PURE__ */ new Set([
|
|
|
1119
1074
|
"viewport"
|
|
1120
1075
|
]);
|
|
1121
1076
|
function ie(t) {
|
|
1122
|
-
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") ||
|
|
1077
|
+
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || oa.has(t);
|
|
1123
1078
|
}
|
|
1124
|
-
let
|
|
1125
|
-
function
|
|
1126
|
-
t && (
|
|
1079
|
+
let hi = (t) => !ie(t);
|
|
1080
|
+
function ra(t) {
|
|
1081
|
+
t && (hi = (e) => e.startsWith("on") ? !ie(e) : t(e));
|
|
1127
1082
|
}
|
|
1128
1083
|
try {
|
|
1129
|
-
|
|
1084
|
+
ra(require("@emotion/is-prop-valid").default);
|
|
1130
1085
|
} catch {
|
|
1131
1086
|
}
|
|
1132
|
-
function
|
|
1087
|
+
function aa(t, e, n) {
|
|
1133
1088
|
const s = {};
|
|
1134
1089
|
for (const i in t)
|
|
1135
|
-
i === "values" && typeof t.values == "object" || (
|
|
1090
|
+
i === "values" && typeof t.values == "object" || (hi(i) || n === !0 && ie(i) || !e && !ie(i) || // If trying to use native HTML drag events, forward drag listeners
|
|
1136
1091
|
t.draggable && i.startsWith("onDrag")) && (s[i] = t[i]);
|
|
1137
1092
|
return s;
|
|
1138
1093
|
}
|
|
1139
|
-
function
|
|
1140
|
-
return typeof t == "string" ? t :
|
|
1094
|
+
function _n(t, e, n) {
|
|
1095
|
+
return typeof t == "string" ? t : T.transform(e + n * t);
|
|
1141
1096
|
}
|
|
1142
|
-
function
|
|
1143
|
-
const s =
|
|
1097
|
+
function la(t, e, n) {
|
|
1098
|
+
const s = _n(e, t.x, t.width), i = _n(n, t.y, t.height);
|
|
1144
1099
|
return `${s} ${i}`;
|
|
1145
1100
|
}
|
|
1146
|
-
const
|
|
1101
|
+
const ca = {
|
|
1147
1102
|
offset: "stroke-dashoffset",
|
|
1148
1103
|
array: "stroke-dasharray"
|
|
1149
|
-
},
|
|
1104
|
+
}, ua = {
|
|
1150
1105
|
offset: "strokeDashoffset",
|
|
1151
1106
|
array: "strokeDasharray"
|
|
1152
1107
|
};
|
|
1153
|
-
function
|
|
1108
|
+
function ha(t, e, n = 1, s = 0, i = !0) {
|
|
1154
1109
|
t.pathLength = 1;
|
|
1155
|
-
const r = i ?
|
|
1156
|
-
t[r.offset] =
|
|
1157
|
-
const o =
|
|
1110
|
+
const r = i ? ca : ua;
|
|
1111
|
+
t[r.offset] = T.transform(-s);
|
|
1112
|
+
const o = T.transform(e), a = T.transform(n);
|
|
1158
1113
|
t[r.array] = `${o} ${a}`;
|
|
1159
1114
|
}
|
|
1160
|
-
function
|
|
1115
|
+
function hn(t, {
|
|
1161
1116
|
attrX: e,
|
|
1162
1117
|
attrY: n,
|
|
1163
1118
|
attrScale: s,
|
|
@@ -1168,23 +1123,23 @@ function fn(t, {
|
|
|
1168
1123
|
pathOffset: l = 0,
|
|
1169
1124
|
// This is object creation, which we try to avoid per-frame.
|
|
1170
1125
|
...c
|
|
1171
|
-
}, u,
|
|
1172
|
-
if (cn(t, c, u,
|
|
1126
|
+
}, u, h, f) {
|
|
1127
|
+
if (cn(t, c, u, f), h) {
|
|
1173
1128
|
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
1174
1129
|
return;
|
|
1175
1130
|
}
|
|
1176
1131
|
t.attrs = t.style, t.style = {};
|
|
1177
|
-
const { attrs: d, style:
|
|
1178
|
-
d.transform && (
|
|
1132
|
+
const { attrs: d, style: m, dimensions: p } = t;
|
|
1133
|
+
d.transform && (p && (m.transform = d.transform), delete d.transform), p && (i !== void 0 || r !== void 0 || m.transform) && (m.transformOrigin = la(p, i !== void 0 ? i : 0.5, r !== void 0 ? r : 0.5)), e !== void 0 && (d.x = e), n !== void 0 && (d.y = n), s !== void 0 && (d.scale = s), o !== void 0 && ha(d, o, a, l, !1);
|
|
1179
1134
|
}
|
|
1180
|
-
const
|
|
1135
|
+
const fi = () => ({
|
|
1181
1136
|
...un(),
|
|
1182
1137
|
attrs: {}
|
|
1183
|
-
}),
|
|
1184
|
-
function
|
|
1185
|
-
const i =
|
|
1186
|
-
const r =
|
|
1187
|
-
return
|
|
1138
|
+
}), fn = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
1139
|
+
function fa(t, e, n, s) {
|
|
1140
|
+
const i = he(() => {
|
|
1141
|
+
const r = fi();
|
|
1142
|
+
return hn(r, e, { enableHardwareAcceleration: !1 }, fn(s), t.transformTemplate), {
|
|
1188
1143
|
...r.attrs,
|
|
1189
1144
|
style: { ...r.style }
|
|
1190
1145
|
};
|
|
@@ -1195,16 +1150,16 @@ function Va(t, e, n, s) {
|
|
|
1195
1150
|
}
|
|
1196
1151
|
return i;
|
|
1197
1152
|
}
|
|
1198
|
-
function
|
|
1153
|
+
function da(t = !1) {
|
|
1199
1154
|
return (n, s, i, { latestValues: r }, o) => {
|
|
1200
|
-
const l = (ln(n) ?
|
|
1201
|
-
...
|
|
1155
|
+
const l = (ln(n) ? fa : ia)(s, r, o, n), u = {
|
|
1156
|
+
...aa(s, typeof n == "string", t),
|
|
1202
1157
|
...l,
|
|
1203
1158
|
ref: i
|
|
1204
|
-
}, { children:
|
|
1205
|
-
return
|
|
1159
|
+
}, { children: h } = s, f = he(() => U(h) ? h.get() : h, [h]);
|
|
1160
|
+
return Gs(n, {
|
|
1206
1161
|
...u,
|
|
1207
|
-
children:
|
|
1162
|
+
children: f
|
|
1208
1163
|
});
|
|
1209
1164
|
};
|
|
1210
1165
|
}
|
|
@@ -1213,7 +1168,7 @@ function di(t, { style: e, vars: n }, s, i) {
|
|
|
1213
1168
|
for (const r in n)
|
|
1214
1169
|
t.style.setProperty(r, n[r]);
|
|
1215
1170
|
}
|
|
1216
|
-
const
|
|
1171
|
+
const mi = /* @__PURE__ */ new Set([
|
|
1217
1172
|
"baseFrequency",
|
|
1218
1173
|
"diffuseConstant",
|
|
1219
1174
|
"kernelMatrix",
|
|
@@ -1238,10 +1193,10 @@ const pi = /* @__PURE__ */ new Set([
|
|
|
1238
1193
|
"textLength",
|
|
1239
1194
|
"lengthAdjust"
|
|
1240
1195
|
]);
|
|
1241
|
-
function
|
|
1196
|
+
function pi(t, e, n, s) {
|
|
1242
1197
|
di(t, e, void 0, s);
|
|
1243
1198
|
for (const i in e.attrs)
|
|
1244
|
-
t.setAttribute(
|
|
1199
|
+
t.setAttribute(mi.has(i) ? i : on(i), e.attrs[i]);
|
|
1245
1200
|
}
|
|
1246
1201
|
function dn(t, e) {
|
|
1247
1202
|
const { style: n } = t, s = {};
|
|
@@ -1253,49 +1208,49 @@ function gi(t, e) {
|
|
|
1253
1208
|
const n = dn(t, e);
|
|
1254
1209
|
for (const s in t)
|
|
1255
1210
|
if (U(t[s]) || U(e[s])) {
|
|
1256
|
-
const i =
|
|
1211
|
+
const i = Gt.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
|
|
1257
1212
|
n[i] = t[s];
|
|
1258
1213
|
}
|
|
1259
1214
|
return n;
|
|
1260
1215
|
}
|
|
1261
|
-
function
|
|
1216
|
+
function mn(t, e, n, s = {}, i = {}) {
|
|
1262
1217
|
return typeof e == "function" && (e = e(n !== void 0 ? n : t.custom, s, i)), typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function" && (e = e(n !== void 0 ? n : t.custom, s, i)), e;
|
|
1263
1218
|
}
|
|
1264
|
-
function
|
|
1219
|
+
function ma(t) {
|
|
1265
1220
|
const e = St(null);
|
|
1266
1221
|
return e.current === null && (e.current = t()), e.current;
|
|
1267
1222
|
}
|
|
1268
|
-
const oe = (t) => Array.isArray(t),
|
|
1223
|
+
const oe = (t) => Array.isArray(t), pa = (t) => !!(t && typeof t == "object" && t.mix && t.toValue), ga = (t) => oe(t) ? t[t.length - 1] || 0 : t;
|
|
1269
1224
|
function ee(t) {
|
|
1270
1225
|
const e = U(t) ? t.get() : t;
|
|
1271
|
-
return
|
|
1226
|
+
return pa(e) ? e.toValue() : e;
|
|
1272
1227
|
}
|
|
1273
|
-
function
|
|
1228
|
+
function ya({ scrapeMotionValuesFromProps: t, createRenderState: e, onMount: n }, s, i, r) {
|
|
1274
1229
|
const o = {
|
|
1275
|
-
latestValues:
|
|
1230
|
+
latestValues: va(s, i, r, t),
|
|
1276
1231
|
renderState: e()
|
|
1277
1232
|
};
|
|
1278
1233
|
return n && (o.mount = (a) => n(s, a, o)), o;
|
|
1279
1234
|
}
|
|
1280
1235
|
const yi = (t) => (e, n) => {
|
|
1281
|
-
const s =
|
|
1282
|
-
return n ? r() :
|
|
1236
|
+
const s = _(de), i = _(sn), r = () => ya(t, e, s, i);
|
|
1237
|
+
return n ? r() : ma(r);
|
|
1283
1238
|
};
|
|
1284
|
-
function
|
|
1239
|
+
function va(t, e, n, s) {
|
|
1285
1240
|
const i = {}, r = s(t, {});
|
|
1286
|
-
for (const
|
|
1287
|
-
i[
|
|
1241
|
+
for (const f in r)
|
|
1242
|
+
i[f] = ee(r[f]);
|
|
1288
1243
|
let { initial: o, animate: a } = t;
|
|
1289
1244
|
const l = ge(t), c = ni(t);
|
|
1290
1245
|
e && c && !l && t.inherit !== !1 && (o === void 0 && (o = e.initial), a === void 0 && (a = e.animate));
|
|
1291
1246
|
let u = n ? n.initial === !1 : !1;
|
|
1292
1247
|
u = u || o === !1;
|
|
1293
|
-
const
|
|
1294
|
-
return
|
|
1295
|
-
const
|
|
1296
|
-
if (!
|
|
1248
|
+
const h = u ? a : o;
|
|
1249
|
+
return h && typeof h != "boolean" && !pe(h) && (Array.isArray(h) ? h : [h]).forEach((d) => {
|
|
1250
|
+
const m = mn(t, d);
|
|
1251
|
+
if (!m)
|
|
1297
1252
|
return;
|
|
1298
|
-
const { transitionEnd:
|
|
1253
|
+
const { transitionEnd: p, transition: v, ...b } = m;
|
|
1299
1254
|
for (const y in b) {
|
|
1300
1255
|
let g = b[y];
|
|
1301
1256
|
if (Array.isArray(g)) {
|
|
@@ -1304,8 +1259,8 @@ function La(t, e, n, s) {
|
|
|
1304
1259
|
}
|
|
1305
1260
|
g !== null && (i[y] = g);
|
|
1306
1261
|
}
|
|
1307
|
-
for (const y in
|
|
1308
|
-
i[y] =
|
|
1262
|
+
for (const y in p)
|
|
1263
|
+
i[y] = p[y];
|
|
1309
1264
|
}), i;
|
|
1310
1265
|
}
|
|
1311
1266
|
const E = (t) => t;
|
|
@@ -1325,15 +1280,15 @@ class Un {
|
|
|
1325
1280
|
this.order.length = 0, this.scheduled.clear();
|
|
1326
1281
|
}
|
|
1327
1282
|
}
|
|
1328
|
-
function
|
|
1283
|
+
function xa(t) {
|
|
1329
1284
|
let e = new Un(), n = new Un(), s = 0, i = !1, r = !1;
|
|
1330
1285
|
const o = /* @__PURE__ */ new WeakSet(), a = {
|
|
1331
1286
|
/**
|
|
1332
1287
|
* Schedule a process to run on the next frame.
|
|
1333
1288
|
*/
|
|
1334
1289
|
schedule: (l, c = !1, u = !1) => {
|
|
1335
|
-
const
|
|
1336
|
-
return c && o.add(l),
|
|
1290
|
+
const h = u && i, f = h ? e : n;
|
|
1291
|
+
return c && o.add(l), f.add(l) && h && i && (s = e.order.length), l;
|
|
1337
1292
|
},
|
|
1338
1293
|
/**
|
|
1339
1294
|
* Cancel the provided callback from running on the next frame.
|
|
@@ -1366,28 +1321,28 @@ const Qt = [
|
|
|
1366
1321
|
"preRender",
|
|
1367
1322
|
"render",
|
|
1368
1323
|
"postRender"
|
|
1369
|
-
],
|
|
1370
|
-
function
|
|
1324
|
+
], ba = 40;
|
|
1325
|
+
function Ta(t, e) {
|
|
1371
1326
|
let n = !1, s = !0;
|
|
1372
1327
|
const i = {
|
|
1373
1328
|
delta: 0,
|
|
1374
1329
|
timestamp: 0,
|
|
1375
1330
|
isProcessing: !1
|
|
1376
|
-
}, r = Qt.reduce((
|
|
1377
|
-
const
|
|
1378
|
-
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(
|
|
1331
|
+
}, r = Qt.reduce((h, f) => (h[f] = xa(() => n = !0), h), {}), o = (h) => r[h].process(i), a = () => {
|
|
1332
|
+
const h = performance.now();
|
|
1333
|
+
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(h - i.timestamp, ba), 1), i.timestamp = h, i.isProcessing = !0, Qt.forEach(o), i.isProcessing = !1, n && e && (s = !1, t(a));
|
|
1379
1334
|
}, l = () => {
|
|
1380
1335
|
n = !0, s = !0, i.isProcessing || t(a);
|
|
1381
1336
|
};
|
|
1382
|
-
return { schedule: Qt.reduce((
|
|
1383
|
-
const d = r[
|
|
1384
|
-
return f
|
|
1385
|
-
}, {}), cancel: (
|
|
1337
|
+
return { schedule: Qt.reduce((h, f) => {
|
|
1338
|
+
const d = r[f];
|
|
1339
|
+
return h[f] = (m, p = !1, v = !1) => (n || l(), d.schedule(m, p, v)), h;
|
|
1340
|
+
}, {}), cancel: (h) => Qt.forEach((f) => r[f].cancel(h)), state: i, steps: r };
|
|
1386
1341
|
}
|
|
1387
|
-
const { schedule: V, cancel: et, state:
|
|
1342
|
+
const { schedule: V, cancel: et, state: j, steps: we } = Ta(typeof requestAnimationFrame < "u" ? requestAnimationFrame : E, !0), Pa = {
|
|
1388
1343
|
useVisualState: yi({
|
|
1389
1344
|
scrapeMotionValuesFromProps: gi,
|
|
1390
|
-
createRenderState:
|
|
1345
|
+
createRenderState: fi,
|
|
1391
1346
|
onMount: (t, e, { renderState: n, latestValues: s }) => {
|
|
1392
1347
|
V.read(() => {
|
|
1393
1348
|
try {
|
|
@@ -1401,21 +1356,21 @@ const { schedule: V, cancel: et, state: F, steps: Pe } = Ba(typeof requestAnimat
|
|
|
1401
1356
|
};
|
|
1402
1357
|
}
|
|
1403
1358
|
}), V.render(() => {
|
|
1404
|
-
|
|
1359
|
+
hn(n, s, { enableHardwareAcceleration: !1 }, fn(e.tagName), t.transformTemplate), pi(e, n);
|
|
1405
1360
|
});
|
|
1406
1361
|
}
|
|
1407
1362
|
})
|
|
1408
|
-
},
|
|
1363
|
+
}, wa = {
|
|
1409
1364
|
useVisualState: yi({
|
|
1410
1365
|
scrapeMotionValuesFromProps: dn,
|
|
1411
1366
|
createRenderState: un
|
|
1412
1367
|
})
|
|
1413
1368
|
};
|
|
1414
|
-
function
|
|
1369
|
+
function Aa(t, { forwardMotionProps: e = !1 }, n, s) {
|
|
1415
1370
|
return {
|
|
1416
|
-
...ln(t) ?
|
|
1371
|
+
...ln(t) ? Pa : wa,
|
|
1417
1372
|
preloadedFeatures: n,
|
|
1418
|
-
useRender:
|
|
1373
|
+
useRender: da(e),
|
|
1419
1374
|
createVisualElement: s,
|
|
1420
1375
|
Component: t
|
|
1421
1376
|
};
|
|
@@ -1432,11 +1387,11 @@ function ve(t, e = "page") {
|
|
|
1432
1387
|
}
|
|
1433
1388
|
};
|
|
1434
1389
|
}
|
|
1435
|
-
const
|
|
1390
|
+
const Sa = (t) => (e) => vi(e) && t(e, ve(e));
|
|
1436
1391
|
function J(t, e, n, s) {
|
|
1437
|
-
return Z(t, e,
|
|
1392
|
+
return Z(t, e, Sa(n), s);
|
|
1438
1393
|
}
|
|
1439
|
-
const
|
|
1394
|
+
const Va = (t, e) => (n) => e(t(n)), rt = (...t) => t.reduce(Va);
|
|
1440
1395
|
function xi(t) {
|
|
1441
1396
|
let e = null;
|
|
1442
1397
|
return () => {
|
|
@@ -1461,7 +1416,7 @@ function bi(t) {
|
|
|
1461
1416
|
}
|
|
1462
1417
|
return e;
|
|
1463
1418
|
}
|
|
1464
|
-
function
|
|
1419
|
+
function Ti() {
|
|
1465
1420
|
const t = bi(!0);
|
|
1466
1421
|
return t ? (t(), !1) : !0;
|
|
1467
1422
|
}
|
|
@@ -1472,9 +1427,9 @@ class ut {
|
|
|
1472
1427
|
update() {
|
|
1473
1428
|
}
|
|
1474
1429
|
}
|
|
1475
|
-
function
|
|
1430
|
+
function Gn(t, e) {
|
|
1476
1431
|
const n = "pointer" + (e ? "enter" : "leave"), s = "onHover" + (e ? "Start" : "End"), i = (r, o) => {
|
|
1477
|
-
if (r.pointerType === "touch" ||
|
|
1432
|
+
if (r.pointerType === "touch" || Ti())
|
|
1478
1433
|
return;
|
|
1479
1434
|
const a = t.getProps();
|
|
1480
1435
|
t.animationState && a.whileHover && t.animationState.setActive("whileHover", e), a[s] && V.update(() => a[s](r, o));
|
|
@@ -1483,14 +1438,14 @@ function $n(t, e) {
|
|
|
1483
1438
|
passive: !t.getProps()[s]
|
|
1484
1439
|
});
|
|
1485
1440
|
}
|
|
1486
|
-
class
|
|
1441
|
+
class Ca extends ut {
|
|
1487
1442
|
mount() {
|
|
1488
|
-
this.unmount = rt(
|
|
1443
|
+
this.unmount = rt(Gn(this.node, !0), Gn(this.node, !1));
|
|
1489
1444
|
}
|
|
1490
1445
|
unmount() {
|
|
1491
1446
|
}
|
|
1492
1447
|
}
|
|
1493
|
-
class
|
|
1448
|
+
class Ma extends ut {
|
|
1494
1449
|
constructor() {
|
|
1495
1450
|
super(...arguments), this.isActive = !1;
|
|
1496
1451
|
}
|
|
@@ -1512,14 +1467,14 @@ class za extends ut {
|
|
|
1512
1467
|
unmount() {
|
|
1513
1468
|
}
|
|
1514
1469
|
}
|
|
1515
|
-
const
|
|
1470
|
+
const Pi = (t, e) => e ? t === e ? !0 : Pi(t, e.parentElement) : !1;
|
|
1516
1471
|
function Ae(t, e) {
|
|
1517
1472
|
if (!e)
|
|
1518
1473
|
return;
|
|
1519
1474
|
const n = new PointerEvent("pointer" + t);
|
|
1520
1475
|
e(n, ve(n));
|
|
1521
1476
|
}
|
|
1522
|
-
class
|
|
1477
|
+
class Da extends ut {
|
|
1523
1478
|
constructor() {
|
|
1524
1479
|
super(...arguments), this.removeStartListeners = E, this.removeEndListeners = E, this.removeAccessibleListeners = E, this.startPointerPress = (e, n) => {
|
|
1525
1480
|
if (this.isPressing)
|
|
@@ -1528,9 +1483,9 @@ class Wa extends ut {
|
|
|
1528
1483
|
const s = this.node.getProps(), r = J(window, "pointerup", (a, l) => {
|
|
1529
1484
|
if (!this.checkPressEnd())
|
|
1530
1485
|
return;
|
|
1531
|
-
const { onTap: c, onTapCancel: u, globalTapTarget:
|
|
1486
|
+
const { onTap: c, onTapCancel: u, globalTapTarget: h } = this.node.getProps();
|
|
1532
1487
|
V.update(() => {
|
|
1533
|
-
!
|
|
1488
|
+
!h && !Pi(this.node.current, a.target) ? u && u(a, l) : c && c(a, l);
|
|
1534
1489
|
});
|
|
1535
1490
|
}, { passive: !(s.onTap || s.onPointerUp) }), o = J(window, "pointercancel", (a, l) => this.cancelPress(a, l), { passive: !(s.onTapCancel || s.onPointerCancel) });
|
|
1536
1491
|
this.removeEndListeners = rt(r, o), this.startPress(e, n);
|
|
@@ -1559,7 +1514,7 @@ class Wa extends ut {
|
|
|
1559
1514
|
i && this.node.animationState && this.node.animationState.setActive("whileTap", !0), s && V.update(() => s(e, n));
|
|
1560
1515
|
}
|
|
1561
1516
|
checkPressEnd() {
|
|
1562
|
-
return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !
|
|
1517
|
+
return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !Ti();
|
|
1563
1518
|
}
|
|
1564
1519
|
cancelPress(e, n) {
|
|
1565
1520
|
if (!this.checkPressEnd())
|
|
@@ -1575,29 +1530,29 @@ class Wa extends ut {
|
|
|
1575
1530
|
this.removeStartListeners(), this.removeEndListeners(), this.removeAccessibleListeners();
|
|
1576
1531
|
}
|
|
1577
1532
|
}
|
|
1578
|
-
const Oe = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(),
|
|
1533
|
+
const Oe = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), Ra = (t) => {
|
|
1579
1534
|
const e = Oe.get(t.target);
|
|
1580
1535
|
e && e(t);
|
|
1581
|
-
},
|
|
1582
|
-
t.forEach(
|
|
1536
|
+
}, ka = (t) => {
|
|
1537
|
+
t.forEach(Ra);
|
|
1583
1538
|
};
|
|
1584
|
-
function
|
|
1539
|
+
function La({ root: t, ...e }) {
|
|
1585
1540
|
const n = t || document;
|
|
1586
1541
|
Se.has(n) || Se.set(n, {});
|
|
1587
1542
|
const s = Se.get(n), i = JSON.stringify(e);
|
|
1588
|
-
return s[i] || (s[i] = new IntersectionObserver(
|
|
1543
|
+
return s[i] || (s[i] = new IntersectionObserver(ka, { root: t, ...e })), s[i];
|
|
1589
1544
|
}
|
|
1590
|
-
function
|
|
1591
|
-
const s =
|
|
1545
|
+
function Ea(t, e, n) {
|
|
1546
|
+
const s = La(e);
|
|
1592
1547
|
return Oe.set(t, n), s.observe(t), () => {
|
|
1593
1548
|
Oe.delete(t), s.unobserve(t);
|
|
1594
1549
|
};
|
|
1595
1550
|
}
|
|
1596
|
-
const
|
|
1551
|
+
const Ba = {
|
|
1597
1552
|
some: 0,
|
|
1598
1553
|
all: 1
|
|
1599
1554
|
};
|
|
1600
|
-
class
|
|
1555
|
+
class Ia extends ut {
|
|
1601
1556
|
constructor() {
|
|
1602
1557
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
1603
1558
|
}
|
|
@@ -1606,16 +1561,16 @@ class Ya extends ut {
|
|
|
1606
1561
|
const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: r } = e, o = {
|
|
1607
1562
|
root: n ? n.current : void 0,
|
|
1608
1563
|
rootMargin: s,
|
|
1609
|
-
threshold: typeof i == "number" ? i :
|
|
1564
|
+
threshold: typeof i == "number" ? i : Ba[i]
|
|
1610
1565
|
}, a = (l) => {
|
|
1611
1566
|
const { isIntersecting: c } = l;
|
|
1612
1567
|
if (this.isInView === c || (this.isInView = c, r && !c && this.hasEnteredView))
|
|
1613
1568
|
return;
|
|
1614
1569
|
c && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", c);
|
|
1615
|
-
const { onViewportEnter: u, onViewportLeave:
|
|
1616
|
-
|
|
1570
|
+
const { onViewportEnter: u, onViewportLeave: h } = this.node.getProps(), f = c ? u : h;
|
|
1571
|
+
f && f(l);
|
|
1617
1572
|
};
|
|
1618
|
-
return
|
|
1573
|
+
return Ea(this.node.current, o, a);
|
|
1619
1574
|
}
|
|
1620
1575
|
mount() {
|
|
1621
1576
|
this.startObserver();
|
|
@@ -1624,29 +1579,29 @@ class Ya extends ut {
|
|
|
1624
1579
|
if (typeof IntersectionObserver > "u")
|
|
1625
1580
|
return;
|
|
1626
1581
|
const { props: e, prevProps: n } = this.node;
|
|
1627
|
-
["amount", "margin", "root"].some(
|
|
1582
|
+
["amount", "margin", "root"].some(ja(e, n)) && this.startObserver();
|
|
1628
1583
|
}
|
|
1629
1584
|
unmount() {
|
|
1630
1585
|
}
|
|
1631
1586
|
}
|
|
1632
|
-
function
|
|
1587
|
+
function ja({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
1633
1588
|
return (n) => t[n] !== e[n];
|
|
1634
1589
|
}
|
|
1635
|
-
const
|
|
1590
|
+
const Fa = {
|
|
1636
1591
|
inView: {
|
|
1637
|
-
Feature:
|
|
1592
|
+
Feature: Ia
|
|
1638
1593
|
},
|
|
1639
1594
|
tap: {
|
|
1640
|
-
Feature:
|
|
1595
|
+
Feature: Da
|
|
1641
1596
|
},
|
|
1642
1597
|
focus: {
|
|
1643
|
-
Feature:
|
|
1598
|
+
Feature: Ma
|
|
1644
1599
|
},
|
|
1645
1600
|
hover: {
|
|
1646
|
-
Feature:
|
|
1601
|
+
Feature: Ca
|
|
1647
1602
|
}
|
|
1648
1603
|
};
|
|
1649
|
-
function
|
|
1604
|
+
function wi(t, e) {
|
|
1650
1605
|
if (!Array.isArray(e))
|
|
1651
1606
|
return !1;
|
|
1652
1607
|
const n = e.length;
|
|
@@ -1657,17 +1612,17 @@ function Pi(t, e) {
|
|
|
1657
1612
|
return !1;
|
|
1658
1613
|
return !0;
|
|
1659
1614
|
}
|
|
1660
|
-
function
|
|
1615
|
+
function Oa(t) {
|
|
1661
1616
|
const e = {};
|
|
1662
1617
|
return t.values.forEach((n, s) => e[s] = n.get()), e;
|
|
1663
1618
|
}
|
|
1664
|
-
function
|
|
1619
|
+
function Na(t) {
|
|
1665
1620
|
const e = {};
|
|
1666
1621
|
return t.values.forEach((n, s) => e[s] = n.getVelocity()), e;
|
|
1667
1622
|
}
|
|
1668
1623
|
function xe(t, e, n) {
|
|
1669
1624
|
const s = t.getProps();
|
|
1670
|
-
return
|
|
1625
|
+
return mn(s, e, n !== void 0 ? n : s.custom, Oa(t), Na(t));
|
|
1671
1626
|
}
|
|
1672
1627
|
let qt = E, q = E;
|
|
1673
1628
|
process.env.NODE_ENV !== "production" && (qt = (t, e) => {
|
|
@@ -1676,28 +1631,28 @@ process.env.NODE_ENV !== "production" && (qt = (t, e) => {
|
|
|
1676
1631
|
if (!t)
|
|
1677
1632
|
throw new Error(e);
|
|
1678
1633
|
});
|
|
1679
|
-
const at = (t) => t * 1e3, tt = (t) => t / 1e3,
|
|
1634
|
+
const at = (t) => t * 1e3, tt = (t) => t / 1e3, _a = {
|
|
1680
1635
|
current: !1
|
|
1681
1636
|
}, Ai = (t) => Array.isArray(t) && typeof t[0] == "number";
|
|
1682
1637
|
function Si(t) {
|
|
1683
1638
|
return !!(!t || typeof t == "string" && Vi[t] || Ai(t) || Array.isArray(t) && t.every(Si));
|
|
1684
1639
|
}
|
|
1685
|
-
const
|
|
1640
|
+
const Bt = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, Vi = {
|
|
1686
1641
|
linear: "linear",
|
|
1687
1642
|
ease: "ease",
|
|
1688
1643
|
easeIn: "ease-in",
|
|
1689
1644
|
easeOut: "ease-out",
|
|
1690
1645
|
easeInOut: "ease-in-out",
|
|
1691
|
-
circIn:
|
|
1692
|
-
circOut:
|
|
1693
|
-
backIn:
|
|
1694
|
-
backOut:
|
|
1646
|
+
circIn: Bt([0, 0.65, 0.55, 1]),
|
|
1647
|
+
circOut: Bt([0.55, 0, 1, 0.45]),
|
|
1648
|
+
backIn: Bt([0.31, 0.01, 0.66, -0.59]),
|
|
1649
|
+
backOut: Bt([0.33, 1.53, 0.69, 0.99])
|
|
1695
1650
|
};
|
|
1696
1651
|
function Ci(t) {
|
|
1697
1652
|
if (t)
|
|
1698
|
-
return Ai(t) ?
|
|
1653
|
+
return Ai(t) ? Bt(t) : Array.isArray(t) ? t.map(Ci) : Vi[t];
|
|
1699
1654
|
}
|
|
1700
|
-
function
|
|
1655
|
+
function Ua(t, e, n, { delay: s = 0, duration: i, repeat: r = 0, repeatType: o = "loop", ease: a, times: l } = {}) {
|
|
1701
1656
|
const c = { [e]: n };
|
|
1702
1657
|
l && (c.offset = l);
|
|
1703
1658
|
const u = Ci(a);
|
|
@@ -1710,46 +1665,46 @@ function el(t, e, n, { delay: s = 0, duration: i, repeat: r = 0, repeatType: o =
|
|
|
1710
1665
|
direction: o === "reverse" ? "alternate" : "normal"
|
|
1711
1666
|
});
|
|
1712
1667
|
}
|
|
1713
|
-
function
|
|
1668
|
+
function za(t, { repeat: e, repeatType: n = "loop" }) {
|
|
1714
1669
|
const s = e && n !== "loop" && e % 2 === 1 ? 0 : t.length - 1;
|
|
1715
1670
|
return t[s];
|
|
1716
1671
|
}
|
|
1717
|
-
const Mi = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t,
|
|
1718
|
-
function
|
|
1672
|
+
const Mi = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, Wa = 1e-7, Ga = 12;
|
|
1673
|
+
function $a(t, e, n, s, i) {
|
|
1719
1674
|
let r, o, a = 0;
|
|
1720
1675
|
do
|
|
1721
1676
|
o = e + (n - e) / 2, r = Mi(o, s, i) - t, r > 0 ? n = o : e = o;
|
|
1722
|
-
while (Math.abs(r) >
|
|
1677
|
+
while (Math.abs(r) > Wa && ++a < Ga);
|
|
1723
1678
|
return o;
|
|
1724
1679
|
}
|
|
1725
1680
|
function Kt(t, e, n, s) {
|
|
1726
1681
|
if (t === e && n === s)
|
|
1727
1682
|
return E;
|
|
1728
|
-
const i = (r) =>
|
|
1683
|
+
const i = (r) => $a(r, 0, 1, t, n);
|
|
1729
1684
|
return (r) => r === 0 || r === 1 ? r : Mi(i(r), e, s);
|
|
1730
1685
|
}
|
|
1731
|
-
const
|
|
1686
|
+
const Ha = Kt(0.42, 0, 1, 1), qa = Kt(0, 0, 0.58, 1), Di = Kt(0.42, 0, 0.58, 1), Ka = (t) => Array.isArray(t) && typeof t[0] != "number", Ri = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, ki = (t) => (e) => 1 - t(1 - e), pn = (t) => 1 - Math.sin(Math.acos(t)), Li = ki(pn), Ya = Ri(pn), Ei = Kt(0.33, 1.53, 0.69, 0.99), gn = ki(Ei), Xa = Ri(gn), Qa = (t) => (t *= 2) < 1 ? 0.5 * gn(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), $n = {
|
|
1732
1687
|
linear: E,
|
|
1733
|
-
easeIn:
|
|
1688
|
+
easeIn: Ha,
|
|
1734
1689
|
easeInOut: Di,
|
|
1735
|
-
easeOut:
|
|
1736
|
-
circIn:
|
|
1737
|
-
circInOut:
|
|
1690
|
+
easeOut: qa,
|
|
1691
|
+
circIn: pn,
|
|
1692
|
+
circInOut: Ya,
|
|
1738
1693
|
circOut: Li,
|
|
1739
1694
|
backIn: gn,
|
|
1740
|
-
backInOut:
|
|
1695
|
+
backInOut: Xa,
|
|
1741
1696
|
backOut: Ei,
|
|
1742
|
-
anticipate:
|
|
1697
|
+
anticipate: Qa
|
|
1743
1698
|
}, Hn = (t) => {
|
|
1744
1699
|
if (Array.isArray(t)) {
|
|
1745
1700
|
q(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
1746
1701
|
const [e, n, s, i] = t;
|
|
1747
1702
|
return Kt(e, n, s, i);
|
|
1748
1703
|
} else if (typeof t == "string")
|
|
1749
|
-
return q(
|
|
1704
|
+
return q($n[t] !== void 0, `Invalid easing type '${t}'`), $n[t];
|
|
1750
1705
|
return t;
|
|
1751
|
-
}, yn = (t, e) => (n) => !!(
|
|
1752
|
-
if (
|
|
1706
|
+
}, yn = (t, e) => (n) => !!($t(n) && Jr.test(n) && n.startsWith(t) || e && Object.prototype.hasOwnProperty.call(n, e)), Bi = (t, e, n) => (s) => {
|
|
1707
|
+
if (!$t(s))
|
|
1753
1708
|
return s;
|
|
1754
1709
|
const [i, r, o, a] = s.match(ye);
|
|
1755
1710
|
return {
|
|
@@ -1758,15 +1713,15 @@ const rl = Kt(0.42, 0, 1, 1), al = Kt(0, 0, 0.58, 1), Di = Kt(0.42, 0, 0.58, 1),
|
|
|
1758
1713
|
[n]: parseFloat(o),
|
|
1759
1714
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
1760
1715
|
};
|
|
1761
|
-
},
|
|
1716
|
+
}, Za = (t) => lt(0, 255, t), Ve = {
|
|
1762
1717
|
...yt,
|
|
1763
|
-
transform: (t) => Math.round(
|
|
1764
|
-
},
|
|
1718
|
+
transform: (t) => Math.round(Za(t))
|
|
1719
|
+
}, pt = {
|
|
1765
1720
|
test: yn("rgb", "red"),
|
|
1766
|
-
parse:
|
|
1767
|
-
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + Ve.transform(t) + ", " + Ve.transform(e) + ", " + Ve.transform(n) + ", " + It
|
|
1721
|
+
parse: Bi("red", "green", "blue"),
|
|
1722
|
+
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + Ve.transform(t) + ", " + Ve.transform(e) + ", " + Ve.transform(n) + ", " + jt(It.transform(s)) + ")"
|
|
1768
1723
|
};
|
|
1769
|
-
function
|
|
1724
|
+
function Ja(t) {
|
|
1770
1725
|
let e = "", n = "", s = "", i = "";
|
|
1771
1726
|
return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), s = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), s = t.substring(3, 4), i = t.substring(4, 5), e += e, n += n, s += s, i += i), {
|
|
1772
1727
|
red: parseInt(e, 16),
|
|
@@ -1775,23 +1730,23 @@ function dl(t) {
|
|
|
1775
1730
|
alpha: i ? parseInt(i, 16) / 255 : 1
|
|
1776
1731
|
};
|
|
1777
1732
|
}
|
|
1778
|
-
const
|
|
1733
|
+
const Ne = {
|
|
1779
1734
|
test: yn("#"),
|
|
1780
|
-
parse:
|
|
1781
|
-
transform:
|
|
1782
|
-
},
|
|
1735
|
+
parse: Ja,
|
|
1736
|
+
transform: pt.transform
|
|
1737
|
+
}, Pt = {
|
|
1783
1738
|
test: yn("hsl", "hue"),
|
|
1784
|
-
parse:
|
|
1785
|
-
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + K.transform(
|
|
1786
|
-
},
|
|
1787
|
-
test: (t) =>
|
|
1788
|
-
parse: (t) =>
|
|
1789
|
-
transform: (t) =>
|
|
1790
|
-
},
|
|
1739
|
+
parse: Bi("hue", "saturation", "lightness"),
|
|
1740
|
+
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + K.transform(jt(e)) + ", " + K.transform(jt(n)) + ", " + jt(It.transform(s)) + ")"
|
|
1741
|
+
}, N = {
|
|
1742
|
+
test: (t) => pt.test(t) || Ne.test(t) || Pt.test(t),
|
|
1743
|
+
parse: (t) => pt.test(t) ? pt.parse(t) : Pt.test(t) ? Pt.parse(t) : Ne.parse(t),
|
|
1744
|
+
transform: (t) => $t(t) ? t : t.hasOwnProperty("red") ? pt.transform(t) : Pt.transform(t)
|
|
1745
|
+
}, k = (t, e, n) => -n * t + n * e + t;
|
|
1791
1746
|
function Ce(t, e, n) {
|
|
1792
1747
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
|
|
1793
1748
|
}
|
|
1794
|
-
function
|
|
1749
|
+
function tl({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
1795
1750
|
t /= 360, e /= 100, n /= 100;
|
|
1796
1751
|
let i = 0, r = 0, o = 0;
|
|
1797
1752
|
if (!e)
|
|
@@ -1810,23 +1765,23 @@ function pl({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
|
1810
1765
|
const Me = (t, e, n) => {
|
|
1811
1766
|
const s = t * t;
|
|
1812
1767
|
return Math.sqrt(Math.max(0, n * (e * e - s) + s));
|
|
1813
|
-
},
|
|
1768
|
+
}, el = [Ne, pt, Pt], nl = (t) => el.find((e) => e.test(t));
|
|
1814
1769
|
function qn(t) {
|
|
1815
|
-
const e =
|
|
1770
|
+
const e = nl(t);
|
|
1816
1771
|
q(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`);
|
|
1817
1772
|
let n = e.parse(t);
|
|
1818
|
-
return e ===
|
|
1773
|
+
return e === Pt && (n = tl(n)), n;
|
|
1819
1774
|
}
|
|
1820
|
-
const
|
|
1775
|
+
const Ii = (t, e) => {
|
|
1821
1776
|
const n = qn(t), s = qn(e), i = { ...n };
|
|
1822
|
-
return (r) => (i.red = Me(n.red, s.red, r), i.green = Me(n.green, s.green, r), i.blue = Me(n.blue, s.blue, r), i.alpha =
|
|
1777
|
+
return (r) => (i.red = Me(n.red, s.red, r), i.green = Me(n.green, s.green, r), i.blue = Me(n.blue, s.blue, r), i.alpha = k(n.alpha, s.alpha, r), pt.transform(i));
|
|
1823
1778
|
};
|
|
1824
|
-
function
|
|
1779
|
+
function sl(t) {
|
|
1825
1780
|
var e, n;
|
|
1826
|
-
return isNaN(t) &&
|
|
1781
|
+
return isNaN(t) && $t(t) && (((e = t.match(ye)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match(li)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
|
|
1827
1782
|
}
|
|
1828
|
-
const
|
|
1829
|
-
regex:
|
|
1783
|
+
const ji = {
|
|
1784
|
+
regex: Qr,
|
|
1830
1785
|
countKey: "Vars",
|
|
1831
1786
|
token: "${v}",
|
|
1832
1787
|
parse: E
|
|
@@ -1834,7 +1789,7 @@ const Ii = {
|
|
|
1834
1789
|
regex: li,
|
|
1835
1790
|
countKey: "Colors",
|
|
1836
1791
|
token: "${c}",
|
|
1837
|
-
parse:
|
|
1792
|
+
parse: N.parse
|
|
1838
1793
|
}, Oi = {
|
|
1839
1794
|
regex: ye,
|
|
1840
1795
|
countKey: "Numbers",
|
|
@@ -1854,33 +1809,33 @@ function re(t) {
|
|
|
1854
1809
|
numColors: 0,
|
|
1855
1810
|
numNumbers: 0
|
|
1856
1811
|
};
|
|
1857
|
-
return n.value.includes("var(--") && De(n,
|
|
1812
|
+
return n.value.includes("var(--") && De(n, ji), De(n, Fi), De(n, Oi), n;
|
|
1858
1813
|
}
|
|
1859
|
-
function
|
|
1814
|
+
function Ni(t) {
|
|
1860
1815
|
return re(t).values;
|
|
1861
1816
|
}
|
|
1862
|
-
function
|
|
1817
|
+
function _i(t) {
|
|
1863
1818
|
const { values: e, numColors: n, numVars: s, tokenised: i } = re(t), r = e.length;
|
|
1864
1819
|
return (o) => {
|
|
1865
1820
|
let a = i;
|
|
1866
1821
|
for (let l = 0; l < r; l++)
|
|
1867
|
-
l < s ? a = a.replace(
|
|
1822
|
+
l < s ? a = a.replace(ji.token, o[l]) : l < s + n ? a = a.replace(Fi.token, N.transform(o[l])) : a = a.replace(Oi.token, jt(o[l]));
|
|
1868
1823
|
return a;
|
|
1869
1824
|
};
|
|
1870
1825
|
}
|
|
1871
|
-
const
|
|
1872
|
-
function
|
|
1873
|
-
const e =
|
|
1874
|
-
return
|
|
1826
|
+
const il = (t) => typeof t == "number" ? 0 : t;
|
|
1827
|
+
function ol(t) {
|
|
1828
|
+
const e = Ni(t);
|
|
1829
|
+
return _i(t)(e.map(il));
|
|
1875
1830
|
}
|
|
1876
1831
|
const ct = {
|
|
1877
|
-
test:
|
|
1878
|
-
parse:
|
|
1879
|
-
createTransformer:
|
|
1880
|
-
getAnimatableNone:
|
|
1832
|
+
test: sl,
|
|
1833
|
+
parse: Ni,
|
|
1834
|
+
createTransformer: _i,
|
|
1835
|
+
getAnimatableNone: ol
|
|
1881
1836
|
}, Ui = (t, e) => (n) => `${n > 0 ? e : t}`;
|
|
1882
1837
|
function zi(t, e) {
|
|
1883
|
-
return typeof t == "number" ? (n) =>
|
|
1838
|
+
return typeof t == "number" ? (n) => k(t, e, n) : N.test(t) ? Ii(t, e) : t.startsWith("var(") ? Ui(t, e) : Gi(t, e);
|
|
1884
1839
|
}
|
|
1885
1840
|
const Wi = (t, e) => {
|
|
1886
1841
|
const n = [...t], s = n.length, i = t.map((r, o) => zi(r, e[o]));
|
|
@@ -1889,7 +1844,7 @@ const Wi = (t, e) => {
|
|
|
1889
1844
|
n[o] = i[o](r);
|
|
1890
1845
|
return n;
|
|
1891
1846
|
};
|
|
1892
|
-
},
|
|
1847
|
+
}, rl = (t, e) => {
|
|
1893
1848
|
const n = { ...t, ...e }, s = {};
|
|
1894
1849
|
for (const i in n)
|
|
1895
1850
|
t[i] !== void 0 && e[i] !== void 0 && (s[i] = zi(t[i], e[i]));
|
|
@@ -1898,18 +1853,18 @@ const Wi = (t, e) => {
|
|
|
1898
1853
|
n[r] = s[r](i);
|
|
1899
1854
|
return n;
|
|
1900
1855
|
};
|
|
1901
|
-
},
|
|
1856
|
+
}, Gi = (t, e) => {
|
|
1902
1857
|
const n = ct.createTransformer(e), s = re(t), i = re(e);
|
|
1903
1858
|
return s.numVars === i.numVars && s.numColors === i.numColors && s.numNumbers >= i.numNumbers ? rt(Wi(s.values, i.values), n) : (qt(!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.`), Ui(t, e));
|
|
1904
1859
|
}, zt = (t, e, n) => {
|
|
1905
1860
|
const s = e - t;
|
|
1906
1861
|
return s === 0 ? 1 : (n - t) / s;
|
|
1907
|
-
}, Kn = (t, e) => (n) =>
|
|
1908
|
-
function
|
|
1909
|
-
return typeof t == "number" ? Kn : typeof t == "string" ?
|
|
1862
|
+
}, Kn = (t, e) => (n) => k(t, e, n);
|
|
1863
|
+
function al(t) {
|
|
1864
|
+
return typeof t == "number" ? Kn : typeof t == "string" ? N.test(t) ? Ii : Gi : Array.isArray(t) ? Wi : typeof t == "object" ? rl : Kn;
|
|
1910
1865
|
}
|
|
1911
|
-
function
|
|
1912
|
-
const s = [], i = n ||
|
|
1866
|
+
function ll(t, e, n) {
|
|
1867
|
+
const s = [], i = n || al(t[0]), r = t.length - 1;
|
|
1913
1868
|
for (let o = 0; o < r; o++) {
|
|
1914
1869
|
let a = i(t[o], t[o + 1]);
|
|
1915
1870
|
if (e) {
|
|
@@ -1920,49 +1875,49 @@ function Tl(t, e, n) {
|
|
|
1920
1875
|
}
|
|
1921
1876
|
return s;
|
|
1922
1877
|
}
|
|
1923
|
-
function
|
|
1878
|
+
function $i(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
1924
1879
|
const r = t.length;
|
|
1925
1880
|
if (q(r === e.length, "Both input and output ranges must be the same length"), r === 1)
|
|
1926
1881
|
return () => e[0];
|
|
1927
1882
|
t[0] > t[r - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
1928
|
-
const o =
|
|
1883
|
+
const o = ll(e, s, i), a = o.length, l = (c) => {
|
|
1929
1884
|
let u = 0;
|
|
1930
1885
|
if (a > 1)
|
|
1931
1886
|
for (; u < t.length - 2 && !(c < t[u + 1]); u++)
|
|
1932
1887
|
;
|
|
1933
|
-
const
|
|
1934
|
-
return o[u](
|
|
1888
|
+
const h = zt(t[u], t[u + 1], c);
|
|
1889
|
+
return o[u](h);
|
|
1935
1890
|
};
|
|
1936
1891
|
return n ? (c) => l(lt(t[0], t[r - 1], c)) : l;
|
|
1937
1892
|
}
|
|
1938
|
-
function
|
|
1893
|
+
function cl(t, e) {
|
|
1939
1894
|
const n = t[t.length - 1];
|
|
1940
1895
|
for (let s = 1; s <= e; s++) {
|
|
1941
1896
|
const i = zt(0, e, s);
|
|
1942
|
-
t.push(
|
|
1897
|
+
t.push(k(n, 1, i));
|
|
1943
1898
|
}
|
|
1944
1899
|
}
|
|
1945
|
-
function
|
|
1900
|
+
function ul(t) {
|
|
1946
1901
|
const e = [0];
|
|
1947
|
-
return
|
|
1902
|
+
return cl(e, t.length - 1), e;
|
|
1948
1903
|
}
|
|
1949
|
-
function
|
|
1904
|
+
function hl(t, e) {
|
|
1950
1905
|
return t.map((n) => n * e);
|
|
1951
1906
|
}
|
|
1952
|
-
function
|
|
1907
|
+
function fl(t, e) {
|
|
1953
1908
|
return t.map(() => e || Di).splice(0, t.length - 1);
|
|
1954
1909
|
}
|
|
1955
1910
|
function ae({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
|
|
1956
|
-
const i =
|
|
1911
|
+
const i = Ka(s) ? s.map(Hn) : Hn(s), r = {
|
|
1957
1912
|
done: !1,
|
|
1958
1913
|
value: e[0]
|
|
1959
|
-
}, o =
|
|
1914
|
+
}, o = hl(
|
|
1960
1915
|
// Only use the provided offsets if they're the correct length
|
|
1961
1916
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
1962
|
-
n && n.length === e.length ? n :
|
|
1917
|
+
n && n.length === e.length ? n : ul(e),
|
|
1963
1918
|
t
|
|
1964
|
-
), a =
|
|
1965
|
-
ease: Array.isArray(i) ? i :
|
|
1919
|
+
), a = $i(o, e, {
|
|
1920
|
+
ease: Array.isArray(i) ? i : fl(e, i)
|
|
1966
1921
|
});
|
|
1967
1922
|
return {
|
|
1968
1923
|
calculatedDuration: t,
|
|
@@ -1972,30 +1927,30 @@ function ae({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }
|
|
|
1972
1927
|
function Hi(t, e) {
|
|
1973
1928
|
return e ? t * (1e3 / e) : 0;
|
|
1974
1929
|
}
|
|
1975
|
-
const
|
|
1930
|
+
const dl = 5;
|
|
1976
1931
|
function qi(t, e, n) {
|
|
1977
|
-
const s = Math.max(e -
|
|
1932
|
+
const s = Math.max(e - dl, 0);
|
|
1978
1933
|
return Hi(n - t(s), e - s);
|
|
1979
1934
|
}
|
|
1980
|
-
const Re = 1e-3,
|
|
1981
|
-
function
|
|
1935
|
+
const Re = 1e-3, ml = 0.01, Yn = 10, pl = 0.05, gl = 1;
|
|
1936
|
+
function yl({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: s = 1 }) {
|
|
1982
1937
|
let i, r;
|
|
1983
1938
|
qt(t <= at(Yn), "Spring duration must be 10 seconds or less");
|
|
1984
1939
|
let o = 1 - e;
|
|
1985
|
-
o = lt(
|
|
1986
|
-
const u = c * o,
|
|
1987
|
-
return Re -
|
|
1940
|
+
o = lt(pl, gl, o), t = lt(ml, Yn, tt(t)), o < 1 ? (i = (c) => {
|
|
1941
|
+
const u = c * o, h = u * t, f = u - n, d = _e(c, o), m = Math.exp(-h);
|
|
1942
|
+
return Re - f / d * m;
|
|
1988
1943
|
}, r = (c) => {
|
|
1989
|
-
const
|
|
1990
|
-
return (-i(c) + Re > 0 ? -1 : 1) * ((
|
|
1944
|
+
const h = c * o * t, f = h * n + n, d = Math.pow(o, 2) * Math.pow(c, 2) * t, m = Math.exp(-h), p = _e(Math.pow(c, 2), o);
|
|
1945
|
+
return (-i(c) + Re > 0 ? -1 : 1) * ((f - d) * m) / p;
|
|
1991
1946
|
}) : (i = (c) => {
|
|
1992
|
-
const u = Math.exp(-c * t),
|
|
1993
|
-
return -Re + u *
|
|
1947
|
+
const u = Math.exp(-c * t), h = (c - n) * t + 1;
|
|
1948
|
+
return -Re + u * h;
|
|
1994
1949
|
}, r = (c) => {
|
|
1995
|
-
const u = Math.exp(-c * t),
|
|
1996
|
-
return u *
|
|
1950
|
+
const u = Math.exp(-c * t), h = (n - c) * (t * t);
|
|
1951
|
+
return u * h;
|
|
1997
1952
|
});
|
|
1998
|
-
const a = 5 / t, l =
|
|
1953
|
+
const a = 5 / t, l = xl(i, r, a);
|
|
1999
1954
|
if (t = at(t), isNaN(l))
|
|
2000
1955
|
return {
|
|
2001
1956
|
stiffness: 100,
|
|
@@ -2011,21 +1966,21 @@ function _l({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: s = 1
|
|
|
2011
1966
|
};
|
|
2012
1967
|
}
|
|
2013
1968
|
}
|
|
2014
|
-
const
|
|
2015
|
-
function
|
|
1969
|
+
const vl = 12;
|
|
1970
|
+
function xl(t, e, n) {
|
|
2016
1971
|
let s = n;
|
|
2017
|
-
for (let i = 1; i <
|
|
1972
|
+
for (let i = 1; i < vl; i++)
|
|
2018
1973
|
s = s - t(s) / e(s);
|
|
2019
1974
|
return s;
|
|
2020
1975
|
}
|
|
2021
|
-
function
|
|
1976
|
+
function _e(t, e) {
|
|
2022
1977
|
return t * Math.sqrt(1 - e * e);
|
|
2023
1978
|
}
|
|
2024
|
-
const
|
|
1979
|
+
const bl = ["duration", "bounce"], Tl = ["stiffness", "damping", "mass"];
|
|
2025
1980
|
function Xn(t, e) {
|
|
2026
1981
|
return e.some((n) => t[n] !== void 0);
|
|
2027
1982
|
}
|
|
2028
|
-
function
|
|
1983
|
+
function Pl(t) {
|
|
2029
1984
|
let e = {
|
|
2030
1985
|
velocity: 0,
|
|
2031
1986
|
stiffness: 100,
|
|
@@ -2034,8 +1989,8 @@ function Il(t) {
|
|
|
2034
1989
|
isResolvedFromDuration: !1,
|
|
2035
1990
|
...t
|
|
2036
1991
|
};
|
|
2037
|
-
if (!Xn(t,
|
|
2038
|
-
const n =
|
|
1992
|
+
if (!Xn(t, Tl) && Xn(t, bl)) {
|
|
1993
|
+
const n = yl(t);
|
|
2039
1994
|
e = {
|
|
2040
1995
|
...e,
|
|
2041
1996
|
...n,
|
|
@@ -2045,37 +2000,37 @@ function Il(t) {
|
|
|
2045
2000
|
return e;
|
|
2046
2001
|
}
|
|
2047
2002
|
function Ki({ keyframes: t, restDelta: e, restSpeed: n, ...s }) {
|
|
2048
|
-
const i = t[0], r = t[t.length - 1], o = { done: !1, value: i }, { stiffness: a, damping: l, mass: c, duration: u, velocity:
|
|
2003
|
+
const i = t[0], r = t[t.length - 1], o = { done: !1, value: i }, { stiffness: a, damping: l, mass: c, duration: u, velocity: h, isResolvedFromDuration: f } = Pl({
|
|
2049
2004
|
...s,
|
|
2050
2005
|
velocity: -tt(s.velocity || 0)
|
|
2051
|
-
}), d =
|
|
2006
|
+
}), d = h || 0, m = l / (2 * Math.sqrt(a * c)), p = r - i, v = tt(Math.sqrt(a / c)), b = Math.abs(p) < 5;
|
|
2052
2007
|
n || (n = b ? 0.01 : 2), e || (e = b ? 5e-3 : 0.5);
|
|
2053
2008
|
let y;
|
|
2054
|
-
if (
|
|
2055
|
-
const g =
|
|
2009
|
+
if (m < 1) {
|
|
2010
|
+
const g = _e(v, m);
|
|
2056
2011
|
y = (x) => {
|
|
2057
|
-
const
|
|
2058
|
-
return r -
|
|
2012
|
+
const w = Math.exp(-m * v * x);
|
|
2013
|
+
return r - w * ((d + m * v * p) / g * Math.sin(g * x) + p * Math.cos(g * x));
|
|
2059
2014
|
};
|
|
2060
|
-
} else if (
|
|
2061
|
-
y = (g) => r - Math.exp(-v * g) * (
|
|
2015
|
+
} else if (m === 1)
|
|
2016
|
+
y = (g) => r - Math.exp(-v * g) * (p + (d + v * p) * g);
|
|
2062
2017
|
else {
|
|
2063
|
-
const g = v * Math.sqrt(
|
|
2018
|
+
const g = v * Math.sqrt(m * m - 1);
|
|
2064
2019
|
y = (x) => {
|
|
2065
|
-
const
|
|
2066
|
-
return r -
|
|
2020
|
+
const w = Math.exp(-m * v * x), S = Math.min(g * x, 300);
|
|
2021
|
+
return r - w * ((d + m * v * p) * Math.sinh(S) + g * p * Math.cosh(S)) / g;
|
|
2067
2022
|
};
|
|
2068
2023
|
}
|
|
2069
2024
|
return {
|
|
2070
|
-
calculatedDuration:
|
|
2025
|
+
calculatedDuration: f && u || null,
|
|
2071
2026
|
next: (g) => {
|
|
2072
2027
|
const x = y(g);
|
|
2073
|
-
if (
|
|
2028
|
+
if (f)
|
|
2074
2029
|
o.done = g >= u;
|
|
2075
2030
|
else {
|
|
2076
|
-
let
|
|
2077
|
-
g !== 0 && (
|
|
2078
|
-
const S = Math.abs(
|
|
2031
|
+
let w = d;
|
|
2032
|
+
g !== 0 && (m < 1 ? w = qi(y, g, x) : w = 0);
|
|
2033
|
+
const S = Math.abs(w) <= n, C = Math.abs(r - x) <= e;
|
|
2079
2034
|
o.done = S && C;
|
|
2080
2035
|
}
|
|
2081
2036
|
return o.value = o.done ? r : x, o;
|
|
@@ -2083,22 +2038,22 @@ function Ki({ keyframes: t, restDelta: e, restSpeed: n, ...s }) {
|
|
|
2083
2038
|
};
|
|
2084
2039
|
}
|
|
2085
2040
|
function Qn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: l, restDelta: c = 0.5, restSpeed: u }) {
|
|
2086
|
-
const
|
|
2041
|
+
const h = t[0], f = {
|
|
2087
2042
|
done: !1,
|
|
2088
|
-
value:
|
|
2089
|
-
}, d = (A) => a !== void 0 && A < a || l !== void 0 && A > l,
|
|
2090
|
-
let
|
|
2091
|
-
const v =
|
|
2092
|
-
b !== v && (
|
|
2093
|
-
const y = (A) => -
|
|
2043
|
+
value: h
|
|
2044
|
+
}, d = (A) => a !== void 0 && A < a || l !== void 0 && A > l, m = (A) => a === void 0 ? l : l === void 0 || Math.abs(a - A) < Math.abs(l - A) ? a : l;
|
|
2045
|
+
let p = n * e;
|
|
2046
|
+
const v = h + p, b = o === void 0 ? v : o(v);
|
|
2047
|
+
b !== v && (p = b - h);
|
|
2048
|
+
const y = (A) => -p * Math.exp(-A / s), g = (A) => b + y(A), x = (A) => {
|
|
2094
2049
|
const L = y(A), Y = g(A);
|
|
2095
|
-
|
|
2050
|
+
f.done = Math.abs(L) <= c, f.value = f.done ? b : Y;
|
|
2096
2051
|
};
|
|
2097
|
-
let
|
|
2052
|
+
let w, S;
|
|
2098
2053
|
const C = (A) => {
|
|
2099
|
-
d(
|
|
2100
|
-
keyframes: [
|
|
2101
|
-
velocity: qi(g, A,
|
|
2054
|
+
d(f.value) && (w = A, S = Ki({
|
|
2055
|
+
keyframes: [f.value, m(f.value)],
|
|
2056
|
+
velocity: qi(g, A, f.value),
|
|
2102
2057
|
damping: i,
|
|
2103
2058
|
stiffness: r,
|
|
2104
2059
|
restDelta: c,
|
|
@@ -2109,11 +2064,11 @@ function Qn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
2109
2064
|
calculatedDuration: null,
|
|
2110
2065
|
next: (A) => {
|
|
2111
2066
|
let L = !1;
|
|
2112
|
-
return !S &&
|
|
2067
|
+
return !S && w === void 0 && (L = !0, x(A), C(A)), w !== void 0 && A > w ? S.next(A - w) : (!L && x(A), f);
|
|
2113
2068
|
}
|
|
2114
2069
|
};
|
|
2115
2070
|
}
|
|
2116
|
-
const
|
|
2071
|
+
const wl = (t) => {
|
|
2117
2072
|
const e = ({ timestamp: n }) => t(n);
|
|
2118
2073
|
return {
|
|
2119
2074
|
start: () => V.update(e, !0),
|
|
@@ -2122,7 +2077,7 @@ const Fl = (t) => {
|
|
|
2122
2077
|
* If we're processing this frame we can use the
|
|
2123
2078
|
* framelocked timestamp to keep things in sync.
|
|
2124
2079
|
*/
|
|
2125
|
-
now: () =>
|
|
2080
|
+
now: () => j.isProcessing ? j.timestamp : performance.now()
|
|
2126
2081
|
};
|
|
2127
2082
|
}, Zn = 2e4;
|
|
2128
2083
|
function Jn(t) {
|
|
@@ -2133,37 +2088,37 @@ function Jn(t) {
|
|
|
2133
2088
|
e += n, s = t.next(e);
|
|
2134
2089
|
return e >= Zn ? 1 / 0 : e;
|
|
2135
2090
|
}
|
|
2136
|
-
const
|
|
2091
|
+
const Al = {
|
|
2137
2092
|
decay: Qn,
|
|
2138
2093
|
inertia: Qn,
|
|
2139
2094
|
tween: ae,
|
|
2140
2095
|
keyframes: ae,
|
|
2141
2096
|
spring: Ki
|
|
2142
2097
|
};
|
|
2143
|
-
function le({ autoplay: t = !0, delay: e = 0, driver: n =
|
|
2144
|
-
let d = 1,
|
|
2098
|
+
function le({ autoplay: t = !0, delay: e = 0, driver: n = wl, keyframes: s, type: i = "keyframes", repeat: r = 0, repeatDelay: o = 0, repeatType: a = "loop", onPlay: l, onStop: c, onComplete: u, onUpdate: h, ...f }) {
|
|
2099
|
+
let d = 1, m = !1, p, v;
|
|
2145
2100
|
const b = () => {
|
|
2146
2101
|
v = new Promise((M) => {
|
|
2147
|
-
|
|
2102
|
+
p = M;
|
|
2148
2103
|
});
|
|
2149
2104
|
};
|
|
2150
2105
|
b();
|
|
2151
2106
|
let y;
|
|
2152
|
-
const g =
|
|
2107
|
+
const g = Al[i] || ae;
|
|
2153
2108
|
let x;
|
|
2154
|
-
g !== ae && typeof s[0] != "number" && (process.env.NODE_ENV !== "production" && q(s.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`), x =
|
|
2109
|
+
g !== ae && typeof s[0] != "number" && (process.env.NODE_ENV !== "production" && q(s.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`), x = $i([0, 100], s, {
|
|
2155
2110
|
clamp: !1
|
|
2156
2111
|
}), s = [0, 100]);
|
|
2157
|
-
const
|
|
2112
|
+
const w = g({ ...f, keyframes: s });
|
|
2158
2113
|
let S;
|
|
2159
2114
|
a === "mirror" && (S = g({
|
|
2160
|
-
...
|
|
2115
|
+
...f,
|
|
2161
2116
|
keyframes: [...s].reverse(),
|
|
2162
|
-
velocity: -(
|
|
2117
|
+
velocity: -(f.velocity || 0)
|
|
2163
2118
|
}));
|
|
2164
2119
|
let C = "idle", A = null, L = null, Y = null;
|
|
2165
|
-
|
|
2166
|
-
const { calculatedDuration: vt } =
|
|
2120
|
+
w.calculatedDuration === null && r && (w.calculatedDuration = Jn(w));
|
|
2121
|
+
const { calculatedDuration: vt } = w;
|
|
2167
2122
|
let H = 1 / 0, X = 1 / 0;
|
|
2168
2123
|
vt !== null && (H = vt + o, X = H * (r + 1) - o);
|
|
2169
2124
|
let O = 0;
|
|
@@ -2173,26 +2128,26 @@ function le({ autoplay: t = !0, delay: e = 0, driver: n = Fl, keyframes: s, type
|
|
|
2173
2128
|
d > 0 && (L = Math.min(L, M)), d < 0 && (L = Math.min(M - X / d, L)), A !== null ? O = A : O = Math.round(M - L) * d;
|
|
2174
2129
|
const Rt = O - e * (d >= 0 ? 1 : -1), Cn = d >= 0 ? Rt < 0 : Rt > X;
|
|
2175
2130
|
O = Math.max(Rt, 0), C === "finished" && A === null && (O = X);
|
|
2176
|
-
let Mn = O, Dn =
|
|
2131
|
+
let Mn = O, Dn = w;
|
|
2177
2132
|
if (r) {
|
|
2178
2133
|
const be = Math.min(O, X) / H;
|
|
2179
|
-
let Yt = Math.floor(be),
|
|
2180
|
-
!
|
|
2134
|
+
let Yt = Math.floor(be), ht = be % 1;
|
|
2135
|
+
!ht && be >= 1 && (ht = 1), ht === 1 && Yt--, Yt = Math.min(Yt, r + 1), !!(Yt % 2) && (a === "reverse" ? (ht = 1 - ht, o && (ht -= o / H)) : a === "mirror" && (Dn = S)), Mn = lt(0, 1, ht) * H;
|
|
2181
2136
|
}
|
|
2182
|
-
const
|
|
2183
|
-
x && (
|
|
2184
|
-
let { done: Rn } =
|
|
2137
|
+
const kt = Cn ? { done: !1, value: s[0] } : Dn.next(Mn);
|
|
2138
|
+
x && (kt.value = x(kt.value));
|
|
2139
|
+
let { done: Rn } = kt;
|
|
2185
2140
|
!Cn && vt !== null && (Rn = d >= 0 ? O >= X : O <= 0);
|
|
2186
|
-
const
|
|
2187
|
-
return
|
|
2188
|
-
},
|
|
2141
|
+
const wo = A === null && (C === "finished" || C === "running" && Rn);
|
|
2142
|
+
return h && h(kt.value), wo && Dt(), kt;
|
|
2143
|
+
}, I = () => {
|
|
2189
2144
|
y && y.stop(), y = void 0;
|
|
2190
2145
|
}, nt = () => {
|
|
2191
|
-
C = "idle",
|
|
2146
|
+
C = "idle", I(), p(), b(), L = Y = null;
|
|
2192
2147
|
}, Dt = () => {
|
|
2193
|
-
C = "finished", u && u(),
|
|
2148
|
+
C = "finished", u && u(), I(), p();
|
|
2194
2149
|
}, bt = () => {
|
|
2195
|
-
if (
|
|
2150
|
+
if (m)
|
|
2196
2151
|
return;
|
|
2197
2152
|
y || (y = n(xt));
|
|
2198
2153
|
const M = y.now();
|
|
@@ -2210,7 +2165,7 @@ function le({ autoplay: t = !0, delay: e = 0, driver: n = Fl, keyframes: s, type
|
|
|
2210
2165
|
M = at(M), O = M, A !== null || !y || d === 0 ? A = M : L = y.now() - M / d;
|
|
2211
2166
|
},
|
|
2212
2167
|
get duration() {
|
|
2213
|
-
const M =
|
|
2168
|
+
const M = w.calculatedDuration === null ? Jn(w) : w.calculatedDuration;
|
|
2214
2169
|
return tt(M);
|
|
2215
2170
|
},
|
|
2216
2171
|
get speed() {
|
|
@@ -2227,7 +2182,7 @@ function le({ autoplay: t = !0, delay: e = 0, driver: n = Fl, keyframes: s, type
|
|
|
2227
2182
|
C = "paused", A = O;
|
|
2228
2183
|
},
|
|
2229
2184
|
stop: () => {
|
|
2230
|
-
|
|
2185
|
+
m = !0, C !== "idle" && (C = "idle", c && c(), nt());
|
|
2231
2186
|
},
|
|
2232
2187
|
cancel: () => {
|
|
2233
2188
|
Y !== null && xt(Y), nt();
|
|
@@ -2239,19 +2194,19 @@ function le({ autoplay: t = !0, delay: e = 0, driver: n = Fl, keyframes: s, type
|
|
|
2239
2194
|
};
|
|
2240
2195
|
return Vn;
|
|
2241
2196
|
}
|
|
2242
|
-
function
|
|
2197
|
+
function Sl(t) {
|
|
2243
2198
|
let e;
|
|
2244
2199
|
return () => (e === void 0 && (e = t()), e);
|
|
2245
2200
|
}
|
|
2246
|
-
const
|
|
2201
|
+
const Vl = Sl(() => Object.hasOwnProperty.call(Element.prototype, "animate")), Cl = /* @__PURE__ */ new Set([
|
|
2247
2202
|
"opacity",
|
|
2248
2203
|
"clipPath",
|
|
2249
2204
|
"filter",
|
|
2250
2205
|
"transform",
|
|
2251
2206
|
"backgroundColor"
|
|
2252
|
-
]), Zt = 10,
|
|
2253
|
-
function
|
|
2254
|
-
if (!(
|
|
2207
|
+
]), Zt = 10, Ml = 2e4, Dl = (t, e) => e.type === "spring" || t === "backgroundColor" || !Si(e.ease);
|
|
2208
|
+
function Rl(t, e, { onUpdate: n, onComplete: s, ...i }) {
|
|
2209
|
+
if (!(Vl() && Cl.has(e) && !i.repeatDelay && i.repeatType !== "mirror" && i.damping !== 0 && i.type !== "inertia"))
|
|
2255
2210
|
return !1;
|
|
2256
2211
|
let o = !1, a, l, c = !1;
|
|
2257
2212
|
const u = () => {
|
|
@@ -2260,23 +2215,23 @@ function $l(t, e, { onUpdate: n, onComplete: s, ...i }) {
|
|
|
2260
2215
|
});
|
|
2261
2216
|
};
|
|
2262
2217
|
u();
|
|
2263
|
-
let { keyframes:
|
|
2264
|
-
if (
|
|
2218
|
+
let { keyframes: h, duration: f = 300, ease: d, times: m } = i;
|
|
2219
|
+
if (Dl(e, i)) {
|
|
2265
2220
|
const g = le({
|
|
2266
2221
|
...i,
|
|
2267
2222
|
repeat: 0,
|
|
2268
2223
|
delay: 0
|
|
2269
2224
|
});
|
|
2270
|
-
let x = { done: !1, value:
|
|
2271
|
-
const
|
|
2225
|
+
let x = { done: !1, value: h[0] };
|
|
2226
|
+
const w = [];
|
|
2272
2227
|
let S = 0;
|
|
2273
|
-
for (; !x.done && S <
|
|
2274
|
-
x = g.sample(S),
|
|
2275
|
-
|
|
2228
|
+
for (; !x.done && S < Ml; )
|
|
2229
|
+
x = g.sample(S), w.push(x.value), S += Zt;
|
|
2230
|
+
m = void 0, h = w, f = S - Zt, d = "linear";
|
|
2276
2231
|
}
|
|
2277
|
-
const
|
|
2232
|
+
const p = Ua(t.owner.current, e, h, {
|
|
2278
2233
|
...i,
|
|
2279
|
-
duration:
|
|
2234
|
+
duration: f,
|
|
2280
2235
|
/**
|
|
2281
2236
|
* This function is currently not called if ease is provided
|
|
2282
2237
|
* as a function so the cast is safe.
|
|
@@ -2286,44 +2241,44 @@ function $l(t, e, { onUpdate: n, onComplete: s, ...i }) {
|
|
|
2286
2241
|
* support the upcoming `linear()` easing function.
|
|
2287
2242
|
*/
|
|
2288
2243
|
ease: d,
|
|
2289
|
-
times:
|
|
2244
|
+
times: m
|
|
2290
2245
|
}), v = () => {
|
|
2291
|
-
c = !1,
|
|
2246
|
+
c = !1, p.cancel();
|
|
2292
2247
|
}, b = () => {
|
|
2293
2248
|
c = !0, V.update(v), a(), u();
|
|
2294
2249
|
};
|
|
2295
|
-
return
|
|
2296
|
-
c || (t.set(
|
|
2250
|
+
return p.onfinish = () => {
|
|
2251
|
+
c || (t.set(za(h, i)), s && s(), b());
|
|
2297
2252
|
}, {
|
|
2298
2253
|
then(g, x) {
|
|
2299
2254
|
return l.then(g, x);
|
|
2300
2255
|
},
|
|
2301
2256
|
attachTimeline(g) {
|
|
2302
|
-
return
|
|
2257
|
+
return p.timeline = g, p.onfinish = null, E;
|
|
2303
2258
|
},
|
|
2304
2259
|
get time() {
|
|
2305
|
-
return tt(
|
|
2260
|
+
return tt(p.currentTime || 0);
|
|
2306
2261
|
},
|
|
2307
2262
|
set time(g) {
|
|
2308
|
-
|
|
2263
|
+
p.currentTime = at(g);
|
|
2309
2264
|
},
|
|
2310
2265
|
get speed() {
|
|
2311
|
-
return
|
|
2266
|
+
return p.playbackRate;
|
|
2312
2267
|
},
|
|
2313
2268
|
set speed(g) {
|
|
2314
|
-
|
|
2269
|
+
p.playbackRate = g;
|
|
2315
2270
|
},
|
|
2316
2271
|
get duration() {
|
|
2317
|
-
return tt(
|
|
2272
|
+
return tt(f);
|
|
2318
2273
|
},
|
|
2319
2274
|
play: () => {
|
|
2320
|
-
o || (
|
|
2275
|
+
o || (p.play(), et(v));
|
|
2321
2276
|
},
|
|
2322
|
-
pause: () =>
|
|
2277
|
+
pause: () => p.pause(),
|
|
2323
2278
|
stop: () => {
|
|
2324
|
-
if (o = !0,
|
|
2279
|
+
if (o = !0, p.playState === "idle")
|
|
2325
2280
|
return;
|
|
2326
|
-
const { currentTime: g } =
|
|
2281
|
+
const { currentTime: g } = p;
|
|
2327
2282
|
if (g) {
|
|
2328
2283
|
const x = le({
|
|
2329
2284
|
...i,
|
|
@@ -2334,12 +2289,12 @@ function $l(t, e, { onUpdate: n, onComplete: s, ...i }) {
|
|
|
2334
2289
|
b();
|
|
2335
2290
|
},
|
|
2336
2291
|
complete: () => {
|
|
2337
|
-
c ||
|
|
2292
|
+
c || p.finish();
|
|
2338
2293
|
},
|
|
2339
2294
|
cancel: b
|
|
2340
2295
|
};
|
|
2341
2296
|
}
|
|
2342
|
-
function
|
|
2297
|
+
function kl({ keyframes: t, delay: e, onUpdate: n, onComplete: s }) {
|
|
2343
2298
|
const i = () => (n && n(t[t.length - 1]), s && s(), {
|
|
2344
2299
|
time: 0,
|
|
2345
2300
|
speed: 1,
|
|
@@ -2358,27 +2313,27 @@ function Gl({ keyframes: t, delay: e, onUpdate: n, onComplete: s }) {
|
|
|
2358
2313
|
onComplete: i
|
|
2359
2314
|
}) : i();
|
|
2360
2315
|
}
|
|
2361
|
-
const
|
|
2316
|
+
const Ll = {
|
|
2362
2317
|
type: "spring",
|
|
2363
2318
|
stiffness: 500,
|
|
2364
2319
|
damping: 25,
|
|
2365
2320
|
restSpeed: 10
|
|
2366
|
-
},
|
|
2321
|
+
}, El = (t) => ({
|
|
2367
2322
|
type: "spring",
|
|
2368
2323
|
stiffness: 550,
|
|
2369
2324
|
damping: t === 0 ? 2 * Math.sqrt(550) : 30,
|
|
2370
2325
|
restSpeed: 10
|
|
2371
|
-
}),
|
|
2326
|
+
}), Bl = {
|
|
2372
2327
|
type: "keyframes",
|
|
2373
2328
|
duration: 0.8
|
|
2374
|
-
},
|
|
2329
|
+
}, Il = {
|
|
2375
2330
|
type: "keyframes",
|
|
2376
2331
|
ease: [0.25, 0.1, 0.35, 1],
|
|
2377
2332
|
duration: 0.3
|
|
2378
|
-
},
|
|
2333
|
+
}, jl = (t, { keyframes: e }) => e.length > 2 ? Bl : gt.has(t) ? t.startsWith("scale") ? El(e[1]) : Ll : Il, Ue = (t, e) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
2379
2334
|
(ct.test(e) || e === "0") && // And it contains numbers and/or colors
|
|
2380
|
-
!e.startsWith("url(")),
|
|
2381
|
-
function
|
|
2335
|
+
!e.startsWith("url(")), Fl = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
2336
|
+
function Ol(t) {
|
|
2382
2337
|
const [e, n] = t.slice(0, -1).split("(");
|
|
2383
2338
|
if (e === "drop-shadow")
|
|
2384
2339
|
return t;
|
|
@@ -2386,44 +2341,44 @@ function Zl(t) {
|
|
|
2386
2341
|
if (!s)
|
|
2387
2342
|
return t;
|
|
2388
2343
|
const i = n.replace(s, "");
|
|
2389
|
-
let r =
|
|
2344
|
+
let r = Fl.has(e) ? 1 : 0;
|
|
2390
2345
|
return s !== n && (r *= 100), e + "(" + r + i + ")";
|
|
2391
2346
|
}
|
|
2392
|
-
const
|
|
2347
|
+
const Nl = /([a-z-]*)\(.*?\)/g, ze = {
|
|
2393
2348
|
...ct,
|
|
2394
2349
|
getAnimatableNone: (t) => {
|
|
2395
|
-
const e = t.match(
|
|
2396
|
-
return e ? e.map(
|
|
2350
|
+
const e = t.match(Nl);
|
|
2351
|
+
return e ? e.map(Ol).join(" ") : t;
|
|
2397
2352
|
}
|
|
2398
|
-
},
|
|
2353
|
+
}, _l = {
|
|
2399
2354
|
...ci,
|
|
2400
2355
|
// Color props
|
|
2401
|
-
color:
|
|
2402
|
-
backgroundColor:
|
|
2403
|
-
outlineColor:
|
|
2404
|
-
fill:
|
|
2405
|
-
stroke:
|
|
2356
|
+
color: N,
|
|
2357
|
+
backgroundColor: N,
|
|
2358
|
+
outlineColor: N,
|
|
2359
|
+
fill: N,
|
|
2360
|
+
stroke: N,
|
|
2406
2361
|
// Border props
|
|
2407
|
-
borderColor:
|
|
2408
|
-
borderTopColor:
|
|
2409
|
-
borderRightColor:
|
|
2410
|
-
borderBottomColor:
|
|
2411
|
-
borderLeftColor:
|
|
2362
|
+
borderColor: N,
|
|
2363
|
+
borderTopColor: N,
|
|
2364
|
+
borderRightColor: N,
|
|
2365
|
+
borderBottomColor: N,
|
|
2366
|
+
borderLeftColor: N,
|
|
2412
2367
|
filter: ze,
|
|
2413
2368
|
WebkitFilter: ze
|
|
2414
|
-
}, vn = (t) =>
|
|
2369
|
+
}, vn = (t) => _l[t];
|
|
2415
2370
|
function Yi(t, e) {
|
|
2416
2371
|
let n = vn(t);
|
|
2417
2372
|
return n !== ze && (n = ct), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
2418
2373
|
}
|
|
2419
2374
|
const Xi = (t) => /^0[^.\s]+$/.test(t);
|
|
2420
|
-
function
|
|
2375
|
+
function Ul(t) {
|
|
2421
2376
|
if (typeof t == "number")
|
|
2422
2377
|
return t === 0;
|
|
2423
2378
|
if (t !== null)
|
|
2424
2379
|
return t === "none" || t === "0" || Xi(t);
|
|
2425
2380
|
}
|
|
2426
|
-
function
|
|
2381
|
+
function zl(t, e, n, s) {
|
|
2427
2382
|
const i = Ue(e, n);
|
|
2428
2383
|
let r;
|
|
2429
2384
|
Array.isArray(n) ? r = [...n] : r = [null, n];
|
|
@@ -2431,7 +2386,7 @@ function nc(t, e, n, s) {
|
|
|
2431
2386
|
let a;
|
|
2432
2387
|
const l = [];
|
|
2433
2388
|
for (let c = 0; c < r.length; c++)
|
|
2434
|
-
r[c] === null && (r[c] = c === 0 ? o : r[c - 1]),
|
|
2389
|
+
r[c] === null && (r[c] = c === 0 ? o : r[c - 1]), Ul(r[c]) && l.push(c), typeof r[c] == "string" && r[c] !== "none" && r[c] !== "0" && (a = r[c]);
|
|
2435
2390
|
if (i && l.length && a)
|
|
2436
2391
|
for (let c = 0; c < l.length; c++) {
|
|
2437
2392
|
const u = l[c];
|
|
@@ -2439,38 +2394,38 @@ function nc(t, e, n, s) {
|
|
|
2439
2394
|
}
|
|
2440
2395
|
return r;
|
|
2441
2396
|
}
|
|
2442
|
-
function
|
|
2397
|
+
function Wl({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: l, elapsed: c, ...u }) {
|
|
2443
2398
|
return !!Object.keys(u).length;
|
|
2444
2399
|
}
|
|
2445
2400
|
function xn(t, e) {
|
|
2446
2401
|
return t[e] || t.default || t;
|
|
2447
2402
|
}
|
|
2448
|
-
const
|
|
2403
|
+
const Gl = {
|
|
2449
2404
|
skipAnimations: !1
|
|
2450
2405
|
}, bn = (t, e, n, s = {}) => (i) => {
|
|
2451
2406
|
const r = xn(s, t) || {}, o = r.delay || s.delay || 0;
|
|
2452
2407
|
let { elapsed: a = 0 } = s;
|
|
2453
2408
|
a = a - at(o);
|
|
2454
|
-
const l =
|
|
2455
|
-
qt(
|
|
2409
|
+
const l = zl(e, t, n, r), c = l[0], u = l[l.length - 1], h = Ue(t, c), f = Ue(t, u);
|
|
2410
|
+
qt(h === f, `You are trying to animate ${t} from "${c}" to "${u}". ${c} is not an animatable value - to enable this animation set ${c} to a value animatable to ${u} via the \`style\` property.`);
|
|
2456
2411
|
let d = {
|
|
2457
2412
|
keyframes: l,
|
|
2458
2413
|
velocity: e.getVelocity(),
|
|
2459
2414
|
ease: "easeOut",
|
|
2460
2415
|
...r,
|
|
2461
2416
|
delay: -a,
|
|
2462
|
-
onUpdate: (
|
|
2463
|
-
e.set(
|
|
2417
|
+
onUpdate: (m) => {
|
|
2418
|
+
e.set(m), r.onUpdate && r.onUpdate(m);
|
|
2464
2419
|
},
|
|
2465
2420
|
onComplete: () => {
|
|
2466
2421
|
i(), r.onComplete && r.onComplete();
|
|
2467
2422
|
}
|
|
2468
2423
|
};
|
|
2469
|
-
if (
|
|
2424
|
+
if (Wl(r) || (d = {
|
|
2470
2425
|
...d,
|
|
2471
|
-
...
|
|
2472
|
-
}), d.duration && (d.duration = at(d.duration)), d.repeatDelay && (d.repeatDelay = at(d.repeatDelay)), !
|
|
2473
|
-
return
|
|
2426
|
+
...jl(t, d)
|
|
2427
|
+
}), d.duration && (d.duration = at(d.duration)), d.repeatDelay && (d.repeatDelay = at(d.repeatDelay)), !h || !f || _a.current || r.type === !1 || Gl.skipAnimations)
|
|
2428
|
+
return kl(d);
|
|
2474
2429
|
if (
|
|
2475
2430
|
/**
|
|
2476
2431
|
* If this is a handoff animation, the optimised animation will be running via
|
|
@@ -2483,9 +2438,9 @@ const ic = {
|
|
|
2483
2438
|
*/
|
|
2484
2439
|
!e.owner.getProps().onUpdate
|
|
2485
2440
|
) {
|
|
2486
|
-
const
|
|
2487
|
-
if (
|
|
2488
|
-
return
|
|
2441
|
+
const m = Rl(e, t, d);
|
|
2442
|
+
if (m)
|
|
2443
|
+
return m;
|
|
2489
2444
|
}
|
|
2490
2445
|
return le(d);
|
|
2491
2446
|
};
|
|
@@ -2493,19 +2448,19 @@ function ce(t) {
|
|
|
2493
2448
|
return !!(U(t) && t.add);
|
|
2494
2449
|
}
|
|
2495
2450
|
const Qi = (t) => /^\-?\d*\.?\d+$/.test(t);
|
|
2496
|
-
function
|
|
2451
|
+
function Tn(t, e) {
|
|
2497
2452
|
t.indexOf(e) === -1 && t.push(e);
|
|
2498
2453
|
}
|
|
2499
|
-
function
|
|
2454
|
+
function Pn(t, e) {
|
|
2500
2455
|
const n = t.indexOf(e);
|
|
2501
2456
|
n > -1 && t.splice(n, 1);
|
|
2502
2457
|
}
|
|
2503
|
-
class
|
|
2458
|
+
class wn {
|
|
2504
2459
|
constructor() {
|
|
2505
2460
|
this.subscriptions = [];
|
|
2506
2461
|
}
|
|
2507
2462
|
add(e) {
|
|
2508
|
-
return
|
|
2463
|
+
return Tn(this.subscriptions, e), () => Pn(this.subscriptions, e);
|
|
2509
2464
|
}
|
|
2510
2465
|
notify(e, n, s) {
|
|
2511
2466
|
const i = this.subscriptions.length;
|
|
@@ -2529,8 +2484,8 @@ const ts = /* @__PURE__ */ new Set();
|
|
|
2529
2484
|
function An(t, e, n) {
|
|
2530
2485
|
t || ts.has(e) || (console.warn(e), n && console.warn(n), ts.add(e));
|
|
2531
2486
|
}
|
|
2532
|
-
const
|
|
2533
|
-
class
|
|
2487
|
+
const $l = (t) => !isNaN(parseFloat(t));
|
|
2488
|
+
class Hl {
|
|
2534
2489
|
/**
|
|
2535
2490
|
* @param init - The initiating value
|
|
2536
2491
|
* @param config - Optional configuration options
|
|
@@ -2542,11 +2497,11 @@ class rc {
|
|
|
2542
2497
|
constructor(e, n = {}) {
|
|
2543
2498
|
this.version = "10.18.0", this.timeDelta = 0, this.lastUpdated = 0, this.canTrackVelocity = !1, this.events = {}, this.updateAndNotify = (s, i = !0) => {
|
|
2544
2499
|
this.prev = this.current, this.current = s;
|
|
2545
|
-
const { delta: r, timestamp: o } =
|
|
2500
|
+
const { delta: r, timestamp: o } = j;
|
|
2546
2501
|
this.lastUpdated !== o && (this.timeDelta = r, this.lastUpdated = o, V.postRender(this.scheduleVelocityCheck)), this.prev !== this.current && this.events.change && this.events.change.notify(this.current), this.events.velocityChange && this.events.velocityChange.notify(this.getVelocity()), i && this.events.renderRequest && this.events.renderRequest.notify(this.current);
|
|
2547
2502
|
}, this.scheduleVelocityCheck = () => V.postRender(this.velocityCheck), this.velocityCheck = ({ timestamp: s }) => {
|
|
2548
2503
|
s !== this.lastUpdated && (this.prev = this.current, this.events.velocityChange && this.events.velocityChange.notify(this.getVelocity()));
|
|
2549
|
-
}, this.hasAnimated = !1, this.prev = this.current = e, this.canTrackVelocity =
|
|
2504
|
+
}, this.hasAnimated = !1, this.prev = this.current = e, this.canTrackVelocity = $l(this.current), this.owner = n.owner;
|
|
2550
2505
|
}
|
|
2551
2506
|
/**
|
|
2552
2507
|
* Adds a function that will be notified when the `MotionValue` is updated.
|
|
@@ -2592,7 +2547,7 @@ class rc {
|
|
|
2592
2547
|
return process.env.NODE_ENV !== "production" && An(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
2593
2548
|
}
|
|
2594
2549
|
on(e, n) {
|
|
2595
|
-
this.events[e] || (this.events[e] = new
|
|
2550
|
+
this.events[e] || (this.events[e] = new wn());
|
|
2596
2551
|
const s = this.events[e].add(n);
|
|
2597
2552
|
return e === "change" ? () => {
|
|
2598
2553
|
s(), V.read(() => {
|
|
@@ -2721,41 +2676,41 @@ class rc {
|
|
|
2721
2676
|
}
|
|
2722
2677
|
}
|
|
2723
2678
|
function Vt(t, e) {
|
|
2724
|
-
return new
|
|
2679
|
+
return new Hl(t, e);
|
|
2725
2680
|
}
|
|
2726
|
-
const Zi = (t) => (e) => e.test(t),
|
|
2681
|
+
const Zi = (t) => (e) => e.test(t), ql = {
|
|
2727
2682
|
test: (t) => t === "auto",
|
|
2728
2683
|
parse: (t) => t
|
|
2729
|
-
}, Ji = [yt,
|
|
2730
|
-
function
|
|
2684
|
+
}, Ji = [yt, T, K, st, ea, ta, ql], Lt = (t) => Ji.find(Zi(t)), Kl = [...Ji, N, ct], Yl = (t) => Kl.find(Zi(t));
|
|
2685
|
+
function Xl(t, e, n) {
|
|
2731
2686
|
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, Vt(n));
|
|
2732
2687
|
}
|
|
2733
|
-
function
|
|
2688
|
+
function Ql(t, e) {
|
|
2734
2689
|
const n = xe(t, e);
|
|
2735
2690
|
let { transitionEnd: s = {}, transition: i = {}, ...r } = n ? t.makeTargetAnimatable(n, !1) : {};
|
|
2736
2691
|
r = { ...r, ...s };
|
|
2737
2692
|
for (const o in r) {
|
|
2738
|
-
const a =
|
|
2739
|
-
|
|
2693
|
+
const a = ga(r[o]);
|
|
2694
|
+
Xl(t, o, a);
|
|
2740
2695
|
}
|
|
2741
2696
|
}
|
|
2742
|
-
function
|
|
2697
|
+
function Zl(t, e, n) {
|
|
2743
2698
|
var s, i;
|
|
2744
2699
|
const r = Object.keys(e).filter((a) => !t.hasValue(a)), o = r.length;
|
|
2745
2700
|
if (o)
|
|
2746
2701
|
for (let a = 0; a < o; a++) {
|
|
2747
2702
|
const l = r[a], c = e[l];
|
|
2748
2703
|
let u = null;
|
|
2749
|
-
Array.isArray(c) && (u = c[0]), u === null && (u = (i = (s = n[l]) !== null && s !== void 0 ? s : t.readValue(l)) !== null && i !== void 0 ? i : e[l]), u != null && (typeof u == "string" && (Qi(u) || Xi(u)) ? u = parseFloat(u) : !
|
|
2704
|
+
Array.isArray(c) && (u = c[0]), u === null && (u = (i = (s = n[l]) !== null && s !== void 0 ? s : t.readValue(l)) !== null && i !== void 0 ? i : e[l]), u != null && (typeof u == "string" && (Qi(u) || Xi(u)) ? u = parseFloat(u) : !Yl(u) && ct.test(c) && (u = Yi(l, c)), t.addValue(l, Vt(u, { owner: t })), n[l] === void 0 && (n[l] = u), u !== null && t.setBaseTarget(l, u));
|
|
2750
2705
|
}
|
|
2751
2706
|
}
|
|
2752
|
-
function
|
|
2707
|
+
function Jl(t, e) {
|
|
2753
2708
|
return e ? (e[t] || e.default || e).from : void 0;
|
|
2754
2709
|
}
|
|
2755
|
-
function
|
|
2710
|
+
function tc(t, e, n) {
|
|
2756
2711
|
const s = {};
|
|
2757
2712
|
for (const i in t) {
|
|
2758
|
-
const r =
|
|
2713
|
+
const r = Jl(i, e);
|
|
2759
2714
|
if (r !== void 0)
|
|
2760
2715
|
s[i] = r;
|
|
2761
2716
|
else {
|
|
@@ -2765,11 +2720,11 @@ function pc(t, e, n) {
|
|
|
2765
2720
|
}
|
|
2766
2721
|
return s;
|
|
2767
2722
|
}
|
|
2768
|
-
function
|
|
2723
|
+
function ec({ protectedKeys: t, needsAnimating: e }, n) {
|
|
2769
2724
|
const s = t.hasOwnProperty(n) && e[n] !== !0;
|
|
2770
2725
|
return e[n] = !1, s;
|
|
2771
2726
|
}
|
|
2772
|
-
function
|
|
2727
|
+
function nc(t, e) {
|
|
2773
2728
|
const n = t.get();
|
|
2774
2729
|
if (Array.isArray(e)) {
|
|
2775
2730
|
for (let s = 0; s < e.length; s++)
|
|
@@ -2783,31 +2738,31 @@ function to(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
2783
2738
|
const l = t.getValue("willChange");
|
|
2784
2739
|
s && (r = s);
|
|
2785
2740
|
const c = [], u = i && t.animationState && t.animationState.getState()[i];
|
|
2786
|
-
for (const
|
|
2787
|
-
const
|
|
2788
|
-
if (!
|
|
2741
|
+
for (const h in a) {
|
|
2742
|
+
const f = t.getValue(h), d = a[h];
|
|
2743
|
+
if (!f || d === void 0 || u && ec(u, h))
|
|
2789
2744
|
continue;
|
|
2790
|
-
const
|
|
2745
|
+
const m = {
|
|
2791
2746
|
delay: n,
|
|
2792
2747
|
elapsed: 0,
|
|
2793
|
-
...xn(r || {},
|
|
2748
|
+
...xn(r || {}, h)
|
|
2794
2749
|
};
|
|
2795
2750
|
if (window.HandoffAppearAnimations) {
|
|
2796
2751
|
const b = t.getProps()[ei];
|
|
2797
2752
|
if (b) {
|
|
2798
|
-
const y = window.HandoffAppearAnimations(b,
|
|
2799
|
-
y !== null && (
|
|
2753
|
+
const y = window.HandoffAppearAnimations(b, h, f, V);
|
|
2754
|
+
y !== null && (m.elapsed = y, m.isHandoff = !0);
|
|
2800
2755
|
}
|
|
2801
2756
|
}
|
|
2802
|
-
let
|
|
2803
|
-
if (
|
|
2757
|
+
let p = !m.isHandoff && !nc(f, d);
|
|
2758
|
+
if (m.type === "spring" && (f.getVelocity() || m.velocity) && (p = !1), f.animation && (p = !1), p)
|
|
2804
2759
|
continue;
|
|
2805
|
-
|
|
2806
|
-
const v =
|
|
2807
|
-
ce(l) && (l.add(
|
|
2760
|
+
f.start(bn(h, f, d, t.shouldReduceMotion && gt.has(h) ? { type: !1 } : m));
|
|
2761
|
+
const v = f.animation;
|
|
2762
|
+
ce(l) && (l.add(h), v.then(() => l.remove(h))), c.push(v);
|
|
2808
2763
|
}
|
|
2809
2764
|
return o && Promise.all(c).then(() => {
|
|
2810
|
-
o &&
|
|
2765
|
+
o && Ql(t, o);
|
|
2811
2766
|
}), c;
|
|
2812
2767
|
}
|
|
2813
2768
|
function We(t, e, n = {}) {
|
|
@@ -2815,8 +2770,8 @@ function We(t, e, n = {}) {
|
|
|
2815
2770
|
let { transition: i = t.getDefaultTransition() || {} } = s || {};
|
|
2816
2771
|
n.transitionOverride && (i = n.transitionOverride);
|
|
2817
2772
|
const r = s ? () => Promise.all(to(t, s, n)) : () => Promise.resolve(), o = t.variantChildren && t.variantChildren.size ? (l = 0) => {
|
|
2818
|
-
const { delayChildren: c = 0, staggerChildren: u, staggerDirection:
|
|
2819
|
-
return
|
|
2773
|
+
const { delayChildren: c = 0, staggerChildren: u, staggerDirection: h } = i;
|
|
2774
|
+
return sc(t, e, c + l, u, h, n);
|
|
2820
2775
|
} : () => Promise.resolve(), { when: a } = i;
|
|
2821
2776
|
if (a) {
|
|
2822
2777
|
const [l, c] = a === "beforeChildren" ? [r, o] : [o, r];
|
|
@@ -2824,19 +2779,19 @@ function We(t, e, n = {}) {
|
|
|
2824
2779
|
} else
|
|
2825
2780
|
return Promise.all([r(), o(n.delay)]);
|
|
2826
2781
|
}
|
|
2827
|
-
function
|
|
2782
|
+
function sc(t, e, n = 0, s = 0, i = 1, r) {
|
|
2828
2783
|
const o = [], a = (t.variantChildren.size - 1) * s, l = i === 1 ? (c = 0) => c * s : (c = 0) => a - c * s;
|
|
2829
|
-
return Array.from(t.variantChildren).sort(
|
|
2784
|
+
return Array.from(t.variantChildren).sort(ic).forEach((c, u) => {
|
|
2830
2785
|
c.notify("AnimationStart", e), o.push(We(c, e, {
|
|
2831
2786
|
...r,
|
|
2832
2787
|
delay: n + l(u)
|
|
2833
2788
|
}).then(() => c.notify("AnimationComplete", e)));
|
|
2834
2789
|
}), Promise.all(o);
|
|
2835
2790
|
}
|
|
2836
|
-
function
|
|
2791
|
+
function ic(t, e) {
|
|
2837
2792
|
return t.sortNodePosition(e);
|
|
2838
2793
|
}
|
|
2839
|
-
function
|
|
2794
|
+
function oc(t, e, n = {}) {
|
|
2840
2795
|
t.notify("AnimationStart", e);
|
|
2841
2796
|
let s;
|
|
2842
2797
|
if (Array.isArray(e)) {
|
|
@@ -2850,19 +2805,19 @@ function xc(t, e, n = {}) {
|
|
|
2850
2805
|
}
|
|
2851
2806
|
return s.then(() => t.notify("AnimationComplete", e));
|
|
2852
2807
|
}
|
|
2853
|
-
const
|
|
2854
|
-
function
|
|
2855
|
-
return (e) => Promise.all(e.map(({ animation: n, options: s }) =>
|
|
2808
|
+
const rc = [...rn].reverse(), ac = rn.length;
|
|
2809
|
+
function lc(t) {
|
|
2810
|
+
return (e) => Promise.all(e.map(({ animation: n, options: s }) => oc(t, n, s)));
|
|
2856
2811
|
}
|
|
2857
|
-
function
|
|
2858
|
-
let e =
|
|
2859
|
-
const n =
|
|
2812
|
+
function cc(t) {
|
|
2813
|
+
let e = lc(t);
|
|
2814
|
+
const n = hc();
|
|
2860
2815
|
let s = !0;
|
|
2861
2816
|
const i = (l, c) => {
|
|
2862
2817
|
const u = xe(t, c);
|
|
2863
2818
|
if (u) {
|
|
2864
|
-
const { transition:
|
|
2865
|
-
l = { ...l, ...d, ...
|
|
2819
|
+
const { transition: h, transitionEnd: f, ...d } = u;
|
|
2820
|
+
l = { ...l, ...d, ...f };
|
|
2866
2821
|
}
|
|
2867
2822
|
return l;
|
|
2868
2823
|
};
|
|
@@ -2870,38 +2825,38 @@ function Pc(t) {
|
|
|
2870
2825
|
e = l(t);
|
|
2871
2826
|
}
|
|
2872
2827
|
function o(l, c) {
|
|
2873
|
-
const u = t.getProps(),
|
|
2874
|
-
let
|
|
2875
|
-
for (let b = 0; b <
|
|
2876
|
-
const y =
|
|
2877
|
-
S === !1 && (
|
|
2878
|
-
let C = x ===
|
|
2879
|
-
if (C && s && t.manuallyAnimateOnMount && (C = !1), g.protectedKeys = { ...
|
|
2828
|
+
const u = t.getProps(), h = t.getVariantContext(!0) || {}, f = [], d = /* @__PURE__ */ new Set();
|
|
2829
|
+
let m = {}, p = 1 / 0;
|
|
2830
|
+
for (let b = 0; b < ac; b++) {
|
|
2831
|
+
const y = rc[b], g = n[y], x = u[y] !== void 0 ? u[y] : h[y], w = _t(x), S = y === c ? g.isActive : null;
|
|
2832
|
+
S === !1 && (p = b);
|
|
2833
|
+
let C = x === h[y] && x !== u[y] && w;
|
|
2834
|
+
if (C && s && t.manuallyAnimateOnMount && (C = !1), g.protectedKeys = { ...m }, // If it isn't active and hasn't *just* been set as inactive
|
|
2880
2835
|
!g.isActive && S === null || // If we didn't and don't have any defined prop for this animation type
|
|
2881
2836
|
!x && !g.prevProp || // Or if the prop doesn't define an animation
|
|
2882
|
-
|
|
2837
|
+
pe(x) || typeof x == "boolean")
|
|
2883
2838
|
continue;
|
|
2884
|
-
let L =
|
|
2885
|
-
y === c && g.isActive && !C &&
|
|
2886
|
-
b >
|
|
2839
|
+
let L = uc(g.prevProp, x) || // If we're making this variant active, we want to always make it active
|
|
2840
|
+
y === c && g.isActive && !C && w || // If we removed a higher-priority variant (i is in reverse order)
|
|
2841
|
+
b > p && w, Y = !1;
|
|
2887
2842
|
const vt = Array.isArray(x) ? x : [x];
|
|
2888
2843
|
let H = vt.reduce(i, {});
|
|
2889
2844
|
S === !1 && (H = {});
|
|
2890
2845
|
const { prevResolvedValues: X = {} } = g, O = {
|
|
2891
2846
|
...X,
|
|
2892
2847
|
...H
|
|
2893
|
-
}, xt = (
|
|
2894
|
-
L = !0, d.has(
|
|
2848
|
+
}, xt = (I) => {
|
|
2849
|
+
L = !0, d.has(I) && (Y = !0, d.delete(I)), g.needsAnimating[I] = !0;
|
|
2895
2850
|
};
|
|
2896
|
-
for (const
|
|
2897
|
-
const nt = H[
|
|
2898
|
-
if (
|
|
2851
|
+
for (const I in O) {
|
|
2852
|
+
const nt = H[I], Dt = X[I];
|
|
2853
|
+
if (m.hasOwnProperty(I))
|
|
2899
2854
|
continue;
|
|
2900
2855
|
let bt = !1;
|
|
2901
|
-
oe(nt) && oe(Dt) ? bt = !
|
|
2856
|
+
oe(nt) && oe(Dt) ? bt = !wi(nt, Dt) : bt = nt !== Dt, bt ? nt !== void 0 ? xt(I) : d.add(I) : nt !== void 0 && d.has(I) ? xt(I) : g.protectedKeys[I] = !0;
|
|
2902
2857
|
}
|
|
2903
|
-
g.prevProp = x, g.prevResolvedValues = H, g.isActive && (
|
|
2904
|
-
animation:
|
|
2858
|
+
g.prevProp = x, g.prevResolvedValues = H, g.isActive && (m = { ...m, ...H }), s && t.blockInitialAnimation && (L = !1), L && (!C || Y) && f.push(...vt.map((I) => ({
|
|
2859
|
+
animation: I,
|
|
2905
2860
|
options: { type: y, ...l }
|
|
2906
2861
|
})));
|
|
2907
2862
|
}
|
|
@@ -2910,23 +2865,23 @@ function Pc(t) {
|
|
|
2910
2865
|
d.forEach((y) => {
|
|
2911
2866
|
const g = t.getBaseTarget(y);
|
|
2912
2867
|
g !== void 0 && (b[y] = g);
|
|
2913
|
-
}),
|
|
2868
|
+
}), f.push({ animation: b });
|
|
2914
2869
|
}
|
|
2915
|
-
let v = !!
|
|
2916
|
-
return s && (u.initial === !1 || u.initial === u.animate) && !t.manuallyAnimateOnMount && (v = !1), s = !1, v ? e(
|
|
2870
|
+
let v = !!f.length;
|
|
2871
|
+
return s && (u.initial === !1 || u.initial === u.animate) && !t.manuallyAnimateOnMount && (v = !1), s = !1, v ? e(f) : Promise.resolve();
|
|
2917
2872
|
}
|
|
2918
2873
|
function a(l, c, u) {
|
|
2919
|
-
var
|
|
2874
|
+
var h;
|
|
2920
2875
|
if (n[l].isActive === c)
|
|
2921
2876
|
return Promise.resolve();
|
|
2922
|
-
(
|
|
2923
|
-
var
|
|
2924
|
-
return (
|
|
2877
|
+
(h = t.variantChildren) === null || h === void 0 || h.forEach((d) => {
|
|
2878
|
+
var m;
|
|
2879
|
+
return (m = d.animationState) === null || m === void 0 ? void 0 : m.setActive(l, c);
|
|
2925
2880
|
}), n[l].isActive = c;
|
|
2926
|
-
const
|
|
2881
|
+
const f = o(u, l);
|
|
2927
2882
|
for (const d in n)
|
|
2928
2883
|
n[d].protectedKeys = {};
|
|
2929
|
-
return
|
|
2884
|
+
return f;
|
|
2930
2885
|
}
|
|
2931
2886
|
return {
|
|
2932
2887
|
animateChanges: o,
|
|
@@ -2935,10 +2890,10 @@ function Pc(t) {
|
|
|
2935
2890
|
getState: () => n
|
|
2936
2891
|
};
|
|
2937
2892
|
}
|
|
2938
|
-
function
|
|
2939
|
-
return typeof e == "string" ? e !== t : Array.isArray(e) ? !
|
|
2893
|
+
function uc(t, e) {
|
|
2894
|
+
return typeof e == "string" ? e !== t : Array.isArray(e) ? !wi(e, t) : !1;
|
|
2940
2895
|
}
|
|
2941
|
-
function
|
|
2896
|
+
function ft(t = !1) {
|
|
2942
2897
|
return {
|
|
2943
2898
|
isActive: t,
|
|
2944
2899
|
protectedKeys: {},
|
|
@@ -2946,29 +2901,29 @@ function ht(t = !1) {
|
|
|
2946
2901
|
prevResolvedValues: {}
|
|
2947
2902
|
};
|
|
2948
2903
|
}
|
|
2949
|
-
function
|
|
2904
|
+
function hc() {
|
|
2950
2905
|
return {
|
|
2951
|
-
animate:
|
|
2952
|
-
whileInView:
|
|
2953
|
-
whileHover:
|
|
2954
|
-
whileTap:
|
|
2955
|
-
whileDrag:
|
|
2956
|
-
whileFocus:
|
|
2957
|
-
exit:
|
|
2906
|
+
animate: ft(!0),
|
|
2907
|
+
whileInView: ft(),
|
|
2908
|
+
whileHover: ft(),
|
|
2909
|
+
whileTap: ft(),
|
|
2910
|
+
whileDrag: ft(),
|
|
2911
|
+
whileFocus: ft(),
|
|
2912
|
+
exit: ft()
|
|
2958
2913
|
};
|
|
2959
2914
|
}
|
|
2960
|
-
class
|
|
2915
|
+
class fc extends ut {
|
|
2961
2916
|
/**
|
|
2962
2917
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
2963
2918
|
* to the underlying animation library. We only want to load that if we load this,
|
|
2964
2919
|
* so people can optionally code split it out using the `m` component.
|
|
2965
2920
|
*/
|
|
2966
2921
|
constructor(e) {
|
|
2967
|
-
super(e), e.animationState || (e.animationState =
|
|
2922
|
+
super(e), e.animationState || (e.animationState = cc(e));
|
|
2968
2923
|
}
|
|
2969
2924
|
updateAnimationControlsSubscription() {
|
|
2970
2925
|
const { animate: e } = this.node.getProps();
|
|
2971
|
-
this.unmount(),
|
|
2926
|
+
this.unmount(), pe(e) && (this.unmount = e.subscribe(this.node));
|
|
2972
2927
|
}
|
|
2973
2928
|
/**
|
|
2974
2929
|
* Subscribe any provided AnimationControls to the component's VisualElement
|
|
@@ -2983,10 +2938,10 @@ class Vc extends ut {
|
|
|
2983
2938
|
unmount() {
|
|
2984
2939
|
}
|
|
2985
2940
|
}
|
|
2986
|
-
let
|
|
2987
|
-
class
|
|
2941
|
+
let dc = 0;
|
|
2942
|
+
class mc extends ut {
|
|
2988
2943
|
constructor() {
|
|
2989
|
-
super(...arguments), this.id =
|
|
2944
|
+
super(...arguments), this.id = dc++;
|
|
2990
2945
|
}
|
|
2991
2946
|
update() {
|
|
2992
2947
|
if (!this.node.presenceContext)
|
|
@@ -3004,15 +2959,15 @@ class Mc extends ut {
|
|
|
3004
2959
|
unmount() {
|
|
3005
2960
|
}
|
|
3006
2961
|
}
|
|
3007
|
-
const
|
|
2962
|
+
const pc = {
|
|
3008
2963
|
animation: {
|
|
3009
|
-
Feature:
|
|
2964
|
+
Feature: fc
|
|
3010
2965
|
},
|
|
3011
2966
|
exit: {
|
|
3012
|
-
Feature:
|
|
2967
|
+
Feature: mc
|
|
3013
2968
|
}
|
|
3014
2969
|
}, es = (t, e) => Math.abs(t - e);
|
|
3015
|
-
function
|
|
2970
|
+
function gc(t, e) {
|
|
3016
2971
|
const n = es(t.x, e.x), s = es(t.y, e.y);
|
|
3017
2972
|
return Math.sqrt(n ** 2 + s ** 2);
|
|
3018
2973
|
}
|
|
@@ -3021,26 +2976,26 @@ class eo {
|
|
|
3021
2976
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
|
|
3022
2977
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3023
2978
|
return;
|
|
3024
|
-
const
|
|
3025
|
-
if (!
|
|
2979
|
+
const h = Le(this.lastMoveEventInfo, this.history), f = this.startEvent !== null, d = gc(h.offset, { x: 0, y: 0 }) >= 3;
|
|
2980
|
+
if (!f && !d)
|
|
3026
2981
|
return;
|
|
3027
|
-
const { point:
|
|
3028
|
-
this.history.push({ ...
|
|
2982
|
+
const { point: m } = h, { timestamp: p } = j;
|
|
2983
|
+
this.history.push({ ...m, timestamp: p });
|
|
3029
2984
|
const { onStart: v, onMove: b } = this.handlers;
|
|
3030
|
-
|
|
3031
|
-
}, this.handlePointerMove = (
|
|
3032
|
-
this.lastMoveEvent =
|
|
3033
|
-
}, this.handlePointerUp = (
|
|
2985
|
+
f || (v && v(this.lastMoveEvent, h), this.startEvent = this.lastMoveEvent), b && b(this.lastMoveEvent, h);
|
|
2986
|
+
}, this.handlePointerMove = (h, f) => {
|
|
2987
|
+
this.lastMoveEvent = h, this.lastMoveEventInfo = ke(f, this.transformPagePoint), V.update(this.updatePoint, !0);
|
|
2988
|
+
}, this.handlePointerUp = (h, f) => {
|
|
3034
2989
|
this.end();
|
|
3035
|
-
const { onEnd: d, onSessionEnd:
|
|
3036
|
-
if (this.dragSnapToOrigin &&
|
|
2990
|
+
const { onEnd: d, onSessionEnd: m, resumeAnimation: p } = this.handlers;
|
|
2991
|
+
if (this.dragSnapToOrigin && p && p(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3037
2992
|
return;
|
|
3038
|
-
const v = Le(
|
|
3039
|
-
this.startEvent && d && d(
|
|
2993
|
+
const v = Le(h.type === "pointercancel" ? this.lastMoveEventInfo : ke(f, this.transformPagePoint), this.history);
|
|
2994
|
+
this.startEvent && d && d(h, v), m && m(h, v);
|
|
3040
2995
|
}, !vi(e))
|
|
3041
2996
|
return;
|
|
3042
2997
|
this.dragSnapToOrigin = r, this.handlers = n, this.transformPagePoint = s, this.contextWindow = i || window;
|
|
3043
|
-
const o = ve(e), a =
|
|
2998
|
+
const o = ve(e), a = ke(o, this.transformPagePoint), { point: l } = a, { timestamp: c } = j;
|
|
3044
2999
|
this.history = [{ ...l, timestamp: c }];
|
|
3045
3000
|
const { onSessionStart: u } = n;
|
|
3046
3001
|
u && u(e, Le(a, this.history)), this.removeListeners = rt(J(this.contextWindow, "pointermove", this.handlePointerMove), J(this.contextWindow, "pointerup", this.handlePointerUp), J(this.contextWindow, "pointercancel", this.handlePointerUp));
|
|
@@ -3052,7 +3007,7 @@ class eo {
|
|
|
3052
3007
|
this.removeListeners && this.removeListeners(), et(this.updatePoint);
|
|
3053
3008
|
}
|
|
3054
3009
|
}
|
|
3055
|
-
function
|
|
3010
|
+
function ke(t, e) {
|
|
3056
3011
|
return e ? { point: e(t.point) } : t;
|
|
3057
3012
|
}
|
|
3058
3013
|
function ns(t, e) {
|
|
@@ -3062,17 +3017,17 @@ function Le({ point: t }, e) {
|
|
|
3062
3017
|
return {
|
|
3063
3018
|
point: t,
|
|
3064
3019
|
delta: ns(t, no(e)),
|
|
3065
|
-
offset: ns(t,
|
|
3066
|
-
velocity:
|
|
3020
|
+
offset: ns(t, yc(e)),
|
|
3021
|
+
velocity: vc(e, 0.1)
|
|
3067
3022
|
};
|
|
3068
3023
|
}
|
|
3069
|
-
function
|
|
3024
|
+
function yc(t) {
|
|
3070
3025
|
return t[0];
|
|
3071
3026
|
}
|
|
3072
3027
|
function no(t) {
|
|
3073
3028
|
return t[t.length - 1];
|
|
3074
3029
|
}
|
|
3075
|
-
function
|
|
3030
|
+
function vc(t, e) {
|
|
3076
3031
|
if (t.length < 2)
|
|
3077
3032
|
return { x: 0, y: 0 };
|
|
3078
3033
|
let n = t.length - 1, s = null;
|
|
@@ -3090,32 +3045,32 @@ function Lc(t, e) {
|
|
|
3090
3045
|
};
|
|
3091
3046
|
return o.x === 1 / 0 && (o.x = 0), o.y === 1 / 0 && (o.y = 0), o;
|
|
3092
3047
|
}
|
|
3093
|
-
function
|
|
3048
|
+
function W(t) {
|
|
3094
3049
|
return t.max - t.min;
|
|
3095
3050
|
}
|
|
3096
|
-
function
|
|
3051
|
+
function Ge(t, e = 0, n = 0.01) {
|
|
3097
3052
|
return Math.abs(t - e) <= n;
|
|
3098
3053
|
}
|
|
3099
3054
|
function ss(t, e, n, s = 0.5) {
|
|
3100
|
-
t.origin = s, t.originPoint =
|
|
3055
|
+
t.origin = s, t.originPoint = k(e.min, e.max, t.origin), t.scale = W(n) / W(e), (Ge(t.scale, 1, 1e-4) || isNaN(t.scale)) && (t.scale = 1), t.translate = k(n.min, n.max, t.origin) - t.originPoint, (Ge(t.translate) || isNaN(t.translate)) && (t.translate = 0);
|
|
3101
3056
|
}
|
|
3102
3057
|
function Ft(t, e, n, s) {
|
|
3103
3058
|
ss(t.x, e.x, n.x, s ? s.originX : void 0), ss(t.y, e.y, n.y, s ? s.originY : void 0);
|
|
3104
3059
|
}
|
|
3105
3060
|
function is(t, e, n) {
|
|
3106
|
-
t.min = n.min + e.min, t.max = t.min +
|
|
3061
|
+
t.min = n.min + e.min, t.max = t.min + W(e);
|
|
3107
3062
|
}
|
|
3108
|
-
function
|
|
3063
|
+
function xc(t, e, n) {
|
|
3109
3064
|
is(t.x, e.x, n.x), is(t.y, e.y, n.y);
|
|
3110
3065
|
}
|
|
3111
3066
|
function os(t, e, n) {
|
|
3112
|
-
t.min = e.min - n.min, t.max = t.min +
|
|
3067
|
+
t.min = e.min - n.min, t.max = t.min + W(e);
|
|
3113
3068
|
}
|
|
3114
3069
|
function Ot(t, e, n) {
|
|
3115
3070
|
os(t.x, e.x, n.x), os(t.y, e.y, n.y);
|
|
3116
3071
|
}
|
|
3117
|
-
function
|
|
3118
|
-
return e !== void 0 && t < e ? t = s ?
|
|
3072
|
+
function bc(t, { min: e, max: n }, s) {
|
|
3073
|
+
return e !== void 0 && t < e ? t = s ? k(e, t, s.min) : Math.max(t, e) : n !== void 0 && t > n && (t = s ? k(n, t, s.max) : Math.min(t, n)), t;
|
|
3119
3074
|
}
|
|
3120
3075
|
function rs(t, e, n) {
|
|
3121
3076
|
return {
|
|
@@ -3123,7 +3078,7 @@ function rs(t, e, n) {
|
|
|
3123
3078
|
max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
|
|
3124
3079
|
};
|
|
3125
3080
|
}
|
|
3126
|
-
function
|
|
3081
|
+
function Tc(t, { top: e, left: n, bottom: s, right: i }) {
|
|
3127
3082
|
return {
|
|
3128
3083
|
x: rs(t.x, n, i),
|
|
3129
3084
|
y: rs(t.y, e, s)
|
|
@@ -3133,24 +3088,24 @@ function as(t, e) {
|
|
|
3133
3088
|
let n = e.min - t.min, s = e.max - t.max;
|
|
3134
3089
|
return e.max - e.min < t.max - t.min && ([n, s] = [s, n]), { min: n, max: s };
|
|
3135
3090
|
}
|
|
3136
|
-
function
|
|
3091
|
+
function Pc(t, e) {
|
|
3137
3092
|
return {
|
|
3138
3093
|
x: as(t.x, e.x),
|
|
3139
3094
|
y: as(t.y, e.y)
|
|
3140
3095
|
};
|
|
3141
3096
|
}
|
|
3142
|
-
function
|
|
3097
|
+
function wc(t, e) {
|
|
3143
3098
|
let n = 0.5;
|
|
3144
|
-
const s =
|
|
3099
|
+
const s = W(t), i = W(e);
|
|
3145
3100
|
return i > s ? n = zt(e.min, e.max - s, t.min) : s > i && (n = zt(t.min, t.max - i, e.min)), lt(0, 1, n);
|
|
3146
3101
|
}
|
|
3147
|
-
function
|
|
3102
|
+
function Ac(t, e) {
|
|
3148
3103
|
const n = {};
|
|
3149
3104
|
return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
|
|
3150
3105
|
}
|
|
3151
|
-
const
|
|
3152
|
-
function
|
|
3153
|
-
return t === !1 ? t = 0 : t === !0 && (t =
|
|
3106
|
+
const $e = 0.35;
|
|
3107
|
+
function Sc(t = $e) {
|
|
3108
|
+
return t === !1 ? t = 0 : t === !0 && (t = $e), {
|
|
3154
3109
|
x: ls(t, "left", "right"),
|
|
3155
3110
|
y: ls(t, "top", "bottom")
|
|
3156
3111
|
};
|
|
@@ -3169,12 +3124,12 @@ const us = () => ({
|
|
|
3169
3124
|
scale: 1,
|
|
3170
3125
|
origin: 0,
|
|
3171
3126
|
originPoint: 0
|
|
3172
|
-
}),
|
|
3127
|
+
}), wt = () => ({
|
|
3173
3128
|
x: us(),
|
|
3174
3129
|
y: us()
|
|
3175
|
-
}),
|
|
3176
|
-
x:
|
|
3177
|
-
y:
|
|
3130
|
+
}), hs = () => ({ min: 0, max: 0 }), B = () => ({
|
|
3131
|
+
x: hs(),
|
|
3132
|
+
y: hs()
|
|
3178
3133
|
});
|
|
3179
3134
|
function $(t) {
|
|
3180
3135
|
return [t("x"), t("y")];
|
|
@@ -3185,10 +3140,10 @@ function so({ top: t, left: e, right: n, bottom: s }) {
|
|
|
3185
3140
|
y: { min: t, max: s }
|
|
3186
3141
|
};
|
|
3187
3142
|
}
|
|
3188
|
-
function
|
|
3143
|
+
function Vc({ x: t, y: e }) {
|
|
3189
3144
|
return { top: e.min, right: t.max, bottom: e.max, left: t.min };
|
|
3190
3145
|
}
|
|
3191
|
-
function
|
|
3146
|
+
function Cc(t, e) {
|
|
3192
3147
|
if (!e)
|
|
3193
3148
|
return t;
|
|
3194
3149
|
const n = e({ x: t.left, y: t.top }), s = e({ x: t.right, y: t.bottom });
|
|
@@ -3209,9 +3164,9 @@ function dt(t) {
|
|
|
3209
3164
|
return He(t) || io(t) || t.z || t.rotate || t.rotateX || t.rotateY;
|
|
3210
3165
|
}
|
|
3211
3166
|
function io(t) {
|
|
3212
|
-
return
|
|
3167
|
+
return fs(t.x) || fs(t.y);
|
|
3213
3168
|
}
|
|
3214
|
-
function
|
|
3169
|
+
function fs(t) {
|
|
3215
3170
|
return t && t !== "0%";
|
|
3216
3171
|
}
|
|
3217
3172
|
function ue(t, e, n) {
|
|
@@ -3227,7 +3182,7 @@ function qe(t, e = 0, n = 1, s, i) {
|
|
|
3227
3182
|
function oo(t, { x: e, y: n }) {
|
|
3228
3183
|
qe(t.x, e.translate, e.scale, e.originPoint), qe(t.y, n.translate, n.scale, n.originPoint);
|
|
3229
3184
|
}
|
|
3230
|
-
function
|
|
3185
|
+
function Mc(t, e, n, s = !1) {
|
|
3231
3186
|
const i = n.length;
|
|
3232
3187
|
if (!i)
|
|
3233
3188
|
return;
|
|
@@ -3241,44 +3196,44 @@ function zc(t, e, n, s = !1) {
|
|
|
3241
3196
|
y: -r.scroll.offset.y
|
|
3242
3197
|
}), o && (e.x *= o.x.scale, e.y *= o.y.scale, oo(t, o)), s && dt(r.latestValues) && At(t, r.latestValues));
|
|
3243
3198
|
}
|
|
3244
|
-
e.x =
|
|
3199
|
+
e.x = ms(e.x), e.y = ms(e.y);
|
|
3245
3200
|
}
|
|
3246
|
-
function
|
|
3201
|
+
function ms(t) {
|
|
3247
3202
|
return Number.isInteger(t) || t > 1.0000000000001 || t < 0.999999999999 ? t : 1;
|
|
3248
3203
|
}
|
|
3249
3204
|
function it(t, e) {
|
|
3250
3205
|
t.min = t.min + e, t.max = t.max + e;
|
|
3251
3206
|
}
|
|
3252
|
-
function
|
|
3253
|
-
const r = e[i] !== void 0 ? e[i] : 0.5, o =
|
|
3207
|
+
function ps(t, e, [n, s, i]) {
|
|
3208
|
+
const r = e[i] !== void 0 ? e[i] : 0.5, o = k(t.min, t.max, r);
|
|
3254
3209
|
qe(t, e[n], e[s], o, e.scale);
|
|
3255
3210
|
}
|
|
3256
|
-
const
|
|
3211
|
+
const Dc = ["x", "scaleX", "originX"], Rc = ["y", "scaleY", "originY"];
|
|
3257
3212
|
function At(t, e) {
|
|
3258
|
-
|
|
3213
|
+
ps(t.x, e, Dc), ps(t.y, e, Rc);
|
|
3259
3214
|
}
|
|
3260
3215
|
function ro(t, e) {
|
|
3261
|
-
return so(
|
|
3216
|
+
return so(Cc(t.getBoundingClientRect(), e));
|
|
3262
3217
|
}
|
|
3263
|
-
function
|
|
3218
|
+
function kc(t, e, n) {
|
|
3264
3219
|
const s = ro(t, n), { scroll: i } = e;
|
|
3265
3220
|
return i && (it(s.x, i.offset.x), it(s.y, i.offset.y)), s;
|
|
3266
3221
|
}
|
|
3267
|
-
const ao = ({ current: t }) => t ? t.ownerDocument.defaultView : null,
|
|
3268
|
-
class
|
|
3222
|
+
const ao = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Lc = /* @__PURE__ */ new WeakMap();
|
|
3223
|
+
class Ec {
|
|
3269
3224
|
constructor(e) {
|
|
3270
|
-
this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic =
|
|
3225
|
+
this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = B(), this.visualElement = e;
|
|
3271
3226
|
}
|
|
3272
3227
|
start(e, { snapToCursor: n = !1 } = {}) {
|
|
3273
3228
|
const { presenceContext: s } = this.visualElement;
|
|
3274
3229
|
if (s && s.isPresent === !1)
|
|
3275
3230
|
return;
|
|
3276
3231
|
const i = (u) => {
|
|
3277
|
-
const { dragSnapToOrigin:
|
|
3278
|
-
|
|
3279
|
-
}, r = (u,
|
|
3280
|
-
const { drag:
|
|
3281
|
-
if (
|
|
3232
|
+
const { dragSnapToOrigin: h } = this.getProps();
|
|
3233
|
+
h ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(ve(u, "page").point);
|
|
3234
|
+
}, r = (u, h) => {
|
|
3235
|
+
const { drag: f, dragPropagation: d, onDragStart: m } = this.getProps();
|
|
3236
|
+
if (f && !d && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = bi(f), !this.openGlobalLock))
|
|
3282
3237
|
return;
|
|
3283
3238
|
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), $((v) => {
|
|
3284
3239
|
let b = this.getAxisMotionValue(v).get() || 0;
|
|
@@ -3286,26 +3241,26 @@ class qc {
|
|
|
3286
3241
|
const { projection: y } = this.visualElement;
|
|
3287
3242
|
if (y && y.layout) {
|
|
3288
3243
|
const g = y.layout.layoutBox[v];
|
|
3289
|
-
g && (b =
|
|
3244
|
+
g && (b = W(g) * (parseFloat(b) / 100));
|
|
3290
3245
|
}
|
|
3291
3246
|
}
|
|
3292
3247
|
this.originPoint[v] = b;
|
|
3293
|
-
}),
|
|
3294
|
-
const { animationState:
|
|
3295
|
-
|
|
3296
|
-
}, o = (u,
|
|
3297
|
-
const { dragPropagation:
|
|
3298
|
-
if (!
|
|
3248
|
+
}), m && V.update(() => m(u, h), !1, !0);
|
|
3249
|
+
const { animationState: p } = this.visualElement;
|
|
3250
|
+
p && p.setActive("whileDrag", !0);
|
|
3251
|
+
}, o = (u, h) => {
|
|
3252
|
+
const { dragPropagation: f, dragDirectionLock: d, onDirectionLock: m, onDrag: p } = this.getProps();
|
|
3253
|
+
if (!f && !this.openGlobalLock)
|
|
3299
3254
|
return;
|
|
3300
|
-
const { offset: v } =
|
|
3255
|
+
const { offset: v } = h;
|
|
3301
3256
|
if (d && this.currentDirection === null) {
|
|
3302
|
-
this.currentDirection =
|
|
3257
|
+
this.currentDirection = Bc(v), this.currentDirection !== null && m && m(this.currentDirection);
|
|
3303
3258
|
return;
|
|
3304
3259
|
}
|
|
3305
|
-
this.updateAxis("x",
|
|
3306
|
-
}, a = (u,
|
|
3307
|
-
var
|
|
3308
|
-
return this.getAnimationState(u) === "paused" && ((
|
|
3260
|
+
this.updateAxis("x", h.point, v), this.updateAxis("y", h.point, v), this.visualElement.render(), p && p(u, h);
|
|
3261
|
+
}, a = (u, h) => this.stop(u, h), l = () => $((u) => {
|
|
3262
|
+
var h;
|
|
3263
|
+
return this.getAnimationState(u) === "paused" && ((h = this.getAxisMotionValue(u).animation) === null || h === void 0 ? void 0 : h.play());
|
|
3309
3264
|
}), { dragSnapToOrigin: c } = this.getProps();
|
|
3310
3265
|
this.panSession = new eo(e, {
|
|
3311
3266
|
onSessionStart: i,
|
|
@@ -3341,28 +3296,28 @@ class qc {
|
|
|
3341
3296
|
return;
|
|
3342
3297
|
const r = this.getAxisMotionValue(e);
|
|
3343
3298
|
let o = this.originPoint[e] + s[e];
|
|
3344
|
-
this.constraints && this.constraints[e] && (o =
|
|
3299
|
+
this.constraints && this.constraints[e] && (o = bc(o, this.constraints[e], this.elastic[e])), r.set(o);
|
|
3345
3300
|
}
|
|
3346
3301
|
resolveConstraints() {
|
|
3347
3302
|
var e;
|
|
3348
3303
|
const { dragConstraints: n, dragElastic: s } = this.getProps(), i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (e = this.visualElement.projection) === null || e === void 0 ? void 0 : e.layout, r = this.constraints;
|
|
3349
|
-
n &&
|
|
3350
|
-
this.getAxisMotionValue(o) && (this.constraints[o] =
|
|
3304
|
+
n && Tt(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && i ? this.constraints = Tc(i.layoutBox, n) : this.constraints = !1, this.elastic = Sc(s), r !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && $((o) => {
|
|
3305
|
+
this.getAxisMotionValue(o) && (this.constraints[o] = Ac(i.layoutBox[o], this.constraints[o]));
|
|
3351
3306
|
});
|
|
3352
3307
|
}
|
|
3353
3308
|
resolveRefConstraints() {
|
|
3354
3309
|
const { dragConstraints: e, onMeasureDragConstraints: n } = this.getProps();
|
|
3355
|
-
if (!e || !
|
|
3310
|
+
if (!e || !Tt(e))
|
|
3356
3311
|
return !1;
|
|
3357
3312
|
const s = e.current;
|
|
3358
3313
|
q(s !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
|
|
3359
3314
|
const { projection: i } = this.visualElement;
|
|
3360
3315
|
if (!i || !i.layout)
|
|
3361
3316
|
return !1;
|
|
3362
|
-
const r =
|
|
3363
|
-
let o =
|
|
3317
|
+
const r = kc(s, i.root, this.visualElement.getTransformPagePoint());
|
|
3318
|
+
let o = Pc(i.layout.layoutBox, r);
|
|
3364
3319
|
if (n) {
|
|
3365
|
-
const a = n(
|
|
3320
|
+
const a = n(Vc(o));
|
|
3366
3321
|
this.hasMutatedConstraints = !!a, a && (o = so(a));
|
|
3367
3322
|
}
|
|
3368
3323
|
return o;
|
|
@@ -3371,20 +3326,20 @@ class qc {
|
|
|
3371
3326
|
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: r, dragSnapToOrigin: o, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, c = $((u) => {
|
|
3372
3327
|
if (!Jt(u, n, this.currentDirection))
|
|
3373
3328
|
return;
|
|
3374
|
-
let
|
|
3375
|
-
o && (
|
|
3376
|
-
const
|
|
3329
|
+
let h = l && l[u] || {};
|
|
3330
|
+
o && (h = { min: 0, max: 0 });
|
|
3331
|
+
const f = i ? 200 : 1e6, d = i ? 40 : 1e7, m = {
|
|
3377
3332
|
type: "inertia",
|
|
3378
3333
|
velocity: s ? e[u] : 0,
|
|
3379
|
-
bounceStiffness:
|
|
3334
|
+
bounceStiffness: f,
|
|
3380
3335
|
bounceDamping: d,
|
|
3381
3336
|
timeConstant: 750,
|
|
3382
3337
|
restDelta: 1,
|
|
3383
3338
|
restSpeed: 10,
|
|
3384
3339
|
...r,
|
|
3385
|
-
...
|
|
3340
|
+
...h
|
|
3386
3341
|
};
|
|
3387
|
-
return this.startAxisValueAnimation(u,
|
|
3342
|
+
return this.startAxisValueAnimation(u, m);
|
|
3388
3343
|
});
|
|
3389
3344
|
return Promise.all(c).then(a);
|
|
3390
3345
|
}
|
|
@@ -3423,7 +3378,7 @@ class qc {
|
|
|
3423
3378
|
const { projection: i } = this.visualElement, r = this.getAxisMotionValue(n);
|
|
3424
3379
|
if (i && i.layout) {
|
|
3425
3380
|
const { min: o, max: a } = i.layout.layoutBox[n];
|
|
3426
|
-
r.set(e[n] -
|
|
3381
|
+
r.set(e[n] - k(o, a, 0.5));
|
|
3427
3382
|
}
|
|
3428
3383
|
});
|
|
3429
3384
|
}
|
|
@@ -3436,7 +3391,7 @@ class qc {
|
|
|
3436
3391
|
if (!this.visualElement.current)
|
|
3437
3392
|
return;
|
|
3438
3393
|
const { drag: e, dragConstraints: n } = this.getProps(), { projection: s } = this.visualElement;
|
|
3439
|
-
if (!
|
|
3394
|
+
if (!Tt(n) || !s || !this.constraints)
|
|
3440
3395
|
return;
|
|
3441
3396
|
this.stopAnimation();
|
|
3442
3397
|
const i = { x: 0, y: 0 };
|
|
@@ -3444,7 +3399,7 @@ class qc {
|
|
|
3444
3399
|
const a = this.getAxisMotionValue(o);
|
|
3445
3400
|
if (a) {
|
|
3446
3401
|
const l = a.get();
|
|
3447
|
-
i[o] =
|
|
3402
|
+
i[o] = wc({ min: l, max: l }, this.constraints[o]);
|
|
3448
3403
|
}
|
|
3449
3404
|
});
|
|
3450
3405
|
const { transformTemplate: r } = this.visualElement.getProps();
|
|
@@ -3452,25 +3407,25 @@ class qc {
|
|
|
3452
3407
|
if (!Jt(o, e, null))
|
|
3453
3408
|
return;
|
|
3454
3409
|
const a = this.getAxisMotionValue(o), { min: l, max: c } = this.constraints[o];
|
|
3455
|
-
a.set(
|
|
3410
|
+
a.set(k(l, c, i[o]));
|
|
3456
3411
|
});
|
|
3457
3412
|
}
|
|
3458
3413
|
addListeners() {
|
|
3459
3414
|
if (!this.visualElement.current)
|
|
3460
3415
|
return;
|
|
3461
|
-
|
|
3416
|
+
Lc.set(this.visualElement, this);
|
|
3462
3417
|
const e = this.visualElement.current, n = J(e, "pointerdown", (l) => {
|
|
3463
3418
|
const { drag: c, dragListener: u = !0 } = this.getProps();
|
|
3464
3419
|
c && u && this.start(l);
|
|
3465
3420
|
}), s = () => {
|
|
3466
3421
|
const { dragConstraints: l } = this.getProps();
|
|
3467
|
-
|
|
3422
|
+
Tt(l) && (this.constraints = this.resolveRefConstraints());
|
|
3468
3423
|
}, { projection: i } = this.visualElement, r = i.addEventListener("measure", s);
|
|
3469
3424
|
i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), s();
|
|
3470
3425
|
const o = Z(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: c }) => {
|
|
3471
3426
|
this.isDragging && c && ($((u) => {
|
|
3472
|
-
const
|
|
3473
|
-
|
|
3427
|
+
const h = this.getAxisMotionValue(u);
|
|
3428
|
+
h && (this.originPoint[u] += l[u].translate, h.set(h.get() + l[u].translate));
|
|
3474
3429
|
}), this.visualElement.render());
|
|
3475
3430
|
});
|
|
3476
3431
|
return () => {
|
|
@@ -3478,7 +3433,7 @@ class qc {
|
|
|
3478
3433
|
};
|
|
3479
3434
|
}
|
|
3480
3435
|
getProps() {
|
|
3481
|
-
const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints: r = !1, dragElastic: o =
|
|
3436
|
+
const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints: r = !1, dragElastic: o = $e, dragMomentum: a = !0 } = e;
|
|
3482
3437
|
return {
|
|
3483
3438
|
...e,
|
|
3484
3439
|
drag: n,
|
|
@@ -3493,13 +3448,13 @@ class qc {
|
|
|
3493
3448
|
function Jt(t, e, n) {
|
|
3494
3449
|
return (e === !0 || e === t) && (n === null || n === t);
|
|
3495
3450
|
}
|
|
3496
|
-
function
|
|
3451
|
+
function Bc(t, e = 10) {
|
|
3497
3452
|
let n = null;
|
|
3498
3453
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
3499
3454
|
}
|
|
3500
|
-
class
|
|
3455
|
+
class Ic extends ut {
|
|
3501
3456
|
constructor(e) {
|
|
3502
|
-
super(e), this.removeGroupControls = E, this.removeListeners = E, this.controls = new
|
|
3457
|
+
super(e), this.removeGroupControls = E, this.removeListeners = E, this.controls = new Ec(e);
|
|
3503
3458
|
}
|
|
3504
3459
|
mount() {
|
|
3505
3460
|
const { dragControls: e } = this.node.getProps();
|
|
@@ -3512,7 +3467,7 @@ class Yc extends ut {
|
|
|
3512
3467
|
const gs = (t) => (e, n) => {
|
|
3513
3468
|
t && V.update(() => t(e, n));
|
|
3514
3469
|
};
|
|
3515
|
-
class
|
|
3470
|
+
class jc extends ut {
|
|
3516
3471
|
constructor() {
|
|
3517
3472
|
super(...arguments), this.removePointerDownListener = E;
|
|
3518
3473
|
}
|
|
@@ -3543,8 +3498,8 @@ class Xc extends ut {
|
|
|
3543
3498
|
this.removePointerDownListener(), this.session && this.session.end();
|
|
3544
3499
|
}
|
|
3545
3500
|
}
|
|
3546
|
-
function
|
|
3547
|
-
const t =
|
|
3501
|
+
function Fc() {
|
|
3502
|
+
const t = _(sn);
|
|
3548
3503
|
if (t === null)
|
|
3549
3504
|
return [!0, null];
|
|
3550
3505
|
const { isPresent: e, onExitComplete: n, register: s } = t, i = Mo();
|
|
@@ -3570,25 +3525,25 @@ const Et = {
|
|
|
3570
3525
|
if (!e.target)
|
|
3571
3526
|
return t;
|
|
3572
3527
|
if (typeof t == "string")
|
|
3573
|
-
if (
|
|
3528
|
+
if (T.test(t))
|
|
3574
3529
|
t = parseFloat(t);
|
|
3575
3530
|
else
|
|
3576
3531
|
return t;
|
|
3577
3532
|
const n = ys(t, e.target.x), s = ys(t, e.target.y);
|
|
3578
3533
|
return `${n}% ${s}%`;
|
|
3579
3534
|
}
|
|
3580
|
-
},
|
|
3535
|
+
}, Oc = {
|
|
3581
3536
|
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
3582
3537
|
const s = t, i = ct.parse(t);
|
|
3583
3538
|
if (i.length > 5)
|
|
3584
3539
|
return s;
|
|
3585
3540
|
const r = ct.createTransformer(t), o = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
|
|
3586
3541
|
i[0 + o] /= a, i[1 + o] /= l;
|
|
3587
|
-
const c =
|
|
3542
|
+
const c = k(a, l, 0.5);
|
|
3588
3543
|
return typeof i[2 + o] == "number" && (i[2 + o] /= c), typeof i[3 + o] == "number" && (i[3 + o] /= c), r(i);
|
|
3589
3544
|
}
|
|
3590
3545
|
};
|
|
3591
|
-
class
|
|
3546
|
+
class Nc extends zs.Component {
|
|
3592
3547
|
/**
|
|
3593
3548
|
* This only mounts projection nodes for components that
|
|
3594
3549
|
* need measuring, we might want to do it for all components
|
|
@@ -3596,7 +3551,7 @@ class Jc extends zs.Component {
|
|
|
3596
3551
|
*/
|
|
3597
3552
|
componentDidMount() {
|
|
3598
3553
|
const { visualElement: e, layoutGroup: n, switchLayoutGroup: s, layoutId: i } = this.props, { projection: r } = e;
|
|
3599
|
-
|
|
3554
|
+
qr(_c), r && (n.group && n.group.add(r), s && s.register && i && s.register(r), r.root.didUpdate(), r.addEventListener("animationComplete", () => {
|
|
3600
3555
|
this.safeToRemove();
|
|
3601
3556
|
}), r.setOptions({
|
|
3602
3557
|
...r.options,
|
|
@@ -3629,10 +3584,10 @@ class Jc extends zs.Component {
|
|
|
3629
3584
|
}
|
|
3630
3585
|
}
|
|
3631
3586
|
function lo(t) {
|
|
3632
|
-
const [e, n] =
|
|
3633
|
-
return zs.createElement(
|
|
3587
|
+
const [e, n] = Fc(), s = _(si);
|
|
3588
|
+
return zs.createElement(Nc, { ...t, layoutGroup: s, switchLayoutGroup: _(ii), isPresent: e, safeToRemove: n });
|
|
3634
3589
|
}
|
|
3635
|
-
const
|
|
3590
|
+
const _c = {
|
|
3636
3591
|
borderRadius: {
|
|
3637
3592
|
...Et,
|
|
3638
3593
|
applyTo: [
|
|
@@ -3646,77 +3601,77 @@ const tu = {
|
|
|
3646
3601
|
borderTopRightRadius: Et,
|
|
3647
3602
|
borderBottomLeftRadius: Et,
|
|
3648
3603
|
borderBottomRightRadius: Et,
|
|
3649
|
-
boxShadow:
|
|
3650
|
-
}, co = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"],
|
|
3651
|
-
function
|
|
3652
|
-
i ? (t.opacity =
|
|
3604
|
+
boxShadow: Oc
|
|
3605
|
+
}, co = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Uc = co.length, vs = (t) => typeof t == "string" ? parseFloat(t) : t, xs = (t) => typeof t == "number" || T.test(t);
|
|
3606
|
+
function zc(t, e, n, s, i, r) {
|
|
3607
|
+
i ? (t.opacity = k(
|
|
3653
3608
|
0,
|
|
3654
3609
|
// TODO Reinstate this if only child
|
|
3655
3610
|
n.opacity !== void 0 ? n.opacity : 1,
|
|
3656
|
-
|
|
3657
|
-
), t.opacityExit =
|
|
3658
|
-
for (let o = 0; o <
|
|
3611
|
+
Wc(s)
|
|
3612
|
+
), t.opacityExit = k(e.opacity !== void 0 ? e.opacity : 1, 0, Gc(s))) : r && (t.opacity = k(e.opacity !== void 0 ? e.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, s));
|
|
3613
|
+
for (let o = 0; o < Uc; o++) {
|
|
3659
3614
|
const a = `border${co[o]}Radius`;
|
|
3660
3615
|
let l = bs(e, a), c = bs(n, a);
|
|
3661
3616
|
if (l === void 0 && c === void 0)
|
|
3662
3617
|
continue;
|
|
3663
|
-
l || (l = 0), c || (c = 0), l === 0 || c === 0 || xs(l) === xs(c) ? (t[a] = Math.max(
|
|
3618
|
+
l || (l = 0), c || (c = 0), l === 0 || c === 0 || xs(l) === xs(c) ? (t[a] = Math.max(k(vs(l), vs(c), s), 0), (K.test(c) || K.test(l)) && (t[a] += "%")) : t[a] = c;
|
|
3664
3619
|
}
|
|
3665
|
-
(e.rotate || n.rotate) && (t.rotate =
|
|
3620
|
+
(e.rotate || n.rotate) && (t.rotate = k(e.rotate || 0, n.rotate || 0, s));
|
|
3666
3621
|
}
|
|
3667
3622
|
function bs(t, e) {
|
|
3668
3623
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
3669
3624
|
}
|
|
3670
|
-
const
|
|
3625
|
+
const Wc = uo(0, 0.5, Li), Gc = uo(0.5, 0.95, E);
|
|
3671
3626
|
function uo(t, e, n) {
|
|
3672
3627
|
return (s) => s < t ? 0 : s > e ? 1 : n(zt(t, e, s));
|
|
3673
3628
|
}
|
|
3674
|
-
function
|
|
3629
|
+
function Ts(t, e) {
|
|
3675
3630
|
t.min = e.min, t.max = e.max;
|
|
3676
3631
|
}
|
|
3677
|
-
function
|
|
3678
|
-
|
|
3632
|
+
function G(t, e) {
|
|
3633
|
+
Ts(t.x, e.x), Ts(t.y, e.y);
|
|
3679
3634
|
}
|
|
3680
|
-
function
|
|
3635
|
+
function Ps(t, e, n, s, i) {
|
|
3681
3636
|
return t -= e, t = ue(t, 1 / n, s), i !== void 0 && (t = ue(t, 1 / i, s)), t;
|
|
3682
3637
|
}
|
|
3683
|
-
function
|
|
3684
|
-
if (K.test(e) && (e = parseFloat(e), e =
|
|
3638
|
+
function $c(t, e = 0, n = 1, s = 0.5, i, r = t, o = t) {
|
|
3639
|
+
if (K.test(e) && (e = parseFloat(e), e = k(o.min, o.max, e / 100) - o.min), typeof e != "number")
|
|
3685
3640
|
return;
|
|
3686
|
-
let a =
|
|
3687
|
-
t === r && (a -= e), t.min =
|
|
3641
|
+
let a = k(r.min, r.max, s);
|
|
3642
|
+
t === r && (a -= e), t.min = Ps(t.min, e, n, a, i), t.max = Ps(t.max, e, n, a, i);
|
|
3688
3643
|
}
|
|
3689
|
-
function
|
|
3690
|
-
|
|
3644
|
+
function ws(t, e, [n, s, i], r, o) {
|
|
3645
|
+
$c(t, e[n], e[s], e[i], e.scale, r, o);
|
|
3691
3646
|
}
|
|
3692
|
-
const
|
|
3647
|
+
const Hc = ["x", "scaleX", "originX"], qc = ["y", "scaleY", "originY"];
|
|
3693
3648
|
function As(t, e, n, s) {
|
|
3694
|
-
|
|
3649
|
+
ws(t.x, e, Hc, n ? n.x : void 0, s ? s.x : void 0), ws(t.y, e, qc, n ? n.y : void 0, s ? s.y : void 0);
|
|
3695
3650
|
}
|
|
3696
3651
|
function Ss(t) {
|
|
3697
3652
|
return t.translate === 0 && t.scale === 1;
|
|
3698
3653
|
}
|
|
3699
|
-
function
|
|
3654
|
+
function ho(t) {
|
|
3700
3655
|
return Ss(t.x) && Ss(t.y);
|
|
3701
3656
|
}
|
|
3702
|
-
function
|
|
3657
|
+
function Kc(t, e) {
|
|
3703
3658
|
return t.x.min === e.x.min && t.x.max === e.x.max && t.y.min === e.y.min && t.y.max === e.y.max;
|
|
3704
3659
|
}
|
|
3705
|
-
function
|
|
3660
|
+
function fo(t, e) {
|
|
3706
3661
|
return Math.round(t.x.min) === Math.round(e.x.min) && Math.round(t.x.max) === Math.round(e.x.max) && Math.round(t.y.min) === Math.round(e.y.min) && Math.round(t.y.max) === Math.round(e.y.max);
|
|
3707
3662
|
}
|
|
3708
3663
|
function Vs(t) {
|
|
3709
|
-
return
|
|
3664
|
+
return W(t.x) / W(t.y);
|
|
3710
3665
|
}
|
|
3711
|
-
class
|
|
3666
|
+
class Yc {
|
|
3712
3667
|
constructor() {
|
|
3713
3668
|
this.members = [];
|
|
3714
3669
|
}
|
|
3715
3670
|
add(e) {
|
|
3716
|
-
|
|
3671
|
+
Tn(this.members, e), e.scheduleRender();
|
|
3717
3672
|
}
|
|
3718
3673
|
remove(e) {
|
|
3719
|
-
if (
|
|
3674
|
+
if (Pn(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
|
|
3720
3675
|
const n = this.members[this.members.length - 1];
|
|
3721
3676
|
n && this.promote(n);
|
|
3722
3677
|
}
|
|
@@ -3772,60 +3727,60 @@ function Cs(t, e, n) {
|
|
|
3772
3727
|
const o = t.x.scale * e.x, a = t.y.scale * e.y;
|
|
3773
3728
|
return (o !== 1 || a !== 1) && (s += `scale(${o}, ${a})`), s || "none";
|
|
3774
3729
|
}
|
|
3775
|
-
const
|
|
3776
|
-
class
|
|
3730
|
+
const Xc = (t, e) => t.depth - e.depth;
|
|
3731
|
+
class Qc {
|
|
3777
3732
|
constructor() {
|
|
3778
3733
|
this.children = [], this.isDirty = !1;
|
|
3779
3734
|
}
|
|
3780
3735
|
add(e) {
|
|
3781
|
-
|
|
3736
|
+
Tn(this.children, e), this.isDirty = !0;
|
|
3782
3737
|
}
|
|
3783
3738
|
remove(e) {
|
|
3784
|
-
|
|
3739
|
+
Pn(this.children, e), this.isDirty = !0;
|
|
3785
3740
|
}
|
|
3786
3741
|
forEach(e) {
|
|
3787
|
-
this.isDirty && this.children.sort(
|
|
3742
|
+
this.isDirty && this.children.sort(Xc), this.isDirty = !1, this.children.forEach(e);
|
|
3788
3743
|
}
|
|
3789
3744
|
}
|
|
3790
|
-
function
|
|
3745
|
+
function Zc(t, e) {
|
|
3791
3746
|
const n = performance.now(), s = ({ timestamp: i }) => {
|
|
3792
3747
|
const r = i - n;
|
|
3793
3748
|
r >= e && (et(s), t(r - e));
|
|
3794
3749
|
};
|
|
3795
3750
|
return V.read(s, !0), () => et(s);
|
|
3796
3751
|
}
|
|
3797
|
-
function
|
|
3752
|
+
function Jc(t) {
|
|
3798
3753
|
window.MotionDebug && window.MotionDebug.record(t);
|
|
3799
3754
|
}
|
|
3800
|
-
function
|
|
3755
|
+
function tu(t) {
|
|
3801
3756
|
return t instanceof SVGElement && t.tagName !== "svg";
|
|
3802
3757
|
}
|
|
3803
|
-
function
|
|
3758
|
+
function eu(t, e, n) {
|
|
3804
3759
|
const s = U(t) ? t : Vt(t);
|
|
3805
3760
|
return s.start(bn("", s, e, n)), s.animation;
|
|
3806
3761
|
}
|
|
3807
|
-
const Ms = ["", "X", "Y", "Z"],
|
|
3808
|
-
let
|
|
3809
|
-
const
|
|
3762
|
+
const Ms = ["", "X", "Y", "Z"], nu = { visibility: "hidden" }, Ds = 1e3;
|
|
3763
|
+
let su = 0;
|
|
3764
|
+
const mt = {
|
|
3810
3765
|
type: "projectionFrame",
|
|
3811
3766
|
totalNodes: 0,
|
|
3812
3767
|
resolvedTargetDeltas: 0,
|
|
3813
3768
|
recalculatedProjection: 0
|
|
3814
3769
|
};
|
|
3815
|
-
function
|
|
3770
|
+
function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: s, resetTransform: i }) {
|
|
3816
3771
|
return class {
|
|
3817
3772
|
constructor(o = {}, a = e == null ? void 0 : e()) {
|
|
3818
|
-
this.id =
|
|
3773
|
+
this.id = su++, this.animationId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
3819
3774
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
3820
3775
|
}, this.updateProjection = () => {
|
|
3821
|
-
this.projectionUpdateScheduled = !1,
|
|
3776
|
+
this.projectionUpdateScheduled = !1, mt.totalNodes = mt.resolvedTargetDeltas = mt.recalculatedProjection = 0, this.nodes.forEach(ru), this.nodes.forEach(hu), this.nodes.forEach(fu), this.nodes.forEach(au), Jc(mt);
|
|
3822
3777
|
}, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = o, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
3823
3778
|
for (let l = 0; l < this.path.length; l++)
|
|
3824
3779
|
this.path[l].shouldResetTransform = !0;
|
|
3825
|
-
this.root === this && (this.nodes = new
|
|
3780
|
+
this.root === this && (this.nodes = new Qc());
|
|
3826
3781
|
}
|
|
3827
3782
|
addEventListener(o, a) {
|
|
3828
|
-
return this.eventHandlers.has(o) || this.eventHandlers.set(o, new
|
|
3783
|
+
return this.eventHandlers.has(o) || this.eventHandlers.set(o, new wn()), this.eventHandlers.get(o).add(a);
|
|
3829
3784
|
}
|
|
3830
3785
|
notifyListeners(o, ...a) {
|
|
3831
3786
|
const l = this.eventHandlers.get(o);
|
|
@@ -3840,32 +3795,32 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3840
3795
|
mount(o, a = this.root.hasTreeAnimated) {
|
|
3841
3796
|
if (this.instance)
|
|
3842
3797
|
return;
|
|
3843
|
-
this.isSVG =
|
|
3798
|
+
this.isSVG = tu(o), this.instance = o;
|
|
3844
3799
|
const { layoutId: l, layout: c, visualElement: u } = this.options;
|
|
3845
3800
|
if (u && !u.current && u.mount(o), this.root.nodes.add(this), this.parent && this.parent.children.add(this), a && (c || l) && (this.isLayoutDirty = !0), t) {
|
|
3846
|
-
let
|
|
3847
|
-
const
|
|
3801
|
+
let h;
|
|
3802
|
+
const f = () => this.root.updateBlockedByResize = !1;
|
|
3848
3803
|
t(o, () => {
|
|
3849
|
-
this.root.updateBlockedByResize = !0,
|
|
3804
|
+
this.root.updateBlockedByResize = !0, h && h(), h = Zc(f, 250), ne.hasAnimatedSinceResize && (ne.hasAnimatedSinceResize = !1, this.nodes.forEach(ks));
|
|
3850
3805
|
});
|
|
3851
3806
|
}
|
|
3852
|
-
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && u && (l || c) && this.addEventListener("didUpdate", ({ delta:
|
|
3807
|
+
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && u && (l || c) && this.addEventListener("didUpdate", ({ delta: h, hasLayoutChanged: f, hasRelativeTargetChanged: d, layout: m }) => {
|
|
3853
3808
|
if (this.isTreeAnimationBlocked()) {
|
|
3854
3809
|
this.target = void 0, this.relativeTarget = void 0;
|
|
3855
3810
|
return;
|
|
3856
3811
|
}
|
|
3857
|
-
const
|
|
3858
|
-
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || g ||
|
|
3859
|
-
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(
|
|
3812
|
+
const p = this.options.transition || u.getDefaultTransition() || yu, { onLayoutAnimationStart: v, onLayoutAnimationComplete: b } = u.getProps(), y = !this.targetLayout || !fo(this.targetLayout, m) || d, g = !f && d;
|
|
3813
|
+
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || g || f && (y || !this.currentAnimation)) {
|
|
3814
|
+
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(h, g);
|
|
3860
3815
|
const x = {
|
|
3861
|
-
...xn(
|
|
3816
|
+
...xn(p, "layout"),
|
|
3862
3817
|
onPlay: v,
|
|
3863
3818
|
onComplete: b
|
|
3864
3819
|
};
|
|
3865
3820
|
(u.shouldReduceMotion || this.options.layoutRoot) && (x.delay = 0, x.type = !1), this.startAnimation(x);
|
|
3866
3821
|
} else
|
|
3867
|
-
|
|
3868
|
-
this.targetLayout =
|
|
3822
|
+
f || ks(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
3823
|
+
this.targetLayout = m;
|
|
3869
3824
|
});
|
|
3870
3825
|
}
|
|
3871
3826
|
unmount() {
|
|
@@ -3888,7 +3843,7 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3888
3843
|
}
|
|
3889
3844
|
// Note: currently only running on root node
|
|
3890
3845
|
startUpdate() {
|
|
3891
|
-
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(
|
|
3846
|
+
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(du), this.animationId++);
|
|
3892
3847
|
}
|
|
3893
3848
|
getTransformTemplate() {
|
|
3894
3849
|
const { visualElement: o } = this.options;
|
|
@@ -3903,8 +3858,8 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3903
3858
|
return;
|
|
3904
3859
|
this.isLayoutDirty = !0;
|
|
3905
3860
|
for (let u = 0; u < this.path.length; u++) {
|
|
3906
|
-
const
|
|
3907
|
-
|
|
3861
|
+
const h = this.path[u];
|
|
3862
|
+
h.shouldResetTransform = !0, h.updateScroll("snapshot"), h.options.layoutRoot && h.willUpdate(!1);
|
|
3908
3863
|
}
|
|
3909
3864
|
const { layoutId: a, layout: l } = this.options;
|
|
3910
3865
|
if (a === void 0 && !l)
|
|
@@ -3917,15 +3872,15 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3917
3872
|
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(Rs);
|
|
3918
3873
|
return;
|
|
3919
3874
|
}
|
|
3920
|
-
this.isUpdating || this.nodes.forEach(
|
|
3875
|
+
this.isUpdating || this.nodes.forEach(cu), this.isUpdating = !1, this.nodes.forEach(uu), this.nodes.forEach(iu), this.nodes.forEach(ou), this.clearAllSnapshots();
|
|
3921
3876
|
const a = performance.now();
|
|
3922
|
-
|
|
3877
|
+
j.delta = lt(0, 1e3 / 60, a - j.timestamp), j.timestamp = a, j.isProcessing = !0, we.update.process(j), we.preRender.process(j), we.render.process(j), j.isProcessing = !1;
|
|
3923
3878
|
}
|
|
3924
3879
|
didUpdate() {
|
|
3925
3880
|
this.updateScheduled || (this.updateScheduled = !0, queueMicrotask(() => this.update()));
|
|
3926
3881
|
}
|
|
3927
3882
|
clearAllSnapshots() {
|
|
3928
|
-
this.nodes.forEach(
|
|
3883
|
+
this.nodes.forEach(lu), this.sharedNodes.forEach(mu);
|
|
3929
3884
|
}
|
|
3930
3885
|
scheduleUpdateProjection() {
|
|
3931
3886
|
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, V.preRender(this.updateProjection, !1, !0));
|
|
@@ -3948,7 +3903,7 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3948
3903
|
for (let l = 0; l < this.path.length; l++)
|
|
3949
3904
|
this.path[l].updateScroll();
|
|
3950
3905
|
const o = this.layout;
|
|
3951
|
-
this.layout = this.measure(!1), this.layoutCorrected =
|
|
3906
|
+
this.layout = this.measure(!1), this.layoutCorrected = B(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
|
|
3952
3907
|
const { visualElement: a } = this.options;
|
|
3953
3908
|
a && a.notify("LayoutMeasure", this.layout.layoutBox, o ? o.layoutBox : void 0);
|
|
3954
3909
|
}
|
|
@@ -3964,13 +3919,13 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3964
3919
|
resetTransform() {
|
|
3965
3920
|
if (!i)
|
|
3966
3921
|
return;
|
|
3967
|
-
const o = this.isLayoutDirty || this.shouldResetTransform, a = this.projectionDelta && !
|
|
3922
|
+
const o = this.isLayoutDirty || this.shouldResetTransform, a = this.projectionDelta && !ho(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, u = c !== this.prevTransformTemplateValue;
|
|
3968
3923
|
o && (a || dt(this.latestValues) || u) && (i(this.instance, c), this.shouldResetTransform = !1, this.scheduleRender());
|
|
3969
3924
|
}
|
|
3970
3925
|
measure(o = !0) {
|
|
3971
3926
|
const a = this.measurePageBox();
|
|
3972
3927
|
let l = this.removeElementScroll(a);
|
|
3973
|
-
return o && (l = this.removeTransform(l)),
|
|
3928
|
+
return o && (l = this.removeTransform(l)), vu(l), {
|
|
3974
3929
|
animationId: this.root.animationId,
|
|
3975
3930
|
measuredBox: a,
|
|
3976
3931
|
layoutBox: l,
|
|
@@ -3981,20 +3936,20 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3981
3936
|
measurePageBox() {
|
|
3982
3937
|
const { visualElement: o } = this.options;
|
|
3983
3938
|
if (!o)
|
|
3984
|
-
return
|
|
3939
|
+
return B();
|
|
3985
3940
|
const a = o.measureViewportBox(), { scroll: l } = this.root;
|
|
3986
3941
|
return l && (it(a.x, l.offset.x), it(a.y, l.offset.y)), a;
|
|
3987
3942
|
}
|
|
3988
3943
|
removeElementScroll(o) {
|
|
3989
|
-
const a =
|
|
3990
|
-
|
|
3944
|
+
const a = B();
|
|
3945
|
+
G(a, o);
|
|
3991
3946
|
for (let l = 0; l < this.path.length; l++) {
|
|
3992
|
-
const c = this.path[l], { scroll: u, options:
|
|
3993
|
-
if (c !== this.root && u &&
|
|
3947
|
+
const c = this.path[l], { scroll: u, options: h } = c;
|
|
3948
|
+
if (c !== this.root && u && h.layoutScroll) {
|
|
3994
3949
|
if (u.isRoot) {
|
|
3995
|
-
|
|
3996
|
-
const { scroll:
|
|
3997
|
-
|
|
3950
|
+
G(a, o);
|
|
3951
|
+
const { scroll: f } = this.root;
|
|
3952
|
+
f && (it(a.x, -f.offset.x), it(a.y, -f.offset.y));
|
|
3998
3953
|
}
|
|
3999
3954
|
it(a.x, u.offset.x), it(a.y, u.offset.y);
|
|
4000
3955
|
}
|
|
@@ -4002,8 +3957,8 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4002
3957
|
return a;
|
|
4003
3958
|
}
|
|
4004
3959
|
applyTransform(o, a = !1) {
|
|
4005
|
-
const l =
|
|
4006
|
-
|
|
3960
|
+
const l = B();
|
|
3961
|
+
G(l, o);
|
|
4007
3962
|
for (let c = 0; c < this.path.length; c++) {
|
|
4008
3963
|
const u = this.path[c];
|
|
4009
3964
|
!a && u.options.layoutScroll && u.scroll && u !== u.root && At(l, {
|
|
@@ -4014,15 +3969,15 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4014
3969
|
return dt(this.latestValues) && At(l, this.latestValues), l;
|
|
4015
3970
|
}
|
|
4016
3971
|
removeTransform(o) {
|
|
4017
|
-
const a =
|
|
4018
|
-
|
|
3972
|
+
const a = B();
|
|
3973
|
+
G(a, o);
|
|
4019
3974
|
for (let l = 0; l < this.path.length; l++) {
|
|
4020
3975
|
const c = this.path[l];
|
|
4021
3976
|
if (!c.instance || !dt(c.latestValues))
|
|
4022
3977
|
continue;
|
|
4023
3978
|
He(c.latestValues) && c.updateSnapshot();
|
|
4024
|
-
const u =
|
|
4025
|
-
|
|
3979
|
+
const u = B(), h = c.measurePageBox();
|
|
3980
|
+
G(u, h), As(a, c.latestValues, c.snapshot ? c.snapshot.layoutBox : void 0, u);
|
|
4026
3981
|
}
|
|
4027
3982
|
return dt(this.latestValues) && As(a, this.latestValues), a;
|
|
4028
3983
|
}
|
|
@@ -4040,7 +3995,7 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4040
3995
|
this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
|
|
4041
3996
|
}
|
|
4042
3997
|
forceRelativeParentToResolveTarget() {
|
|
4043
|
-
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !==
|
|
3998
|
+
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== j.timestamp && this.relativeParent.resolveTargetDelta(!0);
|
|
4044
3999
|
}
|
|
4045
4000
|
resolveTargetDelta(o = !1) {
|
|
4046
4001
|
var a;
|
|
@@ -4049,19 +4004,19 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4049
4004
|
const c = !!this.resumingFrom || this !== l;
|
|
4050
4005
|
if (!(o || c && this.isSharedProjectionDirty || this.isProjectionDirty || !((a = this.parent) === null || a === void 0) && a.isProjectionDirty || this.attemptToResolveRelativeTarget))
|
|
4051
4006
|
return;
|
|
4052
|
-
const { layout:
|
|
4053
|
-
if (!(!this.layout || !(
|
|
4054
|
-
if (this.resolvedRelativeTargetAt =
|
|
4007
|
+
const { layout: h, layoutId: f } = this.options;
|
|
4008
|
+
if (!(!this.layout || !(h || f))) {
|
|
4009
|
+
if (this.resolvedRelativeTargetAt = j.timestamp, !this.targetDelta && !this.relativeTarget) {
|
|
4055
4010
|
const d = this.getClosestProjectingParent();
|
|
4056
|
-
d && d.layout && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget =
|
|
4011
|
+
d && d.layout && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(), Ot(this.relativeTargetOrigin, this.layout.layoutBox, d.layout.layoutBox), G(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4057
4012
|
}
|
|
4058
4013
|
if (!(!this.relativeTarget && !this.targetDelta)) {
|
|
4059
|
-
if (this.target || (this.target =
|
|
4014
|
+
if (this.target || (this.target = B(), this.targetWithTransforms = B()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), xc(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : G(this.target, this.layout.layoutBox), oo(this.target, this.targetDelta)) : G(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
|
|
4060
4015
|
this.attemptToResolveRelativeTarget = !1;
|
|
4061
4016
|
const d = this.getClosestProjectingParent();
|
|
4062
|
-
d && !!d.resumingFrom == !!this.resumingFrom && !d.options.layoutScroll && d.target && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget =
|
|
4017
|
+
d && !!d.resumingFrom == !!this.resumingFrom && !d.options.layoutScroll && d.target && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(), Ot(this.relativeTargetOrigin, this.target, d.target), G(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4063
4018
|
}
|
|
4064
|
-
|
|
4019
|
+
mt.resolvedTargetDeltas++;
|
|
4065
4020
|
}
|
|
4066
4021
|
}
|
|
4067
4022
|
}
|
|
@@ -4076,22 +4031,22 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4076
4031
|
var o;
|
|
4077
4032
|
const a = this.getLead(), l = !!this.resumingFrom || this !== a;
|
|
4078
4033
|
let c = !0;
|
|
4079
|
-
if ((this.isProjectionDirty || !((o = this.parent) === null || o === void 0) && o.isProjectionDirty) && (c = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (c = !1), this.resolvedRelativeTargetAt ===
|
|
4034
|
+
if ((this.isProjectionDirty || !((o = this.parent) === null || o === void 0) && o.isProjectionDirty) && (c = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (c = !1), this.resolvedRelativeTargetAt === j.timestamp && (c = !1), c)
|
|
4080
4035
|
return;
|
|
4081
|
-
const { layout: u, layoutId:
|
|
4082
|
-
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u ||
|
|
4036
|
+
const { layout: u, layoutId: h } = this.options;
|
|
4037
|
+
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || h))
|
|
4083
4038
|
return;
|
|
4084
|
-
|
|
4085
|
-
const
|
|
4086
|
-
|
|
4087
|
-
const { target:
|
|
4088
|
-
if (!
|
|
4089
|
-
this.projectionTransform && (this.projectionDelta =
|
|
4039
|
+
G(this.layoutCorrected, this.layout.layoutBox);
|
|
4040
|
+
const f = this.treeScale.x, d = this.treeScale.y;
|
|
4041
|
+
Mc(this.layoutCorrected, this.treeScale, this.path, l), a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox);
|
|
4042
|
+
const { target: m } = a;
|
|
4043
|
+
if (!m) {
|
|
4044
|
+
this.projectionTransform && (this.projectionDelta = wt(), this.projectionTransform = "none", this.scheduleRender());
|
|
4090
4045
|
return;
|
|
4091
4046
|
}
|
|
4092
|
-
this.projectionDelta || (this.projectionDelta =
|
|
4093
|
-
const
|
|
4094
|
-
Ft(this.projectionDelta, this.layoutCorrected,
|
|
4047
|
+
this.projectionDelta || (this.projectionDelta = wt(), this.projectionDeltaWithTransform = wt());
|
|
4048
|
+
const p = this.projectionTransform;
|
|
4049
|
+
Ft(this.projectionDelta, this.layoutCorrected, m, this.latestValues), this.projectionTransform = Cs(this.projectionDelta, this.treeScale), (this.projectionTransform !== p || this.treeScale.x !== f || this.treeScale.y !== d) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", m)), mt.recalculatedProjection++;
|
|
4095
4050
|
}
|
|
4096
4051
|
hide() {
|
|
4097
4052
|
this.isVisible = !1;
|
|
@@ -4107,19 +4062,19 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4107
4062
|
this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
|
|
4108
4063
|
}
|
|
4109
4064
|
setAnimationOrigin(o, a = !1) {
|
|
4110
|
-
const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues },
|
|
4065
|
+
const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues }, h = wt();
|
|
4111
4066
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
4112
|
-
const
|
|
4067
|
+
const f = B(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, p = d !== m, v = this.getStack(), b = !v || v.members.length <= 1, y = !!(p && !b && this.options.crossfade === !0 && !this.path.some(gu));
|
|
4113
4068
|
this.animationProgress = 0;
|
|
4114
4069
|
let g;
|
|
4115
4070
|
this.mixTargetDelta = (x) => {
|
|
4116
|
-
const
|
|
4117
|
-
Ls(
|
|
4071
|
+
const w = x / 1e3;
|
|
4072
|
+
Ls(h.x, o.x, w), Ls(h.y, o.y, w), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Ot(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), pu(this.relativeTarget, this.relativeTargetOrigin, f, w), g && Kc(this.relativeTarget, g) && (this.isProjectionDirty = !1), g || (g = B()), G(g, this.relativeTarget)), p && (this.animationValues = u, zc(u, c, this.latestValues, w, y, b)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = w;
|
|
4118
4073
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4119
4074
|
}
|
|
4120
4075
|
startAnimation(o) {
|
|
4121
4076
|
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (et(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = V.update(() => {
|
|
4122
|
-
ne.hasAnimatedSinceResize = !0, this.currentAnimation =
|
|
4077
|
+
ne.hasAnimatedSinceResize = !0, this.currentAnimation = eu(0, Ds, {
|
|
4123
4078
|
...o,
|
|
4124
4079
|
onUpdate: (a) => {
|
|
4125
4080
|
this.mixTargetDelta(a), o.onUpdate && o.onUpdate(a);
|
|
@@ -4142,18 +4097,18 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4142
4097
|
const o = this.getLead();
|
|
4143
4098
|
let { targetWithTransforms: a, target: l, layout: c, latestValues: u } = o;
|
|
4144
4099
|
if (!(!a || !l || !c)) {
|
|
4145
|
-
if (this !== o && this.layout && c &&
|
|
4146
|
-
l = this.target ||
|
|
4147
|
-
const
|
|
4148
|
-
l.x.min = o.target.x.min, l.x.max = l.x.min +
|
|
4149
|
-
const
|
|
4150
|
-
l.y.min = o.target.y.min, l.y.max = l.y.min +
|
|
4100
|
+
if (this !== o && this.layout && c && po(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
|
|
4101
|
+
l = this.target || B();
|
|
4102
|
+
const h = W(this.layout.layoutBox.x);
|
|
4103
|
+
l.x.min = o.target.x.min, l.x.max = l.x.min + h;
|
|
4104
|
+
const f = W(this.layout.layoutBox.y);
|
|
4105
|
+
l.y.min = o.target.y.min, l.y.max = l.y.min + f;
|
|
4151
4106
|
}
|
|
4152
|
-
|
|
4107
|
+
G(a, l), At(a, u), Ft(this.projectionDeltaWithTransform, this.layoutCorrected, a, u);
|
|
4153
4108
|
}
|
|
4154
4109
|
}
|
|
4155
4110
|
registerSharedNode(o, a) {
|
|
4156
|
-
this.sharedNodes.has(o) || this.sharedNodes.set(o, new
|
|
4111
|
+
this.sharedNodes.has(o) || this.sharedNodes.set(o, new Yc()), this.sharedNodes.get(o).add(a);
|
|
4157
4112
|
const c = a.options.initialPromotionConfig;
|
|
4158
4113
|
a.promote({
|
|
4159
4114
|
transition: c ? c.transition : void 0,
|
|
@@ -4197,8 +4152,8 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4197
4152
|
return;
|
|
4198
4153
|
const c = {};
|
|
4199
4154
|
for (let u = 0; u < Ms.length; u++) {
|
|
4200
|
-
const
|
|
4201
|
-
l[
|
|
4155
|
+
const h = "rotate" + Ms[u];
|
|
4156
|
+
l[h] && (c[h] = l[h], o.setStaticValue(h, 0));
|
|
4202
4157
|
}
|
|
4203
4158
|
o.render();
|
|
4204
4159
|
for (const u in c)
|
|
@@ -4210,33 +4165,33 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4210
4165
|
if (!this.instance || this.isSVG)
|
|
4211
4166
|
return;
|
|
4212
4167
|
if (!this.isVisible)
|
|
4213
|
-
return
|
|
4168
|
+
return nu;
|
|
4214
4169
|
const c = {
|
|
4215
4170
|
visibility: ""
|
|
4216
4171
|
}, u = this.getTransformTemplate();
|
|
4217
4172
|
if (this.needsReset)
|
|
4218
4173
|
return this.needsReset = !1, c.opacity = "", c.pointerEvents = ee(o == null ? void 0 : o.pointerEvents) || "", c.transform = u ? u(this.latestValues, "") : "none", c;
|
|
4219
|
-
const
|
|
4220
|
-
if (!this.projectionDelta || !this.layout || !
|
|
4221
|
-
const
|
|
4222
|
-
return this.options.layoutId && (
|
|
4174
|
+
const h = this.getLead();
|
|
4175
|
+
if (!this.projectionDelta || !this.layout || !h.target) {
|
|
4176
|
+
const p = {};
|
|
4177
|
+
return this.options.layoutId && (p.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, p.pointerEvents = ee(o == null ? void 0 : o.pointerEvents) || ""), this.hasProjected && !dt(this.latestValues) && (p.transform = u ? u({}, "") : "none", this.hasProjected = !1), p;
|
|
4223
4178
|
}
|
|
4224
|
-
const
|
|
4225
|
-
this.applyTransformsToTarget(), c.transform = Cs(this.projectionDeltaWithTransform, this.treeScale,
|
|
4226
|
-
const { x: d, y:
|
|
4227
|
-
c.transformOrigin = `${d.origin * 100}% ${
|
|
4228
|
-
for (const
|
|
4229
|
-
if (
|
|
4179
|
+
const f = h.animationValues || h.latestValues;
|
|
4180
|
+
this.applyTransformsToTarget(), c.transform = Cs(this.projectionDeltaWithTransform, this.treeScale, f), u && (c.transform = u(f, c.transform));
|
|
4181
|
+
const { x: d, y: m } = this.projectionDelta;
|
|
4182
|
+
c.transformOrigin = `${d.origin * 100}% ${m.origin * 100}% 0`, h.animationValues ? c.opacity = h === this ? (l = (a = f.opacity) !== null && a !== void 0 ? a : this.latestValues.opacity) !== null && l !== void 0 ? l : 1 : this.preserveOpacity ? this.latestValues.opacity : f.opacityExit : c.opacity = h === this ? f.opacity !== void 0 ? f.opacity : "" : f.opacityExit !== void 0 ? f.opacityExit : 0;
|
|
4183
|
+
for (const p in se) {
|
|
4184
|
+
if (f[p] === void 0)
|
|
4230
4185
|
continue;
|
|
4231
|
-
const { correct: v, applyTo: b } = se[
|
|
4186
|
+
const { correct: v, applyTo: b } = se[p], y = c.transform === "none" ? f[p] : v(f[p], h);
|
|
4232
4187
|
if (b) {
|
|
4233
4188
|
const g = b.length;
|
|
4234
4189
|
for (let x = 0; x < g; x++)
|
|
4235
4190
|
c[b[x]] = y;
|
|
4236
4191
|
} else
|
|
4237
|
-
c[
|
|
4192
|
+
c[p] = y;
|
|
4238
4193
|
}
|
|
4239
|
-
return this.options.layoutId && (c.pointerEvents =
|
|
4194
|
+
return this.options.layoutId && (c.pointerEvents = h === this ? ee(o == null ? void 0 : o.pointerEvents) || "" : "none"), c;
|
|
4240
4195
|
}
|
|
4241
4196
|
clearSnapshot() {
|
|
4242
4197
|
this.resumeFrom = this.snapshot = void 0;
|
|
@@ -4250,36 +4205,36 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4250
4205
|
}
|
|
4251
4206
|
};
|
|
4252
4207
|
}
|
|
4253
|
-
function
|
|
4208
|
+
function iu(t) {
|
|
4254
4209
|
t.updateLayout();
|
|
4255
4210
|
}
|
|
4256
|
-
function
|
|
4211
|
+
function ou(t) {
|
|
4257
4212
|
var e;
|
|
4258
4213
|
const n = ((e = t.resumeFrom) === null || e === void 0 ? void 0 : e.snapshot) || t.snapshot;
|
|
4259
4214
|
if (t.isLead() && t.layout && n && t.hasListeners("didUpdate")) {
|
|
4260
4215
|
const { layoutBox: s, measuredBox: i } = t.layout, { animationType: r } = t.options, o = n.source !== t.layout.source;
|
|
4261
|
-
r === "size" ? $((
|
|
4262
|
-
const
|
|
4263
|
-
|
|
4264
|
-
}) :
|
|
4265
|
-
const
|
|
4266
|
-
|
|
4216
|
+
r === "size" ? $((h) => {
|
|
4217
|
+
const f = o ? n.measuredBox[h] : n.layoutBox[h], d = W(f);
|
|
4218
|
+
f.min = s[h].min, f.max = f.min + d;
|
|
4219
|
+
}) : po(r, n.layoutBox, s) && $((h) => {
|
|
4220
|
+
const f = o ? n.measuredBox[h] : n.layoutBox[h], d = W(s[h]);
|
|
4221
|
+
f.max = f.min + d, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[h].max = t.relativeTarget[h].min + d);
|
|
4267
4222
|
});
|
|
4268
|
-
const a =
|
|
4223
|
+
const a = wt();
|
|
4269
4224
|
Ft(a, s, n.layoutBox);
|
|
4270
|
-
const l =
|
|
4225
|
+
const l = wt();
|
|
4271
4226
|
o ? Ft(l, t.applyTransform(i, !0), n.measuredBox) : Ft(l, s, n.layoutBox);
|
|
4272
|
-
const c = !
|
|
4227
|
+
const c = !ho(a);
|
|
4273
4228
|
let u = !1;
|
|
4274
4229
|
if (!t.resumeFrom) {
|
|
4275
|
-
const
|
|
4276
|
-
if (
|
|
4277
|
-
const { snapshot:
|
|
4278
|
-
if (
|
|
4279
|
-
const
|
|
4280
|
-
Ot(
|
|
4281
|
-
const
|
|
4282
|
-
Ot(
|
|
4230
|
+
const h = t.getClosestProjectingParent();
|
|
4231
|
+
if (h && !h.resumeFrom) {
|
|
4232
|
+
const { snapshot: f, layout: d } = h;
|
|
4233
|
+
if (f && d) {
|
|
4234
|
+
const m = B();
|
|
4235
|
+
Ot(m, n.layoutBox, f.layoutBox);
|
|
4236
|
+
const p = B();
|
|
4237
|
+
Ot(p, s, d.layoutBox), fo(m, p) || (u = !0), h.options.layoutRoot && (t.relativeTarget = p, t.relativeTargetOrigin = m, t.relativeParent = h);
|
|
4283
4238
|
}
|
|
4284
4239
|
}
|
|
4285
4240
|
}
|
|
@@ -4297,111 +4252,111 @@ function xu(t) {
|
|
|
4297
4252
|
}
|
|
4298
4253
|
t.options.transition = void 0;
|
|
4299
4254
|
}
|
|
4300
|
-
function
|
|
4301
|
-
|
|
4255
|
+
function ru(t) {
|
|
4256
|
+
mt.totalNodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
|
|
4302
4257
|
}
|
|
4303
|
-
function
|
|
4258
|
+
function au(t) {
|
|
4304
4259
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
4305
4260
|
}
|
|
4306
|
-
function
|
|
4261
|
+
function lu(t) {
|
|
4307
4262
|
t.clearSnapshot();
|
|
4308
4263
|
}
|
|
4309
4264
|
function Rs(t) {
|
|
4310
4265
|
t.clearMeasurements();
|
|
4311
4266
|
}
|
|
4312
|
-
function
|
|
4267
|
+
function cu(t) {
|
|
4313
4268
|
t.isLayoutDirty = !1;
|
|
4314
4269
|
}
|
|
4315
|
-
function
|
|
4270
|
+
function uu(t) {
|
|
4316
4271
|
const { visualElement: e } = t.options;
|
|
4317
4272
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
4318
4273
|
}
|
|
4319
|
-
function
|
|
4274
|
+
function ks(t) {
|
|
4320
4275
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
4321
4276
|
}
|
|
4322
|
-
function
|
|
4277
|
+
function hu(t) {
|
|
4323
4278
|
t.resolveTargetDelta();
|
|
4324
4279
|
}
|
|
4325
|
-
function
|
|
4280
|
+
function fu(t) {
|
|
4326
4281
|
t.calcProjection();
|
|
4327
4282
|
}
|
|
4328
|
-
function
|
|
4283
|
+
function du(t) {
|
|
4329
4284
|
t.resetRotation();
|
|
4330
4285
|
}
|
|
4331
|
-
function
|
|
4286
|
+
function mu(t) {
|
|
4332
4287
|
t.removeLeadSnapshot();
|
|
4333
4288
|
}
|
|
4334
4289
|
function Ls(t, e, n) {
|
|
4335
|
-
t.translate =
|
|
4290
|
+
t.translate = k(e.translate, 0, n), t.scale = k(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
|
|
4336
4291
|
}
|
|
4337
4292
|
function Es(t, e, n, s) {
|
|
4338
|
-
t.min =
|
|
4293
|
+
t.min = k(e.min, n.min, s), t.max = k(e.max, n.max, s);
|
|
4339
4294
|
}
|
|
4340
|
-
function
|
|
4295
|
+
function pu(t, e, n, s) {
|
|
4341
4296
|
Es(t.x, e.x, n.x, s), Es(t.y, e.y, n.y, s);
|
|
4342
4297
|
}
|
|
4343
|
-
function
|
|
4298
|
+
function gu(t) {
|
|
4344
4299
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
4345
4300
|
}
|
|
4346
|
-
const
|
|
4301
|
+
const yu = {
|
|
4347
4302
|
duration: 0.45,
|
|
4348
4303
|
ease: [0.4, 0, 0.1, 1]
|
|
4349
|
-
},
|
|
4350
|
-
function
|
|
4351
|
-
t.min =
|
|
4304
|
+
}, Bs = (t) => typeof navigator < "u" && navigator.userAgent.toLowerCase().includes(t), Is = Bs("applewebkit/") && !Bs("chrome/") ? Math.round : E;
|
|
4305
|
+
function js(t) {
|
|
4306
|
+
t.min = Is(t.min), t.max = Is(t.max);
|
|
4352
4307
|
}
|
|
4353
|
-
function
|
|
4354
|
-
|
|
4308
|
+
function vu(t) {
|
|
4309
|
+
js(t.x), js(t.y);
|
|
4355
4310
|
}
|
|
4356
|
-
function
|
|
4357
|
-
return t === "position" || t === "preserve-aspect" &&
|
|
4311
|
+
function po(t, e, n) {
|
|
4312
|
+
return t === "position" || t === "preserve-aspect" && !Ge(Vs(e), Vs(n), 0.2);
|
|
4358
4313
|
}
|
|
4359
|
-
const
|
|
4314
|
+
const xu = mo({
|
|
4360
4315
|
attachResizeListener: (t, e) => Z(t, "resize", e),
|
|
4361
4316
|
measureScroll: () => ({
|
|
4362
4317
|
x: document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
4363
4318
|
y: document.documentElement.scrollTop || document.body.scrollTop
|
|
4364
4319
|
}),
|
|
4365
4320
|
checkIsScrollRoot: () => !0
|
|
4366
|
-
}),
|
|
4321
|
+
}), Be = {
|
|
4367
4322
|
current: void 0
|
|
4368
|
-
}, go =
|
|
4323
|
+
}, go = mo({
|
|
4369
4324
|
measureScroll: (t) => ({
|
|
4370
4325
|
x: t.scrollLeft,
|
|
4371
4326
|
y: t.scrollTop
|
|
4372
4327
|
}),
|
|
4373
4328
|
defaultParent: () => {
|
|
4374
|
-
if (!
|
|
4375
|
-
const t = new
|
|
4376
|
-
t.mount(window), t.setOptions({ layoutScroll: !0 }),
|
|
4329
|
+
if (!Be.current) {
|
|
4330
|
+
const t = new xu({});
|
|
4331
|
+
t.mount(window), t.setOptions({ layoutScroll: !0 }), Be.current = t;
|
|
4377
4332
|
}
|
|
4378
|
-
return
|
|
4333
|
+
return Be.current;
|
|
4379
4334
|
},
|
|
4380
4335
|
resetTransform: (t, e) => {
|
|
4381
4336
|
t.style.transform = e !== void 0 ? e : "none";
|
|
4382
4337
|
},
|
|
4383
4338
|
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
4384
|
-
}),
|
|
4339
|
+
}), bu = {
|
|
4385
4340
|
pan: {
|
|
4386
|
-
Feature:
|
|
4341
|
+
Feature: jc
|
|
4387
4342
|
},
|
|
4388
4343
|
drag: {
|
|
4389
|
-
Feature:
|
|
4344
|
+
Feature: Ic,
|
|
4390
4345
|
ProjectionNode: go,
|
|
4391
4346
|
MeasureLayout: lo
|
|
4392
4347
|
}
|
|
4393
|
-
},
|
|
4394
|
-
function
|
|
4395
|
-
const e =
|
|
4348
|
+
}, Tu = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
|
|
4349
|
+
function Pu(t) {
|
|
4350
|
+
const e = Tu.exec(t);
|
|
4396
4351
|
if (!e)
|
|
4397
4352
|
return [,];
|
|
4398
4353
|
const [, n, s] = e;
|
|
4399
4354
|
return [n, s];
|
|
4400
4355
|
}
|
|
4401
|
-
const
|
|
4356
|
+
const wu = 4;
|
|
4402
4357
|
function Ke(t, e, n = 1) {
|
|
4403
|
-
q(n <=
|
|
4404
|
-
const [s, i] =
|
|
4358
|
+
q(n <= wu, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
|
|
4359
|
+
const [s, i] = Pu(t);
|
|
4405
4360
|
if (!s)
|
|
4406
4361
|
return;
|
|
4407
4362
|
const r = window.getComputedStyle(e).getPropertyValue(s);
|
|
@@ -4411,7 +4366,7 @@ function Ke(t, e, n = 1) {
|
|
|
4411
4366
|
} else
|
|
4412
4367
|
return Fe(i) ? Ke(i, e, n + 1) : i;
|
|
4413
4368
|
}
|
|
4414
|
-
function
|
|
4369
|
+
function Au(t, { ...e }, n) {
|
|
4415
4370
|
const s = t.current;
|
|
4416
4371
|
if (!(s instanceof Element))
|
|
4417
4372
|
return { target: e, transitionEnd: n };
|
|
@@ -4431,7 +4386,7 @@ function Ou(t, { ...e }, n) {
|
|
|
4431
4386
|
}
|
|
4432
4387
|
return { target: e, transitionEnd: n };
|
|
4433
4388
|
}
|
|
4434
|
-
const
|
|
4389
|
+
const Su = /* @__PURE__ */ new Set([
|
|
4435
4390
|
"width",
|
|
4436
4391
|
"height",
|
|
4437
4392
|
"top",
|
|
@@ -4442,7 +4397,7 @@ const ju = /* @__PURE__ */ new Set([
|
|
|
4442
4397
|
"y",
|
|
4443
4398
|
"translateX",
|
|
4444
4399
|
"translateY"
|
|
4445
|
-
]), yo = (t) =>
|
|
4400
|
+
]), yo = (t) => Su.has(t), Vu = (t) => Object.keys(t).some(yo), te = (t) => t === yt || t === T, Fs = (t, e) => parseFloat(t.split(", ")[e]), Os = (t, e) => (n, { transform: s }) => {
|
|
4446
4401
|
if (s === "none" || !s)
|
|
4447
4402
|
return 0;
|
|
4448
4403
|
const i = s.match(/^matrix3d\((.+)\)$/);
|
|
@@ -4452,10 +4407,10 @@ const ju = /* @__PURE__ */ new Set([
|
|
|
4452
4407
|
const r = s.match(/^matrix\((.+)\)$/);
|
|
4453
4408
|
return r ? Fs(r[1], t) : 0;
|
|
4454
4409
|
}
|
|
4455
|
-
},
|
|
4456
|
-
function
|
|
4410
|
+
}, Cu = /* @__PURE__ */ new Set(["x", "y", "z"]), Mu = Gt.filter((t) => !Cu.has(t));
|
|
4411
|
+
function Du(t) {
|
|
4457
4412
|
const e = [];
|
|
4458
|
-
return
|
|
4413
|
+
return Mu.forEach((n) => {
|
|
4459
4414
|
const s = t.getValue(n);
|
|
4460
4415
|
s !== void 0 && (e.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
4461
4416
|
}), e.length && t.render(), e;
|
|
@@ -4474,7 +4429,7 @@ const Ct = {
|
|
|
4474
4429
|
};
|
|
4475
4430
|
Ct.translateX = Ct.x;
|
|
4476
4431
|
Ct.translateY = Ct.y;
|
|
4477
|
-
const
|
|
4432
|
+
const Ru = (t, e, n) => {
|
|
4478
4433
|
const s = e.measureViewportBox(), i = e.current, r = getComputedStyle(i), { display: o } = r, a = {};
|
|
4479
4434
|
o === "none" && e.setStaticValue("display", t.display || "block"), n.forEach((c) => {
|
|
4480
4435
|
a[c] = Ct[c](s, r);
|
|
@@ -4484,7 +4439,7 @@ const $u = (t, e, n) => {
|
|
|
4484
4439
|
const u = e.getValue(c);
|
|
4485
4440
|
u && u.jump(a[c]), t[c] = Ct[c](l, r);
|
|
4486
4441
|
}), t;
|
|
4487
|
-
},
|
|
4442
|
+
}, ku = (t, e, n = {}, s = {}) => {
|
|
4488
4443
|
e = { ...e }, s = { ...s };
|
|
4489
4444
|
const i = Object.keys(e).filter(yo);
|
|
4490
4445
|
let r = [], o = !1;
|
|
@@ -4493,46 +4448,46 @@ const $u = (t, e, n) => {
|
|
|
4493
4448
|
const c = t.getValue(l);
|
|
4494
4449
|
if (!t.hasValue(l))
|
|
4495
4450
|
return;
|
|
4496
|
-
let u = n[l],
|
|
4497
|
-
const
|
|
4451
|
+
let u = n[l], h = Lt(u);
|
|
4452
|
+
const f = e[l];
|
|
4498
4453
|
let d;
|
|
4499
|
-
if (oe(
|
|
4500
|
-
const
|
|
4501
|
-
u =
|
|
4502
|
-
for (let v =
|
|
4503
|
-
d ? q(Lt(
|
|
4454
|
+
if (oe(f)) {
|
|
4455
|
+
const m = f.length, p = f[0] === null ? 1 : 0;
|
|
4456
|
+
u = f[p], h = Lt(u);
|
|
4457
|
+
for (let v = p; v < m && f[v] !== null; v++)
|
|
4458
|
+
d ? q(Lt(f[v]) === d, "All keyframes must be of the same type") : (d = Lt(f[v]), q(d === h || te(h) && te(d), "Keyframes must be of the same dimension as the current value"));
|
|
4504
4459
|
} else
|
|
4505
|
-
d = Lt(
|
|
4506
|
-
if (
|
|
4507
|
-
if (te(
|
|
4508
|
-
const
|
|
4509
|
-
typeof
|
|
4460
|
+
d = Lt(f);
|
|
4461
|
+
if (h !== d)
|
|
4462
|
+
if (te(h) && te(d)) {
|
|
4463
|
+
const m = c.get();
|
|
4464
|
+
typeof m == "string" && c.set(parseFloat(m)), typeof f == "string" ? e[l] = parseFloat(f) : Array.isArray(f) && d === T && (e[l] = f.map(parseFloat));
|
|
4510
4465
|
} else
|
|
4511
|
-
|
|
4466
|
+
h != null && h.transform && (d != null && d.transform) && (u === 0 || f === 0) ? u === 0 ? c.set(d.transform(u)) : e[l] = h.transform(f) : (o || (r = Du(t), o = !0), a.push(l), s[l] = s[l] !== void 0 ? s[l] : e[l], c.jump(f));
|
|
4512
4467
|
}), a.length) {
|
|
4513
|
-
const l = a.indexOf("height") >= 0 ? window.pageYOffset : null, c =
|
|
4514
|
-
return r.length && r.forEach(([u,
|
|
4515
|
-
t.getValue(u).set(
|
|
4516
|
-
}), t.render(),
|
|
4468
|
+
const l = a.indexOf("height") >= 0 ? window.pageYOffset : null, c = Ru(e, t, a);
|
|
4469
|
+
return r.length && r.forEach(([u, h]) => {
|
|
4470
|
+
t.getValue(u).set(h);
|
|
4471
|
+
}), t.render(), me && l !== null && window.scrollTo({ top: l }), { target: c, transitionEnd: s };
|
|
4517
4472
|
} else
|
|
4518
4473
|
return { target: e, transitionEnd: s };
|
|
4519
4474
|
};
|
|
4520
|
-
function
|
|
4521
|
-
return
|
|
4475
|
+
function Lu(t, e, n, s) {
|
|
4476
|
+
return Vu(e) ? ku(t, e, n, s) : { target: e, transitionEnd: s };
|
|
4522
4477
|
}
|
|
4523
|
-
const
|
|
4524
|
-
const i =
|
|
4525
|
-
return e = i.target, s = i.transitionEnd,
|
|
4478
|
+
const Eu = (t, e, n, s) => {
|
|
4479
|
+
const i = Au(t, e, s);
|
|
4480
|
+
return e = i.target, s = i.transitionEnd, Lu(t, e, n, s);
|
|
4526
4481
|
}, Ye = { current: null }, vo = { current: !1 };
|
|
4527
|
-
function
|
|
4528
|
-
if (vo.current = !0, !!
|
|
4482
|
+
function Bu() {
|
|
4483
|
+
if (vo.current = !0, !!me)
|
|
4529
4484
|
if (window.matchMedia) {
|
|
4530
4485
|
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Ye.current = t.matches;
|
|
4531
4486
|
t.addListener(e), e();
|
|
4532
4487
|
} else
|
|
4533
4488
|
Ye.current = !1;
|
|
4534
4489
|
}
|
|
4535
|
-
function
|
|
4490
|
+
function Iu(t, e, n) {
|
|
4536
4491
|
const { willChange: s } = e;
|
|
4537
4492
|
for (const i in e) {
|
|
4538
4493
|
const r = e[i], o = n[i];
|
|
@@ -4553,7 +4508,7 @@ function Yu(t, e, n) {
|
|
|
4553
4508
|
e[i] === void 0 && t.removeValue(i);
|
|
4554
4509
|
return e;
|
|
4555
4510
|
}
|
|
4556
|
-
const
|
|
4511
|
+
const Ns = /* @__PURE__ */ new WeakMap(), xo = Object.keys(Ut), ju = xo.length, _s = [
|
|
4557
4512
|
"AnimationStart",
|
|
4558
4513
|
"AnimationComplete",
|
|
4559
4514
|
"Update",
|
|
@@ -4561,8 +4516,8 @@ const js = /* @__PURE__ */ new WeakMap(), xo = Object.keys(Ut), Xu = xo.length,
|
|
|
4561
4516
|
"LayoutMeasure",
|
|
4562
4517
|
"LayoutAnimationStart",
|
|
4563
4518
|
"LayoutAnimationComplete"
|
|
4564
|
-
],
|
|
4565
|
-
class
|
|
4519
|
+
], Fu = an.length;
|
|
4520
|
+
class Ou {
|
|
4566
4521
|
constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, visualState: r }, o = {}) {
|
|
4567
4522
|
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
4568
4523
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
@@ -4570,9 +4525,9 @@ class Zu {
|
|
|
4570
4525
|
const { latestValues: a, renderState: l } = r;
|
|
4571
4526
|
this.latestValues = a, this.baseTarget = { ...a }, this.initialValues = n.initial ? { ...a } : {}, this.renderState = l, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = o, this.isControllingVariants = ge(n), this.isVariantNode = ni(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
4572
4527
|
const { willChange: c, ...u } = this.scrapeMotionValuesFromProps(n, {});
|
|
4573
|
-
for (const
|
|
4574
|
-
const
|
|
4575
|
-
a[
|
|
4528
|
+
for (const h in u) {
|
|
4529
|
+
const f = u[h];
|
|
4530
|
+
a[h] !== void 0 && U(f) && (f.set(a[h], !1), ce(c) && c.add(h));
|
|
4576
4531
|
}
|
|
4577
4532
|
}
|
|
4578
4533
|
/**
|
|
@@ -4586,10 +4541,10 @@ class Zu {
|
|
|
4586
4541
|
return {};
|
|
4587
4542
|
}
|
|
4588
4543
|
mount(e) {
|
|
4589
|
-
this.current = e,
|
|
4544
|
+
this.current = e, Ns.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), vo.current || Bu(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Ye.current, process.env.NODE_ENV !== "production" && An(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
4590
4545
|
}
|
|
4591
4546
|
unmount() {
|
|
4592
|
-
|
|
4547
|
+
Ns.delete(this.current), this.projection && this.projection.unmount(), et(this.notifyUpdate), et(this.render), this.valueSubscriptions.forEach((e) => e()), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
4593
4548
|
for (const e in this.events)
|
|
4594
4549
|
this.events[e].clear();
|
|
4595
4550
|
for (const e in this.features)
|
|
@@ -4613,17 +4568,17 @@ class Zu {
|
|
|
4613
4568
|
const l = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
4614
4569
|
n.ignoreStrict ? qt(!1, l) : q(!1, l);
|
|
4615
4570
|
}
|
|
4616
|
-
for (let l = 0; l <
|
|
4617
|
-
const c = xo[l], { isEnabled: u, Feature:
|
|
4618
|
-
|
|
4571
|
+
for (let l = 0; l < ju; l++) {
|
|
4572
|
+
const c = xo[l], { isEnabled: u, Feature: h, ProjectionNode: f, MeasureLayout: d } = Ut[c];
|
|
4573
|
+
f && (o = f), u(n) && (!this.features[c] && h && (this.features[c] = new h(this)), d && (a = d));
|
|
4619
4574
|
}
|
|
4620
4575
|
if ((this.type === "html" || this.type === "svg") && !this.projection && o) {
|
|
4621
4576
|
this.projection = new o(this.latestValues, this.parent && this.parent.projection);
|
|
4622
|
-
const { layoutId: l, layout: c, drag: u, dragConstraints:
|
|
4577
|
+
const { layoutId: l, layout: c, drag: u, dragConstraints: h, layoutScroll: f, layoutRoot: d } = n;
|
|
4623
4578
|
this.projection.setOptions({
|
|
4624
4579
|
layoutId: l,
|
|
4625
4580
|
layout: c,
|
|
4626
|
-
alwaysMeasureLayout: !!u ||
|
|
4581
|
+
alwaysMeasureLayout: !!u || h && Tt(h),
|
|
4627
4582
|
visualElement: this,
|
|
4628
4583
|
scheduleRender: () => this.scheduleRender(),
|
|
4629
4584
|
/**
|
|
@@ -4635,7 +4590,7 @@ class Zu {
|
|
|
4635
4590
|
*/
|
|
4636
4591
|
animationType: typeof c == "string" ? c : "both",
|
|
4637
4592
|
initialPromotionConfig: r,
|
|
4638
|
-
layoutScroll:
|
|
4593
|
+
layoutScroll: f,
|
|
4639
4594
|
layoutRoot: d
|
|
4640
4595
|
});
|
|
4641
4596
|
}
|
|
@@ -4656,7 +4611,7 @@ class Zu {
|
|
|
4656
4611
|
* removed with a re-render to work.
|
|
4657
4612
|
*/
|
|
4658
4613
|
measureViewportBox() {
|
|
4659
|
-
return this.current ? this.measureInstanceViewportBox(this.current, this.props) :
|
|
4614
|
+
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : B();
|
|
4660
4615
|
}
|
|
4661
4616
|
getStaticValue(e) {
|
|
4662
4617
|
return this.latestValues[e];
|
|
@@ -4680,13 +4635,13 @@ class Zu {
|
|
|
4680
4635
|
*/
|
|
4681
4636
|
update(e, n) {
|
|
4682
4637
|
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
4683
|
-
for (let s = 0; s <
|
|
4684
|
-
const i =
|
|
4638
|
+
for (let s = 0; s < _s.length; s++) {
|
|
4639
|
+
const i = _s[s];
|
|
4685
4640
|
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
|
|
4686
4641
|
const r = e["on" + i];
|
|
4687
4642
|
r && (this.propEventSubscriptions[i] = this.on(i, r));
|
|
4688
4643
|
}
|
|
4689
|
-
this.prevMotionValues =
|
|
4644
|
+
this.prevMotionValues = Iu(this, this.scrapeMotionValuesFromProps(e, this.prevProps), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
4690
4645
|
}
|
|
4691
4646
|
getProps() {
|
|
4692
4647
|
return this.props;
|
|
@@ -4717,9 +4672,9 @@ class Zu {
|
|
|
4717
4672
|
return this.props.initial !== void 0 && (s.initial = this.props.initial), s;
|
|
4718
4673
|
}
|
|
4719
4674
|
const n = {};
|
|
4720
|
-
for (let s = 0; s <
|
|
4675
|
+
for (let s = 0; s < Fu; s++) {
|
|
4721
4676
|
const i = an[s], r = this.props[i];
|
|
4722
|
-
(
|
|
4677
|
+
(_t(r) || r === !1) && (n[i] = r);
|
|
4723
4678
|
}
|
|
4724
4679
|
return n;
|
|
4725
4680
|
}
|
|
@@ -4779,20 +4734,20 @@ class Zu {
|
|
|
4779
4734
|
*/
|
|
4780
4735
|
getBaseTarget(e) {
|
|
4781
4736
|
var n;
|
|
4782
|
-
const { initial: s } = this.props, i = typeof s == "string" || typeof s == "object" ? (n =
|
|
4737
|
+
const { initial: s } = this.props, i = typeof s == "string" || typeof s == "object" ? (n = mn(this.props, s)) === null || n === void 0 ? void 0 : n[e] : void 0;
|
|
4783
4738
|
if (s && i !== void 0)
|
|
4784
4739
|
return i;
|
|
4785
4740
|
const r = this.getBaseTargetFromProps(this.props, e);
|
|
4786
4741
|
return r !== void 0 && !U(r) ? r : this.initialValues[e] !== void 0 && i === void 0 ? void 0 : this.baseTarget[e];
|
|
4787
4742
|
}
|
|
4788
4743
|
on(e, n) {
|
|
4789
|
-
return this.events[e] || (this.events[e] = new
|
|
4744
|
+
return this.events[e] || (this.events[e] = new wn()), this.events[e].add(n);
|
|
4790
4745
|
}
|
|
4791
4746
|
notify(e, ...n) {
|
|
4792
4747
|
this.events[e] && this.events[e].notify(...n);
|
|
4793
4748
|
}
|
|
4794
4749
|
}
|
|
4795
|
-
class bo extends
|
|
4750
|
+
class bo extends Ou {
|
|
4796
4751
|
sortInstanceNodePosition(e, n) {
|
|
4797
4752
|
return e.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
4798
4753
|
}
|
|
@@ -4803,10 +4758,10 @@ class bo extends Zu {
|
|
|
4803
4758
|
delete n[e], delete s[e];
|
|
4804
4759
|
}
|
|
4805
4760
|
makeTargetAnimatableFromInstance({ transition: e, transitionEnd: n, ...s }, { transformValues: i }, r) {
|
|
4806
|
-
let o =
|
|
4761
|
+
let o = tc(s, e || {}, this);
|
|
4807
4762
|
if (i && (n && (n = i(n)), s && (s = i(s)), o && (o = i(o))), r) {
|
|
4808
|
-
|
|
4809
|
-
const a =
|
|
4763
|
+
Zl(this, s, o);
|
|
4764
|
+
const a = Eu(this, s, o, n);
|
|
4810
4765
|
n = a.transitionEnd, s = a.target;
|
|
4811
4766
|
}
|
|
4812
4767
|
return {
|
|
@@ -4816,10 +4771,10 @@ class bo extends Zu {
|
|
|
4816
4771
|
};
|
|
4817
4772
|
}
|
|
4818
4773
|
}
|
|
4819
|
-
function
|
|
4774
|
+
function Nu(t) {
|
|
4820
4775
|
return window.getComputedStyle(t);
|
|
4821
4776
|
}
|
|
4822
|
-
class
|
|
4777
|
+
class _u extends bo {
|
|
4823
4778
|
constructor() {
|
|
4824
4779
|
super(...arguments), this.type = "html";
|
|
4825
4780
|
}
|
|
@@ -4828,7 +4783,7 @@ class tf extends bo {
|
|
|
4828
4783
|
const s = vn(n);
|
|
4829
4784
|
return s && s.default || 0;
|
|
4830
4785
|
} else {
|
|
4831
|
-
const s =
|
|
4786
|
+
const s = Nu(e), i = (ai(n) ? s.getPropertyValue(n) : s[n]) || 0;
|
|
4832
4787
|
return typeof i == "string" ? i.trim() : i;
|
|
4833
4788
|
}
|
|
4834
4789
|
}
|
|
@@ -4852,7 +4807,7 @@ class tf extends bo {
|
|
|
4852
4807
|
di(e, n, s, i);
|
|
4853
4808
|
}
|
|
4854
4809
|
}
|
|
4855
|
-
class
|
|
4810
|
+
class Uu extends bo {
|
|
4856
4811
|
constructor() {
|
|
4857
4812
|
super(...arguments), this.type = "svg", this.isSVGTag = !1;
|
|
4858
4813
|
}
|
|
@@ -4864,54 +4819,54 @@ class ef extends bo {
|
|
|
4864
4819
|
const s = vn(n);
|
|
4865
4820
|
return s && s.default || 0;
|
|
4866
4821
|
}
|
|
4867
|
-
return n =
|
|
4822
|
+
return n = mi.has(n) ? n : on(n), e.getAttribute(n);
|
|
4868
4823
|
}
|
|
4869
4824
|
measureInstanceViewportBox() {
|
|
4870
|
-
return
|
|
4825
|
+
return B();
|
|
4871
4826
|
}
|
|
4872
4827
|
scrapeMotionValuesFromProps(e, n) {
|
|
4873
4828
|
return gi(e, n);
|
|
4874
4829
|
}
|
|
4875
4830
|
build(e, n, s, i) {
|
|
4876
|
-
|
|
4831
|
+
hn(e, n, s, this.isSVGTag, i.transformTemplate);
|
|
4877
4832
|
}
|
|
4878
4833
|
renderInstance(e, n, s, i) {
|
|
4879
|
-
|
|
4834
|
+
pi(e, n, s, i);
|
|
4880
4835
|
}
|
|
4881
4836
|
mount(e) {
|
|
4882
|
-
this.isSVGTag =
|
|
4837
|
+
this.isSVGTag = fn(e.tagName), super.mount(e);
|
|
4883
4838
|
}
|
|
4884
4839
|
}
|
|
4885
|
-
const
|
|
4840
|
+
const zu = (t, e) => ln(t) ? new Uu(e, { enableHardwareAcceleration: !1 }) : new _u(e, { enableHardwareAcceleration: !0 }), Wu = {
|
|
4886
4841
|
layout: {
|
|
4887
4842
|
ProjectionNode: go,
|
|
4888
4843
|
MeasureLayout: lo
|
|
4889
4844
|
}
|
|
4890
|
-
},
|
|
4891
|
-
...
|
|
4892
|
-
...
|
|
4893
|
-
...
|
|
4894
|
-
...
|
|
4895
|
-
}, Sn = /* @__PURE__ */
|
|
4845
|
+
}, Gu = {
|
|
4846
|
+
...pc,
|
|
4847
|
+
...Fa,
|
|
4848
|
+
...bu,
|
|
4849
|
+
...Wu
|
|
4850
|
+
}, Sn = /* @__PURE__ */ $r((t, e) => Aa(t, e, Gu, zu));
|
|
4896
4851
|
function Us(t) {
|
|
4897
4852
|
for (; t.startsWith("/"); )
|
|
4898
4853
|
t = t.slice(1);
|
|
4899
4854
|
return t;
|
|
4900
4855
|
}
|
|
4901
|
-
function
|
|
4856
|
+
function To(t, e, n = []) {
|
|
4902
4857
|
for (const s of t) {
|
|
4903
4858
|
if (console.log(s.path, e, s.path === e), Us(s.path || "") === Us(e))
|
|
4904
4859
|
return [...n, s];
|
|
4905
4860
|
if (s.children) {
|
|
4906
|
-
const i =
|
|
4861
|
+
const i = To(s.children, e, [...n, s]);
|
|
4907
4862
|
if (i)
|
|
4908
4863
|
return i;
|
|
4909
4864
|
}
|
|
4910
4865
|
}
|
|
4911
4866
|
return null;
|
|
4912
4867
|
}
|
|
4913
|
-
function
|
|
4914
|
-
return /* @__PURE__ */
|
|
4868
|
+
function $u(t) {
|
|
4869
|
+
return /* @__PURE__ */ P(
|
|
4915
4870
|
"svg",
|
|
4916
4871
|
{
|
|
4917
4872
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4920,7 +4875,7 @@ function rf(t) {
|
|
|
4920
4875
|
fill: "none",
|
|
4921
4876
|
viewBox: "0 0 18 20",
|
|
4922
4877
|
...t,
|
|
4923
|
-
children: /* @__PURE__ */
|
|
4878
|
+
children: /* @__PURE__ */ P(
|
|
4924
4879
|
"path",
|
|
4925
4880
|
{
|
|
4926
4881
|
fill: "#E01B00",
|
|
@@ -4932,38 +4887,38 @@ function rf(t) {
|
|
|
4932
4887
|
}
|
|
4933
4888
|
);
|
|
4934
4889
|
}
|
|
4935
|
-
function
|
|
4936
|
-
return /* @__PURE__ */
|
|
4890
|
+
function ih(t) {
|
|
4891
|
+
return /* @__PURE__ */ P(Hu, { ...t });
|
|
4937
4892
|
}
|
|
4938
|
-
function
|
|
4893
|
+
function Hu(t) {
|
|
4939
4894
|
const { baseUrl: e, menuPath: n } = t;
|
|
4940
4895
|
console.log("baseUrl:", e);
|
|
4941
|
-
const s =
|
|
4896
|
+
const s = _o();
|
|
4942
4897
|
console.log("location:", s);
|
|
4943
|
-
const [i, r] = ot([]), [o, a] = ot(!
|
|
4898
|
+
const [i, r] = ot([]), [o, a] = ot(!1), l = (To(i, s.pathname) || []).filter((y) => y.parentKey !== 0), [c, u] = ot({}), h = (y) => {
|
|
4944
4899
|
u({
|
|
4945
4900
|
...c,
|
|
4946
4901
|
[y]: !c[y]
|
|
4947
4902
|
});
|
|
4948
4903
|
};
|
|
4949
4904
|
console.log("matchPaths:", l);
|
|
4950
|
-
const
|
|
4905
|
+
const f = () => {
|
|
4951
4906
|
a(!o);
|
|
4952
4907
|
};
|
|
4953
4908
|
Wt(() => {
|
|
4954
4909
|
(async () => {
|
|
4955
|
-
const g = e + (n || "/global-menu-config/api/v1/menu-items"), x = await
|
|
4910
|
+
const g = e + (n || "/global-menu-config/api/v1/menu-items/user"), x = await zo.get(g, {
|
|
4956
4911
|
withCredentials: !0
|
|
4957
|
-
}).then((S) => S.data),
|
|
4912
|
+
}).then((S) => S.data), w = {};
|
|
4958
4913
|
x.forEach((S) => {
|
|
4959
|
-
S.children && (
|
|
4960
|
-
}), u(
|
|
4914
|
+
S.children && (w[S.id] = !0);
|
|
4915
|
+
}), u(w), r(x.map((S) => ({ ...S, parentKey: 0 })));
|
|
4961
4916
|
})();
|
|
4962
4917
|
}, [e, n]);
|
|
4963
|
-
const [d,
|
|
4964
|
-
window.location.href = `${e}/authentication/logout?callbackUrl=${window.location.
|
|
4918
|
+
const [d, m] = ot(!1), p = () => {
|
|
4919
|
+
window.location.href = `${e}/authentication/logout?callbackUrl=${window.location.href}`;
|
|
4965
4920
|
}, v = o ? "collapsed" : "expanded", b = (y) => `${y} ${v}`;
|
|
4966
|
-
return /* @__PURE__ */
|
|
4921
|
+
return /* @__PURE__ */ F(
|
|
4967
4922
|
Sn.nav,
|
|
4968
4923
|
{
|
|
4969
4924
|
initial: { width: "18rem" },
|
|
@@ -4971,44 +4926,44 @@ function af(t) {
|
|
|
4971
4926
|
transition: { duration: 0.3 },
|
|
4972
4927
|
className: b("side-bar"),
|
|
4973
4928
|
children: [
|
|
4974
|
-
/* @__PURE__ */
|
|
4975
|
-
/* @__PURE__ */
|
|
4976
|
-
/* @__PURE__ */
|
|
4929
|
+
/* @__PURE__ */ P("div", { className: "h-[8px]" }),
|
|
4930
|
+
/* @__PURE__ */ P("div", { className: b("side-bar__toggle-btn"), children: /* @__PURE__ */ P("button", { className: "icon-btn", onClick: f, children: o ? /* @__PURE__ */ P(Zs, {}) : /* @__PURE__ */ P(Qs, {}) }) }),
|
|
4931
|
+
/* @__PURE__ */ P(
|
|
4977
4932
|
"div",
|
|
4978
4933
|
{
|
|
4979
4934
|
id: "menu-items",
|
|
4980
|
-
className: "mt-6 overflow-y-auto overflow-x-hidden flex-1",
|
|
4981
|
-
children: i.map((y) => /* @__PURE__ */
|
|
4982
|
-
|
|
4935
|
+
className: b("mt-6 overflow-y-auto overflow-x-hidden flex-1"),
|
|
4936
|
+
children: i.map((y) => /* @__PURE__ */ P(
|
|
4937
|
+
Po,
|
|
4983
4938
|
{
|
|
4984
4939
|
item: y,
|
|
4985
|
-
isActive: (x) => l.some((
|
|
4940
|
+
isActive: (x) => l.some((w) => w.id === x),
|
|
4986
4941
|
isCollapsed: o,
|
|
4987
4942
|
expanded: (x) => c[x],
|
|
4988
|
-
toggleExpand:
|
|
4943
|
+
toggleExpand: h
|
|
4989
4944
|
},
|
|
4990
4945
|
y.id
|
|
4991
4946
|
))
|
|
4992
4947
|
}
|
|
4993
4948
|
),
|
|
4994
|
-
/* @__PURE__ */
|
|
4995
|
-
/* @__PURE__ */
|
|
4949
|
+
/* @__PURE__ */ F("div", { className: "w-full mt-10 mb-10", children: [
|
|
4950
|
+
/* @__PURE__ */ F(
|
|
4996
4951
|
"button",
|
|
4997
4952
|
{
|
|
4998
4953
|
className: b("side-bar__logout-btn"),
|
|
4999
|
-
onClick: () =>
|
|
4954
|
+
onClick: () => m(!0),
|
|
5000
4955
|
children: [
|
|
5001
|
-
/* @__PURE__ */
|
|
5002
|
-
/* @__PURE__ */
|
|
4956
|
+
/* @__PURE__ */ P($u, {}),
|
|
4957
|
+
/* @__PURE__ */ P("span", { className: `ml-3 ${o ? "hidden" : ""}`, children: "Logout" })
|
|
5003
4958
|
]
|
|
5004
4959
|
}
|
|
5005
4960
|
),
|
|
5006
|
-
/* @__PURE__ */
|
|
5007
|
-
|
|
4961
|
+
/* @__PURE__ */ P(
|
|
4962
|
+
$s,
|
|
5008
4963
|
{
|
|
5009
4964
|
isOpen: d,
|
|
5010
|
-
onClose: () =>
|
|
5011
|
-
onConfirm:
|
|
4965
|
+
onClose: () => m(!1),
|
|
4966
|
+
onConfirm: p
|
|
5012
4967
|
}
|
|
5013
4968
|
)
|
|
5014
4969
|
] })
|
|
@@ -5016,18 +4971,18 @@ function af(t) {
|
|
|
5016
4971
|
}
|
|
5017
4972
|
);
|
|
5018
4973
|
}
|
|
5019
|
-
function
|
|
4974
|
+
function Po({ item: t, level: e = 0, ...n }) {
|
|
5020
4975
|
var v;
|
|
5021
|
-
const { isActive: s, isCollapsed: i, expanded: r, toggleExpand: o } = n, a = `level-${e}`, l = i ? "collapsed" : "expanded", c = s(t.id) ? "active" : "", u = (b, y = a) => `${b} ${y} ${l} ${c}`,
|
|
5022
|
-
function
|
|
5023
|
-
var
|
|
4976
|
+
const { isActive: s, isCollapsed: i, expanded: r, toggleExpand: o } = n, a = `level-${e}`, l = i ? "collapsed" : "expanded", c = s(t.id) ? "active" : "", u = (b, y = a) => `${b} ${y} ${l} ${c}`, h = !!((v = t.children) != null && v.length), [f, d] = ot(!1), m = St();
|
|
4977
|
+
function p(b) {
|
|
4978
|
+
var w;
|
|
5024
4979
|
const { level: y, hovered: g, parentRef: x } = b;
|
|
5025
|
-
return !
|
|
5026
|
-
|
|
4980
|
+
return !h || i && y >= 2 && !g ? null : /* @__PURE__ */ P(
|
|
4981
|
+
qu,
|
|
5027
4982
|
{
|
|
5028
4983
|
parentRef: x,
|
|
5029
4984
|
onlyChild: !i || i && y < 2,
|
|
5030
|
-
children: /* @__PURE__ */
|
|
4985
|
+
children: /* @__PURE__ */ P(
|
|
5031
4986
|
Sn.div,
|
|
5032
4987
|
{
|
|
5033
4988
|
className: u("menu-item__dropdown", `level-${y}`),
|
|
@@ -5036,34 +4991,34 @@ function To({ item: t, level: e = 0, ...n }) {
|
|
|
5036
4991
|
height: i || r(t.id) ? "auto" : 0
|
|
5037
4992
|
},
|
|
5038
4993
|
transition: { duration: 0.2 },
|
|
5039
|
-
children: (
|
|
4994
|
+
children: (w = t.children) == null ? void 0 : w.map((S) => /* @__PURE__ */ Gs(Po, { ...n, key: S.id, item: S, level: y }))
|
|
5040
4995
|
},
|
|
5041
4996
|
+i
|
|
5042
4997
|
)
|
|
5043
4998
|
}
|
|
5044
4999
|
);
|
|
5045
5000
|
}
|
|
5046
|
-
return /* @__PURE__ */
|
|
5001
|
+
return /* @__PURE__ */ F(
|
|
5047
5002
|
"div",
|
|
5048
5003
|
{
|
|
5049
|
-
ref:
|
|
5004
|
+
ref: m,
|
|
5050
5005
|
className: u("menu-item__wrapper"),
|
|
5051
5006
|
onMouseEnter: () => i && d(!0),
|
|
5052
5007
|
onMouseLeave: () => i && d(!1),
|
|
5053
5008
|
children: [
|
|
5054
|
-
/* @__PURE__ */
|
|
5055
|
-
|
|
5009
|
+
/* @__PURE__ */ F(
|
|
5010
|
+
Uo,
|
|
5056
5011
|
{
|
|
5057
|
-
to:
|
|
5012
|
+
to: h ? "#" : t.path || "#",
|
|
5058
5013
|
style: {
|
|
5059
5014
|
paddingLeft: `${i ? "0.5rem" : `${e * 1}rem`}`
|
|
5060
5015
|
},
|
|
5061
5016
|
className: u("menu-item__link"),
|
|
5062
5017
|
onClick: () => {
|
|
5063
|
-
|
|
5018
|
+
h && !i && o(t.id);
|
|
5064
5019
|
},
|
|
5065
5020
|
children: [
|
|
5066
|
-
e !== 0 && /* @__PURE__ */
|
|
5021
|
+
e !== 0 && /* @__PURE__ */ P("div", { className: u("menu-item__icon"), children: /* @__PURE__ */ P(
|
|
5067
5022
|
"img",
|
|
5068
5023
|
{
|
|
5069
5024
|
src: t.icon || "/",
|
|
@@ -5071,12 +5026,8 @@ function To({ item: t, level: e = 0, ...n }) {
|
|
|
5071
5026
|
style: { height: 24, maxHeight: 24 }
|
|
5072
5027
|
}
|
|
5073
5028
|
) }),
|
|
5074
|
-
/* @__PURE__ */
|
|
5075
|
-
|
|
5076
|
-
" ",
|
|
5077
|
-
t.name
|
|
5078
|
-
] }),
|
|
5079
|
-
f && /* @__PURE__ */ T("div", { className: u("menu-item__icon-arrow__wrapper"), children: /* @__PURE__ */ T(
|
|
5029
|
+
/* @__PURE__ */ P("span", { className: u("menu-item__label"), children: t.name }),
|
|
5030
|
+
h && /* @__PURE__ */ P("div", { className: u("menu-item__icon-arrow__wrapper"), children: /* @__PURE__ */ P(
|
|
5080
5031
|
Xs,
|
|
5081
5032
|
{
|
|
5082
5033
|
className: u(
|
|
@@ -5088,13 +5039,13 @@ function To({ item: t, level: e = 0, ...n }) {
|
|
|
5088
5039
|
]
|
|
5089
5040
|
}
|
|
5090
5041
|
),
|
|
5091
|
-
|
|
5042
|
+
p({ level: e + 1, hovered: f, parentRef: m })
|
|
5092
5043
|
]
|
|
5093
5044
|
},
|
|
5094
5045
|
t.id
|
|
5095
5046
|
);
|
|
5096
5047
|
}
|
|
5097
|
-
function
|
|
5048
|
+
function qu(t) {
|
|
5098
5049
|
const { children: e, parentRef: n, onlyChild: s } = t, [i, r] = ot({ top: 0, left: 0 });
|
|
5099
5050
|
return Ws(() => {
|
|
5100
5051
|
if (n.current) {
|
|
@@ -5104,8 +5055,8 @@ function lf(t) {
|
|
|
5104
5055
|
left: o.left + o.width
|
|
5105
5056
|
});
|
|
5106
5057
|
}
|
|
5107
|
-
}, [n]), s ? e :
|
|
5108
|
-
/* @__PURE__ */
|
|
5058
|
+
}, [n]), s ? e : No(
|
|
5059
|
+
/* @__PURE__ */ P(
|
|
5109
5060
|
Sn.div,
|
|
5110
5061
|
{
|
|
5111
5062
|
style: {
|
|
@@ -5120,6 +5071,6 @@ function lf(t) {
|
|
|
5120
5071
|
);
|
|
5121
5072
|
}
|
|
5122
5073
|
export {
|
|
5123
|
-
|
|
5124
|
-
|
|
5074
|
+
ih as GlobalMenu,
|
|
5075
|
+
nh as TopBar
|
|
5125
5076
|
};
|