@versini/sassysaint 8.119.3 → 8.119.4
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/chunks/{AboutChangelog.BCLzrxDJ.js → AboutChangelog.CeSrouli.js} +2 -2
- package/dist/chunks/{AboutEntry.CiKVa-DF.js → AboutEntry.CrK4XtgT.js} +7 -7
- package/dist/chunks/{App.B9QnUXlt.js → App.DcDEUBuD.js} +16 -16
- package/dist/chunks/{BubbleActions.D4umTJGB.js → BubbleActions.BOvHMRWW.js} +3 -3
- package/dist/chunks/{ButtonIconDelete.aOa-U89v.js → ButtonIconDelete.CwOzfrIz.js} +2 -2
- package/dist/chunks/{Chart.C5Nn82Gw.js → Chart.BMS_Y_9I.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.D02rGmpy.js → ChatBubbleAssistant.CdT8ma44.js} +869 -833
- package/dist/chunks/{ChatBubbleUser.Dzhjj2hz.js → ChatBubbleUser.C0lbTxfj.js} +4 -4
- package/dist/chunks/{HistoryDataGrid.B6LLRpB1.js → HistoryDataGrid.3kWoF-Yb.js} +4 -4
- package/dist/chunks/{HistoryEntry.BkPbemHy.js → HistoryEntry.DzlvBErP.js} +5 -5
- package/dist/chunks/{InlineFilter.B0qDNMUB.js → InlineFilter.D_Ayt_FY.js} +3 -3
- package/dist/chunks/{LoginEntry.B_9BLbxz.js → LoginEntry.3tVgvVbO.js} +4 -4
- package/dist/chunks/{LogoEntry.NR86cusR.js → LogoEntry.BqUI0xQJ.js} +1 -1
- package/dist/chunks/{MemoriesEntry.BNQ1Zd_f.js → MemoriesEntry.DIW3CmlL.js} +6 -6
- package/dist/chunks/{ProfileEntry.DHXtGymT.js → ProfileEntry.7GS1HjI4.js} +4 -4
- package/dist/chunks/{SettingsEntry.C7V7Gazu.js → SettingsEntry.jNyi-fMX.js} +5 -5
- package/dist/chunks/{UsageEntry.CTiwaF8P.js → UsageEntry.w9i8O-eB.js} +5 -5
- package/dist/chunks/{_baseUniq.DOp1d0Hg.js → _baseUniq.BH3YHKEs.js} +1 -1
- package/dist/chunks/{arc.D7x_tqxd.js → arc.CVUip_pm.js} +1 -1
- package/dist/chunks/{architecture-U656AL7Q.Bu5SZlv8.js → architecture-U656AL7Q.DbIt0VTU.js} +1 -1
- package/dist/chunks/{architectureDiagram-VXUJARFQ.Dgz17ttm.js → architectureDiagram-VXUJARFQ.BAEAYJyU.js} +4 -4
- package/dist/chunks/{blockDiagram-VD42YOAC.DaJq4zX4.js → blockDiagram-VD42YOAC.BGKlBm-g.js} +5 -5
- package/dist/chunks/{browser.DGyy4kkY.js → browser.DrZ79d6G.js} +1 -1
- package/dist/chunks/{c4Diagram-YG6GDRKO.BsmLbddK.js → c4Diagram-YG6GDRKO.rtG-L2XB.js} +2 -2
- package/dist/chunks/{channel.DcTDnG-B.js → channel.LgVYTJ20.js} +1 -1
- package/dist/chunks/{chunk-4BX2VUAB.KCzBOk4e.js → chunk-4BX2VUAB.DfeK6JZm.js} +1 -1
- package/dist/chunks/{chunk-55IACEB6.816u7G9J.js → chunk-55IACEB6.CpSocNkP.js} +1 -1
- package/dist/chunks/{chunk-B4BG7PRW.BJSUTzN8.js → chunk-B4BG7PRW.BC8Duvia.js} +4 -4
- package/dist/chunks/{chunk-DI55MBZ5.K6Eg9Ewh.js → chunk-DI55MBZ5.9CY8aikM.js} +3 -3
- package/dist/chunks/{chunk-FMBD7UC4.Cgtm-0uZ.js → chunk-FMBD7UC4.B5y9gqvT.js} +1 -1
- package/dist/chunks/{chunk-QN33PNHL.B4arjH5h.js → chunk-QN33PNHL.B32OWrf1.js} +1 -1
- package/dist/chunks/{chunk-QZHKN3VN.DfnFISTN.js → chunk-QZHKN3VN.D-tflsrL.js} +1 -1
- package/dist/chunks/{chunk-TZMSLE5B.DuNUGzDY.js → chunk-TZMSLE5B.DXZAIAfk.js} +1 -1
- package/dist/chunks/{classDiagram-2ON5EDUG.CFNbyq85.js → classDiagram-2ON5EDUG.BeK8hj4G.js} +2 -2
- package/dist/chunks/{classDiagram-v2-WZHVMYZB.CFNbyq85.js → classDiagram-v2-WZHVMYZB.BeK8hj4G.js} +2 -2
- package/dist/chunks/{clone.DXxEN8I0.js → clone.C7FHEXHM.js} +1 -1
- package/dist/chunks/{cose-bilkent-S5V4N54A.3TJjWC3c.js → cose-bilkent-S5V4N54A.BarQsfhD.js} +2 -2
- package/dist/chunks/{dagre-6UL2VRFP.ZVeC3nBp.js → dagre-6UL2VRFP.DcB_bHG7.js} +5 -5
- package/dist/chunks/{diagram-PSM6KHXK.CpdBtqTh.js → diagram-PSM6KHXK.v5_zpHPq.js} +4 -4
- package/dist/chunks/{diagram-QEK2KX5R.B04_vXer.js → diagram-QEK2KX5R.B0FVJb63.js} +3 -3
- package/dist/chunks/{diagram-S2PKOQOG.Dbdw3QXQ.js → diagram-S2PKOQOG.9d7YNek6.js} +3 -3
- package/dist/chunks/{erDiagram-Q2GNP2WA.CqezK60q.js → erDiagram-Q2GNP2WA.DW2pZOen.js} +4 -4
- package/dist/chunks/{flowDiagram-NV44I4VS.BvHoG3bZ.js → flowDiagram-NV44I4VS.BzEXeewQ.js} +5 -5
- package/dist/chunks/{ganttDiagram-JELNMOA3.D_KCS9qC.js → ganttDiagram-JELNMOA3.DFybNGqB.js} +2 -2
- package/dist/chunks/{gitGraph-F6HP7TQM.ByZT89Ar.js → gitGraph-F6HP7TQM.BsiH1w7p.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-NY62KEGX.WbjMSd4V.js → gitGraphDiagram-NY62KEGX.D-GUMmXw.js} +4 -4
- package/dist/chunks/{graph.Cvad0tt4.js → graph.D1HPWUH-.js} +2 -2
- package/dist/chunks/{index.B-K-Y-Qm.js → index.3dWkZhjZ.js} +1 -1
- package/dist/chunks/{index.B-fz6g96.js → index.BGeec7q_.js} +1 -1
- package/dist/chunks/{index.Ddfm91zT.js → index.Byf71iDV.js} +3 -3
- package/dist/chunks/{index.D0i6HSU_.js → index.DKwiFV1d.js} +1 -1
- package/dist/chunks/{index.BHQGsyIo.js → index.DfMDe1-P.js} +1 -1
- package/dist/chunks/{index.BCRwO2M-.js → index.IxikjIQt.js} +3 -3
- package/dist/chunks/{index.YJUe_Cuy.js → index.XKxWN3lN.js} +1 -1
- package/dist/chunks/{index.BrCTBC0V.js → index.bfSa4Oqr.js} +2 -2
- package/dist/chunks/{index.uFNowuqv.js → index.n2mR6f6N.js} +1 -1
- package/dist/chunks/{info-NVLQJR56.ZKVDUcsk.js → info-NVLQJR56.B14KCPbn.js} +1 -1
- package/dist/chunks/{infoDiagram-WHAUD3N6.CvdcZadh.js → infoDiagram-WHAUD3N6.B77NBmIJ.js} +2 -2
- package/dist/chunks/{journeyDiagram-XKPGCS4Q.DGAoDEq-.js → journeyDiagram-XKPGCS4Q.BlrxXwZ-.js} +4 -4
- package/dist/chunks/{kanban-definition-3W4ZIXB7.CoFmbRaA.js → kanban-definition-3W4ZIXB7.j2l6lLXR.js} +2 -2
- package/dist/chunks/{layout.hhpeizjh.js → layout.6lkAA8v9.js} +4 -4
- package/dist/chunks/{mermaid-parser.core.CZD6iB9l.js → mermaid-parser.core.DBhUMI2Q.js} +10 -10
- package/dist/chunks/{min.D97zlk-h.js → min.BU0eEwjE.js} +2 -2
- package/dist/chunks/{mindmap-definition-VGOIOE7T.B7p0yJz3.js → mindmap-definition-VGOIOE7T.CuUsX8t3.js} +3 -3
- package/dist/chunks/{packet-BFZMPI3H.Cjaup6NR.js → packet-BFZMPI3H.CvdSbDdd.js} +1 -1
- package/dist/chunks/{pie-7BOR55EZ.c81pXzSK.js → pie-7BOR55EZ.D_3dFmf2.js} +1 -1
- package/dist/chunks/{pieDiagram-ADFJNKIX.zyXeeZLx.js → pieDiagram-ADFJNKIX.Cp2NP34H.js} +4 -4
- package/dist/chunks/{quadrantDiagram-AYHSOK5B.DR3wcKEK.js → quadrantDiagram-AYHSOK5B.DWwFFqTp.js} +1 -1
- package/dist/chunks/{radar-NHE76QYJ.lf63PaYs.js → radar-NHE76QYJ.DntSY9Qd.js} +1 -1
- package/dist/chunks/{rehype-mermaid._1aNKYDN.js → rehype-mermaid.kMjmz43g.js} +33 -33
- package/dist/chunks/{requirementDiagram-UZGBJVZJ.C94QhxCQ.js → requirementDiagram-UZGBJVZJ.DifXxwL-.js} +3 -3
- package/dist/chunks/{sankeyDiagram-TZEHDZUN.jvqFVwPh.js → sankeyDiagram-TZEHDZUN.BPl93QVq.js} +1 -1
- package/dist/chunks/{sequenceDiagram-WL72ISMW.Bq5ALSwU.js → sequenceDiagram-WL72ISMW.BKH5QH3F.js} +3 -3
- package/dist/chunks/{stateDiagram-FKZM4ZOC.BgoNYp65.js → stateDiagram-FKZM4ZOC.DOqiiFz_.js} +4 -4
- package/dist/chunks/{stateDiagram-v2-4FDKWEC3.CZER9V0p.js → stateDiagram-v2-4FDKWEC3.FfXgrfuT.js} +2 -2
- package/dist/chunks/{timeline-definition-IT6M3QCI.D5lfOytX.js → timeline-definition-IT6M3QCI.CxB0PunY.js} +2 -2
- package/dist/chunks/{treemap-KMMF4GRG.h5XUyc_o.js → treemap-KMMF4GRG.Bv_6LuNA.js} +1 -1
- package/dist/chunks/{useMarkdown.D5uoWBI6.js → useMarkdown.F2D4g88e.js} +8 -8
- package/dist/chunks/{xychartDiagram-PRI3JC2R.BIOs5AtO.js → xychartDiagram-PRI3JC2R.DYlYfz3Y.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +3 -3
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { n as
|
|
3
|
-
import { numberFormatter as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useMarkdown as
|
|
7
|
-
import { ChatContext as
|
|
8
|
-
import { BubbleActions as
|
|
1
|
+
import { jsx as St } from "react/jsx-runtime";
|
|
2
|
+
import { n as os, useUserPreferences as ls, formatTimestamp as Vt } from "./index.bfSa4Oqr.js";
|
|
3
|
+
import { numberFormatter as us, pluralize as cs, Bubble as fs } from "./App.DcDEUBuD.js";
|
|
4
|
+
import Jt from "clsx";
|
|
5
|
+
import hs, { useState as Ae, useEffect as Qt, useContext as wt } from "react";
|
|
6
|
+
import { useMarkdown as ds } from "./useMarkdown.F2D4g88e.js";
|
|
7
|
+
import { ChatContext as ms, AppContext as ps } from "./LogoEntry.BqUI0xQJ.js";
|
|
8
|
+
import { BubbleActions as gs } from "./BubbleActions.BOvHMRWW.js";
|
|
9
9
|
const Me = {
|
|
10
10
|
isEmpty: !0
|
|
11
11
|
};
|
|
12
|
-
function
|
|
12
|
+
function ys(e, t) {
|
|
13
13
|
e.indexOf(t) === -1 && e.push(t);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function en(e, t) {
|
|
16
16
|
const n = e.indexOf(t);
|
|
17
17
|
n > -1 && e.splice(n, 1);
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
function
|
|
19
|
+
const _ = (e, t, n) => n > t ? t : n < e ? e : n;
|
|
20
|
+
function Oe(e, t) {
|
|
21
21
|
return t ? `${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}` : e;
|
|
22
22
|
}
|
|
23
23
|
let de = () => {
|
|
24
|
-
},
|
|
24
|
+
}, B = () => {
|
|
25
25
|
};
|
|
26
|
-
process.env
|
|
27
|
-
!e && typeof console < "u" && console.warn(
|
|
28
|
-
},
|
|
26
|
+
typeof process < "u" && process.env?.NODE_ENV !== "production" && (de = (e, t, n) => {
|
|
27
|
+
!e && typeof console < "u" && console.warn(Oe(t, n));
|
|
28
|
+
}, B = (e, t, n) => {
|
|
29
29
|
if (!e)
|
|
30
|
-
throw new Error(
|
|
30
|
+
throw new Error(Oe(t, n));
|
|
31
31
|
});
|
|
32
|
-
const
|
|
33
|
-
function
|
|
32
|
+
const N = {}, tn = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);
|
|
33
|
+
function bs(e) {
|
|
34
34
|
return typeof e == "object" && e !== null;
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const nn = (e) => /^0[^.\s]+$/u.test(e);
|
|
37
37
|
// @__NO_SIDE_EFFECTS__
|
|
38
|
-
function
|
|
38
|
+
function He(e) {
|
|
39
39
|
let t;
|
|
40
40
|
return () => (t === void 0 && (t = e()), t);
|
|
41
41
|
}
|
|
42
|
-
const H = /* @__NO_SIDE_EFFECTS__ */ (e) => e,
|
|
42
|
+
const H = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Ts = (e, t) => (n) => t(e(n)), Ze = (...e) => e.reduce(Ts), Je = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
|
|
43
43
|
const s = t - e;
|
|
44
44
|
return s === 0 ? 1 : (n - e) / s;
|
|
45
45
|
};
|
|
46
|
-
class
|
|
46
|
+
class sn {
|
|
47
47
|
constructor() {
|
|
48
48
|
this.subscriptions = [];
|
|
49
49
|
}
|
|
50
50
|
add(t) {
|
|
51
|
-
return
|
|
51
|
+
return ys(this.subscriptions, t), () => en(this.subscriptions, t);
|
|
52
52
|
}
|
|
53
53
|
notify(t, n, s) {
|
|
54
54
|
const i = this.subscriptions.length;
|
|
@@ -68,54 +68,54 @@ class nn {
|
|
|
68
68
|
this.subscriptions.length = 0;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
const
|
|
72
|
-
function
|
|
71
|
+
const k = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, P = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
|
|
72
|
+
function rn(e, t) {
|
|
73
73
|
return t ? e * (1e3 / t) : 0;
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
function
|
|
77
|
-
e ||
|
|
75
|
+
const xt = /* @__PURE__ */ new Set();
|
|
76
|
+
function an(e, t, n) {
|
|
77
|
+
e || xt.has(t) || (console.warn(Oe(t, n)), xt.add(t));
|
|
78
78
|
}
|
|
79
|
-
const
|
|
79
|
+
const vs = (e, t, n) => {
|
|
80
80
|
const s = t - e;
|
|
81
81
|
return ((n - e) % s + s) % s + e;
|
|
82
|
-
},
|
|
83
|
-
function
|
|
82
|
+
}, on = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, Ss = 1e-7, Vs = 12;
|
|
83
|
+
function ws(e, t, n, s, i) {
|
|
84
84
|
let r, a, o = 0;
|
|
85
85
|
do
|
|
86
|
-
a = t + (n - t) / 2, r =
|
|
87
|
-
while (Math.abs(r) >
|
|
86
|
+
a = t + (n - t) / 2, r = on(a, s, i) - e, r > 0 ? n = a : t = a;
|
|
87
|
+
while (Math.abs(r) > Ss && ++o < Vs);
|
|
88
88
|
return a;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function me(e, t, n, s) {
|
|
91
91
|
if (e === t && n === s)
|
|
92
92
|
return H;
|
|
93
|
-
const i = (r) =>
|
|
94
|
-
return (r) => r === 0 || r === 1 ? r :
|
|
93
|
+
const i = (r) => ws(r, 0, 1, e, n);
|
|
94
|
+
return (r) => r === 0 || r === 1 ? r : on(i(r), t, s);
|
|
95
95
|
}
|
|
96
|
-
const
|
|
97
|
-
function
|
|
98
|
-
return pn(e) ? e[
|
|
96
|
+
const ln = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, un = (e) => (t) => 1 - e(1 - t), cn = /* @__PURE__ */ me(0.33, 1.53, 0.69, 0.99), Qe = /* @__PURE__ */ un(cn), fn = /* @__PURE__ */ ln(Qe), hn = (e) => (e *= 2) < 1 ? 0.5 * Qe(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), et = (e) => 1 - Math.sin(Math.acos(e)), xs = un(et), dn = ln(et), As = /* @__PURE__ */ me(0.42, 0, 1, 1), Ms = /* @__PURE__ */ me(0, 0, 0.58, 1), mn = /* @__PURE__ */ me(0.42, 0, 0.58, 1), pn = (e) => Array.isArray(e) && typeof e[0] != "number";
|
|
97
|
+
function gn(e, t) {
|
|
98
|
+
return pn(e) ? e[vs(0, e.length, t)] : e;
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const yn = (e) => Array.isArray(e) && typeof e[0] == "number", At = {
|
|
101
101
|
linear: H,
|
|
102
|
-
easeIn:
|
|
103
|
-
easeInOut:
|
|
104
|
-
easeOut:
|
|
105
|
-
circIn:
|
|
106
|
-
circInOut:
|
|
107
|
-
circOut:
|
|
108
|
-
backIn:
|
|
109
|
-
backInOut:
|
|
110
|
-
backOut:
|
|
111
|
-
anticipate:
|
|
112
|
-
},
|
|
113
|
-
if (
|
|
114
|
-
|
|
102
|
+
easeIn: As,
|
|
103
|
+
easeInOut: mn,
|
|
104
|
+
easeOut: Ms,
|
|
105
|
+
circIn: et,
|
|
106
|
+
circInOut: dn,
|
|
107
|
+
circOut: xs,
|
|
108
|
+
backIn: Qe,
|
|
109
|
+
backInOut: fn,
|
|
110
|
+
backOut: cn,
|
|
111
|
+
anticipate: hn
|
|
112
|
+
}, Cs = (e) => typeof e == "string", Mt = (e) => {
|
|
113
|
+
if (yn(e)) {
|
|
114
|
+
B(e.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
115
115
|
const [t, n, s, i] = e;
|
|
116
|
-
return
|
|
117
|
-
} else if (
|
|
118
|
-
return
|
|
116
|
+
return me(t, n, s, i);
|
|
117
|
+
} else if (Cs(e))
|
|
118
|
+
return B(At[e] !== void 0, `Invalid easing type '${e}'`, "invalid-easing-type"), At[e];
|
|
119
119
|
return e;
|
|
120
120
|
}, be = [
|
|
121
121
|
"setup",
|
|
@@ -135,7 +135,7 @@ const gn = (e) => Array.isArray(e) && typeof e[0] == "number", xt = {
|
|
|
135
135
|
"postRender"
|
|
136
136
|
// Compute
|
|
137
137
|
];
|
|
138
|
-
function
|
|
138
|
+
function Ds(e, t) {
|
|
139
139
|
let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = !1, r = !1;
|
|
140
140
|
const a = /* @__PURE__ */ new WeakSet();
|
|
141
141
|
let o = {
|
|
@@ -143,100 +143,104 @@ function Cs(e, t) {
|
|
|
143
143
|
timestamp: 0,
|
|
144
144
|
isProcessing: !1
|
|
145
145
|
};
|
|
146
|
-
function l
|
|
147
|
-
a.has(
|
|
146
|
+
function u(l) {
|
|
147
|
+
a.has(l) && (c.schedule(l), e()), l(o);
|
|
148
148
|
}
|
|
149
149
|
const c = {
|
|
150
150
|
/**
|
|
151
151
|
* Schedule a process to run on the next frame.
|
|
152
152
|
*/
|
|
153
|
-
schedule: (
|
|
154
|
-
const
|
|
155
|
-
return f && a.add(
|
|
153
|
+
schedule: (l, f = !1, h = !1) => {
|
|
154
|
+
const g = h && i ? n : s;
|
|
155
|
+
return f && a.add(l), g.has(l) || g.add(l), l;
|
|
156
156
|
},
|
|
157
157
|
/**
|
|
158
158
|
* Cancel the provided callback from running on the next frame.
|
|
159
159
|
*/
|
|
160
|
-
cancel: (
|
|
161
|
-
s.delete(
|
|
160
|
+
cancel: (l) => {
|
|
161
|
+
s.delete(l), a.delete(l);
|
|
162
162
|
},
|
|
163
163
|
/**
|
|
164
164
|
* Execute all schedule callbacks.
|
|
165
165
|
*/
|
|
166
|
-
process: (
|
|
167
|
-
if (o =
|
|
166
|
+
process: (l) => {
|
|
167
|
+
if (o = l, i) {
|
|
168
168
|
r = !0;
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
|
-
i = !0, [n, s] = [s, n], n.forEach(
|
|
171
|
+
i = !0, [n, s] = [s, n], n.forEach(u), n.clear(), i = !1, r && (r = !1, c.process(l));
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
174
|
return c;
|
|
175
175
|
}
|
|
176
|
-
const
|
|
177
|
-
function
|
|
176
|
+
const Fs = 40;
|
|
177
|
+
function bn(e, t) {
|
|
178
178
|
let n = !1, s = !0;
|
|
179
179
|
const i = {
|
|
180
180
|
delta: 0,
|
|
181
181
|
timestamp: 0,
|
|
182
182
|
isProcessing: !1
|
|
183
|
-
}, r = () => n = !0, a = be.reduce((
|
|
184
|
-
const
|
|
185
|
-
n = !1,
|
|
186
|
-
},
|
|
183
|
+
}, r = () => n = !0, a = be.reduce((V, w) => (V[w] = Ds(r), V), {}), { setup: o, read: u, resolveKeyframes: c, preUpdate: l, update: f, preRender: h, render: p, postRender: g } = a, T = () => {
|
|
184
|
+
const V = N.useManualTiming ? i.timestamp : performance.now();
|
|
185
|
+
n = !1, N.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(V - i.timestamp, Fs), 1)), i.timestamp = V, i.isProcessing = !0, o.process(i), u.process(i), c.process(i), l.process(i), f.process(i), h.process(i), p.process(i), g.process(i), i.isProcessing = !1, n && t && (s = !1, e(T));
|
|
186
|
+
}, S = () => {
|
|
187
187
|
n = !0, s = !0, i.isProcessing || e(T);
|
|
188
188
|
};
|
|
189
|
-
return { schedule: be.reduce((
|
|
190
|
-
const
|
|
191
|
-
return
|
|
192
|
-
}, {}), cancel: (
|
|
189
|
+
return { schedule: be.reduce((V, w) => {
|
|
190
|
+
const m = a[w];
|
|
191
|
+
return V[w] = (y, M = !1, b = !1) => (n || S(), m.schedule(y, M, b)), V;
|
|
192
|
+
}, {}), cancel: (V) => {
|
|
193
193
|
for (let w = 0; w < be.length; w++)
|
|
194
|
-
a[be[w]].cancel(
|
|
194
|
+
a[be[w]].cancel(V);
|
|
195
195
|
}, state: i, steps: a };
|
|
196
196
|
}
|
|
197
|
-
const { schedule: K, cancel:
|
|
197
|
+
const { schedule: K, cancel: ke, state: Se } = /* @__PURE__ */ bn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : H, !0);
|
|
198
198
|
let ve;
|
|
199
|
-
function
|
|
199
|
+
function Es() {
|
|
200
200
|
ve = void 0;
|
|
201
201
|
}
|
|
202
202
|
const R = {
|
|
203
|
-
now: () => (ve === void 0 && R.set(
|
|
203
|
+
now: () => (ve === void 0 && R.set(Se.isProcessing || N.useManualTiming ? Se.timestamp : performance.now()), ve),
|
|
204
204
|
set: (e) => {
|
|
205
|
-
ve = e, queueMicrotask(
|
|
205
|
+
ve = e, queueMicrotask(Es);
|
|
206
206
|
}
|
|
207
|
-
},
|
|
207
|
+
}, Tn = (e) => (t) => typeof t == "string" && t.startsWith(e), vn = /* @__PURE__ */ Tn("--"), Rs = /* @__PURE__ */ Tn("var(--"), tt = (e) => Rs(e) ? Ps.test(e.split("/*")[0].trim()) : !1, Ps = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
208
|
+
function Ct(e) {
|
|
209
|
+
return typeof e != "string" ? !1 : e.split("/*")[0].includes("var(--");
|
|
210
|
+
}
|
|
211
|
+
const Z = {
|
|
208
212
|
test: (e) => typeof e == "number",
|
|
209
213
|
parse: parseFloat,
|
|
210
214
|
transform: (e) => e
|
|
211
215
|
}, le = {
|
|
212
216
|
...Z,
|
|
213
|
-
transform: (e) =>
|
|
217
|
+
transform: (e) => _(0, 1, e)
|
|
214
218
|
}, Te = {
|
|
215
219
|
...Z,
|
|
216
220
|
default: 1
|
|
217
|
-
}, oe = (e) => Math.round(e * 1e5) / 1e5,
|
|
218
|
-
function
|
|
221
|
+
}, oe = (e) => Math.round(e * 1e5) / 1e5, nt = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
222
|
+
function Os(e) {
|
|
219
223
|
return e == null;
|
|
220
224
|
}
|
|
221
|
-
const
|
|
225
|
+
const ks = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, st = (e, t) => (n) => !!(typeof n == "string" && ks.test(n) && n.startsWith(e) || t && !Os(n) && Object.prototype.hasOwnProperty.call(n, t)), Sn = (e, t, n) => (s) => {
|
|
222
226
|
if (typeof s != "string")
|
|
223
227
|
return s;
|
|
224
|
-
const [i, r, a, o] = s.match(
|
|
228
|
+
const [i, r, a, o] = s.match(nt);
|
|
225
229
|
return {
|
|
226
230
|
[e]: parseFloat(i),
|
|
227
231
|
[t]: parseFloat(r),
|
|
228
232
|
[n]: parseFloat(a),
|
|
229
233
|
alpha: o !== void 0 ? parseFloat(o) : 1
|
|
230
234
|
};
|
|
231
|
-
},
|
|
235
|
+
}, Bs = (e) => _(0, 255, e), Ce = {
|
|
232
236
|
...Z,
|
|
233
|
-
transform: (e) => Math.round(
|
|
234
|
-
},
|
|
235
|
-
test: /* @__PURE__ */
|
|
236
|
-
parse: /* @__PURE__ */
|
|
237
|
+
transform: (e) => Math.round(Bs(e))
|
|
238
|
+
}, U = {
|
|
239
|
+
test: /* @__PURE__ */ st("rgb", "red"),
|
|
240
|
+
parse: /* @__PURE__ */ Sn("red", "green", "blue"),
|
|
237
241
|
transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Ce.transform(e) + ", " + Ce.transform(t) + ", " + Ce.transform(n) + ", " + oe(le.transform(s)) + ")"
|
|
238
242
|
};
|
|
239
|
-
function
|
|
243
|
+
function Is(e) {
|
|
240
244
|
let t = "", n = "", s = "", i = "";
|
|
241
245
|
return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), s = e.substring(5, 7), i = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), s = e.substring(3, 4), i = e.substring(4, 5), t += t, n += n, s += s, i += i), {
|
|
242
246
|
red: parseInt(t, 16),
|
|
@@ -245,35 +249,35 @@ function ks(e) {
|
|
|
245
249
|
alpha: i ? parseInt(i, 16) / 255 : 1
|
|
246
250
|
};
|
|
247
251
|
}
|
|
248
|
-
const
|
|
249
|
-
test: /* @__PURE__ */
|
|
250
|
-
parse:
|
|
251
|
-
transform:
|
|
252
|
-
},
|
|
252
|
+
const Be = {
|
|
253
|
+
test: /* @__PURE__ */ st("#"),
|
|
254
|
+
parse: Is,
|
|
255
|
+
transform: U.transform
|
|
256
|
+
}, pe = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
|
|
253
257
|
test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
|
|
254
258
|
parse: parseFloat,
|
|
255
259
|
transform: (t) => `${t}${e}`
|
|
256
|
-
}), L = /* @__PURE__ */
|
|
260
|
+
}), L = /* @__PURE__ */ pe("deg"), q = /* @__PURE__ */ pe("%"), d = /* @__PURE__ */ pe("px"), Ns = /* @__PURE__ */ pe("vh"), Ks = /* @__PURE__ */ pe("vw"), Dt = {
|
|
257
261
|
...q,
|
|
258
262
|
parse: (e) => q.parse(e) / 100,
|
|
259
263
|
transform: (e) => q.transform(e * 100)
|
|
260
264
|
}, z = {
|
|
261
|
-
test: /* @__PURE__ */
|
|
262
|
-
parse: /* @__PURE__ */
|
|
265
|
+
test: /* @__PURE__ */ st("hsl", "hue"),
|
|
266
|
+
parse: /* @__PURE__ */ Sn("hue", "saturation", "lightness"),
|
|
263
267
|
transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + q.transform(oe(t)) + ", " + q.transform(oe(n)) + ", " + oe(le.transform(s)) + ")"
|
|
264
268
|
}, D = {
|
|
265
|
-
test: (e) =>
|
|
266
|
-
parse: (e) =>
|
|
267
|
-
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ?
|
|
269
|
+
test: (e) => U.test(e) || Be.test(e) || z.test(e),
|
|
270
|
+
parse: (e) => U.test(e) ? U.parse(e) : z.test(e) ? z.parse(e) : Be.parse(e),
|
|
271
|
+
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? U.transform(e) : z.transform(e),
|
|
268
272
|
getAnimatableNone: (e) => {
|
|
269
273
|
const t = D.parse(e);
|
|
270
274
|
return t.alpha = 0, D.transform(t);
|
|
271
275
|
}
|
|
272
|
-
},
|
|
273
|
-
function
|
|
274
|
-
return isNaN(e) && typeof e == "string" && (e.match(
|
|
276
|
+
}, $s = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
277
|
+
function Ls(e) {
|
|
278
|
+
return isNaN(e) && typeof e == "string" && (e.match(nt)?.length || 0) + (e.match($s)?.length || 0) > 0;
|
|
275
279
|
}
|
|
276
|
-
const Vn = "number",
|
|
280
|
+
const Vn = "number", wn = "color", Ws = "var", _s = "var(", Ft = "${}", js = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
277
281
|
function ue(e) {
|
|
278
282
|
const t = e.toString(), n = [], s = {
|
|
279
283
|
color: [],
|
|
@@ -281,46 +285,46 @@ function ue(e) {
|
|
|
281
285
|
var: []
|
|
282
286
|
}, i = [];
|
|
283
287
|
let r = 0;
|
|
284
|
-
const o = t.replace(
|
|
288
|
+
const o = t.replace(js, (u) => (D.test(u) ? (s.color.push(r), i.push(wn), n.push(D.parse(u))) : u.startsWith(_s) ? (s.var.push(r), i.push(Ws), n.push(u)) : (s.number.push(r), i.push(Vn), n.push(parseFloat(u))), ++r, Ft)).split(Ft);
|
|
285
289
|
return { values: n, split: o, indexes: s, types: i };
|
|
286
290
|
}
|
|
287
|
-
function
|
|
291
|
+
function xn(e) {
|
|
288
292
|
return ue(e).values;
|
|
289
293
|
}
|
|
290
|
-
function
|
|
294
|
+
function An(e) {
|
|
291
295
|
const { split: t, types: n } = ue(e), s = t.length;
|
|
292
296
|
return (i) => {
|
|
293
297
|
let r = "";
|
|
294
298
|
for (let a = 0; a < s; a++)
|
|
295
299
|
if (r += t[a], i[a] !== void 0) {
|
|
296
300
|
const o = n[a];
|
|
297
|
-
o === Vn ? r += oe(i[a]) : o ===
|
|
301
|
+
o === Vn ? r += oe(i[a]) : o === wn ? r += D.transform(i[a]) : r += i[a];
|
|
298
302
|
}
|
|
299
303
|
return r;
|
|
300
304
|
};
|
|
301
305
|
}
|
|
302
|
-
const
|
|
303
|
-
function
|
|
304
|
-
const t =
|
|
305
|
-
return
|
|
306
|
+
const Us = (e) => typeof e == "number" ? 0 : D.test(e) ? D.getAnimatableNone(e) : e;
|
|
307
|
+
function Gs(e) {
|
|
308
|
+
const t = xn(e);
|
|
309
|
+
return An(e)(t.map(Us));
|
|
306
310
|
}
|
|
307
|
-
const
|
|
308
|
-
test:
|
|
309
|
-
parse:
|
|
310
|
-
createTransformer:
|
|
311
|
-
getAnimatableNone:
|
|
311
|
+
const j = {
|
|
312
|
+
test: Ls,
|
|
313
|
+
parse: xn,
|
|
314
|
+
createTransformer: An,
|
|
315
|
+
getAnimatableNone: Gs
|
|
312
316
|
};
|
|
313
317
|
function De(e, t, n) {
|
|
314
318
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
315
319
|
}
|
|
316
|
-
function
|
|
320
|
+
function Ys({ hue: e, saturation: t, lightness: n, alpha: s }) {
|
|
317
321
|
e /= 360, t /= 100, n /= 100;
|
|
318
322
|
let i = 0, r = 0, a = 0;
|
|
319
323
|
if (!t)
|
|
320
324
|
i = r = a = n;
|
|
321
325
|
else {
|
|
322
|
-
const o = n < 0.5 ? n * (1 + t) : n + t - n * t,
|
|
323
|
-
i = De(
|
|
326
|
+
const o = n < 0.5 ? n * (1 + t) : n + t - n * t, u = 2 * n - o;
|
|
327
|
+
i = De(u, o, e + 1 / 3), r = De(u, o, e), a = De(u, o, e - 1 / 3);
|
|
324
328
|
}
|
|
325
329
|
return {
|
|
326
330
|
red: Math.round(i * 255),
|
|
@@ -329,55 +333,55 @@ function Gs({ hue: e, saturation: t, lightness: n, alpha: s }) {
|
|
|
329
333
|
alpha: s
|
|
330
334
|
};
|
|
331
335
|
}
|
|
332
|
-
function
|
|
336
|
+
function Ve(e, t) {
|
|
333
337
|
return (n) => n > 0 ? t : e;
|
|
334
338
|
}
|
|
335
339
|
const J = (e, t, n) => e + (t - e) * n, Fe = (e, t, n) => {
|
|
336
340
|
const s = e * e, i = n * (t * t - s) + s;
|
|
337
341
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
338
|
-
},
|
|
339
|
-
function
|
|
340
|
-
const t =
|
|
342
|
+
}, zs = [Be, U, z], Xs = (e) => zs.find((t) => t.test(e));
|
|
343
|
+
function Et(e) {
|
|
344
|
+
const t = Xs(e);
|
|
341
345
|
if (de(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !t)
|
|
342
346
|
return !1;
|
|
343
347
|
let n = t.parse(e);
|
|
344
|
-
return t === z && (n =
|
|
348
|
+
return t === z && (n = Ys(n)), n;
|
|
345
349
|
}
|
|
346
|
-
const
|
|
347
|
-
const n =
|
|
350
|
+
const Rt = (e, t) => {
|
|
351
|
+
const n = Et(e), s = Et(t);
|
|
348
352
|
if (!n || !s)
|
|
349
|
-
return
|
|
353
|
+
return Ve(e, t);
|
|
350
354
|
const i = { ...n };
|
|
351
|
-
return (r) => (i.red = Fe(n.red, s.red, r), i.green = Fe(n.green, s.green, r), i.blue = Fe(n.blue, s.blue, r), i.alpha = J(n.alpha, s.alpha, r),
|
|
352
|
-
},
|
|
353
|
-
function Xs(e, t) {
|
|
354
|
-
return ke.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
|
|
355
|
-
}
|
|
355
|
+
return (r) => (i.red = Fe(n.red, s.red, r), i.green = Fe(n.green, s.green, r), i.blue = Fe(n.blue, s.blue, r), i.alpha = J(n.alpha, s.alpha, r), U.transform(i));
|
|
356
|
+
}, Ie = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
356
357
|
function qs(e, t) {
|
|
358
|
+
return Ie.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
|
|
359
|
+
}
|
|
360
|
+
function Hs(e, t) {
|
|
357
361
|
return (n) => J(e, t, n);
|
|
358
362
|
}
|
|
359
|
-
function
|
|
360
|
-
return typeof e == "number" ?
|
|
363
|
+
function it(e) {
|
|
364
|
+
return typeof e == "number" ? Hs : typeof e == "string" ? tt(e) ? Ve : D.test(e) ? Rt : Qs : Array.isArray(e) ? Mn : typeof e == "object" ? D.test(e) ? Rt : Zs : Ve;
|
|
361
365
|
}
|
|
362
|
-
function
|
|
363
|
-
const n = [...e], s = n.length, i = e.map((r, a) =>
|
|
366
|
+
function Mn(e, t) {
|
|
367
|
+
const n = [...e], s = n.length, i = e.map((r, a) => it(r)(r, t[a]));
|
|
364
368
|
return (r) => {
|
|
365
369
|
for (let a = 0; a < s; a++)
|
|
366
370
|
n[a] = i[a](r);
|
|
367
371
|
return n;
|
|
368
372
|
};
|
|
369
373
|
}
|
|
370
|
-
function
|
|
374
|
+
function Zs(e, t) {
|
|
371
375
|
const n = { ...e, ...t }, s = {};
|
|
372
376
|
for (const i in n)
|
|
373
|
-
e[i] !== void 0 && t[i] !== void 0 && (s[i] =
|
|
377
|
+
e[i] !== void 0 && t[i] !== void 0 && (s[i] = it(e[i])(e[i], t[i]));
|
|
374
378
|
return (i) => {
|
|
375
379
|
for (const r in s)
|
|
376
380
|
n[r] = s[r](i);
|
|
377
381
|
return n;
|
|
378
382
|
};
|
|
379
383
|
}
|
|
380
|
-
function
|
|
384
|
+
function Js(e, t) {
|
|
381
385
|
const n = [], s = { color: 0, var: 0, number: 0 };
|
|
382
386
|
for (let i = 0; i < t.values.length; i++) {
|
|
383
387
|
const r = t.types[i], a = e.indexes[r][s[r]], o = e.values[a] ?? 0;
|
|
@@ -385,32 +389,32 @@ function Zs(e, t) {
|
|
|
385
389
|
}
|
|
386
390
|
return n;
|
|
387
391
|
}
|
|
388
|
-
const
|
|
389
|
-
const n =
|
|
390
|
-
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ?
|
|
392
|
+
const Qs = (e, t) => {
|
|
393
|
+
const n = j.createTransformer(t), s = ue(e), i = ue(t);
|
|
394
|
+
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? Ie.has(e) && !i.values.length || Ie.has(t) && !s.values.length ? qs(e, t) : Ze(Mn(Js(s, i), i.values), n) : (de(!0, `Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), Ve(e, t));
|
|
391
395
|
};
|
|
392
|
-
function
|
|
393
|
-
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? J(e, t, n) :
|
|
396
|
+
function Cn(e, t, n) {
|
|
397
|
+
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? J(e, t, n) : it(e)(e, t);
|
|
394
398
|
}
|
|
395
|
-
const
|
|
399
|
+
const ei = (e) => {
|
|
396
400
|
const t = ({ timestamp: n }) => e(n);
|
|
397
401
|
return {
|
|
398
402
|
start: (n = !0) => K.update(t, n),
|
|
399
|
-
stop: () =>
|
|
403
|
+
stop: () => ke(t),
|
|
400
404
|
/**
|
|
401
405
|
* If we're processing this frame we can use the
|
|
402
406
|
* framelocked timestamp to keep things in sync.
|
|
403
407
|
*/
|
|
404
|
-
now: () =>
|
|
408
|
+
now: () => Se.isProcessing ? Se.timestamp : R.now()
|
|
405
409
|
};
|
|
406
|
-
},
|
|
410
|
+
}, Dn = (e, t, n = 10) => {
|
|
407
411
|
let s = "";
|
|
408
412
|
const i = Math.max(Math.round(t / n), 2);
|
|
409
413
|
for (let r = 0; r < i; r++)
|
|
410
414
|
s += Math.round(e(r / (i - 1)) * 1e4) / 1e4 + ", ";
|
|
411
415
|
return `linear(${s.substring(0, s.length - 2)})`;
|
|
412
416
|
}, we = 2e4;
|
|
413
|
-
function
|
|
417
|
+
function rt(e) {
|
|
414
418
|
let t = 0;
|
|
415
419
|
const n = 50;
|
|
416
420
|
let s = e.next(t);
|
|
@@ -418,18 +422,18 @@ function it(e) {
|
|
|
418
422
|
t += n, s = e.next(t);
|
|
419
423
|
return t >= we ? 1 / 0 : t;
|
|
420
424
|
}
|
|
421
|
-
function
|
|
422
|
-
const s = n({ ...e, keyframes: [0, t] }), i = Math.min(
|
|
425
|
+
function Fn(e, t = 100, n) {
|
|
426
|
+
const s = n({ ...e, keyframes: [0, t] }), i = Math.min(rt(s), we);
|
|
423
427
|
return {
|
|
424
428
|
type: "keyframes",
|
|
425
429
|
ease: (r) => s.next(i * r).value / t,
|
|
426
430
|
duration: /* @__PURE__ */ P(i)
|
|
427
431
|
};
|
|
428
432
|
}
|
|
429
|
-
const
|
|
430
|
-
function
|
|
431
|
-
const s = Math.max(t -
|
|
432
|
-
return
|
|
433
|
+
const ti = 5;
|
|
434
|
+
function En(e, t, n) {
|
|
435
|
+
const s = Math.max(t - ti, 0);
|
|
436
|
+
return rn(n - e(s), t - s);
|
|
433
437
|
}
|
|
434
438
|
const C = {
|
|
435
439
|
// Default spring physics
|
|
@@ -460,32 +464,32 @@ const C = {
|
|
|
460
464
|
minDamping: 0.05,
|
|
461
465
|
maxDamping: 1
|
|
462
466
|
}, Ee = 1e-3;
|
|
463
|
-
function
|
|
467
|
+
function ni({ duration: e = C.duration, bounce: t = C.bounce, velocity: n = C.velocity, mass: s = C.mass }) {
|
|
464
468
|
let i, r;
|
|
465
|
-
de(e <= /* @__PURE__ */
|
|
469
|
+
de(e <= /* @__PURE__ */ k(C.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
466
470
|
let a = 1 - t;
|
|
467
|
-
a =
|
|
468
|
-
const
|
|
469
|
-
return Ee - h /
|
|
471
|
+
a = _(C.minDamping, C.maxDamping, a), e = _(C.minDuration, C.maxDuration, /* @__PURE__ */ P(e)), a < 1 ? (i = (c) => {
|
|
472
|
+
const l = c * a, f = l * e, h = l - n, p = Ne(c, a), g = Math.exp(-f);
|
|
473
|
+
return Ee - h / p * g;
|
|
470
474
|
}, r = (c) => {
|
|
471
|
-
const f = c * a * e, h = f * n + n,
|
|
472
|
-
return (-i(c) + Ee > 0 ? -1 : 1) * ((h -
|
|
475
|
+
const f = c * a * e, h = f * n + n, p = Math.pow(a, 2) * Math.pow(c, 2) * e, g = Math.exp(-f), T = Ne(Math.pow(c, 2), a);
|
|
476
|
+
return (-i(c) + Ee > 0 ? -1 : 1) * ((h - p) * g) / T;
|
|
473
477
|
}) : (i = (c) => {
|
|
474
|
-
const
|
|
475
|
-
return -Ee +
|
|
478
|
+
const l = Math.exp(-c * e), f = (c - n) * e + 1;
|
|
479
|
+
return -Ee + l * f;
|
|
476
480
|
}, r = (c) => {
|
|
477
|
-
const
|
|
478
|
-
return
|
|
481
|
+
const l = Math.exp(-c * e), f = (n - c) * (e * e);
|
|
482
|
+
return l * f;
|
|
479
483
|
});
|
|
480
|
-
const o = 5 / e,
|
|
481
|
-
if (e = /* @__PURE__ */
|
|
484
|
+
const o = 5 / e, u = ii(i, r, o);
|
|
485
|
+
if (e = /* @__PURE__ */ k(e), isNaN(u))
|
|
482
486
|
return {
|
|
483
487
|
stiffness: C.stiffness,
|
|
484
488
|
damping: C.damping,
|
|
485
489
|
duration: e
|
|
486
490
|
};
|
|
487
491
|
{
|
|
488
|
-
const c = Math.pow(
|
|
492
|
+
const c = Math.pow(u, 2) * s;
|
|
489
493
|
return {
|
|
490
494
|
stiffness: c,
|
|
491
495
|
damping: a * 2 * Math.sqrt(s * c),
|
|
@@ -493,21 +497,21 @@ function ti({ duration: e = C.duration, bounce: t = C.bounce, velocity: n = C.ve
|
|
|
493
497
|
};
|
|
494
498
|
}
|
|
495
499
|
}
|
|
496
|
-
const
|
|
497
|
-
function
|
|
500
|
+
const si = 12;
|
|
501
|
+
function ii(e, t, n) {
|
|
498
502
|
let s = n;
|
|
499
|
-
for (let i = 1; i <
|
|
503
|
+
for (let i = 1; i < si; i++)
|
|
500
504
|
s = s - e(s) / t(s);
|
|
501
505
|
return s;
|
|
502
506
|
}
|
|
503
|
-
function
|
|
507
|
+
function Ne(e, t) {
|
|
504
508
|
return e * Math.sqrt(1 - t * t);
|
|
505
509
|
}
|
|
506
|
-
const
|
|
507
|
-
function
|
|
510
|
+
const ri = ["duration", "bounce"], ai = ["stiffness", "damping", "mass"];
|
|
511
|
+
function Pt(e, t) {
|
|
508
512
|
return t.some((n) => e[n] !== void 0);
|
|
509
513
|
}
|
|
510
|
-
function
|
|
514
|
+
function oi(e) {
|
|
511
515
|
let t = {
|
|
512
516
|
velocity: C.velocity,
|
|
513
517
|
stiffness: C.stiffness,
|
|
@@ -516,9 +520,9 @@ function ai(e) {
|
|
|
516
520
|
isResolvedFromDuration: !1,
|
|
517
521
|
...e
|
|
518
522
|
};
|
|
519
|
-
if (!
|
|
523
|
+
if (!Pt(e, ai) && Pt(e, ri))
|
|
520
524
|
if (e.visualDuration) {
|
|
521
|
-
const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 *
|
|
525
|
+
const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * _(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(i);
|
|
522
526
|
t = {
|
|
523
527
|
...t,
|
|
524
528
|
mass: C.mass,
|
|
@@ -526,7 +530,7 @@ function ai(e) {
|
|
|
526
530
|
damping: r
|
|
527
531
|
};
|
|
528
532
|
} else {
|
|
529
|
-
const n =
|
|
533
|
+
const n = ni(e);
|
|
530
534
|
t = {
|
|
531
535
|
...t,
|
|
532
536
|
...n,
|
|
@@ -542,44 +546,44 @@ function ce(e = C.visualDuration, t = C.bounce) {
|
|
|
542
546
|
bounce: t
|
|
543
547
|
} : e;
|
|
544
548
|
let { restSpeed: s, restDelta: i } = n;
|
|
545
|
-
const r = n.keyframes[0], a = n.keyframes[n.keyframes.length - 1], o = { done: !1, value: r }, { stiffness:
|
|
549
|
+
const r = n.keyframes[0], a = n.keyframes[n.keyframes.length - 1], o = { done: !1, value: r }, { stiffness: u, damping: c, mass: l, duration: f, velocity: h, isResolvedFromDuration: p } = oi({
|
|
546
550
|
...n,
|
|
547
551
|
velocity: -/* @__PURE__ */ P(n.velocity || 0)
|
|
548
|
-
}),
|
|
552
|
+
}), g = h || 0, T = c / (2 * Math.sqrt(u * l)), S = a - r, v = /* @__PURE__ */ P(Math.sqrt(u / l)), A = Math.abs(S) < 5;
|
|
549
553
|
s || (s = A ? C.restSpeed.granular : C.restSpeed.default), i || (i = A ? C.restDelta.granular : C.restDelta.default);
|
|
550
|
-
let
|
|
554
|
+
let V;
|
|
551
555
|
if (T < 1) {
|
|
552
|
-
const
|
|
553
|
-
|
|
556
|
+
const m = Ne(v, T);
|
|
557
|
+
V = (y) => {
|
|
554
558
|
const M = Math.exp(-T * v * y);
|
|
555
|
-
return a - M * ((
|
|
559
|
+
return a - M * ((g + T * v * S) / m * Math.sin(m * y) + S * Math.cos(m * y));
|
|
556
560
|
};
|
|
557
561
|
} else if (T === 1)
|
|
558
|
-
|
|
562
|
+
V = (m) => a - Math.exp(-v * m) * (S + (g + v * S) * m);
|
|
559
563
|
else {
|
|
560
|
-
const
|
|
561
|
-
|
|
562
|
-
const M = Math.exp(-T * v * y), b = Math.min(
|
|
563
|
-
return a - M * ((
|
|
564
|
+
const m = v * Math.sqrt(T * T - 1);
|
|
565
|
+
V = (y) => {
|
|
566
|
+
const M = Math.exp(-T * v * y), b = Math.min(m * y, 300);
|
|
567
|
+
return a - M * ((g + T * v * S) * Math.sinh(b) + m * S * Math.cosh(b)) / m;
|
|
564
568
|
};
|
|
565
569
|
}
|
|
566
570
|
const w = {
|
|
567
|
-
calculatedDuration:
|
|
568
|
-
next: (
|
|
569
|
-
const y =
|
|
570
|
-
if (
|
|
571
|
-
o.done =
|
|
571
|
+
calculatedDuration: p && f || null,
|
|
572
|
+
next: (m) => {
|
|
573
|
+
const y = V(m);
|
|
574
|
+
if (p)
|
|
575
|
+
o.done = m >= f;
|
|
572
576
|
else {
|
|
573
|
-
let M =
|
|
574
|
-
T < 1 && (M =
|
|
577
|
+
let M = m === 0 ? g : 0;
|
|
578
|
+
T < 1 && (M = m === 0 ? /* @__PURE__ */ k(g) : En(V, m, y));
|
|
575
579
|
const b = Math.abs(M) <= s, x = Math.abs(a - y) <= i;
|
|
576
580
|
o.done = b && x;
|
|
577
581
|
}
|
|
578
582
|
return o.value = o.done ? a : y, o;
|
|
579
583
|
},
|
|
580
584
|
toString: () => {
|
|
581
|
-
const
|
|
582
|
-
return
|
|
585
|
+
const m = Math.min(rt(w), we), y = Dn((M) => w.next(m * M).value, m, 30);
|
|
586
|
+
return m + "ms " + y;
|
|
583
587
|
},
|
|
584
588
|
toTransition: () => {
|
|
585
589
|
}
|
|
@@ -587,123 +591,123 @@ function ce(e = C.visualDuration, t = C.bounce) {
|
|
|
587
591
|
return w;
|
|
588
592
|
}
|
|
589
593
|
ce.applyToOptions = (e) => {
|
|
590
|
-
const t =
|
|
591
|
-
return e.ease = t.ease, e.duration = /* @__PURE__ */
|
|
594
|
+
const t = Fn(e, 100, ce);
|
|
595
|
+
return e.ease = t.ease, e.duration = /* @__PURE__ */ k(t.duration), e.type = "keyframes", e;
|
|
592
596
|
};
|
|
593
|
-
function
|
|
597
|
+
function Ke({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: a, min: o, max: u, restDelta: c = 0.5, restSpeed: l }) {
|
|
594
598
|
const f = e[0], h = {
|
|
595
599
|
done: !1,
|
|
596
600
|
value: f
|
|
597
|
-
},
|
|
601
|
+
}, p = (b) => o !== void 0 && b < o || u !== void 0 && b > u, g = (b) => o === void 0 ? u : u === void 0 || Math.abs(o - b) < Math.abs(u - b) ? o : u;
|
|
598
602
|
let T = n * t;
|
|
599
|
-
const
|
|
600
|
-
v !==
|
|
601
|
-
const A = (b) => -T * Math.exp(-b / s),
|
|
602
|
-
const x = A(b), E =
|
|
603
|
+
const S = f + T, v = a === void 0 ? S : a(S);
|
|
604
|
+
v !== S && (T = v - f);
|
|
605
|
+
const A = (b) => -T * Math.exp(-b / s), V = (b) => v + A(b), w = (b) => {
|
|
606
|
+
const x = A(b), E = V(b);
|
|
603
607
|
h.done = Math.abs(x) <= c, h.value = h.done ? v : E;
|
|
604
608
|
};
|
|
605
|
-
let
|
|
609
|
+
let m, y;
|
|
606
610
|
const M = (b) => {
|
|
607
|
-
|
|
608
|
-
keyframes: [h.value,
|
|
609
|
-
velocity:
|
|
611
|
+
p(h.value) && (m = b, y = ce({
|
|
612
|
+
keyframes: [h.value, g(h.value)],
|
|
613
|
+
velocity: En(V, b, h.value),
|
|
610
614
|
// TODO: This should be passing * 1000
|
|
611
615
|
damping: i,
|
|
612
616
|
stiffness: r,
|
|
613
617
|
restDelta: c,
|
|
614
|
-
restSpeed:
|
|
618
|
+
restSpeed: l
|
|
615
619
|
}));
|
|
616
620
|
};
|
|
617
621
|
return M(0), {
|
|
618
622
|
calculatedDuration: null,
|
|
619
623
|
next: (b) => {
|
|
620
624
|
let x = !1;
|
|
621
|
-
return !y &&
|
|
625
|
+
return !y && m === void 0 && (x = !0, w(b), M(b)), m !== void 0 && b >= m ? y.next(b - m) : (!x && w(b), h);
|
|
622
626
|
}
|
|
623
627
|
};
|
|
624
628
|
}
|
|
625
|
-
function
|
|
626
|
-
const s = [], i = n ||
|
|
629
|
+
function li(e, t, n) {
|
|
630
|
+
const s = [], i = n || N.mix || Cn, r = e.length - 1;
|
|
627
631
|
for (let a = 0; a < r; a++) {
|
|
628
632
|
let o = i(e[a], e[a + 1]);
|
|
629
633
|
if (t) {
|
|
630
|
-
const
|
|
631
|
-
o =
|
|
634
|
+
const u = Array.isArray(t) ? t[a] || H : t;
|
|
635
|
+
o = Ze(u, o);
|
|
632
636
|
}
|
|
633
637
|
s.push(o);
|
|
634
638
|
}
|
|
635
639
|
return s;
|
|
636
640
|
}
|
|
637
|
-
function
|
|
641
|
+
function ui(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
638
642
|
const r = e.length;
|
|
639
|
-
if (
|
|
643
|
+
if (B(r === t.length, "Both input and output ranges must be the same length", "range-length"), r === 1)
|
|
640
644
|
return () => t[0];
|
|
641
645
|
if (r === 2 && t[0] === t[1])
|
|
642
646
|
return () => t[1];
|
|
643
647
|
const a = e[0] === e[1];
|
|
644
648
|
e[0] > e[r - 1] && (e = [...e].reverse(), t = [...t].reverse());
|
|
645
|
-
const o =
|
|
646
|
-
if (a &&
|
|
649
|
+
const o = li(t, s, i), u = o.length, c = (l) => {
|
|
650
|
+
if (a && l < e[0])
|
|
647
651
|
return t[0];
|
|
648
652
|
let f = 0;
|
|
649
|
-
if (
|
|
650
|
-
for (; f < e.length - 2 && !(
|
|
653
|
+
if (u > 1)
|
|
654
|
+
for (; f < e.length - 2 && !(l < e[f + 1]); f++)
|
|
651
655
|
;
|
|
652
|
-
const h = /* @__PURE__ */
|
|
656
|
+
const h = /* @__PURE__ */ Je(e[f], e[f + 1], l);
|
|
653
657
|
return o[f](h);
|
|
654
658
|
};
|
|
655
|
-
return n ? (
|
|
659
|
+
return n ? (l) => c(_(e[0], e[r - 1], l)) : c;
|
|
656
660
|
}
|
|
657
|
-
function
|
|
661
|
+
function Rn(e, t) {
|
|
658
662
|
const n = e[e.length - 1];
|
|
659
663
|
for (let s = 1; s <= t; s++) {
|
|
660
|
-
const i = /* @__PURE__ */
|
|
664
|
+
const i = /* @__PURE__ */ Je(0, t, s);
|
|
661
665
|
e.push(J(n, 1, i));
|
|
662
666
|
}
|
|
663
667
|
}
|
|
664
|
-
function
|
|
668
|
+
function Pn(e) {
|
|
665
669
|
const t = [0];
|
|
666
|
-
return
|
|
670
|
+
return Rn(t, e.length - 1), t;
|
|
667
671
|
}
|
|
668
|
-
function
|
|
672
|
+
function ci(e, t) {
|
|
669
673
|
return e.map((n) => n * t);
|
|
670
674
|
}
|
|
671
|
-
function
|
|
672
|
-
return e.map(() => t ||
|
|
675
|
+
function fi(e, t) {
|
|
676
|
+
return e.map(() => t || mn).splice(0, e.length - 1);
|
|
673
677
|
}
|
|
674
678
|
function X({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
|
|
675
|
-
const i = pn(s) ? s.map(
|
|
679
|
+
const i = pn(s) ? s.map(Mt) : Mt(s), r = {
|
|
676
680
|
done: !1,
|
|
677
681
|
value: t[0]
|
|
678
|
-
}, a =
|
|
682
|
+
}, a = ci(
|
|
679
683
|
// Only use the provided offsets if they're the correct length
|
|
680
684
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
681
|
-
n && n.length === t.length ? n :
|
|
685
|
+
n && n.length === t.length ? n : Pn(t),
|
|
682
686
|
e
|
|
683
|
-
), o =
|
|
684
|
-
ease: Array.isArray(i) ? i :
|
|
687
|
+
), o = ui(a, t, {
|
|
688
|
+
ease: Array.isArray(i) ? i : fi(t, i)
|
|
685
689
|
});
|
|
686
690
|
return {
|
|
687
691
|
calculatedDuration: e,
|
|
688
|
-
next: (
|
|
692
|
+
next: (u) => (r.value = o(u), r.done = u >= e, r)
|
|
689
693
|
};
|
|
690
694
|
}
|
|
691
|
-
const
|
|
692
|
-
function
|
|
693
|
-
const r = e.filter(
|
|
695
|
+
const hi = (e) => e !== null;
|
|
696
|
+
function at(e, { repeat: t, repeatType: n = "loop" }, s, i = 1) {
|
|
697
|
+
const r = e.filter(hi), o = i < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : r.length - 1;
|
|
694
698
|
return !o || s === void 0 ? r[o] : s;
|
|
695
699
|
}
|
|
696
|
-
const
|
|
697
|
-
decay:
|
|
698
|
-
inertia:
|
|
700
|
+
const di = {
|
|
701
|
+
decay: Ke,
|
|
702
|
+
inertia: Ke,
|
|
699
703
|
tween: X,
|
|
700
704
|
keyframes: X,
|
|
701
705
|
spring: ce
|
|
702
706
|
};
|
|
703
|
-
function
|
|
704
|
-
typeof e.type == "string" && (e.type =
|
|
707
|
+
function On(e) {
|
|
708
|
+
typeof e.type == "string" && (e.type = di[e.type]);
|
|
705
709
|
}
|
|
706
|
-
class
|
|
710
|
+
class ot {
|
|
707
711
|
constructor() {
|
|
708
712
|
this.updateFinished();
|
|
709
713
|
}
|
|
@@ -727,8 +731,8 @@ class at {
|
|
|
727
731
|
return this.finished.then(t, n);
|
|
728
732
|
}
|
|
729
733
|
}
|
|
730
|
-
const
|
|
731
|
-
class
|
|
734
|
+
const mi = (e) => e / 100;
|
|
735
|
+
class lt extends ot {
|
|
732
736
|
constructor(t) {
|
|
733
737
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
734
738
|
const { motionValue: n } = this.options;
|
|
@@ -737,44 +741,44 @@ class ot extends at {
|
|
|
737
741
|
}
|
|
738
742
|
initAnimation() {
|
|
739
743
|
const { options: t } = this;
|
|
740
|
-
|
|
744
|
+
On(t);
|
|
741
745
|
const { type: n = X, repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: a = 0 } = t;
|
|
742
746
|
let { keyframes: o } = t;
|
|
743
|
-
const
|
|
744
|
-
process.env.NODE_ENV !== "production" &&
|
|
745
|
-
const c =
|
|
746
|
-
r === "mirror" && (this.mirroredGenerator =
|
|
747
|
+
const u = n || X;
|
|
748
|
+
process.env.NODE_ENV !== "production" && u !== X && B(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`, "spring-two-frames"), u !== X && typeof o[0] != "number" && (this.mixKeyframes = Ze(mi, Cn(o[0], o[1])), o = [0, 100]);
|
|
749
|
+
const c = u({ ...t, keyframes: o });
|
|
750
|
+
r === "mirror" && (this.mirroredGenerator = u({
|
|
747
751
|
...t,
|
|
748
752
|
keyframes: [...o].reverse(),
|
|
749
753
|
velocity: -a
|
|
750
|
-
})), c.calculatedDuration === null && (c.calculatedDuration =
|
|
751
|
-
const { calculatedDuration:
|
|
752
|
-
this.calculatedDuration =
|
|
754
|
+
})), c.calculatedDuration === null && (c.calculatedDuration = rt(c));
|
|
755
|
+
const { calculatedDuration: l } = c;
|
|
756
|
+
this.calculatedDuration = l, this.resolvedDuration = l + i, this.totalDuration = this.resolvedDuration * (s + 1) - i, this.generator = c;
|
|
753
757
|
}
|
|
754
758
|
updateTime(t) {
|
|
755
759
|
const n = Math.round(t - this.startTime) * this.playbackSpeed;
|
|
756
760
|
this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = n;
|
|
757
761
|
}
|
|
758
762
|
tick(t, n = !1) {
|
|
759
|
-
const { generator: s, totalDuration: i, mixKeyframes: r, mirroredGenerator: a, resolvedDuration: o, calculatedDuration:
|
|
763
|
+
const { generator: s, totalDuration: i, mixKeyframes: r, mirroredGenerator: a, resolvedDuration: o, calculatedDuration: u } = this;
|
|
760
764
|
if (this.startTime === null)
|
|
761
765
|
return s.next(0);
|
|
762
|
-
const { delay: c = 0, keyframes:
|
|
766
|
+
const { delay: c = 0, keyframes: l, repeat: f, repeatType: h, repeatDelay: p, type: g, onUpdate: T, finalKeyframe: S } = this.options;
|
|
763
767
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - i / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
|
|
764
768
|
const v = this.currentTime - c * (this.playbackSpeed >= 0 ? 1 : -1), A = this.playbackSpeed >= 0 ? v < 0 : v > i;
|
|
765
769
|
this.currentTime = Math.max(v, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
|
|
766
|
-
let
|
|
770
|
+
let V = this.currentTime, w = s;
|
|
767
771
|
if (f) {
|
|
768
772
|
const b = Math.min(this.currentTime, i) / o;
|
|
769
773
|
let x = Math.floor(b), E = b % 1;
|
|
770
|
-
!E && b >= 1 && (E = 1), E === 1 && x--, x = Math.min(x, f + 1), x % 2 && (h === "reverse" ? (E = 1 - E,
|
|
774
|
+
!E && b >= 1 && (E = 1), E === 1 && x--, x = Math.min(x, f + 1), x % 2 && (h === "reverse" ? (E = 1 - E, p && (E -= p / o)) : h === "mirror" && (w = a)), V = _(0, 1, E) * o;
|
|
771
775
|
}
|
|
772
|
-
const
|
|
773
|
-
r && (
|
|
774
|
-
let { done: y } =
|
|
775
|
-
!A &&
|
|
776
|
+
const m = A ? { done: !1, value: l[0] } : w.next(V);
|
|
777
|
+
r && (m.value = r(m.value));
|
|
778
|
+
let { done: y } = m;
|
|
779
|
+
!A && u !== null && (y = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
776
780
|
const M = this.holdTime === null && (this.state === "finished" || this.state === "running" && y);
|
|
777
|
-
return M &&
|
|
781
|
+
return M && g !== Ke && (m.value = at(l, this.options, S, this.speed)), T && T(m.value), M && this.finish(), m;
|
|
778
782
|
}
|
|
779
783
|
/**
|
|
780
784
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -795,7 +799,7 @@ class ot extends at {
|
|
|
795
799
|
return /* @__PURE__ */ P(this.currentTime);
|
|
796
800
|
}
|
|
797
801
|
set time(t) {
|
|
798
|
-
t = /* @__PURE__ */
|
|
802
|
+
t = /* @__PURE__ */ k(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), this.driver?.start(!1);
|
|
799
803
|
}
|
|
800
804
|
get speed() {
|
|
801
805
|
return this.playbackSpeed;
|
|
@@ -808,7 +812,7 @@ class ot extends at {
|
|
|
808
812
|
play() {
|
|
809
813
|
if (this.isStopped)
|
|
810
814
|
return;
|
|
811
|
-
const { driver: t =
|
|
815
|
+
const { driver: t = ei, startTime: n } = this.options;
|
|
812
816
|
this.driver || (this.driver = t((i) => this.tick(i))), this.options.onPlay?.();
|
|
813
817
|
const s = this.driver.now();
|
|
814
818
|
this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = n ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
@@ -842,10 +846,10 @@ function pi(e) {
|
|
|
842
846
|
for (let t = 1; t < e.length; t++)
|
|
843
847
|
e[t] ?? (e[t] = e[t - 1]);
|
|
844
848
|
}
|
|
845
|
-
const
|
|
846
|
-
const t =
|
|
847
|
-
return
|
|
848
|
-
},
|
|
849
|
+
const G = (e) => e * 180 / Math.PI, $e = (e) => {
|
|
850
|
+
const t = G(Math.atan2(e[1], e[0]));
|
|
851
|
+
return Le(t);
|
|
852
|
+
}, gi = {
|
|
849
853
|
x: 4,
|
|
850
854
|
y: 5,
|
|
851
855
|
translateX: 4,
|
|
@@ -853,53 +857,53 @@ const j = (e) => e * 180 / Math.PI, Ke = (e) => {
|
|
|
853
857
|
scaleX: 0,
|
|
854
858
|
scaleY: 3,
|
|
855
859
|
scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
|
|
856
|
-
rotate:
|
|
857
|
-
rotateZ:
|
|
858
|
-
skewX: (e) =>
|
|
859
|
-
skewY: (e) =>
|
|
860
|
+
rotate: $e,
|
|
861
|
+
rotateZ: $e,
|
|
862
|
+
skewX: (e) => G(Math.atan(e[1])),
|
|
863
|
+
skewY: (e) => G(Math.atan(e[2])),
|
|
860
864
|
skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
|
|
861
|
-
},
|
|
865
|
+
}, Le = (e) => (e = e % 360, e < 0 && (e += 360), e), Ot = $e, kt = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), Bt = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), yi = {
|
|
862
866
|
x: 12,
|
|
863
867
|
y: 13,
|
|
864
868
|
z: 14,
|
|
865
869
|
translateX: 12,
|
|
866
870
|
translateY: 13,
|
|
867
871
|
translateZ: 14,
|
|
868
|
-
scaleX:
|
|
869
|
-
scaleY:
|
|
870
|
-
scale: (e) => (
|
|
871
|
-
rotateX: (e) =>
|
|
872
|
-
rotateY: (e) =>
|
|
873
|
-
rotateZ:
|
|
874
|
-
rotate:
|
|
875
|
-
skewX: (e) =>
|
|
876
|
-
skewY: (e) =>
|
|
872
|
+
scaleX: kt,
|
|
873
|
+
scaleY: Bt,
|
|
874
|
+
scale: (e) => (kt(e) + Bt(e)) / 2,
|
|
875
|
+
rotateX: (e) => Le(G(Math.atan2(e[6], e[5]))),
|
|
876
|
+
rotateY: (e) => Le(G(Math.atan2(-e[2], e[0]))),
|
|
877
|
+
rotateZ: Ot,
|
|
878
|
+
rotate: Ot,
|
|
879
|
+
skewX: (e) => G(Math.atan(e[4])),
|
|
880
|
+
skewY: (e) => G(Math.atan(e[1])),
|
|
877
881
|
skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
|
|
878
882
|
};
|
|
879
|
-
function
|
|
883
|
+
function We(e) {
|
|
880
884
|
return e.includes("scale") ? 1 : 0;
|
|
881
885
|
}
|
|
882
|
-
function
|
|
886
|
+
function _e(e, t) {
|
|
883
887
|
if (!e || e === "none")
|
|
884
|
-
return
|
|
888
|
+
return We(t);
|
|
885
889
|
const n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
886
890
|
let s, i;
|
|
887
891
|
if (n)
|
|
888
|
-
s =
|
|
892
|
+
s = yi, i = n;
|
|
889
893
|
else {
|
|
890
894
|
const o = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
891
|
-
s =
|
|
895
|
+
s = gi, i = o;
|
|
892
896
|
}
|
|
893
897
|
if (!i)
|
|
894
|
-
return
|
|
895
|
-
const r = s[t], a = i[1].split(",").map(
|
|
898
|
+
return We(t);
|
|
899
|
+
const r = s[t], a = i[1].split(",").map(Ti);
|
|
896
900
|
return typeof r == "function" ? r(a) : a[r];
|
|
897
901
|
}
|
|
898
|
-
const
|
|
902
|
+
const bi = (e, t) => {
|
|
899
903
|
const { transform: n = "none" } = getComputedStyle(e);
|
|
900
|
-
return
|
|
904
|
+
return _e(n, t);
|
|
901
905
|
};
|
|
902
|
-
function
|
|
906
|
+
function Ti(e) {
|
|
903
907
|
return parseFloat(e.trim());
|
|
904
908
|
}
|
|
905
909
|
const Q = [
|
|
@@ -920,15 +924,15 @@ const Q = [
|
|
|
920
924
|
"skew",
|
|
921
925
|
"skewX",
|
|
922
926
|
"skewY"
|
|
923
|
-
], ee = new Set(Q),
|
|
927
|
+
], ee = new Set(Q), It = (e) => e === Z || e === d, vi = /* @__PURE__ */ new Set(["x", "y", "z"]), Si = Q.filter((e) => !vi.has(e));
|
|
924
928
|
function Vi(e) {
|
|
925
929
|
const t = [];
|
|
926
|
-
return
|
|
930
|
+
return Si.forEach((n) => {
|
|
927
931
|
const s = e.getValue(n);
|
|
928
932
|
s !== void 0 && (t.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
929
933
|
}), t;
|
|
930
934
|
}
|
|
931
|
-
const
|
|
935
|
+
const W = {
|
|
932
936
|
// Dimensions
|
|
933
937
|
width: ({ x: e }, { paddingLeft: t = "0", paddingRight: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
|
|
934
938
|
height: ({ y: e }, { paddingTop: t = "0", paddingBottom: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
|
|
@@ -937,16 +941,16 @@ const U = {
|
|
|
937
941
|
bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
|
|
938
942
|
right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
|
|
939
943
|
// Transform
|
|
940
|
-
x: (e, { transform: t }) =>
|
|
941
|
-
y: (e, { transform: t }) =>
|
|
944
|
+
x: (e, { transform: t }) => _e(t, "x"),
|
|
945
|
+
y: (e, { transform: t }) => _e(t, "y")
|
|
942
946
|
};
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
const
|
|
946
|
-
let
|
|
947
|
-
function
|
|
948
|
-
if (
|
|
949
|
-
const e = Array.from(
|
|
947
|
+
W.translateX = W.x;
|
|
948
|
+
W.translateY = W.y;
|
|
949
|
+
const Y = /* @__PURE__ */ new Set();
|
|
950
|
+
let je = !1, Ue = !1, Ge = !1;
|
|
951
|
+
function kn() {
|
|
952
|
+
if (Ue) {
|
|
953
|
+
const e = Array.from(Y).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
950
954
|
t.forEach((s) => {
|
|
951
955
|
const i = Vi(s);
|
|
952
956
|
i.length && (n.set(s, i), s.render());
|
|
@@ -960,22 +964,22 @@ function On() {
|
|
|
960
964
|
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
961
965
|
});
|
|
962
966
|
}
|
|
963
|
-
|
|
967
|
+
Ue = !1, je = !1, Y.forEach((e) => e.complete(Ge)), Y.clear();
|
|
964
968
|
}
|
|
965
|
-
function
|
|
966
|
-
|
|
967
|
-
e.readKeyframes(), e.needsMeasurement && (
|
|
969
|
+
function Bn() {
|
|
970
|
+
Y.forEach((e) => {
|
|
971
|
+
e.readKeyframes(), e.needsMeasurement && (Ue = !0);
|
|
968
972
|
});
|
|
969
973
|
}
|
|
970
|
-
function
|
|
971
|
-
|
|
974
|
+
function wi() {
|
|
975
|
+
Ge = !0, Bn(), kn(), Ge = !1;
|
|
972
976
|
}
|
|
973
|
-
class
|
|
977
|
+
class ut {
|
|
974
978
|
constructor(t, n, s, i, r, a = !1) {
|
|
975
979
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = a;
|
|
976
980
|
}
|
|
977
981
|
scheduleResolve() {
|
|
978
|
-
this.state = "scheduled", this.isAsync ? (
|
|
982
|
+
this.state = "scheduled", this.isAsync ? (Y.add(this), je || (je = !0, K.read(Bn), K.resolveKeyframes(kn))) : (this.readKeyframes(), this.complete());
|
|
979
983
|
}
|
|
980
984
|
readKeyframes() {
|
|
981
985
|
const { unresolvedKeyframes: t, name: n, element: s, motionValue: i } = this;
|
|
@@ -1000,32 +1004,32 @@ class lt {
|
|
|
1000
1004
|
measureEndState() {
|
|
1001
1005
|
}
|
|
1002
1006
|
complete(t = !1) {
|
|
1003
|
-
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t),
|
|
1007
|
+
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), Y.delete(this);
|
|
1004
1008
|
}
|
|
1005
1009
|
cancel() {
|
|
1006
|
-
this.state === "scheduled" && (
|
|
1010
|
+
this.state === "scheduled" && (Y.delete(this), this.state = "pending");
|
|
1007
1011
|
}
|
|
1008
1012
|
resume() {
|
|
1009
1013
|
this.state === "pending" && this.scheduleResolve();
|
|
1010
1014
|
}
|
|
1011
1015
|
}
|
|
1012
|
-
const
|
|
1013
|
-
function
|
|
1014
|
-
|
|
1016
|
+
const xi = (e) => e.startsWith("--");
|
|
1017
|
+
function Ai(e, t, n) {
|
|
1018
|
+
xi(t) ? e.style.setProperty(t, n) : e.style[t] = n;
|
|
1015
1019
|
}
|
|
1016
|
-
const
|
|
1017
|
-
function
|
|
1018
|
-
const n = /* @__PURE__ */
|
|
1019
|
-
return () =>
|
|
1020
|
+
const Mi = /* @__PURE__ */ He(() => window.ScrollTimeline !== void 0), Ci = {};
|
|
1021
|
+
function Di(e, t) {
|
|
1022
|
+
const n = /* @__PURE__ */ He(e);
|
|
1023
|
+
return () => Ci[t] ?? n();
|
|
1020
1024
|
}
|
|
1021
|
-
const
|
|
1025
|
+
const In = /* @__PURE__ */ Di(() => {
|
|
1022
1026
|
try {
|
|
1023
1027
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
1024
1028
|
} catch {
|
|
1025
1029
|
return !1;
|
|
1026
1030
|
}
|
|
1027
1031
|
return !0;
|
|
1028
|
-
}, "linearEasing"), ae = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`,
|
|
1032
|
+
}, "linearEasing"), ae = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, Nt = {
|
|
1029
1033
|
linear: "linear",
|
|
1030
1034
|
ease: "ease",
|
|
1031
1035
|
easeIn: "ease-in",
|
|
@@ -1036,17 +1040,17 @@ const kn = /* @__PURE__ */ Ci(() => {
|
|
|
1036
1040
|
backIn: /* @__PURE__ */ ae([0.31, 0.01, 0.66, -0.59]),
|
|
1037
1041
|
backOut: /* @__PURE__ */ ae([0.33, 1.53, 0.69, 0.99])
|
|
1038
1042
|
};
|
|
1039
|
-
function
|
|
1043
|
+
function Nn(e, t) {
|
|
1040
1044
|
if (e)
|
|
1041
|
-
return typeof e == "function" ?
|
|
1045
|
+
return typeof e == "function" ? In() ? Dn(e, t) : "ease-out" : yn(e) ? ae(e) : Array.isArray(e) ? e.map((n) => Nn(n, t) || Nt.easeOut) : Nt[e];
|
|
1042
1046
|
}
|
|
1043
|
-
function
|
|
1044
|
-
const
|
|
1047
|
+
function Fi(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: a = "loop", ease: o = "easeOut", times: u } = {}, c = void 0) {
|
|
1048
|
+
const l = {
|
|
1045
1049
|
[t]: n
|
|
1046
1050
|
};
|
|
1047
|
-
|
|
1048
|
-
const f =
|
|
1049
|
-
Array.isArray(f) && (
|
|
1051
|
+
u && (l.offset = u);
|
|
1052
|
+
const f = Nn(o, i);
|
|
1053
|
+
Array.isArray(f) && (l.easing = f);
|
|
1050
1054
|
const h = {
|
|
1051
1055
|
delay: s,
|
|
1052
1056
|
duration: i,
|
|
@@ -1055,31 +1059,31 @@ function Di(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatTyp
|
|
|
1055
1059
|
iterations: r + 1,
|
|
1056
1060
|
direction: a === "reverse" ? "alternate" : "normal"
|
|
1057
1061
|
};
|
|
1058
|
-
return c && (h.pseudoElement = c), e.animate(
|
|
1062
|
+
return c && (h.pseudoElement = c), e.animate(l, h);
|
|
1059
1063
|
}
|
|
1060
|
-
function
|
|
1064
|
+
function ct(e) {
|
|
1061
1065
|
return typeof e == "function" && "applyToOptions" in e;
|
|
1062
1066
|
}
|
|
1063
|
-
function
|
|
1064
|
-
return
|
|
1067
|
+
function Ei({ type: e, ...t }) {
|
|
1068
|
+
return ct(e) && In() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
|
|
1065
1069
|
}
|
|
1066
|
-
class
|
|
1070
|
+
class Ri extends ot {
|
|
1067
1071
|
constructor(t) {
|
|
1068
|
-
if (super(), this.finishedTime = null, this.isStopped = !1, !t)
|
|
1072
|
+
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !t)
|
|
1069
1073
|
return;
|
|
1070
|
-
const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: a = !1, finalKeyframe: o, onComplete:
|
|
1071
|
-
this.isPseudoElement = !!r, this.allowFlatten = a, this.options = t,
|
|
1072
|
-
const c =
|
|
1073
|
-
this.animation =
|
|
1074
|
+
const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: a = !1, finalKeyframe: o, onComplete: u } = t;
|
|
1075
|
+
this.isPseudoElement = !!r, this.allowFlatten = a, this.options = t, B(typeof t.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
1076
|
+
const c = Ei(t);
|
|
1077
|
+
this.animation = Fi(n, s, i, c, r), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1074
1078
|
if (this.finishedTime = this.time, !r) {
|
|
1075
|
-
const
|
|
1076
|
-
this.updateMotionValue ? this.updateMotionValue(
|
|
1079
|
+
const l = at(i, this.options, o, this.speed);
|
|
1080
|
+
this.updateMotionValue ? this.updateMotionValue(l) : Ai(n, s, l), this.animation.cancel();
|
|
1077
1081
|
}
|
|
1078
|
-
|
|
1082
|
+
u?.(), this.notifyFinished();
|
|
1079
1083
|
};
|
|
1080
1084
|
}
|
|
1081
1085
|
play() {
|
|
1082
|
-
this.isStopped || (this.animation.play(), this.state === "finished" && this.updateFinished());
|
|
1086
|
+
this.isStopped || (this.manualStartTime = null, this.animation.play(), this.state === "finished" && this.updateFinished());
|
|
1083
1087
|
}
|
|
1084
1088
|
pause() {
|
|
1085
1089
|
this.animation.pause();
|
|
@@ -1127,7 +1131,7 @@ class Ei extends at {
|
|
|
1127
1131
|
return /* @__PURE__ */ P(Number(this.animation.currentTime) || 0);
|
|
1128
1132
|
}
|
|
1129
1133
|
set time(t) {
|
|
1130
|
-
this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */
|
|
1134
|
+
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ k(t);
|
|
1131
1135
|
}
|
|
1132
1136
|
/**
|
|
1133
1137
|
* The playback speed of the animation.
|
|
@@ -1143,38 +1147,38 @@ class Ei extends at {
|
|
|
1143
1147
|
return this.finishedTime !== null ? "finished" : this.animation.playState;
|
|
1144
1148
|
}
|
|
1145
1149
|
get startTime() {
|
|
1146
|
-
return Number(this.animation.startTime);
|
|
1150
|
+
return this.manualStartTime ?? Number(this.animation.startTime);
|
|
1147
1151
|
}
|
|
1148
1152
|
set startTime(t) {
|
|
1149
|
-
this.animation.startTime = t;
|
|
1153
|
+
this.manualStartTime = this.animation.startTime = t;
|
|
1150
1154
|
}
|
|
1151
1155
|
/**
|
|
1152
1156
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
1153
1157
|
*/
|
|
1154
1158
|
attachTimeline({ timeline: t, observe: n }) {
|
|
1155
|
-
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t &&
|
|
1159
|
+
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t && Mi() ? (this.animation.timeline = t, H) : n(this);
|
|
1156
1160
|
}
|
|
1157
1161
|
}
|
|
1158
|
-
const
|
|
1159
|
-
anticipate:
|
|
1160
|
-
backInOut:
|
|
1161
|
-
circInOut:
|
|
1162
|
+
const Kn = {
|
|
1163
|
+
anticipate: hn,
|
|
1164
|
+
backInOut: fn,
|
|
1165
|
+
circInOut: dn
|
|
1162
1166
|
};
|
|
1163
|
-
function Ri(e) {
|
|
1164
|
-
return e in In;
|
|
1165
|
-
}
|
|
1166
1167
|
function Pi(e) {
|
|
1167
|
-
|
|
1168
|
+
return e in Kn;
|
|
1169
|
+
}
|
|
1170
|
+
function Oi(e) {
|
|
1171
|
+
typeof e.ease == "string" && Pi(e.ease) && (e.ease = Kn[e.ease]);
|
|
1168
1172
|
}
|
|
1169
|
-
const
|
|
1170
|
-
class
|
|
1173
|
+
const Re = 10;
|
|
1174
|
+
class ki extends Ri {
|
|
1171
1175
|
constructor(t) {
|
|
1172
|
-
|
|
1176
|
+
Oi(t), On(t), super(t), t.startTime !== void 0 && (this.startTime = t.startTime), this.options = t;
|
|
1173
1177
|
}
|
|
1174
1178
|
/**
|
|
1175
1179
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
1176
1180
|
*
|
|
1177
|
-
* Rather than read
|
|
1181
|
+
* Rather than read committed styles back out of the DOM, we can
|
|
1178
1182
|
* create a renderless JS animation and sample it twice to calculate
|
|
1179
1183
|
* its current value, "previous" value, and therefore allow
|
|
1180
1184
|
* Motion to calculate velocity for any subsequent animation.
|
|
@@ -1187,17 +1191,17 @@ class Oi extends Ei {
|
|
|
1187
1191
|
n.set(t);
|
|
1188
1192
|
return;
|
|
1189
1193
|
}
|
|
1190
|
-
const o = new
|
|
1194
|
+
const o = new lt({
|
|
1191
1195
|
...a,
|
|
1192
1196
|
autoplay: !1
|
|
1193
|
-
}),
|
|
1194
|
-
n.setWithVelocity(o.sample(
|
|
1197
|
+
}), u = Math.max(Re, R.now() - this.startTime), c = _(0, Re, u - Re);
|
|
1198
|
+
n.setWithVelocity(o.sample(Math.max(0, u - c)).value, o.sample(u).value, c), o.stop();
|
|
1195
1199
|
}
|
|
1196
1200
|
}
|
|
1197
|
-
const
|
|
1198
|
-
(
|
|
1201
|
+
const Kt = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
1202
|
+
(j.test(e) || e === "0") && // And it contains numbers and/or colors
|
|
1199
1203
|
!e.startsWith("url("));
|
|
1200
|
-
function
|
|
1204
|
+
function Bi(e) {
|
|
1201
1205
|
const t = e[0];
|
|
1202
1206
|
if (e.length === 1)
|
|
1203
1207
|
return !0;
|
|
@@ -1205,40 +1209,40 @@ function Ni(e) {
|
|
|
1205
1209
|
if (e[n] !== t)
|
|
1206
1210
|
return !0;
|
|
1207
1211
|
}
|
|
1208
|
-
function
|
|
1212
|
+
function Ii(e, t, n, s) {
|
|
1209
1213
|
const i = e[0];
|
|
1210
1214
|
if (i === null)
|
|
1211
1215
|
return !1;
|
|
1212
1216
|
if (t === "display" || t === "visibility")
|
|
1213
1217
|
return !0;
|
|
1214
|
-
const r = e[e.length - 1], a =
|
|
1215
|
-
return de(a === o, `You are trying to animate ${t} from "${i}" to "${r}". "${a ? r : i}" is not an animatable value.`, "value-not-animatable"), !a || !o ? !1 :
|
|
1218
|
+
const r = e[e.length - 1], a = Kt(i, t), o = Kt(r, t);
|
|
1219
|
+
return de(a === o, `You are trying to animate ${t} from "${i}" to "${r}". "${a ? r : i}" is not an animatable value.`, "value-not-animatable"), !a || !o ? !1 : Bi(e) || (n === "spring" || ct(n)) && s;
|
|
1216
1220
|
}
|
|
1217
|
-
function
|
|
1221
|
+
function Ye(e) {
|
|
1218
1222
|
e.duration = 0, e.type = "keyframes";
|
|
1219
1223
|
}
|
|
1220
|
-
const
|
|
1224
|
+
const Ni = /* @__PURE__ */ new Set([
|
|
1221
1225
|
"opacity",
|
|
1222
1226
|
"clipPath",
|
|
1223
1227
|
"filter",
|
|
1224
1228
|
"transform"
|
|
1225
1229
|
// TODO: Could be re-enabled now we have support for linear() easing
|
|
1226
1230
|
// "background-color"
|
|
1227
|
-
]),
|
|
1228
|
-
function
|
|
1231
|
+
]), Ki = /* @__PURE__ */ He(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
1232
|
+
function $i(e) {
|
|
1229
1233
|
const { motionValue: t, name: n, repeatDelay: s, repeatType: i, damping: r, type: a } = e;
|
|
1230
1234
|
if (!(t?.owner?.current instanceof HTMLElement))
|
|
1231
1235
|
return !1;
|
|
1232
|
-
const { onUpdate:
|
|
1233
|
-
return
|
|
1236
|
+
const { onUpdate: u, transformTemplate: c } = t.owner.getProps();
|
|
1237
|
+
return Ki() && n && Ni.has(n) && (n !== "transform" || !c) && /**
|
|
1234
1238
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
1235
1239
|
* no way to read the value from WAAPI every frame.
|
|
1236
1240
|
*/
|
|
1237
|
-
!
|
|
1241
|
+
!u && !s && i !== "mirror" && r !== 0 && a !== "inertia";
|
|
1238
1242
|
}
|
|
1239
|
-
const
|
|
1240
|
-
class
|
|
1241
|
-
constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: a = "loop", keyframes: o, name:
|
|
1243
|
+
const Li = 40;
|
|
1244
|
+
class Wi extends ot {
|
|
1245
|
+
constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: a = "loop", keyframes: o, name: u, motionValue: c, element: l, ...f }) {
|
|
1242
1246
|
super(), this.stop = () => {
|
|
1243
1247
|
this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
|
|
1244
1248
|
}, this.createdAt = R.now();
|
|
@@ -1249,27 +1253,27 @@ class Li extends at {
|
|
|
1249
1253
|
repeat: i,
|
|
1250
1254
|
repeatDelay: r,
|
|
1251
1255
|
repeatType: a,
|
|
1252
|
-
name:
|
|
1256
|
+
name: u,
|
|
1253
1257
|
motionValue: c,
|
|
1254
|
-
element:
|
|
1258
|
+
element: l,
|
|
1255
1259
|
...f
|
|
1256
|
-
},
|
|
1257
|
-
this.keyframeResolver = new
|
|
1260
|
+
}, p = l?.KeyframeResolver || ut;
|
|
1261
|
+
this.keyframeResolver = new p(o, (g, T, S) => this.onKeyframesResolved(g, T, h, !S), u, c, l), this.keyframeResolver?.scheduleResolve();
|
|
1258
1262
|
}
|
|
1259
1263
|
onKeyframesResolved(t, n, s, i) {
|
|
1260
1264
|
this.keyframeResolver = void 0;
|
|
1261
|
-
const { name: r, type: a, velocity: o, delay:
|
|
1262
|
-
this.resolvedAt = R.now(),
|
|
1265
|
+
const { name: r, type: a, velocity: o, delay: u, isHandoff: c, onUpdate: l } = s;
|
|
1266
|
+
this.resolvedAt = R.now(), Ii(t, r, a, o) || ((N.instantAnimations || !u) && l?.(at(t, s, n)), t[0] = t[t.length - 1], Ye(s), s.repeat = 0);
|
|
1263
1267
|
const h = {
|
|
1264
|
-
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt >
|
|
1268
|
+
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Li ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1265
1269
|
finalKeyframe: n,
|
|
1266
1270
|
...s,
|
|
1267
1271
|
keyframes: t
|
|
1268
|
-
},
|
|
1272
|
+
}, p = !c && $i(h) ? new ki({
|
|
1269
1273
|
...h,
|
|
1270
1274
|
element: h.motionValue.owner.current
|
|
1271
|
-
}) : new
|
|
1272
|
-
|
|
1275
|
+
}) : new lt(h);
|
|
1276
|
+
p.finished.then(() => this.notifyFinished()).catch(H), this.pendingTimeline && (this.stopTimeline = p.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = p;
|
|
1273
1277
|
}
|
|
1274
1278
|
get finished() {
|
|
1275
1279
|
return this._animation ? this.animation.finished : this._finished;
|
|
@@ -1279,7 +1283,7 @@ class Li extends at {
|
|
|
1279
1283
|
});
|
|
1280
1284
|
}
|
|
1281
1285
|
get animation() {
|
|
1282
|
-
return this._animation || (this.keyframeResolver?.resume(),
|
|
1286
|
+
return this._animation || (this.keyframeResolver?.resume(), wi()), this._animation;
|
|
1283
1287
|
}
|
|
1284
1288
|
get duration() {
|
|
1285
1289
|
return this.animation.duration;
|
|
@@ -1321,7 +1325,7 @@ class Li extends at {
|
|
|
1321
1325
|
this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
|
|
1322
1326
|
}
|
|
1323
1327
|
}
|
|
1324
|
-
class
|
|
1328
|
+
class _i {
|
|
1325
1329
|
constructor(t) {
|
|
1326
1330
|
this.stop = () => this.runAll("stop"), this.animations = t.filter(Boolean);
|
|
1327
1331
|
}
|
|
@@ -1365,10 +1369,10 @@ class Wi {
|
|
|
1365
1369
|
return this.getAll("startTime");
|
|
1366
1370
|
}
|
|
1367
1371
|
get duration() {
|
|
1368
|
-
return
|
|
1372
|
+
return $t(this.animations, "duration");
|
|
1369
1373
|
}
|
|
1370
1374
|
get iterationDuration() {
|
|
1371
|
-
return
|
|
1375
|
+
return $t(this.animations, "iterationDuration");
|
|
1372
1376
|
}
|
|
1373
1377
|
runAll(t) {
|
|
1374
1378
|
this.animations.forEach((n) => n[t]());
|
|
@@ -1386,7 +1390,7 @@ class Wi {
|
|
|
1386
1390
|
this.runAll("complete");
|
|
1387
1391
|
}
|
|
1388
1392
|
}
|
|
1389
|
-
function
|
|
1393
|
+
function $t(e, t) {
|
|
1390
1394
|
let n = 0;
|
|
1391
1395
|
for (let s = 0; s < e.length; s++) {
|
|
1392
1396
|
const i = e[s][t];
|
|
@@ -1394,40 +1398,40 @@ function Kt(e, t) {
|
|
|
1394
1398
|
}
|
|
1395
1399
|
return n;
|
|
1396
1400
|
}
|
|
1397
|
-
class
|
|
1401
|
+
class ji extends _i {
|
|
1398
1402
|
then(t, n) {
|
|
1399
1403
|
return this.finished.finally(t).then(() => {
|
|
1400
1404
|
});
|
|
1401
1405
|
}
|
|
1402
1406
|
}
|
|
1403
|
-
const
|
|
1407
|
+
const Ui = (
|
|
1404
1408
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
1405
1409
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
1406
1410
|
);
|
|
1407
|
-
function
|
|
1408
|
-
const t =
|
|
1411
|
+
function Gi(e) {
|
|
1412
|
+
const t = Ui.exec(e);
|
|
1409
1413
|
if (!t)
|
|
1410
1414
|
return [,];
|
|
1411
1415
|
const [, n, s, i] = t;
|
|
1412
1416
|
return [`--${n ?? s}`, i];
|
|
1413
1417
|
}
|
|
1414
|
-
const
|
|
1415
|
-
function
|
|
1416
|
-
|
|
1417
|
-
const [s, i] =
|
|
1418
|
+
const Yi = 4;
|
|
1419
|
+
function $n(e, t, n = 1) {
|
|
1420
|
+
B(n <= Yi, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1421
|
+
const [s, i] = Gi(e);
|
|
1418
1422
|
if (!s)
|
|
1419
1423
|
return;
|
|
1420
1424
|
const r = window.getComputedStyle(t).getPropertyValue(s);
|
|
1421
1425
|
if (r) {
|
|
1422
1426
|
const a = r.trim();
|
|
1423
|
-
return
|
|
1427
|
+
return tn(a) ? parseFloat(a) : a;
|
|
1424
1428
|
}
|
|
1425
|
-
return
|
|
1429
|
+
return tt(i) ? $n(i, t, n + 1) : i;
|
|
1426
1430
|
}
|
|
1427
|
-
function
|
|
1431
|
+
function Ln(e, t) {
|
|
1428
1432
|
return e?.[t] ?? e?.default ?? e;
|
|
1429
1433
|
}
|
|
1430
|
-
const
|
|
1434
|
+
const Wn = /* @__PURE__ */ new Set([
|
|
1431
1435
|
"width",
|
|
1432
1436
|
"height",
|
|
1433
1437
|
"top",
|
|
@@ -1435,35 +1439,35 @@ const Ln = /* @__PURE__ */ new Set([
|
|
|
1435
1439
|
"right",
|
|
1436
1440
|
"bottom",
|
|
1437
1441
|
...Q
|
|
1438
|
-
]),
|
|
1442
|
+
]), zi = {
|
|
1439
1443
|
test: (e) => e === "auto",
|
|
1440
1444
|
parse: (e) => e
|
|
1441
|
-
},
|
|
1442
|
-
function
|
|
1443
|
-
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" ||
|
|
1445
|
+
}, _n = (e) => (t) => t.test(e), jn = [Z, d, q, L, Ks, Ns, zi], Lt = (e) => jn.find(_n(e));
|
|
1446
|
+
function Xi(e) {
|
|
1447
|
+
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || nn(e) : !0;
|
|
1444
1448
|
}
|
|
1445
|
-
const
|
|
1446
|
-
function
|
|
1449
|
+
const qi = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
1450
|
+
function Hi(e) {
|
|
1447
1451
|
const [t, n] = e.slice(0, -1).split("(");
|
|
1448
1452
|
if (t === "drop-shadow")
|
|
1449
1453
|
return e;
|
|
1450
|
-
const [s] = n.match(
|
|
1454
|
+
const [s] = n.match(nt) || [];
|
|
1451
1455
|
if (!s)
|
|
1452
1456
|
return e;
|
|
1453
1457
|
const i = n.replace(s, "");
|
|
1454
|
-
let r =
|
|
1458
|
+
let r = qi.has(t) ? 1 : 0;
|
|
1455
1459
|
return s !== n && (r *= 100), t + "(" + r + i + ")";
|
|
1456
1460
|
}
|
|
1457
|
-
const
|
|
1458
|
-
...
|
|
1461
|
+
const Zi = /\b([a-z-]*)\(.*?\)/gu, ze = {
|
|
1462
|
+
...j,
|
|
1459
1463
|
getAnimatableNone: (e) => {
|
|
1460
|
-
const t = e.match(
|
|
1461
|
-
return t ? t.map(
|
|
1464
|
+
const t = e.match(Zi);
|
|
1465
|
+
return t ? t.map(Hi).join(" ") : e;
|
|
1462
1466
|
}
|
|
1463
|
-
},
|
|
1467
|
+
}, Wt = {
|
|
1464
1468
|
...Z,
|
|
1465
1469
|
transform: Math.round
|
|
1466
|
-
},
|
|
1470
|
+
}, Ji = {
|
|
1467
1471
|
rotate: L,
|
|
1468
1472
|
rotateX: L,
|
|
1469
1473
|
rotateY: L,
|
|
@@ -1475,63 +1479,82 @@ const Hi = /\b([a-z-]*)\(.*?\)/gu, Ye = {
|
|
|
1475
1479
|
skew: L,
|
|
1476
1480
|
skewX: L,
|
|
1477
1481
|
skewY: L,
|
|
1478
|
-
distance:
|
|
1479
|
-
translateX:
|
|
1480
|
-
translateY:
|
|
1481
|
-
translateZ:
|
|
1482
|
-
x:
|
|
1483
|
-
y:
|
|
1484
|
-
z:
|
|
1485
|
-
perspective:
|
|
1486
|
-
transformPerspective:
|
|
1482
|
+
distance: d,
|
|
1483
|
+
translateX: d,
|
|
1484
|
+
translateY: d,
|
|
1485
|
+
translateZ: d,
|
|
1486
|
+
x: d,
|
|
1487
|
+
y: d,
|
|
1488
|
+
z: d,
|
|
1489
|
+
perspective: d,
|
|
1490
|
+
transformPerspective: d,
|
|
1487
1491
|
opacity: le,
|
|
1488
|
-
originX:
|
|
1489
|
-
originY:
|
|
1490
|
-
originZ:
|
|
1491
|
-
},
|
|
1492
|
+
originX: Dt,
|
|
1493
|
+
originY: Dt,
|
|
1494
|
+
originZ: d
|
|
1495
|
+
}, ft = {
|
|
1492
1496
|
// Border props
|
|
1493
|
-
borderWidth:
|
|
1494
|
-
borderTopWidth:
|
|
1495
|
-
borderRightWidth:
|
|
1496
|
-
borderBottomWidth:
|
|
1497
|
-
borderLeftWidth:
|
|
1498
|
-
borderRadius:
|
|
1499
|
-
radius:
|
|
1500
|
-
borderTopLeftRadius:
|
|
1501
|
-
borderTopRightRadius:
|
|
1502
|
-
borderBottomRightRadius:
|
|
1503
|
-
borderBottomLeftRadius:
|
|
1497
|
+
borderWidth: d,
|
|
1498
|
+
borderTopWidth: d,
|
|
1499
|
+
borderRightWidth: d,
|
|
1500
|
+
borderBottomWidth: d,
|
|
1501
|
+
borderLeftWidth: d,
|
|
1502
|
+
borderRadius: d,
|
|
1503
|
+
radius: d,
|
|
1504
|
+
borderTopLeftRadius: d,
|
|
1505
|
+
borderTopRightRadius: d,
|
|
1506
|
+
borderBottomRightRadius: d,
|
|
1507
|
+
borderBottomLeftRadius: d,
|
|
1504
1508
|
// Positioning props
|
|
1505
|
-
width:
|
|
1506
|
-
maxWidth:
|
|
1507
|
-
height:
|
|
1508
|
-
maxHeight:
|
|
1509
|
-
top:
|
|
1510
|
-
right:
|
|
1511
|
-
bottom:
|
|
1512
|
-
left:
|
|
1509
|
+
width: d,
|
|
1510
|
+
maxWidth: d,
|
|
1511
|
+
height: d,
|
|
1512
|
+
maxHeight: d,
|
|
1513
|
+
top: d,
|
|
1514
|
+
right: d,
|
|
1515
|
+
bottom: d,
|
|
1516
|
+
left: d,
|
|
1517
|
+
inset: d,
|
|
1518
|
+
insetBlock: d,
|
|
1519
|
+
insetBlockStart: d,
|
|
1520
|
+
insetBlockEnd: d,
|
|
1521
|
+
insetInline: d,
|
|
1522
|
+
insetInlineStart: d,
|
|
1523
|
+
insetInlineEnd: d,
|
|
1513
1524
|
// Spacing props
|
|
1514
|
-
padding:
|
|
1515
|
-
paddingTop:
|
|
1516
|
-
paddingRight:
|
|
1517
|
-
paddingBottom:
|
|
1518
|
-
paddingLeft:
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1525
|
+
padding: d,
|
|
1526
|
+
paddingTop: d,
|
|
1527
|
+
paddingRight: d,
|
|
1528
|
+
paddingBottom: d,
|
|
1529
|
+
paddingLeft: d,
|
|
1530
|
+
paddingBlock: d,
|
|
1531
|
+
paddingBlockStart: d,
|
|
1532
|
+
paddingBlockEnd: d,
|
|
1533
|
+
paddingInline: d,
|
|
1534
|
+
paddingInlineStart: d,
|
|
1535
|
+
paddingInlineEnd: d,
|
|
1536
|
+
margin: d,
|
|
1537
|
+
marginTop: d,
|
|
1538
|
+
marginRight: d,
|
|
1539
|
+
marginBottom: d,
|
|
1540
|
+
marginLeft: d,
|
|
1541
|
+
marginBlock: d,
|
|
1542
|
+
marginBlockStart: d,
|
|
1543
|
+
marginBlockEnd: d,
|
|
1544
|
+
marginInline: d,
|
|
1545
|
+
marginInlineStart: d,
|
|
1546
|
+
marginInlineEnd: d,
|
|
1524
1547
|
// Misc
|
|
1525
|
-
backgroundPositionX:
|
|
1526
|
-
backgroundPositionY:
|
|
1527
|
-
...
|
|
1528
|
-
zIndex:
|
|
1548
|
+
backgroundPositionX: d,
|
|
1549
|
+
backgroundPositionY: d,
|
|
1550
|
+
...Ji,
|
|
1551
|
+
zIndex: Wt,
|
|
1529
1552
|
// SVG
|
|
1530
1553
|
fillOpacity: le,
|
|
1531
1554
|
strokeOpacity: le,
|
|
1532
|
-
numOctaves:
|
|
1533
|
-
},
|
|
1534
|
-
...
|
|
1555
|
+
numOctaves: Wt
|
|
1556
|
+
}, Qi = {
|
|
1557
|
+
...ft,
|
|
1535
1558
|
// Color props
|
|
1536
1559
|
color: D,
|
|
1537
1560
|
backgroundColor: D,
|
|
@@ -1544,25 +1567,25 @@ const Hi = /\b([a-z-]*)\(.*?\)/gu, Ye = {
|
|
|
1544
1567
|
borderRightColor: D,
|
|
1545
1568
|
borderBottomColor: D,
|
|
1546
1569
|
borderLeftColor: D,
|
|
1547
|
-
filter:
|
|
1548
|
-
WebkitFilter:
|
|
1549
|
-
},
|
|
1550
|
-
function
|
|
1551
|
-
let n =
|
|
1552
|
-
return n !==
|
|
1553
|
-
}
|
|
1554
|
-
const
|
|
1555
|
-
function
|
|
1570
|
+
filter: ze,
|
|
1571
|
+
WebkitFilter: ze
|
|
1572
|
+
}, Un = (e) => Qi[e];
|
|
1573
|
+
function Gn(e, t) {
|
|
1574
|
+
let n = Un(e);
|
|
1575
|
+
return n !== ze && (n = j), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
|
|
1576
|
+
}
|
|
1577
|
+
const er = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1578
|
+
function tr(e, t, n) {
|
|
1556
1579
|
let s = 0, i;
|
|
1557
1580
|
for (; s < e.length && !i; ) {
|
|
1558
1581
|
const r = e[s];
|
|
1559
|
-
typeof r == "string" && !
|
|
1582
|
+
typeof r == "string" && !er.has(r) && ue(r).values.length && (i = e[s]), s++;
|
|
1560
1583
|
}
|
|
1561
1584
|
if (i && n)
|
|
1562
1585
|
for (const r of t)
|
|
1563
|
-
e[r] =
|
|
1586
|
+
e[r] = Gn(n, i);
|
|
1564
1587
|
}
|
|
1565
|
-
class
|
|
1588
|
+
class nr extends ut {
|
|
1566
1589
|
constructor(t, n, s, i, r) {
|
|
1567
1590
|
super(t, n, s, i, r, !0);
|
|
1568
1591
|
}
|
|
@@ -1572,34 +1595,38 @@ class tr extends lt {
|
|
|
1572
1595
|
return;
|
|
1573
1596
|
super.readKeyframes();
|
|
1574
1597
|
for (let l = 0; l < t.length; l++) {
|
|
1575
|
-
let
|
|
1576
|
-
if (typeof
|
|
1577
|
-
const
|
|
1578
|
-
|
|
1598
|
+
let f = t[l];
|
|
1599
|
+
if (typeof f == "string" && (f = f.trim(), tt(f))) {
|
|
1600
|
+
const h = $n(f, n.current);
|
|
1601
|
+
h !== void 0 && (t[l] = h), l === t.length - 1 && (this.finalKeyframe = f);
|
|
1579
1602
|
}
|
|
1580
1603
|
}
|
|
1581
|
-
if (this.resolveNoneKeyframes(), !
|
|
1604
|
+
if (this.resolveNoneKeyframes(), !Wn.has(s) || t.length !== 2)
|
|
1582
1605
|
return;
|
|
1583
|
-
const [i, r] = t, a =
|
|
1606
|
+
const [i, r] = t, a = Lt(i), o = Lt(r), u = Ct(i), c = Ct(r);
|
|
1607
|
+
if (u !== c && W[s]) {
|
|
1608
|
+
this.needsMeasurement = !0;
|
|
1609
|
+
return;
|
|
1610
|
+
}
|
|
1584
1611
|
if (a !== o)
|
|
1585
|
-
if (
|
|
1612
|
+
if (It(a) && It(o))
|
|
1586
1613
|
for (let l = 0; l < t.length; l++) {
|
|
1587
|
-
const
|
|
1588
|
-
typeof
|
|
1614
|
+
const f = t[l];
|
|
1615
|
+
typeof f == "string" && (t[l] = parseFloat(f));
|
|
1589
1616
|
}
|
|
1590
|
-
else
|
|
1617
|
+
else W[s] && (this.needsMeasurement = !0);
|
|
1591
1618
|
}
|
|
1592
1619
|
resolveNoneKeyframes() {
|
|
1593
1620
|
const { unresolvedKeyframes: t, name: n } = this, s = [];
|
|
1594
1621
|
for (let i = 0; i < t.length; i++)
|
|
1595
|
-
(t[i] === null ||
|
|
1596
|
-
s.length &&
|
|
1622
|
+
(t[i] === null || Xi(t[i])) && s.push(i);
|
|
1623
|
+
s.length && tr(t, s, n);
|
|
1597
1624
|
}
|
|
1598
1625
|
measureInitialState() {
|
|
1599
1626
|
const { element: t, unresolvedKeyframes: n, name: s } = this;
|
|
1600
1627
|
if (!t || !t.current)
|
|
1601
1628
|
return;
|
|
1602
|
-
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin =
|
|
1629
|
+
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = W[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
|
|
1603
1630
|
const i = n[n.length - 1];
|
|
1604
1631
|
i !== void 0 && t.getValue(s, i).jump(i, !1);
|
|
1605
1632
|
}
|
|
@@ -1610,12 +1637,12 @@ class tr extends lt {
|
|
|
1610
1637
|
const i = t.getValue(n);
|
|
1611
1638
|
i && i.jump(this.measuredOrigin, !1);
|
|
1612
1639
|
const r = s.length - 1, a = s[r];
|
|
1613
|
-
s[r] =
|
|
1614
|
-
t.getValue(o).set(
|
|
1640
|
+
s[r] = W[n](t.measureViewportBox(), window.getComputedStyle(t.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), this.removedTransforms?.length && this.removedTransforms.forEach(([o, u]) => {
|
|
1641
|
+
t.getValue(o).set(u);
|
|
1615
1642
|
}), this.resolveNoneKeyframes();
|
|
1616
1643
|
}
|
|
1617
1644
|
}
|
|
1618
|
-
function
|
|
1645
|
+
function sr(e, t, n) {
|
|
1619
1646
|
if (e instanceof EventTarget)
|
|
1620
1647
|
return [e];
|
|
1621
1648
|
if (typeof e == "string") {
|
|
@@ -1625,8 +1652,8 @@ function nr(e, t, n) {
|
|
|
1625
1652
|
}
|
|
1626
1653
|
return Array.from(e);
|
|
1627
1654
|
}
|
|
1628
|
-
const
|
|
1629
|
-
class
|
|
1655
|
+
const Yn = (e, t) => t && typeof e == "number" ? t.transform(e) : e, _t = 30, ir = (e) => !isNaN(parseFloat(e));
|
|
1656
|
+
class rr {
|
|
1630
1657
|
/**
|
|
1631
1658
|
* @param init - The initiating value
|
|
1632
1659
|
* @param config - Optional configuration options
|
|
@@ -1642,7 +1669,7 @@ class ir {
|
|
|
1642
1669
|
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
|
|
1643
1670
|
}
|
|
1644
1671
|
setCurrent(t) {
|
|
1645
|
-
this.current = t, this.updatedAt = R.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity =
|
|
1672
|
+
this.current = t, this.updatedAt = R.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = ir(this.current));
|
|
1646
1673
|
}
|
|
1647
1674
|
setPrevFrameValue(t = this.current) {
|
|
1648
1675
|
this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -1688,10 +1715,10 @@ class ir {
|
|
|
1688
1715
|
* @deprecated
|
|
1689
1716
|
*/
|
|
1690
1717
|
onChange(t) {
|
|
1691
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1718
|
+
return process.env.NODE_ENV !== "production" && an(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
|
|
1692
1719
|
}
|
|
1693
1720
|
on(t, n) {
|
|
1694
|
-
this.events[t] || (this.events[t] = new
|
|
1721
|
+
this.events[t] || (this.events[t] = new sn());
|
|
1695
1722
|
const s = this.events[t].add(n);
|
|
1696
1723
|
return t === "change" ? () => {
|
|
1697
1724
|
s(), K.read(() => {
|
|
@@ -1771,10 +1798,10 @@ class ir {
|
|
|
1771
1798
|
*/
|
|
1772
1799
|
getVelocity() {
|
|
1773
1800
|
const t = R.now();
|
|
1774
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt >
|
|
1801
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > _t)
|
|
1775
1802
|
return 0;
|
|
1776
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
1777
|
-
return
|
|
1803
|
+
const n = Math.min(this.updatedAt - this.prevUpdatedAt, _t);
|
|
1804
|
+
return rn(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
1778
1805
|
}
|
|
1779
1806
|
/**
|
|
1780
1807
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -1826,237 +1853,237 @@ class ir {
|
|
|
1826
1853
|
}
|
|
1827
1854
|
}
|
|
1828
1855
|
function fe(e, t) {
|
|
1829
|
-
return new
|
|
1856
|
+
return new rr(e, t);
|
|
1830
1857
|
}
|
|
1831
|
-
const { schedule:
|
|
1832
|
-
function
|
|
1833
|
-
return
|
|
1858
|
+
const { schedule: ar } = /* @__PURE__ */ bn(queueMicrotask, !1);
|
|
1859
|
+
function zn(e) {
|
|
1860
|
+
return bs(e) && "ownerSVGElement" in e;
|
|
1834
1861
|
}
|
|
1835
|
-
function
|
|
1836
|
-
return
|
|
1862
|
+
function or(e) {
|
|
1863
|
+
return zn(e) && e.tagName === "svg";
|
|
1837
1864
|
}
|
|
1838
|
-
const F = (e) => !!(e && e.getVelocity),
|
|
1839
|
-
function
|
|
1865
|
+
const F = (e) => !!(e && e.getVelocity), lr = [...jn, D, j], ur = (e) => lr.find(_n(e));
|
|
1866
|
+
function ht(e) {
|
|
1840
1867
|
return typeof e == "object" && !Array.isArray(e);
|
|
1841
1868
|
}
|
|
1842
|
-
function
|
|
1843
|
-
return typeof e == "string" &&
|
|
1869
|
+
function Xn(e, t, n, s) {
|
|
1870
|
+
return typeof e == "string" && ht(t) ? sr(e, n, s) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e : [e];
|
|
1844
1871
|
}
|
|
1845
|
-
function
|
|
1872
|
+
function cr(e, t, n) {
|
|
1846
1873
|
return e * (t + 1);
|
|
1847
1874
|
}
|
|
1848
|
-
function
|
|
1875
|
+
function jt(e, t, n, s) {
|
|
1849
1876
|
return typeof t == "number" ? t : t.startsWith("-") || t.startsWith("+") ? Math.max(0, e + parseFloat(t)) : t === "<" ? n : t.startsWith("<") ? Math.max(0, n + parseFloat(t.slice(1))) : s.get(t) ?? e;
|
|
1850
1877
|
}
|
|
1851
|
-
function
|
|
1878
|
+
function fr(e, t, n) {
|
|
1852
1879
|
for (let s = 0; s < e.length; s++) {
|
|
1853
1880
|
const i = e[s];
|
|
1854
|
-
i.at > t && i.at < n && (
|
|
1881
|
+
i.at > t && i.at < n && (en(e, i), s--);
|
|
1855
1882
|
}
|
|
1856
1883
|
}
|
|
1857
|
-
function
|
|
1858
|
-
|
|
1884
|
+
function hr(e, t, n, s, i, r) {
|
|
1885
|
+
fr(e, i, r);
|
|
1859
1886
|
for (let a = 0; a < t.length; a++)
|
|
1860
1887
|
e.push({
|
|
1861
1888
|
value: t[a],
|
|
1862
1889
|
at: J(i, r, s[a]),
|
|
1863
|
-
easing:
|
|
1890
|
+
easing: gn(n, a)
|
|
1864
1891
|
});
|
|
1865
1892
|
}
|
|
1866
|
-
function
|
|
1893
|
+
function dr(e, t) {
|
|
1867
1894
|
for (let n = 0; n < e.length; n++)
|
|
1868
1895
|
e[n] = e[n] / (t + 1);
|
|
1869
1896
|
}
|
|
1870
|
-
function
|
|
1897
|
+
function mr(e, t) {
|
|
1871
1898
|
return e.at === t.at ? e.value === null ? 1 : t.value === null ? -1 : 0 : e.at - t.at;
|
|
1872
1899
|
}
|
|
1873
|
-
const pr = "easeInOut",
|
|
1874
|
-
function
|
|
1875
|
-
const r = t.duration || 0.3, a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(),
|
|
1876
|
-
let
|
|
1877
|
-
for (let
|
|
1878
|
-
const
|
|
1879
|
-
if (typeof
|
|
1880
|
-
c.set(
|
|
1900
|
+
const pr = "easeInOut", gr = 20;
|
|
1901
|
+
function yr(e, { defaultTransition: t = {}, ...n } = {}, s, i) {
|
|
1902
|
+
const r = t.duration || 0.3, a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), u = {}, c = /* @__PURE__ */ new Map();
|
|
1903
|
+
let l = 0, f = 0, h = 0;
|
|
1904
|
+
for (let p = 0; p < e.length; p++) {
|
|
1905
|
+
const g = e[p];
|
|
1906
|
+
if (typeof g == "string") {
|
|
1907
|
+
c.set(g, f);
|
|
1881
1908
|
continue;
|
|
1882
|
-
} else if (!Array.isArray(
|
|
1883
|
-
c.set(
|
|
1909
|
+
} else if (!Array.isArray(g)) {
|
|
1910
|
+
c.set(g.name, jt(f, g.at, l, c));
|
|
1884
1911
|
continue;
|
|
1885
1912
|
}
|
|
1886
|
-
let [T,
|
|
1887
|
-
v.at !== void 0 && (f =
|
|
1913
|
+
let [T, S, v = {}] = g;
|
|
1914
|
+
v.at !== void 0 && (f = jt(f, v.at, l, c));
|
|
1888
1915
|
let A = 0;
|
|
1889
|
-
const
|
|
1890
|
-
const x =
|
|
1891
|
-
let { ease: $ = t.ease || "easeOut", duration:
|
|
1892
|
-
const pt = typeof E == "function" ? E(M, b) : E,
|
|
1893
|
-
if (
|
|
1916
|
+
const V = (w, m, y, M = 0, b = 0) => {
|
|
1917
|
+
const x = br(w), { delay: E = 0, times: O = Pn(x), type: xe = "keyframes", repeat: te, repeatType: Da, repeatDelay: Fa = 0, ...as } = m;
|
|
1918
|
+
let { ease: $ = t.ease || "easeOut", duration: I } = m;
|
|
1919
|
+
const pt = typeof E == "function" ? E(M, b) : E, gt = x.length, yt = ct(xe) ? xe : i?.[xe || "keyframes"];
|
|
1920
|
+
if (gt <= 2 && yt) {
|
|
1894
1921
|
let ne = 100;
|
|
1895
|
-
if (
|
|
1922
|
+
if (gt === 2 && Sr(x)) {
|
|
1896
1923
|
const se = x[1] - x[0];
|
|
1897
1924
|
ne = Math.abs(se);
|
|
1898
1925
|
}
|
|
1899
|
-
const ge = { ...
|
|
1900
|
-
|
|
1901
|
-
const ye =
|
|
1902
|
-
$ = ye.ease,
|
|
1926
|
+
const ge = { ...as };
|
|
1927
|
+
I !== void 0 && (ge.duration = /* @__PURE__ */ k(I));
|
|
1928
|
+
const ye = Fn(ge, ne, yt);
|
|
1929
|
+
$ = ye.ease, I = ye.duration;
|
|
1903
1930
|
}
|
|
1904
|
-
|
|
1905
|
-
const
|
|
1906
|
-
|
|
1907
|
-
const
|
|
1908
|
-
if (
|
|
1909
|
-
|
|
1910
|
-
const ne = [...x], ge = [...
|
|
1931
|
+
I ?? (I = r);
|
|
1932
|
+
const bt = f + pt;
|
|
1933
|
+
O.length === 1 && O[0] === 0 && (O[1] = 1);
|
|
1934
|
+
const Tt = O.length - x.length;
|
|
1935
|
+
if (Tt > 0 && Rn(O, Tt), x.length === 1 && x.unshift(null), te) {
|
|
1936
|
+
B(te < gr, "Repeat count too high, must be less than 20", "repeat-count-high"), I = cr(I, te);
|
|
1937
|
+
const ne = [...x], ge = [...O];
|
|
1911
1938
|
$ = Array.isArray($) ? [...$] : [$];
|
|
1912
1939
|
const ye = [...$];
|
|
1913
1940
|
for (let se = 0; se < te; se++) {
|
|
1914
1941
|
x.push(...ne);
|
|
1915
1942
|
for (let ie = 0; ie < ne.length; ie++)
|
|
1916
|
-
|
|
1943
|
+
O.push(ge[ie] + (se + 1)), $.push(ie === 0 ? "linear" : gn(ye, ie - 1));
|
|
1917
1944
|
}
|
|
1918
|
-
|
|
1945
|
+
dr(O, te);
|
|
1919
1946
|
}
|
|
1920
|
-
const
|
|
1921
|
-
|
|
1947
|
+
const vt = bt + I;
|
|
1948
|
+
hr(y, x, $, O, bt, vt), A = Math.max(pt + I, A), h = Math.max(vt, h);
|
|
1922
1949
|
};
|
|
1923
1950
|
if (F(T)) {
|
|
1924
|
-
const w =
|
|
1925
|
-
S
|
|
1951
|
+
const w = Ut(T, o);
|
|
1952
|
+
V(S, v, Gt("default", w));
|
|
1926
1953
|
} else {
|
|
1927
|
-
const w =
|
|
1928
|
-
for (let y = 0; y <
|
|
1929
|
-
|
|
1930
|
-
const M = w[y], b =
|
|
1931
|
-
for (const x in
|
|
1932
|
-
S
|
|
1954
|
+
const w = Xn(T, S, s, u), m = w.length;
|
|
1955
|
+
for (let y = 0; y < m; y++) {
|
|
1956
|
+
S = S, v = v;
|
|
1957
|
+
const M = w[y], b = Ut(M, o);
|
|
1958
|
+
for (const x in S)
|
|
1959
|
+
V(S[x], Tr(v, x), Gt(x, b), y, m);
|
|
1933
1960
|
}
|
|
1934
1961
|
}
|
|
1935
|
-
|
|
1936
|
-
}
|
|
1937
|
-
return o.forEach((
|
|
1938
|
-
for (const T in
|
|
1939
|
-
const
|
|
1940
|
-
|
|
1941
|
-
const v = [], A = [],
|
|
1942
|
-
for (let
|
|
1943
|
-
const { at: y, value: M, easing: b } =
|
|
1944
|
-
v.push(M), A.push(/* @__PURE__ */
|
|
1962
|
+
l = f, f += A;
|
|
1963
|
+
}
|
|
1964
|
+
return o.forEach((p, g) => {
|
|
1965
|
+
for (const T in p) {
|
|
1966
|
+
const S = p[T];
|
|
1967
|
+
S.sort(mr);
|
|
1968
|
+
const v = [], A = [], V = [];
|
|
1969
|
+
for (let m = 0; m < S.length; m++) {
|
|
1970
|
+
const { at: y, value: M, easing: b } = S[m];
|
|
1971
|
+
v.push(M), A.push(/* @__PURE__ */ Je(0, h, y)), V.push(b || "easeOut");
|
|
1945
1972
|
}
|
|
1946
|
-
A[0] !== 0 && (A.unshift(0), v.unshift(v[0]),
|
|
1973
|
+
A[0] !== 0 && (A.unshift(0), v.unshift(v[0]), V.unshift(pr)), A[A.length - 1] !== 1 && (A.push(1), v.push(null)), a.has(g) || a.set(g, {
|
|
1947
1974
|
keyframes: {},
|
|
1948
1975
|
transition: {}
|
|
1949
1976
|
});
|
|
1950
|
-
const w = a.get(
|
|
1977
|
+
const w = a.get(g);
|
|
1951
1978
|
w.keyframes[T] = v, w.transition[T] = {
|
|
1952
1979
|
...t,
|
|
1953
1980
|
duration: h,
|
|
1954
|
-
ease:
|
|
1981
|
+
ease: V,
|
|
1955
1982
|
times: A,
|
|
1956
1983
|
...n
|
|
1957
1984
|
};
|
|
1958
1985
|
}
|
|
1959
1986
|
}), a;
|
|
1960
1987
|
}
|
|
1961
|
-
function
|
|
1988
|
+
function Ut(e, t) {
|
|
1962
1989
|
return !t.has(e) && t.set(e, {}), t.get(e);
|
|
1963
1990
|
}
|
|
1964
|
-
function
|
|
1991
|
+
function Gt(e, t) {
|
|
1965
1992
|
return t[e] || (t[e] = []), t[e];
|
|
1966
1993
|
}
|
|
1967
|
-
function
|
|
1994
|
+
function br(e) {
|
|
1968
1995
|
return Array.isArray(e) ? e : [e];
|
|
1969
1996
|
}
|
|
1970
|
-
function
|
|
1997
|
+
function Tr(e, t) {
|
|
1971
1998
|
return e && e[t] ? {
|
|
1972
1999
|
...e,
|
|
1973
2000
|
...e[t]
|
|
1974
2001
|
} : { ...e };
|
|
1975
2002
|
}
|
|
1976
|
-
const
|
|
1977
|
-
function
|
|
2003
|
+
const vr = (e) => typeof e == "number", Sr = (e) => e.every(vr), he = /* @__PURE__ */ new WeakMap(), Vr = (e) => Array.isArray(e);
|
|
2004
|
+
function Yt(e) {
|
|
1978
2005
|
const t = [{}, {}];
|
|
1979
2006
|
return e?.values.forEach((n, s) => {
|
|
1980
2007
|
t[0][s] = n.get(), t[1][s] = n.getVelocity();
|
|
1981
2008
|
}), t;
|
|
1982
2009
|
}
|
|
1983
|
-
function
|
|
2010
|
+
function qn(e, t, n, s) {
|
|
1984
2011
|
if (typeof t == "function") {
|
|
1985
|
-
const [i, r] =
|
|
2012
|
+
const [i, r] = Yt(s);
|
|
1986
2013
|
t = t(n !== void 0 ? n : e.custom, i, r);
|
|
1987
2014
|
}
|
|
1988
2015
|
if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
|
|
1989
|
-
const [i, r] =
|
|
2016
|
+
const [i, r] = Yt(s);
|
|
1990
2017
|
t = t(n !== void 0 ? n : e.custom, i, r);
|
|
1991
2018
|
}
|
|
1992
2019
|
return t;
|
|
1993
2020
|
}
|
|
1994
|
-
function
|
|
2021
|
+
function wr(e, t, n) {
|
|
1995
2022
|
const s = e.getProps();
|
|
1996
|
-
return
|
|
2023
|
+
return qn(s, t, s.custom, e);
|
|
1997
2024
|
}
|
|
1998
|
-
function
|
|
2025
|
+
function xr(e, t, n) {
|
|
1999
2026
|
e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, fe(n));
|
|
2000
2027
|
}
|
|
2001
|
-
function
|
|
2028
|
+
function Ar(e) {
|
|
2002
2029
|
return Vr(e) ? e[e.length - 1] || 0 : e;
|
|
2003
2030
|
}
|
|
2004
|
-
function
|
|
2005
|
-
const n =
|
|
2031
|
+
function Mr(e, t) {
|
|
2032
|
+
const n = wr(e, t);
|
|
2006
2033
|
let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
|
|
2007
2034
|
r = { ...r, ...s };
|
|
2008
2035
|
for (const a in r) {
|
|
2009
|
-
const o =
|
|
2010
|
-
|
|
2036
|
+
const o = Ar(r[a]);
|
|
2037
|
+
xr(e, a, o);
|
|
2011
2038
|
}
|
|
2012
2039
|
}
|
|
2013
|
-
function
|
|
2040
|
+
function Cr(e) {
|
|
2014
2041
|
return !!(F(e) && e.add);
|
|
2015
2042
|
}
|
|
2016
|
-
function
|
|
2043
|
+
function Dr(e, t) {
|
|
2017
2044
|
const n = e.getValue("willChange");
|
|
2018
|
-
if (
|
|
2045
|
+
if (Cr(n))
|
|
2019
2046
|
return n.add(t);
|
|
2020
|
-
if (!n &&
|
|
2021
|
-
const s = new
|
|
2047
|
+
if (!n && N.WillChange) {
|
|
2048
|
+
const s = new N.WillChange("auto");
|
|
2022
2049
|
e.addValue("willChange", s), s.add(t);
|
|
2023
2050
|
}
|
|
2024
2051
|
}
|
|
2025
|
-
const
|
|
2026
|
-
function
|
|
2027
|
-
return e.props[
|
|
2052
|
+
const dt = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Fr = "framerAppearId", Er = "data-" + dt(Fr);
|
|
2053
|
+
function Rr(e) {
|
|
2054
|
+
return e.props[Er];
|
|
2028
2055
|
}
|
|
2029
|
-
const
|
|
2030
|
-
function
|
|
2031
|
-
const i = e.filter(
|
|
2056
|
+
const Pr = (e) => e !== null;
|
|
2057
|
+
function Or(e, { repeat: t, repeatType: n = "loop" }, s) {
|
|
2058
|
+
const i = e.filter(Pr), r = t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
|
|
2032
2059
|
return i[r];
|
|
2033
2060
|
}
|
|
2034
|
-
const
|
|
2061
|
+
const kr = {
|
|
2035
2062
|
type: "spring",
|
|
2036
2063
|
stiffness: 500,
|
|
2037
2064
|
damping: 25,
|
|
2038
2065
|
restSpeed: 10
|
|
2039
|
-
},
|
|
2066
|
+
}, Br = (e) => ({
|
|
2040
2067
|
type: "spring",
|
|
2041
2068
|
stiffness: 550,
|
|
2042
2069
|
damping: e === 0 ? 2 * Math.sqrt(550) : 30,
|
|
2043
2070
|
restSpeed: 10
|
|
2044
|
-
}),
|
|
2071
|
+
}), Ir = {
|
|
2045
2072
|
type: "keyframes",
|
|
2046
2073
|
duration: 0.8
|
|
2047
|
-
},
|
|
2074
|
+
}, Nr = {
|
|
2048
2075
|
type: "keyframes",
|
|
2049
2076
|
ease: [0.25, 0.1, 0.35, 1],
|
|
2050
2077
|
duration: 0.3
|
|
2051
|
-
},
|
|
2052
|
-
function
|
|
2053
|
-
return !!Object.keys(
|
|
2078
|
+
}, Kr = (e, { keyframes: t }) => t.length > 2 ? Ir : ee.has(e) ? e.startsWith("scale") ? Br(t[1]) : kr : Nr;
|
|
2079
|
+
function $r({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: a, repeatDelay: o, from: u, elapsed: c, ...l }) {
|
|
2080
|
+
return !!Object.keys(l).length;
|
|
2054
2081
|
}
|
|
2055
|
-
const
|
|
2056
|
-
const o =
|
|
2082
|
+
const Hn = (e, t, n, s = {}, i, r) => (a) => {
|
|
2083
|
+
const o = Ln(s, e) || {}, u = o.delay || s.delay || 0;
|
|
2057
2084
|
let { elapsed: c = 0 } = s;
|
|
2058
|
-
c = c - /* @__PURE__ */
|
|
2059
|
-
const
|
|
2085
|
+
c = c - /* @__PURE__ */ k(u);
|
|
2086
|
+
const l = {
|
|
2060
2087
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
2061
2088
|
ease: "easeOut",
|
|
2062
2089
|
velocity: t.getVelocity(),
|
|
@@ -2072,62 +2099,62 @@ const qn = (e, t, n, s = {}, i, r) => (a) => {
|
|
|
2072
2099
|
motionValue: t,
|
|
2073
2100
|
element: r ? void 0 : i
|
|
2074
2101
|
};
|
|
2075
|
-
|
|
2102
|
+
$r(o) || Object.assign(l, Kr(e, l)), l.duration && (l.duration = /* @__PURE__ */ k(l.duration)), l.repeatDelay && (l.repeatDelay = /* @__PURE__ */ k(l.repeatDelay)), l.from !== void 0 && (l.keyframes[0] = l.from);
|
|
2076
2103
|
let f = !1;
|
|
2077
|
-
if ((
|
|
2078
|
-
const h =
|
|
2104
|
+
if ((l.type === !1 || l.duration === 0 && !l.repeatDelay) && (Ye(l), l.delay === 0 && (f = !0)), (N.instantAnimations || N.skipAnimations) && (f = !0, Ye(l), l.delay = 0), l.allowFlatten = !o.type && !o.ease, f && !r && t.get() !== void 0) {
|
|
2105
|
+
const h = Or(l.keyframes, o);
|
|
2079
2106
|
if (h !== void 0) {
|
|
2080
2107
|
K.update(() => {
|
|
2081
|
-
|
|
2108
|
+
l.onUpdate(h), l.onComplete();
|
|
2082
2109
|
});
|
|
2083
2110
|
return;
|
|
2084
2111
|
}
|
|
2085
2112
|
}
|
|
2086
|
-
return o.isSync ? new
|
|
2113
|
+
return o.isSync ? new lt(l) : new Wi(l);
|
|
2087
2114
|
};
|
|
2088
|
-
function
|
|
2115
|
+
function Lr({ protectedKeys: e, needsAnimating: t }, n) {
|
|
2089
2116
|
const s = e.hasOwnProperty(n) && t[n] !== !0;
|
|
2090
2117
|
return t[n] = !1, s;
|
|
2091
2118
|
}
|
|
2092
|
-
function
|
|
2119
|
+
function Wr(e, t, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
2093
2120
|
let { transition: r = e.getDefaultTransition(), transitionEnd: a, ...o } = t;
|
|
2094
2121
|
s && (r = s);
|
|
2095
|
-
const
|
|
2096
|
-
for (const
|
|
2097
|
-
const f = e.getValue(
|
|
2098
|
-
if (h === void 0 || c &&
|
|
2122
|
+
const u = [], c = i && e.animationState && e.animationState.getState()[i];
|
|
2123
|
+
for (const l in o) {
|
|
2124
|
+
const f = e.getValue(l, e.latestValues[l] ?? null), h = o[l];
|
|
2125
|
+
if (h === void 0 || c && Lr(c, l))
|
|
2099
2126
|
continue;
|
|
2100
|
-
const
|
|
2127
|
+
const p = {
|
|
2101
2128
|
delay: n,
|
|
2102
|
-
|
|
2103
|
-
},
|
|
2104
|
-
if (
|
|
2129
|
+
...Ln(r || {}, l)
|
|
2130
|
+
}, g = f.get();
|
|
2131
|
+
if (g !== void 0 && !f.isAnimating && !Array.isArray(h) && h === g && !p.velocity)
|
|
2105
2132
|
continue;
|
|
2106
2133
|
let T = !1;
|
|
2107
2134
|
if (window.MotionHandoffAnimation) {
|
|
2108
|
-
const v =
|
|
2135
|
+
const v = Rr(e);
|
|
2109
2136
|
if (v) {
|
|
2110
|
-
const A = window.MotionHandoffAnimation(v,
|
|
2111
|
-
A !== null && (
|
|
2137
|
+
const A = window.MotionHandoffAnimation(v, l, K);
|
|
2138
|
+
A !== null && (p.startTime = A, T = !0);
|
|
2112
2139
|
}
|
|
2113
2140
|
}
|
|
2114
|
-
|
|
2115
|
-
const
|
|
2116
|
-
|
|
2141
|
+
Dr(e, l), f.start(Hn(l, f, h, e.shouldReduceMotion && Wn.has(l) ? { type: !1 } : p, e, T));
|
|
2142
|
+
const S = f.animation;
|
|
2143
|
+
S && u.push(S);
|
|
2117
2144
|
}
|
|
2118
|
-
return a && Promise.all(
|
|
2145
|
+
return a && Promise.all(u).then(() => {
|
|
2119
2146
|
K.update(() => {
|
|
2120
|
-
a &&
|
|
2147
|
+
a && Mr(e, a);
|
|
2121
2148
|
});
|
|
2122
|
-
}),
|
|
2149
|
+
}), u;
|
|
2123
2150
|
}
|
|
2124
|
-
function
|
|
2151
|
+
function _r({ top: e, left: t, right: n, bottom: s }) {
|
|
2125
2152
|
return {
|
|
2126
2153
|
x: { min: t, max: n },
|
|
2127
2154
|
y: { min: e, max: s }
|
|
2128
2155
|
};
|
|
2129
2156
|
}
|
|
2130
|
-
function
|
|
2157
|
+
function jr(e, t) {
|
|
2131
2158
|
if (!t)
|
|
2132
2159
|
return e;
|
|
2133
2160
|
const n = t({ x: e.left, y: e.top }), s = t({ x: e.right, y: e.bottom });
|
|
@@ -2138,10 +2165,10 @@ function _r(e, t) {
|
|
|
2138
2165
|
right: s.x
|
|
2139
2166
|
};
|
|
2140
2167
|
}
|
|
2141
|
-
function
|
|
2142
|
-
return
|
|
2168
|
+
function Ur(e, t) {
|
|
2169
|
+
return _r(jr(e.getBoundingClientRect(), t));
|
|
2143
2170
|
}
|
|
2144
|
-
const
|
|
2171
|
+
const zt = {
|
|
2145
2172
|
animation: [
|
|
2146
2173
|
"animate",
|
|
2147
2174
|
"variants",
|
|
@@ -2160,30 +2187,30 @@ const Yt = {
|
|
|
2160
2187
|
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
2161
2188
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
2162
2189
|
layout: ["layout", "layoutId"]
|
|
2163
|
-
},
|
|
2164
|
-
for (const e in
|
|
2165
|
-
|
|
2166
|
-
isEnabled: (t) =>
|
|
2190
|
+
}, Xe = {};
|
|
2191
|
+
for (const e in zt)
|
|
2192
|
+
Xe[e] = {
|
|
2193
|
+
isEnabled: (t) => zt[e].some((n) => !!t[n])
|
|
2167
2194
|
};
|
|
2168
|
-
const
|
|
2169
|
-
x:
|
|
2170
|
-
y:
|
|
2171
|
-
}),
|
|
2172
|
-
function
|
|
2173
|
-
if (
|
|
2195
|
+
const Xt = () => ({ min: 0, max: 0 }), mt = () => ({
|
|
2196
|
+
x: Xt(),
|
|
2197
|
+
y: Xt()
|
|
2198
|
+
}), Gr = typeof window < "u", qe = { current: null }, Zn = { current: !1 };
|
|
2199
|
+
function Yr() {
|
|
2200
|
+
if (Zn.current = !0, !!Gr)
|
|
2174
2201
|
if (window.matchMedia) {
|
|
2175
|
-
const e = window.matchMedia("(prefers-reduced-motion)"), t = () =>
|
|
2202
|
+
const e = window.matchMedia("(prefers-reduced-motion)"), t = () => qe.current = e.matches;
|
|
2176
2203
|
e.addEventListener("change", t), t();
|
|
2177
2204
|
} else
|
|
2178
|
-
|
|
2205
|
+
qe.current = !1;
|
|
2179
2206
|
}
|
|
2180
|
-
function
|
|
2207
|
+
function zr(e) {
|
|
2181
2208
|
return e !== null && typeof e == "object" && typeof e.start == "function";
|
|
2182
2209
|
}
|
|
2183
|
-
function
|
|
2210
|
+
function Xr(e) {
|
|
2184
2211
|
return typeof e == "string" || Array.isArray(e);
|
|
2185
2212
|
}
|
|
2186
|
-
const
|
|
2213
|
+
const qr = [
|
|
2187
2214
|
"animate",
|
|
2188
2215
|
"whileInView",
|
|
2189
2216
|
"whileFocus",
|
|
@@ -2191,14 +2218,14 @@ const Xr = [
|
|
|
2191
2218
|
"whileTap",
|
|
2192
2219
|
"whileDrag",
|
|
2193
2220
|
"exit"
|
|
2194
|
-
],
|
|
2195
|
-
function
|
|
2196
|
-
return
|
|
2221
|
+
], Hr = ["initial", ...qr];
|
|
2222
|
+
function Jn(e) {
|
|
2223
|
+
return zr(e.animate) || Hr.some((t) => Xr(e[t]));
|
|
2197
2224
|
}
|
|
2198
|
-
function
|
|
2199
|
-
return !!(
|
|
2225
|
+
function Zr(e) {
|
|
2226
|
+
return !!(Jn(e) || e.variants);
|
|
2200
2227
|
}
|
|
2201
|
-
function
|
|
2228
|
+
function Jr(e, t, n) {
|
|
2202
2229
|
for (const s in t) {
|
|
2203
2230
|
const i = t[s], r = n[s];
|
|
2204
2231
|
if (F(i))
|
|
@@ -2218,7 +2245,7 @@ function Zr(e, t, n) {
|
|
|
2218
2245
|
t[s] === void 0 && e.removeValue(s);
|
|
2219
2246
|
return t;
|
|
2220
2247
|
}
|
|
2221
|
-
const
|
|
2248
|
+
const qt = [
|
|
2222
2249
|
"AnimationStart",
|
|
2223
2250
|
"AnimationComplete",
|
|
2224
2251
|
"Update",
|
|
@@ -2227,7 +2254,7 @@ const Xt = [
|
|
|
2227
2254
|
"LayoutAnimationStart",
|
|
2228
2255
|
"LayoutAnimationComplete"
|
|
2229
2256
|
];
|
|
2230
|
-
class
|
|
2257
|
+
class Qn {
|
|
2231
2258
|
/**
|
|
2232
2259
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
2233
2260
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -2239,25 +2266,25 @@ class Jn {
|
|
|
2239
2266
|
return {};
|
|
2240
2267
|
}
|
|
2241
2268
|
constructor({ parent: t, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: r, visualState: a }, o = {}) {
|
|
2242
|
-
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver =
|
|
2269
|
+
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = ut, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
2243
2270
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
2244
2271
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
2245
2272
|
const h = R.now();
|
|
2246
2273
|
this.renderScheduledAt < h && (this.renderScheduledAt = h, K.render(this.render, !1, !0));
|
|
2247
2274
|
};
|
|
2248
|
-
const { latestValues:
|
|
2249
|
-
this.latestValues =
|
|
2250
|
-
const { willChange:
|
|
2275
|
+
const { latestValues: u, renderState: c } = a;
|
|
2276
|
+
this.latestValues = u, this.baseTarget = { ...u }, this.initialValues = n.initial ? { ...u } : {}, this.renderState = c, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = i, this.options = o, this.blockInitialAnimation = !!r, this.isControllingVariants = Jn(n), this.isVariantNode = Zr(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
|
|
2277
|
+
const { willChange: l, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
2251
2278
|
for (const h in f) {
|
|
2252
|
-
const
|
|
2253
|
-
|
|
2279
|
+
const p = f[h];
|
|
2280
|
+
u[h] !== void 0 && F(p) && p.set(u[h]);
|
|
2254
2281
|
}
|
|
2255
2282
|
}
|
|
2256
2283
|
mount(t) {
|
|
2257
|
-
this.current = t, he.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)),
|
|
2284
|
+
this.current = t, he.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (Zn.current || Yr(), this.shouldReduceMotion = qe.current), process.env.NODE_ENV !== "production" && an(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.parent?.addChild(this), this.update(this.props, this.presenceContext);
|
|
2258
2285
|
}
|
|
2259
2286
|
unmount() {
|
|
2260
|
-
this.projection && this.projection.unmount(),
|
|
2287
|
+
this.projection && this.projection.unmount(), ke(this.notifyUpdate), ke(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
|
|
2261
2288
|
for (const t in this.events)
|
|
2262
2289
|
this.events[t].clear();
|
|
2263
2290
|
for (const t in this.features) {
|
|
@@ -2289,8 +2316,8 @@ class Jn {
|
|
|
2289
2316
|
}
|
|
2290
2317
|
updateFeatures() {
|
|
2291
2318
|
let t = "animation";
|
|
2292
|
-
for (t in
|
|
2293
|
-
const n =
|
|
2319
|
+
for (t in Xe) {
|
|
2320
|
+
const n = Xe[t];
|
|
2294
2321
|
if (!n)
|
|
2295
2322
|
continue;
|
|
2296
2323
|
const { isEnabled: s, Feature: i } = n;
|
|
@@ -2309,7 +2336,7 @@ class Jn {
|
|
|
2309
2336
|
* removed with a re-render to work.
|
|
2310
2337
|
*/
|
|
2311
2338
|
measureViewportBox() {
|
|
2312
|
-
return this.current ? this.measureInstanceViewportBox(this.current, this.props) :
|
|
2339
|
+
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : mt();
|
|
2313
2340
|
}
|
|
2314
2341
|
getStaticValue(t) {
|
|
2315
2342
|
return this.latestValues[t];
|
|
@@ -2323,13 +2350,13 @@ class Jn {
|
|
|
2323
2350
|
*/
|
|
2324
2351
|
update(t, n) {
|
|
2325
2352
|
(t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
2326
|
-
for (let s = 0; s <
|
|
2327
|
-
const i =
|
|
2353
|
+
for (let s = 0; s < qt.length; s++) {
|
|
2354
|
+
const i = qt[s];
|
|
2328
2355
|
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
|
|
2329
2356
|
const r = "on" + i, a = t[r];
|
|
2330
2357
|
a && (this.propEventSubscriptions[i] = this.on(i, a));
|
|
2331
2358
|
}
|
|
2332
|
-
this.prevMotionValues =
|
|
2359
|
+
this.prevMotionValues = Jr(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
2333
2360
|
}
|
|
2334
2361
|
getProps() {
|
|
2335
2362
|
return this.props;
|
|
@@ -2394,7 +2421,7 @@ class Jn {
|
|
|
2394
2421
|
*/
|
|
2395
2422
|
readValue(t, n) {
|
|
2396
2423
|
let s = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
|
|
2397
|
-
return s != null && (typeof s == "string" && (
|
|
2424
|
+
return s != null && (typeof s == "string" && (tn(s) || nn(s)) ? s = parseFloat(s) : !ur(s) && j.test(n) && (s = Gn(t, n)), this.setBaseTarget(t, F(s) ? s.get() : s)), F(s) ? s.get() : s;
|
|
2398
2425
|
}
|
|
2399
2426
|
/**
|
|
2400
2427
|
* Set the base target to later animate back to. This is currently
|
|
@@ -2411,7 +2438,7 @@ class Jn {
|
|
|
2411
2438
|
const { initial: n } = this.props;
|
|
2412
2439
|
let s;
|
|
2413
2440
|
if (typeof n == "string" || typeof n == "object") {
|
|
2414
|
-
const r =
|
|
2441
|
+
const r = qn(this.props, n, this.presenceContext?.custom);
|
|
2415
2442
|
r && (s = r[t]);
|
|
2416
2443
|
}
|
|
2417
2444
|
if (n && s !== void 0)
|
|
@@ -2420,18 +2447,18 @@ class Jn {
|
|
|
2420
2447
|
return i !== void 0 && !F(i) ? i : this.initialValues[t] !== void 0 && s === void 0 ? void 0 : this.baseTarget[t];
|
|
2421
2448
|
}
|
|
2422
2449
|
on(t, n) {
|
|
2423
|
-
return this.events[t] || (this.events[t] = new
|
|
2450
|
+
return this.events[t] || (this.events[t] = new sn()), this.events[t].add(n);
|
|
2424
2451
|
}
|
|
2425
2452
|
notify(t, ...n) {
|
|
2426
2453
|
this.events[t] && this.events[t].notify(...n);
|
|
2427
2454
|
}
|
|
2428
2455
|
scheduleRenderMicrotask() {
|
|
2429
|
-
|
|
2456
|
+
ar.render(this.render);
|
|
2430
2457
|
}
|
|
2431
2458
|
}
|
|
2432
|
-
class
|
|
2459
|
+
class es extends Qn {
|
|
2433
2460
|
constructor() {
|
|
2434
|
-
super(...arguments), this.KeyframeResolver =
|
|
2461
|
+
super(...arguments), this.KeyframeResolver = nr;
|
|
2435
2462
|
}
|
|
2436
2463
|
sortInstanceNodePosition(t, n) {
|
|
2437
2464
|
return t.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
@@ -2450,53 +2477,53 @@ class Qn extends Jn {
|
|
|
2450
2477
|
}));
|
|
2451
2478
|
}
|
|
2452
2479
|
}
|
|
2453
|
-
const
|
|
2480
|
+
const Qr = {
|
|
2454
2481
|
x: "translateX",
|
|
2455
2482
|
y: "translateY",
|
|
2456
2483
|
z: "translateZ",
|
|
2457
2484
|
transformPerspective: "perspective"
|
|
2458
|
-
},
|
|
2459
|
-
function
|
|
2485
|
+
}, ea = Q.length;
|
|
2486
|
+
function ta(e, t, n) {
|
|
2460
2487
|
let s = "", i = !0;
|
|
2461
|
-
for (let r = 0; r <
|
|
2488
|
+
for (let r = 0; r < ea; r++) {
|
|
2462
2489
|
const a = Q[r], o = e[a];
|
|
2463
2490
|
if (o === void 0)
|
|
2464
2491
|
continue;
|
|
2465
|
-
let
|
|
2466
|
-
if (typeof o == "number" ?
|
|
2467
|
-
const c =
|
|
2468
|
-
if (!
|
|
2492
|
+
let u = !0;
|
|
2493
|
+
if (typeof o == "number" ? u = o === (a.startsWith("scale") ? 1 : 0) : u = parseFloat(o) === 0, !u || n) {
|
|
2494
|
+
const c = Yn(o, ft[a]);
|
|
2495
|
+
if (!u) {
|
|
2469
2496
|
i = !1;
|
|
2470
|
-
const
|
|
2471
|
-
s += `${
|
|
2497
|
+
const l = Qr[a] || a;
|
|
2498
|
+
s += `${l}(${c}) `;
|
|
2472
2499
|
}
|
|
2473
2500
|
n && (t[a] = c);
|
|
2474
2501
|
}
|
|
2475
2502
|
}
|
|
2476
2503
|
return s = s.trim(), n ? s = n(t, i ? "" : s) : i && (s = "none"), s;
|
|
2477
2504
|
}
|
|
2478
|
-
function
|
|
2505
|
+
function ts(e, t, n) {
|
|
2479
2506
|
const { style: s, vars: i, transformOrigin: r } = e;
|
|
2480
2507
|
let a = !1, o = !1;
|
|
2481
|
-
for (const
|
|
2482
|
-
const c = t[
|
|
2483
|
-
if (ee.has(
|
|
2508
|
+
for (const u in t) {
|
|
2509
|
+
const c = t[u];
|
|
2510
|
+
if (ee.has(u)) {
|
|
2484
2511
|
a = !0;
|
|
2485
2512
|
continue;
|
|
2486
|
-
} else if (
|
|
2487
|
-
i[
|
|
2513
|
+
} else if (vn(u)) {
|
|
2514
|
+
i[u] = c;
|
|
2488
2515
|
continue;
|
|
2489
2516
|
} else {
|
|
2490
|
-
const
|
|
2491
|
-
|
|
2517
|
+
const l = Yn(c, ft[u]);
|
|
2518
|
+
u.startsWith("origin") ? (o = !0, r[u] = l) : s[u] = l;
|
|
2492
2519
|
}
|
|
2493
2520
|
}
|
|
2494
|
-
if (t.transform || (a || n ? s.transform =
|
|
2495
|
-
const { originX:
|
|
2496
|
-
s.transformOrigin = `${
|
|
2521
|
+
if (t.transform || (a || n ? s.transform = ta(t, e.transform, n) : s.transform && (s.transform = "none")), o) {
|
|
2522
|
+
const { originX: u = "50%", originY: c = "50%", originZ: l = 0 } = r;
|
|
2523
|
+
s.transformOrigin = `${u} ${c} ${l}`;
|
|
2497
2524
|
}
|
|
2498
2525
|
}
|
|
2499
|
-
function
|
|
2526
|
+
function ns(e, { style: t, vars: n }, s, i) {
|
|
2500
2527
|
const r = e.style;
|
|
2501
2528
|
let a;
|
|
2502
2529
|
for (a in t)
|
|
@@ -2505,7 +2532,7 @@ function ts(e, { style: t, vars: n }, s, i) {
|
|
|
2505
2532
|
for (a in n)
|
|
2506
2533
|
r.setProperty(a, n[a]);
|
|
2507
2534
|
}
|
|
2508
|
-
function
|
|
2535
|
+
function Ht(e, t) {
|
|
2509
2536
|
return t.max === t.min ? 0 : e / (t.max - t.min) * 100;
|
|
2510
2537
|
}
|
|
2511
2538
|
const re = {
|
|
@@ -2513,24 +2540,24 @@ const re = {
|
|
|
2513
2540
|
if (!t.target)
|
|
2514
2541
|
return e;
|
|
2515
2542
|
if (typeof e == "string")
|
|
2516
|
-
if (
|
|
2543
|
+
if (d.test(e))
|
|
2517
2544
|
e = parseFloat(e);
|
|
2518
2545
|
else
|
|
2519
2546
|
return e;
|
|
2520
|
-
const n =
|
|
2547
|
+
const n = Ht(e, t.target.x), s = Ht(e, t.target.y);
|
|
2521
2548
|
return `${n}% ${s}%`;
|
|
2522
2549
|
}
|
|
2523
|
-
},
|
|
2550
|
+
}, na = {
|
|
2524
2551
|
correct: (e, { treeScale: t, projectionDelta: n }) => {
|
|
2525
|
-
const s = e, i =
|
|
2552
|
+
const s = e, i = j.parse(e);
|
|
2526
2553
|
if (i.length > 5)
|
|
2527
2554
|
return s;
|
|
2528
|
-
const r =
|
|
2529
|
-
i[0 + a] /= o, i[1 + a] /=
|
|
2530
|
-
const c = J(o,
|
|
2555
|
+
const r = j.createTransformer(e), a = typeof i[0] != "number" ? 1 : 0, o = n.x.scale * t.x, u = n.y.scale * t.y;
|
|
2556
|
+
i[0 + a] /= o, i[1 + a] /= u;
|
|
2557
|
+
const c = J(o, u, 0.5);
|
|
2531
2558
|
return typeof i[2 + a] == "number" && (i[2 + a] /= c), typeof i[3 + a] == "number" && (i[3 + a] /= c), r(i);
|
|
2532
2559
|
}
|
|
2533
|
-
},
|
|
2560
|
+
}, sa = {
|
|
2534
2561
|
borderRadius: {
|
|
2535
2562
|
...re,
|
|
2536
2563
|
applyTo: [
|
|
@@ -2544,51 +2571,51 @@ const re = {
|
|
|
2544
2571
|
borderTopRightRadius: re,
|
|
2545
2572
|
borderBottomLeftRadius: re,
|
|
2546
2573
|
borderBottomRightRadius: re,
|
|
2547
|
-
boxShadow:
|
|
2574
|
+
boxShadow: na
|
|
2548
2575
|
};
|
|
2549
|
-
function
|
|
2550
|
-
return ee.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!
|
|
2576
|
+
function ia(e, { layout: t, layoutId: n }) {
|
|
2577
|
+
return ee.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!sa[e] || e === "opacity");
|
|
2551
2578
|
}
|
|
2552
|
-
function
|
|
2579
|
+
function ss(e, t, n) {
|
|
2553
2580
|
const { style: s } = e, i = {};
|
|
2554
2581
|
for (const r in s)
|
|
2555
|
-
(F(s[r]) || t.style && F(t.style[r]) ||
|
|
2582
|
+
(F(s[r]) || t.style && F(t.style[r]) || ia(r, e) || n?.getValue(r)?.liveStyle !== void 0) && (i[r] = s[r]);
|
|
2556
2583
|
return i;
|
|
2557
2584
|
}
|
|
2558
|
-
function
|
|
2585
|
+
function ra(e) {
|
|
2559
2586
|
return window.getComputedStyle(e);
|
|
2560
2587
|
}
|
|
2561
|
-
class
|
|
2588
|
+
class aa extends es {
|
|
2562
2589
|
constructor() {
|
|
2563
|
-
super(...arguments), this.type = "html", this.renderInstance =
|
|
2590
|
+
super(...arguments), this.type = "html", this.renderInstance = ns;
|
|
2564
2591
|
}
|
|
2565
2592
|
readValueFromInstance(t, n) {
|
|
2566
2593
|
if (ee.has(n))
|
|
2567
|
-
return this.projection?.isProjecting ?
|
|
2594
|
+
return this.projection?.isProjecting ? We(n) : bi(t, n);
|
|
2568
2595
|
{
|
|
2569
|
-
const s =
|
|
2596
|
+
const s = ra(t), i = (vn(n) ? s.getPropertyValue(n) : s[n]) || 0;
|
|
2570
2597
|
return typeof i == "string" ? i.trim() : i;
|
|
2571
2598
|
}
|
|
2572
2599
|
}
|
|
2573
2600
|
measureInstanceViewportBox(t, { transformPagePoint: n }) {
|
|
2574
|
-
return
|
|
2601
|
+
return Ur(t, n);
|
|
2575
2602
|
}
|
|
2576
2603
|
build(t, n, s) {
|
|
2577
|
-
|
|
2604
|
+
ts(t, n, s.transformTemplate);
|
|
2578
2605
|
}
|
|
2579
2606
|
scrapeMotionValuesFromProps(t, n, s) {
|
|
2580
|
-
return
|
|
2607
|
+
return ss(t, n, s);
|
|
2581
2608
|
}
|
|
2582
2609
|
}
|
|
2583
|
-
function
|
|
2610
|
+
function oa(e, t) {
|
|
2584
2611
|
return e in t;
|
|
2585
2612
|
}
|
|
2586
|
-
class
|
|
2613
|
+
class la extends Qn {
|
|
2587
2614
|
constructor() {
|
|
2588
2615
|
super(...arguments), this.type = "object";
|
|
2589
2616
|
}
|
|
2590
2617
|
readValueFromInstance(t, n) {
|
|
2591
|
-
if (
|
|
2618
|
+
if (oa(n, t)) {
|
|
2592
2619
|
const s = t[n];
|
|
2593
2620
|
if (typeof s == "string" || typeof s == "number")
|
|
2594
2621
|
return s;
|
|
@@ -2600,7 +2627,7 @@ class oa extends Jn {
|
|
|
2600
2627
|
delete n.output[t];
|
|
2601
2628
|
}
|
|
2602
2629
|
measureInstanceViewportBox() {
|
|
2603
|
-
return
|
|
2630
|
+
return mt();
|
|
2604
2631
|
}
|
|
2605
2632
|
build(t, n) {
|
|
2606
2633
|
Object.assign(t.output, n);
|
|
@@ -2612,21 +2639,27 @@ class oa extends Jn {
|
|
|
2612
2639
|
return 0;
|
|
2613
2640
|
}
|
|
2614
2641
|
}
|
|
2615
|
-
const
|
|
2642
|
+
const ua = {
|
|
2616
2643
|
offset: "stroke-dashoffset",
|
|
2617
2644
|
array: "stroke-dasharray"
|
|
2618
|
-
},
|
|
2645
|
+
}, ca = {
|
|
2619
2646
|
offset: "strokeDashoffset",
|
|
2620
2647
|
array: "strokeDasharray"
|
|
2621
2648
|
};
|
|
2622
|
-
function
|
|
2649
|
+
function fa(e, t, n = 1, s = 0, i = !0) {
|
|
2623
2650
|
e.pathLength = 1;
|
|
2624
|
-
const r = i ?
|
|
2625
|
-
e[r.offset] =
|
|
2626
|
-
const a =
|
|
2651
|
+
const r = i ? ua : ca;
|
|
2652
|
+
e[r.offset] = d.transform(-s);
|
|
2653
|
+
const a = d.transform(t), o = d.transform(n);
|
|
2627
2654
|
e[r.array] = `${a} ${o}`;
|
|
2628
2655
|
}
|
|
2629
|
-
|
|
2656
|
+
const ha = [
|
|
2657
|
+
"offsetDistance",
|
|
2658
|
+
"offsetPath",
|
|
2659
|
+
"offsetRotate",
|
|
2660
|
+
"offsetAnchor"
|
|
2661
|
+
];
|
|
2662
|
+
function da(e, {
|
|
2630
2663
|
attrX: t,
|
|
2631
2664
|
attrY: n,
|
|
2632
2665
|
attrScale: s,
|
|
@@ -2635,16 +2668,19 @@ function fa(e, {
|
|
|
2635
2668
|
pathOffset: a = 0,
|
|
2636
2669
|
// This is object creation, which we try to avoid per-frame.
|
|
2637
2670
|
...o
|
|
2638
|
-
},
|
|
2639
|
-
if (
|
|
2671
|
+
}, u, c, l) {
|
|
2672
|
+
if (ts(e, o, c), u) {
|
|
2640
2673
|
e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
|
|
2641
2674
|
return;
|
|
2642
2675
|
}
|
|
2643
2676
|
e.attrs = e.style, e.style = {};
|
|
2644
2677
|
const { attrs: f, style: h } = e;
|
|
2645
|
-
f.transform && (h.transform = f.transform, delete f.transform), (h.transform || f.transformOrigin) && (h.transformOrigin = f.transformOrigin ?? "50% 50%", delete f.transformOrigin), h.transform && (h.transformBox =
|
|
2678
|
+
f.transform && (h.transform = f.transform, delete f.transform), (h.transform || f.transformOrigin) && (h.transformOrigin = f.transformOrigin ?? "50% 50%", delete f.transformOrigin), h.transform && (h.transformBox = l?.transformBox ?? "fill-box", delete f.transformBox);
|
|
2679
|
+
for (const p of ha)
|
|
2680
|
+
f[p] !== void 0 && (h[p] = f[p], delete f[p]);
|
|
2681
|
+
t !== void 0 && (f.x = t), n !== void 0 && (f.y = n), s !== void 0 && (f.scale = s), i !== void 0 && fa(f, i, r, a, !1);
|
|
2646
2682
|
}
|
|
2647
|
-
const
|
|
2683
|
+
const is = /* @__PURE__ */ new Set([
|
|
2648
2684
|
"baseFrequency",
|
|
2649
2685
|
"diffuseConstant",
|
|
2650
2686
|
"kernelMatrix",
|
|
@@ -2668,14 +2704,14 @@ const ss = /* @__PURE__ */ new Set([
|
|
|
2668
2704
|
"startOffset",
|
|
2669
2705
|
"textLength",
|
|
2670
2706
|
"lengthAdjust"
|
|
2671
|
-
]),
|
|
2672
|
-
function
|
|
2673
|
-
|
|
2707
|
+
]), ma = (e) => typeof e == "string" && e.toLowerCase() === "svg";
|
|
2708
|
+
function pa(e, t, n, s) {
|
|
2709
|
+
ns(e, t, void 0, s);
|
|
2674
2710
|
for (const i in t.attrs)
|
|
2675
|
-
e.setAttribute(
|
|
2711
|
+
e.setAttribute(is.has(i) ? i : dt(i), t.attrs[i]);
|
|
2676
2712
|
}
|
|
2677
|
-
function
|
|
2678
|
-
const s =
|
|
2713
|
+
function ga(e, t, n) {
|
|
2714
|
+
const s = ss(e, t, n);
|
|
2679
2715
|
for (const i in e)
|
|
2680
2716
|
if (F(e[i]) || F(t[i])) {
|
|
2681
2717
|
const r = Q.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
@@ -2683,34 +2719,34 @@ function pa(e, t, n) {
|
|
|
2683
2719
|
}
|
|
2684
2720
|
return s;
|
|
2685
2721
|
}
|
|
2686
|
-
class
|
|
2722
|
+
class ya extends es {
|
|
2687
2723
|
constructor() {
|
|
2688
|
-
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox =
|
|
2724
|
+
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = mt;
|
|
2689
2725
|
}
|
|
2690
2726
|
getBaseTargetFromProps(t, n) {
|
|
2691
2727
|
return t[n];
|
|
2692
2728
|
}
|
|
2693
2729
|
readValueFromInstance(t, n) {
|
|
2694
2730
|
if (ee.has(n)) {
|
|
2695
|
-
const s =
|
|
2731
|
+
const s = Un(n);
|
|
2696
2732
|
return s && s.default || 0;
|
|
2697
2733
|
}
|
|
2698
|
-
return n =
|
|
2734
|
+
return n = is.has(n) ? n : dt(n), t.getAttribute(n);
|
|
2699
2735
|
}
|
|
2700
2736
|
scrapeMotionValuesFromProps(t, n, s) {
|
|
2701
|
-
return
|
|
2737
|
+
return ga(t, n, s);
|
|
2702
2738
|
}
|
|
2703
2739
|
build(t, n, s) {
|
|
2704
|
-
|
|
2740
|
+
da(t, n, this.isSVGTag, s.transformTemplate, s.style);
|
|
2705
2741
|
}
|
|
2706
2742
|
renderInstance(t, n, s, i) {
|
|
2707
|
-
|
|
2743
|
+
pa(t, n, s, i);
|
|
2708
2744
|
}
|
|
2709
2745
|
mount(t) {
|
|
2710
|
-
this.isSVGTag =
|
|
2746
|
+
this.isSVGTag = ma(t.tagName), super.mount(t);
|
|
2711
2747
|
}
|
|
2712
2748
|
}
|
|
2713
|
-
function
|
|
2749
|
+
function ba(e) {
|
|
2714
2750
|
const t = {
|
|
2715
2751
|
presenceContext: null,
|
|
2716
2752
|
props: {},
|
|
@@ -2724,10 +2760,10 @@ function ga(e) {
|
|
|
2724
2760
|
},
|
|
2725
2761
|
latestValues: {}
|
|
2726
2762
|
}
|
|
2727
|
-
}, n =
|
|
2763
|
+
}, n = zn(e) && !or(e) ? new ya(t) : new aa(t);
|
|
2728
2764
|
n.mount(e), he.set(e, n);
|
|
2729
2765
|
}
|
|
2730
|
-
function
|
|
2766
|
+
function Ta(e) {
|
|
2731
2767
|
const t = {
|
|
2732
2768
|
presenceContext: null,
|
|
2733
2769
|
props: {},
|
|
@@ -2737,68 +2773,68 @@ function ya(e) {
|
|
|
2737
2773
|
},
|
|
2738
2774
|
latestValues: {}
|
|
2739
2775
|
}
|
|
2740
|
-
}, n = new
|
|
2776
|
+
}, n = new la(t);
|
|
2741
2777
|
n.mount(e), he.set(e, n);
|
|
2742
2778
|
}
|
|
2743
|
-
function
|
|
2779
|
+
function va(e, t, n) {
|
|
2744
2780
|
const s = F(e) ? e : fe(e);
|
|
2745
|
-
return s.start(
|
|
2781
|
+
return s.start(Hn("", s, t, n)), s.animation;
|
|
2746
2782
|
}
|
|
2747
|
-
function
|
|
2748
|
-
return F(e) || typeof e == "number" || typeof e == "string" && !
|
|
2783
|
+
function Sa(e, t) {
|
|
2784
|
+
return F(e) || typeof e == "number" || typeof e == "string" && !ht(t);
|
|
2749
2785
|
}
|
|
2750
|
-
function
|
|
2786
|
+
function rs(e, t, n, s) {
|
|
2751
2787
|
const i = [];
|
|
2752
|
-
if (
|
|
2753
|
-
i.push(
|
|
2788
|
+
if (Sa(e, t))
|
|
2789
|
+
i.push(va(e, ht(t) && t.default || t, n && (n.default || n)));
|
|
2754
2790
|
else {
|
|
2755
|
-
const r =
|
|
2756
|
-
|
|
2791
|
+
const r = Xn(e, t, s), a = r.length;
|
|
2792
|
+
B(!!a, "No valid elements provided.", "no-valid-elements");
|
|
2757
2793
|
for (let o = 0; o < a; o++) {
|
|
2758
|
-
const
|
|
2759
|
-
|
|
2760
|
-
const c =
|
|
2761
|
-
he.has(
|
|
2762
|
-
const
|
|
2763
|
-
"delay" in f && typeof f.delay == "function" && (f.delay = f.delay(o, a)), i.push(...
|
|
2794
|
+
const u = r[o];
|
|
2795
|
+
B(u !== null, "You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.", "animate-null");
|
|
2796
|
+
const c = u instanceof Element ? ba : Ta;
|
|
2797
|
+
he.has(u) || c(u);
|
|
2798
|
+
const l = he.get(u), f = { ...n };
|
|
2799
|
+
"delay" in f && typeof f.delay == "function" && (f.delay = f.delay(o, a)), i.push(...Wr(l, { ...t, transition: f }, {}));
|
|
2764
2800
|
}
|
|
2765
2801
|
}
|
|
2766
2802
|
return i;
|
|
2767
2803
|
}
|
|
2768
|
-
function
|
|
2804
|
+
function Va(e, t, n) {
|
|
2769
2805
|
const s = [];
|
|
2770
|
-
return
|
|
2771
|
-
s.push(...
|
|
2806
|
+
return yr(e, t, n, { spring: ce }).forEach(({ keyframes: r, transition: a }, o) => {
|
|
2807
|
+
s.push(...rs(o, r, a));
|
|
2772
2808
|
}), s;
|
|
2773
2809
|
}
|
|
2774
|
-
function
|
|
2810
|
+
function wa(e) {
|
|
2775
2811
|
return Array.isArray(e) && e.some(Array.isArray);
|
|
2776
2812
|
}
|
|
2777
|
-
function
|
|
2813
|
+
function xa(e) {
|
|
2778
2814
|
function t(n, s, i) {
|
|
2779
2815
|
let r = [], a;
|
|
2780
|
-
if (
|
|
2781
|
-
r =
|
|
2816
|
+
if (wa(n))
|
|
2817
|
+
r = Va(n, s, e);
|
|
2782
2818
|
else {
|
|
2783
|
-
const { onComplete:
|
|
2784
|
-
typeof
|
|
2819
|
+
const { onComplete: u, ...c } = i || {};
|
|
2820
|
+
typeof u == "function" && (a = u), r = rs(n, s, c, e);
|
|
2785
2821
|
}
|
|
2786
|
-
const o = new
|
|
2822
|
+
const o = new ji(r);
|
|
2787
2823
|
return a && o.finished.then(a), o;
|
|
2788
2824
|
}
|
|
2789
2825
|
return t;
|
|
2790
2826
|
}
|
|
2791
|
-
const
|
|
2792
|
-
function
|
|
2827
|
+
const Aa = xa(), Pe = "";
|
|
2828
|
+
function Ma(e, t = !0) {
|
|
2793
2829
|
const [n, s] = Ae(0), [i, r] = Ae(0), [a, o] = Ae(e);
|
|
2794
|
-
return a !== e && (o(e), r(e.startsWith(a) ? n : 0)),
|
|
2830
|
+
return a !== e && (o(e), r(e.startsWith(a) ? n : 0)), Qt(() => {
|
|
2795
2831
|
if (!t)
|
|
2796
2832
|
return;
|
|
2797
|
-
const
|
|
2833
|
+
const u = Aa(
|
|
2798
2834
|
// The starting value for the animation (current cursor position).
|
|
2799
2835
|
i,
|
|
2800
2836
|
// The target value: total number of characters.
|
|
2801
|
-
e.split(
|
|
2837
|
+
e.split(Pe).length,
|
|
2802
2838
|
{
|
|
2803
2839
|
// Total animation duration in seconds.
|
|
2804
2840
|
duration: 2,
|
|
@@ -2813,13 +2849,13 @@ function xa(e, t = !0) {
|
|
|
2813
2849
|
}
|
|
2814
2850
|
}
|
|
2815
2851
|
);
|
|
2816
|
-
return () =>
|
|
2817
|
-
}, [i, e, t]), t ? e.split(
|
|
2852
|
+
return () => u.stop();
|
|
2853
|
+
}, [i, e, t]), t ? e.split(Pe).slice(0, n).join(Pe) : e;
|
|
2818
2854
|
}
|
|
2819
|
-
const
|
|
2855
|
+
const Zt = {
|
|
2820
2856
|
MODEL: "Model",
|
|
2821
2857
|
USAGE: "Session usage"
|
|
2822
|
-
},
|
|
2858
|
+
}, Ca = Jt("max-w-[99cqw]", "mt-3"), Ka = hs.memo(
|
|
2823
2859
|
({
|
|
2824
2860
|
content: e,
|
|
2825
2861
|
annotations: t,
|
|
@@ -2828,34 +2864,34 @@ const Ht = {
|
|
|
2828
2864
|
messageIndex: i,
|
|
2829
2865
|
messages: r
|
|
2830
2866
|
}) => {
|
|
2831
|
-
const a =
|
|
2867
|
+
const a = Ma(e, n), {
|
|
2832
2868
|
state: {
|
|
2833
2869
|
streaming: o,
|
|
2834
|
-
restoredModel:
|
|
2870
|
+
restoredModel: u,
|
|
2835
2871
|
restoredTimestamp: c,
|
|
2836
|
-
tokenUsage:
|
|
2872
|
+
tokenUsage: l,
|
|
2837
2873
|
lastStreamingTimestamp: f
|
|
2838
2874
|
}
|
|
2839
|
-
} =
|
|
2875
|
+
} = wt(ms), {
|
|
2840
2876
|
state: { fullScreen: h }
|
|
2841
|
-
} =
|
|
2877
|
+
} = wt(ps), p = t?.model || u, g = l, [T, S] = ds(), { user: v, getAccessToken: A } = os(), { data: V } = ls({
|
|
2842
2878
|
user: v?.username,
|
|
2843
2879
|
getAccessToken: A
|
|
2844
|
-
}), w =
|
|
2880
|
+
}), w = V?.showDetails || !1, m = Jt("prose-li:ps-3", {
|
|
2845
2881
|
"max-w-xs sm:max-w-3xl": !h
|
|
2846
2882
|
}), y = [];
|
|
2847
2883
|
if (w) {
|
|
2848
|
-
if (
|
|
2849
|
-
key:
|
|
2850
|
-
value:
|
|
2851
|
-
}) : y.push(Me)),
|
|
2884
|
+
if (p && (s ? y.push({
|
|
2885
|
+
key: Zt.MODEL,
|
|
2886
|
+
value: p
|
|
2887
|
+
}) : y.push(Me)), g)
|
|
2852
2888
|
if (s) {
|
|
2853
|
-
const M =
|
|
2889
|
+
const M = g === -1 ? "N/A" : `${us.format(g)} ${cs(
|
|
2854
2890
|
"token",
|
|
2855
|
-
|
|
2891
|
+
g
|
|
2856
2892
|
)}`;
|
|
2857
2893
|
y.push({
|
|
2858
|
-
key:
|
|
2894
|
+
key: Zt.USAGE,
|
|
2859
2895
|
value: M
|
|
2860
2896
|
});
|
|
2861
2897
|
} else
|
|
@@ -2864,19 +2900,19 @@ const Ht = {
|
|
|
2864
2900
|
value: f ? Vt(f) : Vt(c || "")
|
|
2865
2901
|
}) : y.push(Me));
|
|
2866
2902
|
}
|
|
2867
|
-
return
|
|
2868
|
-
a &&
|
|
2869
|
-
}, [a,
|
|
2870
|
-
|
|
2903
|
+
return Qt(() => {
|
|
2904
|
+
a && S(a);
|
|
2905
|
+
}, [a, S]), /* @__PURE__ */ St(
|
|
2906
|
+
fs,
|
|
2871
2907
|
{
|
|
2872
2908
|
tail: !0,
|
|
2873
2909
|
footer: y,
|
|
2874
|
-
className:
|
|
2910
|
+
className: Ca,
|
|
2875
2911
|
footerClassName: "text-copy-medium",
|
|
2876
|
-
contentClassName:
|
|
2912
|
+
contentClassName: m,
|
|
2877
2913
|
noMaxWidth: !0,
|
|
2878
|
-
action: /* @__PURE__ */
|
|
2879
|
-
|
|
2914
|
+
action: /* @__PURE__ */ St(
|
|
2915
|
+
gs,
|
|
2880
2916
|
{
|
|
2881
2917
|
streaming: o,
|
|
2882
2918
|
content: e,
|
|
@@ -2891,5 +2927,5 @@ const Ht = {
|
|
|
2891
2927
|
}
|
|
2892
2928
|
);
|
|
2893
2929
|
export {
|
|
2894
|
-
|
|
2930
|
+
Ka as default
|
|
2895
2931
|
};
|